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
|
@@ -7,6 +7,7 @@ import { FilterOptions } from './filter-options.js';
|
|
|
7
7
|
import { BgProduct } from '../backend-manager/bg-product.js';
|
|
8
8
|
import { ShoppingProductSetting } from './shopping-product-setting.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 StockList {
|
|
12
13
|
static main(gvc, option = {
|
|
@@ -33,6 +34,7 @@ export class StockList {
|
|
|
33
34
|
stockOriginArray: [],
|
|
34
35
|
replaceData: {},
|
|
35
36
|
stockStores: [],
|
|
37
|
+
listLimit: TableStorage.getLimit(),
|
|
36
38
|
};
|
|
37
39
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.stockFilterFrame);
|
|
38
40
|
vm.filter = ListComp.getFilterObject();
|
|
@@ -232,17 +234,23 @@ export class StockList {
|
|
|
232
234
|
gvc,
|
|
233
235
|
callback: (value) => {
|
|
234
236
|
vm.queryType = value;
|
|
235
|
-
gvc.notifyDataChange(vm.tableId);
|
|
236
|
-
gvc.notifyDataChange(vmlist.id);
|
|
237
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
237
238
|
},
|
|
238
239
|
default: vm.queryType || 'name',
|
|
239
240
|
options: FilterOptions.stockSelect,
|
|
240
241
|
}),
|
|
241
242
|
BgWidget.searchFilter(gvc.event(e => {
|
|
242
243
|
vm.query = `${e.value}`.trim();
|
|
243
|
-
gvc.notifyDataChange(vm.tableId);
|
|
244
|
-
gvc.notifyDataChange(vmlist.id);
|
|
244
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
245
245
|
}), vm.query || '', '搜尋商品'),
|
|
246
|
+
BgWidget.countingFilter({
|
|
247
|
+
gvc,
|
|
248
|
+
callback: value => {
|
|
249
|
+
vm.listLimit = value;
|
|
250
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
251
|
+
},
|
|
252
|
+
default: vm.listLimit,
|
|
253
|
+
}),
|
|
246
254
|
BgWidget.funnelFilter({
|
|
247
255
|
gvc,
|
|
248
256
|
callback: () => ListComp.showRightMenu(FilterOptions.stockFunnel),
|
|
@@ -251,8 +259,7 @@ export class StockList {
|
|
|
251
259
|
gvc,
|
|
252
260
|
callback: (value) => {
|
|
253
261
|
vm.orderString = value;
|
|
254
|
-
gvc.notifyDataChange(vm.tableId);
|
|
255
|
-
gvc.notifyDataChange(vmlist.id);
|
|
262
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
256
263
|
},
|
|
257
264
|
default: vm.orderString || 'default',
|
|
258
265
|
options: FilterOptions.stockOrderBy,
|
|
@@ -279,9 +286,8 @@ export class StockList {
|
|
|
279
286
|
gvc: gvc,
|
|
280
287
|
getData: vd => {
|
|
281
288
|
vmi = vd;
|
|
282
|
-
const limit = 15;
|
|
283
289
|
Promise.all([
|
|
284
|
-
new Promise(
|
|
290
|
+
new Promise(resolve => {
|
|
285
291
|
ApiUser.getPublicConfig('store_manager', 'manager').then((dd) => {
|
|
286
292
|
if (dd.result && dd.response.value && dd.response.value.list) {
|
|
287
293
|
resolve(dd.response.value.list);
|
|
@@ -291,10 +297,10 @@ export class StockList {
|
|
|
291
297
|
}
|
|
292
298
|
});
|
|
293
299
|
}),
|
|
294
|
-
new Promise(
|
|
300
|
+
new Promise(resolve => {
|
|
295
301
|
ApiShop.getVariants({
|
|
296
302
|
page: vmi.page - 1,
|
|
297
|
-
limit:
|
|
303
|
+
limit: vm.listLimit,
|
|
298
304
|
search: vm.query || undefined,
|
|
299
305
|
searchType: vm.queryType || 'title',
|
|
300
306
|
orderBy: vm.orderString || undefined,
|
|
@@ -319,7 +325,7 @@ export class StockList {
|
|
|
319
325
|
return !option.filter_variants.includes([dd.product_id].concat(dd.variant_content.spec).join('-'));
|
|
320
326
|
});
|
|
321
327
|
vm.dataList = data.response.data;
|
|
322
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
328
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
323
329
|
vmi.originalData = vm.dataList;
|
|
324
330
|
vmi.tableData = getDatalist();
|
|
325
331
|
vm.stockOriginArray = JSON.parse(JSON.stringify(vm.stockArray));
|
|
@@ -8,6 +8,7 @@ import { FilterOptions } from './filter-options.js';
|
|
|
8
8
|
import { BgProduct, OptionsItem } from '../backend-manager/bg-product.js';
|
|
9
9
|
import { ShoppingProductSetting } from './shopping-product-setting.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
|
|
|
@@ -40,6 +41,7 @@ type VM = {
|
|
|
40
41
|
stockOriginArray: StockListObj;
|
|
41
42
|
replaceData?: any;
|
|
42
43
|
stockStores: StockStore[];
|
|
44
|
+
listLimit: number;
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
type ProductType = 'product' | 'addProduct' | 'giveaway' | 'hidden' | 'all';
|
|
@@ -79,6 +81,7 @@ export class StockList {
|
|
|
79
81
|
stockOriginArray: [],
|
|
80
82
|
replaceData: {},
|
|
81
83
|
stockStores: [],
|
|
84
|
+
listLimit: TableStorage.getLimit(),
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.stockFilterFrame);
|
|
@@ -302,8 +305,7 @@ export class StockList {
|
|
|
302
305
|
gvc,
|
|
303
306
|
callback: (value: any) => {
|
|
304
307
|
vm.queryType = value;
|
|
305
|
-
gvc.notifyDataChange(vm.tableId);
|
|
306
|
-
gvc.notifyDataChange(vmlist.id);
|
|
308
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
307
309
|
},
|
|
308
310
|
default: vm.queryType || 'name',
|
|
309
311
|
options: FilterOptions.stockSelect,
|
|
@@ -311,12 +313,19 @@ export class StockList {
|
|
|
311
313
|
BgWidget.searchFilter(
|
|
312
314
|
gvc.event(e => {
|
|
313
315
|
vm.query = `${e.value}`.trim();
|
|
314
|
-
gvc.notifyDataChange(vm.tableId);
|
|
315
|
-
gvc.notifyDataChange(vmlist.id);
|
|
316
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
316
317
|
}),
|
|
317
318
|
vm.query || '',
|
|
318
319
|
'搜尋商品'
|
|
319
320
|
),
|
|
321
|
+
BgWidget.countingFilter({
|
|
322
|
+
gvc,
|
|
323
|
+
callback: value => {
|
|
324
|
+
vm.listLimit = value;
|
|
325
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
326
|
+
},
|
|
327
|
+
default: vm.listLimit,
|
|
328
|
+
}),
|
|
320
329
|
BgWidget.funnelFilter({
|
|
321
330
|
gvc,
|
|
322
331
|
callback: () => ListComp.showRightMenu(FilterOptions.stockFunnel),
|
|
@@ -325,8 +334,7 @@ export class StockList {
|
|
|
325
334
|
gvc,
|
|
326
335
|
callback: (value: any) => {
|
|
327
336
|
vm.orderString = value;
|
|
328
|
-
gvc.notifyDataChange(vm.tableId);
|
|
329
|
-
gvc.notifyDataChange(vmlist.id);
|
|
337
|
+
gvc.notifyDataChange([vm.tableId, vmlist.id]);
|
|
330
338
|
},
|
|
331
339
|
default: vm.orderString || 'default',
|
|
332
340
|
options: FilterOptions.stockOrderBy,
|
|
@@ -354,10 +362,9 @@ export class StockList {
|
|
|
354
362
|
gvc: gvc,
|
|
355
363
|
getData: vd => {
|
|
356
364
|
vmi = vd;
|
|
357
|
-
const limit = 15;
|
|
358
365
|
|
|
359
366
|
Promise.all([
|
|
360
|
-
new Promise(
|
|
367
|
+
new Promise(resolve => {
|
|
361
368
|
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
362
369
|
if (dd.result && dd.response.value && dd.response.value.list) {
|
|
363
370
|
resolve(dd.response.value.list);
|
|
@@ -366,10 +373,10 @@ export class StockList {
|
|
|
366
373
|
}
|
|
367
374
|
});
|
|
368
375
|
}),
|
|
369
|
-
new Promise(
|
|
376
|
+
new Promise(resolve => {
|
|
370
377
|
ApiShop.getVariants({
|
|
371
378
|
page: vmi.page - 1,
|
|
372
|
-
limit:
|
|
379
|
+
limit: vm.listLimit,
|
|
373
380
|
search: vm.query || undefined,
|
|
374
381
|
searchType: vm.queryType || 'title',
|
|
375
382
|
orderBy: vm.orderString || undefined,
|
|
@@ -398,7 +405,7 @@ export class StockList {
|
|
|
398
405
|
});
|
|
399
406
|
|
|
400
407
|
vm.dataList = data.response.data;
|
|
401
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
408
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
402
409
|
vmi.originalData = vm.dataList;
|
|
403
410
|
vmi.tableData = getDatalist();
|
|
404
411
|
vm.stockOriginArray = JSON.parse(JSON.stringify(vm.stockArray));
|
|
@@ -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;"
|