From 7f78bf8e0745ff51e3d307bd531ff40ea624568a Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期二, 31 十二月 2024 18:50:17 +0800
Subject: [PATCH] 3

---
 src/views/system/comp/index.vue |   64 ++++++++++++++++++++++++++++----
 1 files changed, 56 insertions(+), 8 deletions(-)

diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue
index 204b9cc..f162fef 100644
--- a/src/views/system/comp/index.vue
+++ b/src/views/system/comp/index.vue
@@ -462,6 +462,7 @@
                   type="primary"
                   icon="el-icon-edit"
                   size="mini"
+                  :disabled="singlegg"
                   @click="xiangmuWh"
                   >椤圭洰缁存姢</el-button
                 >
@@ -1424,9 +1425,6 @@
     },
     // 鎶樻墸
     numberChange(currentValue) {
-      console.log(this.forms.limits, 888);
-      console.log(currentValue, 666);
-
       this.forms.limits = currentValue;
       /* if (this.forms.limits > this.getInfodis) {
         this.forms.limits = this.getInfodis;
@@ -1642,7 +1640,51 @@
       ).toFixed(2);
       // console.log(this.groupingList, 555);
 
-      this.handleGroup();
+      let mapList = [];
+      this.OnenewpacName.forEach((item) => {
+        mapList.push({
+          proName: item.proName,
+          proId: item.proId,
+          proPrice: item.proPrice,
+        });
+      });
+
+      // 濡傛灉 selectionList 涓虹┖锛屼娇鐢� mapList 缁х画淇濆瓨
+      if (this.OnenewpacName.length === 0) {
+        this.$modal.msgError("璇峰厛閫変腑椤圭洰");
+        return; // 鎻愮ず鐢ㄦ埛閫変腑椤圭洰
+      }
+
+      let data = {
+        groupingName: this.forms.groupingName,
+        gtAge: this.forms.gtAge,
+        limits: this.forms.limits,
+        ltAge: this.forms.ltAge,
+        pacName: this.forms.pacName,
+        payType: this.forms.payType,
+        sex: this.forms.sex,
+        dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 濡傛灉娌℃湁閫変腑閮ㄩ棬锛岃缃负绌�
+        dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "",
+        mapList: mapList,
+        price: this.forms.price,
+        ysPrice: this.forms.ysPrice,
+        id: this.groupList[0].id,
+      };
+
+      // 鍙戦�佽姹備繚瀛樻暟鎹�
+      dwgrouping(data).then((res) => {
+        if (res.code == 200) {
+          this.beCurrent();
+          this.forms.groupingName = "";
+          this.forms.sex = "";
+          this.forms.pacName = "";
+          this.forms.price = "";
+          this.forms.ysPrice = "";
+          this.forms.payType = "";
+        }
+      });
+
+      // this.handleGroup();
     },
     // 濂楅鍗曢」鑾峰彇
     handleChangeOne(selection) {
@@ -1757,6 +1799,12 @@
 
       getDetails(id).then((res) => {
         this.OnenewpacName = res.data.groupingProList;
+        this.OnenewpacName.forEach((item, index) => {
+          this.queryParams.price += item.proPrice;
+        });
+        // return this.OnenewpacName.forEach((item) => {
+        //   this.queryParams.price += item.proPrice;
+        // });
       });
       if (this.forms.sex) {
         deptTreeSelect(this.forms.sex).then((response) => {
@@ -1853,14 +1901,14 @@
     }, */
     handleGroup() {
       // 濡傛灉娌℃湁閫変腑浠讳綍閮ㄩ棬锛堝嵆娌℃湁 selectionList锛夛紝鍙互鐩存帴浠� OnenewpacName 鑾峰彇鏁版嵁
-      // let mapList = [];
-      /*  this.OnenewpacName.forEach((item) => {
+      let mapList = [];
+      this.OnenewpacName.forEach((item) => {
         mapList.push({
           proName: item.proName,
           proId: item.proId,
           proPrice: item.proPrice,
         });
-      }); */
+      });
 
       // 濡傛灉 selectionList 涓虹┖锛屼娇鐢� mapList 缁х画淇濆瓨
       /* if (this.OnenewpacName.length === 0) {
@@ -1883,7 +1931,7 @@
         sex: this.forms.sex,
         dwDeptId: this.selectionList.length > 0 ? this.selectionList[0].id : "", // 濡傛灉娌℃湁閫変腑閮ㄩ棬锛岃缃负绌�
         dwId: this.selectionList.length > 0 ? this.selectionList[0].dwId : "",
-        // mapList: mapList,
+        mapList: mapList,
         price: this.forms.price,
         ysPrice: this.forms.ysPrice,
         id: this.groupList[0].id,

--
Gitblit v1.8.0