From 34d3d8cd5a7fb78d829b6fe0b61fd7491f7465e2 Mon Sep 17 00:00:00 2001 From: zhaoxiaomin <1912125868@qq.com> Date: Thu, 30 May 2024 14:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warehousing/otherStore/index.vue | 37 ++++++++-------------- 1 file changed, 13 insertions(+), 24 deletions(-) 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() },