From 436b52186129e60ba72c20e43d2845bc3f899901 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期四, 22 八月 2024 11:16:56 +0800
Subject: [PATCH] 取消暂停svg更新

---
 src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO_BATCH.ts |   46 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 35 insertions(+), 11 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO_BATCH.ts b/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO_BATCH.ts
index 213042c..8fcc98b 100644
--- a/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO_BATCH.ts
+++ b/src/views/tigerprojects/system/lowcode/entityts/BIZ_MES_WO_BATCH.ts
@@ -4,7 +4,7 @@
  * @version:
  * @Date: 2024-06-19 20:34:27
  * @LastEditors: Ben Lin
- * @LastEditTime: 2024-08-22 10:26:40
+ * @LastEditTime: 2024-08-22 11:14:02
  */
 
 import { Tag, Tooltip } from 'ant-design-vue';
@@ -53,7 +53,12 @@
       data.map((x) => {
         if (x.name == 'handlePause') {
           x.onClick = handlePause.bind(null, args, params);
+          x.color = 'error'
           x.tooltip = '鏆傚仠';
+        }
+        if (x.name == 'handleStart') {
+          x.onClick = handleStart.bind(null, args, params);
+          x.tooltip = '鍙栨秷鏆傚仠';
         }
         if (x.name == 'handleRelease') {
           x.onClick = handleRelease.bind(null, args, params);
@@ -363,18 +368,10 @@
    */
   function handlePause(args, params: Recordable) {
     const reload = args[1];
-    if (params['record'].STATUS == 0) {
+    if (params['record'].STATUS != 3) {
       createErrorModal({
         title: t('璀﹀憡'),
-        content: t('宸ュ崟鏄垵濮嬪寲鐘舵�侊紝涓嶈兘鏆傚仠锛�'),
-        getContainer: () => document.body,
-      });
-      return;
-    }
-    if (params['record'].STATUS == 5) {
-      createErrorModal({
-        title: t('璀﹀憡'),
-        content: t('宸ュ崟鏄畬鎴愮姸鎬侊紝涓嶈兘鏆傚仠锛�'),
+        content: t('宸ュ崟涓嶆槸鐢熶骇涓姸鎬侊紝涓嶈兘鏆傚仠锛�'),
         getContainer: () => document.body,
       });
       return;
@@ -391,6 +388,33 @@
   }
 
   /**
+   * @description: 宸ュ崟鍙栨秷鏆傚仠鏂规硶
+   * @param {*} args
+   * @param {Recordable} params
+   * @return {*}
+   */
+  function handleStart(args, params: Recordable) {
+    const reload = args[1];
+    if (params['record'].STATUS != 4) {
+      createErrorModal({
+        title: t('璀﹀憡'),
+        content: t('宸ュ崟涓嶆槸鏆傚仠鐘舵�侊紝涓嶈兘鍙栨秷鏆傚仠锛�'),
+        getContainer: () => document.body,
+      });
+      return;
+    }
+    params['record'].STATUS = 3;
+    SaveEntity(params['record'], true, 'BIZ_MES_WO_BATCH').then((action) => {
+      if (action.IsSuccessed) {
+        createMessage.success(t('宸插彇娑堟殏鍋�'));
+        reload();
+      } else {
+        createMessage.success(t('鍙栨秷鏆傚仠鎿嶄綔澶辫触'));
+      }
+    });
+  }
+
+  /**
    * @description: 宸ュ崟涓嬪彂鏂规硶
    * @param {*} args
    * @param {Recordable} params

--
Gitblit v1.9.3