@pisell/pisellos 0.0.569 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/dist/core/index.js +10 -6
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.js +0 -3
  4. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  5. package/dist/model/strategy/adapter/walletPass/evaluator.js +7 -5
  6. package/dist/model/strategy/adapter/walletPass/example.js +26 -3
  7. package/dist/model/strategy/adapter/walletPass/index.js +5 -5
  8. package/dist/model/strategy/adapter/walletPass/type.d.ts +0 -3
  9. package/dist/model/strategy/adapter/walletPass/utils.d.ts +0 -26
  10. package/dist/model/strategy/adapter/walletPass/utils.js +17 -92
  11. package/dist/model/strategy/strategy-example.js +19 -5
  12. package/dist/modules/BaseModule.d.ts +1 -1
  13. package/dist/modules/BaseModule.js +8 -10
  14. package/dist/modules/Cart/index.js +3 -0
  15. package/dist/modules/Cart/utils/cartProduct.js +1 -0
  16. package/dist/modules/Cart/utils/cartResource.js +0 -2
  17. package/dist/modules/Cart/utils/changePrice.js +9 -16
  18. package/dist/modules/Date/index.js +5 -1
  19. package/dist/modules/Discount/index.d.ts +0 -1
  20. package/dist/modules/Discount/index.js +7 -22
  21. package/dist/modules/Discount/types.d.ts +0 -1
  22. package/dist/modules/OpenData/index.js +2 -0
  23. package/dist/modules/Order/index.js +70 -40
  24. package/dist/modules/Payment/index.js +162 -97
  25. package/dist/modules/Payment/types.d.ts +4 -8
  26. package/dist/modules/Payment/walletpass.d.ts +0 -2
  27. package/dist/modules/Payment/walletpass.js +5 -4
  28. package/dist/modules/ProductList/index.d.ts +1 -1
  29. package/dist/modules/ProductList/index.js +3 -12
  30. package/dist/modules/ProductList/types.d.ts +0 -1
  31. package/dist/modules/Rules/index.js +126 -427
  32. package/dist/modules/SalesSummary/utils.js +1 -2
  33. package/dist/modules/Schedule/getDateIsInSchedule.js +0 -5
  34. package/dist/modules/Schedule/index.js +1 -0
  35. package/dist/modules/Schedule/utils.js +1 -0
  36. package/dist/modules/Step/index.js +1 -0
  37. package/dist/modules/Summary/utils.js +22 -43
  38. package/dist/plugins/request.js +4 -1
  39. package/dist/plugins/window.js +6 -2
  40. package/dist/server/index.js +129 -97
  41. package/dist/server/modules/menu/index.js +41 -32
  42. package/dist/server/modules/order/index.js +4 -2
  43. package/dist/server/modules/products/index.js +42 -24
  44. package/dist/server/modules/quotation/index.js +38 -29
  45. package/dist/server/modules/resource/index.js +4 -3
  46. package/dist/server/modules/schedule/index.js +35 -27
  47. package/dist/server/utils/product.js +1 -0
  48. package/dist/solution/BaseSales/index.js +41 -38
  49. package/dist/solution/BookingByStep/index.d.ts +1 -1
  50. package/dist/solution/BookingByStep/index.js +60 -11
  51. package/dist/solution/BookingByStep/utils/capacity.js +11 -1
  52. package/dist/solution/BookingByStep/utils/resources.js +3 -1
  53. package/dist/solution/BookingByStep/utils/timeslots.js +43 -2
  54. package/dist/solution/BookingTicket/index.d.ts +1 -1
  55. package/dist/solution/BookingTicket/index.js +2 -0
  56. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +7 -6
  57. package/dist/solution/BookingTicket/utils/scan/handleScan.js +31 -25
  58. package/dist/solution/BookingTicket/utils/scan/index.js +10 -6
  59. package/dist/solution/BuyTickets/index.js +12 -9
  60. package/dist/solution/Checkout/index.js +252 -177
  61. package/dist/solution/Checkout/utils/index.js +16 -4
  62. package/dist/solution/RegisterAndLogin/index.js +76 -30
  63. package/dist/solution/ScanOrder/index.js +60 -50
  64. package/dist/solution/ShopDiscount/index.js +14 -15
  65. package/dist/solution/ShopDiscount/types.d.ts +4 -5
  66. package/dist/solution/ShopDiscount/utils.d.ts +0 -9
  67. package/dist/solution/ShopDiscount/utils.js +0 -9
  68. package/dist/solution/VenueBooking/index.d.ts +3 -31
  69. package/dist/solution/VenueBooking/index.js +496 -651
  70. package/dist/solution/VenueBooking/types.d.ts +1 -3
  71. package/dist/solution/VenueBooking/types.js +0 -1
  72. package/dist/solution/VenueBooking/utils/dateSummary.d.ts +2 -2
  73. package/dist/solution/VenueBooking/utils/dateSummary.js +25 -12
  74. package/dist/solution/VenueBooking/utils/timeSlot.d.ts +0 -2
  75. package/dist/solution/VenueBooking/utils/timeSlot.js +4 -9
  76. package/dist/types/index.d.ts +1 -1
  77. package/dist/utils/task.js +18 -15
  78. package/dist/utils/watch.js +1 -0
  79. package/lib/apis/picoding.js +0 -2
  80. package/lib/core/index.js +132 -130
  81. package/lib/effects/index.js +57 -46
  82. package/lib/index.d.ts +0 -1
  83. package/lib/index.js +50 -92
  84. package/lib/model/index.js +21 -14
  85. package/lib/model/strategy/adapter/dataVariant/adapter.js +50 -38
  86. package/lib/model/strategy/adapter/dataVariant/evaluator.js +236 -162
  87. package/lib/model/strategy/adapter/dataVariant/examples.js +237 -229
  88. package/lib/model/strategy/adapter/dataVariant/index.js +34 -39
  89. package/lib/model/strategy/adapter/dataVariant/type.js +28 -57
  90. package/lib/model/strategy/adapter/index.js +64 -100
  91. package/lib/model/strategy/adapter/itemRule/adapter.js +144 -156
  92. package/lib/model/strategy/adapter/itemRule/evaluator.js +48 -36
  93. package/lib/model/strategy/adapter/itemRule/examples.js +225 -295
  94. package/lib/model/strategy/adapter/itemRule/index.js +57 -83
  95. package/lib/model/strategy/adapter/itemRule/type.js +36 -97
  96. package/lib/model/strategy/adapter/promotion/adapter.js +63 -84
  97. package/lib/model/strategy/adapter/promotion/evaluator.js +231 -381
  98. package/lib/model/strategy/adapter/promotion/examples.js +159 -139
  99. package/lib/model/strategy/adapter/promotion/index.js +49 -1
  100. package/lib/model/strategy/adapter/promotion/type.js +35 -199
  101. package/lib/model/strategy/adapter/type.js +16 -4
  102. package/lib/model/strategy/adapter/walletPass/evaluator.js +152 -180
  103. package/lib/model/strategy/adapter/walletPass/example.js +190 -217
  104. package/lib/model/strategy/adapter/walletPass/index.js +51 -75
  105. package/lib/model/strategy/adapter/walletPass/locales.js +58 -36
  106. package/lib/model/strategy/adapter/walletPass/type.d.ts +0 -3
  107. package/lib/model/strategy/adapter/walletPass/type.js +16 -4
  108. package/lib/model/strategy/adapter/walletPass/utils.d.ts +0 -26
  109. package/lib/model/strategy/adapter/walletPass/utils.js +383 -678
  110. package/lib/model/strategy/engine.js +168 -270
  111. package/lib/model/strategy/index.js +34 -49
  112. package/lib/model/strategy/strategy-example.js +239 -243
  113. package/lib/model/strategy/type.js +40 -100
  114. package/lib/modules/Account/index.js +53 -39
  115. package/lib/modules/Account/types.js +33 -20
  116. package/lib/modules/AccountList/index.js +154 -116
  117. package/lib/modules/AccountList/types.js +31 -30
  118. package/lib/modules/AccountList/utils.js +30 -18
  119. package/lib/modules/BaseModule.d.ts +1 -1
  120. package/lib/modules/BaseModule.js +46 -25
  121. package/lib/modules/BookingContext/index.js +136 -158
  122. package/lib/modules/BookingContext/types.js +32 -46
  123. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +143 -131
  124. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +82 -75
  125. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +150 -170
  126. package/lib/modules/BookingContext/utils/flexible.js +55 -38
  127. package/lib/modules/BookingContext/utils/formatResourceList.js +34 -19
  128. package/lib/modules/BookingContext/utils/index.js +41 -124
  129. package/lib/modules/BookingContext/utils/noResource.js +70 -58
  130. package/lib/modules/BookingContext/utils/orderLineDisplay.js +41 -14
  131. package/lib/modules/BookingContext/utils/productExtend.js +155 -202
  132. package/lib/modules/BookingContext/utils/resourceErrors.js +53 -53
  133. package/lib/modules/BookingContext/utils/resourceSelection.js +41 -19
  134. package/lib/modules/BookingContext/utils/resources.js +167 -209
  135. package/lib/modules/BookingContext/utils/serviceTimes.js +116 -115
  136. package/lib/modules/BookingContext/utils/timeSlices.js +80 -70
  137. package/lib/modules/Cart/index.js +124 -170
  138. package/lib/modules/Cart/types.js +51 -46
  139. package/lib/modules/Cart/utils/cartAccount.js +39 -40
  140. package/lib/modules/Cart/utils/cartDate.js +61 -56
  141. package/lib/modules/Cart/utils/cartDiscount.js +33 -28
  142. package/lib/modules/Cart/utils/cartNote.js +32 -27
  143. package/lib/modules/Cart/utils/cartProduct.js +251 -321
  144. package/lib/modules/Cart/utils/cartRelationForms.js +35 -29
  145. package/lib/modules/Cart/utils/cartResource.js +78 -72
  146. package/lib/modules/Cart/utils/changePrice.js +50 -28
  147. package/lib/modules/Cart/utils/index.js +48 -106
  148. package/lib/modules/Customer/constants.js +34 -13
  149. package/lib/modules/Customer/index.js +169 -232
  150. package/lib/modules/Customer/types.js +35 -38
  151. package/lib/modules/Date/index.js +115 -116
  152. package/lib/modules/Date/types.js +28 -16
  153. package/lib/modules/Date/utils.js +123 -174
  154. package/lib/modules/Discount/index.d.ts +0 -1
  155. package/lib/modules/Discount/index.js +128 -130
  156. package/lib/modules/Discount/types.d.ts +0 -1
  157. package/lib/modules/Discount/types.js +31 -9
  158. package/lib/modules/Guests/index.js +56 -30
  159. package/lib/modules/Guests/types.js +33 -23
  160. package/lib/modules/Holder/index.js +189 -209
  161. package/lib/modules/Holder/types.js +16 -4
  162. package/lib/modules/Holder/utils.js +49 -20
  163. package/lib/modules/OpenData/index.js +76 -69
  164. package/lib/modules/OpenData/types.js +16 -4
  165. package/lib/modules/OpenData/utils.js +78 -44
  166. package/lib/modules/Order/index.js +1909 -1572
  167. package/lib/modules/Order/types.js +35 -78
  168. package/lib/modules/Order/utils/bundleDiscountHydration.js +74 -41
  169. package/lib/modules/Order/utils/manualProductDiscount.js +123 -124
  170. package/lib/modules/Order/utils/orderCollectionIdentity.js +210 -148
  171. package/lib/modules/Order/utils.js +634 -799
  172. package/lib/modules/Payment/cash.js +33 -20
  173. package/lib/modules/Payment/cashRecommendationAlgorithm.js +76 -145
  174. package/lib/modules/Payment/eftpos.js +30 -16
  175. package/lib/modules/Payment/index.js +378 -518
  176. package/lib/modules/Payment/mx51.js +0 -1
  177. package/lib/modules/Payment/types.d.ts +4 -8
  178. package/lib/modules/Payment/types.js +107 -216
  179. package/lib/modules/Payment/utils.js +48 -51
  180. package/lib/modules/Payment/walletpass.d.ts +0 -2
  181. package/lib/modules/Payment/walletpass.js +211 -226
  182. package/lib/modules/Product/index.js +46 -51
  183. package/lib/modules/Product/types.js +16 -4
  184. package/lib/modules/Product/utils.js +33 -32
  185. package/lib/modules/ProductList/index.d.ts +1 -1
  186. package/lib/modules/ProductList/index.js +117 -117
  187. package/lib/modules/ProductList/types.d.ts +0 -1
  188. package/lib/modules/ProductList/types.js +31 -9
  189. package/lib/modules/Quotation/index.js +100 -66
  190. package/lib/modules/Quotation/types.js +16 -4
  191. package/lib/modules/Resource/index.js +59 -27
  192. package/lib/modules/Resource/types.js +32 -22
  193. package/lib/modules/Resource/utils.js +38 -30
  194. package/lib/modules/ResourcePlanner/index.js +61 -60
  195. package/lib/modules/ResourcePlanner/planner.js +384 -346
  196. package/lib/modules/ResourcePlanner/types.js +16 -4
  197. package/lib/modules/Rules/index.js +903 -1475
  198. package/lib/modules/Rules/types.js +40 -17
  199. package/lib/modules/SalesSummary/index.js +90 -85
  200. package/lib/modules/SalesSummary/types.js +16 -4
  201. package/lib/modules/SalesSummary/utils.js +427 -351
  202. package/lib/modules/ScanOrderLogger/index.js +79 -59
  203. package/lib/modules/ScanOrderLogger/providers/feishu.js +78 -54
  204. package/lib/modules/ScanOrderLogger/providers/grafana.js +36 -13
  205. package/lib/modules/ScanOrderLogger/types.js +16 -4
  206. package/lib/modules/Schedule/getDateIsInSchedule.js +163 -339
  207. package/lib/modules/Schedule/index.js +114 -100
  208. package/lib/modules/Schedule/type.js +16 -4
  209. package/lib/modules/Schedule/types.js +16 -4
  210. package/lib/modules/Schedule/utils.js +291 -433
  211. package/lib/modules/Step/index.js +52 -40
  212. package/lib/modules/Step/tyeps.js +16 -4
  213. package/lib/modules/Summary/index.js +71 -66
  214. package/lib/modules/Summary/types.js +16 -4
  215. package/lib/modules/Summary/utils.js +418 -791
  216. package/lib/modules/SurchargeList/index.js +60 -46
  217. package/lib/modules/SurchargeList/types.js +16 -4
  218. package/lib/modules/index.js +63 -245
  219. package/lib/plugins/app.js +16 -4
  220. package/lib/plugins/index.js +25 -36
  221. package/lib/plugins/request.js +126 -137
  222. package/lib/plugins/shopStore.js +16 -4
  223. package/lib/plugins/user.js +16 -4
  224. package/lib/plugins/window.js +179 -171
  225. package/lib/server/index.js +2337 -2675
  226. package/lib/server/modules/floor-plan/index.js +123 -102
  227. package/lib/server/modules/floor-plan/types.js +30 -15
  228. package/lib/server/modules/index.js +68 -106
  229. package/lib/server/modules/menu/index.js +122 -146
  230. package/lib/server/modules/menu/types.js +31 -18
  231. package/lib/server/modules/order/index.js +642 -567
  232. package/lib/server/modules/order/types.js +32 -117
  233. package/lib/server/modules/order/utils/filterBookings.js +194 -219
  234. package/lib/server/modules/order/utils/filterOrders.js +92 -118
  235. package/lib/server/modules/payment/index.js +83 -59
  236. package/lib/server/modules/payment/types.js +16 -4
  237. package/lib/server/modules/products/index.js +459 -575
  238. package/lib/server/modules/products/types.js +34 -44
  239. package/lib/server/modules/quotation/index.js +172 -137
  240. package/lib/server/modules/quotation/types.js +31 -21
  241. package/lib/server/modules/resource/index.js +184 -213
  242. package/lib/server/modules/resource/types.js +33 -42
  243. package/lib/server/modules/schedule/index.js +123 -135
  244. package/lib/server/modules/schedule/types.js +21 -14
  245. package/lib/server/modules/schedule/utils.js +163 -334
  246. package/lib/server/types.js +16 -4
  247. package/lib/server/utils/index.js +23 -25
  248. package/lib/server/utils/product.js +139 -196
  249. package/lib/server/utils/schedule.js +41 -34
  250. package/lib/server/utils/small-ticket.js +456 -478
  251. package/lib/server/utils/time.js +49 -40
  252. package/lib/solution/BaseSales/index.js +1016 -850
  253. package/lib/solution/BaseSales/types.js +37 -41
  254. package/lib/solution/BaseSales/utils/cartPromotion.js +460 -611
  255. package/lib/solution/BaseSales/utils/parseSalesResponse.js +105 -85
  256. package/lib/solution/BaseSales/utils/quotationPrice.js +114 -56
  257. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +143 -102
  258. package/lib/solution/BaseSales/utils.js +140 -155
  259. package/lib/solution/BookingByStep/index.d.ts +1 -1
  260. package/lib/solution/BookingByStep/index.js +1340 -1530
  261. package/lib/solution/BookingByStep/types.js +99 -40
  262. package/lib/solution/BookingByStep/utils/capacity.js +160 -192
  263. package/lib/solution/BookingByStep/utils/products.js +52 -42
  264. package/lib/solution/BookingByStep/utils/resources.js +330 -527
  265. package/lib/solution/BookingByStep/utils/stock.js +44 -65
  266. package/lib/solution/BookingByStep/utils/timeslots.js +131 -129
  267. package/lib/solution/BookingTicket/index.d.ts +1 -1
  268. package/lib/solution/BookingTicket/index.js +459 -543
  269. package/lib/solution/BookingTicket/types.js +77 -99
  270. package/lib/solution/BookingTicket/utils/addProductDecision.js +184 -219
  271. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +89 -58
  272. package/lib/solution/BookingTicket/utils/bookingStatus.js +78 -107
  273. package/lib/solution/BookingTicket/utils/cartView.js +94 -110
  274. package/lib/solution/BookingTicket/utils/exampleData.js +0 -185
  275. package/lib/solution/BookingTicket/utils/orderCustomer.js +41 -18
  276. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +86 -219
  277. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +93 -144
  278. package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +91 -79
  279. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +41 -54
  280. package/lib/solution/BookingTicket/utils/scan/handleScan.js +81 -84
  281. package/lib/solution/BookingTicket/utils/scan/index.js +104 -98
  282. package/lib/solution/BookingTicket/utils/scan/scanCache.js +43 -90
  283. package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +64 -52
  284. package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +58 -56
  285. package/lib/solution/BuyTickets/index.js +70 -67
  286. package/lib/solution/BuyTickets/types.js +38 -22
  287. package/lib/solution/Checkout/index.js +1158 -1451
  288. package/lib/solution/Checkout/types.js +61 -91
  289. package/lib/solution/Checkout/utils/index.js +156 -228
  290. package/lib/solution/PlaceOrder/index.js +0 -55
  291. package/lib/solution/RegisterAndLogin/config.js +460 -493
  292. package/lib/solution/RegisterAndLogin/index.js +630 -633
  293. package/lib/solution/RegisterAndLogin/types.js +76 -189
  294. package/lib/solution/RegisterAndLogin/utils.js +125 -183
  295. package/lib/solution/Sales/index.js +320 -317
  296. package/lib/solution/Sales/types.js +33 -27
  297. package/lib/solution/ScanOrder/index.js +862 -831
  298. package/lib/solution/ScanOrder/types.js +34 -33
  299. package/lib/solution/ScanOrder/utils.js +371 -406
  300. package/lib/solution/ShopDiscount/index.js +233 -235
  301. package/lib/solution/ShopDiscount/types.d.ts +4 -5
  302. package/lib/solution/ShopDiscount/types.js +37 -15
  303. package/lib/solution/ShopDiscount/utils.d.ts +0 -9
  304. package/lib/solution/ShopDiscount/utils.js +172 -309
  305. package/lib/solution/UnifiedBookingSales/index.js +405 -379
  306. package/lib/solution/UnifiedBookingSales/types.js +31 -12
  307. package/lib/solution/VenueBooking/index.d.ts +3 -31
  308. package/lib/solution/VenueBooking/index.js +916 -967
  309. package/lib/solution/VenueBooking/types.d.ts +1 -3
  310. package/lib/solution/VenueBooking/types.js +39 -20
  311. package/lib/solution/VenueBooking/utils/dateSummary.d.ts +2 -2
  312. package/lib/solution/VenueBooking/utils/dateSummary.js +62 -25
  313. package/lib/solution/VenueBooking/utils/resource.js +54 -31
  314. package/lib/solution/VenueBooking/utils/slotMerge.js +107 -94
  315. package/lib/solution/VenueBooking/utils/timeSlot.d.ts +0 -2
  316. package/lib/solution/VenueBooking/utils/timeSlot.js +133 -138
  317. package/lib/solution/VenueBooking/utils.js +67 -130
  318. package/lib/solution/index.js +41 -124
  319. package/lib/store/createStore.js +29 -32
  320. package/lib/types/index.d.ts +1 -1
  321. package/lib/types/index.js +16 -4
  322. package/lib/utils/task.js +36 -36
  323. package/lib/utils/watch.js +47 -81
  324. package/package.json +2 -4
  325. package/dist/solution/VenueBooking/utils/smartPricing.d.ts +0 -70
  326. package/dist/solution/VenueBooking/utils/smartPricing.js +0 -233
  327. package/lib/solution/VenueBooking/utils/smartPricing.d.ts +0 -70
  328. package/lib/solution/VenueBooking/utils/smartPricing.js +0 -192
