oak-pay-business 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/aspects/AspectDict.d.ts +3 -3
- package/es/aspects/index.d.ts +2 -1
- package/es/checkers/accountOper.js +4 -3
- package/es/checkers/offlineAccount.js +4 -1
- package/es/checkers/refund.js +1 -0
- package/es/components/offlineAccount/upsert/web.pc.js +1 -1
- package/es/components/sysAccount/survey/locales/zh-CN.json +3 -1
- package/es/components/sysAccount/survey/web.pc.js +69 -32
- package/es/components/sysAccount/survey/web.pc.module.less +3 -2
- package/es/components/sysAccount/transferList/index.d.ts +3 -0
- package/es/components/sysAccount/transferList/index.js +52 -0
- package/es/components/sysAccount/transferList/index.json +1 -0
- package/es/components/sysAccount/transferList/locales/zh-CN.json +6 -0
- package/es/components/sysAccount/transferList/web.pc.d.ts +12 -0
- package/es/components/sysAccount/transferList/web.pc.js +45 -0
- package/es/components/sysAccountMove/create/index.d.ts +7 -0
- package/es/components/sysAccountMove/create/index.js +145 -0
- package/es/components/sysAccountMove/create/index.json +1 -0
- package/es/components/sysAccountMove/create/locales/zh-CN.json +6 -0
- package/es/components/sysAccountMove/create/web.pc.d.ts +26 -0
- package/es/components/sysAccountMove/create/web.pc.js +68 -0
- package/es/components/sysAccountOper/list/index.d.ts +5 -0
- package/es/components/sysAccountOper/list/index.js +127 -0
- package/es/components/sysAccountOper/list/index.json +1 -0
- package/es/components/sysAccountOper/list/locales/zh-CN.json +5 -0
- package/es/components/sysAccountOper/list/web.module.less +42 -0
- package/es/components/sysAccountOper/list/web.pc.d.ts +25 -0
- package/es/components/sysAccountOper/list/web.pc.js +36 -0
- package/es/components/withdrawTransfer/list/locales/zh-CN.json +1 -1
- package/es/components/wpAccount/upsert/web.pc.js +1 -1
- package/es/configuration/attrUpdateMatrix.js +2 -2
- package/es/data/actionAuth.js +7 -2
- package/es/data/i18n.js +49 -3
- package/es/data/path.js +2 -2
- package/es/entities/AccountOper.d.ts +1 -1
- package/es/entities/AccountOper.js +3 -1
- package/es/entities/OfflineAccount.d.ts +1 -1
- package/es/entities/OfflineAccount.js +8 -2
- package/es/entities/SysAccountMove.d.ts +13 -0
- package/es/entities/SysAccountMove.js +18 -0
- package/es/entities/SysAccountOper.d.ts +4 -1
- package/es/entities/SysAccountOper.js +1 -0
- package/es/entities/WpAccount.d.ts +1 -1
- package/es/entities/WpAccount.js +8 -2
- package/es/locales/error/zh-CN.json +5 -0
- package/es/locales/offlineAccount/zh-CN.json +2 -1
- package/es/oak-app-domain/AccountOper/Schema.d.ts +1 -1
- package/es/oak-app-domain/AccountOper/Storage.js +1 -1
- package/es/oak-app-domain/AccountOper/Style.js +1 -0
- package/es/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/EntityDict.d.ts +2 -0
- package/es/oak-app-domain/OfflineAccount/Action.d.ts +1 -1
- package/es/oak-app-domain/OfflineAccount/Action.js +1 -1
- package/es/oak-app-domain/OfflineAccount/Style.js +4 -1
- package/es/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Path/Schema.d.ts +6 -0
- package/es/oak-app-domain/Path/Storage.js +6 -0
- package/es/oak-app-domain/Path/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Storage.js +2 -0
- package/es/oak-app-domain/SysAccountMove/Schema.d.ts +185 -0
- package/es/oak-app-domain/SysAccountMove/Schema.js +1 -0
- package/es/oak-app-domain/SysAccountMove/Storage.d.ts +3 -0
- package/es/oak-app-domain/SysAccountMove/Storage.js +31 -0
- package/es/oak-app-domain/SysAccountMove/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/SysAccountOper/Schema.d.ts +34 -5
- package/es/oak-app-domain/SysAccountOper/Storage.js +4 -0
- package/es/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/System/Schema.d.ts +12 -0
- package/es/oak-app-domain/User/Schema.d.ts +12 -0
- package/es/oak-app-domain/WpAccount/Action.d.ts +1 -1
- package/es/oak-app-domain/WpAccount/Action.js +1 -1
- package/es/oak-app-domain/WpAccount/Style.js +4 -1
- package/es/oak-app-domain/WpAccount/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/_SubQuery.d.ts +12 -0
- package/es/triggers/pay.js +149 -46
- package/es/triggers/refund.js +3 -0
- package/es/types/RuntimeCxt.d.ts +1 -1
- package/es/types/sysAccountOper.d.ts +1 -0
- package/es/types/sysAccountOper.js +1 -0
- package/es/utils/payClazz/Account.js +3 -2
- package/lib/aspects/AspectDict.d.ts +3 -3
- package/lib/aspects/index.d.ts +2 -1
- package/lib/checkers/accountOper.js +4 -3
- package/lib/checkers/offlineAccount.js +4 -1
- package/lib/checkers/refund.js +1 -0
- package/lib/configuration/attrUpdateMatrix.js +2 -2
- package/lib/data/actionAuth.js +7 -2
- package/lib/data/i18n.js +49 -3
- package/lib/data/path.js +2 -2
- package/lib/entities/AccountOper.d.ts +1 -1
- package/lib/entities/AccountOper.js +3 -1
- package/lib/entities/OfflineAccount.d.ts +1 -1
- package/lib/entities/OfflineAccount.js +8 -2
- package/lib/entities/SysAccountMove.d.ts +13 -0
- package/lib/entities/SysAccountMove.js +21 -0
- package/lib/entities/SysAccountOper.d.ts +4 -1
- package/lib/entities/SysAccountOper.js +1 -0
- package/lib/entities/WpAccount.d.ts +1 -1
- package/lib/entities/WpAccount.js +8 -2
- package/lib/locales/error/zh-CN.json +5 -0
- package/lib/locales/offlineAccount/zh-CN.json +2 -1
- package/lib/oak-app-domain/AccountOper/Schema.d.ts +1 -1
- package/lib/oak-app-domain/AccountOper/Storage.js +1 -1
- package/lib/oak-app-domain/AccountOper/Style.js +1 -0
- package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/EntityDict.d.ts +2 -0
- package/lib/oak-app-domain/OfflineAccount/Action.d.ts +1 -1
- package/lib/oak-app-domain/OfflineAccount/Action.js +1 -1
- package/lib/oak-app-domain/OfflineAccount/Style.js +4 -1
- package/lib/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Path/Schema.d.ts +6 -0
- package/lib/oak-app-domain/Path/Storage.js +6 -0
- package/lib/oak-app-domain/Path/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Storage.js +18 -16
- package/lib/oak-app-domain/SysAccountMove/Schema.d.ts +185 -0
- package/lib/oak-app-domain/SysAccountMove/Schema.js +2 -0
- package/lib/oak-app-domain/SysAccountMove/Storage.d.ts +3 -0
- package/lib/oak-app-domain/SysAccountMove/Storage.js +34 -0
- package/lib/oak-app-domain/SysAccountMove/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/SysAccountOper/Schema.d.ts +34 -5
- package/lib/oak-app-domain/SysAccountOper/Storage.js +4 -0
- package/lib/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/System/Schema.d.ts +12 -0
- package/lib/oak-app-domain/User/Schema.d.ts +12 -0
- package/lib/oak-app-domain/WpAccount/Action.d.ts +1 -1
- package/lib/oak-app-domain/WpAccount/Action.js +1 -1
- package/lib/oak-app-domain/WpAccount/Style.js +4 -1
- package/lib/oak-app-domain/WpAccount/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/_SubQuery.d.ts +12 -0
- package/lib/triggers/pay.js +149 -46
- package/lib/triggers/refund.js +3 -0
- package/lib/types/RuntimeCxt.d.ts +1 -1
- package/lib/types/sysAccountOper.d.ts +1 -0
- package/lib/types/sysAccountOper.js +2 -0
- package/lib/utils/payClazz/Account.js +3 -2
- package/package.json +4 -4
- package/src/entities/AccountOper.ts +4 -2
- package/src/entities/OfflineAccount.ts +12 -5
- package/src/entities/SysAccountMove.ts +39 -0
- package/src/entities/SysAccountOper.ts +7 -1
- package/src/entities/WpAccount.ts +11 -4
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Form, Input, InputNumber, Radio, Space, Flex } from 'antd';
|
|
3
|
+
export default function Render(props) {
|
|
4
|
+
const { price, externalId, max, remark, fromEntityId, toEntityId, accounts } = props.data;
|
|
5
|
+
const { t, setFromId, setToId, setPrice, setExternalId, setRemark, createMove } = props.methods;
|
|
6
|
+
if (accounts.length) {
|
|
7
|
+
return (<>
|
|
8
|
+
<Form labelCol={{ span: 4 }} wrapperCol={{ span: 14 }} layout="horizontal" style={{
|
|
9
|
+
marginTop: 20,
|
|
10
|
+
}}>
|
|
11
|
+
<Form.Item label={t('label.from')} required>
|
|
12
|
+
<Radio.Group onChange={({ target }) => {
|
|
13
|
+
setFromId(target.value);
|
|
14
|
+
}} value={fromEntityId}>
|
|
15
|
+
<Space direction="vertical">
|
|
16
|
+
{accounts.filter(ele => ele.price > 0).map(ele => {
|
|
17
|
+
const { id, label, price, priceStr } = ele;
|
|
18
|
+
return (<Radio value={id} key={id} disabled={price <= 0}>
|
|
19
|
+
{`${label}: ${t('common::pay.symbol')}${priceStr}`}
|
|
20
|
+
</Radio>);
|
|
21
|
+
})}
|
|
22
|
+
</Space>
|
|
23
|
+
</Radio.Group>
|
|
24
|
+
</Form.Item>
|
|
25
|
+
{fromEntityId && <Form.Item label={t('label.to')} required>
|
|
26
|
+
<Radio.Group onChange={({ target }) => {
|
|
27
|
+
setToId(target.value);
|
|
28
|
+
}} value={toEntityId}>
|
|
29
|
+
<Space direction="vertical">
|
|
30
|
+
{accounts.filter(ele => ele.id !== fromEntityId).map(ele => {
|
|
31
|
+
const { id, label, price, priceStr } = ele;
|
|
32
|
+
return (<Radio value={id} key={id}>
|
|
33
|
+
{`${label}: ${t('common::pay.symbol')}${priceStr}`}
|
|
34
|
+
</Radio>);
|
|
35
|
+
})}
|
|
36
|
+
</Space>
|
|
37
|
+
</Radio.Group>
|
|
38
|
+
</Form.Item>}
|
|
39
|
+
{fromEntityId && toEntityId && <Form.Item label={t('sysAccountMove:attr.price')} required>
|
|
40
|
+
<InputNumber value={price} style={{
|
|
41
|
+
width: 240,
|
|
42
|
+
}} max={max} precision={2} onChange={(value) => {
|
|
43
|
+
const price = value;
|
|
44
|
+
setPrice(price);
|
|
45
|
+
}}/>
|
|
46
|
+
</Form.Item>}
|
|
47
|
+
{fromEntityId && toEntityId && <Form.Item label={t('sysAccountMove:attr.externalId')} required>
|
|
48
|
+
<Input value={externalId} onChange={({ currentTarget }) => {
|
|
49
|
+
const externalId = currentTarget.value;
|
|
50
|
+
setExternalId(externalId);
|
|
51
|
+
}} maxLength={64}/>
|
|
52
|
+
</Form.Item>}
|
|
53
|
+
{fromEntityId && toEntityId && <Form.Item label={t('sysAccountMove:attr.remark')}>
|
|
54
|
+
<Input.TextArea value={remark || undefined} onChange={({ currentTarget }) => {
|
|
55
|
+
const remark = currentTarget.value;
|
|
56
|
+
setRemark(remark);
|
|
57
|
+
}} rows={4}/>
|
|
58
|
+
</Form.Item>}
|
|
59
|
+
</Form>
|
|
60
|
+
<Flex style={{ width: '100%', padding: 12 }} justify="end">
|
|
61
|
+
<Button type="primary" disabled={!fromEntityId || !toEntityId || !price || !externalId} onClick={() => createMove()}>
|
|
62
|
+
{t('common::confirm')}
|
|
63
|
+
</Button>
|
|
64
|
+
</Flex>
|
|
65
|
+
</>);
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { ToYuan, ThousandCont } from "oak-domain/lib/utils/money";
|
|
3
|
+
export default OakComponent({
|
|
4
|
+
entity: 'sysAccountOper',
|
|
5
|
+
isList: true,
|
|
6
|
+
projection: {
|
|
7
|
+
id: 1,
|
|
8
|
+
delta: 1,
|
|
9
|
+
type: 1,
|
|
10
|
+
entity: 1,
|
|
11
|
+
entityId: 1,
|
|
12
|
+
$$createAt$$: 1,
|
|
13
|
+
},
|
|
14
|
+
filters: [
|
|
15
|
+
{
|
|
16
|
+
filter() {
|
|
17
|
+
const { entity, entityId } = this.props;
|
|
18
|
+
return {
|
|
19
|
+
entity,
|
|
20
|
+
entityId,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
formData({ data }) {
|
|
26
|
+
return {
|
|
27
|
+
sysAccountOpers: data.map((oper) => {
|
|
28
|
+
const { $$createAt$$, type, delta } = oper;
|
|
29
|
+
const num = Math.abs(delta);
|
|
30
|
+
const plus = ThousandCont(ToYuan(num), 2);
|
|
31
|
+
const sign = delta > 0 ? '+' : '-';
|
|
32
|
+
const time = dayjs($$createAt$$).format('YYYY-MM-DD HH:mm');
|
|
33
|
+
const symbol = this.t(`sysAccountOper:v.type.${type}`)[0];
|
|
34
|
+
const bgColor = this.features.style.getColor('sysAccountOper', 'type', type);
|
|
35
|
+
return {
|
|
36
|
+
value: `${sign}${plus}`,
|
|
37
|
+
time,
|
|
38
|
+
type: this.t(`sysAccountOper:v.type.${type}`),
|
|
39
|
+
symbol,
|
|
40
|
+
bgColor,
|
|
41
|
+
};
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
pagination: {
|
|
46
|
+
pageSize: 7,
|
|
47
|
+
currentPage: 1,
|
|
48
|
+
},
|
|
49
|
+
getTotal: 100,
|
|
50
|
+
properties: {
|
|
51
|
+
entity: '',
|
|
52
|
+
entityId: '',
|
|
53
|
+
},
|
|
54
|
+
data: {
|
|
55
|
+
month: new Date(),
|
|
56
|
+
monthStr: '',
|
|
57
|
+
type: 'all',
|
|
58
|
+
typesOptions: []
|
|
59
|
+
},
|
|
60
|
+
lifetimes: {
|
|
61
|
+
ready() {
|
|
62
|
+
let typesOptions = [{
|
|
63
|
+
label: this.t('all'),
|
|
64
|
+
value: 'all',
|
|
65
|
+
}];
|
|
66
|
+
const types = ['withdrawTransfer', 'pay', 'refund', 'compensate', 'moveIn', 'moveOut'];
|
|
67
|
+
types.forEach((ele) => {
|
|
68
|
+
typesOptions.push({
|
|
69
|
+
label: this.t(`sysAccountOper:v.type.${ele}`),
|
|
70
|
+
value: ele,
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
this.setState({
|
|
74
|
+
typesOptions,
|
|
75
|
+
});
|
|
76
|
+
this.setTypeFilter();
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
methods: {
|
|
80
|
+
setType(type) {
|
|
81
|
+
this.setState({
|
|
82
|
+
type,
|
|
83
|
+
}, () => this.setTypeFilter());
|
|
84
|
+
},
|
|
85
|
+
setTypeFilter() {
|
|
86
|
+
const { type } = this.state;
|
|
87
|
+
if (type === 'all') {
|
|
88
|
+
this.removeNamedFilterByName('type', true);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
this.addNamedFilter({
|
|
92
|
+
'#name': 'type',
|
|
93
|
+
filter: {
|
|
94
|
+
type,
|
|
95
|
+
}
|
|
96
|
+
}, true);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
setMonth(month) {
|
|
100
|
+
if (month) {
|
|
101
|
+
const m = dayjs(month);
|
|
102
|
+
const begin = m.startOf('month').valueOf();
|
|
103
|
+
const end = m.endOf('month').valueOf();
|
|
104
|
+
this.setState({
|
|
105
|
+
monthStr: m.format('YYYY-MM'),
|
|
106
|
+
month,
|
|
107
|
+
}, () => this.addNamedFilter({
|
|
108
|
+
'#name': 'month',
|
|
109
|
+
filter: {
|
|
110
|
+
$$createAt$$: {
|
|
111
|
+
$between: [begin, end],
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, true));
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.setState({
|
|
118
|
+
monthStr: '',
|
|
119
|
+
month: undefined,
|
|
120
|
+
}, () => this.removeNamedFilter({
|
|
121
|
+
'#name': 'month',
|
|
122
|
+
filter: {}
|
|
123
|
+
}, true));
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.control {
|
|
9
|
+
padding: 4px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.value {
|
|
13
|
+
font-size: x-large;
|
|
14
|
+
font-weight: bold;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.content{
|
|
18
|
+
flex: 1;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.types {
|
|
25
|
+
padding: 20px;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pagi{
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.empty {
|
|
36
|
+
display: flex;
|
|
37
|
+
width: 100%;
|
|
38
|
+
flex: 1;
|
|
39
|
+
background-color: white;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WebComponentProps } from 'oak-frontend-base';
|
|
3
|
+
import { EntityDict } from '../../../oak-app-domain';
|
|
4
|
+
import { SysAccountOperType } from '../../../types/sysAccountOper';
|
|
5
|
+
type SAOType = SysAccountOperType | 'all';
|
|
6
|
+
export default function Render(props: WebComponentProps<EntityDict, 'accountOper', true, {
|
|
7
|
+
sysAccountOpers?: Array<{
|
|
8
|
+
value: string;
|
|
9
|
+
time: string;
|
|
10
|
+
type: string;
|
|
11
|
+
symbol: string;
|
|
12
|
+
bgColor: string;
|
|
13
|
+
}>;
|
|
14
|
+
month?: Date;
|
|
15
|
+
monthStr: string;
|
|
16
|
+
type: SAOType;
|
|
17
|
+
typesOptions: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: SAOType;
|
|
20
|
+
}[];
|
|
21
|
+
}, {
|
|
22
|
+
setMonth: (month?: Date) => void;
|
|
23
|
+
setType: (type: SAOType) => void;
|
|
24
|
+
}>): React.JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Avatar, List, Select, Flex, DatePicker, Empty, Pagination } from 'antd';
|
|
3
|
+
import Styles from './web.module.less';
|
|
4
|
+
import dayJs from 'dayjs';
|
|
5
|
+
export default function Render(props) {
|
|
6
|
+
const { sysAccountOpers, month, type, monthStr, oakLoading, oakLoadingMore, typesOptions, oakPagination } = props.data;
|
|
7
|
+
const { t, setType, setMonth, setPageSize, setCurrentPage } = props.methods;
|
|
8
|
+
const { pageSize, total, currentPage } = oakPagination || {};
|
|
9
|
+
return (<div className={Styles.container}>
|
|
10
|
+
<Flex gap="middle" justify="flex-end" className={Styles.control}>
|
|
11
|
+
<DatePicker picker="month" onChange={(value) => {
|
|
12
|
+
setMonth(value?.toDate());
|
|
13
|
+
}} maxDate={dayJs()}/>
|
|
14
|
+
<Select style={{ width: 120 }} onChange={(value) => {
|
|
15
|
+
setType(value);
|
|
16
|
+
}} value={type} options={typesOptions}/>
|
|
17
|
+
</Flex>
|
|
18
|
+
|
|
19
|
+
{sysAccountOpers?.length ?
|
|
20
|
+
<div className={Styles.content}>
|
|
21
|
+
<List loading={oakLoading || oakLoadingMore} dataSource={sysAccountOpers} renderItem={(item, idx) => (<List.Item key={idx}>
|
|
22
|
+
<List.Item.Meta avatar={<Avatar style={{ backgroundColor: item.bgColor }}>{item.symbol}</Avatar>} title={<span className={Styles.type}>{item.type}</span>} description={<div>{item.time}</div>}/>
|
|
23
|
+
<div className={Styles.value} style={{
|
|
24
|
+
color: item.bgColor,
|
|
25
|
+
}}>
|
|
26
|
+
{item.value}
|
|
27
|
+
</div>
|
|
28
|
+
</List.Item>)}/>
|
|
29
|
+
<div className={Styles.pagi}>
|
|
30
|
+
<Pagination current={currentPage} total={total} pageSize={pageSize} onShowSizeChange={(size) => setPageSize(size)} onChange={(page) => setCurrentPage(page)}/>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
: (<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>)}
|
|
35
|
+
</div>);
|
|
36
|
+
}
|
|
@@ -8,7 +8,7 @@ export default function render(props) {
|
|
|
8
8
|
if (wpAccount) {
|
|
9
9
|
return (<Form labelCol={{ span: 8 }} wrapperCol={{ span: 12 }} layout="horizontal" style={{ minWidth: 860 }}>
|
|
10
10
|
{(!wechatPay || wechatPay.$$createAt$$ === 1) && <WechatPayUpsert oakPath={`${oakFullpath}.wechatPay`} systemId={systemId} key="wpCreate"/>}
|
|
11
|
-
{(wpAccount.wechatPayId &&
|
|
11
|
+
{(wpAccount.wechatPayId && wpAccount?.$$createAt$$ !== 1) && <WechatPayUpsert oakPath={`${oakFullpath}.wechatPay`} systemId={systemId} key="wpUpdate" oakId={wpAccount.wechatPayId}/>}
|
|
12
12
|
<Form.Item label="说明">
|
|
13
13
|
<div className={Styles.tips}>
|
|
14
14
|
{t('wechatPayIsShared')}
|
|
@@ -138,7 +138,7 @@ const attrUpdateMatrix = {
|
|
|
138
138
|
actions: ['update'],
|
|
139
139
|
},
|
|
140
140
|
price: {
|
|
141
|
-
actions: ['pay', 'refund', 'deposit', '
|
|
141
|
+
actions: ['pay', 'refund', 'deposit', 'withdrawTransfer', 'tax', 'moveOut', 'moveIn', 'compensate'],
|
|
142
142
|
},
|
|
143
143
|
allowDeposit: {
|
|
144
144
|
actions: ['update'],
|
|
@@ -200,7 +200,7 @@ const attrUpdateMatrix = {
|
|
|
200
200
|
actions: ['update'],
|
|
201
201
|
},
|
|
202
202
|
price: {
|
|
203
|
-
actions: ['pay', 'refund', 'deposit', '
|
|
203
|
+
actions: ['pay', 'refund', 'deposit', 'withdrawTransfer', 'tax', 'moveOut', 'moveIn', 'compensate'],
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
206
|
withdrawAccount: {
|
package/es/data/actionAuth.js
CHANGED
|
@@ -10,8 +10,13 @@ const actionAuths = [
|
|
|
10
10
|
deActions: ['select', 'create']
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
id: '
|
|
14
|
-
pathId: '
|
|
13
|
+
id: 'creator-order-pay',
|
|
14
|
+
pathId: 'creator-order-pay',
|
|
15
|
+
deActions: ['select', 'create', 'startPaying', 'startRefunding', 'close']
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'user-dep-acc-pay',
|
|
19
|
+
pathId: 'user-dep-acc-pay',
|
|
15
20
|
deActions: ['select', 'update', 'startPaying', 'startRefunding', 'close']
|
|
16
21
|
},
|
|
17
22
|
{
|
package/es/data/i18n.js
CHANGED
|
@@ -406,7 +406,47 @@ const i18ns = [
|
|
|
406
406
|
"orderPriceSum": "订单总额",
|
|
407
407
|
"orderManage": "订单管理",
|
|
408
408
|
"orderList": "订单列表",
|
|
409
|
-
"tips1": "总账户余额+退款总额+转账总额+订单总额应该等于系统账户总余额"
|
|
409
|
+
"tips1": "总账户余额+退款总额+转账总额+订单总额应该等于系统账户总余额",
|
|
410
|
+
"move": "移动资金",
|
|
411
|
+
"history": "账单"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
id: "207fd2189d3697d15672176ae88f4175",
|
|
416
|
+
namespace: "oak-pay-business-c-sysAccount-transferList",
|
|
417
|
+
language: "zh-CN",
|
|
418
|
+
module: "oak-pay-business",
|
|
419
|
+
position: "src/components/sysAccount/transferList",
|
|
420
|
+
data: {
|
|
421
|
+
"label": {
|
|
422
|
+
"channel": "转账渠道"
|
|
423
|
+
},
|
|
424
|
+
"tips": "正在转账的金额不计入任何账户,请到\"提现转账管理\"菜单完成操作"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
id: "17a11f164c9977d8eb5b59fbc78755d5",
|
|
429
|
+
namespace: "oak-pay-business-c-sysAccountMove-create",
|
|
430
|
+
language: "zh-CN",
|
|
431
|
+
module: "oak-pay-business",
|
|
432
|
+
position: "src/components/sysAccountMove/create",
|
|
433
|
+
data: {
|
|
434
|
+
"label": {
|
|
435
|
+
"from": "从账户",
|
|
436
|
+
"to": "到账户"
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
id: "f89e1a2d0e88d8e2b3f900cfe28a893e",
|
|
442
|
+
namespace: "oak-pay-business-c-sysAccountOper-list",
|
|
443
|
+
language: "zh-CN",
|
|
444
|
+
module: "oak-pay-business",
|
|
445
|
+
position: "src/components/sysAccountOper/list",
|
|
446
|
+
data: {
|
|
447
|
+
"history": "账户历史",
|
|
448
|
+
"chooseMonth": "选择月份",
|
|
449
|
+
"all": "全部"
|
|
410
450
|
}
|
|
411
451
|
},
|
|
412
452
|
{
|
|
@@ -583,7 +623,7 @@ const i18ns = [
|
|
|
583
623
|
position: "src/components/withdrawTransfer/list",
|
|
584
624
|
data: {
|
|
585
625
|
"label": {
|
|
586
|
-
"channel": "
|
|
626
|
+
"channel": "转账渠道",
|
|
587
627
|
"transferActualPrice": "实际转账金额",
|
|
588
628
|
"sysAccountAmount": "系统账户余额",
|
|
589
629
|
"cn": "创建者",
|
|
@@ -753,6 +793,11 @@ const i18ns = [
|
|
|
753
793
|
"order": {
|
|
754
794
|
"payAmountNotEnough": "支付的额度总和不足",
|
|
755
795
|
"nonePay": "没有传入支付信息"
|
|
796
|
+
},
|
|
797
|
+
"refund": {
|
|
798
|
+
"create": {
|
|
799
|
+
"hasAnotherRefunding": "您有一笔退款正在进行中"
|
|
800
|
+
}
|
|
756
801
|
}
|
|
757
802
|
}
|
|
758
803
|
},
|
|
@@ -786,7 +831,8 @@ const i18ns = [
|
|
|
786
831
|
"error": {
|
|
787
832
|
"nameQrCodeBothNull": "账号名和二维码不能同时为空",
|
|
788
833
|
"refundGapDaysNotNegative": "允许退款天数不能为负数或空",
|
|
789
|
-
"refundCompensateIllegal": "退款补偿百分比必须在0到100之间"
|
|
834
|
+
"refundCompensateIllegal": "退款补偿百分比必须在0到100之间",
|
|
835
|
+
"withdrawTransferLossRatioNotNegative": "提现转账费率必须在0到100之间"
|
|
790
836
|
}
|
|
791
837
|
}
|
|
792
838
|
},
|
package/es/data/path.js
CHANGED
|
@@ -2,7 +2,7 @@ import { String, Price } from 'oak-domain/lib/types/DataType';
|
|
|
2
2
|
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|
3
3
|
import { EntityDesc } from 'oak-domain/lib/types';
|
|
4
4
|
import { Schema as Account } from './Account';
|
|
5
|
-
type Type = 'deposit' | 'withdraw' | 'consume' | 'loan' | 'repay' | 'withdrawBack' | 'earn' | 'encash' | 'cutoffRefundable' | 'tax' | 'taxRefund' | 'refund' | 'refundFailure';
|
|
5
|
+
type Type = 'deposit' | 'withdraw' | 'consume' | 'consumeBack' | 'loan' | 'repay' | 'withdrawBack' | 'earn' | 'encash' | 'cutoffRefundable' | 'tax' | 'taxRefund' | 'refund' | 'refundFailure';
|
|
6
6
|
export interface Schema extends EntityShape {
|
|
7
7
|
account: Account;
|
|
8
8
|
type: Type;
|
|
@@ -20,9 +20,10 @@ export const entityDesc = {
|
|
|
20
20
|
deposit: '充值',
|
|
21
21
|
withdraw: '提现',
|
|
22
22
|
consume: '消费',
|
|
23
|
+
consumeBack: '消费退还',
|
|
23
24
|
loan: '抵押',
|
|
24
25
|
repay: '偿还',
|
|
25
|
-
withdrawBack: '
|
|
26
|
+
withdrawBack: '提现退还',
|
|
26
27
|
earn: '赚取',
|
|
27
28
|
encash: '兑现',
|
|
28
29
|
tax: '渠道费',
|
|
@@ -41,6 +42,7 @@ export const entityDesc = {
|
|
|
41
42
|
withdraw: '#F7DC6F',
|
|
42
43
|
withdrawBack: '#F7DC6F',
|
|
43
44
|
consume: '#A569BD',
|
|
45
|
+
consumeBack: '#009933',
|
|
44
46
|
loan: '#CD6155',
|
|
45
47
|
repay: '#82E0AA',
|
|
46
48
|
earn: '#FF3333',
|
|
@@ -19,7 +19,7 @@ export interface Schema extends AbstractAccount {
|
|
|
19
19
|
channels: WithdrawChannel[];
|
|
20
20
|
enabled: Boolean;
|
|
21
21
|
}
|
|
22
|
-
export type Action = 'pay' | 'refund' | '
|
|
22
|
+
export type Action = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut' | 'deposit' | 'tax';
|
|
23
23
|
export declare const entityDesc: EntityDesc<Schema, Action, '', {
|
|
24
24
|
type: Schema['type'];
|
|
25
25
|
}>;
|
|
@@ -34,8 +34,11 @@ export const entityDesc = {
|
|
|
34
34
|
action: {
|
|
35
35
|
pay: '支付',
|
|
36
36
|
refund: '退款',
|
|
37
|
+
withdrawTransfer: '提现转账',
|
|
38
|
+
compensate: '补偿',
|
|
39
|
+
moveIn: '转入',
|
|
40
|
+
moveOut: '转出',
|
|
37
41
|
deposit: '充值',
|
|
38
|
-
withdraw: '提现',
|
|
39
42
|
tax: '渠道费',
|
|
40
43
|
}
|
|
41
44
|
},
|
|
@@ -53,8 +56,11 @@ export const entityDesc = {
|
|
|
53
56
|
icon: {
|
|
54
57
|
pay: '',
|
|
55
58
|
refund: '',
|
|
59
|
+
withdrawTransfer: '',
|
|
60
|
+
compensate: '',
|
|
61
|
+
moveIn: '',
|
|
62
|
+
moveOut: '',
|
|
56
63
|
deposit: '',
|
|
57
|
-
withdraw: '',
|
|
58
64
|
tax: '',
|
|
59
65
|
}
|
|
60
66
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { String, Text, Price } from 'oak-domain/lib/types/DataType';
|
|
2
|
+
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|
3
|
+
import { EntityDesc } from 'oak-domain/lib/types';
|
|
4
|
+
import { Schema as User } from './User';
|
|
5
|
+
import { Schema as System } from './System';
|
|
6
|
+
export interface Schema extends EntityShape {
|
|
7
|
+
price: Price;
|
|
8
|
+
externalId: String<64>;
|
|
9
|
+
operator: User;
|
|
10
|
+
remark?: Text;
|
|
11
|
+
system: System;
|
|
12
|
+
}
|
|
13
|
+
export declare const entityDesc: EntityDesc<Schema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
;
|
|
2
|
+
export const entityDesc = {
|
|
3
|
+
locales: {
|
|
4
|
+
zh_CN: {
|
|
5
|
+
name: '系统资金移动',
|
|
6
|
+
attr: {
|
|
7
|
+
price: '金额',
|
|
8
|
+
externalId: '外部流水号',
|
|
9
|
+
operator: '操作者',
|
|
10
|
+
remark: '备注',
|
|
11
|
+
system: '所属系统'
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
configuration: {
|
|
16
|
+
actionType: 'appendOnly',
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -4,14 +4,17 @@ import { EntityDesc } from 'oak-domain/lib/types';
|
|
|
4
4
|
import { Schema as Pay } from './Pay';
|
|
5
5
|
import { Schema as Refund } from './Refund';
|
|
6
6
|
import { Schema as WithdrawTransfer } from './WithdrawTransfer';
|
|
7
|
+
import { Schema as SysAccountMove } from './SysAccountMove';
|
|
8
|
+
export type SysAccountOperType = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut';
|
|
7
9
|
export interface Schema extends EntityShape {
|
|
8
10
|
delta: Price;
|
|
9
|
-
type:
|
|
11
|
+
type: SysAccountOperType;
|
|
10
12
|
entity: String<32>;
|
|
11
13
|
entityId: String<64>;
|
|
12
14
|
pay?: Pay;
|
|
13
15
|
refund?: Refund;
|
|
14
16
|
withdrawTransfer?: WithdrawTransfer;
|
|
17
|
+
sysAccountMove?: SysAccountMove;
|
|
15
18
|
}
|
|
16
19
|
export declare const entityDesc: EntityDesc<Schema, '', '', {
|
|
17
20
|
type: Schema['type'];
|
|
@@ -17,5 +17,5 @@ export interface Schema extends AbstractAccount {
|
|
|
17
17
|
channels: WithdrawChannel[];
|
|
18
18
|
enabled: Boolean;
|
|
19
19
|
}
|
|
20
|
-
export type Action = 'pay' | 'refund' | '
|
|
20
|
+
export type Action = 'pay' | 'refund' | 'withdrawTransfer' | 'compensate' | 'moveIn' | 'moveOut' | 'deposit' | 'tax';
|
|
21
21
|
export declare const entityDesc: EntityDesc<Schema, Action>;
|
package/es/entities/WpAccount.js
CHANGED
|
@@ -23,8 +23,11 @@ export const entityDesc = {
|
|
|
23
23
|
action: {
|
|
24
24
|
pay: '支付',
|
|
25
25
|
refund: '退款',
|
|
26
|
+
withdrawTransfer: '提现转账',
|
|
27
|
+
compensate: '补偿',
|
|
28
|
+
moveIn: '转入',
|
|
29
|
+
moveOut: '转出',
|
|
26
30
|
deposit: '充值',
|
|
27
|
-
withdraw: '提现',
|
|
28
31
|
tax: '渠道费',
|
|
29
32
|
}
|
|
30
33
|
},
|
|
@@ -33,8 +36,11 @@ export const entityDesc = {
|
|
|
33
36
|
icon: {
|
|
34
37
|
pay: '',
|
|
35
38
|
refund: '',
|
|
39
|
+
withdrawTransfer: '',
|
|
40
|
+
compensate: '',
|
|
41
|
+
moveIn: '',
|
|
42
|
+
moveOut: '',
|
|
36
43
|
deposit: '',
|
|
37
|
-
withdraw: '',
|
|
38
44
|
tax: '',
|
|
39
45
|
}
|
|
40
46
|
}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"error": {
|
|
23
23
|
"nameQrCodeBothNull": "账号名和二维码不能同时为空",
|
|
24
24
|
"refundGapDaysNotNegative": "允许退款天数不能为负数或空",
|
|
25
|
-
"refundCompensateIllegal": "退款补偿百分比必须在0到100之间"
|
|
25
|
+
"refundCompensateIllegal": "退款补偿百分比必须在0到100之间",
|
|
26
|
+
"withdrawTransferLossRatioNotNegative": "提现转账费率必须在0到100之间"
|
|
26
27
|
}
|
|
27
28
|
}
|