From d4be39fedaed04b0f1f34808dc55369ed5b94e21 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期五, 16 五月 2025 17:59:09 +0800
Subject: [PATCH] BMI

---
 src/views/doctor/check/index.vue    |  176 +++++++++------------
 src/views/doctor/checkAll/index.vue |  133 +++++++---------
 src/api/system/tijian.js            |   12 +
 src/views/system/zhiye/index.vue    |  117 +++++++++-----
 4 files changed, 219 insertions(+), 219 deletions(-)

diff --git a/src/api/system/tijian.js b/src/api/system/tijian.js
index 1a38906..01150de 100644
--- a/src/api/system/tijian.js
+++ b/src/api/system/tijian.js
@@ -82,7 +82,17 @@
     // }
   });
 }
-
+export function getOrderzhiye(data) {
+  return request({
+    url: "/zhiye/order",
+    method: "post",
+    data: data,
+    // responseType: 'blob',
+    // headers:{
+    //   "type": 'application/pdf'
+    // }
+  });
+}
 // 鏍规嵁韬唤璇佹樉绀轰俊鎭�
 export function getCusIdcard(cusIdcard) {
   return request({
diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue
index af5ab3f..c0e33a4 100644
--- a/src/views/doctor/check/index.vue
+++ b/src/views/doctor/check/index.vue
@@ -289,12 +289,15 @@
                         :disabled="row.project.proName === 'BMI'"></el-input>
                     </template>
                   </el-table-column>
-                  <el-table-column prop="exceptionDesc" label="寮傚父" width="55px" align="center">
-                    <template slot-scope="scope">
-                      <el-checkbox v-model="scope.row.exceptionDesc" @change="changDesc(scope.row)"
-                        :disabled="scope.row.project.sfcyyc === 1"></el-checkbox>
-                    </template>
-                  </el-table-column>
+               <el-table-column prop="exceptionDesc" label="寮傚父" width="55px" align="center">
+  <template slot-scope="scope">
+    <el-checkbox
+      v-model="scope.row.exceptionDesc"
+      @change="changDesc(scope.row)"
+      :disabled="scope.row.project.sfcyyc === 1 || scope.row.project.proName === 'BMI'"
+    ></el-checkbox>
+  </template>
+</el-table-column>
                   <el-table-column label="瑙勫垯" width="70">
                     <template slot-scope="scope">
                       <el-button class="blue-button" @click="handleguize(scope.row)">...</el-button>
@@ -302,7 +305,12 @@
                   </el-table-column>
                   <el-table-column prop="project.proMetering" label="鍗曚綅" width="55">
                   </el-table-column>
-                  <el-table-column prop="project.proScope" label="鍙傝�冭寖鍥�" width="70">
+                  <el-table-column label="鍙傝�冭寖鍥�" width="70" align="center">
+                    <template slot-scope="scope">
+
+                      {{ scope.row.project.proScope }}
+
+                    </template>
                   </el-table-column>
                   <el-table-column prop="conclusion" label="缁撴灉缁撹" width="200">
                     <template slot-scope="scope">
@@ -966,10 +974,27 @@
   },
 
   methods: {
+    getBMIStatus(row) {
+      const bmi = parseFloat(row.proResult);
+      if (isNaN(bmi) || !row.proResult) return ''; // 澶勭悊鏃犳晥鎴栫┖鐨凚MI鍊�
+      if (bmi > 28) {
+        row.exceptionDesc = true; // 鑷姩鍕鹃�夊紓甯稿閫夋
+        row.conclusion = '鍋忛珮'; // 璁剧疆缁撹
+        return '鍋忛珮';
+      }
+      if (bmi < 12) {
+        row.exceptionDesc = true; // 鑷姩鍕鹃�夊紓甯稿閫夋
+        row.conclusion = '鍋忎綆'; // 璁剧疆缁撹
+        return '鍋忎綆';
+      }
+      row.exceptionDesc = false; // 姝e父鑼冨洿鍐呭彇娑堝嬀閫�
+      row.conclusion = '姝e父'; // 璁剧疆缁撹
+      return '姝e父';
+    },
     // 璁$畻 BMI
     calculateBMI(height, weight) {
       if (height && weight) {
-        const heightInMeters = parseFloat(height) / 100; // cm 杞崲涓� m
+        const heightInMeters = parseFloat(height) / 100; // 鍘樼背杞崲涓虹背
         const weightInKg = parseFloat(weight);
         const bmi = weightInKg / (heightInMeters * heightInMeters);
         return bmi.toFixed(1); // 淇濈暀涓�浣嶅皬鏁�
@@ -994,25 +1019,15 @@
           const height = row.project.proName === '韬珮' ? value : heightRow.proResult;
           const weight = row.project.proName === '浣撻噸' ? value : weightRow.proResult;
           const bmi = this.calculateBMI(height, weight);
-          bmiRow.proResult = bmi || ''; // 瀹炴椂鏇存柊 BMI
+          bmiRow.proResult = bmi || ''; // 瀹炴椂鏇存柊BMI鍊�
+          this.getBMIStatus(bmiRow); // 妫�鏌MI鐘舵�佸苟鏇存柊寮傚父澶嶉�夋
         }
       }
     },
 
-    // 杈撳叆纭鏃舵洿鏂� BMI
-    handleInputConfirm(row, params) {
-      console.log(row, params, 55555)
-      // 濡傛灉鏈� params 涓斾负绌猴紝鍙栨秷寮傚父鐘舵�佸苟娓呯┖鐩稿叧瀛楁
-      if (params && params.length === 0) {
-        row.exceptionDesc = false;
-        row.proResult = "";
-        row.conclusion = "";
-        row.proAdvice = "";
-        row.rulesList = [];
-        return;
-      }
 
-      // 鐜版湁 BMI 璁$畻閫昏緫
+    // 杈撳叆纭鏃舵洿鏂� BMI
+    handleInputConfirm(row) {
       if (row.proResult) {
         if (row.project.proName === '韬珮' || row.project.proName === '浣撻噸') {
           const heightRow = this.proParentList.sons.find(
@@ -1030,85 +1045,48 @@
             const weight = weightRow.proResult;
             const bmi = this.calculateBMI(height, weight);
             bmiRow.proResult = bmi || '';
+            this.getBMIStatus(bmiRow); // 妫�鏌MI鐘舵�佸苟鏇存柊寮傚父澶嶉�夋
           }
         }
-
-        this.focusrow = row;
-        this.proResult = row;
-        const pattern3 = new RegExp("[0-9]+");
-        if (pattern3.test(row.proResult)) {
-          let data = {
-            proId: this.focusrow.proId,
-            cusId: this.tableAll.cusId,
-            tjNum: this.tableAll.tjNumber,
-            keyNum: this.proResult.proResult,
-          };
-          AutoGetRule(data).then((res) => {
-            this.focusrow.conclusion = "";
-            if (res.data) {
-              this.autorule = res.data;
-              this.focusrow.rulesList = res.data;
-              if (row.project.sfcyyc == 1) {
-                return
-              } else {
-                if (res.data.length > 0) {
-                  const conditions = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父"];
-                  this.focusrow.exceptionDesc = !conditions.some((condition) =>
-                    this.autorule[0].bz.includes(condition)
-                  );
-                } else {
-                  this.focusrow.exceptionDesc = false;
-                }
-              }
-
-              if (this.autorule.length !== 0 && (this.autorule[0] || this.autorule[0].nr)) {
-                this.focusrow.proAdvice = this.autorule[0].nr;
-              }
-              this.autorule.forEach((item) => {
-                this.focusrow.conclusion += this.focusrow.conclusion ? item.bz : item.bz;
-              });
-            }
-          });
-        } else {
-          let data = {
-            proId: this.focusrow.proId,
-            cusId: this.tableAll.cusId,
-            keyWord: this.proResult.proResult, // 淇敼涓� proResult.proResult
-            tjNum: this.tableAll.tjNumber,
-            keyNum: this.proResult.proResult,
-          };
-          AutoGetRule(data).then((res) => {
-            this.focusrow.conclusion = "";
-            if (res.data) {
-              this.autorule = res.data;
-              this.focusrow.rulesList = res.data;
-              if (row.project.sfcyyc == 1) {
-                return
-              } else {
-                if (res.data.length > 0) {
-                  const conditions = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父"];
-                  this.focusrow.exceptionDesc = !conditions.some((condition) =>
-                    this.autorule[0].bz.includes(condition)
-                  );
-                } else {
-                  this.focusrow.exceptionDesc = false;
-                }
-              }
-              if (this.autorule.length !== 0 && (this.autorule[0] || this.autorule[0].nr)) {
-                this.focusrow.proAdvice = this.autorule[0].nr;
-              }
-              this.autorule.forEach((item) => {
-                this.focusrow.conclusion += this.focusrow.conclusion ? item.bz : item.bz;
-              });
-            }
-          });
-        }
-
-        // 灏嗗綋鍓嶈娣诲姞鍒� rows 涓�
-        this.rows.push(row);
-        console.log(this.rows, row);
-
       }
+      // 鐜版湁鐨勮鍒欐鏌ラ�昏緫淇濇寔涓嶅彉
+      this.focusrow = row;
+      this.proResult = row;
+      const pattern3 = new RegExp("[0-9]+");
+      if (pattern3.test(row.proResult)) {
+        let data = {
+          proId: this.focusrow.proId,
+          cusId: this.tableAll.cusId,
+          tjNum: this.tableAll.tjNumber,
+          keyNum: this.proResult.proResult,
+        };
+        AutoGetRule(data).then((res) => {
+          this.focusrow.conclusion = "";
+          if (res.data) {
+            this.autorule = res.data;
+            this.focusrow.rulesList = res.data;
+            if (row.project.sfcyyc == 1) {
+              return;
+            } else {
+              if (res.data.length > 0) {
+                const conditions = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父"];
+                this.focusrow.exceptionDesc = !conditions.some((condition) =>
+                  this.autorule[0].bz.includes(condition)
+                );
+              } else {
+                this.focusrow.exceptionDesc = false;
+              }
+            }
+            if (this.autorule.length !== 0 && (this.autorule[0] || this.autorule[0].nr)) {
+              this.focusrow.proAdvice = this.autorule[0].nr;
+            }
+            this.autorule.forEach((item) => {
+              this.focusrow.conclusion += this.focusrow.conclusion ? item.bz : item.bz;
+            });
+          }
+        });
+      }
+      this.rows.push(row);
     },
 
     // 鍒濆鍖栨暟鎹椂璁$畻 BMI
@@ -1178,7 +1156,7 @@
 
     handleFocus(row) {
       this.autorule = [];
-      if (!row.resultType || row.resultType == 2 ) {
+      if (!row.resultType || row.resultType == 2) {
         return;
       } else {
         this.curindex = row;
diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue
index 6eb913b..0d79e70 100644
--- a/src/views/doctor/checkAll/index.vue
+++ b/src/views/doctor/checkAll/index.vue
@@ -274,11 +274,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'">
@@ -807,7 +806,8 @@
   isPdfOrJimu,
   addOrder,
   addOrder1,
-  getFcList, UpdFcPro
+  getFcList,
+  UpdFcPro
 } from "@/api/doctor/checkAll";
 import { getInfoById } from "@/api/hosp/history";
 import { getInfo } from "@/api/login";
@@ -848,14 +848,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: ""
@@ -865,9 +866,9 @@
       queryParams1: {
         pageNum: 1,
         pageSize: 10,
-        zyzd: '', // 寤鸿鍚嶇О
+        zyzd: '',
       },
-      adviceCache: new Map(), // 缂撳瓨寤鸿鏁版嵁
+      adviceCache: new Map(),
       addNewDialogVisible: false,
       newItem: {
         parentName: '',
@@ -1009,7 +1010,7 @@
   },
 
   created() {
-    console.log(this.dict.type.dict_tjtype, "鑱屼笟浣撴"); // 鎵撳嵃瀛楀吀鏁版嵁
+    console.log(this.dict.type.dict_tjtype, "鑱屼笟浣撴");
     this.getConfigKey();
     this.getdate();
   },
@@ -1031,10 +1032,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;
     },
@@ -1045,10 +1046,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;
@@ -1057,7 +1056,6 @@
         return;
       }
 
-      // 鏄剧ず鍔犺浇鐘舵��
       this.adviceLoading = true;
       this.adviceEmptyText = '鍔犺浇涓�...';
 
@@ -1066,13 +1064,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) => {
@@ -1085,7 +1081,7 @@
         .finally(() => {
           this.adviceLoading = false;
         });
-    }, 800), // 闃叉姈鏃堕棿涓� 800ms
+    }, 800),
 
     handleCurrentChangeAdvice(currentRow) {
       this.selectedAdvice = currentRow;
@@ -1112,7 +1108,6 @@
       }
     },
 
