From 85f7bdb64b1f8b0fdaf58355a4f3fc389ec26ad0 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 18 十一月 2025 16:00:00 +0800
Subject: [PATCH] feat: 新增审核撤回日志

---
 src/views/MaterialReview/MaterialReview.vue |   69 +++++++++++++++++++++++++++++++++-
 1 files changed, 67 insertions(+), 2 deletions(-)

diff --git a/src/views/MaterialReview/MaterialReview.vue b/src/views/MaterialReview/MaterialReview.vue
index 690d192..7eb8ee8 100644
--- a/src/views/MaterialReview/MaterialReview.vue
+++ b/src/views/MaterialReview/MaterialReview.vue
@@ -3,6 +3,17 @@
     <AppContainer>
       <ProTableQueryFilterBar @on-reset="reset">
         <template #query>
+          <QueryFilterItem>
+            <FieldSelect
+              v-model="extraParamState.industrialParkId"
+              placeholder="璇烽�夋嫨鍥尯"
+              :value-enum="fourStreamsIndustrialParkList"
+              enumLabelKey="parkName"
+              enum-value-key="id"
+              clearable
+              @change="getList()"
+            />
+          </QueryFilterItem>
           <QueryFilterItem tip-content="鐢虫姤鏃ユ湡">
             <FieldDatePicker
               v-model="extraParamState.creationTime"
@@ -48,7 +59,9 @@
 
       <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns">
       </ProTableV2>
+      <ParkBountyApplyRedoDialog v-bind="dialogProps" />
     </AppContainer>
+    <OperateHistoryLogDialog v-bind="logDialogProps" />
   </LoadingLayout>
 </template>
 
@@ -64,14 +77,22 @@
   FieldRadio,
   QueryFilterItem,
   FieldDatePicker,
+  FieldSelect,
+  useFormDialog,
 } from '@bole-core/components';
-import { OrderInputType } from '@bole-core/core';
+import { Message, OrderInputType } from '@bole-core/core';
 import { format } from '@/utils';
 import { BountyCheckStatusEnum, BountyCheckStatusEnumText, DataRangeEnumText } from '@/constants';
 import * as parkBountyApplyServices from '@/services/api/ParkBountyApply';
 import _ from 'lodash';
 import { ModelValueType } from 'element-plus';
-import { useAccess, useGlobalEventContext } from '@/hooks';
+import {
+  useAccess,
+  useGlobalEventContext,
+  useIndustrialParkDropDownList,
+  useOpenLogDialog,
+} from '@/hooks';
+import ParkBountyApplyRedoDialog from './components/ParkBountyApplyRedoDialog.vue';
 
 defineOptions({
   name: 'MaterialReviewList',
@@ -92,6 +113,16 @@
         row.outCheckStatus !== BountyCheckStatusEnum.WaitCheck,
     },
   },
+  redoBtn: {
+    emits: {
+      onClick: (role) => openDialog(role),
+    },
+    extraProps: {
+      hide: (row: API.GetParkBountyApplyListOutput) =>
+        row.outCheckStatus !== BountyCheckStatusEnum.CheckPassed,
+    },
+  },
+  logBtn: { emits: { onClick: (role) => openLogDialog(role.id) } },
 };
 
 const { checkSubModuleItemShow, column, operationBtns } = useAccess({
@@ -102,6 +133,8 @@
 const BaseState = {
   loading: true,
 };
+
+const { fourStreamsIndustrialParkList } = useIndustrialParkDropDownList();
 
 const state = reactive({ ...BaseState });
 
@@ -137,6 +170,7 @@
         creationTimeEnd: format(extraParamState.creationTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'),
         outCheckTimeBegin: format(extraParamState.outCheckTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'),
         outCheckTimeEnd: format(extraParamState.outCheckTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'),
+        industrialParkId: extraParamState.industrialParkId,
       };
       let res = await parkBountyApplyServices.getOutcheckParkBountyList(params, {
         showLoading: !state.loading,
@@ -151,6 +185,7 @@
       creationTime: [] as unknown as ModelValueType,
       outCheckTime: [] as unknown as ModelValueType,
       orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }],
+      industrialParkId: '',
     },
     columnsRenderProps: {
       applyMonth: { type: 'date', format: 'YYYY骞碝M鏈�' },
@@ -178,6 +213,36 @@
     },
   });
 }
+
+function openDialog(row: API.GetParkBountyApplyListOutput) {
+  handleAdd({
+    parkBountyApplyId: row.id,
+  });
+}
+
+const { dialogProps, handleAdd, editForm } = useFormDialog({
+  onConfirm: outcheckParkBountyApplyRedoed,
+  defaultFormParams: {
+    reasonForWithdrawal: '',
+    parkBountyApplyId: '',
+  },
+});
+
+async function outcheckParkBountyApplyRedoed() {
+  try {
+    let params: API.OutcheckParkBountyApplyRedoedInput = {
+      parkBountyApplyId: editForm.parkBountyApplyId,
+      reasonForWithdrawal: editForm.reasonForWithdrawal,
+    };
+    let res = await parkBountyApplyServices.outcheckParkBountyApplyRedoed(params);
+    if (res) {
+      Message.successMessage('鎿嶄綔鎴愬姛');
+      getList(paginationState.pageIndex);
+    }
+  } catch (error) {}
+}
+
+const { openLogDialog, logDialogProps } = useOpenLogDialog();
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.1