From d143229425261196520641bff9d2aaf14bfe9013 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期四, 05 六月 2025 17:22:04 +0800 Subject: [PATCH] 工具管理-增加刃磨出库 --- src/views/tms/modules/outBound/OutboundModal.vue | 34 +++++++++++++---- src/views/tms/modules/outBound/JSelectSharpenOutboundToolModal.vue | 6 +-- src/views/tms/modules/outBound/OutboundOrderModal.vue | 37 +++++++++++++++--- src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue | 4 +- 4 files changed, 61 insertions(+), 20 deletions(-) diff --git a/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue b/src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue similarity index 98% rename from src/views/tms/modules/outBound/JSelectOutboundToolModal.vue rename to src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue index 91b2cbb..db9be59 100644 --- a/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue +++ b/src/views/tms/modules/outBound/JSelectBorrowOutboundToolModal.vue @@ -45,7 +45,7 @@ import { getAction } from '@api/manage' export default { - name: 'JSelectOutboundToolModal', + name: 'JSelectBorrowOutboundToolModal', components: {}, props: {}, data() { @@ -127,7 +127,7 @@ loading: false, prepareKnifeDetailList:[], url: { - list: '/tms/toolLedgerDetail/list' + list: '/tms/outboundOrder/selectBorrowOutboundToolPageList' }, } }, diff --git a/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue b/src/views/tms/modules/outBound/JSelectSharpenOutboundToolModal.vue similarity index 97% copy from src/views/tms/modules/outBound/JSelectOutboundToolModal.vue copy to src/views/tms/modules/outBound/JSelectSharpenOutboundToolModal.vue index 91b2cbb..1e6c7b6 100644 --- a/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue +++ b/src/views/tms/modules/outBound/JSelectSharpenOutboundToolModal.vue @@ -45,7 +45,7 @@ import { getAction } from '@api/manage' export default { - name: 'JSelectOutboundToolModal', + name: 'JSelectSharpenOutboundToolModal', components: {}, props: {}, data() { @@ -127,7 +127,7 @@ loading: false, prepareKnifeDetailList:[], url: { - list: '/tms/toolLedgerDetail/list' + list: '/tms/outboundOrder/selectSharpenOutboundToolPageList' }, } }, @@ -171,7 +171,6 @@ }) }, showModal(oldSelectRow, classifyId) { - this.oldSelectRow = oldSelectRow this.visible = true this.queryParam.quantity = 0 this.queryParam.classifyId = classifyId @@ -181,7 +180,6 @@ showOrderModal(oldSelectRow) { this.oldSelectRow = oldSelectRow this.visible = true - this.queryParam.quantity = 0 this.queryParam.excludeIds = oldSelectRow this.loadData(1) }, diff --git a/src/views/tms/modules/outBound/OutboundModal.vue b/src/views/tms/modules/outBound/OutboundModal.vue index da68089..a0e748a 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" @@ -68,7 +69,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 +79,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 +88,8 @@ name: "OutboundOrderModal", components: { OutboundDetailList, - JSelectOutboundToolModal + JSelectBorrowOutboundToolModal, + JSelectSharpenOutboundToolModal }, data () { return { @@ -96,6 +100,7 @@ isDisabled: false, addShow: true, selectBorrowTool: false, + selectSharpenTool: false, model:{ }, labelCol: { @@ -195,6 +200,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 +218,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 +258,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,7 +297,7 @@ } const params = this.dataSource.map(item => { return { - toolLedgerDetailId: item.id, + toolLedgerDetailId: item.toolLedgerDetailId, toolCode: item.toolCode, toolId: item.toolId, outboundQuantity: item.outboundQuantity, @@ -286,7 +305,6 @@ storageLocation: item.storageLocation } }) - console.log(params) this.confirmLoading = true; postAction(this.url.outbound, params).then((res)=>{ if(res.success){ diff --git a/src/views/tms/modules/outBound/OutboundOrderModal.vue b/src/views/tms/modules/outBound/OutboundOrderModal.vue index e098380..0f9135b 100644 --- a/src/views/tms/modules/outBound/OutboundOrderModal.vue +++ b/src/views/tms/modules/outBound/OutboundOrderModal.vue @@ -75,7 +75,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" @@ -111,7 +112,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> @@ -121,7 +123,8 @@ import { httpAction } from '@/api/manage' 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 { getAction } from '../../../../api/manage' import title from 'ant-design-vue/lib/skeleton/Title' @@ -129,7 +132,8 @@ name: "OutboundOrderModal", components: { OutboundDetailList, - JSelectOutboundToolModal + JSelectBorrowOutboundToolModal, + JSelectSharpenOutboundToolModal }, data () { return { @@ -140,6 +144,7 @@ isDisabled: false, addShow: true, selectBorrowTool: false, + selectSharpenTool: false, model:{ }, labelCol: { @@ -264,15 +269,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) { @@ -296,7 +309,7 @@ this.dataSource = temp } }, - selectOutBoundTool() { + selectBorrowOutBoundTool() { console.log(this.dataSource) let ids = '' if (this.title === '鏂板') { @@ -305,7 +318,18 @@ if (this.title === '缂栬緫') { ids = this.dataSource.map(item => item.toolLedgerDetailId).join(',') } - this.$refs.selectOutBoundToolModal.showOrderModal(ids) + this.$refs.selectBorrowOutBoundToolModal.showOrderModal(ids) + }, + selectSharpenOutBoundTool() { + console.log(this.dataSource) + let ids = '' + if (this.title === '鏂板') { + ids = this.dataSource.map(item => item.id).join(',') + } + if (this.title === '缂栬緫') { + ids = this.dataSource.map(item => item.toolSharpeningId).join(',') + } + this.$refs.selectSharpenOutBoundToolModal.showOrderModal(ids) }, add () { this.addShow = false @@ -344,6 +368,7 @@ this.$emit('close'); this.addShow = true this.selectBorrowTool = false + this.selectSharpenTool = false this.visible = false; this.$refs.form.clearValidate(); }, -- Gitblit v1.9.3