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/system/zhiye/index.vue |  117 ++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 72 insertions(+), 45 deletions(-)

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