ts-glitter 20.7.7 → 20.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/cms-plugin/POS-setting.js +1 -0
- package/lowcode/cms-plugin/POS-setting.ts +1 -0
- package/lowcode/cms-plugin/cms-router.js +5 -0
- package/lowcode/cms-plugin/cms-router.ts +5 -0
- package/lowcode/cms-plugin/pos-config-setting.js +591 -0
- package/lowcode/cms-plugin/pos-config-setting.ts +681 -0
- package/lowcode/cms-plugin/pos-pages/imin-module.js +176 -59
- package/lowcode/cms-plugin/pos-pages/imin-module.ts +708 -568
- package/lowcode/cms-plugin/pos-pages/payment-page.js +47 -16
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +55 -16
- package/lowcode/glitterBundle/dialog/ShareDialog.js +3 -0
- package/lowcode/glitterBundle/dialog/ShareDialog.ts +5 -0
- package/lowcode/glitterBundle/dialog/dialog.js +5 -1
- package/lowcode/glitterBundle/dialog/dialog.ts +4 -1
- package/lowcode/jspage/function-page/setting_editor.js +8 -0
- package/lowcode/jspage/function-page/setting_editor.ts +8 -0
- package/lowcode/public-components/terms-related/index.js +1 -1
- package/lowcode/public-components/terms-related/index.ts +1 -1
- package/package.json +1 -1
- package/src/api-public/services/order-event.js +1 -1
- package/src/api-public/services/order-event.js.map +1 -1
- package/src/api-public/services/order-event.ts +1 -1
- 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 +1 -1
- package/src/api-public/services/user.js +9 -8
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +13 -13
- package/src/services/template.js +1 -0
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +1 -0
|
@@ -142,7 +142,7 @@ export class PaymentPage {
|
|
|
142
142
|
const rebateTitle = (_b = gvc.glitter.share.rebateConfig.title) !== null && _b !== void 0 ? _b : '購物金';
|
|
143
143
|
gvc.glitter.share.rebateConfig.title = rebateTitle;
|
|
144
144
|
const hasWeighing = orderDetail.lineItems.find((item) => item.product_category === 'weighing');
|
|
145
|
-
resolve(html
|
|
145
|
+
resolve(html ` <div
|
|
146
146
|
class="left-panel"
|
|
147
147
|
style="${document.body.offsetWidth < 800
|
|
148
148
|
? `width:calc(100%);padding: 20px 18px;height:auto;background:#FFF;`
|
|
@@ -236,7 +236,7 @@ export class PaymentPage {
|
|
|
236
236
|
</span>
|
|
237
237
|
|
|
238
238
|
${document.body.clientWidth < 800
|
|
239
|
-
? html
|
|
239
|
+
? html ` <div
|
|
240
240
|
style="color: #393939; font-size: 16px; font-style: normal; font-weight: 400; line-height: normal; letter-spacing: 0.64px; text-transform: uppercase;"
|
|
241
241
|
>
|
|
242
242
|
NT.${parseInt(data.sale_price, 10).toLocaleString()}
|
|
@@ -285,7 +285,7 @@ export class PaymentPage {
|
|
|
285
285
|
bind: vm.id,
|
|
286
286
|
view: () => {
|
|
287
287
|
const view = [
|
|
288
|
-
html
|
|
288
|
+
html ` <div class="w-100 d-flex flex-fill">
|
|
289
289
|
<div
|
|
290
290
|
class="w-100 d-flex align-items-center justify-content-center"
|
|
291
291
|
style="cursor:pointer;flex:1; height: 65px; ${vm.type === 'old'
|
|
@@ -460,14 +460,14 @@ export class PaymentPage {
|
|
|
460
460
|
bind: vm.id,
|
|
461
461
|
view: () => {
|
|
462
462
|
if (vm.loading) {
|
|
463
|
-
return html
|
|
463
|
+
return html ` <div
|
|
464
464
|
class="w-100 d-flex align-items-center justify-content-center"
|
|
465
465
|
>
|
|
466
466
|
<div class="spinner-border"></div>
|
|
467
467
|
</div>`;
|
|
468
468
|
}
|
|
469
469
|
else {
|
|
470
|
-
return html
|
|
470
|
+
return html ` <div
|
|
471
471
|
style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 6px; display: inline-flex"
|
|
472
472
|
>
|
|
473
473
|
<div
|
|
@@ -743,7 +743,7 @@ export class PaymentPage {
|
|
|
743
743
|
</div>`,
|
|
744
744
|
];
|
|
745
745
|
resolve(form_array_view.join(`<div class="my-4 border"></div>`) +
|
|
746
|
-
html
|
|
746
|
+
html ` <div class="d-flex align-content-end justify-content-end pt-3">
|
|
747
747
|
${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
748
748
|
const dialog = new ShareDialog(gvc.glitter);
|
|
749
749
|
if (CheckInput.isEmpty(userData.name)) {
|
|
@@ -862,7 +862,8 @@ export class PaymentPage {
|
|
|
862
862
|
${(() => {
|
|
863
863
|
var _a;
|
|
864
864
|
if (['FAMIC2C', 'HILIFEC2C', 'OKMARTC2C', 'UNIMARTC2C'].includes(obj.ogOrderData.user_info.shipment)) {
|
|
865
|
-
return html
|
|
865
|
+
return html `
|
|
866
|
+
<div
|
|
866
867
|
class="mb-2"
|
|
867
868
|
style="margin-top: 14px;font-size: 18px;font-weight: 700;letter-spacing: 0.72px;"
|
|
868
869
|
>
|
|
@@ -885,7 +886,8 @@ export class PaymentPage {
|
|
|
885
886
|
})}"
|
|
886
887
|
>
|
|
887
888
|
${decodeURI(gvc.glitter.getUrlParameter('CVSStoreName') || '') || '請選擇到店門市'}
|
|
888
|
-
</div>
|
|
889
|
+
</div>
|
|
890
|
+
`;
|
|
889
891
|
}
|
|
890
892
|
else if (obj.ogOrderData.user_info.shipment === 'normal') {
|
|
891
893
|
return `<input class="form-control mt-2" value="${(_a = obj.ogOrderData.user_info.address) !== null && _a !== void 0 ? _a : ''}" onchange="${gvc.event((e, event) => {
|
|
@@ -930,7 +932,7 @@ export class PaymentPage {
|
|
|
930
932
|
},
|
|
931
933
|
]
|
|
932
934
|
.map(dd => {
|
|
933
|
-
return html
|
|
935
|
+
return html ` <div class="mb-2 col-${dd.col} ps-0" style="">
|
|
934
936
|
<div>
|
|
935
937
|
<div
|
|
936
938
|
class="fw-normal mb-2 fs-6"
|
|
@@ -984,7 +986,7 @@ export class PaymentPage {
|
|
|
984
986
|
return [
|
|
985
987
|
{
|
|
986
988
|
title: `${gvc.glitter.share.rebateConfig.title}折抵`,
|
|
987
|
-
value: html
|
|
989
|
+
value: html ` <div class="d-flex align-items-center" style="gap:5px;">
|
|
988
990
|
${`-${Number(orderDetail.use_rebate).toLocaleString()}`}
|
|
989
991
|
<i
|
|
990
992
|
class="fa-solid fa-xmark fs-5"
|
|
@@ -1006,7 +1008,7 @@ export class PaymentPage {
|
|
|
1006
1008
|
return orderDetail.voucherList.map((dd, index) => {
|
|
1007
1009
|
return {
|
|
1008
1010
|
hint: dd.title,
|
|
1009
|
-
value: html
|
|
1011
|
+
value: html ` <div class="d-flex align-items-center" style="gap:5px;">
|
|
1010
1012
|
${dd.reBackType === 'rebate'
|
|
1011
1013
|
? `+${dd.discount_total.toLocaleString()} ${gvc.glitter.share.rebateConfig.title}`
|
|
1012
1014
|
: (() => {
|
|
@@ -1226,7 +1228,7 @@ export class PaymentPage {
|
|
|
1226
1228
|
.join('');
|
|
1227
1229
|
}
|
|
1228
1230
|
else {
|
|
1229
|
-
return html
|
|
1231
|
+
return html ` <div class="w-100 d-flex flex-column">
|
|
1230
1232
|
<div class="d-flex align-items-center justify-content-center w-100 " style="">
|
|
1231
1233
|
<div class="d-flex" style="flex:68;">${PosWidget.fontLight('付款方式')}</div>
|
|
1232
1234
|
<div class="d-flex" style="flex:94;">${PosWidget.fontLight('付款金額')}</div>
|
|
@@ -1328,7 +1330,7 @@ export class PaymentPage {
|
|
|
1328
1330
|
style: `display: flex;justify-content: space-between;margin-top: 24px;gap:15px;`,
|
|
1329
1331
|
},
|
|
1330
1332
|
})}`,
|
|
1331
|
-
html
|
|
1333
|
+
html ` <div style="height:24px;"></div>`,
|
|
1332
1334
|
PosWidget.buttonSnow(`新增付款方式`, gvc.event(() => {
|
|
1333
1335
|
PosFunction.selectPaymentMethod({
|
|
1334
1336
|
gvc: gvc,
|
|
@@ -1896,6 +1898,7 @@ export class PaymentPage {
|
|
|
1896
1898
|
else {
|
|
1897
1899
|
PaymentPage.clearHistory();
|
|
1898
1900
|
const glitter = gvc.glitter;
|
|
1901
|
+
console.log(`res.response.order-data==>`, res.response.data);
|
|
1899
1902
|
const invoice = res.response.data.invoice;
|
|
1900
1903
|
if (res.response.data.invoice &&
|
|
1901
1904
|
(PayConfig.deviceType === 'pos' || ConnectionMode.on_connected_device) &&
|
|
@@ -1919,6 +1922,33 @@ export class PaymentPage {
|
|
|
1919
1922
|
}
|
|
1920
1923
|
print('client');
|
|
1921
1924
|
}
|
|
1925
|
+
else if (PayConfig.pos_config.pos_support_finction.includes('print_order_receipt') ||
|
|
1926
|
+
PayConfig.pos_config.pos_support_finction.includes('print_order_detail')) {
|
|
1927
|
+
if (PayConfig.deviceType === 'pos') {
|
|
1928
|
+
yield IminModule.printTransactionDetails(res.response.data.orderID, invoice, glitter.share.staff_title);
|
|
1929
|
+
if (PayConfig.pos_config.pos_support_finction.includes('print_order_receipt') &&
|
|
1930
|
+
PayConfig.pos_config.pos_support_finction.includes('print_order_detail')) {
|
|
1931
|
+
yield new Promise(resolve => {
|
|
1932
|
+
const dialog = new ShareDialog(glitter);
|
|
1933
|
+
dialog.infoMessage({
|
|
1934
|
+
text: '請撕取客戶聯,在列印留存聯',
|
|
1935
|
+
callback: () => {
|
|
1936
|
+
resolve(true);
|
|
1937
|
+
}
|
|
1938
|
+
});
|
|
1939
|
+
});
|
|
1940
|
+
yield IminModule.printTransactionDetails(res.response.data.orderID, invoice, glitter.share.staff_title);
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
else {
|
|
1944
|
+
ConnectionMode.sendCommand({
|
|
1945
|
+
cmd: 'printTransactionDetails',
|
|
1946
|
+
invoice: invoice,
|
|
1947
|
+
orderID: res.response.data.orderID,
|
|
1948
|
+
staff_title: glitter.share.staff_title,
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1922
1952
|
dialog.dataLoading({ visible: false });
|
|
1923
1953
|
orderDetail.lineItems = [];
|
|
1924
1954
|
gvc.glitter.share.clearOrderData();
|
|
@@ -1982,7 +2012,8 @@ export class PaymentPage {
|
|
|
1982
2012
|
.map((dd) => {
|
|
1983
2013
|
return dd.total;
|
|
1984
2014
|
})
|
|
1985
|
-
.reduce((accumulator, currentValue) => accumulator + currentValue, 0) < orderDetail.total
|
|
2015
|
+
.reduce((accumulator, currentValue) => accumulator + currentValue, 0) < orderDetail.total ||
|
|
2016
|
+
!PayConfig.pos_config.pos_support_finction.includes('print_invoice')) {
|
|
1986
2017
|
c_vm.invoice_select = 'nouse';
|
|
1987
2018
|
next();
|
|
1988
2019
|
}
|
|
@@ -2055,7 +2086,7 @@ export class PaymentPage {
|
|
|
2055
2086
|
</div>
|
|
2056
2087
|
${(() => {
|
|
2057
2088
|
if (c_vm.invoice_select === 'carry') {
|
|
2058
|
-
return html
|
|
2089
|
+
return html ` <div
|
|
2059
2090
|
class="d-flex w-100 align-items-center mt-3"
|
|
2060
2091
|
style="border:1px solid grey;height: 50px;"
|
|
2061
2092
|
>
|
|
@@ -2084,7 +2115,7 @@ export class PaymentPage {
|
|
|
2084
2115
|
</div>`;
|
|
2085
2116
|
}
|
|
2086
2117
|
else if (c_vm.invoice_select === 'company') {
|
|
2087
|
-
return html
|
|
2118
|
+
return html ` <div
|
|
2088
2119
|
class="d-flex w-100 align-items-center mt-3"
|
|
2089
2120
|
style="border:1px solid grey;height: 50px;"
|
|
2090
2121
|
>
|
|
@@ -175,7 +175,7 @@ export class PaymentPage {
|
|
|
175
175
|
gvc.glitter.share.rebateConfig.title = rebateTitle;
|
|
176
176
|
const hasWeighing = orderDetail.lineItems.find((item: any) => item.product_category === 'weighing');
|
|
177
177
|
resolve(
|
|
178
|
-
html
|
|
178
|
+
html` <div
|
|
179
179
|
class="left-panel"
|
|
180
180
|
style="${document.body.offsetWidth < 800
|
|
181
181
|
? `width:calc(100%);padding: 20px 18px;height:auto;background:#FFF;`
|
|
@@ -269,7 +269,7 @@ export class PaymentPage {
|
|
|
269
269
|
</span>
|
|
270
270
|
|
|
271
271
|
${document.body.clientWidth < 800
|
|
272
|
-
? html
|
|
272
|
+
? html` <div
|
|
273
273
|
style="color: #393939; font-size: 16px; font-style: normal; font-weight: 400; line-height: normal; letter-spacing: 0.64px; text-transform: uppercase;"
|
|
274
274
|
>
|
|
275
275
|
NT.${parseInt(data.sale_price as any, 10).toLocaleString()}
|
|
@@ -322,7 +322,7 @@ export class PaymentPage {
|
|
|
322
322
|
bind: vm.id,
|
|
323
323
|
view: () => {
|
|
324
324
|
const view = [
|
|
325
|
-
html
|
|
325
|
+
html` <div class="w-100 d-flex flex-fill">
|
|
326
326
|
<div
|
|
327
327
|
class="w-100 d-flex align-items-center justify-content-center"
|
|
328
328
|
style="cursor:pointer;flex:1; height: 65px; ${vm.type === 'old'
|
|
@@ -514,13 +514,13 @@ export class PaymentPage {
|
|
|
514
514
|
bind: vm.id,
|
|
515
515
|
view: () => {
|
|
516
516
|
if (vm.loading) {
|
|
517
|
-
return html
|
|
517
|
+
return html` <div
|
|
518
518
|
class="w-100 d-flex align-items-center justify-content-center"
|
|
519
519
|
>
|
|
520
520
|
<div class="spinner-border"></div>
|
|
521
521
|
</div>`;
|
|
522
522
|
} else {
|
|
523
|
-
return html
|
|
523
|
+
return html` <div
|
|
524
524
|
style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 6px; display: inline-flex"
|
|
525
525
|
>
|
|
526
526
|
<div
|
|
@@ -742,6 +742,7 @@ export class PaymentPage {
|
|
|
742
742
|
);
|
|
743
743
|
|
|
744
744
|
let need_check: any = {};
|
|
745
|
+
|
|
745
746
|
function loopForm(data: any, refer_obj: any) {
|
|
746
747
|
let h = '';
|
|
747
748
|
data.map((item: any) => {
|
|
@@ -807,7 +808,7 @@ export class PaymentPage {
|
|
|
807
808
|
|
|
808
809
|
resolve(
|
|
809
810
|
form_array_view.join(`<div class="my-4 border"></div>`) +
|
|
810
|
-
html
|
|
811
|
+
html` <div class="d-flex align-content-end justify-content-end pt-3">
|
|
811
812
|
${BgWidget.save(
|
|
812
813
|
gvc.event(async () => {
|
|
813
814
|
const dialog = new ShareDialog(gvc.glitter);
|
|
@@ -938,7 +939,8 @@ export class PaymentPage {
|
|
|
938
939
|
if (
|
|
939
940
|
['FAMIC2C', 'HILIFEC2C', 'OKMARTC2C', 'UNIMARTC2C'].includes(obj.ogOrderData.user_info.shipment)
|
|
940
941
|
) {
|
|
941
|
-
return html
|
|
942
|
+
return html`
|
|
943
|
+
<div
|
|
942
944
|
class="mb-2"
|
|
943
945
|
style="margin-top: 14px;font-size: 18px;font-weight: 700;letter-spacing: 0.72px;"
|
|
944
946
|
>
|
|
@@ -961,7 +963,8 @@ export class PaymentPage {
|
|
|
961
963
|
})}"
|
|
962
964
|
>
|
|
963
965
|
${decodeURI(gvc.glitter.getUrlParameter('CVSStoreName') || '') || '請選擇到店門市'}
|
|
964
|
-
</div>
|
|
966
|
+
</div>
|
|
967
|
+
`;
|
|
965
968
|
} else if (obj.ogOrderData.user_info.shipment === 'normal') {
|
|
966
969
|
return `<input class="form-control mt-2" value="${obj.ogOrderData.user_info.address ?? ''}" onchange="${gvc.event(
|
|
967
970
|
(e, event) => {
|
|
@@ -1005,7 +1008,7 @@ export class PaymentPage {
|
|
|
1005
1008
|
},
|
|
1006
1009
|
]
|
|
1007
1010
|
.map(dd => {
|
|
1008
|
-
return html
|
|
1011
|
+
return html` <div class="mb-2 col-${dd.col} ps-0" style="">
|
|
1009
1012
|
<div>
|
|
1010
1013
|
<div
|
|
1011
1014
|
class="fw-normal mb-2 fs-6"
|
|
@@ -1060,7 +1063,7 @@ export class PaymentPage {
|
|
|
1060
1063
|
return [
|
|
1061
1064
|
{
|
|
1062
1065
|
title: `${gvc.glitter.share.rebateConfig.title}折抵`,
|
|
1063
|
-
value: html
|
|
1066
|
+
value: html` <div class="d-flex align-items-center" style="gap:5px;">
|
|
1064
1067
|
${`-${Number(orderDetail.use_rebate).toLocaleString()}`}
|
|
1065
1068
|
<i
|
|
1066
1069
|
class="fa-solid fa-xmark fs-5"
|
|
@@ -1081,7 +1084,7 @@ export class PaymentPage {
|
|
|
1081
1084
|
return (orderDetail as any).voucherList.map((dd: any, index: number) => {
|
|
1082
1085
|
return {
|
|
1083
1086
|
hint: dd.title,
|
|
1084
|
-
value: html
|
|
1087
|
+
value: html` <div class="d-flex align-items-center" style="gap:5px;">
|
|
1085
1088
|
${dd.reBackType === 'rebate'
|
|
1086
1089
|
? `+${dd.discount_total.toLocaleString()} ${gvc.glitter.share.rebateConfig.title}`
|
|
1087
1090
|
: (() => {
|
|
@@ -1315,7 +1318,7 @@ export class PaymentPage {
|
|
|
1315
1318
|
})
|
|
1316
1319
|
.join('');
|
|
1317
1320
|
} else {
|
|
1318
|
-
return html
|
|
1321
|
+
return html` <div class="w-100 d-flex flex-column">
|
|
1319
1322
|
<div class="d-flex align-items-center justify-content-center w-100 " style="">
|
|
1320
1323
|
<div class="d-flex" style="flex:68;">${PosWidget.fontLight('付款方式')}</div>
|
|
1321
1324
|
<div class="d-flex" style="flex:94;">${PosWidget.fontLight('付款金額')}</div>
|
|
@@ -1434,7 +1437,7 @@ export class PaymentPage {
|
|
|
1434
1437
|
style: `display: flex;justify-content: space-between;margin-top: 24px;gap:15px;`,
|
|
1435
1438
|
},
|
|
1436
1439
|
})}`,
|
|
1437
|
-
html
|
|
1440
|
+
html` <div style="height:24px;"></div>`,
|
|
1438
1441
|
PosWidget.buttonSnow(
|
|
1439
1442
|
`新增付款方式`,
|
|
1440
1443
|
gvc.event(() => {
|
|
@@ -2050,6 +2053,7 @@ export class PaymentPage {
|
|
|
2050
2053
|
} else {
|
|
2051
2054
|
PaymentPage.clearHistory();
|
|
2052
2055
|
const glitter = gvc.glitter;
|
|
2056
|
+
console.log(`res.response.order-data==>`, res.response.data);
|
|
2053
2057
|
const invoice = res.response.data.invoice;
|
|
2054
2058
|
if (
|
|
2055
2059
|
res.response.data.invoice &&
|
|
@@ -2058,6 +2062,7 @@ export class PaymentPage {
|
|
|
2058
2062
|
c_vm.invoice_select !== 'nouse'
|
|
2059
2063
|
) {
|
|
2060
2064
|
POSSetting.config.pickup_number++;
|
|
2065
|
+
|
|
2061
2066
|
function print(type: 'save' | 'client') {
|
|
2062
2067
|
if (type === 'client') {
|
|
2063
2068
|
if (PayConfig.deviceType === 'pos') {
|
|
@@ -2072,7 +2077,40 @@ export class PaymentPage {
|
|
|
2072
2077
|
}
|
|
2073
2078
|
}
|
|
2074
2079
|
}
|
|
2080
|
+
|
|
2075
2081
|
print('client');
|
|
2082
|
+
} else if (
|
|
2083
|
+
PayConfig.pos_config.pos_support_finction.includes('print_order_receipt') ||
|
|
2084
|
+
PayConfig.pos_config.pos_support_finction.includes('print_order_detail')
|
|
2085
|
+
) {
|
|
2086
|
+
|
|
2087
|
+
if (PayConfig.deviceType === 'pos') {
|
|
2088
|
+
//客戶聯
|
|
2089
|
+
await IminModule.printTransactionDetails(res.response.data.orderID,invoice,glitter.share.staff_title);
|
|
2090
|
+
//如果需要收執聯的話
|
|
2091
|
+
if(
|
|
2092
|
+
PayConfig.pos_config.pos_support_finction.includes('print_order_receipt') &&
|
|
2093
|
+
PayConfig.pos_config.pos_support_finction.includes('print_order_detail')
|
|
2094
|
+
){
|
|
2095
|
+
await new Promise(resolve => {
|
|
2096
|
+
const dialog=new ShareDialog(glitter)
|
|
2097
|
+
dialog.infoMessage({
|
|
2098
|
+
text:'請撕取客戶聯,在列印留存聯',
|
|
2099
|
+
callback:()=>{
|
|
2100
|
+
resolve(true)
|
|
2101
|
+
}
|
|
2102
|
+
})
|
|
2103
|
+
})
|
|
2104
|
+
await IminModule.printTransactionDetails(res.response.data.orderID,invoice,glitter.share.staff_title);
|
|
2105
|
+
}
|
|
2106
|
+
} else {
|
|
2107
|
+
ConnectionMode.sendCommand({
|
|
2108
|
+
cmd: 'printTransactionDetails',
|
|
2109
|
+
invoice: invoice,
|
|
2110
|
+
orderID: res.response.data.orderID,
|
|
2111
|
+
staff_title: glitter.share.staff_title,
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2076
2114
|
}
|
|
2077
2115
|
dialog.dataLoading({ visible: false });
|
|
2078
2116
|
orderDetail.lineItems = [];
|
|
@@ -2145,7 +2183,8 @@ export class PaymentPage {
|
|
|
2145
2183
|
.map((dd: any) => {
|
|
2146
2184
|
return dd.total;
|
|
2147
2185
|
})
|
|
2148
|
-
.reduce((accumulator: number, currentValue: number) => accumulator + currentValue, 0) < orderDetail.total
|
|
2186
|
+
.reduce((accumulator: number, currentValue: number) => accumulator + currentValue, 0) < orderDetail.total ||
|
|
2187
|
+
!PayConfig.pos_config.pos_support_finction.includes('print_invoice')
|
|
2149
2188
|
) {
|
|
2150
2189
|
c_vm.invoice_select = 'nouse';
|
|
2151
2190
|
next();
|
|
@@ -2221,7 +2260,7 @@ export class PaymentPage {
|
|
|
2221
2260
|
</div>
|
|
2222
2261
|
${(() => {
|
|
2223
2262
|
if (c_vm.invoice_select === 'carry') {
|
|
2224
|
-
return html
|
|
2263
|
+
return html` <div
|
|
2225
2264
|
class="d-flex w-100 align-items-center mt-3"
|
|
2226
2265
|
style="border:1px solid grey;height: 50px;"
|
|
2227
2266
|
>
|
|
@@ -2249,7 +2288,7 @@ export class PaymentPage {
|
|
|
2249
2288
|
</div>
|
|
2250
2289
|
</div>`;
|
|
2251
2290
|
} else if (c_vm.invoice_select === 'company') {
|
|
2252
|
-
return html
|
|
2291
|
+
return html` <div
|
|
2253
2292
|
class="d-flex w-100 align-items-center mt-3"
|
|
2254
2293
|
style="border:1px solid grey;height: 50px;"
|
|
2255
2294
|
>
|
|
@@ -39,6 +39,9 @@ export class ShareDialog {
|
|
|
39
39
|
this.checkYesOrNot = (obj) => {
|
|
40
40
|
this.openConfirmDialog('checkYesOrNot', obj);
|
|
41
41
|
};
|
|
42
|
+
this.confirmMessage = (obj) => {
|
|
43
|
+
this.openConfirmDialog('confirmMessage', obj);
|
|
44
|
+
};
|
|
42
45
|
this.customCheck = (obj) => {
|
|
43
46
|
this.openConfirmDialog('input_text', obj);
|
|
44
47
|
};
|
|
@@ -9,6 +9,7 @@ interface DataLoadingOptions {
|
|
|
9
9
|
|
|
10
10
|
interface MessageOptions {
|
|
11
11
|
text?: string;
|
|
12
|
+
callback?: () => void;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
interface ErrorMessageOptions extends MessageOptions {
|
|
@@ -32,6 +33,7 @@ export class ShareDialog {
|
|
|
32
33
|
public successMessage: (obj: MessageOptions) => void;
|
|
33
34
|
public warningMessage: (obj: ConfirmDialogOptions) => void;
|
|
34
35
|
public checkYesOrNot: (obj: ConfirmDialogOptions) => void;
|
|
36
|
+
public confirmMessage: (obj: ConfirmDialogOptions) => void;
|
|
35
37
|
public checkYesOrNotWithCustomWidth: (obj: ConfirmDialogOptions) => void;
|
|
36
38
|
public customCheck: (obj: ConfirmDialogOptions) => void;
|
|
37
39
|
|
|
@@ -78,6 +80,9 @@ export class ShareDialog {
|
|
|
78
80
|
this.checkYesOrNot = (obj: ConfirmDialogOptions): void => {
|
|
79
81
|
this.openConfirmDialog('checkYesOrNot', obj);
|
|
80
82
|
};
|
|
83
|
+
this.confirmMessage = (obj: ConfirmDialogOptions): void => {
|
|
84
|
+
this.openConfirmDialog('confirmMessage', obj);
|
|
85
|
+
};
|
|
81
86
|
|
|
82
87
|
this.customCheck = (obj: ConfirmDialogOptions): void => {
|
|
83
88
|
this.openConfirmDialog('input_text', obj);
|
|
@@ -122,7 +122,11 @@ init(import.meta.url, (gvc, glitter, gBundle) => {
|
|
|
122
122
|
content: (_h = (_g = gBundle.obj) === null || _g === void 0 ? void 0 : _g.text) !== null && _h !== void 0 ? _h : '系統提示',
|
|
123
123
|
confirm: {
|
|
124
124
|
title: Language.text('okay'),
|
|
125
|
-
event: () =>
|
|
125
|
+
event: () => {
|
|
126
|
+
var _a, _b;
|
|
127
|
+
(_b = (_a = gBundle.obj) === null || _a === void 0 ? void 0 : _a.callback) === null || _b === void 0 ? void 0 : _b.call(_a, true);
|
|
128
|
+
gvc.closeDialog();
|
|
129
|
+
}
|
|
126
130
|
},
|
|
127
131
|
width: 420,
|
|
128
132
|
});
|
|
@@ -154,7 +154,10 @@ init(import.meta.url, (gvc, glitter, gBundle: Bundle) => {
|
|
|
154
154
|
content: gBundle.obj?.text ?? '系統提示',
|
|
155
155
|
confirm: {
|
|
156
156
|
title: Language.text('okay'),
|
|
157
|
-
event: () =>
|
|
157
|
+
event: () => {
|
|
158
|
+
gBundle.obj?.callback?.(true);
|
|
159
|
+
gvc.closeDialog()
|
|
160
|
+
}
|
|
158
161
|
},
|
|
159
162
|
width: 420,
|
|
160
163
|
});
|
|
@@ -1517,6 +1517,14 @@ Setting_editor.menuItems = () => {
|
|
|
1517
1517
|
groupIcon: 'https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1713414599944-Component 56 (5).svg',
|
|
1518
1518
|
moduleName: '訂閱裝置管理',
|
|
1519
1519
|
},
|
|
1520
|
+
{
|
|
1521
|
+
icon: '',
|
|
1522
|
+
page: 'pos_setting',
|
|
1523
|
+
group: 'POS實體門市',
|
|
1524
|
+
title: 'POS設定',
|
|
1525
|
+
appName: 'cms_system',
|
|
1526
|
+
groupIcon: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/cash-register-regular (1).svg',
|
|
1527
|
+
},
|
|
1520
1528
|
{
|
|
1521
1529
|
icon: '',
|
|
1522
1530
|
page: 'shop_list',
|
|
@@ -774,6 +774,14 @@ export class Setting_editor {
|
|
|
774
774
|
// groupIcon: 'https://d3jnmi1tfjgtti.cloudfront.net/file/252530754/1713414599944-Component 56 (5).svg',
|
|
775
775
|
// moduleName: '訂閱裝置管理',
|
|
776
776
|
// },
|
|
777
|
+
{
|
|
778
|
+
icon: '',
|
|
779
|
+
page: 'pos_setting',
|
|
780
|
+
group: 'POS實體門市',
|
|
781
|
+
title: 'POS設定',
|
|
782
|
+
appName: 'cms_system',
|
|
783
|
+
groupIcon: 'https://d3jnmi1tfjgtti.cloudfront.net/file/122538856/cash-register-regular (1).svg',
|
|
784
|
+
},
|
|
777
785
|
{
|
|
778
786
|
icon: '',
|
|
779
787
|
page: 'shop_list',
|
|
@@ -63,7 +63,7 @@ export class TermsRelated {
|
|
|
63
63
|
'shipment_list_archive',
|
|
64
64
|
'reconciliation_area',
|
|
65
65
|
'app-design',
|
|
66
|
-
'auto_fcm_push', 'auto_fcm_advertise', 'auto_fcm_history'
|
|
66
|
+
'auto_fcm_push', 'auto_fcm_advertise', 'auto_fcm_history', 'pos_setting'
|
|
67
67
|
].includes(glitter.getUrlParameter('page'))) {
|
|
68
68
|
return yield new Promise((resolve, reject) => {
|
|
69
69
|
glitter.getModule(new URL('./cms-plugin/cms-router.js', gvc.glitter.root_path).href, res => {
|
|
@@ -65,7 +65,7 @@ export class TermsRelated {
|
|
|
65
65
|
'shipment_list_archive',
|
|
66
66
|
'reconciliation_area',
|
|
67
67
|
'app-design',
|
|
68
|
-
'auto_fcm_push','auto_fcm_advertise','auto_fcm_history'
|
|
68
|
+
'auto_fcm_push','auto_fcm_advertise','auto_fcm_history','pos_setting'
|
|
69
69
|
].includes(glitter.getUrlParameter('page'))
|
|
70
70
|
) {
|
|
71
71
|
return await new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ class OrderEvent {
|
|
|
16
16
|
user_id: 'manager',
|
|
17
17
|
});
|
|
18
18
|
console.log(`store_info.pickup_mode=>`, store_info.pickup_mode);
|
|
19
|
-
if (store_info.pickup_mode) {
|
|
19
|
+
if (store_info.pickup_mode || store_info.pos_support_finction.includes("order_sort")) {
|
|
20
20
|
obj.cartData.user_info.shipment_number = parseInt(store_info.pickup_now || '0', 10) + 1;
|
|
21
21
|
if (obj.cartData.user_info.shipment_number < parseInt(store_info.pickup_start || '0', 10)) {
|
|
22
22
|
obj.cartData.user_info.shipment_number = parseInt(store_info.pickup_start || '0', 10);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-event.js","sourceRoot":"","sources":["order-event.ts"],"names":[],"mappings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AAC,CAAC;IAClD,CAAC;CACF;AA3CD,gCA2CC"}
|
|
@@ -11,7 +11,7 @@ export class OrderEvent {
|
|
|
11
11
|
user_id: 'manager',
|
|
12
12
|
});
|
|
13
13
|
console.log(`store_info.pickup_mode=>`,store_info.pickup_mode)
|
|
14
|
-
if(store_info.pickup_mode){
|
|
14
|
+
if(store_info.pickup_mode || store_info.pos_support_finction.includes("order_sort")){
|
|
15
15
|
|
|
16
16
|
obj.cartData.user_info.shipment_number=parseInt(store_info.pickup_now || '0',10)+1
|
|
17
17
|
if(obj.cartData.user_info.shipment_number < parseInt(store_info.pickup_start || '0',10)){
|
|
@@ -3131,7 +3131,7 @@ class Shopping {
|
|
|
3131
3131
|
insertObj.id = originalVariant.id;
|
|
3132
3132
|
sourceMap[originalVariant.id] = originalVariant.id;
|
|
3133
3133
|
}
|
|
3134
|
-
const insertData = await database_js_1.default.query(`
|
|
3134
|
+
const insertData = await database_js_1.default.query(`replace INTO \`${this.app}\`.t_variants
|
|
3135
3135
|
SET ?
|
|
3136
3136
|
`, [insertObj]);
|
|
3137
3137
|
return insertData;
|