-    // 鍙栨秷閫夋嫨骞跺叧闂璇濇
     cancelAdviceDialog() {
       this.showjianyi = false;
       this.selectedAdvice = null;
@@ -1123,7 +1118,6 @@
       this.adviceCache.clear();
     },
 
-    // 鍏抽棴瀵硅瘽妗嗗墠鐨勭‘璁�
     handleCloseAdviceDialog(done) {
       if (this.selectedAdvice) {
         this.$confirm('鎮ㄥ凡閫夋嫨涓�鏉″缓璁紝纭畾瑕佸叧闂悧锛�', '鎻愮ず', {
@@ -1135,7 +1129,7 @@
             this.cancelAdviceDialog();
             done();
           })
-          .catch(() => { });
+          .catch(() => {});
       } else {
         this.cancelAdviceDialog();
         done();
@@ -1251,6 +1245,7 @@
         this.newItem.jcxm = value;
       }
     },
+
     change(val) {
       console.log('閫変腑鐨勫�兼槸锛�', val);
     },
@@ -1313,63 +1308,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].orderId,
         data: [{
           proId: this.xmChange[0].proId,
           type: 1
         }]
-      }
-      UpdFcPro(data).then(res => {
-        if (res.code == 200) {
-          this.xmChange = []
-          this.fuchaxiangmu()
-        }
-      })
+      };
+      UpdFcPro(data).then(res => {});
     },
 
