From 9a5f81dc8e6788c9fe2af815e5bd58ab21a4ebbc Mon Sep 17 00:00:00 2001 From: yuejiayang <146344614+YangLei105@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:19:13 +0800 Subject: [PATCH] =?UTF-8?q?2024.9.18=20=E4=B8=80=E3=80=81=E7=89=A9?= =?UTF-8?q?=E6=96=99=E6=88=90=E6=9C=AC=E4=BF=A1=E6=81=AF=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=EF=BC=88=E7=AC=AC=E4=BA=8C=E7=89=88=EF=BC=89=20=E4=BA=8C?= =?UTF-8?q?=E3=80=81=E5=8A=A0=E5=B7=A5=E4=B8=AD=E5=BF=83=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=94=B9=E9=80=A0=20=E4=B8=89=E3=80=81=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=B7=A5=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=BA=8C=E7=89=88=EF=BC=89?= =?UTF-8?q?=20=E5=9B=9B=E3=80=81=E5=95=86=E5=93=81=E7=BB=84=20-=20?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=B7=A5=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E7=89=88=EF=BC=89=20=E4=BA=94=E3=80=81=E5=95=86=E5=93=81?= =?UTF-8?q?=E7=BB=84=20-=20Process=20Time=20Matrix=EF=BC=88=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E7=89=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/part/partCostInformation.vue | 4 +- .../part/partProductGroupInformation.vue | 48 +++++++++++++++++-- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/views/modules/part/partCostInformation.vue b/src/views/modules/part/partCostInformation.vue index a67da5e..16d3d52 100644 --- a/src/views/modules/part/partCostInformation.vue +++ b/src/views/modules/part/partCostInformation.vue @@ -569,7 +569,7 @@ export default { this.$message.warning("请选择BU!") return } else { - conSql = " and site = '" + this.modalData.bu.split('-')[0].replace(/^0+/, '') + "'" + conSql = " and site = '" + this.modalData.bu.split('-')[0] + "'" } this.$refs.baseList.init(val, strVal, conSql) }) @@ -648,7 +648,7 @@ export default { this.modalData = { id: row.id, partId: row.partId, - bu: row.sourceBu, + bu: row.site + '-' + row.sourceBu, site: row.site, buNo: row.sourceBu, buDesc: row.buDesc, diff --git a/src/views/modules/part/partProductGroupInformation.vue b/src/views/modules/part/partProductGroupInformation.vue index 89c8923..eba9691 100644 --- a/src/views/modules/part/partProductGroupInformation.vue +++ b/src/views/modules/part/partProductGroupInformation.vue @@ -339,7 +339,7 @@ 属性模板 - + @@ -450,6 +450,7 @@ import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table import Chooselist from '@/views/modules/common/Chooselist_eam' import {searchStandardRoutingOperationList} from "../../../api/part/standardRoutingOperation"; import {delProductGroupPtm, saveProductGroupPtm, searchProductGroupPtmCondition, searchProductGroupPtmConditionItemProcess,updatePtmConditionItemValue,updatePtmConditionProcessValue} from "../../../api/part/partProductGroupPtm"; +import {verifyData} from "../../../api/part/partInformation"; export default { components: { Chooselist @@ -466,6 +467,12 @@ export default { handler: function (newV, oldV) { this.modalData.productGroupId = this.modalData.productGroupId.toUpperCase() } + }, + ptmModalData: { + deep: true, + handler: function (newV, oldV) { + this.ptmModalData.itemNo = this.ptmModalData.itemNo.toUpperCase() + } } }, data () { @@ -1246,10 +1253,16 @@ export default { // this.tempCodeNo = this.ptmModalData.itemNo this.$nextTick(() => { let strVal = '' + let conSql = '' if (val === 219) { strVal = this.ptmModalData.itemNo } - this.$refs.baseList.init(val, strVal) + if (this.productGroupConditionCurrentRow.bu !== null && this.productGroupConditionCurrentRow.bu !== '' && this.productGroupConditionCurrentRow.bu !== undefined) { + conSql = " and site = '" + this.productGroupConditionCurrentRow.bu.split('_')[0] + "'" + " and bu_no = '" + this.productGroupConditionCurrentRow.bu.split('_')[1] + "'" + this.$refs.baseList.init(val, strVal, conSql) + } else { + this.$refs.baseList.init(val, strVal) + } }) }, /** @@ -1566,7 +1579,8 @@ export default { this.productGroupConditionCurrentRow = { conditionId: row.conditionId, site: row.site, - buNo: row.buNo + buNo: row.buNo, + bu: row.site + '_' + row.buNo, } this.searchProductGroupPtmConditionItemProcess() }, @@ -1581,7 +1595,6 @@ export default { if (this.productGroupPtmConditionList.length > 0) { this.$refs.conditionTable.setCurrentRow(this.productGroupPtmConditionList[0]) this.currentConditionChangeHandle(this.productGroupPtmConditionList[0]) - this.$refs.conditionTable.setCurrentRow(this.productGroupPtmConditionList[0]) } else { this.productGroupPtmConditionItemList = [] this.productGroupPtmConditionProcessList = [] @@ -1763,6 +1776,33 @@ export default { this.ptmConditionProcessUpdateFlag = false }, + // 属性输入校验 + modelBlur (tagNo) { + if (this.ptmModalData.itemNo != null && this.ptmModalData.itemNo !== '') { + let tempData = { + tagno: tagNo, + conditionSql: " and code_no = '" + this.ptmModalData.itemNo + "'" + " and site = '" + this.productGroupConditionCurrentRow.bu.split('_')[0] + "'" + " and bu_no = '" + this.productGroupConditionCurrentRow.bu.split('_')[1] + "'" + } + verifyData(tempData).then(({data}) => { + if (data && data.code === 0) { + if (data.baseListData.length > 0) { + this.ptmModalData.itemDesc = data.baseListData[0].code_desc + } else { + this.$alert('该属性模板不存在!', '错误', { + confirmButtonText: '确定' + }) + this.ptmModalData.itemNo = '' + this.ptmModalData.itemDesc = '' + } + } else { + this.$message.warning(data.msg) + this.ptmModalData.itemNo = '' + this.ptmModalData.itemDesc = '' + } + }) + } + }, + // 列表表格选择替换 tabClick (tab, event) { // 刷新列表数据