| | |
| | | |
| | | <el-table-column prop="transfer_quantity" label="移库数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.transfer_quantity" border="none"></el-input> |
| | | <el-input v-model="scope.row.transfer_quantity" @change="moveLocation(scope.row)" :disabled = "scope.row.state == '02submitted' " border="none"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | delPalletTransportsDetailObj, |
| | | executeMoveLocation, |
| | | selectAll, |
| | | updateStock, |
| | | } from '@/api/warehouse/pallettransports' |
| | | import { getByPalletTransId } from '@/api/plan/operationtask' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | forbidden:false, |
| | | partDesc: null, |
| | | ajaxFun: palletTransportsFetchList, |
| | | currPalletTransportsRow: null, |
| | |
| | | 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) |
| | | this.palletTransportsDetailMultipleSelection.forEach(el =>{ |
| | | console.log(el.transfer_quantity); |
| | | el.transfer_quantity = num |
| | | }) |
| | | 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() |