ts-glitter 21.1.8 → 21.2.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 +14 -1
- package/lowcode/Entry.ts +13 -1
- package/lowcode/backend-manager/bg-line.js +18 -10
- package/lowcode/backend-manager/bg-line.ts +19 -10
- package/lowcode/backend-manager/bg-list-component.js +1 -2
- package/lowcode/backend-manager/bg-list-component.ts +1 -1
- package/lowcode/backend-manager/bg-notify.js +17 -10
- package/lowcode/backend-manager/bg-notify.ts +19 -11
- package/lowcode/backend-manager/bg-recommend.js +15 -9
- package/lowcode/backend-manager/bg-recommend.ts +16 -9
- package/lowcode/backend-manager/bg-sns.js +16 -9
- package/lowcode/backend-manager/bg-sns.ts +18 -11
- package/lowcode/backend-manager/bg-widget.js +325 -261
- package/lowcode/backend-manager/bg-widget.ts +117 -45
- package/lowcode/cms-plugin/auto-fcm-history.js +15 -6
- package/lowcode/cms-plugin/auto-fcm-history.ts +18 -11
- package/lowcode/cms-plugin/auto-reply.js +17 -1
- package/lowcode/cms-plugin/auto-reply.ts +16 -1
- package/lowcode/cms-plugin/exhibition-list.js +11 -2
- package/lowcode/cms-plugin/exhibition-list.ts +12 -2
- package/lowcode/cms-plugin/live_capture.js +2 -2
- package/lowcode/cms-plugin/live_capture.ts +2 -2
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/order-excel.js +15 -1
- package/lowcode/cms-plugin/module/order-excel.ts +22 -2
- package/lowcode/cms-plugin/module/table-storage.js +11 -0
- package/lowcode/cms-plugin/module/table-storage.ts +12 -0
- package/lowcode/cms-plugin/permission-setting.js +16 -9
- package/lowcode/cms-plugin/permission-setting.ts +18 -10
- package/lowcode/cms-plugin/reconciliation-area.js +12 -3
- package/lowcode/cms-plugin/reconciliation-area.ts +13 -3
- package/lowcode/cms-plugin/shopping-allowance-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-allowance-manager.ts +13 -3
- package/lowcode/cms-plugin/shopping-invoice-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-invoice-manager.ts +13 -4
- package/lowcode/cms-plugin/shopping-order-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-order-manager.ts +13 -4
- package/lowcode/cms-plugin/shopping-product-setting.js +16 -10
- package/lowcode/cms-plugin/shopping-product-setting.ts +17 -10
- package/lowcode/cms-plugin/shopping-product-stock.js +17 -11
- package/lowcode/cms-plugin/shopping-product-stock.ts +18 -11
- package/lowcode/cms-plugin/shopping-setting-basic.js +129 -38
- package/lowcode/cms-plugin/shopping-setting-basic.ts +134 -38
- package/lowcode/cms-plugin/stock-history.js +14 -7
- package/lowcode/cms-plugin/stock-history.ts +15 -7
- package/lowcode/cms-plugin/stock-stores.js +13 -6
- package/lowcode/cms-plugin/stock-stores.ts +14 -6
- package/lowcode/cms-plugin/stock-vendors.js +13 -6
- package/lowcode/cms-plugin/stock-vendors.ts +14 -6
- package/lowcode/cms-plugin/user-list.js +24 -7
- package/lowcode/cms-plugin/user-list.ts +25 -7
- package/lowcode/css/editor.css +9 -4
- package/lowcode/public-components/product/pd-class.js +11 -2
- package/lowcode/public-components/product/pd-class.ts +16 -3
- package/lowcode/public-components/public/ad.js +42 -10
- package/lowcode/public-components/public/ad.ts +28 -1
- package/lowcode/public-models/product.ts +1 -0
- package/lowcode/view-model/saas-view-model.js +394 -379
- package/lowcode/view-model/saas-view-model.ts +1451 -1405
- package/package.json +1 -1
- package/src/api-public/controllers/user.js +4 -4
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +4 -4
- package/src/api-public/services/checkout-event.js +7 -17
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/fb-api.d.ts +4 -3
- package/src/api-public/services/fb-api.js +71 -27
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/fb-api.ts +182 -127
- package/src/api-public/services/user.d.ts +6 -5
- package/src/api-public/services/user.js +19 -27
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +14 -10
- package/src/seo-config.js +1 -0
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -0
- package/src/services/app.js +7 -17
- package/src/services/app.js.map +1 -1
|
@@ -6,10 +6,11 @@ import { ApiShop } from '../glitter-base/route/shopping.js';
|
|
|
6
6
|
import { Article } from '../glitter-base/route/article.js';
|
|
7
7
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
8
8
|
import { ApiStock } from '../glitter-base/route/stock.js';
|
|
9
|
-
import { FormModule } from '../cms-plugin/module/form-module.js';
|
|
10
9
|
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
11
|
-
import { FormCheck } from '../cms-plugin/module/form-check.js';
|
|
12
10
|
import { Language, LanguageLocation } from '../glitter-base/global/language.js';
|
|
11
|
+
import { FormModule } from '../cms-plugin/module/form-module.js';
|
|
12
|
+
import { FormCheck } from '../cms-plugin/module/form-check.js';
|
|
13
|
+
import { TableStorage } from '../cms-plugin/module/table-storage.js';
|
|
13
14
|
import { ProductAi } from '../cms-plugin/ai-generator/product-ai.js';
|
|
14
15
|
import { imageLibrary } from '../modules/image-library.js';
|
|
15
16
|
import { Animation } from '../glitterBundle/module/Animation.js';
|
|
@@ -56,6 +57,8 @@ type TableV3Filter = {
|
|
|
56
57
|
event: (data: any) => void;
|
|
57
58
|
};
|
|
58
59
|
|
|
60
|
+
type ActiveFilterKeys = '' | 'updownFilter' | 'funnelFilter' | 'countingFilter' | 'columnFilter';
|
|
61
|
+
|
|
59
62
|
interface StockOptionsItem extends OptionsItem {
|
|
60
63
|
stock: number;
|
|
61
64
|
}
|
|
@@ -3522,77 +3525,146 @@ ${obj.default ?? ''}</textarea
|
|
|
3522
3525
|
</div>`;
|
|
3523
3526
|
}
|
|
3524
3527
|
|
|
3525
|
-
static
|
|
3528
|
+
static activeFilter = '';
|
|
3529
|
+
|
|
3530
|
+
static setActiveFilter = (gvc: GVC, key: ActiveFilterKeys) => {
|
|
3531
|
+
const keyList: ActiveFilterKeys[] = ['updownFilter', 'funnelFilter', 'countingFilter'];
|
|
3532
|
+
this.activeFilter = key;
|
|
3533
|
+
gvc.notifyDataChange(keyList);
|
|
3534
|
+
};
|
|
3535
|
+
|
|
3536
|
+
static columnFilter(obj: { gvc: GVC; callback: () => void }) {
|
|
3537
|
+
const id = 'columnFilter';
|
|
3526
3538
|
return html` <div
|
|
3527
|
-
class="
|
|
3539
|
+
class="c_filter_view"
|
|
3528
3540
|
onclick="${obj.gvc.event(() => {
|
|
3529
|
-
obj.callback(
|
|
3541
|
+
obj.callback();
|
|
3542
|
+
this.setActiveFilter(obj.gvc, this.activeFilter === id ? '' : id);
|
|
3530
3543
|
})}"
|
|
3531
3544
|
>
|
|
3532
3545
|
<i class="fa-regular fa-columns-3"></i>
|
|
3533
3546
|
</div>`;
|
|
3534
3547
|
}
|
|
3535
3548
|
|
|
3536
|
-
static funnelFilter(obj: { gvc: GVC; callback: (
|
|
3549
|
+
static funnelFilter(obj: { gvc: GVC; callback: () => void }) {
|
|
3550
|
+
const id = 'funnelFilter';
|
|
3537
3551
|
return html` <div
|
|
3538
|
-
class="
|
|
3552
|
+
class="c_filter_view"
|
|
3539
3553
|
onclick="${obj.gvc.event(() => {
|
|
3540
|
-
obj.callback(
|
|
3554
|
+
obj.callback();
|
|
3555
|
+
this.setActiveFilter(obj.gvc, this.activeFilter === id ? '' : id);
|
|
3541
3556
|
})}"
|
|
3542
3557
|
>
|
|
3543
3558
|
<i class="fa-regular fa-filter"></i>
|
|
3544
3559
|
</div>`;
|
|
3545
3560
|
}
|
|
3546
3561
|
|
|
3562
|
+
static countingFilter(obj: { gvc: GVC; callback: (value: number) => void; default: number }) {
|
|
3563
|
+
const vm = {
|
|
3564
|
+
id: 'countingFilter' as ActiveFilterKeys,
|
|
3565
|
+
checkClass: this.getDarkDotClass(obj.gvc),
|
|
3566
|
+
show: false,
|
|
3567
|
+
};
|
|
3568
|
+
|
|
3569
|
+
const countingList = TableStorage.limitList.map(n => {
|
|
3570
|
+
return { key: n, value: `顯示 ${n} 個` };
|
|
3571
|
+
});
|
|
3572
|
+
|
|
3573
|
+
return html`<div
|
|
3574
|
+
class="d-flex"
|
|
3575
|
+
onclick="${obj.gvc.event(() => {
|
|
3576
|
+
setTimeout(() => {
|
|
3577
|
+
this.setActiveFilter(obj.gvc, this.activeFilter === vm.id ? '' : vm.id);
|
|
3578
|
+
}, 50);
|
|
3579
|
+
})}"
|
|
3580
|
+
>
|
|
3581
|
+
<div class="c_filter_view">
|
|
3582
|
+
<i class="fa-solid fa-list-ol"></i>
|
|
3583
|
+
</div>
|
|
3584
|
+
${obj.gvc.bindView({
|
|
3585
|
+
bind: vm.id,
|
|
3586
|
+
view: () => {
|
|
3587
|
+
if (!(this.activeFilter === vm.id)) {
|
|
3588
|
+
return '';
|
|
3589
|
+
}
|
|
3590
|
+
return html` <div class="c_absolute" style="top: 20px; right: 20px;">
|
|
3591
|
+
<div class="form-check d-flex flex-column" style="gap: 16px">
|
|
3592
|
+
${obj.gvc.map(
|
|
3593
|
+
countingList.map(opt => {
|
|
3594
|
+
return html` <div>
|
|
3595
|
+
<input
|
|
3596
|
+
class="form-check-input ${vm.checkClass}"
|
|
3597
|
+
type="radio"
|
|
3598
|
+
id="${opt.key}"
|
|
3599
|
+
name="radio_${vm.id}"
|
|
3600
|
+
onclick="${obj.gvc.event(() => {
|
|
3601
|
+
TableStorage.setLimit(opt.key);
|
|
3602
|
+
obj.callback(opt.key);
|
|
3603
|
+
this.setActiveFilter(obj.gvc, '');
|
|
3604
|
+
})}"
|
|
3605
|
+
${obj.default === opt.key ? 'checked' : ''}
|
|
3606
|
+
/>
|
|
3607
|
+
<label class="form-check-label c_updown_label" for="${opt.key}">${opt.value}</label>
|
|
3608
|
+
</div>`;
|
|
3609
|
+
})
|
|
3610
|
+
)}
|
|
3611
|
+
</div>
|
|
3612
|
+
</div>`;
|
|
3613
|
+
},
|
|
3614
|
+
divCreate: {
|
|
3615
|
+
style: 'position: relative;',
|
|
3616
|
+
},
|
|
3617
|
+
})}
|
|
3618
|
+
</div>`;
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3547
3621
|
static updownFilter(obj: { gvc: GVC; callback: (value: any) => void; default: string; options: OptionsItem[] }) {
|
|
3548
3622
|
const vm = {
|
|
3549
|
-
id:
|
|
3623
|
+
id: 'updownFilter' as ActiveFilterKeys,
|
|
3550
3624
|
checkClass: this.getDarkDotClass(obj.gvc),
|
|
3551
3625
|
show: false,
|
|
3552
3626
|
};
|
|
3553
3627
|
|
|
3554
|
-
return html`<div
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
vm.
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3628
|
+
return html`<div
|
|
3629
|
+
class="d-flex"
|
|
3630
|
+
onclick="${obj.gvc.event(() => {
|
|
3631
|
+
setTimeout(() => {
|
|
3632
|
+
this.setActiveFilter(obj.gvc, this.activeFilter === vm.id ? '' : vm.id);
|
|
3633
|
+
}, 50);
|
|
3634
|
+
})}"
|
|
3635
|
+
>
|
|
3636
|
+
<div class="c_filter_view">
|
|
3562
3637
|
<i class="fa-regular fa-arrow-up-arrow-down"></i>
|
|
3563
3638
|
</div>
|
|
3564
3639
|
${obj.gvc.bindView({
|
|
3565
3640
|
bind: vm.id,
|
|
3566
3641
|
view: () => {
|
|
3567
|
-
if (vm.
|
|
3568
|
-
|
|
3569
|
-
return '';
|
|
3570
|
-
}
|
|
3571
|
-
return html` <div class="c_absolute" style="top: 20px; right: 20px;">
|
|
3572
|
-
<div class="form-check d-flex flex-column" style="gap: 16px">
|
|
3573
|
-
${obj.gvc.map(
|
|
3574
|
-
obj.options.map(opt => {
|
|
3575
|
-
return html` <div>
|
|
3576
|
-
<input
|
|
3577
|
-
class="form-check-input ${vm.checkClass}"
|
|
3578
|
-
type="radio"
|
|
3579
|
-
id="${opt.key}"
|
|
3580
|
-
name="radio_${vm.id}"
|
|
3581
|
-
onclick="${obj.gvc.event(e => {
|
|
3582
|
-
vm.show = !vm.show;
|
|
3583
|
-
obj.callback(e.id);
|
|
3584
|
-
obj.gvc.notifyDataChange(vm.id);
|
|
3585
|
-
})}"
|
|
3586
|
-
${obj.default === opt.key ? 'checked' : ''}
|
|
3587
|
-
/>
|
|
3588
|
-
<label class="form-check-label c_updown_label" for="${opt.key}">${opt.value}</label>
|
|
3589
|
-
</div>`;
|
|
3590
|
-
})
|
|
3591
|
-
)}
|
|
3592
|
-
</div>
|
|
3593
|
-
</div>`;
|
|
3642
|
+
if (!(this.activeFilter === vm.id) || obj.options.length === 0) {
|
|
3643
|
+
return '';
|
|
3594
3644
|
}
|
|
3595
|
-
|
|
3645
|
+
|
|
3646
|
+
return html` <div class="c_absolute" style="top: 20px; right: 20px;">
|
|
3647
|
+
<div class="form-check d-flex flex-column" style="gap: 16px">
|
|
3648
|
+
${obj.gvc.map(
|
|
3649
|
+
obj.options.map(opt => {
|
|
3650
|
+
return html` <div>
|
|
3651
|
+
<input
|
|
3652
|
+
class="form-check-input ${vm.checkClass}"
|
|
3653
|
+
type="radio"
|
|
3654
|
+
id="${opt.key}"
|
|
3655
|
+
name="radio_${vm.id}"
|
|
3656
|
+
onclick="${obj.gvc.event(e => {
|
|
3657
|
+
obj.callback(e.id);
|
|
3658
|
+
this.setActiveFilter(obj.gvc, '');
|
|
3659
|
+
})}"
|
|
3660
|
+
${obj.default === opt.key ? 'checked' : ''}
|
|
3661
|
+
/>
|
|
3662
|
+
<label class="form-check-label c_updown_label" for="${opt.key}">${opt.value}</label>
|
|
3663
|
+
</div>`;
|
|
3664
|
+
})
|
|
3665
|
+
)}
|
|
3666
|
+
</div>
|
|
3667
|
+
</div>`;
|
|
3596
3668
|
},
|
|
3597
3669
|
divCreate: {
|
|
3598
3670
|
style: 'position: relative;',
|
|
@@ -20,6 +20,7 @@ import { ShoppingDiscountSetting } from '../cms-plugin/shopping-discount-setting
|
|
|
20
20
|
import { ApiSmtp } from '../glitter-base/route/smtp.js';
|
|
21
21
|
import { BgListComponent } from '../backend-manager/bg-list-component.js';
|
|
22
22
|
import { Tool } from '../modules/tool.js';
|
|
23
|
+
import { TableStorage } from './module/table-storage.js';
|
|
23
24
|
const html = String.raw;
|
|
24
25
|
const inputStyle = 'font-size: 16px; height:40px; width:300px;';
|
|
25
26
|
export class BgNotify {
|
|
@@ -262,6 +263,7 @@ export class BgNotify {
|
|
|
262
263
|
query: '',
|
|
263
264
|
queryType: 'email',
|
|
264
265
|
filter: {},
|
|
266
|
+
listLimit: TableStorage.getLimit(),
|
|
265
267
|
};
|
|
266
268
|
return gvc.bindView(() => {
|
|
267
269
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.emailFilterFrame);
|
|
@@ -288,6 +290,14 @@ export class BgNotify {
|
|
|
288
290
|
gvc.notifyDataChange(vm.tableId);
|
|
289
291
|
gvc.notifyDataChange(id);
|
|
290
292
|
}), vm.query || '', '搜尋所有信件內容'),
|
|
293
|
+
BgWidget.countingFilter({
|
|
294
|
+
gvc,
|
|
295
|
+
callback: value => {
|
|
296
|
+
vm.listLimit = value;
|
|
297
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
298
|
+
},
|
|
299
|
+
default: vm.listLimit,
|
|
300
|
+
}),
|
|
291
301
|
BgWidget.funnelFilter({
|
|
292
302
|
gvc,
|
|
293
303
|
callback: () => {
|
|
@@ -307,10 +317,9 @@ export class BgNotify {
|
|
|
307
317
|
gvc: gvc,
|
|
308
318
|
getData: vmi => {
|
|
309
319
|
var _a, _b;
|
|
310
|
-
const limit = 20;
|
|
311
320
|
ApiFcm.history({
|
|
312
321
|
page: vmi.page - 1,
|
|
313
|
-
limit:
|
|
322
|
+
limit: vm.listLimit,
|
|
314
323
|
search: (_a = vm.query) !== null && _a !== void 0 ? _a : '',
|
|
315
324
|
searchType: (_b = vm.queryType) !== null && _b !== void 0 ? _b : 'email',
|
|
316
325
|
sendTime: undefined,
|
|
@@ -381,7 +390,7 @@ export class BgNotify {
|
|
|
381
390
|
});
|
|
382
391
|
}
|
|
383
392
|
vm.dataList = data.response.data;
|
|
384
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
393
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
385
394
|
vmi.originalData = vm.dataList;
|
|
386
395
|
vmi.tableData = getDatalist();
|
|
387
396
|
vmi.loading = false;
|
|
@@ -840,7 +849,7 @@ export class BgNotify {
|
|
|
840
849
|
ApiUser.getUserList({
|
|
841
850
|
page: 0,
|
|
842
851
|
limit: 99999,
|
|
843
|
-
only_id: true
|
|
852
|
+
only_id: true,
|
|
844
853
|
}).then(dd => {
|
|
845
854
|
dd.response.data.map((user) => {
|
|
846
855
|
if (user.userData.email && user.userData.email.length > 0) {
|
|
@@ -1174,7 +1183,7 @@ export class BgNotify {
|
|
|
1174
1183
|
ApiUser.getUserList({
|
|
1175
1184
|
page: 0,
|
|
1176
1185
|
limit: 99999,
|
|
1177
|
-
only_id: true
|
|
1186
|
+
only_id: true,
|
|
1178
1187
|
}).then(dd => {
|
|
1179
1188
|
if (dd.response.data) {
|
|
1180
1189
|
const ids = [];
|
|
@@ -1226,7 +1235,7 @@ export class BgNotify {
|
|
|
1226
1235
|
page: 0,
|
|
1227
1236
|
limit: 99999,
|
|
1228
1237
|
only_id: true,
|
|
1229
|
-
search: data.query
|
|
1238
|
+
search: data.query,
|
|
1230
1239
|
}).then(dd => {
|
|
1231
1240
|
if (dd.response.data) {
|
|
1232
1241
|
vm.dataList = dd.response.data
|
|
@@ -12,6 +12,7 @@ import { ShoppingDiscountSetting } from '../cms-plugin/shopping-discount-setting
|
|
|
12
12
|
import { ApiSmtp } from '../glitter-base/route/smtp.js';
|
|
13
13
|
import { BgListComponent } from '../backend-manager/bg-list-component.js';
|
|
14
14
|
import { Tool } from '../modules/tool.js';
|
|
15
|
+
import { TableStorage } from './module/table-storage.js';
|
|
15
16
|
|
|
16
17
|
const html = String.raw;
|
|
17
18
|
|
|
@@ -312,6 +313,7 @@ export class BgNotify {
|
|
|
312
313
|
query?: string;
|
|
313
314
|
queryType?: string;
|
|
314
315
|
filter?: any;
|
|
316
|
+
listLimit: number;
|
|
315
317
|
} = {
|
|
316
318
|
id: glitter.getUUID(),
|
|
317
319
|
tableId: glitter.getUUID(),
|
|
@@ -321,6 +323,7 @@ export class BgNotify {
|
|
|
321
323
|
query: '',
|
|
322
324
|
queryType: 'email',
|
|
323
325
|
filter: {},
|
|
326
|
+
listLimit: TableStorage.getLimit(),
|
|
324
327
|
};
|
|
325
328
|
return gvc.bindView(() => {
|
|
326
329
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.emailFilterFrame);
|
|
@@ -353,6 +356,14 @@ export class BgNotify {
|
|
|
353
356
|
vm.query || '',
|
|
354
357
|
'搜尋所有信件內容'
|
|
355
358
|
),
|
|
359
|
+
BgWidget.countingFilter({
|
|
360
|
+
gvc,
|
|
361
|
+
callback: value => {
|
|
362
|
+
vm.listLimit = value;
|
|
363
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
364
|
+
},
|
|
365
|
+
default: vm.listLimit,
|
|
366
|
+
}),
|
|
356
367
|
BgWidget.funnelFilter({
|
|
357
368
|
gvc,
|
|
358
369
|
callback: () => {
|
|
@@ -372,10 +383,9 @@ export class BgNotify {
|
|
|
372
383
|
return BgWidget.tableV3({
|
|
373
384
|
gvc: gvc,
|
|
374
385
|
getData: vmi => {
|
|
375
|
-
const limit = 20;
|
|
376
386
|
ApiFcm.history({
|
|
377
387
|
page: vmi.page - 1,
|
|
378
|
-
limit:
|
|
388
|
+
limit: vm.listLimit,
|
|
379
389
|
search: vm.query ?? '',
|
|
380
390
|
searchType: vm.queryType ?? 'email',
|
|
381
391
|
sendTime: undefined,
|
|
@@ -394,10 +404,7 @@ export class BgNotify {
|
|
|
394
404
|
{
|
|
395
405
|
key: '標題',
|
|
396
406
|
value: html`<span class="fs-7"
|
|
397
|
-
>${Tool.truncateString(
|
|
398
|
-
`${dd.content.title}`,
|
|
399
|
-
25
|
|
400
|
-
)}</span
|
|
407
|
+
>${Tool.truncateString(`${dd.content.title}`, 25)}</span
|
|
401
408
|
>`,
|
|
402
409
|
},
|
|
403
410
|
{
|
|
@@ -453,7 +460,7 @@ export class BgNotify {
|
|
|
453
460
|
}
|
|
454
461
|
|
|
455
462
|
vm.dataList = data.response.data;
|
|
456
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
463
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
457
464
|
vmi.originalData = vm.dataList;
|
|
458
465
|
vmi.tableData = getDatalist();
|
|
459
466
|
vmi.loading = false;
|
|
@@ -947,7 +954,7 @@ export class BgNotify {
|
|
|
947
954
|
ApiUser.getUserList({
|
|
948
955
|
page: 0,
|
|
949
956
|
limit: 99999,
|
|
950
|
-
only_id:true
|
|
957
|
+
only_id: true,
|
|
951
958
|
}).then(dd => {
|
|
952
959
|
dd.response.data.map((user: any) => {
|
|
953
960
|
if (user.userData.email && user.userData.email.length > 0) {
|
|
@@ -1298,7 +1305,7 @@ export class BgNotify {
|
|
|
1298
1305
|
ApiUser.getUserList({
|
|
1299
1306
|
page: 0,
|
|
1300
1307
|
limit: 99999,
|
|
1301
|
-
only_id:true
|
|
1308
|
+
only_id: true,
|
|
1302
1309
|
}).then(dd => {
|
|
1303
1310
|
if (dd.response.data) {
|
|
1304
1311
|
const ids: number[] = [];
|
|
@@ -1350,8 +1357,8 @@ export class BgNotify {
|
|
|
1350
1357
|
ApiUser.getUserList({
|
|
1351
1358
|
page: 0,
|
|
1352
1359
|
limit: 99999,
|
|
1353
|
-
only_id:true,
|
|
1354
|
-
search: data.query
|
|
1360
|
+
only_id: true,
|
|
1361
|
+
search: data.query,
|
|
1355
1362
|
}).then(dd => {
|
|
1356
1363
|
if (dd.response.data) {
|
|
1357
1364
|
vm.dataList = dd.response.data
|
|
@@ -47,7 +47,14 @@ export class AutoReply {
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
key: '最後更新時間',
|
|
50
|
-
value:
|
|
50
|
+
value: (() => {
|
|
51
|
+
if (!dd.updated_time || isNaN(new Date(dd.updated_time).getTime())) {
|
|
52
|
+
return '系統預設';
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return gvc.glitter.ut.dateFormat(dd.updated_time, 'yyyy-MM-dd');
|
|
56
|
+
}
|
|
57
|
+
})(),
|
|
51
58
|
},
|
|
52
59
|
{
|
|
53
60
|
key: '狀態',
|
|
@@ -107,6 +114,7 @@ export class AutoReply {
|
|
|
107
114
|
vm.dataList = yield Promise.all([
|
|
108
115
|
'auto-email-shipment-arrival',
|
|
109
116
|
'auto-email-shipment',
|
|
117
|
+
'auto-email-in-stock',
|
|
110
118
|
'auto-email-order-create',
|
|
111
119
|
'auto-email-payment-successful',
|
|
112
120
|
'proof-purchase',
|
|
@@ -302,6 +310,14 @@ export class AutoReply {
|
|
|
302
310
|
content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
|
|
303
311
|
toggle: true,
|
|
304
312
|
},
|
|
313
|
+
{
|
|
314
|
+
tag: 'auto-email-in-stock',
|
|
315
|
+
tag_name: '商品備貨',
|
|
316
|
+
name: '@{{app_name}}',
|
|
317
|
+
title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
|
|
318
|
+
content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
|
|
319
|
+
toggle: true,
|
|
320
|
+
},
|
|
305
321
|
{
|
|
306
322
|
tag: 'auto-email-shipment-arrival',
|
|
307
323
|
tag_name: '商品到貨',
|
|
@@ -53,7 +53,13 @@ export class AutoReply {
|
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
key: '最後更新時間',
|
|
56
|
-
value:
|
|
56
|
+
value: (() => {
|
|
57
|
+
if (!dd.updated_time || isNaN(new Date(dd.updated_time).getTime())) {
|
|
58
|
+
return '系統預設';
|
|
59
|
+
} else {
|
|
60
|
+
return gvc.glitter.ut.dateFormat(dd.updated_time, 'yyyy-MM-dd');
|
|
61
|
+
}
|
|
62
|
+
})(),
|
|
57
63
|
},
|
|
58
64
|
{
|
|
59
65
|
key: '狀態',
|
|
@@ -122,6 +128,7 @@ export class AutoReply {
|
|
|
122
128
|
[
|
|
123
129
|
'auto-email-shipment-arrival',
|
|
124
130
|
'auto-email-shipment',
|
|
131
|
+
'auto-email-in-stock',
|
|
125
132
|
'auto-email-order-create',
|
|
126
133
|
'auto-email-payment-successful',
|
|
127
134
|
'proof-purchase',
|
|
@@ -352,6 +359,14 @@ export class AutoReply {
|
|
|
352
359
|
content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 出貨中',
|
|
353
360
|
toggle: true,
|
|
354
361
|
},
|
|
362
|
+
{
|
|
363
|
+
tag: 'auto-email-in-stock',
|
|
364
|
+
tag_name: '商品備貨',
|
|
365
|
+
name: '@{{app_name}}',
|
|
366
|
+
title: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
|
|
367
|
+
content: '[@{{app_name}}] #@{{訂單號碼}} 送貨狀態 更新為: 備貨中',
|
|
368
|
+
toggle: true,
|
|
369
|
+
},
|
|
355
370
|
{
|
|
356
371
|
tag: 'auto-email-shipment-arrival',
|
|
357
372
|
tag_name: '商品到貨',
|
|
@@ -7,6 +7,7 @@ import { ApiUser } from '../glitter-base/route/user.js';
|
|
|
7
7
|
import { ApiStock } from '../glitter-base/route/stock.js';
|
|
8
8
|
import { CheckInput } from '../modules/checkInput.js';
|
|
9
9
|
import { Tool } from '../modules/tool.js';
|
|
10
|
+
import { TableStorage } from './module/table-storage.js';
|
|
10
11
|
const html = String.raw;
|
|
11
12
|
function getTimeState(startDate, endDate) {
|
|
12
13
|
const now = new Date();
|
|
@@ -32,6 +33,7 @@ export class ExhibitionManager {
|
|
|
32
33
|
filter: {},
|
|
33
34
|
orderString: '',
|
|
34
35
|
storeData: {},
|
|
36
|
+
listLimit: TableStorage.getLimit(),
|
|
35
37
|
};
|
|
36
38
|
return gvc.bindView({
|
|
37
39
|
bind: vm.id,
|
|
@@ -136,6 +138,14 @@ export class ExhibitionManager {
|
|
|
136
138
|
gvc.notifyDataChange(vm.tableId);
|
|
137
139
|
gvc.notifyDataChange(id);
|
|
138
140
|
}), vm.query || '', '搜尋展場名稱'),
|
|
141
|
+
BgWidget.countingFilter({
|
|
142
|
+
gvc,
|
|
143
|
+
callback: value => {
|
|
144
|
+
vm.listLimit = value;
|
|
145
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
146
|
+
},
|
|
147
|
+
default: vm.listLimit,
|
|
148
|
+
}),
|
|
139
149
|
];
|
|
140
150
|
const filterTags = ListComp.getFilterTags(FilterOptions.exhibitionFunnel);
|
|
141
151
|
return BgListComponent.listBarRWD(filterList, filterTags);
|
|
@@ -149,10 +159,9 @@ export class ExhibitionManager {
|
|
|
149
159
|
gvc: gvc,
|
|
150
160
|
getData: vd => {
|
|
151
161
|
vmi = vd;
|
|
152
|
-
const limit = 100;
|
|
153
162
|
function callback(list) {
|
|
154
163
|
vm.dataList = list;
|
|
155
|
-
vmi.pageSize = Math.ceil(list.length /
|
|
164
|
+
vmi.pageSize = Math.ceil(list.length / vm.listLimit);
|
|
156
165
|
vmi.originalData = vm.dataList;
|
|
157
166
|
vmi.tableData = getDatalist();
|
|
158
167
|
vmi.loading = false;
|
|
@@ -8,6 +8,7 @@ import { ApiUser } from '../glitter-base/route/user.js';
|
|
|
8
8
|
import { ApiStock } from '../glitter-base/route/stock.js';
|
|
9
9
|
import { CheckInput } from '../modules/checkInput.js';
|
|
10
10
|
import { Tool } from '../modules/tool.js';
|
|
11
|
+
import { TableStorage } from './module/table-storage.js';
|
|
11
12
|
|
|
12
13
|
const html = String.raw;
|
|
13
14
|
|
|
@@ -41,6 +42,7 @@ type VM = {
|
|
|
41
42
|
queryType: string;
|
|
42
43
|
orderString: string;
|
|
43
44
|
storeData: any;
|
|
45
|
+
listLimit: number;
|
|
44
46
|
};
|
|
45
47
|
|
|
46
48
|
function getTimeState(startDate: string, endDate: string): 'beforeStart' | 'inRange' | 'afterEnd' {
|
|
@@ -67,6 +69,7 @@ export class ExhibitionManager {
|
|
|
67
69
|
filter: {},
|
|
68
70
|
orderString: '',
|
|
69
71
|
storeData: {},
|
|
72
|
+
listLimit: TableStorage.getLimit(),
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
return gvc.bindView({
|
|
@@ -190,6 +193,14 @@ export class ExhibitionManager {
|
|
|
190
193
|
vm.query || '',
|
|
191
194
|
'搜尋展場名稱'
|
|
192
195
|
),
|
|
196
|
+
BgWidget.countingFilter({
|
|
197
|
+
gvc,
|
|
198
|
+
callback: value => {
|
|
199
|
+
vm.listLimit = value;
|
|
200
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
201
|
+
},
|
|
202
|
+
default: vm.listLimit,
|
|
203
|
+
}),
|
|
193
204
|
];
|
|
194
205
|
|
|
195
206
|
const filterTags = ListComp.getFilterTags(FilterOptions.exhibitionFunnel);
|
|
@@ -204,11 +215,10 @@ export class ExhibitionManager {
|
|
|
204
215
|
gvc: gvc,
|
|
205
216
|
getData: vd => {
|
|
206
217
|
vmi = vd;
|
|
207
|
-
const limit = 100;
|
|
208
218
|
|
|
209
219
|
function callback(list: ExhibitionData[]) {
|
|
210
220
|
vm.dataList = list;
|
|
211
|
-
vmi.pageSize = Math.ceil(list.length /
|
|
221
|
+
vmi.pageSize = Math.ceil(list.length / vm.listLimit);
|
|
212
222
|
vmi.originalData = vm.dataList;
|
|
213
223
|
vmi.tableData = getDatalist();
|
|
214
224
|
vmi.loading = false;
|
|
@@ -3977,10 +3977,10 @@ export class LiveCapture {
|
|
|
3977
3977
|
value=""
|
|
3978
3978
|
/>
|
|
3979
3979
|
</div>
|
|
3980
|
-
<div class="
|
|
3980
|
+
<div class="c_filter_view">
|
|
3981
3981
|
<i class="fa-regular fa-filter" aria-hidden="true"></i>
|
|
3982
3982
|
</div>
|
|
3983
|
-
<div class="
|
|
3983
|
+
<div class="c_filter_view">
|
|
3984
3984
|
<i class="fa-regular fa-arrow-up-arrow-down" aria-hidden="true"></i>
|
|
3985
3985
|
</div>
|
|
3986
3986
|
</div>
|
|
@@ -4304,10 +4304,10 @@ export class LiveCapture {
|
|
|
4304
4304
|
value=""
|
|
4305
4305
|
/>
|
|
4306
4306
|
</div>
|
|
4307
|
-
<div class="
|
|
4307
|
+
<div class="c_filter_view">
|
|
4308
4308
|
<i class="fa-regular fa-filter" aria-hidden="true"></i>
|
|
4309
4309
|
</div>
|
|
4310
|
-
<div class="
|
|
4310
|
+
<div class="c_filter_view">
|
|
4311
4311
|
<i class="fa-regular fa-arrow-up-arrow-down" aria-hidden="true"></i>
|
|
4312
4312
|
</div>
|
|
4313
4313
|
</div>
|
|
@@ -753,6 +753,7 @@ export class OrderExcel {
|
|
|
753
753
|
yield ApiUser.getPublicConfig('customer_form_user_setting', 'manager').then(r => {
|
|
754
754
|
return Array.isArray(r.response.value.list) ? r.response.value.list : [];
|
|
755
755
|
}),
|
|
756
|
+
(yield ApiUser.getPublicConfig('custom_form_checkout_recipient', 'manager')).response.value
|
|
756
757
|
]);
|
|
757
758
|
return dataArray;
|
|
758
759
|
});
|
|
@@ -825,7 +826,7 @@ OrderExcel.headerColumn = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
825
826
|
};
|
|
826
827
|
});
|
|
827
828
|
OrderExcel.getCustomizeMap = (order) => __awaiter(void 0, void 0, void 0, function* () {
|
|
828
|
-
const [cashflowConfigObj, shipmentConfigObj, registerConfig, memberConfig] = yield OrderExcel.customizePromise();
|
|
829
|
+
const [cashflowConfigObj, shipmentConfigObj, registerConfig, memberConfig, receipt] = yield OrderExcel.customizePromise();
|
|
829
830
|
const customizeMap = new Map();
|
|
830
831
|
const getUserValue = (key) => {
|
|
831
832
|
try {
|
|
@@ -865,5 +866,18 @@ OrderExcel.getCustomizeMap = (order) => __awaiter(void 0, void 0, void 0, functi
|
|
|
865
866
|
(shipmentConfig || []).map((item) => {
|
|
866
867
|
customizeMap.set(`物流自訂值 - ${item.title}`, order ? getShipmentValue(item.key) : '-');
|
|
867
868
|
});
|
|
869
|
+
let viewModel = [
|
|
870
|
+
['姓名', 'name'],
|
|
871
|
+
['電話', 'phone'],
|
|
872
|
+
['信箱', 'email'],
|
|
873
|
+
];
|
|
874
|
+
receipt.list.map((d1) => {
|
|
875
|
+
var _b;
|
|
876
|
+
if (!viewModel.find(dd => {
|
|
877
|
+
return dd[1] === d1.key;
|
|
878
|
+
})) {
|
|
879
|
+
customizeMap.set(`收件人資訊 - ${d1.title}`, order ? ((_b = order.orderData.user_info[d1.key]) !== null && _b !== void 0 ? _b : '-') : '-');
|
|
880
|
+
}
|
|
881
|
+
});
|
|
868
882
|
return customizeMap;
|
|
869
883
|
});
|