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) { // 刷新列表数据