From 6c49c4bab89a05b826d6a5fe6990dce2f1937d29 Mon Sep 17 00:00:00 2001
From: pengjun <158915633@qq.com>
Date: Wed, 25 Oct 2023 18:18:10 +0800
Subject: [PATCH] group
---
 .../customerOrg/customerOrgGroupAsbitem.vue   |  2 +-
 src/views/customerOrg/customerOrgGroup.vue    | 22 ++++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/components/customerOrg/customerOrgGroupAsbitem.vue b/src/components/customerOrg/customerOrgGroupAsbitem.vue
index 65cb222..3e38dec 100644
--- a/src/components/customerOrg/customerOrgGroupAsbitem.vue
+++ b/src/components/customerOrg/customerOrgGroupAsbitem.vue
@@ -75,7 +75,7 @@
               prop="displayName"
             >
             
-            
+            
               
                 {
         if(res.code != -1){
-          this.$message.success("操作成功");
-
+          //this.$message.success("操作成功");
           //触发分组明细刷新
           this.form.id = ''
           //要做延时处理,否则不会触发监听
@@ -672,28 +671,31 @@ export default {
     madeNewGroupAsbitems(oldGroupAsbitems,newTotal){
       newTotal = Number(newTotal).toFixed(2)
       let newGroupAsbitems = []
-      let oldTotal = 0
+      let oldTotal = Number(0)
       oldGroupAsbitems.forEach(e =>{
-        oldTotal += Number(e.customerOrgGroupDetailMoney)
+        oldTotal += Number(e.asbitemMoney) //customerOrgGroupDetailMoney
       })
-      oldTotal = oldTotal.toFixed(2)
+      oldTotal = Number(oldTotal).toFixed(2)
 
       let discount = 0
       if(oldTotal != 0) discount = (newTotal * 100 /oldTotal).toFixed(2)
 
-      oldTotal = 0
+      oldTotal = Number(0)
       oldGroupAsbitems.forEach(e =>{
-        e.customerOrgGroupDetailPrice = (e.customerOrgGroupDetailPrice * discount/100).toFixed(2)
+        e.customerOrgGroupDetailPrice = (e.price * discount/100).toFixed(2)
         e.customerOrgGroupDetailMoney = (e.customerOrgGroupDetailPrice * e.customerOrgGroupDetailAmount).toFixed(2)
         oldTotal += Number(e.customerOrgGroupDetailMoney)
       })
-      oldTotal = oldTotal.toFixed(2)
+      oldTotal = Number(oldTotal).toFixed(2)
+
+      //console.log('discount,oldTotal',discount,oldTotal)
 
-      let didTotal = newTotal - oldTotal
+      let didTotal = Number(newTotal - oldTotal).toFixed(2)
       if(didTotal != 0){
         for(let i = 0;i