|
|
@ -67,8 +67,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="getColumnName('ME_BomHead-MatNr')"> |
|
|
|
<el-input v-model="form['ME_BomHead-MatNr']" placeholder="请输入" /> |
|
|
|
<el-form-item :label="getColumnName('ME_BomHead-MatNr')" prop="ME_BomHead-MatNr"> |
|
|
|
<el-input v-model="form['ME_BomHead-MatNr']" placeholder="请输入" :disabled="!isAdd" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
@ -315,8 +315,11 @@ export default { |
|
|
|
rules: { |
|
|
|
'ME_BomHead-BomId': [ |
|
|
|
{ required: true, message: '此项不能为空', trigger: 'blur' } |
|
|
|
] |
|
|
|
} |
|
|
|
], |
|
|
|
'ME_BomHead-MatNr': [ |
|
|
|
{ required: true, message: '此项不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -364,7 +367,7 @@ export default { |
|
|
|
addBomItem() { |
|
|
|
this.editType = '新增模式' |
|
|
|
if (!this.formBom1['ME_BomLst-CmatNr']) { |
|
|
|
this.formBom['ME_BomLst-FmatNr'] = this.form['ME_BomHead-BomId'] |
|
|
|
this.formBom['ME_BomLst-FmatNr'] = this.form['ME_BomHead-MatNr'] |
|
|
|
this.formBom['ME_BomLst-BomId'] = this.form['ME_BomHead-BomId'] |
|
|
|
} else { |
|
|
|
this.formBom['ME_BomLst-FmatNr'] = this.formBom1['ME_BomLst-CmatNr'] |
|
|
@ -431,9 +434,13 @@ export default { |
|
|
|
}).catch(function() {}) |
|
|
|
}, |
|
|
|
saveBomItem() { |
|
|
|
if (!this.formBom['ME_BomLst-FmatNr'] && !this.formBom['ME_BomLst-CmatNr']) { |
|
|
|
this.msgError(`"${this.getColumnName('ME_BomLst-FmatNr')}"和"${this.getColumnName('ME_BomLst-CmatNr')}"不能为空`) |
|
|
|
} else { |
|
|
|
if (!this.formBom['ME_BomLst-FmatNr']) { |
|
|
|
this.msgError(`"${this.getColumnName('ME_BomLst-FmatNr')}"不能为空`) |
|
|
|
return |
|
|
|
} else if (!this.formBom['ME_BomLst-CmatNr']) { |
|
|
|
this.msgError(`"${this.getColumnName('ME_BomLst-CmatNr')}"不能为空`) |
|
|
|
return |
|
|
|
} else { |
|
|
|
const bomid = this.formBom['ME_BomLst-BomId'] |
|
|
|
this.formBom['ME_BomLst-BackFlushItem'] = this.formBom['ME_BomLst-BackFlushItem'] ? 1 : 0 |
|
|
|
this.formBom['ME_BomLst-CriticalItem'] = this.formBom['ME_BomLst-CriticalItem'] ? 1 : 0 |
|
|
@ -543,6 +550,14 @@ export default { |
|
|
|
submitForm: function() { |
|
|
|
this.$refs['form'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
if (!this.form['ME_BomHead-BomId']) { |
|
|
|
this.msgError(`"${this.getColumnName('ME_BomHead-BomId')}"不能为空`) |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.form['ME_BomHead-MatNr']) { |
|
|
|
this.msgError(`"${this.getColumnName('ME_BomHead-MatNr')}"不能为空`) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.form['ME_BomHead-BomheadDval1']) { |
|
|
|
this.form['ME_BomHead-BomheadDval1'] = parseInt(this.form['ME_BomHead-BomheadDval1']) |
|
|
|
} |
|
|
|