From 2a5114d7be44e464c55e7942759229be1a3c28fe Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期一, 19 五月 2025 17:18:34 +0800
Subject: [PATCH] 总检筛选回显

---
 src/views/doctor/checkAll/index.vue |   66 ++++++++++++----
 src/views/system/zhiye/index.vue    |  125 ++++++++----------------------
 2 files changed, 83 insertions(+), 108 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 0d79e70..ac83bf0 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -1,6 +1,7 @@
 <template>
   <div class="mainbox">
-    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px" v-if="tjStatus == 0">
+    <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>
@@ -21,6 +22,13 @@
           <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict" />
         </el-select>
       </el-form-item>
+      <el-form-item label="浣撴绫诲埆">
+        <el-select style="width: 200px" v-model="queryParams.tjCategory" placeholder="璇烽�夋嫨浣撴绫诲埆">
+          <el-option v-for="dict in dict.type.dict_tjtype" :key="dict.value" :label="dict.label"
+            :value="dict.value"></el-option>
+        </el-select>
+        <!-- <el-input v-model="form.category" placeholder="璇疯緭鍏ヤ綋妫�绫诲埆" /> -->
+      </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>
@@ -28,7 +36,8 @@
     </el-form>
 
 
-    <el-form :model="queryParams" ref="tableList" :inline="true" label-width="76px" style="margin-top: 10px" v-if="tjStatus == 1">
+    <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>
@@ -44,9 +53,16 @@
           <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-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 label="浣撴绫诲埆">
+        <el-select style="width: 200px" v-model="queryParams.tjCategory" placeholder="璇烽�夋嫨浣撴绫诲埆">
+          <el-option v-for="dict in dict.type.dict_tjtype" :key="dict.value" :label="dict.label"
+            :value="dict.value"></el-option>
+        </el-select>
+        <!-- <el-input v-model="form.category" placeholder="璇疯緭鍏ヤ綋妫�绫诲埆" /> -->
       </el-form-item>
       <el-form-item>
         <el-button type="primary" size="mini" @click="submitForm" style="margin-right: 15px">鎼滅储</el-button>
@@ -94,12 +110,13 @@
         <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" v-if="tjStatus == 0">
+        <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="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">
@@ -835,6 +852,7 @@
     Prescription,
   },
   dicts: [
+    "dict_team",
     "dict_tjtype",
     "sys_user_sex",
     "sys_yes_no",
@@ -849,7 +867,7 @@
   data() {
     return {
       zhiyeJl: '', // 鍒濆鍖栨鏌ョ粨璁轰负绌�
-      zhiyeJg: '鏈彂鐜扮洰鏍囨�х柧鐥�', // 鍒濆鍖栦綋妫�缁撴灉涓洪粯璁ゅ��
+      zhiyeJg: '', // 鍒濆鍖栦綋妫�缁撴灉涓洪粯璁ゅ��
       selectedAdvice: null,
       activeAdviceIndex: 0,
       advicerulesList: [],
@@ -951,7 +969,7 @@
       Testitems: [],
       CheckBox: {},
       startTime: [],
-       isCollapsed: 0,
+      isCollapsed: 0,
       textarea1: "",
       loading: true,
       selectLettercurrent: " ",
@@ -974,6 +992,7 @@
         name: null,
         checkStatus: null,
         shys: null,
+        tjCategory: null
       },
       formobj: {},
       yichangList: [],
@@ -1014,7 +1033,6 @@
     this.getConfigKey();
     this.getdate();
   },
-
   mounted() {
     this.$nextTick(() => {
       this.$refs.inputName.focus();
@@ -1088,7 +1106,7 @@
     },
 
 
-     toggleCollapse3() {
+    toggleCollapse3() {
       this.isCollapsed = 0;
     },
     toggleCollapse() {
@@ -1129,7 +1147,7 @@
             this.cancelAdviceDialog();
             done();
           })
-          .catch(() => {});
+          .catch(() => { });
       } else {
         this.cancelAdviceDialog();
         done();
@@ -1327,11 +1345,11 @@
           type: 1
         }]
       };
