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

入库物料过滤

parent 23752e78
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
export default { export default {
model: { model: {
prop: "value", prop: "value",
event: "on-change" event: "on-change",
}, },
data() { data() {
return { return {
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
departId: "", departId: "",
group: [], group: [],
ids: [], ids: [],
bId:this.bomId, bId: this.bomId,
}; };
}, },
created() { created() {
...@@ -102,48 +102,53 @@ export default { ...@@ -102,48 +102,53 @@ export default {
value: [String, Number, Array], value: [String, Number, Array],
placeholder: { placeholder: {
type: String, type: String,
default: "请选择物料" default: "请选择物料",
}, },
multiple: { multiple: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
theme: { theme: {
type: String, type: String,
default: "select" default: "select",
}, },
type: { type: {
type: Number, type: Number,
default: 0 default: 0,
}, },
departmentId: { departmentId: {
type: Number, type: Number,
default: 0 default: 0,
}, },
roleTitle: { roleTitle: {
type: String, type: String,
default: "" default: "",
}, },
datas: { datas: {
//自定义用户数据 //自定义用户数据
type: Array, type: Array,
default: null default: null,
}, },
//物料bomid //物料bomid
bomId: { bomId: {
type: Number, type: Number,
default: null default: null,
} },
materialType: {
//物料类型
type: String,
default: "",
},
}, },
methods: { methods: {
change(val) { change(val) {
console.log(val); console.log(val);
let entity = {}; let entity = {};
this.data.forEach(e => { this.data.forEach((e) => {
if (e.id == val) { if (e.id == val) {
entity.name = e.name; entity.name = e.name;
entity.mmcode = e.code; entity.mmcode = e.code;
...@@ -157,17 +162,25 @@ export default { ...@@ -157,17 +162,25 @@ export default {
// 加载物料 // 加载物料
materiallist() { materiallist() {
let url = `${material}/material/materiallist`; let url = `${material}/material/materiallist`;
let conditions = [];
if (this.materialType) {
conditions = [
{
conditionalType: "In",
fieldName: "categoryId",
fieldValue: this.materialType,
},
];
} else {
conditions = [];
}
this.$api this.$api
.post(url, { .post(url, {
// pageIndex: 1,
//departmentId: id,
type: this.type, type: this.type,
conditions: [] conditions: conditions,
// roleTitle: this.roleTitle
// pageSize: 0
}) })
.then(r => { .then((r) => {
this.data = r.result.filter(u => u.status == 3); this.data = r.result.filter((u) => u.status == 3);
if (this.theme == "list") { if (this.theme == "list") {
this.departmentGroup(); this.departmentGroup();
} }
...@@ -175,17 +188,16 @@ export default { ...@@ -175,17 +188,16 @@ export default {
let url1 = `${technologyUrl}productinfo/getmaterialids`; let url1 = `${technologyUrl}productinfo/getmaterialids`;
this.$api this.$api
.get(url1, { .get(url1, {
Id: this.bId Id: this.bId,
}) })
.then(res => { .then((res) => {
if (res.success) { if (res.success) {
this.ids = res.result; this.ids = res.result;
let arr = [...this.data].filter(x => let arr = [...this.data].filter((x) =>
[...this.ids].some(y => y === x.id) [...this.ids].some((y) => y === x.id)
); );
this.data=arr this.data = arr;
} }
}); });
} }
}); });
...@@ -194,11 +206,11 @@ export default { ...@@ -194,11 +206,11 @@ export default {
var group = []; var group = [];
var users = this.$u.clone(this.data); var users = this.$u.clone(this.data);
if (this.name && this.name.length > 0) { if (this.name && this.name.length > 0) {
users.map(u => { users.map((u) => {
u.checked = this.name.indexOf(u.id) > -1; u.checked = this.name.indexOf(u.id) > -1;
}); });
} }
group = this.$u.group(users, u => { group = this.$u.group(users, (u) => {
return u.departmentId; return u.departmentId;
}); });
var deps = []; var deps = [];
...@@ -208,7 +220,7 @@ export default { ...@@ -208,7 +220,7 @@ export default {
departmentId: u[0].departmentId, departmentId: u[0].departmentId,
children: u, children: u,
opened: (i = 0), opened: (i = 0),
checked: false checked: false,
}); });
}); });
this.group = deps; this.group = deps;
...@@ -226,7 +238,7 @@ export default { ...@@ -226,7 +238,7 @@ export default {
removeItem(item) { removeItem(item) {
this.group.map((u, i) => { this.group.map((u, i) => {
if (u.departmentId == item.departmentId) { if (u.departmentId == item.departmentId) {
u.children.map(p => { u.children.map((p) => {
if (p.id == item.id) { if (p.id == item.id) {
p.checked = false; p.checked = false;
} }
...@@ -239,13 +251,13 @@ export default { ...@@ -239,13 +251,13 @@ export default {
//list 时,设置值。 //list 时,设置值。
listSetValue() { listSetValue() {
var ids = []; var ids = [];
this.checkedItems.map(u => { this.checkedItems.map((u) => {
ids.push(u.id); ids.push(u.id);
}); });
this.$emit("on-change", ids); this.$emit("on-change", ids);
}, },
checkAll(item, i) { checkAll(item, i) {
item.children.map(u => { item.children.map((u) => {
u.checked = item.checked; u.checked = item.checked;
}); });
this.$set(this.group, i, this.group[i]); this.$set(this.group, i, this.group[i]);
...@@ -255,19 +267,19 @@ export default { ...@@ -255,19 +267,19 @@ export default {
getSelectItems() { getSelectItems() {
var items = []; var items = [];
if (this.theme == "list") { if (this.theme == "list") {
this.checkedItems.map(u => { this.checkedItems.map((u) => {
items.push(u); items.push(u);
}); });
} else { } else {
if (!this.multiple) { if (!this.multiple) {
//单选时返回信息 //单选时返回信息
if (this.datas && this.datas.length > 0) { if (this.datas && this.datas.length > 0) {
var item2 = this.datas.filter(u => u.value == this.value); var item2 = this.datas.filter((u) => u.value == this.value);
if (item2 && item2[0]) { if (item2 && item2[0]) {
items.push(item2[0]); items.push(item2[0]);
} }
} else { } else {
var item1 = this.dic.filter(u => u.value == this.value); var item1 = this.dic.filter((u) => u.value == this.value);
if (item1 && item1[0]) { if (item1 && item1[0]) {
items.push(item1[0]); items.push(item1[0]);
} }
...@@ -275,15 +287,15 @@ export default { ...@@ -275,15 +287,15 @@ export default {
} else { } else {
//复选时返回 //复选时返回
if (this.datas && this.datas.length > 0) { if (this.datas && this.datas.length > 0) {
this.value.forEach(v => { this.value.forEach((v) => {
var item3 = this.dic.filter(u => u.value == v); var item3 = this.dic.filter((u) => u.value == v);
if (item3 && item3[0]) { if (item3 && item3[0]) {
items.push(item3[0]); items.push(item3[0]);
} }
}); });
} else { } else {
this.value.forEach(v => { this.value.forEach((v) => {
var item = this.dic.filter(u => u.value == v); var item = this.dic.filter((u) => u.value == v);
if (item && item[0]) { if (item && item[0]) {
items.push(item[0]); items.push(item[0]);
} }
...@@ -298,21 +310,21 @@ export default { ...@@ -298,21 +310,21 @@ export default {
getSelectNames() { getSelectNames() {
var names = []; var names = [];
if (this.theme == "list") { if (this.theme == "list") {
this.checkedItems.map(u => { this.checkedItems.map((u) => {
items.push(u.name); items.push(u.name);
}); });
} else { } else {
this.getSelectItems().forEach(v => { this.getSelectItems().forEach((v) => {
names.push(v.label); names.push(v.label);
}); });
} }
return names; return names;
} },
}, },
computed: { computed: {
dic() { dic() {
let result = []; let result = [];
this.data.forEach(u => { this.data.forEach((u) => {
// result.push({ // result.push({
// value: u.id, // value: u.id,
// label: u.userName // label: u.userName
...@@ -324,43 +336,43 @@ export default { ...@@ -324,43 +336,43 @@ export default {
}, },
checkedItems() { checkedItems() {
var items = []; var items = [];
this.group.map(u => { this.group.map((u) => {
u.children.map(l => { u.children.map((l) => {
if (l.checked) { if (l.checked) {
items.push(l); items.push(l);
} }
}); });
}); });
return items; return items;
} },
}, },
filters: { filters: {
vvv: lis => { vvv: (lis) => {
return 3; return 3;
// return lis.filter(u=>{ // return lis.filter(u=>{
// return u.checked==true // return u.checked==true
// }).lenght; // }).lenght;
} },
}, },
watch: { watch: {
value: { value: {
handler(v, o) { handler(v, o) {
this.name = v; this.name = v;
}, },
deep: true deep: true,
}, },
departmentId: { departmentId: {
handler(v, o) { handler(v, o) {
this.getselectuser(v); this.getselectuser(v);
}, },
deep: true deep: true,
}, },
datas(v) { datas(v) {
if (v) { if (v) {
//alert(JSON.stringify(v)) //alert(JSON.stringify(v))
} }
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
return { return {
keys: "", keys: "",
expand: false, expand: false,
list: [] list: [],
}; };
}, },
created() { created() {
...@@ -45,19 +45,19 @@ export default { ...@@ -45,19 +45,19 @@ export default {
{ {
fieldName: "title", fieldName: "title",
fieldValue: name, fieldValue: name,
conditionalType: "Like" conditionalType: "Like",
} },
] ],
}; };
this.$api this.$api
.post(`${resourceUrl}/storeroomlocation/paged`, params) .post(`${resourceUrl}/storeroomlocation/paged`, params)
.then(r => { .then((r) => {
let res = r.result.items; let res = r.result.items;
var data = this.$u.toTree( var data = this.$u.toTree(
res, res,
0, 0,
u => { (u) => {
u.value=u.id u.value = u.id;
u.expand = true; u.expand = true;
u.selected = false; u.selected = false;
u.checked = false; u.checked = false;
...@@ -85,36 +85,39 @@ export default { ...@@ -85,36 +85,39 @@ export default {
"span", "span",
{ {
style: { style: {
color: "#000" color: "#000",
} },
}, },
data.title data.title
) ),
]); ]);
}, },
change(v, b) { change(v, b) {
// console.log(b); // console.log(b);
let ids = []; let ids = [];
let productIds = []; let rootName = [];
ids.push(b.id); ids.push(b.id);
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) => {
ids.push(u.id); ids.push(u.id);
productIds.push(u.value);
if (u.children) { if (u.children) {
addId(u.children); addId(u.children);
} }
}); });
} }
} }
this.$emit("on-select", b.bomId, b, productIds, ids); var roots = this.$u.findRoots(this.list, b.id).reverse();
rootName = roots.map((u) => {
return u.title;
});
this.$emit("on-select", b, ids, rootName);
}, },
hide() { hide() {
this.$emit("on-hide"); this.$emit("on-hide");
} },
}, },
computed: { computed: {
data() { data() {
...@@ -123,7 +126,7 @@ export default { ...@@ -123,7 +126,7 @@ export default {
let result = []; let result = [];
search(this.keys, items); search(this.keys, items);
function search(keys, data) { function search(keys, data) {
data.map(u => { data.map((u) => {
if (keys.length < 2) { if (keys.length < 2) {
u.expand = expand; u.expand = expand;
result.push(u); result.push(u);
...@@ -138,8 +141,8 @@ export default { ...@@ -138,8 +141,8 @@ export default {
}); });
} }
return result; return result;
} },
} },
}; };
</script> </script>
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('name')" prop="materialId"> <FormItem :label="l('name')" prop="materialId">
<Materiel v-model="entity.materialId" @on-change="change"></Materiel> <Materiel v-model="entity.materialId" @on-change="change" :materialType='materialType'></Materiel>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('storeTitle')" prop="storeId"> <FormItem :label="l('storeTitle')" prop="storeId">
<StoreSelect v-model="entity.storeId" @on-change="storeChange"></StoreSelect> <div style="color:#999">{{rootName}}</div>
<!-- <StoreSelect v-model="entity.storeId" @on-change="storeChange"></StoreSelect> -->
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -37,9 +38,7 @@ ...@@ -37,9 +38,7 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('creator')" prop="creator"> <FormItem :label="l('creator')" prop="creator">{{entity.creator}}</FormItem>
{{entity.creator}}
</FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
...@@ -75,7 +74,7 @@ export default { ...@@ -75,7 +74,7 @@ export default {
creator: this.$store.state.userInfo.userName, creator: this.$store.state.userInfo.userName,
unitPrice: null, unitPrice: null,
originalManufacturer: "", originalManufacturer: "",
remark: "" remark: "",
}, },
rules: { rules: {
materialId: [ materialId: [
...@@ -83,44 +82,49 @@ export default { ...@@ -83,44 +82,49 @@ export default {
required: true, required: true,
message: "请选择物料", message: "请选择物料",
type: "string", type: "string",
trigger: "change" trigger: "change",
} },
],
storeId: [
{
required: true,
message: "请选择库位",
type: "number",
trigger: "change"
}
], ],
// storeId: [
// {
// required: true,
// message: "请选择库位",
// type: "number",
// trigger: "change",
// },
// ],
total: [ total: [
{ {
required: true, required: true,
message: "请输入入库数量", message: "请输入入库数量",
type: "number", type: "number",
trigger: "change" trigger: "change",
} },
] ],
} },
}; };
}, },
props: { props: {
v: Object, // v: Object,
eid: Number eid: Number,
rootName: String,
storeTitle: String,
materialType: String,
}, },
mounted() { mounted() {
if (this.eid > 0) { // if (this.eid > 0) {
this.load(this.eid); // this.load(this.eid);
} // }
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate((v) => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.storeId = this.eid;
this.entity.storeTitle = this.storeTitle;
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then((r) => {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
...@@ -129,7 +133,7 @@ export default { ...@@ -129,7 +133,7 @@ export default {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
} }
}) })
.catch(err => { .catch((err) => {
this.disabled = false; this.disabled = false;
this.$Message.error("保存失败"); this.$Message.error("保存失败");
console.warn(err); console.warn(err);
...@@ -140,35 +144,36 @@ export default { ...@@ -140,35 +144,36 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
load(v) { // load(v) {
Api.get({ id: v }).then(r => { // Api.get({ id: v }).then((r) => {
this.entity = r.result; // this.entity = r.result;
this.entity.id = 0; // this.entity.id = 0;
}); // });
}, // },
change(e) { change(e) {
this.entity.name = e.name; this.entity.name = e.name;
this.entity.materialId = e.materialId; this.entity.materialId = e.materialId;
this.entity.materialCode = e.mmcode; this.entity.materialCode = e.mmcode;
}, },
storeChange(v, item) { // storeChange(v, item) {
this.entity.storeId = item.id; // console.log(item.id)
this.entity.storeTitle = item.title; // this.entity.storeId = item.id;
}, // this.entity.storeTitle = item.title;
// },
l(key) { l(key) {
key = "stock" + "." + key; key = "stock" + "." + key;
return this.$t(key); return this.$t(key);
} },
}, },
watch: { watch: {
v() { // v() {
this.entity = this.$u.clone(this.v); // this.entity = this.$u.clone(this.v);
// },
// eid(v) {
// if (v > 0) {
// this.load(v);
// }
// },
}, },
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
}; };
</script> </script>
...@@ -24,8 +24,18 @@ ...@@ -24,8 +24,18 @@
<Button type="primary" @click="add">入库</Button> <Button type="primary" @click="add">入库</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide :fullscreen="fscreeen"> <Modal v-model="modal" :title="title" width="900" footer-hide :fullscreen="fscreeen">
<component :is="detail" :eid="curId" :storeId="storeId" :mcode="mCode" @on-close="cancel" @on-ok="ok" /> <component
:is="detail"
:eid="curId"
:rootName="rootName"
:storeTitle="storeTitle"
:materialType="materialType"
:storeId="storeId"
:mcode="mCode"
@on-close="cancel"
@on-ok="ok"
/>
</Modal> </Modal>
</Content> </Content>
</Layout> </Layout>
...@@ -36,26 +46,29 @@ import Search from "./search"; ...@@ -36,26 +46,29 @@ import Search from "./search";
export default { export default {
name: "list", name: "list",
components: { components: {
Search Search,
}, },
head: { head: {
title: "库存表", title: "库存表",
author: "henq", author: "henq",
description: "stock 7/13/2020 11:48:09 AM" description: "stock 7/13/2020 11:48:09 AM",
}, },
data() { data() {
return { return {
action: Api.index, action: Api.index,
showMenu: true, showMenu: true,
easySearch: { easySearch: {
keys: { op: "name,storeTitle,materialCode", value: null } keys: { op: "name,storeTitle,materialCode", value: null },
}, },
fscreeen: false, fscreeen: false,
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
storeId:null, storeId: null,
rootName: "",
storeTitle: "",
materialType: "",
mCode: "", mCode: "",
columns: [ columns: [
{ {
...@@ -63,14 +76,14 @@ export default { ...@@ -63,14 +76,14 @@ export default {
title: this.l("name"), title: this.l("name"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "materialCode", key: "materialCode",
title: this.l("materialCode"), title: this.l("materialCode"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
key: "total", key: "total",
...@@ -88,13 +101,13 @@ export default { ...@@ -88,13 +101,13 @@ export default {
props: { props: {
content: "库存不足,总数小于" + minNum, content: "库存不足,总数小于" + minNum,
placement: "top", placement: "top",
disabled: params.row.total > minNum ? true : false disabled: params.row.total > minNum ? true : false,
}, },
class: params.row.total > minNum ? "" : "red" class: params.row.total > minNum ? "" : "red",
}, },
params.row.total params.row.total
); );
} },
}, },
{ {
key: "minNum", key: "minNum",
...@@ -103,14 +116,14 @@ export default { ...@@ -103,14 +116,14 @@ export default {
high: true, high: true,
render: (h, params) => { render: (h, params) => {
return h("div", {}, params.row.minNum ? params.row.minNum : "0"); return h("div", {}, params.row.minNum ? params.row.minNum : "0");
} },
}, },
{ {
key: "storeTitle", key: "storeTitle",
title: this.l("storeTitle"), title: this.l("storeTitle"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
}, },
{ {
title: "操作", title: "操作",
...@@ -125,18 +138,18 @@ export default { ...@@ -125,18 +138,18 @@ export default {
attrs: { attrs: {
oprate: "detail", oprate: "detail",
}, },
on: { click: () => this.setNum(params.row) } on: { click: () => this.setNum(params.row) },
}, },
"设置最低库存" "预警"
), ),
h( h(
"op", "op",
{ {
attrs: { oprate: "detail" }, attrs: { oprate: "detail" },
on: { click: () => this.view(params.row) } on: { click: () => this.view(params.row) },
}, },
"查看" "查看"
) ),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h( // h(
// "op", // "op",
...@@ -155,14 +168,14 @@ export default { ...@@ -155,14 +168,14 @@ export default {
// "删除" // "删除"
// ) // )
]); ]);
} },
} },
], ],
treeData: [], treeData: [],
ocolumn: [], ocolumn: [],
treeHeight: "", treeHeight: "",
ids: [], ids: [],
list: [] list: [],
}; };
}, },
created() { created() {
...@@ -193,11 +206,14 @@ export default { ...@@ -193,11 +206,14 @@ export default {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
add() { add() {
this.curId = 0; if (this.curId) {
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.fscreeen = false; this.fscreeen = false;
this.modal = true; this.modal = true;
} else {
this.$Message.error("请先选择库房库位");
}
}, },
copy(id) { copy(id) {
this.curId = id; this.curId = id;
...@@ -207,27 +223,27 @@ export default { ...@@ -207,27 +223,27 @@ export default {
}, },
view(row) { view(row) {
this.curId = row.id; this.curId = row.id;
this.storeId=row.storeId; this.storeId = row.storeId;
this.mCode = row.materialCode; this.mCode = row.materialCode;
this.title = "详情"; this.title = "详情";
this.detail = () => import("./itemIndex"); this.detail = () => import("./itemIndex");
this.fscreeen = true; this.fscreeen = true;
this.modal = true; this.modal = true;
}, },
edit(id) { // edit(id) {
this.curId = id; // this.curId = id;
this.title = "编辑"; // this.title = "编辑";
this.detail = () => import("./edit"); // this.detail = () => import("./edit");
this.modal = true; // this.modal = true;
}, // },
remove(id) { // remove(id) {
Api.delete(id).then(r => { // Api.delete(id).then((r) => {
if (r.success) { // if (r.success) {
this.$refs.grid.load(); // this.$refs.grid.load();
this.$Message.success("删除成功"); // this.$Message.success("删除成功");
} // }
}); // });
}, // },
cancel() { cancel() {
this.curId = 0; this.curId = 0;
this.modal = false; this.modal = false;
...@@ -240,13 +256,18 @@ export default { ...@@ -240,13 +256,18 @@ export default {
//this.$Message.info("展开左侧树") //this.$Message.info("展开左侧树")
this.showMenu = true; this.showMenu = true;
}, },
productSearch(id, item, productIds, ids) { productSearch(item, ids, rootName) {
console.log(item);
this.curId = item.id;
this.storeTitle = item.title;
this.rootName = rootName.join(" / ");
this.materialType = item.materialType;
let where = { storeId: { op: "In", value: ids } }; let where = { storeId: { op: "In", value: ids } };
this.$refs.grid.reload(where); this.$refs.grid.reload(where);
}, },
setNum(row) { setNum(row) {
this.curId = row.id; this.curId = row.id;
this.title = "设置最低库存"; this.title = "预警";
this.detail = () => import("./setNum"); this.detail = () => import("./setNum");
this.fscreeen = false; this.fscreeen = false;
this.modal = true; this.modal = true;
...@@ -258,7 +279,7 @@ export default { ...@@ -258,7 +279,7 @@ export default {
//new tree start //new tree start
initTree() { initTree() {
var sumData = []; var sumData = [];
this.$http.order.getallselecttree().then(res => { this.$http.order.getallselecttree().then((res) => {
//alert(JSON.stringify(res)) //alert(JSON.stringify(res))
if (res.result) { if (res.result) {
for (var i = 0; i < res.result.length; i++) { for (var i = 0; i < res.result.length; i++) {
...@@ -269,8 +290,8 @@ export default { ...@@ -269,8 +290,8 @@ export default {
this.$Message.error("加载产品树失败!"); this.$Message.error("加载产品树失败!");
} }
}); });
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -203,6 +203,7 @@ export default { ...@@ -203,6 +203,7 @@ export default {
}, },
proChange(id, data, listName, roots) { proChange(id, data, listName, roots) {
console.log(listName)
this.entity.levelId = id; this.entity.levelId = id;
this.entity.levelTitle = listName.join(" / "); this.entity.levelTitle = listName.join(" / ");
}, },
......
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