ts-glitter 21.3.8 → 21.4.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 +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-line.js +12 -1
- package/lowcode/backend-manager/bg-line.ts +16 -1
- package/lowcode/backend-manager/bg-notify.js +13 -2
- package/lowcode/backend-manager/bg-notify.ts +17 -2
- package/lowcode/backend-manager/bg-product.js +81 -30
- package/lowcode/backend-manager/bg-product.ts +95 -34
- package/lowcode/backend-manager/bg-recommend.js +109 -141
- package/lowcode/backend-manager/bg-recommend.ts +122 -144
- package/lowcode/backend-manager/bg-sns.js +14 -4
- package/lowcode/backend-manager/bg-sns.ts +18 -4
- package/lowcode/backend-manager/bg-widget.js +176 -12
- package/lowcode/backend-manager/bg-widget.ts +198 -13
- package/lowcode/cms-plugin/auto-fcm-advertise.js +13 -2
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +16 -2
- package/lowcode/cms-plugin/auto-fcm-history.js +13 -2
- package/lowcode/cms-plugin/auto-fcm-history.ts +16 -2
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/order-excel.js +18 -2
- package/lowcode/cms-plugin/module/order-excel.ts +20 -9
- package/lowcode/cms-plugin/module/product-setting.js +2 -1
- package/lowcode/cms-plugin/module/product-setting.ts +2 -1
- package/lowcode/cms-plugin/module/user-excel.js +1 -1
- package/lowcode/cms-plugin/module/user-excel.ts +2 -2
- package/lowcode/cms-plugin/pos-pages/payment-page.js +3 -2
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +11 -5
- package/lowcode/cms-plugin/pos-pages/products-page.ts +0 -1
- package/lowcode/cms-plugin/shopping-allowance-manager.js +3 -2
- package/lowcode/cms-plugin/shopping-allowance-manager.ts +3 -2
- package/lowcode/cms-plugin/shopping-discount-setting.js +2 -0
- package/lowcode/cms-plugin/shopping-discount-setting.ts +2 -0
- package/lowcode/cms-plugin/shopping-invoice-manager.js +7 -4
- package/lowcode/cms-plugin/shopping-invoice-manager.ts +12 -11
- package/lowcode/cms-plugin/shopping-order-manager.js +21 -4
- package/lowcode/cms-plugin/shopping-order-manager.ts +30 -11
- package/lowcode/cms-plugin/shopping-product-setting.js +45 -41
- package/lowcode/cms-plugin/shopping-product-setting.ts +55 -48
- package/lowcode/cms-plugin/shopping-rebate.js +52 -46
- package/lowcode/cms-plugin/shopping-rebate.ts +402 -396
- package/lowcode/cms-plugin/shopping-setting-advance.js +6 -6
- package/lowcode/cms-plugin/shopping-setting-advance.ts +7 -7
- package/lowcode/cms-plugin/shopping-setting-basic.js +44 -0
- package/lowcode/cms-plugin/shopping-setting-basic.ts +63 -1
- package/lowcode/cms-plugin/shopping-setting-stock-log.js +57 -0
- package/lowcode/cms-plugin/shopping-setting-stock-log.ts +101 -0
- package/lowcode/cms-plugin/user-list.js +10 -9
- package/lowcode/cms-plugin/user-list.ts +11 -8
- package/lowcode/css/editor.css +1 -1
- package/lowcode/form-view/editor/image-selector.js +83 -82
- package/lowcode/form-view/editor/image-selector.ts +115 -107
- package/lowcode/glitter-base/route/user.js +27 -34
- package/lowcode/glitter-base/route/user.ts +31 -40
- package/lowcode/glitterBundle/dialog/ShareDialog.js +1 -0
- package/lowcode/glitterBundle/dialog/ShareDialog.ts +2 -0
- package/lowcode/glitterBundle/dialog/dialog.js +2 -2
- package/lowcode/glitterBundle/dialog/dialog.ts +2 -2
- package/lowcode/glitterBundle/plugins/editor-elem.js +5 -11
- package/lowcode/glitterBundle/plugins/editor-elem.ts +11 -11
- package/lowcode/modules/image-library.js +836 -486
- package/lowcode/modules/image-library.ts +1760 -1418
- package/lowcode/modules/tool.js +10 -9
- package/lowcode/modules/tool.ts +11 -10
- package/lowcode/public-components/checkout/index.js +4 -2
- package/lowcode/public-components/checkout/index.ts +5 -3
- package/lowcode/public-models/product.ts +13 -0
- package/nxv0ptv53w.json +1 -0
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +2 -2
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +5 -2
- package/src/api-public/controllers/stock.js +1 -1
- package/src/api-public/controllers/stock.js.map +1 -1
- package/src/api-public/controllers/stock.ts +93 -81
- package/src/api-public/models/glitter-finance.js +2 -1
- package/src/api-public/models/glitter-finance.js.map +1 -1
- package/src/api-public/services/checkout-event.js +1 -0
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/checkout-event.ts +2 -2
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/diff-record.d.ts +25 -0
- package/src/api-public/services/diff-record.js +158 -0
- package/src/api-public/services/diff-record.js.map +1 -0
- package/src/api-public/services/diff-record.ts +217 -0
- package/src/api-public/services/ezpay/tool.d.ts +1 -0
- package/src/api-public/services/financial-serviceV2.js +7 -17
- package/src/api-public/services/financial-serviceV2.js.map +1 -1
- package/src/api-public/services/public-table-check.js +25 -7
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/public-table-check.ts +53 -31
- package/src/api-public/services/shopping.d.ts +2 -12
- package/src/api-public/services/shopping.js +16 -7
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +33 -7
- package/src/api-public/services/stock.d.ts +1 -1
- package/src/api-public/services/stock.js +19 -17
- package/src/api-public/services/stock.js.map +1 -1
- package/src/api-public/services/stock.ts +711 -696
- package/src/api-public/services/user.d.ts +1 -1
- package/src/api-public/services/user.js +25 -25
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +34 -27
- package/src/app-project/serverless/src/index.js +7 -17
- package/src/app-project/serverless/src/index.js.map +1 -1
- package/src/app-project/serverless/src/modules/CryptoJS.js +7 -17
- package/src/app-project/serverless/src/modules/CryptoJS.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/app-project/serverless/src/modules/ssh.js +7 -17
- package/src/app-project/serverless/src/modules/ssh.js.map +1 -1
- package/src/firebase/message.js +2 -1
- package/src/firebase/message.js.map +1 -1
- package/src/helper/app_creater.js +2 -1
- package/src/helper/app_creater.js.map +1 -1
- package/src/helper/glitter-util.d.ts +1 -0
- package/src/lambda/interface.js +2 -2
- package/src/lambda/interface.js.map +1 -1
- package/src/modules/CryptoJS.js +7 -17
- package/src/modules/CryptoJS.js.map +1 -1
- package/src/modules/database.d.ts +1 -1
- package/src/modules/ssh.js +7 -17
- package/src/modules/ssh.js.map +1 -1
- package/src/modules/tool.d.ts +5 -0
- package/src/modules/tool.js +19 -0
- package/src/modules/tool.js.map +1 -1
- package/src/modules/tool.ts +27 -0
- package/src/run.js +2 -1
- package/src/run.js.map +1 -1
- package/src/services/app.js +7 -17
- package/src/services/app.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/ses.js +2 -1
- package/src/services/ses.js.map +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -146,7 +146,7 @@ export class Entry {
|
|
|
146
146
|
}
|
|
147
147
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
148
148
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
149
|
-
glitter.share.editerVersion = 'V_21.
|
|
149
|
+
glitter.share.editerVersion = 'V_21.4.0';
|
|
150
150
|
glitter.share.start = new Date();
|
|
151
151
|
const vm = { appConfig: [] };
|
|
152
152
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -150,7 +150,7 @@ export class Entry {
|
|
|
150
150
|
}
|
|
151
151
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
152
152
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
153
|
-
glitter.share.editerVersion = 'V_21.
|
|
153
|
+
glitter.share.editerVersion = 'V_21.4.0';
|
|
154
154
|
glitter.share.start = new Date();
|
|
155
155
|
const vm = { appConfig: [] };
|
|
156
156
|
(window as any).saasConfig = {
|
|
@@ -821,6 +821,7 @@ export class BgLine {
|
|
|
821
821
|
page: 0,
|
|
822
822
|
limit: 99999,
|
|
823
823
|
id: tagData.filter.join(','),
|
|
824
|
+
only_id: true,
|
|
824
825
|
}).then(dd => {
|
|
825
826
|
dd.response.data.map((user) => {
|
|
826
827
|
if (user.userData.lineID) {
|
|
@@ -843,6 +844,7 @@ export class BgLine {
|
|
|
843
844
|
page: 0,
|
|
844
845
|
limit: 99999,
|
|
845
846
|
group: { type: 'level', tag: id },
|
|
847
|
+
only_id: true,
|
|
846
848
|
}).then(data => {
|
|
847
849
|
data.response.data.map((user) => {
|
|
848
850
|
if (user.userData.lineID) {
|
|
@@ -876,6 +878,7 @@ export class BgLine {
|
|
|
876
878
|
page: 0,
|
|
877
879
|
limit: 99999,
|
|
878
880
|
group: { type: type },
|
|
881
|
+
only_id: true,
|
|
879
882
|
}).then(data => {
|
|
880
883
|
let dataArray = data.response.data;
|
|
881
884
|
if (data.response.extra) {
|
|
@@ -909,6 +912,7 @@ export class BgLine {
|
|
|
909
912
|
page: 0,
|
|
910
913
|
limit: 99999,
|
|
911
914
|
filter: { birth: tagData.filter },
|
|
915
|
+
only_id: true,
|
|
912
916
|
}).then(data => {
|
|
913
917
|
data.response.data.map((user) => {
|
|
914
918
|
if (user.userData.lineID) {
|
|
@@ -927,6 +931,7 @@ export class BgLine {
|
|
|
927
931
|
page: 0,
|
|
928
932
|
limit: 99999,
|
|
929
933
|
filter: { tags: tagData.filter },
|
|
934
|
+
only_id: true,
|
|
930
935
|
}).then(data => {
|
|
931
936
|
data.response.data.map((user) => {
|
|
932
937
|
if (user.userData.email) {
|
|
@@ -947,6 +952,7 @@ export class BgLine {
|
|
|
947
952
|
page: 0,
|
|
948
953
|
limit: 99999,
|
|
949
954
|
filter: { rebate: { key: 'moreThan', value: tagData.filter } },
|
|
955
|
+
only_id: true,
|
|
950
956
|
}).then(data => {
|
|
951
957
|
data.response.data.map((user) => {
|
|
952
958
|
if (user.userData.lineID) {
|
|
@@ -1021,11 +1027,15 @@ export class BgLine {
|
|
|
1021
1027
|
<div style="display:flex; align-items: center; gap: 18px; margin: 8px 0;">
|
|
1022
1028
|
<div class="tx_normal">${postData.userList.length}人</div>
|
|
1023
1029
|
${BgWidget.grayButton('查看名單', gvc.event(() => {
|
|
1030
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
1024
1031
|
if (postData.userList.length === 0) {
|
|
1025
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
1026
1032
|
dialog.infoMessage({ text: '目前無預計寄件的顧客' });
|
|
1027
1033
|
return;
|
|
1028
1034
|
}
|
|
1035
|
+
if (postData.userList.length > 500) {
|
|
1036
|
+
dialog.infoMessage({ text: '預覽人數超過500筆,請減少名單人數後再次開啟' });
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1029
1039
|
const userVM = {
|
|
1030
1040
|
dataList: [],
|
|
1031
1041
|
};
|
|
@@ -1041,6 +1051,7 @@ export class BgLine {
|
|
|
1041
1051
|
page: 0,
|
|
1042
1052
|
limit: 99999,
|
|
1043
1053
|
id: postData.userList.map(user => { var _a; return (_a = user.id) !== null && _a !== void 0 ? _a : 0; }).join(','),
|
|
1054
|
+
only_id: true,
|
|
1044
1055
|
}).then(dd => {
|
|
1045
1056
|
if (dd.response.data) {
|
|
1046
1057
|
userVM.dataList = dd.response.data.map((item) => {
|
|
@@ -927,6 +927,7 @@ export class BgLine {
|
|
|
927
927
|
page: 0,
|
|
928
928
|
limit: 99999,
|
|
929
929
|
id: tagData.filter.join(','),
|
|
930
|
+
only_id: true,
|
|
930
931
|
}).then(dd => {
|
|
931
932
|
dd.response.data.map((user: any) => {
|
|
932
933
|
if (user.userData.lineID) {
|
|
@@ -949,6 +950,7 @@ export class BgLine {
|
|
|
949
950
|
page: 0,
|
|
950
951
|
limit: 99999,
|
|
951
952
|
group: { type: 'level', tag: id },
|
|
953
|
+
only_id: true,
|
|
952
954
|
}).then(data => {
|
|
953
955
|
data.response.data.map((user: any) => {
|
|
954
956
|
if (user.userData.lineID) {
|
|
@@ -982,6 +984,7 @@ export class BgLine {
|
|
|
982
984
|
page: 0,
|
|
983
985
|
limit: 99999,
|
|
984
986
|
group: { type: type },
|
|
987
|
+
only_id: true,
|
|
985
988
|
}).then(data => {
|
|
986
989
|
// 加入額外的會員資料,例如有訂閱但未註冊者
|
|
987
990
|
let dataArray = data.response.data;
|
|
@@ -1016,6 +1019,7 @@ export class BgLine {
|
|
|
1016
1019
|
page: 0,
|
|
1017
1020
|
limit: 99999,
|
|
1018
1021
|
filter: { birth: tagData.filter },
|
|
1022
|
+
only_id: true,
|
|
1019
1023
|
}).then(data => {
|
|
1020
1024
|
data.response.data.map((user: any) => {
|
|
1021
1025
|
if (user.userData.lineID) {
|
|
@@ -1034,6 +1038,7 @@ export class BgLine {
|
|
|
1034
1038
|
page: 0,
|
|
1035
1039
|
limit: 99999,
|
|
1036
1040
|
filter: { tags: tagData.filter },
|
|
1041
|
+
only_id: true,
|
|
1037
1042
|
}).then(data => {
|
|
1038
1043
|
data.response.data.map((user: any) => {
|
|
1039
1044
|
if (user.userData.email) {
|
|
@@ -1054,6 +1059,7 @@ export class BgLine {
|
|
|
1054
1059
|
page: 0,
|
|
1055
1060
|
limit: 99999,
|
|
1056
1061
|
filter: { rebate: { key: 'moreThan', value: tagData.filter } },
|
|
1062
|
+
only_id: true,
|
|
1057
1063
|
}).then(data => {
|
|
1058
1064
|
data.response.data.map((user: any) => {
|
|
1059
1065
|
if (user.userData.lineID) {
|
|
@@ -1142,14 +1148,22 @@ export class BgLine {
|
|
|
1142
1148
|
${BgWidget.grayButton(
|
|
1143
1149
|
'查看名單',
|
|
1144
1150
|
gvc.event(() => {
|
|
1151
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
1152
|
+
|
|
1145
1153
|
if (postData.userList.length === 0) {
|
|
1146
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
1147
1154
|
dialog.infoMessage({ text: '目前無預計寄件的顧客' });
|
|
1148
1155
|
return;
|
|
1149
1156
|
}
|
|
1157
|
+
|
|
1158
|
+
if (postData.userList.length > 500) {
|
|
1159
|
+
dialog.infoMessage({ text: '預覽人數超過500筆,請減少名單人數後再次開啟' });
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1150
1163
|
const userVM = {
|
|
1151
1164
|
dataList: [] as { key: string; value: string; note: string }[],
|
|
1152
1165
|
};
|
|
1166
|
+
|
|
1153
1167
|
BgWidget.selectDropDialog({
|
|
1154
1168
|
gvc: gvc,
|
|
1155
1169
|
title: '預計寄件顧客',
|
|
@@ -1162,6 +1176,7 @@ export class BgLine {
|
|
|
1162
1176
|
page: 0,
|
|
1163
1177
|
limit: 99999,
|
|
1164
1178
|
id: postData.userList.map(user => user.id ?? 0).join(','),
|
|
1179
|
+
only_id: true,
|
|
1165
1180
|
}).then(dd => {
|
|
1166
1181
|
if (dd.response.data) {
|
|
1167
1182
|
userVM.dataList = dd.response.data.map(
|
|
@@ -880,6 +880,7 @@ export class BgNotify {
|
|
|
880
880
|
page: 0,
|
|
881
881
|
limit: 99999,
|
|
882
882
|
id: tagData.filter.join(','),
|
|
883
|
+
only_id: true,
|
|
883
884
|
}).then(dd => {
|
|
884
885
|
dd.response.data.map((user) => {
|
|
885
886
|
if (user.userData.email && user.userData.email.length > 0) {
|
|
@@ -901,6 +902,7 @@ export class BgNotify {
|
|
|
901
902
|
page: 0,
|
|
902
903
|
limit: 99999,
|
|
903
904
|
group: { type: 'level', tag: id },
|
|
905
|
+
only_id: true,
|
|
904
906
|
}).then(data => {
|
|
905
907
|
data.response.data.map((user) => {
|
|
906
908
|
if (user.userData.email) {
|
|
@@ -933,6 +935,7 @@ export class BgNotify {
|
|
|
933
935
|
page: 0,
|
|
934
936
|
limit: 99999,
|
|
935
937
|
group: { type: type },
|
|
938
|
+
only_id: true,
|
|
936
939
|
}).then(data => {
|
|
937
940
|
let dataArray = data.response.data;
|
|
938
941
|
if (data.response.extra) {
|
|
@@ -965,6 +968,7 @@ export class BgNotify {
|
|
|
965
968
|
page: 0,
|
|
966
969
|
limit: 99999,
|
|
967
970
|
filter: { birth: tagData.filter },
|
|
971
|
+
only_id: true,
|
|
968
972
|
}).then(data => {
|
|
969
973
|
data.response.data.map((user) => {
|
|
970
974
|
if (user.userData.email) {
|
|
@@ -982,6 +986,7 @@ export class BgNotify {
|
|
|
982
986
|
page: 0,
|
|
983
987
|
limit: 99999,
|
|
984
988
|
filter: { tags: tagData.filter },
|
|
989
|
+
only_id: true,
|
|
985
990
|
}).then(data => {
|
|
986
991
|
data.response.data.map((user) => {
|
|
987
992
|
if (user.userData.email) {
|
|
@@ -1001,6 +1006,7 @@ export class BgNotify {
|
|
|
1001
1006
|
page: 0,
|
|
1002
1007
|
limit: 99999,
|
|
1003
1008
|
filter: { rebate: { key: 'moreThan', value: tagData.filter } },
|
|
1009
|
+
only_id: true,
|
|
1004
1010
|
}).then(data => {
|
|
1005
1011
|
data.response.data.map((user) => {
|
|
1006
1012
|
if (user.userData.email) {
|
|
@@ -1070,11 +1076,15 @@ export class BgNotify {
|
|
|
1070
1076
|
<div style="display:flex; align-items: center; gap: 18px; margin: 8px 0;">
|
|
1071
1077
|
<div class="tx_normal">${postData.userList.length}人</div>
|
|
1072
1078
|
${BgWidget.grayButton('查看名單', gvc.event(() => {
|
|
1079
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
1073
1080
|
if (postData.userList.length === 0) {
|
|
1074
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
1075
1081
|
dialog.infoMessage({ text: '目前無預計寄件的顧客' });
|
|
1076
1082
|
return;
|
|
1077
1083
|
}
|
|
1084
|
+
if (postData.userList.length > 500) {
|
|
1085
|
+
dialog.infoMessage({ text: '預覽人數超過500筆,請減少名單人數後再次開啟' });
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1078
1088
|
const userVM = {
|
|
1079
1089
|
dataList: [],
|
|
1080
1090
|
};
|
|
@@ -1090,6 +1100,7 @@ export class BgNotify {
|
|
|
1090
1100
|
page: 0,
|
|
1091
1101
|
limit: 99999,
|
|
1092
1102
|
id: postData.userList.map(user => { var _a; return (_a = user.id) !== null && _a !== void 0 ? _a : 0; }).join(','),
|
|
1103
|
+
only_id: true,
|
|
1093
1104
|
}).then(dd => {
|
|
1094
1105
|
if (dd.response.data) {
|
|
1095
1106
|
userVM.dataList = dd.response.data.map((item) => {
|
|
@@ -1247,8 +1258,8 @@ export class BgNotify {
|
|
|
1247
1258
|
ApiUser.getUserList({
|
|
1248
1259
|
page: 0,
|
|
1249
1260
|
limit: 99999,
|
|
1250
|
-
only_id: true,
|
|
1251
1261
|
search: data.query,
|
|
1262
|
+
only_id: true,
|
|
1252
1263
|
}).then(dd => {
|
|
1253
1264
|
if (dd.response.data) {
|
|
1254
1265
|
vm.dataList = dd.response.data
|
|
@@ -984,6 +984,7 @@ export class BgNotify {
|
|
|
984
984
|
page: 0,
|
|
985
985
|
limit: 99999,
|
|
986
986
|
id: tagData.filter.join(','),
|
|
987
|
+
only_id: true,
|
|
987
988
|
}).then(dd => {
|
|
988
989
|
dd.response.data.map((user: any) => {
|
|
989
990
|
if (user.userData.email && user.userData.email.length > 0) {
|
|
@@ -1005,6 +1006,7 @@ export class BgNotify {
|
|
|
1005
1006
|
page: 0,
|
|
1006
1007
|
limit: 99999,
|
|
1007
1008
|
group: { type: 'level', tag: id },
|
|
1009
|
+
only_id: true,
|
|
1008
1010
|
}).then(data => {
|
|
1009
1011
|
data.response.data.map((user: any) => {
|
|
1010
1012
|
if (user.userData.email) {
|
|
@@ -1037,6 +1039,7 @@ export class BgNotify {
|
|
|
1037
1039
|
page: 0,
|
|
1038
1040
|
limit: 99999,
|
|
1039
1041
|
group: { type: type },
|
|
1042
|
+
only_id: true,
|
|
1040
1043
|
}).then(data => {
|
|
1041
1044
|
// 加入額外的會員資料,例如有訂閱但未註冊者
|
|
1042
1045
|
let dataArray = data.response.data;
|
|
@@ -1070,6 +1073,7 @@ export class BgNotify {
|
|
|
1070
1073
|
page: 0,
|
|
1071
1074
|
limit: 99999,
|
|
1072
1075
|
filter: { birth: tagData.filter },
|
|
1076
|
+
only_id: true,
|
|
1073
1077
|
}).then(data => {
|
|
1074
1078
|
data.response.data.map((user: any) => {
|
|
1075
1079
|
if (user.userData.email) {
|
|
@@ -1087,6 +1091,7 @@ export class BgNotify {
|
|
|
1087
1091
|
page: 0,
|
|
1088
1092
|
limit: 99999,
|
|
1089
1093
|
filter: { tags: tagData.filter },
|
|
1094
|
+
only_id: true,
|
|
1090
1095
|
}).then(data => {
|
|
1091
1096
|
data.response.data.map((user: any) => {
|
|
1092
1097
|
if (user.userData.email) {
|
|
@@ -1106,6 +1111,7 @@ export class BgNotify {
|
|
|
1106
1111
|
page: 0,
|
|
1107
1112
|
limit: 99999,
|
|
1108
1113
|
filter: { rebate: { key: 'moreThan', value: tagData.filter } },
|
|
1114
|
+
only_id: true,
|
|
1109
1115
|
}).then(data => {
|
|
1110
1116
|
data.response.data.map((user: any) => {
|
|
1111
1117
|
if (user.userData.email) {
|
|
@@ -1183,14 +1189,22 @@ export class BgNotify {
|
|
|
1183
1189
|
${BgWidget.grayButton(
|
|
1184
1190
|
'查看名單',
|
|
1185
1191
|
gvc.event(() => {
|
|
1192
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
1193
|
+
|
|
1186
1194
|
if (postData.userList.length === 0) {
|
|
1187
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
1188
1195
|
dialog.infoMessage({ text: '目前無預計寄件的顧客' });
|
|
1189
1196
|
return;
|
|
1190
1197
|
}
|
|
1198
|
+
|
|
1199
|
+
if (postData.userList.length > 500) {
|
|
1200
|
+
dialog.infoMessage({ text: '預覽人數超過500筆,請減少名單人數後再次開啟' });
|
|
1201
|
+
return;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1191
1204
|
const userVM = {
|
|
1192
1205
|
dataList: [] as { key: string; value: string; note: string }[],
|
|
1193
1206
|
};
|
|
1207
|
+
|
|
1194
1208
|
BgWidget.selectDropDialog({
|
|
1195
1209
|
gvc: gvc,
|
|
1196
1210
|
title: '預計寄件顧客',
|
|
@@ -1203,6 +1217,7 @@ export class BgNotify {
|
|
|
1203
1217
|
page: 0,
|
|
1204
1218
|
limit: 99999,
|
|
1205
1219
|
id: postData.userList.map(user => user.id ?? 0).join(','),
|
|
1220
|
+
only_id: true,
|
|
1206
1221
|
}).then(dd => {
|
|
1207
1222
|
if (dd.response.data) {
|
|
1208
1223
|
userVM.dataList = dd.response.data.map(
|
|
@@ -1369,8 +1384,8 @@ export class BgNotify {
|
|
|
1369
1384
|
ApiUser.getUserList({
|
|
1370
1385
|
page: 0,
|
|
1371
1386
|
limit: 99999,
|
|
1372
|
-
only_id: true,
|
|
1373
1387
|
search: data.query,
|
|
1388
|
+
only_id: true,
|
|
1374
1389
|
}).then(dd => {
|
|
1375
1390
|
if (dd.response.data) {
|
|
1376
1391
|
vm.dataList = dd.response.data
|
|
@@ -54,7 +54,22 @@ export class BgProduct {
|
|
|
54
54
|
query: '',
|
|
55
55
|
queryType: 'title',
|
|
56
56
|
orderString: '',
|
|
57
|
+
manager_tag: [],
|
|
57
58
|
};
|
|
59
|
+
gvc.addStyle(`
|
|
60
|
+
.bg-product-main {
|
|
61
|
+
gap: 12px;
|
|
62
|
+
min-height: 480px;
|
|
63
|
+
max-height: 500px;
|
|
64
|
+
border: ${document.body.clientWidth > 800 ? 16 : 8}px solid #fff;
|
|
65
|
+
}
|
|
66
|
+
.bg-product-topbar {
|
|
67
|
+
gap: 6px;
|
|
68
|
+
position: sticky;
|
|
69
|
+
top: 0px;
|
|
70
|
+
background-color: #fff;
|
|
71
|
+
}
|
|
72
|
+
`);
|
|
58
73
|
return html ` <div
|
|
59
74
|
class="bg-white shadow rounded-3"
|
|
60
75
|
style="overflow-y: auto; ${document.body.clientWidth > 768
|
|
@@ -68,6 +83,57 @@ export class BgProduct {
|
|
|
68
83
|
if (vm.loading) {
|
|
69
84
|
return html `<div class="my-5">${BgWidget.spinner()}</div>`;
|
|
70
85
|
}
|
|
86
|
+
function selectBar() {
|
|
87
|
+
return BgWidget.selectFilter({
|
|
88
|
+
gvc,
|
|
89
|
+
callback: (value) => {
|
|
90
|
+
vm.queryType = value;
|
|
91
|
+
gvc.notifyDataChange(vm.id);
|
|
92
|
+
},
|
|
93
|
+
default: vm.queryType || 'title',
|
|
94
|
+
options: FilterOptions.productSelect,
|
|
95
|
+
style: 'min-width: 120px;',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function searchBar() {
|
|
99
|
+
return gvc.bindView({
|
|
100
|
+
bind: gvc.glitter.getUUID(),
|
|
101
|
+
dataList: [{ obj: vm, key: 'queryType' }],
|
|
102
|
+
view: () => {
|
|
103
|
+
if (vm.queryType === 'customize_tag') {
|
|
104
|
+
return BgWidget.searchTagsFilter(gvc, vm.manager_tag, tagArray => {
|
|
105
|
+
vm.query = '';
|
|
106
|
+
vm.manager_tag = tagArray;
|
|
107
|
+
vm.loading = true;
|
|
108
|
+
gvc.notifyDataChange(vm.id);
|
|
109
|
+
}, '搜尋');
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return BgWidget.searchFilter(gvc.event(e => {
|
|
113
|
+
vm.query = e.value;
|
|
114
|
+
vm.manager_tag = [];
|
|
115
|
+
vm.loading = true;
|
|
116
|
+
gvc.notifyDataChange(vm.id);
|
|
117
|
+
}), vm.query || '', '搜尋');
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
divCreate: {
|
|
121
|
+
class: 'w-100 position-relative',
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function updownButton() {
|
|
126
|
+
return BgWidget.updownFilter({
|
|
127
|
+
gvc,
|
|
128
|
+
callback: (value) => {
|
|
129
|
+
vm.orderString = value;
|
|
130
|
+
vm.loading = true;
|
|
131
|
+
gvc.notifyDataChange(vm.id);
|
|
132
|
+
},
|
|
133
|
+
default: vm.orderString || 'default',
|
|
134
|
+
options: FilterOptions.productOrderBy,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
71
137
|
return html ` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
|
|
72
138
|
<div class="w-100 d-flex align-items-center p-3 border-bottom">
|
|
73
139
|
<div class="tx_700">${(_a = obj.title) !== null && _a !== void 0 ? _a : '產品列表'}</div>
|
|
@@ -82,34 +148,17 @@ export class BgProduct {
|
|
|
82
148
|
</div>
|
|
83
149
|
<div class="c_dialog">
|
|
84
150
|
<div class="c_dialog_body">
|
|
85
|
-
<div class="c_dialog_main p-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})}
|
|
97
|
-
${BgWidget.searchFilter(gvc.event(e => {
|
|
98
|
-
vm.query = e.value;
|
|
99
|
-
vm.loading = true;
|
|
100
|
-
gvc.notifyDataChange(vm.id);
|
|
101
|
-
}), vm.query || '', '搜尋')}
|
|
102
|
-
${BgWidget.updownFilter({
|
|
103
|
-
gvc,
|
|
104
|
-
callback: (value) => {
|
|
105
|
-
vm.orderString = value;
|
|
106
|
-
vm.loading = true;
|
|
107
|
-
gvc.notifyDataChange(vm.id);
|
|
108
|
-
},
|
|
109
|
-
default: vm.orderString || 'default',
|
|
110
|
-
options: FilterOptions.productOrderBy,
|
|
111
|
-
})}
|
|
112
|
-
</div>
|
|
151
|
+
<div class="c_dialog_main p-0 bg-product-main">
|
|
152
|
+
${document.body.clientWidth > 768
|
|
153
|
+
? html ` <div class="d-flex pb-2 px-1 bg-product-topbar">
|
|
154
|
+
${selectBar()} ${searchBar()} ${updownButton()}
|
|
155
|
+
</div>`
|
|
156
|
+
: html `<div class="pb-2 px-1 bg-product-topbar">
|
|
157
|
+
<div class="d-flex align-items-center justify-content-between w-100 mb-1">
|
|
158
|
+
${selectBar()} ${updownButton()}
|
|
159
|
+
</div>
|
|
160
|
+
<div>${searchBar()}</div>
|
|
161
|
+
</div> `}
|
|
113
162
|
${gvc
|
|
114
163
|
.map(vm.options
|
|
115
164
|
.filter(dd => {
|
|
@@ -267,7 +316,7 @@ export class BgProduct {
|
|
|
267
316
|
},
|
|
268
317
|
onCreate: () => {
|
|
269
318
|
if (vm.loading) {
|
|
270
|
-
|
|
319
|
+
const apiJSON = {
|
|
271
320
|
page: 0,
|
|
272
321
|
limit: 99999,
|
|
273
322
|
search: vm.query,
|
|
@@ -284,7 +333,9 @@ export class BgProduct {
|
|
|
284
333
|
productType: obj.productType,
|
|
285
334
|
filter_visible: obj.filter_visible,
|
|
286
335
|
status: 'inRange',
|
|
287
|
-
|
|
336
|
+
manager_tag: vm.manager_tag.join(','),
|
|
337
|
+
};
|
|
338
|
+
ApiShop.getProduct(apiJSON).then(data => {
|
|
288
339
|
vm.options = [];
|
|
289
340
|
data.response.data.map((product) => {
|
|
290
341
|
var _a;
|
|
@@ -92,8 +92,24 @@ export class BgProduct {
|
|
|
92
92
|
query: '',
|
|
93
93
|
queryType: 'title',
|
|
94
94
|
orderString: '',
|
|
95
|
+
manager_tag: [] as string[],
|
|
95
96
|
};
|
|
96
97
|
|
|
98
|
+
gvc.addStyle(`
|
|
99
|
+
.bg-product-main {
|
|
100
|
+
gap: 12px;
|
|
101
|
+
min-height: 480px;
|
|
102
|
+
max-height: 500px;
|
|
103
|
+
border: ${document.body.clientWidth > 800 ? 16 : 8}px solid #fff;
|
|
104
|
+
}
|
|
105
|
+
.bg-product-topbar {
|
|
106
|
+
gap: 6px;
|
|
107
|
+
position: sticky;
|
|
108
|
+
top: 0px;
|
|
109
|
+
background-color: #fff;
|
|
110
|
+
}
|
|
111
|
+
`);
|
|
112
|
+
|
|
97
113
|
return html` <div
|
|
98
114
|
class="bg-white shadow rounded-3"
|
|
99
115
|
style="overflow-y: auto; ${document.body.clientWidth > 768
|
|
@@ -106,6 +122,69 @@ export class BgProduct {
|
|
|
106
122
|
if (vm.loading) {
|
|
107
123
|
return html`<div class="my-5">${BgWidget.spinner()}</div>`;
|
|
108
124
|
}
|
|
125
|
+
|
|
126
|
+
function selectBar() {
|
|
127
|
+
return BgWidget.selectFilter({
|
|
128
|
+
gvc,
|
|
129
|
+
callback: (value: any) => {
|
|
130
|
+
vm.queryType = value;
|
|
131
|
+
gvc.notifyDataChange(vm.id);
|
|
132
|
+
},
|
|
133
|
+
default: vm.queryType || 'title',
|
|
134
|
+
options: FilterOptions.productSelect,
|
|
135
|
+
style: 'min-width: 120px;',
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function searchBar() {
|
|
140
|
+
return gvc.bindView({
|
|
141
|
+
bind: gvc.glitter.getUUID(),
|
|
142
|
+
dataList: [{ obj: vm, key: 'queryType' }],
|
|
143
|
+
view: () => {
|
|
144
|
+
if (vm.queryType === 'customize_tag') {
|
|
145
|
+
return BgWidget.searchTagsFilter(
|
|
146
|
+
gvc,
|
|
147
|
+
vm.manager_tag,
|
|
148
|
+
tagArray => {
|
|
149
|
+
vm.query = '';
|
|
150
|
+
vm.manager_tag = tagArray;
|
|
151
|
+
vm.loading = true;
|
|
152
|
+
gvc.notifyDataChange(vm.id);
|
|
153
|
+
},
|
|
154
|
+
'搜尋'
|
|
155
|
+
);
|
|
156
|
+
} else {
|
|
157
|
+
return BgWidget.searchFilter(
|
|
158
|
+
gvc.event(e => {
|
|
159
|
+
vm.query = e.value;
|
|
160
|
+
vm.manager_tag = [];
|
|
161
|
+
vm.loading = true;
|
|
162
|
+
gvc.notifyDataChange(vm.id);
|
|
163
|
+
}),
|
|
164
|
+
vm.query || '',
|
|
165
|
+
'搜尋'
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
divCreate: {
|
|
170
|
+
class: 'w-100 position-relative',
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function updownButton() {
|
|
176
|
+
return BgWidget.updownFilter({
|
|
177
|
+
gvc,
|
|
178
|
+
callback: (value: any) => {
|
|
179
|
+
vm.orderString = value;
|
|
180
|
+
vm.loading = true;
|
|
181
|
+
gvc.notifyDataChange(vm.id);
|
|
182
|
+
},
|
|
183
|
+
default: vm.orderString || 'default',
|
|
184
|
+
options: FilterOptions.productOrderBy,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
109
188
|
return html` <div class="bg-white shadow rounded-3" style="width: 100%; overflow-y: auto;">
|
|
110
189
|
<div class="w-100 d-flex align-items-center p-3 border-bottom">
|
|
111
190
|
<div class="tx_700">${obj.title ?? '產品列表'}</div>
|
|
@@ -120,38 +199,17 @@ export class BgProduct {
|
|
|
120
199
|
</div>
|
|
121
200
|
<div class="c_dialog">
|
|
122
201
|
<div class="c_dialog_body">
|
|
123
|
-
<div class="c_dialog_main p-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
})}
|
|
135
|
-
${BgWidget.searchFilter(
|
|
136
|
-
gvc.event(e => {
|
|
137
|
-
vm.query = e.value;
|
|
138
|
-
vm.loading = true;
|
|
139
|
-
gvc.notifyDataChange(vm.id);
|
|
140
|
-
}),
|
|
141
|
-
vm.query || '',
|
|
142
|
-
'搜尋'
|
|
143
|
-
)}
|
|
144
|
-
${BgWidget.updownFilter({
|
|
145
|
-
gvc,
|
|
146
|
-
callback: (value: any) => {
|
|
147
|
-
vm.orderString = value;
|
|
148
|
-
vm.loading = true;
|
|
149
|
-
gvc.notifyDataChange(vm.id);
|
|
150
|
-
},
|
|
151
|
-
default: vm.orderString || 'default',
|
|
152
|
-
options: FilterOptions.productOrderBy,
|
|
153
|
-
})}
|
|
154
|
-
</div>
|
|
202
|
+
<div class="c_dialog_main p-0 bg-product-main">
|
|
203
|
+
${document.body.clientWidth > 768
|
|
204
|
+
? html` <div class="d-flex pb-2 px-1 bg-product-topbar">
|
|
205
|
+
${selectBar()} ${searchBar()} ${updownButton()}
|
|
206
|
+
</div>`
|
|
207
|
+
: html`<div class="pb-2 px-1 bg-product-topbar">
|
|
208
|
+
<div class="d-flex align-items-center justify-content-between w-100 mb-1">
|
|
209
|
+
${selectBar()} ${updownButton()}
|
|
210
|
+
</div>
|
|
211
|
+
<div>${searchBar()}</div>
|
|
212
|
+
</div> `}
|
|
155
213
|
${gvc
|
|
156
214
|
.map(
|
|
157
215
|
vm.options
|
|
@@ -338,7 +396,7 @@ export class BgProduct {
|
|
|
338
396
|
},
|
|
339
397
|
onCreate: () => {
|
|
340
398
|
if (vm.loading) {
|
|
341
|
-
|
|
399
|
+
const apiJSON = {
|
|
342
400
|
page: 0,
|
|
343
401
|
limit: 99999,
|
|
344
402
|
search: vm.query,
|
|
@@ -355,7 +413,10 @@ export class BgProduct {
|
|
|
355
413
|
productType: obj.productType,
|
|
356
414
|
filter_visible: obj.filter_visible,
|
|
357
415
|
status: 'inRange',
|
|
358
|
-
|
|
416
|
+
manager_tag: vm.manager_tag.join(','),
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
ApiShop.getProduct(apiJSON).then(data => {
|
|
359
420
|
vm.options = [];
|
|
360
421
|
data.response.data.map(
|
|
361
422
|
(product: {
|