-    handledeleteClick(row) {
-      let data = {
-        orderId: row.orderId,
-        data: [{
-          proId: row.proId,
-          type: 0
-        }]
-      }
-      UpdFcPro(data).then(res => {
-        if (res.code == 200) {
-          this.fuchaxiangmu()
-        }
-      })
+    handledeleteClick() {
+      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)
@@ -1391,6 +1373,7 @@
     getRowKeys(row) {
       return row.orderDetailId;
     },
+
     xiangmuqingkuang() {
       this.loading = true;
       cSWebGetPro(this.tjNumber)
@@ -1452,9 +1435,6 @@
       getFcList(data)
         .then((res) => {
           this.fcList = res.data;
-          this.fcList.forEach((item, index) => {
-            item.newID = index + 1;
-          })
         })
         .catch((error) => {
           console.error('鑾峰彇澶嶆煡椤圭洰澶辫触:', error);
@@ -1910,11 +1890,17 @@
                       for (let i = 0; i < this.changedate.length; i++) {
                         this.remark = this.changedate[i].remark;
                       }
+                      // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                      this.zhiyeJl = response.data.zhiyeJl || '';
+                      this.zhiyeJg = response.data.zhiyeJg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                     } else {
                       this.$message({
                         type: "warning",
                         message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
                       });
+                      // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                      this.zhiyeJl = '';
+                      this.zhiyeJg = '鏈彂鐜扮洰鏍囨�х柧鐥�';
                     }
                   });
                 });
