zhengyiming
5 天以前 368c72d678ec6a1f5b60f109911d190e9c2a2809
src/views/EnterpriseInfo/components/RewardConsumeRecordView.vue
@@ -3,13 +3,14 @@
    <AppContainer>
      <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns">
        <template #operationBtn-checkBtn="{ data, row }">
          <PreviewBtnV2
          <!-- <PreviewBtnV2
            class="pro-table-operation-btn"
            :url="convertApi2FormUrlBySeparator(row.payFileUrl ?? '')"
            preview-btn-text="查看凭证"
          />
          /> -->
        </template>
      </ProTableV2>
      <ParkBountyTradeDetailFileDialog v-bind="dialogProps" />
    </AppContainer>
  </LoadingLayout>
</template>
@@ -21,11 +22,18 @@
  ProTableV2,
  defineOperationBtns,
  PreviewBtnV2,
  useFormDialog,
  UploadUserFile,
} from '@bole-core/components';
import { convertApi2FormUrlBySeparator } from '@/utils';
import {
  convertApi2FormUrlBySeparator,
  convertApi2FormUrlObjectBySeparator,
  convertApi2FormUrlOnlyOne,
} from '@/utils';
import { OrderInputType } from '@bole-core/core';
import * as parkRewardServices from '@/services/api/ParkReward';
import { EnterpriseBountyPayTypeEnumText } from '@/constants';
import ParkBountyTradeDetailFileDialog from '../../Reward/components/ParkBountyTradeDetailFileDialog.vue';
defineOptions({
  name: 'RewardConsumeRecordView',
@@ -50,7 +58,7 @@
  {
    id: '4',
    enCode: 'remianAmount',
    name: '奖励金余额',
    name: '资金余额',
  },
];
@@ -60,6 +68,7 @@
      enCode: 'checkBtn',
      name: '查看凭证',
    },
    emits: { onClick: (role) => openDialog(role) },
  },
]);
@@ -103,7 +112,6 @@
      payDateTime: { type: 'date', format: 'YYYY-MM-DD HH:mm:ss' },
      amount: { type: 'money' },
      remianAmount: { type: 'money' },
      payType: { type: 'enum', valueEnum: EnterpriseBountyPayTypeEnumText },
    },
  }
);
@@ -112,6 +120,26 @@
  await getList();
  state.loading = false;
});
function openDialog(row: API.GetParkCustomerBountyConsumptionOutput) {
  handleAdd({
    payAuditFileUrl: convertApi2FormUrlObjectBySeparator(row.payAuditFileUrl),
    financeAuditFileUrl: convertApi2FormUrlObjectBySeparator(row.financeAuditFileUrl),
    selfAuditFileUrl: convertApi2FormUrlObjectBySeparator(row.selfAuditFileUrl),
    payFileUrl: convertApi2FormUrlObjectBySeparator(row.payFileUrl),
    insureBillUrl: convertApi2FormUrlObjectBySeparator(row.insureBillUrl),
  });
}
const { dialogProps, handleAdd } = useFormDialog({
  defaultFormParams: {
    payAuditFileUrl: [] as UploadUserFile[],
    financeAuditFileUrl: [] as UploadUserFile[],
    selfAuditFileUrl: [] as UploadUserFile[],
    payFileUrl: [] as UploadUserFile[],
    insureBillUrl: [] as UploadUserFile[],
  },
});
</script>
<style lang="scss" scoped>