From 34feb4908ec7b7e5b51adf6355603978c67bd3a4 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期四, 05 六月 2025 09:53:14 +0800 Subject: [PATCH] 申请单入库 --- src/views/tms/lossBound/modules/LossboundModal.vue | 73 ++++++++++++++++++++---------------- 1 files changed, 40 insertions(+), 33 deletions(-) diff --git a/src/views/tms/lossBound/modules/LossboundModal.vue b/src/views/tms/lossBound/modules/LossboundModal.vue index 62782be..2017454 100644 --- a/src/views/tms/lossBound/modules/LossboundModal.vue +++ b/src/views/tms/lossBound/modules/LossboundModal.vue @@ -13,7 +13,7 @@ <a-row> <a-col :span="12"> <a-form-model-item label="鎶ユ崯鍗曞崟鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode"> - <a-input v-model="model.orderCode" placeholder="绯荤粺鑷姩鐢熸垚" :disabled="true"></a-input> + <j-input v-model="model.orderCode" placeholder="绯荤粺鑷姩鐢熸垚" :disabled="true"></j-input> </a-form-model-item> </a-col> <a-col :span="12"> @@ -28,7 +28,7 @@ <a-col :span="12"> <a-form-model-item label="鎶ユ崯鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lossTime"> - <j-date placeholder="璇烽�夋嫨鎶ユ崯鏃堕棿" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.lossTime" + <j-date placeholder="璇烽�夋嫨鎶ユ崯鏃堕棿" :disabled="disableSubmit" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.lossTime" style="width: 100%" /> </a-form-model-item> </a-col> @@ -66,7 +66,7 @@ <a-form-model-item v-if="addShow" label="瀹℃牳鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalDate"> - <j-date placeholder="璇烽�夋嫨瀹℃牳鏃堕棿" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.approvalDate" + <j-date placeholder="璇烽�夋嫨瀹℃牳鏃堕棿" :disabled="disableSubmit" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.approvalDate" style="width: 100%" /> </a-form-model-item> </a-col> @@ -96,7 +96,7 @@ </a-form-model> </a-spin> - <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTools"> + <a-button type="primary" :style="{ marginBottom: '8px' }" :disabled="disableSubmit" @click="selectTools"> 閫夋嫨宸ュ叿 </a-button> <a-table @@ -205,7 +205,21 @@ align: 'center', width: 150 }, + { + title: '鎶ユ崯鍘熷洜', + width: 150, + dataIndex: 'lossReason', + align: 'center', + scopedSlots: { customRender: 'lossReason' } + }, + { + title: '鎶ユ崯鏁伴噺', + dataIndex: 'lossNumber', + align: 'center', + width: 150, + scopedSlots: { customRender: 'lossNumber' } + }, { title: '涓枃鍚嶇О', dataIndex: 'chineseName', @@ -245,21 +259,7 @@ dataIndex: 'goodsShelvesId', align: 'center' }, - { - title: '鎶ユ崯鍘熷洜', - width: 150, - dataIndex: 'lossReason', - align: 'center', - scopedSlots: { customRender: 'lossReason' } - }, - { - title: '鎶ユ崯鏁伴噺', - dataIndex: 'lossNumber', - align: 'center', - width: 150, - scopedSlots: { customRender: 'lossNumber' } - }, { title: '澶囨敞', @@ -355,27 +355,34 @@ }, add() { this.addShow = false - this.edit() + this.edit({}) // 浼犲叆绌哄璞′綔涓洪粯璁ゅ�� this.dataSource = [] }, edit(record) { console.log(record) - this.model = Object.assign({}, record) - this.visible = true - getAction(this.url.list, { - lossBoundId: record.id, - pageNo: 1, - pageSize: 99999 - }).then((res) => { - if (res.success) { - console.log(res.result.records) - this.dataSource = res.result.records - } else { - this.dataSource = null - } - }) + if (record && record.id) { + this.model = Object.assign({}, record) + this.visible = true + getAction(this.url.list, { + lossBoundId: record.id, + pageNo: 1, + pageSize: 99999 + }).then((res) => { + if (res.success) { + console.log(res.result.records) + this.dataSource = res.result.records + } else { + this.dataSource = null + } + }) + } else { + this.model = {} // 濡傛灉鏄柊澧炴ā寮忥紝鍒欏垵濮嬪寲 model + this.visible = true + this.dataSource = [] // 娓呯┖鏁版嵁婧� + } }, + close() { this.$emit('close') this.addShow = true -- Gitblit v1.9.3