-      UpdFcPro(data).then(res => {});
+      UpdFcPro(data).then(res => { });
     },
 
     handledeleteClick() {
-      UpdFcPro(data).then(res => {});
+      UpdFcPro(data).then(res => { });
     },
 
     handlexmChange(selection) {
@@ -1825,7 +1843,19 @@
 
     resetQuery() {
       this.startTime = [];
-      this.resetForm("tableList");
+      this.queryParams = {
+        page: 1,
+        pageSize: 10,
+        tjNumber: "",
+        beginTime: null,
+        endTime: null,
+        compId: null,
+        name: null,
+        checkStatus: null,
+        shys: null,
+        tjCategory: null
+      },
+        this.resetForm("tableList");
       this.submitForm();
     },
 
@@ -1891,8 +1921,8 @@
                         this.remark = this.changedate[i].remark;
                       }
                       // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                      this.zhiyeJl = response.data.zhiyeJl || '';
-                      this.zhiyeJg = response.data.zhiyeJg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
+                      this.zhiyeJl = this.changedate[0].zhiyejl || '';
+                      this.zhiyeJg = this.changedate[0].zhiyejg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                     } else {
                       this.$message({
                         type: "warning",
@@ -1936,8 +1966,8 @@
                             this.textarea1 = item.checkAdvice || "";
                           });
                           // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
-                          this.zhiyeJl = response.data.zhiyeJl || '';
-                          this.zhiyeJg = response.data.zhiyeJg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
+                          this.zhiyeJl = this.changedate[0].zhiyejl || '';
+                          this.zhiyeJg = this.changedate[0].zhiyejg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                         } else {
                           this.$message({
                             type: "warning",
@@ -1981,7 +2011,7 @@
               done();
             });
           })
