ts-glitter 21.1.7 → 21.1.9

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 (111) hide show
  1. package/lowcode/Entry.js +14 -1
  2. package/lowcode/Entry.ts +13 -1
  3. package/lowcode/backend-manager/bg-line.js +18 -10
  4. package/lowcode/backend-manager/bg-line.ts +19 -10
  5. package/lowcode/backend-manager/bg-list-component.js +1 -2
  6. package/lowcode/backend-manager/bg-list-component.ts +1 -1
  7. package/lowcode/backend-manager/bg-notify.js +17 -10
  8. package/lowcode/backend-manager/bg-notify.ts +19 -11
  9. package/lowcode/backend-manager/bg-product.js +39 -18
  10. package/lowcode/backend-manager/bg-product.ts +54 -23
  11. package/lowcode/backend-manager/bg-recommend.js +15 -9
  12. package/lowcode/backend-manager/bg-recommend.ts +16 -9
  13. package/lowcode/backend-manager/bg-sns.js +16 -9
  14. package/lowcode/backend-manager/bg-sns.ts +18 -11
  15. package/lowcode/backend-manager/bg-widget.js +325 -261
  16. package/lowcode/backend-manager/bg-widget.ts +117 -45
  17. package/lowcode/cms-plugin/auto-fcm-history.js +15 -6
  18. package/lowcode/cms-plugin/auto-fcm-history.ts +18 -11
  19. package/lowcode/cms-plugin/auto-reply.js +17 -1
  20. package/lowcode/cms-plugin/auto-reply.ts +16 -1
  21. package/lowcode/cms-plugin/exhibition-list.js +11 -2
  22. package/lowcode/cms-plugin/exhibition-list.ts +12 -2
  23. package/lowcode/cms-plugin/live_capture.js +2 -2
  24. package/lowcode/cms-plugin/live_capture.ts +2 -2
  25. package/lowcode/cms-plugin/model/order.d.ts +1 -0
  26. package/lowcode/cms-plugin/module/order-excel.js +15 -1
  27. package/lowcode/cms-plugin/module/order-excel.ts +22 -2
  28. package/lowcode/cms-plugin/module/table-storage.js +11 -0
  29. package/lowcode/cms-plugin/module/table-storage.ts +12 -0
  30. package/lowcode/cms-plugin/permission-setting.js +16 -9
  31. package/lowcode/cms-plugin/permission-setting.ts +18 -10
  32. package/lowcode/cms-plugin/pos-pages/payment-page.js +37 -29
  33. package/lowcode/cms-plugin/pos-pages/payment-page.ts +61 -49
  34. package/lowcode/cms-plugin/pos-pages/pos-function.js +6 -1
  35. package/lowcode/cms-plugin/pos-pages/pos-function.ts +8 -1
  36. package/lowcode/cms-plugin/reconciliation-area.js +12 -3
  37. package/lowcode/cms-plugin/reconciliation-area.ts +13 -3
  38. package/lowcode/cms-plugin/shopping-allowance-manager.js +12 -3
  39. package/lowcode/cms-plugin/shopping-allowance-manager.ts +13 -3
  40. package/lowcode/cms-plugin/shopping-invoice-manager.js +12 -3
  41. package/lowcode/cms-plugin/shopping-invoice-manager.ts +13 -4
  42. package/lowcode/cms-plugin/shopping-order-manager.js +12 -3
  43. package/lowcode/cms-plugin/shopping-order-manager.ts +13 -4
  44. package/lowcode/cms-plugin/shopping-product-setting.js +16 -10
  45. package/lowcode/cms-plugin/shopping-product-setting.ts +17 -10
  46. package/lowcode/cms-plugin/shopping-product-stock.js +17 -11
  47. package/lowcode/cms-plugin/shopping-product-stock.ts +18 -11
  48. package/lowcode/cms-plugin/shopping-setting-basic.js +129 -38
  49. package/lowcode/cms-plugin/shopping-setting-basic.ts +134 -38
  50. package/lowcode/cms-plugin/stock-history.js +15 -7
  51. package/lowcode/cms-plugin/stock-history.ts +16 -17
  52. package/lowcode/cms-plugin/stock-stores.js +13 -6
  53. package/lowcode/cms-plugin/stock-stores.ts +14 -6
  54. package/lowcode/cms-plugin/stock-vendors.js +13 -6
  55. package/lowcode/cms-plugin/stock-vendors.ts +14 -6
  56. package/lowcode/cms-plugin/user-list.js +24 -7
  57. package/lowcode/cms-plugin/user-list.ts +25 -7
  58. package/lowcode/css/editor.css +11 -6
  59. package/lowcode/form-view/e-commerce/product-select.js +13 -11
  60. package/lowcode/form-view/e-commerce/product-select.ts +14 -12
  61. package/lowcode/modules/tool.js +9 -0
  62. package/lowcode/modules/tool.ts +12 -0
  63. package/lowcode/public-components/checkout/index.js +216 -207
  64. package/lowcode/public-components/checkout/index.ts +1315 -1309
  65. package/lowcode/public-components/product/pd-class.js +11 -2
  66. package/lowcode/public-components/product/pd-class.ts +16 -3
  67. package/lowcode/public-components/public/ad.js +42 -10
  68. package/lowcode/public-components/public/ad.ts +28 -1
  69. package/lowcode/public-models/product.ts +1 -0
  70. package/lowcode/view-model/saas-view-model.js +394 -379
  71. package/lowcode/view-model/saas-view-model.ts +1451 -1405
  72. package/package.json +1 -1
  73. package/src/api-public/controllers/user.js +4 -4
  74. package/src/api-public/controllers/user.js.map +1 -1
  75. package/src/api-public/controllers/user.ts +4 -4
  76. package/src/api-public/models/glitter-finance.js +1 -2
  77. package/src/api-public/models/glitter-finance.js.map +1 -5
  78. package/src/api-public/services/data-analyze.d.ts +1 -1
  79. package/src/api-public/services/fb-api.d.ts +4 -3
  80. package/src/api-public/services/fb-api.js +72 -27
  81. package/src/api-public/services/fb-api.js.map +1 -1
  82. package/src/api-public/services/fb-api.ts +183 -127
  83. package/src/api-public/services/fb-service.js +4 -4
  84. package/src/api-public/services/fb-service.js.map +1 -1
  85. package/src/api-public/services/schedule.d.ts +1 -1
  86. package/src/api-public/services/schedule.js +18 -14
  87. package/src/api-public/services/schedule.js.map +1 -1
  88. package/src/api-public/services/schedule.ts +18 -14
  89. package/src/api-public/services/user.d.ts +6 -5
  90. package/src/api-public/services/user.js +12 -10
  91. package/src/api-public/services/user.js.map +1 -1
  92. package/src/api-public/services/user.ts +14 -10
  93. package/src/config.d.ts +1 -1
  94. package/src/modules/AWSLib.js +2 -3
  95. package/src/modules/AWSLib.js.map +1 -1
  96. package/src/modules/database.d.ts +1 -1
  97. package/src/modules/redis.d.ts +1 -1
  98. package/src/modules/tool.d.ts +4 -4
  99. package/src/modules/tool.js +1 -2
  100. package/src/modules/tool.js.map +1 -1
  101. package/src/seo-config.js +1 -0
  102. package/src/seo-config.js.map +1 -1
  103. package/src/seo-config.ts +1 -0
  104. package/src/services/backend-service.js +17 -7
  105. package/src/services/backend-service.js.map +1 -1
  106. package/src/services/create-instance.js +3 -4
  107. package/src/services/create-instance.js.map +1 -1
  108. package/src/services/saas-table-check.js +2 -2
  109. package/src/services/saas-table-check.js.map +1 -5
  110. package/src/services/tool.js +2 -3
  111. package/src/services/tool.js.map +1 -1
