From 54cfdd4d9bc15acc70ff96afb95ad05db7aece79 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期五, 16 五月 2025 17:57:43 +0800
Subject: [PATCH] qx

---
 src/views/doctor/checkAll/index.vue |  444 +++++++++++++++++++++++++++++++-----------------------
 1 files changed, 254 insertions(+), 190 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 052218c..6eb913b 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -1,6 +1,6 @@
 <template>
   <div class="mainbox">
-    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px">
+    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px" v-if="tjStatus == 0">
       <el-form-item label="濮撳悕" prop="name">
         <el-input v-model="queryParams.name" style="width: 120px" placeholder="璇疯緭鍏ュ鍚�" clearable
           @keyup.enter.native="submitForm"></el-input>
@@ -27,6 +27,49 @@
       </el-form-item>
     </el-form>
 
+
+    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px" v-if="tjStatus == 1">
+      <el-form-item label="濮撳悕" prop="name">
+        <el-input v-model="queryParams.name" style="width: 120px" placeholder="璇疯緭鍏ュ鍚�" clearable
+          @keyup.enter.native="submitForm"></el-input>
+      </el-form-item>
+      <el-form-item label="浣撴鍙�" prop="tjNumber">
+        <el-input ref="inputName" v-model="queryParams.tjNumber" style="width: 180px" placeholder="璇疯緭鍏ヤ綋妫�鍙�" clearable
+          @keyup.enter.native="submitForm" @blur="hb"></el-input>
+      </el-form-item>
+
+      <el-form-item label="鍗曚綅鍚嶇О" prop="tjCompName" style="margin-left: 20px">
+        <el-select :remote-method="getRemoteData" v-model="queryParams.tjCompName" value-key="drugManufacturerId"
+          style="width: 180px" remote filterable placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" clearable @change="searchSelect">
+          <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict" />
+        </el-select>
+      </el-form-item>
+       <el-form-item label="瀹℃牳鍖诲笀" prop="shys">
+        <el-input ref="inputName" v-model="queryParams.shys" style="width: 180px" placeholder="璇疯緭鍏ュ鏍稿尰甯�" clearable
+          @keyup.enter.native="submitForm"></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" size="mini" @click="submitForm" style="margin-right: 15px">鎼滅储</el-button>
+        <el-button size="mini" @click="resetQuery">閲嶇疆</el-button>
+        <el-button type="primary" size="mini" @click="toggleCollapse" style="margin-right: 15px"
+          v-show="isCollapsed == 0">楂樼骇鎼滅储</el-button>
+        <el-button type="primary" size="mini" @click="toggleCollapse3" style="margin-right: 15px"
+          v-show="isCollapsed == 1">楂樼骇鎼滅储</el-button>
+      </el-form-item>
+      <el-row v-show="isCollapsed == 1" :gutter="20">
+        <el-col :span="8">
+          <el-form-item label="浣撴鏃堕棿" prop="tjTime">
+            <el-date-picker v-model="startTime" type="datetimerange" align="right" :picker-options="pickerOptions"
+              style="width: 310px" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡"
+              :default-time="['00:00:00', '23:00:00']" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
+              @change="dateChangebirthday1">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+
     <el-radio-group v-model="tjStatus" @input="radioChange" style="margin-left: 20px">
       <el-radio-button label="0">鏈鏍�</el-radio-button>
       <el-radio-button label="1">宸插鏍�</el-radio-button>
@@ -51,11 +94,12 @@
         <el-table-column label="鐢佃瘽" align="center" prop="cusPhone" :show-overflow-tooltip="true" width="130px" />
         <el-table-column label="瀹℃牳鏃堕棿" align="center" prop="shsj" :show-overflow-tooltip="true" width="180px" />
         <el-table-column label="瀹屾垚鏃堕棿" align="center" prop="finishTime" :show-overflow-tooltip="true" width="160px" />
-        <el-table-column label="鐘舵��" align="center" prop="tjStatus" :show-overflow-tooltip="true" width="120px">
-          <template slot-scope="scope">
+        <el-table-column label="鐘舵��" align="center" prop="tjStatus" :show-overflow-tooltip="true" width="120px" v-if="tjStatus == 0">
+          <template slot-scope="scope" v-if="tjStatus == 0">
             <span>{{ scope.row.tjStatus == "1" ? "宸插鏍�" : "鏈鏍�" }}</span>
           </template>
         </el-table-column>
