From ecd5f28ec3dd41d74f6da96b92e32c600e2cf3d1 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期二, 22 八月 2023 15:10:29 +0800 Subject: [PATCH] 小修改 --- src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue | 36 ++++++++++++++++++++++++++++++++---- 1 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue b/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue index db933a6..16740e3 100644 --- a/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue +++ b/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue @@ -20,6 +20,7 @@ > <a-input placeholder="璇疯緭鐢宠鍗曠紪鐮�" + :disabled="disableSubmit" v-decorator="['num', validatorRules.num]" /> </a-form-item> @@ -30,12 +31,21 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-select + <a-tree-select + style="width: 100%" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" + :tree-data="treeData" + placeholder="璇烽�夋嫨棰嗙敤閮ㄩ棬" + tree-default-expand-all + v-decorator="['departId', validatorRules.departId]" + /> +<!-- <a-select :placeholder="'璇烽�夋嫨棰嗙敤閮ㄩ棬'" + :disabled="disableSubmit" :options="this.departs" style="width: 100%" v-decorator="['departId', validatorRules.departId]" - /> + />--> <!-- <j-dict-select-tag allow-clear :disabled="disableSubmit" @@ -85,6 +95,7 @@ </a-spin> <a-button type="primary" + :disabled="disableSubmit" :style="{ marginRight: '8px',marginBottom:'8px' }" :loading="confirmLoading" @click="selectSparePartInventory()" @@ -106,8 +117,10 @@ <div :key="col.dataIndex"> <a-input-number :value="text" + v-if="col.dataIndex == 'outboundMainQuantity'" :min="0" + :disabled="disableSubmit" :max="record.mainQuantity" @change="(e)=>handleChange(e, record.key, col, index)" /> @@ -117,9 +130,12 @@ <span slot="action" slot-scope="text, record, index" + > <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + :disabled="disableSubmit" @confirm="() => handleDelete(text,record, index)" > <a>鍒犻櫎</a> @@ -136,6 +152,7 @@ <a-button @click="handleOk()" + :disabled="disableSubmit" type="primary" :loading="confirmLoading" >纭畾</a-button> @@ -162,6 +179,8 @@ }, data() { return { + disabled:false, + treeData:[], departs: [], columns: [ { @@ -307,6 +326,7 @@ }, url: { add: "/spare/sparePartOutbound/add", + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', getSysDeparts: "/eam/equipment/getSysDeparts", edit: "/spare/sparePartOutbound/edit", }, @@ -348,7 +368,6 @@ }, created() { - this.getSysDeparts(); }, methods: { getSysDeparts() { @@ -384,6 +403,7 @@ that.form.resetFields(); that.model = Object.assign({}, record); that.visible = true; + that.initOptions() that.warehouseId = record.warehouseId if (record.sparePartOutboundDetailList != undefined) { const temp = [...record.sparePartOutboundDetailList]; @@ -398,7 +418,15 @@ this.codeDisable = false; } }, - + initOptions() { + getAction(this.url.loadOptions).then(res => { + if (res.success) { + this.treeData = res.result + } else { + this.$message.warning(res.message) + } + }) + }, close() { this.$emit('close'); this.visible = false; -- Gitblit v1.9.3