From 0baf3cea7a2a7585eb19cbd1719ac3a69c857f62 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期一, 06 一月 2025 10:40:29 +0800
Subject: [PATCH] 树状态变色

---
 src/views/system/tijian/index.vue |  465 +++++++++++++++++++++++++++++++++------------------------
 1 files changed, 266 insertions(+), 199 deletions(-)

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index a9fa3d6..bf3c9af 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -74,18 +74,18 @@
             </el-form-item>
 
             <el-form-item label="濮撳悕" prop="cusName" :rules="[
-      {
-        required: true,
-        validator: (rule, value, callback) => {
-          if (!form.cusName) {
-            callback('');
-          } else if (form.cusName) {
-            callback();
-          }
-        },
-        trigger: 'blur',
-      },
-    ]">
+              {
+                required: true,
+                validator: (rule, value, callback) => {
+                  if (!form.cusName) {
+                    callback('');
+                  } else if (form.cusName) {
+                    callback();
+                  }
+                },
+                trigger: 'blur',
+              },
+            ]">
 
               <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="openname">
                 濮撳悕
@@ -107,20 +107,20 @@
             </el-form-item>
 
             <el-form-item label="鎬у埆" prop="cusSex" :rules="[
-      {
-        required: true,
-        validator: (rule, value, callback) => {
-          if (!form.cusSex && showHidden.has_sex === 'Y') {
-            callback('');
-          } else if (showHidden.has_sex === 'N') {
-            callback();
-          } else if (form.cusSex && showHidden.has_sex === 'Y') {
-            callback();
-          }
-        },
-        trigger: 'blur',
-      },
-    ]">
+              {
+                required: true,
+                validator: (rule, value, callback) => {
+                  if (!form.cusSex && showHidden.has_sex === 'Y') {
+                    callback('');
+                  } else if (showHidden.has_sex === 'N') {
+                    callback();
+                  } else if (form.cusSex && showHidden.has_sex === 'Y') {
+                    callback();
+                  }
+                },
+                trigger: 'blur',
+              },
+            ]">
               <el-select :disabled="isDisabled" v-model="form.cusSex" placeholder="鎬у埆">
                 <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
                   :value="parseInt(dict.value)"></el-option>
@@ -128,23 +128,23 @@
             </el-form-item>
 
             <el-form-item label="璇佷欢鍙风爜" prop="cusIdcard" :rules="[
-      {
-        required: true,
-        validator: (rule, value, callback) => {
-          if (!form.cusIdcard && showHidden.has_idcard === 'Y') {
-            callback('');
-          } else if (showHidden.has_idcard === 'N') {
-            callback();
-          } else if (
-            form.cusIdcard &&
-            showHidden.has_idcard === 'Y'
-          ) {
-            callback();
-          }
-        },
-        trigger: 'blur',
-      },
-    ]">
+              {
+                required: true,
+                validator: (rule, value, callback) => {
+                  if (!form.cusIdcard && showHidden.has_idcard === 'Y') {
+                    callback('');
+                  } else if (showHidden.has_idcard === 'N') {
+                    callback();
+                  } else if (
+                    form.cusIdcard &&
+                    showHidden.has_idcard === 'Y'
+                  ) {
+                    callback();
+                  }
+                },
+                trigger: 'blur',
+              },
+            ]">
               <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="handleQuery">
                 璇佷欢鍙风爜
               </span>
@@ -166,20 +166,20 @@
             </el-form-item>
 
             <el-form-item label="鐢佃瘽" prop="cusPhone" :rules="[
-      {
-        required: true,
-        validator: (rule, value, callback) => {
-          if (!form.cusPhone && showHidden.is_phone === 'Y') {
-            callback('');
-          } else if (showHidden.is_phone === 'N') {
-            callback();
-          } else if (form.cusPhone && showHidden.is_phone === 'Y') {
-            callback();
-          }
-        },
-        trigger: 'blur',
-      },
-    ]">
+              {
+                required: true,
+                validator: (rule, value, callback) => {
+                  if (!form.cusPhone && showHidden.is_phone === 'Y') {
+                    callback('');
+                  } else if (showHidden.is_phone === 'N') {
+                    callback();
+                  } else if (form.cusPhone && showHidden.is_phone === 'Y') {
+                    callback();
+                  }
+                },
+                trigger: 'blur',
+              },
+            ]">
               <el-input v-model="form.cusPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" :disabled="isDisabled" />
             </el-form-item>
 
