From 7f4fd9a7d182b8da1a7130355c718914cc086293 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 11 十一月 2025 16:41:55 +0800
Subject: [PATCH] feat: s

---
 src/views/EmploymentManage/TaskManageList.vue |  151 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 94 insertions(+), 57 deletions(-)

diff --git a/src/views/EmploymentManage/TaskManageList.vue b/src/views/EmploymentManage/TaskManageList.vue
index f6f6850..e3a9b20 100644
--- a/src/views/EmploymentManage/TaskManageList.vue
+++ b/src/views/EmploymentManage/TaskManageList.vue
@@ -43,7 +43,7 @@
           </QueryFilterItem>
         </template>
         <template #btn>
-          <el-button @click="goAddOrEdit()" type="primary">鍙戝竷</el-button>
+          <!-- <el-button @click="goAddOrEdit()" type="primary">鍙戝竷</el-button> -->
         </template>
       </ProTableQueryFilterBar>
       <ProTableV2
@@ -78,7 +78,7 @@
 import { EnumTaskStatusText, EnumTaskReleaseStatusText } from '@/constants';
 import { useGlobalEventContext } from '@/hooks';
 import * as taskServices from '@/services/api/task';
-import { format } from '@/utils';
+import { format, OrderUtils } from '@/utils';
 import { ModelValueType } from 'element-plus';
 import { Message } from '@bole-core/core';
 import dayjs from 'dayjs';
@@ -87,19 +87,55 @@
   name: 'TaskManageList',
 });
 
-const operationBtns = defineOperationBtns([
-  {
-    data: {
-      enCode: 'editBtn',
-      name: '缂栬緫',
-    },
+const operationBtnMap: Record<string, OperationBtnType> = {
+  // editBtn: {
+  //   emits: {
+  //     onClick: (role) => goAddOrEdit(role),
+  //   },
+  //   extraProps: {
+  //     hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete,
+  //   },
+  // },
+  detailBtn: {
     emits: {
-      onClick: (role) => goAddOrEdit(role),
-    },
-    extraProps: {
-      hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete,
+      onClick: (row: API.GetTaskInfosQueryResultItem) => goDetail(row),
     },
   },
+  // publishBtn: {
+  //   emits: {
+  //     onClick: (row: API.GetTaskInfosQueryResultItem) =>
+  //       setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess),
+  //   },
+  //   extraProps: {
+  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
+  //       row.releaseStatus === EnumTaskReleaseStatus.InProcess,
+  //   },
+  // },
+  // unPublishBtn: {
+  //   emits: {
+  //     onClick: (row: API.GetTaskInfosQueryResultItem) =>
+  //       setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped),
+  //   },
+  //   extraProps: {
+  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
+  //       row.releaseStatus === EnumTaskReleaseStatus.Stopped,
+  //   },
+  // },
+};
+
+const operationBtns = defineOperationBtns([
+  // {
+  //   data: {
+  //     enCode: 'editBtn',
+  //     name: '缂栬緫',
+  //   },
+  //   emits: {
+  //     onClick: (role) => goAddOrEdit(role),
+  //   },
+  //   extraProps: {
+  //     hide: (row: API.GetTaskInfosQueryResultItem) => row.status === EnumTaskStatus.Complete,
+  //   },
+  // },
   {
     data: {
       enCode: 'detailBtn',
@@ -109,47 +145,47 @@
       onClick: (row: API.GetTaskInfosQueryResultItem) => goDetail(row),
     },
   },
-  {
-    data: {
-      enCode: 'publishBtn',
-      name: '鍙戝竷',
-    },
-    emits: {
-      onClick: (row: API.GetTaskInfosQueryResultItem) =>
-        setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess),
-    },
-    extraProps: {
-      hide: (row: API.GetTaskInfosQueryResultItem) =>
-        row.releaseStatus === EnumTaskReleaseStatus.InProcess,
-    },
-  },
-  {
-    data: {
-      enCode: 'unPublishBtn',
-      name: '鍋滄鍙戝竷',
-    },
-    emits: {
-      onClick: (row: API.GetTaskInfosQueryResultItem) =>
-        setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped),
-    },
-    extraProps: {
-      hide: (row: API.GetTaskInfosQueryResultItem) =>
-        row.releaseStatus === EnumTaskReleaseStatus.Stopped,
-    },
-  },
-  {
-    data: {
-      enCode: 'arrangeBtn',
-      name: '瀹夋帓',
-    },
-    emits: {
-      onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row),
-    },
-    extraProps: {
-      hide: (row: API.GetTaskInfosQueryResultItem) =>
-        row.releaseStatus === EnumTaskReleaseStatus.Stopped,
-    },
-  },
+  // {
+  //   data: {
+  //     enCode: 'publishBtn',
+  //     name: '鍙戝竷',
+  //   },
+  //   emits: {
+  //     onClick: (row: API.GetTaskInfosQueryResultItem) =>
+  //       setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.InProcess),
+  //   },
+  //   extraProps: {
+  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
+  //       row.releaseStatus === EnumTaskReleaseStatus.InProcess,
+  //   },
+  // },
+  // {
+  //   data: {
+  //     enCode: 'unPublishBtn',
+  //     name: '鍋滄鍙戝竷',
+  //   },
+  //   emits: {
+  //     onClick: (row: API.GetTaskInfosQueryResultItem) =>
+  //       setTaskInfoReleaseStatus(row, EnumTaskReleaseStatus.Stopped),
+  //   },
+  //   extraProps: {
+  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
+  //       row.releaseStatus === EnumTaskReleaseStatus.Stopped,
+  //   },
+  // },
+  // {
+  //   data: {
+  //     enCode: 'arrangeBtn',
+  //     name: '瀹夋帓',
+  //   },
+  //   emits: {
+  //     onClick: (row: API.GetTaskInfosQueryResultItem) => handleArrange(row),
+  //   },
+  //   extraProps: {
+  //     hide: (row: API.GetTaskInfosQueryResultItem) =>
+  //       row.releaseStatus === EnumTaskReleaseStatus.Stopped,
+  //   },
+  // },
 ]);
 
 const router = useRouter();
@@ -225,10 +261,8 @@
       endTime: { type: 'date', format: 'YYYY-MM-DD' },
       serviceFee: {
         type: 'money',
-        formatter: (row) => {
-          return row.billingMethod === EnumBillingMethod.Face
-            ? ''
-            : `${row.serviceFee}${EnumBillingMethodUnitText[row.billingMethod]}`;
+        formatter: (row: API.GetTaskInfosQueryResultItem) => {
+          return OrderUtils.getServiceFeeText(row.serviceFee, row.billingMethod);
         },
       },
       applyBeginTime: { type: 'date', format: 'YYYY-MM-DD' },
@@ -284,6 +318,9 @@
     params: {
       id: row?.id ?? '',
     },
+    query: {
+      supplierEnterpriseId: row?.supplierEnterpriseId,
+    },
   });
 }
 function goDetail(row: API.GetTaskInfosQueryResultItem) {

--
Gitblit v1.9.1