From 9082b861487185d5ea76d582ba3a59b5c97ae968 Mon Sep 17 00:00:00 2001 From: liuxy Date: Mon, 18 Jul 2022 15:54:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/basedata/em/devicebom/AddDialog.vue | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue b/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue index 8e334b7d..3d3bd29a 100644 --- a/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue +++ b/mes/qd/src/views/wms/basedata/em/devicebom/AddDialog.vue @@ -165,7 +165,6 @@ export default { watch: { dialogShow: { handler(newValue, oldValue) { - debugger this.dialogVisible = newValue } } @@ -196,8 +195,8 @@ export default { } crudMaterialbase.getMaterOptType(param).then(res => { this.class_idStr = res.class_idStr - this.crud.query.class_idStr = this.class_idStr - this.crud.toQuery() + // this.crud.query.class_idStr = this.class_idStr + // this.crud.toQuery() this.queryClassId() }) }, @@ -216,7 +215,6 @@ export default { } }, [CRUD.HOOK.afterToEdit]() { - debugger const data = { 'device_bom_id': this.form.device_bom_id } @@ -225,7 +223,6 @@ export default { }) }, [CRUD.HOOK.afterToView]() { - debugger const data = { 'device_bom_id': this.form.device_bom_id } @@ -233,6 +230,32 @@ export default { this.form.tableData = res }) }, + [CRUD.HOOK.afterToCU](crud, form) { + debugger + if (!form.device_bom_code) { + this.queryClassId() + } else { + this.getSubTypes(form.material_type_id) + } + }, + getSubTypes(id) { + crudClassstandard.getClassSuperior(id).then(res => { + debugger + const date = res.content + this.buildClass(date) + this.classes = date + }) + }, + buildClass(classes) { + classes.forEach(data => { + if (data.children) { + this.buildClass(data.children) + } + if (data.hasChildren && !data.children) { + data.children = null + } + }) + }, handleClose(done) { this.$confirm('确认关闭?') .then(_ => {