From d86a63d65e195a8c6a807535d936dbc7e2121216 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 04 九月 2025 17:36:17 +0800
Subject: [PATCH] 设备管理技术状态鉴定、设备保养、设备维修下所有列表添加使用部门展示

---
 src/views/eam/repair/EamRepairOrderList.vue |   73 ++++++++++++++++++++++++++++++++++--
 1 files changed, 69 insertions(+), 4 deletions(-)

diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue
index 3ba12e2..6c787b6 100644
--- a/src/views/eam/repair/EamRepairOrderList.vue
+++ b/src/views/eam/repair/EamRepairOrderList.vue
@@ -35,6 +35,7 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator" v-if="isDisplayOperation">
+      <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟鍙拌处')">瀵煎嚭</a-button>
       <a-dropdown :disabled="selectedRowKeys.length == 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="handleBatchSubmit">
@@ -60,11 +61,20 @@
                :pagination="ipagination" :loading="loading"
                :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"
                :scroll="{x:'max-content'}">
+
+        <!--浣跨敤閮ㄩ棬-->
+        <template slot="factoryOrgCode" slot-scope="text,record">
+          {{[record.zxfactoryOrgCode_dictText].filter(item=>item).join('/')}}
+        </template>
+
         <span slot="action" slot-scope="text, record">
           <template v-if="record.repairStatus=='PENDING_REPAIR'||record.repairStatus=='UNDER_MAINTENANCE' ||record.repairStatus=='REJECTED'">
-             <a @click="handleFillIn(record)">濉姤</a>
-             <a-divider type="vertical"/>
-             <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)">
+            <a-popconfirm v-if="record.claimStatus=='0' || record.claimStatus==null " title="纭畾鎻愪氦鍚�?" @confirm="() => handleClaim(record.id)">
+               <a>棰嗗彇</a>
+             </a-popconfirm>
+             <a v-if="record.claimStatus=='1'"  @click="handleFillIn(record)">缁翠慨</a>
+             <a-divider v-if="record.claimStatus=='1'"  type="vertical"/>
+             <a-popconfirm v-if="record.claimStatus=='1'" title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)">
                <a>鎻愪氦</a>
              </a-popconfirm>
           </template>
@@ -157,9 +167,21 @@
             fixed: 'left'
           },
           {
+            title: '浣跨敤閮ㄩ棬',
+            align: 'center',
+            scopedSlots: { customRender: 'factoryOrgCode' },
+            fixed: 'left'
+          },
+          {
             title: '缁翠慨鐘舵��',
             align: 'center',
             dataIndex: 'repairStatus_dictText',
+            fixed: 'left'
+          },
+          {
+            title: '棰嗗彇鐘舵��',
+            align: 'center',
+            dataIndex: 'claimStatus_dictText',
             fixed: 'left'
           },
           {
@@ -178,6 +200,12 @@
             dataIndex: 'reportPerson_dictText',
           },
           {
+            title: '鏁呴殰寮�濮嬫椂闂�',
+            align: 'center',
+            dataIndex: 'faultStartTime',
+            width: 200
+          },
+          {
             title: '缁翠慨寮�濮嬫椂闂�',
             align: 'center',
             dataIndex: 'actualStartTime',
@@ -187,6 +215,18 @@
             title: '缁翠慨缁撴潫鏃堕棿',
             align: 'center',
             dataIndex: 'actualEndTime',
+            width: 200
+          },
+          {
+            title: '缁翠慨鏃堕暱(灏忔椂)',
+            align: 'center',
+            dataIndex: 'repairDuration',
+            width: 200
+          },
+          {
+            title: '鏁呴殰鏃堕暱(灏忔椂)',
+            align: 'center',
+            dataIndex: 'faultDuration',
             width: 200
           },
           {
@@ -246,8 +286,10 @@
         url: {
           list: '/eam/eamRepairOrder/list',
           submit: '/eam/eamRepairOrder/submit',
+          claim: '/eam/eamRepairOrder/claim',
           delete: '/eam/eamRepairOrder/delete',
-          deleteBatch: '/eam/eamRepairOrder/deleteBatch'
+          deleteBatch: '/eam/eamRepairOrder/deleteBatch',
+          exportXlsUrl: "eam/eamRepairOrder/exportXls",
         }
       }
     },
@@ -300,6 +342,29 @@
           })
       },
 
+      /**
+       * 鐐瑰嚮棰嗗彇鏃惰Е鍙�
+       * @param id
+       */
+      handleClaim(id){
+        this.loading = true
+        getAction(this.url.claim, { id })
+          .then(res => {
+            if (res.success) {
+              this.$notification.success({
+                message: '娑堟伅',
+                description: res.message
+              })
+              this.loadData()
+            } else {
+              this.$notification.warning({
+                message: '娑堟伅',
+                description: res.message
+              })
+              this.loading = false
+            }
+          })
+      },
       // 鎵归噺鎻愪氦鏃惰Е鍙�
       handleBatchSubmit() {
 

--
Gitblit v1.9.3