From 524b1febe13e9305e9a27c870e09819e0e363bbd Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期一, 21 四月 2025 17:28:48 +0800 Subject: [PATCH] feat: 接口 --- src/components/commonView/FourStreamsMaterialFileDialog.vue | 49 ++++++ src/views/EnterpriseInfo/components/RewardGrantRecordView.vue | 37 +++- src/components/commonView/FourStreamsBatchMaterialFileDialog.vue | 169 +++++++++++++++++++++ src/services/api/typings.d.ts | 35 ++++ src/views/MaterialReview/MaterialReviewAudit.vue | 2 src/components/commonView/MaterialInfoView.vue | 5 src/components/commonView/DetailView.vue | 1 src/views/Reward/RewardGrant.vue | 39 +++- src/components/commonView/types.ts | 43 ++++ src/components/commonView/utils/index.ts | 25 +++ src/components/commonView/FourStreamsMaterialFileTable.vue | 24 ++ src/views/Reward/RewardDeclareDetail.vue | 4 src/services/api/ParkBountyApply.ts | 33 ++++ src/views/MaterialReview/MaterialReviewDetail.vue | 2 14 files changed, 435 insertions(+), 33 deletions(-) diff --git a/src/components/commonView/DetailView.vue b/src/components/commonView/DetailView.vue index af0b043..e0a4643 100644 --- a/src/components/commonView/DetailView.vue +++ b/src/components/commonView/DetailView.vue @@ -36,6 +36,7 @@ enterpriseOperateFileUrl: UploadUserFile[]; bountyAssignFileUlr: UploadUserFile[]; bountyCollectFileUrl: UploadUserFile[]; + enterpriseRelateFileUrl: UploadUserFile[]; }; }; diff --git a/src/components/commonView/FourStreamsBatchMaterialFileDialog.vue b/src/components/commonView/FourStreamsBatchMaterialFileDialog.vue new file mode 100644 index 0000000..972bc35 --- /dev/null +++ b/src/components/commonView/FourStreamsBatchMaterialFileDialog.vue @@ -0,0 +1,169 @@ +<template> + <ProDialog + title="鏂囦欢鍒楄〃" + v-model="visible" + destroy-on-close + draggable + width="35%" + :close-on-click-modal="false" + :close-on-press-escape="false" + :top="'22vh'" + > + <ProDialogTableWrapper :height="400"> + <ProTableQueryFilterBar :show-reset-btn="false"> + <template #query> + <QueryFilterItem> + <span class="query-label">{{ name }}</span> + </QueryFilterItem> + </template> + <template #btn> + <el-button type="primary" @click="handleBatchDownload">鎵归噺涓嬭浇</el-button> + </template> + </ProTableQueryFilterBar> + <ProTableV2 + :tableData="fileList" + :columns="columns" + :operationBtns="operationBtns" + show-column-check + ref="proTable" + > + <template #extension="{ row }"> + <img :src="getExtensionIconByUrl(row.url)" alt="" style="margin: 0 auto" /> + </template> + <template #size="{ row }"> + {{ formatFileSize(row.size) }} + </template> + </ProTableV2> + </ProDialogTableWrapper> + </ProDialog> +</template> + +<script setup lang="ts"> +import { + ProDialog, + ProTableQueryFilterBar, + QueryFilterItem, + UploadUserFile, + ProDialogTableWrapper, + ProTableV2, + defineColumns, + defineOperationBtns, + bolePreview, + getExtensionIconByUrl, +} from '@bole-core/components'; +import { format, downloadFileByUrl, formatFileSize } from '@/utils'; +import { downloadWithZip, Message, isFileCanPreview } from '@bole-core/core'; + +defineOptions({ + name: 'FourStreamsBatchMaterialFileDialog', +}); + +type Props = { + name?: string; + zipName?: string; + showDeleteBtn?: boolean; +}; + +const props = withDefaults(defineProps<Props>(), { + showDeleteBtn: true, +}); + +const visible = defineModel<boolean>('visible'); +const fileList = defineModel<UploadUserFile[]>('fileList'); + +const proTable = ref<InstanceType<typeof ProTableV2>>(); + +const columns = defineColumns([ + { + id: '1', + enCode: 'extension', + name: '鏂囦欢绫诲瀷', + }, + { + id: '2', + enCode: 'name', + name: '鏂囦欢鍚嶇О', + }, +]); + +const operationBtns = defineOperationBtns([ + // { + // data: { + // enCode: 'detailBtn', + // name: '鏌ョ湅', + // }, + // emits: { + // onClick: (row) => handlePreview(row), + // }, + // extraProps: { + // hide: (row: UploadUserFile) => !isFileCanPreview(row.path), + // }, + // }, + { + data: { + enCode: 'downloadBtn', + name: '鏌ョ湅', + }, + emits: { + onClick: (row) => handleDownload(row), + }, + }, + { + data: { + enCode: 'delBtn', + name: '鍒犻櫎', + }, + props: { + type: 'danger', + }, + emits: { + onClick: (row) => handleDelete(row), + }, + extraProps: { + hide: (row) => !props.showDeleteBtn, + }, + }, +]); + +async function handleDelete(row: UploadUserFile) { + try { + await Message.deleteMessage(); + fileList.value = fileList.value.filter((item) => item.uid !== row.uid); + } catch (error) {} +} + +function handleDownload(row: UploadUserFile) { + downloadFileByUrl(row.url); +} + +function handlePreview(row: UploadUserFile) { + bolePreview({ + fileUrl: row.url, + }); +} + +function handleBatchDownload() { + if (fileList.value.length) { + const res: UploadUserFile[] = proTable.value.innerTableRef.getSelectionRows(); + if (res.length > 0) { + downloadWithZip( + res.map((item) => ({ data: item.url })), + props.zipName + ); + } else { + Message.errorMessage('鏈�夋嫨鏁版嵁'); + } + } else { + Message.errorMessage('鏆傛棤鏁版嵁'); + } +} +</script> + +<style lang="scss" scoped> +@use '@/style/common.scss' as *; + +.query-label { + font-size: 16px; + line-height: 40px; +} +</style> diff --git a/src/components/commonView/FourStreamsMaterialFileDialog.vue b/src/components/commonView/FourStreamsMaterialFileDialog.vue new file mode 100644 index 0000000..b1b07b2 --- /dev/null +++ b/src/components/commonView/FourStreamsMaterialFileDialog.vue @@ -0,0 +1,49 @@ +<template> + <ProDialog :title="title" v-model="visible" destroy-on-close draggable width="800px"> + <FourStreamsMaterialFileTable v-model:list="form.list" v-bind="props" /> + <template #footer> + <span class="dialog-footer"> + <el-button type="primary" @click="handleConfirm">纭� 瀹�</el-button> + </span> + </template> + </ProDialog> +</template> + +<script setup lang="ts" generic="T"> +import { ProDialog } from '@bole-core/components'; +import FourStreamsMaterialFileTable from './FourStreamsMaterialFileTable.vue'; +import { FourStreamsMaterialFileTableProps, BaseMaterialFileTableItem } from './types'; + +defineOptions({ + name: 'FourStreamsMaterialFileDialog', +}); + +type Props = FourStreamsMaterialFileTableProps & { + title?: string; +}; + +const props = withDefaults(defineProps<Props>(), { + showUploadBtn: true, + showCheckBtn: true, + showDownloadBtn: true, + showDeleteBtn: true, + title: '鏉愭枡璇︽儏', +}); + +const visible = defineModel({ type: Boolean }); + +type Form = { + list: BaseMaterialFileTableItem<T>[]; +}; + +const form = defineModel<Form>('form'); + +const emit = defineEmits<{ + (e: 'onConfirm'): void; + (e: 'onCancel'): void; +}>(); + +function handleConfirm() { + emit('onConfirm'); +} +</script> diff --git a/src/components/commonView/FourStreamsMaterialFileTable.vue b/src/components/commonView/FourStreamsMaterialFileTable.vue index e51d00d..4fb8aaf 100644 --- a/src/components/commonView/FourStreamsMaterialFileTable.vue +++ b/src/components/commonView/FourStreamsMaterialFileTable.vue @@ -9,7 +9,7 @@ :showTableColumnSetting="false" > <template #fileBusinessType="{ row }"> - {{ FourStreamsMaterialFileBusinessTypeEnumText[row.fileBusinessType] }} + {{ BusinessTypeEnumText[row.fileBusinessType] }} </template> <template #operationBtn-uploadBtn="{ data, row }"> <BlFileUpload @@ -25,22 +25,31 @@ </BlFileUpload> </template> </ProTableV2> + <FourStreamsBatchMaterialFileDialog + v-bind="dialogProps" + :name="''" + :zipName="`${BusinessTypeEnumText[currentFourStreamsMaterialFileTableItem.fileBusinessType as any]}`" + v-model:fileList="currentFourStreamsMaterialFileTableItem.fileList" + :showDeleteBtn="showDeleteBtn" + /> </div> </template> -<script setup lang="ts"> +<script setup lang="ts" generic="T"> import { FourStreamsMaterialFileTableProps, FourStreamsMaterialFileTableItem, FourStreamsMaterialFileBusinessTypeEnumText, + BaseMaterialFileTableItem, } from './types'; import { ProTableV2, defineColumns, - defineOperationBtns, BlFileUpload, bolePreview, + useDialog, } from '@bole-core/components'; +import FourStreamsBatchMaterialFileDialog from './FourStreamsBatchMaterialFileDialog.vue'; import { downloadFileByUrl } from '@/utils'; import { Message, isFileCanPreview } from '@bole-core/core'; import { useDefineColumns } from '@/hooks'; @@ -55,9 +64,10 @@ showDownloadBtn: true, showDeleteBtn: true, downloadBtnText: '涓嬭浇', + BusinessTypeEnumText: () => FourStreamsMaterialFileBusinessTypeEnumText, }); -const list = defineModel<FourStreamsMaterialFileTableItem[]>('list'); +const list = defineModel<BaseMaterialFileTableItem<T>[]>('list'); const columns = defineColumns([ { @@ -152,6 +162,12 @@ } catch (error) {} } +const currentFourStreamsMaterialFileTableItem = ref<BaseMaterialFileTableItem<T>>({ + fileBusinessType: 0 as any, + fileList: [], +}); +const { dialogProps, dialogState } = useDialog(); + async function handlePreview(row: FourStreamsMaterialFileTableItem) { if (row.fileList.length > 1) { // currentEnterpriseMaterialFileTableItem.value = row; diff --git a/src/components/commonView/MaterialInfoView.vue b/src/components/commonView/MaterialInfoView.vue index 1f3c877..4561e41 100644 --- a/src/components/commonView/MaterialInfoView.vue +++ b/src/components/commonView/MaterialInfoView.vue @@ -23,8 +23,8 @@ </ProFormCol> <ProFormCol> <ProFormColItem :span="12"> - <ProFormItemV2 label="鍏ラ┗鎯呭喌鍏宠仈璇存槑:" prop="enterpriseOperateFileUrl"> - <ProFormUpload v-model:file-url="form.enterpriseOperateFileUrl"></ProFormUpload> + <ProFormItemV2 label="鍏ラ┗鎯呭喌鍏宠仈璇存槑:" prop="enterpriseRelateFileUrl"> + <ProFormUpload v-model:file-url="form.enterpriseRelateFileUrl"></ProFormUpload> </ProFormItemV2> </ProFormColItem> </ProFormCol> @@ -47,6 +47,7 @@ form: { enterpriseTaxSubFileUrl: UploadUserFile[]; enterpriseOperateFileUrl: UploadUserFile[]; + enterpriseRelateFileUrl: UploadUserFile[]; }; }; diff --git a/src/components/commonView/types.ts b/src/components/commonView/types.ts index dee3565..997e2ba 100644 --- a/src/components/commonView/types.ts +++ b/src/components/commonView/types.ts @@ -1,4 +1,3 @@ -import { EnterpriseMaterialFileBusinessTypeEnum } from '@/constants'; import { UploadUserFile } from '@bole-core/components'; export type FourStreamsMaterialFileTableProps = { @@ -7,12 +6,19 @@ showDownloadBtn?: boolean; showDeleteBtn?: boolean; downloadBtnText?: string; + BusinessTypeEnumText?: { [key: number]: string }; }; -export type FourStreamsMaterialFileTableItem = { - fileBusinessType: FourStreamsMaterialFileBusinessTypeEnum; +export type BaseMaterialFileTableItem<T> = { + fileBusinessType: T; fileList: UploadUserFile[]; }; + +export type FourStreamsMaterialFileTableItem = + BaseMaterialFileTableItem<FourStreamsMaterialFileBusinessTypeEnum>; + +export type ApplyTransferMaterialFileTableItem = + BaseMaterialFileTableItem<ApplyTransferFileBusinessTypeEnum>; export enum EnterpriseTypeEnum { /** @@ -49,18 +55,25 @@ TaxSubFileUrl = 30, /** 浼佷笟钀ユ敹鍒╂鼎琛� */ OperateProfitesUrl = 40, - /** 鍏ラ┗鍏宠仈璇存槑 */ + /** + * 鍏ラ┗鍏宠仈璇存槑 + * @deprecated 宸茬粡涓嶇敤浜� + */ EnterRelateUrl = 50, - /** C绔釜绋庡畬绋庢儏鍐佃鏄� */ + /** C绔釜绋庡畬绋庤鏄� */ PersonTaxRatePayUrl = 60, + /** C绔釜绋庡畬绋庤鏄� */ + PersonTaxInstructUrl = 70, } + export const FourStreamsMaterialFileBusinessTypeEnumText = { [FourStreamsMaterialFileBusinessTypeEnum.ParkEnterPactUrl]: '鍥尯鍏ラ┗鍗忚', [FourStreamsMaterialFileBusinessTypeEnum.RatePaymentFileUrl]: '浼佷笟瀹岀◣璇佹槑(鐩栫珷)', [FourStreamsMaterialFileBusinessTypeEnum.TaxSubFileUrl]: '浼佷笟缂寸◣鏄庣粏姹囨�昏〃(鐩栫珷)', [FourStreamsMaterialFileBusinessTypeEnum.OperateProfitesUrl]: '浼佷笟钀ユ敹鍒╂鼎琛�', [FourStreamsMaterialFileBusinessTypeEnum.EnterRelateUrl]: '鍏ラ┗鍏宠仈璇存槑', - [FourStreamsMaterialFileBusinessTypeEnum.PersonTaxRatePayUrl]: 'C绔釜绋庡畬绋庢儏鍐佃鏄�', + [FourStreamsMaterialFileBusinessTypeEnum.PersonTaxRatePayUrl]: 'C绔釜绋庡畬绋庤鏄�', + [FourStreamsMaterialFileBusinessTypeEnum.PersonTaxInstructUrl]: 'C绔畬绋庢儏鍐佃鏄�', }; export const FourStreamsMaterialFileBusinessTypeEnumKey = { @@ -70,4 +83,22 @@ [FourStreamsMaterialFileBusinessTypeEnum.OperateProfitesUrl]: 'operateProfitesUrl', [FourStreamsMaterialFileBusinessTypeEnum.EnterRelateUrl]: 'enterRelateUrl', [FourStreamsMaterialFileBusinessTypeEnum.PersonTaxRatePayUrl]: 'personTaxRatePayUrl', + [FourStreamsMaterialFileBusinessTypeEnum.PersonTaxInstructUrl]: 'personTaxInstructUrl', +} as const; + +export enum ApplyTransferFileBusinessTypeEnum { + /** 鎷ㄤ粯鍑瘉*/ + FinanceToFileUrl = 100, + /** 鍏呭�煎嚟璇�*/ + TransferToFileUrl = 110, +} + +export const ApplyTransferFileBusinessTypeEnumText = { + [ApplyTransferFileBusinessTypeEnum.FinanceToFileUrl]: '鎷ㄤ粯鍑瘉', + [ApplyTransferFileBusinessTypeEnum.TransferToFileUrl]: '鍏呭�煎嚟璇�', +}; + +export const ApplyTransferFileBusinessTypeEnumKey = { + [ApplyTransferFileBusinessTypeEnum.FinanceToFileUrl]: 'financeToFileUrl', + [ApplyTransferFileBusinessTypeEnum.TransferToFileUrl]: 'transferToFileUrl', } as const; diff --git a/src/components/commonView/utils/index.ts b/src/components/commonView/utils/index.ts index b18bb98..0122f02 100644 --- a/src/components/commonView/utils/index.ts +++ b/src/components/commonView/utils/index.ts @@ -1,5 +1,8 @@ -import { convertApi2FormUrlOnlyOne } from '@/utils'; +import { convertApi2FormUrl, convertApi2FormUrlOnlyOne } from '@/utils'; import { + ApplyTransferFileBusinessTypeEnum, + ApplyTransferFileBusinessTypeEnumKey, + ApplyTransferMaterialFileTableItem, FourStreamsMaterialFileBusinessTypeEnum, FourStreamsMaterialFileBusinessTypeEnumKey, FourStreamsMaterialFileTableItem, @@ -22,6 +25,12 @@ FourStreamsMaterialFileBusinessTypeEnum.TaxSubFileUrl, FourStreamsMaterialFileBusinessTypeEnum.OperateProfitesUrl, FourStreamsMaterialFileBusinessTypeEnum.PersonTaxRatePayUrl, + ]; + + /**璐㈡斂鎷ㄤ粯鍜屽钩鍙板厖鍊煎嚟璇� */ + static ApplyTransferMaterialFile = [ + ApplyTransferFileBusinessTypeEnum.FinanceToFileUrl, + ApplyTransferFileBusinessTypeEnum.TransferToFileUrl, ]; static isFourStreamsParkType(parkTypeName) { @@ -55,6 +64,20 @@ ]) ); } + + static initApplyTransferMaterialFileList< + T extends { financeToFileUrl?: string; transferToFileUrl?: string } + >(data: T) { + return this.ApplyTransferMaterialFile.map((item) => { + const filePathList = data[ApplyTransferFileBusinessTypeEnumKey[item]] + ? data[ApplyTransferFileBusinessTypeEnumKey[item]].split('|') + : []; + return { + fileBusinessType: item, + fileList: filePathList.map(convertApi2FormUrl), + } as ApplyTransferMaterialFileTableItem; + }); + } } export class ParkTypeUtils { diff --git a/src/services/api/ParkBountyApply.ts b/src/services/api/ParkBountyApply.ts index c52ac11..908a4cd 100644 --- a/src/services/api/ParkBountyApply.ts +++ b/src/services/api/ParkBountyApply.ts @@ -95,6 +95,21 @@ ); } +/** 鑾峰彇浼佷笟鏈�鍚庝竴娆′笂浼犵殑鍥尯鍏ラ┗鍗忚鏂囦欢 GET /api/ParkBountyApply/GetEnterpriseLastUploadEnterPactFile */ +export async function getEnterpriseLastUploadEnterPactFile( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIgetEnterpriseLastUploadEnterPactFileParams, + options?: API.RequestConfig +) { + return request<string>('/api/ParkBountyApply/GetEnterpriseLastUploadEnterPactFile', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} + /** 鑾峰彇浼佷笟鍏呭�煎鏍稿垪琛� POST /api/ParkBountyApply/GetEnterprisePreChargeCheckList */ export async function getEnterprisePreChargeCheckList( body: API.GetEnterprisePreChargeCheckListInput, @@ -247,6 +262,24 @@ ); } +/** 鑾峰彇鎵归噺鍏ヨ处涓湭璐㈡斂鎷ㄤ粯鐨勪紒涓� GET /api/ParkBountyApply/GetParkBountyApplyBatchFinanceEnterprise */ +export async function getParkBountyApplyBatchFinanceEnterprise( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIgetParkBountyApplyBatchFinanceEnterpriseParams, + options?: API.RequestConfig +) { + return request<API.GetNotTransferCompanyNameListOutput[]>( + '/api/ParkBountyApply/GetParkBountyApplyBatchFinanceEnterprise', + { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + /** 杩愯惀绔�-濂栧姳閲戝彂鏀�-鍏ヨ处-鑾峰彇鎵归噺鍏ヨ处涓湭鍏ヨ处鐨勪紒涓� GET /api/ParkBountyApply/GetParkBountyApplyBatchTransferEnterprise */ export async function getParkBountyApplyBatchTransferEnterprise( // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) diff --git a/src/services/api/typings.d.ts b/src/services/api/typings.d.ts index eaee1d5..0bd9a1c 100644 --- a/src/services/api/typings.d.ts +++ b/src/services/api/typings.d.ts @@ -1326,6 +1326,10 @@ transactionDetailId?: string; } + interface APIgetEnterpriseLastUploadEnterPactFileParams { + companyId?: string; + } + interface APIgetEnterpriseMaterialIdByUserIdParams { userId?: string; materialType?: EnterpriseMaterialTypeEnum; @@ -1558,6 +1562,10 @@ interface APIgetParams { id?: string; + } + + interface APIgetParkBountyApplyBatchFinanceEnterpriseParams { + parkBountyApplyId?: string; } interface APIgetParkBountyApplyBatchTransferEnterpriseParams { @@ -6693,6 +6701,8 @@ userName?: string; /** 閾惰璐︽埛 */ outBankNum?: string; + /** 浼佷笟鍚嶇О */ + enterpriseName?: string; /** 鍑烘浼佷笟璐︽埛鍚嶇О */ outEnterpriseName?: string; /** 鍏呭�奸噾棰� */ @@ -6730,7 +6740,11 @@ outBankResumeName?: string; /** 鍑鸿处鍥炲崟 */ outReceiptFileUrl?: string; + /** 瀹℃牳澶囨敞 */ + checkRemark?: string; checkStatus?: EnterpriseRechargeStatusEnum; + /** 鎻愪氦鏃ユ湡 */ + creationTime?: string; } interface GetFeatureListResultDto { @@ -14314,6 +14328,10 @@ /** 鍐呴儴瀹℃牳鍘熷洜 */ inCheckRemark?: string; inCheckStatus?: BountyCheckStatusEnum; + /** 璐㈡斂鎷ㄤ粯鎬婚 */ + financeSumAmount?: number; + /** 骞冲彴鍏呭�兼�婚 */ + settleSumAmount?: number; } interface OutcheckParkBountyApplyInput { @@ -14377,6 +14395,14 @@ bountyCollectFileUrl?: string; /** 鍏ラ┗鍏宠仈璇存槑 */ enterpriseRelateFileUrl?: string; + /** 鍙戞斁鍑瘉 */ + settleFileUrl?: string; + /** 璐㈡斂鍙戞斁鍑瘉 */ + financeFileUrl?: string; + /** 鍏呭�奸噾棰� */ + settleSumAmount?: number; + /** 璐㈡斂鍙戞斁閲戦 */ + financeSumAmount?: number; } interface ParkBountyApplyBatchFinanceInput { @@ -14498,6 +14524,15 @@ parkBountyApplyDetailId?: string; /** 鍏ヨ处鍑瘉 */ transferToFileUrl?: string; + financeToStatus?: FinanceStatusEnum; + /** 璐㈡斂鍏ヨ处閲戦 */ + financeToAmount?: number; + /** 璐㈡斂鍏ヨ处鏃堕棿 */ + financeToTime?: string; + /** 璐㈡斂鍏ヨ处鍑瘉 */ + financeToFileUrl?: string; + /** 璐㈡斂鍏ヨ处鎿嶄綔鐢ㄦ埛 */ + financeToUserId?: string; } interface ParkBountyApplyTransferDetailInfoPageOutput { diff --git a/src/views/EnterpriseInfo/components/RewardGrantRecordView.vue b/src/views/EnterpriseInfo/components/RewardGrantRecordView.vue index 35a804c..435b915 100644 --- a/src/views/EnterpriseInfo/components/RewardGrantRecordView.vue +++ b/src/views/EnterpriseInfo/components/RewardGrantRecordView.vue @@ -2,14 +2,16 @@ <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.transferToFileUrl ?? '')" - preview-btn-text="鏌ョ湅鍑瘉" - /> - </template> </ProTableV2> + <FourStreamsMaterialFileDialog + v-bind="dialogMaterialFileProps" + :show-upload-btn="false" + :show-delete-btn="false" + :show-check-btn="false" + downloadBtnText="鏌ョ湅" + title="鏌ョ湅鍑瘉" + :BusinessTypeEnumText="ApplyTransferFileBusinessTypeEnumText" + /> </AppContainer> </LoadingLayout> </template> @@ -20,12 +22,14 @@ useTable, ProTableV2, defineOperationBtns, - PreviewBtnV2, + useFormDialog, } from '@bole-core/components'; -import { convertApi2FormUrlBySeparator } from '@/utils'; import { OrderInputType } from '@bole-core/core'; import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; import { IncomeStatusEnumText } from '@/constants'; +import { ApplyTransferFileBusinessTypeEnumText } from '@/components/commonView/types'; +import { FourStreamsMaterialUtils } from '@/components/commonView/utils'; +import { ApplyTransferMaterialFileTableItem } from '@/components/commonView/types'; defineOptions({ name: 'RewardGrantRecordView', @@ -69,6 +73,9 @@ data: { enCode: 'checkBtn', name: '鏌ョ湅鍑瘉', + }, + emits: { + onClick: (row) => openMaterialFileDialog(row), }, }, ]); @@ -118,7 +125,17 @@ } ); -function handlePreview(row: API.InsureBatchBillDto) {} +function openMaterialFileDialog(row: API.ParkBountyApplyTransferDetailInfo) { + handleMaterialFileAdd({ + list: FourStreamsMaterialUtils.initApplyTransferMaterialFileList(row), + }); +} + +const { dialogProps: dialogMaterialFileProps, handleAdd: handleMaterialFileAdd } = useFormDialog({ + defaultFormParams: { + list: [] as ApplyTransferMaterialFileTableItem[], + }, +}); onMounted(async () => { await getList(); diff --git a/src/views/MaterialReview/MaterialReviewAudit.vue b/src/views/MaterialReview/MaterialReviewAudit.vue index 6b1ef82..44100ae 100644 --- a/src/views/MaterialReview/MaterialReviewAudit.vue +++ b/src/views/MaterialReview/MaterialReviewAudit.vue @@ -116,6 +116,7 @@ enterpriseOperateFileUrl: [] as UploadUserFile[], bountyAssignFileUlr: [] as UploadUserFile[], bountyCollectFileUrl: [] as UploadUserFile[], + enterpriseRelateFileUrl: [] as UploadUserFile[], status: '' as any as BountyCheckStatusEnum, remark: '', @@ -142,6 +143,7 @@ form.enterpriseOperateFileUrl = convertApi2FormUrlOnlyOne(data?.enterpriseOperateFileUrl); form.bountyAssignFileUlr = convertApi2FormUrlOnlyOne(data?.bountyAssignFileUlr); form.bountyCollectFileUrl = convertApi2FormUrlOnlyOne(data?.bountyCollectFileUrl); + form.enterpriseRelateFileUrl = convertApi2FormUrlOnlyOne(data?.enterpriseRelateFileUrl); getList(); }, diff --git a/src/views/MaterialReview/MaterialReviewDetail.vue b/src/views/MaterialReview/MaterialReviewDetail.vue index 7b27cb6..764a70b 100644 --- a/src/views/MaterialReview/MaterialReviewDetail.vue +++ b/src/views/MaterialReview/MaterialReviewDetail.vue @@ -89,6 +89,7 @@ enterpriseOperateFileUrl: [] as UploadUserFile[], bountyAssignFileUlr: [] as UploadUserFile[], bountyCollectFileUrl: [] as UploadUserFile[], + enterpriseRelateFileUrl: [] as UploadUserFile[], outCheckStatus: '' as any as BountyCheckStatusEnum, outCheckRemark: '', @@ -119,6 +120,7 @@ form.enterpriseOperateFileUrl = convertApi2FormUrlOnlyOne(data?.enterpriseOperateFileUrl); form.bountyAssignFileUlr = convertApi2FormUrlOnlyOne(data?.bountyAssignFileUlr); form.bountyCollectFileUrl = convertApi2FormUrlOnlyOne(data?.bountyCollectFileUrl); + form.enterpriseRelateFileUrl = convertApi2FormUrlOnlyOne(data?.enterpriseRelateFileUrl); getList(); }, diff --git a/src/views/Reward/RewardDeclareDetail.vue b/src/views/Reward/RewardDeclareDetail.vue index 5c3463e..bf7e577 100644 --- a/src/views/Reward/RewardDeclareDetail.vue +++ b/src/views/Reward/RewardDeclareDetail.vue @@ -68,6 +68,7 @@ enterpriseOperateFileUrl: [] as UploadUserFile[], bountyAssignFileUlr: [] as UploadUserFile[], bountyCollectFileUrl: [] as UploadUserFile[], + enterpriseRelateFileUrl: [] as UploadUserFile[], }); const { data: detail, isLoading } = useQuery({ @@ -80,7 +81,7 @@ } ); }, - placeholderData: () => ({} as API.ParkBountyApplyBaseInfo), + placeholderData: () => ({} as API.OutCheckParkBountyApplyBaseInfo), onSuccess(data) { form.batchNo = data.batchNo; form.parkName = data.parkName; @@ -91,6 +92,7 @@ form.enterpriseOperateFileUrl = convertApi2FormUrlOnlyOne(data?.enterpriseOperateFileUrl); form.bountyAssignFileUlr = convertApi2FormUrlOnlyOne(data?.bountyAssignFileUlr); form.bountyCollectFileUrl = convertApi2FormUrlOnlyOne(data?.bountyCollectFileUrl); + form.enterpriseRelateFileUrl = convertApi2FormUrlOnlyOne(data?.enterpriseRelateFileUrl); getList(); }, diff --git a/src/views/Reward/RewardGrant.vue b/src/views/Reward/RewardGrant.vue index f6c1071..5891bf6 100644 --- a/src/views/Reward/RewardGrant.vue +++ b/src/views/Reward/RewardGrant.vue @@ -47,14 +47,16 @@ </ProTableQueryFilterBar> <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns"> - <template #operationBtn-checkBtn="{ data, row }"> - <PreviewBtnV2 - class="pro-table-operation-btn" - :url="convertApi2FormUrlBySeparator(row.settleFileUrl ?? '')" - preview-btn-text="鏌ョ湅鍑瘉" - /> - </template> </ProTableV2> + <FourStreamsMaterialFileDialog + v-bind="dialogMaterialFileProps" + :show-upload-btn="false" + :show-delete-btn="false" + :show-check-btn="false" + downloadBtnText="鏌ョ湅" + title="鏌ョ湅鍑瘉" + :BusinessTypeEnumText="ApplyTransferFileBusinessTypeEnumText" + /> <FinancialDialog v-bind="dialogFinancialProps"></FinancialDialog> <PlateformDialog v-bind="dialogPlateformProps"></PlateformDialog> </AppContainer> @@ -75,10 +77,9 @@ FieldDatePicker, useFormDialog, UploadUserFile, - PreviewBtnV2, } from '@bole-core/components'; import { Message, OrderInputType } from '@bole-core/core'; -import { convertApi2FormUrlBySeparator, format } from '@/utils'; +import { format } from '@/utils'; import { SettleStatusEnum, SettleStatusEnumText } from '@/constants'; import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; import FinancialDialog from './components/FinancialDialog.vue'; @@ -86,6 +87,11 @@ import _ from 'lodash'; import { ModelValueType } from 'element-plus'; import { useQueryClient } from '@tanstack/vue-query'; +import { FourStreamsMaterialUtils } from '@/components/commonView/utils'; +import { + ApplyTransferMaterialFileTableItem, + ApplyTransferFileBusinessTypeEnumText, +} from '@/components/commonView/types'; defineOptions({ name: 'RewardGrant', @@ -185,6 +191,9 @@ enCode: 'checkBtn', name: '鏌ョ湅鍑瘉', }, + emits: { + onClick: (row) => openMaterialFileDialog(row), + }, extraProps: { hide: (row: API.GetParkBountyApplyListOutput) => row.settleStatus === SettleStatusEnum.WaitForSettle, @@ -259,6 +268,18 @@ }); } +function openMaterialFileDialog(row: API.ParkBountyApplyTransferDetailInfo) { + handleMaterialFileAdd({ + list: FourStreamsMaterialUtils.initApplyTransferMaterialFileList(row), + }); +} + +const { dialogProps: dialogMaterialFileProps, handleAdd: handleMaterialFileAdd } = useFormDialog({ + defaultFormParams: { + list: [] as ApplyTransferMaterialFileTableItem[], + }, +}); + const queryClient = useQueryClient(); const { dialogProps: dialogFinancialProps, -- Gitblit v1.9.1