From da5bd5596b1f0f7a27cd0791a17a7fc3b608f523 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期三, 07 五月 2025 18:10:24 +0800 Subject: [PATCH] 工具管理-仓库管理页面开发 --- src/views/tms/modules/WarehouseForm.vue | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/views/tms/modules/WarehouseForm.vue b/src/views/tms/modules/WarehouseForm.vue index 2ff4a66..395abe5 100644 --- a/src/views/tms/modules/WarehouseForm.vue +++ b/src/views/tms/modules/WarehouseForm.vue @@ -4,13 +4,13 @@ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-row> <a-col :span="12"> - <a-form-model-item label="鐖惰妭鐐圭紪鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parentId"> - <a-input v-model="model.parentId" placeholder="璇疯緭鍏ョ埗鑺傜偣缂栧彿" ></a-input> + <a-form-model-item label="鐖惰妭鐐圭紪鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="true" v-model="model.parentWarehouseId" placeholder="璇疯緭鍏ョ埗鑺傜偣缂栧彿" ></a-input> </a-form-model-item> </a-col> <a-col :span="12"> - <a-form-model-item label="鐖惰妭鐐瑰悕绉�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parentName"> - <a-input v-model="model.parentName" placeholder="璇疯緭鍏ョ埗鑺傜偣鍚嶇О" ></a-input> + <a-form-model-item label="鐖惰妭鐐瑰悕绉�" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-input :disabled="true" v-model="model.parentWarehouseName" placeholder="璇疯緭鍏ョ埗鑺傜偣鍚嶇О" ></a-input> </a-form-model-item> </a-col> <a-col :span="12"> @@ -25,9 +25,9 @@ </a-col> <a-col :span="12"> <a-form-model-item label="鍙跺瓙鑺傜偣鏍囪瘑" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leafFlag"> - <a-radio-group v-model="model.leafFlag" @change="onChange" placeholder="璇烽�夋嫨鏄惁鍙跺瓙鑺傜偣"> - <a-radio :value="2">鏈夊瓙鑺傜偣</a-radio> - <a-radio :value="1">鏄彾瀛愯妭鐐�</a-radio> + <a-radio-group v-model="model.leafFlag" placeholder="璇烽�夋嫨鏄惁鍙跺瓙鑺傜偣"> + <a-radio :value="'2'">鏈夊瓙鑺傜偣</a-radio> + <a-radio :value="'1'">鏄彾瀛愯妭鐐�</a-radio> </a-radio-group> </a-form-model-item> </a-col> @@ -70,7 +70,7 @@ }, labelCol: { xs: { span: 24 }, - sm: { span: 5 }, + sm: { span: 8 }, }, wrapperCol: { xs: { span: 24 }, @@ -111,7 +111,10 @@ this.modelDefault = JSON.parse(JSON.stringify(this.model)); }, methods: { - add () { + add (treeSelected) { + this.modelDefault.parentId = treeSelected.key + this.modelDefault.parentWarehouseId = treeSelected.entity.warehouseId + this.modelDefault.parentWarehouseName = treeSelected.entity.warehouseName this.edit(this.modelDefault); }, edit (record) { @@ -129,10 +132,12 @@ if(!this.model.id){ httpurl+=this.url.add; method = 'post'; + this.model.status = '1' }else{ httpurl+=this.url.edit; method = 'put'; } + console.log(this.model) httpAction(httpurl,this.model,method).then((res)=>{ if(res.success){ that.$message.success(res.message); -- Gitblit v1.9.3