@@ -204,8 +204,9 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
204
204
  // // 预连接数据库
205
205
  // this.dbManager.connect()
206
206
 
207
+ console.log('[PaymentModule] 初始化完成');
207
208
  this.logInfo('PaymentModule initialized successfully');
208
- case 15:
209
+ case 16:
209
210
  case "end":
210
211
  return _context.stop();
211
212
  }
@@ -318,6 +319,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
318
319
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
319
320
  while (1) switch (_context2.prev = _context2.next) {
320
321
  case 0:
322
+ console.log('网络状态:', status.connected);
321
323
  _this3.logInfo('Network status changed', {
322
324
  connected: status.connected,
323
325
  previousStatus: status.previousStatus
@@ -326,7 +328,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
326
328
  _this3.logInfo('Network reconnected');
327
329
  // 网络恢复时的处理逻辑可以在这里添加
328
330
  }
329
- case 2:
331
+ case 3:
330
332
  case "end":
331
333
  return _context2.stop();
332
334
  }
@@ -603,7 +605,7 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
603
605
  case 3:
604
606
  order = _context7.sent;
605
607
  if (!order) {
606
- _context7.next = 9;
608
+ _context7.next = 10;
607
609
  break;
608
610
  }
609
611
  _context7.next = 7;
@@ -612,18 +614,20 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
612
614
  _context7.next = 9;
613
615
  return this.core.effects.emit("".concat(this.name, ":onOrderDeleted"), order);
614
616
  case 9:
615
- _context7.next = 15;
617
+ console.log('[PaymentModule] 支付订单删除成功:', orderUuid);
618
+ case 10:
619
+ _context7.next = 16;
616
620
  break;
617
- case 11:
618
- _context7.prev = 11;
621
+ case 12:
622
+ _context7.prev = 12;
619
623
  _context7.t0 = _context7["catch"](0);
620
624
  console.error('[PaymentModule] 删除支付订单失败', _context7.t0);
621
625
  throw _context7.t0;
622
- case 15:
626
+ case 16:
623
627
  case "end":
624
628
  return _context7.stop();
625
629
  }
626
- }, _callee7, this, [[0, 11]]);
630
+ }, _callee7, this, [[0, 12]]);
627
631
  }));
628
632
  function deletePaymentOrderAsync(_x6) {
629
633
  return _deletePaymentOrderAsync.apply(this, arguments);
@@ -773,9 +777,10 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
773
777
  originalOrderId: originalOrderId,
774
778
  newOrderId: newOrderId
775
779
  });
780
+ console.log("[PaymentModule] \u8BA2\u5355ID\u66FF\u6362\u6210\u529F: ".concat(originalOrderId, " \u2192 ").concat(newOrderId));
776
781
  return _context9.abrupt("return", updatedOrder);
777
- case 27:
778
- _context9.prev = 27;
782
+ case 28:
783
+ _context9.prev = 28;
779
784
  _context9.t0 = _context9["catch"](1);
780
785
  console.error('[PaymentModule] 替换订单ID失败', _context9.t0);
781
786
  this.logError('replaceOrderIdByUuidAsync failed', _context9.t0, {
@@ -783,11 +788,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
783
788
  newOrderId: newOrderId
784
789
  });
785
790
  throw _context9.t0;
786
- case 32:
791
+ case 33:
787
792
  case "end":
788
793
  return _context9.stop();
789
794
  }
790
- }, _callee9, this, [[1, 27]]);
795
+ }, _callee9, this, [[1, 28]]);
791
796
  }));
792
797
  function replaceOrderIdByUuidAsync(_x9, _x10) {
793
798
  return _replaceOrderIdByUuidAsync.apply(this, arguments);
@@ -1065,36 +1070,42 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1065
1070
  paymentItem.origin_amount = paymentItem.amount; // 保存原始金额
1066
1071
  paymentItem.amount = '0.00'; // 将金额设为0,不参与订单金额计算
1067
1072
 
1073
+ console.log("[PaymentModule] \u652F\u4ED8\u9879\u6807\u8BB0\u4E3A\u5220\u9664:", {
1074
+ uuid: paymentItem.uuid,
1075
+ originalAmount: paymentItem.origin_amount,
1076
+ status: paymentItem.status
1077
+ });
1078
+
1068
1079
  // 重新计算待付金额
1069
1080
  this.recalculateOrderAmount(order);
1070
1081
 
1071
1082
  // 更新到 IndexDB
1072
- _context13.next = 19;
1083
+ _context13.next = 20;
1073
1084
  return this.dbManager.update('order', order);
1074
- case 19:
1075
- _context13.next = 21;
1085
+ case 20:
1086
+ _context13.next = 22;
1076
1087
  return this.core.effects.emit("".concat(this.name, ":onPaymentDeleted"), {
1077
1088
  order: order,
1078
1089
  paymentItem: paymentItem
1079
1090
  });
1080
- case 21:
1081
- _context13.next = 23;
1091
+ case 22:
1092
+ _context13.next = 24;
1082
1093
  return this.core.effects.emit("".concat(this.name, ":onOrderChanged"), {
1083
1094
  action: 'payment_delete',
1084
1095
  order: order,
1085
1096
  paymentItem: paymentItem
1086
1097
  });
1087
- case 23:
1098
+ case 24:
1088
1099
  this.logInfo('deletePaymentAsync completed successfully (marked as voided)', {
1089
1100
  orderUuid: orderUuid,
1090
1101
  paymentUuid: paymentUuid,
1091
1102
  originalAmount: paymentItem.origin_amount,
1092
1103
  newExpectAmount: order.expect_amount
1093
1104
  });
1094
- _context13.next = 31;
1105
+ _context13.next = 32;
1095
1106
  break;
1096
- case 26:
1097
- _context13.prev = 26;
1107
+ case 27:
1108
+ _context13.prev = 27;
1098
1109
  _context13.t0 = _context13["catch"](1);
1099
1110
  console.error('[PaymentModule] 删除支付项失败', _context13.t0);
1100
1111
  this.logError('deletePaymentAsync failed', _context13.t0, {
@@ -1102,11 +1113,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1102
1113
  paymentUuid: paymentUuid
1103
1114
  });
1104
1115
  throw _context13.t0;
1105
- case 31:
1116
+ case 32:
1106
1117
  case "end":
1107
1118
  return _context13.stop();
1108
1119
  }
1109
- }, _callee13, this, [[1, 26]]);
1120
+ }, _callee13, this, [[1, 27]]);
1110
1121
  }));
1111
1122
  function deletePaymentAsync(_x15, _x16) {
1112
1123
  return _deletePaymentAsync.apply(this, arguments);
@@ -1170,61 +1181,80 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1170
1181
  existingVoucherItems = order.payment.filter(function (payment) {
1171
1182
  return payment.voucher_id && payment.status !== 'voided' && !payment.isSynced;
1172
1183
  });
1184
+ console.log('[PaymentModule] 发现现有代金券支付项:', {
1185
+ orderUuid: orderUuid,
1186
+ existingVoucherCount: existingVoucherItems.length,
1187
+ existingItems: existingVoucherItems.map(function (item) {
1188
+ return {
1189
+ uuid: item.uuid,
1190
+ code: item.code,
1191
+ amount: item.amount,
1192
+ voucher_id: item.voucher_id,
1193
+ isSynced: item.isSynced
1194
+ };
1195
+ })
1196
+ });
1197
+
1173
1198
  // 2. 删除所有现有的代金券支付项(仅删除未同步的)
1174
1199
  _iterator2 = _createForOfIteratorHelper(existingVoucherItems);
1175
- _context14.prev = 11;
1200
+ _context14.prev = 12;
1176
1201
  _iterator2.s();
1177
- case 13:
1202
+ case 14:
1178
1203
  if ((_step2 = _iterator2.n()).done) {
1179
- _context14.next = 19;
1204
+ _context14.next = 21;
1180
1205
  break;
1181
1206
  }
1182
1207
  voucherItem = _step2.value;
1183
- _context14.next = 17;
1208
+ console.log("[PaymentModule] \u5220\u9664\u73B0\u6709\u4EE3\u91D1\u5238\u652F\u4ED8\u9879: ".concat(voucherItem.uuid));
1209
+ _context14.next = 19;
1184
1210
  return _this5.deletePaymentAsync(orderUuid, voucherItem.uuid);
1185
- case 17:
1186
- _context14.next = 13;
1187
- break;
1188
1211
  case 19:
1189
- _context14.next = 24;
1212
+ _context14.next = 14;
1190
1213
  break;
1191
1214
  case 21:
1192
- _context14.prev = 21;
1193
- _context14.t0 = _context14["catch"](11);
1215
+ _context14.next = 26;
1216
+ break;
1217
+ case 23:
1218
+ _context14.prev = 23;
1219
+ _context14.t0 = _context14["catch"](12);
1194
1220
  _iterator2.e(_context14.t0);
1195
- case 24:
1196
- _context14.prev = 24;
1221
+ case 26:
1222
+ _context14.prev = 26;
1197
1223
  _iterator2.f();
1198
- return _context14.finish(24);
1199
- case 27:
1200
- _context14.next = 29;
1201
- return _this5.getPaymentOrderByUuidAsync(orderUuid);
1224
+ return _context14.finish(26);
1202
1225
  case 29:
1226
+ _context14.next = 31;
1227
+ return _this5.getPaymentOrderByUuidAsync(orderUuid);
1228
+ case 31:
1203
1229
  orderAfterDelete = _context14.sent;
1204
1230
  if (orderAfterDelete) {
1205
- _context14.next = 32;
1231
+ _context14.next = 34;
1206
1232
  break;
1207
1233
  }
1208
1234
  throw new Error("\u8BA2\u5355\u4E0D\u5B58\u5728: ".concat(orderUuid));
1209
- case 32:
1235
+ case 34:
1210
1236
  existingActiveVoucherKeys = new Set(orderAfterDelete.payment.filter(function (p) {
1211
1237
  return p.voucher_id && p.status !== 'voided' && !p.isSynced;
1212
1238
  }).map(function (p) {
1213
1239
  return "".concat(p.voucher_id, "|").concat(p.order_payment_type || 'normal');
1214
1240
  }));
1241
+ console.log('[PaymentModule] 添加新的代金券支付项:', {
1242
+ orderUuid: orderUuid,
1243
+ newItemCount: normalizedVoucherItems.length
1244
+ });
1215
1245
  _iterator3 = _createForOfIteratorHelper(normalizedVoucherItems);
1216
- _context14.prev = 34;
1246
+ _context14.prev = 37;
1217
1247
  _iterator3.s();
1218
- case 36:
1248
+ case 39:
1219
1249
  if ((_step3 = _iterator3.n()).done) {
1220
- _context14.next = 48;
1250
+ _context14.next = 52;
1221
1251
  break;
1222
1252
  }
1223
1253
  _voucherItem = _step3.value;
1224
1254
  orderPaymentType = _voucherItem.order_payment_type || 'normal';
1225
1255
  key = "".concat(_voucherItem.voucher_id, "|").concat(orderPaymentType);
1226
1256
  if (!existingActiveVoucherKeys.has(key)) {
1227
- _context14.next = 43;
1257
+ _context14.next = 46;
1228
1258
  break;
1229
1259
  }
1230
1260
  console.warn('[PaymentModule] Skip adding voucher payment item because it already exists (active)', {
@@ -1232,48 +1262,54 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1232
1262
  voucher_id: _voucherItem.voucher_id,
1233
1263
  order_payment_type: orderPaymentType
1234
1264
  });
1235
- return _context14.abrupt("continue", 46);
1236
- case 43:
1237
- _context14.next = 45;
1265
+ return _context14.abrupt("continue", 50);
1266
+ case 46:
1267
+ console.log("[PaymentModule] \u6DFB\u52A0\u4EE3\u91D1\u5238\u652F\u4ED8\u9879:", _objectSpread(_objectSpread({}, _voucherItem), {}, {
1268
+ code: _voucherItem.code,
1269
+ amount: _voucherItem.amount,
1270
+ voucher_id: _voucherItem.voucher_id,
1271
+ order_payment_type: orderPaymentType
1272
+ }));
1273
+ _context14.next = 49;
1238
1274
  return _this5.addPaymentItemAsync(orderUuid, _voucherItem);
1239
- case 45:
1275
+ case 49:
1240
1276
  existingActiveVoucherKeys.add(key);
1241
- case 46:
1242
- _context14.next = 36;
1277
+ case 50:
1278
+ _context14.next = 39;
1243
1279
  break;
1244
- case 48:
1245
- _context14.next = 53;
1280
+ case 52:
1281
+ _context14.next = 57;
1246
1282
  break;
1247
- case 50:
1248
- _context14.prev = 50;
1249
- _context14.t1 = _context14["catch"](34);
1283
+ case 54:
1284
+ _context14.prev = 54;
1285
+ _context14.t1 = _context14["catch"](37);
1250
1286
  _iterator3.e(_context14.t1);
1251
- case 53:
1252
- _context14.prev = 53;
1287
+ case 57:
1288
+ _context14.prev = 57;
1253
1289
  _iterator3.f();
1254
- return _context14.finish(53);
1255
- case 56:
1256
- _context14.next = 58;
1290
+ return _context14.finish(57);
1291
+ case 60:
1292
+ _context14.next = 62;
1257
1293
  return _this5.getPaymentOrderByUuidAsync(orderUuid);
1258
- case 58:
1294
+ case 62:
1259
1295
  updatedOrder = _context14.sent;
1260
- _context14.next = 61;
1296
+ _context14.next = 65;
1261
1297
  return _this5.core.effects.emit("".concat(_this5.name, ":onPaymentAdded"), {
1262
1298
  orderUuid: orderUuid,
1263
1299
  order: updatedOrder,
1264
1300
  payment: null // 批量操作不提供单个支付项
1265
1301
  });
1266
- case 61:
1302
+ case 65:
1267
1303
  _this5.logInfo('updateVoucherPaymentItemsAsync completed successfully', {
1268
1304
  orderUuid: orderUuid,
1269
1305
  removedVoucherCount: existingVoucherItems.length,
1270
1306
  addedVoucherCount: normalizedVoucherItems.length,
1271
1307
  finalExpectAmount: updatedOrder === null || updatedOrder === void 0 ? void 0 : updatedOrder.expect_amount
1272
1308
  });
1273
- _context14.next = 69;
1309
+ _context14.next = 73;
1274
1310
  break;
1275
- case 64:
1276
- _context14.prev = 64;
1311
+ case 68:
1312
+ _context14.prev = 68;
1277
1313
  _context14.t2 = _context14["catch"](3);
1278
1314
  console.error('[PaymentModule] 批量更新代金券支付项失败:', _context14.t2);
1279
1315
  _this5.logError('updateVoucherPaymentItemsAsync failed', _context14.t2, {
@@ -1281,11 +1317,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1281
1317
  voucherPaymentItems: voucherPaymentItems
1282
1318
  });
1283
1319
  throw _context14.t2;
1284
- case 69:
1320
+ case 73:
1285
1321
  case "end":
1286
1322
  return _context14.stop();
1287
1323
  }
1288
- }, _callee14, null, [[3, 64], [11, 21, 24, 27], [34, 50, 53, 56]]);
1324
+ }, _callee14, null, [[3, 68], [12, 23, 26, 29], [37, 54, 57, 60]]);
1289
1325
  }))));
1290
1326
  case 1:
1291
1327
  case "end":
@@ -1502,9 +1538,11 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1502
1538
  if (totalPaidAmount.gte(orderTotalAmount)) {
1503
1539
  // 支付金额足够,标记为已完成
1504
1540
  order.payment_status = PaymentStatus.Finished;
1541
+ console.log("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u652F\u4ED8\u5B8C\u6210\uFF0C\u91D1\u989D: ").concat(totalPaidAmount.toString(), "/").concat(orderTotalAmount.toString()));
1505
1542
  } else {
1506
1543
  // 支付金额不足,标记为部分支付
1507
1544
  order.payment_status = PaymentStatus.PartiallyPaid;
1545
+ console.log("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u90E8\u5206\u652F\u4ED8\uFF0C\u91D1\u989D: ").concat(totalPaidAmount.toString(), "/").concat(orderTotalAmount.toString()));
1508
1546
  }
1509
1547
 
1510
1548
  // 给后端标记一下是全部支付(paid)还是部分支付
@@ -1515,36 +1553,37 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1515
1553
  return this.dbManager.update('order', order);
1516
1554
  case 8:
1517
1555
  if (!(paymentData.payments.length === 0)) {
1518
- _context18.next = 11;
1556
+ _context18.next = 12;
1519
1557
  break;
1520
1558
  }
1559
+ console.log("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u652F\u4ED8\u5217\u8868\u4E3A\u7A7A\uFF0C\u8DF3\u8FC7\u652F\u4ED8\u5904\u7406"));
1521
1560
  this.logWarning('Empty payment list', {
1522
1561
  orderUuid: order.uuid,
1523
1562
  orderId: order.order_id
1524
1563
  });
1525
1564
  return _context18.abrupt("return");
1526
- case 11:
1527
- _context18.next = 13;
1565
+ case 12:
1566
+ _context18.next = 14;
1528
1567
  return this.core.effects.emit("".concat(this.name, ":onPaymentSubmitted"), order);
1529
- case 13:
1530
- _context18.next = 15;
1568
+ case 14:
1569
+ _context18.next = 16;
1531
1570
  return this.core.effects.emit("".concat(this.name, ":onOrderChanged"), {
1532
1571
  action: 'submit',
1533
1572
  order: order
1534
1573
  });
1535
- case 15:
1536
- _context18.next = 21;
1574
+ case 16:
1575
+ _context18.next = 22;
1537
1576
  break;
1538
- case 17:
1539
- _context18.prev = 17;
1577
+ case 18:
1578
+ _context18.prev = 18;
1540
1579
  _context18.t0 = _context18["catch"](0);
1541
1580
  console.error("[PaymentModule] \u8BA2\u5355 ".concat(order.uuid, " \u652F\u4ED8\u63D0\u4EA4\u5931\u8D25"), _context18.t0);
1542
1581
  throw _context18.t0;
1543
- case 21:
1582
+ case 22:
1544
1583
  case "end":
1545
1584
  return _context18.stop();
1546
1585
  }
1547
- }, _callee18, this, [[0, 17]]);
1586
+ }, _callee18, this, [[0, 18]]);
1548
1587
  }));
1549
1588
  function submitSingleOrderPayment(_x23) {
1550
1589
  return _submitSingleOrderPayment.apply(this, arguments);
@@ -1686,6 +1725,29 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1686
1725
  // 如果是定金模式,则使用deposit_amount 去减已付款金额
1687
1726
  var remainingAmount = order.is_deposit === 1 ? new Decimal(order.deposit_amount).minus(paidAmount) : totalAmount.minus(paidAmount);
1688
1727
  order.expect_amount = Decimal.max(0, remainingAmount).toFixed(2);
1728
+ console.log("[PaymentModule] \u91CD\u65B0\u8BA1\u7B97\u8BA2\u5355\u91D1\u989D:", {
1729
+ orderUuid: order.uuid,
1730
+ totalAmount: order.total_amount,
1731
+ effectivePaidAmount: paidAmount.toFixed(2),
1732
+ remainingAmount: order.expect_amount,
1733
+ activePayments: order.payment.filter(function (p) {
1734
+ return p.status !== 'voided';
1735
+ }).length,
1736
+ voidedPayments: order.payment.filter(function (p) {
1737
+ return p.status === 'voided';
1738
+ }).length,
1739
+ paymentDetails: order.payment.filter(function (p) {
1740
+ return p.status !== 'voided';
1741
+ }).map(function (p) {
1742
+ return {
1743
+ code: p.code,
1744
+ amount: p.amount,
1745
+ rounding_amount: p.rounding_amount || '0.00',
1746
+ effective_amount: new Decimal(p.amount || 0).minus(new Decimal(p.rounding_amount || 0)).toFixed(2)
1747
+ };
1748
+ }),
1749
+ 说明: '有效支付金额包含抹零计算(amount + |rounding_amount|)'
1750
+ });
1689
1751
  }
1690
1752
 
1691
1753
  /**
@@ -1916,59 +1978,62 @@ export var PaymentModule = /*#__PURE__*/function (_BaseModule) {
1916
1978
 
1917
1979
  // 计算基础值:x / interval
1918
1980
  baseValue = amount.div(roundingInterval);
1981
+ console.log("[PaymentModule] \u820D\u5165\u8BA1\u7B97 - \u539F\u59CB\u91D1\u989D: ".concat(amount.toString(), ", \u95F4\u9694: ").concat(intervalValue, ", \u57FA\u7840\u503C: ").concat(baseValue.toString(), ", \u89C4\u5219: ").concat(rule));
1919
1982
  _context26.t0 = rule;
1920
- _context26.next = _context26.t0 === RoundingRule.Standard ? 12 : _context26.t0 === 'standard' ? 12 : _context26.t0 === RoundingRule.StandardDown ? 14 : _context26.t0 === 'standard_down' ? 14 : _context26.t0 === RoundingRule.AlwaysUp ? 16 : _context26.t0 === 'always_up' ? 16 : _context26.t0 === RoundingRule.AlwaysDown ? 18 : _context26.t0 === 'always_down' ? 18 : 20;
1983
+ _context26.next = _context26.t0 === RoundingRule.Standard ? 13 : _context26.t0 === 'standard' ? 13 : _context26.t0 === RoundingRule.StandardDown ? 15 : _context26.t0 === 'standard_down' ? 15 : _context26.t0 === RoundingRule.AlwaysUp ? 17 : _context26.t0 === 'always_up' ? 17 : _context26.t0 === RoundingRule.AlwaysDown ? 19 : _context26.t0 === 'always_down' ? 19 : 21;
1921
1984
  break;
1922
- case 12:
1985
+ case 13:
1923
1986
  // 标准舍入(中点向上)
1924
1987
  roundedValue = this.standardRound(baseValue, true);
1925
- return _context26.abrupt("break", 21);
1926
- case 14:
1988
+ return _context26.abrupt("break", 22);
1989
+ case 15:
1927
1990
  // 标准舍入(中点向下)
1928
1991
  roundedValue = this.standardRound(baseValue, false);
1929
- return _context26.abrupt("break", 21);
1930
- case 16:
1992
+ return _context26.abrupt("break", 22);
1993
+ case 17:
1931
1994
  // 总是向上舍入
1932
1995
  roundedValue = baseValue.ceil();
1933
- return _context26.abrupt("break", 21);
1934
- case 18:
1996
+ return _context26.abrupt("break", 22);
1997
+ case 19:
1935
1998
  // 总是向下舍入
1936
1999
  roundedValue = baseValue.floor();
1937
- return _context26.abrupt("break", 21);
1938
- case 20:
1939
- throw new Error("\u4E0D\u652F\u6301\u7684\u820D\u5165\u89C4\u5219: ".concat(rule));
2000
+ return _context26.abrupt("break", 22);
1940
2001
  case 21:
2002
+ throw new Error("\u4E0D\u652F\u6301\u7684\u820D\u5165\u89C4\u5219: ".concat(rule));
2003
+ case 22:
1941
2004
  // 计算最终金额:roundedValue * interval
1942
2005
  finalAmount = roundedValue.mul(roundingInterval);
1943
2006
  originalAmountStr = amount.toFixed(2); // 如果最终金额是 0 元,则不采用舍入金额,返回原始金额
1944
2007
  if (!finalAmount.eq(0)) {
1945
- _context26.next = 25;
2008
+ _context26.next = 27;
1946
2009
  break;
1947
2010
  }
2011
+ console.log("[PaymentModule] \u6700\u7EC8\u91D1\u989D\u4E3A0\uFF0C\u8FD4\u56DE\u539F\u59CB\u91D1\u989D: ".concat(originalAmountStr));
1948
2012
  return _context26.abrupt("return", {
1949
2013
  originalAmount: originalAmountStr,
1950
2014
  roundedAmount: originalAmountStr,
1951
2015
  roundingDifference: '0.00'
1952
2016
  });
1953
- case 25:
2017
+ case 27:
1954
2018
  roundedAmountStr = finalAmount.toFixed(2); // 计算舍入差额
1955
2019
  roundingDifference = finalAmount.sub(amount);
1956
2020
  roundingDifferenceStr = roundingDifference.toFixed(2);
2021
+ console.log("[PaymentModule] \u820D\u5165\u7ED3\u679C - \u539F\u59CB\u91D1\u989D: ".concat(originalAmountStr, ", \u820D\u5165\u540E\u91D1\u989D: ").concat(roundedAmountStr, ", \u820D\u5165\u5DEE\u989D: ").concat(roundingDifferenceStr));
1957
2022
  return _context26.abrupt("return", {
1958
2023
  originalAmount: originalAmountStr,
1959
2024
  roundedAmount: roundedAmountStr,
1960
2025
  roundingDifference: roundingDifferenceStr
1961
2026
  });
1962
- case 31:
1963
- _context26.prev = 31;
2027
+ case 34:
2028
+ _context26.prev = 34;
1964
2029
  _context26.t1 = _context26["catch"](0);
1965
2030
  console.error('[PaymentModule] 金额舍入失败:', _context26.t1);
1966
2031
  throw new Error("\u91D1\u989D\u820D\u5165\u5931\u8D25: ".concat(_context26.t1 instanceof Error ? _context26.t1.message : String(_context26.t1)));
1967
- case 35:
2032
+ case 38:
1968
2033
  case "end":
1969
2034
  return _context26.stop();
1970
2035
  }
