From bbbc81e677639ccc30944eb84de36c3bb5867256 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期四, 05 六月 2025 16:26:42 +0800
Subject: [PATCH] 1

---
 src/views/doctor/checkAll/index.vue |  575 ++++++++++++++++++++++++++++++++------------------------
 1 files changed, 326 insertions(+), 249 deletions(-)

diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 052218c..1dcb6d9 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">
+    <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,10 +22,68 @@
           <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>
       </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 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>
+        <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">
@@ -51,11 +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">
-          <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">
@@ -96,10 +157,8 @@
           <tr style="border: 1px solid #dfe6ec; border-collapse: collapse; height: 36px;">
             <td style="border: 1px solid #dfe6ec; border-collapse: collapse">濮撳悕锛�</td>
             <td style="border: 1px solid #dfe6ec; border-collapse: collapse">{{ tableAll.cusName }}</td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">鎬у埆锛�</td>
-            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">
-              {{ tableAll.cusSex == 0 ? "鐢�" : tableAll.cusSex == 1 ? "濂�" : "鏈煡" }}
-            </td>
+            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">鎬у埆锛歿{ tableAll.cusSex == 0 ? "鐢�" : tableAll.cusSex == 1 ? "濂�" : "鏈煡" }}</td>
+            <td style="border: 1px solid #dfe6ec; border-collapse: collapse">骞撮緞锛歿{ tableAll.age }}</td>
           </tr>
           <tr style="border: 1px solid #dfe6ec; border-collapse: collapse; height: 36px;">
             <td style="border: 1px solid #dfe6ec; border-collapse: collapse">浣撴鍗曞彿锛�</td>
@@ -230,11 +289,10 @@
             <el-form v-if="tableAll && tableAll.tjCategory === '02'" ref="numberValidateForm" label-width="80px"
               class="demo-ruleForm">
               <el-form-item label="妫�鏌ョ粨璁�">
-                <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="textarea1" :rows="3"
-                  style="width: 96%"></el-input>
+                <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="zhiyeJl" :rows="3" style="width: 96%"></el-input>
               </el-form-item>
               <el-form-item label="浣撴缁撴灉">
-                <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="res" :rows="3" style="width: 96%"></el-input>
+                <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="zhiyeJg" :rows="3" style="width: 96%"></el-input>
               </el-form-item>
             </el-form>
             <div style="margin: 0 0px 10px 15px" v-if="tjproject != '1'">
@@ -400,26 +458,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 +778,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>
@@ -767,7 +821,8 @@
   isPdfOrJimu,
   addOrder,
   addOrder1,
-  getFcList, UpdFcPro
+  getFcList,
+  UpdFcPro
 } from "@/api/doctor/checkAll";
 import { getInfoById } from "@/api/hosp/history";
 import { getInfo } from "@/api/login";
