From 03cfba0f636b42417070fc8caef44bcdd792a085 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 07 五月 2024 17:34:37 +0800
Subject: [PATCH] 概述 出库模块 编辑的时候循环处理对应产品调用接口获取在库数量的逻辑处理
---
src/views/overview/AddOverviewDialog.vue | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index 1bf61aa..156dbe6 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/src/views/overview/AddOverviewDialog.vue
@@ -1442,10 +1442,17 @@
{ label: "璁¢噺鍗曚綅", prop: "unit" },
];
}
+ console.log(this.tableData,'===tableData')
+ if(this.workType == 2){
+ for(let i in this.tableData){
+ this.selSonLocationClick(this.tableData[i].fromLocation.id,'fromLocationId',this.tableData[i],i,3)
+ }
+ }
this.productTableList = {
tableData: this.tableData,
tableColumn: tableColumnArr,
};
+
},
getTwoTable(data,value){
let list = data.map((res) => {
@@ -1569,15 +1576,19 @@
}
});
},
- selSonLocationClick(val, prop, row,scope){
+ selSonLocationClick(val, prop, row,scope,type){
if(this.workType == 2){
if(prop=='fromLocationId'){
getLocationProductAmount({
- locationId:val.value,
+ locationId:type==3?val:val.value,
productId:row.productId
}).then((res)=>{
if(res.code==200){
- this.$set(this.tableData[scope.$index],'inLibraryAmount',res.data?res.data.amount:0)
+ if(type==3){
+ this.$set(this.tableData[scope],'inLibraryAmount',res.data?res.data.amount:0)
+ }else{
+ this.$set(this.tableData[scope.$index],'inLibraryAmount',res.data?res.data.amount:0)
+ }
this.$forceUpdate()
}
})
--
Gitblit v1.8.0