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/OutboundModal.vue | 64 +++++++++++++++++++++++++++---- 1 files changed, 55 insertions(+), 9 deletions(-) diff --git a/src/views/tms/modules/outBound/OutboundModal.vue b/src/views/tms/modules/outBound/OutboundModal.vue index da68089..7c8b4ec 100644 --- a/src/views/tms/modules/outBound/OutboundModal.vue +++ b/src/views/tms/modules/outBound/OutboundModal.vue @@ -32,7 +32,8 @@ </a-form-model> </a-spin> - <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectOutBoundTool">閫夋嫨鍑哄簱宸ュ叿</a-button> + <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectBorrowOutBoundTool">閫夋嫨鍑哄簱宸ュ叿</a-button> + <a-button v-show="selectSharpenTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectSharpenOutBoundTool">閫夋嫨鍒冪(宸ュ叿</a-button> <a-table ref="table" size="middle" @@ -55,6 +56,20 @@ @change="(e) => handleChange(e, record.key, col, index)" :min="1" /> + <a-input-number + v-if="col.dataIndex === 'ratedLife'" + :disabled="record.quantity > 1" + :value="text" + @change="(e) => handleChange(e, record.key, col, index)" + :min="1" + /> + <a-input-number + v-if="col.dataIndex === 'useLife'" + :disabled="record.quantity > 1" + :value="text" + @change="(e) => handleChange(e, record.key, col, index)" + :min="1" + /> </div> </template> <span slot="action" v-if="disableSubmit === false" slot-scope="text, record, index"> @@ -68,7 +83,8 @@ <a-button @click="handleOk" :disabled="isDisabled" type="primary">鍑哄簱</a-button> </template> - <j-select-outbound-tool-modal ref="selectOutBoundToolModal"></j-select-outbound-tool-modal> + <j-select-borrow-outbound-tool-modal ref="selectBorrowOutBoundToolModal"></j-select-borrow-outbound-tool-modal> + <j-select-sharpen-outbound-tool-modal ref="selectSharpenOutBoundToolModal"></j-select-sharpen-outbound-tool-modal> </j-modal> </template> @@ -77,7 +93,8 @@ import { validateDuplicateValue } from '@/utils/util' import OutboundDetailList from '../../OutboundDetailList.vue' -import JSelectOutboundToolModal from './JSelectOutboundToolModal.vue' +import JSelectBorrowOutboundToolModal from './JSelectBorrowOutboundToolModal.vue' +import JSelectSharpenOutboundToolModal from './JSelectSharpenOutboundToolModal.vue' import { postAction } from '../../../../api/manage' import title from 'ant-design-vue/lib/skeleton/Title' @@ -85,7 +102,8 @@ name: "OutboundOrderModal", components: { OutboundDetailList, - JSelectOutboundToolModal + JSelectBorrowOutboundToolModal, + JSelectSharpenOutboundToolModal }, data () { return { @@ -96,6 +114,7 @@ isDisabled: false, addShow: true, selectBorrowTool: false, + selectSharpenTool: false, model:{ }, labelCol: { @@ -157,6 +176,18 @@ align:"center", dataIndex: 'outboundLocation' }, + { + title:'棰濆畾瀵垮懡', + align:"center", + dataIndex: 'ratedLife', + scopedSlots: { customRender: 'ratedLife' }, + }, + { + title:'浣跨敤瀵垮懡', + align:"center", + dataIndex: 'useLife', + scopedSlots: { customRender: 'useLife' }, + }, // { // title:'鍑哄簱鐘舵��;1.鏈嚭搴擄紱2.閮ㄥ垎鍑哄簱锛�3.鍑哄簱瀹屾垚', // align:"center", @@ -195,6 +226,7 @@ for (let i = 0; i < data.length; i++) { this.dataSource.push({ id: data[i].id, + toolLedgerDetailId: data[i].toolLedgerDetailId, toolCode:data[i].toolCode, toolNum:data[i].toolNum, toolId: data[i].toolId, @@ -212,15 +244,23 @@ handleTypeChange(value) { if (value === '1') { this.selectBorrowTool = true + this.selectSharpenTool = false + this.dataSource = [] } if (value === '2') { this.selectBorrowTool = false + this.selectSharpenTool = false + this.dataSource = [] } if (value === '3') { this.selectBorrowTool = false + this.selectSharpenTool = false + this.dataSource = [] } if (value === '4') { this.selectBorrowTool = false + this.selectSharpenTool = true + this.dataSource = [] } }, handleDelete(record, index) { @@ -244,10 +284,15 @@ this.dataSource = temp } }, - selectOutBoundTool() { + selectBorrowOutBoundTool() { console.log(this.dataSource) let ids = this.dataSource.map(item => item.id).join(',') - this.$refs.selectOutBoundToolModal.showModal(ids, this.classifyId) + this.$refs.selectBorrowOutBoundToolModal.showModal(ids, this.classifyId) + }, + selectSharpenOutBoundTool() { + console.log(this.dataSource) + let ids = this.dataSource.map(item => item.id).join(',') + this.$refs.selectSharpenOutBoundToolModal.showModal(ids, this.classifyId) }, add (nodeSelected) { this.addShow = false @@ -278,15 +323,16 @@ } const params = this.dataSource.map(item => { return { - toolLedgerDetailId: item.id, + toolLedgerDetailId: item.toolLedgerDetailId, toolCode: item.toolCode, toolId: item.toolId, outboundQuantity: item.outboundQuantity, outStorehouseType: this.model.outStorehouseType, - storageLocation: item.storageLocation + storageLocation: item.storageLocation, + ratedLife:item.ratedLife, + useLife:item.useLife } }) - console.log(params) this.confirmLoading = true; postAction(this.url.outbound, params).then((res)=>{ if(res.success){ -- Gitblit v1.9.3