33 lines
1.5 KiB
JavaScript
33 lines
1.5 KiB
JavaScript
import React from 'react';
|
|
import { Form, InputNumber, Alert } from 'antd';
|
|
import { ToYuan } from 'oak-domain/lib/utils/money';
|
|
import Styles from './web.pc.module.less';
|
|
export default function Render(props) {
|
|
const { depositMax, payConfig, price, channel, meta, tips, onSetChannel, onSetMeta } = props.data;
|
|
const { t, onPriceChange } = props.methods;
|
|
if (payConfig) {
|
|
return (<Form labelCol={{ span: 4 }} wrapperCol={{ span: 14 }} layout="horizontal" style={{ width: '100%' }} colon={false}>
|
|
{tips && <Alert className={Styles.tips} type="info" message={tips}/>}
|
|
<Form.Item label={<span>{t("label.depPrice")}:</span>}>
|
|
<InputNumber autoFocus placeholder={t('placeholder', { max: depositMax })} value={typeof price == 'number' ? ToYuan(price) : null} addonAfter={t('common::pay.symbol')} onChange={(value) => {
|
|
onPriceChange(value);
|
|
}}/>
|
|
</Form.Item>
|
|
{price > 0 ? <Form.Item label={<span style={{ marginTop: 10 }}>
|
|
{t('label.channel')}:
|
|
</span>}>
|
|
{/* <ChannelPicker
|
|
payConfig={payConfig}
|
|
onPick={(channel) => {
|
|
onSetChannel(channel);
|
|
}}
|
|
channel={channel}
|
|
meta={meta}
|
|
onSetMeta={(meta) => onSetMeta(meta)}
|
|
/> */}
|
|
</Form.Item> : <div style={{ height: 120 }}/>}
|
|
</Form>);
|
|
}
|
|
return null;
|
|
}
|