From fdd08d56e9d84d2f9578e82c44578d099b29572f Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 12 九月 2025 17:38:24 +0800
Subject: [PATCH] 三保变更批量导出及打印

---
 src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue |  103 ++++++++++++++++++++++++++++++++-------------------
 1 files changed, 65 insertions(+), 38 deletions(-)

diff --git a/src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue b/src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue
index 3202893..ea6a42c 100644
--- a/src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue
+++ b/src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue
@@ -36,12 +36,25 @@
       </a-form>
     </div>
 
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+      <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">鎵归噺棰勮
+      </a-button>
+    </div>
+
     <!-- table鍖哄煙-begin -->
     <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">
-          <tamplate v-if="record.changeStatus=='WAIT_SUBMIT'">
+
+      <!--浣跨敤閮ㄩ棬-->
+      <template slot="factoryCode" slot-scope="text,record">
+        {{[record.zxfactoryOrgCode_dictText].filter(item=>item).join('/')}}
+      </template>
+
+      <span slot="action" slot-scope="text, record">
+          <template v-if="record.changeStatus=='WAIT_SUBMIT'">
             <a @click="handleEdit(record)">缂栬緫</a>
 
             <a-divider type="vertical"/>
@@ -55,41 +68,43 @@
             <a-popconfirm title="纭畾浣滃簾鍚楋紵" @confirm="handleAbolish(record.id)">
               <a>浣滃簾</a>
             </a-popconfirm>
-          </tamplate>
+          </template>
 
-          <a @click="handleDetail(record)" v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">璇︽儏</a>
+          <a @click="handleDetail(record)"
+             v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">璇︽儏</a>
         </span>
     </a-table>
     <!-- table鍖哄煙-end -->
 
     <!-- 琛ㄥ崟鍖哄煙 -->
-    <eam-third-maintenance-change-modal ref="orderChangeModal" @ok="modalFormOk"/>
+    <eam-third-maintenance-change-modal ref="modalForm" @ok="modalFormOk"/>
 
-    <!--鍙樻洿娴佺▼琛ㄥ崟-->
-<!--    <third-maintenance-approval-modal ref="thirdMaintenanceApprovalModal"-->
-<!--                                      :selectShenpiData="selectThirdMaintenanceData"/>-->
+    <!--瀹℃壒绐楀彛-->
+    <third-maintenance-order-change-approval-modal ref="thirdMaintenanceOrderChangeApprovalModal"
+                                                   :selectShenpiData="selectedRowData"/>
 
+    <!--鎵归噺鎵撳嵃绐楀彛-->
+    <eam-third-maintenance-change-batch-print-modal ref="batchPrintModal"/>
   </a-card>
 </template>
 
 <script>
-  // import EamThirdMaintenanceOrderModal from './modules/EamThirdMaintenanceOrderModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
   import { deleteAction, getAction } from '@api/manage'
