From 44f10c278aae48b8793ae7309488c24494e69866 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 18 十一月 2025 14:46:19 +0800
Subject: [PATCH] fix: s
---
src/views/MaterialReview/MaterialReview.vue | 128 ++++++++++++++++++++++--------------------
1 files changed, 66 insertions(+), 62 deletions(-)
diff --git a/src/views/MaterialReview/MaterialReview.vue b/src/views/MaterialReview/MaterialReview.vue
index 15f6a7c..29530d4 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,6 +59,7 @@
<ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns">
</ProTableV2>
+ <ParkBountyApplyRedoDialog v-bind="dialogProps" />
</AppContainer>
</LoadingLayout>
</template>
@@ -64,82 +76,29 @@
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 { useGlobalEventContext } from '@/hooks';
+import { useAccess, useGlobalEventContext, useIndustrialParkDropDownList } from '@/hooks';
+import ParkBountyApplyRedoDialog from './components/ParkBountyApplyRedoDialog.vue';
defineOptions({
name: 'MaterialReviewList',
});
-const column: API.CustomModuleColumnDto[] = [
- {
- id: '1',
- enCode: 'batchNo',
- name: '鐢宠鎵规鍙�',
- },
- {
- id: '2',
- enCode: 'parkName',
- name: '鐢宠鍥尯',
- },
- {
- id: '3',
- enCode: 'parkTypeName',
- name: '鍥尯绫诲瀷',
- },
- {
- id: '4',
- enCode: 'applyMonth',
- name: '鐢宠濂栧姳閲戞湀浠�',
- },
- {
- id: '5',
- enCode: 'applySumAmount',
- name: '濂栧姳閲戞眹鎬婚噾棰濓紙鍏冿級',
- },
- {
- id: '6',
- enCode: 'creationTime',
- name: '鐢虫姤鏃ユ湡',
- },
- {
- id: '7',
- enCode: 'outCheckAuditOperator',
- name: '瀹℃牳浜�',
- },
- {
- id: '8',
- enCode: 'outCheckTime',
- name: '瀹℃牳鏃ユ湡',
- },
- {
- id: '9',
- enCode: 'outCheckStatus',
- name: '瀹℃牳鐘舵��',
- },
-];
-
-const operationBtns = defineOperationBtns([
- {
- data: {
- enCode: 'detailBtn',
- name: '璇︽儏',
- },
+const operationBtnMap: Record<string, OperationBtnType> = {
+ detailBtn: {
emits: {
onClick: (role) => goDetail(role),
},
},
- {
- data: {
- enCode: 'auditBtn',
- name: '瀹℃牳',
- },
+ auditBtn: {
emits: {
onClick: (role) => goAudit(role),
},
@@ -148,12 +107,27 @@
row.outCheckStatus !== BountyCheckStatusEnum.WaitCheck,
},
},
-]);
+ redoBtn: {
+ emits: {
+ onClick: (role) => openDialog(role),
+ },
+ extraProps: {
+ hide: (row: API.GetParkBountyApplyListOutput) =>
+ row.outCheckStatus !== BountyCheckStatusEnum.CheckPassed,
+ },
+ },
+};
+
+const { checkSubModuleItemShow, column, operationBtns } = useAccess({
+ operationBtnMap,
+});
const router = useRouter();
const BaseState = {
loading: true,
};
+
+const { fourStreamsIndustrialParkList } = useIndustrialParkDropDownList();
const state = reactive({ ...BaseState });
@@ -189,6 +163,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,
@@ -203,6 +178,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鏈�' },
@@ -230,6 +206,34 @@
},
});
}
+
+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) {}
+}
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.1