@ -339,7 +339,7 @@
< / e l - f o r m - i t e m >
< el -form -item prop = "itemNo" :rules ="rules.itemNo" >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(219)" > < a herf = "#" > 属性模板 < / a > < / span >
< el -input v-model ="ptmModalData.itemNo" disabled @blur="modelBlur(219)" style="width: 110px" > < / el -input >
< el -input v-model ="ptmModalData.itemNo" @blur="modelBlur(219)" style="width: 110px" > < / el -input >
< el -input v-model ="ptmModalData.itemDesc" disabled style="width: 300px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -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 {
/ / t h i s . t e m p C o d e N o = t h i s . p t m M o d a l D a t a . i t e m N o
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 ) {
/ / 刷 新 列 表 数 据