@@ -218,13 +218,7 @@
               <el-input :disabled="isDisabled" v-model="form.cusIntroduce" placeholder="璇疯緭鍏ヤ粙缁嶄汉" />
             </el-form-item>
 
-            <el-form-item label="鍗曚綅鍚嶇О" prop="compName">
-              <el-select :disabled="isDisabled" v-model="form.compName" remote default-first-option allow-create
-                filterable style="width: 200px" placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" clearable @change="idFn1">
-                <el-option v-for="dict in CompanyList" :key="dict.cnName" :label="dict.cnName" :value="dict.cnName" />
-              </el-select>
-              <!-- <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i> -->
-            </el-form-item>
+
 
             <el-form-item label="鏂囧寲绋嬪害" prop="wenHua" label-width="93px">
               <el-input :disabled="isDisabled" v-model="form.wenHua" placeholder="璇疯緭鍏ユ枃鍖栫▼搴�" />
@@ -301,7 +295,7 @@
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="el-icon-search" size="mini" @click="handle">鏌ヨ</el-button>
-              <!-- <el-button type="primary"  size="mini" @click="submit">纭</el-button> -->
+
             </el-form-item>
           </el-form>
           <div class="tab4">
@@ -322,19 +316,7 @@
 </el-table-column> -->
               </el-table>
             </div>
-            <!-- <el-button
-                style="
-                  width: 20px;
-                  height: 100px;
-                  margin-top: 20%;
-                  font-size: 10px;
-                  padding-right: 20px;
-                "
-                type="primary"
-                size="mini"
-                @click="submit"
-                ><i style="font-size: 18px" class="el-icon-d-arrow-right"></i
-              ></el-button> -->
+
           </div>
         </el-tab-pane>
         <el-tab-pane label="缁勫悎" name="third">
@@ -494,40 +476,59 @@
       <el-col :span="15">
         <div class="grid-content bg-purple">
           <template>
-            <el-form :model="form" :inline="true" label-width="75px" style="margin-left: 20px">
+            <el-form :model="form" :inline="true" label-width="75px" style="margin-left: 20px;width: 900px;">
+              <el-form-item label="濮撳悕" prop="cusName">
+                <span slot="label">
+                  濮撳悕
+                </span>
+                <el-input v-model="form.cusName" placeholder="璇疯緭鍏ュ鍚�" :disabled="isDisabled" />
+              </el-form-item>
+              <el-form-item label="鎬у埆" prop="cusSex">
+                <el-select :disabled="isDisabled" v-model="form.cusSex" placeholder="鎬у埆" style="width: 150px">
+                  <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
+                    :value="parseInt(dict.value)"></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="璇佷欢鍙风爜" prop="cusIdcard">
+                <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">
+                  <el-option v-for="dict in CompanyList" :key="dict.cnName" :label="dict.cnName" :value="dict.cnName" />
+                </el-select>
+              </el-form-item>
               <el-form-item label="浣撴绫诲瀷">
                 <el-select style="width: 150px" v-model="form.tjType" placeholder="璇烽�夋嫨浣撴绫诲瀷">
                   <el-option v-for="dict in dict.type.dict_team" :key="dict.value" :label="dict.label"
-                    :value="dict.value"></el-option>
+                    :value="dict.value" :disabled="!form.firmId && dict.value === '1'"></el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="搴旀敹閲戦">
-                <el-input placeholder="搴旀敹閲戦" v-model="TotalPrice1" disabled style="width: 150px"></el-input>
-              </el-form-item>
-              <el-form-item label="浼樻儬">
 
