From 3a8181119526dd55814fc69ac0566f93009fa71f Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 23 七月 2025 17:31:07 +0800
Subject: [PATCH] 1、各类审批状态提至列表靠前位置 2、新增二保、技术鉴定状态申请以及技术鉴定工单变更流程驳回时的审批节点展示条件

---
 src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue |  121 +++++++++++++++++++++++++++++++++++-----
 1 files changed, 106 insertions(+), 15 deletions(-)

diff --git a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue
index b325d22..0487a9f 100644
--- a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue
+++ b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue
@@ -50,6 +50,10 @@
             <a-icon type="form"/>
             棰嗗彇
           </a-menu-item>
+          <a-menu-item key="3" @click="handlerBatchRestore">
+            <a-icon type="reload"/>
+            杩樺師
+          </a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
           <a-icon type="down"/>
@@ -81,18 +85,32 @@
 
             <a-divider type="vertical"/>
 
-            <a @click="handleDetail(record)">璇︽儏</a>
-
-            <a-divider type="vertical"/>
-
-            <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handlerAbolish(record.id)">
-              <a>浣滃簾</a>
-            </a-popconfirm>
-
+            <a-dropdown>
+            <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleAbolish(record.id)">
+                  <a>浣滃簾</a>
+                </a-popconfirm>
+              </a-menu-item>
+               <a-menu-item>
+                <a @click="handleDetail(record)">璇︽儏</a>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
           </template>
 
           <template v-else>
             <a @click="handleDetail(record)">璇︽儏</a>
+
+
+            <a-divider v-if="record.maintenanceStatus === 'ABOLISH'" type="vertical"/>
+
+            <a-popconfirm v-if="record.maintenanceStatus === 'ABOLISH'" title="纭畾杩樺師鍚�?"
+                          @confirm="() => handlerRestore(record.id)">
+              <a>杩樺師</a>
+            </a-popconfirm>
+
             <a-divider type="vertical" v-if="record.maintenanceStatus === 'COMPLETE'"/>
             <a v-if="record.maintenanceStatus === 'COMPLETE'" @click="handlePrint(record)">鎵撳嵃</a>
           </template>
@@ -172,6 +190,12 @@
             fixed: 'left'
           },
           {
+            title: '淇濆吇鐘舵��',
+            align: 'center',
+            dataIndex: 'maintenanceStatus_dictText',
+            fixed: 'left'
+          },
+          {
             title: '宸ュ崟鍙�',
             align: 'center',
             dataIndex: 'orderNum'
@@ -205,11 +229,6 @@
             title: '缁翠慨宸�',
             align: 'center',
             dataIndex: 'repairman_dictText'
-          },
-          {
-            title: '淇濆吇鐘舵��',
-            align: 'center',
-            dataIndex: 'maintenanceStatus_dictText'
           },
           {
             title: '鍒涘缓鏂瑰紡',
@@ -246,8 +265,10 @@
           list: '/eam/secondMaintenanceOrder/list',
           abolish: '/eam/secondMaintenanceOrder/abolish',
           collect: '/eam/secondMaintenanceOrder/collect',
+          restore: '/eam/secondMaintenanceOrder/restore',
           abolishBatch: '/eam/secondMaintenanceOrder/abolishBatch',
-          collectBatch: '/eam/secondMaintenanceOrder/collectBatch'
+          collectBatch: '/eam/secondMaintenanceOrder/collectBatch',
+          restoreBatch: '/eam/secondMaintenanceOrder/restoreBatch'
         }
       }
     },
@@ -306,7 +327,7 @@
         this.$refs.secondMaintenanceApprovalModal.title = '璇︽儏'
         this.$refs.secondMaintenanceApprovalModal.visible = true
         this.$refs.secondMaintenanceApprovalModal.disableSubmit = true
-        this.$refs.secondMaintenanceApprovalModal.recordDetail(record)
+        this.$refs.secondMaintenanceApprovalModal.handleDetail(record)
       },
 
       /**
@@ -368,6 +389,76 @@
           }
         })
       },
+      //杩樺師
+      handlerRestore(id) {
+        let that = this
+        this.loading = true
+        getAction(that.url.restore, { 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
+            }
+          })
+      },
+      //鎵归噺杩樺師
+      handlerBatchRestore() {
+        if (!this.url.restoreBatch) {
+          this.$message.error('璇疯缃畊rl.restoreBatch灞炴��!')
+          return
+        }
+        if (this.selectedRowKeys.length <= 0) {
+          // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒');
+          this.$notification.warning({
+            message: '娑堟伅',
+            description: '璇烽�夋嫨涓�鏉¤褰�'
+          })
+          return
+        } else {
+          var ids = ''
+          for (var a = 0; a < this.selectedRowKeys.length; a++) {
+            ids += this.selectedRowKeys[a] + ','
+          }
+          var that = this
+          this.$confirm({
+            title: '纭杩樺師',
+            content: '鏄惁杩樺師閫変腑鏁版嵁锛屽彧鏈変綔搴熺姸鎬佺殑鏁版嵁鎵嶅彲杩樺師鎴愬姛?',
+            onOk: function() {
+              that.loading = true
+              deleteAction(that.url.restoreBatch, { ids: ids }).then((res) => {
+                if (res.success) {
+                  //閲嶆柊璁$畻鍒嗛〉闂
+                  that.reCalculatePage(that.selectedRowKeys.length)
+                  // that.$message.success(res.message);
+                  that.$notification.success({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                  that.loadData()
+                  that.onClearSelected()
+                } else {
+                  // that.$message.warning(res.message);
+                  that.$notification.warning({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                }
+              }).finally(() => {
+                that.loading = false
+              })
+            }
+          })
+        }
+      },
       //鎵归噺棰嗗彇
       handlerBatchCollect() {
         if (!this.url.collectBatch) {

--
Gitblit v1.9.3