diff --git a/src/views/plant/material/maintainbom.vue b/src/views/plant/material/maintainbom.vue index 875cda3..470ab64 100644 --- a/src/views/plant/material/maintainbom.vue +++ b/src/views/plant/material/maintainbom.vue @@ -12,44 +12,82 @@ /> - 搜索 - 新增 + 搜索 + 新增 + - - - - + + + - + - + - - + + - - + + - + - - 确 定 - 取 消 + + 确 定 + 取 消 - + + + - + - 新增 - 删除 - 保存 -
{{ editType }}
+ 新增 + 删除 + 保存 +
+ {{ editType }} +
+ - - + + - + - - + + - + @@ -128,19 +238,37 @@ - - + + - + - - + + - + - + - + @@ -194,54 +331,78 @@ - + - + -
-
-
+ +
- + - + - + - + - + - + @@ -393,7 +554,7 @@ export default { this.formBom['ME_BomLst-TimeUom'] = undefined this.formBom['ME_BomLst-LossRate'] = undefined this.isBomlst = false - // this.$forceUpdate() + this.$forceUpdate() }, deleteBomItem() { const bomid = this.formBom['ME_BomLst-BomId'] @@ -427,8 +588,10 @@ export default { this.formBom['ME_BomLst-TimeUom'] = undefined this.formBom['ME_BomLst-LossRate'] = undefined this.formBom1 = {} - getBomhead(bomid).then(response => { - this.form = response.data + this.$nextTick(()=>{ + getBomhead(bomid).then(response => { + this.form = response.data + }) }) this.msgSuccess('删除成功') }).catch(function() {}) @@ -456,9 +619,47 @@ export default { if (this.editType === '编辑模式') { updateBomlst(this.formBom).then(res => { if (res.code === 200) { + this.editType = '' this.msgSuccess('修改成功') - getBomhead(bomid).then(response => { - this.form = response.data + this.form = { + 'ME_BomHead-MatNr': undefined, + 'ME_BomHead-BomId': undefined, + 'ME_BomHead-Descr': undefined, + 'ME_BomHead-BomheadCval1': undefined, + 'ME_BomHead-BomheadCval2': undefined, + 'ME_BomHead-BomheadIval1': undefined, + 'ME_BomHead-BomheadIval2': undefined, + 'ME_BomHead-BomheadDval1': undefined, + 'ME_BomHead-BomheadDval2': undefined, + 'ME_BomHead-BomLstLi': [] + } + this.formBom['ME_BomLst-FmatNr'] = undefined + this.formBom['ME_BomLst-FmatName'] = undefined + this.formBom['ME_BomLst-FmatQty'] = undefined + this.formBom['ME_BomLst-FmatUom'] = undefined + this.formBom['ME_BomLst-CmatNr'] = undefined + this.formBom['ME_BomLst-LevelNr'] = undefined + this.formBom['ME_BomLst-CmatName'] = undefined + this.formBom['ME_BomLst-CmatQty'] = undefined + this.formBom['ME_BomLst-CmatUom'] = undefined + this.formBom['ME_BomLst-CmatType'] = undefined + this.formBom['ME_BomLst-Position'] = undefined + this.formBom['ME_BomLst-BackFlushItem'] = false + this.formBom['ME_BomLst-CriticalItem'] = false + this.formBom['ME_BomLst-ValidFrom'] = undefined + this.formBom['ME_BomLst-ValidTo'] = undefined + this.formBom['ME_BomLst-FmatSpec'] = undefined + this.formBom['ME_BomLst-BomlstCval2'] = undefined + this.formBom['ME_BomLst-BomlstIval1'] = undefined + this.formBom['ME_BomLst-BomlstIval2'] = undefined + this.formBom['ME_BomLst-TimeUom'] = undefined + this.formBom['ME_BomLst-LossRate'] = undefined + this.formBom1 = {} + this.resetForm('form') + this.$nextTick(()=>{ + getBomhead(bomid).then(response => { + this.form = response.data + }) }) } else { this.msgError(res.msg) @@ -468,21 +669,53 @@ export default { if (this.editType === '新增模式') { addBomlst(this.formBom).then(res => { if (res.code === 200) { + this.editType = '' this.msgSuccess('新增成功') - this.formBom = {} - this.formBom['ME_BomLst-BackFlushItem'] = false - this.formBom['ME_BomLst-CriticalItem'] = false - this.formBom1 = {} - getBomhead(bomid).then(response => { - this.form = response.data + this.form = { + 'ME_BomHead-MatNr': undefined, + 'ME_BomHead-BomId': undefined, + 'ME_BomHead-Descr': undefined, + 'ME_BomHead-BomheadCval1': undefined, + 'ME_BomHead-BomheadCval2': undefined, + 'ME_BomHead-BomheadIval1': undefined, + 'ME_BomHead-BomheadIval2': undefined, + 'ME_BomHead-BomheadDval1': undefined, + 'ME_BomHead-BomheadDval2': undefined, + 'ME_BomHead-BomLstLi': [] + } + this.formBom['ME_BomLst-FmatNr'] = undefined + this.formBom['ME_BomLst-FmatName'] = undefined + this.formBom['ME_BomLst-FmatQty'] = undefined + this.formBom['ME_BomLst-FmatUom'] = undefined + this.formBom['ME_BomLst-CmatNr'] = undefined + this.formBom['ME_BomLst-LevelNr'] = undefined + this.formBom['ME_BomLst-CmatName'] = undefined + this.formBom['ME_BomLst-CmatQty'] = undefined + this.formBom['ME_BomLst-CmatUom'] = undefined + this.formBom['ME_BomLst-CmatType'] = undefined + this.formBom['ME_BomLst-Position'] = undefined + this.formBom['ME_BomLst-BackFlushItem'] = false + this.formBom['ME_BomLst-CriticalItem'] = false + this.formBom['ME_BomLst-ValidFrom'] = undefined + this.formBom['ME_BomLst-ValidTo'] = undefined + this.formBom['ME_BomLst-FmatSpec'] = undefined + this.formBom['ME_BomLst-BomlstCval2'] = undefined + this.formBom['ME_BomLst-BomlstIval1'] = undefined + this.formBom['ME_BomLst-BomlstIval2'] = undefined + this.formBom['ME_BomLst-TimeUom'] = undefined + this.formBom['ME_BomLst-LossRate'] = undefined + this.formBom1 = {} + this.resetForm('form') + this.$nextTick(()=>{ + getBomhead(bomid).then(response => { + this.form = response.data + }) }) } else { this.msgError(res.msg) } }) } - this.formBom1 = {} - this.editType = '' } }, // 表单重置 @@ -539,12 +772,14 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.reset() - this.isAdd = false - getBomhead(row['ME_BomHead-BomId']).then(response => { - this.form = response.data - this.open = true - this.title = '修改' - }) + this.isAdd = false; + this.$nextTick(()=>{ + getBomhead(row['ME_BomHead-BomId']).then(({data={}}) => { + this.form = data; + this.open = true; + this.title = '修改' + }) + }); }, /** 提交按钮 */ submitForm: function() { diff --git a/src/views/plant/material/part.vue b/src/views/plant/material/part.vue index 3707dfa..8311638 100644 --- a/src/views/plant/material/part.vue +++ b/src/views/plant/material/part.vue @@ -10,6 +10,63 @@ style="width: 200px" /> + + + + + + + + + + + + + + + {{ parseTime(scope.row[item]) }} - - {{ artSpec1Text(scope.row[item]) }} - - - {{ statusText(scope.row[item]) }} - + + {{ artSpec1Text(scope.row[item]) }} + + + {{ statusText(scope.row[item]) }} + {{ scope.row[item] }} @@ -188,19 +245,23 @@ :label="item['stdeftab-bez']" :value="item['stdeftab-stdeftyp']" /> -               +                - - + + - + - + - +