+         <el-table-column label="瀹℃牳鍖诲笀" align="center" prop="shys"  width="120px" v-if="tjStatus == 1"/>
         <el-table-column label="鍗曚綅鍚嶇О" align="center" prop="tjCompName" :show-overflow-tooltip="true" />
         <el-table-column label="浣撴绫诲埆" align="center" prop="tjCategory">
           <template slot-scope="scope">
@@ -400,26 +444,25 @@
                     椤圭洰閫夋嫨
                   </span>
                   <div v-if="xmChange.length > 0" style="display: flex;">
-                    <div style="margin:0 40px;font-size: 0.8vw;">椤圭洰鍚嶇О锛歿{ xmChange[0].pro_name || "" }}</div>
-                    <div style="margin:0 40px ;font-size: 0.8vw;">浠锋牸锛歿{ xmChange[0].price || "" }}</div>
+                    <div style="margin:0 40px;font-size: 0.8vw;">椤圭洰鍚嶇О锛歿{ xmChange[0].proName || "" }}</div>
+                    <div style="margin:0 80px ;font-size: 0.8vw;">浠锋牸锛歿{ xmChange[0].price || "" }}</div>
                   </div>
                   <div v-else style="display: flex;">
                     <div style="margin:0 40px;font-size: 0.8vw;">椤圭洰鍚嶇О锛歿{ }}</div>
-                    <div style="margin:0 40px ;font-size: 0.8vw;">浠锋牸锛歿{ }}</div>
+                    <div style="margin:0 80px ;font-size: 0.8vw;">浠锋牸锛歿{ }}</div>
                   </div>
                   <el-button type="primary" size="mini" @click="handleaddClick()">娣诲姞</el-button>
                 </div>
 
-                <el-table :row-style="redxiangmu" :data="fcList" style="width: 100%">
+                <el-table :row-style="redxiangmu" :data="fcList" style="width: 100%" border>
                   <el-table-column type="selection" width="40" align="center" />
-                  <el-table-column label="搴忓彿" align="center" prop="index" />
-                  <el-table-column label="鍚嶇О" align="center" prop="pro_name" width="100px" />
+                  <el-table-column label="搴忓彿" align="center" prop="newID" />
+                  <el-table-column label="鍚嶇О" align="center" prop="proName" width="100px" />
                   <el-table-column label="浠锋牸" align="center" prop="price" />
-                  <el-table-column label="绉戝" align="center" prop="dept_name" />
+                  <el-table-column label="绉戝" align="center" prop="deptName" />
                   <el-table-column label="鎿嶄綔" align="center" width="130px">
                     <template slot-scope="scope">
-                      <el-button type="primary" icon="el-icon-share" size="mini" @click="handledeleteClick(scope.row)"
-                        title="鍒犻櫎"></el-button>
+                      <el-button type="primary" size="mini" @click="handledeleteClick(scope.row)">鍒犻櫎</el-button>
                     </template>
                   </el-table-column>
                 </el-table>
@@ -721,19 +764,16 @@
     </el-dialog>
 
     <el-dialog :visible.sync="xmopen" width="800px" append-to-body>
-      <el-form ref="form" :model="forms" label-width="80px">
-        <el-form-item label="鍚嶇О" prop="pacName">
-          <el-input v-model="forms.pacName" placeholder="璇疯緭鍏ュ悕绉�" />
-        </el-form-item>
-      </el-form>
-      <el-table :data="datasList" ref="elTable" v-loading="loading" @selection-change="handlexmChange" border
-        height="320px">
-        <el-table-column type="selection" width="40" align="center" />
-        <el-table-column label="搴忓彿" align="center" prop="pacRemark" />
-        <el-table-column label="鍚嶇О" align="center" prop="pacName" width="100px" />
-        <el-table-column label="浠锋牸" align="center" prop="price" />
-        <el-table-column label="绉戝" align="center" prop="pacRemark" />
-      </el-table>
+      <div style="margin: 20px;">
+        <el-table :data="datasList" ref="elTable" v-loading="loading" @selection-change="handlexmChange" border
+          height="320px">
+          <el-table-column type="selection" width="40" align="center" />
+          <el-table-column label="鍚嶇О" align="center" prop="proName" width="100px" />
+          <el-table-column label="浠锋牸" align="center" prop="price" />
+          <el-table-column label="绉戝" align="center" prop="deptName" />
+        </el-table>
+      </div>
+
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitFormxm">纭� 瀹�</el-button>
         <el-button @click="cancels">鍙� 娑�</el-button>