-          .catch(() => {});
+          .catch(() => { });
       } else {
         let data = {
           userId: this.userId,
diff --git a/src/views/system/zhiye/index.vue b/src/views/system/zhiye/index.vue
index f053973..1ae360c 100644
--- a/src/views/system/zhiye/index.vue
+++ b/src/views/system/zhiye/index.vue
@@ -488,20 +488,20 @@
                   @blur="numberChangeXianPrice(discount, discount)" />
               </el-form-item>
               <el-form-item label="鎺ュ宸ラ緞骞�" prop="zhiyeJhgln" label-width="84px">
-                <el-input  v-model="form.zhiyeJhgln"  type="number" style="width: 140px"/>
+                <el-input v-model="form.zhiyeJhgln" type="number" style="width: 140px" />
               </el-form-item>
               <el-form-item label="鎺ュ宸ラ緞鏈�" prop="zhiyeJhgln" label-width="84px">
-                <el-input  v-model="form.zhiyeJhgly" style="width: 140px" type="number" />
+                <el-input v-model="form.zhiyeJhgly" style="width: 140px" type="number" />
               </el-form-item>
               <el-form-item label="寮�濮嬫帴瀹虫棩鏈�" prop="zhiyeKsjhrq" label-width="100px">
-                <el-date-picker clearable v-model="form.zhiyeKsjhrq" type="date"
-                  value-format="yyyy-MM-dd" style="width: 200px" />
+                <el-date-picker clearable v-model="form.zhiyeKsjhrq" type="date" value-format="yyyy-MM-dd"
+                  style="width: 200px" />
               </el-form-item>
               <el-form-item label="宸ュ彿" label-width="50px">
-                <el-input  v-model="form.zhiyeGh"  />
+                <el-input v-model="form.zhiyeGh" />
               </el-form-item>
               <el-form-item label="杞﹂棿" label-width="106px">
-                <el-input  v-model="form.zhiyeCj" />
+                <el-input v-model="form.zhiyeCj" />
               </el-form-item>
               <br />
 
@@ -550,9 +550,6 @@
                 font-size: 16px;
                 margin-right: 20px;
               ">
-              <span v-if="this.tableData1[0]">{{
-                this.tableData1[0].pacName || ""
-              }}</span>
               宸查�夐」鐩潯鏁帮細<span style="font-weight: 700; color: red; margin-right: 5px">{{ this.tableData1.length || 0
                 }}</span>鏉�
             </div>
@@ -2394,90 +2391,29 @@
       let cusSex = this.form.cusSex;
       this.datekey = Date.now();
       //鍏ㄩ儴濂楅
-
-      let param = {
-        sex: cusSex,
-        dwId: this.form.firmId || "",
-      };
-      if (this.form.tjType == 1) {
-        if (!this.form.firmId && !this.form.firmName) {
-          this.$message({
-            type: "warning",
-            message: "璇峰厛缁存姢鍗曚綅锛�",
-          });
-        } else if (!this.form.firmId && this.form.firmName) {
-          this.taocan = true;
-          this.loading = true;
-          deptTreeSelect(cusSex).then((response) => {
-            this.newpacName = response.rows;
-            try {
-              if (this.tableData1.length >= 1) {
-                this.newpacName.forEach((item3) => {
-                  this.tableData1.forEach((item4) => {
-                    item4.list.forEach((item6) => {
-                      if (item6.pacName === item3.pacName) {
-                        this.$nextTick(() => {
-                          this.$refs.tb.toggleRowSelection(item3, true);
-                        });
-                        throw Error();
-                      }
+      this.taocan = true;
+      this.loading = true;
+      deptTreeSelect(cusSex).then((response) => {
+        this.newpacName = response.rows;
+        try {
+          if (this.tableData1.length >= 1) {
+            this.newpacName.forEach((item3) => {
+              this.tableData1.forEach((item4) => {
+                item4.list.forEach((item6) => {
+                  if (item6.pacName === item3.pacName) {
+                    this.$nextTick(() => {
+                      this.$refs.tb.toggleRowSelection(item3, true);
                     });
-                  });
-                });
-              }
-            } catch (error) { }
-            this.loading = false;
-          });
-        }
-
-        else {
-          this.taocan = true;
-          this.loading = true;
-          tuantiSelect(param).then((res) => {
-            this.newpacName = res.data;
-            try {
-              if (this.tableData1.length >= 1) {
-                this.newpacName.forEach((item3) => {
-                  this.tableData1.forEach((item4) => {
-                    item4.list.forEach((item6) => {
-                      if (item6.pacName === item3.pacName) {
-                        this.$nextTick(() => {
-                          this.$refs.tb.toggleRowSelection(item3, true);
-                        });
-                        throw Error();
-                      }
-                    });
-                  });
-                });
-              }
-            } catch (error) { }
-            this.loading = false;
-          });
-        }
-      } else {
-        this.taocan = true;
-        this.loading = true;
-        deptTreeSelect(cusSex).then((response) => {
-          this.newpacName = response.rows;
-          try {
-            if (this.tableData1.length >= 1) {
-              this.newpacName.forEach((item3) => {
-                this.tableData1.forEach((item4) => {
-                  item4.list.forEach((item6) => {
-                    if (item6.pacName === item3.pacName) {
-                      this.$nextTick(() => {
-                        this.$refs.tb.toggleRowSelection(item3, true);
-                      });
-                      throw Error();
-                    }
-                  });
+                    throw Error();
+                  }
                 });
               });
-            }
-          } catch (error) { }
-          this.loading = false;
-        });
-      }
+            });
+          }
+        } catch (error) { }
+        this.loading = false;
+      });
+
     },
 
     // 鐐瑰嚮澶氶�夋鑾峰彇閫変腑鏁版嵁
@@ -2967,6 +2903,15 @@
         });
       }
 
+      // 濡傛灉 tjCategory 涓� "02"锛岀‘淇濋�変腑鐨勫椁愯娣诲姞鍒� tableData1
+      if (this.tjCategory === "02" && this.tableData.length > 0) {
+        this.tableData.forEach((item) => {
+          if (!this.tableData1.some((existingItem) => existingItem.pacId === item.pacId)) {
+            this.tableData1.push(item);
+          }
+        });
+      }
+
       this.taocan = false;
       this.defaultKeys = [];
       this.DataLists = [];

--
Gitblit v1.8.0