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/maintenance/EamInspectionOrderList.vue | 169 ++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 121 insertions(+), 48 deletions(-) diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index f0cebd0..1da8178 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -40,22 +40,35 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> <a-button v-has="'eam:inspection:add'" @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <a-button v-if="selectedRowKeys.length == 1" @click="handlePrint" type="primary">鏌ョ湅</a-button> - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'"> - <a-icon type="snippets"/> - 浣滃簾 - </a-menu-item> - <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')" v-has="'eam:inspection:collect'"> - <a-icon type="form"/> - 棰嗗彇 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> + <!--<a-dropdown v-if="selectedRowKeys.length > 0">--> + <!--<a-menu slot="overlay">--> + <!--<a-menu-item key="1" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'">--> + <!--<a-icon type="snippets"/>--> + <!--浣滃簾--> + <!--</a-menu-item>--> + <!--<a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')" v-has="'eam:inspection:collect'">--> + <!--<a-icon type="form"/>--> + <!--棰嗗彇--> + <!--</a-menu-item>--> + <!--<a-menu-item key="3" @click="handleBatchPrint">--> + <!--<a-icon type="printer"/>--> + <!--鎵撳嵃--> + <!--</a-menu-item>--> + <!--</a-menu>--> + <!--<a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔--> + <!--<a-icon type="down"/>--> + <!--</a-button>--> + <!--</a-dropdown>--> + + + <a-button type="primary" icon="form" @click="batchLq('UNDER_INSPECTION')" v-has="'eam:inspection:collect'" + :disabled="selectedRowKeys.length===0">鎵归噺棰嗗彇 + </a-button> + <a-button type="primary" icon="monitor" @click="handleBatchPrint" :disabled="selectedRowKeys.length===0">鎵归噺棰勮 + </a-button> + <a-button type="danger" icon="delete" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'" + :disabled="selectedRowKeys.length===0">鎵归噺浣滃簾 + </a-button> </div> <!-- table鍖哄煙-begin --> @@ -97,14 +110,27 @@ </a-dropdown> </template> - <a v-else @click="handleDetail(record)">璇︽儏</a> + <template v-else> + <a @click="handleDetail(record)">璇︽儏</a> + + <template v-if="record.inspectionStatus=='COMPLETE'"> + <a-divider type="vertical"/> + + <a @click="handlePrint(record)">棰勮</a> + </template> + </template> </span> </a-table> </div> + <!--琛ㄥ崟寮圭獥--> <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"/> + <!--瀹℃壒寮圭獥--> <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/> + + <!--鎵归噺鎵撳嵃寮圭獥--> + <eam-inspection-order-batch-print-modal ref="batchPrintModal"/> </a-card> </template> @@ -114,11 +140,13 @@ import { deleteAction, getAction } from '@api/manage' import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' + import EamInspectionOrderBatchPrintModal from './modules/EamInspectionOrderBatchPrintModal' export default { name: 'EamInspectionOrderList', mixins: [JeecgListMixin], components: { + EamInspectionOrderBatchPrintModal, LxSearchEquipmentSelect, InspectionOrderHandle, EamInspectionOrderModal @@ -143,22 +171,32 @@ align: 'center', customRender: function(t, r, index) { return parseInt(index) + 1 - } + }, + fixed: 'left' }, { title: '缁熶竴缂栫爜', align: 'center', - dataIndex: 'equipmentCode' + dataIndex: 'equipmentCode', + fixed: 'left' }, { title: '璁惧鍚嶇О', align: 'center', - dataIndex: 'equipmentName' + dataIndex: 'equipmentName', + fixed: 'left' }, { title: '璁惧鍨嬪彿', align: 'center', - dataIndex: 'equipmentModel' + dataIndex: 'equipmentModel', + fixed: 'left' + }, + { + title: '鐐规鐘舵��', + align: 'center', + dataIndex: 'inspectionStatus_dictText', + fixed: 'left' }, { title: '宸ュ崟鍙�', @@ -176,7 +214,8 @@ dataIndex: 'inspectionDate', customRender: function(text) { return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) - } + }, + width: 150 }, { title: '鐐规杩囨湡鏃ユ湡', @@ -184,17 +223,13 @@ dataIndex: 'expirationTime', customRender: function(text) { return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) - } + }, + width: 150 }, { title: '鍒涘缓鏂瑰紡', align: 'center', dataIndex: 'creationMethod_dictText' - }, - { - title: '鐐规鐘舵��', - align: 'center', - dataIndex: 'inspectionStatus_dictText' }, { title: '鐐规浜�', @@ -204,7 +239,8 @@ { title: '鐐规鏃堕棿', align: 'center', - dataIndex: 'operateTime' + dataIndex: 'operateTime', + width: 150 }, { title: '缁翠慨宸�', @@ -214,12 +250,14 @@ { title: '纭鏃堕棿', align: 'center', - dataIndex: 'confirmTime' + dataIndex: 'confirmTime', + width: 150 }, { title: 'HF缂栫爜', align: 'center', - dataIndex: 'hfCode' + dataIndex: 'hfCode', + width: 250 } ], url: { @@ -244,7 +282,8 @@ title: '鎿嶄綔', dataIndex: 'action', align: 'center', - scopedSlots: { customRender: 'action' } + scopedSlots: { customRender: 'action' }, + fixed: 'right' } this.columns = [...this.columns, operationColumn] this.loadData(1) @@ -261,10 +300,13 @@ this.$refs.modalFormXq.visible = true this.$refs.modalFormXq.title = '璇︽儏' this.$refs.modalFormXq.disableSubmit = true - this.$refs.modalFormXq.getAllApproveData(record) - this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) + this.$refs.modalFormXq.handleDetail(record) }, + /** + * 棰嗗彇 + * @param id + */ handleInspection(id) { var that = this this.loading = true @@ -286,23 +328,35 @@ }) }, + /** + * 浣滃簾 + * @param id + */ handleAbolish(id) { var that = this - getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) + this.loading = true + getAction(that.url.cancelInspectionOrder, { id }) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + this.loading = false + } + }) }, + + /** + * 鎵归噺浣滃簾 + * @param type + */ batchZf(type) { var ids = '' for (var a = 0; a < this.selectedRowKeys.length; a++) { @@ -335,6 +389,11 @@ } }) }, + + /** + * 鎵归噺棰嗗彇 + * @param type + */ batchLq(type) { var ids = '' for (var a = 0; a < this.selectedRowKeys.length; a++) { @@ -368,6 +427,20 @@ } }) }, + + /** + * 棰勮 + * @param record + */ + handlePrint(record) { + let href = `${window._CONFIG['domianURL']}/jmreport/view/1105664887569121280?equipmentCode=` + record.equipmentCode + window.open(href, '_blank') + }, + + handleBatchPrint() { + this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join()) + }, + onInspectionDateChange: function(value, dateString) { this.queryParam.inspectionDateBegin = dateString[0] this.queryParam.inspectionDateEnd = dateString[1] -- Gitblit v1.9.3