Browse Source

2025-04-15

变更单执行人优化
master
fengyuan_yang 9 months ago
parent
commit
398be7a473
  1. 126
      src/views/modules/changeManagement/changeRecord.vue
  2. 19
      src/views/modules/changeManagement/changeRequest.vue
  3. 2
      src/views/modules/common/Chooselist.vue

126
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) {
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)
}
},
//

19
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)
}
},
//

2
src/views/modules/common/Chooselist.vue

@ -196,7 +196,7 @@ export default {
if (this.param3) {
sql += " and active like '%" + this.param3 + "%'"
}
let tagNoList = [120, 121, 93, 102, 22]
let tagNoList = [120, 121, 93, 102, 22, 103]
if (this.tagNo < 1000 && !tagNoList.includes(this.tagNo)) {
if (this.param4) {
sql += " and site=" + "'" + this.param4 + "'"

Loading…
Cancel
Save