代码更新
This commit is contained in:
@@ -165,7 +165,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
dialogShow: {
|
dialogShow: {
|
||||||
handler(newValue, oldValue) {
|
handler(newValue, oldValue) {
|
||||||
debugger
|
|
||||||
this.dialogVisible = newValue
|
this.dialogVisible = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,8 +195,8 @@ export default {
|
|||||||
}
|
}
|
||||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
this.class_idStr = res.class_idStr
|
this.class_idStr = res.class_idStr
|
||||||
this.crud.query.class_idStr = this.class_idStr
|
// this.crud.query.class_idStr = this.class_idStr
|
||||||
this.crud.toQuery()
|
// this.crud.toQuery()
|
||||||
this.queryClassId()
|
this.queryClassId()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -216,7 +215,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToEdit]() {
|
[CRUD.HOOK.afterToEdit]() {
|
||||||
debugger
|
|
||||||
const data = {
|
const data = {
|
||||||
'device_bom_id': this.form.device_bom_id
|
'device_bom_id': this.form.device_bom_id
|
||||||
}
|
}
|
||||||
@@ -225,7 +223,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToView]() {
|
[CRUD.HOOK.afterToView]() {
|
||||||
debugger
|
|
||||||
const data = {
|
const data = {
|
||||||
'device_bom_id': this.form.device_bom_id
|
'device_bom_id': this.form.device_bom_id
|
||||||
}
|
}
|
||||||
@@ -233,6 +230,32 @@ export default {
|
|||||||
this.form.tableData = res
|
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) {
|
handleClose(done) {
|
||||||
this.$confirm('确认关闭?')
|
this.$confirm('确认关闭?')
|
||||||
.then(_ => {
|
.then(_ => {
|
||||||
|
|||||||
Reference in New Issue
Block a user