-                <el-input-number ref="inputNumber" style="width: 150px" v-model="discount" :precision="2" :step="0.1"
-                  :max="10" :min="1" @change="numberChange" :disabled="isfalse"></el-input-number>
-              </el-form-item>
-              <el-form-item label="瀹炴敹閲戦">
-                <el-input placeholder="瀹炴敹閲戦" v-model="TotalPrice" style="width: 150px"></el-input>
-              </el-form-item>
-              <br />
-
-              <el-form-item label="棰嗗彇鏂瑰紡">
-
-                <el-select v-model="getType" style="width: 150px" @change="getmailType">
-                  <el-option v-for="dict in dict.type.report_get_type" :key="dict.value" :label="dict.label"
-                    :value="dict.value"></el-option>
-                </el-select>
-              </el-form-item>
               <el-form-item label="浣撴绫诲埆">
-                <el-select style="width: 150px" v-model="tjCategory" placeholder="璇烽�夋嫨浣撴绫诲埆">
+                <el-select style="width: 200px" v-model="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 label="搴旀敹閲戦">
+                <el-input placeholder="搴旀敹閲戦" v-model="TotalPrice1" disabled style="width: 200px"></el-input>
+              </el-form-item>
+              <el-form-item label="浼樻儬">
+                <!-- {{ discount }} -->
+                <el-input-number ref="inputNumber" style="width: 150px" v-model="discount" :precision="2" :step="0.1"
+                  :max="10" :min="0" @change="numberChange" :disabled="isfalse"></el-input-number>
+              </el-form-item>
+              <el-form-item label="瀹炴敹閲戦">
+                <el-input placeholder="瀹炴敹閲戦" v-model="TotalPrice" style="width: 206px"></el-input>
+              </el-form-item>
+              <br />
+
+
 
               <el-form-item style="margin-left: 149px">
                 <el-button type="primary" @click="Package" size="mini" style="margin-right: 20px">閫夋嫨濂楅</el-button>
@@ -582,13 +583,13 @@
           <div style="
               padding: 0px 6px;
               border: 1px solid #e6ebf5;
-              max-height: 420px;
+              max-height: 650%;
               overflow: auto;
               width: 916px;
               margin-left: 35px;
             ">
 
-            <el-table :data="tableData1" border style="width: 100%" height="250">
+            <el-table :data="tableData1" border style="width: 100%;">
               <el-table-column prop="proName" label="椤圭洰" width="180">
               </el-table-column>
               <el-table-column prop="proType" label="鎬у埆" width="50">
@@ -617,6 +618,12 @@
               <el-table-column prop="proCheckMethod" label="鏄惁绌鸿吂">
                 <template slot-scope="scope">
                   <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.proCheckMethod" />
+                </template>
+              </el-table-column>
+              <el-table-column label="鎿嶄綔" align="center" width="80px">
+                <template slot-scope="scope">
+                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete1(scope.row)" title="鍒犻櫎">
+                  </el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -668,7 +675,7 @@
                   :disabled="true"></el-input>
               </el-form-item>
               <el-form-item label="浼樻儬">
-                <el-input-number style="width: 140px" v-model="discount" :precision="2" :step="0.1" :max="10" :min="1"
+                <el-input-number style="width: 140px" v-model="discount" :precision="2" :step="0.1" :max="10" :min="0"
                   @change="numberChange" :disabled="isfalse"></el-input-number>
               </el-form-item>
               <el-form-item label="瀹炴敹閲戦">
@@ -756,6 +763,7 @@
 </template>
 
 <script>
+import Big from 'big.js';
 import selectName from "@/components/selectName";
 import { dataURLtoFile, random } from "./file";
 import { getInfo } from "@/api/login";
@@ -786,6 +794,7 @@
   getconfigKey,
   getHistryTjOrderProByCusIdCard,
   readCertCardInfos,
+  gaibianzhekou
 } from "@/api/system/tijian";
 import { addComp } from "@/api/system/comp";
 import { getCompany, queryCompany } from "@/api/team/tuanti";
@@ -1030,6 +1039,8 @@
         cusMarryStatus: "5",
         idType: "1",
         ageUnit: "0",
+        firmId: '',
+
       },
       form1: {},
       title: "",
