oak-pay-business 2.2.0 → 2.2.2

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 (77) hide show
  1. package/es/aspects/withdraw.d.ts +4 -4
  2. package/es/checkers/order.js +39 -0
  3. package/es/components/account/detail/web.d.ts +1 -1
  4. package/es/components/account/detail/web.js +2 -2
  5. package/es/components/account/detail/web.pc.d.ts +1 -1
  6. package/es/components/account/detail/web.pc.js +2 -2
  7. package/es/components/account/detail/web.pc.module.less +68 -68
  8. package/es/components/accountOper/list/index.js +118 -6
  9. package/es/components/accountOper/list/index.json +10 -1
  10. package/es/components/accountOper/list/index.less +125 -0
  11. package/es/components/accountOper/list/index.xml +56 -0
  12. package/es/components/accountOper/list/locales/zh-CN.json +9 -1
  13. package/es/components/accountOper/list/mobile.module.less +48 -0
  14. package/es/components/accountOper/list/web.d.ts +12 -1
  15. package/es/components/accountOper/list/web.js +58 -24
  16. package/es/components/accountOper/list/web.module.less +27 -0
  17. package/es/components/accountOper/list/web.pc.d.ts +14 -2
  18. package/es/components/accountOper/list/web.pc.js +43 -8
  19. package/es/components/order/pay/index.js +1 -1
  20. package/es/components/order/pay/info.js +6 -6
  21. package/es/components/order/pay/info.module.less +24 -24
  22. package/es/components/order/pay/web.mobile.module.less +35 -35
  23. package/es/components/order/pay/web.pc.module.less +35 -35
  24. package/es/components/pay/detail/index.js +11 -0
  25. package/es/components/pay/detail/index.xml +10 -0
  26. package/es/components/pay/detail/locales/zh-CN.json +5 -1
  27. package/es/components/pay/detail/web.d.ts +1 -0
  28. package/es/components/pay/detail/web.js +12 -5
  29. package/es/components/pay/detail/web.pc.d.ts +1 -0
  30. package/es/components/pay/detail/web.pc.js +15 -5
  31. package/es/components/pay/list/web.pc.js +2 -0
  32. package/es/components/payConfig/upsert/offline/web.pc.module.less +4 -4
  33. package/es/components/payConfig/upsert/web.pc.module.less +10 -10
  34. package/es/components/withdraw/create/index.d.ts +1 -0
  35. package/es/components/withdraw/create/index.js +4 -0
  36. package/es/components/withdraw/create/index.xml +4 -0
  37. package/es/components/withdraw/create/locales/zh-CN.json +2 -1
  38. package/es/components/withdraw/create/web.d.ts +1 -0
  39. package/es/components/withdraw/create/web.js +6 -2
  40. package/es/components/withdraw/create/web.pc.d.ts +1 -0
  41. package/es/components/withdraw/create/web.pc.js +4 -1
  42. package/es/components/withdraw/display/web.pc.module.less +4 -2
  43. package/es/components/withdrawAccount/list/index.less +8 -0
  44. package/es/components/withdrawAccount/list/index.xml +6 -1
  45. package/es/configuration/attrUpdateMatrix.js +6 -1
  46. package/es/context/BackendRuntimeContext.d.ts +1 -1
  47. package/es/data/i18n.js +21 -3
  48. package/es/entities/Order.d.ts +4 -3
  49. package/es/entities/Order.js +1 -0
  50. package/es/locales/common/zh_CN.json +1 -0
  51. package/es/locales/error/zh-CN.json +4 -0
  52. package/es/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
  53. package/es/oak-app-domain/Order/Schema.d.ts +11 -5
  54. package/es/oak-app-domain/Order/Storage.js +4 -5
  55. package/es/oak-app-domain/Order/locales/zh_CN.json +1 -1
  56. package/es/oak-app-domain/System/Storage.js +1 -2
  57. package/es/utils/application.d.ts +1 -1
  58. package/es/utils/wpProductFrontend.js +1 -1
  59. package/lib/aspects/withdraw.d.ts +4 -4
  60. package/lib/checkers/order.js +39 -0
  61. package/lib/components/pay/detail/index.js +11 -0
  62. package/lib/configuration/attrUpdateMatrix.js +6 -1
  63. package/lib/context/BackendRuntimeContext.d.ts +1 -1
  64. package/lib/data/i18n.js +21 -3
  65. package/lib/entities/Order.d.ts +4 -3
  66. package/lib/entities/Order.js +1 -0
  67. package/lib/locales/common/zh_CN.json +1 -0
  68. package/lib/locales/error/zh-CN.json +4 -0
  69. package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
  70. package/lib/oak-app-domain/Order/Schema.d.ts +11 -5
  71. package/lib/oak-app-domain/Order/Storage.js +4 -5
  72. package/lib/oak-app-domain/Order/locales/zh_CN.json +1 -1
  73. package/lib/oak-app-domain/System/Storage.js +1 -2
  74. package/lib/utils/application.d.ts +1 -1
  75. package/lib/utils/wpProductFrontend.js +1 -1
  76. package/package.json +171 -200
  77. package/src/entities/Order.ts +4 -2
