diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index 0ce1fa1..aea4529 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -364,7 +364,7 @@ - 保存 + 保存 关闭 同意 驳回 @@ -513,7 +513,7 @@ - 保存 + 保存 关闭 同意 驳回 @@ -566,7 +566,7 @@ - 保存 + 保存 关闭 同意 驳回 @@ -1083,7 +1083,8 @@ stepId: '', rejectFlag: '', rejectStepId: '', - isReject: '' + isReject: '', + menuId: this.$route.meta.menuId }, costImpactData: { site: this.$store.state.user.site, @@ -2381,7 +2382,8 @@ stepId: row.stepId, rejectFlag: row.rejectFlag, rejectStepId: row.rejectStepId, - isReject: row.isReject + isReject: row.isReject, + menuId: this.$route.meta.menuId } this.changeTitle = '变更申请-' + this.modalData.changeNo // 查选择的ECN种类 @@ -2457,20 +2459,68 @@ // 提交 submitData () { - for (let i = 0; i < this.plmChangeRequestArr.length; i++) { - if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') { - this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!') - return + if (this.plmChangeRequestArr) { + for (let i = 0; i < this.plmChangeRequestArr.length; i++) { + if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') { + this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!') + return + } } } - let tempData = { - site: this.modalData.site, - userName: this.$store.state.user.name, - changeNo: this.modalData.changeNo, - menuId: this.$route.meta.menuId, - nodeConclusion: this.modalData.nodeConclusion + if (this.plmChangeRequestDetailArr) { + for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) { + if (!this.modalData[this.plmChangeRequestDetailArr[i].fieldId] && this.plmChangeRequestDetailArr[i].required === 'Y') { + this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!') + return + } + } + } + if (this.plmChangeCostImpactArr) { + for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) { + if (!this.modalData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') { + this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!') + return + } + } + } + if (this.plmChangeFAItemArr) { + for (let i = 0; i < this.plmChangeFAItemArr.length; i++) { + if (!this.modalData[this.plmChangeFAItemArr[i].fieldId] && this.plmChangeFAItemArr[i].required === 'Y') { + this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!') + return + } + } + } + if (this.plmChangeExecutionInfoArr) { + for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) { + if (!this.modalData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') { + this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!') + return + } + } + } + if (this.plmChangeItemArr) { + for (let i = 0; i < this.plmChangeItemArr.length; i++) { + if (!this.modalData[this.plmChangeItemArr[i].fieldId] && this.plmChangeItemArr[i].required === 'Y') { + this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!') + return + } + } } - submitChange(tempData).then(({data}) => { + this.costImpactData.changeTotalCost = this.totalCost + this.executionInfoData.chooseItemList = this.chooseItemList + this.executionInfoData.chooseItemList2 = this.chooseItemList2 + this.countersignatureData.changeNo = this.modalData.changeNo + this.countersignatureData.chooseCSItemList = this.chooseCSItemList + + this.modalData.userName = this.$store.state.user.name + this.modalData.menuId = this.$route.meta.menuId + this.modalData.detailList = this.chooseDataList + this.modalData.ecnTypeData = this.form + this.modalData.costImpactData = this.costImpactData + this.modalData.executionInfoData = this.executionInfoData + this.modalData.countersignatureData = this.countersignatureData + submitChange(this.modalData).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.$message({message: '操作成功', type: 'success'}) @@ -2671,20 +2721,132 @@ this.$message.warning('请选择CQC或者FAI人员!') return } - // if (this.modalData.cqcOperatorId !== '' && this.modalData.cqcOperatorId != null && this.modalData.faiOperatorId !== '' && this.modalData.faiOperatorId != null) { - // this.$message.warning('CQC和FAI人员只能选一个!') - // return - // } + + + if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品 + if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') { + this.$message.warning('请填写在生产品数量!') + return + } + if (this.costImpactData.productionProductNumber <= 0) { + this.$message.warning('在生产品数量不能小于等于0!') + return + } + if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') { + this.$message.warning('请填写在生产品处理意见!') + return + } + if (this.costImpactData.productionProductScrapAmount === 0) { + this.$message.warning('请填写在生产品报废金额!') + return + } + if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') { + this.$message.warning('请填写在生产品执行人!') + return + } + } + if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存 + if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') { + this.$message.warning('请填写成品库存数量!') + return + } + if (this.costImpactData.inventoryProductNumber <= 0) { + this.$message.warning('成品库存数量不能小于等于0!') + return + } + if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') { + this.$message.warning('请填写成品库存处理意见!') + return + } + if (this.costImpactData.inventoryProductScrapAmount === 0) { + this.$message.warning('请填写成品库存报废金额!') + return + } + if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') { + this.$message.warning('请填写成品库存执行人!') + return + } + } + if (this.costImpactData.newOrderFlag === 'Y') { // 新订单 + if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') { + this.$message.warning('请填写新订单数量!') + return + } + if (this.costImpactData.newOrderNumber <= 0) { + this.$message.warning('新订单数量不能小于等于0!') + return + } + } + if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量 + if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') { + this.$message.warning('请填写影响的原材料及其库存量数量!') + return + } + if (this.costImpactData.affectedNumber <= 0) { + this.$message.warning('影响的原材料及其库存量数量不能小于等于0!') + return + } + if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') { + this.$message.warning('请填写影响的原材料及其库存量处理意见!') + return + } + if (this.costImpactData.affectedScrapAmount === 0) { + this.$message.warning('请填写影响的原材料及其库存量报废金额!') + return + } + if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') { + this.$message.warning('请填写影响的原材料及其库存量执行人!') + return + } + } + + + if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') { + this.$message.warning('请填写原啤刀编号!') + return; + } + if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') { + this.$message.warning('请填写新啤刀编号!') + return; + } + if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') { + this.$message.warning('请填写原网板/印版编号!') + return; + } + if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') { + this.$message.warning('请填写新网板/印版编号!') + return; + } + if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') { + this.$message.warning('请选择ECN执行日期!') + return; + } + + this.costImpactData.changeTotalCost = this.totalCost + this.executionInfoData.chooseItemList = this.chooseItemList + this.executionInfoData.chooseItemList2 = this.chooseItemList2 + this.countersignatureData.changeNo = this.modalData.changeNo + this.countersignatureData.chooseCSItemList = this.chooseCSItemList + this.modalData.detailList = this.chooseDataList this.modalData.ecnTypeData = this.form + this.modalData.costImpactData = this.costImpactData + this.modalData.executionInfoData = this.executionInfoData + this.modalData.countersignatureData = this.countersignatureData changeRequestUpdate(this.modalData).then(({data}) => { if (data && data.code === 0) { this.modalData = data.rows.modalData + this.modalData.menuId = this.$route.meta.menuId + this.changeTitle = '变更申请-' + this.modalData.changeNo + this.form = data.rows.form + this.chooseDataList = data.rows.chooseDataList + this.costImpactData = data.rows.costImpactData + this.executionInfoData = data.rows.executionInfoData + this.executionInfoData.createBy = this.$store.state.user.name + this.chooseItemList = data.rows.chooseItemList + this.chooseItemList2 = data.rows.chooseItemList2 + this.chooseCSItemList = data.rows.chooseCSItemList this.getDataList() - // 查选择的ECN种类 - this.getChangeChooseEcnType() - // 查变更单明细 - this.changeRequestDetailSearch() this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue index c4f4205..d5f86e1 100644 --- a/src/views/modules/quotation/requestForQuote.vue +++ b/src/views/modules/quotation/requestForQuote.vue @@ -3323,6 +3323,14 @@ export default { // 提交 submitData () { + if (this.plmQuotationInformationArr) { + for (let i = 0; i < this.plmQuotationInformationArr.length; i++) { + if (!this.modalData[this.plmQuotationInformationArr[i].fieldId] && this.plmQuotationInformationArr[i].required === 'Y') { + this.$message.warning(this.plmQuotationInformationArr[i].fieldName + '不能为空!') + return + } + } + } this.modalData.userName = this.$store.state.user.name this.modalData.menuId = this.$route.meta.menuId submitChange(this.modalData).then(({data}) => { diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue index c0b23e6..23e0c89 100644 --- a/src/views/modules/test/requestForTest.vue +++ b/src/views/modules/test/requestForTest.vue @@ -3399,6 +3399,14 @@ // 提交 submitData () { + if (this.plmTestInformationArr) { + for (let i = 0; i < this.plmTestInformationArr.length; i++) { + if (!this.modalData[this.plmTestInformationArr[i].fieldId] && this.plmTestInformationArr[i].required === 'Y') { + this.$message.warning(this.plmTestInformationArr[i].fieldName + '不能为空!') + return + } + } + } this.modalData.userName = this.$store.state.user.name this.modalData.menuId = this.$route.meta.menuId submitChange(this.modalData).then(({data}) => {