@@ -1082,6 +1093,34 @@
   mounted() { },
 
   methods: {
+    clear() {
+      this.form.firmId = ""
+    },
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+    handleDelete1(row) {
+      console.log(row);
+      let data = {
+        cusCardId: row.cusId,
+        proId: row.parentProId,
+      };
+      this.$modal.confirm('鏄惁纭鍒犻櫎锛�').then(() => {
+        return delTbBycusCardIdAndProId(data);
+      }).then(() => {
+        this.TotalPrice1 = 0
+        getTransitionList1(row.cusId).then((response) => {
+          this.tableData1 = response.data;
+          this.tableData1.forEach((item) => {
+            this.TotalPrice1 += item.ordPrice;
+            this.TotalPrice += item.nowPrice;
+          });
+          this.TotalPrice = this.tableData1.reduce((sum, item) => {
+            return sum.plus(new Big(item.nowPrice || '0'));
+          }, new Big(0));
+          this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10
+        });
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => { });
+    },
     validateDiscount(row) {
       if (row.discount > 10) {
         row.discount = 10; // 寮哄埗灏嗗�艰缃负鏈�澶у��
@@ -1093,10 +1132,20 @@
     isAll(value) {
       return value === '' || value === null;
     },
-    // 鏇存柊瀹炴敹閲戦
     updateProPrice(row) {
-      row.nowPrice = Number(row.ordPrice) * (Number(row.discount) / 10);
+      const ordPrice = new Big(row.ordPrice);
+
+      const discount = new Big(row.discount);
+      const result = ordPrice.times(discount.div(10));  // ordPrice * (discount / 10)
+      row.nowPrice = result.toNumber();
+      this.TotalPrice = this.tableData1.reduce((sum, item) => {
+        return sum.plus(new Big(item.nowPrice || '0'));
+      }, new Big(0));
+
+      this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10
     },
+
+
     openname() {
 
       this.$refs.bbb.open = true;
@@ -1146,16 +1195,20 @@
     },
     idFn1(value) {
       if (value) {
-        const originalCompId = this.form.dictCompId;
-        this.form.compName = value;
+        console.log(value)
+        const originalCompId = this.form.firmId;
+        this.form.firmName = value;
         this.CompanyList.forEach((item) => {
-          if (item.cnName == this.form.compName) {
-            this.form.dictCompId = item.drugManufacturerId;
+          if (item.cnName == this.form.firmName) {
+            this.form.firmId = item.drugManufacturerId;
           }
         });
 
-        if (this.form.dictCompId === originalCompId) {
-          this.form.dictCompId = "";
+        if (this.form.firmId === originalCompId) {
+          this.form.firmId = "";
+        }
+        if (this.form.firmId) {
+          this.form.tjType = "1"
         }
       }
     },
@@ -1271,42 +1324,6 @@
       this.$refs.historyTj.getlist();
     },
 
-    candelete(item) {
-      let data = {
-        cusCardId: this.form.cusIdcard,
-        proId: item.proPrantId,
-      };
-      delTbBycusCardIdAndProId(data).then((res) => {
-        getTransitionList1(this.form.cusIdcard).then((response) => {
-          this.tableData1 = response.data;
-          this.TotalPrice1 = 0;
-          if (this.tableData1) {
-            this.tableData1.forEach((item) => {
-              this.TotalPrice1 += item.ordPrice;
-              this.TotalPrice += item.nowPrice;
-              if (item.pacName === null) {
-                item.pacName = "鍗曢」";
-              }
-              if (item.pacName == "鍗曢」") {
-                item.list.forEach((item9) => {
-                  this.treeList.push(item9.proId);
-                });
-              }
-              this.pacName = item.pacName;
-            });
-
-          
-
-            this.list1 = false;
-            this.list3 = true;
-          } else {
-            this.list1 = true;
-
-            this.TotalPrice = 0;
-          }
-        });
-      });
-    },
     cope() {
       this.tcShow = true;
       let cusIdCard = this.form.cusIdcard;
@@ -1370,7 +1387,7 @@
                   this.pacName = item.pacName;
                 });
 
-   
+
 
                 this.list1 = false;
                 this.list3 = true;
@@ -1556,6 +1573,7 @@
         updateBy: null,
         updateTime: null,
         deleted: null,
+        firmid: ''
       };
       this.resetForm("form");
     },
@@ -1588,11 +1606,34 @@
 
     // 鎶樻墸
     numberChange(currentValue, oldValue) {
-      this.discount = currentValue;
-      if (this.discount <= this.getInfodis) {
-        this.discount = this.getInfodis;
-      }
-      this.TotalPrice = (this.TotalPrice1 * (this.discount / 10)).toFixed(2);
+      this.$confirm("纭畾淇敼鎵�鏈夊瓙椤圭殑鎶樻墸鍚楋紵", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          this.discount = currentValue;
+          if (this.discount < this.getInfodis) {
+            this.discount = this.getInfodis;
+            // this.$modal.msgError(`璇ヤ汉鍛樻渶楂樹紭鎯犳潈闄愪负${this.getInfodis}鎶榒);
+          }
+          this.tableData1.forEach((item) => {
+            item.discount = this.discount
+            const ordPrice = new Big(item.ordPrice);
+            const discount = new Big(item.discount);
+            const result = ordPrice.times(discount.div(10));  // ordPrice * (discount / 10)
+            item.nowPrice = result.toNumber();
+            this.TotalPrice = this.tableData1.reduce((sum, item) => {
+              return sum.plus(new Big(item.nowPrice || '0'));
+            }, new Big(0));
+          })
+          // ----------------------------------------------------------
+
+        })
+        .catch(() => {
+          this.discount = oldValue;
+        });
+
     },
 
     /** 鐧昏鎻愪氦鎸夐挳 */
@@ -1661,6 +1702,13 @@
             }
             if (this.form.reservationId != null) {
               if (this.form.groupingId) {
+                this.form.firmName = this.form.compName
+                this.form.tjType = "1"
+                this.CompanyList.forEach((item) => {
+                  if (item.cnName == this.form.firmName) {
+                    this.form.firmId = item.drugManufacturerId;
+                  }
+                });
                 _this.tcShow = true;
 
                 getTransitionList1(this.form.cusIdcard).then((res) => {
@@ -1679,7 +1727,7 @@
                     this.top = false;
                   } else {
                     this.list1 = true;
-                    this.TotalPrice =0;
+                    this.TotalPrice = 0;
                     this.top = false;
                   }
                 });
@@ -2140,7 +2188,7 @@
       this.name = this.queryParam.pacName;
       let param = {
         sex: this.form.cusSex,
-        dwId: this.form.dictCompId
+        dwId: this.form.firmId
       }
       if (this.name) {
         getPackageListName(this.name).then((response) => {
@@ -2210,6 +2258,7 @@
     // },
 
     resetpackage() {
+      this.discount = 10
       if (this.form.cusIdcard) {
         var cusId = this.form.cusIdcard;
       } else {
@@ -2253,10 +2302,10 @@
 
       let param = {
         sex: cusSex,
-        dwId: this.form.dictCompId || ''
+        dwId: this.form.firmId || ''
       }
       if (this.form.tjType == 1) {
-        if (!this.form.dictCompId) {
+        if (!this.form.firmId) {
           this.$message({
             type: "warning",
             message: "璇峰厛缁存姢鍗曚綅锛�",
@@ -2562,7 +2611,7 @@
           if (this.DataList.length != 0) {
             this.list1 = false;
             this.DataList.forEach((item) => {
-       
+
               this.marryall += item.proPrice;
             });
           }
@@ -2682,7 +2731,6 @@
       } else {
         this.$message.warning("璇峰厛濉啓淇℃伅锛屽啀閫変綋妫�鍐呭");
       }
-
       let _this = this;
       if (this.tableData.length != 0) {
         this.tableData.forEach((item) => {
@@ -2717,8 +2765,6 @@
               this.TotalPrice1 = 0;
               if (this.tableData1) {
                 this.tableData1.forEach((item) => {
-                  this.TotalPrice1 += item.ordPrice;
-                  this.TotalPrice += item.nowPrice;
                   if (item.tjCategory != null) {
                     this.tjCategory = item.tjCategory;
                   }
@@ -2727,10 +2773,16 @@
                       this.treeList.push(item9.proId);
                     });
                   }
+                  this.TotalPrice1 += item.ordPrice;
+                  this.TotalPrice += item.nowPrice;
+
                   this.pacName = item.pacName;
                 });
 
-           
+                this.TotalPrice = this.tableData1.reduce((sum, item) => {
+                  return sum.plus(new Big(item.nowPrice || '0'));
+                }, new Big(0));
+                this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10
                 this.list1 = false;
                 this.list3 = true;
                 this.list2 = false;
@@ -2740,10 +2792,11 @@
               }
             });
           } else {
-            console.log(澶辫触浜�);
+
           }
         });
-      } else {
+      }
+      else {
         getaddtTransition(data).then((response) => {
           if (response.code == 200) {
             let cusId = this.form.cusIdcard;
@@ -2753,8 +2806,6 @@
               this.TotalPrice1 = 0;
               if (this.tableData1) {
                 this.tableData1.forEach((item) => {
-                  this.TotalPrice1 += item.ordPrice;
-                  this.TotalPrice += item.nowPrice;
                   if (item.tjCategory != null) {
                     this.tjCategory = item.tjCategory;
                   }
@@ -2763,11 +2814,14 @@
                       this.treeList.push(item9.proId);
                     });
                   }
+                  this.TotalPrice1 += item.ordPrice;
+                  this.TotalPrice += item.nowPrice;
+
                   this.pacName = item.pacName;
                 });
+                this.discount = (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10
 
-  
-              
+
                 this.list1 = false;
                 this.list3 = true;
                 this.list2 = false;
@@ -2777,12 +2831,10 @@
               }
             });
           } else {
-            console.log(澶辫触浜�);
+
           }
         });
       }
