From b6d89c86d31ad156185893659913b92e4631d25c Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 21 八月 2025 17:35:49 +0800 Subject: [PATCH] 1、产品质量隐患确认表批量打印及导出功能 2、调整点检和二保批量打印功能代码 --- src/views/eam/repair/EamReportProductHazardsList.vue | 140 ++++++++++++++++++++++------------------------ 1 files changed, 67 insertions(+), 73 deletions(-) diff --git a/src/views/eam/repair/EamReportProductHazardsList.vue b/src/views/eam/repair/EamReportProductHazardsList.vue index 4aefc27..24e6ddc 100644 --- a/src/views/eam/repair/EamReportProductHazardsList.vue +++ b/src/views/eam/repair/EamReportProductHazardsList.vue @@ -35,38 +35,22 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> -<!-- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>--> -<!-- <a-button type="primary" icon="download" @click="handleExportXls('浜у搧瀹夊叏闅愭偅纭')">瀵煎嚭</a-button>--> -<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> -<!-- <a-button type="primary" icon="import">瀵煎叆</a-button>--> -<!-- </a-upload>--> - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> - </a-dropdown> + <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">鎵归噺棰勮 + </a-button> + <a-button icon="delete" type="danger" @click="batchDel" :disabled="selectedRowKeys.length===0">鎵归噺鍒犻櫎</a-button> </div> <!-- table鍖哄煙-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> - <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ + selectedRowKeys.length }}</a>椤� <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> </div> - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - :scroll="{x:'max-content'}" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> <template v-if="record.confirmStatus==='PENDING_SUBMIT'"> @@ -94,7 +78,10 @@ <!--瀹℃壒绐楀彛--> <report-product-hazards-approval-modal ref="reportProductHazardsApprovalModal" - :selectShenpiData="selectedRowData"/> + :selectShenpiData="selectedRowData"/> + + <!--鎵归噺鎵撳嵃寮圭獥--> + <eam-product-hazards-batch-print-modal ref="batchPrintModal"/> </a-card> </template> @@ -102,15 +89,17 @@ import '@/assets/less/TableExpand.less' import EamReportProductHazardsModal from './modules/EamReportProductHazardsModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import {getAction} from "@api/manage"; + import { getAction } from '@api/manage' import ReportProductHazardsApprovalModal - from "@views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue"; - import LxSearchEquipmentSelect from "@views/eam/equipment/modules/LxSearchEquipmentSelect.vue"; + from '@views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import EamProductHazardsBatchPrintModal from './modules/EamProductHazardsBatchPrintModal' export default { - name: "EamReportProductHazardsList", - mixins:[JeecgListMixin], + name: 'EamReportProductHazardsList', + mixins: [JeecgListMixin], components: { + EamProductHazardsBatchPrintModal, LxSearchEquipmentSelect, ReportProductHazardsApprovalModal, EamReportProductHazardsModal @@ -124,7 +113,7 @@ type: Object } }, - data () { + data() { return { description: '浜у搧瀹夊叏闅愭偅纭绠$悊椤甸潰', disableMixinCreated: true, @@ -181,74 +170,74 @@ align: 'center', dataIndex: 'quantity' }, - { + { title: '鎿嶄綔宸�', - align:"center", + align: 'center', dataIndex: 'confirmer_dictText' - }, - { + }, + { title: '鎿嶄綔宸ョ‘璁ゆ椂闂�', - align:"center", + align: 'center', dataIndex: 'confirmTime' - }, - { + }, + { title: '浜у搧鎹熷け鎯呭喌', - align:"center", + align: 'center', dataIndex: 'productLoss_dictText' - }, - { + }, + { title: '浜у搧鎹熷け璐ㄩ噺褰卞搷鍒嗘瀽', - align:"center", + align: 'center', dataIndex: 'qualityAnalysis', scopedSlots: { customRender: 'qualityAnalysis' } - }, - { + }, + { title: '涓荤宸ヨ壓', - align:"center", + align: 'center', dataIndex: 'technologist_dictText' - }, - { + }, + { title: '涓荤宸ヨ壓纭鏃堕棿', - align:"center", + align: 'center', dataIndex: 'technologistTime' - }, - { + }, + { title: '涓荤宸ヨ壓纭鎰忚', - align:"center", + align: 'center', dataIndex: 'technologistComment' - }, - { + }, + { title: '閮ㄧ骇棰嗗', - align:"center", + align: 'center', dataIndex: 'deputyDepartment_dictText' - }, - { + }, + { title: '閮ㄧ骇棰嗗纭鏃堕棿', - align:"center", + align: 'center', dataIndex: 'deputyDepartmentTime' - }, - { + }, + { title: '閮ㄧ骇棰嗗纭鎰忚', - align:"center", + align: 'center', dataIndex: 'deputyDepartmentComment' - }, - { + }, + { title: 'HF缂栫爜', align: 'center', dataIndex: 'hfCode' - }, + } ], selectedRowData: {}, - url: { - list: "/eam/eamReportProductHazards/list", - delete: "/eam/eamReportProductHazards/delete", - deleteBatch: "/eam/eamReportProductHazards/deleteBatch", - exportXlsUrl: "eam/eamReportProductHazards/exportXls", - importExcelUrl: "eam/eamReportProductHazards/importExcel", - submit:"/eam/eamReportProductHazards/submit", - }, - } - }, + url: { + list: '/eam/eamReportProductHazards/list', + delete: '/eam/eamReportProductHazards/delete', + deleteBatch: '/eam/eamReportProductHazards/deleteBatch', + exportXlsUrl: 'eam/eamReportProductHazards/exportXls', + importExcelUrl: 'eam/eamReportProductHazards/importExcel', + submit: '/eam/eamReportProductHazards/submit' + } + } + }, created() { if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) else { @@ -289,6 +278,11 @@ }) }, + // 鎵归噺鎵撳嵃 + handleBatchPrint() { + this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join()) + }, + /** * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂 * @param record -- Gitblit v1.9.3