@@ -269,6 +269,17 @@ exports.default = OakComponent({
269
269
  });
270
270
  }
271
271
  },
272
+ updateExternalIdMp(input) {
273
+ const { detail } = input;
274
+ this.update({
275
+ externalId: detail.value,
276
+ });
277
+ },
278
+ clearExternalIdMp() {
279
+ this.update({
280
+ externalId: null,
281
+ });
282
+ }
272
283
  },
273
284
  lifetimes: {
274
285
  ready() {
@@ -69,7 +69,12 @@ const attrUpdateMatrix = {
69
69
  }
70
70
  },
71
71
  externalId: {
72
- actions: ['startPaying', 'succeedPaying'],
72
+ actions: ['startPaying', 'succeedPaying', 'update'],
73
+ filter: {
74
+ iState: {
75
+ $in: ['unpaid', 'paying'],
76
+ },
77
+ },
73
78
  },
74
79
  },
75
80
  refund: {
@@ -15,7 +15,7 @@ export declare class BackendRuntimeContext<ED extends EntityDict & BaseEntityDic
15
15
  type?: number | undefined;
16
16
  systemId?: number | undefined;
17
17
  system?: import("../oak-app-domain/System/Schema").Projection | undefined;
18
- config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
18
+ config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
19
19
  style?: number | import("oak-domain/lib/types").JsonProjection<import("oak-general-business/lib/types/Style").Style> | undefined;
20
20
  domainId?: number | undefined;
21
21
  domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined;
package/lib/data/i18n.js CHANGED
@@ -54,7 +54,15 @@ const i18ns = [
54
54
  language: "zh-CN",
55
55
  module: "oak-pay-business",
56
56
  position: "src/components/accountOper/list",
57
- data: {}
57
+ data: {
58
+ "history": "账户历史",
59
+ "chooseMonth": "选择月份",
60
+ "type": {
61
+ "both": "全部",
62
+ "in": "仅收入",
63
+ "out": "仅支出"
64
+ }
65
+ }
58
66
  },
59
67
  {
60
68
  id: "65d19e4723a89c25e3c10a87013af430",
@@ -200,11 +208,15 @@ const i18ns = [
200
208
  },
201
209
  "code": {
202
210
  "label": "转帐凭证号",
203
- "help": "请在转帐留言中附上转帐凭证号,便于人工核对"
211
+ "help": "请在转帐时于留言中附上转帐凭证号,便于人工核对。若转账时忘记附上,则请准确填写转账流水号。"
204
212
  },
205
213
  "channel": {
206
214
  "change": "更换",
207
215
  "prefix": "渠道"
216
+ },
217
+ "externalId": {
218
+ "label": "转账流水号",
219
+ "help": "转账成功后有唯一流水号,将之正确填入可减少财务人员核对时的错误概率,给您带来更大便利"
208
220
  }
209
221
  }
210
222
  },
