wupengfei
2025-04-17 404a6138ba3594a66d1b66e2bc79b9b3132836c5
src/views/Reward/RewardGrant.vue
@@ -55,7 +55,8 @@
          />
        </template>
      </ProTableV2>
      <RewardGrantDialog v-bind="dialogProps"></RewardGrantDialog>
      <FinancialDialog v-bind="dialogFinancialProps"></FinancialDialog>
      <PlateformDialog v-bind="dialogPlateformProps"></PlateformDialog>
    </AppContainer>
  </LoadingLayout>
</template>
@@ -77,15 +78,11 @@
  PreviewBtnV2,
} from '@bole-core/components';
import { Message, OrderInputType } from '@bole-core/core';
import {
  convertApi2FormUrl,
  convertApi2FormUrlBySeparator,
  downloadFileByUrl,
  format,
} from '@/utils';
import { convertApi2FormUrlBySeparator, format } from '@/utils';
import { SettleStatusEnum, SettleStatusEnumText } from '@/constants';
import * as parkBountyApplyServices from '@/services/api/ParkBountyApply';
import RewardGrantDialog from './components/RewardGrantDialog.vue';
import FinancialDialog from './components/FinancialDialog.vue';
import PlateformDialog from './components/PlateformDialog.vue';
import _ from 'lodash';
import { ModelValueType } from 'element-plus';
import { useQueryClient } from '@tanstack/vue-query';
@@ -113,12 +110,12 @@
  {
    id: '4',
    enCode: 'applyMonth',
    name: '申请奖励金月份',
    name: '申请平台奖励月份',
  },
  {
    id: '5',
    enCode: 'applySumAmount',
    name: '奖励金汇总金额(元)',
    name: '平台奖励汇总金额(元)',
  },
  {
    id: '6',
@@ -128,12 +125,22 @@
  {
    id: '7',
    enCode: 'settleStatus',
    name: '发放状态',
    name: '财政拨付状态',
  },
  {
    id: '8',
    enCode: 'settleTime',
    name: '发放日期',
    name: '拨付日期',
  },
  {
    id: '9',
    enCode: 'settleStatus',
    name: '平台充值状态',
  },
  {
    id: '10',
    enCode: 'settleTime',
    name: '充值日期',
  },
];
@@ -149,11 +156,24 @@
  },
  {
    data: {
      enCode: 'grantBtn',
      name: '发放',
      enCode: 'financialBtn',
      name: '财政拨付',
    },
    emits: {
      onClick: (role) => openDialog(role),
      onClick: (role) => openFinancialDialog(role),
    },
    extraProps: {
      hide: (row: API.GetParkBountyApplyListOutput) =>
        row.settleStatus === SettleStatusEnum.HasSettle,
    },
  },
  {
    data: {
      enCode: 'plateformBtn',
      name: '平台充值',
    },
    emits: {
      onClick: (role) => openPlateformDialog(role),
    },
    extraProps: {
      hide: (row: API.GetParkBountyApplyListOutput) =>
@@ -239,26 +259,32 @@
  });
}
const { dialogProps, handleAdd, handleEdit, editForm } = useFormDialog({
  onConfirm: handleAddOrEdit,
const queryClient = useQueryClient();
const {
  dialogProps: dialogFinancialProps,
  handleEdit: handleFinancialEdit,
  editForm: editFinancialForm,
} = useFormDialog({
  onConfirm: handleFinancial,
  defaultFormParams: {
    parkBountyApplyId: '',
    amount: 0,
    settleFileUrl: [] as UploadUserFile[],
  },
});
function openDialog(row?: API.GetParkBountyApplyListOutput) {
  handleEdit({
function openFinancialDialog(row?: API.GetParkBountyApplyListOutput) {
  handleFinancialEdit({
    parkBountyApplyId: row.id,
    amount: 0,
    settleFileUrl: [] as UploadUserFile[],
  });
}
const queryClient = useQueryClient();
async function handleAddOrEdit() {
async function handleFinancial() {
  try {
    let params: API.ParkBountyApplySettleInput = {
      parkBountyApplyId: editForm.parkBountyApplyId,
      settleFileUrl: editForm.settleFileUrl.map((x) => x.path).join('|'),
      parkBountyApplyId: editFinancialForm.parkBountyApplyId,
      settleFileUrl: editFinancialForm.settleFileUrl.map((x) => x.path).join('|'),
    };
    let res = await parkBountyApplyServices.parkBountyApplySettle(params);
    if (res) {
@@ -270,6 +296,29 @@
    }
  } catch (error) {}
}
const {
  dialogProps: dialogPlateformProps,
  handleEdit: handlePlateformEdit,
  editForm: editPlateformForm,
} = useFormDialog({
  onConfirm: handlePlateform,
  defaultFormParams: {
    parkBountyApplyId: '',
    amount: 0,
    settleFileUrl: [] as UploadUserFile[],
  },
});
function openPlateformDialog(row?: API.GetParkBountyApplyListOutput) {
  handlePlateformEdit({
    parkBountyApplyId: row.id,
    amount: 0,
    settleFileUrl: [] as UploadUserFile[],
  });
}
async function handlePlateform() {}
</script>
<style lang="scss" scoped>