wupengfei
2025-04-11 ae671e401db4b158b6bd4292fb99fab58e40844c
feat: 接口
14个文件已修改
3个文件已添加
505 ■■■■ 已修改文件
src/components/commonView/BatchInfoView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/commonView/DeclareEnterpriseTableView.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/commonView/FourStreamsMaterialFileTable.vue 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/commonView/types.ts 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/commonView/utils/index.ts 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/industrialPark.ts 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/table.ts 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/ParkBountyApply.ts 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/services/api/typings.d.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/oss/index.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseInfo/components/EnterpriseBasicInfoView.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseInfo/components/RewardGrantRecordView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/MaterialReview/MaterialReviewDetail.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Reward/RewardDeclareDetail.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Reward/RewardGrant.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Reward/components/RewardGrantDialog.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/commonView/BatchInfoView.vue
@@ -7,7 +7,7 @@
    </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">
src/components/commonView/DeclareEnterpriseTableView.vue
@@ -22,7 +22,6 @@
    }"
  >
  </ProTableV2>
  <MateriaDetailDialog v-bind="dialogProps"></MateriaDetailDialog>
</template>
<script setup lang="ts">
@@ -31,12 +30,9 @@
  QueryFilterItem,
  ProTableV2,
  SearchInput,
  useFormDialog,
  defineOperationBtns,
  defineColumns,
} from '@bole-core/components';
import MateriaDetailDialog from './MateriaDetailDialog.vue';
import { FourStreamsMaterialFileTableItem } from './types';
defineOptions({
  name: 'DeclareEnterpriseTableView',
@@ -49,6 +45,7 @@
  extraParamState: {
    searchKeyWord: string;
  };
  openDialog?: (row) => void;
};
const props = withDefaults(defineProps<Props>(), {});
@@ -98,22 +95,10 @@
      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>
src/components/commonView/FourStreamsMaterialFileTable.vue
@@ -4,12 +4,12 @@
      :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
@@ -29,7 +29,11 @@
</template>
<script setup lang="ts">
import { FourStreamsMaterialFileTableProps, FourStreamsMaterialFileTableItem } from './types';
import {
  FourStreamsMaterialFileTableProps,
  FourStreamsMaterialFileTableItem,
  FourStreamsMaterialFileBusinessTypeEnumText,
} from './types';
import {
  ProTableV2,
  defineColumns,
@@ -37,9 +41,9 @@
  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',
@@ -50,6 +54,7 @@
  showCheckBtn: true,
  showDownloadBtn: true,
  showDeleteBtn: true,
  downloadBtnText: '下载',
});
const list = defineModel<FourStreamsMaterialFileTableItem[]>('list');
@@ -62,81 +67,83 @@
  },
]);
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 {
src/components/commonView/types.ts
@@ -6,11 +6,12 @@
  showCheckBtn?: boolean;
  showDownloadBtn?: boolean;
  showDeleteBtn?: boolean;
  downloadBtnText?: string;
};
export type FourStreamsMaterialFileTableItem = {
  fileBusinessType: EnterpriseMaterialFileBusinessTypeEnum;
  fileList: (API.AddEnterpriseMaterialFileInput & UploadUserFile)[];
  fileBusinessType: FourStreamsMaterialFileBusinessTypeEnum;
  fileList: UploadUserFile[];
};
export enum EnterpriseTypeEnum {
@@ -38,3 +39,35 @@
  [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;
src/components/commonView/utils/index.ts
New file
@@ -0,0 +1,67 @@
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 === '数字经济园';
  }
}
src/hooks/index.ts
@@ -7,3 +7,4 @@
export * from './useUser';
export * from './help';
export * from './dic';
export * from './table';
src/hooks/industrialPark.ts
New file
@@ -0,0 +1,34 @@
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,
  };
}
src/hooks/table.ts
New file
@@ -0,0 +1,12 @@
type DefineColumnsOptions = {
  columns?: API.ModuleColumnDto[];
  operationBtns?: OperationBtnType[];
};
export function useDefineColumns(options: DefineColumnsOptions = {}) {
  const { columns, operationBtns } = options;
  return computed(() => ({
    columns,
    operationBtns,
  }));
}
src/services/api/ParkBountyApply.ts
@@ -202,7 +202,7 @@
  params: API.APIgetParkBountyApplyBatchTransferEnterpriseParams,
  options?: API.RequestConfig
) {
  return request<API.GetCompanyNameListOutput[]>(
  return request<API.GetNotTransferCompanyNameListOutput[]>(
    '/api/ParkBountyApply/GetParkBountyApplyBatchTransferEnterprise',
    {
      method: 'GET',
@@ -454,7 +454,7 @@
  });
}
/** 运营端—入账—上传凭证 POST /api/ParkBountyApply/ParkBountyApplySettle */
/** 政务端—奖励金发放—上传凭证 POST /api/ParkBountyApply/ParkBountyApplySettle */
export async function parkBountyApplySettle(
  body: API.ParkBountyApplySettleInput,
  options?: API.RequestConfig
@@ -499,7 +499,7 @@
  });
}
/** 政务端—奖励金上传凭证 POST /api/ParkBountyApply/ParkBountyApplyTransferFile */
/** 运营端—奖励金入账—上传凭证 POST /api/ParkBountyApply/ParkBountyApplyTransferFile */
export async function parkBountyApplyTransferFile(
  body: API.ParkBountyApplyTransferFileInput,
  options?: API.RequestConfig
src/services/api/typings.d.ts
@@ -7771,6 +7771,12 @@
    endDate?: string;
  }
  interface GetNotTransferCompanyNameListOutput {
    companyId?: string;
    name?: string;
    parkBountyApplyDetailId?: string;
  }
  interface GetOperateHistoryInput {
    pageModel?: Pagination;
    relationId?: string;
@@ -7928,6 +7934,8 @@
    outCheckStatus?: BountyCheckStatusEnum;
    /** 外部审核日期 */
    outCheckTime?: string;
    /** 发放凭证 */
    settleFileUrl?: string;
  }
  interface GetParkBountyApplyListOutputPageOutput {
@@ -14210,6 +14218,9 @@
    outCheckStatus?: BountyCheckStatusEnum;
    /** 外部审核原因 */
    outCheckRemark?: string;
    /** 内部审核原因 */
    inCheckRemark?: string;
    inCheckStatus?: BountyCheckStatusEnum;
  }
  interface OutcheckParkBountyApplyInput {
src/utils/oss/index.ts
@@ -1,13 +1,13 @@
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,
    });
  }
