diff --git a/src/views/warehousing/otherStore/index.vue b/src/views/warehousing/otherStore/index.vue index 5fd605c..6e59b5c 100644 --- a/src/views/warehousing/otherStore/index.vue +++ b/src/views/warehousing/otherStore/index.vue @@ -128,7 +128,7 @@ import {getBranchList, InitInOrder} from "@/api/system/branch"; import {getGoods} from "@/api/basicData/goods"; export default { name: "index", - dicts: ["goods_classify"], + dicts: ["goods_classify","good_class"], data() { const _that=this return { @@ -192,28 +192,7 @@ export default { chooselist:[], classifyList:[{ label: '物料分类', - children: [{ - label: '成品', - id:110 - },{ - label: '铝合金锭', - id:100 - },{ - label: '锌合金锭', - id:101 - },{ - label: '模具配件', - id:111 - },{ - label: '配件', - id:102 - },{ - label: '辅料', - id:108 - },{ - label: '模具', - id:101 - }] + children: [] }], defaultProps: { children: 'children', @@ -222,13 +201,23 @@ export default { }; }, mounted() { + // 物料分类的树结构 + this.getDicts("good_class").then((res)=>{ + res.data.forEach((item) => { + let newItem = { + label: item.dictLabel, + value: item.dictValue + }; + this.classifyList[0].children.push(newItem); + }) + }) this.getBranchList() this.queryTable() }, methods: { //商品分类点击某个(树) handleNodeClick(data) { - this.searchForm.chiff=data.id + this.searchForm.chiff=data.value this.paging.page=1 this.queryTable() },