ts-glitter 13.3.4 → 13.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-blog.js +2 -7
- package/lowcode/backend-manager/bg-blog.ts +8 -13
- package/lowcode/backend-manager/bg-customer-message.js +4 -2
- package/lowcode/backend-manager/bg-customer-message.ts +4 -2
- package/lowcode/backend-manager/bg-graph-api.js +6 -11
- package/lowcode/backend-manager/bg-graph-api.ts +14 -20
- package/lowcode/backend-manager/bg-line.js +526 -1002
- package/lowcode/backend-manager/bg-line.ts +1815 -2354
- package/lowcode/backend-manager/bg-notify.js +392 -746
- package/lowcode/backend-manager/bg-notify.ts +436 -835
- package/lowcode/backend-manager/bg-project.js +176 -293
- package/lowcode/backend-manager/bg-project.ts +214 -344
- package/lowcode/backend-manager/bg-recommend.js +39 -148
- package/lowcode/backend-manager/bg-recommend.ts +43 -162
- package/lowcode/backend-manager/bg-sns.js +489 -814
- package/lowcode/backend-manager/bg-sns.ts +1876 -2238
- package/lowcode/backend-manager/bg-widget.js +301 -171
- package/lowcode/backend-manager/bg-widget.ts +324 -193
- package/lowcode/cms-plugin/ai-points.js +84 -67
- package/lowcode/cms-plugin/ai-points.ts +280 -247
- package/lowcode/cms-plugin/auto-reply.js +6 -7
- package/lowcode/cms-plugin/auto-reply.ts +6 -7
- package/lowcode/cms-plugin/data-analyze.js +5 -6
- package/lowcode/cms-plugin/data-analyze.ts +5 -6
- package/lowcode/cms-plugin/form-setting.js +122 -220
- package/lowcode/cms-plugin/form-setting.ts +124 -240
- package/lowcode/cms-plugin/line-auto-reply.js +17 -18
- package/lowcode/cms-plugin/line-auto-reply.ts +29 -36
- package/lowcode/cms-plugin/member-group-list.js +5 -2
- package/lowcode/cms-plugin/member-group-list.ts +5 -2
- package/lowcode/cms-plugin/member-type-list.js +36 -84
- package/lowcode/cms-plugin/member-type-list.ts +39 -92
- package/lowcode/cms-plugin/menus-setting.js +8 -73
- package/lowcode/cms-plugin/menus-setting.ts +8 -78
- package/lowcode/cms-plugin/permission-setting.js +73 -106
- package/lowcode/cms-plugin/permission-setting.ts +236 -278
- package/lowcode/cms-plugin/shopping-collections.js +95 -137
- package/lowcode/cms-plugin/shopping-collections.ts +103 -147
- package/lowcode/cms-plugin/shopping-discount-setting.js +310 -416
- package/lowcode/cms-plugin/shopping-discount-setting.ts +1269 -1386
- package/lowcode/cms-plugin/shopping-finance-setting.js +1 -0
- package/lowcode/cms-plugin/shopping-finance-setting.ts +1 -0
- package/lowcode/cms-plugin/shopping-order-manager.js +742 -973
- package/lowcode/cms-plugin/shopping-order-manager.ts +1928 -2164
- package/lowcode/cms-plugin/shopping-order-return.js +147 -267
- package/lowcode/cms-plugin/shopping-order-return.ts +154 -292
- package/lowcode/cms-plugin/shopping-product-setting.js +6 -2
- package/lowcode/cms-plugin/shopping-product-setting.ts +8 -4
- package/lowcode/cms-plugin/shopping-product-stock.js +12 -92
- package/lowcode/cms-plugin/shopping-product-stock.ts +14 -94
- package/lowcode/cms-plugin/shopping-product-text.js +0 -3
- package/lowcode/cms-plugin/shopping-product-text.ts +0 -3
- package/lowcode/cms-plugin/shopping-rebate.js +95 -151
- package/lowcode/cms-plugin/shopping-rebate.ts +101 -159
- package/lowcode/cms-plugin/sms-points.js +83 -67
- package/lowcode/cms-plugin/sms-points.ts +281 -241
- package/lowcode/cms-plugin/sns-auto-reply.js +18 -18
- package/lowcode/cms-plugin/sns-auto-reply.ts +34 -40
- package/lowcode/cms-plugin/user-list.js +71 -90
- package/lowcode/cms-plugin/user-list.ts +76 -95
- package/lowcode/cms-plugin/web-config-setting.js +61 -111
- package/lowcode/cms-plugin/web-config-setting.ts +65 -124
- package/lowcode/css/editor.css +5 -2
- package/lowcode/glitter-base/route/shopping.js +1 -1
- package/lowcode/glitter-base/route/shopping.ts +19 -19
- package/lowcode/jspage/editor.js +1 -1
- package/lowcode/jspage/editor.ts +1 -1
- package/lowcode/jspage/main.js +3 -0
- package/lowcode/jspage/main.ts +3 -0
- package/package.json +1 -2
- package/src/api-public/controllers/ai-chat.js.map +5 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/line-message.js.map +1 -1
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/chat.js +3 -3
- package/src/api-public/services/chat.js.map +1 -1
- package/src/api-public/services/chat.ts +3 -4
- package/src/api-public/services/fb-message.js.map +5 -1
- package/src/api-public/services/filter-protect-data.js.map +1 -1
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/notify.js.map +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/share-permission.js.map +1 -1
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/user.js +67 -66
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +212 -182
- package/src/helper/glitter-util.js.map +1 -1
- package/src/modules/firebase.d.ts +1 -0
- package/src/modules/firebase.js +1 -1
- package/src/modules/firebase.js.map +1 -1
|
@@ -4,13 +4,13 @@ import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
|
4
4
|
import { Tool } from '../modules/tool.js';
|
|
5
5
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
6
6
|
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
7
|
-
import {ShareDialog} from
|
|
7
|
+
import { ShareDialog } from '../dialog/ShareDialog.js';
|
|
8
8
|
|
|
9
9
|
const html = String.raw;
|
|
10
10
|
|
|
11
11
|
export class AutoReply {
|
|
12
12
|
public static maxSize = 160;
|
|
13
|
-
public static longSMS=153;
|
|
13
|
+
public static longSMS = 153;
|
|
14
14
|
public static ticket = 1.5;
|
|
15
15
|
|
|
16
16
|
public static main(gvc: GVC, widget: any) {
|
|
@@ -27,10 +27,10 @@ export class AutoReply {
|
|
|
27
27
|
dataList: undefined,
|
|
28
28
|
tag: '',
|
|
29
29
|
query: '',
|
|
30
|
-
userData:{
|
|
31
|
-
userName
|
|
32
|
-
password
|
|
33
|
-
}
|
|
30
|
+
userData: {
|
|
31
|
+
userName: '',
|
|
32
|
+
password: '',
|
|
33
|
+
},
|
|
34
34
|
};
|
|
35
35
|
const glitter = gvc.glitter;
|
|
36
36
|
const id = glitter.getUUID();
|
|
@@ -39,7 +39,6 @@ export class AutoReply {
|
|
|
39
39
|
bind: id,
|
|
40
40
|
view: () => {
|
|
41
41
|
if (vm.type === 'replace') {
|
|
42
|
-
|
|
43
42
|
return AutoReply.autoSendEmail(
|
|
44
43
|
gvc,
|
|
45
44
|
vm.tag,
|
|
@@ -125,7 +124,7 @@ export class AutoReply {
|
|
|
125
124
|
</div>
|
|
126
125
|
${BgWidget.container(
|
|
127
126
|
BgWidget.mainCard(
|
|
128
|
-
BgWidget.
|
|
127
|
+
BgWidget.tableV3({
|
|
129
128
|
gvc: gvc,
|
|
130
129
|
getData: async (vmk) => {
|
|
131
130
|
const appData = await ApiUser.getPublicConfig('store-information', 'manager');
|
|
@@ -148,18 +147,17 @@ export class AutoReply {
|
|
|
148
147
|
);
|
|
149
148
|
index++;
|
|
150
149
|
}
|
|
151
|
-
vmi.
|
|
150
|
+
vmi.originalData = vm.dataList;
|
|
151
|
+
vmi.tableData = getDatalist();
|
|
152
152
|
vmi.loading = false;
|
|
153
|
-
|
|
154
|
-
vmi.callback();
|
|
155
|
-
});
|
|
153
|
+
vmi.callback();
|
|
156
154
|
},
|
|
157
155
|
rowClick: (data, index) => {
|
|
158
156
|
vm.tag = vm.dataList[index].tag;
|
|
159
157
|
vm.type = 'replace';
|
|
160
158
|
gvc.notifyDataChange(id);
|
|
161
159
|
},
|
|
162
|
-
filter:
|
|
160
|
+
filter: [],
|
|
163
161
|
})
|
|
164
162
|
)
|
|
165
163
|
)}
|
|
@@ -233,7 +231,6 @@ export class AutoReply {
|
|
|
233
231
|
return {
|
|
234
232
|
bind: id,
|
|
235
233
|
view: () => {
|
|
236
|
-
|
|
237
234
|
return [
|
|
238
235
|
EditorElem.editeInput({
|
|
239
236
|
gvc: gvc,
|
|
@@ -245,20 +242,20 @@ export class AutoReply {
|
|
|
245
242
|
placeHolder: '請輸入寄件者名稱',
|
|
246
243
|
}),
|
|
247
244
|
html`
|
|
248
|
-
<div class="d-flex mt-3 mb-2"
|
|
245
|
+
<div class="d-flex mt-3 mb-2">
|
|
249
246
|
<div class="d-flex" style="color: #393939;font-size: 15px;">簡訊內容</div>
|
|
250
|
-
<div class="d-flex align-items-end ms-3" style="font-size: 12px;color: #8D8D8D">預計每則簡訊花費${pointCount*this.ticket}點</div>
|
|
247
|
+
<div class="d-flex align-items-end ms-3" style="font-size: 12px;color: #8D8D8D">預計每則簡訊花費${pointCount * this.ticket}點</div>
|
|
251
248
|
</div>
|
|
252
249
|
`,
|
|
253
250
|
EditorElem.editeText({
|
|
254
251
|
gvc: gvc,
|
|
255
|
-
title:
|
|
256
|
-
default:vm.data.content ||
|
|
257
|
-
placeHolder:
|
|
258
|
-
callback:(text)=>{
|
|
252
|
+
title: '',
|
|
253
|
+
default: vm.data.content || '',
|
|
254
|
+
placeHolder: '',
|
|
255
|
+
callback: (text) => {
|
|
259
256
|
vm.data.content = text;
|
|
260
257
|
let totalSize = 0;
|
|
261
|
-
|
|
258
|
+
|
|
262
259
|
for (let i = 0; i < text.length; i++) {
|
|
263
260
|
const char = text[i];
|
|
264
261
|
// 判斷是否為中文或全形字符(Unicode範圍包含中文)
|
|
@@ -268,16 +265,15 @@ export class AutoReply {
|
|
|
268
265
|
totalSize += 1; // 英文或半形字符佔1個單位
|
|
269
266
|
}
|
|
270
267
|
}
|
|
271
|
-
|
|
272
|
-
if (totalSize < this.maxSize){
|
|
268
|
+
|
|
269
|
+
if (totalSize < this.maxSize) {
|
|
273
270
|
pointCount = 1;
|
|
274
|
-
}else {
|
|
275
|
-
pointCount =
|
|
271
|
+
} else {
|
|
272
|
+
pointCount = Math.ceil((totalSize /= this.longSMS));
|
|
276
273
|
}
|
|
277
|
-
gvc.notifyDataChange(id)
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
})
|
|
274
|
+
gvc.notifyDataChange(id);
|
|
275
|
+
},
|
|
276
|
+
}),
|
|
281
277
|
].join('');
|
|
282
278
|
},
|
|
283
279
|
};
|
|
@@ -294,8 +290,8 @@ export class AutoReply {
|
|
|
294
290
|
gvc.event(() => {
|
|
295
291
|
const dialog = new ShareDialog(gvc.glitter);
|
|
296
292
|
dialog.checkYesOrNot({
|
|
297
|
-
callback
|
|
298
|
-
if (select){
|
|
293
|
+
callback: (select) => {
|
|
294
|
+
if (select) {
|
|
299
295
|
widget.event('loading', { title: '儲存中' });
|
|
300
296
|
vm.data.updated_time = new Date();
|
|
301
297
|
ApiUser.setPublicConfig({
|
|
@@ -310,9 +306,8 @@ export class AutoReply {
|
|
|
310
306
|
});
|
|
311
307
|
}
|
|
312
308
|
},
|
|
313
|
-
text
|
|
314
|
-
})
|
|
315
|
-
|
|
309
|
+
text: `確認無誤後將儲存。`,
|
|
310
|
+
});
|
|
316
311
|
})
|
|
317
312
|
)}
|
|
318
313
|
</div>`,
|
|
@@ -393,7 +388,6 @@ export class AutoReply {
|
|
|
393
388
|
return dd.tag === tag;
|
|
394
389
|
})!;
|
|
395
390
|
if (keyData.response.value) {
|
|
396
|
-
|
|
397
391
|
b.title = keyData.response.value.title || b.title;
|
|
398
392
|
b.toggle = keyData.response.value.toggle ?? true;
|
|
399
393
|
b.content = keyData.response.value.content || b.content;
|
|
@@ -402,7 +396,6 @@ export class AutoReply {
|
|
|
402
396
|
}
|
|
403
397
|
return b;
|
|
404
398
|
}
|
|
405
|
-
|
|
406
399
|
}
|
|
407
400
|
|
|
408
401
|
(window as any).glitter.setModule(import.meta.url, AutoReply);
|
|
@@ -66,18 +66,21 @@ export class MemberTypeList {
|
|
|
66
66
|
${BgWidget.title('顧客分群')}
|
|
67
67
|
<div class="flex-fill"></div>
|
|
68
68
|
</div>
|
|
69
|
-
${BgWidget.container(BgWidget.mainCard(BgWidget.
|
|
69
|
+
${BgWidget.container(BgWidget.mainCard(BgWidget.tableV3({
|
|
70
70
|
gvc: gvc,
|
|
71
71
|
getData: (vd) => __awaiter(this, void 0, void 0, function* () {
|
|
72
72
|
vmi = vd;
|
|
73
73
|
ApiUser.getUserGroupList().then((dd) => {
|
|
74
74
|
vm.dataList = dd.response.data;
|
|
75
75
|
vmi.pageSize = 1;
|
|
76
|
-
vmi.
|
|
76
|
+
vmi.originalData = vm.dataList;
|
|
77
|
+
vmi.tableData = getDatalist();
|
|
77
78
|
vmi.loading = false;
|
|
78
79
|
vmi.callback();
|
|
79
80
|
});
|
|
80
81
|
}),
|
|
82
|
+
rowClick: () => { },
|
|
83
|
+
filter: [],
|
|
81
84
|
})))}
|
|
82
85
|
`, BgWidget.getContainerWidth());
|
|
83
86
|
}
|
|
@@ -74,18 +74,21 @@ export class MemberTypeList {
|
|
|
74
74
|
</div>
|
|
75
75
|
${BgWidget.container(
|
|
76
76
|
BgWidget.mainCard(
|
|
77
|
-
BgWidget.
|
|
77
|
+
BgWidget.tableV3({
|
|
78
78
|
gvc: gvc,
|
|
79
79
|
getData: async (vd) => {
|
|
80
80
|
vmi = vd;
|
|
81
81
|
ApiUser.getUserGroupList().then((dd: any) => {
|
|
82
82
|
vm.dataList = dd.response.data;
|
|
83
83
|
vmi.pageSize = 1;
|
|
84
|
-
vmi.
|
|
84
|
+
vmi.originalData = vm.dataList;
|
|
85
|
+
vmi.tableData = getDatalist();
|
|
85
86
|
vmi.loading = false;
|
|
86
87
|
vmi.callback();
|
|
87
88
|
});
|
|
88
89
|
},
|
|
90
|
+
rowClick: () => {},
|
|
91
|
+
filter: [],
|
|
89
92
|
})
|
|
90
93
|
)
|
|
91
94
|
)}
|
|
@@ -32,33 +32,6 @@ export class MemberTypeList {
|
|
|
32
32
|
.reverse()
|
|
33
33
|
.map((dd, index) => {
|
|
34
34
|
return [
|
|
35
|
-
{
|
|
36
|
-
key: EditorElem.checkBoxOnly({
|
|
37
|
-
gvc: gvc,
|
|
38
|
-
def: !vm.dataList.find((dd) => {
|
|
39
|
-
return !dd.checked;
|
|
40
|
-
}),
|
|
41
|
-
callback: (result) => {
|
|
42
|
-
vm.dataList.map((dd) => {
|
|
43
|
-
dd.checked = result;
|
|
44
|
-
});
|
|
45
|
-
vmi.data = getDatalist();
|
|
46
|
-
vmi.callback();
|
|
47
|
-
gvc.notifyDataChange(filterID);
|
|
48
|
-
},
|
|
49
|
-
}),
|
|
50
|
-
value: EditorElem.checkBoxOnly({
|
|
51
|
-
gvc: gvc,
|
|
52
|
-
def: dd.checked,
|
|
53
|
-
callback: (result) => {
|
|
54
|
-
dd.checked = result;
|
|
55
|
-
vmi.data = getDatalist();
|
|
56
|
-
vmi.callback();
|
|
57
|
-
gvc.notifyDataChange(filterID);
|
|
58
|
-
},
|
|
59
|
-
style: 'height: 37.5px;',
|
|
60
|
-
}),
|
|
61
|
-
},
|
|
62
35
|
{
|
|
63
36
|
key: '等級順序',
|
|
64
37
|
value: `<span class="fs-7">等級${vm.dataList.length - index}</span>`,
|
|
@@ -121,7 +94,7 @@ export class MemberTypeList {
|
|
|
121
94
|
gvc.notifyDataChange(vm.id);
|
|
122
95
|
}))}
|
|
123
96
|
</div>
|
|
124
|
-
${BgWidget.container(BgWidget.mainCard(BgWidget.
|
|
97
|
+
${BgWidget.container(BgWidget.mainCard(BgWidget.tableV3({
|
|
125
98
|
gvc: gvc,
|
|
126
99
|
getData: (vd) => __awaiter(this, void 0, void 0, function* () {
|
|
127
100
|
vmi = vd;
|
|
@@ -149,74 +122,53 @@ export class MemberTypeList {
|
|
|
149
122
|
}
|
|
150
123
|
return [];
|
|
151
124
|
})();
|
|
152
|
-
vmi.
|
|
125
|
+
vmi.originalData = vm.dataList;
|
|
126
|
+
vmi.tableData = getDatalist();
|
|
153
127
|
vmi.loading = false;
|
|
154
128
|
vmi.callback();
|
|
155
129
|
});
|
|
156
130
|
}),
|
|
157
|
-
style: ['height: 36px;'],
|
|
158
131
|
rowClick: (data, index) => {
|
|
159
132
|
vm.index = vm.dataList.length - 1 - index;
|
|
160
133
|
vm.type = 'replace';
|
|
161
134
|
},
|
|
162
|
-
filter:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
key: 'member_level_config',
|
|
182
|
-
user_id: 'manager',
|
|
183
|
-
value: {
|
|
184
|
-
levels: vm.dataList.filter((dd) => {
|
|
185
|
-
return !dd.checked;
|
|
186
|
-
}),
|
|
187
|
-
},
|
|
188
|
-
}).then(() => {
|
|
189
|
-
setTimeout(() => {
|
|
190
|
-
widget.event('loading', {
|
|
191
|
-
visible: false,
|
|
192
|
-
});
|
|
193
|
-
widget.event('success', {
|
|
194
|
-
title: '設定成功',
|
|
195
|
-
});
|
|
196
|
-
gvc.notifyDataChange(vm.id);
|
|
197
|
-
}, 500);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
135
|
+
filter: [
|
|
136
|
+
{
|
|
137
|
+
name: '批量移除',
|
|
138
|
+
event: () => {
|
|
139
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
140
|
+
dialog.checkYesOrNot({
|
|
141
|
+
text: '是否確認刪除所選項目?',
|
|
142
|
+
callback: (response) => {
|
|
143
|
+
if (response) {
|
|
144
|
+
widget.event('loading', {
|
|
145
|
+
title: '設定中...',
|
|
146
|
+
});
|
|
147
|
+
ApiUser.setPublicConfig({
|
|
148
|
+
key: 'member_level_config',
|
|
149
|
+
user_id: 'manager',
|
|
150
|
+
value: {
|
|
151
|
+
levels: vm.dataList.filter((dd) => {
|
|
152
|
+
return !dd.checked;
|
|
153
|
+
}),
|
|
200
154
|
},
|
|
155
|
+
}).then(() => {
|
|
156
|
+
setTimeout(() => {
|
|
157
|
+
widget.event('loading', {
|
|
158
|
+
visible: false,
|
|
159
|
+
});
|
|
160
|
+
widget.event('success', {
|
|
161
|
+
title: '設定成功',
|
|
162
|
+
});
|
|
163
|
+
gvc.notifyDataChange(vm.id);
|
|
164
|
+
}, 500);
|
|
201
165
|
});
|
|
202
|
-
}
|
|
203
|
-
|
|
166
|
+
}
|
|
167
|
+
},
|
|
204
168
|
});
|
|
205
169
|
},
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
class: `d-flex align-items-center p-2 py-3 ${!vm.dataList ||
|
|
209
|
-
!vm.dataList.find((dd) => {
|
|
210
|
-
return dd.checked;
|
|
211
|
-
})
|
|
212
|
-
? `d-none`
|
|
213
|
-
: ``}`,
|
|
214
|
-
style: ``,
|
|
215
|
-
};
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
})}
|
|
219
|
-
`,
|
|
170
|
+
},
|
|
171
|
+
],
|
|
220
172
|
})))}
|
|
221
173
|
`, BgWidget.getContainerWidth());
|
|
222
174
|
}
|
|
@@ -34,33 +34,6 @@ export class MemberTypeList {
|
|
|
34
34
|
.reverse()
|
|
35
35
|
.map((dd: any, index: number) => {
|
|
36
36
|
return [
|
|
37
|
-
{
|
|
38
|
-
key: EditorElem.checkBoxOnly({
|
|
39
|
-
gvc: gvc,
|
|
40
|
-
def: !vm.dataList.find((dd: any) => {
|
|
41
|
-
return !dd.checked;
|
|
42
|
-
}),
|
|
43
|
-
callback: (result) => {
|
|
44
|
-
vm.dataList.map((dd: any) => {
|
|
45
|
-
dd.checked = result;
|
|
46
|
-
});
|
|
47
|
-
vmi.data = getDatalist();
|
|
48
|
-
vmi.callback();
|
|
49
|
-
gvc.notifyDataChange(filterID);
|
|
50
|
-
},
|
|
51
|
-
}),
|
|
52
|
-
value: EditorElem.checkBoxOnly({
|
|
53
|
-
gvc: gvc,
|
|
54
|
-
def: dd.checked,
|
|
55
|
-
callback: (result) => {
|
|
56
|
-
dd.checked = result;
|
|
57
|
-
vmi.data = getDatalist();
|
|
58
|
-
vmi.callback();
|
|
59
|
-
gvc.notifyDataChange(filterID);
|
|
60
|
-
},
|
|
61
|
-
style: 'height: 37.5px;',
|
|
62
|
-
}),
|
|
63
|
-
},
|
|
64
37
|
{
|
|
65
38
|
key: '等級順序',
|
|
66
39
|
value: `<span class="fs-7">等級${vm.dataList.length - index}</span>`,
|
|
@@ -133,7 +106,7 @@ export class MemberTypeList {
|
|
|
133
106
|
</div>
|
|
134
107
|
${BgWidget.container(
|
|
135
108
|
BgWidget.mainCard(
|
|
136
|
-
BgWidget.
|
|
109
|
+
BgWidget.tableV3({
|
|
137
110
|
gvc: gvc,
|
|
138
111
|
getData: async (vd) => {
|
|
139
112
|
vmi = vd;
|
|
@@ -161,79 +134,53 @@ export class MemberTypeList {
|
|
|
161
134
|
}
|
|
162
135
|
return [];
|
|
163
136
|
})();
|
|
164
|
-
vmi.
|
|
137
|
+
vmi.originalData = vm.dataList;
|
|
138
|
+
vmi.tableData = getDatalist();
|
|
165
139
|
vmi.loading = false;
|
|
166
140
|
vmi.callback();
|
|
167
141
|
});
|
|
168
142
|
},
|
|
169
|
-
style: ['height: 36px;'],
|
|
170
143
|
rowClick: (data, index) => {
|
|
171
144
|
vm.index = vm.dataList.length - 1 - index;
|
|
172
145
|
vm.type = 'replace';
|
|
173
146
|
},
|
|
174
|
-
filter:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
levels: vm.dataList.filter((dd: any) => {
|
|
199
|
-
return !dd.checked;
|
|
200
|
-
}),
|
|
201
|
-
},
|
|
202
|
-
}).then(() => {
|
|
203
|
-
setTimeout(() => {
|
|
204
|
-
widget.event('loading', {
|
|
205
|
-
visible: false,
|
|
206
|
-
});
|
|
207
|
-
widget.event('success', {
|
|
208
|
-
title: '設定成功',
|
|
209
|
-
});
|
|
210
|
-
gvc.notifyDataChange(vm.id);
|
|
211
|
-
}, 500);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
},
|
|
147
|
+
filter: [
|
|
148
|
+
{
|
|
149
|
+
name: '批量移除',
|
|
150
|
+
event: () => {
|
|
151
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
152
|
+
dialog.checkYesOrNot({
|
|
153
|
+
text: '是否確認刪除所選項目?',
|
|
154
|
+
callback: (response) => {
|
|
155
|
+
if (response) {
|
|
156
|
+
widget.event('loading', {
|
|
157
|
+
title: '設定中...',
|
|
158
|
+
});
|
|
159
|
+
ApiUser.setPublicConfig({
|
|
160
|
+
key: 'member_level_config',
|
|
161
|
+
user_id: 'manager',
|
|
162
|
+
value: {
|
|
163
|
+
levels: vm.dataList.filter((dd: any) => {
|
|
164
|
+
return !dd.checked;
|
|
165
|
+
}),
|
|
166
|
+
},
|
|
167
|
+
}).then(() => {
|
|
168
|
+
setTimeout(() => {
|
|
169
|
+
widget.event('loading', {
|
|
170
|
+
visible: false,
|
|
215
171
|
});
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
? `d-none`
|
|
229
|
-
: ``
|
|
230
|
-
}`,
|
|
231
|
-
style: ``,
|
|
232
|
-
};
|
|
233
|
-
},
|
|
234
|
-
};
|
|
235
|
-
})}
|
|
236
|
-
`,
|
|
172
|
+
widget.event('success', {
|
|
173
|
+
title: '設定成功',
|
|
174
|
+
});
|
|
175
|
+
gvc.notifyDataChange(vm.id);
|
|
176
|
+
}, 500);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
],
|
|
237
184
|
})
|
|
238
185
|
)
|
|
239
186
|
)}
|