From aa2f510e46e826b9851f9b5d21e642134d63e956 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期一, 16 六月 2025 10:50:10 +0800 Subject: [PATCH] 刀具寿命 --- src/views/tms/modules/outBound/OutboundDetailSelectList.vue | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/views/tms/modules/outBound/OutboundDetailSelectList.vue b/src/views/tms/modules/outBound/OutboundDetailSelectList.vue index 2d7a3d3..f0e82a2 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.outboundQuantity > 1" + :value="text" + @change="(e) => handleChange(e, record.key, col, index)" + :min="1" + /> + <a-input-number + v-if="col.dataIndex === 'useLife'" + :disabled="record.outboundQuantity > 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", @@ -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