Jelajahi Sumber

Finish Hotfix-zh-25

howie 3 tahun lalu
induk
melakukan
f8d9fb1701

File diff ditekan karena terlalu besar
+ 299 - 314
src/views/basic_data/material/components/modify_list-apply.vue


+ 28 - 9
src/views/supply/policy/components/retail_form.vue

@@ -298,7 +298,7 @@
               {{ ((scope.row.price * scope.row.qty) * 100 - ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 - ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) / 100 }}
             </template>
             <template v-else>
-              {{scope.row.price*scope.row.qty}}
+              {{ scope.row.price*scope.row.qty }}
             </template>
           </template>
         </el-table-column>
@@ -821,7 +821,8 @@ export default {
       totalPrice: 0,
       totalAmount: 0,
       totalArr: [],
-      type: 1
+      type: 1,
+      newMultipleSelections: []
     }
   },
 
@@ -958,7 +959,8 @@ export default {
       const service = row.wallets.filter((k) => {
         return e == k.customerWalletId
       })[0]
-      if (service.serviceId) {
+
+      if (e && service.serviceId) {
         this.$set(this.mainForm, 'k3ServiceId', service.serviceId)
         this.$set(this.mainForm, 'k3ServiceName', service.serviceId)
       }
@@ -1036,7 +1038,7 @@ export default {
         this.dataList = []
 
         for (let i = 0; i < this.popArr.length; i++) {
-          await this.getConditionList(this.policyConditionId, i + 1, true)
+          await this.getConditionList(this.policyConditionId, i + 1, false)
         }
       } else {
         // sProvision = true
@@ -1119,7 +1121,6 @@ export default {
           for (let i = 0; i < this.goodsList.length; i++) {
             for (let j = 0; j < this.dataList.length; j++) {
               if (this.dataList[j].id == this.goodsList[i].policyMaterialId) {
-                console.log(8888)
                 this.$set(this.dataList[i], 'disabled', true)
               }
             }
@@ -1135,8 +1136,8 @@ export default {
           res.data.records[i].sums1 = ['price', 'qty', 'zong']
           res.data.records[i].userList = this.userList
           res.data.records[i].policyMaterialId = res.data.records[i].id
-          for (let j = 0; j < this.newDataList.length; j++) {
-            if (this.newDataList[j].id == res.data.records[i].id) {
+          for (let j = 0; j < this.goodsList.length; j++) {
+            if (this.goodsList[j].id == res.data.records[i].id) {
               res.data.records[i].disabled = false
             }
           }
@@ -1203,15 +1204,23 @@ export default {
     },
     // 条件数据多选
     handleSelectionChange(val, type, index) {
-      if (type == 1) {
+      if (type === 1) {
         this.type = 1
+        if (!this.multipleSelections.length) {
+          this.multipleSelections = new Array(index).fill([])
+        } else {
+          for (let i = 0; i < this.multipleSelections.length; i++) {
+            if (!this.multipleSelections[i] && !this.multipleSelections.length) {
+              this.multipleSelections[i] = []
+            }
+          }
+        }
         this.$set(this.multipleSelections, index, val)
         this.$set(this.totalArr, index, {
           totalQty: 0,
           totalPrice: 0,
           totalAmount: 0
         })
-
         for (let j = 0; j < this.multipleSelections[index].length; j++) {
           this.multipleSelections[index][j].fang = true
           this.totalArr[index].totalQty +=
@@ -1226,7 +1235,9 @@ export default {
         // consloe(this.multipleSelections);
       } else {
         this.type = 2
+
         this.multipleSelection = val
+        console.log(this.multipleSelection)
         this.totalQty = this.totalPrice = this.totalAmount = 0
         for (let i = 0; i < this.multipleSelection.length; i++) {
           this.multipleSelection[i].fang = true
@@ -1239,10 +1250,14 @@ export default {
       }
     },
     hanlePopData() {
+      console.log(this.multipleSelections)
       this.multipleData.push(this.multipleSelection)
       if (this.multipleData.length && this.multipleSelection.length) {
         let arrData = []
         for (let i = 0; i < this.multipleData.length; i++) {
+          if (this.multipleData[i].wallets && this.multipleData[i].wallets.length) {
+            this.$set(this.multipleData[i], 'customerWalletId', this.multipleData[i].wallets[0].customerWalletId)
+          }
           arrData = [...arrData, ...this.multipleData[i]]
         }
         if (this.goodsList.length) {
@@ -1286,9 +1301,13 @@ export default {
         // consloe(this.goodsList, "kkkk");
       } else if (this.multipleSelections.length) {
         let arrData = []
+        this.newMultipleSelections = this.multipleSelections
         for (let i = 0; i < this.multipleSelections.length; i++) {
           for (let j = 0; j < this.multipleSelections[i].length; j++) {
             this.multipleSelections[i][j].disabled = true
+            if (this.multipleSelections[i][j].wallets.length) {
+              this.$set(this.multipleSelections[i][j], 'customerWalletId', this.multipleSelections[i][j].wallets[0].customerWalletId)
+            }
             arrData = [...arrData, this.multipleSelections[i][j]]
           }
         }

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini