|  |  |  | 
|---|
|  |  |  | @change="getList()" | 
|---|
|  |  |  | ></FieldDatePicker> | 
|---|
|  |  |  | </QueryFilterItem> | 
|---|
|  |  |  | <QueryFilterItem tip-content="发放日期"> | 
|---|
|  |  |  | <QueryFilterItem tip-content="财政拨付登记日期"> | 
|---|
|  |  |  | <FieldDatePicker | 
|---|
|  |  |  | v-model="extraParamState.financeTime" | 
|---|
|  |  |  | type="daterange" | 
|---|
|  |  |  | range-separator="~" | 
|---|
|  |  |  | start-placeholder="开始日期" | 
|---|
|  |  |  | end-placeholder="结束日期" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | @change="getList()" | 
|---|
|  |  |  | ></FieldDatePicker> | 
|---|
|  |  |  | </QueryFilterItem> | 
|---|
|  |  |  | <QueryFilterItem tip-content="平台拨付登记日期"> | 
|---|
|  |  |  | <FieldDatePicker | 
|---|
|  |  |  | v-model="extraParamState.settleTime" | 
|---|
|  |  |  | type="daterange" | 
|---|
|  |  |  | 
|---|
|  |  |  | @change="getList()" | 
|---|
|  |  |  | ></FieldDatePicker> | 
|---|
|  |  |  | </QueryFilterItem> | 
|---|
|  |  |  | <QueryFilterItem tip-content="财政拨付状态"> | 
|---|
|  |  |  | <QueryFilterItem tip-content="财政拨付登记状态"> | 
|---|
|  |  |  | <FieldRadio | 
|---|
|  |  |  | v-model="extraParamState.financeStatus" | 
|---|
|  |  |  | :value-enum="FinanceStatusEnumText" | 
|---|
|  |  |  | :value-enum="FinanceStatusEnumTextV2Query" | 
|---|
|  |  |  | buttonStyle | 
|---|
|  |  |  | showAllBtn | 
|---|
|  |  |  | @change="getList()" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </QueryFilterItem> | 
|---|
|  |  |  | <QueryFilterItem tip-content="平台充值状态"> | 
|---|
|  |  |  | <QueryFilterItem tip-content="平台拨付登记状态"> | 
|---|
|  |  |  | <FieldRadio | 
|---|
|  |  |  | v-model="extraParamState.settleStatus" | 
|---|
|  |  |  | :value-enum="SettleStatusEnumText" | 
|---|
|  |  |  | :value-enum="SettleStatusEnumTextV2Query" | 
|---|
|  |  |  | buttonStyle | 
|---|
|  |  |  | showAllBtn | 
|---|
|  |  |  | @change="getList()" | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> | 
|---|
|  |  |  | </ProTableV2> | 
|---|
|  |  |  | <FourStreamsMaterialFileDialog | 
|---|
|  |  |  | <FourStreamsMaterialFileDialogV2 | 
|---|
|  |  |  | v-bind="dialogMaterialFileProps" | 
|---|
|  |  |  | :show-upload-btn="false" | 
|---|
|  |  |  | :show-delete-btn="false" | 
|---|
|  |  |  | :show-check-btn="false" | 
|---|
|  |  |  | downloadBtnText="查看" | 
|---|
|  |  |  | 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> | 
|---|
|  |  |  | 
|---|
|  |  |  | import { format } from '@/utils'; | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | SettleStatusEnum, | 
|---|
|  |  |  | SettleStatusEnumText, | 
|---|
|  |  |  | FinanceStatusEnum, | 
|---|
|  |  |  | FinanceStatusEnumText, | 
|---|
|  |  |  | TransferFileEnumInRewardGrandText, | 
|---|
|  |  |  | FinanceStatusEnumTextV2, | 
|---|
|  |  |  | FinanceStatusEnumTextV2Query, | 
|---|
|  |  |  | SettleStatusEnumTextV2, | 
|---|
|  |  |  | SettleStatusEnumTextV2Query, | 
|---|
|  |  |  | 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'; | 
|---|
|  |  |  | import { ModelValueType } from 'element-plus'; | 
|---|
|  |  |  | import { useQueryClient } from '@tanstack/vue-query'; | 
|---|
|  |  |  | import { TransferFileEnumInRewardGrandTableItem } from '@/components/commonView/types'; | 
|---|
|  |  |  | import { FourStreamsMaterialUtils } from '@/components/commonView/utils'; | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | TransferFileEnumInRewardGrandText, | 
|---|
|  |  |  | TransferFileEnumInRewardGrandTableItem, | 
|---|
|  |  |  | } from '@/components/commonView/types'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineOptions({ | 
|---|
|  |  |  | name: 'RewardGrant', | 
|---|
|  |  |  | 
|---|
|  |  |  | id: '1', | 
|---|
|  |  |  | enCode: 'batchNo', | 
|---|
|  |  |  | name: '申请批次号', | 
|---|
|  |  |  | width: 160, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '2', | 
|---|
|  |  |  | enCode: 'parkName', | 
|---|
|  |  |  | name: '申请园区', | 
|---|
|  |  |  | width: 250, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '3', | 
|---|
|  |  |  | enCode: 'parkTypeName', | 
|---|
|  |  |  | name: '园区类型', | 
|---|
|  |  |  | width: 160, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '4', | 
|---|
|  |  |  | enCode: 'applyMonth', | 
|---|
|  |  |  | name: '申请平台奖励月份', | 
|---|
|  |  |  | width: 160, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '5', | 
|---|
|  |  |  | enCode: 'applySumAmount', | 
|---|
|  |  |  | name: '平台奖励汇总金额(元)', | 
|---|
|  |  |  | width: 180, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '6', | 
|---|
|  |  |  | enCode: 'creationTime', | 
|---|
|  |  |  | name: '申报日期', | 
|---|
|  |  |  | width: 180, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 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, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | id: '11', | 
|---|
|  |  |  | enCode: 'a', | 
|---|
|  |  |  | name: '登记人', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ]; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) => goRewardGrantRegister(role), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | extraProps: { | 
|---|
|  |  |  | hide: (row: API.GetParkBountyApplyListOutput) => | 
|---|
|  |  |  | row.financeStatus === FinanceStatusEnum.HasIncome, | 
|---|
|  |  |  | !( | 
|---|
|  |  |  | row.settleStatus === SettleStatusEnum.WaitForSettle || | 
|---|
|  |  |  | row.financeStatus === FinanceStatusEnum.WaitForIncome | 
|---|
|  |  |  | ), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | enCode: 'plateformBtn', | 
|---|
|  |  |  | name: '平台充值', | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | emits: { | 
|---|
|  |  |  | onClick: (role) => openPlateformDialog(role), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | extraProps: { | 
|---|
|  |  |  | hide: (row: API.GetParkBountyApplyListOutput) => | 
|---|
|  |  |  | row.settleStatus === SettleStatusEnum.HasSettle, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // { | 
|---|
|  |  |  | //   data: { | 
|---|
|  |  |  | //     enCode: 'uploadCertBtn', | 
|---|
|  |  |  | //     name: '上传凭证', | 
|---|
|  |  |  | //   }, | 
|---|
|  |  |  | //   emits: { | 
|---|
|  |  |  | //     onClick: (role) => openCertRewardDialog(role), | 
|---|
|  |  |  | //   }, | 
|---|
|  |  |  | //   extraProps: { | 
|---|
|  |  |  | //     hide: (row: API.GetParkBountyApplyListOutput) => | 
|---|
|  |  |  | //       !( | 
|---|
|  |  |  | //         row.settleStatus === SettleStatusEnum.HasSettle || | 
|---|
|  |  |  | //         row.financeStatus === FinanceStatusEnum.HasIncome | 
|---|
|  |  |  | //       ), | 
|---|
|  |  |  | //   }, | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | data: { | 
|---|
|  |  |  | enCode: 'checkBtn', | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | extraProps: { | 
|---|
|  |  |  | hide: (row: API.GetParkBountyApplyListOutput) => | 
|---|
|  |  |  | row.settleStatus === SettleStatusEnum.WaitForSettle && | 
|---|
|  |  |  | row.financeStatus === FinanceStatusEnum.WaitForIncome, | 
|---|
|  |  |  | !( | 
|---|
|  |  |  | row.settleStatus === SettleStatusEnum.HasBill || | 
|---|
|  |  |  | row.financeStatus === FinanceStatusEnum.HasBill | 
|---|
|  |  |  | ), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ]); | 
|---|
|  |  |  | 
|---|
|  |  |  | creationTimeEnd: format(extraParamState.creationTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), | 
|---|
|  |  |  | settleTimeBegin: format(extraParamState.settleTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), | 
|---|
|  |  |  | settleTimeEnd: format(extraParamState.settleTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), | 
|---|
|  |  |  | financeTimeBegin: format(extraParamState.financeTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), | 
|---|
|  |  |  | financeTimeEnd: format(extraParamState.financeTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | let res = await parkBountyApplyServices.getParkBountyApplyList(params, { | 
|---|
|  |  |  | showLoading: !state.loading, | 
|---|
|  |  |  | 
|---|
|  |  |  | financeStatus: '' as any as FinanceStatusEnum, | 
|---|
|  |  |  | creationTime: [] as unknown as ModelValueType, | 
|---|
|  |  |  | settleTime: [] as unknown as ModelValueType, | 
|---|
|  |  |  | financeTime: [] as unknown as ModelValueType, | 
|---|
|  |  |  | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | columnsRenderProps: { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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: '', | 
|---|
|  |  |  | fileUrl: [] as UploadUserFile[], | 
|---|
|  |  |  | 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, | 
|---|
|  |  |  | fileUrl: [] as UploadUserFile[], | 
|---|
|  |  |  | 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 = { | 
|---|
|  |  |  | parkBountyApplyId: editRegisterForm.parkBountyApplyId, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | let res; | 
|---|
|  |  |  | if (editRegisterForm.incomeType === IncomeTypeEnum.Fiscal) { | 
|---|
|  |  |  | (params as API.ParkBountyApplyFinanceFileInput).financeSumAmount = | 
|---|
|  |  |  | editRegisterForm.financeSumAmount; | 
|---|
|  |  |  | res = await parkBountyApplyServices.parkBountyApplyFinanceBillAmount(params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (editRegisterForm.incomeType === IncomeTypeEnum.Platform) { | 
|---|
|  |  |  | (params as API.ParkBountyApplySettleInput).settleSumAmount = | 
|---|
|  |  |  | editRegisterForm.financeSumAmount; | 
|---|
|  |  |  | res = await parkBountyApplyServices.parkBountyApplySettleAmount(params); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (res) { | 
|---|
|  |  |  | Message.successMessage('操作成功'); | 
|---|
|  |  |  | getList(paginationState.pageIndex); | 
|---|
|  |  |  | queryClient.invalidateQueries({ | 
|---|
|  |  |  | queryKey: ['parkBountyApplyServices/getGoverDataBoard'], | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } 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: dialogCertRewardProps, | 
|---|
|  |  |  | handleEdit: handleCertRewardEdit, | 
|---|
|  |  |  | editForm: editCertRewardForm, | 
|---|
|  |  |  | } = useFormDialog({ | 
|---|
|  |  |  | onConfirm: handleCertReward, | 
|---|
|  |  |  | defaultFormParams: { | 
|---|
|  |  |  | incomeType: '' as any as IncomeTypeEnum, | 
|---|
|  |  |  | parkBountyApplyId: '', | 
|---|
|  |  |  | fileUrl: [] as UploadUserFile[], | 
|---|
|  |  |  | showSuportPlatRecharge: false, | 
|---|
|  |  |  | showSuportFiscalRecharge: false, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function openCertRewardDialog(row?: API.GetParkBountyApplyListOutput) { | 
|---|
|  |  |  | handleCertRewardEdit({ | 
|---|
|  |  |  | incomeType: '' as any as IncomeTypeEnum, | 
|---|
|  |  |  | showSuportPlatRecharge: row.settleStatus === SettleStatusEnum.HasSettle, | 
|---|
|  |  |  | showSuportFiscalRecharge: row.financeStatus === FinanceStatusEnum.HasIncome, | 
|---|
|  |  |  | parkBountyApplyId: row.id, | 
|---|
|  |  |  | fileUrl: [] as UploadUserFile[], | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | async function handleCertReward() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | let params: API.ParkBountyApplyFinanceFileInput = { | 
|---|
|  |  |  | parkBountyApplyId: editFinancialForm.parkBountyApplyId, | 
|---|
|  |  |  | financeSumAmount: editFinancialForm.financeSumAmount, | 
|---|
|  |  |  | financeFileUrl: editFinancialForm.financeFileUrl.map((x) => x.path).join('|'), | 
|---|
|  |  |  | parkBountyApplyId: editCertRewardForm.parkBountyApplyId, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | let res = await parkBountyApplyServices.parkBountyApplyFinanceBill(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); | 
|---|
|  |  |  | 
|---|
|  |  |  | } 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[], | 
|---|
|  |  |  | function goRewardGrantRegister(row: API.GetParkBountyApplyListOutput) { | 
|---|
|  |  |  | router.push({ | 
|---|
|  |  |  | name: 'RewardGrantRegister', | 
|---|
|  |  |  | params: { | 
|---|
|  |  |  | id: row.id, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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) {} | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|