ts-glitter 21.1.7 → 21.1.9
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-product.js +39 -18
- package/lowcode/backend-manager/bg-product.ts +54 -23
- 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/pos-pages/payment-page.js +37 -29
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +61 -49
- package/lowcode/cms-plugin/pos-pages/pos-function.js +6 -1
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +8 -1
- 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 +15 -7
- package/lowcode/cms-plugin/stock-history.ts +16 -17
- 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 +11 -6
- package/lowcode/form-view/e-commerce/product-select.js +13 -11
- package/lowcode/form-view/e-commerce/product-select.ts +14 -12
- package/lowcode/modules/tool.js +9 -0
- package/lowcode/modules/tool.ts +12 -0
- package/lowcode/public-components/checkout/index.js +216 -207
- package/lowcode/public-components/checkout/index.ts +1315 -1309
- 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/models/glitter-finance.js +1 -2
- package/src/api-public/models/glitter-finance.js.map +1 -5
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/fb-api.d.ts +4 -3
- package/src/api-public/services/fb-api.js +72 -27
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/fb-api.ts +183 -127
- package/src/api-public/services/fb-service.js +4 -4
- package/src/api-public/services/fb-service.js.map +1 -1
- package/src/api-public/services/schedule.d.ts +1 -1
- package/src/api-public/services/schedule.js +18 -14
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +18 -14
- package/src/api-public/services/user.d.ts +6 -5
- package/src/api-public/services/user.js +12 -10
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +14 -10
- package/src/config.d.ts +1 -1
- package/src/modules/AWSLib.js +2 -3
- package/src/modules/AWSLib.js.map +1 -1
- package/src/modules/database.d.ts +1 -1
- package/src/modules/redis.d.ts +1 -1
- package/src/modules/tool.d.ts +4 -4
- package/src/modules/tool.js +1 -2
- package/src/modules/tool.js.map +1 -1
- 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/backend-service.js +17 -7
- package/src/services/backend-service.js.map +1 -1
- package/src/services/create-instance.js +3 -4
- package/src/services/create-instance.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/saas-table-check.js.map +1 -5
- package/src/services/tool.js +2 -3
- package/src/services/tool.js.map +1 -1
|
@@ -2510,20 +2510,38 @@ export class ShoppingSettingBasic {
|
|
|
2510
2510
|
gvc.notifyDataChange([variantsViewID]);
|
|
2511
2511
|
})}"
|
|
2512
2512
|
></i>
|
|
2513
|
-
<div
|
|
2513
|
+
<div
|
|
2514
|
+
style="width:calc(35% - ${document.body.clientWidth > 800
|
|
2515
|
+
? 46
|
|
2516
|
+
: 0}px);font-size: 16px;font-weight: 400;"
|
|
2517
|
+
>
|
|
2518
|
+
規格
|
|
2519
|
+
</div>
|
|
2514
2520
|
${document.body.clientWidth < 768
|
|
2515
2521
|
? html` <div
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
+
class="text-center"
|
|
2523
|
+
style="width: 20%;color:#393939;font-size: 16px;font-weight: 400;"
|
|
2524
|
+
>
|
|
2525
|
+
顯示
|
|
2526
|
+
</div>
|
|
2527
|
+
<div
|
|
2528
|
+
class="text-center"
|
|
2529
|
+
style="width: 35%;color:#393939;font-size: 16px;font-weight: 400;"
|
|
2530
|
+
>
|
|
2531
|
+
售價
|
|
2532
|
+
</div>`
|
|
2533
|
+
: `${[
|
|
2534
|
+
{ title: '顯示', width: 10 },
|
|
2535
|
+
{ title: '售價', width: 15 },
|
|
2536
|
+
{ title: '庫存數量', width: 15 },
|
|
2537
|
+
{ title: '運費計算方式', width: 20 },
|
|
2538
|
+
]
|
|
2522
2539
|
.map(dd => {
|
|
2523
2540
|
return html` <div
|
|
2524
|
-
|
|
2541
|
+
class="text-center"
|
|
2542
|
+
style="color:#393939;font-size: 16px;font-weight: 400;width: ${dd.width}%;"
|
|
2525
2543
|
>
|
|
2526
|
-
${dd}
|
|
2544
|
+
${dd.title}
|
|
2527
2545
|
</div>`;
|
|
2528
2546
|
})
|
|
2529
2547
|
.join('')}`}
|
|
@@ -2608,7 +2626,9 @@ export class ShoppingSettingBasic {
|
|
|
2608
2626
|
})}"
|
|
2609
2627
|
></i>
|
|
2610
2628
|
<div
|
|
2611
|
-
style="
|
|
2629
|
+
style="width: calc(35% - ${document.body.clientWidth > 800
|
|
2630
|
+
? 52
|
|
2631
|
+
: -10}px);font-size: 16px;font-weight: 400;display: flex;align-items: center; gap:${document
|
|
2612
2632
|
.body.clientWidth < 800
|
|
2613
2633
|
? 10
|
|
2614
2634
|
: 24}px;"
|
|
@@ -2667,6 +2687,47 @@ export class ShoppingSettingBasic {
|
|
|
2667
2687
|
: html` <i class="fa-regular fa-chevron-down"></i>`}
|
|
2668
2688
|
</div>
|
|
2669
2689
|
</div>
|
|
2690
|
+
${gvc.bindView(
|
|
2691
|
+
(() => {
|
|
2692
|
+
const id = gvc.glitter.getUUID();
|
|
2693
|
+
return {
|
|
2694
|
+
bind: id,
|
|
2695
|
+
view: () => {
|
|
2696
|
+
return postMD.variants
|
|
2697
|
+
.filter(v => v.spec.includes(spec.title))
|
|
2698
|
+
.every(v => v.invisible)
|
|
2699
|
+
? html`<i
|
|
2700
|
+
class="fa-solid fa-eye-slash cursor_pointer"
|
|
2701
|
+
onclick="${obj.gvc.event(() => {
|
|
2702
|
+
postMD.variants.map(data => {
|
|
2703
|
+
if (data.spec.includes(spec.title)) {
|
|
2704
|
+
data.invisible = false;
|
|
2705
|
+
}
|
|
2706
|
+
return data;
|
|
2707
|
+
});
|
|
2708
|
+
gvc.notifyDataChange(vm.id);
|
|
2709
|
+
})}"
|
|
2710
|
+
></i>`
|
|
2711
|
+
: html`<i
|
|
2712
|
+
class="fa-regular fa-eye cursor_pointer"
|
|
2713
|
+
onclick="${obj.gvc.event(() => {
|
|
2714
|
+
postMD.variants.map(data => {
|
|
2715
|
+
if (data.spec.includes(spec.title)) {
|
|
2716
|
+
data.invisible = true;
|
|
2717
|
+
}
|
|
2718
|
+
return data;
|
|
2719
|
+
});
|
|
2720
|
+
gvc.notifyDataChange(vm.id);
|
|
2721
|
+
})}"
|
|
2722
|
+
></i>`;
|
|
2723
|
+
},
|
|
2724
|
+
divCreate: {
|
|
2725
|
+
class: 'text-center',
|
|
2726
|
+
style: 'width: 10%;',
|
|
2727
|
+
},
|
|
2728
|
+
};
|
|
2729
|
+
})()
|
|
2730
|
+
)}
|
|
2670
2731
|
${[
|
|
2671
2732
|
{
|
|
2672
2733
|
title: '統一設定價格',
|
|
@@ -2699,20 +2760,13 @@ export class ShoppingSettingBasic {
|
|
|
2699
2760
|
dd.title = `${stock}`;
|
|
2700
2761
|
}
|
|
2701
2762
|
return html` <div
|
|
2763
|
+
class="px-1"
|
|
2702
2764
|
style="color:#393939;font-size: 16px;font-weight: 400;width: ${document
|
|
2703
2765
|
.body.clientWidth > 800
|
|
2704
|
-
? `
|
|
2705
|
-
: 'auto;max-width:140px;'}
|
|
2706
|
-
.clientWidth > 768
|
|
2707
|
-
? `10px`
|
|
2708
|
-
: '0px'};"
|
|
2766
|
+
? `17.5%;`
|
|
2767
|
+
: 'auto;max-width:140px;'}"
|
|
2709
2768
|
>
|
|
2710
|
-
<
|
|
2711
|
-
style="height: 40px;width:100%;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;font-size: 13px;"
|
|
2712
|
-
placeholder="${dd.title}"
|
|
2713
|
-
type="number"
|
|
2714
|
-
${dd.key == 'stock' ? `readonly` : ``}
|
|
2715
|
-
min="0"
|
|
2769
|
+
<div
|
|
2716
2770
|
onclick="${gvc.event(() => {
|
|
2717
2771
|
if (index === 1) {
|
|
2718
2772
|
ProductSetting.showBatchEditDialog({
|
|
@@ -2725,17 +2779,31 @@ export class ShoppingSettingBasic {
|
|
|
2725
2779
|
});
|
|
2726
2780
|
}
|
|
2727
2781
|
})}"
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
});
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2782
|
+
>
|
|
2783
|
+
${BgWidget.editeInput({
|
|
2784
|
+
gvc,
|
|
2785
|
+
title: '',
|
|
2786
|
+
default: '',
|
|
2787
|
+
placeHolder: dd.title,
|
|
2788
|
+
callback: value => {
|
|
2789
|
+
const n = parseInt(`${value}`, 10);
|
|
2790
|
+
postMD.variants
|
|
2791
|
+
.filter(dd => {
|
|
2792
|
+
return dd.spec[0] === spec.title;
|
|
2793
|
+
})
|
|
2794
|
+
.map(d1 => {
|
|
2795
|
+
(d1 as any)[dd.key] = isNaN(n) ? 0 : n;
|
|
2796
|
+
});
|
|
2797
|
+
gvc.notifyDataChange(vm.id);
|
|
2798
|
+
},
|
|
2799
|
+
type: 'number',
|
|
2800
|
+
readonly: dd.key == 'stock',
|
|
2801
|
+
divStyle:
|
|
2802
|
+
document.body.clientWidth > 800
|
|
2803
|
+
? ''
|
|
2804
|
+
: 'max-width: 130px;',
|
|
2805
|
+
})}
|
|
2806
|
+
</div>
|
|
2739
2807
|
</div>`;
|
|
2740
2808
|
})
|
|
2741
2809
|
.join('')}
|
|
@@ -2842,10 +2910,11 @@ export class ShoppingSettingBasic {
|
|
|
2842
2910
|
}
|
|
2843
2911
|
return html`
|
|
2844
2912
|
<div
|
|
2913
|
+
class="w-100"
|
|
2845
2914
|
style="background-color: white;position:relative;display: flex;padding: 8px 0px;align-items: center;border-radius: 10px;width:100%;"
|
|
2846
2915
|
>
|
|
2847
2916
|
<div
|
|
2848
|
-
style="flex:1 0 0;font-size: 16px;font-weight: 400;gap:14px;display: flex;align-items: center;padding-left: ${postMD
|
|
2917
|
+
style="width: 40%;flex:1 0 0;font-size: 16px;font-weight: 400;gap:14px;display: flex;align-items: center;padding-left: ${postMD
|
|
2849
2918
|
.specs.length > 1 && document.body.clientWidth > 768
|
|
2850
2919
|
? `32px`
|
|
2851
2920
|
: `12px`};"
|
|
@@ -2894,6 +2963,35 @@ export class ShoppingSettingBasic {
|
|
|
2894
2963
|
>
|
|
2895
2964
|
</div>
|
|
2896
2965
|
</div>
|
|
2966
|
+
${gvc.bindView(
|
|
2967
|
+
(() => {
|
|
2968
|
+
const id = gvc.glitter.getUUID();
|
|
2969
|
+
return {
|
|
2970
|
+
bind: id,
|
|
2971
|
+
view: () => {
|
|
2972
|
+
return Boolean(data.invisible)
|
|
2973
|
+
? html`<i
|
|
2974
|
+
class="fa-solid fa-eye-slash cursor_pointer"
|
|
2975
|
+
onclick="${obj.gvc.event(() => {
|
|
2976
|
+
data.invisible = false;
|
|
2977
|
+
gvc.notifyDataChange(vm.id);
|
|
2978
|
+
})}"
|
|
2979
|
+
></i>`
|
|
2980
|
+
: html`<i
|
|
2981
|
+
class="fa-regular fa-eye cursor_pointer"
|
|
2982
|
+
onclick="${obj.gvc.event(() => {
|
|
2983
|
+
data.invisible = true;
|
|
2984
|
+
gvc.notifyDataChange(vm.id);
|
|
2985
|
+
})}"
|
|
2986
|
+
></i>`;
|
|
2987
|
+
},
|
|
2988
|
+
divCreate: {
|
|
2989
|
+
class: 'text-center',
|
|
2990
|
+
style: 'width: 10%;',
|
|
2991
|
+
},
|
|
2992
|
+
};
|
|
2993
|
+
})()
|
|
2994
|
+
)}
|
|
2897
2995
|
${['sale_price', 'stock']
|
|
2898
2996
|
.filter(dd => {
|
|
2899
2997
|
return (
|
|
@@ -2902,13 +3000,11 @@ export class ShoppingSettingBasic {
|
|
|
2902
3000
|
})
|
|
2903
3001
|
.map((dd, index) => {
|
|
2904
3002
|
return html` <div
|
|
3003
|
+
class="text-center px-1"
|
|
2905
3004
|
style="color:#393939;font-size: 16px;font-weight: 400;width: ${document
|
|
2906
3005
|
.body.clientWidth > 800
|
|
2907
|
-
? `
|
|
2908
|
-
: 'auto;max-width:140px;'}
|
|
2909
|
-
.body.clientWidth > 800
|
|
2910
|
-
? `12px`
|
|
2911
|
-
: '0px'};"
|
|
3006
|
+
? `17.5%;`
|
|
3007
|
+
: 'auto;max-width:140px;'}"
|
|
2912
3008
|
>
|
|
2913
3009
|
<input
|
|
2914
3010
|
style="width: 100%;height: 40px;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
@@ -20,6 +20,7 @@ import { StockVendors } from './stock-vendors.js';
|
|
|
20
20
|
import { CheckInput } from '../modules/checkInput.js';
|
|
21
21
|
import { Tool } from '../modules/tool.js';
|
|
22
22
|
import { BgProduct } from '../backend-manager/bg-product.js';
|
|
23
|
+
import { TableStorage } from './module/table-storage.js';
|
|
23
24
|
const html = String.raw;
|
|
24
25
|
const typeConfig = {
|
|
25
26
|
restocking: {
|
|
@@ -163,6 +164,7 @@ export class StockHistory {
|
|
|
163
164
|
filter: {},
|
|
164
165
|
orderString: '',
|
|
165
166
|
tabKey: 'all',
|
|
167
|
+
listLimit: TableStorage.getLimit(),
|
|
166
168
|
};
|
|
167
169
|
return gvc.bindView({
|
|
168
170
|
bind: vm.id,
|
|
@@ -402,11 +404,10 @@ export class StockHistory {
|
|
|
402
404
|
gvc: gvc,
|
|
403
405
|
getData: vd => {
|
|
404
406
|
vmi = vd;
|
|
405
|
-
const limit = 100;
|
|
406
407
|
Promise.all([
|
|
407
408
|
ApiStock.getStockHistory({
|
|
408
409
|
page: vmi.page - 1,
|
|
409
|
-
limit:
|
|
410
|
+
limit: vm.listLimit,
|
|
410
411
|
search: vm.query,
|
|
411
412
|
type: vm.type,
|
|
412
413
|
queryType: vm.queryType,
|
|
@@ -423,7 +424,7 @@ export class StockHistory {
|
|
|
423
424
|
const r = dataArray[0];
|
|
424
425
|
if (r.result && r.response) {
|
|
425
426
|
vm.dataList = r.response.data;
|
|
426
|
-
vmi.pageSize = Math.ceil(r.response.total /
|
|
427
|
+
vmi.pageSize = Math.ceil(r.response.total / vm.listLimit);
|
|
427
428
|
vmi.originalData = vm.dataList;
|
|
428
429
|
vmi.tableData = getDatalist();
|
|
429
430
|
}
|
|
@@ -683,17 +684,23 @@ export class StockHistory {
|
|
|
683
684
|
gvc,
|
|
684
685
|
callback: (value) => {
|
|
685
686
|
vm.queryType = value;
|
|
686
|
-
gvc.notifyDataChange(vm.tableId);
|
|
687
|
-
gvc.notifyDataChange(id);
|
|
687
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
688
688
|
},
|
|
689
689
|
default: vm.queryType || 'title',
|
|
690
690
|
options: FilterOptions.stockHistoryCheckSelect,
|
|
691
691
|
}),
|
|
692
692
|
BgWidget.searchFilter(gvc.event(e => {
|
|
693
693
|
vm.query = `${e.value}`.trim();
|
|
694
|
-
gvc.notifyDataChange(vm.tableId);
|
|
695
|
-
gvc.notifyDataChange(id);
|
|
694
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
696
695
|
}), vm.query || '', '搜尋所有用戶'),
|
|
696
|
+
BgWidget.countingFilter({
|
|
697
|
+
gvc,
|
|
698
|
+
callback: value => {
|
|
699
|
+
vm.listLimit = value;
|
|
700
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
701
|
+
},
|
|
702
|
+
default: vm.listLimit,
|
|
703
|
+
}),
|
|
697
704
|
];
|
|
698
705
|
const filterTags = ListComp.getFilterTags(FilterOptions.stockHistoryCheckFunnel);
|
|
699
706
|
return BgListComponent.listBarRWD(filterList, filterTags);
|
|
@@ -1052,6 +1059,7 @@ export class StockHistory {
|
|
|
1052
1059
|
gvc: gvc,
|
|
1053
1060
|
default: dvm.variantIds,
|
|
1054
1061
|
with_variants: true,
|
|
1062
|
+
right_element_type: 'stock',
|
|
1055
1063
|
callback: (value) => __awaiter(this, void 0, void 0, function* () {
|
|
1056
1064
|
dvm.variantIds = value;
|
|
1057
1065
|
gvc.notifyDataChange(dvm.tableId);
|
|
@@ -12,6 +12,7 @@ import { StockVendors, VendorData } from './stock-vendors.js';
|
|
|
12
12
|
import { CheckInput } from '../modules/checkInput.js';
|
|
13
13
|
import { Tool } from '../modules/tool.js';
|
|
14
14
|
import { BgProduct, OptionsItem } from '../backend-manager/bg-product.js';
|
|
15
|
+
import { TableStorage } from './module/table-storage.js';
|
|
15
16
|
|
|
16
17
|
const html = String.raw;
|
|
17
18
|
|
|
@@ -29,6 +30,7 @@ type VM = {
|
|
|
29
30
|
queryType: string;
|
|
30
31
|
orderString: string;
|
|
31
32
|
tabKey: string;
|
|
33
|
+
listLimit: number;
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
const typeConfig: {
|
|
@@ -187,6 +189,7 @@ export class StockHistory {
|
|
|
187
189
|
filter: {},
|
|
188
190
|
orderString: '',
|
|
189
191
|
tabKey: 'all',
|
|
192
|
+
listLimit: TableStorage.getLimit(),
|
|
190
193
|
};
|
|
191
194
|
|
|
192
195
|
return gvc.bindView({
|
|
@@ -443,11 +446,10 @@ export class StockHistory {
|
|
|
443
446
|
gvc: gvc,
|
|
444
447
|
getData: vd => {
|
|
445
448
|
vmi = vd;
|
|
446
|
-
const limit = 100;
|
|
447
449
|
Promise.all([
|
|
448
450
|
ApiStock.getStockHistory({
|
|
449
451
|
page: vmi.page - 1,
|
|
450
|
-
limit:
|
|
452
|
+
limit: vm.listLimit,
|
|
451
453
|
search: vm.query,
|
|
452
454
|
type: vm.type,
|
|
453
455
|
queryType: vm.queryType,
|
|
@@ -466,7 +468,7 @@ export class StockHistory {
|
|
|
466
468
|
const r = dataArray[0];
|
|
467
469
|
if (r.result && r.response) {
|
|
468
470
|
vm.dataList = r.response.data;
|
|
469
|
-
vmi.pageSize = Math.ceil(r.response.total /
|
|
471
|
+
vmi.pageSize = Math.ceil(r.response.total / vm.listLimit);
|
|
470
472
|
vmi.originalData = vm.dataList;
|
|
471
473
|
vmi.tableData = getDatalist();
|
|
472
474
|
}
|
|
@@ -745,8 +747,7 @@ export class StockHistory {
|
|
|
745
747
|
gvc,
|
|
746
748
|
callback: (value: any) => {
|
|
747
749
|
vm.queryType = value;
|
|
748
|
-
gvc.notifyDataChange(vm.tableId);
|
|
749
|
-
gvc.notifyDataChange(id);
|
|
750
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
750
751
|
},
|
|
751
752
|
default: vm.queryType || 'title',
|
|
752
753
|
options: FilterOptions.stockHistoryCheckSelect,
|
|
@@ -754,12 +755,19 @@ export class StockHistory {
|
|
|
754
755
|
BgWidget.searchFilter(
|
|
755
756
|
gvc.event(e => {
|
|
756
757
|
vm.query = `${e.value}`.trim();
|
|
757
|
-
gvc.notifyDataChange(vm.tableId);
|
|
758
|
-
gvc.notifyDataChange(id);
|
|
758
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
759
759
|
}),
|
|
760
760
|
vm.query || '',
|
|
761
761
|
'搜尋所有用戶'
|
|
762
762
|
),
|
|
763
|
+
BgWidget.countingFilter({
|
|
764
|
+
gvc,
|
|
765
|
+
callback: value => {
|
|
766
|
+
vm.listLimit = value;
|
|
767
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
768
|
+
},
|
|
769
|
+
default: vm.listLimit,
|
|
770
|
+
}),
|
|
763
771
|
];
|
|
764
772
|
|
|
765
773
|
const filterTags = ListComp.getFilterTags(FilterOptions.stockHistoryCheckFunnel);
|
|
@@ -1138,21 +1146,12 @@ export class StockHistory {
|
|
|
1138
1146
|
gvc: gvc,
|
|
1139
1147
|
default: dvm.variantIds,
|
|
1140
1148
|
with_variants: true,
|
|
1149
|
+
right_element_type: 'stock',
|
|
1141
1150
|
callback: async value => {
|
|
1142
1151
|
dvm.variantIds = value;
|
|
1143
1152
|
gvc.notifyDataChange(dvm.tableId);
|
|
1144
|
-
// alert(JSON.stringify(value))
|
|
1145
1153
|
},
|
|
1146
1154
|
});
|
|
1147
|
-
// BgWidget.variantDialog({
|
|
1148
|
-
// gvc,
|
|
1149
|
-
// title: '搜尋商品',
|
|
1150
|
-
// default: dvm.variantIds,
|
|
1151
|
-
// callback: resultData => {
|
|
1152
|
-
// dvm.variantIds = resultData;
|
|
1153
|
-
// gvc.notifyDataChange(dvm.tableId);
|
|
1154
|
-
// },
|
|
1155
|
-
// });
|
|
1156
1155
|
})}"
|
|
1157
1156
|
>
|
|
1158
1157
|
<div>新增${typeData.name}商品</div>
|
|
@@ -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
|
export class StockStores {
|
|
12
13
|
static main(gvc, isShop) {
|
|
@@ -22,6 +23,7 @@ export class StockStores {
|
|
|
22
23
|
filter: {},
|
|
23
24
|
orderString: '',
|
|
24
25
|
isShop: isShop,
|
|
26
|
+
listLimit: TableStorage.getLimit(),
|
|
25
27
|
};
|
|
26
28
|
return gvc.bindView({
|
|
27
29
|
bind: vm.id,
|
|
@@ -96,8 +98,7 @@ export class StockStores {
|
|
|
96
98
|
gvc,
|
|
97
99
|
callback: (value) => {
|
|
98
100
|
vm.queryType = value;
|
|
99
|
-
gvc.notifyDataChange(vm.tableId);
|
|
100
|
-
gvc.notifyDataChange(id);
|
|
101
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
101
102
|
},
|
|
102
103
|
default: vm.queryType || 'name',
|
|
103
104
|
options: isShop
|
|
@@ -111,9 +112,16 @@ export class StockStores {
|
|
|
111
112
|
}),
|
|
112
113
|
BgWidget.searchFilter(gvc.event(e => {
|
|
113
114
|
vm.query = `${e.value}`.trim();
|
|
114
|
-
gvc.notifyDataChange(vm.tableId);
|
|
115
|
-
gvc.notifyDataChange(id);
|
|
115
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
116
116
|
}), vm.query || '', isShop ? '搜尋門市名稱' : '搜尋庫存點名稱'),
|
|
117
|
+
BgWidget.countingFilter({
|
|
118
|
+
gvc,
|
|
119
|
+
callback: value => {
|
|
120
|
+
vm.listLimit = value;
|
|
121
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
122
|
+
},
|
|
123
|
+
default: vm.listLimit,
|
|
124
|
+
}),
|
|
117
125
|
];
|
|
118
126
|
const filterTags = ListComp.getFilterTags(FilterOptions.storesFunnel);
|
|
119
127
|
return BgListComponent.listBarRWD(filterList, filterTags);
|
|
@@ -127,10 +135,9 @@ export class StockStores {
|
|
|
127
135
|
gvc: gvc,
|
|
128
136
|
getData: vd => {
|
|
129
137
|
vmi = vd;
|
|
130
|
-
const limit = 100;
|
|
131
138
|
function callback(list) {
|
|
132
139
|
vm.dataList = list;
|
|
133
|
-
vmi.pageSize = Math.ceil(list.length /
|
|
140
|
+
vmi.pageSize = Math.ceil(list.length / vm.listLimit);
|
|
134
141
|
vmi.originalData = vm.dataList;
|
|
135
142
|
vmi.tableData = getDatalist();
|
|
136
143
|
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
|
|
|
@@ -32,6 +33,7 @@ type VM = {
|
|
|
32
33
|
queryType: string;
|
|
33
34
|
orderString: string;
|
|
34
35
|
isShop: boolean;
|
|
36
|
+
listLimit: number;
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
export class StockStores {
|
|
@@ -48,6 +50,7 @@ export class StockStores {
|
|
|
48
50
|
filter: {},
|
|
49
51
|
orderString: '',
|
|
50
52
|
isShop: isShop,
|
|
53
|
+
listLimit: TableStorage.getLimit(),
|
|
51
54
|
};
|
|
52
55
|
|
|
53
56
|
return gvc.bindView({
|
|
@@ -134,8 +137,7 @@ export class StockStores {
|
|
|
134
137
|
gvc,
|
|
135
138
|
callback: (value: any) => {
|
|
136
139
|
vm.queryType = value;
|
|
137
|
-
gvc.notifyDataChange(vm.tableId);
|
|
138
|
-
gvc.notifyDataChange(id);
|
|
140
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
139
141
|
},
|
|
140
142
|
default: vm.queryType || 'name',
|
|
141
143
|
options: isShop
|
|
@@ -150,12 +152,19 @@ export class StockStores {
|
|
|
150
152
|
BgWidget.searchFilter(
|
|
151
153
|
gvc.event(e => {
|
|
152
154
|
vm.query = `${e.value}`.trim();
|
|
153
|
-
gvc.notifyDataChange(vm.tableId);
|
|
154
|
-
gvc.notifyDataChange(id);
|
|
155
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
155
156
|
}),
|
|
156
157
|
vm.query || '',
|
|
157
158
|
isShop ? '搜尋門市名稱' : '搜尋庫存點名稱'
|
|
158
159
|
),
|
|
160
|
+
BgWidget.countingFilter({
|
|
161
|
+
gvc,
|
|
162
|
+
callback: value => {
|
|
163
|
+
vm.listLimit = value;
|
|
164
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
165
|
+
},
|
|
166
|
+
default: vm.listLimit,
|
|
167
|
+
}),
|
|
159
168
|
];
|
|
160
169
|
|
|
161
170
|
const filterTags = ListComp.getFilterTags(FilterOptions.storesFunnel);
|
|
@@ -170,11 +179,10 @@ export class StockStores {
|
|
|
170
179
|
gvc: gvc,
|
|
171
180
|
getData: vd => {
|
|
172
181
|
vmi = vd;
|
|
173
|
-
const limit = 100;
|
|
174
182
|
|
|
175
183
|
function callback(list: StoreData[]) {
|
|
176
184
|
vm.dataList = list;
|
|
177
|
-
vmi.pageSize = Math.ceil(list.length /
|
|
185
|
+
vmi.pageSize = Math.ceil(list.length / vm.listLimit);
|
|
178
186
|
vmi.originalData = vm.dataList;
|
|
179
187
|
vmi.tableData = getDatalist();
|
|
180
188
|
vmi.loading = false;
|
|
@@ -6,6 +6,7 @@ import { FilterOptions } from './filter-options.js';
|
|
|
6
6
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
7
7
|
import { CheckInput } from '../modules/checkInput.js';
|
|
8
8
|
import { Tool } from '../modules/tool.js';
|
|
9
|
+
import { TableStorage } from './module/table-storage.js';
|
|
9
10
|
const html = String.raw;
|
|
10
11
|
export class StockVendors {
|
|
11
12
|
static main(gvc) {
|
|
@@ -20,6 +21,7 @@ export class StockVendors {
|
|
|
20
21
|
queryType: '',
|
|
21
22
|
filter: {},
|
|
22
23
|
orderString: '',
|
|
24
|
+
listLimit: TableStorage.getLimit(),
|
|
23
25
|
};
|
|
24
26
|
return gvc.bindView({
|
|
25
27
|
bind: vm.id,
|
|
@@ -83,17 +85,23 @@ export class StockVendors {
|
|
|
83
85
|
gvc,
|
|
84
86
|
callback: (value) => {
|
|
85
87
|
vm.queryType = value;
|
|
86
|
-
gvc.notifyDataChange(vm.tableId);
|
|
87
|
-
gvc.notifyDataChange(id);
|
|
88
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
88
89
|
},
|
|
89
90
|
default: vm.queryType || 'name',
|
|
90
91
|
options: FilterOptions.vendorsSelect,
|
|
91
92
|
}),
|
|
92
93
|
BgWidget.searchFilter(gvc.event(e => {
|
|
93
94
|
vm.query = `${e.value}`.trim();
|
|
94
|
-
gvc.notifyDataChange(vm.tableId);
|
|
95
|
-
gvc.notifyDataChange(id);
|
|
95
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
96
96
|
}), vm.query || '', '搜尋庫存點名稱'),
|
|
97
|
+
BgWidget.countingFilter({
|
|
98
|
+
gvc,
|
|
99
|
+
callback: value => {
|
|
100
|
+
vm.listLimit = value;
|
|
101
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
102
|
+
},
|
|
103
|
+
default: vm.listLimit,
|
|
104
|
+
}),
|
|
97
105
|
];
|
|
98
106
|
const filterTags = ListComp.getFilterTags(FilterOptions.vendorsFunnel);
|
|
99
107
|
return BgListComponent.listBarRWD(filterList, filterTags);
|
|
@@ -107,14 +115,13 @@ export class StockVendors {
|
|
|
107
115
|
gvc: gvc,
|
|
108
116
|
getData: vd => {
|
|
109
117
|
vmi = vd;
|
|
110
|
-
const limit = 100;
|
|
111
118
|
this.getPublicData().then((data) => {
|
|
112
119
|
if (data.list) {
|
|
113
120
|
data.list = data.list.filter((item) => {
|
|
114
121
|
return vm.query === '' || item.name.includes(vm.query);
|
|
115
122
|
});
|
|
116
123
|
vm.dataList = data.list;
|
|
117
|
-
vmi.pageSize = Math.ceil(data.list.length /
|
|
124
|
+
vmi.pageSize = Math.ceil(data.list.length / vm.listLimit);
|
|
118
125
|
vmi.originalData = vm.dataList;
|
|
119
126
|
vmi.tableData = getDatalist();
|
|
120
127
|
}
|