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
|
@@ -2266,20 +2266,38 @@ export class ShoppingSettingBasic {
|
|
|
2266
2266
|
gvc.notifyDataChange([variantsViewID]);
|
|
2267
2267
|
})}"
|
|
2268
2268
|
></i>
|
|
2269
|
-
<div
|
|
2269
|
+
<div
|
|
2270
|
+
style="width:calc(35% - ${document.body.clientWidth > 800
|
|
2271
|
+
? 46
|
|
2272
|
+
: 0}px);font-size: 16px;font-weight: 400;"
|
|
2273
|
+
>
|
|
2274
|
+
規格
|
|
2275
|
+
</div>
|
|
2270
2276
|
${document.body.clientWidth < 768
|
|
2271
2277
|
? html ` <div
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
+
class="text-center"
|
|
2279
|
+
style="width: 20%;color:#393939;font-size: 16px;font-weight: 400;"
|
|
2280
|
+
>
|
|
2281
|
+
顯示
|
|
2282
|
+
</div>
|
|
2283
|
+
<div
|
|
2284
|
+
class="text-center"
|
|
2285
|
+
style="width: 35%;color:#393939;font-size: 16px;font-weight: 400;"
|
|
2286
|
+
>
|
|
2287
|
+
售價
|
|
2288
|
+
</div>`
|
|
2289
|
+
: `${[
|
|
2290
|
+
{ title: '顯示', width: 10 },
|
|
2291
|
+
{ title: '售價', width: 15 },
|
|
2292
|
+
{ title: '庫存數量', width: 15 },
|
|
2293
|
+
{ title: '運費計算方式', width: 20 },
|
|
2294
|
+
]
|
|
2278
2295
|
.map(dd => {
|
|
2279
2296
|
return html ` <div
|
|
2280
|
-
|
|
2297
|
+
class="text-center"
|
|
2298
|
+
style="color:#393939;font-size: 16px;font-weight: 400;width: ${dd.width}%;"
|
|
2281
2299
|
>
|
|
2282
|
-
${dd}
|
|
2300
|
+
${dd.title}
|
|
2283
2301
|
</div>`;
|
|
2284
2302
|
})
|
|
2285
2303
|
.join('')}`}
|
|
@@ -2357,7 +2375,9 @@ export class ShoppingSettingBasic {
|
|
|
2357
2375
|
})}"
|
|
2358
2376
|
></i>
|
|
2359
2377
|
<div
|
|
2360
|
-
style="
|
|
2378
|
+
style="width: calc(35% - ${document.body.clientWidth > 800
|
|
2379
|
+
? 52
|
|
2380
|
+
: -10}px);font-size: 16px;font-weight: 400;display: flex;align-items: center; gap:${document
|
|
2361
2381
|
.body.clientWidth < 800
|
|
2362
2382
|
? 10
|
|
2363
2383
|
: 24}px;"
|
|
@@ -2410,6 +2430,45 @@ export class ShoppingSettingBasic {
|
|
|
2410
2430
|
: html ` <i class="fa-regular fa-chevron-down"></i>`}
|
|
2411
2431
|
</div>
|
|
2412
2432
|
</div>
|
|
2433
|
+
${gvc.bindView((() => {
|
|
2434
|
+
const id = gvc.glitter.getUUID();
|
|
2435
|
+
return {
|
|
2436
|
+
bind: id,
|
|
2437
|
+
view: () => {
|
|
2438
|
+
return postMD.variants
|
|
2439
|
+
.filter(v => v.spec.includes(spec.title))
|
|
2440
|
+
.every(v => v.invisible)
|
|
2441
|
+
? html `<i
|
|
2442
|
+
class="fa-solid fa-eye-slash cursor_pointer"
|
|
2443
|
+
onclick="${obj.gvc.event(() => {
|
|
2444
|
+
postMD.variants.map(data => {
|
|
2445
|
+
if (data.spec.includes(spec.title)) {
|
|
2446
|
+
data.invisible = false;
|
|
2447
|
+
}
|
|
2448
|
+
return data;
|
|
2449
|
+
});
|
|
2450
|
+
gvc.notifyDataChange(vm.id);
|
|
2451
|
+
})}"
|
|
2452
|
+
></i>`
|
|
2453
|
+
: html `<i
|
|
2454
|
+
class="fa-regular fa-eye cursor_pointer"
|
|
2455
|
+
onclick="${obj.gvc.event(() => {
|
|
2456
|
+
postMD.variants.map(data => {
|
|
2457
|
+
if (data.spec.includes(spec.title)) {
|
|
2458
|
+
data.invisible = true;
|
|
2459
|
+
}
|
|
2460
|
+
return data;
|
|
2461
|
+
});
|
|
2462
|
+
gvc.notifyDataChange(vm.id);
|
|
2463
|
+
})}"
|
|
2464
|
+
></i>`;
|
|
2465
|
+
},
|
|
2466
|
+
divCreate: {
|
|
2467
|
+
class: 'text-center',
|
|
2468
|
+
style: 'width: 10%;',
|
|
2469
|
+
},
|
|
2470
|
+
};
|
|
2471
|
+
})())}
|
|
2413
2472
|
${[
|
|
2414
2473
|
{
|
|
2415
2474
|
title: '統一設定價格',
|
|
@@ -2443,20 +2502,13 @@ export class ShoppingSettingBasic {
|
|
|
2443
2502
|
dd.title = `${stock}`;
|
|
2444
2503
|
}
|
|
2445
2504
|
return html ` <div
|
|
2505
|
+
class="px-1"
|
|
2446
2506
|
style="color:#393939;font-size: 16px;font-weight: 400;width: ${document
|
|
2447
2507
|
.body.clientWidth > 800
|
|
2448
|
-
? `
|
|
2449
|
-
: 'auto;max-width:140px;'}
|
|
2450
|
-
.clientWidth > 768
|
|
2451
|
-
? `10px`
|
|
2452
|
-
: '0px'};"
|
|
2508
|
+
? `17.5%;`
|
|
2509
|
+
: 'auto;max-width:140px;'}"
|
|
2453
2510
|
>
|
|
2454
|
-
<
|
|
2455
|
-
style="height: 40px;width:100%;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;font-size: 13px;"
|
|
2456
|
-
placeholder="${dd.title}"
|
|
2457
|
-
type="number"
|
|
2458
|
-
${dd.key == 'stock' ? `readonly` : ``}
|
|
2459
|
-
min="0"
|
|
2511
|
+
<div
|
|
2460
2512
|
onclick="${gvc.event(() => {
|
|
2461
2513
|
if (index === 1) {
|
|
2462
2514
|
ProductSetting.showBatchEditDialog({
|
|
@@ -2469,17 +2521,30 @@ export class ShoppingSettingBasic {
|
|
|
2469
2521
|
});
|
|
2470
2522
|
}
|
|
2471
2523
|
})}"
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2524
|
+
>
|
|
2525
|
+
${BgWidget.editeInput({
|
|
2526
|
+
gvc,
|
|
2527
|
+
title: '',
|
|
2528
|
+
default: '',
|
|
2529
|
+
placeHolder: dd.title,
|
|
2530
|
+
callback: value => {
|
|
2531
|
+
const n = parseInt(`${value}`, 10);
|
|
2532
|
+
postMD.variants
|
|
2533
|
+
.filter(dd => {
|
|
2534
|
+
return dd.spec[0] === spec.title;
|
|
2535
|
+
})
|
|
2536
|
+
.map(d1 => {
|
|
2537
|
+
d1[dd.key] = isNaN(n) ? 0 : n;
|
|
2538
|
+
});
|
|
2539
|
+
gvc.notifyDataChange(vm.id);
|
|
2540
|
+
},
|
|
2541
|
+
type: 'number',
|
|
2542
|
+
readonly: dd.key == 'stock',
|
|
2543
|
+
divStyle: document.body.clientWidth > 800
|
|
2544
|
+
? ''
|
|
2545
|
+
: 'max-width: 130px;',
|
|
2546
|
+
})}
|
|
2547
|
+
</div>
|
|
2483
2548
|
</div>`;
|
|
2484
2549
|
})
|
|
2485
2550
|
.join('')}
|
|
@@ -2581,10 +2646,11 @@ export class ShoppingSettingBasic {
|
|
|
2581
2646
|
}
|
|
2582
2647
|
return html `
|
|
2583
2648
|
<div
|
|
2649
|
+
class="w-100"
|
|
2584
2650
|
style="background-color: white;position:relative;display: flex;padding: 8px 0px;align-items: center;border-radius: 10px;width:100%;"
|
|
2585
2651
|
>
|
|
2586
2652
|
<div
|
|
2587
|
-
style="flex:1 0 0;font-size: 16px;font-weight: 400;gap:14px;display: flex;align-items: center;padding-left: ${postMD
|
|
2653
|
+
style="width: 40%;flex:1 0 0;font-size: 16px;font-weight: 400;gap:14px;display: flex;align-items: center;padding-left: ${postMD
|
|
2588
2654
|
.specs.length > 1 && document.body.clientWidth > 768
|
|
2589
2655
|
? `32px`
|
|
2590
2656
|
: `12px`};"
|
|
@@ -2625,6 +2691,33 @@ export class ShoppingSettingBasic {
|
|
|
2625
2691
|
>
|
|
2626
2692
|
</div>
|
|
2627
2693
|
</div>
|
|
2694
|
+
${gvc.bindView((() => {
|
|
2695
|
+
const id = gvc.glitter.getUUID();
|
|
2696
|
+
return {
|
|
2697
|
+
bind: id,
|
|
2698
|
+
view: () => {
|
|
2699
|
+
return Boolean(data.invisible)
|
|
2700
|
+
? html `<i
|
|
2701
|
+
class="fa-solid fa-eye-slash cursor_pointer"
|
|
2702
|
+
onclick="${obj.gvc.event(() => {
|
|
2703
|
+
data.invisible = false;
|
|
2704
|
+
gvc.notifyDataChange(vm.id);
|
|
2705
|
+
})}"
|
|
2706
|
+
></i>`
|
|
2707
|
+
: html `<i
|
|
2708
|
+
class="fa-regular fa-eye cursor_pointer"
|
|
2709
|
+
onclick="${obj.gvc.event(() => {
|
|
2710
|
+
data.invisible = true;
|
|
2711
|
+
gvc.notifyDataChange(vm.id);
|
|
2712
|
+
})}"
|
|
2713
|
+
></i>`;
|
|
2714
|
+
},
|
|
2715
|
+
divCreate: {
|
|
2716
|
+
class: 'text-center',
|
|
2717
|
+
style: 'width: 10%;',
|
|
2718
|
+
},
|
|
2719
|
+
};
|
|
2720
|
+
})())}
|
|
2628
2721
|
${['sale_price', 'stock']
|
|
2629
2722
|
.filter(dd => {
|
|
2630
2723
|
return (dd === 'sale_price' || document.body.clientWidth > 768);
|
|
@@ -2632,13 +2725,11 @@ export class ShoppingSettingBasic {
|
|
|
2632
2725
|
.map((dd, index) => {
|
|
2633
2726
|
var _a;
|
|
2634
2727
|
return html ` <div
|
|
2728
|
+
class="text-center px-1"
|
|
2635
2729
|
style="color:#393939;font-size: 16px;font-weight: 400;width: ${document
|
|
2636
2730
|
.body.clientWidth > 800
|
|
2637
|
-
? `
|
|
2638
|
-
: 'auto;max-width:140px;'}
|
|
2639
|
-
.body.clientWidth > 800
|
|
2640
|
-
? `12px`
|
|
2641
|
-
: '0px'};"
|
|
2731
|
+
? `17.5%;`
|
|
2732
|
+
: 'auto;max-width:140px;'}"
|
|
2642
2733
|
>
|
|
2643
2734
|
<input
|
|
2644
2735
|
style="width: 100%;height: 40px;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
@@ -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);
|
|
@@ -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);
|