wupengfei
2025-04-15 57f5bb94d818edfc797d1c7476b3ee7d0748e980
src/views/EnterpriseInfo/components/RewardConsumeRecordView.vue
@@ -2,13 +2,27 @@
  <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.payFileUrl ?? '')"
            preview-btn-text="查看凭证"
          />
        </template>
      </ProTableV2>
    </AppContainer>
  </LoadingLayout>
</template>
<script setup lang="ts">
import { AppContainer, useTable, ProTableV2, defineOperationBtns } from '@bole-core/components';
import {
  AppContainer,
  useTable,
  ProTableV2,
  defineOperationBtns,
  PreviewBtnV2,
} from '@bole-core/components';
import { convertApi2FormUrlBySeparator } from '@/utils';
import { OrderInputType } from '@bole-core/core';
import * as parkRewardServices from '@/services/api/ParkReward';
import { EnterpriseBountyPayTypeEnumText } from '@/constants';
@@ -25,7 +39,7 @@
  },
  {
    id: '2',
    enCode: 'payType',
    enCode: 'payRemark',
    name: '消费类型',
  },
  {
@@ -43,11 +57,8 @@
const operationBtns = defineOperationBtns([
  {
    data: {
      enCode: 'previewBtn',
      enCode: 'checkBtn',
      name: '查看凭证',
    },
    emits: {
      onClick: (role) => handlePreview(role),
    },
  },
]);
@@ -86,18 +97,15 @@
  },
  {
    defaultExtraParams: {
      orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }],
      orderInput: [{ property: 'id', order: OrderInputType.Desc }],
    },
    columnsRenderProps: {
      payDateTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' },
      amount: { type: 'money' },
      remianAmount: { type: 'money' },
      payType: { type: 'enum', valueEnum: EnterpriseBountyPayTypeEnumText },
    },
  }
);
function handlePreview(row: API.InsureBatchBillDto) {}
onMounted(async () => {
  await getList();