oak-pay-business 3.0.3 → 3.1.0
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/components/AbstractComponents.d.ts +11 -62
- package/es/components/account/detail/index.js +58 -76
- package/es/components/account/detail/index.xml +1 -1
- package/es/components/accountOper/pure/List.pc.d.ts +0 -1
- package/es/components/aliPay/upsert/index.d.ts +5 -0
- package/es/components/aliPay/upsert/index.js +44 -0
- package/es/components/aliPay/upsert/index.json +1 -0
- package/es/components/aliPay/upsert/locales/zh-CN.json +7 -0
- package/es/components/aliPay/upsert/web.pc.d.ts +7 -0
- package/es/components/aliPay/upsert/web.pc.js +29 -0
- package/es/components/aliPay/upsert/web.pc.module.less +3 -0
- package/es/components/apAccount/config/index.d.ts +4 -0
- package/es/components/apAccount/config/index.js +60 -0
- package/es/components/apAccount/config/index.json +1 -0
- package/es/components/apAccount/config/locales/zh-CN.json +7 -0
- package/es/components/apAccount/config/web.pc.d.ts +17 -0
- package/es/components/apAccount/config/web.pc.js +118 -0
- package/es/components/apAccount/config/web.pc.module.less +55 -0
- package/es/components/apAccount/upsert/index.d.ts +4 -0
- package/es/components/apAccount/upsert/index.js +93 -0
- package/es/components/apAccount/upsert/index.json +1 -0
- package/es/components/apAccount/upsert/locales/zh-CN.json +25 -0
- package/es/components/apAccount/upsert/web.pc.d.ts +8 -0
- package/es/components/apAccount/upsert/web.pc.js +139 -0
- package/es/components/apAccount/upsert/web.pc.module.less +4 -0
- package/es/components/apProduct/config/index.d.ts +5 -0
- package/es/components/apProduct/config/index.js +60 -0
- package/es/components/apProduct/config/index.json +1 -0
- package/es/components/apProduct/config/locales/zh-CN.json +7 -0
- package/es/components/apProduct/config/web.pc.d.ts +11 -0
- package/es/components/apProduct/config/web.pc.js +98 -0
- package/es/components/apProduct/config/web.pc.module.less +62 -0
- package/es/components/apProduct/upsert/index.d.ts +5 -0
- package/es/components/apProduct/upsert/index.js +67 -0
- package/es/components/apProduct/upsert/index.json +1 -0
- package/es/components/apProduct/upsert/locales/zh-CN.json +34 -0
- package/es/components/apProduct/upsert/web.pc.d.ts +8 -0
- package/es/components/apProduct/upsert/web.pc.js +107 -0
- package/es/components/offlineAccount/upsert/index.d.ts +0 -1
- package/es/components/order/list/index.d.ts +0 -1
- package/es/components/order/pay/index.d.ts +1 -1
- package/es/components/order/pay/info.d.ts +0 -1
- package/es/components/pay/channelPicker2/web.d.ts +0 -1
- package/es/components/pay/channelPicker2/web.pc.d.ts +0 -1
- package/es/components/pay/detail/index.js +55 -65
- package/es/components/pay/detail/index.less +5 -3
- package/es/components/pay/detail/index.xml +8 -7
- package/es/components/pay/detail/locales/zh-CN.json +9 -1
- package/es/components/pay/list/index.d.ts +0 -1
- package/es/components/payConfig/system/index.d.ts +0 -1
- package/es/components/refund/list/index.d.ts +0 -1
- package/es/components/ship/system/index.d.ts +0 -1
- package/es/components/ship/wechatMpShip/upsert/index.d.ts +0 -1
- package/es/components/sysAccount/transferList/index.d.ts +0 -1
- package/es/components/withdraw/detail/index.d.ts +0 -1
- package/es/components/withdraw/display/web.d.ts +0 -1
- package/es/components/withdraw/display/web.pc.d.ts +0 -1
- package/es/components/withdrawTransfer/list/index.d.ts +0 -1
- package/es/components/wpAccount/config/index.js +11 -1
- package/es/components/wpAccount/upsert/index.js +1 -0
- package/es/components/wpProduct/config/index.js +4 -0
- package/es/data/i18n.js +124 -1
- package/es/entities/AliPay.d.ts +10 -0
- package/es/entities/AliPay.js +13 -0
- package/es/entities/ApAccount.d.ts +35 -0
- package/es/entities/ApAccount.js +89 -0
- package/es/entities/ApProduct.d.ts +19 -0
- package/es/entities/ApProduct.js +44 -0
- package/es/oak-app-domain/ActionDefDict.d.ts +1 -0
- package/es/oak-app-domain/ActionDefDict.js +2 -0
- package/es/oak-app-domain/AliPay/Schema.d.ts +19 -0
- package/es/oak-app-domain/AliPay/Schema.js +1 -0
- package/es/oak-app-domain/AliPay/Storage.d.ts +3 -0
- package/es/oak-app-domain/AliPay/Storage.js +25 -0
- package/es/oak-app-domain/AliPay/_baseSchema.d.ts +45 -0
- package/es/oak-app-domain/AliPay/_baseSchema.js +1 -0
- package/es/oak-app-domain/AliPay/locales/zh_CN.json +8 -0
- package/es/oak-app-domain/ApAccount/Action.d.ts +5 -0
- package/es/oak-app-domain/ApAccount/Action.js +2 -0
- package/es/oak-app-domain/ApAccount/Schema.d.ts +19 -0
- package/es/oak-app-domain/ApAccount/Schema.js +1 -0
- package/es/oak-app-domain/ApAccount/Storage.d.ts +3 -0
- package/es/oak-app-domain/ApAccount/Storage.js +132 -0
- package/es/oak-app-domain/ApAccount/Style.d.ts +3 -0
- package/es/oak-app-domain/ApAccount/Style.js +26 -0
- package/es/oak-app-domain/ApAccount/_baseSchema.d.ts +141 -0
- package/es/oak-app-domain/ApAccount/_baseSchema.js +1 -0
- package/es/oak-app-domain/ApAccount/locales/zh_CN.json +58 -0
- package/es/oak-app-domain/ApProduct/Schema.d.ts +19 -0
- package/es/oak-app-domain/ApProduct/Schema.js +1 -0
- package/es/oak-app-domain/ApProduct/Storage.d.ts +3 -0
- package/es/oak-app-domain/ApProduct/Storage.js +53 -0
- package/es/oak-app-domain/ApProduct/Style.d.ts +3 -0
- package/es/oak-app-domain/ApProduct/Style.js +13 -0
- package/es/oak-app-domain/ApProduct/_baseSchema.d.ts +75 -0
- package/es/oak-app-domain/ApProduct/_baseSchema.js +1 -0
- package/es/oak-app-domain/ApProduct/locales/zh_CN.json +26 -0
- package/es/oak-app-domain/EntityDict.d.ts +235 -0
- package/es/oak-app-domain/Pay/Storage.js +1 -1
- package/es/oak-app-domain/Pay/_baseSchema.d.ts +2 -2
- package/es/oak-app-domain/Storage.js +6 -0
- package/es/oak-app-domain/StyleDict.js +4 -0
- package/es/oak-app-domain/SysAccountOper/Storage.js +1 -1
- package/es/oak-app-domain/SysAccountOper/_baseSchema.d.ts +2 -2
- package/es/oak-app-domain/WithdrawChannel/Storage.js +1 -1
- package/es/oak-app-domain/WithdrawChannel/_baseSchema.d.ts +2 -2
- package/es/timers/index.d.ts +1 -1
- package/es/triggers/order.js +2 -2
- package/es/triggers/withdraw.d.ts +1 -1
- package/es/utils/apProduct.d.ts +2 -0
- package/es/utils/apProduct.js +25 -0
- package/es/utils/pay.d.ts +0 -1
- package/es/utils/pay.js +5 -0
- package/es/utils/payClazz/AliPay/AliPay.d.ts +50 -0
- package/es/utils/payClazz/AliPay/AliPay.debug.d.ts +39 -0
- package/es/utils/payClazz/AliPay/AliPay.debug.js +157 -0
- package/es/utils/payClazz/AliPay/AliPay.js +368 -0
- package/es/utils/payClazz/AliPay/index.d.ts +3 -0
- package/es/utils/payClazz/AliPay/index.js +3 -0
- package/es/utils/payClazz/WechatPay/WechatPay.js +2 -2
- package/es/utils/ship.js +23 -28
- package/lib/aspects/ship.js +2 -3
- package/lib/aspects/withdraw.js +1 -2
- package/lib/checkers/abstractChecker.js +2 -2
- package/lib/data/i18n.js +124 -1
- package/lib/entities/AliPay.d.ts +10 -0
- package/lib/entities/AliPay.js +16 -0
- package/lib/entities/ApAccount.d.ts +35 -0
- package/lib/entities/ApAccount.js +92 -0
- package/lib/entities/ApProduct.d.ts +19 -0
- package/lib/entities/ApProduct.js +47 -0
- package/lib/features/index.js +2 -3
- package/lib/hooks/useFeatures.js +1 -1
- package/lib/oak-app-domain/ActionDefDict.d.ts +1 -0
- package/lib/oak-app-domain/ActionDefDict.js +28 -26
- package/lib/oak-app-domain/AliPay/Schema.d.ts +19 -0
- package/lib/oak-app-domain/AliPay/Schema.js +4 -0
- package/lib/oak-app-domain/AliPay/Storage.d.ts +3 -0
- package/lib/oak-app-domain/AliPay/Storage.js +28 -0
- package/lib/oak-app-domain/AliPay/_baseSchema.d.ts +45 -0
- package/lib/oak-app-domain/AliPay/_baseSchema.js +2 -0
- package/lib/oak-app-domain/AliPay/locales/zh_CN.json +8 -0
- package/lib/oak-app-domain/ApAccount/Action.d.ts +5 -0
- package/lib/oak-app-domain/ApAccount/Action.js +5 -0
- package/lib/oak-app-domain/ApAccount/Schema.d.ts +19 -0
- package/lib/oak-app-domain/ApAccount/Schema.js +4 -0
- package/lib/oak-app-domain/ApAccount/Storage.d.ts +3 -0
- package/lib/oak-app-domain/ApAccount/Storage.js +135 -0
- package/lib/oak-app-domain/ApAccount/Style.d.ts +3 -0
- package/lib/oak-app-domain/ApAccount/Style.js +29 -0
- package/lib/oak-app-domain/ApAccount/_baseSchema.d.ts +141 -0
- package/lib/oak-app-domain/ApAccount/_baseSchema.js +2 -0
- package/lib/oak-app-domain/ApAccount/locales/zh_CN.json +58 -0
- package/lib/oak-app-domain/ApProduct/Schema.d.ts +19 -0
- package/lib/oak-app-domain/ApProduct/Schema.js +4 -0
- package/lib/oak-app-domain/ApProduct/Storage.d.ts +3 -0
- package/lib/oak-app-domain/ApProduct/Storage.js +56 -0
- package/lib/oak-app-domain/ApProduct/Style.d.ts +3 -0
- package/lib/oak-app-domain/ApProduct/Style.js +16 -0
- package/lib/oak-app-domain/ApProduct/_baseSchema.d.ts +75 -0
- package/lib/oak-app-domain/ApProduct/_baseSchema.js +2 -0
- package/lib/oak-app-domain/ApProduct/locales/zh_CN.json +26 -0
- package/lib/oak-app-domain/EntityDict.d.ts +235 -0
- package/lib/oak-app-domain/Pay/Storage.js +1 -1
- package/lib/oak-app-domain/Pay/_baseSchema.d.ts +2 -2
- package/lib/oak-app-domain/Storage.js +48 -42
- package/lib/oak-app-domain/StyleDict.js +34 -30
- package/lib/oak-app-domain/SysAccountOper/Storage.js +1 -1
- package/lib/oak-app-domain/SysAccountOper/_baseSchema.d.ts +2 -2
- package/lib/oak-app-domain/WithdrawChannel/Storage.js +1 -1
- package/lib/oak-app-domain/WithdrawChannel/_baseSchema.d.ts +2 -2
- package/lib/timers/index.d.ts +1 -1
- package/lib/triggers/order.js +2 -2
- package/lib/triggers/withdraw.js +1 -2
- package/lib/types/DependentExceptions.js +1 -1
- package/lib/utils/apProduct.d.ts +2 -0
- package/lib/utils/apProduct.js +28 -0
- package/lib/utils/application.js +2 -2
- package/lib/utils/pay.d.ts +0 -1
- package/lib/utils/pay.js +9 -4
- package/lib/utils/payClazz/AliPay/AliPay.d.ts +50 -0
- package/lib/utils/payClazz/AliPay/AliPay.debug.d.ts +39 -0
- package/lib/utils/payClazz/AliPay/AliPay.debug.js +162 -0
- package/lib/utils/payClazz/AliPay/AliPay.js +372 -0
- package/lib/utils/payClazz/AliPay/index.d.ts +3 -0
- package/lib/utils/payClazz/AliPay/index.js +6 -0
- package/lib/utils/payClazz/WechatPay/WechatPay.js +2 -2
- package/lib/utils/payClazz/index.js +3 -4
- package/lib/utils/ship.js +30 -35
- package/lib/utils/shipClazz/index.js +3 -4
- package/lib/utils/wpProduct.js +1 -2
- package/lib/utils/wpProductFrontend.js +2 -3
- package/package.json +6 -5
- package/src/entities/AliPay.ts +31 -0
- package/src/entities/ApAccount.ts +134 -0
- package/src/entities/ApProduct.ts +75 -0
|
@@ -4,66 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { EntityDict } from '../oak-app-domain';
|
|
7
|
-
import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
data: RowWithActions<EntityDict, T>[];
|
|
19
|
-
loading: boolean;
|
|
20
|
-
tablePagination?: React.ReactNode;
|
|
21
|
-
rowSelection?: any;
|
|
22
|
-
hideHeader?: boolean | undefined;
|
|
23
|
-
disableSerialNumber?: boolean | undefined;
|
|
24
|
-
size?: "small" | "middle" | "large" | undefined;
|
|
25
|
-
scroll?: any;
|
|
26
|
-
empty?: React.ReactNode;
|
|
27
|
-
opWidth?: number | undefined;
|
|
28
|
-
ellipsis?: boolean | undefined;
|
|
29
|
-
}>) => React.ReactElement;
|
|
30
|
-
declare const ListPro: <T extends keyof EntityDict>(props: {
|
|
31
|
-
title?: any;
|
|
32
|
-
extraContent?: any;
|
|
33
|
-
hideDefaultButtons?: boolean | undefined;
|
|
34
|
-
buttonGroup?: ListButtonProps[] | undefined;
|
|
35
|
-
onReload?: (() => void) | undefined;
|
|
36
|
-
entity: T;
|
|
37
|
-
extraActions?: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]) | undefined;
|
|
38
|
-
onAction?: onActionFnDef | undefined;
|
|
39
|
-
disabledOp?: boolean | undefined;
|
|
40
|
-
attributes: OakAbsAttrDef[];
|
|
41
|
-
data: RowWithActions<EntityDict, T>[];
|
|
42
|
-
loading?: boolean | undefined;
|
|
43
|
-
tablePagination?: any;
|
|
44
|
-
rowSelection?: any;
|
|
45
|
-
disableSerialNumber?: boolean | undefined;
|
|
46
|
-
size?: "small" | "middle" | "large" | undefined;
|
|
47
|
-
scroll?: any;
|
|
48
|
-
empty?: any;
|
|
49
|
-
opWidth?: number | undefined;
|
|
50
|
-
oakPath?: string | undefined;
|
|
51
|
-
}) => React.ReactElement;
|
|
52
|
-
declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
|
53
|
-
column?: number | Record<Breakpoint, number> | undefined;
|
|
54
|
-
entity: T;
|
|
55
|
-
attributes: OakAbsAttrDef[];
|
|
56
|
-
data: Partial<EntityDict[T]["Schema"]>;
|
|
57
|
-
title?: string | undefined;
|
|
58
|
-
bordered?: boolean | undefined;
|
|
59
|
-
layout?: "horizontal" | "vertical" | undefined;
|
|
60
|
-
}>) => React.ReactElement;
|
|
61
|
-
declare const Upsert: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
|
62
|
-
helps: Record<string, string>;
|
|
63
|
-
entity: T;
|
|
64
|
-
attributes: OakAbsAttrUpsertDef<EntityDict, T, string | number>[];
|
|
65
|
-
data: EntityDict[T]["Schema"];
|
|
66
|
-
layout: "horizontal" | "vertical";
|
|
67
|
-
mode: "default" | "card";
|
|
68
|
-
}>) => React.ReactElement;
|
|
7
|
+
import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef } from 'oak-frontend-base';
|
|
8
|
+
import AbsFilterPanel from 'oak-frontend-base/es/components/filterPanel';
|
|
9
|
+
import AbsList from 'oak-frontend-base/es/components/list';
|
|
10
|
+
import AbsListPro from 'oak-frontend-base/es/components/listPro';
|
|
11
|
+
import AbsDetail from 'oak-frontend-base/es/components/detail';
|
|
12
|
+
import AbsUpsert from 'oak-frontend-base/es/components/upsert';
|
|
13
|
+
declare const FilterPanel: <T extends keyof EntityDict>(...props: Parameters<typeof AbsFilterPanel<EntityDict, T>>) => React.ReactElement;
|
|
14
|
+
declare const List: <T extends keyof EntityDict>(...props: Parameters<typeof AbsList<EntityDict, T>>) => React.ReactElement;
|
|
15
|
+
declare const ListPro: <T extends keyof EntityDict>(...props: Parameters<typeof AbsListPro<EntityDict, T>>) => React.ReactElement;
|
|
16
|
+
declare const Detail: <T extends keyof EntityDict>(...props: Parameters<typeof AbsDetail<EntityDict, T>>) => React.ReactElement;
|
|
17
|
+
declare const Upsert: <T extends keyof EntityDict>(...props: Parameters<typeof AbsUpsert<EntityDict, T>>) => React.ReactElement;
|
|
69
18
|
export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };
|
|
@@ -319,10 +319,10 @@ export default OakComponent({
|
|
|
319
319
|
});
|
|
320
320
|
const ship = deposit?.ship;
|
|
321
321
|
if (ship && ship.id) {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
if (
|
|
322
|
+
const transactionId = deposit?.pay$deposit?.[0]?.meta?.transaction_id;
|
|
323
|
+
console.log('transaction_id', transactionId);
|
|
324
|
+
if (process.env.NODE_ENV === 'development') {
|
|
325
|
+
if (ship.iState === 'receiving') {
|
|
326
326
|
await this.features.cache.operate('ship', [{
|
|
327
327
|
id: await generateNewIdAsync(),
|
|
328
328
|
action: 'succeedReceiving',
|
|
@@ -331,92 +331,74 @@ export default OakComponent({
|
|
|
331
331
|
id: ship.id,
|
|
332
332
|
},
|
|
333
333
|
}]);
|
|
334
|
-
await this.features.cache.refresh('deposit', {
|
|
335
|
-
data: {
|
|
336
|
-
id: 1,
|
|
337
|
-
iState: 1,
|
|
338
|
-
},
|
|
339
|
-
filter: {
|
|
340
|
-
id: unreceivedDepositId,
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
334
|
this.setMessage({
|
|
344
335
|
type: 'success',
|
|
345
336
|
content: this.t('ship.success')
|
|
346
337
|
});
|
|
347
338
|
return;
|
|
348
339
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
type: 'success',
|
|
372
|
-
content: this.t('ship.success')
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
else {
|
|
376
|
-
console.log(mpShipState);
|
|
377
|
-
this.reRender();
|
|
378
|
-
// this.setMessage({
|
|
379
|
-
// type: 'warning',
|
|
380
|
-
// content: this.t('ship.wait'),
|
|
381
|
-
// })
|
|
382
|
-
}
|
|
383
|
-
},
|
|
384
|
-
fail() {
|
|
385
|
-
console.log('fail');
|
|
340
|
+
}
|
|
341
|
+
if (transactionId) {
|
|
342
|
+
if (wx.openBusinessView) {
|
|
343
|
+
wx.openBusinessView({
|
|
344
|
+
businessType: 'weappOrderConfirm',
|
|
345
|
+
extraData: {
|
|
346
|
+
transaction_id: transactionId,
|
|
347
|
+
},
|
|
348
|
+
success: async () => {
|
|
349
|
+
console.log('success');
|
|
350
|
+
const { result: mpShipState } = await this.features.cache.exec('getMpShipState', {
|
|
351
|
+
shipId: ship.id,
|
|
352
|
+
});
|
|
353
|
+
if (mpShipState === 'received') {
|
|
354
|
+
await this.features.cache.operate('ship', [{
|
|
355
|
+
id: await generateNewIdAsync(),
|
|
356
|
+
action: 'succeedReceiving',
|
|
357
|
+
data: {},
|
|
358
|
+
filter: {
|
|
359
|
+
id: ship.id,
|
|
360
|
+
},
|
|
361
|
+
}]);
|
|
386
362
|
this.setMessage({
|
|
387
|
-
type: '
|
|
388
|
-
content: this.t('ship.
|
|
363
|
+
type: 'success',
|
|
364
|
+
content: this.t('ship.success')
|
|
389
365
|
});
|
|
390
|
-
},
|
|
391
|
-
complete() {
|
|
392
366
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
367
|
+
else {
|
|
368
|
+
console.log(mpShipState);
|
|
369
|
+
this.reRender();
|
|
370
|
+
// this.setMessage({
|
|
371
|
+
// type: 'warning',
|
|
372
|
+
// content: this.t('ship.wait'),
|
|
373
|
+
// })
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
fail: () => {
|
|
377
|
+
console.log('fail');
|
|
378
|
+
this.setMessage({
|
|
379
|
+
type: 'warning',
|
|
380
|
+
content: this.t('ship.fail'),
|
|
381
|
+
});
|
|
382
|
+
},
|
|
383
|
+
complete: () => {
|
|
384
|
+
}
|
|
385
|
+
});
|
|
402
386
|
}
|
|
403
387
|
else {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
}
|
|
388
|
+
//引导用户升级微信版本
|
|
389
|
+
this.setMessage({
|
|
390
|
+
type: 'warning',
|
|
391
|
+
content: this.t('ship.update wechat'),
|
|
392
|
+
});
|
|
410
393
|
}
|
|
411
394
|
}
|
|
412
395
|
else {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
this.reRender();
|
|
396
|
+
if (!noMessage) {
|
|
397
|
+
this.setMessage({
|
|
398
|
+
type: 'warning',
|
|
399
|
+
content: this.t('no transactionId'),
|
|
400
|
+
});
|
|
401
|
+
}
|
|
420
402
|
}
|
|
421
403
|
}
|
|
422
404
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<view class="container">
|
|
2
2
|
<l-notice-bar show="{{!!unreceivedDepositId}}" front-icon-name="notification" end-icon-name="right"
|
|
3
3
|
bind:lintap="onUnreceivedDepositClickMp" bind:linicontap="onUnreceivedDepositClickMp">
|
|
4
|
-
{{t('ship.unconfirm')}}
|
|
4
|
+
<view style="width:100vw">{{t('ship.unconfirm')}}</view>
|
|
5
5
|
</l-notice-bar>
|
|
6
6
|
<view class="info" style="background-color:{{bgColor}};color:{{textColor}};">
|
|
7
7
|
<view
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { composeServerUrl } from "oak-general-business/es/utils/domain";
|
|
2
|
+
export default OakComponent({
|
|
3
|
+
entity: 'aliPay',
|
|
4
|
+
projection: {
|
|
5
|
+
id: 1,
|
|
6
|
+
refundNotifyUrl: 1,
|
|
7
|
+
payNotifyUrl: 1,
|
|
8
|
+
system: {
|
|
9
|
+
id: 1,
|
|
10
|
+
domain$system: {
|
|
11
|
+
$entity: 'domain',
|
|
12
|
+
data: {
|
|
13
|
+
id: 1,
|
|
14
|
+
protocol: 1,
|
|
15
|
+
url: 1,
|
|
16
|
+
apiPath: 1,
|
|
17
|
+
port: 1,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
isList: false,
|
|
23
|
+
formData({ data }) {
|
|
24
|
+
const domain = data && data.system?.domain$system?.[0];
|
|
25
|
+
const serverUrl = domain && composeServerUrl(domain);
|
|
26
|
+
return {
|
|
27
|
+
aliPay: data,
|
|
28
|
+
serverUrl,
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
properties: {
|
|
32
|
+
systemId: '',
|
|
33
|
+
},
|
|
34
|
+
lifetimes: {
|
|
35
|
+
ready() {
|
|
36
|
+
const { systemId } = this.props;
|
|
37
|
+
if (this.isCreation()) {
|
|
38
|
+
this.update({
|
|
39
|
+
systemId,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EntityDict } from "../../../oak-app-domain";
|
|
3
|
+
import { RowWithActions, WebComponentProps } from "oak-frontend-base";
|
|
4
|
+
export default function render(props: WebComponentProps<EntityDict, 'aliPay', false, {
|
|
5
|
+
aliPay?: (RowWithActions<EntityDict, 'aliPay'>);
|
|
6
|
+
serverUrl: string;
|
|
7
|
+
}>): React.JSX.Element | null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Form, Input } from 'antd';
|
|
3
|
+
export default function render(props) {
|
|
4
|
+
const { aliPay, serverUrl } = props.data;
|
|
5
|
+
const { t, update } = props.methods;
|
|
6
|
+
if (aliPay) {
|
|
7
|
+
return (<>
|
|
8
|
+
<Form.Item label={t('aliPay:attr.payNotifyUrl')}>
|
|
9
|
+
<Input prefix={`${serverUrl}/endpoint`} suffix='/${payId}' value={aliPay.payNotifyUrl} placeholder={t('placeholder.payNotifyUrl')} onChange={({ currentTarget }) => {
|
|
10
|
+
const payNotifyUrl = currentTarget.value;
|
|
11
|
+
update({ payNotifyUrl });
|
|
12
|
+
}}/>
|
|
13
|
+
</Form.Item>
|
|
14
|
+
{/* <Form.Item label={t('aliPay:attr.refundNotifyUrl')}>
|
|
15
|
+
<Input
|
|
16
|
+
prefix={`${serverUrl}/endpoint`}
|
|
17
|
+
suffix='/${refundId}'
|
|
18
|
+
value={aliPay.refundNotifyUrl}
|
|
19
|
+
placeholder={t('placeholder.refundNotifyUrl')}
|
|
20
|
+
onChange={({ currentTarget }) => {
|
|
21
|
+
const refundNotifyUrl = currentTarget.value;
|
|
22
|
+
update({ refundNotifyUrl });
|
|
23
|
+
}}
|
|
24
|
+
/>
|
|
25
|
+
</Form.Item> */}
|
|
26
|
+
</>);
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export default OakComponent({
|
|
2
|
+
entity: 'apAccount',
|
|
3
|
+
isList: true,
|
|
4
|
+
projection: {
|
|
5
|
+
id: 1,
|
|
6
|
+
price: 1,
|
|
7
|
+
mchId: 1,
|
|
8
|
+
appId: 1,
|
|
9
|
+
enabled: 1,
|
|
10
|
+
aliPayId: 1,
|
|
11
|
+
aliPay: {
|
|
12
|
+
id: 1,
|
|
13
|
+
payNotifyUrl: 1,
|
|
14
|
+
refundNotifyUrl: 1,
|
|
15
|
+
},
|
|
16
|
+
refundGapDays: 1,
|
|
17
|
+
taxLossRatio: 1,
|
|
18
|
+
publicKeyPath: 1,
|
|
19
|
+
privateKeyPath: 1,
|
|
20
|
+
refundCompensateRatio: 1,
|
|
21
|
+
allowWithdrawTransfer: 1,
|
|
22
|
+
withdrawTransferLossRatio: 1,
|
|
23
|
+
needReceiving: 1,
|
|
24
|
+
encryptKey: 1,
|
|
25
|
+
alipayRootCertPath: 1,
|
|
26
|
+
alipayPublicCertPath: 1,
|
|
27
|
+
appCertPath: 1,
|
|
28
|
+
mode: 1,
|
|
29
|
+
gateway: 1,
|
|
30
|
+
endpoint: 1,
|
|
31
|
+
callbackUrl: 1,
|
|
32
|
+
wsServiceUrl: 1,
|
|
33
|
+
setting: 1,
|
|
34
|
+
keyType: 1,
|
|
35
|
+
timeout: 1,
|
|
36
|
+
needEncrypt: 1,
|
|
37
|
+
systemId: 1,
|
|
38
|
+
},
|
|
39
|
+
properties: {
|
|
40
|
+
systemId: '',
|
|
41
|
+
},
|
|
42
|
+
filters: [
|
|
43
|
+
{
|
|
44
|
+
filter() {
|
|
45
|
+
const { systemId } = this.props;
|
|
46
|
+
return {
|
|
47
|
+
systemId,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
formData({ data, legalActions }) {
|
|
53
|
+
return {
|
|
54
|
+
accounts: data,
|
|
55
|
+
canCreate: legalActions?.includes('create') && !data?.find(ele => ele.enabled),
|
|
56
|
+
oakExecutable: this.tryExecute(),
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
actions: ['create', 'update', 'remove'],
|
|
60
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EntityDict } from "../../../oak-app-domain";
|
|
3
|
+
import { RowWithActions, WebComponentProps } from "oak-frontend-base";
|
|
4
|
+
import { OakException } from 'oak-domain/lib/types';
|
|
5
|
+
export declare function ApAccount(props: {
|
|
6
|
+
data: RowWithActions<EntityDict, 'apAccount'>;
|
|
7
|
+
systemId: string;
|
|
8
|
+
t: (k: string, param?: any) => string;
|
|
9
|
+
onUpdate?: () => void;
|
|
10
|
+
onRemove?: () => void;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
export default function render(props: WebComponentProps<EntityDict, 'apAccount', true, {
|
|
13
|
+
accounts?: (RowWithActions<EntityDict, 'apAccount'> & {})[];
|
|
14
|
+
systemId: string;
|
|
15
|
+
canCreate?: boolean;
|
|
16
|
+
oakExecutable: boolean | OakException<EntityDict>;
|
|
17
|
+
}>): React.JSX.Element;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Button, Modal, Alert, Descriptions, Tabs } from 'antd';
|
|
3
|
+
import { PlusCircleOutlined } from '@ant-design/icons';
|
|
4
|
+
import Styles from './web.pc.module.less';
|
|
5
|
+
import Upsert from '../upsert';
|
|
6
|
+
import ApProductConfig from '../../apProduct/config';
|
|
7
|
+
import { OakAttrNotNullException, OakException } from 'oak-domain/lib/types';
|
|
8
|
+
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
|
9
|
+
import { ToYuan } from 'oak-domain/lib/utils/money';
|
|
10
|
+
export function ApAccount(props) {
|
|
11
|
+
const { data: account, t, onUpdate, onRemove, systemId } = props;
|
|
12
|
+
const { refundGapDays, mchId, enabled, price, taxLossRatio, refundCompensateRatio, allowWithdrawTransfer, withdrawTransferLossRatio, needReceiving, appId } = account;
|
|
13
|
+
const [activeKey, setActiveKey] = useState("1");
|
|
14
|
+
const D = (<Descriptions column={1} bordered title={t('apAccount:name')} size="small">
|
|
15
|
+
<Descriptions.Item label={t('apAccount:attr.appId')}>{appId}</Descriptions.Item>
|
|
16
|
+
<Descriptions.Item label={t('apAccount:attr.mchId')}>{mchId}</Descriptions.Item>
|
|
17
|
+
<Descriptions.Item label={t('apAccount:attr.price')}>{ToYuan(price)}{t('common::pay.scale')}</Descriptions.Item>
|
|
18
|
+
<Descriptions.Item label={t('apAccount:attr.taxLossRatio')}>{taxLossRatio}%</Descriptions.Item>
|
|
19
|
+
<Descriptions.Item label={t('apAccount:attr.refundCompensateRatio')}>{refundCompensateRatio}%</Descriptions.Item>
|
|
20
|
+
<Descriptions.Item label={t('apAccount:attr.refundGapDays')}>{refundGapDays}</Descriptions.Item>
|
|
21
|
+
<Descriptions.Item label={t('apAccount:attr.allowWithdrawTransfer')}>{t(`common::${!!allowWithdrawTransfer}`)}</Descriptions.Item>
|
|
22
|
+
<Descriptions.Item label={t('apAccount:attr.withdrawTransferLossRatio')}>{withdrawTransferLossRatio}%</Descriptions.Item>
|
|
23
|
+
<Descriptions.Item label={t('apAccount:attr.enabled')}>{t(`common::${enabled}`)}</Descriptions.Item>
|
|
24
|
+
</Descriptions>);
|
|
25
|
+
if (onUpdate) {
|
|
26
|
+
return (<Tabs activeKey={activeKey} onTabClick={(activeKey) => {
|
|
27
|
+
setActiveKey(activeKey);
|
|
28
|
+
}} tabBarExtraContent={activeKey === "1" && <>
|
|
29
|
+
{onUpdate && <Button style={{ marginRight: 4 }} size="small" onClick={() => onUpdate()}>
|
|
30
|
+
{t('common::action.update')}
|
|
31
|
+
</Button>}
|
|
32
|
+
{onRemove && <Button danger size="small" onClick={() => onRemove()}>
|
|
33
|
+
{t('common::action.remove')}
|
|
34
|
+
</Button>}
|
|
35
|
+
</>} style={{ width: 380, height: 520 }} items={[
|
|
36
|
+
{
|
|
37
|
+
key: '1',
|
|
38
|
+
label: t('common::action.detail'),
|
|
39
|
+
children: D,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: '2',
|
|
43
|
+
label: t('apProduct:name'),
|
|
44
|
+
children: (<ApProductConfig oakPath={`$$apProduct-${account.id}`} systemId={systemId} apAccountId={account.id}/>)
|
|
45
|
+
}
|
|
46
|
+
]}/>);
|
|
47
|
+
}
|
|
48
|
+
return D;
|
|
49
|
+
}
|
|
50
|
+
export default function render(props) {
|
|
51
|
+
const { accounts, oakFullpath, oakExecutable, canCreate, systemId } = props.data;
|
|
52
|
+
const { t, addItem, execute, clean } = props.methods;
|
|
53
|
+
const getNotNullMessage = (entity, attr) => {
|
|
54
|
+
return t('notnull', { value: t(`${entity}:attr.${attr}`) });
|
|
55
|
+
};
|
|
56
|
+
const errMsg = oakExecutable instanceof OakException && (oakExecutable instanceof OakAttrNotNullException ? getNotNullMessage(oakExecutable.getEntity(), oakExecutable.getAttributes()[0]) : t(oakExecutable.message));
|
|
57
|
+
const [upsertId, setUpsertId] = useState('');
|
|
58
|
+
const U = (<Modal width={920} destroyOnClose title={`${t('apAccount:name')}${t('common::action.add')}`} open={!!upsertId} onCancel={() => {
|
|
59
|
+
clean();
|
|
60
|
+
setUpsertId('');
|
|
61
|
+
}} closeIcon={null} onOk={async () => {
|
|
62
|
+
await execute();
|
|
63
|
+
setUpsertId('');
|
|
64
|
+
}} okButtonProps={{
|
|
65
|
+
disabled: oakExecutable !== true,
|
|
66
|
+
}} okText={t('common::confirm')} cancelText={(t('common::action.cancel'))}>
|
|
67
|
+
<div style={{ padding: 10 }}>
|
|
68
|
+
{errMsg && <Alert type="error" message={errMsg} style={{ marginBottom: 20 }}/>}
|
|
69
|
+
<Upsert oakPath={`${oakFullpath}.${upsertId}`} systemId={systemId}/>
|
|
70
|
+
</div>
|
|
71
|
+
</Modal>);
|
|
72
|
+
if (accounts && accounts?.length) {
|
|
73
|
+
return (<div className={Styles.container}>
|
|
74
|
+
{U}
|
|
75
|
+
<div className={Styles.list}>
|
|
76
|
+
{accounts.filter(ele => ele.$$createAt$$ > 1).map((ele, idx) => <div className={Styles.item} key={idx}>
|
|
77
|
+
<ApAccount systemId={systemId} data={ele} t={t} onRemove={ele['#oakLegalActions']?.includes('remove') ? () => {
|
|
78
|
+
Modal.confirm({
|
|
79
|
+
title: t('confirmDelete'),
|
|
80
|
+
content: t('areYouSure'),
|
|
81
|
+
onOk: async () => execute(undefined, undefined, undefined, [
|
|
82
|
+
{
|
|
83
|
+
entity: 'apAccount',
|
|
84
|
+
operation: {
|
|
85
|
+
id: await generateNewIdAsync(),
|
|
86
|
+
action: 'remove',
|
|
87
|
+
data: {},
|
|
88
|
+
filter: {
|
|
89
|
+
id: ele.id,
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]),
|
|
94
|
+
});
|
|
95
|
+
} : undefined} onUpdate={ele['#oakLegalActions']?.includes('update') ? () => setUpsertId(ele.id) : undefined}/>
|
|
96
|
+
</div>)}
|
|
97
|
+
</div>
|
|
98
|
+
<div className={Styles.btnBar}>
|
|
99
|
+
{canCreate && <Button type="primary" onClick={() => {
|
|
100
|
+
const id = addItem({ systemId });
|
|
101
|
+
setUpsertId(id);
|
|
102
|
+
}}>
|
|
103
|
+
{t('common::action.add')}
|
|
104
|
+
</Button>}
|
|
105
|
+
</div>
|
|
106
|
+
</div>);
|
|
107
|
+
}
|
|
108
|
+
return (<div className={Styles.container2}>
|
|
109
|
+
<Alert type='info' message={t('tips')}/>
|
|
110
|
+
{U}
|
|
111
|
+
<div className={Styles.body}>
|
|
112
|
+
{canCreate ? <PlusCircleOutlined className={Styles.add} shape="circle" style={{ fontSize: 50 }} onClick={() => {
|
|
113
|
+
const id = addItem({ systemId });
|
|
114
|
+
setUpsertId(id);
|
|
115
|
+
}}/> : t('noData')}
|
|
116
|
+
</div>
|
|
117
|
+
</div>);
|
|
118
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
min-height: 80vh;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: stretch;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
|
|
10
|
+
.list {
|
|
11
|
+
flex: 1;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
|
|
17
|
+
.item {
|
|
18
|
+
border: 0.1px solid silver;
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
margin: 18px;
|
|
21
|
+
padding: 18px;
|
|
22
|
+
|
|
23
|
+
.qrCode:hover {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.btnBar {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: flex-end;
|
|
32
|
+
padding: 12px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.container2 {
|
|
37
|
+
min-height: 80vh;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
align-items: stretch;
|
|
43
|
+
|
|
44
|
+
.body {
|
|
45
|
+
flex: 1;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
|
|
51
|
+
.add:hover {
|
|
52
|
+
color: var(--oak-color-primary);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|