瀏覽代碼

no message

aXin-0810 1 年之前
父節點
當前提交
1a5a24e084
共有 1 個文件被更改,包括 18 次插入7 次删除
  1. 18 7
      src/views/supply/reserve/components/reserve_form.vue

+ 18 - 7
src/views/supply/reserve/components/reserve_form.vue

@@ -849,16 +849,27 @@ export default {
 
 
     // 更改经销商
     // 更改经销商
     async changeDealer(index) {
     async changeDealer(index) {
-      console.log(444, index, this.goodsList, this.goodsList[index].customerNumber)
       if (this.goodsList[index].customerNumber) {
       if (this.goodsList[index].customerNumber) {
         let obj = this.dealerList.find(o => o.number == this.goodsList[index].customerNumber)
         let obj = this.dealerList.find(o => o.number == this.goodsList[index].customerNumber)
-        this.goodsList[index].customerName = obj.name
-        this.goodsList[index].customerId = obj.id
-        this.goodsList[index].warehouseList = await this.getListStock(obj.id)
+        this.goodsList.splice(index, 1, {
+          ...this.goodsList[index],
+          customerName: obj.name,
+          customerId: obj.id,
+          warehouseList: await this.getListStock(obj.id)
+        })
+        // this.goodsList[index].customerName = obj.name
+        // this.goodsList[index].customerId = obj.id
+        // this.goodsList[index].warehouseList = await this.getListStock(obj.id)
       } else {
       } else {
-        this.goodsList[index].customerName = ''
-        this.goodsList[index].customerId = ''
-        this.goodsList[index].warehouseList = []
+        this.goodsList.splice(index, 1, {
+          ...this.goodsList[index],
+          customerName: '',
+          customerId: '',
+          warehouseList: []
+        })
+        // this.goodsList[index].customerName = ''
+        // this.goodsList[index].customerId = ''
+        // this.goodsList[index].warehouseList = []
       }
       }
     },
     },