Commit 8d9738b9 authored by 仇晓婷's avatar 仇晓婷

youh

parent fc247c82
...@@ -91,23 +91,26 @@ export default { ...@@ -91,23 +91,26 @@ export default {
change(v, b) { change(v, b) {
// console.log(b); // console.log(b);
let ids = []; let ids = [];
let productIds = [];
if (b.bomId !== 0) { if (b.bomId !== 0) {
ids.push(b.bomId); ids.push(b.bomId);
} }
productIds.push(b.value);
if (b.children) { if (b.children) {
addId(b.children); addId(b.children);
function addId(data) { function addId(data) {
data.map(u => { data.map(u => {
if (u.bomId !== 0) { if (u.bomId !== 0) {
ids.push(u.bomId); ids.push(u.bomId);
} }
productIds.push(u.value);
if (u.children) { if (u.children) {
addId(u.children); addId(u.children);
} }
}); });
} }
} }
this.$emit("on-select", b.bomId, b, ids); this.$emit("on-select", b.bomId, b, productIds, ids);
}, },
hide() { hide() {
this.$emit("on-hide"); this.$emit("on-hide");
......
...@@ -782,7 +782,7 @@ export default { ...@@ -782,7 +782,7 @@ export default {
//this.$Message.info("展开左侧树") //this.$Message.info("展开左侧树")
this.showMenu = true; this.showMenu = true;
}, },
productSearch(id, item, ids) { productSearch(id, item, productIds, ids) {
let where = { bomId: { op: "In", value: ids } }; let where = { bomId: { op: "In", value: ids } };
this.$refs.grid.reload(where); this.$refs.grid.reload(where);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment