oak-pay-business 1.0.13 → 1.1.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/checkers/accountOper.js +9 -3
- package/es/checkers/application.js +1 -30
- package/es/checkers/index.js +4 -0
- package/es/checkers/offlineAccount.d.ts +5 -0
- package/es/checkers/offlineAccount.js +62 -0
- package/es/checkers/pay.js +6 -15
- package/es/checkers/wpProduct.d.ts +5 -0
- package/es/checkers/wpProduct.js +113 -0
- package/es/components/AbstractComponents.d.ts +4 -4
- package/es/components/account/deposit/index.json +1 -1
- package/es/components/account/deposit/web.js +9 -4
- package/es/components/account/deposit/web.pc.js +9 -4
- package/es/components/account/detail/index.d.ts +4 -1
- package/es/components/account/detail/index.js +79 -60
- package/es/components/account/detail/index.json +1 -1
- package/es/components/account/detail/index.less +50 -17
- package/es/components/account/detail/index.xml +27 -15
- package/es/components/account/detail/locales/zh-CN.json +3 -2
- package/es/components/account/detail/web.d.ts +11 -7
- package/es/components/account/detail/web.js +37 -30
- package/es/components/account/detail/web.mobile.module.less +39 -17
- package/es/components/account/detail/web.pc.d.ts +8 -6
- package/es/components/account/detail/web.pc.js +8 -8
- package/es/components/deposit/new/index.d.ts +12 -0
- package/es/components/deposit/new/index.js +66 -0
- package/es/components/deposit/new/index.json +9 -0
- package/es/components/deposit/new/index.less +7 -0
- package/es/components/deposit/new/index.xml +38 -0
- package/es/components/deposit/new/locales/zh-CN.json +14 -0
- package/es/components/deposit/new/web.d.ts +17 -0
- package/es/components/deposit/new/web.js +35 -0
- package/es/components/deposit/new/web.pc.d.ts +16 -0
- package/es/components/deposit/new/web.pc.js +31 -0
- package/es/components/deposit/new/web.pc.module.less +11 -0
- package/es/components/offlineAccount/config/index.d.ts +4 -0
- package/es/components/offlineAccount/config/index.js +33 -0
- package/es/components/offlineAccount/config/index.json +1 -0
- package/es/components/offlineAccount/config/locales/zh-CN.json +7 -0
- package/es/components/offlineAccount/config/web.pc.d.ts +10 -0
- package/es/components/offlineAccount/config/web.pc.js +110 -0
- package/es/components/offlineAccount/config/web.pc.module.less +55 -0
- package/es/components/offlineAccount/index.d.ts +3 -0
- package/es/components/offlineAccount/index.js +17 -0
- package/es/components/offlineAccount/index.json +1 -0
- package/es/components/offlineAccount/locales/zh-CN.json +3 -0
- package/es/components/offlineAccount/upsert/index.d.ts +3 -0
- package/es/components/offlineAccount/upsert/index.js +34 -0
- package/es/components/offlineAccount/upsert/index.json +1 -0
- package/es/components/offlineAccount/upsert/locales/zh-CN.json +28 -0
- package/es/components/offlineAccount/upsert/web.pc.d.ts +6 -0
- package/es/components/offlineAccount/upsert/web.pc.js +73 -0
- package/es/components/offlineAccount/web.pc.d.ts +6 -0
- package/es/components/offlineAccount/web.pc.js +27 -0
- package/es/components/order/pay/web.js +8 -2
- package/es/components/order/pay/web.pc.js +8 -2
- package/es/components/pay/channelPicker2/index.d.ts +7 -0
- package/es/components/pay/channelPicker2/index.js +39 -0
- package/es/components/pay/channelPicker2/index.json +6 -0
- package/es/components/pay/channelPicker2/index.less +31 -0
- package/es/components/pay/channelPicker2/index.xml +21 -0
- package/es/components/pay/channelPicker2/locales/zh-CN.json +3 -0
- package/es/components/pay/channelPicker2/web.d.ts +11 -0
- package/es/components/pay/channelPicker2/web.js +9 -0
- package/es/components/pay/channelPicker2/web.pc.d.ts +11 -0
- package/es/components/pay/channelPicker2/web.pc.js +6 -0
- package/es/components/pay/detail/index.d.ts +3 -0
- package/es/components/pay/detail/index.js +207 -120
- package/es/components/pay/detail/index.json +5 -1
- package/es/components/pay/detail/index.less +149 -88
- package/es/components/pay/detail/index.xml +135 -135
- package/es/components/pay/detail/locales/zh-CN.json +13 -17
- package/es/components/pay/detail/web.d.ts +10 -7
- package/es/components/pay/detail/web.js +97 -49
- package/es/components/pay/detail/web.mobile.module.less +4 -0
- package/es/components/pay/detail/web.pc.d.ts +10 -7
- package/es/components/pay/detail/web.pc.js +104 -54
- package/es/components/pay/detail/web.pc.module.less +16 -2
- package/es/components/pay/list/index.js +59 -12
- package/es/components/pay/list/locales/zh-CN.json +1 -0
- package/es/components/pay/list/web.pc.d.ts +5 -2
- package/es/components/pay/list/web.pc.js +54 -19
- package/es/components/pay/list/web.pc.module.less +5 -0
- package/es/components/payConfig/system/index.js +5 -17
- package/es/components/payConfig/system/web.pc.d.ts +5 -11
- package/es/components/payConfig/system/web.pc.js +19 -81
- package/es/components/payConfig/system/web.pc.module.less +3 -0
- package/es/components/wechatPay/upsert/index.d.ts +4 -0
- package/es/components/wechatPay/upsert/index.js +44 -0
- package/es/components/wechatPay/upsert/index.json +1 -0
- package/es/components/wechatPay/upsert/locales/zh-CN.json +7 -0
- package/es/components/wechatPay/upsert/web.pc.d.ts +7 -0
- package/es/components/wechatPay/upsert/web.pc.js +23 -0
- package/es/components/wechatPay/upsert/web.pc.module.less +3 -0
- package/es/components/withdraw/create/index.js +2 -2
- package/es/components/withdraw/create/locales/zh-CN.json +1 -11
- package/es/components/withdraw/dry/Detail.pc.js +10 -10
- package/es/components/withdraw/dry/index.d.ts +2 -2
- package/es/components/withdraw/dry/locales/zh-CN.json +1 -1
- package/es/components/wpAccount/config/index.d.ts +3 -0
- package/es/components/wpAccount/config/index.js +21 -0
- package/es/components/wpAccount/config/index.json +1 -0
- package/es/components/wpAccount/config/locales/zh-CN.json +7 -0
- package/es/components/wpAccount/config/web.pc.d.ts +8 -0
- package/es/components/wpAccount/config/web.pc.js +112 -0
- package/es/components/wpAccount/config/web.pc.module.less +55 -0
- package/es/components/wpAccount/upsert/index.d.ts +4 -0
- package/es/components/wpAccount/upsert/index.js +70 -0
- package/es/components/wpAccount/upsert/index.json +1 -0
- package/es/components/wpAccount/upsert/locales/zh-CN.json +15 -0
- package/es/components/wpAccount/upsert/web.pc.d.ts +8 -0
- package/es/components/wpAccount/upsert/web.pc.js +84 -0
- package/es/components/wpAccount/upsert/web.pc.module.less +4 -0
- package/es/components/wpProduct/config/index.d.ts +5 -0
- package/es/components/wpProduct/config/index.js +52 -0
- package/es/components/wpProduct/config/index.json +1 -0
- package/es/components/wpProduct/config/locales/zh-CN.json +7 -0
- package/es/components/wpProduct/config/web.pc.d.ts +9 -0
- package/es/components/wpProduct/config/web.pc.js +98 -0
- package/es/components/wpProduct/config/web.pc.module.less +62 -0
- package/es/components/wpProduct/upsert/index.d.ts +5 -0
- package/es/components/wpProduct/upsert/index.js +57 -0
- package/es/components/wpProduct/upsert/index.json +1 -0
- package/es/components/wpProduct/upsert/locales/zh-CN.json +5 -0
- package/es/components/wpProduct/upsert/web.pc.d.ts +8 -0
- package/es/components/wpProduct/upsert/web.pc.js +34 -0
- package/es/configuration/attrUpdateMatrix.js +110 -8
- package/es/configuration/relation.js +2 -1
- package/es/context/BackendRuntimeContext.d.ts +489 -1
- package/es/context/BackendRuntimeContext.js +2 -14
- package/es/data/i18n.js +229 -54
- package/es/entities/AbstractAccount.d.ts +14 -0
- package/es/entities/AbstractAccount.js +43 -0
- package/es/entities/Account.d.ts +4 -2
- package/es/entities/Account.js +2 -1
- package/es/entities/AccountOper.d.ts +1 -1
- package/es/entities/AccountOper.js +4 -2
- package/es/entities/Deposit.d.ts +21 -0
- package/es/entities/Deposit.js +47 -0
- package/es/entities/OfflineAccount.d.ts +30 -0
- package/es/entities/OfflineAccount.js +63 -0
- package/es/entities/Order.js +1 -1
- package/es/entities/Pay.d.ts +8 -6
- package/es/entities/Pay.js +8 -4
- package/es/entities/SysAccountOper.d.ts +18 -0
- package/es/entities/SysAccountOper.js +38 -0
- package/es/entities/System.d.ts +4 -2
- package/es/entities/System.js +2 -1
- package/es/entities/WechatPay.d.ts +10 -0
- package/es/entities/WechatPay.js +13 -0
- package/es/entities/WithdrawAccount.d.ts +2 -0
- package/es/entities/WithdrawAccount.js +1 -0
- package/es/entities/WpAccount.d.ts +21 -0
- package/es/entities/WpAccount.js +52 -0
- package/es/entities/WpProduct.d.ts +17 -0
- package/es/entities/WpProduct.js +36 -0
- package/es/features/Pay.d.ts +8 -4
- package/es/features/Pay.js +45 -12
- package/es/features/index.js +2 -7
- package/es/locales/common/zh_CN.json +11 -0
- package/es/locales/error/zh-CN.json +7 -0
- package/es/locales/offlineAccount/zh-CN.json +25 -0
- package/es/locales/payChannel/zh-CN.json +3 -16
- package/es/oak-app-domain/AbstractAccount/Action.d.ts +5 -0
- package/es/oak-app-domain/AbstractAccount/Action.js +2 -0
- package/es/oak-app-domain/AbstractAccount/Schema.d.ts +106 -0
- package/es/oak-app-domain/AbstractAccount/Schema.js +1 -0
- package/es/oak-app-domain/AbstractAccount/Storage.d.ts +3 -0
- package/es/oak-app-domain/AbstractAccount/Storage.js +40 -0
- package/es/oak-app-domain/AbstractAccount/Style.d.ts +3 -0
- package/es/oak-app-domain/AbstractAccount/Style.js +15 -0
- package/es/oak-app-domain/AbstractAccount/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/Account/Schema.d.ts +93 -40
- package/es/oak-app-domain/Account/Storage.js +2 -2
- package/es/oak-app-domain/Account/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/AccountOper/Schema.d.ts +35 -6
- package/es/oak-app-domain/AccountOper/Storage.js +2 -2
- package/es/oak-app-domain/AccountOper/Style.js +2 -1
- package/es/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/ActionDefDict.d.ts +6 -0
- package/es/oak-app-domain/ActionDefDict.js +9 -1
- package/es/oak-app-domain/Application/Schema.d.ts +12 -7
- package/es/oak-app-domain/Application/Storage.js +0 -3
- package/es/oak-app-domain/Application/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Deposit/Action.d.ts +11 -0
- package/es/oak-app-domain/Deposit/Action.js +11 -0
- package/es/oak-app-domain/Deposit/Schema.d.ts +198 -0
- package/es/oak-app-domain/Deposit/Schema.js +1 -0
- package/es/oak-app-domain/Deposit/Storage.d.ts +3 -0
- package/es/oak-app-domain/Deposit/Storage.js +29 -0
- package/es/oak-app-domain/Deposit/Style.d.ts +3 -0
- package/es/oak-app-domain/Deposit/Style.js +13 -0
- package/es/oak-app-domain/Deposit/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/EntityDict.d.ts +14 -0
- package/es/oak-app-domain/ModiEntity/Schema.d.ts +92 -5
- package/es/oak-app-domain/ModiEntity/Storage.js +1 -1
- package/es/oak-app-domain/OfflineAccount/Action.d.ts +5 -0
- package/es/oak-app-domain/OfflineAccount/Action.js +2 -0
- package/es/oak-app-domain/OfflineAccount/Schema.d.ts +235 -0
- package/es/oak-app-domain/OfflineAccount/Schema.js +1 -0
- package/es/oak-app-domain/OfflineAccount/Storage.d.ts +3 -0
- package/es/oak-app-domain/OfflineAccount/Storage.js +81 -0
- package/es/oak-app-domain/OfflineAccount/Style.d.ts +3 -0
- package/es/oak-app-domain/OfflineAccount/Style.js +18 -0
- package/es/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/OperEntity/Schema.d.ts +92 -5
- package/es/oak-app-domain/OperEntity/Storage.js +1 -1
- package/es/oak-app-domain/Pay/Action.d.ts +1 -1
- package/es/oak-app-domain/Pay/Action.js +1 -1
- package/es/oak-app-domain/Pay/Schema.d.ts +152 -38
- package/es/oak-app-domain/Pay/Storage.js +16 -5
- package/es/oak-app-domain/Pay/Style.js +1 -0
- package/es/oak-app-domain/Pay/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Refund/Schema.d.ts +16 -3
- package/es/oak-app-domain/Storage.js +15 -1
- package/es/oak-app-domain/StyleDict.js +15 -3
- package/es/oak-app-domain/SysAccountOper/Schema.d.ts +284 -0
- package/es/oak-app-domain/SysAccountOper/Schema.js +1 -0
- package/es/oak-app-domain/SysAccountOper/Storage.d.ts +3 -0
- package/es/oak-app-domain/SysAccountOper/Storage.js +43 -0
- package/es/oak-app-domain/SysAccountOper/Style.d.ts +3 -0
- package/es/oak-app-domain/SysAccountOper/Style.js +10 -0
- package/es/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/System/Schema.d.ts +77 -14
- package/es/oak-app-domain/System/Storage.js +0 -3
- package/es/oak-app-domain/System/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/User/Schema.d.ts +12 -0
- package/es/oak-app-domain/WechatPay/Schema.d.ts +164 -0
- package/es/oak-app-domain/WechatPay/Schema.js +1 -0
- package/es/oak-app-domain/WechatPay/Storage.d.ts +3 -0
- package/es/oak-app-domain/WechatPay/Storage.js +26 -0
- package/es/oak-app-domain/WechatPay/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/Withdraw/Schema.d.ts +12 -0
- package/es/oak-app-domain/WithdrawAccount/Schema.d.ts +77 -7
- package/es/oak-app-domain/WithdrawAccount/Storage.js +6 -1
- package/es/oak-app-domain/WithdrawAccount/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/WpAccount/Action.d.ts +5 -0
- package/es/oak-app-domain/WpAccount/Action.js +2 -0
- package/es/oak-app-domain/WpAccount/Schema.d.ts +270 -0
- package/es/oak-app-domain/WpAccount/Schema.js +1 -0
- package/es/oak-app-domain/WpAccount/Storage.d.ts +3 -0
- package/es/oak-app-domain/WpAccount/Storage.js +80 -0
- package/es/oak-app-domain/WpAccount/Style.d.ts +3 -0
- package/es/oak-app-domain/WpAccount/Style.js +15 -0
- package/es/oak-app-domain/WpAccount/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/WpProduct/Schema.d.ts +209 -0
- package/es/oak-app-domain/WpProduct/Schema.js +1 -0
- package/es/oak-app-domain/WpProduct/Storage.d.ts +3 -0
- package/es/oak-app-domain/WpProduct/Storage.js +33 -0
- package/es/oak-app-domain/WpProduct/Style.d.ts +3 -0
- package/es/oak-app-domain/WpProduct/Style.js +11 -0
- package/es/oak-app-domain/WpProduct/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/_SubQuery.d.ts +94 -4
- package/es/registry.d.ts +9 -0
- package/es/registry.js +8 -0
- package/es/triggers/account.js +60 -55
- package/es/triggers/accountOper.js +0 -59
- package/es/triggers/deposit.d.ts +1 -0
- package/es/triggers/deposit.js +13 -0
- package/es/triggers/index.js +4 -0
- package/es/triggers/pay.d.ts +6 -0
- package/es/triggers/pay.js +201 -72
- package/es/triggers/refund.d.ts +6 -0
- package/es/triggers/refund.js +75 -16
- package/es/triggers/sysAccountOper.d.ts +5 -0
- package/es/triggers/sysAccountOper.js +36 -0
- package/{lib/triggers/acount.d.ts → es/triggers/system.d.ts} +1 -1
- package/es/triggers/system.js +30 -0
- package/es/triggers/userSystem.js +1 -1
- package/es/types/Pay.d.ts +17 -0
- package/es/types/Pay.js +1 -0
- package/es/types/PayClazz.d.ts +1 -2
- package/es/utils/application.d.ts +493 -1
- package/es/utils/application.js +37 -5
- package/es/utils/pay.d.ts +6 -1
- package/es/utils/pay.js +155 -64
- package/es/utils/payClazz/Account.d.ts +0 -1
- package/es/utils/payClazz/Account.js +19 -19
- package/es/utils/payClazz/Offline.d.ts +0 -1
- package/es/utils/payClazz/Offline.js +1 -2
- package/es/utils/payClazz/WechatPay/WechatPay.d.ts +10 -4
- package/es/utils/payClazz/WechatPay/WechatPay.debug.d.ts +3 -3
- package/es/utils/payClazz/WechatPay/WechatPay.debug.js +9 -10
- package/es/utils/payClazz/WechatPay/WechatPay.js +29 -17
- package/es/utils/payClazz/index.d.ts +2 -5
- package/es/utils/payClazz/index.js +57 -60
- package/es/utils/wpProduct.d.ts +2 -0
- package/es/utils/wpProduct.js +19 -0
- package/es/utils/wpProductFrontend.d.ts +4 -0
- package/es/utils/wpProductFrontend.js +30 -0
- package/es/watchers/pay.js +2 -2
- package/es/watchers/refund.js +3 -2
- package/lib/checkers/account.js +14 -1
- package/lib/checkers/accountOper.js +15 -3
- package/lib/checkers/application.js +1 -30
- package/lib/checkers/index.d.ts +1 -1
- package/lib/checkers/index.js +4 -0
- package/lib/checkers/offlineAccount.d.ts +5 -0
- package/lib/checkers/offlineAccount.js +65 -0
- package/lib/checkers/pay.js +6 -15
- package/lib/checkers/wpProduct.d.ts +5 -0
- package/lib/checkers/wpProduct.js +116 -0
- package/lib/components/offlineAccount/config/index.d.ts +4 -0
- package/lib/components/offlineAccount/config/index.js +35 -0
- package/lib/components/pay/detail/index.d.ts +9 -0
- package/lib/components/pay/detail/index.js +297 -0
- package/lib/components/payConfig/system/web.pc.d.ts +13 -0
- package/lib/components/payConfig/system/web.pc.js +122 -0
- package/lib/components/wpAccount/config/index.d.ts +3 -0
- package/lib/components/wpAccount/config/index.js +21 -0
- package/lib/configuration/attrUpdateMatrix.js +116 -8
- package/lib/configuration/relation.js +2 -1
- package/lib/context/BackendRuntimeContext.d.ts +489 -1
- package/lib/context/BackendRuntimeContext.js +1 -13
- package/lib/data/i18n.js +251 -57
- package/lib/entities/AbstractAccount.d.ts +10 -0
- package/lib/entities/AbstractAccount.js +32 -0
- package/lib/entities/Account.d.ts +4 -2
- package/lib/entities/Account.js +2 -1
- package/lib/entities/AccountOper.d.ts +1 -1
- package/lib/entities/AccountOper.js +6 -2
- package/lib/entities/Deposit.d.ts +21 -0
- package/lib/entities/Deposit.js +50 -0
- package/lib/entities/OfflineAccount.d.ts +23 -0
- package/lib/entities/OfflineAccount.js +61 -0
- package/lib/entities/Order.js +1 -1
- package/lib/entities/Pay.d.ts +8 -6
- package/lib/entities/Pay.js +8 -4
- package/lib/entities/SysAccountOper.d.ts +18 -0
- package/lib/entities/SysAccountOper.js +41 -0
- package/lib/entities/System.d.ts +19 -1
- package/lib/entities/System.js +3 -1
- package/lib/entities/WechatPay.d.ts +10 -0
- package/lib/entities/WechatPay.js +16 -0
- package/lib/entities/WithdrawAccount.d.ts +2 -0
- package/lib/entities/WithdrawAccount.js +1 -0
- package/lib/entities/WpAccount.d.ts +19 -0
- package/lib/entities/WpAccount.js +41 -0
- package/lib/entities/WpProduct.d.ts +17 -0
- package/lib/entities/WpProduct.js +39 -0
- package/lib/features/Pay.d.ts +8 -4
- package/lib/features/Pay.js +44 -11
- package/lib/features/index.js +4 -9
- package/lib/locales/common/zh_CN.json +13 -0
- package/lib/locales/error/zh-CN.json +7 -0
- package/lib/locales/offlineAccount/zh-CN.json +25 -0
- package/lib/locales/payChannel/zh-CN.json +3 -16
- package/lib/oak-app-domain/AbstractAccount/Action.d.ts +5 -0
- package/lib/oak-app-domain/AbstractAccount/Action.js +5 -0
- package/lib/oak-app-domain/AbstractAccount/Schema.d.ts +94 -0
- package/lib/oak-app-domain/AbstractAccount/Schema.js +2 -0
- package/lib/oak-app-domain/AbstractAccount/Storage.d.ts +3 -0
- package/lib/oak-app-domain/AbstractAccount/Storage.js +32 -0
- package/lib/oak-app-domain/AbstractAccount/Style.d.ts +3 -0
- package/lib/oak-app-domain/AbstractAccount/Style.js +12 -0
- package/lib/oak-app-domain/AbstractAccount/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/Account/Schema.d.ts +77 -40
- package/lib/oak-app-domain/Account/Storage.js +2 -2
- package/lib/oak-app-domain/Account/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/AccountOper/Schema.d.ts +35 -6
- package/lib/oak-app-domain/AccountOper/Storage.js +2 -2
- package/lib/oak-app-domain/AccountOper/Style.js +3 -1
- package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/ActionDefDict.d.ts +6 -0
- package/lib/oak-app-domain/ActionDefDict.js +20 -12
- package/lib/oak-app-domain/Application/Schema.d.ts +12 -7
- package/lib/oak-app-domain/Application/Storage.js +0 -3
- package/lib/oak-app-domain/Application/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Deposit/Action.d.ts +11 -0
- package/lib/oak-app-domain/Deposit/Action.js +14 -0
- package/lib/oak-app-domain/Deposit/Schema.d.ts +198 -0
- package/lib/oak-app-domain/Deposit/Schema.js +2 -0
- package/lib/oak-app-domain/Deposit/Storage.d.ts +3 -0
- package/lib/oak-app-domain/Deposit/Storage.js +32 -0
- package/lib/oak-app-domain/Deposit/Style.d.ts +3 -0
- package/lib/oak-app-domain/Deposit/Style.js +16 -0
- package/lib/oak-app-domain/Deposit/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/EntityDict.d.ts +14 -0
- package/lib/oak-app-domain/ModiEntity/Schema.d.ts +92 -5
- package/lib/oak-app-domain/ModiEntity/Storage.js +1 -1
- package/lib/oak-app-domain/OfflineAccount/Action.d.ts +5 -0
- package/lib/oak-app-domain/OfflineAccount/Action.js +5 -0
- package/lib/oak-app-domain/OfflineAccount/Schema.d.ts +207 -0
- package/lib/oak-app-domain/OfflineAccount/Schema.js +2 -0
- package/lib/oak-app-domain/OfflineAccount/Storage.d.ts +3 -0
- package/lib/oak-app-domain/OfflineAccount/Storage.js +73 -0
- package/lib/oak-app-domain/OfflineAccount/Style.d.ts +3 -0
- package/lib/oak-app-domain/OfflineAccount/Style.js +21 -0
- package/lib/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/OperEntity/Schema.d.ts +92 -5
- package/lib/oak-app-domain/OperEntity/Storage.js +1 -1
- package/lib/oak-app-domain/Pay/Action.d.ts +1 -1
- package/lib/oak-app-domain/Pay/Action.js +1 -1
- package/lib/oak-app-domain/Pay/Schema.d.ts +152 -38
- package/lib/oak-app-domain/Pay/Storage.js +16 -5
- package/lib/oak-app-domain/Pay/Style.js +1 -0
- package/lib/oak-app-domain/Pay/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Refund/Schema.d.ts +16 -3
- package/lib/oak-app-domain/Storage.js +30 -16
- package/lib/oak-app-domain/StyleDict.js +68 -56
- package/lib/oak-app-domain/SysAccountOper/Schema.d.ts +284 -0
- package/lib/oak-app-domain/SysAccountOper/Schema.js +2 -0
- package/lib/oak-app-domain/SysAccountOper/Storage.d.ts +3 -0
- package/lib/oak-app-domain/SysAccountOper/Storage.js +46 -0
- package/lib/oak-app-domain/SysAccountOper/Style.d.ts +3 -0
- package/lib/oak-app-domain/SysAccountOper/Style.js +13 -0
- package/lib/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/System/Schema.d.ts +91 -8
- package/lib/oak-app-domain/System/Storage.js +4 -2
- package/lib/oak-app-domain/System/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/User/Schema.d.ts +12 -0
- package/lib/oak-app-domain/WechatPay/Schema.d.ts +164 -0
- package/lib/oak-app-domain/WechatPay/Schema.js +2 -0
- package/lib/oak-app-domain/WechatPay/Storage.d.ts +3 -0
- package/lib/oak-app-domain/WechatPay/Storage.js +29 -0
- package/lib/oak-app-domain/WechatPay/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/Withdraw/Schema.d.ts +12 -0
- package/lib/oak-app-domain/WithdrawAccount/Schema.d.ts +71 -7
- package/lib/oak-app-domain/WithdrawAccount/Storage.js +6 -1
- package/lib/oak-app-domain/WithdrawAccount/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/WpAccount/Action.d.ts +5 -0
- package/lib/oak-app-domain/WpAccount/Action.js +5 -0
- package/lib/oak-app-domain/WpAccount/Schema.d.ts +258 -0
- package/lib/oak-app-domain/WpAccount/Schema.js +2 -0
- package/lib/oak-app-domain/WpAccount/Storage.d.ts +3 -0
- package/lib/oak-app-domain/WpAccount/Storage.js +72 -0
- package/lib/oak-app-domain/WpAccount/Style.d.ts +3 -0
- package/lib/oak-app-domain/WpAccount/Style.js +18 -0
- package/lib/oak-app-domain/WpAccount/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/WpProduct/Schema.d.ts +209 -0
- package/lib/oak-app-domain/WpProduct/Schema.js +2 -0
- package/lib/oak-app-domain/WpProduct/Storage.d.ts +3 -0
- package/lib/oak-app-domain/WpProduct/Storage.js +36 -0
- package/lib/oak-app-domain/WpProduct/Style.d.ts +3 -0
- package/lib/oak-app-domain/WpProduct/Style.js +14 -0
- package/lib/oak-app-domain/WpProduct/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/_SubQuery.d.ts +94 -4
- package/lib/ports/index.d.ts +1 -1
- package/lib/registry.d.ts +9 -0
- package/lib/registry.js +12 -0
- package/lib/routines/start.d.ts +1 -1
- package/lib/timers/index.d.ts +1 -1
- package/lib/triggers/account.js +59 -56
- package/lib/triggers/accountOper.js +0 -61
- package/lib/triggers/deposit.d.ts +1 -0
- package/lib/triggers/deposit.js +14 -0
- package/lib/triggers/index.d.ts +1 -1
- package/lib/triggers/index.js +4 -0
- package/lib/triggers/pay.d.ts +6 -0
- package/lib/triggers/pay.js +214 -77
- package/lib/triggers/refund.d.ts +6 -0
- package/lib/triggers/refund.js +77 -16
- package/lib/triggers/sysAccountOper.d.ts +5 -0
- package/lib/triggers/sysAccountOper.js +39 -0
- package/lib/triggers/system.d.ts +5 -0
- package/lib/triggers/system.js +33 -0
- package/lib/triggers/userSystem.js +1 -1
- package/lib/types/Exception.d.ts +1 -1
- package/lib/types/Pay.d.ts +17 -0
- package/lib/types/Pay.js +2 -0
- package/lib/types/PayClazz.d.ts +1 -2
- package/lib/utils/application.d.ts +493 -1
- package/lib/utils/application.js +39 -5
- package/lib/utils/pay.d.ts +4 -1
- package/lib/utils/pay.js +133 -73
- package/lib/utils/payClazz/Account.d.ts +0 -1
- package/lib/utils/payClazz/Account.js +4 -6
- package/lib/utils/payClazz/Offline.d.ts +0 -1
- package/lib/utils/payClazz/Offline.js +1 -2
- package/lib/utils/payClazz/WechatPay/WechatPay.d.ts +10 -4
- package/lib/utils/payClazz/WechatPay/WechatPay.debug.d.ts +3 -3
- package/lib/utils/payClazz/WechatPay/WechatPay.debug.js +9 -10
- package/lib/utils/payClazz/WechatPay/WechatPay.js +29 -17
- package/lib/utils/payClazz/index.d.ts +2 -5
- package/lib/utils/payClazz/index.js +58 -61
- package/lib/utils/wpProduct.d.ts +2 -0
- package/lib/utils/wpProduct.js +23 -0
- package/lib/utils/wpProductFrontend.d.ts +4 -0
- package/lib/utils/wpProductFrontend.js +35 -0
- package/lib/watchers/index.d.ts +1 -1
- package/lib/watchers/pay.js +2 -2
- package/lib/watchers/refund.js +3 -2
- package/package.json +4 -5
- package/src/entities/AbstractAccount.ts +51 -0
- package/src/entities/Account.ts +6 -3
- package/src/entities/AccountOper.ts +7 -3
- package/src/entities/Deposit.ts +76 -0
- package/src/entities/OfflineAccount.ts +90 -0
- package/src/entities/Order.ts +2 -1
- package/src/entities/Pay.ts +19 -10
- package/src/entities/SysAccountOper.ts +63 -0
- package/src/entities/System.ts +25 -2
- package/src/entities/WechatPay.ts +31 -0
- package/src/entities/WithdrawAccount.ts +3 -0
- package/src/entities/WpAccount.ts +67 -0
- package/src/entities/WpProduct.ts +62 -0
- package/lib/aspects/sample.d.ts +0 -2
- package/lib/aspects/sample.js +0 -7
- package/lib/config/connector.d.ts +0 -4
- package/lib/config/connector.js +0 -8
- package/lib/configuration/server.d.ts +0 -5
- package/lib/configuration/server.js +0 -10
- package/lib/entities/Application.d.ts +0 -5
- package/lib/entities/Application.js +0 -39
- package/lib/exceptionHandler.d.ts +0 -8
- package/lib/exceptionHandler.js +0 -51
- package/lib/features/Console.d.ts +0 -12
- package/lib/features/Console.js +0 -18
- package/lib/features/Menu.d.ts +0 -20
- package/lib/features/Menu.js +0 -65
- package/lib/features/Sample.d.ts +0 -15
- package/lib/features/Sample.js +0 -17
- package/lib/triggers/acount.js +0 -23
- package/src/entities/Application.ts +0 -54
|
@@ -63,9 +63,15 @@ const checkers = [
|
|
|
63
63
|
}
|
|
64
64
|
break;
|
|
65
65
|
}
|
|
66
|
-
case '
|
|
67
|
-
if (totalPlus
|
|
68
|
-
throw new OakInputIllegalException('accountOper', ['availPlus'], 'accountOper为
|
|
66
|
+
case 'earn': {
|
|
67
|
+
if (totalPlus <= 0 || availPlus < 0) {
|
|
68
|
+
throw new OakInputIllegalException('accountOper', ['availPlus'], 'accountOper为earn时,其totalPlus必须为正数、availPlus必须为非负数');
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
case 'encash': {
|
|
73
|
+
if (totalPlus !== 0 || availPlus <= 0) {
|
|
74
|
+
throw new OakInputIllegalException('accountOper', ['availPlus'], 'accountOper为encash时,其totalPlus必须为0、availPlus必须为正数');
|
|
69
75
|
}
|
|
70
76
|
break;
|
|
71
77
|
}
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { OakInputIllegalException } from 'oak-domain/lib/types';
|
|
3
|
-
const checkers = [
|
|
4
|
-
{
|
|
5
|
-
type: 'data',
|
|
6
|
-
entity: 'application',
|
|
7
|
-
action: 'update',
|
|
8
|
-
checker: (data, context) => {
|
|
9
|
-
const { payConfig } = (data || {});
|
|
10
|
-
if (payConfig) {
|
|
11
|
-
const wechatPayConfigs = payConfig.filter(ele => [
|
|
12
|
-
PAY_CHANNEL_WECHAT_APP_NAME,
|
|
13
|
-
PAY_CHANNEL_WECHAT_H5_NAME,
|
|
14
|
-
PAY_CHANNEL_WECHAT_JS_NAME,
|
|
15
|
-
PAY_CHANNEL_WECHAT_MP_NAME,
|
|
16
|
-
PAY_CHANNEL_WECHAT_NATIVE_NAME
|
|
17
|
-
].includes(ele.channel));
|
|
18
|
-
if (wechatPayConfigs) {
|
|
19
|
-
wechatPayConfigs.forEach((config) => {
|
|
20
|
-
const { apiV3Key } = config;
|
|
21
|
-
if (apiV3Key?.length && apiV3Key.length !== 32) {
|
|
22
|
-
throw new OakInputIllegalException('appliation', ['payConfig'], 'apiV3Key长度只能是32位');
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return 1;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
];
|
|
1
|
+
const checkers = [];
|
|
31
2
|
export default checkers;
|
package/es/checkers/index.js
CHANGED
|
@@ -2,10 +2,14 @@ import aoCheckers from './accountOper';
|
|
|
2
2
|
import payCheckers from './pay';
|
|
3
3
|
import orderCheckers from './order';
|
|
4
4
|
import applicationCheckers from './application';
|
|
5
|
+
import offlineAccountCheckers from './offlineAccount';
|
|
6
|
+
import wpProductCheckers from './wpProduct';
|
|
5
7
|
const checkers = [
|
|
6
8
|
...aoCheckers,
|
|
7
9
|
...payCheckers,
|
|
8
10
|
...orderCheckers,
|
|
9
11
|
...applicationCheckers,
|
|
12
|
+
...offlineAccountCheckers,
|
|
13
|
+
...wpProductCheckers,
|
|
10
14
|
];
|
|
11
15
|
export default checkers;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import { OakAttrNotNullException, OakInputIllegalException } from 'oak-domain/lib/types';
|
|
3
|
+
import { pipeline } from 'oak-domain/lib/utils/executor';
|
|
4
|
+
function checkAttributes(data) {
|
|
5
|
+
const { type, channel, name, qrCode } = data;
|
|
6
|
+
switch (type) {
|
|
7
|
+
case 'bank': {
|
|
8
|
+
if (!channel || !name || !qrCode) {
|
|
9
|
+
throw new OakAttrNotNullException('offlineAccount', ['channel', 'name', 'qrCode'].filter(ele => !data[ele]));
|
|
10
|
+
}
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
case 'shouqianba':
|
|
14
|
+
case 'wechat':
|
|
15
|
+
case 'alipay': {
|
|
16
|
+
if (!name && !qrCode) {
|
|
17
|
+
throw new OakInputIllegalException('offlineAccount', ['name', 'qrCode'], 'offlineAccount::error.nameQrCodeBothNull');
|
|
18
|
+
}
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
case 'others': {
|
|
22
|
+
if (!name && !qrCode) {
|
|
23
|
+
throw new OakAttrNotNullException('offlineAccount', ['name', 'qrCode']);
|
|
24
|
+
}
|
|
25
|
+
if (!channel) {
|
|
26
|
+
throw new OakAttrNotNullException('offlineAccount', ['channel']);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const checkers = [
|
|
32
|
+
{
|
|
33
|
+
entity: 'offlineAccount',
|
|
34
|
+
action: 'create',
|
|
35
|
+
type: 'data',
|
|
36
|
+
checker(data) {
|
|
37
|
+
assert(!(data instanceof Array));
|
|
38
|
+
checkAttributes(data);
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
entity: 'offlineAccount',
|
|
43
|
+
action: 'update',
|
|
44
|
+
type: 'logicalData',
|
|
45
|
+
checker: (operation, context) => {
|
|
46
|
+
const { data, filter } = operation;
|
|
47
|
+
return pipeline(() => context.select('offlineAccount', {
|
|
48
|
+
data: {
|
|
49
|
+
id: 1,
|
|
50
|
+
type: 1,
|
|
51
|
+
channel: 1,
|
|
52
|
+
name: 1,
|
|
53
|
+
qrCode: 1,
|
|
54
|
+
},
|
|
55
|
+
filter
|
|
56
|
+
}, { dontCollect: true }), (accounts) => {
|
|
57
|
+
accounts.forEach((ele) => checkAttributes(Object.assign(ele, data)));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
export default checkers;
|
package/es/checkers/pay.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { OakInputIllegalException } from 'oak-domain/lib/types';
|
|
2
|
-
import { CHECKER_MAX_PRIORITY } from 'oak-domain/lib/types/Trigger';
|
|
3
2
|
import { pipeline } from 'oak-domain/lib/utils/executor';
|
|
4
3
|
import assert from 'assert';
|
|
5
|
-
import { PAY_CHANNEL_ACCOUNT_NAME, PAY_CHANNEL_OFFLINE_NAME } from '../types/PayConfig';
|
|
6
4
|
const checkers = [
|
|
7
5
|
{
|
|
8
6
|
entity: 'pay',
|
|
@@ -24,26 +22,19 @@ const checkers = [
|
|
|
24
22
|
type: 'data',
|
|
25
23
|
action: 'create',
|
|
26
24
|
checker(data) {
|
|
27
|
-
const {
|
|
25
|
+
const { entity, entityId, price, orderId, depositId } = data;
|
|
28
26
|
if (price <= 0) {
|
|
29
27
|
throw new OakInputIllegalException('pay', ['price'], '支付金额必须大于0');
|
|
30
28
|
}
|
|
31
29
|
if (!orderId) {
|
|
32
30
|
// 充值类订单
|
|
33
|
-
if (!
|
|
31
|
+
if (!depositId) {
|
|
34
32
|
throw new OakInputIllegalException('pay', ['accountId'], '充值类支付必须指定accountId');
|
|
35
33
|
}
|
|
36
|
-
else if (
|
|
34
|
+
else if (entity === 'account') {
|
|
37
35
|
throw new OakInputIllegalException('pay', ['channel'], '充值类支付不能使用帐户支付');
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
|
-
else {
|
|
41
|
-
if (channel === PAY_CHANNEL_ACCOUNT_NAME) {
|
|
42
|
-
if (!accountId) {
|
|
43
|
-
throw new OakInputIllegalException('pay', ['accountId'], '使用account支付必须指向accountId');
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
38
|
}
|
|
48
39
|
},
|
|
49
40
|
{
|
|
@@ -103,7 +94,7 @@ const checkers = [
|
|
|
103
94
|
}
|
|
104
95
|
// 非root用户只能手动成功offline类型的pay
|
|
105
96
|
return {
|
|
106
|
-
|
|
97
|
+
entity: 'offlineAccount',
|
|
107
98
|
};
|
|
108
99
|
}
|
|
109
100
|
},
|
|
@@ -112,11 +103,11 @@ const checkers = [
|
|
|
112
103
|
entity: 'pay',
|
|
113
104
|
type: 'logical',
|
|
114
105
|
action: ['continuePaying', 'startPaying'],
|
|
115
|
-
priority: CHECKER_MAX_PRIORITY - 1,
|
|
106
|
+
// priority: CHECKER_MAX_PRIORITY - 1, // 要超过action矩阵定义的赋state值
|
|
116
107
|
checker: (operation, context) => {
|
|
117
108
|
const { data, filter } = operation;
|
|
118
109
|
assert(filter && typeof filter.id === 'string');
|
|
119
|
-
const { paid } = data;
|
|
110
|
+
const { paid } = data || {};
|
|
120
111
|
if (paid) {
|
|
121
112
|
return pipeline(() => context.select('pay', {
|
|
122
113
|
data: {
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { pipeline } from 'oak-domain/lib/utils/executor';
|
|
2
|
+
import assert from 'assert';
|
|
3
|
+
import { getAppTypeFromProductType } from '../utils/wpProduct';
|
|
4
|
+
import { OakInputIllegalException } from 'oak-domain/lib/types';
|
|
5
|
+
const checkers = [
|
|
6
|
+
{
|
|
7
|
+
entity: 'wpProduct',
|
|
8
|
+
action: 'create',
|
|
9
|
+
type: 'row',
|
|
10
|
+
filter(operation) {
|
|
11
|
+
const { data } = operation;
|
|
12
|
+
if (data) {
|
|
13
|
+
const { type, enabled } = data;
|
|
14
|
+
if (enabled) {
|
|
15
|
+
return {
|
|
16
|
+
application: {
|
|
17
|
+
wpProduct$application: {
|
|
18
|
+
"#sqp": 'not in',
|
|
19
|
+
enabled: true,
|
|
20
|
+
type,
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
errMsg: '同一应用上不能存在同样类型的支付产品',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
entity: 'wpProduct',
|
|
31
|
+
action: 'update',
|
|
32
|
+
type: 'row',
|
|
33
|
+
filter(operation, context) {
|
|
34
|
+
const { data, filter } = operation;
|
|
35
|
+
if (data && data.enabled) {
|
|
36
|
+
assert(filter.id && typeof filter.id === 'string');
|
|
37
|
+
return pipeline(() => context.select('wpProduct', {
|
|
38
|
+
data: {
|
|
39
|
+
id: 1,
|
|
40
|
+
type: 1,
|
|
41
|
+
applicationId: 1,
|
|
42
|
+
},
|
|
43
|
+
filter,
|
|
44
|
+
}, { dontCollect: true }), (wpProducts) => {
|
|
45
|
+
const [wpProduct] = wpProducts;
|
|
46
|
+
const { type } = wpProduct;
|
|
47
|
+
return {
|
|
48
|
+
application: {
|
|
49
|
+
wpProduct$application: {
|
|
50
|
+
"#sqp": 'not in',
|
|
51
|
+
enabled: true,
|
|
52
|
+
type,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
errMsg: 'error::wpProduct.repeatProductsOnSameApp',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
entity: 'wpProduct',
|
|
63
|
+
action: 'create',
|
|
64
|
+
type: 'logicalData',
|
|
65
|
+
checker(operation, context) {
|
|
66
|
+
const { data } = operation;
|
|
67
|
+
if (data) {
|
|
68
|
+
const { type, applicationId } = data;
|
|
69
|
+
if (type && applicationId) {
|
|
70
|
+
return pipeline(() => context.select('application', {
|
|
71
|
+
data: {
|
|
72
|
+
id: 1,
|
|
73
|
+
type: 1,
|
|
74
|
+
config: 1,
|
|
75
|
+
},
|
|
76
|
+
filter: {
|
|
77
|
+
id: applicationId,
|
|
78
|
+
}
|
|
79
|
+
}, { dontCollect: true }), (applications) => {
|
|
80
|
+
const { type, config } = applications[0];
|
|
81
|
+
if (!getAppTypeFromProductType(data.type).includes(type)) {
|
|
82
|
+
throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.TypeConflict');
|
|
83
|
+
}
|
|
84
|
+
switch (type) {
|
|
85
|
+
case 'web': {
|
|
86
|
+
const { wechat } = config;
|
|
87
|
+
if (!wechat?.appId) {
|
|
88
|
+
throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp');
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case 'wechatMp': {
|
|
93
|
+
const { appId } = config;
|
|
94
|
+
if (!appId) {
|
|
95
|
+
throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp');
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'wechatPublic': {
|
|
100
|
+
const { appId } = config;
|
|
101
|
+
if (!appId) {
|
|
102
|
+
throw new OakInputIllegalException('wpProduct', ['applicationId'], 'error::wpProduct.NoWechatInfoOnApp');
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
export default checkers;
|
|
@@ -20,7 +20,7 @@ declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<Enti
|
|
|
20
20
|
rowSelection?: any;
|
|
21
21
|
hideHeader?: boolean | undefined;
|
|
22
22
|
disableSerialNumber?: boolean | undefined;
|
|
23
|
-
size?: "small" | "
|
|
23
|
+
size?: "small" | "middle" | "large" | undefined;
|
|
24
24
|
scroll?: ({
|
|
25
25
|
x?: string | number | true | undefined;
|
|
26
26
|
y?: string | number | undefined;
|
|
@@ -46,7 +46,7 @@ declare const ListPro: <T extends keyof EntityDict>(props: {
|
|
|
46
46
|
tablePagination?: any;
|
|
47
47
|
rowSelection?: any;
|
|
48
48
|
disableSerialNumber?: boolean | undefined;
|
|
49
|
-
size?: "small" | "
|
|
49
|
+
size?: "small" | "middle" | "large" | undefined;
|
|
50
50
|
scroll?: any;
|
|
51
51
|
locale?: any;
|
|
52
52
|
opWidth?: number | undefined;
|
|
@@ -58,14 +58,14 @@ declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<En
|
|
|
58
58
|
data: Partial<EntityDict[T]["Schema"]>;
|
|
59
59
|
title?: string | undefined;
|
|
60
60
|
bordered?: boolean | undefined;
|
|
61
|
-
layout?: "
|
|
61
|
+
layout?: "vertical" | "horizontal" | undefined;
|
|
62
62
|
}>) => React.ReactElement;
|
|
63
63
|
declare const Upsert: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
|
64
64
|
helps: Record<string, string>;
|
|
65
65
|
entity: T;
|
|
66
66
|
attributes: OakAbsAttrUpsertDef<EntityDict, T, string | number>[];
|
|
67
67
|
data: EntityDict[T]["Schema"];
|
|
68
|
-
layout: "
|
|
68
|
+
layout: "vertical" | "horizontal";
|
|
69
69
|
mode: "default" | "card";
|
|
70
70
|
}>) => React.ReactElement;
|
|
71
71
|
export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index",
|
|
6
6
|
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
|
|
7
7
|
"l-notice-bar": "@oak-frontend-base/miniprogram_npm/lin-ui/notice-bar/index",
|
|
8
|
-
"pay-channel-picker": "../../pay/
|
|
8
|
+
"pay-channel-picker": "../../pay/channelPicker2/index"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import ChannelPicker from '../../pay/channelPicker';
|
|
3
2
|
import { Form, Input, NoticeBar } from 'antd-mobile';
|
|
4
3
|
export default function Render(props) {
|
|
5
4
|
const { depositMax, payConfig, tips, price, channel, meta, priceStr, onSetChannel, onSetMeta } = props.data;
|
|
@@ -22,9 +21,15 @@ export default function Render(props) {
|
|
|
22
21
|
{price > 0 && <Form.Item label={<span>
|
|
23
22
|
{t('label.channel')}:
|
|
24
23
|
</span>}>
|
|
25
|
-
<ChannelPicker
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
{/* <ChannelPicker
|
|
25
|
+
payConfig={payConfig}
|
|
26
|
+
onPick={(channel) => {
|
|
27
|
+
onSetChannel(channel);
|
|
28
|
+
}}
|
|
29
|
+
channel={channel}
|
|
30
|
+
meta={meta}
|
|
31
|
+
onSetMeta={(meta) => onSetMeta(meta)}
|
|
32
|
+
/> */}
|
|
28
33
|
</Form.Item>}
|
|
29
34
|
</Form>);
|
|
30
35
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Form, InputNumber, Alert } from 'antd';
|
|
3
|
-
import ChannelPicker from '../../pay/channelPicker';
|
|
4
3
|
import { ToYuan } from 'oak-domain/lib/utils/money';
|
|
5
4
|
import Styles from './web.pc.module.less';
|
|
6
5
|
export default function Render(props) {
|
|
@@ -17,9 +16,15 @@ export default function Render(props) {
|
|
|
17
16
|
{price > 0 ? <Form.Item label={<span style={{ marginTop: 10 }}>
|
|
18
17
|
{t('label.channel')}:
|
|
19
18
|
</span>}>
|
|
20
|
-
<ChannelPicker
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
{/* <ChannelPicker
|
|
20
|
+
payConfig={payConfig}
|
|
21
|
+
onPick={(channel) => {
|
|
22
|
+
onSetChannel(channel);
|
|
23
|
+
}}
|
|
24
|
+
channel={channel}
|
|
25
|
+
meta={meta}
|
|
26
|
+
onSetMeta={(meta) => onSetMeta(meta)}
|
|
27
|
+
/> */}
|
|
23
28
|
</Form.Item> : <div style={{ height: 120 }}/>}
|
|
24
29
|
</Form>);
|
|
25
30
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "account", false, {
|
|
2
2
|
depositMinCent: number;
|
|
3
3
|
depositMaxCent: number;
|
|
4
|
-
|
|
4
|
+
onGoToUnfinishedPay: (payId: string) => void;
|
|
5
5
|
onWithdraw: () => void;
|
|
6
|
+
textColor: string;
|
|
7
|
+
priceColor: string;
|
|
8
|
+
bgColor: string;
|
|
6
9
|
}>) => React.ReactElement;
|
|
7
10
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CentToString
|
|
1
|
+
import { CentToString } from "oak-domain/lib/utils/money";
|
|
2
2
|
import { generateNewIdAsync } from "oak-domain/lib/utils/uuid";
|
|
3
3
|
import assert from 'assert';
|
|
4
4
|
import { DATA_SUBSCRIBER_KEYS } from "../../../config/constants";
|
|
@@ -9,24 +9,26 @@ export default OakComponent({
|
|
|
9
9
|
id: 1,
|
|
10
10
|
total: 1,
|
|
11
11
|
avail: 1,
|
|
12
|
-
|
|
12
|
+
ofSystemId: 1,
|
|
13
13
|
entity: 1,
|
|
14
14
|
entityId: 1,
|
|
15
|
-
|
|
16
|
-
$entity: '
|
|
15
|
+
deposit$account: {
|
|
16
|
+
$entity: 'deposit',
|
|
17
17
|
data: {
|
|
18
18
|
id: 1,
|
|
19
|
+
pay$deposit: {
|
|
20
|
+
$entity: 'pay',
|
|
21
|
+
data: {
|
|
22
|
+
id: 1,
|
|
23
|
+
},
|
|
24
|
+
filter: {
|
|
25
|
+
iState: 'paying',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
19
28
|
},
|
|
20
29
|
filter: {
|
|
21
|
-
iState:
|
|
22
|
-
$in: ['unpaid', 'paying'],
|
|
23
|
-
},
|
|
24
|
-
orderId: {
|
|
25
|
-
$exists: false,
|
|
26
|
-
},
|
|
30
|
+
iState: 'depositing',
|
|
27
31
|
},
|
|
28
|
-
indexFrom: 0,
|
|
29
|
-
count: 1,
|
|
30
32
|
},
|
|
31
33
|
accountOper$account: {
|
|
32
34
|
$entity: 'accountOper',
|
|
@@ -51,38 +53,27 @@ export default OakComponent({
|
|
|
51
53
|
properties: {
|
|
52
54
|
depositMinCent: 0,
|
|
53
55
|
depositMaxCent: 1000000,
|
|
54
|
-
|
|
56
|
+
onGoToUnfinishedPay: (payId) => undefined,
|
|
55
57
|
onWithdraw: () => undefined,
|
|
58
|
+
textColor: '#B7966E',
|
|
59
|
+
priceColor: '#8A6321',
|
|
60
|
+
bgColor: '#EAD8BC',
|
|
56
61
|
},
|
|
57
62
|
formData({ data }) {
|
|
58
|
-
const
|
|
63
|
+
const unfinishedDepositId = data?.deposit$account?.[0]?.id;
|
|
59
64
|
return {
|
|
60
65
|
account: data,
|
|
61
66
|
availStr: data?.avail && CentToString(data.avail, 2),
|
|
62
67
|
totalStr: data?.total && CentToString(data.total, 2),
|
|
63
|
-
|
|
68
|
+
loanStr: (data?.avail !== undefined && data?.total !== undefined) && CentToString(data.total - data.avail, 2),
|
|
69
|
+
unfinishedDepositId,
|
|
64
70
|
};
|
|
65
71
|
},
|
|
66
72
|
actions: ['deposit', 'withdraw'],
|
|
67
73
|
methods: {
|
|
68
|
-
async
|
|
69
|
-
const { depPrice, depositChannel,
|
|
74
|
+
async newDeposit() {
|
|
75
|
+
const { depPrice, depositChannel, depositLoss } = this.state;
|
|
70
76
|
const payId = await generateNewIdAsync();
|
|
71
|
-
const { oakId, depositMaxCent, depositMinCent } = this.props;
|
|
72
|
-
if (depPrice > depositMaxCent) {
|
|
73
|
-
this.setMessage({
|
|
74
|
-
type: 'error',
|
|
75
|
-
content: this.t('error.maxOverflow', { value: ToYuan(depositMaxCent) }),
|
|
76
|
-
});
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
else if (depPrice < depositMinCent) {
|
|
80
|
-
this.setMessage({
|
|
81
|
-
type: 'error',
|
|
82
|
-
content: this.t('error.minOverflow', { value: ToYuan(depositMinCent) }),
|
|
83
|
-
});
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
77
|
this.setDepositing(true);
|
|
87
78
|
try {
|
|
88
79
|
await this.execute(undefined, undefined, undefined, [
|
|
@@ -92,21 +83,35 @@ export default OakComponent({
|
|
|
92
83
|
id: await generateNewIdAsync(),
|
|
93
84
|
action: 'deposit',
|
|
94
85
|
data: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
86
|
+
deposit$account: [
|
|
87
|
+
{
|
|
88
|
+
id: await generateNewIdAsync(),
|
|
89
|
+
action: 'create',
|
|
90
|
+
data: {
|
|
91
|
+
id: await generateNewIdAsync(),
|
|
92
|
+
price: depPrice,
|
|
93
|
+
loss: depositLoss[0] || 0,
|
|
94
|
+
creatorId: this.features.token.getUserId(),
|
|
95
|
+
pay$deposit: [
|
|
96
|
+
{
|
|
97
|
+
id: await generateNewIdAsync(),
|
|
98
|
+
action: 'create',
|
|
99
|
+
data: {
|
|
100
|
+
id: payId,
|
|
101
|
+
price: depPrice,
|
|
102
|
+
entity: depositChannel.entity,
|
|
103
|
+
entityId: depositChannel.entityId,
|
|
104
|
+
},
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
105
110
|
},
|
|
106
111
|
filter: {
|
|
107
|
-
id: oakId,
|
|
112
|
+
id: this.props.oakId,
|
|
108
113
|
}
|
|
109
|
-
}
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
]);
|
|
112
117
|
this.setDepositing(false);
|
|
@@ -116,11 +121,8 @@ export default OakComponent({
|
|
|
116
121
|
throw err;
|
|
117
122
|
}
|
|
118
123
|
this.onDepositModalClose();
|
|
119
|
-
const {
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
setDepositMeta(depositMeta) {
|
|
123
|
-
this.setState({ depositMeta });
|
|
124
|
+
const { onGoToUnfinishedPay } = this.props;
|
|
125
|
+
onGoToUnfinishedPay && onGoToUnfinishedPay(payId);
|
|
124
126
|
},
|
|
125
127
|
setDepositOpen(depositOpen) {
|
|
126
128
|
this.setState({ depositOpen });
|
|
@@ -129,17 +131,27 @@ export default OakComponent({
|
|
|
129
131
|
this.setState({ ufOpen });
|
|
130
132
|
},
|
|
131
133
|
setDepPrice(depPrice) {
|
|
132
|
-
this.setState({ depPrice });
|
|
134
|
+
this.setState({ depPrice }, () => this.setDepositLoss());
|
|
133
135
|
},
|
|
134
136
|
setDepositChannel(depositChannel) {
|
|
135
|
-
this.setState({ depositChannel });
|
|
137
|
+
this.setState({ depositChannel }, () => this.setDepositLoss());
|
|
138
|
+
},
|
|
139
|
+
setDepositLoss() {
|
|
140
|
+
const { depPrice, depositChannel } = this.state;
|
|
141
|
+
if (depPrice && depositChannel) {
|
|
142
|
+
const depositLoss = this.features.pay.calcDepositLoss(depPrice, depositChannel);
|
|
143
|
+
this.setState({ depositLoss });
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.setState({ depositLoss: [0, '', undefined] });
|
|
147
|
+
}
|
|
136
148
|
},
|
|
137
149
|
setDepositing(depositing) {
|
|
138
150
|
this.setState({ depositing });
|
|
139
151
|
},
|
|
140
152
|
onDepositClick() {
|
|
141
|
-
const {
|
|
142
|
-
if (
|
|
153
|
+
const { unfinishedDepositId } = this.state;
|
|
154
|
+
if (unfinishedDepositId) {
|
|
143
155
|
this.setUfOpen(true);
|
|
144
156
|
}
|
|
145
157
|
else {
|
|
@@ -150,15 +162,23 @@ export default OakComponent({
|
|
|
150
162
|
this.setDepositOpen(false);
|
|
151
163
|
this.setDepPrice(null);
|
|
152
164
|
this.setDepositChannel(undefined);
|
|
153
|
-
this.setDepositMeta(undefined);
|
|
154
165
|
},
|
|
155
166
|
onUfModalClose() {
|
|
156
167
|
this.setUfOpen(false);
|
|
157
168
|
},
|
|
158
|
-
|
|
159
|
-
const {
|
|
160
|
-
const {
|
|
161
|
-
|
|
169
|
+
onUnfinishedDepositClick() {
|
|
170
|
+
const { onGoToUnfinishedPay } = this.props;
|
|
171
|
+
const { unfinishedDepositId } = this.state;
|
|
172
|
+
const [pay] = this.features.cache.get('pay', {
|
|
173
|
+
data: {
|
|
174
|
+
id: 1,
|
|
175
|
+
},
|
|
176
|
+
filter: {
|
|
177
|
+
depositId: unfinishedDepositId,
|
|
178
|
+
iState: 'paying',
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
onGoToUnfinishedPay && onGoToUnfinishedPay(pay.id);
|
|
162
182
|
},
|
|
163
183
|
onWithdrawClick() {
|
|
164
184
|
this.props.onWithdraw();
|
|
@@ -169,11 +189,10 @@ export default OakComponent({
|
|
|
169
189
|
ufOpen: false,
|
|
170
190
|
depPrice: null,
|
|
171
191
|
depositChannel: undefined,
|
|
172
|
-
|
|
192
|
+
depositLoss: [0, '', {}],
|
|
173
193
|
depositing: false,
|
|
174
194
|
setDepPriceMp(price) { this.setDepPrice(price); },
|
|
175
195
|
setDepositChannelMp(depositChannel) { this.setDepositChannel(depositChannel); },
|
|
176
|
-
setDepositMetaMp(depositMeta) { this.setDepositMeta(depositMeta); }
|
|
177
196
|
},
|
|
178
197
|
lifetimes: {
|
|
179
198
|
ready() {
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
|
|
4
4
|
"l-popup": "@oak-frontend-base/miniprogram_npm/lin-ui/popup/index",
|
|
5
5
|
"l-dialog": "@oak-frontend-base/miniprogram_npm/lin-ui/dialog/index",
|
|
6
|
-
"
|
|
6
|
+
"deposit-new": "../../deposit/new/index"
|
|
7
7
|
}
|
|
8
8
|
}
|