oak-pay-business 2.6.2 → 2.6.3-alpha

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.
Files changed (119) hide show
  1. package/es/checkers/accountOper.js +6 -23
  2. package/es/checkers/order.js +10 -17
  3. package/es/components/AbstractComponents.d.ts +11 -62
  4. package/es/components/accountOper/pure/List.pc.d.ts +0 -1
  5. package/es/components/offlineAccount/upsert/index.d.ts +0 -1
  6. package/es/components/order/list/index.d.ts +0 -1
  7. package/es/components/order/pay/index.d.ts +1 -1
  8. package/es/components/order/pay/info.d.ts +0 -1
  9. package/es/components/pay/channelPicker2/web.d.ts +0 -1
  10. package/es/components/pay/channelPicker2/web.pc.d.ts +0 -1
  11. package/es/components/pay/detail/index.d.ts +1 -1
  12. package/es/components/pay/list/index.d.ts +0 -1
  13. package/es/components/payConfig/system/index.d.ts +0 -1
  14. package/es/components/refund/list/index.d.ts +0 -1
  15. package/es/components/sysAccount/transferList/index.d.ts +0 -1
  16. package/es/components/wechatPay/upsert/index.d.ts +1 -2
  17. package/es/components/withdraw/create/index.d.ts +9 -1
  18. package/es/components/withdraw/create/index.js +0 -1
  19. package/es/components/withdraw/create/web.d.ts +1 -1
  20. package/es/components/withdraw/create/web.pc.d.ts +1 -1
  21. package/es/components/withdraw/detail/index.d.ts +0 -1
  22. package/es/components/withdraw/display/index.d.ts +5 -1
  23. package/es/components/withdraw/display/web.d.ts +0 -1
  24. package/es/components/withdraw/display/web.pc.d.ts +0 -1
  25. package/es/components/withdrawTransfer/list/index.d.ts +0 -1
  26. package/es/configuration/attrUpdateMatrix.js +12 -12
  27. package/es/context/BackendRuntimeContext.d.ts +1 -1
  28. package/es/data/i18n.js +0 -3
  29. package/es/entities/AccountOper.d.ts +1 -1
  30. package/es/entities/AccountOper.js +2 -4
  31. package/es/locales/error/zh-CN.json +0 -3
  32. package/es/oak-app-domain/AccountOper/Storage.js +1 -1
  33. package/es/oak-app-domain/AccountOper/Style.js +1 -2
  34. package/es/oak-app-domain/AccountOper/_baseSchema.d.ts +1 -1
  35. package/es/oak-app-domain/AccountOper/locales/zh_CN.json +2 -3
  36. package/es/oak-app-domain/ActionDefDict.d.ts +0 -3
  37. package/es/oak-app-domain/ActionDefDict.js +0 -2
  38. package/es/oak-app-domain/EntityDict.d.ts +0 -67
  39. package/es/oak-app-domain/Storage.js +0 -2
  40. package/es/oak-app-domain/StyleDict.js +0 -2
  41. package/es/oak-app-domain/_SubQuery.d.ts +760 -0
  42. package/es/triggers/index.js +0 -2
  43. package/es/triggers/order.d.ts +1 -5
  44. package/es/triggers/order.js +2 -142
  45. package/es/triggers/refund.js +23 -106
  46. package/es/types/Exception.d.ts +3 -4
  47. package/es/types/Exception.js +5 -5
  48. package/es/utils/application.d.ts +1 -1
  49. package/es/utils/pay.d.ts +0 -1
  50. package/lib/aspects/withdraw.js +1 -2
  51. package/lib/checkers/abstractChecker.js +2 -2
  52. package/lib/checkers/accountOper.js +6 -23
  53. package/lib/checkers/order.js +10 -17
  54. package/lib/configuration/attrUpdateMatrix.js +12 -12
  55. package/lib/context/BackendRuntimeContext.d.ts +1 -1
  56. package/lib/data/i18n.js +0 -3
  57. package/lib/entities/AccountOper.d.ts +1 -1
  58. package/lib/entities/AccountOper.js +2 -4
  59. package/lib/features/index.js +2 -3
  60. package/lib/hooks/useFeatures.js +1 -1
  61. package/lib/locales/error/zh-CN.json +0 -3
  62. package/lib/oak-app-domain/AccountOper/Storage.js +1 -1
  63. package/lib/oak-app-domain/AccountOper/Style.js +1 -2
  64. package/lib/oak-app-domain/AccountOper/_baseSchema.d.ts +1 -1
  65. package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +2 -3
  66. package/lib/oak-app-domain/ActionDefDict.d.ts +0 -3
  67. package/lib/oak-app-domain/ActionDefDict.js +12 -14
  68. package/lib/oak-app-domain/EntityDict.d.ts +0 -67
  69. package/lib/oak-app-domain/Storage.js +18 -20
  70. package/lib/oak-app-domain/StyleDict.js +16 -18
  71. package/lib/oak-app-domain/_SubQuery.d.ts +760 -0
  72. package/lib/registry.js +2 -2
  73. package/lib/triggers/index.js +0 -2
  74. package/lib/triggers/order.d.ts +1 -5
  75. package/lib/triggers/order.js +1 -143
  76. package/lib/triggers/refund.js +23 -106
  77. package/lib/triggers/withdraw.d.ts +1 -1
  78. package/lib/triggers/withdraw.js +1 -2
  79. package/lib/types/DependentExceptions.js +1 -1
  80. package/lib/types/Exception.d.ts +3 -4
  81. package/lib/types/Exception.js +7 -7
  82. package/lib/utils/application.d.ts +1 -1
  83. package/lib/utils/application.js +2 -2
  84. package/lib/utils/pay.d.ts +0 -1
  85. package/lib/utils/pay.js +4 -4
  86. package/lib/utils/payClazz/WechatPay/WechatPay.debug.js +1 -2
  87. package/lib/utils/payClazz/WechatPay/index.d.ts +1 -1
  88. package/lib/utils/payClazz/index.js +3 -4
  89. package/lib/utils/wpProduct.js +1 -2
  90. package/lib/utils/wpProductFrontend.js +2 -3
  91. package/package.json +4 -4
  92. package/src/entities/AccountOper.ts +4 -6
  93. package/es/entities/Settlement.d.ts +0 -18
  94. package/es/entities/Settlement.js +0 -44
  95. package/es/oak-app-domain/Settlement/Action.d.ts +0 -11
  96. package/es/oak-app-domain/Settlement/Action.js +0 -10
  97. package/es/oak-app-domain/Settlement/Schema.d.ts +0 -19
  98. package/es/oak-app-domain/Settlement/Schema.js +0 -1
  99. package/es/oak-app-domain/Settlement/Storage.d.ts +0 -3
  100. package/es/oak-app-domain/Settlement/Storage.js +0 -25
  101. package/es/oak-app-domain/Settlement/Style.d.ts +0 -3
  102. package/es/oak-app-domain/Settlement/Style.js +0 -13
  103. package/es/oak-app-domain/Settlement/_baseSchema.d.ts +0 -47
  104. package/es/oak-app-domain/Settlement/locales/zh_CN.json +0 -20
  105. package/lib/entities/Settlement.d.ts +0 -18
  106. package/lib/entities/Settlement.js +0 -47
  107. package/lib/oak-app-domain/Settlement/Action.d.ts +0 -11
  108. package/lib/oak-app-domain/Settlement/Action.js +0 -13
  109. package/lib/oak-app-domain/Settlement/Schema.d.ts +0 -19
  110. package/lib/oak-app-domain/Settlement/Schema.js +0 -4
  111. package/lib/oak-app-domain/Settlement/Storage.d.ts +0 -3
  112. package/lib/oak-app-domain/Settlement/Storage.js +0 -28
  113. package/lib/oak-app-domain/Settlement/Style.d.ts +0 -3
  114. package/lib/oak-app-domain/Settlement/Style.js +0 -16
  115. package/lib/oak-app-domain/Settlement/_baseSchema.d.ts +0 -47
  116. package/lib/oak-app-domain/Settlement/locales/zh_CN.json +0 -20
  117. package/src/entities/Settlement.ts +0 -70
  118. /package/es/oak-app-domain/{Settlement/_baseSchema.js → _SubQuery.js} +0 -0
  119. /package/lib/oak-app-domain/{Settlement/_baseSchema.js → _SubQuery.js} +0 -0
