ts-glitter 16.6.1 → 16.6.2
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/cms-plugin/POS-setting.js +167 -94
- package/lowcode/cms-plugin/POS-setting.ts +238 -165
- package/lowcode/cms-plugin/pos-pages/models.ts +6 -1
- package/lowcode/cms-plugin/pos-pages/payment-page.js +196 -88
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +286 -172
- package/lowcode/cms-plugin/pos-pages/pos-function.js +424 -92
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +469 -122
- package/lowcode/cms-plugin/pos-pages/temp-order.js +66 -0
- package/lowcode/cms-plugin/pos-pages/temp-order.ts +78 -0
- package/lowcode/cms-plugin/pos-widget.js +32 -0
- package/lowcode/cms-plugin/pos-widget.ts +40 -5
- package/lowcode/cms-plugin/shopping-order-manager.js +85 -68
- package/lowcode/cms-plugin/shopping-order-manager.ts +28 -11
- package/lowcode/public-components/headers/sy-02.js +1 -1
- package/lowcode/public-components/headers/sy-02.ts +1 -1
- package/lowcode/public-components/headers/sy-03.js +1 -1
- package/lowcode/public-components/headers/sy-03.ts +1 -1
- package/lowcode/public-components/headers/sy-04.js +1 -1
- package/lowcode/public-components/headers/sy-04.ts +1 -1
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +1 -0
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +1 -0
- package/src/api-public/services/shopping.d.ts +1 -0
- package/src/api-public/services/shopping.js +1 -1
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +2 -1
package/lowcode/Entry.js
CHANGED
|
@@ -79,7 +79,7 @@ export class Entry {
|
|
|
79
79
|
}
|
|
80
80
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
81
81
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
82
|
-
glitter.share.editerVersion = 'V_16.6.
|
|
82
|
+
glitter.share.editerVersion = 'V_16.6.2';
|
|
83
83
|
glitter.share.start = new Date();
|
|
84
84
|
const vm = {
|
|
85
85
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -78,7 +78,7 @@ export class Entry {
|
|
|
78
78
|
}
|
|
79
79
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
80
80
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
81
|
-
glitter.share.editerVersion = 'V_16.6.
|
|
81
|
+
glitter.share.editerVersion = 'V_16.6.2';
|
|
82
82
|
glitter.share.start = new Date();
|
|
83
83
|
const vm: {
|
|
84
84
|
appConfig: any;
|
|
@@ -23,6 +23,7 @@ import { Swal } from "../modules/sweetAlert.js";
|
|
|
23
23
|
import { ConnectionMode } from "./pos-pages/connection-mode.js";
|
|
24
24
|
import { PosFunction } from "./pos-pages/pos-function.js";
|
|
25
25
|
import { UserList } from "./user-list.js";
|
|
26
|
+
import { TempOrder } from "./pos-pages/temp-order.js";
|
|
26
27
|
function getConfig() {
|
|
27
28
|
const saasConfig = window.parent.saasConfig;
|
|
28
29
|
return saasConfig;
|
|
@@ -455,22 +456,27 @@ height: 51px;
|
|
|
455
456
|
select: true,
|
|
456
457
|
},
|
|
457
458
|
],
|
|
458
|
-
paySelect:
|
|
459
|
+
paySelect: [],
|
|
459
460
|
};
|
|
460
461
|
const html = String.raw;
|
|
462
|
+
glitter.share.reloadPosPage = () => {
|
|
463
|
+
gvc.notifyDataChange(vm.id);
|
|
464
|
+
};
|
|
461
465
|
let orderDetail = JSON.parse(JSON.stringify(new OrderDetail(0, 0)));
|
|
462
466
|
glitter.share.clearOrderData = () => {
|
|
463
467
|
orderDetail = JSON.parse(JSON.stringify(new OrderDetail(0, 0)));
|
|
464
468
|
orderDetail.user_info.shipment = 'now';
|
|
465
469
|
};
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
orderDetail.
|
|
470
|
+
function loadOrderData() {
|
|
471
|
+
if (localStorage.getItem('pos_order_detail')) {
|
|
472
|
+
orderDetail = JSON.parse(localStorage.getItem('pos_order_detail'));
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
orderDetail.user_info.shipment = 'now';
|
|
476
|
+
}
|
|
477
|
+
if (!orderDetail.lineItems || orderDetail.lineItems.length === 0) {
|
|
478
|
+
orderDetail.user_info.shipment = 'now';
|
|
479
|
+
}
|
|
474
480
|
}
|
|
475
481
|
gvc.addStyle(`
|
|
476
482
|
.product-show{
|
|
@@ -499,48 +505,18 @@ height: 51px;
|
|
|
499
505
|
<div class="spinner-border"></div>
|
|
500
506
|
</div>`;
|
|
501
507
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
class="d-flex nav-top"
|
|
505
|
-
style="z-index:20;padding-top:${glitter.share.top_inset}px;width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
506
|
-
>
|
|
507
|
-
<div
|
|
508
|
-
class="POS-logo d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
509
|
-
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 32px;padding-left: 24px;`}height: ${(() => {
|
|
510
|
-
if (document.body.offsetWidth > 800) {
|
|
511
|
-
return `86px`;
|
|
512
|
-
}
|
|
513
|
-
else {
|
|
514
|
-
return `66px`;
|
|
515
|
-
}
|
|
516
|
-
})()};"
|
|
517
|
-
>
|
|
518
|
-
${document.body.offsetWidth < 800 && vm.type === 'menu'
|
|
519
|
-
? ` `
|
|
520
|
-
: `<div class=" d-flex align-items-center h-100 border-end pe-4" style="gap:10px;"><svg width="157" height="28" viewBox="0 0 157 28" fill="none"
|
|
521
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
522
|
-
<path d="M1.812 17.972C2.28067 18.342 3.08233 18.8477 4.217 19.489C5.37633 20.1303 6.474 20.451 7.51 20.451C8.57067 20.451 9.101 20.044 9.101 19.23C9.101 18.86 8.953 18.5393 8.657 18.268C8.361 17.972 7.81833 17.639 7.029 17.269C6.23967 16.899 5.64767 16.6153 5.253 16.418C4.85833 16.196 4.328 15.8507 3.662 15.382C3.02067 14.8887 2.52733 14.383 2.182 13.865C1.19533 12.459 0.702 10.6707 0.702 8.5C0.702 6.32933 1.50367 4.504 3.107 3.024C4.735 1.51933 6.85633 0.766998 9.471 0.766998C11.247 0.766998 12.8873 0.964332 14.392 1.359C15.8967 1.729 16.6737 2.22233 16.723 2.839C16.723 2.913 16.723 2.987 16.723 3.061C16.723 3.92433 16.4517 5.022 15.909 6.354C15.3663 7.66133 14.984 8.389 14.762 8.537C13.1833 7.723 11.765 7.316 10.507 7.316C9.27367 7.316 8.657 7.76 8.657 8.648C8.657 9.19067 9.11333 9.67167 10.026 10.091C10.2233 10.1897 10.507 10.3253 10.877 10.498C11.247 10.6707 11.6663 10.8803 12.135 11.127C12.6283 11.349 13.1463 11.645 13.689 12.015C14.2563 12.3603 14.8607 12.829 15.502 13.421C16.8093 14.6543 17.463 16.2823 17.463 18.305C17.463 20.9443 16.7353 23.1027 15.28 24.78C13.8247 26.4573 11.58 27.3207 8.546 27.37C7.066 27.37 5.72167 27.2467 4.513 27C3.329 26.7533 2.293 26.2723 1.405 25.557C0.517 24.8417 0.073 23.9783 0.073 22.967C0.073 21.9557 0.258 20.9567 0.628 19.97C0.998 18.9587 1.39267 18.2927 1.812 17.972ZM40.6343 26.371C40.6343 26.7903 39.3886 27 36.8973 27C34.4059 27 33.1603 26.7903 33.1603 26.371V17.861H27.9803V26.371C27.9803 26.7903 26.7346 27 24.2433 27C21.7519 27 20.5063 26.7903 20.5063 26.371V1.84C20.5063 1.322 21.7519 1.063 24.2433 1.063C26.7346 1.063 27.9803 1.322 27.9803 1.84V10.535H33.1603V1.914C33.1603 1.56867 33.7769 1.322 35.0103 1.174C35.6516 1.12467 36.2806 1.1 36.8973 1.1L38.7843 1.174C40.0176 1.322 40.6343 1.56867 40.6343 1.914V26.371ZM55.3068 27.37C51.8534 27.37 49.0291 26.2353 46.8338 23.966C44.6631 21.6967 43.5778 18.3913 43.5778 14.05C43.5778 9.684 44.6754 6.37867 46.8708 4.134C49.0908 1.88933 51.9398 0.766998 55.4178 0.766998C58.9204 0.766998 61.7448 1.877 63.8908 4.097C66.0368 6.29233 67.1098 9.63467 67.1098 14.124C67.1098 18.5887 66.0121 21.9187 63.8168 24.114C61.6214 26.2847 58.7848 27.37 55.3068 27.37ZM55.3438 7.871C54.1598 7.871 53.1608 8.41367 52.3468 9.499C51.5574 10.5843 51.1628 12.1137 51.1628 14.087C51.1628 16.0357 51.5451 17.5403 52.3098 18.601C53.0744 19.637 54.0734 20.155 55.3068 20.155C56.5648 20.155 57.5761 19.6247 58.3408 18.564C59.1301 17.5033 59.5248 15.9863 59.5248 14.013C59.5248 12.0397 59.1178 10.5227 58.3038 9.462C57.5144 8.40133 56.5278 7.871 55.3438 7.871ZM73.2995 27.074C71.0548 27.074 69.9325 26.8273 69.9325 26.334V2.358C69.9325 1.51933 70.3148 1.1 71.0795 1.1H77.5915C81.2421 1.1 83.8691 1.85233 85.4725 3.357C87.1005 4.86167 87.9145 7.04467 87.9145 9.906C87.9145 12.274 87.1498 14.4447 85.6205 16.418C84.8558 17.4047 83.7335 18.194 82.2535 18.786C80.7735 19.378 79.0468 19.674 77.0735 19.674V26.297C77.0735 26.593 76.6048 26.8027 75.6675 26.926C74.7548 27.0247 73.9655 27.074 73.2995 27.074ZM77.0735 7.538V13.384H77.5545C78.4178 13.384 79.1455 13.1127 79.7375 12.57C80.3295 12.0273 80.6255 11.2627 80.6255 10.276C80.6255 9.28933 80.4158 8.58633 79.9965 8.167C79.6018 7.74767 78.8865 7.538 77.8505 7.538H77.0735ZM111.458 26.186C111.458 26.704 110.299 26.963 107.98 26.963C105.661 26.963 104.403 26.778 104.206 26.408L98.027 14.864V26.371C98.027 26.815 96.88 27.037 94.586 27.037C92.3167 27.037 91.182 26.815 91.182 26.371V1.618C91.182 1.248 92.1564 1.063 94.105 1.063C94.8697 1.063 95.7577 1.137 96.769 1.285C97.805 1.40833 98.434 1.655 98.656 2.025L104.576 13.421V1.803C104.576 1.33433 105.723 1.1 108.017 1.1C110.311 1.1 111.458 1.33433 111.458 1.803V26.186ZM127.199 11.386C127.668 11.386 127.902 12.2493 127.902 13.976C127.902 14.494 127.841 15.1107 127.717 15.826C127.619 16.5167 127.421 16.862 127.125 16.862H122.426V20.562H129.234C129.654 20.562 129.937 21.1047 130.085 22.19C130.159 22.6587 130.196 23.1643 130.196 23.707C130.196 24.225 130.122 24.9033 129.974 25.742C129.826 26.5807 129.58 27 129.234 27H116.58C115.643 27 115.174 26.6177 115.174 25.853V2.062C115.174 1.42067 115.458 1.1 116.025 1.1H129.271C129.789 1.1 130.048 2.19767 130.048 4.393C130.048 6.56367 129.789 7.649 129.271 7.649H122.426V11.386H127.199ZM147.148 2.099C147.444 1.359 148.986 0.989 151.773 0.989C152.489 0.989 153.364 1.05067 154.4 1.174C155.461 1.27267 155.991 1.37133 155.991 1.47L149.701 14.272L156.213 26.519C156.287 26.6423 155.757 26.7657 154.622 26.889C153.488 26.9877 152.526 27.037 151.736 27.037C148.604 27.037 146.889 26.6177 146.593 25.779L143.818 18.712L141.302 26.001C141.056 26.6917 139.477 27.037 136.566 27.037C135.851 27.037 134.963 26.9877 133.902 26.889C132.842 26.7903 132.361 26.6547 132.459 26.482L138.231 13.68L132.237 1.47C132.163 1.34666 132.669 1.23566 133.754 1.137C134.864 1.01366 135.802 0.951998 136.566 0.951998C139.674 0.951998 141.376 1.396 141.672 2.284L144.225 8.5L147.148 2.099Z"
|
|
523
|
-
fill="url(#paint0_linear_3001_1051)"></path>
|
|
524
|
-
<defs>
|
|
525
|
-
<linearGradient id="paint0_linear_3001_1051" x1="-6" y1="-22.75" x2="13.6088"
|
|
526
|
-
y2="74.6316" gradientUnits="userSpaceOnUse">
|
|
527
|
-
<stop stop-color="#FFB400"></stop>
|
|
528
|
-
<stop offset="1" stop-color="#FF6C02"></stop>
|
|
529
|
-
</linearGradient>
|
|
530
|
-
</defs>
|
|
531
|
-
</svg>
|
|
532
|
-
<div style="text-align: center; color: #8D8D8D; font-size: 38px; font-family: Lilita One; font-weight: 400; word-wrap: break-word">POS</div>
|
|
533
|
-
</div>`}
|
|
534
|
-
${gvc.bindView(() => {
|
|
508
|
+
loadOrderData();
|
|
509
|
+
const cartBtn = gvc.bindView(() => {
|
|
535
510
|
return {
|
|
536
511
|
bind: 'cartBtn',
|
|
537
512
|
view: () => {
|
|
538
513
|
if (!orderDetail.lineItems || orderDetail.lineItems.length === 0) {
|
|
539
|
-
return `<i class="fa-
|
|
514
|
+
return `<i class="fa-regular fa-cart-shopping" style="
|
|
540
515
|
cursor: pointer;
|
|
516
|
+
color: #393939;
|
|
541
517
|
font-size: 20px;"></i>`;
|
|
542
518
|
}
|
|
543
|
-
return `<span style="position: relative;"><i class="fa-
|
|
519
|
+
return `<span style="position: relative;"><i class="fa-regular fa-cart-shopping" style="color: #393939;
|
|
544
520
|
cursor: pointer;
|
|
545
521
|
font-size: 20px;"></i><span style="position: absolute;top:-32px;right: -12px;"><span style="display: inline-block;
|
|
546
522
|
background-color:#fe5541;
|
|
@@ -554,7 +530,8 @@ cursor: pointer;
|
|
|
554
530
|
color: #fff;
|
|
555
531
|
position: absolute;
|
|
556
532
|
top: 25px;
|
|
557
|
-
right: 0px;">${orderDetail.lineItems.length}</span></span
|
|
533
|
+
right: 0px;">${orderDetail.lineItems.length}</span></span>
|
|
534
|
+
</span>`;
|
|
558
535
|
},
|
|
559
536
|
divCreate: {
|
|
560
537
|
class: `nav-link js-cart-count d-sm-none ${vm.type !== 'menu' ? `d-none` : ``}`,
|
|
@@ -569,8 +546,41 @@ cursor: pointer;
|
|
|
569
546
|
],
|
|
570
547
|
},
|
|
571
548
|
};
|
|
572
|
-
})
|
|
573
|
-
|
|
549
|
+
});
|
|
550
|
+
return html `
|
|
551
|
+
<div
|
|
552
|
+
class="d-flex nav-top"
|
|
553
|
+
style="z-index:20;padding-top:${glitter.share.top_inset}px;width: 100%;background: #FFF;box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.10);position: fixed;left: 0;top: 0;"
|
|
554
|
+
>
|
|
555
|
+
<div
|
|
556
|
+
class="POS-logo d-flex align-items-center ${document.body.offsetWidth < 800 ? `justify-content-center` : ``} mx-2 w-100"
|
|
557
|
+
style="${document.body.offsetWidth < 800 ? `gap: 0px;` : `gap: 10px;padding-left: 24px;`}height: ${(() => {
|
|
558
|
+
if (document.body.offsetWidth > 800) {
|
|
559
|
+
return `86px`;
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
return `66px`;
|
|
563
|
+
}
|
|
564
|
+
})()};"
|
|
565
|
+
>
|
|
566
|
+
${document.body.offsetWidth < 800
|
|
567
|
+
? ` `
|
|
568
|
+
: `<div class=" d-flex align-items-center h-100 border-end pe-4" style="gap:10px;"><svg width="157" height="28" viewBox="0 0 157 28" fill="none"
|
|
569
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
570
|
+
<path d="M1.812 17.972C2.28067 18.342 3.08233 18.8477 4.217 19.489C5.37633 20.1303 6.474 20.451 7.51 20.451C8.57067 20.451 9.101 20.044 9.101 19.23C9.101 18.86 8.953 18.5393 8.657 18.268C8.361 17.972 7.81833 17.639 7.029 17.269C6.23967 16.899 5.64767 16.6153 5.253 16.418C4.85833 16.196 4.328 15.8507 3.662 15.382C3.02067 14.8887 2.52733 14.383 2.182 13.865C1.19533 12.459 0.702 10.6707 0.702 8.5C0.702 6.32933 1.50367 4.504 3.107 3.024C4.735 1.51933 6.85633 0.766998 9.471 0.766998C11.247 0.766998 12.8873 0.964332 14.392 1.359C15.8967 1.729 16.6737 2.22233 16.723 2.839C16.723 2.913 16.723 2.987 16.723 3.061C16.723 3.92433 16.4517 5.022 15.909 6.354C15.3663 7.66133 14.984 8.389 14.762 8.537C13.1833 7.723 11.765 7.316 10.507 7.316C9.27367 7.316 8.657 7.76 8.657 8.648C8.657 9.19067 9.11333 9.67167 10.026 10.091C10.2233 10.1897 10.507 10.3253 10.877 10.498C11.247 10.6707 11.6663 10.8803 12.135 11.127C12.6283 11.349 13.1463 11.645 13.689 12.015C14.2563 12.3603 14.8607 12.829 15.502 13.421C16.8093 14.6543 17.463 16.2823 17.463 18.305C17.463 20.9443 16.7353 23.1027 15.28 24.78C13.8247 26.4573 11.58 27.3207 8.546 27.37C7.066 27.37 5.72167 27.2467 4.513 27C3.329 26.7533 2.293 26.2723 1.405 25.557C0.517 24.8417 0.073 23.9783 0.073 22.967C0.073 21.9557 0.258 20.9567 0.628 19.97C0.998 18.9587 1.39267 18.2927 1.812 17.972ZM40.6343 26.371C40.6343 26.7903 39.3886 27 36.8973 27C34.4059 27 33.1603 26.7903 33.1603 26.371V17.861H27.9803V26.371C27.9803 26.7903 26.7346 27 24.2433 27C21.7519 27 20.5063 26.7903 20.5063 26.371V1.84C20.5063 1.322 21.7519 1.063 24.2433 1.063C26.7346 1.063 27.9803 1.322 27.9803 1.84V10.535H33.1603V1.914C33.1603 1.56867 33.7769 1.322 35.0103 1.174C35.6516 1.12467 36.2806 1.1 36.8973 1.1L38.7843 1.174C40.0176 1.322 40.6343 1.56867 40.6343 1.914V26.371ZM55.3068 27.37C51.8534 27.37 49.0291 26.2353 46.8338 23.966C44.6631 21.6967 43.5778 18.3913 43.5778 14.05C43.5778 9.684 44.6754 6.37867 46.8708 4.134C49.0908 1.88933 51.9398 0.766998 55.4178 0.766998C58.9204 0.766998 61.7448 1.877 63.8908 4.097C66.0368 6.29233 67.1098 9.63467 67.1098 14.124C67.1098 18.5887 66.0121 21.9187 63.8168 24.114C61.6214 26.2847 58.7848 27.37 55.3068 27.37ZM55.3438 7.871C54.1598 7.871 53.1608 8.41367 52.3468 9.499C51.5574 10.5843 51.1628 12.1137 51.1628 14.087C51.1628 16.0357 51.5451 17.5403 52.3098 18.601C53.0744 19.637 54.0734 20.155 55.3068 20.155C56.5648 20.155 57.5761 19.6247 58.3408 18.564C59.1301 17.5033 59.5248 15.9863 59.5248 14.013C59.5248 12.0397 59.1178 10.5227 58.3038 9.462C57.5144 8.40133 56.5278 7.871 55.3438 7.871ZM73.2995 27.074C71.0548 27.074 69.9325 26.8273 69.9325 26.334V2.358C69.9325 1.51933 70.3148 1.1 71.0795 1.1H77.5915C81.2421 1.1 83.8691 1.85233 85.4725 3.357C87.1005 4.86167 87.9145 7.04467 87.9145 9.906C87.9145 12.274 87.1498 14.4447 85.6205 16.418C84.8558 17.4047 83.7335 18.194 82.2535 18.786C80.7735 19.378 79.0468 19.674 77.0735 19.674V26.297C77.0735 26.593 76.6048 26.8027 75.6675 26.926C74.7548 27.0247 73.9655 27.074 73.2995 27.074ZM77.0735 7.538V13.384H77.5545C78.4178 13.384 79.1455 13.1127 79.7375 12.57C80.3295 12.0273 80.6255 11.2627 80.6255 10.276C80.6255 9.28933 80.4158 8.58633 79.9965 8.167C79.6018 7.74767 78.8865 7.538 77.8505 7.538H77.0735ZM111.458 26.186C111.458 26.704 110.299 26.963 107.98 26.963C105.661 26.963 104.403 26.778 104.206 26.408L98.027 14.864V26.371C98.027 26.815 96.88 27.037 94.586 27.037C92.3167 27.037 91.182 26.815 91.182 26.371V1.618C91.182 1.248 92.1564 1.063 94.105 1.063C94.8697 1.063 95.7577 1.137 96.769 1.285C97.805 1.40833 98.434 1.655 98.656 2.025L104.576 13.421V1.803C104.576 1.33433 105.723 1.1 108.017 1.1C110.311 1.1 111.458 1.33433 111.458 1.803V26.186ZM127.199 11.386C127.668 11.386 127.902 12.2493 127.902 13.976C127.902 14.494 127.841 15.1107 127.717 15.826C127.619 16.5167 127.421 16.862 127.125 16.862H122.426V20.562H129.234C129.654 20.562 129.937 21.1047 130.085 22.19C130.159 22.6587 130.196 23.1643 130.196 23.707C130.196 24.225 130.122 24.9033 129.974 25.742C129.826 26.5807 129.58 27 129.234 27H116.58C115.643 27 115.174 26.6177 115.174 25.853V2.062C115.174 1.42067 115.458 1.1 116.025 1.1H129.271C129.789 1.1 130.048 2.19767 130.048 4.393C130.048 6.56367 129.789 7.649 129.271 7.649H122.426V11.386H127.199ZM147.148 2.099C147.444 1.359 148.986 0.989 151.773 0.989C152.489 0.989 153.364 1.05067 154.4 1.174C155.461 1.27267 155.991 1.37133 155.991 1.47L149.701 14.272L156.213 26.519C156.287 26.6423 155.757 26.7657 154.622 26.889C153.488 26.9877 152.526 27.037 151.736 27.037C148.604 27.037 146.889 26.6177 146.593 25.779L143.818 18.712L141.302 26.001C141.056 26.6917 139.477 27.037 136.566 27.037C135.851 27.037 134.963 26.9877 133.902 26.889C132.842 26.7903 132.361 26.6547 132.459 26.482L138.231 13.68L132.237 1.47C132.163 1.34666 132.669 1.23566 133.754 1.137C134.864 1.01366 135.802 0.951998 136.566 0.951998C139.674 0.951998 141.376 1.396 141.672 2.284L144.225 8.5L147.148 2.099Z"
|
|
571
|
+
fill="url(#paint0_linear_3001_1051)"></path>
|
|
572
|
+
<defs>
|
|
573
|
+
<linearGradient id="paint0_linear_3001_1051" x1="-6" y1="-22.75" x2="13.6088"
|
|
574
|
+
y2="74.6316" gradientUnits="userSpaceOnUse">
|
|
575
|
+
<stop stop-color="#FFB400"></stop>
|
|
576
|
+
<stop offset="1" stop-color="#FF6C02"></stop>
|
|
577
|
+
</linearGradient>
|
|
578
|
+
</defs>
|
|
579
|
+
</svg>
|
|
580
|
+
<div style="text-align: center; color: #8D8D8D; font-size: 38px; font-family: Lilita One; font-weight: 400; word-wrap: break-word">POS</div>
|
|
581
|
+
</div>`}
|
|
582
|
+
${(document.body.clientWidth > 800) ? cartBtn : ``}
|
|
583
|
+
<div class="searchBar ms-sm-2 me-2 ${vm.type !== 'menu' ? `d-none` : ``} ${document.body.offsetWidth < 800 ? `d-none` : ``}"
|
|
574
584
|
style="position: relative;max-width:calc(100% - 60px);
|
|
575
585
|
${document.body.clientWidth < 800 ? `` : `position: absolute;left: 50%;top:50%;transform:translate(-50%,-50%);`}
|
|
576
586
|
">
|
|
@@ -610,7 +620,7 @@ ${document.body.clientWidth < 800 ? `` : `position: absolute;left: 50%;top:50%;t
|
|
|
610
620
|
</defs>
|
|
611
621
|
</svg>
|
|
612
622
|
</div>
|
|
613
|
-
${(
|
|
623
|
+
${((document.body.clientWidth > 800)) ? `<div class="flex-fill"></div>` : ``}
|
|
614
624
|
${gvc.bindView(() => {
|
|
615
625
|
const id = 'right_top_info';
|
|
616
626
|
function refreshUserBar() {
|
|
@@ -628,7 +638,7 @@ ${document.body.clientWidth < 800 ? `` : `position: absolute;left: 50%;top:50%;t
|
|
|
628
638
|
glitter.share.select_member = select_member;
|
|
629
639
|
glitter.share.staff_title = select_member.config.name === 'manager' ? `BOSS` : POSSetting.config.who;
|
|
630
640
|
resolve(html `
|
|
631
|
-
<div class="h-100 group dropdown
|
|
641
|
+
<div class="h-100 group dropdown ps-1 pe-1 d-flex align-items-center"
|
|
632
642
|
style="">
|
|
633
643
|
<div class=" btn btn-outline-secondary border-0 p-1 position-relative"
|
|
634
644
|
data-bs-toggle="dropdown" aria-haspopup="true"
|
|
@@ -636,7 +646,7 @@ ${document.body.clientWidth < 800 ? `` : `position: absolute;left: 50%;top:50%;t
|
|
|
636
646
|
<div class="d-flex align-items-center px-sm-2"
|
|
637
647
|
style="gap:10px;">
|
|
638
648
|
<div class="ps-2 text-start">
|
|
639
|
-
|
|
649
|
+
|
|
640
650
|
<div class="" style="color: #393939;
|
|
641
651
|
font-size: 18px;
|
|
642
652
|
font-style: normal;
|
|
@@ -644,17 +654,22 @@ ${document.body.clientWidth < 800 ? `` : `position: absolute;left: 50%;top:50%;t
|
|
|
644
654
|
line-height: normal;">
|
|
645
655
|
${select_member.config.name}
|
|
646
656
|
</div>
|
|
647
|
-
<div class="fs-xs lh-1 opacity-60 fw-500 d-flex align-items-center fw-500 mt-1"
|
|
657
|
+
<div class="fs-xs lh-1 opacity-60 fw-500 d-flex align-items-center fw-500 mt-1"
|
|
658
|
+
style="color: #8D8D8D;
|
|
648
659
|
font-size: 14px;
|
|
649
660
|
font-style: normal;
|
|
650
661
|
gap:5px;
|
|
651
662
|
font-weight: 400;
|
|
652
663
|
line-height: normal;">
|
|
653
|
-
${select_member.config.title}
|
|
664
|
+
${select_member.config.title}
|
|
665
|
+
<div>/</div>
|
|
666
|
+
<div class="text-info fw-bold">
|
|
667
|
+
${glitter.share.store_list.find((dd) => {
|
|
654
668
|
return dd.id === POSSetting.config.where_store;
|
|
655
|
-
}).name}
|
|
669
|
+
}).name}
|
|
670
|
+
</div>
|
|
656
671
|
</div>
|
|
657
|
-
|
|
672
|
+
|
|
658
673
|
</div>
|
|
659
674
|
<i class="fa-regular fa-angle-down fs-6"></i>
|
|
660
675
|
</div>
|
|
@@ -692,65 +707,121 @@ ${document.body.clientWidth < 800 ? `` : `position: absolute;left: 50%;top:50%;t
|
|
|
692
707
|
else {
|
|
693
708
|
return [];
|
|
694
709
|
}
|
|
695
|
-
})()
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
710
|
+
})()
|
|
711
|
+
].join('<div class="dropdown-divider"></div>')}
|
|
712
|
+
</div>
|
|
713
|
+
</div>`);
|
|
714
|
+
});
|
|
715
|
+
},
|
|
716
|
+
divCreate: {
|
|
717
|
+
class: `h-100`
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
})}
|
|
721
|
+
${(document.body.clientWidth < 800) ? `<div class="flex-fill"></div>` : ``}
|
|
722
|
+
<div class="h-100 d-flex align-items-center border-start ps-1">
|
|
723
|
+
<div style="width:50px;height: 100%;cursor: pointer;"
|
|
724
|
+
class="d-flex align-items-center justify-content-center"
|
|
725
|
+
onclick="${gvc.event(() => {
|
|
726
|
+
PosFunction.selectTempOrder(gvc);
|
|
727
|
+
})}">
|
|
728
|
+
<div class=" btn btn-outline-secondary border-0 p-1 position-relative">
|
|
729
|
+
<i class="fa-regular fa-box fs-4"></i>
|
|
730
|
+
${TempOrder.getTempOrders().length ? `<span style="position: absolute;top:-28px;right: -8px;"><span style="display: inline-block;
|
|
731
|
+
background-color:#fe5541;
|
|
732
|
+
height: 18px;
|
|
733
|
+
width: 18px;
|
|
734
|
+
border-radius: 50%;
|
|
735
|
+
text-align: center;
|
|
736
|
+
font-size: 11px;
|
|
737
|
+
font-weight: 400;
|
|
738
|
+
line-height: 18px;
|
|
739
|
+
color: #fff;
|
|
740
|
+
position: absolute;
|
|
741
|
+
top: 25px;
|
|
742
|
+
right: 0px;">${TempOrder.getTempOrders().length}</span></span>` : ``}
|
|
743
|
+
</div>
|
|
744
|
+
</div>
|
|
745
|
+
${(document.body.clientWidth > 800 || vm.type !== 'menu') ? `` : `<div style="width:50px;" class="d-flex align-items-center justify-content-center">${cartBtn}</div>`}
|
|
746
|
+
${gvc.bindView(() => {
|
|
747
|
+
const id = gvc.glitter.getUUID();
|
|
748
|
+
return {
|
|
749
|
+
bind: id,
|
|
750
|
+
view: () => {
|
|
751
|
+
return html `
|
|
752
|
+
<div class="h-100 group dropdown ps-1 d-flex align-items-center"
|
|
753
|
+
style="">
|
|
754
|
+
<div class="btn btn-outline-secondary border-0 p-1 position-relative "
|
|
755
|
+
style="cursor: pointer;"
|
|
756
|
+
data-bs-toggle="dropdown" aria-haspopup="true"
|
|
757
|
+
aria-expanded="false">
|
|
758
|
+
<div class="d-flex align-items-center px-sm-2"
|
|
759
|
+
style="gap:10px;">
|
|
760
|
+
<i class="fa-solid fa-bars fs-4"></i>
|
|
761
|
+
</div>
|
|
762
|
+
</div>
|
|
763
|
+
<div class="dropdown-menu position-absolute"
|
|
764
|
+
style="top:50px; right: 0;">
|
|
765
|
+
${[
|
|
766
|
+
...[
|
|
767
|
+
...((PayConfig.deviceType === 'pos') ? [
|
|
768
|
+
html `
|
|
699
769
|
<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
700
770
|
style="gap:10px;"
|
|
701
771
|
onclick="${gvc.event(() => {
|
|
702
|
-
|
|
703
|
-
|
|
772
|
+
ConnectionMode.main(gvc);
|
|
773
|
+
})}"><i
|
|
704
774
|
class="fa-solid fa-plug d-flex align-items-center justify-content-center"
|
|
705
775
|
style="width:20px;"></i>連線模式</a>`,
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
776
|
+
] : []),
|
|
777
|
+
...((ConnectionMode.on_connected_device) ? [
|
|
778
|
+
`<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
709
779
|
style="gap:10px;"
|
|
710
780
|
onclick="${gvc.event(() => {
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
}
|
|
781
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
782
|
+
dialog.checkYesOrNot({
|
|
783
|
+
text: '是否斷開與 IMIN 裝置的連線?',
|
|
784
|
+
callback: (response) => {
|
|
785
|
+
if (response) {
|
|
786
|
+
dialog.infoMessage({ text: '已斷開連線' });
|
|
787
|
+
ConnectionMode.last_connect_id = '';
|
|
788
|
+
ConnectionMode.on_connected_device = '';
|
|
789
|
+
ConnectionMode.socket.close();
|
|
721
790
|
}
|
|
722
|
-
}
|
|
723
|
-
})
|
|
724
|
-
|
|
725
|
-
]
|
|
726
|
-
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
})}"><i class="fa-solid fa-power-off d-flex align-items-center justify-content-center" style="width:20px;"></i>斷開裝置連線</a>`
|
|
794
|
+
] : [])
|
|
795
|
+
].concat(PayConfig.deviceType === 'pos' ? [] : ConnectionMode.device_list.map((dd) => {
|
|
796
|
+
return html `<a
|
|
727
797
|
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
728
798
|
style="gap:10px;"
|
|
729
799
|
onclick="${gvc.event(() => {
|
|
730
|
-
|
|
731
|
-
|
|
800
|
+
ConnectionMode.connect(dd);
|
|
801
|
+
})}"><i
|
|
732
802
|
class="fa-solid fa-plug d-flex align-items-center justify-content-center"
|
|
733
803
|
style="width:20px;"></i>連線至『 ${dd} 』</a>`;
|
|
734
|
-
|
|
735
|
-
|
|
804
|
+
})),
|
|
805
|
+
` <a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
736
806
|
style="gap:5px;" onclick="${gvc.event(() => {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
807
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
808
|
+
dialog.dataLoading({ visible: true });
|
|
809
|
+
localStorage.removeItem('on-pos');
|
|
810
|
+
(window.parent).history.replaceState({}, document.title, `${glitter.root_path}cms?appName=${glitter.getUrlParameter('app-id')}&type=editor&function=backend-manger&tab=home_page`);
|
|
811
|
+
glitter.share.reload('cms', 'shopnex');
|
|
812
|
+
})}"><i class="fa-solid fa-angle-left d-flex align-items-center justify-content-center"
|
|
743
813
|
style="width:20px;"></i>返回後台管理</a>`
|
|
744
|
-
|
|
814
|
+
].join('<div class="dropdown-divider"></div>')}
|
|
745
815
|
</div>
|
|
746
|
-
</div
|
|
747
|
-
});
|
|
816
|
+
</div>`;
|
|
748
817
|
},
|
|
749
818
|
divCreate: {
|
|
750
|
-
class: `
|
|
819
|
+
class: `d-flex align-items-center justify-content-center`,
|
|
820
|
+
style: `width:50px;height: 100%;`
|
|
751
821
|
}
|
|
752
822
|
};
|
|
753
823
|
})}
|
|
824
|
+
</div>
|
|
754
825
|
</div>
|
|
755
826
|
</div>
|
|
756
827
|
${gvc.bindView({
|
|
@@ -891,11 +962,13 @@ ${document.body.clientWidth < 800 ? `` : `position: absolute;left: 50%;top:50%;t
|
|
|
891
962
|
},
|
|
892
963
|
{
|
|
893
964
|
selectIcon: html `
|
|
894
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width="29"
|
|
965
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width="29"
|
|
966
|
+
height="29" fill="#393939">
|
|
895
967
|
<path d="M144 144c0 44.2 35.8 80 80 80s80-35.8 80-80l0-16-160 0 0 16zm-.1-124.9l.1 .1c10.2 7.5 23.8 8.3 34.9 2L209.1 4c4.6-2.6 9.7-4 14.9-4s10.4 1.4 14.9 4l30.2 17.2c11 6.3 24.7 5.5 34.9-2l.1-.1c.3-.2 .6-.4 .8-.6l3-2.4L323.6 3.5c2.8-2.3 6.4-3.5 10-3.5L336 0c8.8 0 16 7.2 16 16l0 23 0 3.2c0 0 0 .1 0 .1L352 144c0 70.7-57.3 128-128 128s-128-57.3-128-128L96 42.3c0 0 0-.1 0-.1L96 39l0-23c0-8.8 7.2-16 16-16l2.4 0c3.6 0 7.2 1.2 10 3.5L140 16l3 2.4c.3 .2 .6 .4 .8 .6zM48.3 464l351.5 0c-4.1-62.5-56.2-112-119.7-112l-112 0c-63.6 0-115.6 49.5-119.7 112zM0 472c0-92.8 75.2-168 168-168l112 0c92.8 0 168 75.2 168 168l0 8c0 17.7-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32l0-8zM432 256c-27.7 0-53-10.1-72.6-26.7c.5-.8 1-1.5 1.4-2.3c12.1-19.9 20-42.6 22.4-67c.5-5.3 .8-10.6 .8-16l0-101.2C398.5 35.9 414.8 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112zM609.3 512l-137.8 0c5.4-9.4 8.6-20.3 8.6-32l0-8c0-60.7-27.1-115.2-69.8-151.8c2.4-.1 4.7-.2 7.1-.2l61.4 0C567.8 320 640 392.2 640 481.3c0 17-13.8 30.7-30.7 30.7z"/>
|
|
896
968
|
</svg>`,
|
|
897
969
|
unselectIcon: html `
|
|
898
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"
|
|
970
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width="29"
|
|
971
|
+
height="29" fill="#8D8D8D">
|
|
899
972
|
<path d="M144 144c0 44.2 35.8 80 80 80s80-35.8 80-80l0-16-160 0 0 16zm-.1-124.9l.1 .1c10.2 7.5 23.8 8.3 34.9 2L209.1 4c4.6-2.6 9.7-4 14.9-4s10.4 1.4 14.9 4l30.2 17.2c11 6.3 24.7 5.5 34.9-2l.1-.1c.3-.2 .6-.4 .8-.6l3-2.4L323.6 3.5c2.8-2.3 6.4-3.5 10-3.5L336 0c8.8 0 16 7.2 16 16l0 23 0 3.2c0 0 0 .1 0 .1L352 144c0 70.7-57.3 128-128 128s-128-57.3-128-128L96 42.3c0 0 0-.1 0-.1L96 39l0-23c0-8.8 7.2-16 16-16l2.4 0c3.6 0 7.2 1.2 10 3.5L140 16l3 2.4c.3 .2 .6 .4 .8 .6zM48.3 464l351.5 0c-4.1-62.5-56.2-112-119.7-112l-112 0c-63.6 0-115.6 49.5-119.7 112zM0 472c0-92.8 75.2-168 168-168l112 0c92.8 0 168 75.2 168 168l0 8c0 17.7-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32l0-8zM432 256c-27.7 0-53-10.1-72.6-26.7c.5-.8 1-1.5 1.4-2.3c12.1-19.9 20-42.6 22.4-67c.5-5.3 .8-10.6 .8-16l0-101.2C398.5 35.9 414.8 32 432 32c61.9 0 112 50.1 112 112s-50.1 112-112 112zM609.3 512l-137.8 0c5.4-9.4 8.6-20.3 8.6-32l0-8c0-60.7-27.1-115.2-69.8-151.8c2.4-.1 4.7-.2 7.1-.2l61.4 0C567.8 320 640 392.2 640 481.3c0 17-13.8 30.7-30.7 30.7z"/>
|
|
900
973
|
</svg>`,
|
|
901
974
|
title: `會員`,
|