@@ -910,6 +950,7 @@
       Testitems: [],
       CheckBox: {},
       startTime: [],
+       isCollapsed: 0,
       textarea1: "",
       loading: true,
       selectLettercurrent: " ",
@@ -931,6 +972,7 @@
         compId: null,
         name: null,
         checkStatus: null,
+        shys: null,
       },
       formobj: {},
       yichangList: [],
@@ -1047,6 +1089,14 @@
 
     handleCurrentChangeAdvice(currentRow) {
       this.selectedAdvice = currentRow;
+    },
+
+
+     toggleCollapse3() {
+      this.isCollapsed = 0;
+    },
+    toggleCollapse() {
+      this.isCollapsed = 1;
     },
 
     applySelectedAdvice() {
@@ -1276,21 +1326,32 @@
     handleaddClick() {
       console.log(this.xmChange)
       let data = {
-        orderId: this.xmChange[0].order_id,
+        orderId: this.xmChange[0].orderId,
         data: [{
-          proId: this.xmChange[0].pro_id,
+          proId: this.xmChange[0].proId,
           type: 1
         }]
       }
       UpdFcPro(data).then(res => {
-
+        if (res.code == 200) {
+          this.xmChange = []
+          this.fuchaxiangmu()
+        }
       })
     },
 
-    handledeleteClick() {
-
+    handledeleteClick(row) {
+      let data = {
+        orderId: row.orderId,
+        data: [{
+          proId: row.proId,
+          type: 0
+        }]
+      }
       UpdFcPro(data).then(res => {
-
+        if (res.code == 200) {
+          this.fuchaxiangmu()
+        }
       })
     },
 
@@ -1331,75 +1392,78 @@
       return row.orderDetailId;
     },
     xiangmuqingkuang() {
-  this.loading = true;
-  cSWebGetPro(this.tjNumber)
-    .then((res) => {
-      this.status1 = 1;
-      this.statusList = res.data;
-      if (this.statusList.length == 0) {
-        this.$message.success("鏆傛棤椤圭洰鎯呭喌");
-      }
-    })
-    .catch((error) => {
-      console.error('鑾峰彇椤圭洰鎯呭喌澶辫触:', error);
-      this.$message.error('鑾峰彇椤圭洰鎯呭喌澶辫触');
-    })
-    .finally(() => {
-      this.loading = false;
-    });
-},
+      this.loading = true;
+      cSWebGetPro(this.tjNumber)
+        .then((res) => {
+          this.status1 = 1;
+          this.statusList = res.data;
+          if (this.statusList.length == 0) {
+            this.$message.success("鏆傛棤椤圭洰鎯呭喌");
+          }
+        })
+        .catch((error) => {
+          console.error('鑾峰彇椤圭洰鎯呭喌澶辫触:', error);
+          this.$message.error('鑾峰彇椤圭洰鎯呭喌澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
 
     guanbi() {
       this.drawer = false;
     },
 
     yichangjieguo() {
-  this.loading = true;
-  this.status1 = 0;
-  yichang({
-    tjNum: this.tjNumber,
-  })
-    .then((res) => {
-      this.yichangList = res.data;
-      this.yichangList.forEach((item) => {
-        item.sone.forEach((soneItem) => {
-          if (!Array.isArray(soneItem.advices) || soneItem.advices.length === 0) {
-            soneItem.advices = [{ bt: "", nr: "" }];
+      this.loading = true;
+      this.status1 = 0;
+      yichang({
+        tjNum: this.tjNumber,
+      })
+        .then((res) => {
+          this.yichangList = res.data;
+          this.yichangList.forEach((item) => {
+            item.sone.forEach((soneItem) => {
+              if (!Array.isArray(soneItem.advices) || soneItem.advices.length === 0) {
+                soneItem.advices = [{ bt: "", nr: "" }];
+              }
+            });
+          });
+          if (!this.yichangList) {
+            this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
           }
+        })
+        .catch((error) => {
+          console.error('鑾峰彇寮傚父缁撴灉澶辫触:', error);
+          this.$message.error('鑾峰彇寮傚父缁撴灉澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
         });
-      });
-      if (!this.yichangList) {
-        this.$message.warning("鏆傛棤寮傚父鎶ュ憡");
-      }
-    })
-    .catch((error) => {
-      console.error('鑾峰彇寮傚父缁撴灉澶辫触:', error);
-      this.$message.error('鑾峰彇寮傚父缁撴灉澶辫触');
-    })
-    .finally(() => {
-      this.loading = false;
-    });
-},
+    },
 
-fuchaxiangmu() {
-  this.loading = true;
-  this.status1 = 2;
-  let data = {
-    tjNum: this.tjNumber,
-    type: 1
-  };
-  getFcList(data)
-    .then((res) => {
-      this.fcList = res.data;
-    })
-    .catch((error) => {
-      console.error('鑾峰彇澶嶆煡椤圭洰澶辫触:', error);
-      this.$message.error('鑾峰彇澶嶆煡椤圭洰澶辫触');
-    })
-    .finally(() => {
-      this.loading = false;
-    });
-},
+    fuchaxiangmu() {
+      this.loading = true;
+      this.status1 = 2;
+      let data = {
+        tjNum: this.tjNumber,
+        type: 1
+      };
+      getFcList(data)
+        .then((res) => {
+          this.fcList = res.data;
+          this.fcList.forEach((item, index) => {
+            item.newID = index + 1;
+          })
+        })
+        .catch((error) => {
+          console.error('鑾峰彇澶嶆煡椤圭洰澶辫触:', error);
+          this.$message.error('鑾峰彇澶嶆煡椤圭洰澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
 
     getdate() {
       getNewDateList().then((res) => {
@@ -1515,111 +1579,111 @@
     },
 
     Graphicreport() {
-  this.loading = true;
-  let dictType = "dict_ageunit";
-  getDicts(dictType)
-    .then((res) => {
-      if (res.code == 200) {
-        res.data.forEach((item) => {
-          if (this.tableAll.age_unit == item.dictValue) {
-            this.tableAll.age_unit = item.dictLabel;
+      this.loading = true;
+      let dictType = "dict_ageunit";
+      getDicts(dictType)
+        .then((res) => {
+          if (res.code == 200) {
+            res.data.forEach((item) => {
+              if (this.tableAll.age_unit == item.dictValue) {
+                this.tableAll.age_unit = item.dictLabel;
+              }
+            });
+            let dictTypes = "sys_user_sex";
+            return getDicts(dictTypes);
+          } else {
+            throw new Error('鑾峰彇骞撮緞鍗曚綅瀛楀吀澶辫触');
           }
-        });
-        let dictTypes = "sys_user_sex";
-        return getDicts(dictTypes);
-      } else {
-        throw new Error('鑾峰彇骞撮緞鍗曚綅瀛楀吀澶辫触');
-      }
-    })
-    .then((res) => {
-      if (res.code == 200) {
-        res.data.forEach((item) => {
-          if (this.tableAll.cusSex == item.dictValue) {
-            this.tableAll.cusSex = item.dictLabel;
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            res.data.forEach((item) => {
+              if (this.tableAll.cusSex == item.dictValue) {
+                this.tableAll.cusSex = item.dictLabel;
+              }
+            });
+            let data = {
+              patname: this.tableAll.cusName,
+              sex: this.tableAll.cusSex,
+              patage: this.tableAll.age,
+              patagename: this.tableAll.age_unit,
+              patbirth: this.tableAll.cusBrithday,
+            };
+            return getTjYxjcList(data);
+          } else {
+            throw new Error('鑾峰彇鎬у埆瀛楀吀澶辫触');
           }
+        })
+        .then((res) => {
+          this.baogao = res.data;
+          this.$refs.bbb.open = true;
+          this.$refs.bbb.title = "鎶ュ憡瀛楀吀";
+        })
+        .catch((error) => {
+          console.error('鐢熸垚鍥炬枃鎶ュ憡澶辫触:', error);
+          this.$message.error('鐢熸垚鍥炬枃鎶ュ憡澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
         });
-        let data = {
-          patname: this.tableAll.cusName,
-          sex: this.tableAll.cusSex,
-          patage: this.tableAll.age,
-          patagename: this.tableAll.age_unit,
-          patbirth: this.tableAll.cusBrithday,
-        };
-        return getTjYxjcList(data);
-      } else {
-        throw new Error('鑾峰彇鎬у埆瀛楀吀澶辫触');
-      }
-    })
-    .then((res) => {
-      this.baogao = res.data;
-      this.$refs.bbb.open = true;
-      this.$refs.bbb.title = "鎶ュ憡瀛楀吀";
-    })
-    .catch((error) => {
-      console.error('鐢熸垚鍥炬枃鎶ュ憡澶辫触:', error);
-      this.$message.error('鐢熸垚鍥炬枃鎶ュ憡澶辫触');
-    })
-    .finally(() => {
-      this.loading = false;
-    });
-},
+    },
 
     historicalreport() {
-  this.loading = true;
-  let data = {
-    cusId: this.tableAll.cusId,
-  };
-  reportHistory(data)
-    .then((res) => {
-      if (res.data[0] != null) {
-        this.reportHistorydata = res.data;
-      } else {
-        this.reportHistorydata = [];
-      }
-    })
-    .catch((error) => {
-      console.error('鑾峰彇鍘嗗彶鎶ュ憡澶辫触:', error);
-      this.$message.error('鑾峰彇鍘嗗彶鎶ュ憡澶辫触');
-    })
-    .finally(() => {
-      this.loading = false;
-    });
-},
+      this.loading = true;
+      let data = {
+        cusId: this.tableAll.cusId,
+      };
+      reportHistory(data)
+        .then((res) => {
+          if (res.data[0] != null) {
+            this.reportHistorydata = res.data;
+          } else {
+            this.reportHistorydata = [];
+          }
+        })
+        .catch((error) => {
+          console.error('鑾峰彇鍘嗗彶鎶ュ憡澶辫触:', error);
+          this.$message.error('鑾峰彇鍘嗗彶鎶ュ憡澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
 
-medicalhistory() {
-  this.loading = true;
-  this.status1 = 3;
-  let tjNumber = this.tableAll.tjNumber;
-  getInfoById(tjNumber)
-    .then((response) => {
-      this.formobj = response.data;
-      if (this.formobj.xiyan == null) {
-        this.formobj.xiyan = "1";
-      }
-      if (this.formobj.xiyanpinlv == null) {
-        this.formobj.xiyanpinlv = "0";
-      }
-      if (this.formobj.xiyanyear == null) {
-        this.formobj.xiyanyear = "0";
-      }
-      if (this.formobj.yinjiu == null) {
-        this.formobj.yinjiu = "1";
-      }
-      if (this.formobj.yinjiupinlv == null) {
-        this.formobj.yinjiupinlv = "0";
-      }
-      if (this.formobj.yinjiuyear == null) {
-        this.formobj.yinjiuyear = "0";
-      }
-    })
-    .catch((error) => {
-      console.error('鑾峰彇鑱屼笟鐥呭彶澶辫触:', error);
-      this.$message.error('鑾峰彇鑱屼笟鐥呭彶澶辫触');
-    })
-    .finally(() => {
-      this.loading = false;
-    });
-},
+    medicalhistory() {
+      this.loading = true;
+      this.status1 = 3;
+      let tjNumber = this.tableAll.tjNumber;
+      getInfoById(tjNumber)
+        .then((response) => {
+          this.formobj = response.data;
+          if (this.formobj.xiyan == null) {
+            this.formobj.xiyan = "1";
+          }
+          if (this.formobj.xiyanpinlv == null) {
+            this.formobj.xiyanpinlv = "0";
+          }
+          if (this.formobj.xiyanyear == null) {
+            this.formobj.xiyanyear = "0";
+          }
+          if (this.formobj.yinjiu == null) {
+            this.formobj.yinjiu = "1";
+          }
+          if (this.formobj.yinjiupinlv == null) {
+            this.formobj.yinjiupinlv = "0";
+          }
+          if (this.formobj.yinjiuyear == null) {
+            this.formobj.yinjiuyear = "0";
+          }
+        })
+        .catch((error) => {
+          console.error('鑾峰彇鑱屼笟鐥呭彶澶辫触:', error);
+          this.$message.error('鑾峰彇鑱屼笟鐥呭彶澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
 
     downLoadFileImg(row) {
       const tjNumber = row.tjNumber;

--
Gitblit v1.8.0