| | |
| | | } |
| | | }) |
| | | this.palletTransportsMaterialSelectionChange([row]) |
| | | console.log(row); |
| | | }, |
| | | // 工艺类型中文格式化 |
| | | formatStateType(row, column, cellValue) { |
| | |
| | | openLocationDialog() { |
| | | if (this.palletTransportsMaterialMultipleSelection.length > 0) { |
| | | let flag = true |
| | | console.log(this.palletTransportsMaterialMultipleSelection) |
| | | this.palletTransportsMaterialMultipleSelection.forEach((item) => { |
| | | if (item.detailExistState) { |
| | | flag = false |
| | | } |
| | | console.log(item.detailExistState) |
| | | }) |
| | | if (flag) { |
| | | this.showLocation = true |
| | |
| | | }, |
| | | // 获取移库明细数据列表 |
| | | getPalletTransportsDetailData() { |
| | | // console.log("对应工单",this.WorkOrder); |
| | | // console.log("选中物料需求",this.palletTransportsMaterialMultipleSelection); |
| | | let transportsDetails =[] |
| | | transportsDetails = this.palletTransportsMaterialMultipleSelection.map(el =>{ |
| | | return{ |
| | |
| | | this.innerVisible = false |
| | | this.$message.success('添加移库明细成功') |
| | | let materialRow = selectionList[selectionList.length - 1] |
| | | console.log("materialRow-----",materialRow); |
| | | this.palletTransportsMaterialData.forEach(ele=>{ |
| | | if(ele.id==materialRow.id){ |
| | | console.log("ele-------",ele); |
| | | ele.transferQuantity = materialRow.surplusQuantity |
| | | ele.surplusQuantity = 0 |
| | | } |
| | |
| | | }, |
| | | // 打开单个明细批量更新库位弹框 |
| | | openSingleLocationDialog(row) { |
| | | console.log(row); |
| | | if (row.state === '01initial') { |
| | | this.detailList = [] |
| | | this.detailList.push(row) |
| | |
| | | }, |
| | | // 删除移库明细 |
| | | delDetail(row) { |
| | | /* const delRow = this.palletTransportsDetailData.find((item) => { |
| | | const delRow = this.palletTransportsDetailData.find((item) => { |
| | | return item.id === row.id |
| | | }) */ |
| | | |
| | | }) |
| | | delPalletTransportsDetailObj(row.id).then((response) => { |
| | | const resData = response.data |
| | | if (resData.code === 0) { |
| | | // const findRowIndex = this.palletTransportsDetailData.indexOf(delRow) |
| | | // this.palletTransportsDetailData.splice(findRowIndex, 1) |
| | | const findRowIndex = this.palletTransportsDetailData.indexOf(delRow) |
| | | this.palletTransportsDetailData.splice(findRowIndex, 1) |
| | | this.$message.success('移库明细删除成功') |
| | | // this.getPalletTransportsMaterialData() |
| | | const currRow = this.currPalletTransportsRow |
| | | this.getPallettransportsData().then(() => { |
| | | if (currRow) { |
| | |
| | | if (resData.code === 0) { |
| | | this.$message.success('执行成功') |
| | | // this.getPalletTransportsMaterialData() |
| | | this.palletTransportsDetailData=[] |
| | | const currRow = this.currPalletTransportsRow |
| | | this.getPallettransportsData().then(() => { |
| | | if (currRow) { |
| | |
| | | }, |
| | | palletTransportsMaterialSelectionChange(val) { |
| | | this.palletTransportsMaterialMultipleSelection = val |
| | | console.log(this.palletTransportsMaterialMultipleSelection); |
| | | if(val && val.length>0){ |
| | | let ids =[] |
| | | this.palletTransportsMaterialMultipleSelection.forEach(el =>{ids.push(el.id)}) |
| | | let pId = ids[ids.length - 1]; |
| | | console.log(pId); |
| | | if(pId!=null){ |
| | | selectAll({ |
| | | transportsId:this.currPalletTransportsRow.id, |