Commit 90f57519 authored by 仇晓婷's avatar 仇晓婷

物料入库加库类型

parent 6b41fe09
......@@ -25,7 +25,11 @@
@click="toggle"
title="展开/合并"
></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree(model8)"></Button>
<Button
icon="md-refresh"
title="刷新"
@click="loadTree(model8,nodeInfo.codeRuleType)"
></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
......@@ -125,7 +129,7 @@ export default {
console.log(val);
this.nodeInfo.codeRuleId = val;
this.model8 = val;
this.loadTree(this.nodeInfo.codeRuleId);
this.cityList.forEach((e) => {
if (val == e.id) {
this.downName = e.name;
......@@ -133,6 +137,7 @@ export default {
}
});
this.model8 = val;
this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType);
},
listSlecet() {
let data = {
......@@ -145,7 +150,8 @@ export default {
this.downName = this.cityList[0].name;
this.model8 = this.cityList[0].id;
this.nodeInfo.codeRuleId = this.cityList[0].id;
this.loadTree(this.nodeInfo.codeRuleId);
this.nodeInfo.codeRuleType = this.cityList[0].type;
this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType);
});
},
......@@ -154,7 +160,7 @@ export default {
this.showMenu = true;
},
ok(row) {
this.loadTree(this.nodeInfo.codeRuleId);
this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType);
this.modal = false;
this.curId = 0;
// if (row) {
......
......@@ -91,14 +91,15 @@ export default {
codeRuleId: this.nodeInfo.codeRuleId,
categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {},
rootCategoryId: this.nodeInfo.rootCategoryId //左侧树点击的数据的最顶层id
rootCategoryId: this.nodeInfo.rootCategoryId, //左侧树点击的数据的最顶层id
codeRuleType: this.nodeInfo.codeRuleType,
},
disabled: false,
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
name: [{ required: true, message: "必填", trigger: "blur" }],
},
fileds: [] //扩展属性
fileds: [], //扩展属性
};
},
async fetch({ store, params }) {
......@@ -113,17 +114,17 @@ export default {
{
conditionalType: "Equal",
fieldName: "categoryId",
fieldValue: this.nodeInfo.rootCategoryId
}
fieldValue: this.nodeInfo.rootCategoryId,
},
];
Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false
}).then(r => {
isDesc: false,
}).then((r) => {
if (r.result) {
this.fileds = r.result.filter(function(item) {
this.fileds = r.result.filter(function (item) {
item.span = 12;
if (item.dataType > 4) {
item.span = 24;
......@@ -131,7 +132,7 @@ export default {
delete item["id"];
return item.fieldType != 1;
});
this.fileds.map(u => {
this.fileds.map((u) => {
let v = "";
if (u.dataType == 1 || u.dataType == 2) {
v = 0;
......@@ -158,12 +159,12 @@ export default {
},
handleSubmit() {
this.$refs.form.validate(v => {
this.$refs.form.validate((v) => {
if (v) {
// let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr);
Api.create(this.entity)
.then(r => {
.then((r) => {
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
......@@ -171,7 +172,7 @@ export default {
this.$Message.error(r.error.message);
}
})
.catch(err => {
.catch((err) => {
this.disabled = false;
this.$Message.error(r.error.message);
});
......@@ -180,7 +181,7 @@ export default {
},
handleClose() {
this.$emit("on-close");
}
}
},
},
};
</script>
......@@ -24,7 +24,11 @@
@click="toggle"
title="展开/合并"
></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree(model8)"></Button>
<Button
icon="md-refresh"
title="刷新"
@click="loadTree(model8,nodeInfo.codeRuleType)"
></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
......@@ -73,6 +77,7 @@ export default {
ids: [],
addChange: true,
codeRuleId: 0,
codeRuleType: "",
},
downName: "请选择类型",
modal: false,
......@@ -96,12 +101,13 @@ export default {
this.codeRuleId = val;
this.nodeInfo.codeRuleId = val;
this.model8 = val;
this.loadTree(this.codeRuleId);
this.cityList.forEach((e) => {
if (val == e.id) {
this.downName = e.name;
this.nodeInfo.codeRuleType = e.type;
}
});
this.loadTree(this.codeRuleId, this.nodeInfo.codeRuleType);
},
listSlecet() {
let data = {
......@@ -114,7 +120,8 @@ export default {
this.downName = this.cityList[0].name;
this.model8 = this.cityList[0].id;
this.nodeInfo.codeRuleId = this.cityList[0].id;
this.loadTree(this.nodeInfo.codeRuleId);
this.nodeInfo.codeRuleType = this.cityList[0].type;
this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType);
});
},
......@@ -123,7 +130,7 @@ export default {
this.showMenu = true;
},
ok(row) {
this.loadTree(this.codeRuleId);
this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType);
// this.modal = false;
// this.curId = 0;
// if (row) {
......@@ -180,10 +187,15 @@ export default {
this.nodeInfo.rootCategoryId = pid;
}
},
loadTree(id) {
loadTree(id, codeRuleType) {
let data = {
conditions: [
{ fieldName: "codeRuleId", fieldValue: id, conditionalType: "Equal" },
{
fieldName: "codeRuleType",
fieldValue: codeRuleType,
conditionalType: "Equal",
},
],
sortBy: "code",
isDesc: false,
......
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