添加对公转账提示
This commit is contained in:
parent
d412986b29
commit
359f6cb387
@ -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<FormFieldType>();
|
||||
const [messageApi, messageApiContext] = useMessage();
|
||||
@ -440,28 +443,29 @@ export default function Payment(props: IPaymentProps) {
|
||||
name="basic"
|
||||
form={form}
|
||||
onFinish={() => {
|
||||
post<any>({
|
||||
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<any>({
|
||||
// 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) {
|
||||
</Form>
|
||||
</Spin>
|
||||
{messageApiContext}
|
||||
<Modal title="提示"
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
open={paymentModal}
|
||||
okButtonProps={{
|
||||
style: {
|
||||
backgroundColor: 'var(--color-primary)', // 设置背景颜色
|
||||
},
|
||||
}}
|
||||
onOk={() => {
|
||||
post<any>({
|
||||
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);
|
||||
}}>
|
||||
<div style={{display:'flex',alignItems:'center',justifyContent:'center',padding:10}}>
|
||||
<div style={{ fontSize: 20, fontWeight: 700 }}>确定对公转账<span style={{color:'red'}}>¥<span style={{fontSize:30}}>{form.getFieldValue('rechargeMoney')}</span></span> 吗?不确定请修改金额。</div>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user