ts-glitter 20.4.1 → 20.4.2

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 CHANGED
@@ -144,7 +144,7 @@ export class Entry {
144
144
  }
145
145
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
146
146
  console.log(`Entry-time:`, window.renderClock.stop());
147
- glitter.share.editerVersion = 'V_20.4.1';
147
+ glitter.share.editerVersion = 'V_20.4.2';
148
148
  glitter.share.start = new Date();
149
149
  const vm = { appConfig: [] };
150
150
  window.saasConfig = {
package/lowcode/Entry.ts CHANGED
@@ -145,7 +145,7 @@ export class Entry {
145
145
  }
146
146
  (window as any).renderClock = (window as any).renderClock ?? createClock();
147
147
  console.log(`Entry-time:`, (window as any).renderClock.stop());
148
- glitter.share.editerVersion = 'V_20.4.1';
148
+ glitter.share.editerVersion = 'V_20.4.2';
149
149
  glitter.share.start = new Date();
150
150
  const vm = { appConfig: [] };
151
151
  (window as any).saasConfig = {
@@ -543,6 +543,7 @@ FilterOptions.stockFilterFrame = {
543
543
  FilterOptions.stockSelect = [
544
544
  { key: 'title', value: '商品名稱' },
545
545
  { key: 'sku', value: '庫存單位(SKU)' },
546
+ { key: 'barcode', value: '商品條碼' },
546
547
  ];
547
548
  FilterOptions.stockFunnel = [
548
549
  {
@@ -575,6 +575,7 @@ export class FilterOptions {
575
575
  static stockSelect = [
576
576
  { key: 'title', value: '商品名稱' },
577
577
  { key: 'sku', value: '庫存單位(SKU)' },
578
+ { key: 'barcode', value: '商品條碼' },
578
579
  ];
579
580
 
580
581
  static stockFunnel = [
@@ -238,7 +238,10 @@ export class StockHistory {
238
238
  },
239
239
  {
240
240
  key: '總金額',
241
- value: `<span class="fs-7">$ ${(dd.content.total_price || 0).toLocaleString()}</span>`,
241
+ value: `<span class="fs-7">$ ${dd.content.product_list.reduce((sum, item) => {
242
+ var _a;
243
+ return sum + item.cost * ((_a = item.recent_count) !== null && _a !== void 0 ? _a : 0);
244
+ }, 0).toLocaleString()}</span>`,
242
245
  },
243
246
  {
244
247
  key: '供應商',
@@ -269,7 +269,9 @@ export class StockHistory {
269
269
  },
270
270
  {
271
271
  key: '總金額',
272
- value: `<span class="fs-7">$ ${(dd.content.total_price || 0).toLocaleString()}</span>`,
272
+ value: `<span class="fs-7">$ ${ dd.content.product_list.reduce((sum, item) => {
273
+ return sum + item.cost * (item.recent_count ?? 0);
274
+ }, 0).toLocaleString()}</span>`,
273
275
  },
274
276
  {
275
277
  key: '供應商',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-glitter",
3
- "version": "20.4.1",
3
+ "version": "20.4.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4585,6 +4585,9 @@ class Shopping {
4585
4585
  case 'sku':
4586
4586
  querySql.push(`(UPPER(JSON_EXTRACT(v.content, '$.sku')) LIKE UPPER('%${query.search}%'))`);
4587
4587
  break;
4588
+ case 'barcode':
4589
+ querySql.push(`(UPPER(JSON_EXTRACT(v.content, '$.barcode')) LIKE UPPER('%${query.search}%'))`);
4590
+ break;
4588
4591
  }
4589
4592
  }
4590
4593
  query.id && querySql.push(`(v.id = ${query.id})`);