From 62b6c5795dfc20789c1a1650b4b0fd02c88a7880 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Wed, 14 May 2025 16:49:44 +0800
Subject: [PATCH] =?UTF-8?q?2025-05-14=204=E3=80=81ECN=E6=89=A7=E8=A1=8C?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=E5=90=8E=EF=BC=8C=E6=89=A7=E8=A1=8C=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E6=B2=A1=E6=9C=89=E5=86=99=E5=85=A5=205=E3=80=81ECN?=
=?UTF-8?q?=E4=BC=9A=E7=AD=BE=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E4=B8=80?=
=?UTF-8?q?=E4=B8=AA=E4=BC=9A=E7=AD=BE=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/changeManagement/changeRecord.vue | 354 ++++++++++++++----
.../processManagement/processFlowInfo.vue | 1 +
2 files changed, 272 insertions(+), 83 deletions(-)
diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue
index 5acb07e..58af87d 100644
--- a/src/views/modules/changeManagement/changeRecord.vue
+++ b/src/views/modules/changeManagement/changeRecord.vue
@@ -746,6 +746,161 @@
+
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row[item.columnProp]}}
+
+
+
+
+
+
+
+
{
+ const value = item[this.plmChangeRequestDetailArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ // 如果没有值 且该字段为必填
+ if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeCostImpactArr) {
+ if (this.plmChangeCostImpactArr) { // 库存成本影响
for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
- if (!this.modalData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
+ if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeFAItemArr) {
+ if (this.plmChangeFAItemArr) { // 评估信息
for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
- if (!this.modalData[this.plmChangeFAItemArr[i].fieldId] && this.plmChangeFAItemArr[i].required === 'Y') {
+ let val = this.chooseItemList2.every(item => {
+ const value = item[this.plmChangeFAItemArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
return
}
@@ -3564,29 +3700,36 @@
}
if (this.plmChangeExecutionInfoArr) {
for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
- if (!this.modalData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
+ if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeItemArr) {
+ if (this.plmChangeItemArr) { // 执行信息
for (let i = 0; i < this.plmChangeItemArr.length; i++) {
- if (!this.modalData[this.plmChangeItemArr[i].fieldId] && this.plmChangeItemArr[i].required === 'Y') {
+ let val = this.chooseItemList.every(item => {
+ const value = item[this.plmChangeItemArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ if (!val && this.plmChangeItemArr[i].required === 'Y') {
this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeCountersignatureItemArr) {
+ if (this.plmChangeCountersignatureItemArr) { // 会签信息
for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
- if (!this.modalData[this.plmChangeCountersignatureItemArr[i].fieldId] && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
+ let val = this.currentChooseCSItemList.every(item => {
+ const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
return
}
}
}
-
if (this.chooseDataList.length === 0) {
this.$message.warning('请添加需要变更的技术参数卡!')
return
@@ -3731,6 +3874,21 @@
})
},
+ tpExecutionInfoSearch2 () {
+ executionInfoSearch(this.currentRow).then(({data}) => {
+ if (data && data.code === 0) {
+ this.currentExecutionInfoData = data.rows.executionInfoData
+ this.currentExecutionInfoData.createBy = this.$store.state.user.name
+ this.currentChooseItemList = data.rows.chooseItemList
+ this.currentChooseItemList2 = data.rows.chooseItemList2
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
// 查询会签信息
countersignatureSearch () {
countersignatureSearch(this.modalData).then(({data}) => {
@@ -3744,6 +3902,18 @@
})
},
+ countersignatureSearch2 () {
+ countersignatureSearch(this.currentRow).then(({data}) => {
+ if (data && data.code === 0) {
+ this.currentChooseCSItemList = data.rows.chooseCSItemList
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
// 删除所选技术参数卡
deleteChooseDataModal (row) {
this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
@@ -4057,7 +4227,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- if (this.plmChangeRequestArr) {
+ 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 + '不能为空!')
@@ -4065,25 +4235,35 @@
}
}
}
- if (this.plmChangeRequestDetailArr) {
+ if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
- if (!this.modalData[this.plmChangeRequestDetailArr[i].fieldId] && this.plmChangeRequestDetailArr[i].required === 'Y') {
+ // 判断集合中的该属性是否都有值
+ let val = this.chooseDataList.every(item => {
+ const value = item[this.plmChangeRequestDetailArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ // 如果没有值 且该字段为必填
+ if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeCostImpactArr) {
+ if (this.plmChangeCostImpactArr) { // 库存成本影响
for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
- if (!this.modalData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
+ if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeFAItemArr) {
+ if (this.plmChangeFAItemArr) { // 评估信息
for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
- if (!this.modalData[this.plmChangeFAItemArr[i].fieldId] && this.plmChangeFAItemArr[i].required === 'Y') {
+ let val = this.chooseItemList2.every(item => {
+ const value = item[this.plmChangeFAItemArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
return
}
@@ -4091,23 +4271,31 @@
}
if (this.plmChangeExecutionInfoArr) {
for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
- if (!this.modalData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
+ if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeItemArr) {
+ if (this.plmChangeItemArr) { // 执行信息
for (let i = 0; i < this.plmChangeItemArr.length; i++) {
- if (!this.modalData[this.plmChangeItemArr[i].fieldId] && this.plmChangeItemArr[i].required === 'Y') {
+ let val = this.chooseItemList.every(item => {
+ const value = item[this.plmChangeItemArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ if (!val && this.plmChangeItemArr[i].required === 'Y') {
this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
return
}
}
}
- if (this.plmChangeCountersignatureItemArr) {
+ if (this.plmChangeCountersignatureItemArr) { // 会签信息
for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
- if (!this.modalData[this.plmChangeCountersignatureItemArr[i].fieldId] && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
+ let val = this.currentChooseCSItemList.every(item => {
+ const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
+ return value !== null && value !== ''
+ })
+ if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
return
}
@@ -4117,6 +4305,8 @@
this.$message.warning('请添加需要变更的技术参数卡!')
return
}
+ row.executeFlag = 'Y'
+ row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
this.costImpactData.changeTotalCost = this.totalCost
this.executionInfoData.chooseItemList = this.chooseItemList
this.executionInfoData.chooseItemList2 = this.chooseItemList2
@@ -4137,19 +4327,17 @@
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: '确定'
})
+ row.executeFlag = ''
+ row.itemExecutionDate = ''
}
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/, '')
diff --git a/src/views/modules/processManagement/processFlowInfo.vue b/src/views/modules/processManagement/processFlowInfo.vue
index 7dd23bd..4572516 100644
--- a/src/views/modules/processManagement/processFlowInfo.vue
+++ b/src/views/modules/processManagement/processFlowInfo.vue
@@ -27,6 +27,7 @@
+