-  // import ThirdMaintenanceApprovalModal
-  //   from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue'
-  import EamThirdMaintenanceChangeModal
-    from '@views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue'
+  import EamThirdMaintenanceChangeModal from './modules/EamThirdMaintenanceChangeModal.vue'
+  import ThirdMaintenanceOrderChangeApprovalModal
+    from '../../flowable/workflow/thirdMaintenance/ThirdMaintenanceOrderChangeApprovalModal'
+  import EamThirdMaintenanceChangeBatchPrintModal from './modules/EamThirdMaintenanceChangeBatchPrintModal'
 
   export default {
     name: 'EamThirdMaintenanceChangeList',
     mixins: [JeecgListMixin],
     components: {
+      EamThirdMaintenanceChangeBatchPrintModal,
+      ThirdMaintenanceOrderChangeApprovalModal,
       EamThirdMaintenanceChangeModal,
-      LxSearchEquipmentSelect,
-      // EamThirdMaintenanceOrderModal,
-      // ThirdMaintenanceApprovalModal
+      LxSearchEquipmentSelect
     },
     props: {
       isDisplayOperation: {
@@ -101,7 +116,7 @@
       return {
         description: '璁惧涓夌骇淇濆吇鍙樻洿椤甸潰',
         disableMixinCreated: true,
-        selectThirdMaintenanceData: {},
+        selectedRowData: {},
         // 琛ㄥご
         columns: [
           {
@@ -134,9 +149,21 @@
             fixed: 'left'
           },
           {
+            title: '浣跨敤閮ㄩ棬',
+            align: 'center',
+            scopedSlots: { customRender: 'factoryCode' },
+            fixed: 'left'
+          },
+          {
+            title: '鍙樻洿鐘舵��',
+            align: 'center',
+            dataIndex: 'changeStatus_dictText',
+            fixed: 'left'
+          },
+          {
             title: '宸ュ崟鍙�',
             align: 'center',
-            dataIndex: 'orderNum_dictText'
+            dataIndex: 'orderId_dictText'
           },
           {
             title: '鍙樻洿鍗曞彿',
@@ -162,11 +189,6 @@
             title: '鐢宠绫诲瀷',
             align: 'center',
             dataIndex: 'applyCategory_dictText'
-          },
-          {
-            title: '鍙樻洿鐘舵��',
-            align: 'center',
-            dataIndex: 'changeStatus_dictText'
           },
           {
             title: '鍙樻洿鍘熷洜绫诲瀷',
@@ -221,8 +243,8 @@
         ],
         url: {
           list: '/eam/eamThirdMaintenanceChange/list',
-          abolish: '/eam/eamThirdMaintenanceChange/abolish',
-          collect: '/eam/eamThirdMaintenanceChange/collect'
+          submit: '/eam/eamThirdMaintenanceChange/submit',
+          abolish: '/eam/eamThirdMaintenanceChange/abolish'
         }
       }
     },
@@ -234,13 +256,13 @@
         title: '鎿嶄綔',
         dataIndex: 'action',
         align: 'center',
+        width: 200,
         fixed: 'right',
         scopedSlots: { customRender: 'action' }
       }
       this.columns = [...this.columns, operationColumn]
       this.loadData(1)
     },
-    computed: {},
     methods: {
       /**
        * 鎻愪氦鏃惰Е鍙�
@@ -257,12 +279,12 @@
                 description: res.message
               })
               that.loadData()
-              that.loading = false
             } else {
               that.$notification.warning({
                 message: '娑堟伅',
                 description: res.message
               })
+              that.loading = false
             }
           })
       },
@@ -292,17 +314,17 @@
           })
       },
 
-      // /**
-      //  * 鐐瑰嚮璇︽儏鏃惰Е鍙�
-      //  * @param record
-      //  */
-      // handleDetail(record) {
-      //   this.selectThirdMaintenanceData = Object.assign({}, record)
-      //   this.$refs.thirdMaintenanceApprovalModal.title = '璇︽儏'
-      //   this.$refs.thirdMaintenanceApprovalModal.visible = true
-      //   this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true
-      //   this.$refs.thirdMaintenanceApprovalModal.recordDetail(record)
-      // },
+      /**
+       * 鐐瑰嚮璇︽儏鏃惰Е鍙�
+       * @param record
+       */
+      handleDetail(record) {
+        this.selectedRowData = Object.assign({}, record)
+        this.$refs.thirdMaintenanceOrderChangeApprovalModal.title = '璇︽儏'
+        this.$refs.thirdMaintenanceOrderChangeApprovalModal.visible = true
+        this.$refs.thirdMaintenanceOrderChangeApprovalModal.disableSubmit = true
+        this.$refs.thirdMaintenanceOrderChangeApprovalModal.handleDetail(record)
+      },
 
       /**
        * 鐢宠鏃堕棿鍙戠敓鏀瑰彉鏃惰Е鍙�
@@ -313,6 +335,11 @@
         this.queryParam.dateEnd = dateStringArray[1]
       },
 
+      // 鎵归噺鎵撳嵃
+      handleBatchPrint() {
+        this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join())
+      },
+
       handlePrint(record) {
         let href = `${window._CONFIG['domianURL']}/jmreport/view/1094880052100399104?id=` + record.id
         //  + `&orderId=` + record.id; //缃戠珯閾炬帴

--
Gitblit v1.9.3