@@ -795,6 +850,7 @@
     Prescription,
   },
   dicts: [
+    "dict_team",
     "dict_tjtype",
     "sys_user_sex",
     "sys_yes_no",
@@ -808,14 +864,15 @@
   name: "checkAll",
   data() {
     return {
-      res: '鏈彂鐜扮洰鏍囨�х柧鐥�',
+      zhiyeJl: '', // 鍒濆鍖栨鏌ョ粨璁轰负绌�
+      zhiyeJg: '', // 鍒濆鍖栦綋妫�缁撴灉涓洪粯璁ゅ��
       selectedAdvice: null,
       activeAdviceIndex: 0,
       advicerulesList: [],
       xmChange: [],
       showjianyi: false,
-      adviceLoading: false, // 鎺у埗琛ㄦ牸鍔犺浇鐘舵��
-      adviceEmptyText: '鏆傛棤鏁版嵁', // 鑷畾涔夌┖鏁版嵁鎻愮ず
+      adviceLoading: false,
+      adviceEmptyText: '鏆傛棤鏁版嵁',
       total1: 0,
       forms: {
         pacName: ""
@@ -825,9 +882,9 @@
       queryParams1: {
         pageNum: 1,
         pageSize: 10,
-        zyzd: '', // 寤鸿鍚嶇О
+        zyzd: '',
       },
-      adviceCache: new Map(), // 缂撳瓨寤鸿鏁版嵁
+      adviceCache: new Map(),
       addNewDialogVisible: false,
       newItem: {
         parentName: '',
@@ -910,6 +967,7 @@
       Testitems: [],
       CheckBox: {},
       startTime: [],
+      isCollapsed: 0,
       textarea1: "",
       loading: true,
       selectLettercurrent: " ",
@@ -931,6 +989,8 @@
         compId: null,
         name: null,
         checkStatus: null,
+        shys: null,
+        tjCategory: null
       },
       formobj: {},
       yichangList: [],
@@ -967,11 +1027,10 @@
   },
 
   created() {
-    console.log(this.dict.type.dict_tjtype, "鑱屼笟浣撴"); // 鎵撳嵃瀛楀吀鏁版嵁
+    console.log(this.dict.type.dict_tjtype, "鑱屼笟浣撴");
     this.getConfigKey();
     this.getdate();
   },
-
   mounted() {
     this.$nextTick(() => {
       this.$refs.inputName.focus();
@@ -989,10 +1048,10 @@
       this.queryParams1.pageNum = 1;
       this.queryParams1.pageSize = 10;
       this.queryParams1.zyzd = '';
-      this.selectedAdvice = null; // 閲嶇疆閫変腑寤鸿
-      this.advicerulesList = []; // 娓呯┖寤鸿鍒楄〃
+      this.selectedAdvice = null;
+      this.advicerulesList = [];
       this.total1 = 0;
-      this.adviceCache.clear(); // 娓呯┖缂撳瓨
+      this.adviceCache.clear();
       this.filterAdvices();
       this.showjianyi = true;
     },
@@ -1003,10 +1062,8 @@
         this.queryParams1.pageNum = 1;
       }
 
-      // 鐢熸垚缂撳瓨 key锛屼粎浣跨敤 zyzd 鍜屽垎椤靛弬鏁�
       const cacheKey = `${this.queryParams1.zyzd || ''}_${this.queryParams1.pageNum}_${this.queryParams1.pageSize}`;
 
-      // 妫�鏌ョ紦瀛�
       if (this.adviceCache.has(cacheKey)) {
         const cachedData = this.adviceCache.get(cacheKey);
         this.advicerulesList = cachedData.rows;
@@ -1015,7 +1072,6 @@
         return;
       }
 
-      // 鏄剧ず鍔犺浇鐘舵��
       this.adviceLoading = true;
       this.adviceEmptyText = '鍔犺浇涓�...';
 
@@ -1024,13 +1080,11 @@
           this.advicerulesList = response.rows || [];
           this.total1 = response.total || 0;
 
-          // 瀛樺叆缂撳瓨
           this.adviceCache.set(cacheKey, {
             rows: this.advicerulesList,
             total: this.total1,
           });
 
-          // 鏇存柊绌烘暟鎹彁绀�
           this.adviceEmptyText = this.advicerulesList.length === 0 ? '鏆傛棤鍖归厤鐨勫缓璁�' : '鏆傛棤鏁版嵁';
         })
         .catch((error) => {
@@ -1043,10 +1097,18 @@
         .finally(() => {
           this.adviceLoading = false;
         });
-    }, 800), // 闃叉姈鏃堕棿涓� 800ms
+    }, 800),
 
     handleCurrentChangeAdvice(currentRow) {
       this.selectedAdvice = currentRow;
+    },
+
+
+    toggleCollapse3() {
+      this.isCollapsed = 0;
+    },
+    toggleCollapse() {
+      this.isCollapsed = 1;
     },
 
     applySelectedAdvice() {
@@ -1062,7 +1124,6 @@
       }
     },
 
-    // 鍙栨秷閫夋嫨骞跺叧闂璇濇
     cancelAdviceDialog() {
       this.showjianyi = false;
       this.selectedAdvice = null;
@@ -1073,7 +1134,6 @@
       this.adviceCache.clear();
     },
 
-    // 鍏抽棴瀵硅瘽妗嗗墠鐨勭‘璁�
     handleCloseAdviceDialog(done) {
       if (this.selectedAdvice) {
         this.$confirm('鎮ㄥ凡閫夋嫨涓�鏉″缓璁紝纭畾瑕佸叧闂悧锛�', '鎻愮ず', {
@@ -1201,6 +1261,7 @@
         this.newItem.jcxm = value;
       }
     },
+
     change(val) {
       console.log('閫変腑鐨勫�兼槸锛�', val);
     },
@@ -1263,52 +1324,50 @@
     },
 
     handleQuery() {
-      this.xmopen = true
+      this.xmopen = true;
       let data = {
         tjNum: this.tjNumber,
         type: 0
-      }
+      };
       getFcList(data).then(res => {
-        this.datasList = res.data
-      })
+        this.datasList = res.data;
+      });
     },
 
     handleaddClick() {
-      console.log(this.xmChange)
+      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 => {
-
-      })
+      };
+      UpdFcPro(data).then(res => { });
     },
 
     handledeleteClick() {
-
-      UpdFcPro(data).then(res => {
-
-      })
+      UpdFcPro(data).then(res => { });
     },
 
     handlexmChange(selection) {
-      this.xmChange = []
-      this.xmChange = selection
+      this.xmChange = [];
+      this.xmChange = selection;
       if (selection.length > 1) {
         let del_row = selection.shift();
-        this.$refs.elTable.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑
+        this.$refs.elTable.toggleRowSelection(del_row, false);
       }
     },
+
     submitFormxm() {
-      this.xmopen = false
+      this.xmopen = false;
     },
+
     cancels() {
-      this.xmopen = false
-      this.xmChange = []
+      this.xmopen = false;
+      this.xmChange = [];
     },
