| | |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="申请奖励金月份:" prop="applyMonth"> |
| | | <ProFormDatePicker v-model="form.applyMonth" format="YYYY-MM" type="month" /> |
| | | <ProFormDatePicker v-model="form.applyMonth" format="YYYY年MM月" type="month" /> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | |
| | | }" |
| | | > |
| | | </ProTableV2> |
| | | <MateriaDetailDialog v-bind="dialogProps"></MateriaDetailDialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | QueryFilterItem, |
| | | ProTableV2, |
| | | SearchInput, |
| | | useFormDialog, |
| | | defineOperationBtns, |
| | | defineColumns, |
| | | } from '@bole-core/components'; |
| | | import MateriaDetailDialog from './MateriaDetailDialog.vue'; |
| | | import { FourStreamsMaterialFileTableItem } from './types'; |
| | | |
| | | defineOptions({ |
| | | name: 'DeclareEnterpriseTableView', |
| | |
| | | extraParamState: { |
| | | searchKeyWord: string; |
| | | }; |
| | | openDialog?: (row) => void; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | |
| | | name: '详情', |
| | | }, |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | onClick: (role) => props.openDialog(role), |
| | | }, |
| | | }, |
| | | ]); |
| | | |
| | | const { dialogProps, handleEdit, editForm } = useFormDialog({ |
| | | defaultFormParams: { |
| | | list: [] as FourStreamsMaterialFileTableItem[], |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row?: API.ParkBountyApplyDetailInfo) { |
| | | handleEdit({ |
| | | list: [], |
| | | }); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | :tableData="list" |
| | | :columns="columns" |
| | | :autoHeight="false" |
| | | :operationBtns="operationBtns" |
| | | :operationBtns="columnsProps.operationBtns" |
| | | :operationColumnWidth="240" |
| | | :showTableColumnSetting="false" |
| | | > |
| | | <template #fileBusinessType="{ row }"> |
| | | {{ AllEnterpriseMaterialFileBusinessTypeEnumText[row.fileBusinessType] }} |
| | | {{ FourStreamsMaterialFileBusinessTypeEnumText[row.fileBusinessType] }} |
| | | </template> |
| | | <template #operationBtn-uploadBtn="{ data, row }"> |
| | | <BlFileUpload |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { FourStreamsMaterialFileTableProps, FourStreamsMaterialFileTableItem } from './types'; |
| | | import { |
| | | FourStreamsMaterialFileTableProps, |
| | | FourStreamsMaterialFileTableItem, |
| | | FourStreamsMaterialFileBusinessTypeEnumText, |
| | | } from './types'; |
| | | import { |
| | | ProTableV2, |
| | | defineColumns, |
| | |
| | | BlFileUpload, |
| | | bolePreview, |
| | | } from '@bole-core/components'; |
| | | import { AllEnterpriseMaterialFileBusinessTypeEnumText } from '@/constants'; |
| | | import { downloadFileByUrl } from '@/utils'; |
| | | import { Message, isFileCanPreview } from '@bole-core/core'; |
| | | import { useDefineColumns } from '@/hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'FourStreamsMaterialFileTable', |
| | |
| | | showCheckBtn: true, |
| | | showDownloadBtn: true, |
| | | showDeleteBtn: true, |
| | | downloadBtnText: '下载', |
| | | }); |
| | | |
| | | const list = defineModel<FourStreamsMaterialFileTableItem[]>('list'); |
| | |
| | | }, |
| | | ]); |
| | | |
| | | const operationBtns = defineOperationBtns([ |
| | | { |
| | | data: { |
| | | enCode: 'uploadBtn', |
| | | name: '上传', |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | if (!props.showUploadBtn) return true; |
| | | let fileList = row?.fileList?.filter?.((item) => item.status === 'success'); |
| | | return fileList?.length > 0; |
| | | const columnsProps = useDefineColumns({ |
| | | operationBtns: [ |
| | | { |
| | | data: { |
| | | enCode: 'uploadBtn', |
| | | name: '上传', |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | if (!props.showUploadBtn) return true; |
| | | let fileList = row?.fileList?.filter?.((item) => item.status === 'success'); |
| | | return fileList?.length > 0; |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '查看', |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handlePreview(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | if (!props.showCheckBtn) return true; |
| | | let fileList = row?.fileList?.filter?.((item) => item.status === 'success'); |
| | | if (!fileList?.length) { |
| | | return true; |
| | | } else { |
| | | if (fileList.length > 1) { |
| | | return false; |
| | | { |
| | | data: { |
| | | enCode: 'detailBtn', |
| | | name: '查看', |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handlePreview(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | if (!props.showCheckBtn) return true; |
| | | let fileList = row?.fileList?.filter?.((item) => item.status === 'success'); |
| | | if (!fileList?.length) { |
| | | return true; |
| | | } else { |
| | | return !isFileCanPreview(fileList[0].path); |
| | | if (fileList.length > 1) { |
| | | return false; |
| | | } else { |
| | | return !isFileCanPreview(fileList[0].path); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '下载', |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handleBatchDownload(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | return ( |
| | | !props.showDownloadBtn || |
| | | !row?.fileList?.filter?.((item) => item.status === 'success')?.length |
| | | ); |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: props.downloadBtnText, |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handleBatchDownload(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | return ( |
| | | !props.showDownloadBtn || |
| | | !row?.fileList?.filter?.((item) => item.status === 'success')?.length |
| | | ); |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'delBtn', |
| | | name: '删除', |
| | | }, |
| | | props: { |
| | | type: 'danger', |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handleDelete(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | if (!props.showDeleteBtn) return true; |
| | | let fileList = row?.fileList?.filter?.((item) => item.status === 'success'); |
| | | return !fileList?.length; |
| | | { |
| | | data: { |
| | | enCode: 'delBtn', |
| | | name: '删除', |
| | | }, |
| | | props: { |
| | | type: 'danger', |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handleDelete(row), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: FourStreamsMaterialFileTableItem) => { |
| | | if (!props.showDeleteBtn) return true; |
| | | let fileList = row?.fileList?.filter?.((item) => item.status === 'success'); |
| | | return !fileList?.length; |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | ]); |
| | | ], |
| | | }); |
| | | |
| | | async function handleDelete(row: FourStreamsMaterialFileTableItem) { |
| | | try { |
| | |
| | | showCheckBtn?: boolean; |
| | | showDownloadBtn?: boolean; |
| | | showDeleteBtn?: boolean; |
| | | downloadBtnText?: string; |
| | | }; |
| | | |
| | | export type FourStreamsMaterialFileTableItem = { |
| | | fileBusinessType: EnterpriseMaterialFileBusinessTypeEnum; |
| | | fileList: (API.AddEnterpriseMaterialFileInput & UploadUserFile)[]; |
| | | fileBusinessType: FourStreamsMaterialFileBusinessTypeEnum; |
| | | fileList: UploadUserFile[]; |
| | | }; |
| | | |
| | | export enum EnterpriseTypeEnum { |
| | |
| | | [EnterpriseTypeEnum.IndustryMating]: '行业配套', |
| | | [EnterpriseTypeEnum.IndustryBody]: '行业机构', |
| | | }; |
| | | |
| | | export enum FourStreamsMaterialFileBusinessTypeEnum { |
| | | /** 园区入驻协议 */ |
| | | ParkEnterPactUrl = 10, |
| | | /** 企业完税证明(盖章) */ |
| | | RatePaymentFileUrl = 20, |
| | | /** 企业缴税明细汇总表(盖章) */ |
| | | TaxSubFileUrl = 30, |
| | | /** 企业营收利润表 */ |
| | | OperateProfitesUrl = 40, |
| | | /** 入驻关联说明 */ |
| | | EnterRelateUrl = 50, |
| | | /** C端个税完税情况说明 */ |
| | | PersonTaxRatePayUrl = 60, |
| | | } |
| | | export const FourStreamsMaterialFileBusinessTypeEnumText = { |
| | | [FourStreamsMaterialFileBusinessTypeEnum.ParkEnterPactUrl]: '园区入驻协议', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.RatePaymentFileUrl]: '企业完税证明(盖章)', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.TaxSubFileUrl]: '企业缴税明细汇总表(盖章)', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.OperateProfitesUrl]: '企业营收利润表', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.EnterRelateUrl]: '入驻关联说明', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.PersonTaxRatePayUrl]: 'C端个税完税情况说明', |
| | | }; |
| | | |
| | | export const FourStreamsMaterialFileBusinessTypeEnumKey = { |
| | | [FourStreamsMaterialFileBusinessTypeEnum.ParkEnterPactUrl]: 'parkEnterPactUrl', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.RatePaymentFileUrl]: 'ratePaymentFileUrl', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.TaxSubFileUrl]: 'taxSubFileUrl', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.OperateProfitesUrl]: 'operateProfitesUrl', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.EnterRelateUrl]: 'enterRelateUrl', |
| | | [FourStreamsMaterialFileBusinessTypeEnum.PersonTaxRatePayUrl]: 'personTaxRatePayUrl', |
| | | } as const; |
New file |
| | |
| | | import { convertApi2FormUrlOnlyOne } from '@/utils'; |
| | | import { |
| | | FourStreamsMaterialFileBusinessTypeEnum, |
| | | FourStreamsMaterialFileBusinessTypeEnumKey, |
| | | FourStreamsMaterialFileTableItem, |
| | | } from '../types'; |
| | | |
| | | export class FourStreamsMaterialUtils { |
| | | /**实体产业园材料 */ |
| | | static PhysicalIndustrialParkMaterialFile = [ |
| | | FourStreamsMaterialFileBusinessTypeEnum.ParkEnterPactUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.RatePaymentFileUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.TaxSubFileUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.OperateProfitesUrl, |
| | | ]; |
| | | |
| | | /**数字经济园材料 */ |
| | | static DigitIndustrialParkMaterialFile = [ |
| | | FourStreamsMaterialFileBusinessTypeEnum.ParkEnterPactUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.EnterRelateUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.RatePaymentFileUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.TaxSubFileUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.OperateProfitesUrl, |
| | | FourStreamsMaterialFileBusinessTypeEnum.PersonTaxRatePayUrl, |
| | | ]; |
| | | |
| | | static isFourStreamsParkType(parkTypeName) { |
| | | return ( |
| | | ParkTypeUtils.isPhysicalIndustrialPark(parkTypeName) || |
| | | ParkTypeUtils.isDigitIndustrialPark(parkTypeName) |
| | | ); |
| | | } |
| | | |
| | | static initFourStreamsMaterialFileList( |
| | | data: API.ParkBountyApplyDetailInfo, |
| | | parkTypeName: string |
| | | ) { |
| | | if (!this.isFourStreamsParkType(parkTypeName)) return []; |
| | | const list = ParkTypeUtils.isPhysicalIndustrialPark(parkTypeName) |
| | | ? this.PhysicalIndustrialParkMaterialFile |
| | | : this.DigitIndustrialParkMaterialFile; |
| | | return list.map((item) => { |
| | | return { |
| | | fileBusinessType: item, |
| | | fileList: convertApi2FormUrlOnlyOne(data[FourStreamsMaterialFileBusinessTypeEnumKey[item]]), |
| | | } as FourStreamsMaterialFileTableItem; |
| | | }); |
| | | } |
| | | |
| | | static fourStreamsMaterialFileList2Api(list: FourStreamsMaterialFileTableItem[]) { |
| | | return Object.fromEntries( |
| | | list.map((item) => [ |
| | | FourStreamsMaterialFileBusinessTypeEnumKey[item.fileBusinessType], |
| | | item.fileList[0]?.path ?? '', |
| | | ]) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | export class ParkTypeUtils { |
| | | static isPhysicalIndustrialPark(parkTypeName: string) { |
| | | return parkTypeName === '实体产业园'; |
| | | } |
| | | static isDigitIndustrialPark(parkTypeName: string) { |
| | | return parkTypeName === '数字经济园'; |
| | | } |
| | | } |
| | |
| | | export * from './useUser'; |
| | | export * from './help'; |
| | | export * from './dic'; |
| | | export * from './table'; |
New file |
| | |
| | | import * as industrialParkServices from '@/services/api/IndustrialPark'; |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | |
| | | export function useIndustrialParkDropDownList() { |
| | | const { data: industrialParkList } = useQuery({ |
| | | queryKey: ['industrialParkServices/getIndustrialParkDropDownList'], |
| | | queryFn: async () => { |
| | | return await industrialParkServices.getIndustrialParkDropDownList({ showLoading: false }); |
| | | }, |
| | | placeholderData: () => [] as API.IndustrialParkDropDownOutput[], |
| | | }); |
| | | |
| | | function getIndustrialParkById(industrialParkId: string) { |
| | | const industrialPark = industrialParkList.value.find((item) => item.id === industrialParkId); |
| | | return industrialPark; |
| | | } |
| | | |
| | | function getIndustrialParkTypeNameById(industrialParkId: string) { |
| | | const industrialPark = getIndustrialParkById(industrialParkId); |
| | | return industrialPark?.parkTypeName ?? ''; |
| | | } |
| | | |
| | | function getIndustrialParkNameById(industrialParkId: string) { |
| | | const industrialPark = getIndustrialParkById(industrialParkId); |
| | | return industrialPark?.parkName ?? ''; |
| | | } |
| | | |
| | | return { |
| | | industrialParkList, |
| | | getIndustrialParkNameById, |
| | | getIndustrialParkById, |
| | | getIndustrialParkTypeNameById, |
| | | }; |
| | | } |
New file |
| | |
| | | type DefineColumnsOptions = { |
| | | columns?: API.ModuleColumnDto[]; |
| | | operationBtns?: OperationBtnType[]; |
| | | }; |
| | | |
| | | export function useDefineColumns(options: DefineColumnsOptions = {}) { |
| | | const { columns, operationBtns } = options; |
| | | return computed(() => ({ |
| | | columns, |
| | | operationBtns, |
| | | })); |
| | | } |
| | |
| | | params: API.APIgetParkBountyApplyBatchTransferEnterpriseParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetCompanyNameListOutput[]>( |
| | | return request<API.GetNotTransferCompanyNameListOutput[]>( |
| | | '/api/ParkBountyApply/GetParkBountyApplyBatchTransferEnterprise', |
| | | { |
| | | method: 'GET', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 运营端—入账—上传凭证 POST /api/ParkBountyApply/ParkBountyApplySettle */ |
| | | /** 政务端—奖励金发放—上传凭证 POST /api/ParkBountyApply/ParkBountyApplySettle */ |
| | | export async function parkBountyApplySettle( |
| | | body: API.ParkBountyApplySettleInput, |
| | | options?: API.RequestConfig |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 政务端—奖励金上传凭证 POST /api/ParkBountyApply/ParkBountyApplyTransferFile */ |
| | | /** 运营端—奖励金入账—上传凭证 POST /api/ParkBountyApply/ParkBountyApplyTransferFile */ |
| | | export async function parkBountyApplyTransferFile( |
| | | body: API.ParkBountyApplyTransferFileInput, |
| | | options?: API.RequestConfig |
| | |
| | | endDate?: string; |
| | | } |
| | | |
| | | interface GetNotTransferCompanyNameListOutput { |
| | | companyId?: string; |
| | | name?: string; |
| | | parkBountyApplyDetailId?: string; |
| | | } |
| | | |
| | | interface GetOperateHistoryInput { |
| | | pageModel?: Pagination; |
| | | relationId?: string; |
| | |
| | | outCheckStatus?: BountyCheckStatusEnum; |
| | | /** 外部审核日期 */ |
| | | outCheckTime?: string; |
| | | /** 发放凭证 */ |
| | | settleFileUrl?: string; |
| | | } |
| | | |
| | | interface GetParkBountyApplyListOutputPageOutput { |
| | |
| | | outCheckStatus?: BountyCheckStatusEnum; |
| | | /** 外部审核原因 */ |
| | | outCheckRemark?: string; |
| | | /** 内部审核原因 */ |
| | | inCheckRemark?: string; |
| | | inCheckStatus?: BountyCheckStatusEnum; |
| | | } |
| | | |
| | | interface OutcheckParkBountyApplyInput { |
| | |
| | | import { BoleOss } from '@bole-core/core'; |
| | | import { loadEnv } from '@build/index'; |
| | | import AliOSS from 'ali-oss'; |
| | | import * as userServices from '@/services/api/User'; |
| | | import * as accountServices from '@/services/api/Account'; |
| | | |
| | | export class OssManager { |
| | | private static OssInstance: BoleOss; |
| | | |
| | | private static async getOssSTS() { |
| | | return await userServices.getOssSTS({ |
| | | return await accountServices.getOssSTS({ |
| | | showLoading: false, |
| | | }); |
| | | } |
| | |
| | | ProFormItemV2, |
| | | ProFormText, |
| | | ProFormUpload, |
| | | ProFormRadio, |
| | | } from '@bole-core/components'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as customerServices from '@/services/api/Customer'; |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'id', order: OrderInputType.Desc }], |
| | | }, |
| | | columnsRenderProps: { |
| | | settleTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' }, |
| | |
| | | :extra-param-state="extraParamState" |
| | | :pro-table-props="proTableProps" |
| | | :reset="reset" |
| | | :open-dialog="openDialog" |
| | | ></DeclareEnterpriseTableView> |
| | | <MateriaDetailDialog |
| | | v-bind="dialogProps" |
| | | :show-upload-btn="false" |
| | | :show-delete-btn="false" |
| | | :show-check-btn="false" |
| | | downloadBtnText="查看" |
| | | /> |
| | | </ChunkCellV2> |
| | | </DetailView> |
| | | <template #footer> |
| | | <el-button @click="handleBack">关闭</el-button> |
| | | <el-button @click="handleBack" type="primary">确认</el-button> |
| | | </template> |
| | | </PageFormLayout> |
| | | </AppContainer> |
| | |
| | | UploadUserFile, |
| | | PageFormLayout, |
| | | useTable, |
| | | useFormDialog, |
| | | } from '@bole-core/components'; |
| | | import ChunkCellV2 from '@/components/Layout/ChunkCellV2.vue'; |
| | | import DetailView from '@/components/commonView/DetailView.vue'; |
| | | import MateriaDetailDialog from '@/components/commonView/MateriaDetailDialog.vue'; |
| | | import DeclareEnterpriseTableView from '@/components/commonView/DeclareEnterpriseTableView.vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | |
| | | import { useRouteView } from '@/hooks'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import { AuthTypeText, BountyCheckStatusEnum, BountyCheckStatusEnumText } from '@/constants'; |
| | | import { FourStreamsMaterialFileTableItem } from '@/components/commonView/types'; |
| | | import { FourStreamsMaterialUtils } from '@/components/commonView/utils'; |
| | | import { useIndustrialParkDropDownList } from '@/hooks/industrialPark'; |
| | | |
| | | defineOptions({ |
| | | name: 'MaterialReviewDetail', |
| | |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | orderInput: [{ property: 'enterpriseId', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'parkBountyApplyId', order: OrderInputType.Desc }], |
| | | searchKeyWord: '', |
| | | }, |
| | | columnsRenderProps: { |
| | |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleAdd, editForm } = useFormDialog({ |
| | | defaultFormParams: { |
| | | list: [] as FourStreamsMaterialFileTableItem[], |
| | | companyId: '', |
| | | }, |
| | | }); |
| | | |
| | | const { getIndustrialParkTypeNameById } = useIndustrialParkDropDownList(); |
| | | |
| | | function openDialog(row: API.ParkBountyApplyDetailInfo) { |
| | | handleAdd({ |
| | | list: FourStreamsMaterialUtils.initFourStreamsMaterialFileList( |
| | | row, |
| | | getIndustrialParkTypeNameById(detail.value?.parkId) |
| | | ), |
| | | companyId: row.enterpriseId, |
| | | }); |
| | | } |
| | | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: 'MaterialReviewList', |
| | |
| | | <PageFormLayout title="申报详情"> |
| | | <DetailView :form="form"> |
| | | <ChunkCellV2 title="申报企业名单"> |
| | | <DeclareEnterpriseTableView ref="tableRef"></DeclareEnterpriseTableView> |
| | | <DeclareEnterpriseTableView |
| | | :getList="getList" |
| | | :extra-param-state="extraParamState" |
| | | :pro-table-props="proTableProps" |
| | | :reset="reset" |
| | | :open-dialog="openDialog" |
| | | ></DeclareEnterpriseTableView> |
| | | <MateriaDetailDialog |
| | | v-bind="dialogProps" |
| | | :show-upload-btn="false" |
| | | :show-delete-btn="false" |
| | | :show-check-btn="false" |
| | | downloadBtnText="查看" |
| | | /> |
| | | </ChunkCellV2> |
| | | </DetailView> |
| | | <template #footer> |
| | | <el-button @click="handleBack">关闭</el-button> |
| | | <el-button @click="handleBack" type="primary">确认</el-button> |
| | | </template> |
| | | </PageFormLayout> |
| | | </AppContainer> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { AppContainer, LoadingLayout, UploadUserFile, PageFormLayout } from '@bole-core/components'; |
| | | import { |
| | | AppContainer, |
| | | LoadingLayout, |
| | | UploadUserFile, |
| | | PageFormLayout, |
| | | useTable, |
| | | useFormDialog, |
| | | } from '@bole-core/components'; |
| | | import DetailView from '@/components/commonView/DetailView.vue'; |
| | | import ChunkCellV2 from '@/components/Layout/ChunkCellV2.vue'; |
| | | import MateriaDetailDialog from '@/components/commonView/MateriaDetailDialog.vue'; |
| | | import DeclareEnterpriseTableView from '@/components/commonView/DeclareEnterpriseTableView.vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | | import { convertApi2FormUrlOnlyOne } from '@/utils'; |
| | | import { convertApi2FormUrlOnlyOne, setOSSLink } from '@/utils'; |
| | | import { useRouteView } from '@/hooks'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import { AuthTypeText } from '@/constants'; |
| | | import { FourStreamsMaterialFileTableItem } from '@/components/commonView/types'; |
| | | import { useIndustrialParkDropDownList } from '@/hooks/industrialPark'; |
| | | import { FourStreamsMaterialUtils } from '@/components/commonView/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'RewardDeclareDetail', |
| | |
| | | bountyAssignFileUlr: [] as UploadUserFile[], |
| | | bountyCollectFileUrl: [] as UploadUserFile[], |
| | | }); |
| | | |
| | | const tableRef = ref<InstanceType<typeof DeclareEnterpriseTableView>>(); |
| | | |
| | | const { data: detail, isLoading } = useQuery({ |
| | | queryKey: ['parkBountyApplyServices/getParkBountyApplyDetail', id], |
| | |
| | | form.bountyAssignFileUlr = convertApi2FormUrlOnlyOne(data?.bountyAssignFileUlr); |
| | | form.bountyCollectFileUrl = convertApi2FormUrlOnlyOne(data?.bountyCollectFileUrl); |
| | | |
| | | tableRef.value?.getList(); |
| | | getList(); |
| | | }, |
| | | }); |
| | | |
| | | const { |
| | | getDataSource: getList, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetParkBountyApplyInfoInput = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | searchKeyWord: extraParamState.searchKeyWord, |
| | | parkBountyApplyId: id, |
| | | }; |
| | | let res = await parkBountyApplyServices.getOutCheckParkBountyApplyDetailList(params); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | orderInput: [{ property: 'parkBountyApplyId', order: OrderInputType.Desc }], |
| | | searchKeyWord: '', |
| | | }, |
| | | columnsRenderProps: { |
| | | authType: { type: 'enum', valueEnum: AuthTypeText }, |
| | | licenseUrl: { |
| | | type: 'url', |
| | | formatter: (row: API.UserCertificationAuditListDto) => setOSSLink(row.licenseUrl), |
| | | modal: true, |
| | | showDownloadBtn: false, |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | | |
| | | const { dialogProps, handleEdit, editForm } = useFormDialog({ |
| | | defaultFormParams: { |
| | | list: [] as FourStreamsMaterialFileTableItem[], |
| | | companyId: '', |
| | | }, |
| | | }); |
| | | |
| | | const { getIndustrialParkTypeNameById } = useIndustrialParkDropDownList(); |
| | | |
| | | function openDialog(row: API.ParkBountyApplyDetailInfo) { |
| | | handleEdit({ |
| | | list: FourStreamsMaterialUtils.initFourStreamsMaterialFileList( |
| | | row, |
| | | getIndustrialParkTypeNameById(detail.value?.parkId) |
| | | ), |
| | | companyId: row.enterpriseId, |
| | | }); |
| | | } |
| | | |
| | | function handleBack() { |
| | | closeViewPush(route, { |
| | | name: 'RewardGrant', |
| | |
| | | UploadUserFile, |
| | | bolePreview, |
| | | } from '@bole-core/components'; |
| | | import { OrderInputType } from '@bole-core/core'; |
| | | import { convertApi2FormUrlOnlyOne, format } from '@/utils'; |
| | | import { Message, OrderInputType } from '@bole-core/core'; |
| | | import { convertApi2FormUrl, convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils'; |
| | | import { SettleStatusEnum, SettleStatusEnumText } from '@/constants'; |
| | | import * as parkBountyApplyServices from '@/services/api/ParkBountyApply'; |
| | | import RewardGrantDialog from './components/RewardGrantDialog.vue'; |
| | |
| | | emits: { |
| | | onClick: (role) => openDialog(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetParkBountyApplyListOutput) => |
| | | row.settleStatus === SettleStatusEnum.HasSettle, |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | |
| | | }, |
| | | emits: { |
| | | onClick: (role) => handlePreview(role), |
| | | }, |
| | | extraProps: { |
| | | hide: (row: API.GetParkBountyApplyListOutput) => |
| | | row.settleStatus === SettleStatusEnum.WaitForSettle, |
| | | }, |
| | | }, |
| | | ]); |
| | |
| | | try { |
| | | let params: API.ParkBountyApplySettleInput = { |
| | | parkBountyApplyId: editForm.parkBountyApplyId, |
| | | settleFileUrl: editForm.settleFileUrl[0].path, |
| | | settleFileUrl: editForm.settleFileUrl.map((x) => x.path).join('|'), |
| | | }; |
| | | let res = await parkBountyApplyServices.parkBountyApplySettle(params); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handlePreview(row?: API.GetParkBountyApplyListOutput) { |
| | | bolePreview({ |
| | | fileUrl: row.parkName, |
| | | }); |
| | | const fileList = row.settleFileUrl?.split('|').map((x) => convertApi2FormUrl(x)) ?? []; |
| | | if (fileList.length > 1) { |
| | | console.log('fileList: ', fileList); |
| | | } else { |
| | | downloadFileByUrl(fileList[0]); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | > |
| | | <ProFormUpload |
| | | v-model:file-url="innerForm.settleFileUrl" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="doc,docx,pdf" |
| | | :limitFileSize="50" |
| | | accept="doc,docx,pdf,xls,xlsx,jpg/jpeg,png" |
| | | > |
| | | </ProFormUpload> |
| | | </ProFormItemV2> |