| | |
| | | <!-- <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> |
| | |
| | | console.log(this.palletTransportsDetailMultipleSelection,"--->123"); |
| | | |
| | | }, |
| | | // 执行移库 |
| | | executeMove() { |
| | | updateStockFun(){ |
| | | let data = [] |
| | | data = this.palletTransportsDetailMultipleSelection.map(el =>{ |
| | | return { |
| | |
| | | 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 |
| | |
| | | flag = false |
| | | } |
| | | }) |
| | | console.log("-----------",flag,ids); |
| | | if (flag) { |
| | | executeMoveLocation(ids).then((response) => { |
| | | const resData = response.data |