diff --git a/src/views/ManufacturingCenter/PartAssignment/index.vue b/src/views/ManufacturingCenter/PartAssignment/index.vue index b10cc0e0..d97ff442 100644 --- a/src/views/ManufacturingCenter/PartAssignment/index.vue +++ b/src/views/ManufacturingCenter/PartAssignment/index.vue @@ -456,11 +456,11 @@ export default { this.tableData1 = response.data }) } else if (this.PartType === '外购件') { - searchPart1(this.groupFloatValue, 1).then(response => { + searchPart1(this.groupFloatValue, 2).then(response => { this.tableData2 = response.data }) } else if (this.PartType === '标准件') { - searchPart1(this.groupFloatValue, 2).then(response => { + searchPart1(this.groupFloatValue, 1).then(response => { this.tableData3 = response.data }) } @@ -480,11 +480,11 @@ export default { this.tableData1 = response.data }) } else if (this.PartType === '外购件') { - searchPart1(row.组件流水号, 1).then(response => { + searchPart1(row.组件流水号, 2).then(response => { this.tableData2 = response.data }) } else if (this.PartType === '标准件') { - searchPart1(row.组件流水号, 2).then(response => { + searchPart1(row.组件流水号, 1).then(response => { this.tableData3 = response.data }) } @@ -625,9 +625,11 @@ export default { this.result = 0 if (this.PartType === '基本件') { for (let i = 0; i < this.BasicPartsNumber.length; i++) { - purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.NumberOfParts[i], this.PartType, this.time, this.MaterialNum[i]).then(response => { + purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i]).then(response => { this.result += parseInt(response.data[0].result) + console.log(this.result) if (this.result === this.BasicPartsNumber.length) { + console.log(1111) this.$message.success('请购成功') searchPart(this.groupFloatValue).then(response => { this.tableData1 = response.data @@ -640,11 +642,11 @@ export default { } } else if (this.PartType === '外购件') { for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) { - purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], this.PartType, this.time, this.MaterialNum[i]).then(response => { + purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i]).then(response => { this.result += parseInt(response.data[0].result) if (this.result === this.StandardPartsAndOutsourcing.length) { this.$message.success('请购成功') - searchPart1(this.groupFloatValue, 1).then(response => { + searchPart1(this.groupFloatValue, 2).then(response => { this.tableData2 = response.data }) searchDetailed(this.RequisitionList).then(response => { @@ -655,11 +657,11 @@ export default { } } else if (this.PartType === '标准件') { for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) { - purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], this.PartType, this.time, this.MaterialNum[i]).then(response => { + purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i]).then(response => { this.result += parseInt(response.data[0].result) if (this.result === this.StandardPartsAndOutsourcing.length) { this.$message.success('请购成功') - searchPart1(this.groupFloatValue, 2).then(response => { + searchPart1(this.groupFloatValue, 1).then(response => { this.tableData3 = response.data }) searchDetailed(this.RequisitionList).then(response => { @@ -683,11 +685,11 @@ export default { if (response.data[0].result === '1') { this.$message.success('请购成功') if (this.PartType === '外购件') { - searchPart1(this.groupFloatValue, 1).then(response => { + searchPart1(this.groupFloatValue, 2).then(response => { this.tableData2 = response.data }) } else { - searchPart1(this.groupFloatValue, 2).then(response => { + searchPart1(this.groupFloatValue, 1).then(response => { this.tableData3 = response.data }) } @@ -729,24 +731,33 @@ export default { searchPart(this.groupFloatValue).then(response => { this.tableData1 = response.data }) + searchDetailed(this.RequisitionList).then(response => { + this.tableData5 = response.data + }) } else { this.$message.error('移出失败') } }) } else if (row.零件类型 === '外购件') { MoveOut1(row.请购单明细流水号, row.标准件和外购件流水号).then(response => { if (response.data[0].result === '1') { this.$message.success('移出成功') - searchPart1(this.groupFloatValue, 1).then(response => { + searchPart1(this.groupFloatValue, 2).then(response => { this.tableData2 = response.data }) + searchDetailed(this.RequisitionList).then(response => { + this.tableData5 = response.data + }) } else { this.$message.error('移出失败') } }) } else if (row.零件类型 === '标准件') { MoveOut1(row.请购单明细流水号, row.标准件和外购件流水号).then(response => { if (response.data[0].result === '1') { this.$message.success('移出成功') - searchPart1(this.groupFloatValue, 2).then(response => { + searchPart1(this.groupFloatValue, 1).then(response => { this.tableData3 = response.data }) + searchDetailed(this.RequisitionList).then(response => { + this.tableData5 = response.data + }) } else { this.$message.error('移出失败') } }) } @@ -767,7 +778,7 @@ export default {