删除了withdrawChannel的管理,现在改为自动关联pay的account

This commit is contained in:
Xu Chang 2024-06-08 20:44:12 +08:00
parent 4dd92fdd23
commit dbf236f0c0
20 changed files with 0 additions and 286 deletions

View File

@ -1,6 +0,0 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "withdrawChannel", true, {
systemId: string;
onUpdate: (id: string) => void;
onRemove: (id: string) => void;
}>) => React.ReactElement;
export default _default;

View File

@ -1,32 +0,0 @@
import assert from "assert";
export default OakComponent({
entity: 'withdrawChannel',
isList: true,
projection: {
id: 1,
name: 1,
lossRatio: 1,
},
formData({ data }) {
return {
channels: data,
};
},
actions: ['update', 'create', 'remove'],
properties: {
systemId: '',
onUpdate: (id) => undefined,
onRemove: (id) => undefined,
},
filters: [
{
filter() {
const { systemId } = this.props;
assert(systemId);
return {
systemId,
};
},
}
]
});

View File

@ -1 +0,0 @@
{}

View File

@ -1,3 +0,0 @@
{
"tips": "当用户申请提现且无法通过退款进行时,可以指定提现途径,由业务方后台手动完成"
}

View File

@ -1,8 +0,0 @@
/// <reference types="react" />
import { EntityDict } from "../../../oak-app-domain";
import { RowWithActions, WebComponentProps } from "oak-frontend-base";
export default function render(props: WebComponentProps<EntityDict, 'withdrawChannel', true, {
channels: RowWithActions<EntityDict, 'withdrawChannel'>[];
onUpdate: (id: string) => void;
onRemove: (id: string) => void;
}>): import("react").JSX.Element;

View File

@ -1,25 +0,0 @@
import { ListPro } from '../../../components/AbstractComponents';
import { Alert } from 'antd';
export default function render(props) {
const { channels, oakPagination, onUpdate, onRemove } = props.data;
const { t } = props.methods;
return (<ListPro title={<Alert message={t('tips')} type="info"/>} entity="withdrawChannel" attributes={[
'name',
{
path: 'lossRatio',
width: 200,
label: t('withdrawChannel:attr.lossRatio')
}
]} data={channels} tablePagination={oakPagination} onAction={(row, action) => {
switch (action) {
case 'update': {
onUpdate(row.id);
break;
}
case 'remove': {
onRemove(row.id);
break;
}
}
}}/>);
}

View File

@ -1,3 +0,0 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "withdrawChannel", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,14 +0,0 @@
export default OakComponent({
entity: 'withdrawChannel',
isList: false,
projection: {
id: 1,
name: 1,
lossRatio: 1,
},
formData({ data }) {
return {
channel: data,
};
},
});

View File

@ -1,6 +0,0 @@
{
"help": {
"lossRatio": "填百分比(0.6就代表千分之六)",
"name": "填系统支持的提现途径(银行、支付宝等)"
}
}

View File

@ -1,6 +0,0 @@
/// <reference types="react" />
import { EntityDict } from "../../../oak-app-domain";
import { RowWithActions, WebComponentProps } from "oak-frontend-base";
export default function render(props: WebComponentProps<EntityDict, 'withdrawChannel', false, {
channel: RowWithActions<EntityDict, 'withdrawChannel'>;
}>): import("react").JSX.Element | null;

View File

@ -1,25 +0,0 @@
import { Form, Input, InputNumber } from 'antd';
export default function render(props) {
const { channel } = props.data;
const { t, update } = props.methods;
if (channel) {
return (<Form labelCol={{ span: 6 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 600 }}>
<Form.Item label={t('withdrawChannel:attr.name')} help={t('help.name')}>
<Input value={channel.name} onChange={({ currentTarget }) => {
const { value } = currentTarget;
update({
name: value,
});
}}/>
</Form.Item>
<Form.Item label={t('withdrawChannel:attr.lossRatio')} help={t('help.lossRatio')}>
<InputNumber value={channel.lossRatio} max={5} min={0.01} addonAfter={"%"} step={0.01} precision={2} onChange={(value) => {
update({
lossRatio: value,
});
}}/>
</Form.Item>
</Form>);
}
return null;
}

