From f135e67b7a6733796aaa855198a8b97f2894c5c7 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期四, 28 十二月 2023 15:52:43 +0800 Subject: [PATCH] modified: src/views/warehouse/pallettransports/index.vue --- src/views/warehouse/pallettransports/index.vue | 28 +++++++++++----------------- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/views/warehouse/pallettransports/index.vue b/src/views/warehouse/pallettransports/index.vue index 65e2ed9..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> @@ -758,8 +758,7 @@ console.log(this.palletTransportsDetailMultipleSelection,"--->123"); }, - // 鎵ц绉诲簱 - executeMove() { + updateStockFun(){ let data = [] data = this.palletTransportsDetailMultipleSelection.map(el =>{ return { @@ -767,19 +766,15 @@ transferQuantity:el.transfer_quantity } }) - console.log(data,"----------++++++++"); - if (data.length>0) { - // if(data[0].transferQuantity){ - updateStock(data).then((res) =>{ - console.log(res,"------>1"); - this.getPalletTransportsMaterialData() - }) - // }else{ - // this.$message.error('绉诲簱涓嶈兘灏忎簬0') - // } - }else{ - this.$message.error('绉诲簱宸茬粡鎵ц') - } + updateStock(data).then((res) =>{ + if(res.data.code===0){ + this.getPalletTransportsMaterialData() + this.executeMove() + } + }) + }, + // 鎵ц绉诲簱 + executeMove() { if ( this.palletTransportsDetailMultipleSelection && this.palletTransportsDetailMultipleSelection.length > 0 @@ -792,7 +787,6 @@ flag = false } }) - console.log("-----------",flag,ids); if (flag) { executeMoveLocation(ids).then((response) => { const resData = response.data -- Gitblit v1.9.3