@@ -1949,11 +1935,17 @@
                           this.changedate.forEach((item) => {
                             this.textarea1 = item.checkAdvice || "";
                           });
+                          // 鍥炴樉 zhiyeJl 鍜� zhiyeJg
+                          this.zhiyeJl = response.data.zhiyeJl || '';
+                          this.zhiyeJg = response.data.zhiyeJg || '鏈彂鐜扮洰鏍囨�х柧鐥�';
                         } else {
                           this.$message({
                             type: "warning",
                             message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁",
                           });
+                          // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈�
+                          this.zhiyeJl = '';
+                          this.zhiyeJg = '鏈彂鐜扮洰鏍囨�х柧鐥�';
                         }
                       });
                     });
@@ -1989,7 +1981,7 @@
               done();
             });
           })
-          .catch(() => { });
+          .catch(() => {});
       } else {
         let data = {
           userId: this.userId,
@@ -2017,10 +2009,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) => ({
@@ -2034,14 +2025,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,
@@ -2049,12 +2043,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) => {
@@ -2080,41 +2070,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("鎻愪氦璇锋眰澶辫触");
         });
     },
 
diff --git a/src/views/system/zhiye/index.vue b/src/views/system/zhiye/index.vue
index bb2d6b6..f053973 100644
--- a/src/views/system/zhiye/index.vue
+++ b/src/views/system/zhiye/index.vue
@@ -222,22 +222,7 @@
             <el-form-item label="鏌ヤ綋鍒嗙被" prop="examCategory" label-width="99px">
               <el-input :disabled="isDisabled" v-model="form.examCategory" placeholder="璇疯緭鍏ユ煡浣撳垎绫�" />
             </el-form-item>
