From 49b335856c9a42ad6ab7bd9a213a3d28dcb77e26 Mon Sep 17 00:00:00 2001 From: liwei Date: Tue, 2 Nov 2021 16:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E6=B7=BB=E5=8A=A0=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plant/material/maintainbom.vue | 367 ++++++++++++++++++----- src/views/plant/material/part.vue | 100 +++++- 2 files changed, 382 insertions(+), 85 deletions(-) diff --git a/src/views/plant/material/maintainbom.vue b/src/views/plant/material/maintainbom.vue index dbf21b6..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'] @@ -458,7 +619,43 @@ export default { if (this.editType === '编辑模式') { updateBomlst(this.formBom).then(res => { if (res.code === 200) { + this.editType = '' this.msgSuccess('修改成功') + 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 @@ -472,11 +669,43 @@ 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 = {} + 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 @@ -487,8 +716,6 @@ export default { } }) } - this.formBom1 = {} - this.editType = '' } }, // 表单重置 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']" /> -               +                - - + + - + - + - +