+
     getExpends() {
       this.expends = this.yichangList.flatMap(item =>
         item.sone.map(soneItem => soneItem.orderDetailId)
@@ -1330,76 +1389,77 @@
     getRowKeys(row) {
       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;
+        })
+        .catch((error) => {
+          console.error('鑾峰彇澶嶆煡椤圭洰澶辫触:', error);
+          this.$message.error('鑾峰彇澶嶆煡椤圭洰澶辫触');
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
 
     getdate() {
       getNewDateList().then((res) => {
@@ -1515,111 +1575,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;
@@ -1781,7 +1841,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();
     },
 
@@ -1846,11 +1918,17 @@
                       for (let i = 0; i < this.changedate.length; i++) {
                         this.remark = this.changedate[i].remark;
                       }
+                      // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                      this.zhiyeJl = this.changedate[0].zhiyejl || '';
+                      this.zhiyeJg = this.changedate[0].zhiyejg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                     } else {
                       this.$message({
                         type: "warning",
                         message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
                       });
+                      // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                      this.zhiyeJl = '';
+                      this.zhiyeJg = '鏈彂鐜扮洰鏍囨�х柧鐥�';
                     }
                   });
                 });
@@ -1885,11 +1963,17 @@
                           this.changedate.forEach((item) => {
                             this.textarea1 = item.checkAdvice || "";
                           });
+                          // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                          this.zhiyeJl = this.changedate[0].zhiyejl || '';
+                          this.zhiyeJg = this.changedate[0].zhiyejg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                         } else {
                           this.$message({
                             type: "warning",
                             message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
                           });
+                          // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                          this.zhiyeJl = '';
+                          this.zhiyeJg = '鏈彂鐜扮洰鏍囨�х柧鐥�';
                         }
                       });
                     });
@@ -1953,10 +2037,9 @@
         tjNumber,
         advice,
         checkStatus: 1,
+        zhiyeJl: this.zhiyeJl, // 娣诲姞妫�鏌ョ粨璁�
+        zhiyeJg: this.zhiyeJg  // 娣诲姞浣撴缁撴灉
       };
-
-      console.log(this.yichangList, 6644);
-
       let dataList = this.yichangList
         .map((item) => {
           return item.sone.map((soneItem) => ({
@@ -1970,14 +2053,17 @@
             dw: soneItem.proAdvice,
           }));
         })
-        .flat(); // 浣跨敤 flat() 鏂规硶灏嗗祵濂楁暟缁勫睍骞�
+        .flat();
 
+      this.loading = true;
       getTjdetailList(data)
         .then((response) => {
           if (response.code === 200) {
             this.$modal.msgSuccess("鎻愪氦鎴愬姛");
+            // 娓呯┖瀛楁
+            this.zhiyeJl = '';
+            this.zhiyeJg = '';
 
-            // 鍑嗗鐢熸垚鎶ュ憡鐨勮姹傛暟鎹�
             let reportData = {
               userId: this.userId,
               tjNumber: tjNumber,
@@ -1985,12 +2071,8 @@
               id: this.MsgId,
             };
 
-            // 璋冪敤 addOrderPromise
-            console.log(dataList, 5555);
-
             addOrder(dataList)
               .then((res) => {
-                console.log(res, 999);
                 if (res.code == 200) {
                   gettoPdf(tjNumber)
                     .then((res) => {
@@ -2016,41 +2098,36 @@
                         remarks,
                       },
                     ];
-                    return getModified(updateOrderRemarkVos); // 杩斿洖 Promise
+                    return getModified(updateOrderRemarkVos);
                   });
 
-                  // 绛夊緟鎵�鏈夎姹傚畬鎴�
                   Promise.all([statePromise, ...updatePromises])
                     .then(() => {
-                      // 鎵�鏈夎姹傚畬鎴愶紝鍏抽棴 loading
                       this.loading = false;
-                      // 鏇存柊鍒嗛〉淇℃伅
                       this.queryParams.page = 1;
                       this.queryParams.pageSize = 10;
                       this.submitForm();
                       this.$forceUpdate();
                     })
                     .catch((error) => {
-                      // 澶勭悊閿欒鎯呭喌
                       this.loading = false;
                       console.error("鍙戠敓閿欒:", error);
                     });
                 }
               })
               .catch((error) => {
-                // 濡傛灉 addOrderPromise 澶辫触锛屽鐞嗛敊璇�
                 this.loading = false;
                 console.error("addOrderPromise 澶辫触:", error);
               });
           } else {
-            // 鎻愪氦澶辫触锛屽叧闂� loading
             this.loading = false;
+            this.$modal.msgError("鎻愪氦澶辫触");
           }
         })
         .catch((error) => {
-          // 鎻愪氦璇锋眰澶辫触锛屽叧闂� loading
           this.loading = false;
           console.error("鎻愪氦璇锋眰澶辫触:", error);
+          this.$modal.msgError("鎻愪氦璇锋眰澶辫触");
         });
     },
 

--
Gitblit v1.8.0