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.
- 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-product.js +39 -18
- package/lowcode/backend-manager/bg-product.ts +54 -23
- 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/pos-pages/payment-page.js +37 -29
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +61 -49
- package/lowcode/cms-plugin/pos-pages/pos-function.js +6 -1
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +8 -1
- 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 +15 -7
- package/lowcode/cms-plugin/stock-history.ts +16 -17
- 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 +11 -6
- package/lowcode/form-view/e-commerce/product-select.js +13 -11
- package/lowcode/form-view/e-commerce/product-select.ts +14 -12
- package/lowcode/modules/tool.js +9 -0
- package/lowcode/modules/tool.ts +12 -0
- package/lowcode/public-components/checkout/index.js +216 -207
- package/lowcode/public-components/checkout/index.ts +1315 -1309
- 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/models/glitter-finance.js +1 -2
- package/src/api-public/models/glitter-finance.js.map +1 -5
- package/src/api-public/services/data-analyze.d.ts +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/fb-service.js +4 -4
- package/src/api-public/services/fb-service.js.map +1 -1
- package/src/api-public/services/schedule.d.ts +1 -1
- package/src/api-public/services/schedule.js +18 -14
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +18 -14
- package/src/api-public/services/user.d.ts +6 -5
- package/src/api-public/services/user.js +12 -10
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +14 -10
- package/src/config.d.ts +1 -1
- package/src/modules/AWSLib.js +2 -3
- package/src/modules/AWSLib.js.map +1 -1
- package/src/modules/database.d.ts +1 -1
- package/src/modules/redis.d.ts +1 -1
- package/src/modules/tool.d.ts +4 -4
- package/src/modules/tool.js +1 -2
- package/src/modules/tool.js.map +1 -1
- 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/backend-service.js +17 -7
- package/src/services/backend-service.js.map +1 -1
- package/src/services/create-instance.js +3 -4
- package/src/services/create-instance.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/saas-table-check.js.map +1 -5
- package/src/services/tool.js +2 -3
- package/src/services/tool.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: {
|
|
@@ -199,7 +199,8 @@ export class PaymentPage {
|
|
|
199
199
|
</div>
|
|
200
200
|
</div>
|
|
201
201
|
<div
|
|
202
|
-
class="d-flex flex-column py-2"
|
|
202
|
+
class="d-flex flex-column py-2"
|
|
203
|
+
onclick="${gvc.event(() => {
|
|
203
204
|
PosFunction.setMoney(gvc, count => {
|
|
204
205
|
obj.ogOrderData.lineItems[index].count = count;
|
|
205
206
|
refreshOrderView();
|
|
@@ -242,7 +243,10 @@ export class PaymentPage {
|
|
|
242
243
|
: ``}
|
|
243
244
|
</div>
|
|
244
245
|
<div class="flex-fill"></div>
|
|
245
|
-
<div
|
|
246
|
+
<div
|
|
247
|
+
class="d-sm-none d-flex align-items-center justify-content-center flex-column"
|
|
248
|
+
style="gap:0px;"
|
|
249
|
+
onclick="${gvc.event(() => {
|
|
246
250
|
PosFunction.setMoney(gvc, money => {
|
|
247
251
|
if (money === data.sale_price) {
|
|
248
252
|
delete obj.ogOrderData.lineItems[index].custom_price;
|
|
@@ -252,20 +256,24 @@ export class PaymentPage {
|
|
|
252
256
|
}
|
|
253
257
|
refreshOrderView();
|
|
254
258
|
}, '更改商品單價');
|
|
255
|
-
})}"
|
|
256
|
-
${(data.sale_price !== data.variant_sale_price) ? `
|
|
257
|
-
<span class="text-decoration-line-through"
|
|
258
|
-
>$${parseInt((data.variant_sale_price * data.count), 10).toLocaleString()}</span
|
|
259
|
-
>
|
|
260
|
-
<span class="text-danger"
|
|
261
|
-
>$${parseInt((data.sale_price * data.count), 10).toLocaleString()}</span
|
|
262
|
-
>
|
|
263
|
-
` : `
|
|
264
|
-
<span
|
|
265
|
-
>$${parseInt((data.sale_price * data.count), 10).toLocaleString()}</span
|
|
259
|
+
})}"
|
|
266
260
|
>
|
|
267
|
-
|
|
268
|
-
|
|
261
|
+
${(() => {
|
|
262
|
+
function formatPrice(price) {
|
|
263
|
+
return `$${parseInt(`${price}`, 10).toLocaleString()}`;
|
|
264
|
+
}
|
|
265
|
+
if (data.variant_sale_price && data.sale_price !== data.variant_sale_price) {
|
|
266
|
+
return html `
|
|
267
|
+
<span class="text-decoration-line-through"
|
|
268
|
+
>${formatPrice(data.variant_sale_price * data.count)}</span
|
|
269
|
+
>
|
|
270
|
+
<span class="text-danger"
|
|
271
|
+
>${formatPrice(data.sale_price * data.count)}</span
|
|
272
|
+
>
|
|
273
|
+
`;
|
|
274
|
+
}
|
|
275
|
+
return html ` <span>${formatPrice(data.sale_price * data.count)}</span> `;
|
|
276
|
+
})()}
|
|
269
277
|
</div>
|
|
270
278
|
</div>
|
|
271
279
|
<div class="col-2 d-none d-sm-flex align-items-center justify-content-start">
|
|
@@ -298,19 +306,20 @@ export class PaymentPage {
|
|
|
298
306
|
}, '更改商品單價');
|
|
299
307
|
})}"
|
|
300
308
|
>
|
|
301
|
-
${(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
309
|
+
${(() => {
|
|
310
|
+
function formatPrice(price) {
|
|
311
|
+
return `$${parseInt(`${price}`, 10).toLocaleString()}`;
|
|
312
|
+
}
|
|
313
|
+
if (data.variant_sale_price && data.sale_price !== data.variant_sale_price) {
|
|
314
|
+
return html `
|
|
315
|
+
<span class="text-decoration-line-through"
|
|
316
|
+
>${formatPrice(data.variant_sale_price * data.count)}</span
|
|
317
|
+
>
|
|
318
|
+
<span class="text-danger">${formatPrice(data.sale_price * data.count)}</span>
|
|
319
|
+
`;
|
|
320
|
+
}
|
|
321
|
+
return html ` <span>${formatPrice(data.sale_price * data.count)}</span> `;
|
|
322
|
+
})()}
|
|
314
323
|
</div>
|
|
315
324
|
</div>
|
|
316
325
|
`;
|
|
@@ -1956,7 +1965,6 @@ export class PaymentPage {
|
|
|
1956
1965
|
else {
|
|
1957
1966
|
PaymentPage.clearHistory();
|
|
1958
1967
|
const glitter = gvc.glitter;
|
|
1959
|
-
console.log(`res.response.order-data==>`, res.response.data);
|
|
1960
1968
|
const invoice = res.response.data.invoice;
|
|
1961
1969
|
if (res.response.data.invoice &&
|
|
1962
1970
|
(PayConfig.deviceType === 'pos' || ConnectionMode.on_connected_device) &&
|
|
@@ -233,16 +233,17 @@ export class PaymentPage {
|
|
|
233
233
|
</div>
|
|
234
234
|
</div>
|
|
235
235
|
<div
|
|
236
|
-
class="d-flex flex-column py-2"
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
236
|
+
class="d-flex flex-column py-2"
|
|
237
|
+
onclick="${gvc.event(() => {
|
|
238
|
+
PosFunction.setMoney(
|
|
239
|
+
gvc,
|
|
240
|
+
count => {
|
|
241
|
+
obj.ogOrderData.lineItems[index].count = count;
|
|
242
|
+
refreshOrderView();
|
|
243
|
+
},
|
|
244
|
+
'更改商品數量'
|
|
245
|
+
);
|
|
246
|
+
})}"
|
|
246
247
|
style="font-size: 16px;font-style: normal;font-weight: 500;letter-spacing: 0.64px;margin-left: 12px;"
|
|
247
248
|
>
|
|
248
249
|
<div class="d-flex justify-content-center flex-column" style="gap:5px;">
|
|
@@ -279,33 +280,42 @@ export class PaymentPage {
|
|
|
279
280
|
: ``}
|
|
280
281
|
</div>
|
|
281
282
|
<div class="flex-fill"></div>
|
|
282
|
-
<div
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
>
|
|
300
|
-
<span class="text-danger"
|
|
301
|
-
>$${parseInt((data.sale_price * data.count) as any, 10).toLocaleString()}</span
|
|
302
|
-
>
|
|
303
|
-
`:`
|
|
304
|
-
<span
|
|
305
|
-
>$${parseInt((data.sale_price * data.count) as any, 10).toLocaleString()}</span
|
|
283
|
+
<div
|
|
284
|
+
class="d-sm-none d-flex align-items-center justify-content-center flex-column"
|
|
285
|
+
style="gap:0px;"
|
|
286
|
+
onclick="${gvc.event(() => {
|
|
287
|
+
PosFunction.setMoney(
|
|
288
|
+
gvc,
|
|
289
|
+
money => {
|
|
290
|
+
if (money === data.sale_price) {
|
|
291
|
+
delete obj.ogOrderData.lineItems[index].custom_price;
|
|
292
|
+
} else {
|
|
293
|
+
obj.ogOrderData.lineItems[index].custom_price = money;
|
|
294
|
+
}
|
|
295
|
+
refreshOrderView();
|
|
296
|
+
},
|
|
297
|
+
'更改商品單價'
|
|
298
|
+
);
|
|
299
|
+
})}"
|
|
306
300
|
>
|
|
307
|
-
|
|
301
|
+
${(() => {
|
|
302
|
+
function formatPrice(price: any) {
|
|
303
|
+
return `$${parseInt(`${price}`, 10).toLocaleString()}`;
|
|
304
|
+
}
|
|
308
305
|
|
|
306
|
+
if (data.variant_sale_price && data.sale_price !== data.variant_sale_price) {
|
|
307
|
+
return html`
|
|
308
|
+
<span class="text-decoration-line-through"
|
|
309
|
+
>${formatPrice(data.variant_sale_price * data.count)}</span
|
|
310
|
+
>
|
|
311
|
+
<span class="text-danger"
|
|
312
|
+
>${formatPrice(data.sale_price * data.count)}</span
|
|
313
|
+
>
|
|
314
|
+
`;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return html` <span>${formatPrice(data.sale_price * data.count)}</span> `;
|
|
318
|
+
})()}
|
|
309
319
|
</div>
|
|
310
320
|
</div>
|
|
311
321
|
<div class="col-2 d-none d-sm-flex align-items-center justify-content-start">
|
|
@@ -345,19 +355,22 @@ export class PaymentPage {
|
|
|
345
355
|
);
|
|
346
356
|
})}"
|
|
347
357
|
>
|
|
348
|
-
${(
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
358
|
+
${(() => {
|
|
359
|
+
function formatPrice(price: any) {
|
|
360
|
+
return `$${parseInt(`${price}`, 10).toLocaleString()}`;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if (data.variant_sale_price && data.sale_price !== data.variant_sale_price) {
|
|
364
|
+
return html`
|
|
365
|
+
<span class="text-decoration-line-through"
|
|
366
|
+
>${formatPrice(data.variant_sale_price * data.count)}</span
|
|
367
|
+
>
|
|
368
|
+
<span class="text-danger">${formatPrice(data.sale_price * data.count)}</span>
|
|
369
|
+
`;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
return html` <span>${formatPrice(data.sale_price * data.count)}</span> `;
|
|
373
|
+
})()}
|
|
361
374
|
</div>
|
|
362
375
|
</div>
|
|
363
376
|
`;
|
|
@@ -2125,7 +2138,6 @@ export class PaymentPage {
|
|
|
2125
2138
|
} else {
|
|
2126
2139
|
PaymentPage.clearHistory();
|
|
2127
2140
|
const glitter = gvc.glitter;
|
|
2128
|
-
console.log(`res.response.order-data==>`, res.response.data);
|
|
2129
2141
|
const invoice = res.response.data.invoice;
|
|
2130
2142
|
if (
|
|
2131
2143
|
res.response.data.invoice &&
|
|
@@ -18,6 +18,7 @@ import { PaymentPage } from './payment-page.js';
|
|
|
18
18
|
import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
19
19
|
import { UmClass } from '../../public-components/user-manager/um-class.js';
|
|
20
20
|
import { Language } from '../../glitter-base/global/language.js';
|
|
21
|
+
import { Tool } from '../../modules/tool.js';
|
|
21
22
|
const html = String.raw;
|
|
22
23
|
const css = String.raw;
|
|
23
24
|
const dialogStyle = `
|
|
@@ -999,7 +1000,11 @@ export class PosFunction {
|
|
|
999
1000
|
'guest',
|
|
1000
1001
|
}).then((res) => __awaiter(this, void 0, void 0, function* () {
|
|
1001
1002
|
if (res.result && res.response.data) {
|
|
1002
|
-
vm.dataList = res.response.data.filter((item) =>
|
|
1003
|
+
vm.dataList = res.response.data.filter((item) => {
|
|
1004
|
+
return (item.content.status === 1 &&
|
|
1005
|
+
item.content.trigger === 'code' &&
|
|
1006
|
+
Tool.isNowBetweenDates(item.content.start_ISO_Date, item.content.end_ISO_Date));
|
|
1007
|
+
});
|
|
1003
1008
|
}
|
|
1004
1009
|
else {
|
|
1005
1010
|
vm.dataList = [];
|
|
@@ -12,6 +12,7 @@ import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
|
12
12
|
import { UmClass } from '../../public-components/user-manager/um-class.js';
|
|
13
13
|
import { Voucher, VoucherContent } from '../../public-components/user-manager/um-voucher.js';
|
|
14
14
|
import { Language } from '../../glitter-base/global/language.js';
|
|
15
|
+
import { Tool } from '../../modules/tool.js';
|
|
15
16
|
|
|
16
17
|
const html = String.raw;
|
|
17
18
|
const css = String.raw;
|
|
@@ -1093,7 +1094,13 @@ export class PosFunction {
|
|
|
1093
1094
|
'guest',
|
|
1094
1095
|
}).then(async res => {
|
|
1095
1096
|
if (res.result && res.response.data) {
|
|
1096
|
-
vm.dataList = res.response.data.filter((item: Voucher) =>
|
|
1097
|
+
vm.dataList = res.response.data.filter((item: Voucher) => {
|
|
1098
|
+
return (
|
|
1099
|
+
item.content.status === 1 &&
|
|
1100
|
+
item.content.trigger === 'code' &&
|
|
1101
|
+
Tool.isNowBetweenDates(item.content.start_ISO_Date, item.content.end_ISO_Date)
|
|
1102
|
+
);
|
|
1103
|
+
});
|
|
1097
1104
|
} else {
|
|
1098
1105
|
vm.dataList = [];
|
|
1099
1106
|
}
|
|
@@ -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;
|