zhengyiming
2025-11-14 b6dbab5e16957d2c75fd99efe1af1e7938bdca36
src/views/Reward/RewardGrant.vue
@@ -121,123 +121,16 @@
import { useQueryClient } from '@tanstack/vue-query';
import { TransferFileEnumInRewardGrandTableItem } from '@/components/commonView/types';
import { FourStreamsMaterialUtils } from '@/components/commonView/utils';
import { useAccess } from '@/hooks';
defineOptions({
  name: 'RewardGrant',
});
const column: API.CustomModuleColumnDto[] = [
  {
    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: '财政拨付登记状态',
    width: 160,
  },
  {
    id: '8',
    enCode: 'financeTime',
    name: '财政拨付登记日期',
    width: 180,
  },
  {
    id: '9',
    enCode: 'settleStatus',
    name: '平台拨付登记状态',
    width: 160,
  },
  {
    id: '10',
    enCode: 'settleTime',
    name: '平台拨付登记日期',
    width: 180,
  },
  {
    id: '11',
    enCode: 'a',
    name: '操作人',
  },
];
const operationBtns = defineOperationBtns([
  {
    data: {
      enCode: 'detailBtn',
      name: '申报详情',
    },
    emits: {
      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: 'registerBtn',
      name: '登记',
    },
    emits: {
      onClick: (role) => goRewardGrantRegister(role),
    },
const operationBtnMap: Record<string, OperationBtnType> = {
  detailBtn: { emits: { onClick: (role) => goDetail(role) } },
  registerBtn: {
    emits: { onClick: (role) => goRewardGrantRegister(role) },
    extraProps: {
      hide: (row: API.GetParkBountyApplyListOutput) =>
        !(
@@ -246,27 +139,7 @@
        ),
    },
  },
  // {
  //   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',
      name: '查看凭证',
    },
  checkBtn: {
    emits: {
      onClick: (row) => openMaterialFileDialog(row),
    },
@@ -278,7 +151,11 @@
        ),
    },
  },
]);
};
const { checkSubModuleItemShow, column, operationBtns } = useAccess({
  operationBtnMap,
});
const router = useRouter();
const BaseState = {