diff --git a/src/components/payment/Payment.tsx b/src/components/payment/Payment.tsx index 782917b..2e6d39a 100644 --- a/src/components/payment/Payment.tsx +++ b/src/components/payment/Payment.tsx @@ -11,7 +11,8 @@ import { Radio, Spin, Upload, UploadProps, - Tag + Tag, + Modal } from "antd"; import { ReloadOutlined @@ -65,6 +66,8 @@ interface IPaymentProps { } export default function Payment(props: IPaymentProps) { + // 支付完成弹窗 + const [paymentModal, setPaymentModal] = useState(false) const [mask, setMask] = useState(false) const [form] = Form.useForm(); const [messageApi, messageApiContext] = useMessage(); @@ -136,7 +139,7 @@ export default function Payment(props: IPaymentProps) { }, onSuccess({ data }) { // console.log('用户id',data.accountRechargeId); - + setAccountRechargeId(data.accountRechargeId); setThirdPartyPayUrl(data.thirdPartyPayUrl); countdown(); @@ -230,7 +233,7 @@ export default function Payment(props: IPaymentProps) { setIsRechargeMoneyEdit(false) getPay() }} color="volcano">400 - { + { form.setFieldValue('rechargeMoney', 500); setIsRechargeMoneyEdit(false) getPay() @@ -440,28 +443,29 @@ export default function Payment(props: IPaymentProps) { name="basic" form={form} onFinish={() => { - post({ - messageApi, - url: `/api/pay/pay-account-recharge/${accountRechargeId}`, - body: { - thirdParty: form.getFieldValue('thirdParty'), - rechargeMoney: form.getFieldValue('rechargeMoney'), - orgName: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgName') : '', - orgBank: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgBank') : '', - orgNumber: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgNumber') : '', - rechargeFinalTime: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeFinalTime') : '', - rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? rechargeVoucherArray.join(',') : '', - }, - onBefore() { - setIsLoading(true); - }, - onSuccess() { - props.handleConfirm(); - }, - onFinally() { - setIsLoading(false); - } - }); + setPaymentModal(true) + // post({ + // messageApi, + // url: `/api/pay/pay-account-recharge/${accountRechargeId}`, + // body: { + // thirdParty: form.getFieldValue('thirdParty'), + // rechargeMoney: form.getFieldValue('rechargeMoney'), + // orgName: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgName') : '', + // orgBank: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgBank') : '', + // orgNumber: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgNumber') : '', + // rechargeFinalTime: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeFinalTime') : '', + // rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? rechargeVoucherArray.join(',') : '', + // }, + // onBefore() { + // setIsLoading(true); + // }, + // onSuccess() { + // props.handleConfirm(); + // }, + // onFinally() { + // setIsLoading(false); + // } + // }); }} autoComplete="off" > @@ -500,6 +504,46 @@ export default function Payment(props: IPaymentProps) { {messageApiContext} + { + post({ + messageApi, + url: `/api/pay/pay-account-recharge/${accountRechargeId}`, + body: { + thirdParty: form.getFieldValue('thirdParty'), + rechargeMoney: form.getFieldValue('rechargeMoney'), + orgName: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgName') : '', + orgBank: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgBank') : '', + orgNumber: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('orgNumber') : '', + rechargeFinalTime: thirdParty == ThirdPartyEnum.DGZZ ? form.getFieldValue('rechargeFinalTime') : '', + rechargeVoucher: thirdParty == ThirdPartyEnum.DGZZ ? rechargeVoucherArray.join(',') : '', + }, + onBefore() { + setIsLoading(true); + }, + onSuccess() { + props.handleConfirm(); + }, + onFinally() { + setIsLoading(false); + } + }); + }} + onCancel={() => { + setPaymentModal(false); + }}> +
+
确定对公转账{form.getFieldValue('rechargeMoney')} 吗?不确定请修改金额。
+
+
) } \ No newline at end of file