| | |
| | | part_no:el.partNo, |
| | | part_desc:el.partDesc, |
| | | operation_task_no:el.operationTaskNo, |
| | | transfer_quantity:0, |
| | | transfer_quantity:el.transferQuantity, |
| | | unit:el.unit, |
| | | to_ifs_location_no:el.toIfsLocationName, |
| | | state:el.state, |
| | |
| | | return{ |
| | | partNo:el.partNo, |
| | | partDesc: el.partDesc, |
| | | transferQuantity: el.surplusQuantity, |
| | | transferQuantity: 0, |
| | | toIfsLocationNo:el.toIfsLocationNo, |
| | | toIfsLocationName: el.toIfsLocationName, |
| | | transportsId: el.transportsId, |
| | |
| | | ele.surplusQuantity = 0 |
| | | } |
| | | }) |
| | | this.getPalletTransportsMaterialData() |
| | | } else { |
| | | this.$message.error('添加移库明细失败') |
| | | } |
| | |
| | | moveLocation(val){ |
| | | console.log(val,"---->"); |
| | | let num = Number(val.transfer_quantity) |
| | | if (val.state !="02submitted") { |
| | | updateStock({id:val.id,transferQuantity:num}).then((res) =>{ |
| | | console.log(res,"------>1"); |
| | | this.getPalletTransportsMaterialData() |
| | | this.palletTransportsDetailMultipleSelection.forEach(el =>{ |
| | | console.log(el.transfer_quantity); |
| | | el.transfer_quantity = num |
| | | }) |
| | | }else{ |
| | | this.$message.error('移库已经执行') |
| | | } |
| | | console.log(this.palletTransportsDetailMultipleSelection,"--->123"); |
| | | |
| | | }, |
| | | // 执行移库 |
| | | executeMove() { |
| | | let data = [] |
| | | data = this.palletTransportsDetailMultipleSelection.map(el =>{ |
| | | return { |
| | | id:el.id, |
| | | 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('移库已经执行') |
| | | } |
| | | if ( |
| | | this.palletTransportsDetailMultipleSelection && |
| | | this.palletTransportsDetailMultipleSelection.length > 0 |
| | |
| | | } else { |
| | | this.$message.error('请选择移库明细') |
| | | } |
| | | |
| | | }, |
| | | selectDetailLocationCallback() { |
| | | this.getPalletTransportsDetailData() |