Commit c8c01439 authored by 沈翠玲's avatar 沈翠玲

修复生产版本bug

parent 0d7d3f20
......@@ -88,12 +88,20 @@
align="center"
>
<template slot-scope="scope">
<el-input
<el-select
v-model="scope.row.stdWorkingTimeUom"
placeholder=""
:disabled="mode == 'info'"
clearable
/>
:disabled="mode == 'info'"
placeholder="请选择工时单位"
>
<el-option
v-for="dict in dict.type.mes_work_time"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
......@@ -474,6 +482,7 @@ export default {
"process_control_code",
"sys_yes_no",
"mes_time_type",
"mes_work_time",
"product_shape",
],
props: {
......@@ -693,7 +702,25 @@ export default {
});
},
getComData() {
return this.tableData.filter(item => Object.values(item).some(v => v && v.length > 0 ) );
let isNULL = false
for(let i = 0; i< this.tableData.length; i++) {
const item = this.tableData[i]
console.log('item', item)
if (item.processName && !item.workstationId) {
this.$message.warning('工作中心必选')
isNULL = true
break
} else if (item.processName && !item.stdWorkingTime) {
this.$message.warning('标准工时必填')
isNULL = true
break
}
}
console.log('isNULL', isNULL)
if (isNULL) {
return isNULL
}
return this.tableData.filter(v => v && v.processName && v.workstationId && v.stdWorkingTime );
},
/**重置表单 */
resetForm() {
......
......@@ -158,7 +158,7 @@ export default {
{ value: "销售", label: "销售" },
{ value: "特定", label: "特定" },
],
productionSolutionList: [],
// 表单参数
form: {},
// 表单校验
......
......@@ -276,6 +276,7 @@ export default {
saveForm() {
const bomHead = this.$refs.ProogingBomRef.getComData();
const processList = this.$refs.ProogingProcessRef.getComData();
if (typeof processList === 'boolean') return
const params = {
...this.form,
bomHead,
......@@ -293,9 +294,16 @@ export default {
this.$nextTick(() => {
// 关闭页签
tabPlugins.closeOpenPage();
this.$router.replace({
this.$tab.closePage({
path: "/mes/md/production",
name: "Production"
});
this.$nextTick(() => {
this.$router.replace({
path: "/mes/md/production",
});
})
})
})
.catch(() => {
......@@ -309,9 +317,15 @@ export default {
this.$nextTick(() => {
// 关闭页签
tabPlugins.closeOpenPage();
this.$router.replace({
this.$tab.closePage({
path: "/mes/md/production",
name: "Production"
});
this.$nextTick(() => {
this.$router.replace({
path: "/mes/md/production",
});
})
})
})
.catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment