@pisell/pisellos 2.2.276 → 2.2.278

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.
@@ -2638,11 +2638,27 @@ var BaseSalesImpl = class extends import_BaseModule.BaseModule {
2638
2638
  await this.syncSelectedWalletAssets(state);
2639
2639
  return this.publishWalletAssetsState(state);
2640
2640
  }
2641
+ /** 更新已选钱包资产的手动使用金额,并同步 pending payment。 */
2642
+ async updateWalletAssetAmount(params) {
2643
+ if (!this.store.payment)
2644
+ throw new Error("payment 模块未初始化");
2645
+ const state = this.store.payment.wallet.updateWalletAssetAmount(
2646
+ params.assetId,
2647
+ params.amount
2648
+ );
2649
+ await this.syncSelectedWalletAssets(state);
2650
+ return this.publishWalletAssetsState(state);
2651
+ }
2641
2652
  /** 扫码精确查券;仅可用资产会被自动选中。 */
2642
2653
  async scanWalletAsset(code) {
2643
2654
  if (!this.store.payment)
2644
2655
  throw new Error("payment 模块未初始化");
2645
- const result = await this.store.payment.wallet.scanWalletAssetAsync(code);
2656
+ const wallet = this.store.payment.wallet;
2657
+ const businessData = this.buildWalletInitBusinessData();
2658
+ if (businessData) {
2659
+ wallet.generateWalletParams(businessData);
2660
+ }
2661
+ const result = await wallet.scanWalletAssetAsync(code);
2646
2662
  if (result.type === "normalCode") {
2647
2663
  await this.syncSelectedWalletAssets(result.state);
2648
2664
  await this.publishWalletAssetsState(result.state);
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
311
311
  date: string;
312
312
  status: string;
313
313
  week: string;
314
- weekNum: 0 | 1 | 2 | 3 | 6 | 4 | 5;
314
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
315
315
  }[]>;
316
316
  submitTimeSlot(timeSlots: TimeSliceItem): void;
317
317
  private getScheduleDataByIds;
@@ -326,7 +326,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
326
326
  * 获取当前的客户搜索条件
327
327
  * @returns 当前搜索条件
328
328
  */
329
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
329
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
330
330
  /**
331
331
  * 获取客户列表状态(包含滚动加载相关状态)
332
332
  * @returns 客户状态
@@ -445,19 +445,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
445
445
  * 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
446
446
  * 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
447
447
  */
448
- decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
449
- action: "reloadCatalog";
450
- } | {
451
- action: "add";
452
- cacheItem: any;
453
- } | {
454
- action: "requiresDetail";
455
- payload: AddProductRequiresDetailPayload;
456
- } | {
457
- action: "requiresBookingEdit";
458
- cacheItem: any;
459
- payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
460
- };
448
+ decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
461
449
  /** 规格弹窗 callback 后的第二段决策。 */
462
450
  decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
463
451
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.276",
4
+ "version": "2.2.278",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",