oak-pay-business 2.1.0 → 2.2.1
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/withdraw.d.ts +4 -4
- package/es/checkers/order.js +5 -1
- package/es/components/account/detail/index.d.ts +1 -0
- package/es/components/account/detail/index.js +4 -0
- package/es/components/account/detail/index.xml +6 -1
- package/es/components/account/detail/web.d.ts +1 -0
- package/es/components/account/detail/web.js +4 -2
- package/es/components/account/detail/web.pc.d.ts +1 -0
- package/es/components/account/detail/web.pc.js +1 -1
- package/es/components/accountOper/list/index.d.ts +3 -2
- package/es/components/accountOper/list/index.js +154 -2
- package/es/components/accountOper/list/index.json +10 -1
- package/es/components/accountOper/list/index.less +125 -0
- package/es/components/accountOper/list/index.xml +56 -0
- package/es/components/accountOper/list/locales/zh-CN.json +9 -1
- package/es/components/accountOper/list/mobile.module.less +55 -0
- package/es/components/accountOper/list/web.d.ts +22 -3
- package/es/components/accountOper/list/web.js +61 -3
- package/es/components/accountOper/list/web.module.less +27 -0
- package/es/components/accountOper/list/web.pc.d.ts +23 -4
- package/es/components/accountOper/list/web.pc.js +44 -3
- package/es/components/accountOper/pure/List.pc.js +1 -1
- package/es/components/pay/detail/index.js +11 -0
- package/es/components/pay/detail/index.xml +10 -0
- package/es/components/pay/detail/locales/zh-CN.json +5 -1
- package/es/components/pay/detail/web.d.ts +3 -2
- package/es/components/pay/detail/web.js +18 -8
- package/es/components/pay/detail/web.pc.d.ts +3 -2
- package/es/components/pay/detail/web.pc.js +21 -8
- package/es/components/pay/list/web.pc.d.ts +1 -1
- package/es/components/pay/list/web.pc.js +6 -4
- package/es/components/withdraw/create/index.d.ts +1 -0
- package/es/components/withdraw/create/index.js +4 -0
- package/es/components/withdraw/create/index.xml +4 -0
- package/es/components/withdraw/create/locales/zh-CN.json +2 -1
- package/es/components/withdraw/create/web.d.ts +1 -0
- package/es/components/withdraw/create/web.js +6 -2
- package/es/components/withdraw/create/web.pc.d.ts +1 -0
- package/es/components/withdraw/create/web.pc.js +4 -1
- package/es/components/withdraw/display/web.pc.module.less +4 -2
- package/es/configuration/attrUpdateMatrix.js +6 -1
- package/es/data/actionAuth.js +1 -1
- package/es/data/i18n.js +17 -3
- package/es/entities/AccountOper.d.ts +3 -0
- package/es/entities/AccountOper.js +4 -1
- package/es/entities/Order.d.ts +2 -2
- package/es/locales/common/zh_CN.json +1 -0
- package/es/oak-app-domain/AccountOper/Schema.d.ts +18 -0
- package/es/oak-app-domain/AccountOper/Storage.js +12 -0
- package/es/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Order/Schema.d.ts +3 -3
- package/es/oak-app-domain/Order/Storage.js +1 -4
- package/es/triggers/accountOper.js +12 -9
- package/es/triggers/withdraw.d.ts +1 -1
- package/lib/aspects/withdraw.d.ts +4 -4
- package/lib/checkers/order.js +5 -1
- package/lib/components/pay/detail/index.js +11 -0
- package/lib/configuration/attrUpdateMatrix.js +6 -1
- package/lib/context/BackendRuntimeContext.d.ts +1 -1
- package/lib/data/actionAuth.js +1 -1
- package/lib/data/i18n.js +17 -3
- package/lib/entities/AccountOper.d.ts +3 -0
- package/lib/entities/AccountOper.js +4 -1
- package/lib/entities/Order.d.ts +2 -2
- package/lib/locales/common/zh_CN.json +1 -0
- package/lib/oak-app-domain/AccountOper/Schema.d.ts +18 -0
- package/lib/oak-app-domain/AccountOper/Storage.js +12 -0
- package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Order/Schema.d.ts +3 -3
- package/lib/oak-app-domain/Order/Storage.js +1 -4
- package/lib/triggers/accountOper.js +12 -9
- package/lib/triggers/withdraw.d.ts +1 -1
- package/lib/utils/application.d.ts +1 -1
- package/package.json +3 -3
- package/src/entities/AccountOper.ts +7 -1
- package/src/entities/Order.ts +1 -1
package/es/aspects/withdraw.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare function getWithdrawCreateData(params: {
|
|
|
3
3
|
accountId: string;
|
|
4
4
|
price: number;
|
|
5
5
|
withdrawAccountId?: string;
|
|
6
|
-
}, context: BRC): Promise<(Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "
|
|
6
|
+
}, context: BRC): Promise<(Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
|
|
7
7
|
id: string;
|
|
8
8
|
} & {
|
|
9
9
|
accountId: string;
|
|
@@ -17,7 +17,7 @@ export declare function getWithdrawCreateData(params: {
|
|
|
17
17
|
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
18
18
|
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
19
19
|
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
20
|
-
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "
|
|
20
|
+
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
|
|
21
21
|
id: string;
|
|
22
22
|
} & {
|
|
23
23
|
accountId: string;
|
|
@@ -31,7 +31,7 @@ export declare function getWithdrawCreateData(params: {
|
|
|
31
31
|
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
32
32
|
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
33
33
|
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
34
|
-
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "
|
|
34
|
+
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
|
|
35
35
|
id: string;
|
|
36
36
|
} & {
|
|
37
37
|
account?: undefined;
|
|
@@ -45,7 +45,7 @@ export declare function getWithdrawCreateData(params: {
|
|
|
45
45
|
modiEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/ModiEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
46
46
|
operEntity$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/OperEntity/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
47
47
|
accountOper$entity?: import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">[]> | import("oak-domain/lib/types").Operation<"create", Omit<import("../oak-app-domain/AccountOper/Schema").CreateOperationData, "entity" | "entityId">>[] | undefined;
|
|
48
|
-
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "
|
|
48
|
+
}) | (Partial<Omit<import("../oak-app-domain/Withdraw/Schema").OpSchema, "creatorId" | "accountId">> & {
|
|
49
49
|
id: string;
|
|
50
50
|
} & {
|
|
51
51
|
account?: undefined;
|
package/es/checkers/order.js
CHANGED
|
@@ -13,7 +13,11 @@ const checkers = [
|
|
|
13
13
|
data.paid = 0;
|
|
14
14
|
data.refunded = 0;
|
|
15
15
|
data.settled = false;
|
|
16
|
-
data.systemId
|
|
16
|
+
if (!data.systemId) {
|
|
17
|
+
const contextSystemId = context.getApplication()?.systemId;
|
|
18
|
+
assert(contextSystemId);
|
|
19
|
+
data.systemId = contextSystemId;
|
|
20
|
+
}
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
{
|
|
@@ -59,6 +59,7 @@ export default OakComponent({
|
|
|
59
59
|
priceColor: '#8A6321',
|
|
60
60
|
bgColor: '#EAD8BC',
|
|
61
61
|
preWithdraw: () => true,
|
|
62
|
+
onGoToHistory: () => undefined,
|
|
62
63
|
},
|
|
63
64
|
formData({ data }) {
|
|
64
65
|
const unfinishedDepositId = data?.deposit$account?.[0]?.id;
|
|
@@ -203,6 +204,9 @@ export default OakComponent({
|
|
|
203
204
|
},
|
|
204
205
|
onWithdrawClick() {
|
|
205
206
|
this.props.onWithdraw();
|
|
207
|
+
},
|
|
208
|
+
gotoHistoryMp() {
|
|
209
|
+
this.props.onGoToHistory();
|
|
206
210
|
}
|
|
207
211
|
},
|
|
208
212
|
data: {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<view class="container">
|
|
2
2
|
<view class="info" style="background-color:{{bgColor}};color:{{textColor}};">
|
|
3
|
-
<view
|
|
3
|
+
<view
|
|
4
|
+
class="top label"
|
|
5
|
+
bind:tap="gotoHistoryMp"
|
|
6
|
+
>
|
|
7
|
+
{{t('history')}}
|
|
8
|
+
</view>
|
|
4
9
|
<view class="middle">
|
|
5
10
|
<view class="box fortify">
|
|
6
11
|
<view class="label">{{t('avail')}}{{t('yuan')}}</view>
|
|
@@ -5,13 +5,15 @@ import classNames from 'classnames';
|
|
|
5
5
|
import { CentToString } from 'oak-domain/lib/utils/money';
|
|
6
6
|
import NewDeposit from '../../deposit/new';
|
|
7
7
|
export default function Render(props) {
|
|
8
|
-
const { account, depositMaxCent, newDepositPath, depositOpen, depositMinCent, ufOpen, depPrice, depositChannel, depositLoss, depositing, onWithdraw, textColor, priceColor, bgColor, } = props.data;
|
|
8
|
+
const { account, depositMaxCent, newDepositPath, depositOpen, depositMinCent, ufOpen, depPrice, depositChannel, depositLoss, depositing, onWithdraw, textColor, priceColor, bgColor, onGoToHistory } = props.data;
|
|
9
9
|
const { t, newDeposit, setMessage, setDepositOpen, setUfOpen, setDepPrice, setDepositChannel, onUnfinishedDepositClick, setDepositing, onDepositClick, onDepositModalClose, } = props.methods;
|
|
10
10
|
if (account) {
|
|
11
11
|
const { total, avail, '#oakLegalActions': legalActions, accountOper$account: opers } = account;
|
|
12
12
|
return (<div className={Styles.container}>
|
|
13
13
|
<div className={Styles.info} style={{ backgroundColor: bgColor, color: textColor }}>
|
|
14
|
-
<div className={classNames(Styles.top, Styles.label)}
|
|
14
|
+
<div className={classNames(Styles.top, Styles.label)} onClick={onGoToHistory}>
|
|
15
|
+
{t('history')}
|
|
16
|
+
</div>
|
|
15
17
|
<div className={Styles.middle}>
|
|
16
18
|
<div className={classNames(Styles.box, Styles.fortify)}>
|
|
17
19
|
<div className={Styles.label}>{t('avail')}{t('yuan')}</div>
|
|
@@ -16,6 +16,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'account', f
|
|
|
16
16
|
depositMeta: any;
|
|
17
17
|
depositing: boolean;
|
|
18
18
|
newDepositPath: string;
|
|
19
|
+
onGoToHistory: () => void;
|
|
19
20
|
}, {
|
|
20
21
|
newDeposit: () => Promise<string>;
|
|
21
22
|
setDepositOpen: (v: boolean) => void;
|
|
@@ -7,7 +7,7 @@ import NewDeposit from '../../deposit/new';
|
|
|
7
7
|
import AccountOperList from '../../accountOper/pure/List.pc';
|
|
8
8
|
import { AccountBookOutlined, ScheduleOutlined } from '@ant-design/icons';
|
|
9
9
|
export default function Render(props) {
|
|
10
|
-
const { account, depositMaxCent, newDepositPath, depositOpen, depositMinCent, ufOpen, depPrice, depositChannel, depositLoss, depositing, onWithdraw, } = props.data;
|
|
10
|
+
const { account, depositMaxCent, newDepositPath, depositOpen, depositMinCent, ufOpen, depPrice, depositChannel, depositLoss, depositing, onWithdraw, onGoToHistory, } = props.data;
|
|
11
11
|
const { t, newDeposit, setMessage, setDepositOpen, setUfOpen, setDepPrice, setDepositChannel, onUnfinishedDepositClick, setDepositing, onDepositClick, onDepositModalClose, } = props.methods;
|
|
12
12
|
if (account) {
|
|
13
13
|
const { total, avail, '#oakLegalActions': legalActions, accountOper$account: opers } = account;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "accountOper", true, {
|
|
2
|
+
accountId: string;
|
|
3
|
+
}>) => React.ReactElement;
|
|
3
4
|
export default _default;
|
|
@@ -1,16 +1,168 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { ToYuan, ThousandCont } from "oak-domain/lib/utils/money";
|
|
1
3
|
export default OakComponent({
|
|
2
4
|
entity: 'accountOper',
|
|
3
5
|
isList: true,
|
|
4
6
|
projection: {
|
|
5
7
|
id: 1,
|
|
6
8
|
type: 1,
|
|
7
|
-
|
|
9
|
+
avail: 1,
|
|
8
10
|
availPlus: 1,
|
|
9
11
|
$$createAt$$: 1,
|
|
10
12
|
},
|
|
13
|
+
properties: {
|
|
14
|
+
accountId: '',
|
|
15
|
+
},
|
|
16
|
+
data: {
|
|
17
|
+
month: new Date(),
|
|
18
|
+
monthStr: '',
|
|
19
|
+
type: 'both',
|
|
20
|
+
chooseMonth: false,
|
|
21
|
+
chooseType: false,
|
|
22
|
+
pickerStart: dayjs().subtract(10, 'y').startOf('m').format('YYYY-MM-DD'),
|
|
23
|
+
pickerEnd: dayjs().startOf('m').format('YYYY-MM-DD'),
|
|
24
|
+
},
|
|
25
|
+
filters: [
|
|
26
|
+
{
|
|
27
|
+
filter() {
|
|
28
|
+
const { accountId } = this.props;
|
|
29
|
+
return {
|
|
30
|
+
accountId,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
],
|
|
11
35
|
formData({ data }) {
|
|
36
|
+
const pagi = this.getPagination();
|
|
37
|
+
const hasMore = !!pagi?.more;
|
|
12
38
|
return {
|
|
13
|
-
|
|
39
|
+
hasMore,
|
|
40
|
+
accountOpers: data.map((oper) => {
|
|
41
|
+
const { $$createAt$$, type, availPlus, avail } = oper;
|
|
42
|
+
const num = Math.abs(availPlus);
|
|
43
|
+
const plus = ThousandCont(ToYuan(num), 2);
|
|
44
|
+
const sign = availPlus > 0 ? '+' : '-';
|
|
45
|
+
const time = dayjs($$createAt$$).format('YYYY-MM-DD HH:mm');
|
|
46
|
+
const symbol = this.t(`accountOper:v.type.${type}`)[0];
|
|
47
|
+
const bgColor = this.features.style.getColor('accountOper', 'type', type);
|
|
48
|
+
return {
|
|
49
|
+
value: `${sign}${plus}`,
|
|
50
|
+
time,
|
|
51
|
+
type: this.t(`accountOper:v.type.${type}`),
|
|
52
|
+
symbol,
|
|
53
|
+
avail: ThousandCont(ToYuan(avail), 2),
|
|
54
|
+
bgColor,
|
|
55
|
+
};
|
|
56
|
+
}),
|
|
14
57
|
};
|
|
58
|
+
},
|
|
59
|
+
lifetimes: {
|
|
60
|
+
ready() {
|
|
61
|
+
this.setTypeFilter();
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
loadMoreMp() {
|
|
66
|
+
return this.loadMore();
|
|
67
|
+
},
|
|
68
|
+
setType(type) {
|
|
69
|
+
this.setState({
|
|
70
|
+
type,
|
|
71
|
+
}, () => this.setTypeFilter());
|
|
72
|
+
},
|
|
73
|
+
setTypeFilter() {
|
|
74
|
+
const { type } = this.state;
|
|
75
|
+
switch (type) {
|
|
76
|
+
case 'in': {
|
|
77
|
+
this.addNamedFilter({
|
|
78
|
+
'#name': 'type',
|
|
79
|
+
filter: {
|
|
80
|
+
availPlus: {
|
|
81
|
+
$gt: 0,
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
}, true);
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case 'out': {
|
|
88
|
+
this.addNamedFilter({
|
|
89
|
+
'#name': 'type',
|
|
90
|
+
filter: {
|
|
91
|
+
availPlus: {
|
|
92
|
+
$lt: 0,
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
}, true);
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
case 'both':
|
|
99
|
+
default: {
|
|
100
|
+
this.addNamedFilter({
|
|
101
|
+
'#name': 'type',
|
|
102
|
+
filter: {
|
|
103
|
+
availPlus: {
|
|
104
|
+
$ne: 0,
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
}, true);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
setMonth(month) {
|
|
113
|
+
if (month) {
|
|
114
|
+
const m = dayjs(month);
|
|
115
|
+
const begin = m.startOf('month').valueOf();
|
|
116
|
+
const end = m.endOf('month').valueOf();
|
|
117
|
+
this.setState({
|
|
118
|
+
monthStr: m.format('YYYY-MM'),
|
|
119
|
+
month,
|
|
120
|
+
}, () => this.addNamedFilter({
|
|
121
|
+
'#name': 'month',
|
|
122
|
+
filter: {
|
|
123
|
+
$$createAt$$: {
|
|
124
|
+
$between: [begin, end],
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}, true));
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
this.setState({
|
|
131
|
+
monthStr: '',
|
|
132
|
+
month: undefined,
|
|
133
|
+
}, () => this.removeNamedFilter({
|
|
134
|
+
'#name': 'month',
|
|
135
|
+
filter: {}
|
|
136
|
+
}, true));
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
setChooseMonth(chooseMonth) {
|
|
140
|
+
this.setState({ chooseMonth });
|
|
141
|
+
},
|
|
142
|
+
setChooseType(chooseType) {
|
|
143
|
+
this.setState({ chooseType });
|
|
144
|
+
},
|
|
145
|
+
setMonthMp(e) {
|
|
146
|
+
const { value } = e.detail;
|
|
147
|
+
const month = dayjs(value).valueOf();
|
|
148
|
+
this.setMonth(month);
|
|
149
|
+
},
|
|
150
|
+
openChooseTypeMp() {
|
|
151
|
+
this.setState({
|
|
152
|
+
chooseType: true,
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
closeChooseTypeMp() {
|
|
156
|
+
this.setState({
|
|
157
|
+
chooseType: false,
|
|
158
|
+
});
|
|
159
|
+
},
|
|
160
|
+
setTypeMp({ detail }) {
|
|
161
|
+
const { key, } = detail;
|
|
162
|
+
this.setState({
|
|
163
|
+
type: key,
|
|
164
|
+
}, () => this.setTypeFilter());
|
|
165
|
+
this.closeChooseTypeMp();
|
|
166
|
+
}
|
|
15
167
|
}
|
|
16
168
|
});
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"usingComponents": {
|
|
3
|
+
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
|
|
4
|
+
"l-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/popup/index",
|
|
5
|
+
"l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index",
|
|
6
|
+
"l-radio-group": "@oak-frontend-base/miniprogram_npm/lin-ui/radio-group/index",
|
|
7
|
+
"l-radio": "@oak-frontend-base/miniprogram_npm/lin-ui/radio/index",
|
|
8
|
+
"oak-icon": "@oak-frontend-base/components/icon/index"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
@import '../../../config/styles/mp/index.less';
|
|
2
|
+
@import '../../../config/styles/mp/mixins.less';
|
|
3
|
+
|
|
4
|
+
.myScroll {
|
|
5
|
+
height: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.header {
|
|
11
|
+
position: sticky;
|
|
12
|
+
top: 0rpx;
|
|
13
|
+
left: 0rpx;
|
|
14
|
+
width: 100%;
|
|
15
|
+
z-index: 10;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
padding: 24rpx;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
background-color: @oak-bg-color-page;
|
|
22
|
+
color: @oak-text-color-primary;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.headerItem {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
font-size: 28rpx;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.list {
|
|
33
|
+
flex: 1;
|
|
34
|
+
background-color: #fff;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.my-list-class {
|
|
38
|
+
border-bottom: 2rpx solid @oak-border-color;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.left {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: flex-start;
|
|
45
|
+
padding: 24rpx 0rpx;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.right {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
align-items: flex-end;
|
|
52
|
+
gap: 16rpx;
|
|
53
|
+
padding: 24rpx 0rpx;
|
|
54
|
+
margin-left: 12rpx;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.avatar {
|
|
58
|
+
font-size: 40rpx;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
width: 96rpx;
|
|
61
|
+
height: 96rpx;
|
|
62
|
+
border-radius: 48rpx;
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
color: @oak-text-color-primary;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.middle {
|
|
70
|
+
margin-left: 20rpx;
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
align-items: flex-start;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
gap: 16rpx;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.type {
|
|
79
|
+
font-weight: bold;
|
|
80
|
+
font-size: 32rpx;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sub {
|
|
84
|
+
color: #888;
|
|
85
|
+
font-size: 26rpx;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.empty {
|
|
89
|
+
height: calc(100% - 90rpx);
|
|
90
|
+
background-color: #fff;
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.content {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
gap: 24rpx;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.icon {
|
|
105
|
+
color: @oak-color-primary;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.btn {
|
|
109
|
+
color: #333;
|
|
110
|
+
border: 2rpx solid #eee;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.container {
|
|
114
|
+
background-color: #fff;
|
|
115
|
+
height: 15vh;
|
|
116
|
+
padding: 32rpx;
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.radio-group-class {
|
|
121
|
+
width: 100%;
|
|
122
|
+
display: grid;
|
|
123
|
+
grid-column: 3;
|
|
124
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
125
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<scroll-view scroll-y bindscrolltolower="loadMoreMp" class="myScroll" refresher-enabled="{{true}}"
|
|
2
|
+
bindrefresherrefresh="bindrefresherrefresh" refresher-triggered="{{refreshing}}">
|
|
3
|
+
<view class="header">
|
|
4
|
+
<picker mode="date" fields="month" value="{{monthStr}}" start="{{pickerStart}}" end="{{pickerEnd}}" bindchange="setMonthMp">
|
|
5
|
+
<view class="headerItem">
|
|
6
|
+
<span>{{monthStr || t('chooseMonth')}}</span>
|
|
7
|
+
<oak-icon name="unfold" size="20" color="#000"/>
|
|
8
|
+
</view>
|
|
9
|
+
</picker>
|
|
10
|
+
<view class="headerItem" bindtap="openChooseTypeMp">
|
|
11
|
+
<oak-icon name="search" size="20" color="#000" />
|
|
12
|
+
<span>{{t('type.'+type)}}</span>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
<view wx:if="{{accountOpers && accountOpers.length>0}}" class="list">
|
|
16
|
+
<l-list wx:for="{{accountOpers}}" wx:key="id" gap="24" is-link="{{false}}" l-class="my-list-class">
|
|
17
|
+
<view slot="left-section" class="left">
|
|
18
|
+
<view class="avatar" style="background-color:{{item.bgColor}}">{{item.symbol}}</view>
|
|
19
|
+
<view class="middle">
|
|
20
|
+
<view class="type">{{item.type}}</view>
|
|
21
|
+
<view class="sub">{{item.time}}</view>
|
|
22
|
+
</view>
|
|
23
|
+
</view>
|
|
24
|
+
<view slot="right-section" class="right">
|
|
25
|
+
<view style="color:{{item.bgColor}}">{{item.value}}</view>
|
|
26
|
+
<view class="sub">{{t('account:attr.avail')}}:{{item.avail}}</view>
|
|
27
|
+
</view>
|
|
28
|
+
</l-list>
|
|
29
|
+
</view>
|
|
30
|
+
<view wx:else class="empty">
|
|
31
|
+
<view class="content">
|
|
32
|
+
<oak-icon name="refresh" size="48" class="icon"/>
|
|
33
|
+
<view>{{t('common::noData')}}</view>
|
|
34
|
+
<l-button
|
|
35
|
+
plain="true"
|
|
36
|
+
bind:lintap="navigateBack"
|
|
37
|
+
l-class="btn"
|
|
38
|
+
size="long"
|
|
39
|
+
width="160"
|
|
40
|
+
height="80"
|
|
41
|
+
>
|
|
42
|
+
{{t('common::back')}}
|
|
43
|
+
</l-button>
|
|
44
|
+
</view>
|
|
45
|
+
</view>
|
|
46
|
+
</scroll-view>
|
|
47
|
+
<l-popup show="{{chooseType}}" content-align="bottom" bind:lintap="closeChooseTypeMp" >
|
|
48
|
+
<view class="container">
|
|
49
|
+
<l-radio-group current="{{type}}" bind:linchange="setTypeMp" none-checked="{{false}}" placement="row" l-class="radio-group-class">
|
|
50
|
+
<l-radio key="both">{{t('type.both')}}</l-radio>
|
|
51
|
+
<l-radio key="in">{{t('type.in')}}</l-radio>
|
|
52
|
+
<l-radio key="out">{{t('type.out')}}</l-radio>
|
|
53
|
+
</l-radio-group>
|
|
54
|
+
</view>
|
|
55
|
+
</view>
|
|
56
|
+
</l-popup>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
min-height: 100%;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: stretch;
|
|
7
|
+
|
|
8
|
+
.control {
|
|
9
|
+
padding: 4px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.item {
|
|
13
|
+
padding-bottom: 10px;
|
|
14
|
+
|
|
15
|
+
.symbol {
|
|
16
|
+
width: 50px;
|
|
17
|
+
height: 50px;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
border-radius: 25px;
|
|
22
|
+
margin: 10px;
|
|
23
|
+
font-size: large;
|
|
24
|
+
font-weight: bold;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.main {
|
|
28
|
+
margin-top: 5px;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sub {
|
|
33
|
+
width: 100%;
|
|
34
|
+
|
|
35
|
+
.type {
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.types {
|
|
44
|
+
padding: 20px;
|
|
45
|
+
width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.empty {
|
|
49
|
+
display: flex;
|
|
50
|
+
width: 100%;
|
|
51
|
+
flex: 1;
|
|
52
|
+
background-color: white;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WebComponentProps } from 'oak-frontend-base';
|
|
2
3
|
import { EntityDict } from '../../../oak-app-domain';
|
|
3
4
|
export default function Render(props: WebComponentProps<EntityDict, 'accountOper', false, {
|
|
4
|
-
accountOpers
|
|
5
|
-
|
|
5
|
+
accountOpers?: Array<{
|
|
6
|
+
value: string;
|
|
7
|
+
time: string;
|
|
8
|
+
type: string;
|
|
9
|
+
symbol: string;
|
|
10
|
+
avail: string;
|
|
11
|
+
bgColor: string;
|
|
12
|
+
}>;
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
month?: Date;
|
|
15
|
+
monthStr: string;
|
|
16
|
+
type: 'in' | 'out' | 'both';
|
|
17
|
+
chooseMonth: boolean;
|
|
18
|
+
chooseType: boolean;
|
|
19
|
+
}, {
|
|
20
|
+
setMonth: (month?: number | Date) => void;
|
|
21
|
+
setType: (type: 'in' | 'out' | 'both') => void;
|
|
22
|
+
setChooseMonth: (cm: boolean) => void;
|
|
23
|
+
setChooseType: (ct: boolean) => void;
|
|
24
|
+
}>): React.JSX.Element;
|