From 398be7a4734ccfa0eb71936d7e659171360a7cf5 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 15 Apr 2025 13:45:41 +0800 Subject: [PATCH] =?UTF-8?q?2025-04-15=20=E5=8F=98=E6=9B=B4=E5=8D=95?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E4=BA=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/changeManagement/changeRecord.vue | 130 ++++++++++++++++-- .../changeManagement/changeRequest.vue | 19 ++- src/views/modules/common/Chooselist.vue | 4 +- 3 files changed, 135 insertions(+), 18 deletions(-) diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index 42cb688..cb3331b 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -3033,7 +3033,7 @@ if (this.tempExecutorRow.executor == null) { this.tempExecutorRow.executor = '' } - this.getBaseList(103, 7) + this.getBaseList(2010) }, ecnTypeHeaderChange (val,index) { @@ -4001,13 +4001,112 @@ // 执行所选属性 executeModal (row) { - row.executeFlag = 'Y' - row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') + this.$confirm(`是否确认提交?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + 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 + } + } + } + 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 + } + } + } + if (this.plmChangeCountersignatureItemArr) { + for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) { + if (!this.modalData[this.plmChangeCountersignatureItemArr[i].fieldId] && this.plmChangeCountersignatureItemArr[i].required === 'Y') { + this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!') + return + } + } + } + if (this.chooseDataList.length === 0) { + this.$message.warning('请添加需要变更的技术参数卡!') + 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.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 + this.modalData.nodeConclusion = 'Y' + this.submitLoading = true + submitChange(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.$message({message: '操作成功', type: 'success'}) + this.submitModalFlag = false + this.modalFlag = false + + row.executeFlag = 'Y' + row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.submitLoading = false + }).catch(()=>{ + this.submitLoading = false + }) + + }) + // row.executeFlag = 'Y' + // row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') // row.executor = this.$store.state.user.name - // 执行时调用同意提交方法 - if (this.modalData.changeStatus === '审批中') { - this.agreeSubmit() - } + // // 执行时调用同意提交方法 // 2025-04-15 海波要求修改 一定会是审批中状态 + // if (this.modalData.changeStatus === '审批中') { + // this.agreeSubmit() + // } }, // 执行所选属性 @@ -4214,9 +4313,10 @@ strVal = this.costImpactData.inventoryProductExecutor } else if (type === 5) { strVal = this.costImpactData.affectedExecutor - } else if (type === 7) { - strVal = this.tempExecutorRow.executor } + // else if (type === 7) { + // strVal = this.tempExecutorRow.executor + // } conSql = " and b.site = '" + this.$store.state.user.site + "'" } if (val === 133) { @@ -4238,6 +4338,10 @@ strVal = this.modalData.faiOperatorId conSql = " and b.site = '" + this.$store.state.user.site + "'" } + if (val === 2010) { + strVal = this.tempExecutorRow.executor + conSql = " and b.site = '" + this.$store.state.user.site + "'" + } this.$refs.baseList.init(val, strVal, conSql) }) }, @@ -4261,9 +4365,10 @@ this.costImpactData.affectedExecutor = val.username this.costImpactData.affectedExecutorName = val.user_display //this.$set(this.costImpactData,'affectedExecutorName',val.user_display) - } else if (this.tagNo1 === 7) { - this.$set(this.tempExecutorRow,'executor',val.username) } + // else if (this.tagNo1 === 7) { + // this.$set(this.tempExecutorRow,'executor',val.username) + // } } if (this.tagNo === 133) { //this.tempPartRow.newPartNo = val.part_no @@ -4285,6 +4390,9 @@ this.modalData.faiOperatorId = val.username this.modalData.faiOperatorName = val.user_display } + if (this.tagNo === 2010) { + this.$set(this.tempExecutorRow,'executor',val.username) + } }, // 申请人输入校验 diff --git a/src/views/modules/changeManagement/changeRequest.vue b/src/views/modules/changeManagement/changeRequest.vue index d10a3fb..de485f6 100644 --- a/src/views/modules/changeManagement/changeRequest.vue +++ b/src/views/modules/changeManagement/changeRequest.vue @@ -2181,7 +2181,7 @@ chooseExecutor (row) { this.tempExecutorRow = row - this.getBaseList(103, 7) + this.getBaseList(2010) }, ecnTypeHeaderChange (val,index) { @@ -3146,9 +3146,10 @@ } else { strVal = this.costImpactData.affectedExecutor } - } else if (type === 7) { - strVal = this.tempExecutorRow.executor } + // else if (type === 7) { + // strVal = this.tempExecutorRow.executor + // } conSql = " and b.site = '" + this.$store.state.user.site + "'" } if (val === 133) { @@ -3170,6 +3171,10 @@ strVal = this.modalData.faiOperatorId conSql = " and b.site = '" + this.$store.state.user.site + "'" } + if (val === 2010) { + strVal = this.tempExecutorRow.executor + conSql = " and b.site = '" + this.$store.state.user.site + "'" + } this.$refs.baseList.init(val, strVal, conSql) }) }, @@ -3193,9 +3198,10 @@ this.costImpactData.affectedExecutor = val.username this.costImpactData.affectedExecutorName = val.user_display //this.$set(this.costImpactData,'affectedExecutorName',val.user_display) - } else if (this.tagNo1 === 7) { - this.$set(this.tempExecutorRow,'executor',val.username) } + // else if (this.tagNo1 === 7) { + // this.$set(this.tempExecutorRow,'executor',val.username) + // } } if (this.tagNo === 133) { //this.tempPartRow.newPartNo = val.part_no @@ -3217,6 +3223,9 @@ this.modalData.faiOperatorId = val.username this.modalData.faiOperatorName = val.user_display } + if (this.tagNo === 2010) { + this.$set(this.tempExecutorRow,'executor',val.username) + } }, // 申请人输入校验 diff --git a/src/views/modules/common/Chooselist.vue b/src/views/modules/common/Chooselist.vue index 465e6f8..de9540e 100644 --- a/src/views/modules/common/Chooselist.vue +++ b/src/views/modules/common/Chooselist.vue @@ -196,8 +196,8 @@ export default { if (this.param3) { sql += " and active like '%" + this.param3 + "%'" } - let tagNoList = [120, 121, 93, 102, 22] - if (this.tagNo <1000 && !tagNoList.includes(this.tagNo)) { + let tagNoList = [120, 121, 93, 102, 22, 103] + if (this.tagNo < 1000 && !tagNoList.includes(this.tagNo)) { if (this.param4) { sql += " and site=" + "'" + this.param4 + "'" }