|
|
|
@ -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) { |
|
|
|
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/, '') |
|
|
|
// row.executor = this.$store.state.user.name |
|
|
|
// 执行时调用同意提交方法 |
|
|
|
if (this.modalData.changeStatus === '审批中') { |
|
|
|
this.agreeSubmit() |
|
|
|
} 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 |
|
|
|
// // 执行时调用同意提交方法 // 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) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 申请人输入校验 |
|
|
|
|