ts-glitter 13.3.4 → 13.3.7
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 +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-blog.js +2 -7
- package/lowcode/backend-manager/bg-blog.ts +8 -13
- package/lowcode/backend-manager/bg-customer-message.js +4 -2
- package/lowcode/backend-manager/bg-customer-message.ts +4 -2
- package/lowcode/backend-manager/bg-graph-api.js +6 -11
- package/lowcode/backend-manager/bg-graph-api.ts +14 -20
- package/lowcode/backend-manager/bg-line.js +526 -1002
- package/lowcode/backend-manager/bg-line.ts +1815 -2354
- package/lowcode/backend-manager/bg-notify.js +392 -746
- package/lowcode/backend-manager/bg-notify.ts +436 -835
- package/lowcode/backend-manager/bg-project.js +176 -293
- package/lowcode/backend-manager/bg-project.ts +214 -344
- package/lowcode/backend-manager/bg-recommend.js +39 -148
- package/lowcode/backend-manager/bg-recommend.ts +43 -162
- package/lowcode/backend-manager/bg-sns.js +489 -814
- package/lowcode/backend-manager/bg-sns.ts +1876 -2238
- package/lowcode/backend-manager/bg-widget.js +301 -171
- package/lowcode/backend-manager/bg-widget.ts +324 -193
- package/lowcode/cms-plugin/ai-points.js +84 -67
- package/lowcode/cms-plugin/ai-points.ts +280 -247
- package/lowcode/cms-plugin/auto-reply.js +6 -7
- package/lowcode/cms-plugin/auto-reply.ts +6 -7
- package/lowcode/cms-plugin/data-analyze.js +5 -6
- package/lowcode/cms-plugin/data-analyze.ts +5 -6
- package/lowcode/cms-plugin/form-setting.js +122 -220
- package/lowcode/cms-plugin/form-setting.ts +124 -240
- package/lowcode/cms-plugin/line-auto-reply.js +17 -18
- package/lowcode/cms-plugin/line-auto-reply.ts +29 -36
- package/lowcode/cms-plugin/member-group-list.js +5 -2
- package/lowcode/cms-plugin/member-group-list.ts +5 -2
- package/lowcode/cms-plugin/member-type-list.js +36 -84
- package/lowcode/cms-plugin/member-type-list.ts +39 -92
- package/lowcode/cms-plugin/menus-setting.js +8 -73
- package/lowcode/cms-plugin/menus-setting.ts +8 -78
- package/lowcode/cms-plugin/permission-setting.js +73 -106
- package/lowcode/cms-plugin/permission-setting.ts +236 -278
- package/lowcode/cms-plugin/shopping-collections.js +95 -137
- package/lowcode/cms-plugin/shopping-collections.ts +103 -147
- package/lowcode/cms-plugin/shopping-discount-setting.js +310 -416
- package/lowcode/cms-plugin/shopping-discount-setting.ts +1269 -1386
- package/lowcode/cms-plugin/shopping-finance-setting.js +1 -0
- package/lowcode/cms-plugin/shopping-finance-setting.ts +1 -0
- package/lowcode/cms-plugin/shopping-order-manager.js +742 -973
- package/lowcode/cms-plugin/shopping-order-manager.ts +1928 -2164
- package/lowcode/cms-plugin/shopping-order-return.js +147 -267
- package/lowcode/cms-plugin/shopping-order-return.ts +154 -292
- package/lowcode/cms-plugin/shopping-product-setting.js +6 -2
- package/lowcode/cms-plugin/shopping-product-setting.ts +8 -4
- package/lowcode/cms-plugin/shopping-product-stock.js +12 -92
- package/lowcode/cms-plugin/shopping-product-stock.ts +14 -94
- package/lowcode/cms-plugin/shopping-product-text.js +0 -3
- package/lowcode/cms-plugin/shopping-product-text.ts +0 -3
- package/lowcode/cms-plugin/shopping-rebate.js +95 -151
- package/lowcode/cms-plugin/shopping-rebate.ts +101 -159
- package/lowcode/cms-plugin/sms-points.js +83 -67
- package/lowcode/cms-plugin/sms-points.ts +281 -241
- package/lowcode/cms-plugin/sns-auto-reply.js +18 -18
- package/lowcode/cms-plugin/sns-auto-reply.ts +34 -40
- package/lowcode/cms-plugin/user-list.js +71 -90
- package/lowcode/cms-plugin/user-list.ts +76 -95
- package/lowcode/cms-plugin/web-config-setting.js +61 -111
- package/lowcode/cms-plugin/web-config-setting.ts +65 -124
- package/lowcode/css/editor.css +5 -2
- package/lowcode/glitter-base/route/shopping.js +1 -1
- package/lowcode/glitter-base/route/shopping.ts +19 -19
- package/lowcode/jspage/editor.js +1 -1
- package/lowcode/jspage/editor.ts +1 -1
- package/lowcode/jspage/main.js +3 -0
- package/lowcode/jspage/main.ts +3 -0
- package/package.json +1 -2
- package/src/api-public/controllers/ai-chat.js.map +5 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/line-message.js.map +1 -1
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/chat.js +3 -3
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/chat.ts +3 -4
- package/src/api-public/services/fb-message.js.map +5 -1
- package/src/api-public/services/filter-protect-data.js.map +1 -1
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/notify.js.map +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/share-permission.js.map +1 -1
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/user.js +67 -66
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +212 -182
- package/src/helper/glitter-util.js.map +1 -1
- package/src/modules/firebase.d.ts +1 -0
- package/src/modules/firebase.js +1 -1
- package/src/modules/firebase.js.map +1 -1
|
@@ -25,37 +25,37 @@ export class ShoppingOrderManager {
|
|
|
25
25
|
{
|
|
26
26
|
title: '門市立即取貨',
|
|
27
27
|
value: 'now',
|
|
28
|
-
name: ''
|
|
28
|
+
name: '',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
title: '一般宅配',
|
|
32
32
|
value: 'normal',
|
|
33
|
-
name: ''
|
|
33
|
+
name: '',
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
title: '全家店到店',
|
|
37
37
|
value: 'FAMIC2C',
|
|
38
|
-
name: ''
|
|
38
|
+
name: '',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
title: '萊爾富店到店',
|
|
42
42
|
value: 'HILIFEC2C',
|
|
43
|
-
name: ''
|
|
43
|
+
name: '',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
title: 'OK超商店到店',
|
|
47
47
|
value: 'OKMARTC2C',
|
|
48
|
-
name: ''
|
|
48
|
+
name: '',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
title: '7-ELEVEN超商交貨便',
|
|
52
52
|
value: 'UNIMARTC2C',
|
|
53
|
-
name: ''
|
|
53
|
+
name: '',
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
title: '實體門市取貨',
|
|
57
57
|
value: 'shop',
|
|
58
|
-
name: ''
|
|
58
|
+
name: '',
|
|
59
59
|
},
|
|
60
60
|
].map((dd) => {
|
|
61
61
|
dd.name = dd.title;
|
|
@@ -80,9 +80,7 @@ export class ShoppingOrderManager {
|
|
|
80
80
|
};
|
|
81
81
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.orderFilterFrame);
|
|
82
82
|
vm.filter = ListComp.getFilterObject();
|
|
83
|
-
gvc.addMtScript([{ src: 'https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.9/xlsx.full.min.js' }], () => {
|
|
84
|
-
}, () => {
|
|
85
|
-
});
|
|
83
|
+
gvc.addMtScript([{ src: 'https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.9/xlsx.full.min.js' }], () => { }, () => { });
|
|
86
84
|
function importDataTo(event) {
|
|
87
85
|
const input = event.target;
|
|
88
86
|
const XLSX = window.XLSX;
|
|
@@ -141,10 +139,10 @@ export class ShoppingOrderManager {
|
|
|
141
139
|
<div class="flex-fill"></div>
|
|
142
140
|
<div style="display: flex; gap: 14px;">
|
|
143
141
|
<input
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
class="d-none"
|
|
143
|
+
type="file"
|
|
144
|
+
id="upload-excel"
|
|
145
|
+
onchange="${gvc.event((e, event) => {
|
|
148
146
|
importDataTo(event);
|
|
149
147
|
})}"
|
|
150
148
|
/>
|
|
@@ -334,35 +332,30 @@ export class ShoppingOrderManager {
|
|
|
334
332
|
];
|
|
335
333
|
const filterTags = ListComp.getFilterTags(FilterOptions.orderFunnel);
|
|
336
334
|
if (document.body.clientWidth < 768) {
|
|
337
|
-
return html `
|
|
338
|
-
<div
|
|
339
|
-
|
|
340
|
-
<div
|
|
341
|
-
|
|
342
|
-
${filterList[3]}
|
|
343
|
-
</div>
|
|
344
|
-
</div>
|
|
345
|
-
<div style="display: flex; margin-top: 8px;">
|
|
346
|
-
${filterList[1]}
|
|
335
|
+
return html ` <div style="display: flex; align-items: center; gap: 10px; width: 100%; justify-content: space-between">
|
|
336
|
+
<div>${filterList[0]}</div>
|
|
337
|
+
<div style="display: flex;">
|
|
338
|
+
<div class="me-2">${filterList[2]}</div>
|
|
339
|
+
${filterList[3]}
|
|
347
340
|
</div>
|
|
348
|
-
|
|
341
|
+
</div>
|
|
342
|
+
<div style="display: flex; margin-top: 8px;">${filterList[1]}</div>
|
|
343
|
+
<div>${filterTags}</div>`;
|
|
349
344
|
}
|
|
350
345
|
else {
|
|
351
|
-
return html `
|
|
352
|
-
|
|
353
|
-
${filterList.join('')}
|
|
354
|
-
</div>
|
|
355
|
-
<div>${filterTags}</div>`;
|
|
346
|
+
return html ` <div style="display: flex; align-items: center; gap: 10px;">${filterList.join('')}</div>
|
|
347
|
+
<div>${filterTags}</div>`;
|
|
356
348
|
}
|
|
357
349
|
},
|
|
358
350
|
});
|
|
359
351
|
})(),
|
|
360
|
-
BgWidget.
|
|
352
|
+
BgWidget.tableV3({
|
|
361
353
|
gvc: gvc,
|
|
362
354
|
getData: (vmi) => {
|
|
355
|
+
const limit = 20;
|
|
363
356
|
ApiShop.getOrder({
|
|
364
357
|
page: vmi.page - 1,
|
|
365
|
-
limit:
|
|
358
|
+
limit: limit,
|
|
366
359
|
search: vm.query || undefined,
|
|
367
360
|
searchType: vm.queryType || 'cart_token',
|
|
368
361
|
orderString: vm.orderString,
|
|
@@ -370,46 +363,16 @@ export class ShoppingOrderManager {
|
|
|
370
363
|
archived: `${query.isArchived}`,
|
|
371
364
|
is_pos: vm.filter_type === 'pos',
|
|
372
365
|
}).then((data) => {
|
|
373
|
-
vmi.pageSize = Math.ceil(data.response.total / 20);
|
|
374
|
-
vm.dataList = data.response.data;
|
|
375
366
|
function getDatalist() {
|
|
376
367
|
return data.response.data.map((dd) => {
|
|
377
368
|
var _a;
|
|
378
369
|
dd.orderData.total = dd.orderData.total || 0;
|
|
379
370
|
dd.orderData.customer_info = (_a = dd.orderData.customer_info) !== null && _a !== void 0 ? _a : {};
|
|
380
371
|
return [
|
|
381
|
-
{
|
|
382
|
-
key: EditorElem.checkBoxOnly({
|
|
383
|
-
gvc: gvc,
|
|
384
|
-
def: !data.response.data.find((dd) => {
|
|
385
|
-
return !dd.checked;
|
|
386
|
-
}),
|
|
387
|
-
callback: (result) => {
|
|
388
|
-
data.response.data.map((dd) => {
|
|
389
|
-
dd.checked = result;
|
|
390
|
-
});
|
|
391
|
-
vmi.data = getDatalist();
|
|
392
|
-
vmi.callback();
|
|
393
|
-
gvc.notifyDataChange(vm.filterId);
|
|
394
|
-
},
|
|
395
|
-
}),
|
|
396
|
-
value: EditorElem.checkBoxOnly({
|
|
397
|
-
gvc: gvc,
|
|
398
|
-
def: dd.checked,
|
|
399
|
-
callback: (result) => {
|
|
400
|
-
dd.checked = result;
|
|
401
|
-
vmi.data = getDatalist();
|
|
402
|
-
vmi.callback();
|
|
403
|
-
gvc.notifyDataChange(vm.filterId);
|
|
404
|
-
},
|
|
405
|
-
style: 'height:40px;',
|
|
406
|
-
}),
|
|
407
|
-
},
|
|
408
372
|
{
|
|
409
373
|
key: '訂單編號',
|
|
410
|
-
value: html `
|
|
411
|
-
|
|
412
|
-
${dd.cart_token}${(() => {
|
|
374
|
+
value: html ` <div class="d-flex align-items-center gap-2">
|
|
375
|
+
${dd.cart_token}${(() => {
|
|
413
376
|
switch (dd.orderData.orderSource) {
|
|
414
377
|
case 'POS':
|
|
415
378
|
return BgWidget.notifyInsignia('POS');
|
|
@@ -419,7 +382,7 @@ export class ShoppingOrderManager {
|
|
|
419
382
|
return '';
|
|
420
383
|
}
|
|
421
384
|
})()}
|
|
422
|
-
|
|
385
|
+
</div>`,
|
|
423
386
|
},
|
|
424
387
|
{
|
|
425
388
|
key: '訂單日期',
|
|
@@ -487,13 +450,15 @@ export class ShoppingOrderManager {
|
|
|
487
450
|
})(),
|
|
488
451
|
},
|
|
489
452
|
].map((dd) => {
|
|
490
|
-
dd.value = html `
|
|
491
|
-
<div style="line-height:40px;">${dd.value}</div>`;
|
|
453
|
+
dd.value = html ` <div style="line-height:40px;">${dd.value}</div>`;
|
|
492
454
|
return dd;
|
|
493
455
|
});
|
|
494
456
|
});
|
|
495
457
|
}
|
|
496
|
-
|
|
458
|
+
vm.dataList = data.response.data;
|
|
459
|
+
vmi.pageSize = Math.ceil(data.response.total / limit);
|
|
460
|
+
vmi.originalData = vm.dataList;
|
|
461
|
+
vmi.tableData = getDatalist();
|
|
497
462
|
vmi.loading = false;
|
|
498
463
|
vmi.callback();
|
|
499
464
|
});
|
|
@@ -502,114 +467,85 @@ export class ShoppingOrderManager {
|
|
|
502
467
|
vm.data = vm.dataList[index];
|
|
503
468
|
vm.type = 'replace';
|
|
504
469
|
},
|
|
505
|
-
filter:
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
const
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
470
|
+
filter: [
|
|
471
|
+
{
|
|
472
|
+
name: '列印托運單',
|
|
473
|
+
option: true,
|
|
474
|
+
event: () => {
|
|
475
|
+
const checkArray = vm.dataList.filter((dd) => dd.checked);
|
|
476
|
+
const strArray = checkArray.map((dd) => {
|
|
477
|
+
try {
|
|
478
|
+
return dd.orderData.deliveryData.LogisticsSubType;
|
|
479
|
+
}
|
|
480
|
+
catch (error) {
|
|
481
|
+
return undefined;
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
if (strArray.includes(undefined)) {
|
|
485
|
+
dialog.errorMessage({
|
|
486
|
+
text: html ` <div class="text-center">已勾選訂單中不可含有<br />非超商店到店的配送方式</div>`,
|
|
487
|
+
});
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
const allEqual = strArray.every((val) => val && val === strArray[0]);
|
|
491
|
+
if (!allEqual) {
|
|
492
|
+
dialog.errorMessage({ text: '配送的超商需為同一種品牌' });
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
if (strArray.includes('HILIFEC2C') && strArray.length > 1) {
|
|
496
|
+
dialog.errorMessage({ text: '萊爾富不支援一次列印多張托運單' });
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
return this.printStoreOrderInfo({
|
|
500
|
+
gvc,
|
|
501
|
+
store: strArray[0],
|
|
502
|
+
deliverys: checkArray.map((dd) => {
|
|
503
|
+
const delivery = dd.orderData.deliveryData;
|
|
504
|
+
return {
|
|
505
|
+
AllPayLogisticsID: delivery.AllPayLogisticsID,
|
|
506
|
+
CVSPaymentNo: delivery.CVSPaymentNo,
|
|
507
|
+
CVSValidationNo: delivery.CVSValidationNo,
|
|
508
|
+
};
|
|
509
|
+
}),
|
|
510
|
+
});
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
name: query.isArchived ? '解除封存' : '批量封存',
|
|
515
|
+
event: () => {
|
|
516
|
+
dialog.checkYesOrNot({
|
|
517
|
+
text: `是否確認${query.isArchived ? '解除封存' : '封存'}所選項目?`,
|
|
518
|
+
callback: (response) => {
|
|
519
|
+
if (response) {
|
|
520
|
+
dialog.dataLoading({ visible: true });
|
|
521
|
+
new Promise((resolve) => {
|
|
522
|
+
let n = 0;
|
|
523
|
+
const check = vm.dataList.filter((dd) => {
|
|
524
|
+
return dd.checked;
|
|
525
|
+
});
|
|
526
|
+
for (const b of check) {
|
|
527
|
+
b.orderData.archived = `${!query.isArchived}`;
|
|
528
|
+
ApiShop.putOrder({
|
|
529
|
+
id: `${b.id}`,
|
|
530
|
+
order_data: b.orderData,
|
|
531
|
+
}).then((resp) => {
|
|
532
|
+
if (resp.result) {
|
|
533
|
+
if (++n == check.length) {
|
|
534
|
+
resolve();
|
|
527
535
|
}
|
|
528
|
-
});
|
|
529
|
-
if (strArray.includes(undefined)) {
|
|
530
|
-
dialog.errorMessage({
|
|
531
|
-
text: html `
|
|
532
|
-
<div class="text-center">
|
|
533
|
-
已勾選訂單中不可含有<br/>非超商店到店的配送方式
|
|
534
|
-
</div>`,
|
|
535
|
-
});
|
|
536
|
-
return;
|
|
537
536
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
if (strArray.includes('HILIFEC2C') && strArray.length > 1) {
|
|
544
|
-
dialog.errorMessage({ text: '萊爾富不支援一次列印多張托運單' });
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
return this.printStoreOrderInfo({
|
|
548
|
-
gvc,
|
|
549
|
-
store: strArray[0],
|
|
550
|
-
deliverys: checkArray.map((dd) => {
|
|
551
|
-
const delivery = dd.orderData.deliveryData;
|
|
552
|
-
return {
|
|
553
|
-
AllPayLogisticsID: delivery.AllPayLogisticsID,
|
|
554
|
-
CVSPaymentNo: delivery.CVSPaymentNo,
|
|
555
|
-
CVSValidationNo: delivery.CVSValidationNo,
|
|
556
|
-
};
|
|
557
|
-
}),
|
|
558
|
-
});
|
|
559
|
-
}),
|
|
560
|
-
},
|
|
561
|
-
],
|
|
562
|
-
text: '更多操作',
|
|
563
|
-
}),
|
|
564
|
-
BgWidget.selEventButton(query.isArchived ? '解除封存' : '批量封存', gvc.event(() => {
|
|
565
|
-
dialog.checkYesOrNot({
|
|
566
|
-
text: `是否確認${query.isArchived ? '解除封存' : '封存'}所選項目?`,
|
|
567
|
-
callback: (response) => {
|
|
568
|
-
if (response) {
|
|
569
|
-
dialog.dataLoading({ visible: true });
|
|
570
|
-
new Promise((resolve) => {
|
|
571
|
-
let n = 0;
|
|
572
|
-
const check = vm.dataList.filter((dd) => {
|
|
573
|
-
return dd.checked;
|
|
574
|
-
});
|
|
575
|
-
for (const b of check) {
|
|
576
|
-
b.orderData.archived = `${!query.isArchived}`;
|
|
577
|
-
ApiShop.putOrder({
|
|
578
|
-
id: `${b.id}`,
|
|
579
|
-
order_data: b.orderData,
|
|
580
|
-
}).then((resp) => {
|
|
581
|
-
if (resp.result) {
|
|
582
|
-
if (++n == check.length) {
|
|
583
|
-
resolve();
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
}).then(() => {
|
|
589
|
-
dialog.dataLoading({ visible: false });
|
|
590
|
-
gvc.notifyDataChange(vm.id);
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
},
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}).then(() => {
|
|
540
|
+
dialog.dataLoading({ visible: false });
|
|
541
|
+
gvc.notifyDataChange(vm.id);
|
|
594
542
|
});
|
|
595
|
-
}
|
|
596
|
-
|
|
543
|
+
}
|
|
544
|
+
},
|
|
597
545
|
});
|
|
598
546
|
},
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
class: `d-flex align-items-center p-2 py-3 ${!vm.dataList ||
|
|
602
|
-
!vm.dataList.find((dd) => {
|
|
603
|
-
return dd.checked;
|
|
604
|
-
})
|
|
605
|
-
? `d-none`
|
|
606
|
-
: ``}`,
|
|
607
|
-
style: document.body.clientWidth > 768 ? 'height: 40px; margin-top: 10px;' : '',
|
|
608
|
-
};
|
|
609
|
-
},
|
|
610
|
-
};
|
|
611
|
-
})}
|
|
612
|
-
`,
|
|
547
|
+
},
|
|
548
|
+
],
|
|
613
549
|
}),
|
|
614
550
|
].join(''))}
|
|
615
551
|
`, BgWidget.getContainerWidth());
|
|
@@ -746,10 +682,7 @@ export class ShoppingOrderManager {
|
|
|
746
682
|
});
|
|
747
683
|
}
|
|
748
684
|
function getBadgeList() {
|
|
749
|
-
return html `
|
|
750
|
-
<div style="display:flex; gap:10px; justify-content:flex-end;">${vt.archivedBadge()}
|
|
751
|
-
${vt.paymentBadge()}${vt.outShipBadge()}${vt.orderStatusBadge()}
|
|
752
|
-
</div>`;
|
|
685
|
+
return html ` <div style="display:flex; gap:10px; justify-content:flex-end;">${vt.archivedBadge()} ${vt.paymentBadge()}${vt.outShipBadge()}${vt.orderStatusBadge()}</div>`;
|
|
753
686
|
}
|
|
754
687
|
return BgWidget.container(html `
|
|
755
688
|
<div class="d-flex flex-column">
|
|
@@ -758,25 +691,20 @@ export class ShoppingOrderManager {
|
|
|
758
691
|
vm.type = 'list';
|
|
759
692
|
}))}
|
|
760
693
|
<div class="d-flex flex-column">
|
|
761
|
-
<div class="align-items-center"
|
|
762
|
-
style="gap:10px;color: #393939;font-size: 24px;font-weight: 700;">
|
|
763
|
-
#${orderData.cart_token}
|
|
764
|
-
</div>
|
|
694
|
+
<div class="align-items-center" style="gap:10px;color: #393939;font-size: 24px;font-weight: 700;">#${orderData.cart_token}</div>
|
|
765
695
|
${BgWidget.grayNote(`訂單成立時間 : ${glitter.ut.dateFormat(new Date(orderData.created_time), 'yyyy-MM-dd hh:mm')}`)}
|
|
766
696
|
</div>
|
|
767
697
|
<div class="flex-fill"></div>
|
|
768
698
|
${document.body.clientWidth > 768 ? getBadgeList() : ''}
|
|
769
699
|
</div>
|
|
770
|
-
${document.body.clientWidth > 768 ? '' : html `
|
|
771
|
-
|
|
772
|
-
<div class="d-flex flex-column flex-md-row p-0"
|
|
773
|
-
style="max-width:calc(100vw - 20px); gap:24px;">
|
|
700
|
+
${document.body.clientWidth > 768 ? '' : html ` <div class="mt-1 mb-3">${getBadgeList()}</div>`}
|
|
701
|
+
<div class="d-flex flex-column flex-md-row p-0" style="max-width:calc(100vw - 20px); gap:24px;">
|
|
774
702
|
<div class="d-flex flex-column" style="width:100%; gap:24px;">
|
|
775
703
|
${BgWidget.mainCard(html `
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
704
|
+
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
|
|
705
|
+
<div class="tx_700">訂單狀態</div>
|
|
706
|
+
<div class="ms-auto w-100">
|
|
707
|
+
${EditorElem.select({
|
|
780
708
|
title: ``,
|
|
781
709
|
gvc: gvc,
|
|
782
710
|
def: (_a = orderData.orderData.orderStatus) !== null && _a !== void 0 ? _a : '0',
|
|
@@ -793,51 +721,41 @@ export class ShoppingOrderManager {
|
|
|
793
721
|
}
|
|
794
722
|
},
|
|
795
723
|
})}
|
|
796
|
-
</div>
|
|
797
724
|
</div>
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
725
|
+
</div>
|
|
726
|
+
<div class="tx_700 my-3">訂單明細</div>
|
|
727
|
+
${BgWidget.horizontalLine()}
|
|
728
|
+
<div class="d-flex flex-column">
|
|
729
|
+
${orderData.orderData.lineItems
|
|
802
730
|
.map((dd) => {
|
|
803
731
|
return gvc.bindView({
|
|
804
732
|
bind: glitter.getUUID(),
|
|
805
733
|
view: () => {
|
|
806
|
-
return html `
|
|
807
|
-
|
|
808
|
-
style="gap:5px;margin-right:12px;">
|
|
809
|
-
${BgWidget.validImageBox({
|
|
734
|
+
return html ` <div class="d-flex flex-column align-items-center justify-content-center" style="gap:5px;margin-right:12px;">
|
|
735
|
+
${BgWidget.validImageBox({
|
|
810
736
|
gvc,
|
|
811
737
|
image: dd.preview_image,
|
|
812
738
|
width: 60,
|
|
813
739
|
class: 'border rounded',
|
|
814
740
|
style: '',
|
|
815
741
|
})}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
<div class="tx_normal_14">
|
|
827
|
-
$${dd.sale_price.toLocaleString()}
|
|
828
|
-
× ${dd.count}
|
|
829
|
-
</div>
|
|
830
|
-
<div class="tx_normal"
|
|
831
|
-
style="display: flex;justify-content: end;width: 110px;">
|
|
832
|
-
$${dd.sale_price.toLocaleString()}
|
|
833
|
-
</div>`;
|
|
742
|
+
${dd.is_add_on_items ? `<div class="">${BgWidget.warningInsignia('加購品')}</div>` : ``}
|
|
743
|
+
</div>
|
|
744
|
+
<div class="d-flex flex-column" style="gap:2px;">
|
|
745
|
+
<div class="tx_700">${dd.title}</div>
|
|
746
|
+
${dd.spec.length > 0 ? BgWidget.grayNote(dd.spec.join(', ')) : ''}
|
|
747
|
+
${BgWidget.grayNote(`存貨單位 (SKU):${dd.sku && dd.sku.length > 0 ? dd.sku : '無'}`)}
|
|
748
|
+
</div>
|
|
749
|
+
<div class="flex-fill"></div>
|
|
750
|
+
<div class="tx_normal_14">$${dd.sale_price.toLocaleString()} × ${dd.count}</div>
|
|
751
|
+
<div class="tx_normal" style="display: flex;justify-content: end;width: 110px;">$${dd.sale_price.toLocaleString()}</div>`;
|
|
834
752
|
},
|
|
835
753
|
divCreate: { class: `d-flex align-items-center` },
|
|
836
754
|
});
|
|
837
755
|
})
|
|
838
756
|
.join(BgWidget.horizontalLine({ color: '#f6f6f6' }))}
|
|
839
|
-
|
|
840
|
-
|
|
757
|
+
${BgWidget.horizontalLine()}
|
|
758
|
+
${[
|
|
841
759
|
{
|
|
842
760
|
title: '小計',
|
|
843
761
|
description: `${orderData.orderData.lineItems
|
|
@@ -893,26 +811,19 @@ export class ShoppingOrderManager {
|
|
|
893
811
|
{
|
|
894
812
|
title: html `<span class="tx_700">總金額</span>`,
|
|
895
813
|
description: '',
|
|
896
|
-
total: html `<span
|
|
897
|
-
class="tx_700">$${orderData.orderData.total.toLocaleString()}</span>`,
|
|
814
|
+
total: html `<span class="tx_700">$${orderData.orderData.total.toLocaleString()}</span>`,
|
|
898
815
|
},
|
|
899
816
|
]
|
|
900
817
|
.map((dd) => {
|
|
901
818
|
var _a;
|
|
902
|
-
return html `
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
</div>
|
|
907
|
-
<div class="tx_normal"
|
|
908
|
-
style="width: 114px;display: flex;justify-content: end;">
|
|
909
|
-
${dd.total}
|
|
910
|
-
</div>
|
|
911
|
-
</div>`;
|
|
819
|
+
return html ` <div class="d-flex align-items-center justify-content-end">
|
|
820
|
+
<div class="tx_normal_14">${dd.title} ${(_a = dd.description) !== null && _a !== void 0 ? _a : ''}</div>
|
|
821
|
+
<div class="tx_normal" style="width: 114px;display: flex;justify-content: end;">${dd.total}</div>
|
|
822
|
+
</div>`;
|
|
912
823
|
})
|
|
913
824
|
.join(BgWidget.mbContainer(18))}
|
|
914
|
-
|
|
915
|
-
|
|
825
|
+
</div>
|
|
826
|
+
`)}
|
|
916
827
|
${BgWidget.mainCard(html `
|
|
917
828
|
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
|
|
918
829
|
<div class="tx_700">付款狀態</div>
|
|
@@ -950,9 +861,7 @@ export class ShoppingOrderManager {
|
|
|
950
861
|
${BgWidget.mbContainer(18)}
|
|
951
862
|
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
|
|
952
863
|
<div class="tx_700">付款方式</div>
|
|
953
|
-
<div class="tx_normal">
|
|
954
|
-
${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}
|
|
955
|
-
</div>
|
|
864
|
+
<div class="tx_normal">${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}</div>
|
|
956
865
|
${ShoppingOrderManager.getProofPurchaseString(orderData.orderData, gvc)}
|
|
957
866
|
</div>
|
|
958
867
|
`)}
|
|
@@ -965,13 +874,11 @@ export class ShoppingOrderManager {
|
|
|
965
874
|
dataList: [{ obj: vm, key: 'mode' }],
|
|
966
875
|
view: () => {
|
|
967
876
|
return [
|
|
968
|
-
html `
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
${
|
|
973
|
-
<div class="ms-auto w-100">
|
|
974
|
-
${EditorElem.select({
|
|
877
|
+
html ` <div class="tx_700">配送 / 收件人資訊</div>`,
|
|
878
|
+
html ` <div class="tx_700">配送狀態</div>
|
|
879
|
+
${BgWidget.mbContainer(12)}
|
|
880
|
+
<div class="ms-auto w-100">
|
|
881
|
+
${EditorElem.select({
|
|
975
882
|
title: ``,
|
|
976
883
|
gvc: gvc,
|
|
977
884
|
def: `${orderData.orderData.progress}`,
|
|
@@ -989,17 +896,16 @@ export class ShoppingOrderManager {
|
|
|
989
896
|
}
|
|
990
897
|
},
|
|
991
898
|
})}
|
|
992
|
-
|
|
993
|
-
html `
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
<div
|
|
997
|
-
|
|
998
|
-
${(orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
|
|
899
|
+
</div>`,
|
|
900
|
+
html ` <div class="tx_700">配送方式</div>
|
|
901
|
+
${BgWidget.mbContainer(12)}
|
|
902
|
+
<div class="d-flex w-100 align-items-center gap-2">
|
|
903
|
+
<div style="tx_normal">
|
|
904
|
+
${(orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
|
|
999
905
|
return dd.value === orderData.orderData.user_info.shipment;
|
|
1000
906
|
}).name}
|
|
1001
|
-
|
|
1002
|
-
|
|
907
|
+
</div>
|
|
908
|
+
${['FAMIC2C', 'UNIMARTC2C', 'HILIFEC2C', 'OKMARTC2C'].includes(orderData.orderData.user_info.shipment)
|
|
1003
909
|
? BgWidget.customButton({
|
|
1004
910
|
button: {
|
|
1005
911
|
color: 'gray',
|
|
@@ -1029,14 +935,12 @@ export class ShoppingOrderManager {
|
|
|
1029
935
|
}),
|
|
1030
936
|
})
|
|
1031
937
|
: ''}
|
|
1032
|
-
|
|
938
|
+
</div>`,
|
|
1033
939
|
html ` ${['UNIMARTC2C', 'FAMIC2C', 'OKMARTC2C', 'HILIFEC2C', 'normal'].includes(orderData.orderData.user_info.shipment)
|
|
1034
|
-
? html `
|
|
1035
|
-
|
|
1036
|
-
${BgWidget.mbContainer(12)}`
|
|
940
|
+
? html ` <div class="tx_700">配送資訊</div>
|
|
941
|
+
${BgWidget.mbContainer(12)}`
|
|
1037
942
|
: ``}
|
|
1038
|
-
<div class="d-flex flex-column tx_normal"
|
|
1039
|
-
style="gap: 4px;">
|
|
943
|
+
<div class="d-flex flex-column tx_normal" style="gap: 4px;">
|
|
1040
944
|
${(() => {
|
|
1041
945
|
if (orderData.orderData.user_info.shipment == 'normal') {
|
|
1042
946
|
return orderData.orderData.user_info.address;
|
|
@@ -1048,38 +952,32 @@ export class ShoppingOrderManager {
|
|
|
1048
952
|
return html `
|
|
1049
953
|
<div class="d-flex flex-wrap">
|
|
1050
954
|
<span class="me-2">門市名稱:</span>
|
|
1051
|
-
<div style="white-space: normal;word-break: break-all;">
|
|
1052
|
-
${orderData.orderData.user_info.CVSStoreName}
|
|
1053
|
-
</div>
|
|
955
|
+
<div style="white-space: normal;word-break: break-all;">${orderData.orderData.user_info.CVSStoreName}</div>
|
|
1054
956
|
</div>
|
|
1055
|
-
<div class="d-flex">門市店號:
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
<div class="d-flex"
|
|
1059
|
-
style="white-space: normal;word-break: break-all;">
|
|
1060
|
-
地址:
|
|
1061
|
-
${orderData.orderData.user_info.CVSAddress}
|
|
957
|
+
<div class="d-flex">門市店號: ${orderData.orderData.user_info.CVSStoreID}</div>
|
|
958
|
+
<div class="d-flex" style="white-space: normal;word-break: break-all;">
|
|
959
|
+
地址: ${orderData.orderData.user_info.CVSAddress}
|
|
1062
960
|
</div>
|
|
1063
961
|
`;
|
|
1064
962
|
}
|
|
1065
963
|
else if (formData.form) {
|
|
1066
|
-
return formData.form
|
|
1067
|
-
|
|
1068
|
-
|
|
964
|
+
return formData.form
|
|
965
|
+
.map((dd) => {
|
|
966
|
+
return html ` <div class="d-flex flex-wrap">
|
|
1069
967
|
<span class="me-2">${dd.title}:</span>
|
|
1070
968
|
<div style="white-space: normal;word-break: break-all;">
|
|
1071
969
|
${orderData.orderData.user_info.custom_form_delivery[dd.key]}
|
|
1072
970
|
</div>
|
|
1073
971
|
</div>`;
|
|
1074
|
-
})
|
|
972
|
+
})
|
|
973
|
+
.join('');
|
|
1075
974
|
}
|
|
1076
975
|
return '';
|
|
1077
976
|
})()}
|
|
1078
977
|
</div>`,
|
|
1079
|
-
html `
|
|
1080
|
-
<div class="
|
|
1081
|
-
|
|
1082
|
-
${vm.mode === 'edit'
|
|
978
|
+
html ` <div class="d-flex w-100 align-items-center gap-2">
|
|
979
|
+
<div class="tx_700">收件人資訊</div>
|
|
980
|
+
${vm.mode === 'edit'
|
|
1083
981
|
? BgWidget.customButton({
|
|
1084
982
|
button: {
|
|
1085
983
|
color: 'black',
|
|
@@ -1105,10 +1003,10 @@ export class ShoppingOrderManager {
|
|
|
1105
1003
|
vm.mode = 'edit';
|
|
1106
1004
|
}),
|
|
1107
1005
|
})}
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1006
|
+
</div>
|
|
1007
|
+
${BgWidget.mbContainer(8)}
|
|
1008
|
+
<div class="tx_normal">
|
|
1009
|
+
${(() => {
|
|
1112
1010
|
let viewModel = [
|
|
1113
1011
|
['姓名', 'name'],
|
|
1114
1012
|
['電話', 'phone'],
|
|
@@ -1117,11 +1015,8 @@ export class ShoppingOrderManager {
|
|
|
1117
1015
|
if (vm.mode == 'read') {
|
|
1118
1016
|
return viewModel
|
|
1119
1017
|
.map((item) => {
|
|
1120
|
-
return html `
|
|
1121
|
-
|
|
1122
|
-
${orderData.orderData.user_info[item[1]] || '未填寫'}
|
|
1123
|
-
</div>
|
|
1124
|
-
${BgWidget.mbContainer(4)}`;
|
|
1018
|
+
return html ` <div>${item[0]}: ${orderData.orderData.user_info[item[1]] || '未填寫'}</div>
|
|
1019
|
+
${BgWidget.mbContainer(4)}`;
|
|
1125
1020
|
})
|
|
1126
1021
|
.join('');
|
|
1127
1022
|
}
|
|
@@ -1129,25 +1024,22 @@ export class ShoppingOrderManager {
|
|
|
1129
1024
|
return viewModel
|
|
1130
1025
|
.map((item) => {
|
|
1131
1026
|
return html `
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
style="display: flex;padding: 9px 18px;align-items: flex-start;gap: 10px;flex: 1 0 0;border-radius: 10px;border: 1px solid #DDD;"
|
|
1139
|
-
value="${orderData.orderData.user_info[item[1]]}"
|
|
1140
|
-
onchange="${gvc.event((e) => {
|
|
1027
|
+
<div class="d-flex flex-column w-100" style="gap:8px;">
|
|
1028
|
+
<div style="${item[0] == '姓名' ? '' : 'margin-top:12px;'}">${item[0]}</div>
|
|
1029
|
+
<input
|
|
1030
|
+
style="display: flex;padding: 9px 18px;align-items: flex-start;gap: 10px;flex: 1 0 0;border-radius: 10px;border: 1px solid #DDD;"
|
|
1031
|
+
value="${orderData.orderData.user_info[item[1]]}"
|
|
1032
|
+
onchange="${gvc.event((e) => {
|
|
1141
1033
|
orderData.orderData.user_info[item[1]] = e.value;
|
|
1142
1034
|
})}"
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1035
|
+
/>
|
|
1036
|
+
</div>
|
|
1037
|
+
`;
|
|
1146
1038
|
})
|
|
1147
1039
|
.join('');
|
|
1148
1040
|
}
|
|
1149
1041
|
})()}
|
|
1150
|
-
|
|
1042
|
+
</div>`,
|
|
1151
1043
|
].join(BgWidget.mbContainer(18));
|
|
1152
1044
|
},
|
|
1153
1045
|
divCreate: { class: 'd-flex flex-column' },
|
|
@@ -1197,25 +1089,24 @@ export class ShoppingOrderManager {
|
|
|
1197
1089
|
</div>
|
|
1198
1090
|
<div style="width: 420px; max-width: 100%; position: sticky; right: 0; top: 20px; overflow: auto;">
|
|
1199
1091
|
${BgWidget.mainCard(html `
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
html `
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
onclick="${gvc.event(() => {
|
|
1092
|
+
<div style="color: #393939;font-size: 16px;">
|
|
1093
|
+
<div class="d-flex align-items-center mb-3">
|
|
1094
|
+
<div class="tx_700">訂購人資料</div>
|
|
1095
|
+
<div class="flex-fill"></div>
|
|
1096
|
+
</div>
|
|
1097
|
+
<div class="w-100 d-flex flex-column mt-2" style="gap:12px;">
|
|
1098
|
+
${[
|
|
1099
|
+
html ` <div class="d-flex flex-column" style="gap:8px;">
|
|
1100
|
+
<div
|
|
1101
|
+
class="d-flex align-items-center"
|
|
1102
|
+
style="color: #4D86DB;font-weight: 400; gap:8px;cursor:pointer;"
|
|
1103
|
+
onclick="${gvc.event(() => {
|
|
1213
1104
|
child_vm.userID = userData.userID;
|
|
1214
1105
|
child_vm.type = 'user';
|
|
1215
1106
|
})}"
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1107
|
+
>
|
|
1108
|
+
${(_c = (_b = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '訪客'}
|
|
1109
|
+
${(() => {
|
|
1219
1110
|
if (userDataLoading) {
|
|
1220
1111
|
return BgWidget.secondaryInsignia('讀取中');
|
|
1221
1112
|
}
|
|
@@ -1232,108 +1123,85 @@ export class ShoppingOrderManager {
|
|
|
1232
1123
|
}
|
|
1233
1124
|
return BgWidget.secondaryInsignia('訪客');
|
|
1234
1125
|
})()}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
</div>
|
|
1242
|
-
</div>`,
|
|
1126
|
+
</div>
|
|
1127
|
+
<div style="color: #393939;font-weight: 400;">
|
|
1128
|
+
${(_f = (_e = (_d = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _d === void 0 ? void 0 : _d.phone) !== null && _e !== void 0 ? _e : orderData.orderData.user_info.phone) !== null && _f !== void 0 ? _f : '此會員未填手機'}
|
|
1129
|
+
</div>
|
|
1130
|
+
<div style="color: #393939;font-weight: 400;">${(_h = (_g = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _g === void 0 ? void 0 : _g.email) !== null && _h !== void 0 ? _h : orderData.orderData.user_info.email}</div>
|
|
1131
|
+
</div>`,
|
|
1243
1132
|
BgWidget.horizontalLine(),
|
|
1244
1133
|
gvc.bindView({
|
|
1245
1134
|
bind: `user_info`,
|
|
1246
1135
|
view: () => {
|
|
1247
1136
|
var _a;
|
|
1248
1137
|
return html `
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
</div>
|
|
1252
|
-
<div
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
</div>
|
|
1260
|
-
</div>
|
|
1261
|
-
<div class="tx_700 mt-2">付款方式</div>
|
|
1262
|
-
<div>
|
|
1263
|
-
${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}
|
|
1264
|
-
</div>
|
|
1265
|
-
<div class="tx_700">配送方式</div>
|
|
1266
|
-
<div class="tx_normal"
|
|
1267
|
-
style="line-height: 140%;">
|
|
1268
|
-
${(_a = (orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
|
|
1138
|
+
<div style="font-size: 16px;font-weight: 700;color:#393939">收件人資料</div>
|
|
1139
|
+
<div class="d-flex flex-column" style="gap:8px;">
|
|
1140
|
+
<div style="color: #4D86DB;font-weight: 400;">${orderData.orderData.user_info.name}</div>
|
|
1141
|
+
<div style="color: #393939;font-weight: 400;">${orderData.orderData.user_info.phone || '電話未填'}</div>
|
|
1142
|
+
</div>
|
|
1143
|
+
<div class="tx_700 mt-2">付款方式</div>
|
|
1144
|
+
<div>${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}</div>
|
|
1145
|
+
<div class="tx_700">配送方式</div>
|
|
1146
|
+
<div class="tx_normal" style="line-height: 140%;">
|
|
1147
|
+
${(_a = (orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
|
|
1269
1148
|
return dd.value === orderData.orderData.user_info.shipment;
|
|
1270
1149
|
})) === null || _a === void 0 ? void 0 : _a.name}
|
|
1271
|
-
|
|
1272
|
-
|
|
1150
|
+
</div>
|
|
1151
|
+
${(() => {
|
|
1273
1152
|
switch (orderData.orderData.user_info.shipment) {
|
|
1274
1153
|
case 'FAMIC2C':
|
|
1275
1154
|
case 'HILIFEC2C':
|
|
1276
1155
|
case 'OKMARTC2C':
|
|
1277
1156
|
case 'UNIMARTC2C':
|
|
1278
1157
|
return [
|
|
1279
|
-
html `
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
代號:
|
|
1290
|
-
${orderData.orderData.user_info.CVSStoreID}
|
|
1291
|
-
</div>`,
|
|
1292
|
-
html `
|
|
1293
|
-
<div class="fw-normal fs-6 w-100"
|
|
1294
|
-
style="white-space: normal;word-break: break-all;">
|
|
1295
|
-
地址:
|
|
1296
|
-
${orderData.orderData.user_info.CVSAddress}
|
|
1297
|
-
</div>`,
|
|
1158
|
+
html ` <div class="d-flex flex-wrap w-100">
|
|
1159
|
+
<span class="me-2 fw-normal fs-6">門市名稱:</span>
|
|
1160
|
+
<div class="fw-normal fs-6" style="white-space: normal;word-break: break-all;">
|
|
1161
|
+
${decodeURI(orderData.orderData.user_info.CVSStoreName)}
|
|
1162
|
+
</div>
|
|
1163
|
+
</div>`,
|
|
1164
|
+
html ` <div class="fw-normal fs-6">代號: ${orderData.orderData.user_info.CVSStoreID}</div>`,
|
|
1165
|
+
html ` <div class="fw-normal fs-6 w-100" style="white-space: normal;word-break: break-all;">
|
|
1166
|
+
地址: ${orderData.orderData.user_info.CVSAddress}
|
|
1167
|
+
</div>`,
|
|
1298
1168
|
].join('');
|
|
1299
1169
|
case 'normal':
|
|
1300
1170
|
return [
|
|
1301
|
-
html `
|
|
1302
|
-
<div class="fw-normal fs-6"
|
|
1303
|
-
style="white-space: normal;">
|
|
1304
|
-
${orderData.orderData.user_info.address}
|
|
1305
|
-
</div>`,
|
|
1171
|
+
html ` <div class="fw-normal fs-6" style="white-space: normal;">${orderData.orderData.user_info.address}</div>`,
|
|
1306
1172
|
].join('');
|
|
1307
1173
|
default:
|
|
1308
1174
|
const formData = (orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
|
|
1309
1175
|
return dd.value === orderData.orderData.user_info.shipment;
|
|
1310
1176
|
});
|
|
1311
1177
|
if (formData.form) {
|
|
1312
|
-
return formData.form
|
|
1178
|
+
return formData.form
|
|
1179
|
+
.map((dd) => {
|
|
1313
1180
|
return `<div class="d-flex flex-wrap w-100">
|
|
1314
1181
|
<span class="me-2 fw-normal fs-6">${dd.title}:</span>
|
|
1315
1182
|
<div class="fw-normal fs-6" style="white-space: normal;word-break: break-all;">
|
|
1316
1183
|
${orderData.orderData.user_info.custom_form_delivery[dd.key]}
|
|
1317
1184
|
</div>
|
|
1318
1185
|
</div>`;
|
|
1319
|
-
})
|
|
1186
|
+
})
|
|
1187
|
+
.join('');
|
|
1320
1188
|
}
|
|
1321
1189
|
else {
|
|
1322
1190
|
return ``;
|
|
1323
1191
|
}
|
|
1324
1192
|
}
|
|
1325
1193
|
})()}
|
|
1326
|
-
|
|
1194
|
+
`;
|
|
1327
1195
|
},
|
|
1328
1196
|
divCreate: {
|
|
1329
1197
|
style: 'gap:8px;',
|
|
1330
|
-
class: 'd-flex flex-column'
|
|
1198
|
+
class: 'd-flex flex-column',
|
|
1331
1199
|
},
|
|
1332
1200
|
}),
|
|
1333
1201
|
].join('')}
|
|
1334
|
-
</div>
|
|
1335
1202
|
</div>
|
|
1336
|
-
|
|
1203
|
+
</div>
|
|
1204
|
+
`, 'p-0', 'padding: 20px !important; ')}
|
|
1337
1205
|
<div style="margin-top: 24px;"></div>
|
|
1338
1206
|
${BgWidget.mainCard(gvc.bindView(() => {
|
|
1339
1207
|
const id = glitter.getUUID();
|
|
@@ -1345,24 +1213,23 @@ export class ShoppingOrderManager {
|
|
|
1345
1213
|
view: () => {
|
|
1346
1214
|
var _a;
|
|
1347
1215
|
return html `
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1216
|
+
<div class="d-flex align-items-center ">
|
|
1217
|
+
<div class="tx_700">用戶備註</div>
|
|
1218
|
+
<div class="flex-fill"></div>
|
|
1219
|
+
<i
|
|
1220
|
+
class="fa-solid fa-pencil d-none"
|
|
1221
|
+
style="cursor:pointer;"
|
|
1222
|
+
onclick="${gvc.event(() => {
|
|
1355
1223
|
vm.mode = vm.mode === 'edit' ? 'read' : 'edit';
|
|
1356
1224
|
gvc.notifyDataChange(id);
|
|
1357
1225
|
})}"
|
|
1358
|
-
|
|
1359
|
-
|
|
1226
|
+
></i>
|
|
1227
|
+
</div>
|
|
1360
1228
|
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
`;
|
|
1229
|
+
<div class="fs-6 w-100 mt-2 lh-lg fw-normal" style="word-break: break-all;white-space:normal;">
|
|
1230
|
+
${(((_a = orderData.orderData.user_info.note) !== null && _a !== void 0 ? _a : '') + (orderData.orderData.user_info.code_note || '') || '尚未填寫').replace(/\n/g, `<br>`)}
|
|
1231
|
+
</div>
|
|
1232
|
+
`;
|
|
1366
1233
|
},
|
|
1367
1234
|
divCreate: {
|
|
1368
1235
|
class: ` fw-normal`,
|
|
@@ -1383,28 +1250,23 @@ export class ShoppingOrderManager {
|
|
|
1383
1250
|
orderData.orderData.custom_form_format.filter((dd) => {
|
|
1384
1251
|
return orderData.orderData.custom_form_data[dd.key];
|
|
1385
1252
|
}).length > 0) {
|
|
1386
|
-
return (html `
|
|
1387
|
-
<div style="margin-top: 24px;"></div>` +
|
|
1253
|
+
return (html ` <div style="margin-top: 24px;"></div>` +
|
|
1388
1254
|
BgWidget.mainCard(html `
|
|
1389
|
-
|
|
1390
|
-
|
|
1255
|
+
<div class="p-2" style="color: #393939;font-size: 16px;">
|
|
1256
|
+
${orderData.orderData.custom_form_format
|
|
1391
1257
|
.filter((dd) => {
|
|
1392
1258
|
return orderData.orderData.custom_form_data[dd.key];
|
|
1393
1259
|
})
|
|
1394
1260
|
.map((dd) => {
|
|
1395
|
-
return html `
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
</div>
|
|
1401
|
-
<div style="color: #393939;font-weight: 400;">
|
|
1402
|
-
${orderData.orderData.custom_form_data[dd.key]}
|
|
1403
|
-
</div>`;
|
|
1261
|
+
return html ` <div class="d-flex align-items-center">
|
|
1262
|
+
<div class="tx_700">${dd.title}</div>
|
|
1263
|
+
<div class="flex-fill"></div>
|
|
1264
|
+
</div>
|
|
1265
|
+
<div style="color: #393939;font-weight: 400;">${orderData.orderData.custom_form_data[dd.key]}</div>`;
|
|
1404
1266
|
})
|
|
1405
1267
|
.join('')}
|
|
1406
|
-
|
|
1407
|
-
|
|
1268
|
+
</div>
|
|
1269
|
+
`));
|
|
1408
1270
|
}
|
|
1409
1271
|
else {
|
|
1410
1272
|
return ``;
|
|
@@ -1625,9 +1487,9 @@ export class ShoppingOrderManager {
|
|
|
1625
1487
|
shipmentFree = false;
|
|
1626
1488
|
let leftHTML = newVoucher.title
|
|
1627
1489
|
? html `
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1490
|
+
<div>折扣</div>
|
|
1491
|
+
<div style="font-size: 14px;color:#8D8D8D;font-weight: 400;">${newVoucher.title}</div>
|
|
1492
|
+
`
|
|
1631
1493
|
: `折扣`;
|
|
1632
1494
|
let rightTitle = '新增折扣';
|
|
1633
1495
|
shipmentFree = newVoucher.reBackType == 'shipment_free';
|
|
@@ -1662,9 +1524,9 @@ export class ShoppingOrderManager {
|
|
|
1662
1524
|
let rightHTML = html `
|
|
1663
1525
|
<div style="color: #4D86DB;position: relative;">
|
|
1664
1526
|
<div
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1527
|
+
class=" "
|
|
1528
|
+
style="cursor: pointer;width:158px;text-align: right"
|
|
1529
|
+
onclick="${gvc.event(() => {
|
|
1668
1530
|
showDiscountEdit = !showDiscountEdit;
|
|
1669
1531
|
gvc.notifyDataChange('orderDetail');
|
|
1670
1532
|
})}"
|
|
@@ -1679,107 +1541,97 @@ export class ShoppingOrderManager {
|
|
|
1679
1541
|
view: () => {
|
|
1680
1542
|
var _a;
|
|
1681
1543
|
let discountHTML = ``;
|
|
1682
|
-
let checkBox = html `
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
let uncheckBox = html `
|
|
1687
|
-
<div style="margin-right:6px;width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
|
|
1544
|
+
let checkBox = html ` <div
|
|
1545
|
+
style="margin-right:6px;display: flex;width: 16px;height: 16px;justify-content: center;align-items: center;border-radius: 20px;border: 4px solid #393939"
|
|
1546
|
+
></div>`;
|
|
1547
|
+
let uncheckBox = html ` <div style="margin-right:6px;width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
|
|
1688
1548
|
showArray.map((rowData, index) => {
|
|
1689
1549
|
if (rowData.select) {
|
|
1690
1550
|
function drawVoucherDetail(rowData) {
|
|
1691
1551
|
switch (rowData.value) {
|
|
1692
1552
|
case 'rebate':
|
|
1693
1553
|
case 'discount': {
|
|
1694
|
-
return html `
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
style="display: flex;align-items: center;gap: 6px;"
|
|
1702
|
-
onclick="${gvc.event(() => {
|
|
1554
|
+
return html ` <div class="w-100 d-flex" style="padding-left: 8px;margin-top: 8px;">
|
|
1555
|
+
<div style="height: 100%;width:1px;background-color: #E5E5E5;margin-right: 14px;"></div>
|
|
1556
|
+
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;flex: 1 0 0;">
|
|
1557
|
+
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 8px;align-self: stretch;">
|
|
1558
|
+
<div
|
|
1559
|
+
style="display: flex;align-items: center;gap: 6px;"
|
|
1560
|
+
onclick="${gvc.event(() => {
|
|
1703
1561
|
rowData.method = 'percent';
|
|
1704
1562
|
tempData.method = 'percent';
|
|
1705
1563
|
gvc.notifyDataChange('editDiscount');
|
|
1706
1564
|
})}"
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
style="${rowData.method == 'percent'
|
|
1565
|
+
>
|
|
1566
|
+
${rowData.method == 'percent' ? checkBox : uncheckBox} 百分比
|
|
1567
|
+
</div>
|
|
1568
|
+
<div
|
|
1569
|
+
style="${rowData.method == 'percent'
|
|
1713
1570
|
? 'display: flex'
|
|
1714
1571
|
: 'display: none'};padding-left: 8px;align-items: center;gap: 14px;align-self: stretch;position:relative;"
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
value="${rowData.discount}"
|
|
1728
|
-
onchange="${gvc.event((e) => {
|
|
1572
|
+
>
|
|
1573
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="2" height="40" viewBox="0 0 2 40" fill="none">
|
|
1574
|
+
<path d="M1 0V40" stroke="#E5E5E5" />
|
|
1575
|
+
</svg>
|
|
1576
|
+
<input
|
|
1577
|
+
class="w-100"
|
|
1578
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
1579
|
+
type="number"
|
|
1580
|
+
max="100"
|
|
1581
|
+
min="1"
|
|
1582
|
+
value="${rowData.discount}"
|
|
1583
|
+
onchange="${gvc.event((e) => {
|
|
1729
1584
|
e.value = Math.min(e.value, 100);
|
|
1730
1585
|
rowData.discount = e.value;
|
|
1731
1586
|
tempData.discount = e.value;
|
|
1732
1587
|
})}"
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1588
|
+
/>
|
|
1589
|
+
<div
|
|
1590
|
+
class="h-100 d-flex align-items-center"
|
|
1591
|
+
style="color: #8D8D8D;font-size: 16px;font-style: normal;font-weight: 400;position: absolute;top:0;right:18px;"
|
|
1592
|
+
>
|
|
1593
|
+
%
|
|
1594
|
+
</div>
|
|
1595
|
+
</div>
|
|
1596
|
+
</div>
|
|
1597
|
+
<div style="display: flex;gap: 6px;flex-direction: column;width: 100%;">
|
|
1598
|
+
<div
|
|
1599
|
+
style="display: flex;align-items: center;gap: 6px;"
|
|
1600
|
+
onclick="${gvc.event(() => {
|
|
1746
1601
|
rowData.method = 'fixed';
|
|
1747
1602
|
tempData.method = 'fixed';
|
|
1748
1603
|
gvc.notifyDataChange('editDiscount');
|
|
1749
1604
|
})}"
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
style="${rowData.method == 'fixed'
|
|
1605
|
+
>
|
|
1606
|
+
${rowData.method == 'fixed' ? checkBox : uncheckBox} 固定金額
|
|
1607
|
+
</div>
|
|
1608
|
+
<div
|
|
1609
|
+
style="${rowData.method == 'fixed'
|
|
1756
1610
|
? 'display: flex'
|
|
1757
1611
|
: 'display: none'};padding-left: 8px;align-items: center;gap: 14px;align-self: stretch;position:relative;"
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
min="1"
|
|
1770
|
-
onchange="${gvc.event((e) => {
|
|
1612
|
+
>
|
|
1613
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="2" height="40" viewBox="0 0 2 40" fill="none">
|
|
1614
|
+
<path d="M1 0V40" stroke="#E5E5E5" />
|
|
1615
|
+
</svg>
|
|
1616
|
+
<input
|
|
1617
|
+
class="w-100"
|
|
1618
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
1619
|
+
type="number"
|
|
1620
|
+
value="${rowData.discount}"
|
|
1621
|
+
min="1"
|
|
1622
|
+
onchange="${gvc.event((e) => {
|
|
1771
1623
|
rowData.discount = e.value;
|
|
1772
1624
|
tempData.discount = e.value;
|
|
1773
1625
|
})}"
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1626
|
+
/>
|
|
1627
|
+
<div
|
|
1628
|
+
class="h-100 d-flex align-items-center"
|
|
1629
|
+
style="color: #8D8D8D;font-size: 16px;font-style: normal;font-weight: 400;position: absolute;top:0;right:18px;"
|
|
1630
|
+
></div>
|
|
1631
|
+
</div>
|
|
1632
|
+
</div>
|
|
1633
|
+
</div>
|
|
1634
|
+
</div>`;
|
|
1783
1635
|
}
|
|
1784
1636
|
default:
|
|
1785
1637
|
return ``;
|
|
@@ -1787,20 +1639,19 @@ export class ShoppingOrderManager {
|
|
|
1787
1639
|
}
|
|
1788
1640
|
tempData.reBackType = rowData.value;
|
|
1789
1641
|
discountHTML += html `
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
`;
|
|
1642
|
+
<div class="w-100 d-flex align-items-center flex-wrap" style="color:#393939">
|
|
1643
|
+
${checkBox}
|
|
1644
|
+
<div>${rowData.text}</div>
|
|
1645
|
+
${drawVoucherDetail(rowData)}
|
|
1646
|
+
</div>
|
|
1647
|
+
`;
|
|
1797
1648
|
}
|
|
1798
1649
|
else {
|
|
1799
1650
|
discountHTML += html `
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1651
|
+
<div
|
|
1652
|
+
class="w-100 d-flex align-items-center"
|
|
1653
|
+
style="color:#393939;cursor: pointer;"
|
|
1654
|
+
onclick="${gvc.event(() => {
|
|
1804
1655
|
showArray = [
|
|
1805
1656
|
{
|
|
1806
1657
|
value: 'discount',
|
|
@@ -1820,34 +1671,32 @@ export class ShoppingOrderManager {
|
|
|
1820
1671
|
showArray[index].select = true;
|
|
1821
1672
|
gvc.notifyDataChange('editDiscount');
|
|
1822
1673
|
})}"
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1674
|
+
>
|
|
1675
|
+
${uncheckBox}
|
|
1676
|
+
<div>${rowData.text}</div>
|
|
1677
|
+
</div>
|
|
1678
|
+
`;
|
|
1828
1679
|
}
|
|
1829
1680
|
});
|
|
1830
1681
|
return html `
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1682
|
+
<div class="d-flex flex-column " style="font-weight: 700;">
|
|
1683
|
+
折扣名稱
|
|
1684
|
+
<input
|
|
1685
|
+
class="w-100"
|
|
1686
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;margin-top:12px;"
|
|
1687
|
+
value="${(_a = tempData.title) !== null && _a !== void 0 ? _a : ''}"
|
|
1688
|
+
onchange="${gvc.event((e) => {
|
|
1838
1689
|
tempData.title = e.value;
|
|
1839
1690
|
})}"
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
<div class="d-flex w-100 justify-content-end" style="gap:14px;">
|
|
1846
|
-
${BgWidget.cancel(gvc.event(() => {
|
|
1691
|
+
/>
|
|
1692
|
+
</div>
|
|
1693
|
+
<div class="d-flex flex-column" style="font-weight: 700;gap:8px;">折扣方式 ${discountHTML}</div>
|
|
1694
|
+
<div class="d-flex w-100 justify-content-end" style="gap:14px;">
|
|
1695
|
+
${BgWidget.cancel(gvc.event(() => {
|
|
1847
1696
|
showDiscountEdit = !showDiscountEdit;
|
|
1848
1697
|
gvc.notifyDataChange('orderDetail');
|
|
1849
1698
|
}))}
|
|
1850
|
-
|
|
1699
|
+
${BgWidget.save(gvc.event(() => {
|
|
1851
1700
|
showDiscountEdit = !showDiscountEdit;
|
|
1852
1701
|
newVoucher.reBackType = tempData.reBackType;
|
|
1853
1702
|
newVoucher.method = tempData.method;
|
|
@@ -1855,8 +1704,8 @@ export class ShoppingOrderManager {
|
|
|
1855
1704
|
newVoucher.title = tempData.title;
|
|
1856
1705
|
gvc.notifyDataChange('orderDetail');
|
|
1857
1706
|
}), '確定')}
|
|
1858
|
-
|
|
1859
|
-
|
|
1707
|
+
</div>
|
|
1708
|
+
`;
|
|
1860
1709
|
},
|
|
1861
1710
|
divCreate: {
|
|
1862
1711
|
style: `display: flex;color:#393939;text-align: left;width: 348px;padding: 24px;flex-direction: column;gap: 18px;border-radius: 10px;background: #FFF;box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.15);position:absolute;right:0;top:33px;gap:18px;z-index:3;`,
|
|
@@ -1928,9 +1777,7 @@ export class ShoppingOrderManager {
|
|
|
1928
1777
|
returnHTML += html `
|
|
1929
1778
|
<div class="w-100 d-flex align-items-center justify-content-end" style="min-height: 21px;">
|
|
1930
1779
|
<div style="text-align: right;">${rowData.left}</div>
|
|
1931
|
-
<div style="width:158px;text-align: right">
|
|
1932
|
-
${rowData.left === '折扣' ? rowData.right : `$${rowData.right.toLocaleString()}`}
|
|
1933
|
-
</div>
|
|
1780
|
+
<div style="width:158px;text-align: right">${rowData.left === '折扣' ? rowData.right : `$${rowData.right.toLocaleString()}`}</div>
|
|
1934
1781
|
</div>
|
|
1935
1782
|
`;
|
|
1936
1783
|
});
|
|
@@ -1989,14 +1836,12 @@ export class ShoppingOrderManager {
|
|
|
1989
1836
|
</div>
|
|
1990
1837
|
<!-- 訂單內容 --- 商品資訊 -->
|
|
1991
1838
|
<div
|
|
1992
|
-
|
|
1839
|
+
style="color: #393939;width: 100%;display: flex;padding: 20px;flex-direction: column;align-items: flex-start;gap: 18px;align-self: stretch;border-radius: 10px;background: #FFF;box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);"
|
|
1993
1840
|
>
|
|
1994
1841
|
<div class="tx_700">訂單內容</div>
|
|
1995
1842
|
<div style="width: 100%;display: flex;align-items: center;padding-right: 20px;">
|
|
1996
1843
|
<div class="flex-fill d-flex align-items-center col-5 tx_700">商品</div>
|
|
1997
|
-
<div class="col-3 pe-lg-3"
|
|
1998
|
-
style="display: flex;align-items: flex-start;font-size: 16px;font-weight: 700;">單價
|
|
1999
|
-
</div>
|
|
1844
|
+
<div class="col-3 pe-lg-3" style="display: flex;align-items: flex-start;font-size: 16px;font-weight: 700;">單價</div>
|
|
2000
1845
|
<div class="col-2 tx_700">數量</div>
|
|
2001
1846
|
<div class="tx_700" style="width: 50px; text-align: right;">小計</div>
|
|
2002
1847
|
</div>
|
|
@@ -2014,31 +1859,27 @@ export class ShoppingOrderManager {
|
|
|
2014
1859
|
selectVariant.qty = selectVariant.qty || 1;
|
|
2015
1860
|
returnHTML += html `
|
|
2016
1861
|
<div style="width: 100%;display: flex;align-items: center;position: relative;padding-right: 20px;">
|
|
2017
|
-
<div class="flex-fill d-flex align-items-center col-5"
|
|
2018
|
-
style="font-size: 16px;font-weight: 700;gap: 12px;">
|
|
1862
|
+
<div class="flex-fill d-flex align-items-center col-5" style="font-size: 16px;font-weight: 700;gap: 12px;">
|
|
2019
1863
|
<div style="width: 54px;height: 54px; background: url('${productIMG}') lightgray 50% / cover no-repeat;"></div>
|
|
2020
1864
|
<div style="display: flex;flex-direction: column;align-items: flex-start;gap: 4px;width: calc(100% - 54px);padding-right: 15px;">
|
|
2021
|
-
<div style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100%;">
|
|
2022
|
-
${product.content.title}
|
|
2023
|
-
</div>
|
|
1865
|
+
<div style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100%;">${product.content.title}</div>
|
|
2024
1866
|
<div class="d-flex" style="gap:8px;font-weight: 400;">
|
|
2025
1867
|
${(() => {
|
|
2026
1868
|
if (selectVariant.spec.length > 0) {
|
|
2027
1869
|
let tempHTML = ``;
|
|
2028
1870
|
selectVariant.spec.map((spec) => {
|
|
2029
|
-
tempHTML += html `
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
</div>`;
|
|
1871
|
+
tempHTML += html ` <div
|
|
1872
|
+
style="display: flex;height: 22px;padding: 4px 6px;justify-content: center;align-items: center;gap: 10px;border-radius: 7px;background: #EAEAEA;"
|
|
1873
|
+
>
|
|
1874
|
+
${spec}
|
|
1875
|
+
</div>`;
|
|
2035
1876
|
});
|
|
2036
1877
|
return tempHTML;
|
|
2037
1878
|
}
|
|
2038
1879
|
else {
|
|
2039
1880
|
return html `
|
|
2040
1881
|
<div
|
|
2041
|
-
|
|
1882
|
+
style="display: flex;height: 22px;padding: 4px 6px;justify-content: center;align-items: center;gap: 10px;border-radius: 7px;background: #EAEAEA;"
|
|
2042
1883
|
>
|
|
2043
1884
|
單一規格
|
|
2044
1885
|
</div>
|
|
@@ -2046,26 +1887,22 @@ export class ShoppingOrderManager {
|
|
|
2046
1887
|
}
|
|
2047
1888
|
})()}
|
|
2048
1889
|
</div>
|
|
2049
|
-
<div style="color: #8D8D8D;font-size: 14px;font-weight: 400;">存貨單位
|
|
2050
|
-
(SKU):
|
|
2051
|
-
${selectVariant.sku.length ? selectVariant.sku : 'sku未指定'}
|
|
2052
|
-
</div>
|
|
1890
|
+
<div style="color: #8D8D8D;font-size: 14px;font-weight: 400;">存貨單位 (SKU): ${selectVariant.sku.length ? selectVariant.sku : 'sku未指定'}</div>
|
|
2053
1891
|
</div>
|
|
2054
1892
|
</div>
|
|
2055
|
-
<div class="col-3"
|
|
2056
|
-
|
|
2057
|
-
$${(() => {
|
|
1893
|
+
<div class="col-3" style="display: flex;padding-right: 40px;align-items: flex-start;font-size: 16px;font-weight: 400;">
|
|
1894
|
+
$${(() => {
|
|
2058
1895
|
const price = parseInt(`${selectVariant.sale_price}`, 10);
|
|
2059
1896
|
return isNaN(price) ? 0 : price.toLocaleString();
|
|
2060
1897
|
})()}
|
|
2061
1898
|
</div>
|
|
2062
1899
|
<div class="tx_700" style="width:15%">
|
|
2063
1900
|
<input
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
1901
|
+
type="number"
|
|
1902
|
+
value="${selectVariant.qty}"
|
|
1903
|
+
style="width: 80px;transform: translateX(-16px);text-align: center;display: flex;padding: 9px 18px;align-items: center;gap: 32px;border-radius: 10px;border: 1px solid #DDD;"
|
|
1904
|
+
min="0"
|
|
1905
|
+
onchange="${gvc.event((e) => {
|
|
2069
1906
|
if (e.value < 1) {
|
|
2070
1907
|
const dialog = new ShareDialog(glitter);
|
|
2071
1908
|
dialog.warningMessage({
|
|
@@ -2093,19 +1930,16 @@ export class ShoppingOrderManager {
|
|
|
2093
1930
|
<div style="min-width: 6%;font-size: 16px;font-weight: 400;width: 50px;text-align: right;">
|
|
2094
1931
|
<span>$${(selectVariant.sale_price * selectVariant.qty).toLocaleString()}</span>
|
|
2095
1932
|
<div
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
1933
|
+
class="d-flex align-items-center cursor_pointer"
|
|
1934
|
+
style="position: absolute;right:0;top:50%;transform: translateY(-50%)"
|
|
1935
|
+
onclick="${gvc.event(() => {
|
|
2099
1936
|
newOrder.productCheck.splice(index, 1);
|
|
2100
1937
|
gvc.notifyDataChange('listProduct');
|
|
2101
1938
|
})}"
|
|
2102
1939
|
>
|
|
2103
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="11" height="10"
|
|
2104
|
-
|
|
2105
|
-
<path d="
|
|
2106
|
-
stroke-width="1.3" stroke-linecap="round"/>
|
|
2107
|
-
<path d="M9.99805 9.24219L1.51276 0.756907" stroke="#DDDDDD"
|
|
2108
|
-
stroke-width="1.3" stroke-linecap="round"/>
|
|
1940
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="11" height="10" viewBox="0 0 11 10" fill="none">
|
|
1941
|
+
<path d="M1.51367 9.24219L9.99895 0.756906" stroke="#DDDDDD" stroke-width="1.3" stroke-linecap="round" />
|
|
1942
|
+
<path d="M9.99805 9.24219L1.51276 0.756907" stroke="#DDDDDD" stroke-width="1.3" stroke-linecap="round" />
|
|
2109
1943
|
</svg>
|
|
2110
1944
|
</div>
|
|
2111
1945
|
</div>
|
|
@@ -2125,9 +1959,9 @@ export class ShoppingOrderManager {
|
|
|
2125
1959
|
view: () => {
|
|
2126
1960
|
return html `
|
|
2127
1961
|
<div
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
1962
|
+
class="w-100 d-flex justify-content-center align-items-center"
|
|
1963
|
+
style="color: #36B;"
|
|
1964
|
+
onclick="${gvc.event(() => {
|
|
2131
1965
|
let confirm = true;
|
|
2132
1966
|
window.parent.glitter.innerDialog((gvc) => {
|
|
2133
1967
|
newOrder.query = '';
|
|
@@ -2139,42 +1973,39 @@ export class ShoppingOrderManager {
|
|
|
2139
1973
|
var _a;
|
|
2140
1974
|
let width = window.innerWidth > 1000 ? 690 : 350;
|
|
2141
1975
|
let searchLoading = false;
|
|
2142
|
-
return html `
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px;"
|
|
2166
|
-
placeholder="輸入商品名稱或商品貨號"
|
|
2167
|
-
oninput="${gvc.event((e) => {
|
|
1976
|
+
return html ` <div
|
|
1977
|
+
style="display: flex;width: ${width}px;flex-direction: column;align-items: flex-start;gap: 18px;border-radius: 10px;background: #FFF;"
|
|
1978
|
+
>
|
|
1979
|
+
<div
|
|
1980
|
+
class="w-100"
|
|
1981
|
+
style="display: flex;height: 46px;padding: 20px 20px 12px;align-items: center;align-self: stretch;color: #393939;font-size: 16px;font-weight: 700;"
|
|
1982
|
+
>
|
|
1983
|
+
搜尋商品
|
|
1984
|
+
</div>
|
|
1985
|
+
<div class="w-100" style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;">
|
|
1986
|
+
<div class="w-100" style="display: flex;padding: 0px 24px;flex-direction: column;align-items: center;gap: 18px;">
|
|
1987
|
+
<div style="display: flex;justify-content: center;align-items: flex-start;gap: 12px;align-self: stretch;">
|
|
1988
|
+
<div class="w-100 position-relative">
|
|
1989
|
+
<i
|
|
1990
|
+
class="fa-regular fa-magnifying-glass"
|
|
1991
|
+
style="font-size: 18px; color: #A0A0A0; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);"
|
|
1992
|
+
aria-hidden="true"
|
|
1993
|
+
></i>
|
|
1994
|
+
<input
|
|
1995
|
+
class="form-control h-100"
|
|
1996
|
+
style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px;"
|
|
1997
|
+
placeholder="輸入商品名稱或商品貨號"
|
|
1998
|
+
oninput="${gvc.event((e) => {
|
|
2168
1999
|
searchLoading = false;
|
|
2169
2000
|
newOrder.query = e.value;
|
|
2170
2001
|
newOrder.productArray = [];
|
|
2171
2002
|
gvc.notifyDataChange('productArray');
|
|
2172
2003
|
})}"
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2004
|
+
value="${(_a = newOrder.query) !== null && _a !== void 0 ? _a : ''}"
|
|
2005
|
+
/>
|
|
2006
|
+
</div>
|
|
2176
2007
|
|
|
2177
|
-
|
|
2008
|
+
${BgWidget.updownFilter({
|
|
2178
2009
|
gvc,
|
|
2179
2010
|
callback: (value) => {
|
|
2180
2011
|
searchLoading = false;
|
|
@@ -2185,11 +2016,11 @@ export class ShoppingOrderManager {
|
|
|
2185
2016
|
default: newOrder.orderString || 'default',
|
|
2186
2017
|
options: FilterOptions.productOrderBy,
|
|
2187
2018
|
})}
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2019
|
+
</div>
|
|
2020
|
+
<div
|
|
2021
|
+
style="height:350px;display: flex;justify-content: center;align-items: flex-start;padding-right: 24px;align-self: stretch;overflow-y: scroll;"
|
|
2022
|
+
>
|
|
2023
|
+
${gvc.bindView({
|
|
2193
2024
|
bind: 'productArray',
|
|
2194
2025
|
view: () => {
|
|
2195
2026
|
if (!searchLoading) {
|
|
@@ -2206,11 +2037,9 @@ export class ShoppingOrderManager {
|
|
|
2206
2037
|
return BgWidget.spinner();
|
|
2207
2038
|
}
|
|
2208
2039
|
if (newOrder.productArray.length == 0) {
|
|
2209
|
-
return html `
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
查無此商品
|
|
2213
|
-
</div>`;
|
|
2040
|
+
return html ` <div class="w-100 h-100 d-flex align-items-center justify-content-center" style="color:#8D8D8D;">
|
|
2041
|
+
查無此商品
|
|
2042
|
+
</div>`;
|
|
2214
2043
|
}
|
|
2215
2044
|
return newOrder.productArray
|
|
2216
2045
|
.map((product, productIndex) => {
|
|
@@ -2218,98 +2047,94 @@ export class ShoppingOrderManager {
|
|
|
2218
2047
|
bind: `product${productIndex}`,
|
|
2219
2048
|
view: () => {
|
|
2220
2049
|
return html `
|
|
2221
|
-
|
|
2050
|
+
${(() => {
|
|
2222
2051
|
if (product.select) {
|
|
2223
|
-
return html `
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
onclick="${gvc.event(() => {
|
|
2052
|
+
return html ` <svg
|
|
2053
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2054
|
+
width="16"
|
|
2055
|
+
height="16"
|
|
2056
|
+
viewBox="0 0 16 16"
|
|
2057
|
+
fill="none"
|
|
2058
|
+
onclick="${gvc.event(() => {
|
|
2231
2059
|
product.select = false;
|
|
2232
2060
|
gvc.notifyDataChange(`product${productIndex}`);
|
|
2233
2061
|
})}"
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
stroke-linejoin="round"
|
|
2245
|
-
/>
|
|
2246
|
-
</svg>`;
|
|
2062
|
+
>
|
|
2063
|
+
<rect width="16" height="16" rx="3" fill="#393939" />
|
|
2064
|
+
<path
|
|
2065
|
+
d="M4.5 8.5L7 11L11.5 5"
|
|
2066
|
+
stroke="white"
|
|
2067
|
+
stroke-width="2"
|
|
2068
|
+
stroke-linecap="round"
|
|
2069
|
+
stroke-linejoin="round"
|
|
2070
|
+
/>
|
|
2071
|
+
</svg>`;
|
|
2247
2072
|
}
|
|
2248
2073
|
else {
|
|
2249
2074
|
return html `
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2075
|
+
<div
|
|
2076
|
+
style="display: flex;align-items: center;justify-content: center;height: 60px;width: 16px;cursor: pointer;"
|
|
2077
|
+
onclick="${gvc.event(() => {
|
|
2253
2078
|
product.select = true;
|
|
2254
2079
|
if (product.content.variants.length > 1) {
|
|
2255
2080
|
product.selectIndex = window.parent.document.querySelector('.varitantSelect').value;
|
|
2256
2081
|
}
|
|
2257
2082
|
gvc.notifyDataChange(`product${productIndex}`);
|
|
2258
2083
|
})}"
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2084
|
+
>
|
|
2085
|
+
<div
|
|
2086
|
+
style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;cursor: pointer;"
|
|
2087
|
+
></div>
|
|
2088
|
+
</div>
|
|
2089
|
+
`;
|
|
2265
2090
|
}
|
|
2266
2091
|
})()}
|
|
2267
|
-
|
|
2268
|
-
|
|
2092
|
+
<div
|
|
2093
|
+
style="width: 50px;height: 50px;border-radius: 5px;background: url('${product.content
|
|
2269
2094
|
.preview_image[0]}') lightgray 50% / cover no-repeat;"
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2095
|
+
></div>
|
|
2096
|
+
<div class="flex-fill d-flex flex-column">
|
|
2097
|
+
<div style="color:#393939;font-size: 14px;font-weight: 400;margin-bottom: 4px;">
|
|
2098
|
+
${product.content.title}
|
|
2099
|
+
</div>
|
|
2100
|
+
${(() => {
|
|
2276
2101
|
if (product.content.variants.length > 1) {
|
|
2277
2102
|
return html `
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2103
|
+
<select
|
|
2104
|
+
class="w-100 d-flex align-items-center form-select varitantSelect"
|
|
2105
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 6px 18px;"
|
|
2106
|
+
onchange="${gvc.event((e) => {
|
|
2282
2107
|
product.selectIndex = e.value;
|
|
2283
2108
|
})}"
|
|
2284
|
-
|
|
2285
|
-
|
|
2109
|
+
>
|
|
2110
|
+
${(() => {
|
|
2286
2111
|
let optionHTML = ``;
|
|
2287
2112
|
product.content.variants.map((variant, index) => {
|
|
2288
2113
|
optionHTML += html `
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2114
|
+
<option
|
|
2115
|
+
value="${index}"
|
|
2116
|
+
${(() => {
|
|
2292
2117
|
if (product.selectIndex == index)
|
|
2293
2118
|
return `selected`;
|
|
2294
2119
|
else
|
|
2295
2120
|
return ``;
|
|
2296
2121
|
})()}
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2122
|
+
>
|
|
2123
|
+
${variant.spec.join(', ')}
|
|
2124
|
+
</option>
|
|
2125
|
+
`;
|
|
2301
2126
|
});
|
|
2302
2127
|
return optionHTML;
|
|
2303
2128
|
})()}
|
|
2304
|
-
|
|
2305
|
-
|
|
2129
|
+
</select>
|
|
2130
|
+
`;
|
|
2306
2131
|
}
|
|
2307
2132
|
else {
|
|
2308
2133
|
return `<div class="d-flex align-items-center" style="height: 34px;color: #8D8D8D;font-size: 14px;font-weight: 400;">單一規格</div>`;
|
|
2309
2134
|
}
|
|
2310
2135
|
})()}
|
|
2311
|
-
|
|
2312
|
-
|
|
2136
|
+
</div>
|
|
2137
|
+
`;
|
|
2313
2138
|
},
|
|
2314
2139
|
divCreate: {
|
|
2315
2140
|
style: `display: flex;padding: 0px 12px;align-items: center;gap: 18px;align-self: stretch;`,
|
|
@@ -2320,18 +2145,17 @@ export class ShoppingOrderManager {
|
|
|
2320
2145
|
},
|
|
2321
2146
|
divCreate: {
|
|
2322
2147
|
class: `d-flex flex-column h-100`,
|
|
2323
|
-
style: `gap: 18px;width:100
|
|
2148
|
+
style: `gap: 18px;width:100%;`,
|
|
2324
2149
|
},
|
|
2325
2150
|
})}
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
${BgWidget.cancel(gvc.event(() => {
|
|
2151
|
+
</div>
|
|
2152
|
+
</div>
|
|
2153
|
+
<div class="w-100" style="display: flex;padding: 12px 20px;align-items: center;justify-content: end;gap: 10px;">
|
|
2154
|
+
${BgWidget.cancel(gvc.event(() => {
|
|
2331
2155
|
confirm = false;
|
|
2332
2156
|
gvc.closeDialog();
|
|
2333
2157
|
}))}
|
|
2334
|
-
|
|
2158
|
+
${BgWidget.save(gvc.event(() => {
|
|
2335
2159
|
confirm = true;
|
|
2336
2160
|
newOrder.productTemp = [];
|
|
2337
2161
|
newOrder.productArray.map((product) => {
|
|
@@ -2341,9 +2165,9 @@ export class ShoppingOrderManager {
|
|
|
2341
2165
|
});
|
|
2342
2166
|
gvc.closeDialog();
|
|
2343
2167
|
}))}
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2168
|
+
</div>
|
|
2169
|
+
</div>
|
|
2170
|
+
</div>`;
|
|
2347
2171
|
},
|
|
2348
2172
|
divCreate: {},
|
|
2349
2173
|
});
|
|
@@ -2378,12 +2202,9 @@ export class ShoppingOrderManager {
|
|
|
2378
2202
|
})}"
|
|
2379
2203
|
>
|
|
2380
2204
|
新增一個商品
|
|
2381
|
-
<svg style="margin-left: 5px;" xmlns="http://www.w3.org/2000/svg" width="14"
|
|
2382
|
-
|
|
2383
|
-
<path d="
|
|
2384
|
-
stroke-linecap="round" stroke-linejoin="round"/>
|
|
2385
|
-
<path d="M6.76172 1.5L6.76172 12.5" stroke="#3366BB" stroke-width="2"
|
|
2386
|
-
stroke-linecap="round" stroke-linejoin="round"/>
|
|
2205
|
+
<svg style="margin-left: 5px;" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
|
2206
|
+
<path d="M1.5 7.23926H12.5" stroke="#3366BB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
2207
|
+
<path d="M6.76172 1.5L6.76172 12.5" stroke="#3366BB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
2387
2208
|
</svg>
|
|
2388
2209
|
</div>
|
|
2389
2210
|
`;
|
|
@@ -2403,10 +2224,8 @@ export class ShoppingOrderManager {
|
|
|
2403
2224
|
view: () => {
|
|
2404
2225
|
var _a, _b, _c, _d;
|
|
2405
2226
|
customerData.info.searchable = true;
|
|
2406
|
-
let checkBox = html `
|
|
2407
|
-
|
|
2408
|
-
let uncheckBox = html `
|
|
2409
|
-
<div style="width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
|
|
2227
|
+
let checkBox = html ` <div style="display: flex;width: 16px;height: 16px;justify-content: center;align-items: center;border-radius: 20px;border: solid 4px #393939"></div>`;
|
|
2228
|
+
let uncheckBox = html ` <div style="width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
|
|
2410
2229
|
function syncUserData() {
|
|
2411
2230
|
orderDetail.user_info.name = tempUserData[customerData.type].name;
|
|
2412
2231
|
orderDetail.user_info.phone = tempUserData[customerData.type].phone;
|
|
@@ -2414,24 +2233,23 @@ export class ShoppingOrderManager {
|
|
|
2414
2233
|
}
|
|
2415
2234
|
syncUserData();
|
|
2416
2235
|
return html `
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2236
|
+
<div class="tx_700">顧客資料</div>
|
|
2237
|
+
<div class="d-flex flex-column">
|
|
2238
|
+
${customerData.type == 'auto'
|
|
2420
2239
|
? html `
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
onkeyup="${gvc.event((e) => {
|
|
2240
|
+
<div class="d-flex align-items-center" style="cursor: pointer;">
|
|
2241
|
+
${checkBox}
|
|
2242
|
+
<div style="margin-left: 6px">現有的顧客</div>
|
|
2243
|
+
</div>
|
|
2244
|
+
<div class="d-flex align-items-center position-relative" style="min-height:40px;padding-left: 22px;margin-top: 8px;">
|
|
2245
|
+
<div style="height: 100%;width:1px;background-color: #E5E5E5;position: absolute;left: 8px;top: 0;"></div>
|
|
2246
|
+
<div class="position-relative w-100 d-flex flex-column">
|
|
2247
|
+
<input
|
|
2248
|
+
class="w-100 searchInput"
|
|
2249
|
+
placeholder="搜尋現有顧客"
|
|
2250
|
+
value="${(_a = customerData.info.search) !== null && _a !== void 0 ? _a : ''}"
|
|
2251
|
+
style="padding: 9px 18px;border-radius: 10px;border: 1px solid #DDD;"
|
|
2252
|
+
onkeyup="${gvc.event((e) => {
|
|
2435
2253
|
if (customerData.info.searchable) {
|
|
2436
2254
|
customerData.info.searchable = false;
|
|
2437
2255
|
customerData.info.search = e.value;
|
|
@@ -2448,8 +2266,8 @@ export class ShoppingOrderManager {
|
|
|
2448
2266
|
}, 100);
|
|
2449
2267
|
}
|
|
2450
2268
|
})}"
|
|
2451
|
-
|
|
2452
|
-
|
|
2269
|
+
/>
|
|
2270
|
+
${gvc.bindView({
|
|
2453
2271
|
bind: `accountSelect`,
|
|
2454
2272
|
dataList: [{ obj: customerData, key: 'pageType' }],
|
|
2455
2273
|
view: () => {
|
|
@@ -2467,10 +2285,10 @@ export class ShoppingOrderManager {
|
|
|
2467
2285
|
rowData.map((data) => {
|
|
2468
2286
|
var _a, _b;
|
|
2469
2287
|
selectHTML += html `
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2288
|
+
<div
|
|
2289
|
+
class="w-100"
|
|
2290
|
+
style="cursor: pointer;"
|
|
2291
|
+
onclick="${gvc.event(() => {
|
|
2474
2292
|
var _a, _b;
|
|
2475
2293
|
tempUserData[customerData.type] = data;
|
|
2476
2294
|
orderDetail.user_info.name = data.userData.name;
|
|
@@ -2479,40 +2297,35 @@ export class ShoppingOrderManager {
|
|
|
2479
2297
|
customerData.pageType = 'check';
|
|
2480
2298
|
document.querySelector(`.searchInput`).value = `${(_a = data.userData.name) !== null && _a !== void 0 ? _a : 'uname'}(${(_b = data.account) !== null && _b !== void 0 ? _b : 'unknown email'})`;
|
|
2481
2299
|
})}"
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
</div>
|
|
2487
|
-
`;
|
|
2300
|
+
>
|
|
2301
|
+
${(_a = data.userData.name) !== null && _a !== void 0 ? _a : 'uname'} (${(_b = data.account) !== null && _b !== void 0 ? _b : 'unknown email'} )
|
|
2302
|
+
</div>
|
|
2303
|
+
`;
|
|
2488
2304
|
});
|
|
2489
2305
|
return html `
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2306
|
+
<div
|
|
2307
|
+
class="w-100 d-flex flex-column"
|
|
2308
|
+
style="gap:12px;position: absolute;right: 0; top: calc(100% + 12px);background-color: white;padding: 24px;flex-direction: column;justify-content: center;align-items: flex-start;border-radius: 10px;border: 1px solid #DDD;box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.15);"
|
|
2309
|
+
>
|
|
2310
|
+
${selectHTML}
|
|
2311
|
+
</div>
|
|
2312
|
+
`;
|
|
2497
2313
|
}
|
|
2498
2314
|
case 'check': {
|
|
2499
2315
|
return html `
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
${(_c = tempUserData[customerData.type].phone) !== null && _c !== void 0 ? _c : ''}
|
|
2514
|
-
</div>
|
|
2515
|
-
`;
|
|
2316
|
+
<div>姓名</div>
|
|
2317
|
+
<div class="w-100" style="border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
|
|
2318
|
+
${(_a = tempUserData[customerData.type].userData.name) !== null && _a !== void 0 ? _a : 'uname'}
|
|
2319
|
+
</div>
|
|
2320
|
+
<div>電子信箱</div>
|
|
2321
|
+
<div class="w-100" style="border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
|
|
2322
|
+
${(_b = tempUserData[customerData.type].account) !== null && _b !== void 0 ? _b : 'unknown email'}
|
|
2323
|
+
</div>
|
|
2324
|
+
<div>電話</div>
|
|
2325
|
+
<div class="w-100" style="min-height:45px;border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
|
|
2326
|
+
${(_c = tempUserData[customerData.type].phone) !== null && _c !== void 0 ? _c : ''}
|
|
2327
|
+
</div>
|
|
2328
|
+
`;
|
|
2516
2329
|
}
|
|
2517
2330
|
case undefined:
|
|
2518
2331
|
case 'none': {
|
|
@@ -2523,14 +2336,13 @@ export class ShoppingOrderManager {
|
|
|
2523
2336
|
},
|
|
2524
2337
|
divCreate: {},
|
|
2525
2338
|
})}
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
: html `
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
onclick="${gvc.event(() => {
|
|
2339
|
+
</div>
|
|
2340
|
+
</div>
|
|
2341
|
+
`
|
|
2342
|
+
: html ` <div
|
|
2343
|
+
class="d-flex align-items-center"
|
|
2344
|
+
style="margin-bottom: 12px;cursor: pointer;"
|
|
2345
|
+
onclick="${gvc.event(() => {
|
|
2534
2346
|
if (customerData.type == 'manual') {
|
|
2535
2347
|
orderDetail.user_info = {
|
|
2536
2348
|
CVSAddress: '',
|
|
@@ -2550,50 +2362,48 @@ export class ShoppingOrderManager {
|
|
|
2550
2362
|
customerData.sameCustomer = false;
|
|
2551
2363
|
gvc.notifyDataChange('setLogistics');
|
|
2552
2364
|
})}"
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2365
|
+
>
|
|
2366
|
+
${uncheckBox}
|
|
2367
|
+
<div style="margin-left: 6px">現有的顧客</div>
|
|
2368
|
+
</div>`}
|
|
2369
|
+
${customerData.type == 'manual'
|
|
2558
2370
|
? html `
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
placeholder="請輸入姓名"
|
|
2574
|
-
onchange="${gvc.event((e) => {
|
|
2371
|
+
<div class="d-flex align-items-center" style="cursor: pointer;">
|
|
2372
|
+
${checkBox}
|
|
2373
|
+
<div style="margin-left: 6px">手動加入顧客</div>
|
|
2374
|
+
</div>
|
|
2375
|
+
<div class="d-flex align-items-center position-relative" style="min-height:40px;padding-left: 22px;margin-top: 8px;">
|
|
2376
|
+
<div style="height: 100%;width:1px;background-color: #E5E5E5;position: absolute;left: 8px;top: 0;"></div>
|
|
2377
|
+
<div class="position-relative w-100 d-flex flex-column" style="gap:8px;">
|
|
2378
|
+
<div>姓名</div>
|
|
2379
|
+
<input
|
|
2380
|
+
class="w-100"
|
|
2381
|
+
value="${(_b = orderDetail.user_info.name) !== null && _b !== void 0 ? _b : ''}"
|
|
2382
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2383
|
+
placeholder="請輸入姓名"
|
|
2384
|
+
onchange="${gvc.event((e) => {
|
|
2575
2385
|
tempUserData[customerData.type].name = e.value;
|
|
2576
2386
|
orderDetail.user_info.name = e.value;
|
|
2577
2387
|
})}"
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2388
|
+
/>
|
|
2389
|
+
<div>電話</div>
|
|
2390
|
+
<input
|
|
2391
|
+
class="w-100"
|
|
2392
|
+
value="${(_c = orderDetail.user_info.phone) !== null && _c !== void 0 ? _c : ''}"
|
|
2393
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2394
|
+
placeholder="請輸入電話"
|
|
2395
|
+
onchange="${gvc.event((e) => {
|
|
2586
2396
|
tempUserData[customerData.type].phone = e.value;
|
|
2587
2397
|
orderDetail.user_info.phone = e.value;
|
|
2588
2398
|
})}"
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2399
|
+
/>
|
|
2400
|
+
<div>電子信箱</div>
|
|
2401
|
+
<input
|
|
2402
|
+
class="w-100"
|
|
2403
|
+
value="${(_d = orderDetail.user_info.email) !== null && _d !== void 0 ? _d : ''}"
|
|
2404
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2405
|
+
placeholder="請輸入電子信箱,同時會註冊暫時會員"
|
|
2406
|
+
onchange="${gvc.event((e) => {
|
|
2597
2407
|
tempUserData[customerData.type].email = e.value;
|
|
2598
2408
|
ApiUser.getEmailCount(e.value).then((r) => {
|
|
2599
2409
|
if (r.response.result) {
|
|
@@ -2605,15 +2415,14 @@ export class ShoppingOrderManager {
|
|
|
2605
2415
|
});
|
|
2606
2416
|
orderDetail.user_info.email = e.value;
|
|
2607
2417
|
})}"
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
: html `
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
onclick="${gvc.event(() => {
|
|
2418
|
+
/>
|
|
2419
|
+
</div>
|
|
2420
|
+
</div>
|
|
2421
|
+
`
|
|
2422
|
+
: html ` <div
|
|
2423
|
+
class="d-flex align-items-center"
|
|
2424
|
+
style="margin-top: 12px;cursor: pointer;"
|
|
2425
|
+
onclick="${gvc.event(() => {
|
|
2617
2426
|
if (customerData.type == 'auto') {
|
|
2618
2427
|
orderDetail.user_info = {
|
|
2619
2428
|
CVSAddress: '',
|
|
@@ -2633,12 +2442,12 @@ export class ShoppingOrderManager {
|
|
|
2633
2442
|
customerData.sameCustomer = false;
|
|
2634
2443
|
gvc.notifyDataChange(['setLogistics']);
|
|
2635
2444
|
})}"
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2445
|
+
>
|
|
2446
|
+
${uncheckBox}
|
|
2447
|
+
<div style="margin-left: 6px;">手動加入顧客</div>
|
|
2448
|
+
</div>`}
|
|
2449
|
+
</div>
|
|
2450
|
+
`;
|
|
2642
2451
|
},
|
|
2643
2452
|
divCreate: { class: `d-flex flex-column`, style: `gap:18px;` },
|
|
2644
2453
|
}))}
|
|
@@ -2649,66 +2458,47 @@ export class ShoppingOrderManager {
|
|
|
2649
2458
|
view: () => {
|
|
2650
2459
|
var _a, _b, _c;
|
|
2651
2460
|
return html `
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2461
|
+
<div class="tx_700">設定金物流</div>
|
|
2462
|
+
<div class="d-flex flex-column" style="gap: 18px">
|
|
2463
|
+
<div class="d-flex align-items-center w-100" style="gap:18px;">
|
|
2464
|
+
<div class="d-flex flex-column flex-fill" style="gap: 8px;">
|
|
2465
|
+
<div>付款方式 / 付款狀態</div>
|
|
2466
|
+
<select
|
|
2467
|
+
class="form-select"
|
|
2468
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2469
|
+
onchange="${gvc.event((e) => {
|
|
2661
2470
|
orderDetail.pay_status = e.value;
|
|
2662
2471
|
})}"
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
<select
|
|
2675
|
-
class="form-select"
|
|
2676
|
-
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2677
|
-
onchange="${gvc.event((e) => {
|
|
2472
|
+
>
|
|
2473
|
+
<option value="1" ${orderDetail.pay_status == 1 ? 'selected' : ''}>線下付款-已付款</option>
|
|
2474
|
+
<option value="0" ${orderDetail.pay_status == 0 ? 'selected' : ''}>線下付款-未付款</option>
|
|
2475
|
+
</select>
|
|
2476
|
+
</div>
|
|
2477
|
+
<div class="d-flex flex-column flex-fill" style="gap: 8px;">
|
|
2478
|
+
<div>運送方法</div>
|
|
2479
|
+
<select
|
|
2480
|
+
class="form-select"
|
|
2481
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2482
|
+
onchange="${gvc.event((e) => {
|
|
2678
2483
|
orderDetail.user_info.shipment = e.value;
|
|
2679
2484
|
orderDetailRefresh = true;
|
|
2680
2485
|
gvc.notifyDataChange(['listProduct', 'orderDetail']);
|
|
2681
2486
|
})}"
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
7-11店到店
|
|
2690
|
-
</option>
|
|
2691
|
-
<option value="FAMIC2C"
|
|
2692
|
-
${orderDetail.user_info.shipment == 'FAMIC2C' ? 'selected' : ''}>
|
|
2693
|
-
全家店到店
|
|
2694
|
-
</option>
|
|
2695
|
-
<option value="OKMARTC2C"
|
|
2696
|
-
${orderDetail.user_info.shipment == 'OKMARTC2C' ? 'selected' : ''}>
|
|
2697
|
-
OK店到店
|
|
2698
|
-
</option>
|
|
2699
|
-
<option value="HILIFEC2C"
|
|
2700
|
-
${orderDetail.user_info.shipment == 'HILIFEC2C' ? 'selected' : ''}>
|
|
2701
|
-
萊爾富店到店
|
|
2702
|
-
</option>
|
|
2703
|
-
</select>
|
|
2704
|
-
</div>
|
|
2487
|
+
>
|
|
2488
|
+
<option value="normal" ${orderDetail.user_info.shipment == 'normal' ? 'selected' : ''}>宅配</option>
|
|
2489
|
+
<option value="UNIMARTC2C" ${orderDetail.user_info.shipment == 'UNIMARTC2C' ? 'selected' : ''}>7-11店到店</option>
|
|
2490
|
+
<option value="FAMIC2C" ${orderDetail.user_info.shipment == 'FAMIC2C' ? 'selected' : ''}>全家店到店</option>
|
|
2491
|
+
<option value="OKMARTC2C" ${orderDetail.user_info.shipment == 'OKMARTC2C' ? 'selected' : ''}>OK店到店</option>
|
|
2492
|
+
<option value="HILIFEC2C" ${orderDetail.user_info.shipment == 'HILIFEC2C' ? 'selected' : ''}>萊爾富店到店</option>
|
|
2493
|
+
</select>
|
|
2705
2494
|
</div>
|
|
2495
|
+
</div>
|
|
2706
2496
|
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2497
|
+
<div class="tx_700">收件人資料</div>
|
|
2498
|
+
<div
|
|
2499
|
+
class="d-flex align-items-center"
|
|
2500
|
+
style="gap:6px;cursor: pointer;"
|
|
2501
|
+
onclick="${gvc.event(() => {
|
|
2712
2502
|
var _a;
|
|
2713
2503
|
customerData.sameCustomer = !customerData.sameCustomer;
|
|
2714
2504
|
if (customerData.sameCustomer && !((_a = orderDetail.user_info) === null || _a === void 0 ? void 0 : _a.email)) {
|
|
@@ -2723,57 +2513,52 @@ export class ShoppingOrderManager {
|
|
|
2723
2513
|
}
|
|
2724
2514
|
gvc.notifyDataChange('setLogistics');
|
|
2725
2515
|
})}"
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
? html `
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
<input
|
|
2743
|
-
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2744
|
-
value="${(_a = orderDetail.customer_info.name) !== null && _a !== void 0 ? _a : ''}"
|
|
2745
|
-
placeholder="請輸入姓名"
|
|
2746
|
-
onchange="${gvc.event((e) => {
|
|
2516
|
+
>
|
|
2517
|
+
${customerData.sameCustomer
|
|
2518
|
+
? html ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
2519
|
+
<rect width="16" height="16" rx="3" fill="#393939" />
|
|
2520
|
+
<path d="M4.5 8.5L7 11L11.5 5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
2521
|
+
</svg>`
|
|
2522
|
+
: html ` <div style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;"></div>`}
|
|
2523
|
+
同顧客資料
|
|
2524
|
+
</div>
|
|
2525
|
+
<div class="d-flex flex-column" style="gap: 8px">
|
|
2526
|
+
<div>姓名</div>
|
|
2527
|
+
<input
|
|
2528
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2529
|
+
value="${(_a = orderDetail.customer_info.name) !== null && _a !== void 0 ? _a : ''}"
|
|
2530
|
+
placeholder="請輸入姓名"
|
|
2531
|
+
onchange="${gvc.event((e) => {
|
|
2747
2532
|
orderDetail.customer_info.name = e.value;
|
|
2748
2533
|
})}"
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2534
|
+
${customerData.sameCustomer ? 'disabled' : ''}
|
|
2535
|
+
/>
|
|
2536
|
+
</div>
|
|
2537
|
+
<div class="d-flex flex-column" style="gap: 8px">
|
|
2538
|
+
<div>電話</div>
|
|
2539
|
+
<input
|
|
2540
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2541
|
+
value="${(_b = orderDetail.customer_info.phone) !== null && _b !== void 0 ? _b : ''}"
|
|
2542
|
+
placeholder="請輸入電話"
|
|
2543
|
+
onchange="${gvc.event((e) => {
|
|
2759
2544
|
orderDetail.customer_info.phone = e.value;
|
|
2760
2545
|
})}"
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2546
|
+
/>
|
|
2547
|
+
</div>
|
|
2548
|
+
<div class="d-flex flex-column" style="gap: 8px">
|
|
2549
|
+
<div>電子信箱</div>
|
|
2550
|
+
<input
|
|
2551
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
|
|
2552
|
+
value="${(_c = orderDetail.customer_info.email) !== null && _c !== void 0 ? _c : ''}"
|
|
2553
|
+
placeholder="請輸入電子信箱"
|
|
2554
|
+
onchange="${gvc.event((e) => {
|
|
2770
2555
|
orderDetail.customer_info.email = e.value;
|
|
2771
2556
|
})}"
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2557
|
+
${customerData.sameCustomer ? 'disabled' : ''}
|
|
2558
|
+
/>
|
|
2559
|
+
</div>
|
|
2560
|
+
<div class="d-flex flex-column" style="gap: 8px">
|
|
2561
|
+
${gvc.bindView({
|
|
2777
2562
|
bind: 'CVSStore',
|
|
2778
2563
|
dataList: [{ obj: orderDetail.user_info, key: 'shipment' }],
|
|
2779
2564
|
view: () => {
|
|
@@ -2781,16 +2566,16 @@ export class ShoppingOrderManager {
|
|
|
2781
2566
|
switch ((_a = orderDetail.user_info) === null || _a === void 0 ? void 0 : _a.shipment) {
|
|
2782
2567
|
case 'normal': {
|
|
2783
2568
|
return html `
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2569
|
+
<div>宅配地址</div>
|
|
2570
|
+
<input
|
|
2571
|
+
style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;margin-top:8px;width: 100%;"
|
|
2572
|
+
value="${(_b = orderDetail.user_info.address) !== null && _b !== void 0 ? _b : ''}"
|
|
2573
|
+
placeholder="請輸入宅配地址"
|
|
2574
|
+
onchange="${gvc.event((e) => {
|
|
2790
2575
|
orderDetail.user_info.address = e.value;
|
|
2791
2576
|
})}"
|
|
2792
|
-
|
|
2793
|
-
|
|
2577
|
+
/>
|
|
2578
|
+
`;
|
|
2794
2579
|
}
|
|
2795
2580
|
default: {
|
|
2796
2581
|
let returnHTML = ``;
|
|
@@ -2802,57 +2587,49 @@ export class ShoppingOrderManager {
|
|
|
2802
2587
|
OKMARTC2C: `https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1716734510490-beb1c70f9e168b7bab198ea2bf226148.png`,
|
|
2803
2588
|
};
|
|
2804
2589
|
returnHTML = html `
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
style="color:#4D86DB"
|
|
2812
|
-
onclick="${gvc.event(() => {
|
|
2590
|
+
<div class="d-flex flex-column">
|
|
2591
|
+
<div class="d-flex align-items-center">
|
|
2592
|
+
<img style="width: 32px;height: 32px;margin-right: 8px;" src="${icon[orderDetail.user_info.shipment]}" alt="icon" />
|
|
2593
|
+
<div
|
|
2594
|
+
style="color:#4D86DB"
|
|
2595
|
+
onclick="${gvc.event(() => {
|
|
2813
2596
|
selectCVS(orderDetail.user_info.shipment);
|
|
2814
2597
|
})}"
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
</div>
|
|
2818
|
-
</div>
|
|
2819
|
-
<div class="d-flex">門市名稱:
|
|
2820
|
-
${orderDetail.user_info.CVSStoreName}
|
|
2821
|
-
</div>
|
|
2822
|
-
<div class="d-flex">門市店號:
|
|
2823
|
-
${orderDetail.user_info.CVSStoreID}
|
|
2824
|
-
</div>
|
|
2825
|
-
<div class="d-flex">門市地址:
|
|
2826
|
-
${orderDetail.user_info.CVSAddress}
|
|
2598
|
+
>
|
|
2599
|
+
點擊更換門市
|
|
2827
2600
|
</div>
|
|
2828
2601
|
</div>
|
|
2829
|
-
|
|
2602
|
+
<div class="d-flex">門市名稱: ${orderDetail.user_info.CVSStoreName}</div>
|
|
2603
|
+
<div class="d-flex">門市店號: ${orderDetail.user_info.CVSStoreID}</div>
|
|
2604
|
+
<div class="d-flex">門市地址: ${orderDetail.user_info.CVSAddress}</div>
|
|
2605
|
+
</div>
|
|
2606
|
+
`;
|
|
2830
2607
|
return html `
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2608
|
+
<div>取貨門市</div>
|
|
2609
|
+
${returnHTML}
|
|
2610
|
+
`;
|
|
2834
2611
|
}
|
|
2835
2612
|
else {
|
|
2836
2613
|
return html `
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2614
|
+
<div>取貨門市</div>
|
|
2615
|
+
<div
|
|
2616
|
+
style="color: #4D86DB;cursor: pointer;margin-top:8px;cursor: pointer"
|
|
2617
|
+
onclick="${gvc.event(() => {
|
|
2841
2618
|
selectCVS(orderDetail.user_info.shipment);
|
|
2842
2619
|
})}"
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2620
|
+
>
|
|
2621
|
+
請選擇取貨門市
|
|
2622
|
+
</div>
|
|
2623
|
+
`;
|
|
2847
2624
|
}
|
|
2848
2625
|
}
|
|
2849
2626
|
}
|
|
2850
2627
|
},
|
|
2851
2628
|
divCreate: {},
|
|
2852
2629
|
})}
|
|
2853
|
-
</div>
|
|
2854
2630
|
</div>
|
|
2855
|
-
|
|
2631
|
+
</div>
|
|
2632
|
+
`;
|
|
2856
2633
|
},
|
|
2857
2634
|
divCreate: { class: `d-flex flex-column`, style: `color:#393939;gap:18px;` },
|
|
2858
2635
|
}))}
|
|
@@ -2861,8 +2638,8 @@ export class ShoppingOrderManager {
|
|
|
2861
2638
|
<div class="d-flex flex-column" style="gap: 8px">
|
|
2862
2639
|
<div class="tx_700">訂單備註</div>
|
|
2863
2640
|
<textarea
|
|
2864
|
-
|
|
2865
|
-
|
|
2641
|
+
style="cursor: pointer;height: 80px;padding: 9px 18px;border-radius: 10px;border: 1px solid #DDD;"
|
|
2642
|
+
onchange="${gvc.event((e) => {
|
|
2866
2643
|
orderDetail.user_info.note = e.value;
|
|
2867
2644
|
})}"
|
|
2868
2645
|
></textarea>
|
|
@@ -2885,46 +2662,43 @@ export class ShoppingOrderManager {
|
|
|
2885
2662
|
dialog.dataLoading({ visible: false });
|
|
2886
2663
|
window.parent.glitter.innerDialog((gvc) => {
|
|
2887
2664
|
return html `
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2665
|
+
<div
|
|
2666
|
+
style="position: relative;width: 492px;height: 223px;border-radius: 10px;background: #FFF;display: flex;flex-direction: column;align-items: center;justify-content: center;"
|
|
2667
|
+
>
|
|
2668
|
+
<svg
|
|
2669
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2670
|
+
width="14"
|
|
2671
|
+
height="14"
|
|
2672
|
+
viewBox="0 0 14 14"
|
|
2673
|
+
fill="none"
|
|
2674
|
+
style="position: absolute;top: 12px;right: 12px;cursor: pointer;"
|
|
2675
|
+
onclick="${gvc.event(() => {
|
|
2899
2676
|
gvc.glitter.closeDiaLog();
|
|
2900
2677
|
})}"
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
stroke-linecap="round"/>
|
|
2906
|
-
</svg>
|
|
2678
|
+
>
|
|
2679
|
+
<path d="M1 1L13 13" stroke="#393939" stroke-linecap="round" />
|
|
2680
|
+
<path d="M13 1L1 13" stroke="#393939" stroke-linecap="round" />
|
|
2681
|
+
</svg>
|
|
2907
2682
|
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
`;
|
|
2683
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="75" height="75" viewBox="0 0 75 75" fill="none">
|
|
2684
|
+
<g clip-path="url(#clip0_9850_171427)">
|
|
2685
|
+
<path
|
|
2686
|
+
d="M37.5 7.03125C45.5808 7.03125 53.3307 10.2413 59.0447 15.9553C64.7587 21.6693 67.9688 29.4192 67.9688 37.5C67.9688 45.5808 64.7587 53.3307 59.0447 59.0447C53.3307 64.7587 45.5808 67.9688 37.5 67.9688C29.4192 67.9688 21.6693 64.7587 15.9553 59.0447C10.2413 53.3307 7.03125 45.5808 7.03125 37.5C7.03125 29.4192 10.2413 21.6693 15.9553 15.9553C21.6693 10.2413 29.4192 7.03125 37.5 7.03125ZM37.5 75C47.4456 75 56.9839 71.0491 64.0165 64.0165C71.0491 56.9839 75 47.4456 75 37.5C75 27.5544 71.0491 18.0161 64.0165 10.9835C56.9839 3.95088 47.4456 0 37.5 0C27.5544 0 18.0161 3.95088 10.9835 10.9835C3.95088 18.0161 0 27.5544 0 37.5C0 47.4456 3.95088 56.9839 10.9835 64.0165C18.0161 71.0491 27.5544 75 37.5 75ZM54.0527 30.6152C55.4297 29.2383 55.4297 27.0117 54.0527 25.6494C52.6758 24.2871 50.4492 24.2725 49.0869 25.6494L32.8271 41.9092L25.9424 35.0244C24.5654 33.6475 22.3389 33.6475 20.9766 35.0244C19.6143 36.4014 19.5996 38.6279 20.9766 39.9902L30.3516 49.3652C31.7285 50.7422 33.9551 50.7422 35.3174 49.3652L54.0527 30.6152Z"
|
|
2687
|
+
fill="#393939"
|
|
2688
|
+
/>
|
|
2689
|
+
</g>
|
|
2690
|
+
<defs>
|
|
2691
|
+
<clipPath id="clip0_9850_171427">
|
|
2692
|
+
<rect width="75" height="75" fill="white" />
|
|
2693
|
+
</clipPath>
|
|
2694
|
+
</defs>
|
|
2695
|
+
</svg>
|
|
2696
|
+
<div style="text-align: center;color: #393939;font-size: 16px;font-weight: 400;line-height: 160%;margin-top: 24px;">
|
|
2697
|
+
訂單新增成功!<br />
|
|
2698
|
+
已將訂單明細發送至顧客信箱
|
|
2699
|
+
</div>
|
|
2700
|
+
</div>
|
|
2701
|
+
`;
|
|
2928
2702
|
}, 'orderFinish', {
|
|
2929
2703
|
dismiss: () => {
|
|
2930
2704
|
vm.type = 'list';
|
|
@@ -2966,8 +2740,7 @@ export class ShoppingOrderManager {
|
|
|
2966
2740
|
if (orderData.method !== 'off_line' || orderData.customer_info.payment_select === 'cash_on_delivery') {
|
|
2967
2741
|
return '';
|
|
2968
2742
|
}
|
|
2969
|
-
return html `
|
|
2970
|
-
<div class="tx_700">付款證明回傳</div>
|
|
2743
|
+
return html ` <div class="tx_700">付款證明回傳</div>
|
|
2971
2744
|
<div class="border rounded-3 w-100 p-3 tx_normal">
|
|
2972
2745
|
${(() => {
|
|
2973
2746
|
const array = [];
|
|
@@ -2987,8 +2760,7 @@ export class ShoppingOrderManager {
|
|
|
2987
2760
|
image: orderData.proof_purchase[dd],
|
|
2988
2761
|
width: 400,
|
|
2989
2762
|
height: 250,
|
|
2990
|
-
read: () => {
|
|
2991
|
-
},
|
|
2763
|
+
read: () => { },
|
|
2992
2764
|
}));
|
|
2993
2765
|
}
|
|
2994
2766
|
});
|
|
@@ -3016,8 +2788,7 @@ export class ShoppingOrderManager {
|
|
|
3016
2788
|
return {
|
|
3017
2789
|
bind: id,
|
|
3018
2790
|
view: () => {
|
|
3019
|
-
return html `
|
|
3020
|
-
<iframe class="outer${className}" style="height: 650px;"></iframe>`;
|
|
2791
|
+
return html ` <iframe class="outer${className}" style="height: 650px;"></iframe>`;
|
|
3021
2792
|
},
|
|
3022
2793
|
onCreate: () => {
|
|
3023
2794
|
ApiDelivery.getOrderInfo({
|
|
@@ -3029,9 +2800,7 @@ export class ShoppingOrderManager {
|
|
|
3029
2800
|
const outerIframe = document.querySelector(`iframe.outer${className}`);
|
|
3030
2801
|
const outerIframeWindow = outerIframe.contentWindow;
|
|
3031
2802
|
const outerIframeDocument = outerIframeWindow === null || outerIframeWindow === void 0 ? void 0 : outerIframeWindow.document;
|
|
3032
|
-
outerIframeDocument === null || outerIframeDocument === void 0 ? void 0 : outerIframeDocument.body.insertAdjacentHTML('beforeend', html `
|
|
3033
|
-
<iframe class="inner${className}"
|
|
3034
|
-
style="width: 100%; height: 100%; border-width: 0 !important;"></iframe>`);
|
|
2803
|
+
outerIframeDocument === null || outerIframeDocument === void 0 ? void 0 : outerIframeDocument.body.insertAdjacentHTML('beforeend', html ` <iframe class="inner${className}" style="width: 100%; height: 100%; border-width: 0 !important;"></iframe>`);
|
|
3035
2804
|
if (outerIframeDocument) {
|
|
3036
2805
|
const si = setInterval(() => {
|
|
3037
2806
|
const innerIframe = outerIframeDocument.querySelector(`iframe.inner${className}`);
|