1971
- }, _callee26, this, [[0, 31]]);
2036
+ }, _callee26, this, [[0, 34]]);
1972
2037
  }));
1973
2038
  function roundAmountAsync(_x27, _x28, _x29) {
1974
2039
  return _roundAmountAsync.apply(this, arguments);
@@ -105,6 +105,10 @@ export interface PaymentItem {
105
105
  type: string;
106
106
  /** 代金券、充值卡、积分卡等wallet pass id */
107
107
  voucher_id?: string | number;
108
+ /** Wallet Pass 使用单位配置 */
109
+ wallet_pass_usage_unit?: unknown;
110
+ /** Wallet Pass 本次使用值 */
111
+ wallet_pass_use_value?: string | number | null;
108
112
  /** 拓展参数字段 */
109
113
  metadata?: {
110
114
  /** 钱箱 ID */
@@ -146,10 +150,6 @@ export interface PaymentItem {
146
150
  created_at?: string;
147
151
  /** 支付项更新时间 (格式: YYYY-MM-DD HH:mm:ss) */
148
152
  updated_at?: string;
149
- /** 钱包支付使用金额 */
150
- wallet_pass_use_value?: any;
151
- /** 钱包支付使用单位 */
152
- wallet_pass_usage_unit?: any;
153
153
  }
154
154
  /**
155
155
  * 订单信息
@@ -309,10 +309,6 @@ export interface PaymentUpdateFields {
309
309
  statusCode?: number;
310
310
  timestamp: number;
311
311
  };
312
- /** 钱包支付使用金额 */
313
- wallet_pass_use_value?: any;
314
- /** 钱包支付使用单位 */
315
- wallet_pass_usage_unit?: any;
316
312
  }
317
313
  /**
318
314
  * 更新支付项参数
@@ -62,8 +62,6 @@ export declare class WalletPassPaymentImpl implements WalletPassPayment {
62
62
  voucher_id: number;
63
63
  amount: number;
64
64
  tag: string;
65
- wallet_pass_use_value: any;
66
- wallet_pass_usage_unit: any;
67
65
  }[];
68
66
  getUserIdentificationCodeListAsync(params: UserIdentificationCodeParams): Promise<UserIdentificationCodeItem[]>;
69
67
  /**
@@ -309,6 +309,7 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
309
309
  vouchers: allList
310
310
  });
311
311
  recommended = res.recommended, transformList = res.transformList, noApplicableVoucher = res.noApplicableVoucher, recommendedAmount = res.recommendedAmount;
312
+ console.log(res, 'resres12');
312
313
  this.walletRecommendList = recommended;
313
314
 
314
315
  // 存储初始化数据到内存中,供 useWalletPass 使用
@@ -328,19 +329,19 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
328
329
  noApplicableVoucher: noApplicableVoucher,
329
330
  products: products || []
330
331
  });
331
- case 19:
332
- _context3.prev = 19;
332
+ case 20:
333
+ _context3.prev = 20;
333
334
  _context3.t0 = _context3["catch"](0);
334
335
  this.paymentModule.logError('[WalletPass] 初始化钱包数据失败', _context3.t0, {
335
336
  customer_id: baseParams.customer_id,
336
337
  order_expect_amount: baseParams.order_expect_amount
337
338
  });
338
339
  throw _context3.t0;
339
- case 23:
340
+ case 24:
340
341
  case "end":
341
342
  return _context3.stop();
342
343
  }
343
- }, _callee3, this, [[0, 19]]);
344
+ }, _callee3, this, [[0, 20]]);
344
345
  }));
345
346
  function initializeWalletDataAsync(_x3) {
346
347
  return _initializeWalletDataAsync.apply(this, arguments);
@@ -26,7 +26,7 @@ export declare class ProductList extends BaseModule implements Module {
26
26
  * const products = await productList.getAddTimeProducts({ schedule_date: '2026-06-16' });
27
27
  */
28
28
  getAddTimeProducts(params?: ProductListLoadProductsParams): Promise<any>;
29
- loadProducts({ category_ids, product_ids, collection, menu_list_ids, customer_id: paramsCustomerId, with_count, schedule_datetime, schedule_date, cacheId, with_schedule, extension_type, status, strategy_context, with_extra, }?: ProductListLoadProductsParams, options?: {
29
+ loadProducts({ category_ids, product_ids, collection, menu_list_ids, customer_id: paramsCustomerId, with_count, schedule_datetime, schedule_date, cacheId, with_schedule, extension_type, status, strategy_context, }?: ProductListLoadProductsParams, options?: {
30
30
  callback?: (result: any) => void;
31
31
  subscriberId?: string;
32
32
  }): Promise<any>;