@@ -451,7 +463,8 @@ const i18ns = [
451
463
  "overflowManualAmount": "提现额度不能超过人工划款的额度"
452
464
  },
453
465
  "innerLogic": "自动运算",
454
- "gotoHistory": "提现历史"
466
+ "gotoHistory": "提现历史",
467
+ "gotoWaManage": "提现账户管理"
455
468
  }
456
469
  },
457
470
  {
@@ -698,6 +711,7 @@ const i18ns = [
698
711
  "enter": "请输入",
699
712
  "change": "修改",
700
713
  "finish": "完成",
714
+ "loadMore": "加载更多",
701
715
  "pay": {
702
716
  "symbol": "¥",
703
717
  "scale": "元"
@@ -737,6 +751,10 @@ const i18ns = [
737
751
  },
738
752
  "system": {
739
753
  "withdrawLossUnSet": "系统的提现规则尚未设置,请联系管理员"
754
+ },
755
+ "order": {
756
+ "payAmountNotEnough": "支付的额度总和不足",
757
+ "nonePay": "没有传入支付信息"
740
758
  }
741
759
  }
742
760
  },
@@ -1,4 +1,4 @@
1
- import { String, Price, Boolean, Datetime } from 'oak-domain/lib/types/DataType';
1
+ import { String, Text, Price, Boolean, Datetime } from 'oak-domain/lib/types/DataType';
2
2
  import { EntityShape } from 'oak-domain/lib/types/Entity';
3
3
  import { EntityDesc, ActionDef } from 'oak-domain/lib/types';
4
4
  import { Schema as User } from 'oak-general-business/lib/entities/User';
@@ -9,12 +9,13 @@ export interface Schema extends EntityShape {
9
9
  paid: Price;
10
10
  refunded: Price;
11
11
  title: String<32>;
12
- desc: String<64>;
13
- timeoutAt: Datetime;
12
+ desc: Text;
13
+ timeoutAt?: Datetime;
14
14
  creator: User;
15
15
  entity: String<32>;
16
16
  entityId: String<64>;
17
17
  settled: Boolean;
18
+ allowPartialPay?: Boolean;
18
19
  system: System;
19
20
  opers: AccountOper[];
20
21
  }
@@ -58,6 +58,7 @@ exports.entityDesc = {
58
58
  title: '订单标题',
59
59
  desc: "订单描述",
60
60
  timeoutAt: '过期时间',
61
+ allowPartialPay: '允许部分支付',
61
62
  creator: '创建者',
62
63
  entity: '关联对象',
63
64
  entityId: '关联对象Id',
@@ -46,6 +46,7 @@
46
46
  "enter": "请输入",
47
47
  "change": "修改",
48
48
  "finish": "完成",
49
+ "loadMore": "加载更多",
49
50
  "pay": {
50
51
  "symbol": "¥",
51
52
  "scale": "元"
@@ -12,5 +12,9 @@
12
12
  },
13
13
  "system": {
14
14
  "withdrawLossUnSet": "系统的提现规则尚未设置,请联系管理员"
15
+ },
16
+ "order": {
17
+ "payAmountNotEnough": "支付的额度总和不足",
18
+ "nonePay": "没有传入支付信息"
15
19
  }
16
20
  }
@@ -1 +1 @@
1
- { "name": "帐号操作", "attr": { "account": "帐号", "type": "类型", "totalPlus": "余额变化", "availPlus": "可用余额变化", "refundablePlus": "可退款余额变化", "total": "操作后余额", "avail": "操作后可用余额", "refundable": "操作后可退款余额", "entity": "关联对象", "entityId": "关联对象Id" }, "v": { "type": { "deposit": "充值", "withdraw": "提现", "consume": "消费", "loan": "抵押", "repay": "偿还", "withdrawBack": "提现失败", "earn": "赚取", "encash": "兑现", "tax": "渠道费", "taxRefund": "渠道费用退还", "cutoffRefundable": "削减可自由退额度", "refund": "退款", "refundFailure": "退款失败" } } }
1
+ { "name": "帐号操作", "attr": { "account": "帐号", "type": "类型", "totalPlus": "余额变化", "availPlus": "可用余额变化", "refundablePlus": "可退款余额变化", "total": "操作后余额", "avail": "操作后可用余额", "refundable": "操作后可退款余额", "entity": "关联对象", "entityId": "关联对象Id" }, "v": { "type": { "deposit": "充值", "withdraw": "提现", "consume": "消费", "loan": "抵押", "repay": "偿还", "withdrawBack": "提现未遂", "earn": "赚取", "encash": "兑现", "tax": "渠道费", "taxRefund": "渠道费用退还", "cutoffRefundable": "削减可自由退额度", "refund": "退款", "refundFailure": "退款失败" } } }
@@ -3,7 +3,7 @@ import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue,
3
3
  import { OneOf } from "oak-domain/lib/types/Polyfill";
4
4
  import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity";
5
5
  import { Action, ParticularAction, IState } from "./Action";
6
- import { Price, String, Datetime, Boolean } from "oak-domain/lib/types/DataType";
6
+ import { Price, String, Text, Datetime, Boolean } from "oak-domain/lib/types/DataType";
7
7
  import * as User from "../User/Schema";
8
8
  import * as System from "../System/Schema";
9
9
  import * as Pay from "../Pay/Schema";
@@ -13,12 +13,13 @@ export type OpSchema = EntityShape & {
13
13
  paid: Price;
14
14
  refunded: Price;
15
15
  title: String<32>;
16
- desc: String<64>;
17
- timeoutAt: Datetime;
16
+ desc: Text;
17
+ timeoutAt?: Datetime | null;
18
18
  creatorId: ForeignKey<"user">;
19
19
  entity: String<32>;
20
20
  entityId: String<64>;
21
21
  settled: Boolean;
22
+ allowPartialPay?: Boolean | null;
22
23
  systemId: ForeignKey<"system">;
23
24
  iState?: IState | null;
24
25
  };
@@ -28,12 +29,13 @@ export type Schema = EntityShape & {
28
29
  paid: Price;
29
30
  refunded: Price;
30
31
  title: String<32>;
31
- desc: String<64>;
32
- timeoutAt: Datetime;
32
+ desc: Text;
33
+ timeoutAt?: Datetime | null;
33
34
  creatorId: ForeignKey<"user">;
34
35
  entity: String<32>;
35
36
  entityId: String<64>;
36
37
  settled: Boolean;
38
+ allowPartialPay?: Boolean | null;
37
39
  systemId: ForeignKey<"system">;
38
40
  iState?: IState | null;
39
41
  creator: User.Schema;
@@ -61,6 +63,7 @@ type AttrFilter = {
61
63
  entity: Q_StringValue;
62
64
  entityId: Q_StringValue;
63
65
  settled: Q_BooleanValue;
66
+ allowPartialPay: Q_BooleanValue;
64
67
  systemId: Q_StringValue;
65
68
  system: System.Filter;
66
69
  iState: Q_EnumValue<IState>;
@@ -86,6 +89,7 @@ export type Projection = {
86
89
  entity?: number;
87
90
  entityId?: number;
88
91
  settled?: number;
92
+ allowPartialPay?: number;
89
93
  systemId?: number;
90
94
  system?: System.Projection;
91
95
  iState?: number;
@@ -141,6 +145,8 @@ export type SortAttr = {
141
145
  entityId: number;
142
146
  } | {
143
147
  settled: number;
148
+ } | {
149
+ allowPartialPay: number;
144
150
  } | {
145
151
  systemId: number;
146
152
  } | {
@@ -25,13 +25,9 @@ exports.desc = {
25
25
  },
26
26
  desc: {
27
27
  notNull: true,
28
- type: "varchar",
29
- params: {
30
- length: 64
31
- }
28
+ type: "text"
32
29
  },
33
30
  timeoutAt: {
34
- notNull: true,
35
31
  type: "datetime"
36
32
  },
37
33
  creatorId: {
@@ -57,6 +53,9 @@ exports.desc = {
57
53
  notNull: true,
58
54
  type: "boolean"
59
55
  },
56
+ allowPartialPay: {
57
+ type: "boolean"
58
+ },
60
59
  systemId: {
61
60
  notNull: true,
62
61
  type: "ref",
@@ -1 +1 @@
1
- { "name": "订单", "attr": { "price": "订单金额", "paid": "已支付金额", "refunded": "已退款金额", "iState": "订单状态", "title": "订单标题", "desc": "订单描述", "timeoutAt": "过期时间", "creator": "创建者", "entity": "关联对象", "entityId": "关联对象Id", "settled": "是否结算", "opers": "相关帐户操作", "system": "所属系统" }, "action": { "startPaying": "开始支付", "payAll": "全部支付", "payPartially": "部分支付", "payNone": "支付失败", "timeout": "过期", "cancel": "放弃", "startRefunding": "开始退款", "refundAll": "完全退款", "refundNone": "退款失败", "refundPartially": "部分退款", "settle": "结算" }, "v": { "iState": { "paid": "已付款", "partiallyPaid": "部分支付", "paying": "支付中", "unpaid": "待付款", "timeout": "已超时", "cancelled": "已取消", "refunded": "已退款", "partiallyRefunded": "已部分退款", "refunding": "退款中" } } }
1
+ { "name": "订单", "attr": { "price": "订单金额", "paid": "已支付金额", "refunded": "已退款金额", "iState": "订单状态", "title": "订单标题", "desc": "订单描述", "timeoutAt": "过期时间", "allowPartialPay": "允许部分支付", "creator": "创建者", "entity": "关联对象", "entityId": "关联对象Id", "settled": "是否结算", "opers": "相关帐户操作", "system": "所属系统" }, "action": { "startPaying": "开始支付", "payAll": "全部支付", "payPartially": "部分支付", "payNone": "支付失败", "timeout": "过期", "cancel": "放弃", "startRefunding": "开始退款", "refundAll": "完全退款", "refundNone": "退款失败", "refundPartially": "部分退款", "settle": "结算" }, "v": { "iState": { "paid": "已付款", "partiallyPaid": "部分支付", "paying": "支付中", "unpaid": "待付款", "timeout": "已超时", "cancelled": "已取消", "refunded": "已退款", "partiallyRefunded": "已部分退款", "refunding": "退款中" } } }
@@ -37,8 +37,7 @@ exports.desc = {
37
37
  : {
38
38
  type: "object"
39
39
  },
40
- entity // 如果为true,则按照渠道taxLossRatio和refundCompensateRatio进行扣取(如果因为depositLossRatio已经大于taxLossRatio,则全额退款)
41
- : {
40
+ entity: {
42
41
  type: "varchar",
43
42
  params: {
44
43
  length: 32
@@ -14,7 +14,7 @@ export declare const mergedProjection: {
14
14
  type?: number | undefined;
15
15
  systemId?: number | undefined;
16
16
  system?: import("../oak-app-domain/System/Schema").Projection | undefined;
17
- config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
17
+ config?: number | import("oak-domain/lib/types").JsonProjection<import("../oak-app-domain/Application/Schema").WechatMpConfig | import("../oak-app-domain/Application/Schema").WebConfig | import("../oak-app-domain/Application/Schema").WechatPublicConfig | import("../oak-app-domain/Application/Schema").NativeConfig> | undefined;
18
18
  style?: number | import("oak-domain/lib/types").JsonProjection<import("oak-general-business/lib/types/Style").Style> | undefined;
19
19
  domainId?: number | undefined;
20
20
  domain?: import("../oak-app-domain/Domain/Schema").Projection | undefined;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.canStartPay = exports.getWpProductTypeFromEnv = void 0;
4
- const utils_1 = require("oak-frontend-base/lib/utils/utils");
4
+ const utils_1 = require("oak-frontend-base/es/utils/utils");
5
5
  function getWpProductTypeFromEnv() {
6
6
  switch (process.env.OAK_PLATFORM) {
7
7
  case 'web': {