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 |  129 +++++++++++++++++++++++++++++-------------
 1 files changed, 89 insertions(+), 40 deletions(-)

diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue
index b92f092..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 -->
@@ -98,20 +111,26 @@
           </template>
 
           <template v-else>
-            <template v-if="record.inspectionStatus=='COMPLETE'">
-              <a @click="handlePrint(record)">棰勮</a>
-              <a-divider type="vertical"/>
-            </template>
-
              <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>
 
@@ -121,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
@@ -172,6 +193,12 @@
             fixed: 'left'
           },
           {
+            title: '鐐规鐘舵��',
+            align: 'center',
+            dataIndex: 'inspectionStatus_dictText',
+            fixed: 'left'
+          },
+          {
             title: '宸ュ崟鍙�',
             align: 'center',
             dataIndex: 'orderNum'
@@ -203,11 +230,6 @@
             title: '鍒涘缓鏂瑰紡',
             align: 'center',
             dataIndex: 'creationMethod_dictText'
-          },
-          {
-            title: '鐐规鐘舵��',
-            align: 'center',
-            dataIndex: 'inspectionStatus_dictText'
           },
           {
             title: '鐐规浜�',
@@ -281,6 +303,10 @@
         this.$refs.modalFormXq.handleDetail(record)
       },
 
+      /**
+       * 棰嗗彇
+       * @param id
+       */
       handleInspection(id) {
         var that = this
         this.loading = true
@@ -302,24 +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++) {
@@ -353,6 +390,10 @@
         })
       },
 
+      /**
+       * 鎵归噺棰嗗彇
+       * @param type
+       */
       batchLq(type) {
         var ids = ''
         for (var a = 0; a < this.selectedRowKeys.length; a++) {
@@ -387,11 +428,19 @@
         })
       },
 
+      /**
+       * 棰勮
+       * @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