From 28c3bcfbacc7af60e93210ba654fd681002a6849 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 14 八月 2025 15:59:09 +0800
Subject: [PATCH] 加流程节点  维修工单添加 领取按钮 领取后 生成维修开始时间  提交后 生成维修结束时间 计算 维修时长  故障时长

---
 src/views/eam/repair/EamRepairOrderList.vue |  136 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 113 insertions(+), 23 deletions(-)

diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue
index d792dc7..e1913f3 100644
--- a/src/views/eam/repair/EamRepairOrderList.vue
+++ b/src/views/eam/repair/EamRepairOrderList.vue
@@ -5,24 +5,24 @@
     <div class="table-page-search-wrapper" v-if="isDisplayOperation">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="12">
             <a-form-item label="缁熶竴缂栫爜">
               <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/>
             </a-form-item>
           </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="12">
             <a-form-item label="宸ュ崟鍙�">
               <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.repairCode"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="12">
             <a-form-item label="缁翠慨鐘舵��">
               <j-dict-select-tag placeholder="璇烽�夋嫨缁翠慨鐘舵��" v-model="queryParam.repairStatus"
                                  dict-code="repair_status"/>
             </a-form-item>
           </a-col>
 
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="12">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
               <a-button @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
@@ -35,11 +35,12 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator" v-if="isDisplayOperation">
-      <a-dropdown v-if="selectedRowKeys.length > 0">
+      <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="batchDel">
-            <a-icon type="delete"/>
-            鍒犻櫎
+          <a-menu-item key="1" @click="handleBatchSubmit">
+            <a-icon type="form"/>
+            鎻愪氦
           </a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
@@ -61,13 +62,35 @@
                :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"
                :scroll="{x:'max-content'}">
         <span slot="action" slot-scope="text, record">
-          <a @click="handleFillIn(record)">濉姤</a>
-          <a-divider type="vertical"/>
-          <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)">
-             <a>鎻愪氦</a>
-          </a-popconfirm>
-          <a-divider type="vertical"/>
-          <a @click="handleDetail(record)">璇︽儏</a>
+          <template v-if="record.repairStatus=='PENDING_REPAIR'||record.repairStatus=='UNDER_MAINTENANCE' ||record.repairStatus=='REJECTED'">
+            <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>
+
+          <a v-else @click="handleDetail(record)">璇︽儏</a>
+        </span>
+
+        <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず-->
+        <span slot="faultPhenomenon" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
+        </span>
+        <span slot="faultReason" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
+        </span>
+        <span slot="faultAnalysis" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
+        </span>
+        <span slot="faultProcess" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
+        </span>
+        <span slot="faultPrevent" slot-scope="text">
+          <j-ellipsis :value="text" :length="8"/>
         </span>
       </a-table>
     </div>
@@ -144,9 +167,25 @@
             fixed: 'left'
           },
           {
+            title: '棰嗗彇鐘舵��',
+            align: 'center',
+            dataIndex: 'claimStatus_dictText',
+            fixed: 'left'
+          },
+          {
             title: '宸ュ崟鍙�',
             align: 'center',
-            dataIndex: 'repairCode'
+            dataIndex: 'repairCode',
+          },
+          {
+            title: '鏁呴殰绫诲瀷',
+            align: 'center',
+            dataIndex: 'faultType_dictText',
+          },
+          {
+            title: '鎶ヤ慨浜�',
+            align: 'center',
+            dataIndex: 'reportPerson_dictText',
           },
           {
             title: '缁翠慨寮�濮嬫椂闂�',
@@ -161,6 +200,18 @@
             width: 200
           },
           {
+            title: '缁翠慨鏃堕暱',
+            align: 'center',
+            dataIndex: 'repairDuration',
+            width: 200
+          },
+          {
+            title: '鏁呴殰鏃堕暱',
+            align: 'center',
+            dataIndex: 'faultDuration',
+            width: 200
+          },
+          {
             title: '缁翠慨纭',
             align: 'center',
             dataIndex: 'repairConfirm_dictText'
@@ -172,24 +223,34 @@
             width: 200
           },
           {
+            title: '鏁呴殰鐜拌薄',
+            align: 'center',
+            dataIndex: 'faultPhenomenon',
+            scopedSlots: {customRender: 'faultPhenomenon'},
+          },
+          {
             title: '鏁呴殰鍘熷洜',
             align: 'center',
-            dataIndex: 'faultReason'
+            dataIndex: 'faultReason',
+            scopedSlots: {customRender: 'faultReason'},
           },
           {
             title: '鏁呴殰鍒嗘瀽',
             align: 'center',
-            dataIndex: 'faultAnalysis'
+            dataIndex: 'faultAnalysis',
+            scopedSlots: {customRender: 'faultAnalysis'},
           },
           {
             title: '鎺掓晠杩囩▼',
             align: 'center',
-            dataIndex: 'faultProcess'
+            dataIndex: 'faultProcess',
+            scopedSlots: {customRender: 'faultProcess'},
           },
           {
             title: '棰勯槻鎺柦',
             align: 'center',
-            dataIndex: 'faultPrevent'
+            dataIndex: 'faultPrevent',
+            scopedSlots: {customRender: 'faultPrevent'},
           },
           {
             title: '鎿嶄綔宸�',
@@ -207,8 +268,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",
         }
       }
     },
@@ -262,6 +325,34 @@
       },
 
       /**
+       * 鐐瑰嚮棰嗗彇鏃惰Е鍙�
+       * @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() {
+
+      },
+
+      /**
        * 鐐瑰嚮璇︽儏瑙﹀彂
        * @param record 琛ㄦ牸琛屼俊鎭�
        */
@@ -270,8 +361,7 @@
         this.$refs.repairOrderApprovalModal.visible = true
         this.$refs.repairOrderApprovalModal.title = '璇︽儏'
         this.$refs.repairOrderApprovalModal.disableSubmit = true
-        this.$refs.repairOrderApprovalModal.getAllApproveData(record)
-        this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id })
+        this.$refs.repairOrderApprovalModal.handleDetail(record)
       }
     }
   }

--
Gitblit v1.9.3