ts-glitter 20.6.8 → 20.7.0
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 +2 -2
- package/lowcode/Entry.ts +2 -2
- package/lowcode/backend-manager/bg-blog.js +617 -621
- package/lowcode/backend-manager/bg-blog.ts +2323 -2325
- package/lowcode/backend-manager/bg-line.js +5 -4
- package/lowcode/backend-manager/bg-line.ts +5 -4
- package/lowcode/backend-manager/bg-list-component.js +9 -0
- package/lowcode/backend-manager/bg-list-component.ts +15 -1
- package/lowcode/backend-manager/bg-notify.js +6 -4
- package/lowcode/backend-manager/bg-notify.ts +6 -4
- package/lowcode/backend-manager/bg-product.js +145 -0
- package/lowcode/backend-manager/bg-product.ts +153 -0
- package/lowcode/backend-manager/bg-sns.js +5 -3
- package/lowcode/backend-manager/bg-sns.ts +5 -3
- package/lowcode/backend-manager/bg-widget.js +92 -4
- package/lowcode/backend-manager/bg-widget.ts +122 -6
- package/lowcode/backend-manager/splitPage.js +0 -39
- package/lowcode/backend-manager/splitPage.ts +0 -40
- package/lowcode/cms-plugin/auto-fcm-advertise.js +17 -5
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +19 -6
- package/lowcode/cms-plugin/auto-fcm-history.js +2732 -0
- package/lowcode/cms-plugin/auto-fcm-history.ts +2995 -0
- package/lowcode/cms-plugin/cms-router.js +5 -0
- package/lowcode/cms-plugin/cms-router.ts +6 -0
- package/lowcode/cms-plugin/filter-options.js +80 -27
- package/lowcode/cms-plugin/filter-options.ts +83 -27
- package/lowcode/cms-plugin/language-backend.js +50 -39
- package/lowcode/cms-plugin/language-backend.ts +109 -95
- package/lowcode/cms-plugin/menus-setting.js +175 -151
- package/lowcode/cms-plugin/menus-setting.ts +620 -591
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/data.js +7 -7
- package/lowcode/cms-plugin/module/data.ts +262 -233
- package/lowcode/cms-plugin/module/delivery-html.js +18 -10
- package/lowcode/cms-plugin/module/delivery-html.ts +26 -10
- package/lowcode/cms-plugin/module/order-setting.js +458 -328
- package/lowcode/cms-plugin/module/order-setting.ts +622 -351
- package/lowcode/cms-plugin/module/product-excel.js +1 -1
- package/lowcode/cms-plugin/module/product-excel.ts +2 -1
- package/lowcode/cms-plugin/order/order-module.js +90 -1
- package/lowcode/cms-plugin/order/order-module.ts +106 -1
- package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -8
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +28 -15
- package/lowcode/cms-plugin/pos-pages/products-page.js +0 -39
- package/lowcode/cms-plugin/pos-pages/products-page.ts +0 -40
- package/lowcode/cms-plugin/shopping-collections.ts +1 -3
- package/lowcode/cms-plugin/shopping-finance-setting.js +19 -80
- package/lowcode/cms-plugin/shopping-finance-setting.ts +19 -87
- package/lowcode/cms-plugin/shopping-order-manager.js +122 -38
- package/lowcode/cms-plugin/shopping-order-manager.ts +160 -58
- package/lowcode/cms-plugin/shopping-product-setting.js +364 -376
- package/lowcode/cms-plugin/shopping-product-setting.ts +406 -415
- package/lowcode/cms-plugin/shopping-setting-advance.js +57 -16
- package/lowcode/cms-plugin/shopping-setting-advance.ts +69 -18
- package/lowcode/cms-plugin/stock-history.js +75 -63
- package/lowcode/cms-plugin/stock-history.ts +390 -376
- package/lowcode/cms-plugin/user/user-module.js +2 -43
- package/lowcode/cms-plugin/user/user-module.ts +2 -46
- package/lowcode/cms-plugin/user-list.js +4 -6
- package/lowcode/cms-plugin/user-list.ts +35 -38
- package/lowcode/css/editor.css +42 -3
- package/lowcode/glitter-base/global/language.js +6 -1
- package/lowcode/glitter-base/global/language.ts +10 -4
- package/lowcode/glitter-base/global/payment-config.js +19 -16
- package/lowcode/glitter-base/global/payment-config.ts +22 -16
- package/lowcode/glitter-base/global/shipment-config.js +6 -5
- package/lowcode/glitter-base/global/shipment-config.ts +12 -10
- package/lowcode/glitter-base/route/fcm.js +21 -1
- package/lowcode/glitter-base/route/fcm.ts +22 -2
- package/lowcode/glitter-base/route/shopping.js +8 -32
- package/lowcode/glitter-base/route/shopping.ts +10 -33
- package/lowcode/glitter-base/route/stock.ts +1 -0
- package/lowcode/glitter-base/route/user.js +11 -2
- package/lowcode/glitter-base/route/user.ts +23 -12
- package/lowcode/jspage/function-page/setting_editor.js +9 -0
- package/lowcode/jspage/function-page/setting_editor.ts +9 -0
- package/lowcode/public-components/blogs/list.js +223 -195
- package/lowcode/public-components/blogs/list.ts +383 -352
- package/lowcode/public-components/product/product-list.js +8 -4
- package/lowcode/public-components/product/product-list.ts +9 -4
- package/lowcode/public-components/terms-related/index.js +1 -1
- package/lowcode/public-components/terms-related/index.ts +1 -1
- package/lowcode/public-components/user-manager/um-login.js +1 -1
- package/lowcode/public-components/user-manager/um-login.ts +2 -2
- package/lowcode/public-components/user-manager/um-order.js +41 -5
- package/lowcode/public-components/user-manager/um-order.ts +58 -20
- package/lowcode/public-components/user-manager/um-voucher.ts +2 -2
- package/nhi4veq3gk.json +1 -0
- package/package.json +1 -1
- package/src/Language.d.ts +2 -0
- package/src/Language.js +66 -65
- package/src/Language.js.map +1 -1
- package/src/Language.ts +719 -715
- package/src/api-public/config/shipment-config.js +3 -2
- package/src/api-public/config/shipment-config.js.map +1 -1
- package/src/api-public/config/shipment-config.ts +3 -2
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/ai-chat.ts +1 -2
- package/src/api-public/controllers/fcm.js +23 -58
- package/src/api-public/controllers/fcm.js.map +1 -1
- package/src/api-public/controllers/fcm.ts +28 -56
- package/src/api-public/controllers/shop.js +7 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +17 -10
- package/src/api-public/controllers/user.js +1 -0
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +2 -0
- package/src/api-public/services/auto-send-email.js +247 -187
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/auto-send-email.ts +568 -505
- package/src/api-public/services/delivery.js +1 -1
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/delivery.ts +6 -5
- package/src/api-public/services/financial-service.js +1 -2
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +4 -6
- package/src/api-public/services/manager.d.ts +4 -3
- package/src/api-public/services/manager.js +8 -12
- package/src/api-public/services/manager.js.map +1 -1
- package/src/api-public/services/manager.ts +57 -59
- package/src/api-public/services/model/handlePaymentTransaction.d.ts +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.js +23 -3
- package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.ts +25 -36
- package/src/api-public/services/schedule.d.ts +1 -0
- package/src/api-public/services/schedule.js +27 -0
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +30 -0
- package/src/api-public/services/shopping.d.ts +22 -2
- package/src/api-public/services/shopping.js +371 -95
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +499 -141
- package/src/api-public/services/stock.js +0 -3
- package/src/api-public/services/stock.js.map +1 -1
- package/src/api-public/services/stock.ts +3 -3
- package/src/api-public/services/user.d.ts +1 -0
- package/src/api-public/services/user.js +32 -12
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +38 -19
- package/src/api-public/services/workers.js +3 -3
- package/src/api-public/services/workers.js.map +1 -1
- package/src/api-public/services/workers.ts +103 -103
- package/src/app-project/ios/proshake/AppDelegate.swift +51 -7
- package/src/app-project/ios/proshake/Info.plist +11 -9
- package/src/app-project/ios/proshake/SceneDelegate.swift +18 -0
- package/src/app-project/ios/proshake/glitter-interface/BasicUtil.swift +43 -2
- package/src/app-project/ios/proshake/glitter-interface/Ecommerce.swift +56 -0
- package/src/app-project/ios/proshake.xcodeproj/project.xcworkspace/xcuserdata/jianzhi.wang.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/src/app-project/serverless/src/modules/database.js +1 -1
- package/src/app-project/serverless/src/modules/database.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.ts +171 -171
- package/src/controllers/template.d.ts +1 -1
- package/src/controllers/template.js +16 -16
- package/src/controllers/template.js.map +1 -1
- package/src/controllers/template.ts +98 -84
- package/src/modules/database.js +3 -1
- package/src/modules/database.js.map +1 -1
- package/src/modules/database.ts +185 -181
- package/src/modules/firebase.d.ts +17 -0
- package/src/modules/firebase.js +126 -0
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +169 -0
- package/src/public-config-initial/auto-fcm.js +8 -2
- package/src/public-config-initial/auto-fcm.js.map +1 -1
- package/src/public-config-initial/auto-fcm.ts +15 -6
- package/src/services/app.d.ts +2 -1
- package/src/services/app.js.map +1 -1
- package/src/services/app.ts +2 -1
- package/src/services/ios-project.js +12 -6
- package/src/services/ios-project.js.map +1 -1
- package/src/services/ios-project.ts +12 -6
- package/src/services/template.d.ts +3 -2
- package/src/services/template.js +2 -1
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +13 -20
|
@@ -35,11 +35,28 @@ export class ShoppingSettingAdvance {
|
|
|
35
35
|
BgWidget.mainCard([
|
|
36
36
|
html `
|
|
37
37
|
<div class="guide5-4">
|
|
38
|
-
<div class="d-flex align-items-center">
|
|
39
|
-
<div
|
|
40
|
-
|
|
38
|
+
<div class="d-flex align-items-center justify-content-between">
|
|
39
|
+
<div>
|
|
40
|
+
<div class="d-flex align-items-center">
|
|
41
|
+
<div style="color: #393939; font-weight: 700;">${carTitle}標籤</div>
|
|
42
|
+
${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
|
|
43
|
+
</div>
|
|
44
|
+
${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
|
|
45
|
+
</div>
|
|
46
|
+
${BgWidget.blueNote('使用現有標籤', gvc.event(() => {
|
|
47
|
+
var _a;
|
|
48
|
+
BgProduct.useProductTags({
|
|
49
|
+
gvc,
|
|
50
|
+
config_key: 'product_general_tags',
|
|
51
|
+
config_lang: vm.language,
|
|
52
|
+
def: (_a = postMD.product_tag.language[vm.language]) !== null && _a !== void 0 ? _a : [],
|
|
53
|
+
callback: tags => {
|
|
54
|
+
postMD.product_tag.language[vm.language] = tags;
|
|
55
|
+
gvc.notifyDataChange(id);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}))}
|
|
41
59
|
</div>
|
|
42
|
-
${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
|
|
43
60
|
${BgWidget.multipleInput(gvc, postMD.product_tag.language[vm.language], {
|
|
44
61
|
save: def => {
|
|
45
62
|
postMD.product_tag.language[vm.language] = def;
|
|
@@ -48,15 +65,29 @@ export class ShoppingSettingAdvance {
|
|
|
48
65
|
</div>
|
|
49
66
|
`,
|
|
50
67
|
html `
|
|
51
|
-
<div>
|
|
52
|
-
<div
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
<div class="d-flex align-items-center justify-content-between">
|
|
69
|
+
<div>
|
|
70
|
+
<div style="color: #393939; font-weight: 700;">${carTitle}管理員標籤</div>
|
|
71
|
+
${BgWidget.grayNote('操作後台人員登記與分類用,不會顯示於前台')} ${BgWidget.mbContainer(4)}
|
|
72
|
+
</div>
|
|
73
|
+
${BgWidget.blueNote('使用現有標籤', gvc.event(() => {
|
|
74
|
+
var _a;
|
|
75
|
+
BgProduct.useProductTags({
|
|
76
|
+
gvc,
|
|
77
|
+
config_key: 'product_manager_tags',
|
|
78
|
+
def: (_a = postMD.product_customize_tag) !== null && _a !== void 0 ? _a : [],
|
|
79
|
+
callback: tags => {
|
|
80
|
+
postMD.product_customize_tag = tags;
|
|
81
|
+
gvc.notifyDataChange(id);
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}))}
|
|
85
|
+
</div>
|
|
86
|
+
${BgWidget.multipleInput(gvc, (_a = postMD.product_customize_tag) !== null && _a !== void 0 ? _a : [], {
|
|
55
87
|
save: def => {
|
|
56
|
-
postMD.product_customize_tag = def;
|
|
88
|
+
postMD.product_customize_tag = [...new Set(def)];
|
|
57
89
|
},
|
|
58
|
-
})}
|
|
59
|
-
</div>
|
|
90
|
+
}, true)}
|
|
60
91
|
`,
|
|
61
92
|
html ` <div class="d-flex align-items-center gap-2">
|
|
62
93
|
<div style="color: #393939; font-weight: 700;">${carTitle}促銷標籤</div>
|
|
@@ -430,7 +461,7 @@ export class ShoppingSettingAdvance {
|
|
|
430
461
|
};
|
|
431
462
|
const isDesktop = document.body.clientWidth > 768;
|
|
432
463
|
const getIndexStyle = (index) => index === 0
|
|
433
|
-
? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 :
|
|
464
|
+
? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 : 200}px; max-width: ${isDesktop ? 250 : 200}px;position: sticky; left: 0; background: #fff; box-shadow: 1px 0px 0px 0px rgba(0, 0, 0, 0.10);`
|
|
434
465
|
: 'height: 100%; padding: 0; text-align: center; justify-content: center; min-width: 126px;';
|
|
435
466
|
const resetPostList = (result, type) => {
|
|
436
467
|
var _a, _b, _c;
|
|
@@ -695,13 +726,23 @@ export class ShoppingSettingAdvance {
|
|
|
695
726
|
}
|
|
696
727
|
else {
|
|
697
728
|
const scrollDiv = document.getElementById('scrollDiv');
|
|
698
|
-
if (
|
|
699
|
-
scrollDiv
|
|
700
|
-
const status = scrollDiv.scrollLeft >
|
|
729
|
+
if (scrollDiv) {
|
|
730
|
+
function setStatus(scrollDiv, delta = 360) {
|
|
731
|
+
const status = scrollDiv.scrollLeft > delta;
|
|
701
732
|
if (priceVM.showPriceDetail !== status) {
|
|
702
733
|
priceVM.showPriceDetail = status;
|
|
703
734
|
}
|
|
704
|
-
}
|
|
735
|
+
}
|
|
736
|
+
if (isDesktop) {
|
|
737
|
+
scrollDiv.addEventListener('scroll', () => {
|
|
738
|
+
setStatus(scrollDiv);
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
else {
|
|
742
|
+
scrollDiv.addEventListener('touchmove', () => {
|
|
743
|
+
setStatus(scrollDiv);
|
|
744
|
+
});
|
|
745
|
+
}
|
|
705
746
|
}
|
|
706
747
|
}
|
|
707
748
|
},
|
|
@@ -3,6 +3,7 @@ import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
|
3
3
|
import { BgProduct, OptionsItem } from '../backend-manager/bg-product.js';
|
|
4
4
|
import { ApiPageConfig } from '../api/pageConfig.js';
|
|
5
5
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
6
|
+
import { LanguageLocation } from '../glitter-base/global/language.js';
|
|
6
7
|
import { ShipmentConfig } from '../glitter-base/global/shipment-config.js';
|
|
7
8
|
import { QuestionInfo } from './module/question-info.js';
|
|
8
9
|
import { Tool } from '../modules/tool.js';
|
|
@@ -16,7 +17,7 @@ export class ShoppingSettingAdvance {
|
|
|
16
17
|
vm: any;
|
|
17
18
|
vm2: {
|
|
18
19
|
id: string;
|
|
19
|
-
language:
|
|
20
|
+
language: LanguageLocation;
|
|
20
21
|
content_detail: any;
|
|
21
22
|
};
|
|
22
23
|
reload: () => void;
|
|
@@ -45,11 +46,30 @@ export class ShoppingSettingAdvance {
|
|
|
45
46
|
[
|
|
46
47
|
html`
|
|
47
48
|
<div class="guide5-4">
|
|
48
|
-
<div class="d-flex align-items-center">
|
|
49
|
-
<div
|
|
50
|
-
|
|
49
|
+
<div class="d-flex align-items-center justify-content-between">
|
|
50
|
+
<div>
|
|
51
|
+
<div class="d-flex align-items-center">
|
|
52
|
+
<div style="color: #393939; font-weight: 700;">${carTitle}標籤</div>
|
|
53
|
+
${BgWidget.languageInsignia(vm.language, 'margin-left:5px;')}
|
|
54
|
+
</div>
|
|
55
|
+
${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
|
|
56
|
+
</div>
|
|
57
|
+
${BgWidget.blueNote(
|
|
58
|
+
'使用現有標籤',
|
|
59
|
+
gvc.event(() => {
|
|
60
|
+
BgProduct.useProductTags({
|
|
61
|
+
gvc,
|
|
62
|
+
config_key: 'product_general_tags',
|
|
63
|
+
config_lang: vm.language,
|
|
64
|
+
def: (postMD.product_tag.language as any)[vm.language] ?? [],
|
|
65
|
+
callback: tags => {
|
|
66
|
+
(postMD.product_tag.language as any)[vm.language] = tags;
|
|
67
|
+
gvc.notifyDataChange(id);
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
})
|
|
71
|
+
)}
|
|
51
72
|
</div>
|
|
52
|
-
${BgWidget.grayNote('用戶於前台搜尋標籤,即可搜尋到此' + carTitle)} ${BgWidget.mbContainer(4)}
|
|
53
73
|
${BgWidget.multipleInput(gvc, (postMD.product_tag.language as any)[vm.language], {
|
|
54
74
|
save: def => {
|
|
55
75
|
(postMD.product_tag.language as any)[vm.language] = def;
|
|
@@ -58,15 +78,36 @@ export class ShoppingSettingAdvance {
|
|
|
58
78
|
</div>
|
|
59
79
|
`,
|
|
60
80
|
html`
|
|
61
|
-
<div>
|
|
62
|
-
<div
|
|
63
|
-
|
|
64
|
-
|
|
81
|
+
<div class="d-flex align-items-center justify-content-between">
|
|
82
|
+
<div>
|
|
83
|
+
<div style="color: #393939; font-weight: 700;">${carTitle}管理員標籤</div>
|
|
84
|
+
${BgWidget.grayNote('操作後台人員登記與分類用,不會顯示於前台')} ${BgWidget.mbContainer(4)}
|
|
85
|
+
</div>
|
|
86
|
+
${BgWidget.blueNote(
|
|
87
|
+
'使用現有標籤',
|
|
88
|
+
gvc.event(() => {
|
|
89
|
+
BgProduct.useProductTags({
|
|
90
|
+
gvc,
|
|
91
|
+
config_key: 'product_manager_tags',
|
|
92
|
+
def: postMD.product_customize_tag ?? [],
|
|
93
|
+
callback: tags => {
|
|
94
|
+
postMD.product_customize_tag = tags;
|
|
95
|
+
gvc.notifyDataChange(id);
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
})
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
${BgWidget.multipleInput(
|
|
102
|
+
gvc,
|
|
103
|
+
postMD.product_customize_tag ?? [],
|
|
104
|
+
{
|
|
65
105
|
save: def => {
|
|
66
|
-
postMD.product_customize_tag = def;
|
|
106
|
+
postMD.product_customize_tag = [...new Set(def)];
|
|
67
107
|
},
|
|
68
|
-
}
|
|
69
|
-
|
|
108
|
+
},
|
|
109
|
+
true
|
|
110
|
+
)}
|
|
70
111
|
`,
|
|
71
112
|
html` <div class="d-flex align-items-center gap-2">
|
|
72
113
|
<div style="color: #393939; font-weight: 700;">${carTitle}促銷標籤</div>
|
|
@@ -141,7 +182,7 @@ export class ShoppingSettingAdvance {
|
|
|
141
182
|
type: 'text',
|
|
142
183
|
placeHolder: '數字越大商品排序會越靠前',
|
|
143
184
|
callback: (text: any) => {
|
|
144
|
-
postMD.sort_weight=text
|
|
185
|
+
postMD.sort_weight = text;
|
|
145
186
|
gvc.notifyDataChange(id);
|
|
146
187
|
},
|
|
147
188
|
})}
|
|
@@ -478,7 +519,7 @@ export class ShoppingSettingAdvance {
|
|
|
478
519
|
|
|
479
520
|
const getIndexStyle = (index: number) =>
|
|
480
521
|
index === 0
|
|
481
|
-
? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 :
|
|
522
|
+
? `height: 100%; padding: 0; min-width: ${isDesktop ? 250 : 200}px; max-width: ${isDesktop ? 250 : 200}px;position: sticky; left: 0; background: #fff; box-shadow: 1px 0px 0px 0px rgba(0, 0, 0, 0.10);`
|
|
482
523
|
: 'height: 100%; padding: 0; text-align: center; justify-content: center; min-width: 126px;';
|
|
483
524
|
|
|
484
525
|
const resetPostList = (result: string[], type: MultiSaleType) => {
|
|
@@ -759,13 +800,23 @@ export class ShoppingSettingAdvance {
|
|
|
759
800
|
} else {
|
|
760
801
|
// 滾動監視事件
|
|
761
802
|
const scrollDiv = document.getElementById('scrollDiv');
|
|
762
|
-
if (
|
|
763
|
-
scrollDiv
|
|
764
|
-
const status = scrollDiv.scrollLeft >
|
|
803
|
+
if (scrollDiv) {
|
|
804
|
+
function setStatus(scrollDiv: HTMLElement, delta: number = 360) {
|
|
805
|
+
const status = scrollDiv.scrollLeft > delta;
|
|
765
806
|
if (priceVM.showPriceDetail !== status) {
|
|
766
807
|
priceVM.showPriceDetail = status;
|
|
767
808
|
}
|
|
768
|
-
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
if (isDesktop) {
|
|
812
|
+
scrollDiv.addEventListener('scroll', () => {
|
|
813
|
+
setStatus(scrollDiv);
|
|
814
|
+
});
|
|
815
|
+
} else {
|
|
816
|
+
scrollDiv.addEventListener('touchmove', () => {
|
|
817
|
+
setStatus(scrollDiv);
|
|
818
|
+
});
|
|
819
|
+
}
|
|
769
820
|
}
|
|
770
821
|
}
|
|
771
822
|
},
|
|
@@ -238,7 +238,8 @@ export class StockHistory {
|
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
240
|
key: '總金額',
|
|
241
|
-
value: `<span class="fs-7">$ ${dd.content.product_list
|
|
241
|
+
value: `<span class="fs-7">$ ${dd.content.product_list
|
|
242
|
+
.reduce((sum, item) => {
|
|
242
243
|
var _a, _b;
|
|
243
244
|
if (dd.type === 'restocking') {
|
|
244
245
|
return sum + item.cost * ((_a = item.transfer_count) !== null && _a !== void 0 ? _a : 0);
|
|
@@ -246,7 +247,8 @@ export class StockHistory {
|
|
|
246
247
|
else {
|
|
247
248
|
return sum + item.cost * ((_b = item.recent_count) !== null && _b !== void 0 ? _b : 0);
|
|
248
249
|
}
|
|
249
|
-
}, 0)
|
|
250
|
+
}, 0)
|
|
251
|
+
.toLocaleString()}</span>`,
|
|
250
252
|
},
|
|
251
253
|
{
|
|
252
254
|
key: '供應商',
|
|
@@ -1039,7 +1041,7 @@ export class StockHistory {
|
|
|
1039
1041
|
filter: [],
|
|
1040
1042
|
hiddenPageSplit: true,
|
|
1041
1043
|
}),
|
|
1042
|
-
html
|
|
1044
|
+
html ` <div
|
|
1043
1045
|
class="w-100 d-flex align-items-center justify-content-center cursor_pointer"
|
|
1044
1046
|
style="color: #36B; font-size: 16px; font-weight: 400;"
|
|
1045
1047
|
onclick="${gvc.event(() => {
|
|
@@ -1119,7 +1121,7 @@ export class StockHistory {
|
|
|
1119
1121
|
filter: [],
|
|
1120
1122
|
hiddenPageSplit: true,
|
|
1121
1123
|
}),
|
|
1122
|
-
html
|
|
1124
|
+
html ` <div
|
|
1123
1125
|
class="w-100 d-flex align-items-center justify-content-center cursor_pointer"
|
|
1124
1126
|
style="color: #36B; font-size: 16px; font-weight: 400;"
|
|
1125
1127
|
onclick="${gvc.event(() => {
|
|
@@ -1621,13 +1623,13 @@ export class StockHistory {
|
|
|
1621
1623
|
}
|
|
1622
1624
|
const priceHTML = (obj) => {
|
|
1623
1625
|
var _a, _b;
|
|
1624
|
-
return html
|
|
1626
|
+
return html ` <div class="d-flex w-100 mb-2">
|
|
1625
1627
|
<div class="flex-fill"></div>
|
|
1626
1628
|
<div class="d-flex justify-content-between" style="width: 250px;">
|
|
1627
1629
|
<div class="${(_a = obj.className) !== null && _a !== void 0 ? _a : ''}">${obj.name}</div>
|
|
1628
1630
|
${obj.incompletion
|
|
1629
|
-
? html
|
|
1630
|
-
: html
|
|
1631
|
+
? html ` <div style="color: #8D8D8D">商品尚未核對完成</div>`
|
|
1632
|
+
: html ` <div class="${(_b = obj.className) !== null && _b !== void 0 ? _b : ''}">$ ${obj.price.toLocaleString()}</div>`}
|
|
1631
1633
|
</div>
|
|
1632
1634
|
</div>`;
|
|
1633
1635
|
};
|
|
@@ -1661,7 +1663,7 @@ export class StockHistory {
|
|
|
1661
1663
|
return a.time > b.time ? -1 : 1;
|
|
1662
1664
|
})
|
|
1663
1665
|
.map(log => {
|
|
1664
|
-
return html
|
|
1666
|
+
return html ` <div class="d-flex justify-content-between align-items-center mt-2">
|
|
1665
1667
|
<div class="d-flex align-items-center">
|
|
1666
1668
|
<div class="me-3">${log.time}</div>
|
|
1667
1669
|
<div class="me-1">${log.text}</div>
|
|
@@ -1740,11 +1742,12 @@ export class StockHistory {
|
|
|
1740
1742
|
switch (vm.type) {
|
|
1741
1743
|
case 'restocking':
|
|
1742
1744
|
return [
|
|
1743
|
-
html
|
|
1744
|
-
<div class="
|
|
1745
|
-
<div class="
|
|
1746
|
-
|
|
1747
|
-
|
|
1745
|
+
html `
|
|
1746
|
+
<div class="row">
|
|
1747
|
+
<div class="col-12 col-md-6">
|
|
1748
|
+
<div class="tx_normal">供應商</div>
|
|
1749
|
+
${BgWidget.mbContainer(8)}
|
|
1750
|
+
${gvc.bindView((() => {
|
|
1748
1751
|
const id = glitter.getUUID();
|
|
1749
1752
|
let dataList = [];
|
|
1750
1753
|
let loading = true;
|
|
@@ -1780,13 +1783,13 @@ export class StockHistory {
|
|
|
1780
1783
|
gvc.notifyDataChange(id);
|
|
1781
1784
|
},
|
|
1782
1785
|
clickElement: {
|
|
1783
|
-
html: html
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1786
|
+
html: html ` <div>新增供應商</div>
|
|
1787
|
+
<div>
|
|
1788
|
+
<i
|
|
1789
|
+
class="fa-solid fa-plus ps-2"
|
|
1790
|
+
style="font-size: 16px; height: 14px; width: 14px;"
|
|
1791
|
+
></i>
|
|
1792
|
+
</div>`,
|
|
1790
1793
|
event: gvc2 => {
|
|
1791
1794
|
const newVendorData = StockVendors.emptyData();
|
|
1792
1795
|
BgWidget.settingDialog({
|
|
@@ -1828,11 +1831,11 @@ export class StockHistory {
|
|
|
1828
1831
|
},
|
|
1829
1832
|
};
|
|
1830
1833
|
})())}
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1834
|
+
</div>
|
|
1835
|
+
<div class="col-12 col-md-6">
|
|
1836
|
+
<div class="tx_normal">庫存點</div>
|
|
1837
|
+
${BgWidget.mbContainer(8)}
|
|
1838
|
+
${gvc.bindView((() => {
|
|
1836
1839
|
const id = glitter.getUUID();
|
|
1837
1840
|
let dataList = [];
|
|
1838
1841
|
let loading = true;
|
|
@@ -1868,13 +1871,13 @@ export class StockHistory {
|
|
|
1868
1871
|
gvc.notifyDataChange(id);
|
|
1869
1872
|
},
|
|
1870
1873
|
clickElement: {
|
|
1871
|
-
html: html
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1874
|
+
html: html ` <div>新增庫存點</div>
|
|
1875
|
+
<div>
|
|
1876
|
+
<i
|
|
1877
|
+
class="fa-solid fa-plus ps-2"
|
|
1878
|
+
style="font-size: 16px; height: 14px; width: 14px;"
|
|
1879
|
+
></i>
|
|
1880
|
+
</div>`,
|
|
1878
1881
|
event: gvc2 => {
|
|
1879
1882
|
const newStoreData = StockStores.emptyData();
|
|
1880
1883
|
BgWidget.settingDialog({
|
|
@@ -1916,16 +1919,18 @@ export class StockHistory {
|
|
|
1916
1919
|
},
|
|
1917
1920
|
};
|
|
1918
1921
|
})())}
|
|
1922
|
+
</div>
|
|
1919
1923
|
</div>
|
|
1920
|
-
|
|
1924
|
+
`,
|
|
1921
1925
|
];
|
|
1922
1926
|
case 'transfer':
|
|
1923
1927
|
return [
|
|
1924
|
-
html
|
|
1925
|
-
<div class="
|
|
1926
|
-
<div class="
|
|
1927
|
-
|
|
1928
|
-
|
|
1928
|
+
html `
|
|
1929
|
+
<div class="row">
|
|
1930
|
+
<div class="col-12 col-md-6">
|
|
1931
|
+
<div class="tx_normal">調出庫存點</div>
|
|
1932
|
+
${BgWidget.mbContainer(8)}
|
|
1933
|
+
${gvc.bindView((() => {
|
|
1929
1934
|
const id = glitter.getUUID();
|
|
1930
1935
|
let dataList = [];
|
|
1931
1936
|
let loading = true;
|
|
@@ -1977,11 +1982,11 @@ export class StockHistory {
|
|
|
1977
1982
|
},
|
|
1978
1983
|
};
|
|
1979
1984
|
})())}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
+
</div>
|
|
1986
|
+
<div class="col-12 col-md-6">
|
|
1987
|
+
<div class="tx_normal">調入庫存點</div>
|
|
1988
|
+
${BgWidget.mbContainer(8)}
|
|
1989
|
+
${gvc.bindView((() => {
|
|
1985
1990
|
const id = glitter.getUUID();
|
|
1986
1991
|
let dataList = [];
|
|
1987
1992
|
let loading = true;
|
|
@@ -2033,16 +2038,18 @@ export class StockHistory {
|
|
|
2033
2038
|
},
|
|
2034
2039
|
};
|
|
2035
2040
|
})())}
|
|
2041
|
+
</div>
|
|
2036
2042
|
</div>
|
|
2037
|
-
|
|
2043
|
+
`,
|
|
2038
2044
|
];
|
|
2039
2045
|
case 'checking':
|
|
2040
2046
|
return [
|
|
2041
|
-
html
|
|
2042
|
-
<div class="
|
|
2043
|
-
<div class="
|
|
2044
|
-
|
|
2045
|
-
|
|
2047
|
+
html `
|
|
2048
|
+
<div class="row">
|
|
2049
|
+
<div class="col-12 col-md-6">
|
|
2050
|
+
<div class="tx_normal">盤點庫存點</div>
|
|
2051
|
+
${BgWidget.mbContainer(8)}
|
|
2052
|
+
${gvc.bindView((() => {
|
|
2046
2053
|
const id = glitter.getUUID();
|
|
2047
2054
|
let dataList = [];
|
|
2048
2055
|
let loading = true;
|
|
@@ -2096,8 +2103,9 @@ export class StockHistory {
|
|
|
2096
2103
|
},
|
|
2097
2104
|
};
|
|
2098
2105
|
})())}
|
|
2106
|
+
</div>
|
|
2099
2107
|
</div>
|
|
2100
|
-
|
|
2108
|
+
`,
|
|
2101
2109
|
];
|
|
2102
2110
|
}
|
|
2103
2111
|
}
|
|
@@ -2406,9 +2414,9 @@ export class StockHistory {
|
|
|
2406
2414
|
}
|
|
2407
2415
|
static vendorForm(gvc, data) {
|
|
2408
2416
|
var _a, _b, _c, _d, _e;
|
|
2409
|
-
return html
|
|
2417
|
+
return html ` <div class="row">
|
|
2410
2418
|
${[
|
|
2411
|
-
html
|
|
2419
|
+
html ` <div class="tx_normal">供應商名稱</div>
|
|
2412
2420
|
${BgWidget.mbContainer(4)}
|
|
2413
2421
|
${BgWidget.editeInput({
|
|
2414
2422
|
gvc: gvc,
|
|
@@ -2419,7 +2427,7 @@ export class StockHistory {
|
|
|
2419
2427
|
data.name = text;
|
|
2420
2428
|
},
|
|
2421
2429
|
})}`,
|
|
2422
|
-
html
|
|
2430
|
+
html ` <div class="tx_normal">供應商地址</div>
|
|
2423
2431
|
${BgWidget.mbContainer(4)}
|
|
2424
2432
|
${BgWidget.editeInput({
|
|
2425
2433
|
gvc: gvc,
|
|
@@ -2430,7 +2438,7 @@ export class StockHistory {
|
|
|
2430
2438
|
data.address = text;
|
|
2431
2439
|
},
|
|
2432
2440
|
})}`,
|
|
2433
|
-
html
|
|
2441
|
+
html ` <div class="tx_normal">聯絡人姓名</div>
|
|
2434
2442
|
${BgWidget.mbContainer(4)}
|
|
2435
2443
|
${BgWidget.editeInput({
|
|
2436
2444
|
gvc: gvc,
|
|
@@ -2441,7 +2449,7 @@ export class StockHistory {
|
|
|
2441
2449
|
data.manager_name = text;
|
|
2442
2450
|
},
|
|
2443
2451
|
})}`,
|
|
2444
|
-
html
|
|
2452
|
+
html ` <div class="tx_normal">電話</div>
|
|
2445
2453
|
${BgWidget.mbContainer(4)}
|
|
2446
2454
|
${BgWidget.editeInput({
|
|
2447
2455
|
gvc: gvc,
|
|
@@ -2471,9 +2479,9 @@ export class StockHistory {
|
|
|
2471
2479
|
}
|
|
2472
2480
|
static storeForm(gvc, data) {
|
|
2473
2481
|
var _a, _b, _c, _d, _e;
|
|
2474
|
-
return html
|
|
2482
|
+
return html ` <div class="row">
|
|
2475
2483
|
${[
|
|
2476
|
-
html
|
|
2484
|
+
html ` <div class="tx_normal">庫存點名稱</div>
|
|
2477
2485
|
${BgWidget.mbContainer(4)}
|
|
2478
2486
|
${BgWidget.editeInput({
|
|
2479
2487
|
gvc: gvc,
|
|
@@ -2484,7 +2492,7 @@ export class StockHistory {
|
|
|
2484
2492
|
data.name = text;
|
|
2485
2493
|
},
|
|
2486
2494
|
})}`,
|
|
2487
|
-
html
|
|
2495
|
+
html ` <div class="tx_normal">庫存點地址</div>
|
|
2488
2496
|
${BgWidget.mbContainer(4)}
|
|
2489
2497
|
${BgWidget.editeInput({
|
|
2490
2498
|
gvc: gvc,
|
|
@@ -2495,7 +2503,7 @@ export class StockHistory {
|
|
|
2495
2503
|
data.address = text;
|
|
2496
2504
|
},
|
|
2497
2505
|
})}`,
|
|
2498
|
-
html
|
|
2506
|
+
html ` <div class="tx_normal">聯絡人姓名</div>
|
|
2499
2507
|
${BgWidget.mbContainer(4)}
|
|
2500
2508
|
${BgWidget.editeInput({
|
|
2501
2509
|
gvc: gvc,
|
|
@@ -2506,7 +2514,7 @@ export class StockHistory {
|
|
|
2506
2514
|
data.manager_name = text;
|
|
2507
2515
|
},
|
|
2508
2516
|
})}`,
|
|
2509
|
-
html
|
|
2517
|
+
html ` <div class="tx_normal">電話</div>
|
|
2510
2518
|
${BgWidget.mbContainer(4)}
|
|
2511
2519
|
${BgWidget.editeInput({
|
|
2512
2520
|
gvc: gvc,
|
|
@@ -2637,7 +2645,7 @@ export class StockHistory {
|
|
|
2637
2645
|
return arr
|
|
2638
2646
|
.map(item => {
|
|
2639
2647
|
var _a;
|
|
2640
|
-
return html
|
|
2648
|
+
return html ` <div style="${document.body.clientWidth > 768 ? `width: ${(_a = item.width) !== null && _a !== void 0 ? _a : 20}%;` : ''}">
|
|
2641
2649
|
<div class="tx_700" style="margin-bottom: 8px;">${item.title}</div>
|
|
2642
2650
|
<div class="tx_normal">${item.value}</div>
|
|
2643
2651
|
</div>`;
|
|
@@ -3143,10 +3151,14 @@ export class StockHistory {
|
|
|
3143
3151
|
const spec = item.variant_content.spec;
|
|
3144
3152
|
const sku = item.variant_content.sku;
|
|
3145
3153
|
const barcode = item.variant_content.barcode;
|
|
3146
|
-
product_list.push(Object.assign(Object.assign({ variant_id: item.id, cost: 0, note: '', transfer_count: 0, check_count: 0 }, (origin !== null && origin !== void 0 ? origin : {})), { title: title, spec: spec && spec.length > 0 ? spec.join('/') : '單一規格', sku: sku !== null && sku !== void 0 ? sku : '', barcode: barcode !== null && barcode !== void 0 ? barcode : '' }));
|
|
3154
|
+
product_list.push(Object.assign(Object.assign({ variant_id: item.id, cost: 0, note: '', transfer_count: 0, product_id: item.product_content.id, check_count: 0 }, (origin !== null && origin !== void 0 ? origin : {})), { title: title, spec: spec && spec.length > 0 ? spec.join('/') : '單一規格', sku: sku !== null && sku !== void 0 ? sku : '', barcode: barcode !== null && barcode !== void 0 ? barcode : '' }));
|
|
3147
3155
|
});
|
|
3148
3156
|
}
|
|
3149
|
-
callback(
|
|
3157
|
+
callback(origins.filter((d1) => {
|
|
3158
|
+
return !product_list.find((dd) => {
|
|
3159
|
+
return d1.variant_id === dd.variant_id;
|
|
3160
|
+
});
|
|
3161
|
+
}).concat(product_list));
|
|
3150
3162
|
});
|
|
3151
3163
|
}
|
|
3152
3164
|
static getVariantInfo(dataList, callback) {
|