From ba15d76ff0ec80ee759913511158d4333f6e6c59 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期五, 29 八月 2025 18:21:22 +0800 Subject: [PATCH] 日常业务问题修改、工具参数查询增加 --- src/views/tms/modules/inboundOrder/JSelectToolingModal.vue | 63 +++++++++++++++++++++++++------ 1 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue b/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue index 0ccb752..6b8595c 100644 --- a/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue +++ b/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue @@ -20,13 +20,13 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="涓枃鍚嶇О"> - <a-input placeholder="璇疯緭鍏ヤ腑鏂囧悕绉�,鏀寔妯$硦鏌ヨ" v-model="queryParam.chineseName"></a-input> + <a-form-item label="鏍囪"> + <a-input placeholder="璇疯緭鍏ユ爣璁�,鏀寔妯$硦鏌ヨ" v-model="queryParam.groupCompanySign"></a-input> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鍨嬪彿/鍥惧彿"> - <a-input placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�,鏀寔妯$硦鏌ヨ" v-model="queryParam.toolModel"></a-input> + <a-form-item label="宸ュ叿绠�绉�"> + <a-input placeholder="璇疯緭鍏ュ伐鍏风畝绉�" v-model="queryParam.shortCalled"></a-input> </a-form-item> </a-col> @@ -60,7 +60,11 @@ export default { name: 'JSelectToolingModal', components: {}, - props: {}, + props: { + classifyId:{ + type:String + } + }, data() { return { queryParam: {}, @@ -79,25 +83,36 @@ title: '宸ュ叿缂栫爜', align: 'center', dataIndex: 'toolCode', - sorter: true, }, { title: '宸ュ叿鍚嶇О', align: 'center', dataIndex: 'chineseName', - sorter: true, }, { - title: '宸ュ叿绫诲瀷', + title: '宸ュ叿绠�绉�', align: 'center', - dataIndex: 'applicationTypeName', - sorter: true, + dataIndex: 'shortCalled', + }, + { + title: '鏍囪', + align: 'center', + dataIndex: 'groupCompanySign', + }, + { + title: '搴撲綅鍙�', + align: 'center', + dataIndex: 'positionCode', }, { title: '鍨嬪彿/鍥惧彿', align: 'center', dataIndex: 'toolModel', - sorter: true, + }, + { + title: '宸ュ叿绫诲瀷', + align: 'center', + dataIndex: 'applicationTypeName', }, ], selectedRowKeys: [], @@ -105,6 +120,7 @@ scrollTrigger: {}, dataSource: [], selectionRows: [], + allSelectionRows: [], title: '鏍规嵁鏌ヨ缁撴灉閫夋嫨宸ュ叿', ipagination: { current: 1, @@ -134,7 +150,10 @@ rowSelection() { return { type: 'checkbox', + selectedRowKeys: this.selectedRowKeys, onChange: (selectedRowKeys, selectedRows) => { + //鏇存柊璺ㄩ〉閫変腑鐘舵�� + this.updateSelection(selectedRows); this.selectedRowKeys = selectedRowKeys this.onSelectChange(selectedRows) }, @@ -150,6 +169,22 @@ watch: {}, created() {}, methods: { + // 鏇存柊璺ㄩ〉閫変腑鐘舵�� + updateSelection(selectedRows) { + // 鑾峰彇褰撳墠椤垫墍鏈夎鐨処D + const currentPageIds = this.dataSource.map(item => item.id); + + // 1. 绉婚櫎褰撳墠椤典箣鍓嶇殑閫夋嫨 + this.allSelectionRows = this.allSelectionRows.filter( + row => !currentPageIds.includes(row.id) + ); + + // 2. 娣诲姞褰撳墠椤垫柊閫夋嫨鐨勮 + this.allSelectionRows = [...this.allSelectionRows, ...selectedRows]; + + // 3. 鏇存柊閫変腑keys + this.selectedRowKeys = this.allSelectionRows.map(row => row.id); + }, async loadData(arg) { if (arg === 1) { this.ipagination.current = 1 @@ -157,6 +192,7 @@ let that = this this.loading = true let params = this.getQueryParams() //鏌ヨ鏉′欢 + params.classifyId = this.classifyId await getAction(this.url.list, params).then((res) => { if (res.success) { for (let i = 0; i < res.result.records.length; i++) { @@ -177,6 +213,9 @@ }, showModal(oldSlelectRows) { this.oldSlelectRows = oldSlelectRows + //閲嶇疆璺ㄩ〉閫夋嫨鐘舵�� + this.allSelectionRows = []; + this.selectedRowKeys = []; this.visible = true this.loadData(1) }, @@ -217,7 +256,7 @@ this.loadData() }, handleSubmit() { - this.$bus.$emit('selectionRows', this.selectionRows) + this.$bus.$emit('selectionRows', this.allSelectionRows); this.searchReset(0) this.close() }, -- Gitblit v1.9.3