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.
Files changed (513) hide show
  1. package/es/checkers/accountOper.js +9 -3
  2. package/es/checkers/application.js +1 -30
  3. package/es/checkers/index.js +4 -0
  4. package/es/checkers/offlineAccount.d.ts +5 -0
  5. package/es/checkers/offlineAccount.js +62 -0
  6. package/es/checkers/pay.js +6 -15
  7. package/es/checkers/wpProduct.d.ts +5 -0
  8. package/es/checkers/wpProduct.js +113 -0
  9. package/es/components/AbstractComponents.d.ts +4 -4
  10. package/es/components/account/deposit/index.json +1 -1
  11. package/es/components/account/deposit/web.js +9 -4
  12. package/es/components/account/deposit/web.pc.js +9 -4
  13. package/es/components/account/detail/index.d.ts +4 -1
  14. package/es/components/account/detail/index.js +79 -60
  15. package/es/components/account/detail/index.json +1 -1
  16. package/es/components/account/detail/index.less +50 -17
  17. package/es/components/account/detail/index.xml +27 -15
  18. package/es/components/account/detail/locales/zh-CN.json +3 -2
  19. package/es/components/account/detail/web.d.ts +11 -7
  20. package/es/components/account/detail/web.js +37 -30
  21. package/es/components/account/detail/web.mobile.module.less +39 -17
  22. package/es/components/account/detail/web.pc.d.ts +8 -6
  23. package/es/components/account/detail/web.pc.js +8 -8
  24. package/es/components/deposit/new/index.d.ts +12 -0
  25. package/es/components/deposit/new/index.js +66 -0
  26. package/es/components/deposit/new/index.json +9 -0
  27. package/es/components/deposit/new/index.less +7 -0
  28. package/es/components/deposit/new/index.xml +38 -0
  29. package/es/components/deposit/new/locales/zh-CN.json +14 -0
  30. package/es/components/deposit/new/web.d.ts +17 -0
  31. package/es/components/deposit/new/web.js +35 -0
  32. package/es/components/deposit/new/web.pc.d.ts +16 -0
  33. package/es/components/deposit/new/web.pc.js +31 -0
  34. package/es/components/deposit/new/web.pc.module.less +11 -0
  35. package/es/components/offlineAccount/config/index.d.ts +4 -0
  36. package/es/components/offlineAccount/config/index.js +33 -0
  37. package/es/components/offlineAccount/config/index.json +1 -0
  38. package/es/components/offlineAccount/config/locales/zh-CN.json +7 -0
  39. package/es/components/offlineAccount/config/web.pc.d.ts +10 -0
  40. package/es/components/offlineAccount/config/web.pc.js +110 -0
  41. package/es/components/offlineAccount/config/web.pc.module.less +55 -0
  42. package/es/components/offlineAccount/index.d.ts +3 -0
  43. package/es/components/offlineAccount/index.js +17 -0
  44. package/es/components/offlineAccount/index.json +1 -0
  45. package/es/components/offlineAccount/locales/zh-CN.json +3 -0
  46. package/es/components/offlineAccount/upsert/index.d.ts +3 -0
  47. package/es/components/offlineAccount/upsert/index.js +34 -0
  48. package/es/components/offlineAccount/upsert/index.json +1 -0
  49. package/es/components/offlineAccount/upsert/locales/zh-CN.json +28 -0
  50. package/es/components/offlineAccount/upsert/web.pc.d.ts +6 -0
  51. package/es/components/offlineAccount/upsert/web.pc.js +73 -0
  52. package/es/components/offlineAccount/web.pc.d.ts +6 -0
  53. package/es/components/offlineAccount/web.pc.js +27 -0
  54. package/es/components/order/pay/web.js +8 -2
  55. package/es/components/order/pay/web.pc.js +8 -2
  56. package/es/components/pay/channelPicker2/index.d.ts +7 -0
  57. package/es/components/pay/channelPicker2/index.js +39 -0
  58. package/es/components/pay/channelPicker2/index.json +6 -0
  59. package/es/components/pay/channelPicker2/index.less +31 -0
  60. package/es/components/pay/channelPicker2/index.xml +21 -0
  61. package/es/components/pay/channelPicker2/locales/zh-CN.json +3 -0
  62. package/es/components/pay/channelPicker2/web.d.ts +11 -0
  63. package/es/components/pay/channelPicker2/web.js +9 -0
  64. package/es/components/pay/channelPicker2/web.pc.d.ts +11 -0
  65. package/es/components/pay/channelPicker2/web.pc.js +6 -0
  66. package/es/components/pay/detail/index.d.ts +3 -0
  67. package/es/components/pay/detail/index.js +207 -120
  68. package/es/components/pay/detail/index.json +5 -1
  69. package/es/components/pay/detail/index.less +149 -88
  70. package/es/components/pay/detail/index.xml +135 -135
  71. package/es/components/pay/detail/locales/zh-CN.json +13 -17
  72. package/es/components/pay/detail/web.d.ts +10 -7
  73. package/es/components/pay/detail/web.js +97 -49
  74. package/es/components/pay/detail/web.mobile.module.less +4 -0
  75. package/es/components/pay/detail/web.pc.d.ts +10 -7
  76. package/es/components/pay/detail/web.pc.js +104 -54
  77. package/es/components/pay/detail/web.pc.module.less +16 -2
  78. package/es/components/pay/list/index.js +59 -12
  79. package/es/components/pay/list/locales/zh-CN.json +1 -0
  80. package/es/components/pay/list/web.pc.d.ts +5 -2
  81. package/es/components/pay/list/web.pc.js +54 -19
  82. package/es/components/pay/list/web.pc.module.less +5 -0
  83. package/es/components/payConfig/system/index.js +5 -17
  84. package/es/components/payConfig/system/web.pc.d.ts +5 -11
  85. package/es/components/payConfig/system/web.pc.js +19 -81
  86. package/es/components/payConfig/system/web.pc.module.less +3 -0
  87. package/es/components/wechatPay/upsert/index.d.ts +4 -0
  88. package/es/components/wechatPay/upsert/index.js +44 -0
  89. package/es/components/wechatPay/upsert/index.json +1 -0
  90. package/es/components/wechatPay/upsert/locales/zh-CN.json +7 -0
  91. package/es/components/wechatPay/upsert/web.pc.d.ts +7 -0
  92. package/es/components/wechatPay/upsert/web.pc.js +23 -0
  93. package/es/components/wechatPay/upsert/web.pc.module.less +3 -0
  94. package/es/components/withdraw/create/index.js +2 -2
  95. package/es/components/withdraw/create/locales/zh-CN.json +1 -11
  96. package/es/components/withdraw/dry/Detail.pc.js +10 -10
  97. package/es/components/withdraw/dry/index.d.ts +2 -2
  98. package/es/components/withdraw/dry/locales/zh-CN.json +1 -1
  99. package/es/components/wpAccount/config/index.d.ts +3 -0
  100. package/es/components/wpAccount/config/index.js +21 -0
  101. package/es/components/wpAccount/config/index.json +1 -0
  102. package/es/components/wpAccount/config/locales/zh-CN.json +7 -0
  103. package/es/components/wpAccount/config/web.pc.d.ts +8 -0
  104. package/es/components/wpAccount/config/web.pc.js +112 -0
  105. package/es/components/wpAccount/config/web.pc.module.less +55 -0
  106. package/es/components/wpAccount/upsert/index.d.ts +4 -0
  107. package/es/components/wpAccount/upsert/index.js +70 -0
  108. package/es/components/wpAccount/upsert/index.json +1 -0
  109. package/es/components/wpAccount/upsert/locales/zh-CN.json +15 -0
  110. package/es/components/wpAccount/upsert/web.pc.d.ts +8 -0
  111. package/es/components/wpAccount/upsert/web.pc.js +84 -0
  112. package/es/components/wpAccount/upsert/web.pc.module.less +4 -0
  113. package/es/components/wpProduct/config/index.d.ts +5 -0
  114. package/es/components/wpProduct/config/index.js +52 -0
  115. package/es/components/wpProduct/config/index.json +1 -0
  116. package/es/components/wpProduct/config/locales/zh-CN.json +7 -0
  117. package/es/components/wpProduct/config/web.pc.d.ts +9 -0
  118. package/es/components/wpProduct/config/web.pc.js +98 -0
  119. package/es/components/wpProduct/config/web.pc.module.less +62 -0
  120. package/es/components/wpProduct/upsert/index.d.ts +5 -0
  121. package/es/components/wpProduct/upsert/index.js +57 -0
  122. package/es/components/wpProduct/upsert/index.json +1 -0
  123. package/es/components/wpProduct/upsert/locales/zh-CN.json +5 -0
  124. package/es/components/wpProduct/upsert/web.pc.d.ts +8 -0
  125. package/es/components/wpProduct/upsert/web.pc.js +34 -0
  126. package/es/configuration/attrUpdateMatrix.js +110 -8
  127. package/es/configuration/relation.js +2 -1
  128. package/es/context/BackendRuntimeContext.d.ts +489 -1
  129. package/es/context/BackendRuntimeContext.js +2 -14
  130. package/es/data/i18n.js +229 -54
  131. package/es/entities/AbstractAccount.d.ts +14 -0
  132. package/es/entities/AbstractAccount.js +43 -0
  133. package/es/entities/Account.d.ts +4 -2
  134. package/es/entities/Account.js +2 -1
  135. package/es/entities/AccountOper.d.ts +1 -1
  136. package/es/entities/AccountOper.js +4 -2
  137. package/es/entities/Deposit.d.ts +21 -0
  138. package/es/entities/Deposit.js +47 -0
  139. package/es/entities/OfflineAccount.d.ts +30 -0
  140. package/es/entities/OfflineAccount.js +63 -0
  141. package/es/entities/Order.js +1 -1
  142. package/es/entities/Pay.d.ts +8 -6
  143. package/es/entities/Pay.js +8 -4
  144. package/es/entities/SysAccountOper.d.ts +18 -0
  145. package/es/entities/SysAccountOper.js +38 -0
  146. package/es/entities/System.d.ts +4 -2
  147. package/es/entities/System.js +2 -1
  148. package/es/entities/WechatPay.d.ts +10 -0
  149. package/es/entities/WechatPay.js +13 -0
  150. package/es/entities/WithdrawAccount.d.ts +2 -0
  151. package/es/entities/WithdrawAccount.js +1 -0
  152. package/es/entities/WpAccount.d.ts +21 -0
  153. package/es/entities/WpAccount.js +52 -0
  154. package/es/entities/WpProduct.d.ts +17 -0
  155. package/es/entities/WpProduct.js +36 -0
  156. package/es/features/Pay.d.ts +8 -4
  157. package/es/features/Pay.js +45 -12
  158. package/es/features/index.js +2 -7
  159. package/es/locales/common/zh_CN.json +11 -0
  160. package/es/locales/error/zh-CN.json +7 -0
  161. package/es/locales/offlineAccount/zh-CN.json +25 -0
  162. package/es/locales/payChannel/zh-CN.json +3 -16
  163. package/es/oak-app-domain/AbstractAccount/Action.d.ts +5 -0
  164. package/es/oak-app-domain/AbstractAccount/Action.js +2 -0
  165. package/es/oak-app-domain/AbstractAccount/Schema.d.ts +106 -0
  166. package/es/oak-app-domain/AbstractAccount/Schema.js +1 -0
  167. package/es/oak-app-domain/AbstractAccount/Storage.d.ts +3 -0
  168. package/es/oak-app-domain/AbstractAccount/Storage.js +40 -0
  169. package/es/oak-app-domain/AbstractAccount/Style.d.ts +3 -0
  170. package/es/oak-app-domain/AbstractAccount/Style.js +15 -0
  171. package/es/oak-app-domain/AbstractAccount/locales/zh_CN.json +1 -0
  172. package/es/oak-app-domain/Account/Schema.d.ts +93 -40
  173. package/es/oak-app-domain/Account/Storage.js +2 -2
  174. package/es/oak-app-domain/Account/locales/zh_CN.json +1 -1
  175. package/es/oak-app-domain/AccountOper/Schema.d.ts +35 -6
  176. package/es/oak-app-domain/AccountOper/Storage.js +2 -2
  177. package/es/oak-app-domain/AccountOper/Style.js +2 -1
  178. package/es/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
  179. package/es/oak-app-domain/ActionDefDict.d.ts +6 -0
  180. package/es/oak-app-domain/ActionDefDict.js +9 -1
  181. package/es/oak-app-domain/Application/Schema.d.ts +12 -7
  182. package/es/oak-app-domain/Application/Storage.js +0 -3
  183. package/es/oak-app-domain/Application/locales/zh_CN.json +1 -1
  184. package/es/oak-app-domain/Deposit/Action.d.ts +11 -0
  185. package/es/oak-app-domain/Deposit/Action.js +11 -0
  186. package/es/oak-app-domain/Deposit/Schema.d.ts +198 -0
  187. package/es/oak-app-domain/Deposit/Schema.js +1 -0
  188. package/es/oak-app-domain/Deposit/Storage.d.ts +3 -0
  189. package/es/oak-app-domain/Deposit/Storage.js +29 -0
  190. package/es/oak-app-domain/Deposit/Style.d.ts +3 -0
  191. package/es/oak-app-domain/Deposit/Style.js +13 -0
  192. package/es/oak-app-domain/Deposit/locales/zh_CN.json +1 -0
  193. package/es/oak-app-domain/EntityDict.d.ts +14 -0
  194. package/es/oak-app-domain/ModiEntity/Schema.d.ts +92 -5
  195. package/es/oak-app-domain/ModiEntity/Storage.js +1 -1
  196. package/es/oak-app-domain/OfflineAccount/Action.d.ts +5 -0
  197. package/es/oak-app-domain/OfflineAccount/Action.js +2 -0
  198. package/es/oak-app-domain/OfflineAccount/Schema.d.ts +235 -0
  199. package/es/oak-app-domain/OfflineAccount/Schema.js +1 -0
  200. package/es/oak-app-domain/OfflineAccount/Storage.d.ts +3 -0
  201. package/es/oak-app-domain/OfflineAccount/Storage.js +81 -0
  202. package/es/oak-app-domain/OfflineAccount/Style.d.ts +3 -0
  203. package/es/oak-app-domain/OfflineAccount/Style.js +18 -0
  204. package/es/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -0
  205. package/es/oak-app-domain/OperEntity/Schema.d.ts +92 -5
  206. package/es/oak-app-domain/OperEntity/Storage.js +1 -1
  207. package/es/oak-app-domain/Pay/Action.d.ts +1 -1
  208. package/es/oak-app-domain/Pay/Action.js +1 -1
  209. package/es/oak-app-domain/Pay/Schema.d.ts +152 -38
  210. package/es/oak-app-domain/Pay/Storage.js +16 -5
  211. package/es/oak-app-domain/Pay/Style.js +1 -0
  212. package/es/oak-app-domain/Pay/locales/zh_CN.json +1 -1
  213. package/es/oak-app-domain/Refund/Schema.d.ts +16 -3
  214. package/es/oak-app-domain/Storage.js +15 -1
  215. package/es/oak-app-domain/StyleDict.js +15 -3
  216. package/es/oak-app-domain/SysAccountOper/Schema.d.ts +284 -0
  217. package/es/oak-app-domain/SysAccountOper/Schema.js +1 -0
  218. package/es/oak-app-domain/SysAccountOper/Storage.d.ts +3 -0
  219. package/es/oak-app-domain/SysAccountOper/Storage.js +43 -0
  220. package/es/oak-app-domain/SysAccountOper/Style.d.ts +3 -0
  221. package/es/oak-app-domain/SysAccountOper/Style.js +10 -0
  222. package/es/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -0
  223. package/es/oak-app-domain/System/Schema.d.ts +77 -14
  224. package/es/oak-app-domain/System/Storage.js +0 -3
  225. package/es/oak-app-domain/System/locales/zh_CN.json +1 -1
  226. package/es/oak-app-domain/User/Schema.d.ts +12 -0
  227. package/es/oak-app-domain/WechatPay/Schema.d.ts +164 -0
  228. package/es/oak-app-domain/WechatPay/Schema.js +1 -0
  229. package/es/oak-app-domain/WechatPay/Storage.d.ts +3 -0
  230. package/es/oak-app-domain/WechatPay/Storage.js +26 -0
  231. package/es/oak-app-domain/WechatPay/locales/zh_CN.json +1 -0
  232. package/es/oak-app-domain/Withdraw/Schema.d.ts +12 -0
  233. package/es/oak-app-domain/WithdrawAccount/Schema.d.ts +77 -7
  234. package/es/oak-app-domain/WithdrawAccount/Storage.js +6 -1
  235. package/es/oak-app-domain/WithdrawAccount/locales/zh_CN.json +1 -1
  236. package/es/oak-app-domain/WpAccount/Action.d.ts +5 -0
  237. package/es/oak-app-domain/WpAccount/Action.js +2 -0
  238. package/es/oak-app-domain/WpAccount/Schema.d.ts +270 -0
  239. package/es/oak-app-domain/WpAccount/Schema.js +1 -0
  240. package/es/oak-app-domain/WpAccount/Storage.d.ts +3 -0
  241. package/es/oak-app-domain/WpAccount/Storage.js +80 -0
  242. package/es/oak-app-domain/WpAccount/Style.d.ts +3 -0
  243. package/es/oak-app-domain/WpAccount/Style.js +15 -0
  244. package/es/oak-app-domain/WpAccount/locales/zh_CN.json +1 -0
  245. package/es/oak-app-domain/WpProduct/Schema.d.ts +209 -0
  246. package/es/oak-app-domain/WpProduct/Schema.js +1 -0
  247. package/es/oak-app-domain/WpProduct/Storage.d.ts +3 -0
  248. package/es/oak-app-domain/WpProduct/Storage.js +33 -0
  249. package/es/oak-app-domain/WpProduct/Style.d.ts +3 -0
  250. package/es/oak-app-domain/WpProduct/Style.js +11 -0
  251. package/es/oak-app-domain/WpProduct/locales/zh_CN.json +1 -0
  252. package/es/oak-app-domain/_SubQuery.d.ts +94 -4
  253. package/es/registry.d.ts +9 -0
  254. package/es/registry.js +8 -0
  255. package/es/triggers/account.js +60 -55
  256. package/es/triggers/accountOper.js +0 -59
  257. package/es/triggers/deposit.d.ts +1 -0
  258. package/es/triggers/deposit.js +13 -0
  259. package/es/triggers/index.js +4 -0
  260. package/es/triggers/pay.d.ts +6 -0
  261. package/es/triggers/pay.js +201 -72
  262. package/es/triggers/refund.d.ts +6 -0
  263. package/es/triggers/refund.js +75 -16
  264. package/es/triggers/sysAccountOper.d.ts +5 -0
  265. package/es/triggers/sysAccountOper.js +36 -0
  266. package/{lib/triggers/acount.d.ts → es/triggers/system.d.ts} +1 -1
  267. package/es/triggers/system.js +30 -0
  268. package/es/triggers/userSystem.js +1 -1
  269. package/es/types/Pay.d.ts +17 -0
  270. package/es/types/Pay.js +1 -0
  271. package/es/types/PayClazz.d.ts +1 -2
  272. package/es/utils/application.d.ts +493 -1
  273. package/es/utils/application.js +37 -5
  274. package/es/utils/pay.d.ts +6 -1
  275. package/es/utils/pay.js +155 -64
  276. package/es/utils/payClazz/Account.d.ts +0 -1
  277. package/es/utils/payClazz/Account.js +19 -19
  278. package/es/utils/payClazz/Offline.d.ts +0 -1
  279. package/es/utils/payClazz/Offline.js +1 -2
  280. package/es/utils/payClazz/WechatPay/WechatPay.d.ts +10 -4
  281. package/es/utils/payClazz/WechatPay/WechatPay.debug.d.ts +3 -3
  282. package/es/utils/payClazz/WechatPay/WechatPay.debug.js +9 -10
  283. package/es/utils/payClazz/WechatPay/WechatPay.js +29 -17
  284. package/es/utils/payClazz/index.d.ts +2 -5
  285. package/es/utils/payClazz/index.js +57 -60
  286. package/es/utils/wpProduct.d.ts +2 -0
  287. package/es/utils/wpProduct.js +19 -0
  288. package/es/utils/wpProductFrontend.d.ts +4 -0
  289. package/es/utils/wpProductFrontend.js +30 -0
  290. package/es/watchers/pay.js +2 -2
  291. package/es/watchers/refund.js +3 -2
  292. package/lib/checkers/account.js +14 -1
  293. package/lib/checkers/accountOper.js +15 -3
  294. package/lib/checkers/application.js +1 -30
  295. package/lib/checkers/index.d.ts +1 -1
  296. package/lib/checkers/index.js +4 -0
  297. package/lib/checkers/offlineAccount.d.ts +5 -0
  298. package/lib/checkers/offlineAccount.js +65 -0
  299. package/lib/checkers/pay.js +6 -15
  300. package/lib/checkers/wpProduct.d.ts +5 -0
  301. package/lib/checkers/wpProduct.js +116 -0
  302. package/lib/components/offlineAccount/config/index.d.ts +4 -0
  303. package/lib/components/offlineAccount/config/index.js +35 -0
  304. package/lib/components/pay/detail/index.d.ts +9 -0
  305. package/lib/components/pay/detail/index.js +297 -0
  306. package/lib/components/payConfig/system/web.pc.d.ts +13 -0
  307. package/lib/components/payConfig/system/web.pc.js +122 -0
  308. package/lib/components/wpAccount/config/index.d.ts +3 -0
  309. package/lib/components/wpAccount/config/index.js +21 -0
  310. package/lib/configuration/attrUpdateMatrix.js +116 -8
  311. package/lib/configuration/relation.js +2 -1
  312. package/lib/context/BackendRuntimeContext.d.ts +489 -1
  313. package/lib/context/BackendRuntimeContext.js +1 -13
  314. package/lib/data/i18n.js +251 -57
  315. package/lib/entities/AbstractAccount.d.ts +10 -0
  316. package/lib/entities/AbstractAccount.js +32 -0
  317. package/lib/entities/Account.d.ts +4 -2
  318. package/lib/entities/Account.js +2 -1
  319. package/lib/entities/AccountOper.d.ts +1 -1
  320. package/lib/entities/AccountOper.js +6 -2
  321. package/lib/entities/Deposit.d.ts +21 -0
  322. package/lib/entities/Deposit.js +50 -0
  323. package/lib/entities/OfflineAccount.d.ts +23 -0
  324. package/lib/entities/OfflineAccount.js +61 -0
  325. package/lib/entities/Order.js +1 -1
  326. package/lib/entities/Pay.d.ts +8 -6
  327. package/lib/entities/Pay.js +8 -4
  328. package/lib/entities/SysAccountOper.d.ts +18 -0
  329. package/lib/entities/SysAccountOper.js +41 -0
  330. package/lib/entities/System.d.ts +19 -1
  331. package/lib/entities/System.js +3 -1
  332. package/lib/entities/WechatPay.d.ts +10 -0
  333. package/lib/entities/WechatPay.js +16 -0
  334. package/lib/entities/WithdrawAccount.d.ts +2 -0
  335. package/lib/entities/WithdrawAccount.js +1 -0
  336. package/lib/entities/WpAccount.d.ts +19 -0
  337. package/lib/entities/WpAccount.js +41 -0
  338. package/lib/entities/WpProduct.d.ts +17 -0
  339. package/lib/entities/WpProduct.js +39 -0
  340. package/lib/features/Pay.d.ts +8 -4
  341. package/lib/features/Pay.js +44 -11
  342. package/lib/features/index.js +4 -9
  343. package/lib/locales/common/zh_CN.json +13 -0
  344. package/lib/locales/error/zh-CN.json +7 -0
  345. package/lib/locales/offlineAccount/zh-CN.json +25 -0
  346. package/lib/locales/payChannel/zh-CN.json +3 -16
  347. package/lib/oak-app-domain/AbstractAccount/Action.d.ts +5 -0
  348. package/lib/oak-app-domain/AbstractAccount/Action.js +5 -0
  349. package/lib/oak-app-domain/AbstractAccount/Schema.d.ts +94 -0
  350. package/lib/oak-app-domain/AbstractAccount/Schema.js +2 -0
  351. package/lib/oak-app-domain/AbstractAccount/Storage.d.ts +3 -0
  352. package/lib/oak-app-domain/AbstractAccount/Storage.js +32 -0
  353. package/lib/oak-app-domain/AbstractAccount/Style.d.ts +3 -0
  354. package/lib/oak-app-domain/AbstractAccount/Style.js +12 -0
  355. package/lib/oak-app-domain/AbstractAccount/locales/zh_CN.json +1 -0
  356. package/lib/oak-app-domain/Account/Schema.d.ts +77 -40
  357. package/lib/oak-app-domain/Account/Storage.js +2 -2
  358. package/lib/oak-app-domain/Account/locales/zh_CN.json +1 -1
  359. package/lib/oak-app-domain/AccountOper/Schema.d.ts +35 -6
  360. package/lib/oak-app-domain/AccountOper/Storage.js +2 -2
  361. package/lib/oak-app-domain/AccountOper/Style.js +3 -1
  362. package/lib/oak-app-domain/AccountOper/locales/zh_CN.json +1 -1
  363. package/lib/oak-app-domain/ActionDefDict.d.ts +6 -0
  364. package/lib/oak-app-domain/ActionDefDict.js +20 -12
  365. package/lib/oak-app-domain/Application/Schema.d.ts +12 -7
  366. package/lib/oak-app-domain/Application/Storage.js +0 -3
  367. package/lib/oak-app-domain/Application/locales/zh_CN.json +1 -1
  368. package/lib/oak-app-domain/Deposit/Action.d.ts +11 -0
  369. package/lib/oak-app-domain/Deposit/Action.js +14 -0
  370. package/lib/oak-app-domain/Deposit/Schema.d.ts +198 -0
  371. package/lib/oak-app-domain/Deposit/Schema.js +2 -0
  372. package/lib/oak-app-domain/Deposit/Storage.d.ts +3 -0
  373. package/lib/oak-app-domain/Deposit/Storage.js +32 -0
  374. package/lib/oak-app-domain/Deposit/Style.d.ts +3 -0
  375. package/lib/oak-app-domain/Deposit/Style.js +16 -0
  376. package/lib/oak-app-domain/Deposit/locales/zh_CN.json +1 -0
  377. package/lib/oak-app-domain/EntityDict.d.ts +14 -0
  378. package/lib/oak-app-domain/ModiEntity/Schema.d.ts +92 -5
  379. package/lib/oak-app-domain/ModiEntity/Storage.js +1 -1
  380. package/lib/oak-app-domain/OfflineAccount/Action.d.ts +5 -0
  381. package/lib/oak-app-domain/OfflineAccount/Action.js +5 -0
  382. package/lib/oak-app-domain/OfflineAccount/Schema.d.ts +207 -0
  383. package/lib/oak-app-domain/OfflineAccount/Schema.js +2 -0
  384. package/lib/oak-app-domain/OfflineAccount/Storage.d.ts +3 -0
  385. package/lib/oak-app-domain/OfflineAccount/Storage.js +73 -0
  386. package/lib/oak-app-domain/OfflineAccount/Style.d.ts +3 -0
  387. package/lib/oak-app-domain/OfflineAccount/Style.js +21 -0
  388. package/lib/oak-app-domain/OfflineAccount/locales/zh_CN.json +1 -0
  389. package/lib/oak-app-domain/OperEntity/Schema.d.ts +92 -5
  390. package/lib/oak-app-domain/OperEntity/Storage.js +1 -1
  391. package/lib/oak-app-domain/Pay/Action.d.ts +1 -1
  392. package/lib/oak-app-domain/Pay/Action.js +1 -1
  393. package/lib/oak-app-domain/Pay/Schema.d.ts +152 -38
  394. package/lib/oak-app-domain/Pay/Storage.js +16 -5
  395. package/lib/oak-app-domain/Pay/Style.js +1 -0
  396. package/lib/oak-app-domain/Pay/locales/zh_CN.json +1 -1
  397. package/lib/oak-app-domain/Refund/Schema.d.ts +16 -3
  398. package/lib/oak-app-domain/Storage.js +30 -16
  399. package/lib/oak-app-domain/StyleDict.js +68 -56
  400. package/lib/oak-app-domain/SysAccountOper/Schema.d.ts +284 -0
  401. package/lib/oak-app-domain/SysAccountOper/Schema.js +2 -0
  402. package/lib/oak-app-domain/SysAccountOper/Storage.d.ts +3 -0
  403. package/lib/oak-app-domain/SysAccountOper/Storage.js +46 -0
  404. package/lib/oak-app-domain/SysAccountOper/Style.d.ts +3 -0
  405. package/lib/oak-app-domain/SysAccountOper/Style.js +13 -0
  406. package/lib/oak-app-domain/SysAccountOper/locales/zh_CN.json +1 -0
  407. package/lib/oak-app-domain/System/Schema.d.ts +91 -8
  408. package/lib/oak-app-domain/System/Storage.js +4 -2
  409. package/lib/oak-app-domain/System/locales/zh_CN.json +1 -1
  410. package/lib/oak-app-domain/User/Schema.d.ts +12 -0
  411. package/lib/oak-app-domain/WechatPay/Schema.d.ts +164 -0
  412. package/lib/oak-app-domain/WechatPay/Schema.js +2 -0
  413. package/lib/oak-app-domain/WechatPay/Storage.d.ts +3 -0
  414. package/lib/oak-app-domain/WechatPay/Storage.js +29 -0
  415. package/lib/oak-app-domain/WechatPay/locales/zh_CN.json +1 -0
  416. package/lib/oak-app-domain/Withdraw/Schema.d.ts +12 -0
  417. package/lib/oak-app-domain/WithdrawAccount/Schema.d.ts +71 -7
  418. package/lib/oak-app-domain/WithdrawAccount/Storage.js +6 -1
  419. package/lib/oak-app-domain/WithdrawAccount/locales/zh_CN.json +1 -1
  420. package/lib/oak-app-domain/WpAccount/Action.d.ts +5 -0
  421. package/lib/oak-app-domain/WpAccount/Action.js +5 -0
  422. package/lib/oak-app-domain/WpAccount/Schema.d.ts +258 -0
  423. package/lib/oak-app-domain/WpAccount/Schema.js +2 -0
  424. package/lib/oak-app-domain/WpAccount/Storage.d.ts +3 -0
  425. package/lib/oak-app-domain/WpAccount/Storage.js +72 -0
  426. package/lib/oak-app-domain/WpAccount/Style.d.ts +3 -0
  427. package/lib/oak-app-domain/WpAccount/Style.js +18 -0
  428. package/lib/oak-app-domain/WpAccount/locales/zh_CN.json +1 -0
  429. package/lib/oak-app-domain/WpProduct/Schema.d.ts +209 -0
  430. package/lib/oak-app-domain/WpProduct/Schema.js +2 -0
  431. package/lib/oak-app-domain/WpProduct/Storage.d.ts +3 -0
  432. package/lib/oak-app-domain/WpProduct/Storage.js +36 -0
  433. package/lib/oak-app-domain/WpProduct/Style.d.ts +3 -0
  434. package/lib/oak-app-domain/WpProduct/Style.js +14 -0
  435. package/lib/oak-app-domain/WpProduct/locales/zh_CN.json +1 -0
  436. package/lib/oak-app-domain/_SubQuery.d.ts +94 -4
  437. package/lib/ports/index.d.ts +1 -1
  438. package/lib/registry.d.ts +9 -0
  439. package/lib/registry.js +12 -0
  440. package/lib/routines/start.d.ts +1 -1
  441. package/lib/timers/index.d.ts +1 -1
  442. package/lib/triggers/account.js +59 -56
  443. package/lib/triggers/accountOper.js +0 -61
  444. package/lib/triggers/deposit.d.ts +1 -0
  445. package/lib/triggers/deposit.js +14 -0
  446. package/lib/triggers/index.d.ts +1 -1
  447. package/lib/triggers/index.js +4 -0
  448. package/lib/triggers/pay.d.ts +6 -0
  449. package/lib/triggers/pay.js +214 -77
  450. package/lib/triggers/refund.d.ts +6 -0
  451. package/lib/triggers/refund.js +77 -16
  452. package/lib/triggers/sysAccountOper.d.ts +5 -0
  453. package/lib/triggers/sysAccountOper.js +39 -0
  454. package/lib/triggers/system.d.ts +5 -0
  455. package/lib/triggers/system.js +33 -0
  456. package/lib/triggers/userSystem.js +1 -1
  457. package/lib/types/Exception.d.ts +1 -1
  458. package/lib/types/Pay.d.ts +17 -0
  459. package/lib/types/Pay.js +2 -0
  460. package/lib/types/PayClazz.d.ts +1 -2
  461. package/lib/utils/application.d.ts +493 -1
  462. package/lib/utils/application.js +39 -5
  463. package/lib/utils/pay.d.ts +4 -1
  464. package/lib/utils/pay.js +133 -73
  465. package/lib/utils/payClazz/Account.d.ts +0 -1
  466. package/lib/utils/payClazz/Account.js +4 -6
  467. package/lib/utils/payClazz/Offline.d.ts +0 -1
  468. package/lib/utils/payClazz/Offline.js +1 -2
  469. package/lib/utils/payClazz/WechatPay/WechatPay.d.ts +10 -4
  470. package/lib/utils/payClazz/WechatPay/WechatPay.debug.d.ts +3 -3
  471. package/lib/utils/payClazz/WechatPay/WechatPay.debug.js +9 -10
  472. package/lib/utils/payClazz/WechatPay/WechatPay.js +29 -17
  473. package/lib/utils/payClazz/index.d.ts +2 -5
  474. package/lib/utils/payClazz/index.js +58 -61
  475. package/lib/utils/wpProduct.d.ts +2 -0
  476. package/lib/utils/wpProduct.js +23 -0
  477. package/lib/utils/wpProductFrontend.d.ts +4 -0
  478. package/lib/utils/wpProductFrontend.js +35 -0
  479. package/lib/watchers/index.d.ts +1 -1
  480. package/lib/watchers/pay.js +2 -2
  481. package/lib/watchers/refund.js +3 -2
  482. package/package.json +4 -5
  483. package/src/entities/AbstractAccount.ts +51 -0
  484. package/src/entities/Account.ts +6 -3
  485. package/src/entities/AccountOper.ts +7 -3
  486. package/src/entities/Deposit.ts +76 -0
  487. package/src/entities/OfflineAccount.ts +90 -0
  488. package/src/entities/Order.ts +2 -1
  489. package/src/entities/Pay.ts +19 -10
  490. package/src/entities/SysAccountOper.ts +63 -0
  491. package/src/entities/System.ts +25 -2
  492. package/src/entities/WechatPay.ts +31 -0
  493. package/src/entities/WithdrawAccount.ts +3 -0
  494. package/src/entities/WpAccount.ts +67 -0
  495. package/src/entities/WpProduct.ts +62 -0
  496. package/lib/aspects/sample.d.ts +0 -2
  497. package/lib/aspects/sample.js +0 -7
  498. package/lib/config/connector.d.ts +0 -4
  499. package/lib/config/connector.js +0 -8
  500. package/lib/configuration/server.d.ts +0 -5
  501. package/lib/configuration/server.js +0 -10
  502. package/lib/entities/Application.d.ts +0 -5
  503. package/lib/entities/Application.js +0 -39
  504. package/lib/exceptionHandler.d.ts +0 -8
  505. package/lib/exceptionHandler.js +0 -51
  506. package/lib/features/Console.d.ts +0 -12
  507. package/lib/features/Console.js +0 -18
  508. package/lib/features/Menu.d.ts +0 -20
  509. package/lib/features/Menu.js +0 -65
  510. package/lib/features/Sample.d.ts +0 -15
  511. package/lib/features/Sample.js +0 -17
  512. package/lib/triggers/acount.js +0 -23
  513. package/src/entities/Application.ts +0 -54
@@ -63,9 +63,15 @@ const checkers = [
63
63
  }
64
64
  break;
65
65
  }
66
- case 'loss': {
67
- if (totalPlus >= 0 || availPlus > 0 || totalPlus !== availPlus) {
68
- throw new OakInputIllegalException('accountOper', ['availPlus'], 'accountOper为consume时,其totalPlus/availPlus必须为0或负数,且totalPlus的绝对值要更大');
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
- import { PAY_CHANNEL_WECHAT_APP_NAME, PAY_CHANNEL_WECHAT_H5_NAME, PAY_CHANNEL_WECHAT_JS_NAME, PAY_CHANNEL_WECHAT_MP_NAME, PAY_CHANNEL_WECHAT_NATIVE_NAME } from '../types/PayConfig';
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;
@@ -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,5 @@
1
+ import { Checker } from 'oak-domain/lib/types/Auth';
2
+ import { EntityDict } from '../oak-app-domain';
3
+ import { RuntimeCxt } from '../types/RuntimeCxt';
4
+ declare const checkers: Checker<EntityDict, 'offlineAccount', RuntimeCxt>[];
5
+ 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;
@@ -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 { channel, price, orderId, accountId } = data;
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 (!accountId) {
31
+ if (!depositId) {
34
32
  throw new OakInputIllegalException('pay', ['accountId'], '充值类支付必须指定accountId');
35
33
  }
36
- else if (channel === PAY_CHANNEL_ACCOUNT_NAME) {
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
- channel: PAY_CHANNEL_OFFLINE_NAME,
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, // 要超过action矩阵定义的赋state值
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,5 @@
1
+ import { Checker } from 'oak-domain/lib/types/Auth';
2
+ import { EntityDict } from '../oak-app-domain';
3
+ import { RuntimeCxt } from '../types/RuntimeCxt';
4
+ declare const checkers: Checker<EntityDict, 'wpProduct', RuntimeCxt>[];
5
+ export default checkers;
@@ -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" | "large" | "middle" | undefined;
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" | "large" | "middle" | undefined;
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?: "horizontal" | "vertical" | undefined;
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: "horizontal" | "vertical";
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/channelPicker/index"
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 payConfig={payConfig} onPick={(channel) => {
26
- onSetChannel(channel);
27
- }} channel={channel} meta={meta} onSetMeta={(meta) => onSetMeta(meta)}/>
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 payConfig={payConfig} onPick={(channel) => {
21
- onSetChannel(channel);
22
- }} channel={channel} meta={meta} onSetMeta={(meta) => onSetMeta(meta)}/>
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
- onDepositPayId: (payId: string) => void;
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, ToYuan } from "oak-domain/lib/utils/money";
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
- systemId: 1,
12
+ ofSystemId: 1,
13
13
  entity: 1,
14
14
  entityId: 1,
15
- pay$account: {
16
- $entity: 'pay',
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
- onDepositPayId: (payId) => undefined,
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 unfinishedPayId = data?.pay$account?.[0]?.id;
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
- unfinishedPayId,
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 createDepositPay() {
69
- const { depPrice, depositChannel, depositMeta } = this.state;
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
- pay$account: {
96
- id: await generateNewIdAsync(),
97
- action: 'create',
98
- data: {
99
- id: payId,
100
- channel: depositChannel,
101
- price: depPrice,
102
- meta: depositMeta,
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 { onDepositPayId } = this.props;
120
- onDepositPayId && onDepositPayId(payId);
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 { unfinishedPayId } = this.state;
142
- if (unfinishedPayId) {
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
- onUnfinishedPayClickedMp() {
159
- const { onDepositPayId } = this.props;
160
- const { unfinishedPayId } = this.state;
161
- onDepositPayId && onDepositPayId(unfinishedPayId);
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
- depositMeta: undefined,
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
- "account-deposit": "../deposit/index"
6
+ "deposit-new": "../../deposit/new/index"
7
7
  }
8
8
  }