代码更新
This commit is contained in:
@@ -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(_ => {
|
||||
|
||||
Reference in New Issue
Block a user