Bladeren bron

【修改】bug

howie 3 jaren geleden
bovenliggende
commit
0c8941eb88
2 gewijzigde bestanden met toevoegingen van 9 en 15 verwijderingen
  1. 2 3
      src/components/Common/image-upload.vue
  2. 7 12
      src/views/supply/policy/components/retail_form.vue

+ 2 - 3
src/components/Common/image-upload.vue

@@ -164,7 +164,6 @@ export default {
       const result = await new Promise((resolve, reject) => {
         getOssConfig().then(res => {
           const fileKey = this.createName(fileName)
-
           res.data.name = this.fileName ? this.fileName : fileName
           res.data.key = res.data.dir + fileKey
           resolve(res.data)
@@ -216,8 +215,8 @@ export default {
 
       }
 
-      this.$emit('handleIsFileName',this.fileName?this.fileName: file.name)
-      this.dataObj = await this.getOssConfig(this.fileName?this.fileName: file.name)
+      this.$emit('handleIsFileName', file.name)
+      this.dataObj = await this.getOssConfig(file.name)
       this.waitUploadList.push(this.dataObj)
     },
 

+ 7 - 12
src/views/supply/policy/components/retail_form.vue

@@ -1027,7 +1027,7 @@ export default {
 
         this.$set(row, 'serviceId', service.serviceId)
         this.$set(row, 'serviceName', service.serviceName)
-        // this.$set(row,'amount',service.amount || 0)
+        this.$set(row,'amount',service.amount || 0)
       } else {
         console.log(index)
         if (index === 0) {
@@ -1036,7 +1036,7 @@ export default {
         }
         this.$set(row, 'serviceId', '')
         this.$set(row, 'serviceName', '')
-        // this.$set(row,'amount',0 )
+        this.$set(row,'amount',0 )
       }
 
     },
@@ -1344,7 +1344,7 @@ export default {
             this.$set(this.multipleData[i], 'customerWalletId', this.multipleData[i].wallets[0].customerWalletId)
             this.$set(this.multipleData[i], 'serviceName', this.multipleData[i].wallets[0].serviceName)
             this.$set(this.multipleData[i], 'serviceId', this.multipleData[i].wallets[0].serviceId)
-            this.$set(this.multipleData[i],'amount', 0.00)
+            this.$set(this.multipleData[i],'amount', this.multipleData[i].wallets[0].amount)
           }
           arrData = [...arrData, ...this.multipleData[i]]
         }
@@ -1399,7 +1399,7 @@ export default {
               this.$set(this.multipleSelections[i][j], 'customerWalletId', this.multipleSelections[i][j].wallets[0].customerWalletId)
               this.$set(this.multipleSelections[i][j], 'serviceName', this.multipleSelections[i][j].wallets[0].serviceName)
               this.$set(this.multipleSelections[i][j], 'serviceId', this.multipleSelections[i][j].wallets[0].serviceId)
-              this.$set(this.multipleSelections[i][j],'amount',0.00)
+              this.$set(this.multipleSelections[i][j],'amount',this.multipleSelections[i][j].wallets[0].amount)
             }
             arrData = [...arrData, this.multipleSelections[i][j]]
           }
@@ -1467,16 +1467,11 @@ export default {
             item.status2 = ''
 
             this.$set(item, 'userList', this.userList)
-            item.rebateWallets.forEach(j=>{
-               if (k.customerWalletId2 === data.customerWalletId2) {
-                  this.$set(item, 'amount', j.amount||0.00)
-              }
-            })
             item.wallets.forEach((k) => {
               if (k.customerWalletId === data.customerWalletId) {
                 this.$set(item, 'serviceId', k.serviceId)
                 this.$set(item, 'serviceName', k.serviceName)
-
+                this.$set(item, 'amount', k.amount || 0)
               }
             })
           })
@@ -1752,10 +1747,10 @@ export default {
           return e === k.customerWalletId
         })[0]
         this.$set(row, 'rebateRate', (obj.rebateRate || 0))
-            this.$set(row,'amount',obj.amount || 0.00)
+
       } else {
         this.$set(row, 'rebateRate', 0)
-         this.$set(row,'amount',0.00)
+
       }
 
     },