src/views/EnterpriseInfo/components/EnterpriseBasicInfoView.vue
@@ -68,6 +68,7 @@
  ProFormItemV2,
  ProFormText,
  ProFormUpload,
  ProFormRadio,
} from '@bole-core/components';
import { useQuery } from '@tanstack/vue-query';
import * as customerServices from '@/services/api/Customer';
src/views/EnterpriseInfo/components/RewardGrantRecordView.vue
@@ -91,7 +91,7 @@
  },
  {
    defaultExtraParams: {
      orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }],
      orderInput: [{ property: 'id', order: OrderInputType.Desc }],
    },
    columnsRenderProps: {
      settleTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' },
src/views/MaterialReview/MaterialReviewDetail.vue
@@ -23,11 +23,19 @@
              :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>
@@ -41,9 +49,11 @@
  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';
@@ -51,6 +61,9 @@
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',
@@ -128,7 +141,7 @@
  },
  {
    defaultExtraParams: {
      orderInput: [{ property: 'enterpriseId', order: OrderInputType.Desc }],
      orderInput: [{ property: 'parkBountyApplyId', order: OrderInputType.Desc }],
      searchKeyWord: '',
    },
    columnsRenderProps: {
@@ -143,6 +156,25 @@
  }
);
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',
src/views/Reward/RewardDeclareDetail.vue
@@ -4,11 +4,24 @@
      <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>
@@ -16,14 +29,27 @@
</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',
@@ -43,8 +69,6 @@
  bountyAssignFileUlr: [] as UploadUserFile[],
  bountyCollectFileUrl: [] as UploadUserFile[],
});
const tableRef = ref<InstanceType<typeof DeclareEnterpriseTableView>>();
const { data: detail, isLoading } = useQuery({
  queryKey: ['parkBountyApplyServices/getParkBountyApplyDetail', id],
@@ -68,10 +92,68 @@
    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',
src/views/Reward/RewardGrant.vue
@@ -69,8 +69,8 @@
  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';
@@ -142,6 +142,10 @@
    emits: {
      onClick: (role) => openDialog(role),
    },
    extraProps: {
      hide: (row: API.GetParkBountyApplyListOutput) =>
        row.settleStatus === SettleStatusEnum.HasSettle,
    },
  },
  {
    data: {
@@ -150,6 +154,10 @@
    },
    emits: {
      onClick: (role) => handlePreview(role),
    },
    extraProps: {
      hide: (row: API.GetParkBountyApplyListOutput) =>
        row.settleStatus === SettleStatusEnum.WaitForSettle,
    },
  },
]);
@@ -240,16 +248,23 @@
  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>
src/views/Reward/components/RewardGrantDialog.vue
@@ -16,9 +16,8 @@
      >
        <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>