From 5d9726ee8fbf5c6648aa6e822b5509b51cfd758c Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 20 八月 2025 17:43:00 +0800
Subject: [PATCH] 点检工单新增批量打印以及导出功能

---
 src/views/eam/equipment/modules/EamEquipmentModal.vue |   96 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 77 insertions(+), 19 deletions(-)

diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue
index 6609f5a..c1a1db1 100644
--- a/src/views/eam/equipment/modules/EamEquipmentModal.vue
+++ b/src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -1,15 +1,8 @@
 <template>
-  <j-modal
-    :title="title"
-    fullscreen
-    :visible="visible"
-    centered
-    :confirmLoading="confirmLoading"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    cancelText="鍏抽棴">
-    <a-tabs tab-position="left">
+  <j-modal :title="title" fullscreen :visible="visible" centered :confirmLoading="confirmLoading"
+           :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" @cancel="handleCancel"
+           cancelText="鍏抽棴">
+    <a-tabs tab-position="left" @change="handleTabChange">
       <a-tab-pane tab="鍩虹淇℃伅" :key="1">
         <a-spin :spinning="confirmLoading">
           <j-form-container :disabled="disableSubmit">
@@ -43,7 +36,7 @@
                 <a-col :span="customSpan">
                   <a-form-model-item prop="factoryOrgCode" label="浣跨敤閮ㄩ棬">
                     <a-tree-select v-model="model.factoryOrgCode" style="width: 100%" show-search
-                                   :tree-data="productionTreeData" :disabled="!editable"
+                                   :tree-data="productionTreeData"
                                    :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                                    placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" allow-clear treeNodeFilterProp="title"
                                    :replaceFields="{key:'orgCode',value:'orgCode'}"
@@ -277,22 +270,58 @@
       </a-tab-pane>
 
       <template v-if="disableSubmit">
-        <a-tab-pane tab="璁惧鏂囨。" :key="2">
+        <a-tab-pane tab="鐐规宸ュ崟" :key="2" forceRender>
+          <div style="text-align: right; ">
+            <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamInspectionOrderList')"
+                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">璺宠浆
+            </a-button>
+        </div>
+          <eam-inspection-order-list ref="tabPane2" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="鐐规宸ュ崟" :key="3">
+        <a-tab-pane tab="浜屼繚宸ュ崟" :key="3" forceRender>
+          <div style="text-align: right; ">
+            <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamSecondMaintenanceOrderList')"
+                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">璺宠浆
+            </a-button>
+          </div>
+          <eam-second-maintenance-order-list ref="tabPane3" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="浜屼繚宸ュ崟" :key="4">
+        <a-tab-pane tab="涓変繚宸ュ崟" :key="4" forceRender>
+          <div style="text-align: right; ">
+            <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamThirdMaintenanceOrderList')"
+                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">璺宠浆
+            </a-button>
+          </div>
+          <eam-third-maintenance-order-list ref="tabPane4" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="涓変繚宸ュ崟" :key="5">
+        <a-tab-pane tab="缁翠慨宸ュ崟" :key="5" forceRender>
+          <div style="text-align: right; ">
+            <a-button type="primary" @click="navigateToPage('/eam/repair/EamRepairOrderList')"
+                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">璺宠浆
+            </a-button>
+          </div>
+          <eam-repair-order-list ref="tabPane5" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="缁翠慨宸ュ崟" :key="6">
+        <a-tab-pane tab="淇濆吇瑙勮寖" :key="6" forceRender>
+          <div style="text-align: right; ">
+            <a-button type="primary" @click="navigateToPage('/eam/base/EamMaintenanceStandardList')"
+                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">璺宠浆
+            </a-button>
+          </div>
+          <eam-maintenance-standard-list ref="tabPane6" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="淇濆吇鏍囧噯" :key="7">
+        <a-tab-pane tab="鎶�鏈姸鎬侀壌瀹氬伐鍗�" :key="7" forceRender>
+          <div style="text-align: right;">
+            <a-button type="primary" @click="navigateToPage('/eam/technical/order')"
+                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">璺宠浆
+            </a-button>
+          </div>
+          <eam-technical-status-evaluation-order-list ref="tabPane7" :isDisplayOperation="false"/>
         </a-tab-pane>
       </template>
     </a-tabs>
@@ -302,9 +331,23 @@
 <script>
   import { getAction, httpAction } from '@/api/manage'
   import { validateDuplicateValueInDelFlag } from '@/utils/util'
+  import EamInspectionOrderList from '../../maintenance/EamInspectionOrderList'
+  import EamSecondMaintenanceOrderList from '../../maintenance/EamSecondMaintenanceOrderList'
+  import EamThirdMaintenanceOrderList from '../../maintenance/EamThirdMaintenanceOrderList'
+  import EamRepairOrderList from '../../repair/EamRepairOrderList'
+  import EamMaintenanceStandardList from '../../base/EamMaintenanceStandardList'
+  import EamTechnicalStatusEvaluationOrderList from '../../technical/EamTechnicalStatusEvaluationOrderList'
 
   export default {
     name: 'EamEquipmentModal',
+    components: {
+      EamTechnicalStatusEvaluationOrderList,
+      EamMaintenanceStandardList,
+      EamRepairOrderList,
+      EamThirdMaintenanceOrderList,
+      EamSecondMaintenanceOrderList,
+      EamInspectionOrderList
+    },
     props: {
       productionTreeData: {
         type: Array
@@ -388,7 +431,18 @@
        * @param key 鍗曢�夋鍏宠仈瀛楁
        */
       handleRadioChange(value, key) {
-        if (value == '0') delete this.model[key]
+        if (value === '0') delete this.model[key]
+      },
+
+      /**
+       * 鏍囩鏍忓彂鐢熸敼鍙樻椂瑙﹀彂
+       * @param tabKey 鍒囨崲鍚庣殑tabKey
+       */
+      handleTabChange(tabKey) {
+        if (tabKey !== 1 && this.$refs['tabPane' + tabKey]) {
+          this.$refs['tabPane' + tabKey].queryParam.equipmentId = this.model.id
+          this.$refs['tabPane' + tabKey].loadData(1)
+        }
       },
 
       handleOk() {
@@ -431,6 +485,10 @@
         })
       },
 
+      navigateToPage(href) {
+        this.$router.push(href)
+      },
+
       handleCancel() {
         this.close()
       },

--
Gitblit v1.9.3