@@ -20,6 +20,7 @@ import { POSSetting } from './POS-setting.js';
20
20
  import { PosFunction } from './pos-pages/pos-function.js';
21
21
  import { GlobalUser } from '../glitter-base/global/global-user.js';
22
22
  import { OrderInfo } from '../public-models/order-info.js';
23
+ import { TableStorage } from './module/table-storage.js';
23
24
 
24
25
  const html = String.raw;
25
26
 
@@ -43,6 +44,7 @@ interface ViewModel {
43
44
  apiJSON: any;
44
45
  checkedData: any[];
45
46
  headerConfig: string[];
47
+ listLimit: number;
46
48
  }
47
49
 
48
50
  //共用樣式
@@ -147,6 +149,7 @@ export class ReconciliationArea {
147
149
  apiJSON: {},
148
150
  checkedData: [],
149
151
  headerConfig: [],
152
+ listLimit: TableStorage.getLimit(),
150
153
  };
151
154
  return gvc.bindView(() => {
152
155
  const id = gvc.glitter.getUUID();
@@ -443,6 +446,14 @@ export class ReconciliationArea {
443
446
  vm.query || '',
444
447
  '搜尋訂單'
445
448
  ),
449
+ BgWidget.countingFilter({
450
+ gvc,
451
+ callback: value => {
452
+ vm.listLimit = value;
453
+ gvc.notifyDataChange(vm.id);
454
+ },
455
+ default: vm.listLimit,
456
+ }),
446
457
  BgWidget.funnelFilter({
447
458
  gvc,
448
459
  callback: () => {
@@ -471,10 +482,9 @@ export class ReconciliationArea {
471
482
  defPage: ReconciliationArea.vm.page,
472
483
  getData: vmi => {
473
484
  ReconciliationArea.vm.page = vmi.page;
474
- const limit = 20;
475
485
  vm.apiJSON = {
476
486
  page: vmi.page - 1,
477
- limit: limit,
487
+ limit: vm.listLimit,
478
488
  search: vm.query || undefined,
479
489
  searchType: vm.queryType || 'cart_token',
480
490
  orderString: vm.orderString,
@@ -583,7 +593,7 @@ export class ReconciliationArea {
583
593
  }
584
594
 
585
595
  vm.dataList = data.response.data;
586
- vmi.pageSize = Math.ceil(data.response.total / limit);
596
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
587
597
  vmi.originalData = vm.dataList;
588
598
  vmi.tableData = getDatalist();
589
599
  vmi.loading = false;
@@ -3,6 +3,7 @@ import { ApiShop } from '../glitter-base/route/shopping.js';
3
3
  import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
4
4
  import { BgListComponent } from '../backend-manager/bg-list-component.js';
5
5
  import { FilterOptions } from './filter-options.js';
6
+ import { TableStorage } from './module/table-storage.js';
6
7
  const html = String.raw;
7
8
  export class ShoppingAllowanceManager {
8
9
  static main(gvc, query) {
@@ -20,6 +21,7 @@ export class ShoppingAllowanceManager {
20
21
  filter: {},
21
22
  filterId: glitter.getUUID(),
22
23
  filter_type: query.isPOS ? 'pos' : 'normal',
24
+ listLimit: TableStorage.getLimit(),
23
25
  };
24
26
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.invoiceFilterFrame);
25
27
  vm.filter = ListComp.getFilterObject();
@@ -236,6 +238,14 @@ export class ShoppingAllowanceManager {
236
238
  vm.query = `${e.value}`.trim();
237
239
  gvc.notifyDataChange(vm.id);
238
240
  }), vm.query || '', '搜尋折讓單'),
241
+ BgWidget.countingFilter({
242
+ gvc,
243
+ callback: value => {
244
+ vm.listLimit = value;
245
+ gvc.notifyDataChange(vm.id);
246
+ },
247
+ default: vm.listLimit,
248
+ }),
239
249
  BgWidget.funnelFilter({
240
250
  gvc,
241
251
  callback: () => {
@@ -260,10 +270,9 @@ export class ShoppingAllowanceManager {
260
270
  BgWidget.tableV3({
261
271
  gvc: gvc,
262
272
  getData: vmi => {
263
- const limit = 20;
264
273
  ApiShop.getAllowance({
265
274
  page: vmi.page - 1,
266
- limit: limit,
275
+ limit: vm.listLimit,
267
276
  search: (vm === null || vm === void 0 ? void 0 : vm.query) || '',
268
277
  searchType: (vm === null || vm === void 0 ? void 0 : vm.queryType) || 'order_id',
269
278
  orderString: vm.orderString,
@@ -319,7 +328,7 @@ export class ShoppingAllowanceManager {
319
328
  }
320
329
  console.log(data.response);
321
330
  vm.dataList = data.response.data;
322
- vmi.pageSize = Math.ceil(data.response.total / limit);
331
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
323
332
  vmi.originalData = vm.dataList;
324
333
  vmi.tableData = getDatalist();
325
334
  vmi.loading = false;
@@ -4,6 +4,7 @@ import { ApiShop } from '../glitter-base/route/shopping.js';
4
4
  import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
5
5
  import { BgListComponent } from '../backend-manager/bg-list-component.js';
6
6
  import { FilterOptions } from './filter-options.js';
7
+ import { TableStorage } from './module/table-storage.js';
7
8
 
8
9
  interface ViewModel {
9
10
  id: string;
@@ -16,6 +17,7 @@ interface ViewModel {
16
17
  orderString?: string;
17
18
  filter?: any;
18
19
  filter_type: 'normal' | 'block' | 'pos';
20
+ listLimit: number;
19
21
  }
20
22
 
21
23
  const html = String.raw;
@@ -43,6 +45,7 @@ export class ShoppingAllowanceManager {
43
45
  filter: {},
44
46
  filterId: glitter.getUUID(),
45
47
  filter_type: query.isPOS ? 'pos' : 'normal',
48
+ listLimit: TableStorage.getLimit(),
46
49
  };
47
50
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.invoiceFilterFrame);
48
51
  vm.filter = ListComp.getFilterObject();
@@ -293,6 +296,14 @@ export class ShoppingAllowanceManager {
293
296
  vm.query || '',
294
297
  '搜尋折讓單'
295
298
  ),
299
+ BgWidget.countingFilter({
300
+ gvc,
301
+ callback: value => {
302
+ vm.listLimit = value;
303
+ gvc.notifyDataChange(vm.id);
304
+ },
305
+ default: vm.listLimit,
306
+ }),
296
307
  BgWidget.funnelFilter({
297
308
  gvc,
298
309
  callback: () => {
@@ -318,10 +329,9 @@ export class ShoppingAllowanceManager {
318
329
  BgWidget.tableV3({
319
330
  gvc: gvc,
320
331
  getData: vmi => {
321
- const limit = 20;
322
332
  ApiShop.getAllowance({
323
333
  page: vmi.page - 1,
324
- limit: limit,
334
+ limit: vm.listLimit,
325
335
  search: vm?.query || '',
326
336
  searchType: vm?.queryType || 'order_id',
327
337
  orderString: vm.orderString,
@@ -376,7 +386,7 @@ export class ShoppingAllowanceManager {
376
386
 
377
387
  console.log(data.response);
378
388
  vm.dataList = data.response.data;
379
- vmi.pageSize = Math.ceil(data.response.total / limit);
389
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
380
390
  vmi.originalData = vm.dataList;
381
391
  vmi.tableData = getDatalist();
382
392
  vmi.loading = false;
@@ -7,6 +7,7 @@ import { ApiUser } from '../glitter-base/route/user.js';
7
7
  import { Tool } from '../modules/tool.js';
8
8
  import { ShoppingAllowanceManager } from './shopping-allowance-manager.js';
9
9
  import { IminModule } from './pos-pages/imin-module.js';
10
+ import { TableStorage } from './module/table-storage.js';
10
11
  const html = String.raw;
11
12
  export class ShoppingInvoiceManager {
12
13
  static supportShipmentMethod() {
@@ -66,6 +67,7 @@ export class ShoppingInvoiceManager {
66
67
  filter: {},
67
68
  filterId: glitter.getUUID(),
68
69
  filter_type: query.isPOS ? 'pos' : 'normal',
70
+ listLimit: TableStorage.getLimit(),
69
71
  };
70
72
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.invoiceFilterFrame);
71
73
  vm.filter = ListComp.getFilterObject();
@@ -281,6 +283,14 @@ export class ShoppingInvoiceManager {
281
283
  vm.query = `${e.value}`.trim();
282
284
  gvc.notifyDataChange(vm.id);
283
285
  }), vm.query || '', '搜尋發票'),
286
+ BgWidget.countingFilter({
287
+ gvc,
288
+ callback: value => {
289
+ vm.listLimit = value;
290
+ gvc.notifyDataChange(vm.id);
291
+ },
292
+ default: vm.listLimit,
293
+ }),
284
294
  BgWidget.funnelFilter({
285
295
  gvc,
286
296
  callback: () => {
@@ -306,10 +316,9 @@ export class ShoppingInvoiceManager {
306
316
  gvc: gvc,
307
317
  getData: vmi => {
308
318
  var _a;
309
- const limit = 20;
310
319
  ApiShop.getInvoice({
311
320
  page: vmi.page - 1,
312
- limit: limit,
321
+ limit: vm.listLimit,
313
322
  search: vm.query || '',
314
323
  searchType: (_a = vm.queryType) !== null && _a !== void 0 ? _a : 'order_number',
315
324
  orderString: vm.orderString,
@@ -390,7 +399,7 @@ export class ShoppingInvoiceManager {
390
399
  });
391
400
  }
392
401
  vm.dataList = data.response.data;
393
- vmi.pageSize = Math.ceil(data.response.total / limit);
402
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
394
403
  vmi.originalData = vm.dataList;
395
404
  vmi.tableData = getDatalist();
396
405
  vmi.loading = false;
@@ -8,6 +8,7 @@ import { ApiUser } from '../glitter-base/route/user.js';
8
8
  import { Tool } from '../modules/tool.js';
9
9
  import { ShoppingAllowanceManager } from './shopping-allowance-manager.js';
10
10
  import { IminModule } from './pos-pages/imin-module.js';
11
+ import { TableStorage } from './module/table-storage.js';
11
12
 
12
13
  interface ViewModel {
13
14
  id: string;
@@ -20,6 +21,7 @@ interface ViewModel {
20
21
  orderString?: string;
21
22
  filter?: any;
22
23
  filter_type: 'normal' | 'block' | 'pos';
24
+ listLimit: number;
23
25
  }
24
26
 
25
27
  const html = String.raw;
@@ -90,6 +92,7 @@ export class ShoppingInvoiceManager {
90
92
  filter: {},
91
93
  filterId: glitter.getUUID(),
92
94
  filter_type: query.isPOS ? 'pos' : 'normal',
95
+ listLimit: TableStorage.getLimit(),
93
96
  };
94
97
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.invoiceFilterFrame);
95
98
  vm.filter = ListComp.getFilterObject();
@@ -339,6 +342,14 @@ export class ShoppingInvoiceManager {
339
342
  vm.query || '',
340
343
  '搜尋發票'
341
344
  ),
345
+ BgWidget.countingFilter({
346
+ gvc,
347
+ callback: value => {
348
+ vm.listLimit = value;
349
+ gvc.notifyDataChange(vm.id);
350
+ },
351
+ default: vm.listLimit,
352
+ }),
342
353
  BgWidget.funnelFilter({
343
354
  gvc,
344
355
  callback: () => {
@@ -364,11 +375,9 @@ export class ShoppingInvoiceManager {
364
375
  BgWidget.tableV3({
365
376
  gvc: gvc,
366
377
  getData: vmi => {
367
- const limit = 20;
368
-
369
378
  ApiShop.getInvoice({
370
379
  page: vmi.page - 1,
371
- limit: limit,
380
+ limit: vm.listLimit,
372
381
  search: vm.query || '',
373
382
  searchType: vm.queryType ?? 'order_number',
374
383
  orderString: vm.orderString,
@@ -451,7 +460,7 @@ export class ShoppingInvoiceManager {
451
460
  }
452
461
 
453
462
  vm.dataList = data.response.data;
454
- vmi.pageSize = Math.ceil(data.response.total / limit);
463
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
455
464
  vmi.originalData = vm.dataList;
456
465
  vmi.tableData = getDatalist();
457
466
  vmi.loading = false;
@@ -33,6 +33,7 @@ import { FilterOptions } from './filter-options.js';
33
33
  import { ListHeaderOption } from './list-header-option.js';
34
34
  import { ShoppingInvoiceManager } from './shopping-invoice-manager.js';
35
35
  import { OrderModule } from './order/order-module.js';
36
+ import { TableStorage } from './module/table-storage.js';
36
37
  const html = String.raw;
37
38
  const css = String.raw;
38
39
  class OrderDetail {
@@ -91,6 +92,7 @@ export class ShoppingOrderManager {
91
92
  apiJSON: {},
92
93
  checkedData: [],
93
94
  headerConfig: [],
95
+ listLimit: TableStorage.getLimit(),
94
96
  };
95
97
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.orderFilterFrame);
96
98
  vm.filter = ListComp.getFilterObject();
@@ -242,6 +244,14 @@ export class ShoppingOrderManager {
242
244
  vm.query = `${e.value}`.trim();
243
245
  gvc.notifyDataChange(vm.id);
244
246
  }), vm.query || '', '搜尋訂單'),
247
+ BgWidget.countingFilter({
248
+ gvc,
249
+ callback: value => {
250
+ vm.listLimit = value;
251
+ gvc.notifyDataChange(vm.id);
252
+ },
253
+ default: vm.listLimit,
254
+ }),
245
255
  BgWidget.funnelFilter({
246
256
  gvc,
247
257
  callback: () => {
@@ -297,10 +307,9 @@ export class ShoppingOrderManager {
297
307
  defPage: ShoppingOrderManager.vm.page,
298
308
  getData: vmi => {
299
309
  ShoppingOrderManager.vm.page = vmi.page;
300
- const limit = 20;
301
310
  vm.apiJSON = {
302
311
  page: vmi.page - 1,
303
- limit: limit,
312
+ limit: vm.listLimit,
304
313
  search: vm.query || undefined,
305
314
  searchType: vm.queryType || 'cart_token',
306
315
  orderString: vm.orderString,
@@ -456,7 +465,7 @@ export class ShoppingOrderManager {
456
465
  });
457
466
  }
458
467
  vm.dataList = data.response.data;
459
- vmi.pageSize = Math.ceil(data.response.total / limit);
468
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
460
469
  vmi.originalData = vm.dataList;
461
470
  vmi.tableData = yield getDatalist();
462
471
  vmi.loading = false;
@@ -26,6 +26,7 @@ import { ListHeaderOption } from './list-header-option.js';
26
26
  import { ShoppingInvoiceManager } from './shopping-invoice-manager.js';
27
27
  import { LineItem } from './module/data.js';
28
28
  import { OrderModule } from './order/order-module.js';
29
+ import { TableStorage } from './module/table-storage.js';
29
30
 
30
31
  const html = String.raw;
31
32
  const css = String.raw;
@@ -124,6 +125,7 @@ export class ShoppingOrderManager {
124
125
  apiJSON: {},
125
126
  checkedData: [],
126
127
  headerConfig: [],
128
+ listLimit: TableStorage.getLimit(),
127
129
  };
128
130
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.orderFilterFrame);
129
131
  vm.filter = ListComp.getFilterObject();
@@ -203,7 +205,7 @@ export class ShoppingOrderManager {
203
205
  });
204
206
  }
205
207
 
206
- static tableOrder(gvc: GVC, vm: any, query: OrderQuery, ListComp: BgListComponent) {
208
+ static tableOrder(gvc: GVC, vm: ViewModel, query: OrderQuery, ListComp: BgListComponent) {
207
209
  const glitter = gvc.glitter;
208
210
  const dialog = new ShareDialog(glitter);
209
211
 
@@ -304,6 +306,14 @@ export class ShoppingOrderManager {
304
306
  vm.query || '',
305
307
  '搜尋訂單'
306
308
  ),
309
+ BgWidget.countingFilter({
310
+ gvc,
311
+ callback: value => {
312
+ vm.listLimit = value;
313
+ gvc.notifyDataChange(vm.id);
314
+ },
315
+ default: vm.listLimit,
316
+ }),
307
317
  BgWidget.funnelFilter({
308
318
  gvc,
309
319
  callback: () => {
@@ -364,10 +374,9 @@ export class ShoppingOrderManager {
364
374
  defPage: ShoppingOrderManager.vm.page,
365
375
  getData: vmi => {
366
376
  ShoppingOrderManager.vm.page = vmi.page;
367
- const limit = 20;
368
377
  vm.apiJSON = {
369
378
  page: vmi.page - 1,
370
- limit: limit,
379
+ limit: vm.listLimit,
371
380
  search: vm.query || undefined,
372
381
  searchType: vm.queryType || 'cart_token',
373
382
  orderString: vm.orderString,
@@ -530,7 +539,7 @@ export class ShoppingOrderManager {
530
539
  }
531
540
 
532
541
  vm.dataList = data.response.data;
533
- vmi.pageSize = Math.ceil(data.response.total / limit);
542
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
534
543
  vmi.originalData = vm.dataList;
535
544
  vmi.tableData = await getDatalist();
536
545
  vmi.loading = false;
@@ -26,6 +26,7 @@ import { ShoppingSettingBasic } from './shopping-setting-basic.js';
26
26
  import { ShoppingSettingAdvance } from './shopping-setting-advance.js';
27
27
  import { ProductInitial } from '../public-models/product.js';
28
28
  import { IminModule } from './pos-pages/imin-module.js';
29
+ import { TableStorage } from './module/table-storage.js';
29
30
  const html = String.raw;
30
31
  export class ShoppingProductSetting {
31
32
  static main(gvc, type = 'product') {
@@ -45,6 +46,7 @@ export class ShoppingProductSetting {
45
46
  ai_initial: {},
46
47
  apiJSON: {},
47
48
  checkedData: [],
49
+ listLimit: TableStorage.getLimit(),
48
50
  };
49
51
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.productFilterFrame);
50
52
  vm.filter = ListComp.getFilterObject();
@@ -164,8 +166,7 @@ export class ShoppingProductSetting {
164
166
  gvc,
165
167
  callback: (value) => {
166
168
  vm.queryType = value;
167
- gvc.notifyDataChange(vm.tableId);
168
- gvc.notifyDataChange(id);
169
+ gvc.notifyDataChange([vm.tableId, id]);
169
170
  },
170
171
  default: vm.queryType || 'title',
171
172
  options: FilterOptions.productSelect,
@@ -173,9 +174,16 @@ export class ShoppingProductSetting {
173
174
  }),
174
175
  BgWidget.searchFilter(gvc.event(e => {
175
176
  vm.query = `${e.value}`.trim();
176
- gvc.notifyDataChange(vm.tableId);
177
- gvc.notifyDataChange(id);
177
+ gvc.notifyDataChange([vm.tableId, id]);
178
178
  }), vm.query || '', '搜尋'),
179
+ BgWidget.countingFilter({
180
+ gvc,
181
+ callback: value => {
182
+ vm.listLimit = value;
183
+ gvc.notifyDataChange([vm.tableId, id]);
184
+ },
185
+ default: vm.listLimit,
186
+ }),
179
187
  BgWidget.funnelFilter({
180
188
  gvc,
181
189
  callback: () => ListComp.showRightMenu(productFunnel),
@@ -184,8 +192,7 @@ export class ShoppingProductSetting {
184
192
  gvc,
185
193
  callback: (value) => {
186
194
  vm.orderString = value;
187
- gvc.notifyDataChange(vm.tableId);
188
- gvc.notifyDataChange(id);
195
+ gvc.notifyDataChange([vm.tableId, id]);
189
196
  },
190
197
  default: vm.orderString || 'default',
191
198
  options: FilterOptions.productListOrderBy,
@@ -199,14 +206,13 @@ export class ShoppingProductSetting {
199
206
  gvc.bindView({
200
207
  bind: vm.tableId,
201
208
  view: () => {
202
- const limit = 20;
203
209
  return BgWidget.tableV3({
204
210
  gvc: gvc,
205
211
  getData: vmi => {
206
212
  function loop() {
207
213
  vm.apiJSON = {
208
214
  page: vmi.page - 1,
209
- limit: limit,
215
+ limit: vm.listLimit,
210
216
  search: vm.query || undefined,
211
217
  searchType: vm.queryType || undefined,
212
218
  orderBy: vm.orderString || undefined,
@@ -344,7 +350,7 @@ export class ShoppingProductSetting {
344
350
  });
345
351
  }
346
352
  vm.dataList = data.response.data;
347
- vmi.pageSize = Math.ceil(data.response.total / limit);
353
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
348
354
  vmi.originalData = vm.dataList;
349
355
  vmi.tableData = getDatalist();
350
356
  vmi.loading = false;
@@ -678,7 +684,7 @@ export class ShoppingProductSetting {
678
684
  <div style="font-weight: 700;">定價</div>
679
685
  <div class="d-flex w-100" style="gap:18px;">
680
686
  <div class="d-flex w-50 flex-column guide5-5" style="gap: 8px;">
681
- <div>售價*</div>
687
+ <div>售價</div>
682
688
  <input
683
689
  style="width: 100%;border-radius: 10px;border: 1px solid #DDD;height: 40px;padding: 0px 18px;"
684
690
  placeholder="請輸入售價"
@@ -17,6 +17,7 @@ import { ShoppingSettingBasic } from './shopping-setting-basic.js';
17
17
  import { ShoppingSettingAdvance } from './shopping-setting-advance.js';
18
18
  import { ActiveSchedule, Product, ProductInitial } from '../public-models/product.js';
19
19
  import { IminModule } from './pos-pages/imin-module.js';
20
+ import { TableStorage } from './module/table-storage.js';
20
21
 
21
22
  const html = String.raw;
22
23
 
@@ -49,6 +50,7 @@ export class ShoppingProductSetting {
49
50
  ai_initial: any;
50
51
  apiJSON: any;
51
52
  checkedData: any[];
53
+ listLimit: number;
52
54
  } = {
53
55
  id: glitter.getUUID(),
54
56
  tableId: glitter.getUUID(),
@@ -63,6 +65,7 @@ export class ShoppingProductSetting {
63
65
  ai_initial: {},
64
66
  apiJSON: {},
65
67
  checkedData: [],
68
+ listLimit: TableStorage.getLimit(),
66
69
  };
67
70
 
68
71
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.productFilterFrame);
@@ -216,8 +219,7 @@ export class ShoppingProductSetting {
216
219
  gvc,
217
220
  callback: (value: any) => {
218
221
  vm.queryType = value;
219
- gvc.notifyDataChange(vm.tableId);
220
- gvc.notifyDataChange(id);
222
+ gvc.notifyDataChange([vm.tableId, id]);
221
223
  },
222
224
  default: vm.queryType || 'title',
223
225
  options: FilterOptions.productSelect,
@@ -226,12 +228,19 @@ export class ShoppingProductSetting {
226
228
  BgWidget.searchFilter(
227
229
  gvc.event(e => {
228
230
  vm.query = `${e.value}`.trim();
229
- gvc.notifyDataChange(vm.tableId);
230
- gvc.notifyDataChange(id);
231
+ gvc.notifyDataChange([vm.tableId, id]);
231
232
  }),
232
233
  vm.query || '',
233
234
  '搜尋'
234
235
  ),
236
+ BgWidget.countingFilter({
237
+ gvc,
238
+ callback: value => {
239
+ vm.listLimit = value;
240
+ gvc.notifyDataChange([vm.tableId, id]);
241
+ },
242
+ default: vm.listLimit,
243
+ }),
235
244
  BgWidget.funnelFilter({
236
245
  gvc,
237
246
  callback: () => ListComp.showRightMenu(productFunnel),
@@ -240,8 +249,7 @@ export class ShoppingProductSetting {
240
249
  gvc,
241
250
  callback: (value: any) => {
242
251
  vm.orderString = value;
243
- gvc.notifyDataChange(vm.tableId);
244
- gvc.notifyDataChange(id);
252
+ gvc.notifyDataChange([vm.tableId, id]);
245
253
  },
246
254
  default: vm.orderString || 'default',
247
255
  options: FilterOptions.productListOrderBy,
@@ -256,14 +264,13 @@ export class ShoppingProductSetting {
256
264
  gvc.bindView({
257
265
  bind: vm.tableId,
258
266
  view: () => {
259
- const limit = 20;
260
267
  return BgWidget.tableV3({
261
268
  gvc: gvc,
262
269
  getData: vmi => {
263
270
  function loop() {
264
271
  vm.apiJSON = {
265
272
  page: vmi.page - 1,
266
- limit: limit,
273
+ limit: vm.listLimit,
267
274
  search: vm.query || undefined,
268
275
  searchType: vm.queryType || undefined,
269
276
  orderBy: vm.orderString || undefined,
@@ -404,7 +411,7 @@ export class ShoppingProductSetting {
404
411
  }
405
412
 
406
413
  vm.dataList = data.response.data;
407
- vmi.pageSize = Math.ceil(data.response.total / limit);
414
+ vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
408
415
  vmi.originalData = vm.dataList;
409
416
  vmi.tableData = getDatalist();
410
417
  vmi.loading = false;
@@ -786,7 +793,7 @@ export class ShoppingProductSetting {
786
793
  <div style="font-weight: 700;">定價</div>
787
794
  <div class="d-flex w-100" style="gap:18px;">
788
795
  <div class="d-flex w-50 flex-column guide5-5" style="gap: 8px;">
789
- <div>售價*</div>
796
+ <div>售價</div>
790
797
  <input
791
798
  style="width: 100%;border-radius: 10px;border: 1px solid #DDD;height: 40px;padding: 0px 18px;"
792
799
  placeholder="請輸入售價"