From 96e58ff6d672dba3565e864bed059d4ced5c2f73 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期三, 14 五月 2025 13:39:31 +0800 Subject: [PATCH] feat: 接口 --- src/views/EnterpriseInfo/EnterpriseInfoDetail.vue | 4 src/views/Reward/components/WithdrawalApprovalAuditDialog.vue | 255 ++++++++ src/services/api/typings.d.ts | 186 +++++ src/views/EnterpriseInfo/EnterpriseInfo.vue | 49 + src/components/commonView/SettlementMaterialInfoView.vue | 57 - src/views/Reward/components/RegisterDialog.vue | 116 +++ src/hooks/index.ts | 1 src/services/api/EnterpriseApplyFile.ts | 15 src/views/MaterialReview/MaterialReviewAudit.vue | 36 src/components/commonView/MaterialInfoView.vue | 13 src/components/commonView/DetailView.vue | 6 src/constants/common.ts | 9 src/hooks/portraitTable.ts | 50 + src/views/Reward/RewardGrant.vue | 241 ++++++- src/views/Reward/WithdrawalApproval.vue | 240 +++++++ src/constants/reward.ts | 57 + src/views/Reward/RewardDeclareDetail.vue | 34 src/views/Reward/components/UploadCertRewardDialog.vue | 107 +++ src/views/EnterpriseInfo/components/WithdrawalRecordView.vue | 118 +++ src/components/Table/PortraitTableWithAttachment.vue | 72 ++ src/router/index.ts | 15 src/constants/index.ts | 1 src/services/api/ParkBountyApply.ts | 137 ++++ src/views/MaterialReview/MaterialReviewDetail.vue | 36 24 files changed, 1,678 insertions(+), 177 deletions(-) diff --git a/src/components/Table/PortraitTableWithAttachment.vue b/src/components/Table/PortraitTableWithAttachment.vue new file mode 100644 index 0000000..cefb234 --- /dev/null +++ b/src/components/Table/PortraitTableWithAttachment.vue @@ -0,0 +1,72 @@ +<template> + <PortraitTable v-bind="portraitTableProps" :label-width="labelWidth"> </PortraitTable> + <div class="enclosure-list-title">闄勪欢鍒楄〃</div> + <ProTableV2 + :table-data="annexList" + :columns="CommonAnnexTableColumns" + :operation-btns="operationListBtns" + :show-pagination="false" + :show-no-data="false" + :auto-height="false" + :show-table-column-setting="false" + :table-props="{ maxHeight: '400px' }" + :column-render-map="columnsRenderProps" + > + </ProTableV2> +</template> + +<script setup lang="ts" generic="TAnnexItem"> +import { downloadFileByUrl } from '@bole-core/core'; +import { CommonAnnexTableColumns } from '@/constants'; +import { ProTableV2, ProTableV2Props } from '@bole-core/components'; + +defineOptions({ + name: 'PortraitTableWithAttachment', +}); + +type Props = { + annexList: TAnnexItem[]; + customDownLoad?: (row: TAnnexItem) => Promise<any>; + labelWidth?: string; + portraitTableProps: any; + columnsRenderProps?: ProTableV2Props['columnRenderMap']; + downloadFileKey?: keyof TAnnexItem; +}; + +const props = withDefaults(defineProps<Props>(), { + labelWidth: '180px', + columnsRenderProps: () => ({}), + downloadFileKey: 'url' as any, +}); + +const operationListBtns = [ + { + data: { + enCode: 'downloadBtn', + name: '涓嬭浇', + }, + emits: { + onClick: (row) => handleDownload(row), + }, + }, +]; + +function handleDownload(row: TAnnexItem) { + if (props.customDownLoad) { + props.customDownLoad(row); + } else { + downloadFileByUrl(row[props.downloadFileKey] as any); + } +} +</script> + +<style lang="scss" scoped> +@use '@/style/common.scss' as *; + +.enclosure-list-title { + padding: 16px 0; + font-size: 14px; + color: getCssVar('text-color', 'primary'); + line-height: 19px; +} +</style> diff --git a/src/components/commonView/DetailView.vue b/src/components/commonView/DetailView.vue index 40ca771..31fef11 100644 --- a/src/components/commonView/DetailView.vue +++ b/src/components/commonView/DetailView.vue @@ -34,10 +34,12 @@ applyMonth: string; applySumAmount: number; /** 濂栧姳閲戝垎閰嶈〃 */ - bountyAssignFileUlr: UploadUserFile[]; + // bountyAssignFileUlr: UploadUserFile[]; /** 濂栧姳閲戞眹鎬昏〃 */ - bountyCollectFileUrl: UploadUserFile[]; + // bountyCollectFileUrl: UploadUserFile[]; parkCollectFileList: CustomerApplyFileTypeListItem[]; + /**姹囩畻鏉愭枡 */ + calculationFileList: CustomerApplyFileTypeListItem[]; /** 鏄惁鏀寔骞冲彴鍏呭�� */ suportPlatRecharge?: boolean; }; diff --git a/src/components/commonView/MaterialInfoView.vue b/src/components/commonView/MaterialInfoView.vue index 5308a1b..09df816 100644 --- a/src/components/commonView/MaterialInfoView.vue +++ b/src/components/commonView/MaterialInfoView.vue @@ -1,10 +1,7 @@ <template> - <!-- <ProFormCol> - <ProFormColItem :span="12"> --> <ProFormItemV2 :label="`${item.fileTypeName}:`" :prop="`parkCollectFileList.${index}.listFiles`" - :check-rules="[{ message: `璇蜂笂浼�${item.fileTypeName}`, type: 'upload' }]" :label-width="160" :style="{ marginBottom: index === form.parkCollectFileList.length - 1 ? 0 : '22px' }" v-for="(item, index) in form.parkCollectFileList" @@ -18,18 +15,10 @@ accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png" ></ProFormUpload> </ProFormItemV2> - <!-- </ProFormColItem> - </ProFormCol> --> </template> <script setup lang="ts"> -import { - ProFormCol, - ProFormColItem, - ProFormItemV2, - ProFormUpload, - UploadUserFile, -} from '@bole-core/components'; +import { ProFormItemV2, ProFormUpload } from '@bole-core/components'; import { CustomerApplyFileTypeListItem } from './utils'; defineOptions({ diff --git a/src/components/commonView/SettlementMaterialInfoView.vue b/src/components/commonView/SettlementMaterialInfoView.vue index a81a5f5..6fb7d33 100644 --- a/src/components/commonView/SettlementMaterialInfoView.vue +++ b/src/components/commonView/SettlementMaterialInfoView.vue @@ -1,46 +1,34 @@ <template> - <ProFormCol> - <ProFormColItem :span="12"> - <ProFormItemV2 label="鏈鐢虫姤濂栧姳閲戞�婚:" prop="applySumAmount"> - <ProFormInputNumber v-model="form.applySumAmount" formatValue="money" unit="鍏�" /> - </ProFormItemV2> - </ProFormColItem> - </ProFormCol> - <ProFormCol> - <ProFormColItem :span="12"> - <ProFormItemV2 - label="濂栧姳閲戝垎閰嶆槑缁嗚〃:" - prop="bountyAssignFileUlr" - style="margin-bottom: 22px" - > - <ProFormUpload - v-model:file-url="form.bountyAssignFileUlr" - :limitShowViewMoreBtnCount="4" - ></ProFormUpload> - </ProFormItemV2> - </ProFormColItem> - </ProFormCol> - <ProFormCol> - <ProFormColItem :span="12"> - <ProFormItemV2 label="濂栧姳閲戞眹鎬昏〃:" prop="bountyCollectFileUrl"> - <ProFormUpload - v-model:file-url="form.bountyCollectFileUrl" - :limitShowViewMoreBtnCount="4" - ></ProFormUpload> - </ProFormItemV2> - </ProFormColItem> - </ProFormCol> + <ProFormItemV2 label="鏈鐢虫姤濂栧姳閲戞�婚:" prop="applySumAmount"> + <ProFormInputNumber v-model="form.applySumAmount" formatValue="money" unit="鍏�" /> + </ProFormItemV2> + <ProFormItemV2 + :label="`${item.fileTypeName}:`" + :prop="`calculationFileList.${index}.listFiles`" + :label-width="160" + :style="{ marginBottom: index === form.calculationFileList.length - 1 ? 0 : '22px' }" + v-for="(item, index) in form.calculationFileList" + :key="item.fileSearchTypeId" + > + <ProFormUpload + v-model:file-url="item.listFiles" + :limit="1" + :limitFileSize="50" + :showTip="false" + :limitShowViewMoreBtnCount="4" + accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png" + ></ProFormUpload> + </ProFormItemV2> </template> <script setup lang="ts"> import { - ProFormCol, - ProFormColItem, ProFormItemV2, ProFormUpload, UploadUserFile, ProFormInputNumber, } from '@bole-core/components'; +import { CustomerApplyFileTypeListItem } from './utils'; defineOptions({ name: 'SettlementMaterialInfoView', @@ -49,8 +37,7 @@ type Props = { form: { applySumAmount: number; - bountyAssignFileUlr: UploadUserFile[]; - bountyCollectFileUrl: UploadUserFile[]; + calculationFileList: CustomerApplyFileTypeListItem[]; }; }; diff --git a/src/constants/common.ts b/src/constants/common.ts new file mode 100644 index 0000000..d2a756c --- /dev/null +++ b/src/constants/common.ts @@ -0,0 +1,9 @@ +import { defineColumns } from '@bole-core/components'; + +export const CommonAnnexTableColumns = defineColumns([ + { + id: '1', + enCode: 'name', + name: '鏂囦欢鍚�', + }, +]); diff --git a/src/constants/index.ts b/src/constants/index.ts index 195d367..649a1be 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,4 +1,5 @@ export * from './enum'; +export * from './common'; export * from './oss'; export * from './module'; export * from './editor'; diff --git a/src/constants/reward.ts b/src/constants/reward.ts index 966f1e5..85294f9 100644 --- a/src/constants/reward.ts +++ b/src/constants/reward.ts @@ -56,6 +56,11 @@ [SettleStatusEnum.HasSettle]: '宸插厖鍊�', [SettleStatusEnum.NoNeed]: '鏃犻渶鍏呭��', }; +export const SettleStatusEnumTextV2 = { + [SettleStatusEnum.WaitForSettle]: '寰呯櫥璁�', + [SettleStatusEnum.HasSettle]: '宸茬櫥璁�', + [SettleStatusEnum.NoNeed]: '鏃犻渶鐧昏', +}; export enum FinanceStatusEnum { /** @@ -71,6 +76,11 @@ export const FinanceStatusEnumText = { [FinanceStatusEnum.WaitForIncome]: '寰呮嫧浠�', [FinanceStatusEnum.HasIncome]: '宸叉嫧浠�', +}; + +export const FinanceStatusEnumTextV2 = { + [FinanceStatusEnum.WaitForIncome]: '寰呯櫥璁�', + [FinanceStatusEnum.HasIncome]: '宸茬櫥璁�', }; export enum IncomeStatusEnum { @@ -100,3 +110,50 @@ [EnterpriseBountyPayTypeEnum.PayOut]: '鍑洪噾', [EnterpriseBountyPayTypeEnum.PayIn]: '鍏ラ噾', }; + +export enum IncomeTypeEnum { + /**璐㈡斂鎷ㄤ粯 */ + Fiscal = 10, + /**骞冲彴鍏呭�� */ + Platform = 20, +} + +export const IncomeTypeEnumText = { + [IncomeTypeEnum.Fiscal]: '璐㈡斂鎷ㄤ粯', + [IncomeTypeEnum.Platform]: '骞冲彴鍏呭��', +}; + +export enum EnterpriseRechargeStatusEnum { + /**寰呭鏍� */ + WaitCheck = 10, + /**瀹℃牳閫氳繃 */ + CheckPassed = 20, + /**椹冲洖 */ + CheckReject = 30, +} + +export const EnterpriseRechargeStatusEnumText = { + [EnterpriseRechargeStatusEnum.WaitCheck]: '寰呭鏍�', + [EnterpriseRechargeStatusEnum.CheckPassed]: '瀹℃牳閫氳繃', + [EnterpriseRechargeStatusEnum.CheckReject]: '椹冲洖', +}; + +export const EnterpriseRechargeStatusEnumTextForAdudit = { + [EnterpriseRechargeStatusEnum.CheckPassed]: '閫氳繃', + [EnterpriseRechargeStatusEnum.CheckReject]: '椹冲洖', +}; + +export enum BillStatusEnum { + /**鏈笂浼� */ + NotUpload = 10, + /**寰呭畬鍠� */ + NeedUpload = 20, + /**宸蹭笂浼� */ + HasUpload = 30, +} + +export const BillStatusEnumText = { + [BillStatusEnum.NotUpload]: '鏈笂浼�', + [BillStatusEnum.NeedUpload]: '寰呭畬鍠�', + [BillStatusEnum.HasUpload]: '宸蹭笂浼�', +}; diff --git a/src/hooks/index.ts b/src/hooks/index.ts index efd8b4b..e101419 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -3,6 +3,7 @@ export * from './useAccess'; export * from './useRouteView'; // export * from './useArea'; +export * from './portraitTable'; export * from './useEvent'; export * from './useUser'; export * from './help'; diff --git a/src/hooks/portraitTable.ts b/src/hooks/portraitTable.ts new file mode 100644 index 0000000..844586a --- /dev/null +++ b/src/hooks/portraitTable.ts @@ -0,0 +1,50 @@ +import { ColumnsRenderProps } from '@bole-core/components'; +import { MaybeRef } from 'vue'; + +export type UsePortraitTableColumnsItem<TData extends object = object> = ColumnsRenderProps & { + label?: string; + key?: keyof TData; +}; + +export type UsePortraitTableOptions<TData extends object> = { + data: Ref<TData>; + columns?: UsePortraitTableColumnsItem<TData>[]; +}; + +export function usePortraitTable<TData extends object>(options: UsePortraitTableOptions<TData>) { + const portraitTableProps = computed( + () => + ({ + data: options.data.value, + columns: options.columns ?? [], + } as any) + ); + + return { + portraitTableProps, + }; +} + +type UsePortraitTableWithAttachmentOptions< + TData extends object, + TAnnexItem extends object = object +> = UsePortraitTableOptions<TData> & { + annexList: Ref<TAnnexItem[]>; + columnsRenderProps?: { [key in keyof TAnnexItem]?: ColumnsRenderProps }; +}; + +export function usePortraitTableWithAttachment< + TData extends object, + TAnnexItem extends object = object +>(options: UsePortraitTableWithAttachmentOptions<TData, TAnnexItem>) { + const { annexList, columnsRenderProps } = options; + const { portraitTableProps } = usePortraitTable(options); + + const portraitTableWithAttachmentProps = computed(() => ({ + annexList: annexList.value, + portraitTableProps: portraitTableProps.value, + columnsRenderProps, + })); + + return { portraitTableWithAttachmentProps }; +} diff --git a/src/router/index.ts b/src/router/index.ts index 627583d..cb3837d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -205,7 +205,7 @@ component: () => import('@/views/Reward/RewardGrant.vue'), meta: { rank: 10031, - title: '濂栧姳鍙戞斁', + title: '濂栧姳鍙戞斁鐧昏', // rootMenu: true, icon: 'home', }, @@ -221,6 +221,19 @@ rootMenu: false, }, }, + { + path: '/WithdrawalApproval', + name: 'WithdrawalApproval', + hidden: false, + alwaysShow: true, + component: () => import('@/views/Reward/WithdrawalApproval.vue'), + meta: { + rank: 10033, + title: '鎻愮幇瀹℃壒', + // rootMenu: true, + icon: 'home', + }, + }, ], }, // { diff --git a/src/services/api/EnterpriseApplyFile.ts b/src/services/api/EnterpriseApplyFile.ts index 3013b93..90bd80f 100644 --- a/src/services/api/EnterpriseApplyFile.ts +++ b/src/services/api/EnterpriseApplyFile.ts @@ -2,6 +2,21 @@ // @ts-ignore import { request } from '@/utils/request'; +/** 鎵归噺寮曠敤浼佷笟璧勬枡 GET /api/EnterpriseApplyFile/BatchQuoteEnterpriseApplyFile */ +export async function batchQuoteEnterpriseApplyFile( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIbatchQuoteEnterpriseApplyFileParams, + options?: API.RequestConfig +) { + return request<number>('/api/EnterpriseApplyFile/BatchQuoteEnterpriseApplyFile', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} + /** 纭鎻愪氦鏉愭枡涓婁紶 POST /api/EnterpriseApplyFile/CustomerUploadMonthApplyFile */ export async function customerUploadMonthApplyFile( body: API.CustomerUploadMonthApplyFileInput, diff --git a/src/services/api/ParkBountyApply.ts b/src/services/api/ParkBountyApply.ts index fbe0aa0..e75e6e9 100644 --- a/src/services/api/ParkBountyApply.ts +++ b/src/services/api/ParkBountyApply.ts @@ -32,6 +32,21 @@ }); } +/** 鎻愮幇瀹℃牳 POST /api/ParkBountyApply/CheckEnterpriseApplyDrawWith */ +export async function checkEnterpriseApplyDrawWith( + body: API.CheckEnterpriseApplyDrawWithInput, + options?: API.RequestConfig +) { + return request<number>('/api/ParkBountyApply/CheckEnterpriseApplyDrawWith', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 棰勫厖鍊煎鏍� POST /api/ParkBountyApply/CheckUserEnterpriseRecharge */ export async function checkUserEnterpriseRecharge( body: API.CheckUserEnterpriseRechargeInput, @@ -77,6 +92,21 @@ }); } +/** 瀹㈡埛绔�-鐢宠鎻愮幇 POST /api/ParkBountyApply/EnterpriseApplyDrawWith */ +export async function enterpriseApplyDrawWith( + body: API.EnterpriseApplyDrawWithInput, + options?: API.RequestConfig +) { + return request<number>('/api/ParkBountyApply/EnterpriseApplyDrawWith', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 鑾峰彇鍙�夋嫨鍏徃鍜屽凡鍓旈櫎鍏徃 POST /api/ParkBountyApply/GetCompanyNameList */ export async function getCompanyNameList( body: API.GetCompanyNameListInput, @@ -99,6 +129,42 @@ ) { return request<API.GetParkBountyApplyListOutputPageOutput>( '/api/ParkBountyApply/GetCustmoerParkBountyApplyList', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 鑾峰彇鎻愮幇鐢宠璇︽儏 GET /api/ParkBountyApply/GetEnterpriseDrawWithDetail */ +export async function getEnterpriseDrawWithDetail( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIgetEnterpriseDrawWithDetailParams, + options?: API.RequestConfig +) { + return request<API.GetEnterpriseDrawWithDetailOutput>( + '/api/ParkBountyApply/GetEnterpriseDrawWithDetail', + { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** 鑾峰彇鎻愮幇鐢宠璁板綍鍒楄〃 POST /api/ParkBountyApply/GetEnterpriseDrawWithList */ +export async function getEnterpriseDrawWithList( + body: API.GetEnterpriseDrawWithListInput, + options?: API.RequestConfig +) { + return request<API.GetEnterpriseDrawWithListOutputPageOutput>( + '/api/ParkBountyApply/GetEnterpriseDrawWithList', { method: 'POST', headers: { @@ -168,6 +234,21 @@ ) { return request<API.GetEnterprisePreChargeCheckListOutputPageOutput>( '/api/ParkBountyApply/GetEnterprisePreChargeCheckList', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 鑾峰彇鍏呭�艰褰曞垪琛� POST /api/ParkBountyApply/GetEnterprisePrechargeList */ +export async function getEnterprisePrechargeList(body: API.PageInput, options?: API.RequestConfig) { + return request<API.GetEnterprisePrechargeListOutputPageOutput>( + '/api/ParkBountyApply/GetEnterprisePrechargeList', { method: 'POST', headers: { @@ -508,13 +589,31 @@ ); } -/** 杩愯惀绔竴鍥尯瀹㈡埛绠$悊璇︽儏涓�濂栧姳閲戝彂鏀捐褰� POST /api/ParkBountyApply/GetParkCustomerBountyGrantList */ -export async function getParkCustomerBountyGrantList( +/** 鎷ㄤ粯璁板綍 POST /api/ParkBountyApply/GetParkCustomerBountyFinanceList */ +export async function getParkCustomerBountyFinanceList( body: API.QueryParkCustomerBountyApplyInput, options?: API.RequestConfig ) { - return request<API.GetParkCustomerBountyGrantOutputPageOutput>( - '/api/ParkBountyApply/GetParkCustomerBountyGrantList', + return request<API.GetParkCustomerBountyFinanceOutputPageOutput>( + '/api/ParkBountyApply/GetParkCustomerBountyFinanceList', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 杩愯惀绔竴鍥尯瀹㈡埛绠$悊璇︽儏涓�濂栧姳閲戝彂鏀捐褰� POST /api/ParkBountyApply/GetParkCustomerBountySettleList */ +export async function getParkCustomerBountySettleList( + body: API.QueryParkCustomerBountyApplyInput, + options?: API.RequestConfig +) { + return request<API.GetParkCustomerBountySettleOutputPageOutput>( + '/api/ParkBountyApply/GetParkCustomerBountySettleList', { method: 'POST', headers: { @@ -649,6 +748,21 @@ }); } +/** 涓婁紶璐㈡斂鎷ㄤ粯鐧昏閲戦 POST /api/ParkBountyApply/ParkBountyApplyFinanceBillAmount */ +export async function parkBountyApplyFinanceBillAmount( + body: API.ParkBountyApplyFinanceFileInput, + options?: API.RequestConfig +) { + return request<number>('/api/ParkBountyApply/ParkBountyApplyFinanceBillAmount', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 璐㈡斂鍏ヨ处涓婁紶鍑瘉 POST /api/ParkBountyApply/ParkBountyApplyFinanceFile */ export async function parkBountyApplyFinanceFile( body: API.ParkBountyApplyRechargeFileInput, @@ -679,6 +793,21 @@ }); } +/** 涓婁紶鍏呭�肩櫥璁伴噾棰� POST /api/ParkBountyApply/ParkBountyApplySettleAmount */ +export async function parkBountyApplySettleAmount( + body: API.ParkBountyApplySettleInput, + options?: API.RequestConfig +) { + return request<number>('/api/ParkBountyApply/ParkBountyApplySettleAmount', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + /** 杩愯惀绔�斿鍔遍噾-鍑鸿处 POST /api/ParkBountyApply/ParkBountyApplyTrade */ export async function parkBountyApplyTrade( body: API.CreateParkBountyTradeInput, diff --git a/src/services/api/typings.d.ts b/src/services/api/typings.d.ts index b759d38..84afdc7 100644 --- a/src/services/api/typings.d.ts +++ b/src/services/api/typings.d.ts @@ -235,6 +235,8 @@ suportEnterpriseUpload?: boolean; /** 鏄惁鏀寔骞冲彴鍏呭�� */ suportPlatRecharge?: boolean; + /** 鏄惁鏀寔鐢ㄦ埛鎻愮幇 */ + suportWithDraw?: boolean; /** 鏂囦欢 */ industrialParkApplyFileFile?: IndustrialParkApplyFileFile[]; } @@ -958,6 +960,10 @@ productId?: string; } + interface APIbatchQuoteEnterpriseApplyFileParams { + parkBountyApplyId?: string; + } + interface APIcalculationWalletBatchImportTempPayFeeParams { walletAccountType?: WalletAccountTypeEnum; } @@ -1352,6 +1358,10 @@ interface APIgetElecBillInfoParams { transactionDetailId?: string; + } + + interface APIgetEnterpriseDrawWithDetailParams { + drawWithId?: string; } interface APIgetEnterpriseLastUploadEnterPactFileNewParams { @@ -2725,6 +2735,8 @@ type BestSignUserSignStatusEunm = 1 | 5 | 10 | 20 | 30 | 40 | 50 | 90; + type BillStatusEnum = 10 | 20 | 30; + interface BindUserEmailInput { /** 閭 */ bindEmailAddress: string; @@ -3022,6 +3034,14 @@ circleFriendReplyId?: string; /** 瀹℃牳鐘舵�� 閫氳繃锛�10 椹冲洖锛�-10 */ status?: number; + } + + interface CheckEnterpriseApplyDrawWithInput { + applyDrawWithId?: string; + checkStatus?: EnterpriseRechargeStatusEnum; + /** 鎻愮幇鍑瘉 */ + checkFileUrl?: string; + checkRemark?: string; } interface CheckInsureCityIsAllowInput { @@ -5648,6 +5668,11 @@ freeCount?: number; } + interface EnterpriseApplyDrawWithInput { + amount?: number; + invoiceUrl?: string; + } + interface EnterpriseBatchRefundInput { guid?: string; listOrderNo?: number[]; @@ -5739,6 +5764,8 @@ type EnterpriseMonthApplyStatusEnum = 10 | 20; type EnterpriseMonthUploadStatusEnum = 10 | 20 | 30; + + type EnterprisePrechargeInComeStatusEnum = 10 | 20; type EnterpriseRechargeStatusEnum = 10 | 20 | 30; @@ -5967,7 +5994,7 @@ fileId?: string; } - type FinanceStatusEnum = 1 | 2; + type FinanceStatusEnum = 1 | 2 | 3; type FinanceTypeEnum = 10 | 20; @@ -6823,6 +6850,57 @@ data?: GetEnterpriseCredentialDataResponse; } + interface GetEnterpriseDrawWithDetailOutput { + id?: string; + enterpriseId?: string; + enterpriseName?: string; + societyCreditCode?: string; + creationTime?: string; + accountName?: string; + bankNumber?: string; + bankName?: string; + bankResumeName?: string; + amount?: number; + remainAmount?: number; + invoiceUrl?: string; + checkStatus?: EnterpriseRechargeStatusEnum; + checkTime?: string; + checkUserId?: string; + checkRemark?: string; + checkFileUrl?: string; + } + + interface GetEnterpriseDrawWithListInput { + pageModel?: Pagination; + keyWord?: string; + beginDateTime?: string; + endDateTime?: string; + checkStatus?: EnterpriseRechargeStatusEnum; + } + + interface GetEnterpriseDrawWithListOutput { + drawWithId?: string; + enterpriseId?: string; + enterpriseName?: string; + societyCreditCode?: string; + creationTime?: string; + enterpriseType?: string; + parkName?: string; + parkType?: string; + amount?: number; + remainAmount?: number; + checkStatus?: EnterpriseRechargeStatusEnum; + checkTime?: string; + checkRemark?: string; + checkFileUrl?: string; + } + + interface GetEnterpriseDrawWithListOutputPageOutput { + pageModel?: Pagination; + objectData?: any; + data?: GetEnterpriseDrawWithListOutput[]; + } + interface GetEnterpriseMonthApplyFileOutput { id?: string; enterpriseId?: string; @@ -6884,6 +6962,26 @@ pageModel?: Pagination; objectData?: any; data?: GetEnterprisePreChargeCheckListOutput[]; + } + + interface GetEnterprisePrechargeListOutput { + id?: string; + /** 鍏呭�奸噾棰� */ + prechargeAmount?: number; + /** 鍏呭�煎嚟璇� */ + rechargeVoucherFileUrl?: string; + /** 瀹℃牳澶囨敞 */ + checkRemark?: string; + checkStatus?: EnterpriseRechargeStatusEnum; + inComeStatus?: EnterprisePrechargeInComeStatusEnum; + /** 鎻愪氦鏃ユ湡 */ + creationTime?: string; + } + + interface GetEnterprisePrechargeListOutputPageOutput { + pageModel?: Pagination; + objectData?: any; + data?: GetEnterprisePrechargeListOutput[]; } interface GetEnterpriseRechargeDetail { @@ -8146,6 +8244,10 @@ financeTimeEnd?: string; /** 鍏ヨ处璧峰鏃ユ湡 */ incomeTimeBegin?: string; + /** 鎷ㄤ粯鍏ヨ处缁撴潫鏃ユ湡 */ + financeIncomeTimeEnd?: string; + /** 鎷ㄤ粯鍏ヨ处璧峰鏃ユ湡 */ + financeIncomeTimeBegin?: string; /** 鍏ヨ处缁撴潫鏃ユ湡 */ incomeTimeEnd?: string; /** 澶栭儴瀹℃牳璧峰鏃ユ湡 */ @@ -8184,6 +8286,7 @@ inCheckStatus?: BountyCheckStatusEnum; /** 璐㈡斂鍏ヨ处鏃堕棿 */ financeIncomeTime?: string; + billStatus?: BillStatusEnum; financeIncomeStatus?: IncomeStatusEnum; /** 鍐呴儴瀹℃牳鏃ユ湡 */ inCheckTime?: string; @@ -8209,6 +8312,8 @@ suportEnterpriseUpload?: boolean; /** 鏄惁鏀寔骞冲彴鍏呭�� */ suportPlatRecharge?: boolean; + /** 鏄惁鏀寔鐢ㄦ埛鎻愮幇 */ + suportWithDraw?: boolean; } interface GetParkBountyApplyListOutputPageOutput { @@ -8343,6 +8448,7 @@ /** 鍑瘉 */ payFileUrl?: string; payFileUrls?: string[]; + financeType?: FinanceTypeEnum; } interface GetParkCustomerBountyConsumptionOutputPageOutput { @@ -8351,7 +8457,34 @@ data?: GetParkCustomerBountyConsumptionOutput[]; } - interface GetParkCustomerBountyGrantOutput { + interface GetParkCustomerBountyFinanceOutput { + id?: string; + /** 鐢宠鎵规鍙� */ + batchNo?: string; + /** 鐢虫姤鏈堜唤 */ + applyMonth?: string; + /** 鐢虫姤鎬婚 */ + applySumAmount?: number; + /** 璐㈡斂鎷ㄤ粯閲戦 */ + financeToAmount?: number; + /** 璐㈡斂鎷ㄤ粯鍏ヨ处鏃堕棿 */ + financeToTime?: string; + /** 璐㈡斂鎷ㄤ粯鍙戞斁鏃ユ湡 */ + financeTime?: string; + financeToStatus?: FinanceStatusEnum; + /** 鎷ㄤ粯鍏ヨ处鍑瘉 */ + financeToFileUrl?: string; + inCheckStatus?: BountyCheckStatusEnum; + outCheckStatus?: BountyCheckStatusEnum; + } + + interface GetParkCustomerBountyFinanceOutputPageOutput { + pageModel?: Pagination; + objectData?: any; + data?: GetParkCustomerBountyFinanceOutput[]; + } + + interface GetParkCustomerBountySettleOutput { id?: string; /** 鐢宠鎵规鍙� */ batchNo?: string; @@ -8368,21 +8501,17 @@ transferToFileUrl?: string; /** 璐㈡斂鎷ㄤ粯閲戦 */ financeToAmount?: number; - /** 璐㈡斂鎷ㄤ粯鍏ヨ处鏃堕棿 */ - financeToTime?: string; - /** 璐㈡斂鎷ㄤ粯鍙戞斁鏃ユ湡 */ - financeTime?: string; /** 骞冲彴鍏呭�煎彂鏀炬棩鏈� */ settleTime?: string; financeToStatus?: FinanceStatusEnum; - /** 鎷ㄤ粯鍏ヨ处鍑瘉 */ - financeToFileUrl?: string; + inCheckStatus?: BountyCheckStatusEnum; + outCheckStatus?: BountyCheckStatusEnum; } - interface GetParkCustomerBountyGrantOutputPageOutput { + interface GetParkCustomerBountySettleOutputPageOutput { pageModel?: Pagination; objectData?: any; - data?: GetParkCustomerBountyGrantOutput[]; + data?: GetParkCustomerBountySettleOutput[]; } interface GetParkCustomerManageDetailOutput { @@ -8440,11 +8569,17 @@ /** 鏈�杩戠敵鎶� */ lastApplyTime?: string; /** 鍙戞斁娆℃暟 */ - payCount?: number; + financeCount?: number; /** 鏈�杩戝彂鏀炬椂闂� */ - lastPayTime?: string; + lastFinanceTime?: string; + /** 骞冲彴鍏呭�兼鏁� */ + settleCount?: number; + /** 鏈�杩戝厖鍊兼棩鏈� */ + lastSettleTime?: string; /** 鍙戞斁鎬婚 */ - bountySumAmount?: number; + settleSumAmount?: number; + /** 鍏呭�兼�婚 */ + financeSumAmount?: number; /** 濂栧姳閲戜綑棰� */ bountyAmount?: number; } @@ -8944,6 +9079,8 @@ bountyAmount?: number; /** 鍏呭�间綑棰� */ rechargeAmount?: number; + /** 璐㈡斂鎷ㄤ粯浣欓 */ + financeAmount?: number; enterpriseName?: string; societyCreditCode?: string; licenseUrl?: string; @@ -9963,6 +10100,8 @@ suportEnterpriseUpload?: boolean; /** 鏄惁鏀寔骞冲彴鍏呭�� */ suportPlatRecharge?: boolean; + /** 鏄惁鏀寔鐢ㄦ埛鎻愮幇 */ + suportWithDraw?: boolean; /** 娉ㄥ唽鍦板潃 */ registerAddress?: string; /** 澶囨敞 */ @@ -9978,6 +10117,12 @@ parkTypeId?: string; /** 鍥尯绫诲瀷鍚嶇О */ parkTypeName?: string; + /** 鏄惁宸茬粡鍚敤濂栧姳閲戠敵鎶� */ + rewardEnable?: boolean; + /** 鏄惁鏀寔浼佷笟鑷富涓婁紶 */ + suportEnterpriseUpload?: boolean; + /** 鏄惁鏀寔骞冲彴鍏呭�� */ + suportPlatRecharge?: boolean; } interface IndustrialParkFileTypeOutput { @@ -10012,6 +10157,8 @@ suportEnterpriseUpload?: boolean; /** 鏄惁鏀寔骞冲彴鍏呭�� */ suportPlatRecharge?: boolean; + /** 鏄惁鏀寔鐢ㄦ埛鎻愮幇 */ + suportWithDraw?: boolean; } interface IndustrialParkListOutputPageOutput { @@ -14602,7 +14749,10 @@ suportEnterpriseUpload?: boolean; /** 鏄惁鏀寔骞冲彴鍏呭�� */ suportPlatRecharge?: boolean; + /** 鏄惁鏀寔鐢ㄦ埛鎻愮幇 */ + suportWithDraw?: boolean; listFiles?: CustomerUploadMonthApplyFileTypeDto[]; + collectCountListFiles?: CustomerUploadMonthApplyFileTypeDto[]; } interface OutcheckParkBountyApplyInput { @@ -14675,6 +14825,7 @@ /** 璐㈡斂鍙戞斁閲戦 */ financeSumAmount?: number; listFiles?: CustomerUploadMonthApplyFileTypeDto[]; + collectCountListFiles?: CustomerUploadMonthApplyFileTypeDto[]; } interface ParkBountyApplyBatchFinanceInput { @@ -18107,6 +18258,7 @@ bountyCollectFileUrl?: string; /** 鐢虫姤鎬婚 */ applySumAmount?: number; + listFiles?: CustomerUploadMonthApplyFileTypeDto[]; } interface SaveParkBountyApplyGatherFileInput { @@ -18504,7 +18656,7 @@ type?: number; } - type SettleStatusEnum = 1 | 2 | -1; + type SettleStatusEnum = 1 | 2 | 3 | -1; interface SetUserCertificationAuditStatusInput { /** 瀹℃牳Id */ @@ -19726,6 +19878,8 @@ suportEnterpriseUpload?: boolean; /** 鏄惁鏀寔骞冲彴鍏呭�� */ suportPlatRecharge?: boolean; + /** 鏄惁鏀寔鐢ㄦ埛鎻愮幇 */ + suportWithDraw?: boolean; /** 鏂囦欢 */ industrialParkApplyFileFile?: IndustrialParkApplyFileFile[]; id?: string; @@ -21287,8 +21441,12 @@ signatureImageStatus?: number; certificationChannel?: UserCertificationChannelEnum; industrialParkId?: string; + industrialParkName?: string; suportEnterpriseUpload?: boolean; suportPlatRecharge?: boolean; + rewardEnable?: boolean; + suportWithDraw?: boolean; + isHasBountyApply?: boolean; } interface UserMessageInfo { diff --git a/src/views/EnterpriseInfo/EnterpriseInfo.vue b/src/views/EnterpriseInfo/EnterpriseInfo.vue index 10434a9..4867cce 100644 --- a/src/views/EnterpriseInfo/EnterpriseInfo.vue +++ b/src/views/EnterpriseInfo/EnterpriseInfo.vue @@ -14,7 +14,18 @@ @change="getList()" ></FieldDatePicker> </QueryFilterItem> - <QueryFilterItem tip-content="鏈�杩戝彂鏀炬棩鏈�"> + <QueryFilterItem tip-content="鏈�杩戞嫧浠樻棩鏈�"> + <FieldDatePicker + v-model="extraParamState.lastPayTime" + type="daterange" + range-separator="~" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + clearable + @change="getList()" + ></FieldDatePicker> + </QueryFilterItem> + <QueryFilterItem tip-content="鏈�杩戝厖鍊兼棩鏈�"> <FieldDatePicker v-model="extraParamState.lastPayTime" type="daterange" @@ -111,24 +122,42 @@ }, { id: '8', - enCode: 'payCount', - name: '鍙戞斁娆℃暟', + enCode: 'financeCount', + name: '璐㈡斂鎷ㄤ粯娆℃暟', width: 150, }, { id: '9', - enCode: 'lastPayTime', - name: '鏈�杩戝彂鏀炬棩鏈�', + enCode: 'lastFinanceTime', + name: '鏈�杩戞嫧浠樻棩鏈�', width: 180, }, { id: '10', - enCode: 'bountySumAmount', - name: '鍙戞斁鎬婚', + enCode: 'financeSumAmount', + name: '鎷ㄤ粯鎬婚', width: 150, }, { id: '11', + enCode: 'settleCount', + name: '骞冲彴鍏呭�兼鏁�', + width: 150, + }, + { + id: '12', + enCode: 'lastSettleTime', + name: '鏈�杩戝厖鍊兼棩鏈�', + width: 180, + }, + { + id: '13', + enCode: 'settleSumAmount', + name: '鍏呭�兼�婚', + width: 150, + }, + { + id: '14', enCode: 'bountyAmount', name: '骞冲彴鍏呭�间綑棰�', width: 150, @@ -195,8 +224,10 @@ }, columnsRenderProps: { lastApplyTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, - lastPayTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, - bountySumAmount: { type: 'money' }, + lastFinanceTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, + financeSumAmount: { type: 'money' }, + lastSettleTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, + settleSumAmount: { type: 'money' }, bountyAmount: { type: 'money' }, enterpriseType: { type: 'enum', valueEnum: EnterpriseTypeText }, }, diff --git a/src/views/EnterpriseInfo/EnterpriseInfoDetail.vue b/src/views/EnterpriseInfo/EnterpriseInfoDetail.vue index 09968dc..3092c68 100644 --- a/src/views/EnterpriseInfo/EnterpriseInfoDetail.vue +++ b/src/views/EnterpriseInfo/EnterpriseInfoDetail.vue @@ -14,6 +14,9 @@ <ProTabPane lazy label="娑堣垂璁板綍" name="rewardConsumeRecord"> <RewardConsumeRecordView></RewardConsumeRecordView> </ProTabPane> + <ProTabPane lazy label="鎻愮幇璁板綍" name="rewardConsumeRecord"> + <WithdrawalRecordView></WithdrawalRecordView> + </ProTabPane> </ProTabs> </AppContainer> </LoadingLayout> @@ -25,6 +28,7 @@ import EnterpriseDeclareRecordView from './components/EnterpriseDeclareRecordView.vue'; import RewardGrantRecordView from './components/RewardGrantRecordView.vue'; import RewardConsumeRecordView from './components/RewardConsumeRecordView.vue'; +import WithdrawalRecordView from './components/WithdrawalRecordView.vue'; defineOptions({ name: 'EnterpriseInfoDetail', diff --git a/src/views/EnterpriseInfo/components/WithdrawalRecordView.vue b/src/views/EnterpriseInfo/components/WithdrawalRecordView.vue new file mode 100644 index 0000000..0be78b4 --- /dev/null +++ b/src/views/EnterpriseInfo/components/WithdrawalRecordView.vue @@ -0,0 +1,118 @@ +<template> + <LoadingLayout :loading="state.loading"> + <AppContainer> + <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> + <template #operationBtn-checkBtn="{ data, row }"> + <PreviewBtnV2 + class="pro-table-operation-btn" + :url="convertApi2FormUrlBySeparator(row.checkFileUrl ?? '')" + preview-btn-text="鏌ョ湅鍑瘉" + /> + </template> + </ProTableV2> + </AppContainer> + </LoadingLayout> +</template> + +<script setup lang="ts"> +import { + AppContainer, + useTable, + ProTableV2, + defineOperationBtns, + PreviewBtnV2, +} from '@bole-core/components'; +import { convertApi2FormUrlBySeparator } from '@/utils'; +import { OrderInputType } from '@bole-core/core'; +import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; +import { EnterpriseRechargeStatusEnum } from '@/constants'; + +defineOptions({ + name: 'WithdrawalRecordView', +}); + +const column: API.CustomModuleColumnDto[] = [ + { + id: '1', + enCode: 'creationTime', + name: '鐢宠鎻愮幇鏃ユ湡', + }, + { + id: '2', + enCode: 'checkTime', + name: '瀹℃牳閫氳繃鏃ユ湡', + }, + { + id: '3', + enCode: 'amount', + name: '鎻愮幇閲戦', + }, + { + id: '4', + enCode: 'remainAmount', + name: '璧勯噾浣欓', + }, +]; + +const operationBtns = defineOperationBtns([ + { + data: { + enCode: 'checkBtn', + name: '鏌ョ湅鍑瘉', + }, + }, +]); + +const route = useRoute(); +const router = useRouter(); +const id = route.params.id as string; +const BaseState = { + loading: true, +}; + +const state = reactive({ ...BaseState }); + +const { + getDataSource: getList, + proTableProps, + paginationState, + extraParamState, +} = useTable( + async ({ pageIndex, pageSize }, extraParamState) => { + try { + let params: API.GetEnterpriseDrawWithListInput = { + pageModel: { + rows: pageSize, + page: pageIndex, + orderInput: extraParamState.orderInput, + }, + checkStatus: EnterpriseRechargeStatusEnum.CheckPassed, + }; + let res = await parkBountyApplyServices.getEnterpriseDrawWithList(params, { + showLoading: !state.loading, + }); + return res; + } catch (error) {} + }, + { + defaultExtraParams: { + orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], + }, + columnsRenderProps: { + creationTime: { type: 'date', format: 'YYYY-MM-DD' }, + checkTime: { type: 'date', format: 'YYYY-MM-DD' }, + amount: { type: 'money' }, + remainAmount: { type: 'money' }, + }, + } +); + +onMounted(async () => { + await getList(); + state.loading = false; +}); +</script> + +<style lang="scss" scoped> +@use '@/style/common.scss' as *; +</style> diff --git a/src/views/MaterialReview/MaterialReviewAudit.vue b/src/views/MaterialReview/MaterialReviewAudit.vue index e5b1d4b..d7986e5 100644 --- a/src/views/MaterialReview/MaterialReviewAudit.vue +++ b/src/views/MaterialReview/MaterialReviewAudit.vue @@ -116,12 +116,13 @@ parkTypeName: '', applyMonth: '', applySumAmount: 0, - enterpriseTaxSubFileUrl: [] as UploadUserFile[], - enterpriseOperateFileUrl: [] as UploadUserFile[], - enterpriseRelateFileUrl: [] as UploadUserFile[], + // enterpriseTaxSubFileUrl: [] as UploadUserFile[], + // enterpriseOperateFileUrl: [] as UploadUserFile[], + // enterpriseRelateFileUrl: [] as UploadUserFile[], + // bountyAssignFileUlr: [] as UploadUserFile[], + // bountyCollectFileUrl: [] as UploadUserFile[], parkCollectFileList: [] as CustomerApplyFileTypeListItem[], - bountyAssignFileUlr: [] as UploadUserFile[], - bountyCollectFileUrl: [] as UploadUserFile[], + calculationFileList: [] as CustomerApplyFileTypeListItem[], status: '' as any as BountyCheckStatusEnum, remark: '', @@ -144,20 +145,23 @@ form.parkTypeName = data.parkTypeName; form.applyMonth = data.applyMonth; form.applySumAmount = data.applySumAmount; - form.enterpriseTaxSubFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseTaxSubFileUrl - ); - form.enterpriseOperateFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseOperateFileUrl - ); - form.bountyAssignFileUlr = convertApi2FormUrlObjectBySeparator(data?.bountyAssignFileUlr); - form.bountyCollectFileUrl = convertApi2FormUrlObjectBySeparator(data?.bountyCollectFileUrl); - form.enterpriseRelateFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseRelateFileUrl - ); + // form.enterpriseTaxSubFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseTaxSubFileUrl + // ); + // form.enterpriseOperateFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseOperateFileUrl + // ); + // form.bountyAssignFileUlr = convertApi2FormUrlObjectBySeparator(data?.bountyAssignFileUlr); + // form.bountyCollectFileUrl = convertApi2FormUrlObjectBySeparator(data?.bountyCollectFileUrl); + // form.enterpriseRelateFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseRelateFileUrl + // ); form.parkCollectFileList = EnterpriseApplyFileUtils.convertApiFileToParkCollectFileList( data.listFiles ); + form.calculationFileList = EnterpriseApplyFileUtils.convertApiFileToParkCollectFileList( + data.collectCountListFiles + ); getList(); }, diff --git a/src/views/MaterialReview/MaterialReviewDetail.vue b/src/views/MaterialReview/MaterialReviewDetail.vue index b6d0263..78258d5 100644 --- a/src/views/MaterialReview/MaterialReviewDetail.vue +++ b/src/views/MaterialReview/MaterialReviewDetail.vue @@ -89,12 +89,13 @@ parkTypeName: '', applyMonth: '', applySumAmount: 0, - enterpriseTaxSubFileUrl: [] as UploadUserFile[], - enterpriseOperateFileUrl: [] as UploadUserFile[], - enterpriseRelateFileUrl: [] as UploadUserFile[], + // enterpriseTaxSubFileUrl: [] as UploadUserFile[], + // enterpriseOperateFileUrl: [] as UploadUserFile[], + // enterpriseRelateFileUrl: [] as UploadUserFile[], + // bountyAssignFileUlr: [] as UploadUserFile[], + // bountyCollectFileUrl: [] as UploadUserFile[], parkCollectFileList: [] as CustomerApplyFileTypeListItem[], - bountyAssignFileUlr: [] as UploadUserFile[], - bountyCollectFileUrl: [] as UploadUserFile[], + calculationFileList: [] as CustomerApplyFileTypeListItem[], outCheckStatus: '' as any as BountyCheckStatusEnum, outCheckRemark: '', @@ -121,20 +122,23 @@ form.applySumAmount = data.applySumAmount; form.outCheckStatus = data.outCheckStatus; form.outCheckRemark = data.outCheckRemark; - form.enterpriseTaxSubFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseTaxSubFileUrl - ); - form.enterpriseOperateFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseOperateFileUrl - ); - form.bountyAssignFileUlr = convertApi2FormUrlObjectBySeparator(data?.bountyAssignFileUlr); - form.bountyCollectFileUrl = convertApi2FormUrlObjectBySeparator(data?.bountyCollectFileUrl); - form.enterpriseRelateFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseRelateFileUrl - ); + // form.enterpriseTaxSubFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseTaxSubFileUrl + // ); + // form.enterpriseOperateFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseOperateFileUrl + // ); + // form.bountyAssignFileUlr = convertApi2FormUrlObjectBySeparator(data?.bountyAssignFileUlr); + // form.bountyCollectFileUrl = convertApi2FormUrlObjectBySeparator(data?.bountyCollectFileUrl); + // form.enterpriseRelateFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseRelateFileUrl + // ); form.parkCollectFileList = EnterpriseApplyFileUtils.convertApiFileToParkCollectFileList( data.listFiles ); + form.calculationFileList = EnterpriseApplyFileUtils.convertApiFileToParkCollectFileList( + data.collectCountListFiles + ); getList(); }, diff --git a/src/views/Reward/RewardDeclareDetail.vue b/src/views/Reward/RewardDeclareDetail.vue index 17df84a..f975347 100644 --- a/src/views/Reward/RewardDeclareDetail.vue +++ b/src/views/Reward/RewardDeclareDetail.vue @@ -68,12 +68,13 @@ parkTypeName: '', applyMonth: '', applySumAmount: 0, - enterpriseTaxSubFileUrl: [] as UploadUserFile[], - enterpriseOperateFileUrl: [] as UploadUserFile[], - enterpriseRelateFileUrl: [] as UploadUserFile[], + // enterpriseTaxSubFileUrl: [] as UploadUserFile[], + // enterpriseOperateFileUrl: [] as UploadUserFile[], + // enterpriseRelateFileUrl: [] as UploadUserFile[], parkCollectFileList: [] as CustomerApplyFileTypeListItem[], - bountyAssignFileUlr: [] as UploadUserFile[], - bountyCollectFileUrl: [] as UploadUserFile[], + calculationFileList: [] as CustomerApplyFileTypeListItem[], + // bountyAssignFileUlr: [] as UploadUserFile[], + // bountyCollectFileUrl: [] as UploadUserFile[], }); const { data: detail, isLoading } = useQuery({ @@ -93,20 +94,23 @@ form.parkTypeName = data.parkTypeName; form.applyMonth = data.applyMonth; form.applySumAmount = data.applySumAmount; - form.enterpriseTaxSubFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseTaxSubFileUrl - ); - form.enterpriseOperateFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseOperateFileUrl - ); + // form.enterpriseTaxSubFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseTaxSubFileUrl + // ); + // form.enterpriseOperateFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseOperateFileUrl + // ); form.parkCollectFileList = EnterpriseApplyFileUtils.convertApiFileToParkCollectFileList( data.listFiles ); - form.bountyAssignFileUlr = convertApi2FormUrlObjectBySeparator(data?.bountyAssignFileUlr); - form.bountyCollectFileUrl = convertApi2FormUrlObjectBySeparator(data?.bountyCollectFileUrl); - form.enterpriseRelateFileUrl = convertApi2FormUrlObjectBySeparator( - data?.enterpriseRelateFileUrl + form.calculationFileList = EnterpriseApplyFileUtils.convertApiFileToParkCollectFileList( + data.collectCountListFiles ); + // form.bountyAssignFileUlr = convertApi2FormUrlObjectBySeparator(data?.bountyAssignFileUlr); + // form.bountyCollectFileUrl = convertApi2FormUrlObjectBySeparator(data?.bountyCollectFileUrl); + // form.enterpriseRelateFileUrl = convertApi2FormUrlObjectBySeparator( + // data?.enterpriseRelateFileUrl + // ); getList(); }, diff --git a/src/views/Reward/RewardGrant.vue b/src/views/Reward/RewardGrant.vue index 7c468ee..ab8d42f 100644 --- a/src/views/Reward/RewardGrant.vue +++ b/src/views/Reward/RewardGrant.vue @@ -39,7 +39,7 @@ <QueryFilterItem tip-content="璐㈡斂鎷ㄤ粯鐘舵��"> <FieldRadio v-model="extraParamState.financeStatus" - :value-enum="FinanceStatusEnumText" + :value-enum="FinanceStatusEnumTextV2" buttonStyle showAllBtn @change="getList()" @@ -48,7 +48,7 @@ <QueryFilterItem tip-content="骞冲彴鍏呭�肩姸鎬�"> <FieldRadio v-model="extraParamState.settleStatus" - :value-enum="SettleStatusEnumText" + :value-enum="SettleStatusEnumTextV2" buttonStyle showAllBtn @change="getList()" @@ -77,8 +77,10 @@ title="鏌ョ湅鍑瘉" :BusinessTypeEnumText="TransferFileEnumInRewardGrandText" /> - <FinancialDialog v-bind="dialogFinancialProps"></FinancialDialog> - <PlateformDialog v-bind="dialogPlateformProps"></PlateformDialog> + <RegisterDialog v-bind="dialogRegisterProps"></RegisterDialog> + <UploadCertRewardDialog v-bind="dialogCertRewardProps"></UploadCertRewardDialog> + <!-- <FinancialDialog v-bind="dialogFinancialProps"></FinancialDialog> + <PlateformDialog v-bind="dialogPlateformProps"></PlateformDialog> --> </AppContainer> </LoadingLayout> </template> @@ -102,12 +104,16 @@ import { format } from '@/utils'; import { SettleStatusEnum, - SettleStatusEnumText, FinanceStatusEnum, - FinanceStatusEnumText, TransferFileEnumInRewardGrandText, + FinanceStatusEnumTextV2, + SettleStatusEnumTextV2, + IncomeTypeEnum, + BillStatusEnum, } from '@/constants'; import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; +import RegisterDialog from './components/RegisterDialog.vue'; +import UploadCertRewardDialog from './components/UploadCertRewardDialog.vue'; import FinancialDialog from './components/FinancialDialog.vue'; import PlateformDialog from './components/PlateformDialog.vue'; import _ from 'lodash'; @@ -160,25 +166,25 @@ { id: '7', enCode: 'financeStatus', - name: '璐㈡斂鎷ㄤ粯鐘舵��', + name: '璐㈡斂鎷ㄤ粯鐧昏鐘舵��', width: 160, }, { id: '8', enCode: 'financeTime', - name: '鎷ㄤ粯鏃ユ湡', + name: '鐧昏鎷ㄤ粯鏃ユ湡', width: 180, }, { id: '9', enCode: 'settleStatus', - name: '骞冲彴鍏呭�肩姸鎬�', + name: '骞冲彴鍏呭�肩櫥璁扮姸鎬�', width: 160, }, { id: '10', enCode: 'settleTime', - name: '鍏呭�兼棩鏈�', + name: '鐧昏鍏呭�兼棩鏈�', width: 180, }, ]; @@ -193,30 +199,62 @@ onClick: (role) => goDetail(role), }, }, + // { + // data: { + // enCode: 'financialBtn', + // name: '璐㈡斂鎷ㄤ粯', + // }, + // emits: { + // onClick: (role) => openFinancialDialog(role), + // }, + // extraProps: { + // hide: (row: API.GetParkBountyApplyListOutput) => + // row.financeStatus === FinanceStatusEnum.HasIncome, + // }, + // }, + // { + // data: { + // enCode: 'plateformBtn', + // name: '骞冲彴鍏呭��', + // }, + // emits: { + // onClick: (role) => openPlateformDialog(role), + // }, + // extraProps: { + // hide: (row: API.GetParkBountyApplyListOutput) => + // row.settleStatus !== SettleStatusEnum.WaitForSettle, + // }, + // }, { data: { - enCode: 'financialBtn', - name: '璐㈡斂鎷ㄤ粯', + enCode: 'registerBtn', + name: '鐧昏', }, emits: { - onClick: (role) => openFinancialDialog(role), + onClick: (role) => openRegisterDialog(role), }, extraProps: { hide: (row: API.GetParkBountyApplyListOutput) => - row.financeStatus === FinanceStatusEnum.HasIncome, + !( + row.settleStatus === SettleStatusEnum.WaitForSettle || + row.financeStatus === FinanceStatusEnum.WaitForIncome + ), }, }, { data: { - enCode: 'plateformBtn', - name: '骞冲彴鍏呭��', + enCode: 'uploadCertBtn', + name: '涓婁紶鍑瘉', }, emits: { - onClick: (role) => openPlateformDialog(role), + onClick: (role) => openCertRewardDialog(role), }, extraProps: { hide: (row: API.GetParkBountyApplyListOutput) => - row.settleStatus !== SettleStatusEnum.WaitForSettle, + !( + row.settleStatus === SettleStatusEnum.HasSettle || + row.financeStatus === FinanceStatusEnum.HasIncome + ), }, }, { @@ -228,9 +266,7 @@ onClick: (row) => openMaterialFileDialog(row), }, extraProps: { - hide: (row: API.GetParkBountyApplyListOutput) => - row.settleStatus !== SettleStatusEnum.HasSettle && - row.financeStatus === FinanceStatusEnum.WaitForIncome, + hide: (row: API.GetParkBountyApplyListOutput) => row.billStatus !== BillStatusEnum.HasUpload, }, }, ]); @@ -294,8 +330,8 @@ settleTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, financeTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, applySumAmount: { type: 'money' }, - settleStatus: { type: 'enum', valueEnum: SettleStatusEnumText }, - financeStatus: { type: 'enum', valueEnum: FinanceStatusEnumText }, + settleStatus: { type: 'enum', valueEnum: SettleStatusEnumTextV2 }, + financeStatus: { type: 'enum', valueEnum: FinanceStatusEnumTextV2 }, }, } ); @@ -322,34 +358,81 @@ }); const queryClient = useQueryClient(); + +// const { +// dialogProps: dialogFinancialProps, +// handleEdit: handleFinancialEdit, +// editForm: editFinancialForm, +// } = useFormDialog({ +// onConfirm: handleFinancial, +// defaultFormParams: { +// parkBountyApplyId: '', +// financeSumAmount: 0, +// financeFileUrl: [] as UploadUserFile[], +// }, +// }); + +// function openFinancialDialog(row?: API.GetParkBountyApplyListOutput) { +// handleFinancialEdit({ +// parkBountyApplyId: row.id, +// financeSumAmount: 0, +// financeFileUrl: [] as UploadUserFile[], +// }); +// } +// async function handleFinancial() { +// try { +// let params: API.ParkBountyApplyFinanceFileInput = { +// parkBountyApplyId: editFinancialForm.parkBountyApplyId, +// financeSumAmount: editFinancialForm.financeSumAmount, +// financeFileUrl: editFinancialForm.financeFileUrl.map((x) => x.path).join('|'), +// }; +// let res = await parkBountyApplyServices.parkBountyApplyFinanceBill(params); +// if (res) { +// Message.successMessage('鎿嶄綔鎴愬姛'); +// getList(paginationState.pageIndex); +// queryClient.invalidateQueries({ +// queryKey: ['parkBountyApplyServices/getGoverDataBoard'], +// }); +// } +// } catch (error) {} +// } const { - dialogProps: dialogFinancialProps, - handleEdit: handleFinancialEdit, - editForm: editFinancialForm, + dialogProps: dialogRegisterProps, + handleEdit: handleRegisterEdit, + editForm: editRegisterForm, } = useFormDialog({ - onConfirm: handleFinancial, + onConfirm: handleRegister, defaultFormParams: { + incomeType: '' as any as IncomeTypeEnum, parkBountyApplyId: '', financeSumAmount: 0, - financeFileUrl: [] as UploadUserFile[], + showSuportPlatRecharge: false, + showSuportFiscalRecharge: false, }, }); -function openFinancialDialog(row?: API.GetParkBountyApplyListOutput) { - handleFinancialEdit({ +function openRegisterDialog(row?: API.GetParkBountyApplyListOutput) { + handleRegisterEdit({ + incomeType: '' as any as IncomeTypeEnum, + showSuportPlatRecharge: row.settleStatus === SettleStatusEnum.WaitForSettle, + showSuportFiscalRecharge: row.financeStatus === FinanceStatusEnum.WaitForIncome, parkBountyApplyId: row.id, financeSumAmount: 0, - financeFileUrl: [] as UploadUserFile[], }); } -async function handleFinancial() { +async function handleRegister() { try { let params: API.ParkBountyApplyFinanceFileInput = { - parkBountyApplyId: editFinancialForm.parkBountyApplyId, - financeSumAmount: editFinancialForm.financeSumAmount, - financeFileUrl: editFinancialForm.financeFileUrl.map((x) => x.path).join('|'), + parkBountyApplyId: editRegisterForm.parkBountyApplyId, + financeSumAmount: editRegisterForm.financeSumAmount, }; - let res = await parkBountyApplyServices.parkBountyApplyFinanceBill(params); + let res; + if (editRegisterForm.incomeType === IncomeTypeEnum.Fiscal) { + res = await parkBountyApplyServices.parkBountyApplyFinanceBillAmount(params); + } + if (editRegisterForm.incomeType === IncomeTypeEnum.Platform) { + res = await parkBountyApplyServices.parkBountyApplySettleAmount(params); + } if (res) { Message.successMessage('鎿嶄綔鎴愬姛'); getList(paginationState.pageIndex); @@ -360,35 +443,87 @@ } catch (error) {} } +// const { +// dialogProps: dialogPlateformProps, +// handleEdit: handlePlateformEdit, +// editForm: editPlateformForm, +// } = useFormDialog({ +// onConfirm: handlePlateform, +// defaultFormParams: { +// parkBountyApplyId: '', +// settleSumAmount: 0, +// settleFileUrl: [] as UploadUserFile[], +// }, +// }); + +// function openPlateformDialog(row?: API.GetParkBountyApplyListOutput) { +// handlePlateformEdit({ +// parkBountyApplyId: row.id, +// settleSumAmount: 0, +// settleFileUrl: [] as UploadUserFile[], +// }); +// } + +// async function handlePlateform() { +// try { +// let params: API.ParkBountyApplySettleInput = { +// parkBountyApplyId: editPlateformForm.parkBountyApplyId, +// settleSumAmount: editPlateformForm.settleSumAmount, +// settleFileUrl: editPlateformForm.settleFileUrl.map((x) => x.path).join('|'), +// }; +// let res = await parkBountyApplyServices.parkBountyApplySettle(params); +// if (res) { +// Message.successMessage('鎿嶄綔鎴愬姛'); +// getList(paginationState.pageIndex); +// queryClient.invalidateQueries({ +// queryKey: ['parkBountyApplyServices/getGoverDataBoard'], +// }); +// } +// } catch (error) {} +// } + const { - dialogProps: dialogPlateformProps, - handleEdit: handlePlateformEdit, - editForm: editPlateformForm, + dialogProps: dialogCertRewardProps, + handleEdit: handleCertRewardEdit, + editForm: editCertRewardForm, } = useFormDialog({ - onConfirm: handlePlateform, + onConfirm: handleCertReward, defaultFormParams: { + incomeType: '' as any as IncomeTypeEnum, parkBountyApplyId: '', - settleSumAmount: 0, - settleFileUrl: [] as UploadUserFile[], + fileUrl: [] as UploadUserFile[], + showSuportPlatRecharge: false, + showSuportFiscalRecharge: false, }, }); -function openPlateformDialog(row?: API.GetParkBountyApplyListOutput) { - handlePlateformEdit({ +function openCertRewardDialog(row?: API.GetParkBountyApplyListOutput) { + handleCertRewardEdit({ + incomeType: '' as any as IncomeTypeEnum, + showSuportPlatRecharge: row.settleStatus === SettleStatusEnum.HasSettle, + showSuportFiscalRecharge: row.financeStatus === FinanceStatusEnum.HasIncome, parkBountyApplyId: row.id, - settleSumAmount: 0, - settleFileUrl: [] as UploadUserFile[], + fileUrl: [] as UploadUserFile[], }); } - -async function handlePlateform() { +async function handleCertReward() { try { - let params: API.ParkBountyApplySettleInput = { - parkBountyApplyId: editPlateformForm.parkBountyApplyId, - settleSumAmount: editPlateformForm.settleSumAmount, - settleFileUrl: editPlateformForm.settleFileUrl.map((x) => x.path).join('|'), + let params: API.ParkBountyApplyFinanceFileInput = { + parkBountyApplyId: editCertRewardForm.parkBountyApplyId, }; - let res = await parkBountyApplyServices.parkBountyApplySettle(params); + let res; + if (editCertRewardForm.incomeType === IncomeTypeEnum.Fiscal) { + (params as API.ParkBountyApplyFinanceFileInput).financeFileUrl = editCertRewardForm.fileUrl + .map((x) => x.path) + .join('|'); + res = await parkBountyApplyServices.parkBountyApplyFinanceBill(params); + } + if (editCertRewardForm.incomeType === IncomeTypeEnum.Platform) { + (params as API.ParkBountyApplySettleInput).settleFileUrl = editCertRewardForm.fileUrl + .map((x) => x.path) + .join('|'); + res = await parkBountyApplyServices.parkBountyApplySettle(params); + } if (res) { Message.successMessage('鎿嶄綔鎴愬姛'); getList(paginationState.pageIndex); diff --git a/src/views/Reward/WithdrawalApproval.vue b/src/views/Reward/WithdrawalApproval.vue new file mode 100644 index 0000000..a575e10 --- /dev/null +++ b/src/views/Reward/WithdrawalApproval.vue @@ -0,0 +1,240 @@ +<template> + <LoadingLayout :loading="state.loading"> + <AppContainer> + <ProTableQueryFilterBar @on-reset="reset"> + <template #query> + <QueryFilterItem tip-content="鐢宠鏃堕棿"> + <FieldDatePicker + v-model="extraParamState.dateTime" + type="daterange" + range-separator="~" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + clearable + @change="getList()" + ></FieldDatePicker> + </QueryFilterItem> + <QueryFilterItem tip-content="瀹℃牳鐘舵��"> + <FieldRadio + v-model="extraParamState.checkStatus" + :value-enum="EnterpriseRechargeStatusEnumText" + buttonStyle + showAllBtn + @change="getList()" + /> + </QueryFilterItem> + <QueryFilterItem> + <SearchInput + v-model="extraParamState.keyWord" + style="width: 300px" + placeholder="浼佷笟鍚嶇О/鍥尯/淇$敤浠g爜" + @on-click-search="getList" + > + </SearchInput> + </QueryFilterItem> + </template> + </ProTableQueryFilterBar> + + <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> + </ProTableV2> + <WithdrawalApprovalAuditDialog v-bind="dialogProps"></WithdrawalApprovalAuditDialog> + </AppContainer> + </LoadingLayout> +</template> + +<script setup lang="ts"> +import { + LoadingLayout, + AppContainer, + useTable, + ProTableQueryFilterBar, + ProTableV2, + defineOperationBtns, + SearchInput, + FieldRadio, + QueryFilterItem, + FieldDatePicker, + useFormDialog, + UploadUserFile, +} from '@bole-core/components'; +import { Message, OrderInputType } from '@bole-core/core'; +import { format } from '@/utils'; +import { EnterpriseRechargeStatusEnum, EnterpriseRechargeStatusEnumText } from '@/constants'; +import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; +import WithdrawalApprovalAuditDialog from './components/WithdrawalApprovalAuditDialog.vue'; +import _ from 'lodash'; +import { ModelValueType } from 'element-plus'; + +defineOptions({ + name: 'WithdrawalApproval', +}); + +const column: API.CustomModuleColumnDto[] = [ + { + id: '1', + enCode: 'enterpriseName', + name: '浼佷笟鍚嶇О', + }, + { + id: '2', + enCode: 'societyCreditCode', + name: '缁熶竴绀句細淇$敤浠g爜', + }, + { + id: '3', + enCode: 'enterpriseType', + name: '浼佷笟绫诲瀷', + }, + { + id: '4', + enCode: 'parkName', + name: '鎵�灞炲洯鍖�', + }, + { + id: '5', + enCode: 'parkType', + name: '鍥尯绫诲瀷', + }, + { + id: '6', + enCode: 'creationTime', + name: '鐢宠鏃堕棿', + }, + { + id: '7', + enCode: 'amount', + name: '鐢宠鎻愮幇閲戦锛堝厓锛�', + }, + { + id: '8', + enCode: 'checkStatus', + name: '瀹℃牳鐘舵��', + }, + { + id: '9', + enCode: 'checkTime', + name: '瀹℃牳鏃堕棿', + }, +]; + +const operationBtns = defineOperationBtns([ + { + data: { + enCode: 'detailBtn', + name: '璇︽儏', + }, + emits: { + onClick: (role) => openDialog(role, true), + }, + extraProps: { + hide: (row: API.GetEnterpriseDrawWithListOutput) => + row.checkStatus === EnterpriseRechargeStatusEnum.WaitCheck, + }, + }, + { + data: { + enCode: 'auditBtn', + name: '瀹℃牳', + }, + emits: { + onClick: (role) => openDialog(role), + }, + extraProps: { + hide: (row: API.GetEnterpriseDrawWithListOutput) => + row.checkStatus !== EnterpriseRechargeStatusEnum.WaitCheck, + }, + }, +]); + +const router = useRouter(); +const BaseState = { + loading: true, +}; + +const state = reactive({ ...BaseState }); + +onMounted(async () => { + await getList(); + state.loading = false; +}); + +const { + getDataSource: getList, + proTableProps, + paginationState, + extraParamState, + reset, +} = useTable( + async ({ pageIndex, pageSize }, extraParamState) => { + try { + let params: API.GetEnterpriseDrawWithListInput = { + pageModel: { + rows: pageSize, + page: pageIndex, + orderInput: extraParamState.orderInput, + }, + keyWord: extraParamState.keyWord, + checkStatus: extraParamState.checkStatus, + beginDateTime: format(extraParamState.dateTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), + endDateTime: format(extraParamState.dateTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), + }; + let res = await parkBountyApplyServices.getEnterpriseDrawWithList(params, { + showLoading: !state.loading, + }); + return res; + } catch (error) {} + }, + { + defaultExtraParams: { + keyWord: '', + checkStatus: '' as any as EnterpriseRechargeStatusEnum, + dateTime: [] as unknown as ModelValueType, + orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], + }, + columnsRenderProps: { + creationTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, + checkTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, + amount: { type: 'money' }, + checkStatus: { type: 'enum', valueEnum: EnterpriseRechargeStatusEnumText }, + }, + } +); + +function openDialog(row: API.GetEnterpriseDrawWithListOutput, isCheck = false) { + handleAdd({ + drawWithId: row.drawWithId, + isCheck, + }); +} + +const { dialogProps, handleAdd, handleEdit, editForm } = useFormDialog({ + onConfirm: handleAddOrEdit, + defaultFormParams: { + drawWithId: '', + checkStatus: '' as any as EnterpriseRechargeStatusEnum, + checkRemark: '', + isCheck: false, + checkFileUrl: [] as UploadUserFile[], + }, +}); + +async function handleAddOrEdit() { + try { + let params: API.CheckEnterpriseApplyDrawWithInput = { + applyDrawWithId: editForm.drawWithId, + checkStatus: editForm.checkStatus, + checkFileUrl: editForm.checkFileUrl?.length > 0 ? editForm.checkFileUrl[0].path : '', + checkRemark: editForm.checkRemark, + }; + let res = await parkBountyApplyServices.checkEnterpriseApplyDrawWith(params); + if (res) { + Message.successMessage('鎿嶄綔鎴愬姛'); + getList(paginationState.pageIndex); + } + } catch (error) {} +} +</script> + +<style lang="scss" scoped> +@use '@/style/common.scss' as *; +</style> diff --git a/src/views/Reward/components/RegisterDialog.vue b/src/views/Reward/components/RegisterDialog.vue new file mode 100644 index 0000000..902453b --- /dev/null +++ b/src/views/Reward/components/RegisterDialog.vue @@ -0,0 +1,116 @@ +<template> + <ProDialog + title="鐧昏" + v-model="visible" + @close="onDialogClose" + destroy-on-close + draggable + width="700px" + > + <ProForm :model="form" ref="dialogForm" label-width="120px"> + <ProFormItemV2 + label="鐧昏绫诲瀷:" + prop="incomeType" + :check-rules="[{ message: '璇烽�夋嫨鐧昏绫诲瀷' }]" + > + <ProFormRadio + v-model="form.incomeType" + :value-enum="incomeTypeEnum" + :button-style="false" + /> + </ProFormItemV2> + <ProFormItemV2 + label="杈撳叆閲戦:" + prop="financeSumAmount" + :check-rules="[{ message: '璇疯緭鍏ラ噾棰�', type: 'number' }]" + > + <ProFormInputNumber + v-model="form.financeSumAmount" + :controls="false" + :min="0" + unit="鍏�" + :precision="2" + ></ProFormInputNumber> + </ProFormItemV2> + </ProForm> + <template #footer> + <span class="dialog-footer"> + <el-button @click="emit('onCancel')">鍙� 娑�</el-button> + <el-button type="primary" @click="handleConfirm">纭� 瀹�</el-button> + </span> + </template> + </ProDialog> +</template> + +<script setup lang="ts"> +import { FormInstance } from 'element-plus'; +import { + ProDialog, + ProForm, + ProFormItemV2, + ProFormInputNumber, + ProFormRadio, +} from '@bole-core/components'; +import { IncomeTypeEnumText, IncomeTypeEnum, FinanceStatusEnum } from '@/constants'; + +defineOptions({ + name: 'RegisterDialog', +}); + +type Props = { + /** + * @deprecated + */ + financeSumAmount?: number; +}; + +const props = withDefaults(defineProps<Props>(), {}); + +const visible = defineModel({ type: Boolean }); + +type Form = { + title?: string; + financeSumAmount: number; + incomeType: IncomeTypeEnum; + showSuportPlatRecharge: boolean; + showSuportFiscalRecharge: boolean; +}; + +const form = defineModel<Form>('form'); + +const emit = defineEmits<{ + (e: 'onConfirm'): void; + (e: 'onCancel'): void; +}>(); + +const incomeTypeEnum = computed(() => { + return [ + form.value.showSuportFiscalRecharge && { + label: IncomeTypeEnumText[IncomeTypeEnum.Fiscal], + value: IncomeTypeEnum.Fiscal, + }, + form.value.showSuportPlatRecharge && { + label: IncomeTypeEnumText[IncomeTypeEnum.Platform], + value: IncomeTypeEnum.Platform, + }, + ].filter(Boolean); +}); + +const dialogForm = ref<FormInstance>(); + +function onDialogClose() { + if (!dialogForm.value) return; + dialogForm.value.resetFields(); +} + +function handleConfirm() { + if (!dialogForm.value) return; + dialogForm.value.validate((valid) => { + if (valid) { + emit('onConfirm'); + } else { + return; + } + }); +} +</script> diff --git a/src/views/Reward/components/UploadCertRewardDialog.vue b/src/views/Reward/components/UploadCertRewardDialog.vue new file mode 100644 index 0000000..3829d81 --- /dev/null +++ b/src/views/Reward/components/UploadCertRewardDialog.vue @@ -0,0 +1,107 @@ +<template> + <ProDialog + title="涓婁紶鍑瘉" + v-model="visible" + @close="onDialogClose" + destroy-on-close + draggable + width="700px" + > + <ProForm :model="form" ref="dialogForm" label-width="120px"> + <ProFormItemV2 + label="鍏ヨ处绫诲瀷:" + prop="incomeType" + :check-rules="[{ message: '璇烽�夋嫨鍏ヨ处绫诲瀷' }]" + > + <ProFormRadio + v-model="form.incomeType" + :value-enum="incomeTypeEnum" + :button-style="false" + /> + </ProFormItemV2> + <ProFormItemV2 + label="涓婁紶鍏ヨ处鍑瘉:" + prop="fileUrl" + :check-rules="[{ message: '璇蜂笂浼犲叆璐﹀嚟璇�', type: 'upload' }]" + > + <ProFormUpload + v-model:file-url="form.fileUrl" + :limitFileSize="50" + accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png" + ></ProFormUpload> + </ProFormItemV2> + </ProForm> + <template #footer> + <span class="dialog-footer"> + <el-button @click="emit('onCancel')">鍙� 娑�</el-button> + <el-button type="primary" @click="handleConfirm">纭� 瀹�</el-button> + </span> + </template> + </ProDialog> +</template> + +<script setup lang="ts"> +import { FormInstance } from 'element-plus'; +import { + ProDialog, + ProForm, + ProFormItemV2, + UploadUserFile, + ProFormUpload, + ProFormRadio, +} from '@bole-core/components'; +import { IncomeTypeEnumText, IncomeTypeEnum } from '@/constants'; + +defineOptions({ + name: 'UploadCertRewardDialog', +}); + +const visible = defineModel({ type: Boolean }); + +type Form = { + title?: string; + fileUrl: UploadUserFile[]; + parkBountyApplyId: string; + incomeType: IncomeTypeEnum; + showSuportPlatRecharge: boolean; + showSuportFiscalRecharge: boolean; +}; + +const form = defineModel<Form>('form'); + +const emit = defineEmits<{ + (e: 'onConfirm'): void; + (e: 'onCancel'): void; +}>(); + +const incomeTypeEnum = computed(() => { + return [ + form.value.showSuportFiscalRecharge && { + label: IncomeTypeEnumText[IncomeTypeEnum.Fiscal], + value: IncomeTypeEnum.Fiscal, + }, + form.value.showSuportPlatRecharge && { + label: IncomeTypeEnumText[IncomeTypeEnum.Platform], + value: IncomeTypeEnum.Platform, + }, + ].filter(Boolean); +}); + +const dialogForm = ref<FormInstance>(); + +function onDialogClose() { + if (!dialogForm.value) return; + dialogForm.value.resetFields(); +} + +function handleConfirm() { + if (!dialogForm.value) return; + dialogForm.value.validate((valid) => { + if (valid) { + emit('onConfirm'); + } else { + return; + } + }); +} +</script> diff --git a/src/views/Reward/components/WithdrawalApprovalAuditDialog.vue b/src/views/Reward/components/WithdrawalApprovalAuditDialog.vue new file mode 100644 index 0000000..bdb9a5a --- /dev/null +++ b/src/views/Reward/components/WithdrawalApprovalAuditDialog.vue @@ -0,0 +1,255 @@ +<template> + <ProDialog :title="title" v-model="visible" @close="onDialogClose" destroy-on-close draggable> + <PortraitTableWithAttachment v-bind="portraitTableWithAttachmentProps" /> + <ProForm + :model="form" + ref="dialogForm" + label-width="90px" + style="margin-top: 20px" + :is-read="form.isCheck" + > + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 + label="瀹℃牳:" + prop="checkStatus" + :check-rules="[{ message: '璇烽�夋嫨瀹℃牳鐘舵��' }]" + > + <ProFormRadio + v-model="form.checkStatus" + :value-enum="EnterpriseRechargeStatusEnumTextForAdudit" + /> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol v-if="form.isCheck"> + <ProFormColItem :span="12"> + <ProFormItemV2 label="瀹℃牳鏃ユ湡:" prop="creationTime"> + <ProFormDatePicker v-model="form.creationTime" type="date" format="YYYY-MM-DD HH:mm" /> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + <ProFormCol> + <ProFormColItem :span="12"> + <ProFormItemV2 + label="涓婁紶鍑瘉:" + prop="checkFileUrl" + :required="form.checkStatus === EnterpriseRechargeStatusEnum.CheckPassed" + :check-rules="[ + { + message: '璇蜂笂浼犲嚟璇�', + validator: (rule, value, callback) => { + if ( + value?.length === 0 && + form.checkStatus === EnterpriseRechargeStatusEnum.CheckPassed + ) { + callback(new Error('璇蜂笂浼犲嚟璇�')); + } + callback(); + }, + }, + ]" + > + <ProFormUpload + v-model:file-url="form.checkFileUrl" + :limit="1" + :showTip="false" + :limitFileSize="50" + ></ProFormUpload> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + + <ProFormCol> + <ProFormColItem> + <ProFormItemV2 + label="瀹℃牳鐞嗙敱:" + prop="checkRemark" + :required="form.checkStatus === EnterpriseRechargeStatusEnum.CheckReject" + :check-rules="[ + { + message: '璇疯緭鍏ュ鏍哥悊鐢�', + validator: (rule, value, callback) => { + if (!value && form.checkStatus === EnterpriseRechargeStatusEnum.CheckReject) { + callback(new Error('璇疯緭鍏ラ┏鍥炵悊鐢�')); + } + callback(); + }, + }, + ]" + > + <ProFormTextArea + v-model="form.checkRemark" + placeholder="璇疯緭鍏�" + show-word-limit + :maxlength="150" + ></ProFormTextArea> + </ProFormItemV2> + </ProFormColItem> + </ProFormCol> + </ProForm> + <template #footer> + <span class="dialog-footer"> + <el-button @click="emit('onCancel')">鍙� 娑�</el-button> + <el-button type="primary" @click="handleConfirm">纭� 瀹�</el-button> + </span> + </template> + </ProDialog> +</template> + +<script setup lang="ts"> +import { FormInstance } from 'element-plus'; +import { + ProDialog, + ProForm, + ProFormItemV2, + ProFormTextArea, + ProFormCol, + ProFormColItem, + ProFormRadio, + ProFormUpload, + ProFormDatePicker, + UploadUserFile, +} from '@bole-core/components'; +import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; +import { usePortraitTableWithAttachment } from '@/hooks'; +import { convertApi2FormUrl, convertApi2FormUrlOnlyOne } from '@/utils'; +import { useQuery } from '@tanstack/vue-query'; +import { + EnterpriseRechargeStatusEnum, + EnterpriseRechargeStatusEnumTextForAdudit, +} from '@/constants'; + +defineOptions({ + name: 'WithdrawalApprovalAuditDialog', +}); + +// type Props = {}; + +// const props = withDefaults(defineProps<Props>(), {}); + +const visible = defineModel({ type: Boolean }); + +type Form = { + title?: string; + drawWithId: string; + checkStatus: EnterpriseRechargeStatusEnum; + checkRemark: string; + creationTime?: string; + isCheck: boolean; + checkFileUrl: UploadUserFile[]; +}; + +const form = defineModel<Form>('form'); + +const title = computed(() => (form.value?.isCheck ? '璇︽儏' : '鎻愮幇瀹℃壒')); + +const emit = defineEmits<{ + (e: 'onConfirm'): void; + (e: 'onCancel'): void; +}>(); + +watch( + () => visible.value, + (val) => { + if (val) { + refetch(); + } + } +); + +const { + data: detail, + refetch, + isLoading, +} = useQuery({ + queryKey: ['parkBountyApplyServices/getEnterpriseDrawWithDetail', form.value?.drawWithId], + queryFn: async () => { + return await parkBountyApplyServices.getEnterpriseDrawWithDetail( + { + drawWithId: form.value?.drawWithId, + }, + { + showLoading: true, + } + ); + }, + placeholderData: () => ({} as API.GetEnterpriseDrawWithDetailOutput), + enabled: !!form.value?.drawWithId, + onSuccess(data) { + form.value.checkRemark = data.checkRemark ?? ''; + form.value.creationTime = data.creationTime ?? ''; + form.value.checkStatus = form.value?.isCheck + ? data.checkStatus + : ('' as any as EnterpriseRechargeStatusEnum); + form.value.checkFileUrl = convertApi2FormUrlOnlyOne(data.checkFileUrl); + }, +}); + +const { portraitTableWithAttachmentProps } = usePortraitTableWithAttachment({ + data: detail, + annexList: computed(() => + detail.value?.invoiceUrl + ? detail.value?.invoiceUrl.split('|').map((item) => convertApi2FormUrl(item)) + : [] + ), + columns: [ + { + label: '浼佷笟鍚嶇О', + key: 'enterpriseName', + }, + { + label: '缁熶竴绀句細淇$敤浠g爜', + key: 'societyCreditCode', + }, + { + label: '璐︽埛鍚嶇О', + key: 'accountName', + }, + { + label: '閾惰甯愬彿', + key: 'bankNumber', + }, + { + label: '寮�鎴烽摱琛�', + key: 'bankName', + }, + { + label: '寮�鎴锋敮琛�', + key: 'bankResumeName', + }, + { + label: '鎻愮幇閲戦', + key: 'amount', + type: 'money', + }, + { + label: '鐢宠鏃ユ湡', + key: 'creationTime', + type: 'date', + }, + ], +}); + +const dialogForm = ref<FormInstance>(); + +function onDialogClose() { + if (!dialogForm.value) return; + dialogForm.value.resetFields(); +} + +function handleConfirm() { + if (!dialogForm.value) return; + if (form.value?.isCheck) { + emit('onCancel'); + return; + } + dialogForm.value.validate((valid) => { + if (valid) { + emit('onConfirm'); + } else { + return; + } + }); +} +</script> -- Gitblit v1.9.1