View File

@ -1 +0,0 @@
{}

View File

@ -1,33 +0,0 @@
import assert from "assert";
export default OakComponent({
entity: 'withdrawChannel',
isList: true,
projection: {
id: 1,
name: 1,
lossRatio: 1,
},
formData({ data }) {
return {
channels: data,
};
},
actions: ['update', 'create', 'remove'],
properties: {
systemId: '',
onUpdate: (id: string) => undefined as void,
onRemove: (id: string) => undefined as void,
},
filters: [
{
filter() {
const { systemId } = this.props;
assert(systemId);
return {
systemId,
}
},
}
]
});

View File

@ -1,3 +0,0 @@
{
"tips": "当用户申请提现且无法通过退款进行时,可以指定提现途径,由业务方后台手动完成"
}

View File

@ -1,42 +0,0 @@
import { EntityDict } from "../../../oak-app-domain";
import { RowWithActions, WebComponentProps } from "oak-frontend-base";
import { ListPro } from '../../../components/AbstractComponents';
import { Alert } from 'antd';
export default function render(props: WebComponentProps<EntityDict, 'withdrawChannel', true, {
channels: RowWithActions<EntityDict, 'withdrawChannel'>[];
onUpdate: (id: string) => void;
onRemove: (id: string) => void;
}>) {
const { channels, oakPagination, onUpdate, onRemove } = props.data;
const { t } = props.methods;
return (
<ListPro
title={<Alert message={t('tips')} type="info" />}
entity="withdrawChannel"
attributes={[
'name',
{
path: 'lossRatio',
width: 200,
label: t('withdrawChannel:attr.lossRatio')
}
]}
data={channels}
tablePagination={oakPagination}
onAction={(row, action) => {
switch (action) {
case 'update': {
onUpdate(row.id!);
break;
}
case 'remove': {
onRemove(row.id!);
break;
}
}
}}
/>
);
}

View File

@ -1,14 +0,0 @@
export default OakComponent({
entity: 'withdrawChannel',
isList: false,
projection: {
id: 1,
name: 1,
lossRatio: 1,
},
formData({ data }) {
return {
channel: data,
};
},
})

View File

@ -1,6 +0,0 @@
{
"help": {
"lossRatio": "填百分比(0.6就代表千分之六)",
"name": "填系统支持的提现途径(银行、支付宝等)"
}
}

View File

@ -1,56 +0,0 @@
import { EntityDict } from "../../../oak-app-domain";
import { RowWithActions, WebComponentProps } from "oak-frontend-base";
import { Form, Input, InputNumber } from 'antd';
export default function render(props: WebComponentProps<EntityDict, 'withdrawChannel', false, {
channel: RowWithActions<EntityDict, 'withdrawChannel'>;
}>) {
const { channel } = props.data;
const { t, update } = props.methods;
if (channel) {
return (
<Form
labelCol={{ span: 6 }}
wrapperCol={{ span: 12 }}
layout="horizontal"
style={{ minWidth: 600 }}
>
<Form.Item
label={t('withdrawChannel:attr.name')}
help={t('help.name')}
>
<Input
value={channel.name}
onChange={({ currentTarget }) => {
const { value } = currentTarget;
update({
name: value,
});
}}
/>
</Form.Item>
<Form.Item
label={t('withdrawChannel:attr.lossRatio')}
help={t('help.lossRatio')}
>
<InputNumber
value={channel.lossRatio}
max={5}
min={0.01}
addonAfter={"%"}
step={0.01}
precision={2}
onChange={(value) => {
update({
lossRatio: value,
})
}}
/>
</Form.Item>
</Form>
);
}
return null;
}