ts-glitter 21.1.8 → 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.
- package/lowcode/Entry.js +14 -1
- package/lowcode/Entry.ts +13 -1
- package/lowcode/backend-manager/bg-line.js +18 -10
- package/lowcode/backend-manager/bg-line.ts +19 -10
- package/lowcode/backend-manager/bg-list-component.js +1 -2
- package/lowcode/backend-manager/bg-list-component.ts +1 -1
- package/lowcode/backend-manager/bg-notify.js +17 -10
- package/lowcode/backend-manager/bg-notify.ts +19 -11
- package/lowcode/backend-manager/bg-recommend.js +15 -9
- package/lowcode/backend-manager/bg-recommend.ts +16 -9
- package/lowcode/backend-manager/bg-sns.js +16 -9
- package/lowcode/backend-manager/bg-sns.ts +18 -11
- package/lowcode/backend-manager/bg-widget.js +325 -261
- package/lowcode/backend-manager/bg-widget.ts +117 -45
- package/lowcode/cms-plugin/auto-fcm-history.js +15 -6
- package/lowcode/cms-plugin/auto-fcm-history.ts +18 -11
- package/lowcode/cms-plugin/auto-reply.js +17 -1
- package/lowcode/cms-plugin/auto-reply.ts +16 -1
- package/lowcode/cms-plugin/exhibition-list.js +11 -2
- package/lowcode/cms-plugin/exhibition-list.ts +12 -2
- package/lowcode/cms-plugin/live_capture.js +2 -2
- package/lowcode/cms-plugin/live_capture.ts +2 -2
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/order-excel.js +15 -1
- package/lowcode/cms-plugin/module/order-excel.ts +22 -2
- package/lowcode/cms-plugin/module/table-storage.js +11 -0
- package/lowcode/cms-plugin/module/table-storage.ts +12 -0
- package/lowcode/cms-plugin/permission-setting.js +16 -9
- package/lowcode/cms-plugin/permission-setting.ts +18 -10
- package/lowcode/cms-plugin/reconciliation-area.js +12 -3
- package/lowcode/cms-plugin/reconciliation-area.ts +13 -3
- package/lowcode/cms-plugin/shopping-allowance-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-allowance-manager.ts +13 -3
- package/lowcode/cms-plugin/shopping-invoice-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-invoice-manager.ts +13 -4
- package/lowcode/cms-plugin/shopping-order-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-order-manager.ts +13 -4
- package/lowcode/cms-plugin/shopping-product-setting.js +16 -10
- package/lowcode/cms-plugin/shopping-product-setting.ts +17 -10
- package/lowcode/cms-plugin/shopping-product-stock.js +17 -11
- package/lowcode/cms-plugin/shopping-product-stock.ts +18 -11
- package/lowcode/cms-plugin/shopping-setting-basic.js +129 -38
- package/lowcode/cms-plugin/shopping-setting-basic.ts +134 -38
- package/lowcode/cms-plugin/stock-history.js +14 -7
- package/lowcode/cms-plugin/stock-history.ts +15 -7
- package/lowcode/cms-plugin/stock-stores.js +13 -6
- package/lowcode/cms-plugin/stock-stores.ts +14 -6
- package/lowcode/cms-plugin/stock-vendors.js +13 -6
- package/lowcode/cms-plugin/stock-vendors.ts +14 -6
- package/lowcode/cms-plugin/user-list.js +24 -7
- package/lowcode/cms-plugin/user-list.ts +25 -7
- package/lowcode/css/editor.css +9 -4
- package/lowcode/public-components/product/pd-class.js +11 -2
- package/lowcode/public-components/product/pd-class.ts +16 -3
- package/lowcode/public-components/public/ad.js +42 -10
- package/lowcode/public-components/public/ad.ts +28 -1
- package/lowcode/public-models/product.ts +1 -0
- package/lowcode/view-model/saas-view-model.js +394 -379
- package/lowcode/view-model/saas-view-model.ts +1451 -1405
- package/package.json +1 -1
- package/src/api-public/controllers/user.js +4 -4
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +4 -4
- package/src/api-public/services/checkout-event.js +7 -17
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/fb-api.d.ts +4 -3
- package/src/api-public/services/fb-api.js +72 -27
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/fb-api.ts +183 -127
- package/src/api-public/services/user.d.ts +6 -5
- package/src/api-public/services/user.js +19 -27
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +14 -10
- package/src/seo-config.js +1 -0
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -0
- package/src/services/app.js +7 -17
- package/src/services/app.js.map +1 -1
|
@@ -410,8 +410,7 @@ export class OrderExcel {
|
|
|
410
410
|
|
|
411
411
|
// 取得客製化資訊
|
|
412
412
|
static getCustomizeMap = async (order?: any) => {
|
|
413
|
-
const [cashflowConfigObj, shipmentConfigObj, registerConfig, memberConfig] = await OrderExcel.customizePromise();
|
|
414
|
-
|
|
413
|
+
const [cashflowConfigObj, shipmentConfigObj, registerConfig, memberConfig ,receipt] = await OrderExcel.customizePromise();
|
|
415
414
|
const customizeMap = new Map();
|
|
416
415
|
|
|
417
416
|
const getUserValue = (key: string) => {
|
|
@@ -456,6 +455,20 @@ export class OrderExcel {
|
|
|
456
455
|
customizeMap.set(`物流自訂值 - ${item.title}`, order ? getShipmentValue(item.key) : '-');
|
|
457
456
|
});
|
|
458
457
|
|
|
458
|
+
let viewModel = [
|
|
459
|
+
['姓名', 'name'],
|
|
460
|
+
['電話', 'phone'],
|
|
461
|
+
['信箱', 'email'],
|
|
462
|
+
];
|
|
463
|
+
receipt.list.map((d1: any) => {
|
|
464
|
+
if (
|
|
465
|
+
!viewModel.find(dd => {
|
|
466
|
+
return dd[1] === d1.key;
|
|
467
|
+
})
|
|
468
|
+
) {
|
|
469
|
+
customizeMap.set(`收件人資訊 - ${d1.title}`, order ? (order.orderData.user_info[d1.key] ?? '-') : '-');
|
|
470
|
+
}
|
|
471
|
+
})
|
|
459
472
|
return customizeMap;
|
|
460
473
|
};
|
|
461
474
|
|
|
@@ -1010,6 +1023,13 @@ export class OrderExcel {
|
|
|
1010
1023
|
await ApiUser.getPublicConfig('customer_form_user_setting', 'manager').then(r => {
|
|
1011
1024
|
return Array.isArray(r.response.value.list) ? r.response.value.list : [];
|
|
1012
1025
|
}),
|
|
1026
|
+
//收件人資料
|
|
1027
|
+
(
|
|
1028
|
+
await ApiUser.getPublicConfig(
|
|
1029
|
+
'custom_form_checkout_recipient',
|
|
1030
|
+
'manager'
|
|
1031
|
+
)
|
|
1032
|
+
).response.value
|
|
1013
1033
|
]);
|
|
1014
1034
|
|
|
1015
1035
|
return dataArray;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class TableStorage {
|
|
2
|
+
}
|
|
3
|
+
TableStorage.limitList = [10, 25, 50, 75, 100];
|
|
4
|
+
TableStorage.setLimit = (limit) => {
|
|
5
|
+
localStorage.setItem('table_default_limit', `${limit}`);
|
|
6
|
+
};
|
|
7
|
+
TableStorage.getLimit = () => {
|
|
8
|
+
var _a;
|
|
9
|
+
const limit = parseInt((_a = localStorage.getItem('table_default_limit')) !== null && _a !== void 0 ? _a : '10', 10);
|
|
10
|
+
return isNaN(limit) ? 10 : limit;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class TableStorage {
|
|
2
|
+
static limitList = [10, 25, 50, 75, 100];
|
|
3
|
+
|
|
4
|
+
static setLimit = (limit: number) => {
|
|
5
|
+
localStorage.setItem('table_default_limit', `${limit}`);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
static getLimit = () => {
|
|
9
|
+
const limit = parseInt(localStorage.getItem('table_default_limit') ?? '10', 10);
|
|
10
|
+
return isNaN(limit) ? 10 : limit;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -6,6 +6,7 @@ import { BgListComponent } from '../backend-manager/bg-list-component.js';
|
|
|
6
6
|
import { CheckInput } from '../modules/checkInput.js';
|
|
7
7
|
import { Setting_editor } from '../jspage/function-page/setting_editor.js';
|
|
8
8
|
import { Tool } from '../modules/tool.js';
|
|
9
|
+
import { TableStorage } from './module/table-storage.js';
|
|
9
10
|
const html = String.raw;
|
|
10
11
|
export class PermissionSetting {
|
|
11
12
|
static main(gvc, edit_mode) {
|
|
@@ -41,6 +42,7 @@ export class PermissionSetting {
|
|
|
41
42
|
},
|
|
42
43
|
dataList: [],
|
|
43
44
|
filter: {},
|
|
45
|
+
listLimit: TableStorage.getLimit(),
|
|
44
46
|
};
|
|
45
47
|
return a;
|
|
46
48
|
}
|
|
@@ -73,6 +75,7 @@ export class PermissionSetting {
|
|
|
73
75
|
},
|
|
74
76
|
dataList: [],
|
|
75
77
|
filter: {},
|
|
78
|
+
listLimit: TableStorage.getLimit(),
|
|
76
79
|
};
|
|
77
80
|
}
|
|
78
81
|
}
|
|
@@ -203,17 +206,23 @@ export class PermissionSetting {
|
|
|
203
206
|
gvc,
|
|
204
207
|
callback: (value) => {
|
|
205
208
|
vm.queryType = value;
|
|
206
|
-
gvc.notifyDataChange(vm.tableId);
|
|
207
|
-
gvc.notifyDataChange(id);
|
|
209
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
208
210
|
},
|
|
209
211
|
default: vm.queryType || 'name',
|
|
210
212
|
options: FilterOptions.permissionSelect,
|
|
211
213
|
}),
|
|
212
214
|
BgWidget.searchFilter(gvc.event(e => {
|
|
213
215
|
vm.query = `${e.value}`.trim();
|
|
214
|
-
gvc.notifyDataChange(vm.tableId);
|
|
215
|
-
gvc.notifyDataChange(id);
|
|
216
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
216
217
|
}), vm.query || '', '搜尋所有員工'),
|
|
218
|
+
BgWidget.countingFilter({
|
|
219
|
+
gvc,
|
|
220
|
+
callback: value => {
|
|
221
|
+
vm.listLimit = value;
|
|
222
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
223
|
+
},
|
|
224
|
+
default: vm.listLimit,
|
|
225
|
+
}),
|
|
217
226
|
BgWidget.funnelFilter({
|
|
218
227
|
gvc,
|
|
219
228
|
callback: () => ListComp.showRightMenu(FilterOptions.permissionFunnel),
|
|
@@ -222,8 +231,7 @@ export class PermissionSetting {
|
|
|
222
231
|
gvc,
|
|
223
232
|
callback: (value) => {
|
|
224
233
|
vm.orderString = value;
|
|
225
|
-
gvc.notifyDataChange(vm.tableId);
|
|
226
|
-
gvc.notifyDataChange(id);
|
|
234
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
227
235
|
},
|
|
228
236
|
default: vm.orderString || 'default',
|
|
229
237
|
options: FilterOptions.permissionOrderBy,
|
|
@@ -241,17 +249,16 @@ export class PermissionSetting {
|
|
|
241
249
|
gvc: gvc,
|
|
242
250
|
getData: vd => {
|
|
243
251
|
vmi = vd;
|
|
244
|
-
const limit = 10;
|
|
245
252
|
ApiUser.getPermission({
|
|
246
253
|
page: vmi.page - 1,
|
|
247
|
-
limit:
|
|
254
|
+
limit: vm.listLimit,
|
|
248
255
|
queryType: vm.queryType,
|
|
249
256
|
query: vm.query,
|
|
250
257
|
orderBy: vm.orderString,
|
|
251
258
|
filter: vm.filter,
|
|
252
259
|
}).then(data => {
|
|
253
260
|
vm.dataList = data.response.data;
|
|
254
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
261
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
255
262
|
vmi.originalData = vm.dataList;
|
|
256
263
|
vmi.tableData = getDatalist();
|
|
257
264
|
vmi.loading = false;
|
|
@@ -7,6 +7,7 @@ import { BgListComponent } from '../backend-manager/bg-list-component.js';
|
|
|
7
7
|
import { CheckInput } from '../modules/checkInput.js';
|
|
8
8
|
import { Setting_editor } from '../jspage/function-page/setting_editor.js';
|
|
9
9
|
import { Tool } from '../modules/tool.js';
|
|
10
|
+
import { TableStorage } from './module/table-storage.js';
|
|
10
11
|
|
|
11
12
|
const html = String.raw;
|
|
12
13
|
|
|
@@ -84,6 +85,7 @@ type ViewModel = {
|
|
|
84
85
|
data: PermissionItem;
|
|
85
86
|
dataList: any;
|
|
86
87
|
filter: any;
|
|
88
|
+
listLimit: number;
|
|
87
89
|
};
|
|
88
90
|
|
|
89
91
|
type PosViewModel = {
|
|
@@ -135,6 +137,7 @@ export class PermissionSetting {
|
|
|
135
137
|
},
|
|
136
138
|
dataList: [],
|
|
137
139
|
filter: {},
|
|
140
|
+
listLimit: TableStorage.getLimit(),
|
|
138
141
|
};
|
|
139
142
|
return a;
|
|
140
143
|
} else {
|
|
@@ -166,6 +169,7 @@ export class PermissionSetting {
|
|
|
166
169
|
},
|
|
167
170
|
dataList: [],
|
|
168
171
|
filter: {},
|
|
172
|
+
listLimit: TableStorage.getLimit(),
|
|
169
173
|
};
|
|
170
174
|
}
|
|
171
175
|
}
|
|
@@ -310,8 +314,7 @@ export class PermissionSetting {
|
|
|
310
314
|
gvc,
|
|
311
315
|
callback: (value: any) => {
|
|
312
316
|
vm.queryType = value;
|
|
313
|
-
gvc.notifyDataChange(vm.tableId);
|
|
314
|
-
gvc.notifyDataChange(id);
|
|
317
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
315
318
|
},
|
|
316
319
|
default: vm.queryType || 'name',
|
|
317
320
|
options: FilterOptions.permissionSelect,
|
|
@@ -319,12 +322,19 @@ export class PermissionSetting {
|
|
|
319
322
|
BgWidget.searchFilter(
|
|
320
323
|
gvc.event(e => {
|
|
321
324
|
vm.query = `${e.value}`.trim();
|
|
322
|
-
gvc.notifyDataChange(vm.tableId);
|
|
323
|
-
gvc.notifyDataChange(id);
|
|
325
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
324
326
|
}),
|
|
325
327
|
vm.query || '',
|
|
326
328
|
'搜尋所有員工'
|
|
327
329
|
),
|
|
330
|
+
BgWidget.countingFilter({
|
|
331
|
+
gvc,
|
|
332
|
+
callback: value => {
|
|
333
|
+
vm.listLimit = value;
|
|
334
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
335
|
+
},
|
|
336
|
+
default: vm.listLimit,
|
|
337
|
+
}),
|
|
328
338
|
BgWidget.funnelFilter({
|
|
329
339
|
gvc,
|
|
330
340
|
callback: () => ListComp.showRightMenu(FilterOptions.permissionFunnel),
|
|
@@ -333,8 +343,7 @@ export class PermissionSetting {
|
|
|
333
343
|
gvc,
|
|
334
344
|
callback: (value: any) => {
|
|
335
345
|
vm.orderString = value;
|
|
336
|
-
gvc.notifyDataChange(vm.tableId);
|
|
337
|
-
gvc.notifyDataChange(id);
|
|
346
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
338
347
|
},
|
|
339
348
|
default: vm.orderString || 'default',
|
|
340
349
|
options: FilterOptions.permissionOrderBy,
|
|
@@ -353,17 +362,16 @@ export class PermissionSetting {
|
|
|
353
362
|
gvc: gvc,
|
|
354
363
|
getData: vd => {
|
|
355
364
|
vmi = vd;
|
|
356
|
-
const limit = 10;
|
|
357
365
|
ApiUser.getPermission({
|
|
358
366
|
page: vmi.page - 1,
|
|
359
|
-
limit:
|
|
367
|
+
limit: vm.listLimit,
|
|
360
368
|
queryType: vm.queryType,
|
|
361
369
|
query: vm.query,
|
|
362
370
|
orderBy: vm.orderString,
|
|
363
371
|
filter: vm.filter,
|
|
364
372
|
}).then(data => {
|
|
365
373
|
vm.dataList = data.response.data;
|
|
366
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
374
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
367
375
|
vmi.originalData = vm.dataList;
|
|
368
376
|
vmi.tableData = getDatalist();
|
|
369
377
|
vmi.loading = false;
|
|
@@ -695,7 +703,7 @@ export class PermissionSetting {
|
|
|
695
703
|
}
|
|
696
704
|
|
|
697
705
|
dialog.dataLoading({ visible: true });
|
|
698
|
-
|
|
706
|
+
|
|
699
707
|
ApiUser.setPermission({
|
|
700
708
|
email: obj.type === 'add' ? vm.data.email : original.email,
|
|
701
709
|
config: {
|
|
@@ -19,6 +19,7 @@ import { ShoppingOrderManager } from './shopping-order-manager.js';
|
|
|
19
19
|
import { PaymentConfig } from '../glitter-base/global/payment-config.js';
|
|
20
20
|
import { GlobalUser } from '../glitter-base/global/global-user.js';
|
|
21
21
|
import { OrderInfo } from '../public-models/order-info.js';
|
|
22
|
+
import { TableStorage } from './module/table-storage.js';
|
|
22
23
|
const html = String.raw;
|
|
23
24
|
const globalStyle = {
|
|
24
25
|
header_title: `
|
|
@@ -99,6 +100,7 @@ export class ReconciliationArea {
|
|
|
99
100
|
apiJSON: {},
|
|
100
101
|
checkedData: [],
|
|
101
102
|
headerConfig: [],
|
|
103
|
+
listLimit: TableStorage.getLimit(),
|
|
102
104
|
};
|
|
103
105
|
return gvc.bindView(() => {
|
|
104
106
|
const id = gvc.glitter.getUUID();
|
|
@@ -367,6 +369,14 @@ export class ReconciliationArea {
|
|
|
367
369
|
vm.query = `${e.value}`.trim();
|
|
368
370
|
gvc.notifyDataChange(vm.id);
|
|
369
371
|
}), vm.query || '', '搜尋訂單'),
|
|
372
|
+
BgWidget.countingFilter({
|
|
373
|
+
gvc,
|
|
374
|
+
callback: value => {
|
|
375
|
+
vm.listLimit = value;
|
|
376
|
+
gvc.notifyDataChange(vm.id);
|
|
377
|
+
},
|
|
378
|
+
default: vm.listLimit,
|
|
379
|
+
}),
|
|
370
380
|
BgWidget.funnelFilter({
|
|
371
381
|
gvc,
|
|
372
382
|
callback: () => {
|
|
@@ -393,10 +403,9 @@ export class ReconciliationArea {
|
|
|
393
403
|
defPage: ReconciliationArea.vm.page,
|
|
394
404
|
getData: vmi => {
|
|
395
405
|
ReconciliationArea.vm.page = vmi.page;
|
|
396
|
-
const limit = 20;
|
|
397
406
|
vm.apiJSON = {
|
|
398
407
|
page: vmi.page - 1,
|
|
399
|
-
limit:
|
|
408
|
+
limit: vm.listLimit,
|
|
400
409
|
search: vm.query || undefined,
|
|
401
410
|
searchType: vm.queryType || 'cart_token',
|
|
402
411
|
orderString: vm.orderString,
|
|
@@ -491,7 +500,7 @@ export class ReconciliationArea {
|
|
|
491
500
|
});
|
|
492
501
|
}
|
|
493
502
|
vm.dataList = data.response.data;
|
|
494
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
503
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
495
504
|
vmi.originalData = vm.dataList;
|
|
496
505
|
vmi.tableData = getDatalist();
|
|
497
506
|
vmi.loading = false;
|
|
@@ -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:
|
|
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 /
|
|
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:
|
|
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 /
|
|
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:
|
|
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 /
|
|
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:
|
|
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 /
|
|
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:
|
|
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 /
|
|
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:
|
|
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 /
|
|
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;
|