Commit f09f1778 authored by 仇晓婷's avatar 仇晓婷

bom

parent 12ebf084
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/> />
</Filed> </Filed>
<Filed :span="8"> <Filed :span="8">
<Button type="primary" @click="addBom" class="mb10">新增Bom</Button> <Button type="primary" @click="addBom" class="mb10">新增Bom</Button>
</Filed> </Filed>
</Row> </Row>
</div> </div>
...@@ -45,7 +45,8 @@ export default { ...@@ -45,7 +45,8 @@ export default {
entity: { entity: {
id: "", id: "",
levelId: 0, levelId: 0,
levelTitle: "" levelTitle: "",
bomId: 0
}, },
parms: { parms: {
app: "technology", app: "technology",
...@@ -155,6 +156,7 @@ export default { ...@@ -155,6 +156,7 @@ export default {
}, },
add(row) { add(row) {
this.curId = row.id; this.curId = row.id;
this.parents.upBomId = row.bomId;
this.parents.id = row.levelId; this.parents.id = row.levelId;
this.parents.parentName = row.levelTitle; this.parents.parentName = row.levelTitle;
this.parents.rootProductId = row.rootProductId; this.parents.rootProductId = row.rootProductId;
...@@ -165,6 +167,7 @@ export default { ...@@ -165,6 +167,7 @@ export default {
addBom() { addBom() {
console.log(this.entity); console.log(this.entity);
this.curId = this.entity.id; this.curId = this.entity.id;
this.parents.upBomId = this.entity.bomId;
this.parents.id = this.entity.levelId; this.parents.id = this.entity.levelId;
this.parents.parentName = this.entity.levelTitle; this.parents.parentName = this.entity.levelTitle;
this.parents.rootProductId = this.entity.rootProductId; this.parents.rootProductId = this.entity.rootProductId;
...@@ -182,7 +185,7 @@ export default { ...@@ -182,7 +185,7 @@ export default {
this.modal = true; this.modal = true;
}, },
remove(row) { remove(row) {
Api.deleteBom(row.bomId, row.levelId,row.rootProductId).then(r => { Api.deleteBom(row.bomId, row.levelId, row.rootProductId).then(r => {
if (r.success) { if (r.success) {
this.init(); this.init();
this.$Message.success("删除成功"); this.$Message.success("删除成功");
......
...@@ -50,13 +50,14 @@ export default { ...@@ -50,13 +50,14 @@ export default {
upId: this.eid, upId: this.eid,
levelId: this.parents.id, levelId: this.parents.id,
levelTitle: this.parents.parentName, levelTitle: this.parents.parentName,
rootProductId: this.parents.rootProductId rootProductId: this.parents.rootProductId,
upBomId: this.parents.upBomId
}, },
dataList: [], dataList: [],
downUrl: fileUrlDown, downUrl: fileUrlDown,
componaylist: [], componaylist: [],
componaylist: [], componaylist: [],
selectdata1: [], selectdata1: [],
rules: { rules: {
materialId: [{ required: true, message: "必填", trigger: "change" }] materialId: [{ required: true, message: "必填", trigger: "change" }]
...@@ -76,7 +77,8 @@ export default { ...@@ -76,7 +77,8 @@ export default {
id: Number, id: Number,
parentName: String, parentName: String,
ids: String, ids: String,
rootProductId: Number rootProductId: Number,
upBomId: Number
} }
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
......
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