Browse Source

2026-01-30

工程变更申请单人多条的问题,点击执行/会签会将执行/会签人相同的信息一并处理(标识和时间赋值)
master
fengyuan_yang 8 months ago
parent
commit
86e37cdfc3
  1. 55
      src/views/modules/changeManagement/changeRecord.vue

55
src/views/modules/changeManagement/changeRecord.vue

@ -4756,8 +4756,16 @@
this.$message.warning('请添加需要变更的技术参数卡!')
return
}
row.executeFlag = 'Y'
row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
// 获取当前执行时间
const executionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
// 获取当前行的执行人
const currentExecutor = row.executor
// 找出所有执行人相同的行,一起更新执行标识和执行时间
const sameExecutorRows = this.chooseItemList.filter(item => item.executor === currentExecutor && item.executeFlag !== 'Y')
sameExecutorRows.forEach(item => {
item.executeFlag = 'Y'
item.itemExecutionDate = executionDate
})
this.costImpactData.changeTotalCost = this.totalCost
this.executionInfoData.chooseItemList = this.chooseItemList
this.executionInfoData.chooseItemList2 = this.chooseItemList2
@ -4783,21 +4791,22 @@
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
row.executeFlag = ''
row.itemExecutionDate = ''
// 回滚:清除所有相同执行人的执行标识和时间
sameExecutorRows.forEach(item => {
item.executeFlag = ''
item.itemExecutionDate = ''
})
}
this.submitLoading = false
}).catch(()=>{
// 回滚:清除所有相同执行人的执行标识和时间
sameExecutorRows.forEach(item => {
item.executeFlag = ''
item.itemExecutionDate = ''
})
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()
// }
},
// 执行所选属性
@ -4885,8 +4894,16 @@
this.$message.warning('请添加需要变更的技术参数卡!')
return
}
row.executeFlag = 'Y'
row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
// 获取当前会签时间
const executionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
// 获取当前行的会签人(itemDesc 字段)
const currentCountersigner = row.itemDesc
// 找出所有会签人相同的行,一起更新会签标识和会签时间
const sameCountersignerRows = this.chooseCSItemList.filter(item => item.itemDesc === currentCountersigner && item.executeFlag !== 'Y')
sameCountersignerRows.forEach(item => {
item.executeFlag = 'Y'
item.itemExecutionDate = executionDate
})
this.costImpactData.changeTotalCost = this.totalCost
this.executionInfoData.chooseItemList = this.chooseItemList
this.executionInfoData.chooseItemList2 = this.chooseItemList2
@ -4912,11 +4929,19 @@
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
row.executeFlag = ''
row.itemExecutionDate = ''
// 回滚:清除所有相同会签人的会签标识和时间
sameCountersignerRows.forEach(item => {
item.executeFlag = ''
item.itemExecutionDate = ''
})
}
this.submitLoading = false
}).catch(()=>{
// 回滚:清除所有相同会签人的会签标识和时间
sameCountersignerRows.forEach(item => {
item.executeFlag = ''
item.itemExecutionDate = ''
})
this.submitLoading = false
})
})

Loading…
Cancel
Save