ts-glitter 13.3.5 → 13.3.8
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-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 +4 -0
- package/lowcode/jspage/main.ts +4 -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 +2 -3
- 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
|
@@ -12,7 +12,7 @@ import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
|
12
12
|
import { Tool } from '../modules/tool.js';
|
|
13
13
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
14
14
|
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
15
|
-
import { ShareDialog } from
|
|
15
|
+
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
16
16
|
const html = String.raw;
|
|
17
17
|
export class AutoReply {
|
|
18
18
|
static main(gvc, widget) {
|
|
@@ -23,9 +23,9 @@ export class AutoReply {
|
|
|
23
23
|
tag: '',
|
|
24
24
|
query: '',
|
|
25
25
|
userData: {
|
|
26
|
-
userName:
|
|
27
|
-
password:
|
|
28
|
-
}
|
|
26
|
+
userName: '',
|
|
27
|
+
password: '',
|
|
28
|
+
},
|
|
29
29
|
};
|
|
30
30
|
const glitter = gvc.glitter;
|
|
31
31
|
const id = glitter.getUUID();
|
|
@@ -104,7 +104,7 @@ export class AutoReply {
|
|
|
104
104
|
${BgWidget.title('自動寄送簡訊')}
|
|
105
105
|
<div class="flex-fill"></div>
|
|
106
106
|
</div>
|
|
107
|
-
${BgWidget.container(BgWidget.mainCard(BgWidget.
|
|
107
|
+
${BgWidget.container(BgWidget.mainCard(BgWidget.tableV3({
|
|
108
108
|
gvc: gvc,
|
|
109
109
|
getData: (vmk) => __awaiter(this, void 0, void 0, function* () {
|
|
110
110
|
const appData = yield ApiUser.getPublicConfig('store-information', 'manager');
|
|
@@ -117,7 +117,7 @@ export class AutoReply {
|
|
|
117
117
|
'auto-sns-order-create',
|
|
118
118
|
'sns-proof-purchase',
|
|
119
119
|
'auto-sns-birthday',
|
|
120
|
-
'auto-phone-verify'
|
|
120
|
+
'auto-phone-verify',
|
|
121
121
|
];
|
|
122
122
|
let index = 0;
|
|
123
123
|
for (const b of vm.dataList) {
|
|
@@ -125,18 +125,18 @@ export class AutoReply {
|
|
|
125
125
|
vm.dataList[index].title = vm.dataList[index].title.replace(/@\{\{app_name\}\}/g, (appData.response.value && appData.response.value.shop_name) || '商店名稱');
|
|
126
126
|
index++;
|
|
127
127
|
}
|
|
128
|
-
vmi.
|
|
128
|
+
vmi.pageSize = 1;
|
|
129
|
+
vmi.originalData = vm.dataList;
|
|
130
|
+
vmi.tableData = getDatalist();
|
|
129
131
|
vmi.loading = false;
|
|
130
|
-
|
|
131
|
-
vmi.callback();
|
|
132
|
-
});
|
|
132
|
+
vmi.callback();
|
|
133
133
|
}),
|
|
134
134
|
rowClick: (data, index) => {
|
|
135
135
|
vm.tag = vm.dataList[index].tag;
|
|
136
136
|
vm.type = 'replace';
|
|
137
137
|
gvc.notifyDataChange(id);
|
|
138
138
|
},
|
|
139
|
-
filter:
|
|
139
|
+
filter: [],
|
|
140
140
|
})))}
|
|
141
141
|
${BgWidget.mbContainer(240)}
|
|
142
142
|
`, BgWidget.getContainerWidth());
|
|
@@ -207,16 +207,16 @@ export class AutoReply {
|
|
|
207
207
|
placeHolder: '請輸入寄件者名稱',
|
|
208
208
|
}),
|
|
209
209
|
html `
|
|
210
|
-
<div class="d-flex mt-3 mb-2"
|
|
210
|
+
<div class="d-flex mt-3 mb-2">
|
|
211
211
|
<div class="d-flex" style="color: #393939;font-size: 15px;">簡訊內容</div>
|
|
212
212
|
<div class="d-flex align-items-end ms-3" style="font-size: 12px;color: #8D8D8D">預計每則簡訊花費${pointCount * this.ticket}點</div>
|
|
213
213
|
</div>
|
|
214
214
|
`,
|
|
215
215
|
EditorElem.editeText({
|
|
216
216
|
gvc: gvc,
|
|
217
|
-
title:
|
|
218
|
-
default: vm.data.content ||
|
|
219
|
-
placeHolder:
|
|
217
|
+
title: '',
|
|
218
|
+
default: vm.data.content || '',
|
|
219
|
+
placeHolder: '',
|
|
220
220
|
callback: (text) => {
|
|
221
221
|
vm.data.content = text;
|
|
222
222
|
let totalSize = 0;
|
|
@@ -236,8 +236,8 @@ export class AutoReply {
|
|
|
236
236
|
pointCount = Math.ceil(totalSize / this.longSMS);
|
|
237
237
|
}
|
|
238
238
|
gvc.notifyDataChange(id);
|
|
239
|
-
}
|
|
240
|
-
})
|
|
239
|
+
},
|
|
240
|
+
}),
|
|
241
241
|
].join('');
|
|
242
242
|
},
|
|
243
243
|
};
|
|
@@ -266,7 +266,7 @@ export class AutoReply {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
-
text:
|
|
269
|
+
text: `確認無誤後將儲存`,
|
|
270
270
|
});
|
|
271
271
|
}))}
|
|
272
272
|
</div>`,
|
|
@@ -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 '../glitterBundle/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 = 15;
|
|
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');
|
|
@@ -138,7 +137,7 @@ export class AutoReply {
|
|
|
138
137
|
'auto-sns-order-create',
|
|
139
138
|
'sns-proof-purchase',
|
|
140
139
|
'auto-sns-birthday',
|
|
141
|
-
|
|
140
|
+
'auto-phone-verify',
|
|
142
141
|
];
|
|
143
142
|
let index = 0;
|
|
144
143
|
for (const b of vm.dataList) {
|
|
@@ -149,18 +148,18 @@ export class AutoReply {
|
|
|
149
148
|
);
|
|
150
149
|
index++;
|
|
151
150
|
}
|
|
152
|
-
vmi.
|
|
151
|
+
vmi.pageSize = 1;
|
|
152
|
+
vmi.originalData = vm.dataList;
|
|
153
|
+
vmi.tableData = getDatalist();
|
|
153
154
|
vmi.loading = false;
|
|
154
|
-
|
|
155
|
-
vmi.callback();
|
|
156
|
-
});
|
|
155
|
+
vmi.callback();
|
|
157
156
|
},
|
|
158
157
|
rowClick: (data, index) => {
|
|
159
158
|
vm.tag = vm.dataList[index].tag;
|
|
160
159
|
vm.type = 'replace';
|
|
161
160
|
gvc.notifyDataChange(id);
|
|
162
161
|
},
|
|
163
|
-
filter:
|
|
162
|
+
filter: [],
|
|
164
163
|
})
|
|
165
164
|
)
|
|
166
165
|
)}
|
|
@@ -234,7 +233,6 @@ export class AutoReply {
|
|
|
234
233
|
return {
|
|
235
234
|
bind: id,
|
|
236
235
|
view: () => {
|
|
237
|
-
|
|
238
236
|
return [
|
|
239
237
|
EditorElem.editeInput({
|
|
240
238
|
gvc: gvc,
|
|
@@ -246,20 +244,20 @@ export class AutoReply {
|
|
|
246
244
|
placeHolder: '請輸入寄件者名稱',
|
|
247
245
|
}),
|
|
248
246
|
html`
|
|
249
|
-
<div class="d-flex mt-3 mb-2"
|
|
247
|
+
<div class="d-flex mt-3 mb-2">
|
|
250
248
|
<div class="d-flex" style="color: #393939;font-size: 15px;">簡訊內容</div>
|
|
251
|
-
<div class="d-flex align-items-end ms-3" style="font-size: 12px;color: #8D8D8D">預計每則簡訊花費${pointCount*this.ticket}點</div>
|
|
249
|
+
<div class="d-flex align-items-end ms-3" style="font-size: 12px;color: #8D8D8D">預計每則簡訊花費${pointCount * this.ticket}點</div>
|
|
252
250
|
</div>
|
|
253
251
|
`,
|
|
254
252
|
EditorElem.editeText({
|
|
255
253
|
gvc: gvc,
|
|
256
|
-
title:
|
|
257
|
-
default:vm.data.content ||
|
|
258
|
-
placeHolder:
|
|
259
|
-
callback:(text)=>{
|
|
254
|
+
title: '',
|
|
255
|
+
default: vm.data.content || '',
|
|
256
|
+
placeHolder: '',
|
|
257
|
+
callback: (text) => {
|
|
260
258
|
vm.data.content = text;
|
|
261
259
|
let totalSize = 0;
|
|
262
|
-
|
|
260
|
+
|
|
263
261
|
for (let i = 0; i < text.length; i++) {
|
|
264
262
|
const char = text[i];
|
|
265
263
|
// 判斷是否為中文或全形字符(Unicode範圍包含中文)
|
|
@@ -269,16 +267,15 @@ export class AutoReply {
|
|
|
269
267
|
totalSize += 1; // 英文或半形字符佔1個單位
|
|
270
268
|
}
|
|
271
269
|
}
|
|
272
|
-
|
|
273
|
-
if (totalSize < this.maxSize){
|
|
270
|
+
|
|
271
|
+
if (totalSize < this.maxSize) {
|
|
274
272
|
pointCount = 1;
|
|
275
|
-
}else {
|
|
276
|
-
pointCount =
|
|
273
|
+
} else {
|
|
274
|
+
pointCount = Math.ceil(totalSize / this.longSMS);
|
|
277
275
|
}
|
|
278
|
-
gvc.notifyDataChange(id)
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
})
|
|
276
|
+
gvc.notifyDataChange(id);
|
|
277
|
+
},
|
|
278
|
+
}),
|
|
282
279
|
].join('');
|
|
283
280
|
},
|
|
284
281
|
};
|
|
@@ -295,9 +292,9 @@ export class AutoReply {
|
|
|
295
292
|
gvc.event(() => {
|
|
296
293
|
const dialog = new ShareDialog(gvc.glitter);
|
|
297
294
|
dialog.checkYesOrNot({
|
|
298
|
-
callback
|
|
299
|
-
if (select){
|
|
300
|
-
dialog.dataLoading({visible:true,text:'儲存中'})
|
|
295
|
+
callback: (select) => {
|
|
296
|
+
if (select) {
|
|
297
|
+
dialog.dataLoading({ visible: true, text: '儲存中' });
|
|
301
298
|
vm.data.updated_time = new Date();
|
|
302
299
|
ApiUser.setPublicConfig({
|
|
303
300
|
key: tag,
|
|
@@ -305,15 +302,14 @@ export class AutoReply {
|
|
|
305
302
|
user_id: 'manager',
|
|
306
303
|
}).then(() => {
|
|
307
304
|
setTimeout(() => {
|
|
308
|
-
dialog.dataLoading({visible:false})
|
|
309
|
-
dialog.successMessage({text:'儲存成功'})
|
|
305
|
+
dialog.dataLoading({ visible: false });
|
|
306
|
+
dialog.successMessage({ text: '儲存成功' });
|
|
310
307
|
}, 1000);
|
|
311
308
|
});
|
|
312
309
|
}
|
|
313
310
|
},
|
|
314
|
-
text
|
|
315
|
-
})
|
|
316
|
-
|
|
311
|
+
text: `確認無誤後將儲存`,
|
|
312
|
+
});
|
|
317
313
|
})
|
|
318
314
|
)}
|
|
319
315
|
</div>`,
|
|
@@ -410,7 +406,6 @@ export class AutoReply {
|
|
|
410
406
|
return dd.tag === tag;
|
|
411
407
|
})!;
|
|
412
408
|
if (keyData.response.value) {
|
|
413
|
-
|
|
414
409
|
b.title = keyData.response.value.title || b.title;
|
|
415
410
|
b.toggle = keyData.response.value.toggle ?? true;
|
|
416
411
|
b.content = keyData.response.value.content || b.content;
|
|
@@ -419,7 +414,6 @@ export class AutoReply {
|
|
|
419
414
|
}
|
|
420
415
|
return b;
|
|
421
416
|
}
|
|
422
|
-
|
|
423
417
|
}
|
|
424
418
|
|
|
425
419
|
(window as any).glitter.setModule(import.meta.url, AutoReply);
|
|
@@ -51,12 +51,10 @@ export class UserList {
|
|
|
51
51
|
{
|
|
52
52
|
key: '電子信箱',
|
|
53
53
|
value: `<span class="fs-7">${dd.userData.email}</span>`,
|
|
54
|
-
width: 25,
|
|
55
54
|
},
|
|
56
55
|
{
|
|
57
56
|
key: '訂單',
|
|
58
57
|
value: `<span class="fs-7">${dd.checkout_count} 筆</span>`,
|
|
59
|
-
width: 7,
|
|
60
58
|
},
|
|
61
59
|
{
|
|
62
60
|
key: '會員等級',
|
|
@@ -69,7 +67,6 @@ export class UserList {
|
|
|
69
67
|
{
|
|
70
68
|
key: '上次登入時間',
|
|
71
69
|
value: `<span class="fs-7">${glitter.ut.dateFormat(new Date(dd.online_time), 'yyyy-MM-dd hh:mm')}</span>`,
|
|
72
|
-
width: 15,
|
|
73
70
|
},
|
|
74
71
|
{
|
|
75
72
|
key: '用戶狀態',
|
|
@@ -81,8 +78,6 @@ export class UserList {
|
|
|
81
78
|
return html `<div class="badge bg-danger fs-7" style="max-height:34px;">已停用</div>`;
|
|
82
79
|
}
|
|
83
80
|
})(),
|
|
84
|
-
width: 8,
|
|
85
|
-
position: 'text-center',
|
|
86
81
|
},
|
|
87
82
|
];
|
|
88
83
|
});
|
|
@@ -268,7 +263,6 @@ export class UserList {
|
|
|
268
263
|
},
|
|
269
264
|
});
|
|
270
265
|
},
|
|
271
|
-
option: false,
|
|
272
266
|
},
|
|
273
267
|
],
|
|
274
268
|
});
|
|
@@ -324,12 +318,10 @@ export class UserList {
|
|
|
324
318
|
{
|
|
325
319
|
key: '電子信箱',
|
|
326
320
|
value: `<span class="fs-7">${dd.userData.email}</span>`,
|
|
327
|
-
width: 25,
|
|
328
321
|
},
|
|
329
322
|
{
|
|
330
323
|
key: '訂單',
|
|
331
324
|
value: `<span class="fs-7">${dd.checkout_count} 筆</span>`,
|
|
332
|
-
width: 7,
|
|
333
325
|
},
|
|
334
326
|
{
|
|
335
327
|
key: '會員等級',
|
|
@@ -342,7 +334,6 @@ export class UserList {
|
|
|
342
334
|
{
|
|
343
335
|
key: '上次登入時間',
|
|
344
336
|
value: `<span class="fs-7">${glitter.ut.dateFormat(new Date(dd.online_time), 'yyyy-MM-dd hh:mm')}</span>`,
|
|
345
|
-
width: 15,
|
|
346
337
|
},
|
|
347
338
|
{
|
|
348
339
|
key: '用戶狀態',
|
|
@@ -354,8 +345,6 @@ export class UserList {
|
|
|
354
345
|
return html `<div class="badge bg-danger fs-7" style="max-height:34px;">已停用</div>`;
|
|
355
346
|
}
|
|
356
347
|
})(),
|
|
357
|
-
width: 8,
|
|
358
|
-
position: 'text-center',
|
|
359
348
|
},
|
|
360
349
|
];
|
|
361
350
|
});
|
|
@@ -481,7 +470,6 @@ export class UserList {
|
|
|
481
470
|
},
|
|
482
471
|
});
|
|
483
472
|
},
|
|
484
|
-
option: false,
|
|
485
473
|
},
|
|
486
474
|
],
|
|
487
475
|
});
|
|
@@ -618,12 +606,10 @@ export class UserList {
|
|
|
618
606
|
{
|
|
619
607
|
key: '訂單編號',
|
|
620
608
|
value: html ` <div style="overflow: hidden;white-space: normal;color: #4D86DB;word-break: break-all;">${dd.orderData.orderID}</div>`,
|
|
621
|
-
width: 25,
|
|
622
609
|
},
|
|
623
610
|
{
|
|
624
611
|
key: '訂單日期',
|
|
625
612
|
value: html ` <div style="overflow: hidden;white-space: normal;word-break: break-all;">${gvc.glitter.ut.dateFormat(new Date(dd.created_time), 'yyyy-MM-dd hh:mm')}</div>`,
|
|
626
|
-
width: 25,
|
|
627
613
|
},
|
|
628
614
|
{
|
|
629
615
|
key: '總金額',
|
|
@@ -649,7 +635,6 @@ export class UserList {
|
|
|
649
635
|
vm.type = 'order';
|
|
650
636
|
gvc.notifyDataChange(vm.id);
|
|
651
637
|
})),
|
|
652
|
-
width: 10,
|
|
653
638
|
},
|
|
654
639
|
];
|
|
655
640
|
});
|
|
@@ -670,7 +655,6 @@ export class UserList {
|
|
|
670
655
|
}
|
|
671
656
|
return gvc.glitter.ut.dateFormat(new Date(dd.deadline), 'yyyy-MM-dd hh:mm');
|
|
672
657
|
})(),
|
|
673
|
-
width: 20,
|
|
674
658
|
},
|
|
675
659
|
{ key: '購物金項目', value: (_a = dd.note) !== null && _a !== void 0 ? _a : '' },
|
|
676
660
|
{
|
|
@@ -681,7 +665,6 @@ export class UserList {
|
|
|
681
665
|
}
|
|
682
666
|
return html `<span class="tx_700 text-danger">- ${dd.origin * -1}</span>`;
|
|
683
667
|
})(),
|
|
684
|
-
width: 10,
|
|
685
668
|
},
|
|
686
669
|
{
|
|
687
670
|
key: '此筆可使用餘額',
|
|
@@ -937,7 +920,6 @@ export class UserList {
|
|
|
937
920
|
}
|
|
938
921
|
return text;
|
|
939
922
|
})(),
|
|
940
|
-
width: 55,
|
|
941
923
|
},
|
|
942
924
|
{
|
|
943
925
|
key: '有效期限',
|
|
@@ -1052,7 +1034,7 @@ export class UserList {
|
|
|
1052
1034
|
bind: id,
|
|
1053
1035
|
view: () => {
|
|
1054
1036
|
const limit = 10;
|
|
1055
|
-
return new Promise((resolve
|
|
1037
|
+
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
1056
1038
|
const h = BgWidget.tableV3({
|
|
1057
1039
|
gvc: gvc,
|
|
1058
1040
|
getData: (vd) => {
|
|
@@ -1497,12 +1479,10 @@ export class UserList {
|
|
|
1497
1479
|
{
|
|
1498
1480
|
key: '用戶信箱',
|
|
1499
1481
|
value: `<span class="fs-7">${dd.userData.email}</span>`,
|
|
1500
|
-
width: 40,
|
|
1501
1482
|
},
|
|
1502
1483
|
{
|
|
1503
1484
|
key: '上次登入時間',
|
|
1504
1485
|
value: `<span class="fs-7">${glitter.ut.dateFormat(new Date(dd.online_time), 'yyyy-MM-dd hh:mm')}</span>`,
|
|
1505
|
-
width: 25,
|
|
1506
1486
|
},
|
|
1507
1487
|
{
|
|
1508
1488
|
key: '用戶狀態',
|
|
@@ -1543,76 +1523,77 @@ export class UserList {
|
|
|
1543
1523
|
自訂資料
|
|
1544
1524
|
</button>
|
|
1545
1525
|
</div>
|
|
1546
|
-
${BgWidget.
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
filter: [
|
|
1583
|
-
{
|
|
1584
|
-
name: '批量移除',
|
|
1585
|
-
event: (checkedData) => {
|
|
1586
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
1587
|
-
dialog.checkYesOrNot({
|
|
1588
|
-
text: '是否確認刪除所選項目?',
|
|
1589
|
-
callback: (response) => {
|
|
1590
|
-
if (response) {
|
|
1591
|
-
dialog.dataLoading({ visible: true });
|
|
1592
|
-
ApiUser.deleteUser({
|
|
1593
|
-
id: checkedData
|
|
1594
|
-
.map((dd) => {
|
|
1595
|
-
return dd.id;
|
|
1596
|
-
})
|
|
1597
|
-
.join(`,`),
|
|
1598
|
-
}).then((res) => {
|
|
1599
|
-
dialog.dataLoading({ visible: false });
|
|
1600
|
-
if (res.result) {
|
|
1601
|
-
vm.dataList = undefined;
|
|
1602
|
-
gvc.notifyDataChange(id);
|
|
1603
|
-
}
|
|
1604
|
-
else {
|
|
1605
|
-
dialog.errorMessage({ text: '刪除失敗' });
|
|
1606
|
-
}
|
|
1607
|
-
});
|
|
1608
|
-
}
|
|
1609
|
-
},
|
|
1610
|
-
});
|
|
1611
|
-
},
|
|
1612
|
-
option: false,
|
|
1526
|
+
${BgWidget.mainCard([
|
|
1527
|
+
BgWidget.searchPlace(gvc.event((e, event) => {
|
|
1528
|
+
vm.query = e.value;
|
|
1529
|
+
gvc.notifyDataChange(id);
|
|
1530
|
+
}), vm.query || '', '搜尋所有用戶'),
|
|
1531
|
+
BgWidget.tableV3({
|
|
1532
|
+
gvc: gvc,
|
|
1533
|
+
getData: (vd) => {
|
|
1534
|
+
vmi = vd;
|
|
1535
|
+
const limit = 20;
|
|
1536
|
+
ApiUser.getUserList({
|
|
1537
|
+
page: vmi.page - 1,
|
|
1538
|
+
limit: limit,
|
|
1539
|
+
search: vm.query || undefined,
|
|
1540
|
+
}).then((data) => {
|
|
1541
|
+
vm.dataList = data.response.data;
|
|
1542
|
+
vmi.pageSize = Math.ceil(data.response.total / limit);
|
|
1543
|
+
vmi.originalData = vm.dataList;
|
|
1544
|
+
vmi.tableData = getDatalist();
|
|
1545
|
+
vmi.loading = false;
|
|
1546
|
+
vmi.callback();
|
|
1547
|
+
});
|
|
1548
|
+
},
|
|
1549
|
+
rowClick: (data, index) => {
|
|
1550
|
+
if (type === 'select') {
|
|
1551
|
+
vm.dataList[index].checked = !vm.dataList[index].checked;
|
|
1552
|
+
vmi.data = getDatalist();
|
|
1553
|
+
vmi.callback();
|
|
1554
|
+
callback(vm.dataList.filter((dd) => {
|
|
1555
|
+
return dd.checked;
|
|
1556
|
+
}));
|
|
1557
|
+
}
|
|
1558
|
+
else {
|
|
1559
|
+
vm.data = vm.dataList[index];
|
|
1560
|
+
vm.type = 'replace';
|
|
1561
|
+
}
|
|
1613
1562
|
},
|
|
1614
|
-
|
|
1615
|
-
|
|
1563
|
+
filter: [
|
|
1564
|
+
{
|
|
1565
|
+
name: '批量移除',
|
|
1566
|
+
event: (checkedData) => {
|
|
1567
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
1568
|
+
dialog.checkYesOrNot({
|
|
1569
|
+
text: '是否確認刪除所選項目?',
|
|
1570
|
+
callback: (response) => {
|
|
1571
|
+
if (response) {
|
|
1572
|
+
dialog.dataLoading({ visible: true });
|
|
1573
|
+
ApiUser.deleteUser({
|
|
1574
|
+
id: checkedData
|
|
1575
|
+
.map((dd) => {
|
|
1576
|
+
return dd.id;
|
|
1577
|
+
})
|
|
1578
|
+
.join(`,`),
|
|
1579
|
+
}).then((res) => {
|
|
1580
|
+
dialog.dataLoading({ visible: false });
|
|
1581
|
+
if (res.result) {
|
|
1582
|
+
vm.dataList = undefined;
|
|
1583
|
+
gvc.notifyDataChange(id);
|
|
1584
|
+
}
|
|
1585
|
+
else {
|
|
1586
|
+
dialog.errorMessage({ text: '刪除失敗' });
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
});
|
|
1592
|
+
},
|
|
1593
|
+
},
|
|
1594
|
+
],
|
|
1595
|
+
}),
|
|
1596
|
+
].join(''))}
|
|
1616
1597
|
`, undefined, 'padding: 0 !important; margin: 0 !important;');
|
|
1617
1598
|
}
|
|
1618
1599
|
else if (vm.type == 'replace') {
|