@ -417,10 +417,10 @@
< span v-if ="item.columnImage" > < img :src ="scope.row[item.columnProp]" style = "width: 100px; height: 80px" / > < / span >
< / div >
< div v-else >
< el -input v-model ="scope.row.machCycleTime" v-if="item.columnProp === 'machCycleTime'" @change="changeMachCycleTime(scope.row)" > < / el -input >
< el -input v-model ="scope.row.laborCycleTime" v-if="item.columnProp === 'laborCycleTime'" @change="changeLaborCycleTime(scope.row)" > < / el -input >
< el -input v-model ="scope.row.machRunFactor" v-if="item.columnProp === 'machRunFactor'" @change="changeMachRunFactor(scope.row)" > < / el -input >
< el -input v-model ="scope.row.laborRunFactor" v-if="item.columnProp === 'laborRunFactor'" > < / el -input >
< el -input v-model ="scope.row.laborCycleTime" v-if="item.columnProp === 'laborCycleTime'" > < / el -input >
< el -input v-model ="scope.row.machRunFactor" v-if="item.columnProp === 'machRunFactor'" > < / el -input >
< el -input v-model ="scope.row.machCycleTime" v-if="item.columnProp === 'machCycleTime'" > < / el -input >
< / div >
< / template >
< / e l - t a b l e - c o l u m n >
@ -860,10 +860,10 @@ export default {
{
userId : this . $store . state . user . name ,
functionId : 601006 ,
serialNumber : '601006Table2Labor CycleTime' ,
serialNumber : '601006Table2Mach CycleTime' ,
tableId : "601006Table2" ,
tableName : "标准工序表" ,
columnProp : 'labor CycleTime' ,
columnProp : 'mach CycleTime' ,
headerAlign : "center" ,
align : "right" ,
columnLabel : '机器处理时间' ,
@ -879,10 +879,10 @@ export default {
{
userId : this . $store . state . user . name ,
functionId : 601006 ,
serialNumber : '601006Table2Mach CycleTime' ,
serialNumber : '601006Table2Labor CycleTime' ,
tableId : "601006Table2" ,
tableName : "标准工序表" ,
columnProp : 'mach CycleTime' ,
columnProp : 'labor CycleTime' ,
headerAlign : "center" ,
align : "right" ,
columnLabel : '人工处理时间' ,
@ -898,10 +898,10 @@ export default {
{
userId : this . $store . state . user . name ,
functionId : 601006 ,
serialNumber : '601006Table2Labor RunFactor' ,
serialNumber : '601006Table2Mach RunFactor' ,
tableId : "601006Table2" ,
tableName : "标准工序表" ,
columnProp : 'labor RunFactor' ,
columnProp : 'mach RunFactor' ,
headerAlign : "center" ,
align : "right" ,
columnLabel : '机器单位产出' ,
@ -917,10 +917,10 @@ export default {
{
userId : this . $store . state . user . name ,
functionId : 601006 ,
serialNumber : '601006Table2Mach RunFactor' ,
serialNumber : '601006Table2Labor RunFactor' ,
tableId : "601006Table2" ,
tableName : "标准工序表" ,
columnProp : 'mach RunFactor' ,
columnProp : 'labor RunFactor' ,
headerAlign : "center" ,
align : "right" ,
columnLabel : '人工单位产出' ,
@ -1630,7 +1630,9 @@ export default {
this . ptmSaveFlag = true
} ,
saveProductGroupPtm ( ) {
async saveProductGroupPtm ( ) {
/ / 确 保 m o d e l B l u r 完 成
await this . modelBlur ( 219 ) ;
if ( this . ptmModalData . conditionDesc === '' || this . ptmModalData . conditionDesc == null ) {
this . $message . warning ( '请填写条件描述!' )
return
@ -1639,6 +1641,12 @@ export default {
this . $message . warning ( '请选择属性模板!' )
return
}
if ( this . ptmModalData . itemDesc === '' || this . ptmModalData . itemDesc == null ) {
this . $alert ( '该属性模板不存在!' , '错误' , {
confirmButtonText : '确定'
} )
return
}
let tempData = {
site : this . productGroupCurrentRow . site ,
buNo : this . productGroupCurrentRow . buNo ,
@ -1776,30 +1784,57 @@ export default {
this . ptmConditionProcessUpdateFlag = false
} ,
/ / 机 器 单 位 产 出 改 变
changeMachRunFactor ( row ) {
row . laborRunFactor = row . machRunFactor
} ,
/ / 机 器 处 理 时 间 改 变
changeMachCycleTime ( row ) {
/ / 人 工 处 理 时 间 赋 值
row . laborCycleTime = row . machCycleTime
/ / 计 算 机 器 单 位 产 出
row . machRunFactor = 1 / row . machCycleTime
/ / 人 工 单 位 产 出 赋 值
row . laborRunFactor = row . machRunFactor
} ,
/ / 人 工 处 理 时 间 改 变
changeLaborCycleTime ( row ) {
/ / 计 算 人 工 单 位 产 出
row . laborRunFactor = 1 / row . laborCycleTime
} ,
/ / 属 性 输 入 校 验
modelBlur ( tagNo ) {
async 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 } ) => {
conditionSql : " and code_no = '" + this . ptmModalData . itemNo + "'" +
" and site = '" + this . productGroupConditionCurrentRow . bu . split ( '_' ) [ 0 ] + "'" +
" and bu_no = '" + this . productGroupConditionCurrentRow . bu . split ( '_' ) [ 1 ] + "'"
} ;
/ / 返 回 P r o m i s e
return verifyData ( tempData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . ptmModalData . itemDesc = data . baseListData [ 0 ] . code_desc
this . ptmModalData . itemDesc = data . baseListData [ 0 ] . code_desc ;
} else {
this . $alert ( '该属性模板不存在!' , '错误' , {
confirmButtonText : '确定'
} )
this . ptmModalData . itemNo = ''
this . ptmModalData . itemDesc = ''
this . ptmModalData . itemDesc = '' ;
}
} else {
this . $message . warning ( data . msg )
this . ptmModalData . itemNo = ''
this . ptmModalData . itemDesc = ''
this . $message . warning ( data . msg ) ;
this . ptmModalData . itemDesc = '' ;
}
} )
} ) . catch ( error => {
console . error ( error ) ;
this . $message . error ( '校验失败,请重试' ) ;
this . ptmModalData . itemDesc = '' ;
} ) ;
} else {
this . ptmModalData . itemDesc = '' ;
return Promise . resolve ( ) ; / / 如 果 i t e m N o 为 空 , 直 接 返 回 r e s o l v e d P r o m i s e
}
} ,