From 8b7e564bce80e3db613a050214547a92a829c84a Mon Sep 17 00:00:00 2001 From: ruanqi Date: Fri, 14 Jun 2024 11:10:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/partInformation.vue | 140 +++++++++++++++------ 1 file changed, 99 insertions(+), 41 deletions(-) diff --git a/src/views/modules/base/partInformation.vue b/src/views/modules/base/partInformation.vue index cccda1d..563ed53 100644 --- a/src/views/modules/base/partInformation.vue +++ b/src/views/modules/base/partInformation.vue @@ -176,16 +176,21 @@ + + 阶段 / Phase Code + + + 商品组1 / Comm Group 1 - - 产品大类 / Product Family - - - + + + + + @@ -728,42 +733,42 @@ - - - 新增 - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1486,6 +1491,8 @@ productGroupName3: '', productGroupId4: '', productGroupName4: '', + phaseCode:'', + phaseDescription:'', erpPartNo: '', codeNo: '', codeDesc: '', @@ -1724,6 +1731,22 @@ fixed: '', columnWidth: 100 }, + { + userId: this.$store.state.user.name, + functionId: 104001, + serialNumber: '104001Table1PhaseDescription', + tableId: '104001Table1', + tableName: '物料信息表', + columnProp: 'phaseDescription', + headerAlign: 'center', + align: 'center', + columnLabel: '阶段', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 80 + }, { userId: this.$store.state.user.name, functionId: 104001, @@ -2767,6 +2790,13 @@ ], // ======== 必填规则 ======== rules: { + phaseCode: [ + { + required: true, + message: ' ', + trigger: ['blur','change'] + } + ], partNo: [ { required: true, @@ -3543,6 +3573,8 @@ manufacturerName: '', agentId: '', agentName: '', + phaseCode:'', + phaseDescription:'', createBy: this.$store.state.user.name, typeDesignation: '', hazardCode: '', @@ -3646,6 +3678,8 @@ productGroupName3: row.productGroupName3, productGroupId4: row.productGroupId4, productGroupName4: row.productGroupName4, + phaseCode: row.phaseCode, + phaseDescription: row.phaseDescription, erpPartNo: row.erpPartNo, codeNo: row.codeNo, codeDesc: row.codeDesc, @@ -4350,6 +4384,10 @@ this.$message.warning('请选择属性模板!') return } + if (this.modalData.phaseCode === '' || this.modalData.phaseCode == null) { + this.$message.warning('请选择阶段!') + return + } if (this.modalData.flag === '1') { partInformationSave(this.modalData).then(({data}) => { if (data && data.code === 0) { @@ -4563,6 +4601,21 @@ } }, + phaseCodeBlur () { + if (this.modalData.phaseCode != null && this.modalData.phaseCode !== '') { + getChooselistData({"sqlcode": "select Phase_code, Phase_description from staging_code where Phase_code = '" + this.modalData.phaseCode + "'"}).then(({data}) => { + if (data && data.code === 0) { + if (data.baseListData.length > 0) { + this.modalData.phaseDescription = data.baseListData[0].Phase_description + } else { + this.modalData.phaseDescription = '' + } + } + }) + } + }, + + // 产品代码输入校验 groupIdBlur () { if (this.modalData.groupId != null && this.modalData.groupId !== '') { @@ -4877,6 +4930,8 @@ strVal = this.modalData.partCostGroupId } else if (val === 132) { strVal = this.modalData.planningMethod + } else if (val === 1005) { + strVal = this.modalData.phaseCode } this.$refs.baseList.init(val, strVal) }) @@ -4892,6 +4947,9 @@ } else if (this.tagNo === 108) { this.modalData.familyId = val.family_id this.modalData.familyName = val.family_name + } else if (this.tagNo === 1005) { + this.modalData.phaseCode = val.Phase_code + this.modalData.phaseDescription = val.Phase_description } else if (this.tagNo === 109) { this.modalData.groupId = val.group_id this.modalData.groupName = val.group_name