ts-glitter 21.2.4 → 21.2.6
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 +19 -21
- package/lowcode/backend-manager/bg-blog.ts +20 -21
- package/lowcode/backend-manager/bg-product.js +94 -99
- package/lowcode/backend-manager/bg-product.ts +104 -109
- package/lowcode/cms-plugin/filter-options.js +1 -0
- package/lowcode/cms-plugin/filter-options.ts +1 -0
- package/lowcode/cms-plugin/pos-pages/payment-page.js +16 -6
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +15 -2
- package/lowcode/cms-plugin/pos-pages/pos-function.js +102 -55
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +111 -61
- package/lowcode/cms-plugin/pos-pages/pos-summary.js +4 -4
- package/lowcode/cms-plugin/pos-pages/pos-summary.ts +4 -1
- package/lowcode/cms-plugin/shopping-order-manager.js +10 -7
- package/lowcode/cms-plugin/shopping-order-manager.ts +10 -7
- package/lowcode/cms-plugin/shopping-product-setting.js +9 -6
- package/lowcode/cms-plugin/shopping-product-setting.ts +13 -6
- package/lowcode/cms-plugin/shopping-setting-basic.js +411 -405
- package/lowcode/cms-plugin/shopping-setting-basic.ts +497 -486
- package/lowcode/public-components/checkout/index.js +5 -3
- package/lowcode/public-components/checkout/index.ts +8 -3
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +6 -5
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +12 -13
- package/src/api-public/controllers/user.js +2 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +2 -1
- package/src/api-public/services/checkout-event.js +17 -7
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/fb-api.js +3 -2
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/fb-api.ts +3 -2
- package/src/api-public/services/financial-serviceV2.js +17 -7
- package/src/api-public/services/financial-serviceV2.js.map +1 -1
- package/src/api-public/services/mail.js +3 -3
- package/src/api-public/services/mail.js.map +1 -1
- package/src/api-public/services/mail.ts +144 -134
- package/src/api-public/services/monitor.d.ts +1 -0
- package/src/api-public/services/monitor.js +5 -2
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/monitor.ts +5 -2
- package/src/api-public/services/shopping.js +5 -4
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +15 -14
- package/src/api-public/services/user.js +17 -7
- package/src/api-public/services/user.js.map +1 -1
- package/src/index.js +17 -7
- package/src/index.js.map +1 -1
- package/src/seo-config.js +1 -1
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -1
- package/src/services/app.js +17 -7
- package/src/services/app.js.map +1 -1
- package/src/services/ses.js.map +1 -1
- package/src/services/ses.ts +41 -35
|
@@ -342,7 +342,6 @@ export class PosFunction {
|
|
|
342
342
|
`;
|
|
343
343
|
},
|
|
344
344
|
divCreate: {
|
|
345
|
-
class: '',
|
|
346
345
|
style: `width: 338px; max-height: 400px; overflow-y: auto; padding: 25px 20px; background: white; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15); border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px;`,
|
|
347
346
|
},
|
|
348
347
|
}));
|
|
@@ -477,86 +476,129 @@ export class PosFunction {
|
|
|
477
476
|
}
|
|
478
477
|
|
|
479
478
|
// SetMoney
|
|
480
|
-
public static setMoney(gvc: GVC, callback: (money: number) => void, title?: string) {
|
|
479
|
+
public static setMoney(gvc: GVC, def: number, callback: (money: number) => void, title?: string) {
|
|
481
480
|
gvc.glitter.innerDialog(gvc => {
|
|
482
481
|
const c_vm = {
|
|
483
|
-
text: '',
|
|
484
482
|
id: gvc.glitter.getUUID(),
|
|
483
|
+
addListener: false,
|
|
484
|
+
text: def ? `${def}` : '',
|
|
485
485
|
};
|
|
486
486
|
|
|
487
487
|
const numberButtons = [
|
|
488
|
-
[1, 2, 3],
|
|
489
|
-
[4, 5, 6],
|
|
490
488
|
[7, 8, 9],
|
|
491
|
-
[
|
|
489
|
+
[4, 5, 6],
|
|
490
|
+
[1, 2, 3],
|
|
491
|
+
['C', 0, '<i class="fa-regular fa-delete-left"></i>'],
|
|
492
492
|
];
|
|
493
493
|
|
|
494
494
|
const handleButtonClick = (value: any) => {
|
|
495
|
-
if (value === '確認') {
|
|
496
|
-
|
|
497
|
-
gvc.closeDialog();
|
|
495
|
+
if (value === '確認' || value === 'Enter') {
|
|
496
|
+
saveEvent();
|
|
498
497
|
} else if (value === '取消') {
|
|
499
|
-
|
|
500
|
-
} else if (typeof value === 'string' && value.includes('fa-regular')) {
|
|
498
|
+
closeEvent();
|
|
499
|
+
} else if (value === 'Backspace' || (typeof value === 'string' && value.includes('fa-regular'))) {
|
|
501
500
|
c_vm.text = c_vm.text.slice(0, -1);
|
|
502
501
|
gvc.notifyDataChange(c_vm.id);
|
|
502
|
+
} else if (value === 'c' || value === 'C') {
|
|
503
|
+
c_vm.text = '';
|
|
504
|
+
gvc.notifyDataChange(c_vm.id);
|
|
503
505
|
} else {
|
|
504
506
|
c_vm.text += value;
|
|
507
|
+
if (c_vm.text[0] === '0') {
|
|
508
|
+
c_vm.text = c_vm.text.slice(1, c_vm.text.length);
|
|
509
|
+
}
|
|
505
510
|
gvc.notifyDataChange(c_vm.id);
|
|
506
511
|
}
|
|
507
512
|
};
|
|
508
513
|
|
|
514
|
+
const numberBoardClickEvent = (e: any) => {
|
|
515
|
+
const key = e.key;
|
|
516
|
+
|
|
517
|
+
if (/^[0-9]$/.test(key) || key === 'Backspace' || key === 'Enter' || key.toLowerCase() === 'c') {
|
|
518
|
+
handleButtonClick(key);
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
const closeEvent = () => {
|
|
523
|
+
document.removeEventListener('keydown', numberBoardClickEvent);
|
|
524
|
+
gvc.closeDialog();
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
const saveEvent = () => {
|
|
528
|
+
callback(parseInt(c_vm.text, 10));
|
|
529
|
+
closeEvent();
|
|
530
|
+
};
|
|
531
|
+
|
|
509
532
|
return gvc.bindView(() => ({
|
|
510
533
|
bind: c_vm.id,
|
|
511
|
-
view: () =>
|
|
512
|
-
|
|
513
|
-
style="flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 20px; display: inline-flex"
|
|
514
|
-
>
|
|
515
|
-
<div style="align-self: stretch; display: inline-flex; justify-content: center;">
|
|
516
|
-
<div class="fw-bold" style="text-align: center; color: #585858; font-size: 28px;">
|
|
517
|
-
${title || '輸入收款金額'}
|
|
518
|
-
</div>
|
|
519
|
-
</div>
|
|
520
|
-
<div class="border w-100 p-3 rounded-3 d-flex align-items-center justify-content-end" style="gap: 20px;">
|
|
521
|
-
<span style="font-size: 28px;">${c_vm.text || 0}</span>
|
|
522
|
-
</div>
|
|
534
|
+
view: () => {
|
|
535
|
+
return html`
|
|
523
536
|
<div
|
|
524
|
-
style="
|
|
537
|
+
style="flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: 20px; display: inline-flex"
|
|
525
538
|
>
|
|
539
|
+
<div style="align-self: stretch; display: inline-flex; justify-content: center;">
|
|
540
|
+
<div class="fw-bold" style="text-align: center; color: #585858; font-size: 28px;">
|
|
541
|
+
${title || '輸入收款金額'}
|
|
542
|
+
</div>
|
|
543
|
+
</div>
|
|
544
|
+
<div class="border w-100 p-3 rounded-3 d-flex align-items-center justify-content-end" style="gap: 20px;">
|
|
545
|
+
<span style="font-size: 28px;">${c_vm.text || 0}</span>
|
|
546
|
+
</div>
|
|
526
547
|
<div
|
|
527
|
-
style="
|
|
548
|
+
style="background: white; flex-direction: column; justify-content: flex-start; align-items: center; gap: 32px; display: flex"
|
|
528
549
|
>
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
>
|
|
550
|
+
<div
|
|
551
|
+
style="align-self: stretch; border-radius: 10px; border: 1px solid #DDD; display: flex; flex-direction: column;"
|
|
552
|
+
>
|
|
553
|
+
${numberButtons
|
|
554
|
+
.map(
|
|
555
|
+
row => html`
|
|
556
|
+
<div style="display: inline-flex; justify-content: flex-start; align-items: center;">
|
|
557
|
+
${row
|
|
558
|
+
.map(
|
|
559
|
+
value => html`
|
|
540
560
|
<div
|
|
541
|
-
style="
|
|
561
|
+
style="height: 56px; width: 95px; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px;"
|
|
562
|
+
onclick="${gvc.event(() => handleButtonClick(value))}"
|
|
542
563
|
>
|
|
543
|
-
|
|
564
|
+
<div
|
|
565
|
+
style="align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px;"
|
|
566
|
+
>
|
|
567
|
+
${value}
|
|
568
|
+
</div>
|
|
544
569
|
</div>
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
570
|
+
`
|
|
571
|
+
)
|
|
572
|
+
.join('<div style="border-right: 1px #DDDDDD solid; height: 56px;"></div>')}
|
|
573
|
+
</div>
|
|
574
|
+
`
|
|
575
|
+
)
|
|
576
|
+
.join('<div style="border-top: 1px #DDDDDD solid; height: 1px; width: 100%;"></div>')}
|
|
577
|
+
</div>
|
|
553
578
|
</div>
|
|
579
|
+
<div>${BgWidget.save(gvc.event(saveEvent), '確認')}</div>
|
|
554
580
|
</div>
|
|
555
|
-
|
|
556
|
-
|
|
581
|
+
`;
|
|
582
|
+
},
|
|
557
583
|
divCreate: {
|
|
558
|
-
|
|
559
|
-
|
|
584
|
+
style: `
|
|
585
|
+
width: 338px;
|
|
586
|
+
padding: 25px 20px;
|
|
587
|
+
background: white;
|
|
588
|
+
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
|
|
589
|
+
border-radius: 20px;
|
|
590
|
+
overflow: hidden;
|
|
591
|
+
display: flex;
|
|
592
|
+
flex-direction: column;
|
|
593
|
+
align-items: center;
|
|
594
|
+
gap: 10px;
|
|
595
|
+
`,
|
|
596
|
+
},
|
|
597
|
+
onCreate: () => {
|
|
598
|
+
if (!c_vm.addListener) {
|
|
599
|
+
c_vm.addListener = true;
|
|
600
|
+
document.addEventListener('keydown', numberBoardClickEvent);
|
|
601
|
+
}
|
|
560
602
|
},
|
|
561
603
|
}));
|
|
562
604
|
}, 'setMoney');
|
|
@@ -615,11 +657,12 @@ export class PosFunction {
|
|
|
615
657
|
};
|
|
616
658
|
|
|
617
659
|
const handlePaymentAmountClick = (method: any, id: string, gvc: GVC, dialog: ShareDialog) => {
|
|
660
|
+
console.log(method);
|
|
618
661
|
if (method.paied) {
|
|
619
662
|
dialog.errorMessage({ text: '此付款金額已結清,無法進行調整' });
|
|
620
663
|
return;
|
|
621
664
|
}
|
|
622
|
-
PosFunction.setMoney(gvc, money => {
|
|
665
|
+
PosFunction.setMoney(gvc, method.total, money => {
|
|
623
666
|
method.total = money || 0;
|
|
624
667
|
gvc.notifyDataChange(id);
|
|
625
668
|
});
|
|
@@ -735,16 +778,23 @@ export class PosFunction {
|
|
|
735
778
|
|
|
736
779
|
return btnArray
|
|
737
780
|
.map(btn => {
|
|
738
|
-
return `
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
781
|
+
return html`
|
|
782
|
+
<div
|
|
783
|
+
style="flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 15px; border-radius: 10px; background: #F6F6F6; ${method.method ===
|
|
784
|
+
btn.value
|
|
785
|
+
? 'color: #393939; border: 3px solid #393939; box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.20);'
|
|
786
|
+
: 'color: #8D8D8D;'}"
|
|
787
|
+
onclick="${gvc.event(() => {
|
|
788
|
+
method = { method: btn.value, total: 0 };
|
|
789
|
+
gvc.notifyDataChange(id);
|
|
790
|
+
})}"
|
|
791
|
+
>
|
|
792
|
+
<div style="width: 28px; height: 28px;">
|
|
793
|
+
${drawIcon(method.method === btn.value, btn.value)}
|
|
794
|
+
</div>
|
|
795
|
+
<div style="font-size: 16px; font-weight: 500;">${btn.title}</div>
|
|
796
|
+
</div>
|
|
797
|
+
`;
|
|
748
798
|
})
|
|
749
799
|
.join('');
|
|
750
800
|
})()}
|
|
@@ -94,7 +94,7 @@ export class PosSummary {
|
|
|
94
94
|
style="width:100px;"
|
|
95
95
|
placeholder="0"
|
|
96
96
|
onclick="${gvc.event((e, event) => {
|
|
97
|
-
PosFunction.setMoney(gvc, response => {
|
|
97
|
+
PosFunction.setMoney(gvc, dd.real, response => {
|
|
98
98
|
dd.real = response || 0;
|
|
99
99
|
e.value = response || 0;
|
|
100
100
|
}, '設定清點金額');
|
|
@@ -128,7 +128,7 @@ export class PosSummary {
|
|
|
128
128
|
<input
|
|
129
129
|
class="form-control mt-2"
|
|
130
130
|
onclick="${gvc.event((e, event) => {
|
|
131
|
-
PosFunction.setMoney(gvc, response => {
|
|
131
|
+
PosFunction.setMoney(gvc, money, response => {
|
|
132
132
|
e.value = `${response}`;
|
|
133
133
|
money = response || 0;
|
|
134
134
|
}, '設定備用金額');
|
|
@@ -463,8 +463,8 @@ export class PosSummary {
|
|
|
463
463
|
text: html `${PosWidget.fontBold('要從錢箱匯出的金額')}
|
|
464
464
|
<input
|
|
465
465
|
class="form-control mt-2"
|
|
466
|
-
onclick="${gvc.event(
|
|
467
|
-
PosFunction.setMoney(gvc, response => {
|
|
466
|
+
onclick="${gvc.event(e => {
|
|
467
|
+
PosFunction.setMoney(gvc, money, response => {
|
|
468
468
|
if (response > min_) {
|
|
469
469
|
dialog.errorMessage({ text: '錢箱金額不足' });
|
|
470
470
|
}
|
|
@@ -91,6 +91,7 @@ export class PosSummary {
|
|
|
91
91
|
onclick="${gvc.event((e, event) => {
|
|
92
92
|
PosFunction.setMoney(
|
|
93
93
|
gvc,
|
|
94
|
+
dd.real,
|
|
94
95
|
response => {
|
|
95
96
|
dd.real = response || 0;
|
|
96
97
|
e.value = response || 0;
|
|
@@ -133,6 +134,7 @@ export class PosSummary {
|
|
|
133
134
|
onclick="${gvc.event((e, event) => {
|
|
134
135
|
PosFunction.setMoney(
|
|
135
136
|
gvc,
|
|
137
|
+
money,
|
|
136
138
|
response => {
|
|
137
139
|
e.value = `${response}`;
|
|
138
140
|
money = response || 0;
|
|
@@ -483,9 +485,10 @@ export class PosSummary {
|
|
|
483
485
|
text: html`${PosWidget.fontBold('要從錢箱匯出的金額')}
|
|
484
486
|
<input
|
|
485
487
|
class="form-control mt-2"
|
|
486
|
-
onclick="${gvc.event(
|
|
488
|
+
onclick="${gvc.event(e => {
|
|
487
489
|
PosFunction.setMoney(
|
|
488
490
|
gvc,
|
|
491
|
+
money,
|
|
489
492
|
response => {
|
|
490
493
|
if (response > min_) {
|
|
491
494
|
dialog.errorMessage({ text: '錢箱金額不足' });
|
|
@@ -1547,12 +1547,15 @@ export class ShoppingOrderManager {
|
|
|
1547
1547
|
return {
|
|
1548
1548
|
bind: gvc.glitter.getUUID(),
|
|
1549
1549
|
view: () => __awaiter(this, void 0, void 0, function* () {
|
|
1550
|
-
const
|
|
1551
|
-
'
|
|
1552
|
-
'
|
|
1553
|
-
'
|
|
1554
|
-
'
|
|
1555
|
-
'
|
|
1550
|
+
const noNeedAddress = [
|
|
1551
|
+
'now',
|
|
1552
|
+
'shop',
|
|
1553
|
+
'UNIMARTC2C',
|
|
1554
|
+
'FAMIC2C',
|
|
1555
|
+
'HILIFEC2C',
|
|
1556
|
+
'OKMARTC2C',
|
|
1557
|
+
'UNIMARTFREEZE',
|
|
1558
|
+
'FAMIC2CFREEZE',
|
|
1556
1559
|
].includes(orderData.orderData.user_info.shipment);
|
|
1557
1560
|
const viewModel = [
|
|
1558
1561
|
['姓名', 'name'],
|
|
@@ -1562,7 +1565,7 @@ export class ShoppingOrderManager {
|
|
|
1562
1565
|
['鄉鎮', 'area'],
|
|
1563
1566
|
['地址', 'address'],
|
|
1564
1567
|
].filter(item => {
|
|
1565
|
-
return
|
|
1568
|
+
return !noNeedAddress || !['city', 'area', 'address'].includes(item[1]);
|
|
1566
1569
|
});
|
|
1567
1570
|
const receipt = (yield ApiUser.getPublicConfig('custom_form_checkout_recipient', 'manager')).response.value;
|
|
1568
1571
|
receipt.list.map((d1) => {
|
|
@@ -1745,12 +1745,15 @@ export class ShoppingOrderManager {
|
|
|
1745
1745
|
return {
|
|
1746
1746
|
bind: gvc.glitter.getUUID(),
|
|
1747
1747
|
view: async () => {
|
|
1748
|
-
const
|
|
1749
|
-
'
|
|
1750
|
-
'
|
|
1751
|
-
'
|
|
1752
|
-
'
|
|
1753
|
-
'
|
|
1748
|
+
const noNeedAddress = [
|
|
1749
|
+
'now',
|
|
1750
|
+
'shop',
|
|
1751
|
+
'UNIMARTC2C',
|
|
1752
|
+
'FAMIC2C',
|
|
1753
|
+
'HILIFEC2C',
|
|
1754
|
+
'OKMARTC2C',
|
|
1755
|
+
'UNIMARTFREEZE',
|
|
1756
|
+
'FAMIC2CFREEZE',
|
|
1754
1757
|
].includes(orderData.orderData.user_info.shipment);
|
|
1755
1758
|
|
|
1756
1759
|
const viewModel = [
|
|
@@ -1761,7 +1764,7 @@ export class ShoppingOrderManager {
|
|
|
1761
1764
|
['鄉鎮', 'area'],
|
|
1762
1765
|
['地址', 'address'],
|
|
1763
1766
|
].filter(item => {
|
|
1764
|
-
return
|
|
1767
|
+
return !noNeedAddress || !['city', 'area', 'address'].includes(item[1]);
|
|
1765
1768
|
});
|
|
1766
1769
|
|
|
1767
1770
|
const receipt = (
|
|
@@ -747,6 +747,9 @@ export class ShoppingProductSetting {
|
|
|
747
747
|
const vm = {
|
|
748
748
|
id: gvc.glitter.getUUID(),
|
|
749
749
|
};
|
|
750
|
+
if (obj.vm.type === 'add') {
|
|
751
|
+
variant.shipment_type = 'none';
|
|
752
|
+
}
|
|
750
753
|
return {
|
|
751
754
|
bind: vm.id,
|
|
752
755
|
view: () => {
|
|
@@ -918,7 +921,7 @@ export class ShoppingProductSetting {
|
|
|
918
921
|
/>
|
|
919
922
|
`;
|
|
920
923
|
})
|
|
921
|
-
.join(
|
|
924
|
+
.join('')}
|
|
922
925
|
</div>
|
|
923
926
|
</div>`;
|
|
924
927
|
}
|
|
@@ -930,7 +933,7 @@ export class ShoppingProductSetting {
|
|
|
930
933
|
<div class="flex-fill d-flex flex-column" style="gap: 8px">
|
|
931
934
|
<div>庫存數量</div>
|
|
932
935
|
<div
|
|
933
|
-
class="w-100 ${postMD.shopee_id ?
|
|
936
|
+
class="w-100 ${postMD.shopee_id ? '' : `d-none`}"
|
|
934
937
|
style="font-size: 14px;font-weight: 400;color: #8D8D8D;"
|
|
935
938
|
>
|
|
936
939
|
此商品來源為蝦皮電商平台,將自動同步蝦皮庫存
|
|
@@ -1086,7 +1089,7 @@ export class ShoppingProductSetting {
|
|
|
1086
1089
|
})()}
|
|
1087
1090
|
${document.body.clientWidth > 768 && obj.single === undefined ? BgWidget.mbContainer(120) : ''}
|
|
1088
1091
|
</div>
|
|
1089
|
-
<div class="${obj.single ? `d-none` :
|
|
1092
|
+
<div class="${obj.single ? `d-none` : ''}" style="min-width:300px; max-width:100%;">
|
|
1090
1093
|
${BgWidget.summaryCard(gvc.bindView({
|
|
1091
1094
|
bind: 'right',
|
|
1092
1095
|
view: () => {
|
|
@@ -1132,7 +1135,7 @@ export class ShoppingProductSetting {
|
|
|
1132
1135
|
`;
|
|
1133
1136
|
}
|
|
1134
1137
|
else {
|
|
1135
|
-
return
|
|
1138
|
+
return '';
|
|
1136
1139
|
}
|
|
1137
1140
|
})
|
|
1138
1141
|
.join('');
|
|
@@ -1148,7 +1151,7 @@ export class ShoppingProductSetting {
|
|
|
1148
1151
|
`, {
|
|
1149
1152
|
style: obj.vm.type === 'editSpec' ? '' : 'margin-top: 0 !important;',
|
|
1150
1153
|
})}
|
|
1151
|
-
<div class="update-bar-container ${obj.single ? `d-none` :
|
|
1154
|
+
<div class="update-bar-container ${obj.single ? `d-none` : ''}">
|
|
1152
1155
|
${BgWidget.cancel(obj.gvc.event(() => {
|
|
1153
1156
|
checkStore(obj && obj.goBackEvent
|
|
1154
1157
|
? obj.goBackEvent.cancel
|
|
@@ -1271,7 +1274,7 @@ export class ShoppingProductSetting {
|
|
|
1271
1274
|
view: () => {
|
|
1272
1275
|
var _b, _c, _d, _e, _f;
|
|
1273
1276
|
const languageData = postMD.language_data[vm.language] || {};
|
|
1274
|
-
languageData.title = ((_b = languageData.title) === null || _b === void 0 ? void 0 : _b.trim()) ? languageData.title : (postMD === null || postMD === void 0 ? void 0 : postMD.title) || '
|
|
1277
|
+
languageData.title = ((_b = languageData.title) === null || _b === void 0 ? void 0 : _b.trim()) ? languageData.title : (postMD === null || postMD === void 0 ? void 0 : postMD.title) || '';
|
|
1275
1278
|
languageData.content = (_c = languageData.content) !== null && _c !== void 0 ? _c : postMD.content;
|
|
1276
1279
|
languageData.content_array = (_d = languageData.content_array) !== null && _d !== void 0 ? _d : postMD.content_array;
|
|
1277
1280
|
languageData.content_json = (_e = languageData.content_json) !== null && _e !== void 0 ? _e : postMD.content_json;
|
|
@@ -303,6 +303,7 @@ export class ShoppingProductSetting {
|
|
|
303
303
|
return undefined;
|
|
304
304
|
})(),
|
|
305
305
|
};
|
|
306
|
+
|
|
306
307
|
ApiShop.getProduct(vm.apiJSON).then(data => {
|
|
307
308
|
function getDatalist() {
|
|
308
309
|
return data.response.data.map((dd: any) => {
|
|
@@ -858,12 +859,18 @@ export class ShoppingProductSetting {
|
|
|
858
859
|
const vm = {
|
|
859
860
|
id: gvc.glitter.getUUID(),
|
|
860
861
|
};
|
|
862
|
+
|
|
863
|
+
if (obj.vm.type === 'add') {
|
|
864
|
+
variant.shipment_type = 'none';
|
|
865
|
+
}
|
|
866
|
+
|
|
861
867
|
return {
|
|
862
868
|
bind: vm.id,
|
|
863
869
|
view: () => {
|
|
864
870
|
if (postMD.product_category === 'weighing') {
|
|
865
871
|
variant.shipment_type = 'none';
|
|
866
872
|
}
|
|
873
|
+
|
|
867
874
|
return html` <div style="font-weight: 700;margin-bottom: 6px;">運費計算</div>
|
|
868
875
|
${BgWidget.multiCheckboxContainer(
|
|
869
876
|
gvc,
|
|
@@ -1044,7 +1051,7 @@ export class ShoppingProductSetting {
|
|
|
1044
1051
|
/>
|
|
1045
1052
|
`;
|
|
1046
1053
|
})
|
|
1047
|
-
.join(
|
|
1054
|
+
.join('')}
|
|
1048
1055
|
</div>
|
|
1049
1056
|
</div>`;
|
|
1050
1057
|
}
|
|
@@ -1057,7 +1064,7 @@ export class ShoppingProductSetting {
|
|
|
1057
1064
|
<div class="flex-fill d-flex flex-column" style="gap: 8px">
|
|
1058
1065
|
<div>庫存數量</div>
|
|
1059
1066
|
<div
|
|
1060
|
-
class="w-100 ${(postMD as any).shopee_id ?
|
|
1067
|
+
class="w-100 ${(postMD as any).shopee_id ? '' : `d-none`}"
|
|
1061
1068
|
style="font-size: 14px;font-weight: 400;color: #8D8D8D;"
|
|
1062
1069
|
>
|
|
1063
1070
|
此商品來源為蝦皮電商平台,將自動同步蝦皮庫存
|
|
@@ -1261,7 +1268,7 @@ export class ShoppingProductSetting {
|
|
|
1261
1268
|
})()}
|
|
1262
1269
|
${document.body.clientWidth > 768 && obj.single === undefined ? BgWidget.mbContainer(120) : ''}
|
|
1263
1270
|
</div>
|
|
1264
|
-
<div class="${obj.single ? `d-none` :
|
|
1271
|
+
<div class="${obj.single ? `d-none` : ''}" style="min-width:300px; max-width:100%;">
|
|
1265
1272
|
${BgWidget.summaryCard(
|
|
1266
1273
|
gvc.bindView({
|
|
1267
1274
|
bind: 'right',
|
|
@@ -1310,7 +1317,7 @@ export class ShoppingProductSetting {
|
|
|
1310
1317
|
</div>
|
|
1311
1318
|
`;
|
|
1312
1319
|
} else {
|
|
1313
|
-
return
|
|
1320
|
+
return '';
|
|
1314
1321
|
}
|
|
1315
1322
|
})
|
|
1316
1323
|
.join('');
|
|
@@ -1330,7 +1337,7 @@ export class ShoppingProductSetting {
|
|
|
1330
1337
|
style: obj.vm.type === 'editSpec' ? '' : 'margin-top: 0 !important;',
|
|
1331
1338
|
}
|
|
1332
1339
|
)}
|
|
1333
|
-
<div class="update-bar-container ${obj.single ? `d-none` :
|
|
1340
|
+
<div class="update-bar-container ${obj.single ? `d-none` : ''}">
|
|
1334
1341
|
${BgWidget.cancel(
|
|
1335
1342
|
obj.gvc.event(() => {
|
|
1336
1343
|
checkStore(
|
|
@@ -1522,7 +1529,7 @@ export class ShoppingProductSetting {
|
|
|
1522
1529
|
const languageData = (postMD.language_data as any)[vm.language] || {};
|
|
1523
1530
|
|
|
1524
1531
|
// 如果沒有塞入預設值,則使用預設值
|
|
1525
|
-
languageData.title = languageData.title?.trim() ? languageData.title : postMD?.title || '
|
|
1532
|
+
languageData.title = languageData.title?.trim() ? languageData.title : postMD?.title || '';
|
|
1526
1533
|
languageData.content = languageData.content ?? postMD.content;
|
|
1527
1534
|
languageData.content_array = languageData.content_array ?? postMD.content_array;
|
|
1528
1535
|
languageData.content_json = languageData.content_json ?? postMD.content_json;
|