-            <el-form-item label="鎺ュ宸ラ緞骞�" prop="hazardYears" label-width="104px">
-              <el-input :disabled="isDisabled" v-model="form.hazardYears" placeholder="璇疯緭鍏ユ帴瀹冲伐榫勫勾" type="number" />
-            </el-form-item>
-            <el-form-item label="鎺ュ宸ラ緞鏈�" prop="hazardMonths" label-width="106px">
-              <el-input :disabled="isDisabled" v-model="form.hazardMonths" placeholder="璇疯緭鍏ユ帴瀹冲伐榫勬湀" type="number" />
-            </el-form-item>
-            <el-form-item label="寮�濮嬫帴瀹虫棩鏈�" prop="hazardStartDate" label-width="100px">
-              <el-date-picker :disabled="isDisabled" clearable v-model="form.hazardStartDate" type="date"
-                value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨寮�濮嬫帴瀹虫棩鏈�" style="width: 93%" />
-            </el-form-item>
-            <el-form-item label="宸ュ彿" label-width="103px">
-              <el-input :disabled="isDisabled" v-model="form.wenHua" placeholder="璇疯緭鍏ュ伐鍙�" />
-            </el-form-item>
-            <el-form-item label="杞﹂棿" label-width="106px">
-              <el-input :disabled="isDisabled" v-model="form.wenHua" placeholder="璇疯緭鍏ヨ溅闂�" />
-            </el-form-item>
+
           </el-form>
           <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="106px"
             v-show="top">
@@ -466,6 +451,7 @@
                 <span slot="label"> 璇佷欢鍙风爜 </span>
                 <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" @input="inputChange" />
               </el-form-item>
+
               <el-form-item label="鍗曚綅鍚嶇О" prop="firmName">
                 <el-select v-model="form.firmName" remote default-first-option allow-create filterable
                   style="width: 200px" placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" clearable @change="idFn1" @clear="clear">
@@ -477,7 +463,7 @@
               </el-form-item>
               <el-form-item label="浣撴绫诲瀷">
                 <el-select v-model="form.tjType" placeholder="璇烽�夋嫨浣撴绫诲瀷">
-                  <el-option v-for="dict in dict.type.dict_team" :key="dict.value" :label="dict.label"
+                  <el-option v-for="dict in filteredDictTeam" :key="dict.value" :label="dict.label"
                     :value="dict.value"></el-option>
                 </el-select>
               </el-form-item>
@@ -500,6 +486,22 @@
               <el-form-item label="瀹炴敹閲戦">
                 <el-input placeholder="瀹炴敹閲戦" v-model="TotalPrice" style="width: 206px" @input="changeXianjia"
                   @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-form-item>
+              <el-form-item label="鎺ュ宸ラ緞鏈�" prop="zhiyeJhgln" label-width="84px">
+                <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-form-item>
+              <el-form-item label="宸ュ彿" label-width="50px">
+                <el-input  v-model="form.zhiyeGh"  />
+              </el-form-item>
+              <el-form-item label="杞﹂棿" label-width="106px">
+                <el-input  v-model="form.zhiyeCj" />
               </el-form-item>
               <br />
 
