From 55abd3e2adf7585fb4597a6227336f0a0550f1ba Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期四, 21 八月 2025 09:06:44 +0800 Subject: [PATCH] 工具信息、工具台账、出入库申请增加参数查询 --- src/views/tms/modules/inboundOrder/JSelectToolingModal.vue | 65 ++++++++++++++++++++++++++------ 1 files changed, 52 insertions(+), 13 deletions(-) diff --git a/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue b/src/views/tms/modules/inboundOrder/JSelectToolingModal.vue index 0ccb752..049dc6f 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, @@ -126,7 +142,7 @@ loading: false, url: { // list: '/base/tooling/list', - list: '/tms/baseTools/paraCommonToolList', + list: '/tms/baseTools/selectToolList', }, } }, @@ -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