From 1a60076e21142e02b2bf09e88ea261cb7866aaf2 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 14 Jun 2024 09:17:14 +0800 Subject: [PATCH] =?UTF-8?q?2024-06-14=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/changeManagement/changeRecord.vue | 419 +++++++++++++++++- .../changeManagement/changeRequest.vue | 58 ++- .../processManagement/processBindingInfo.vue | 5 +- 3 files changed, 470 insertions(+), 12 deletions(-) diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index f1b3cca..955f3f8 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -373,6 +373,7 @@
+ 选择评估信息
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- + 选择执行信息
+ 选择会签信息
- +
@@ -819,6 +821,128 @@ + + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ + + +
+ + + + + + + + + + + + + + + 查询 + + + + + + + + + +
+ + 确认 + 关闭 + +
+ @@ -1139,6 +1263,20 @@ itemDesc: '', codeNo: '' }, + chooseModelData2: { + site: this.$store.state.user.site, + functionType: 'ECN', + itemNo: '', + itemDesc: '', + codeNo: '' + }, + chooseCSModelData: { + site: this.$store.state.user.site, + functionType: 'ECN', + itemNo: '', + itemDesc: '', + codeNo: '' + }, countersignatureData: { site: this.$store.state.user.site, changeNo: '', @@ -1156,7 +1294,11 @@ chooseDataList: [], form: [], modelList: [], + modelList2: [], + modelCSList: [], itemList: [], + itemList2: [], + itemCSList: [], chooseFileList: [], // ======== 列表表头 ======== columnList: [ @@ -1709,6 +1851,64 @@ columnWidth: 150 }, ], + columnItemList2: [ + { + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + ], + columnCSItemList: [ + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table5ItemNo', + tableId: '108001Table5', + tableName: '执行属性表', + columnProp: 'itemNo', + headerAlign: 'center', + align: 'center', + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, + { + userId: this.$store.state.user.name, + functionId: 108001, + serialNumber: '108001Table5ItemDesc', + tableId: '108001Table5', + tableName: '执行属性表', + columnProp: 'itemDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 150 + }, + ], columnCSChooseItemList: [ { userId: this.$store.state.user.name, @@ -1931,6 +2131,8 @@ modalDisableFlag: false, ecnTypeModalFlag: false, chooseModelFlag: false, + chooseModelFlag2: false, + chooseCSModelFlag: false, uploadDialog: false, submitModalFlag: false } @@ -1977,11 +2179,190 @@ created () { this.getEcnModel() + this.getEcnModel2() + this.getEcnCSModel() }, methods: { + // 查询ECN的评估模板 + getEcnModel2 () { + let tempData = { + site: this.$store.state.user.site, + functionType: 'ECN', + codeNo: 'E002' + } + getEcnModel(tempData).then(({data}) => { + if (data.code === 0) { + this.modelList2 = data.rows + } + }) + }, + + // 查询会签的模板 + getEcnCSModel () { + let tempData = { + site: this.$store.state.user.site, + functionType: 'ECN', + codeNo: 'E003' + } + getEcnModel(tempData).then(({data}) => { + if (data.code === 0) { + this.modelCSList = data.rows + } + }) + }, + + // 选择模板属性 + chooseFeasibilityAssessmentModel () { + this.chooseModelData2 = { + site: this.$store.state.user.site, + itemNo: '', + itemDesc: '', + functionType: 'ECN', + codeNo: this.modelList2.length > 0 ? this.modelList2[0].codeNo : '' + } + // 先清空缓存选中 + //this.$nextTick(() => this.$refs.itemTable2.clearSelection()) + getItemList(this.chooseModelData2).then(({data}) => { + if (data && data.code === 0) { + this.itemList2 = data.rows + this.itemList2.forEach(val => { + // 回显选中 + if (this.chooseItemList2.map(val => val.itemNo).includes(val.itemNo)) { + this.$nextTick(() => this.$refs.itemTable2.toggleRowSelection(val, true)) + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + this.chooseModelFlag2 = true + }, + + // 选择会签模板属性 + chooseCSModel () { + this.chooseCSModelData = { + site: this.$store.state.user.site, + itemNo: '', + itemDesc: '', + functionType: 'ECN', + codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : '' + } + // 先清空缓存选中 + this.$nextTick(() => this.$refs.itemCSTable.clearSelection()) + // 查询所有属性 + getItemList(this.chooseCSModelData).then(({data}) => { + if (data && data.code === 0) { + this.itemCSList = data.rows + this.itemCSList.forEach(val => { + // 回显选中的部门 + if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) { + this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true)) + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + this.chooseCSModelFlag = true + }, + + // 确认多选属性 + confirmItem2 () { + if (this.itemSelections2.length === 0) { + this.$message.warning("请勾选属性!") + return + } + // 临时集合 + let temp = [] + // 首先,遍历a,检查每个对象的名字是否在b中也存在 + this.chooseItemList2.forEach(itemA => { + if (this.itemSelections2.some(itemB => itemB.itemNo === itemA.itemNo)) { + // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象) + temp.push(itemA) + } + }) + // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中 + this.itemSelections2.forEach(itemB => { + if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) { + // 如果b中的对象名字不在结果中,则添加到结果中 + temp.push(itemB) + } + }) + this.chooseItemList2 = temp + this.chooseModelFlag2 = false + }, + + // 确认多选CS属性 + confirmCSItem () { + if (this.itemCSSelections.length === 0) { + this.$message.warning("请勾选属性!") + return + } + // 临时集合 + let temp = [] + // 首先,遍历a,检查每个对象的名字是否在b中也存在 + this.chooseCSItemList.forEach(itemA => { + if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) { + // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象) + temp.push(itemA) + } + }) + // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中 + this.itemCSSelections.forEach(itemB => { + if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) { + // 如果b中的对象名字不在结果中,则添加到结果中 + temp.push(itemB) + } + }) + this.chooseCSItemList = temp + this.chooseCSModelFlag = false + }, + + // 查询属性 + searchItemList2 () { + getItemList(this.chooseModelData2).then(({data}) => { + if (data.code === 0) { + this.itemList2 = data.rows + } + }) + }, + + // 查询CS属性 + searchCSItemList () { + getItemList(this.chooseCSModelData).then(({data}) => { + if (data.code === 0) { + this.itemCSList = data.rows + } + }) + }, + + // 单机选择 + itemClickRow2 (row) { + this.$refs.itemTable2.toggleRowSelection(row) + }, + + // 单击选择 + itemCSClickRow (row) { + this.$refs.itemCSTable.toggleRowSelection(row) + }, + + // 复选属性 + selectionItem2 (val) { + this.itemSelections2 = val + }, + + // 复选CS属性 + selectionCSItem (val) { + this.itemCSSelections = val + }, + // 获取流程的配置权限 async getNodeAuthority (row) { let tempData = { @@ -1998,6 +2379,7 @@ this.plmChangeFAItemArr = data.rows.plm_change_FA_item this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info this.plmChangeItemArr = data.rows.plm_change_item + this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item } }) }, @@ -2523,6 +2905,14 @@ } } } + 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 + } + } + } this.costImpactData.changeTotalCost = this.totalCost this.executionInfoData.chooseItemList = this.chooseItemList this.executionInfoData.chooseItemList2 = this.chooseItemList2 @@ -2577,7 +2967,8 @@ getEcnModel () { let tempData = { site: this.$store.state.user.site, - functionType: 'ECN' + functionType: 'ECN', + codeNo: 'E001' } getEcnModel(tempData).then(({data}) => { if (data.code === 0) { @@ -2884,10 +3275,10 @@ itemNo: '', itemDesc: '', functionType: 'ECN', - codeNo: this.chooseItemList.length > 0 ? this.chooseItemList[0].codeNo : this.modelList.length > 0 ? this.modelList[0].codeNo : '' + codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : '' } // 先清空缓存选中 - this.$nextTick(() => this.$refs.itemTable.clearSelection()) + //this.$nextTick(() => this.$refs.itemTable.clearSelection()) // 查询所有属性 getItemList(this.chooseModelData).then(({data}) => { if (data && data.code === 0) { @@ -2932,7 +3323,23 @@ this.$message.warning("请勾选属性!") return } - this.chooseItemList = this.itemSelections + // 临时集合 + let temp = [] + // 首先,遍历a,检查每个对象的名字是否在b中也存在 + this.chooseItemList.forEach(itemA => { + if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) { + // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象) + temp.push(itemA) + } + }) + // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中 + this.itemSelections.forEach(itemB => { + if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) { + // 如果b中的对象名字不在结果中,则添加到结果中 + temp.push(itemB) + } + }) + this.chooseItemList = temp this.chooseModelFlag = false }, diff --git a/src/views/modules/changeManagement/changeRequest.vue b/src/views/modules/changeManagement/changeRequest.vue index b268785..8d9ef24 100644 --- a/src/views/modules/changeManagement/changeRequest.vue +++ b/src/views/modules/changeManagement/changeRequest.vue @@ -522,7 +522,7 @@
- 选择会签模板 + 选择会签信息
{ + if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) { + // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象) + temp.push(itemA) + } + }) + // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中 + this.itemSelections.forEach(itemB => { + if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) { + // 如果b中的对象名字不在结果中,则添加到结果中 + temp.push(itemB) + } + }) + this.chooseItemList = temp this.chooseModelFlag = false }, @@ -2471,7 +2487,23 @@ this.$message.warning("请勾选属性!") return } - this.chooseItemList2 = this.itemSelections2 + // 临时集合 + let temp = [] + // 首先,遍历a,检查每个对象的名字是否在b中也存在 + this.chooseItemList2.forEach(itemA => { + if (this.itemSelections2.some(itemB => itemB.itemNo === itemA.itemNo)) { + // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象) + temp.push(itemA) + } + }) + // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中 + this.itemSelections2.forEach(itemB => { + if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) { + // 如果b中的对象名字不在结果中,则添加到结果中 + temp.push(itemB) + } + }) + this.chooseItemList2 = temp this.chooseModelFlag2 = false }, @@ -2541,7 +2573,7 @@ codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : '' } // 先清空缓存选中 - this.$nextTick(() => this.$refs.itemCSTable.clearSelection()) + // this.$nextTick(() => this.$refs.itemCSTable.clearSelection()) // 查询所有属性 getItemList(this.chooseCSModelData).then(({data}) => { if (data && data.code === 0) { @@ -2586,7 +2618,23 @@ this.$message.warning("请勾选属性!") return } - this.chooseCSItemList = this.itemCSSelections + // 临时集合 + let temp = [] + // 首先,遍历a,检查每个对象的名字是否在b中也存在 + this.chooseCSItemList.forEach(itemA => { + if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) { + // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象) + temp.push(itemA) + } + }) + // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中 + this.itemCSSelections.forEach(itemB => { + if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) { + // 如果b中的对象名字不在结果中,则添加到结果中 + temp.push(itemB) + } + }) + this.chooseCSItemList = temp this.chooseCSModelFlag = false }, diff --git a/src/views/modules/processManagement/processBindingInfo.vue b/src/views/modules/processManagement/processBindingInfo.vue index c5ef113..c7f615b 100644 --- a/src/views/modules/processManagement/processBindingInfo.vue +++ b/src/views/modules/processManagement/processBindingInfo.vue @@ -1191,7 +1191,10 @@ this.queryTableParam = { tableType: 'plm_stepRole_base_bm', passTable: [], - addTable: ['plm_technical_specification_sheet'] + addTable: [ + 'plm_technical_specification_sheet', + 'plm_technicalSpecification_team' + ] } } else { return