@@ -753,13 +755,13 @@
   getfindTj,
   getByTjNum,
 } from "@/api/hosp/customer";
+
 import { getPrintSetUp } from "@/api/system/examcharge";
-import cnchar from 'cnchar';
 import {
   tuantiSelect,
   deptTreeSelect,
   projectGetList,
-  getOrder,
+  getOrderzhiye,
   getProParentIdDxList,
   getProSonDxList,
   getCusIdcard,
@@ -804,6 +806,7 @@
   },
   data() {
     return {
+      tjLei: [],
       isSubmitting: false,
       open1: false,
       filterage: "",
@@ -1013,9 +1016,11 @@
       form: {
         educationLevel: "", // 鏂囧寲绋嬪害
         examCategory: "", // 鏌ヤ綋鍒嗙被
-        hazardYears: "", // 鎺ュ宸ラ緞骞�
-        hazardMonths: "", // 鎺ュ宸ラ緞鏈�
-        hazardStartDate: "", // 寮�濮嬫帴瀹虫棩鏈�
+        zhiyeJhgln: "", // 鎺ュ宸ラ緞骞�
+        zhiyeJhgly: "", // 鎺ュ宸ラ緞鏈�
+        zhiyeKsjhrq: "", // 寮�濮嬫帴瀹虫棩鏈�
+        zhiyeGh: "", // 宸ュ彿
+        zhiyeCj: "", // 杞﹂棿
         cusIdcard: "",
         tjType: "",
         cusSex: 1,
@@ -1083,6 +1088,14 @@
       this.$refs.treas.filter(val);
     },
   },
+  computed: {
+    filteredDictTeam() {
+      // 杩囨护 dict.type.dict_team锛屽彧淇濈暀 value 鍦� tjLei 涓殑椤�
+      return this.dict.type.dict_team.filter(dict =>
+        this.tjLei.includes(dict.value.toString())
+      );
+    }
+  },
   created() {
     this.getCompanyList();
 
@@ -1096,6 +1109,13 @@
     this.TreedataList = [];
     this.DataList = [];
     this.marryall = 0;
+    getconfigKey("zhiye_tj_type").then((res) => {
+      if (res.code === 200) {
+        const values = res.msg.split(",");
+        this.tjLei.push(...values);
+      }
+    });
+
   },
   methods: {
     handleIdCardInput(value) {
@@ -1266,9 +1286,9 @@
       }
 
       if (this.form.firmName) {
-        this.form.tjType = this.dict.type.dict_team[1].value;
+        this.form.tjType = "6";
       } else {
-        this.form.tjType = this.dict.type.dict_team[0].value;
+        this.form.tjType = "5";
       }
 
     },
@@ -1627,6 +1647,12 @@
         deleted: null,
         firmid: "",
         firmDeptName: "",
+        examCategory: "", // 鏌ヤ綋鍒嗙被
+        zhiyeJhgln: "", // 鎺ュ宸ラ緞骞�
+        zhiyeJhgly: "", // 鎺ュ宸ラ緞鏈�
+        zhiyeKsjhrq: "", // 寮�濮嬫帴瀹虫棩鏈�
+        zhiyeGh: "", // 宸ュ彿
+        zhiyeCj: "", // 杞﹂棿
       };
       this.resetForm("form");
     },
@@ -1754,14 +1780,11 @@
             if (formData.cusSex === "鏈煡") {
               formData.cusSex = 2;
             }
