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

修复生产版本bug

parent 0d7d3f20
...@@ -88,12 +88,20 @@ ...@@ -88,12 +88,20 @@
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-select
v-model="scope.row.stdWorkingTimeUom" v-model="scope.row.stdWorkingTimeUom"
placeholder=""
:disabled="mode == 'info'"
clearable 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> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -474,6 +482,7 @@ export default { ...@@ -474,6 +482,7 @@ export default {
"process_control_code", "process_control_code",
"sys_yes_no", "sys_yes_no",
"mes_time_type", "mes_time_type",
"mes_work_time",
"product_shape", "product_shape",
], ],
props: { props: {
...@@ -693,7 +702,25 @@ export default { ...@@ -693,7 +702,25 @@ export default {
}); });
}, },
getComData() { 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() { resetForm() {
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
{ value: "销售", label: "销售" }, { value: "销售", label: "销售" },
{ value: "特定", label: "特定" }, { value: "特定", label: "特定" },
], ],
productionSolutionList: [],
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
......
...@@ -276,6 +276,7 @@ export default { ...@@ -276,6 +276,7 @@ export default {
saveForm() { saveForm() {
const bomHead = this.$refs.ProogingBomRef.getComData(); const bomHead = this.$refs.ProogingBomRef.getComData();
const processList = this.$refs.ProogingProcessRef.getComData(); const processList = this.$refs.ProogingProcessRef.getComData();
if (typeof processList === 'boolean') return
const params = { const params = {
...this.form, ...this.form,
bomHead, bomHead,
...@@ -293,9 +294,16 @@ export default { ...@@ -293,9 +294,16 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// 关闭页签 // 关闭页签
tabPlugins.closeOpenPage(); tabPlugins.closeOpenPage();
this.$router.replace({ this.$tab.closePage({
path: "/mes/md/production",
name: "Production"
});
this.$nextTick(() => {
this.$router.replace({
path: "/mes/md/production", path: "/mes/md/production",
}); });
})
}) })
}) })
.catch(() => { .catch(() => {
...@@ -309,9 +317,15 @@ export default { ...@@ -309,9 +317,15 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// 关闭页签 // 关闭页签
tabPlugins.closeOpenPage(); tabPlugins.closeOpenPage();
this.$router.replace({ this.$tab.closePage({
path: "/mes/md/production",
name: "Production"
});
this.$nextTick(() => {
this.$router.replace({
path: "/mes/md/production", path: "/mes/md/production",
}); });
})
}) })
}) })
.catch(() => { .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