From 7b8e525766b1676931f164d7ee5994e166fad1f7 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期四, 28 十二月 2023 16:21:48 +0800 Subject: [PATCH] modified: src/views/plan/productionschedul/index.vue --- src/views/warehouse/pallettransports/index.vue | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/views/warehouse/pallettransports/index.vue b/src/views/warehouse/pallettransports/index.vue index 24c803a..e40e69e 100644 --- a/src/views/warehouse/pallettransports/index.vue +++ b/src/views/warehouse/pallettransports/index.vue @@ -113,7 +113,7 @@ <!-- <el-button type="warning" v-if="permissions.warehouse_pallettransports_detail_library" round @click="openDetailLocationDialog">涓�閿嚦搴撲綅</el-button> --> <el-button type="success" v-if="permissions.warehouse_pallettransports_detail_execute" round - @click="executeMove">鎵� 琛�</el-button> + @click="updateStockFun">鎵� 琛�</el-button> </div> </div> <div> @@ -751,18 +751,27 @@ moveLocation(val){ console.log(val,"---->"); let num = Number(val.transfer_quantity) - if (val.state !="02submitted") { - if(num >= 0){ - updateStock({id:val.id,transferQuantity:num}).then((res) =>{ - console.log(res,"------>1"); - this.getPalletTransportsMaterialData() - }) - }else{ - this.$message.error('绉诲簱涓嶈兘灏忎簬0') + this.palletTransportsDetailMultipleSelection.forEach(el =>{ + console.log(el.transfer_quantity); + el.transfer_quantity = num + }) + console.log(this.palletTransportsDetailMultipleSelection,"--->123"); + + }, + updateStockFun(){ + let data = [] + data = this.palletTransportsDetailMultipleSelection.map(el =>{ + return { + id:el.id, + transferQuantity:el.transfer_quantity + } + }) + updateStock(data).then((res) =>{ + if(res.data.code===0){ + this.getPalletTransportsMaterialData() + this.executeMove() } - }else{ - this.$message.error('绉诲簱宸茬粡鎵ц') - } + }) }, // 鎵ц绉诲簱 executeMove() { @@ -778,7 +787,6 @@ flag = false } }) - console.log("-----------",flag,ids); if (flag) { executeMoveLocation(ids).then((response) => { const resData = response.data @@ -802,6 +810,7 @@ } else { this.$message.error('璇烽�夋嫨绉诲簱鏄庣粏') } + }, selectDetailLocationCallback() { this.getPalletTransportsDetailData() -- Gitblit v1.9.3