Browse Source

2024.9.18 一、物料成本信息维护(第二版)

二、加工中心功能改造
三、标准工序(第二版)
四、商品组 - 标准工序(第二版)
五、商品组 - Process Time Matrix(第一版)
java8
yuejiayang 1 year ago
parent
commit
1b26350d02
  1. 87
      src/views/modules/part/partProductGroupInformation.vue
  2. 32
      src/views/modules/part/standardRoutingOperation.vue

87
src/views/modules/part/partProductGroupInformation.vue

@ -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>
</el-table-column>
@ -860,10 +860,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601006,
serialNumber: '601006Table2LaborCycleTime',
serialNumber: '601006Table2MachCycleTime',
tableId: "601006Table2",
tableName: "标准工序表",
columnProp: 'laborCycleTime',
columnProp: 'machCycleTime',
headerAlign: "center",
align: "right",
columnLabel: '机器处理时间',
@ -879,10 +879,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601006,
serialNumber: '601006Table2MachCycleTime',
serialNumber: '601006Table2LaborCycleTime',
tableId: "601006Table2",
tableName: "标准工序表",
columnProp: 'machCycleTime',
columnProp: 'laborCycleTime',
headerAlign: "center",
align: "right",
columnLabel: '人工处理时间',
@ -898,10 +898,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601006,
serialNumber: '601006Table2LaborRunFactor',
serialNumber: '601006Table2MachRunFactor',
tableId: "601006Table2",
tableName: "标准工序表",
columnProp: 'laborRunFactor',
columnProp: 'machRunFactor',
headerAlign: "center",
align: "right",
columnLabel: '机器单位产出',
@ -917,10 +917,10 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 601006,
serialNumber: '601006Table2MachRunFactor',
serialNumber: '601006Table2LaborRunFactor',
tableId: "601006Table2",
tableName: "标准工序表",
columnProp: 'machRunFactor',
columnProp: 'laborRunFactor',
headerAlign: "center",
align: "right",
columnLabel: '人工单位产出',
@ -1630,7 +1630,9 @@ export default {
this.ptmSaveFlag = true
},
saveProductGroupPtm () {
async saveProductGroupPtm () {
// modelBlur
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] + "'"
};
// Promise
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(); // itemNo resolved Promise
}
},

32
src/views/modules/part/standardRoutingOperation.vue

@ -733,7 +733,9 @@ export default {
return
}
if (this.modalData.workCenterDesc === '' || this.modalData.workCenterDesc == null) {
this.$message.warning('请填写加工中心名称!')
this.$alert('该加工中心不存在,请重新输入加工中心编码!', '提示', {
confirmButtonText: '确定'
})
return
}
if (this.modalData.laborClassNo === '' || this.modalData.laborClassNo == null) {
@ -741,7 +743,9 @@ export default {
return
}
if (this.modalData.laborClassDesc === '' || this.modalData.laborClassDesc == null) {
this.$message.warning('请填写人员等级!')
this.$alert('当前BU下人员等级编码不存在,请重新输入人员等级编码!', '提示', {
confirmButtonText: '确定'
})
return
}
if (this.modalData.setupLaborClassNo === '' || this.modalData.setupLaborClassNo == null) {
@ -749,7 +753,9 @@ export default {
return
}
if (this.modalData.setupLaborClassDesc === '' || this.modalData.setupLaborClassDesc == null) {
this.$message.warning('请填写调机时人员等级!')
this.$alert('当前BU下调机时人员等级编码不存在,请重新输入调机时人员等级编码!', '提示', {
confirmButtonText: '确定'
})
return
}
if (this.modalData.flag === '1') {
@ -830,18 +836,15 @@ export default {
if (data.baseListData.length > 0) {
this.modalData.workCenterDesc = data.baseListData[0].work_center_desc
} else {
this.$alert('该加工中心不存在,请重新输入加工中心编码!', '提示', {
confirmButtonText: '确定'
})
this.modalData.workCenterNo = ''
this.modalData.workCenterDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.workCenterNo = ''
this.modalData.workCenterDesc = ''
}
})
} else {
this.modalData.workCenterDesc = ''
}
},
@ -857,10 +860,6 @@ export default {
if (data.baseListData.length > 0) {
this.modalData.setupLaborClassDesc = data.baseListData[0].class_desc
} else {
this.$alert('该调机时人员等级不存在,请重新输入调机时人员等级编码!', '提示', {
confirmButtonText: '确定'
})
this.modalData.setupLaborClassNo = ''
this.modalData.setupLaborClassDesc = ''
}
} else {
@ -869,6 +868,8 @@ export default {
this.modalData.setupLaborClassDesc = ''
}
})
} else {
this.modalData.setupLaborClassDesc = ''
}
},
@ -884,18 +885,15 @@ export default {
if (data.baseListData.length > 0) {
this.modalData.laborClassDesc = data.baseListData[0].class_desc
} else {
this.$alert('该人员等级不存在,请重新输入人员等级编码!', '提示', {
confirmButtonText: '确定'
})
this.modalData.laborClassNo = ''
this.modalData.laborClassDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.laborClassNo = ''
this.modalData.laborClassDesc = ''
}
})
}else {
this.modalData.laborClassDesc = ''
}
},

Loading…
Cancel
Save