-            if (formData.tjType === "") {
-              formData.tjType = this.dict.type.dict_team[0].value;
 
-            }
 
             addCustomer(formData).then((response) => {
               this.responseList = response.data;
-              this.form.tjType = this.dict.type.dict_team[0].value;
+              this.form.tjType = '';
               this.$modal.msgSuccess("鏂板鎴愬姛");
               _this.tcShow = true;
               _this.isDisabled = true;
@@ -1797,7 +1820,7 @@
               this.discount = this.form.discount;
             }
             if (this.form.tjType === null) {
-              this.form.tjType = this.dict.type.dict_team[0].value;
+              this.form.tjType = null;
             }
             if (this.form.cusMarryStatus === "null") {
               this.form.cusMarryStatus = "5";
@@ -1808,12 +1831,7 @@
             if (this.form.reservationId != null) {
               if (this.form.groupingId) {
                 this.form.firmName = this.form.compName;
-                this.dict.type.dict_team.forEach((item) => {
-                  if (item.label == "鍥㈤槦") {
-                    this.form.tjType = item.value;
-                  }
-                })
-                // this.form.tjType = this.dict.type.dict_team[1].value;
+
                 this.CompanyList.forEach((item) => {
                   if (item.cnName == this.form.firmName) {
                     this.form.firmId = item.drugManufacturerId;
@@ -3078,7 +3096,7 @@
           };
         }
 
-        getOrder(data).then((res) => {
+        getOrderzhiye(data).then((res) => {
           this.$modal.msgSuccess("鎻愪氦鎴愬姛");
           this.tjNumbers = res.msg;
           this.charge = true;
@@ -3128,14 +3146,17 @@
           cusPhone: item.tjPhone,
           cusSex: item.sex === "鐢�" ? "0" : "1",
         };
+        // 鍔ㄦ�佷粠filteredDictTeam鑾峰彇tjType
+        const dictItem = this.filteredDictTeam.find(dict => dict.label === item.tjType);
+        const tjTypeValue = dictItem ? dictItem.value : (this.filteredDictTeam.length > 0 ? this.filteredDictTeam[0].value : "0"); // 鍥為��鍒扮涓�涓�兼垨榛樿"0"
         if (item.tjComp != null) {
           this.standard = {
             company: item.tjComp,
-            tjType: item.tjType === "鍥㈤槦" ? "1" : "2",
+            tjType: tjTypeValue,
           };
         } else {
           this.standard = {
-            tjType: item.tjType === "鍥㈤槦" ? "1" : "2",
+            tjType: tjTypeValue,
           };
         }
       });
@@ -3166,19 +3187,15 @@
                 this.formInline.paidIn = item.proPrice;
               }
             });
-            const r = /^\+?[0-9][0-9]*$/; //姝f暣鏁帮紙鍙互浠ユ墦澶达級
-            //const r=/^\+?[1-9][0-9]*$/;//姝f暣鏁�
+            const r = /^\+?[0-9][0-9]*$/; // 姝f暣鏁�
             if (r.test(this.formInline.paidIn)) {
               this.formInline.paidIn = this.formInline.paidIn + ".00";
             }
-            this.discount =
-              (this.formInline.paidIn / this.formInline.price) * 10;
-
+            this.discount = (this.formInline.paidIn / this.formInline.price) * 10;
           } else {
             this.discount = 10;
             this.formInline.paidIn = "0.00";
           }
-
           this.total = response.data.total;
         } else {
           this.tableList = [];
@@ -3252,7 +3269,7 @@
     },
 
     listgetOrder(data) {
-      getOrder(data).then((res) => {
+      getOrderzhiye(data).then((res) => {
         this.$modal.msgSuccess("鎻愪氦鎴愬姛");
         //璋冩帴鍙f樉绀哄妫�鍗�
         const tjNumber = res.msg;
@@ -3336,6 +3353,10 @@
                 firmId: this.form.firmId,
                 firmName: this.form.firmName,
                 firmDeptName: this.form.firmDeptName,
+                zhiyeJhgly: this.form.zhiyeJhgly,
+                zhiyeKsjhrq: this.form.zhiyeKsjhrq,
+                zhiyeGh: this.form.zhiyeGh,
+                zhiyeCj: this.form.zhiyeCj
               };
 
               this.listgetOrder(data);
@@ -3350,6 +3371,12 @@
                 firmId: this.form.firmId,
                 firmName: this.form.firmName,
                 firmDeptName: this.form.firmDeptName,
+                zhiyeJhgly: this.form.zhiyeJhgly,
+                zhiyeKsjhrq: this.form.zhiyeKsjhrq,
+                zhiyeGh: this.form.zhiyeGh,
+                zhiyeCj: this.form.zhiyeCj
+
+
               };
               this.listgetOrder(data);
             } else {

--
Gitblit v1.8.0