diff --git a/src/views/modules/rohs/rohsRecord.vue b/src/views/modules/rohs/rohsRecord.vue index 39a1354..6473f0a 100644 --- a/src/views/modules/rohs/rohsRecord.vue +++ b/src/views/modules/rohs/rohsRecord.vue @@ -30,8 +30,11 @@ + + + @@ -39,7 +42,9 @@ - + + + @@ -48,8 +53,10 @@ - + + + @@ -84,10 +91,10 @@ :close-on-click-modal="false" :showClose="false"> - + -
+
申请人/Applicant @@ -127,11 +134,10 @@ - - - - - + + PM人员/PM + + @@ -141,18 +147,19 @@ - - - - - + + + + + + - NPD工程师/NPD Engineer - - + 商品组1 / Comm Group 1 + + @@ -162,11 +169,23 @@ - - + + 商品组2 / Comm Group 2 + + - - + + + + + + + + + + 商品组3 / Comm Group 3 + + @@ -177,9 +196,9 @@ - 技术计划/Technical Plan - - + NPD工程师/NPD Engineer + + @@ -189,10 +208,11 @@ - - 采购/Buyer - - + + + + + @@ -201,6 +221,18 @@ 上传附件 + + + 技术计划/Technical Plan + + + + + 采购/Buyer + + + + @@ -219,23 +251,31 @@ -
+
- - - - + + + + + + + + + + + + A类 @@ -259,7 +299,7 @@ -
+
@@ -273,12 +313,17 @@ + + + + +
-
+
@@ -360,12 +405,25 @@ + + PM人员/PM + + + + + + + + + + + @@ -392,9 +450,6 @@ - - - @@ -406,6 +461,27 @@ + + + 商品组1 / Comm Group 1 + + + + + + + 商品组2 / Comm Group 2 + + + + + + + 商品组3 / Comm Group 3 + + + + NPD工程师/NPD Engineer @@ -469,13 +545,26 @@
- - - - - - - + + + + + + + + + + + + + + + + + + + +
@@ -484,7 +573,12 @@
- + + + + + +
@@ -645,8 +739,12 @@ export default { site: 'DEFAULT', referenceNo: '', applicant: '', + pm: '', + pmName: '', applicationDate: '', process: '', + plannedMassProductionDate: '', + color: '', vendorCode: '', vendorMaterialCode: '', materialClassify: '', @@ -654,7 +752,12 @@ export default { materialUseFor: '', endCustomer: '', projectId: '', - isMacallanMaterial: '', + commGroup1: '', + commGroup1Desc: '', + commGroup2: '', + commGroup2Desc: '', + commGroup3: '', + commGroup3Desc: '', needCreateNumber: '', npdEngineer: '', materialValidityTime: '', @@ -676,9 +779,12 @@ export default { expiredDate: '', fiberInformation: '', hsfStandard: '', + validUntil: '', isMeetRohsRequirement: '', + isAhGrade: '', hsfSupplierClassification: '', materialDesc: '', + npdRemark: '', isSameMaterialDiffSize: '', ifsPartNo: '', createBy2: '', @@ -824,6 +930,11 @@ export default { } else { setName('applicantName', '') } + if (this.currentRow.pm) { + tasks.push(this.queryUserDisplayName(this.currentRow.pm, site, 103).then(name => setName('pmName', name))) + } else { + setName('pmName', '') + } if (this.currentRow.npdEngineer) { tasks.push(this.queryUserDisplayName(this.currentRow.npdEngineer, site, 103).then(name => setName('npdEngineerName', name))) } else { @@ -849,6 +960,21 @@ export default { } else { setName('projectName', '') } + if (this.currentRow.commGroup1) { + tasks.push(this.queryCommGroupDisplayName(site, this.currentRow.commGroup1, 110).then(name => setName('commGroup1Desc', name))) + } else { + setName('commGroup1Desc', '') + } + if (this.currentRow.commGroup2) { + tasks.push(this.queryCommGroupDisplayName(site, this.currentRow.commGroup2, 111).then(name => setName('commGroup2Desc', name))) + } else { + setName('commGroup2Desc', '') + } + if (this.currentRow.commGroup3) { + tasks.push(this.queryCommGroupDisplayName(site, this.currentRow.commGroup3, 130).then(name => setName('commGroup3Desc', name))) + } else { + setName('commGroup3Desc', '') + } if (tasks.length > 0) { Promise.all(tasks).catch(() => {}) } @@ -901,6 +1027,23 @@ export default { return '' }) }, + queryCommGroupDisplayName (site, commGroup, tagno) { + if (!commGroup) { + return Promise.resolve('') + } + let tempData = { + tagno: tagno, + conditionSql: " and product_group_id = '" + commGroup + "'" + " and site = '" + site + "'" + } + return verifyData(tempData).then(({data}) => { + if (data && data.code === 0 && data.baseListData && data.baseListData.length > 0) { + return data.baseListData[0].product_group_name || '' + } + return '' + }).catch(() => { + return '' + }) + }, refreshCurrentTabTable () { if (this.activeTable === 'approvalInformation') { this.getApprovalList() @@ -1029,11 +1172,15 @@ export default { this.$set(this.modalData, 'materialClassifyList', this.modalData.materialClassify ? this.modalData.materialClassify.split(';').filter(item => item) : []) // Initialize names for display if needed this.$set(this.modalData, 'applicantName', '') + this.$set(this.modalData, 'pmName', '') this.$set(this.modalData, 'buyerName', '') this.$set(this.modalData, 'npdEngineerName', '') this.$set(this.modalData, 'technicalPlanName', '') this.$set(this.modalData, 'endCustomerName', '') this.$set(this.modalData, 'projectName', '') + this.$set(this.modalData, 'commGroup1Desc', '') + this.$set(this.modalData, 'commGroup2Desc', '') + this.$set(this.modalData, 'commGroup3Desc', '') // 编辑时允许重新选择客户和项目 this.$set(this.modalData, 'endCustomerFlag', false) this.$set(this.modalData, 'projectIdFlag', !this.modalData.endCustomer) @@ -1044,9 +1191,13 @@ export default { // Try to trigger verify data on open to fetch names this.applicantBlur(103) + this.pmBlur(103) this.buyerBlur(2000) this.npdEngineerBlur(103) this.technicalPlanBlur(103) + this.commGroup1Blur(110) + this.commGroup2Blur(111) + this.commGroup3Blur(130) this.handleQueryCustomer() this.handleQueryProjectByCustomer() this.loadModalButtonCondition() @@ -1062,8 +1213,12 @@ export default { referenceNo: tempReferenceNo, applicant: '', applicantName: '', + pm: '', + pmName: '', applicationDate: '', process: '', + plannedMassProductionDate: '', + color: '', vendorCode: '', vendorMaterialCode: '', materialClassify: '', @@ -1076,7 +1231,12 @@ export default { projectId: '', projectName: '', projectIdFlag: true, - isMacallanMaterial: '', + commGroup1: '', + commGroup1Desc: '', + commGroup2: '', + commGroup2Desc: '', + commGroup3: '', + commGroup3Desc: '', needCreateNumber: '', npdEngineer: '', npdEngineerName: '', @@ -1100,9 +1260,12 @@ export default { expiredDate: '', fiberInformation: '', hsfStandard: '', + validUntil: '', isMeetRohsRequirement: '', + isAhGrade: '', hsfSupplierClassification: '', materialDesc: '', + npdRemark: '', isSameMaterialDiffSize: '', ifsPartNo: '', createBy2: '', @@ -1248,6 +1411,8 @@ export default { strVal = this.modalData.npdEngineer } else if (type === 4) { strVal = this.modalData.technicalPlan + } else if (type === 5) { + strVal = this.modalData.pm } conSql = " and b.site = '" + this.$store.state.user.site + "'" } @@ -1255,6 +1420,15 @@ export default { strVal = this.modalData.buyer conSql = " and b.site = '" + this.$store.state.user.site + "'" } + if (val === 110) { + strVal = this.modalData.commGroup1 + } + if (val === 111) { + strVal = this.modalData.commGroup2 + } + if (val === 130) { + strVal = this.modalData.commGroup3 + } this.$refs.baseList.init(val, strVal, conSql) }) }, @@ -1284,8 +1458,23 @@ export default { } else if (this.tagNo1 === 4) { this.modalData.technicalPlan = val.username this.modalData.technicalPlanName = val.user_display + } else if (this.tagNo1 === 5) { + this.modalData.pm = val.username + this.modalData.pmName = val.user_display } } + if (this.tagNo === 110) { + this.modalData.commGroup1 = val.product_group_id + this.modalData.commGroup1Desc = val.product_group_name + } + if (this.tagNo === 111) { + this.modalData.commGroup2 = val.product_group_id + this.modalData.commGroup2Desc = val.product_group_name + } + if (this.tagNo === 130) { + this.modalData.commGroup3 = val.product_group_id + this.modalData.commGroup3Desc = val.product_group_name + } if (this.tagNo === 2000) { this.modalData.buyer = val.username this.modalData.buyerName = val.user_display @@ -1423,6 +1612,27 @@ export default { this.modalData.applicantName = '' } }, + // PM输入校验 + pmBlur (tagNo) { + if (this.modalData.pm != null && this.modalData.pm !== '') { + let tempData = { + tagno: tagNo, + conditionSql: " and a.username = '" + this.modalData.pm + "'" + " and b.site = '" + this.$store.state.user.site + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0) { + if (data.baseListData.length > 0) { + this.modalData.pm = data.baseListData[0].username + this.modalData.pmName = data.baseListData[0].user_display + return + } + } + this.modalData.pmName = '' + }) + } else { + this.modalData.pmName = '' + } + }, // NPD工程师输入校验 npdEngineerBlur (tagNo) { if (this.modalData.npdEngineer != null && this.modalData.npdEngineer !== '') { @@ -1485,6 +1695,63 @@ export default { } else { this.modalData.buyerName = '' } + }, + // 商品组1输入校验 + commGroup1Blur (tagNo) { + if (this.modalData.commGroup1 != null && this.modalData.commGroup1 !== '') { + let tempData = { + tagno: tagNo, + conditionSql: " and product_group_id = '" + this.modalData.commGroup1 + "'" + " and site = '" + this.$store.state.user.site + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0 && data.baseListData.length > 0) { + this.modalData.commGroup1 = data.baseListData[0].product_group_id + this.modalData.commGroup1Desc = data.baseListData[0].product_group_name + } else { + this.modalData.commGroup1Desc = '' + } + }) + } else { + this.modalData.commGroup1Desc = '' + } + }, + // 商品组2输入校验 + commGroup2Blur (tagNo) { + if (this.modalData.commGroup2 != null && this.modalData.commGroup2 !== '') { + let tempData = { + tagno: tagNo, + conditionSql: " and product_group_id = '" + this.modalData.commGroup2 + "'" + " and site = '" + this.$store.state.user.site + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0 && data.baseListData.length > 0) { + this.modalData.commGroup2 = data.baseListData[0].product_group_id + this.modalData.commGroup2Desc = data.baseListData[0].product_group_name + } else { + this.modalData.commGroup2Desc = '' + } + }) + } else { + this.modalData.commGroup2Desc = '' + } + }, + // 商品组3输入校验 + commGroup3Blur (tagNo) { + if (this.modalData.commGroup3 != null && this.modalData.commGroup3 !== '') { + let tempData = { + tagno: tagNo, + conditionSql: " and product_group_id = '" + this.modalData.commGroup3 + "'" + " and site = '" + this.$store.state.user.site + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0 && data.baseListData.length > 0) { + this.modalData.commGroup3 = data.baseListData[0].product_group_id + this.modalData.commGroup3Desc = data.baseListData[0].product_group_name + } else { + this.modalData.commGroup3Desc = '' + } + }) + } else { + this.modalData.commGroup3Desc = '' + } } } }