-
-
       this.taocan = false;
       this.defaultKeys = [];
       this.DataLists = [];
@@ -3091,35 +3143,50 @@
         let paidIn = this.TotalPrice.toString();
         let discount = this.discount;
         this.tjFlowingWater = { copeWith, paidIn, discount };
+        const newArray = this.tableData1
+          .filter(item => item.discount < 10)  // 杩囨护鍑� discount < 10 鐨勯」
+          .map(item => ({ discount: item.discount, parentProId: item.parentProId, cusIdCard: item.cusId }));  // 鍒涘缓鏂扮殑瀵硅薄锛屽寘鍚� discount 鍜� id
+        gaibianzhekou(newArray).then((res) => {
+          if (res.code === 200) {
+            let data;
 
-        let data;
-        if (pacId || this.tjOrderList.length > 0) {
-          data = {
-            photo: this.srcUrl,
-            pacId,
-            tjOrderList: this.tjOrderList,
-            tjFlowingWater: this.tjFlowingWater,
-            userId,
-            tjType,
-            tjCategory: this.tjCategory,
-          };
-          this.listgetOrder(data);
-        } else if (pacId || this.tjOrderList.length > 0) {
-          data = {
-            photo: this.srcUrl,
-            tjOrderList: this.tjOrderList,
-            tjFlowingWater: this.tjFlowingWater,
-            userId,
-            tjType,
-            tjCategory: this.tjCategory,
-          };
-          this.listgetOrder(data);
-        } else {
-          this.$message({
-            type: "warning ",
-            message: "璇烽�夋嫨濂楅!",
-          });
-        }
+            if (pacId || this.tjOrderList.length > 0) {
+              data = {
+                photo: this.srcUrl,
+                pacId,
+                tjOrderList: this.tjOrderList,
+                tjFlowingWater: this.tjFlowingWater,
+                userId,
+                tjType,
+                tjCategory: this.tjCategory,
+                firmId: this.form.firmId,
+                firmName: this.form.firmName
+              };
+
+              this.listgetOrder(data);
+            } else if (pacId || this.tjOrderList.length > 0) {
+              data = {
+                photo: this.srcUrl,
+                tjOrderList: this.tjOrderList,
+                tjFlowingWater: this.tjFlowingWater,
+                userId,
+                tjType,
+                tjCategory: this.tjCategory,
+                firmId: this.form.firmId,
+                firmName: this.form.firmName
+              };
+              this.listgetOrder(data);
+            } else {
+              this.$message({
+                type: "warning ",
+                message: "璇烽�夋嫨濂楅!",
+              });
+            }
+          } else {
+            this.$modal.msgError("鏀瑰彉鎶樻墸閿欒");
+          }
+        })
+
       } else {
         this.$modal.msgError("璇烽�夋嫨浣撴绫诲埆");
       }

--
Gitblit v1.8.0