From 6ca4af64eda4d827adbe4cf4b5208b4e844ebddf Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期一, 28 七月 2025 16:19:05 +0800 Subject: [PATCH] 工具入库-选择申请单入库,选择入库单后查寻得却是所有入库单明细 --- src/views/tms/modules/outBound/OutboundDetailSelectList.vue | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/views/tms/modules/outBound/OutboundDetailSelectList.vue b/src/views/tms/modules/outBound/OutboundDetailSelectList.vue index 6ba9e73..6953efe 100644 --- a/src/views/tms/modules/outBound/OutboundDetailSelectList.vue +++ b/src/views/tms/modules/outBound/OutboundDetailSelectList.vue @@ -14,6 +14,26 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" @change="handleTableChange"> + <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> + <div :key="col.dataIndex"> + + <a-input-number + v-if="col.dataIndex === 'ratedLife'" + :disabled="record.accuracyClass != '1'" + :value="text" + @change="(e) => handleChange(e, record.key, col, index)" + :min="1" + /> + <a-input-number + v-if="col.dataIndex === 'useLife'" + :disabled="record.accuracyClass != '1'" + :value="text" + @change="(e) => handleChange(e, record.key, col, index)" + :min="1" + /> + </div> + </template> + <span slot="action" slot-scope="text, record"> <a @click="handleOutbound(record)">鍑哄簱</a> </span> @@ -101,6 +121,18 @@ align:"left", dataIndex: 'outboundQuantity' }, + { + title:'棰濆畾瀵垮懡', + align:"center", + dataIndex: 'ratedLife', + scopedSlots: { customRender: 'ratedLife' }, + }, + { + title:'浣跨敤瀵垮懡', + align:"center", + dataIndex: 'useLife', + scopedSlots: { customRender: 'useLife' }, + }, // { // title:'宸插嚭搴撴暟閲�', // align:"left", @@ -157,7 +189,7 @@ ], url: { list: "/tms/outboundOrder/listOutboundDetailByMainId", - outbound: "/tms/outboundOrder/outBound", + outbound: "/tms/outboundOrder/outBoundByApply", delete: "/tms/outboundOrder/deleteOutboundDetail", deleteBatch: "/tms/outboundOrder/deleteBatchOutboundDetail", exportXlsUrl: "/tms/outboundOrder/exportOutboundDetail", @@ -193,7 +225,9 @@ { outBoundOrderId: this.mainId, outboundDetailId: record.id, - outboundQuantity: record.outboundQuantity + outboundQuantity: record.outboundQuantity, + ratedLife:record.ratedLife, + useLife:record.useLife } ] postAction(this.url.outbound, params).then(res=>{ @@ -205,7 +239,17 @@ this.$message } }) - } + }, + handleChange(value, key, column, index) { + console.log(value, key, column, index) + const temp = [...this.dataSource] + const target = temp.filter(item => key === item.key)[index]; + if (target) { + target[column.dataIndex] = value + this.dataSource = temp + } + }, + } } -- Gitblit v1.9.3