From a01a0b502447a0ca0a45f1849cde4f0bed1ef1f8 Mon Sep 17 00:00:00 2001 From: houjie <714924425@qq.com> Date: 星期六, 19 八月 2023 18:03:34 +0800 Subject: [PATCH] 备品备件:调整 部门 --- src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue index 9dd0fa8..d9abc99 100644 --- a/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue +++ b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue @@ -39,11 +39,19 @@ dictCode="sys_depart,depart_name,id,del_flag!='1'" v-decorator="['departId', validatorRules.departId]" />--> - <a-select +<!-- <a-select :placeholder="'璇烽�夋嫨棰嗙敤閮ㄩ棬'" :options="this.departs" :disabled="disableSubmit" style="width: 100%" + v-model='model.departId' + />--> + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨棰嗙敤閮ㄩ棬" + tree-default-expand-all v-model='model.departId' /> </a-form-item> @@ -172,6 +180,7 @@ data() { return { departId:[], + treeData:[], columns: [ { title: '#', @@ -310,6 +319,7 @@ url: { add: '/spare/sparePartCancellingStocks/add', getSysDeparts: "/eam/equipment/getSysDeparts", + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', edit: '/spare/sparePartCancellingStocks/edit' }, @@ -350,10 +360,18 @@ }) }, created() { - this.getSysDeparts() }, methods: { + initOptions() { + getAction(this.url.loadOptions).then(res => { + if (res.success) { + this.treeData = res.result + } else { + this.$message.warning(res.message) + } + }) + }, getSysDeparts() { getAction(this.url.getSysDeparts).then((res) => { if (res.success) { @@ -387,6 +405,7 @@ that.form.resetFields() that.model = Object.assign({}, record) that.visible = true + that.initOptions() that.warehouseId = record.warehouseId if (record.sparePartCancellingStocksDetailList != undefined) { const temp = [...record.sparePartCancellingStocksDetailList] -- Gitblit v1.9.3