@@ -52,11 +52,6 @@ const checkers = [
52
52
  break;
53
53
  }
54
54
  case 'refund':
55
- //当订单未完成分账时,仅减少total,此时totalPlus与availPlus不相等
56
- if (totalPlus > 0 || availPlus > 0) {
57
- throw new OakInputIllegalException('accountOper', ['totalPlus', 'availPlus'], `accountOper为${type}时,其totalPlus必须为非正数`);
58
- }
59
- break;
60
55
  case 'withdraw': {
61
56
  if (totalPlus >= 0 || availPlus >= 0 || totalPlus !== availPlus) {
62
57
  throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为相等的负数`);
@@ -64,10 +59,6 @@ const checkers = [
64
59
  break;
65
60
  }
66
61
  case 'refundFailure':
67
- if (totalPlus < 0 || availPlus < 0) {
68
- throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为非负数`);
69
- }
70
- break;
71
62
  case 'withdrawBack':
72
63
  case 'consumeBack': {
73
64
  if (totalPlus < 0 || availPlus < 0 || totalPlus !== availPlus) {
@@ -81,6 +72,12 @@ const checkers = [
81
72
  }
82
73
  break;
83
74
  }
75
+ case 'encash': {
76
+ if (totalPlus !== 0 || availPlus <= 0) {
77
+ throw new OakInputIllegalException('accountOper', ['availPlus'], 'accountOper为encash时,其totalPlus必须为0、availPlus必须为正数');
78
+ }
79
+ break;
80
+ }
84
81
  case 'cutoffRefundable': {
85
82
  if (totalPlus !== 0 || availPlus !== 0 || typeof refundablePlus !== 'number' || refundablePlus >= 0) {
86
83
  throw new OakInputIllegalException('accountOper', ['refundablePlus'], 'accountOper为cutoffRefundable时,其totalPlus/availPlus必须为0,且refundablePlus必须为负数');
@@ -99,20 +96,6 @@ const checkers = [
99
96
  }
100
97
  break;
101
98
  }
102
- case 'preSettle': {
103
- //预分账时账户total增加,avail不变,refundable不变
104
- if (totalPlus < 0 || availPlus !== 0 || (refundablePlus && refundablePlus !== 0)) {
105
- throw new OakInputIllegalException('accountOper', ['totalPlus', 'availPlus', 'refundablePlus'], 'accountOper为preSettle时,其totalPlus必须为非负数、availPlus必须为0,refundable必须为空或者0');
106
- }
107
- break;
108
- }
109
- case 'settle': {
110
- //分账时账户total不变,refundable不变
111
- if (totalPlus !== 0 || (refundablePlus && refundablePlus !== 0)) {
112
- throw new OakInputIllegalException('accountOper', ['totalPlus', 'refundablePlus'], 'accountOper为settle时,其totalPlus必须为0,refundable必须为空或者0');
113
- }
114
- break;
115
- }
116
99
  default: {
117
100
  assert(false);
118
101
  break;
@@ -60,7 +60,7 @@ const checkers = [
60
60
  }
61
61
  },
62
62
  {
63
- // 订单结算,检查存在关联的未结算的settlement,其price之和等于订单的已支付与已退款的差值
63
+ // 订单结算,将收入分帐到相关的Account中
64
64
  type: 'logicalData',
65
65
  entity: 'order',
66
66
  action: 'settle',
@@ -75,30 +75,23 @@ const checkers = [
75
75
  paid: 1,
76
76
  refunded: 1,
77
77
  iState: 1,
78
- settlement$order: {
79
- $entity: 'settlement',
80
- data: {
81
- id: 1,
82
- accountId: 1,
83
- price: 1,
84
- iState: 1,
85
- },
86
- filter: {
87
- iState: 'unsettled'
88
- }
89
- }
90
78
  },
91
79
  filter: {
92
80
  id: filter.id,
93
81
  },
94
82
  }, {}), (orders) => {
95
83
  const [order] = orders;
96
- const { price, paid, refunded, iState, settlement$order: settlements } = order;
84
+ const { price, paid, refunded, iState } = order;
97
85
  assert(['paid', 'partiallyRefunded'].includes(iState));
98
- assert(settlements && settlements.length > 0, '该结算订单需添加结算明细');
86
+ const { accountOper$entity: opers } = data;
87
+ assert(opers instanceof Array);
99
88
  let amount = 0;
100
- settlements.forEach((settlement) => {
101
- amount += settlement.price;
89
+ opers.forEach(({ action, data }) => {
90
+ assert(action === 'create');
91
+ const { type, totalPlus, availPlus, refundablePlus } = data;
92
+ assert(type === 'earn');
93
+ // assert(totalPlus === availPlus);
94
+ amount += totalPlus;
102
95
  });
103
96
  assert(amount === paid - refunded);
104
97
  });
@@ -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, ListButtonProps, OakAbsAttrUpsertDef } from 'oak-frontend-base';
8
- declare const FilterPanel: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
9
- entity: T;
10
- columns: ColumnProps<EntityDict, T>[];
11
- }>) => React.ReactElement;
12
- declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
13
- entity: T;
14
- extraActions: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]);
15
- onAction: onActionFnDef;
16
- disabledOp: boolean;
17
- attributes: OakAbsAttrDef[];
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?: "large" | "middle" | "small" | 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?: "large" | "middle" | "small" | 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, };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EntityDict } from "../../../oak-app-domain";
3
2
  export default function Render(props: {
4
3
  accountOpers: EntityDict['accountOper']['OpSchema'][];
@@ -1,3 +1,2 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "offlineAccount", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
3
2
  export default _default;
@@ -1,3 +1,2 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "order", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
3
2
  export default _default;
@@ -2,6 +2,6 @@ import { EntityDict } from "../../../oak-app-domain";
2
2
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "order", false, {
3
3
  accountId: string;
4
4
  accountAvailMax: number;
5
- onSetPays: (pays: Partial<EntityDict['pay']['CreateOperationData']>[]) => void;
5
+ onSetPays: (pays: Partial<EntityDict["pay"]["CreateSingle"]["data"]>[]) => void;
6
6
  }>) => React.ReactElement;
7
7
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export default function Info(props: {
3
2
  price: number;
4
3
  t: (k: string) => string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayChannelOption } from "../../../types/Pay";
3
2
  export default function Render(props: {
4
3
  data: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayChannelOption } from "../../../types/Pay";
3
2
  export default function Render(props: {
4
3
  data: {
@@ -1,7 +1,7 @@
1
1
  import { EntityDict } from "../../../oak-app-domain";
2
2
  import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
3
3
  import { StartPayRoutine, JudgeCanPay } from "../../../types/Pay";
4
- export declare function registerFrontendPayRoutine<ED extends EntityDict & BaseEntityDict>(entity: keyof ED, routine: StartPayRoutine, projection: ED['pay']['Projection'], judgeCanPay: JudgeCanPay): void;
4
+ export declare function registerFrontendPayRoutine<ED extends EntityDict & BaseEntityDict>(entity: keyof ED, routine: StartPayRoutine, projection: ED['pay']['Selection']['data'], judgeCanPay: JudgeCanPay): void;
5
5
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "pay", false, {
6
6
  onClose: () => void;
7
7
  onPaid: () => void;
@@ -1,3 +1,2 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "pay", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
3
2
  export default _default;
@@ -1,3 +1,2 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
3
2
  export default _default;
@@ -1,3 +1,2 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "refund", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
3
2
  export default _default;
@@ -1,3 +1,2 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "withdrawTransfer", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
3
2
  export default _default;
@@ -1,5 +1,4 @@
1
- import { EntityDict } from '../../../oak-app-domain';
2
- declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "wechatPay", false, {
1
+ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "wechatPay", false, {
3
2
  systemId: string;
4
3
  }>) => React.ReactElement;
5
4
  export default _default;
@@ -1,2 +1,10 @@
1
- declare const _default: any;
1
+ import { EntityDict } from "../../../oak-app-domain";
2
+ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, boolean, {
3
+ accountId: string;
4
+ withdrawAccountFilter: EntityDict["withdrawAccount"]["Selection"]["filter"];
5
+ onNewWithdrawAccount: () => void;
6
+ onCreateWithdraw: (id: string) => void;
7
+ onGoToHistory: () => void;
8
+ onGoToWaManage: () => void;
9
+ }>) => React.ReactElement;
2
10
  export default _default;
@@ -3,7 +3,6 @@ import assert from "assert";
3
3
  import { RefundExceedMax } from "../../../types/Exception";
4
4
  import { generateNewIdAsync } from "oak-domain/lib/utils/uuid";
5
5
  import { combineFilters } from 'oak-domain/lib/store/filter';
6
- // @ts-nocheck
7
6
  export default OakComponent({
8
7
  properties: {
9
8
  accountId: '',
@@ -18,7 +18,7 @@ export default function render(props: WebComponentProps<EntityDict, 'withdraw',
18
18
  withdrawable?: boolean;
19
19
  withdrawLossText?: string;
20
20
  chooseWa?: boolean;
21
- waFilter?: EntityDict['withdrawAccount']['Filter'];
21
+ waFilter?: EntityDict['withdrawAccount']['Selection']['filter'];
22
22
  userId: string;
23
23
  onGoToHistory: () => void;
24
24
  onGoToWaManage: () => void;
@@ -18,7 +18,7 @@ export default function render(props: WebComponentProps<EntityDict, 'withdraw',
18
18
  withdrawable?: boolean;
19
19
  withdrawLossText?: string;
20
20
  chooseWa?: boolean;
21
- waFilter?: EntityDict['withdrawAccount']['Filter'];
21
+ waFilter?: EntityDict['withdrawAccount']['Selection']['filter'];
22
22
  userId: string;
23
23
  onGoToHistory: () => void;
24
24
  onGoToWaManage: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  import { EntityDict } from "../../../oak-app-domain";
3
2
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "withdraw", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
4
3
  export default _default;
@@ -1,2 +1,6 @@
1
- declare const _default: any;
1
+ import { EntityDict } from '../../../oak-app-domain';
2
+ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, boolean, {
3
+ withdraw: EntityDict["withdraw"]["Schema"];
4
+ create: boolean;
5
+ }>) => React.ReactElement;
2
6
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EntityDict } from '../../../oak-app-domain';
3
2
  export default function render(props: {
4
3
  data: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EntityDict } from '../../../oak-app-domain';
3
2
  export default function render(props: {
4
3
  data: {
@@ -1,4 +1,3 @@
1
- /// <reference types="wechat-miniprogram" />
2
1
  import { EntityDict } from '../../../oak-app-domain';
3
2
  declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "withdrawTransfer", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
4
3
  export default _default;
@@ -142,9 +142,9 @@ const attrUpdateMatrix = {
142
142
  taxLossRatio: {
143
143
  actions: ['update'],
144
144
  },
145
- /* depositLossRatio: {
146
- actions: ['update'],
147
- }, */
145
+ // depositLossRatio: {
146
+ // actions: ['update'],
147
+ // },
148
148
  refundCompensateRatio: {
149
149
  actions: ['update'],
150
150
  },
@@ -186,21 +186,21 @@ const attrUpdateMatrix = {
186
186
  taxLossRatio: {
187
187
  actions: ['update'],
188
188
  },
189
- /* depositLossRatio: {
190
- actions: ['update'],
191
- }, */
189
+ // depositLossRatio: {
190
+ // actions: ['update'],
191
+ // },
192
192
  refundCompensateRatio: {
193
193
  actions: ['update'],
194
194
  },
195
195
  refundGapDays: {
196
196
  actions: ['update'],
197
197
  },
198
- /* refundLossRatio: {
199
- actions: ['update'],
200
- },
201
- refundLossFloor: {
202
- actions: ['update'],
203
- },*/
198
+ // refundLossRatio: {
199
+ // actions: ['update'],
200
+ // },
201
+ // refundLossFloor: {
202
+ // actions: ['update'],
203
+ // },
204
204
  publicKeyFilePath: {
205
205
  actions: ['update'],
206
206
  },
@@ -3,7 +3,7 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
3
3
  import { RuntimeContext } from './RuntimeContext';
4
4
  import { BackendRuntimeContext as DependentBackendRuntimeContext } from 'oak-general-business/lib/context/BackendRuntimeContext';
5
5
  export declare class BackendRuntimeContext<ED extends EntityDict & BaseEntityDict> extends DependentBackendRuntimeContext<ED> implements RuntimeContext {
6
- protected applicationProjection: EntityDict['application']['Projection'];
6
+ protected applicationProjection: any;
7
7
  toString(): Promise<string>;
8
8
  refineOpRecords(): Promise<void>;
9
9
  }
package/es/data/i18n.js CHANGED
@@ -802,9 +802,6 @@ const i18ns = [
802
802
  "exceedMax": "退款额度大于可用值",
803
803
  "payUnrefundable": "支付已经不可退款"
804
804
  }
805
- },
806
- "pay": {
807
- "externalException": "外部支付渠道异常"
808
805
  }
809
806
  }
810
807
  },
@@ -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' | 'consumeBack' | 'loan' | 'repay' | 'withdrawBack' | 'earn' | 'cutoffRefundable' | 'tax' | 'taxRefund' | 'refund' | 'refundFailure' | 'preSettle' | 'settle';
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;
@@ -25,13 +25,12 @@ export const entityDesc = {
25
25
  repay: '偿还',
26
26
  withdrawBack: '提现退还',
27
27
  earn: '赚取',
28
+ encash: '兑现',
28
29
  tax: '渠道费',
29
30
  taxRefund: '渠道费用退还',
30
31
  cutoffRefundable: '削减可自由退额度',
31
32
  refund: '退款',
32
33
  refundFailure: '退款失败',
33
- preSettle: '预分账',
34
- settle: '分账',
35
34
  },
36
35
  },
37
36
  },
@@ -47,13 +46,12 @@ export const entityDesc = {
47
46
  loan: '#CD6155',
48
47
  repay: '#82E0AA',
49
48
  earn: '#FF3333',
49
+ encash: '#FF3399',
50
50
  tax: '#A569BD',
51
51
  taxRefund: '#FF3333',
52
52
  cutoffRefundable: '#2E4053',
53
53
  refund: '#CC3333',
54
54
  refundFailure: '#009933',
55
- preSettle: '#8A631D',
56
- settle: '#157d5a',
57
55
  }
58
56
  }
59
57
  },
@@ -23,8 +23,5 @@
23
23
  "exceedMax": "退款额度大于可用值",
24
24
  "payUnrefundable": "支付已经不可退款"
25
25
  }
26
- },
27
- "pay": {
28
- "externalException": "外部支付渠道异常"
29
26
  }
30
27
  }
@@ -9,7 +9,7 @@ export const desc = {
9
9
  type: {
10
10
  notNull: true,
11
11
  type: "enum",
12
- enumeration: ["deposit", "withdraw", "consume", "consumeBack", "loan", "repay", "withdrawBack", "earn", "cutoffRefundable", "tax", "taxRefund", "refund", "refundFailure", "preSettle", "settle"]
12
+ enumeration: ["deposit", "withdraw", "consume", "consumeBack", "loan", "repay", "withdrawBack", "earn", "encash", "cutoffRefundable", "tax", "taxRefund", "refund", "refundFailure"]
13
13
  },
14
14
  totalPlus: {
15
15
  notNull: true,
@@ -9,13 +9,12 @@ export const style = {
9
9
  loan: '#CD6155',
10
10
  repay: '#82E0AA',
11
11
  earn: '#FF3333',
12
+ encash: '#FF3399',
12
13
  tax: '#A569BD',
13
14
  taxRefund: '#FF3333',
14
15
  cutoffRefundable: '#2E4053',
15
16
  refund: '#CC3333',
16
17
  refundFailure: '#009933',
17
- preSettle: '#8A631D',
18
- settle: '#157d5a',
19
18
  }
20
19
  }
21
20
  };
@@ -3,7 +3,7 @@ import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp,
3
3
  import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
4
4
  import { AppendOnlyAction } from "oak-domain/lib/actions/action";
5
5
  import { Price, String } from "oak-domain/lib/types/DataType";
6
- type Type = "deposit" | "withdraw" | "consume" | "consumeBack" | "loan" | "repay" | "withdrawBack" | "earn" | "cutoffRefundable" | "tax" | "taxRefund" | "refund" | "refundFailure" | "preSettle" | "settle";
6
+ type Type = "deposit" | "withdraw" | "consume" | "consumeBack" | "loan" | "repay" | "withdrawBack" | "earn" | "encash" | "cutoffRefundable" | "tax" | "taxRefund" | "refund" | "refundFailure";
7
7
  export type OpSchema = EntityShape & {
8
8
  accountId: ForeignKey<"account">;
9
9
  type: Type;
@@ -22,13 +22,12 @@
22
22
  "repay": "偿还",
23
23
  "withdrawBack": "提现退还",
24
24
  "earn": "赚取",
25
+ "encash": "兑现",
25
26
  "tax": "渠道费",
26
27
  "taxRefund": "渠道费用退还",
27
28
  "cutoffRefundable": "削减可自由退额度",
28
29
  "refund": "退款",
29
- "refundFailure": "退款失败",
30
- "preSettle": "预分账",
31
- "settle": "分账"
30
+ "refundFailure": "退款失败"
32
31
  }
33
32
  }
34
33
  }
@@ -60,9 +60,6 @@ export declare const actionDefDict: {
60
60
  refund: {
61
61
  iState: import("oak-domain/lib/types").ActionDef<string, string>;
62
62
  };
63
- settlement: {
64
- iState: import("oak-domain/lib/types").ActionDef<string, string>;
65
- };
66
63
  user: {
67
64
  idState: import("oak-domain/lib/types").ActionDef<import("oak-general-business/lib/entities/User").IdAction, import("oak-general-business/lib/entities/User").IdState>;
68
65
  userState: import("oak-domain/lib/types").ActionDef<import("oak-general-business/lib/entities/User").UserAction, import("oak-general-business/lib/entities/User").UserState>;
@@ -22,7 +22,6 @@ import { actionDefDict as offlineAccount } from "./OfflineAccount/Action";
22
22
  import { actionDefDict as order } from "./Order/Action";
23
23
  import { actionDefDict as pay } from "./Pay/Action";
24
24
  import { actionDefDict as refund } from "./Refund/Action";
25
- import { actionDefDict as settlement } from "./Settlement/Action";
26
25
  import { actionDefDict as user } from "./User/Action";
27
26
  import { actionDefDict as withdraw } from "./Withdraw/Action";
28
27
  import { actionDefDict as withdrawAccount } from "./WithdrawAccount/Action";
@@ -54,7 +53,6 @@ export const actionDefDict = {
54
53
  order,
55
54
  pay,
56
55
  refund,
57
- settlement,
58
56
  user,
59
57
  withdraw,
60
58
  withdrawAccount,