xyvcard-goods 0.0.20 → 0.0.22

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.
Files changed (40) hide show
  1. package/dist/ImageUpload-Dk6GY6PA.mjs +93 -0
  2. package/dist/{edit-Cj13W2TC.mjs → edit-Byv9oYAC.mjs} +1 -1
  3. package/dist/{edit-Bb2XgE0h.mjs → edit-Nuaz9WSB.mjs} +160 -244
  4. package/dist/edit-exVf8d8b.mjs +367 -0
  5. package/dist/edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs +24172 -0
  6. package/dist/{goodsList-DOXK1EwK.mjs → goodsList-CZUqc4nm.mjs} +1 -1
  7. package/dist/goodsList-IWDAvKOx.mjs +4 -0
  8. package/dist/goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs +576 -0
  9. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs → goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs} +51 -50
  10. package/dist/{index-CGAoZY87.mjs → index-4i7TnWvV.mjs} +2 -3
  11. package/dist/index-BVGn6Q_T.mjs +53 -0
  12. package/dist/{index-DAJiqOCh.mjs → index-B_U2s9fI.mjs} +2 -2
  13. package/dist/{index-C3FT_Oe7.mjs → index-CQIttgns.mjs} +1 -1
  14. package/dist/{index-D3w33Nba.mjs → index-Dvaotk7B.mjs} +92 -68
  15. package/dist/{index-BmOxm1P2.mjs → index-_xxSoBUe.mjs} +1 -1
  16. package/dist/index.mjs +561 -538
  17. package/dist/{info-DImlMNq0.mjs → info-BH4MW3Sw.mjs} +2 -2
  18. package/dist/info-BQaaTFry.mjs +365 -0
  19. package/dist/sku-B-IzfYLq.mjs +52 -0
  20. package/dist/skuForm-AMIoZkH-.mjs +287 -0
  21. package/dist/{skuForm-Bt3arW0s.mjs → skuForm-CgjMd46J.mjs} +16 -16
  22. package/dist/{skuTable-Ahc3WlPp.mjs → skuTable-CyGQuTvR.mjs} +208 -255
  23. package/dist/skuTable-DDWSmvoz.mjs +592 -0
  24. package/dist/style.css +1 -1
  25. package/dts/api/dict.d.ts +3 -0
  26. package/dts/api/goods-sku/types.d.ts +2 -2
  27. package/dts/api/goods-spu/index.d.ts +1 -0
  28. package/dts/api/goods-spu/types.d.ts +18 -1
  29. package/dts/api/index.d.ts +2 -1
  30. package/dts/constant.d.ts +4 -0
  31. package/dts/lang/goods/zh-cn.d.ts +6 -1
  32. package/dts/router/index.d.ts +1 -0
  33. package/dts/views/goods/goods-combination/edit.vue.d.ts +2 -0
  34. package/dts/views/goods/goods-combination/goodsList.vue.d.ts +14 -0
  35. package/dts/views/goods/goods-combination/index.vue.d.ts +2 -0
  36. package/dts/views/goods/goods-combination/info.vue.d.ts +2 -0
  37. package/dts/views/goods/goods-combination/skuForm.vue.d.ts +20 -0
  38. package/dts/views/goods/goods-combination/skuTable.vue.d.ts +40 -0
  39. package/package.json +62 -61
  40. package/dist/edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs +0 -234
@@ -1,12 +1,13 @@
1
- var E = Object.defineProperty;
2
- var S = (o, e, t) => e in o ? E(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var s = (o, e, t) => S(o, typeof e != "symbol" ? e + "" : e, t);
1
+ var _ = Object.defineProperty;
2
+ var m = (i, e, t) => e in i ? _(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var s = (i, e, t) => m(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { useUserStore as l, clearEmpty as c, request as d, BizDict as h, BizLayDict as y, EnumDict as p } from "jmash-core";
5
- import { EntryDict as m } from "jmash-dict";
5
+ import { EntryDict as E } from "jmash-dict";
6
6
  import { ref as g, reactive as L } from "vue";
7
7
  import { specValueApi as A, infoApi as P, specInfoApi as f } from "xyvcard-shop";
8
8
  import { g as O } from "./index-r0u-27m7.mjs";
9
9
  import { g as I } from "./index-jTDhsbYM.mjs";
10
+ import { goodsSpuApi as D } from "./index.mjs";
10
11
  class r {
11
12
  }
12
13
  // 模块
@@ -30,8 +31,12 @@ s(r, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(r, "APPROVAL_PASS", "APPROVAL_
30
31
  s(r, "ENABLE_VALUES", g([
31
32
  { key: "true", value: "启用" },
32
33
  { key: "false", value: "禁用" }
33
- ]));
34
- class D {
34
+ ])), // 商品类型
35
+ s(r, "GOODS_TYPE", {
36
+ NORMAL: "normal",
37
+ GROUP: "group"
38
+ });
39
+ class U {
35
40
  getKey(e) {
36
41
  return {
37
42
  categoryId: e.categoryId
@@ -107,7 +112,7 @@ class D {
107
112
  }
108
113
  // 批量删除商城商品分类
109
114
  batchDelete(e) {
110
- const t = e.map((n) => n.categoryId), a = {
115
+ const t = e.map((u) => u.categoryId), a = {
111
116
  tenant: l().user.tenant,
112
117
  categoryId: t
113
118
  };
@@ -132,15 +137,15 @@ class D {
132
137
  });
133
138
  }
134
139
  }
135
- const U = new D();
136
- function _(o, e, t) {
137
- return !Array.isArray(o) || o.length === 0 ? [] : o.map((n) => {
138
- let i = [];
139
- return Array.isArray(n.children) && n.children.length > 0 && (i = _(n.children, e, t)), {
140
- value: n[t],
141
- label: n[e],
142
- parentId: n.parentId,
143
- children: i
140
+ const T = new U();
141
+ function S(i, e, t) {
142
+ return !Array.isArray(i) || i.length === 0 ? [] : i.map((u) => {
143
+ let o = [];
144
+ return Array.isArray(u.children) && u.children.length > 0 && (o = S(u.children, e, t)), {
145
+ value: u[t],
146
+ label: u[e],
147
+ parentId: u.parentId,
148
+ children: o
144
149
  };
145
150
  });
146
151
  }
@@ -159,17 +164,17 @@ class v {
159
164
  return "";
160
165
  }
161
166
  }
162
- class T extends h {
167
+ class N extends h {
163
168
  // 实现 useValues 方法
164
169
  useValues() {
165
170
  return new Promise((e, t) => {
166
171
  P.findList(this.query).then(({ data: a }) => {
167
- const n = a.results;
172
+ const u = a.results;
168
173
  this.values.length = 0, this.values.push(
169
- ...n.map(
170
- (i) => ({
171
- key: i.shopId,
172
- value: i.shopName
174
+ ...u.map(
175
+ (o) => ({
176
+ key: o.shopId,
177
+ value: o.shopName
173
178
  })
174
179
  )
175
180
  ), e(this.values);
@@ -177,28 +182,28 @@ class T extends h {
177
182
  });
178
183
  }
179
184
  }
180
- class N extends y {
185
+ class V extends y {
181
186
  // 实现 useValues 方法
182
187
  useValues() {
183
188
  return new Promise((e, t) => {
184
- U.findTreeListApi(this.query).then(({ data: a }) => {
185
- this.values.length = 0, this.values.push(..._(a.results, "label", "value")), e(this.values);
189
+ T.findTreeListApi(this.query).then(({ data: a }) => {
190
+ this.values.length = 0, this.values.push(...S(a.results, "label", "value")), e(this.values);
186
191
  }).catch(t);
187
192
  });
188
193
  }
189
194
  }
190
- class V extends h {
195
+ class b extends h {
191
196
  // 实现 useValues 方法
192
197
  useValues() {
193
198
  return new Promise((e, t) => {
194
199
  f.findList(this.query).then(({ data: a }) => {
195
- const n = a.results;
200
+ const u = a.results;
196
201
  this.values.length = 0, this.values.push(
197
- ...n.map(
198
- (i) => ({
199
- key: i.specId,
200
- value: i.specName,
201
- disabled: i.disabled
202
+ ...u.map(
203
+ (o) => ({
204
+ key: o.specId,
205
+ value: o.specName,
206
+ disabled: o.disabled
202
207
  })
203
208
  )
204
209
  ), e(this.values);
@@ -206,17 +211,17 @@ class V extends h {
206
211
  });
207
212
  }
208
213
  }
209
- class b extends h {
214
+ class w extends h {
210
215
  // 实现 useValues 方法
211
216
  useValues() {
212
217
  return new Promise((e, t) => {
213
218
  A.findList(this.query).then(({ data: a }) => {
214
- const n = a.results;
219
+ const u = a.results;
215
220
  this.values.length = 0, this.values.push(
216
- ...n.map(
217
- (i) => ({
218
- key: i.specValueId,
219
- value: i.valueName
221
+ ...u.map(
222
+ (o) => ({
223
+ key: o.specValueId,
224
+ value: o.valueName
220
225
  })
221
226
  )
222
227
  ), e(this.values);
@@ -224,17 +229,17 @@ class b extends h {
224
229
  });
225
230
  }
226
231
  }
227
- class w extends h {
232
+ class B extends h {
228
233
  // 实现 useValues 方法
229
234
  useValues() {
230
235
  return new Promise((e, t) => {
231
236
  O.findList(this.query).then(({ data: a }) => {
232
- const n = a.results;
237
+ const u = a.results;
233
238
  this.values.length = 0, this.values.push(
234
- ...n.map(
235
- (i) => ({
236
- key: i.brandId,
237
- value: i.brandName
239
+ ...u.map(
240
+ (o) => ({
241
+ key: o.brandId,
242
+ value: o.brandName
238
243
  })
239
244
  )
240
245
  ), e(this.values);
@@ -242,17 +247,35 @@ class w extends h {
242
247
  });
243
248
  }
244
249
  }
245
- class B extends h {
250
+ class G extends h {
246
251
  // 实现 useValues 方法
247
252
  useValues() {
248
253
  return new Promise((e, t) => {
249
254
  I.findList(this.query).then(({ data: a }) => {
250
- const n = a.results;
255
+ const u = a.results;
256
+ this.values.length = 0, this.values.push(
257
+ ...u.map(
258
+ (o) => ({
259
+ key: o.labelId,
260
+ value: o.labelName
261
+ })
262
+ )
263
+ ), e(this.values);
264
+ }).catch(t);
265
+ });
266
+ }
267
+ }
268
+ class z extends h {
269
+ // 实现 useValues 方法
270
+ useValues() {
271
+ return new Promise((e, t) => {
272
+ D.findList(this.query).then(({ data: a }) => {
273
+ const u = a.results;
251
274
  this.values.length = 0, this.values.push(
252
- ...n.map(
253
- (i) => ({
254
- key: i.labelId,
255
- value: i.labelName
275
+ ...u.map(
276
+ (o) => ({
277
+ key: o.spuId,
278
+ value: o.spuName
256
279
  })
257
280
  )
258
281
  ), e(this.values);
@@ -260,42 +283,43 @@ class B extends h {
260
283
  });
261
284
  }
262
285
  }
263
- class u {
286
+ class n {
264
287
  }
265
288
  // 店铺列表
266
- s(u, "shopInfoBizDict", new T({})), // 商品分类
289
+ s(n, "shopInfoBizDict", new N({})), // 商品分类
267
290
  // static readonly goodsCategoryDict = new GoodsCategoryBizLayDict({});
268
291
  // 规格列表
269
- s(u, "specInfoDict", new V({})), // 规格值
270
- s(u, "specValueDict", new b({})), // 上架下架
271
- s(u, "shelfDict", new v(r.SHELF_VALUES, {})), // 运费类型
272
- s(u, "freightTypeEnum", new p(
292
+ s(n, "specInfoDict", new b({})), // 规格值
293
+ s(n, "specValueDict", new w({})), // 上架下架
294
+ s(n, "shelfDict", new v(r.SHELF_VALUES, {})), // 运费类型
295
+ s(n, "freightTypeEnum", new p(
273
296
  r.MODULE_GOODS,
274
297
  r.ENUM_FREIGHT_TYPE
275
298
  )), // 保障服务
276
- s(u, "goodsEnsureDict", new m(r.DICT_GOODS_ENSURE)), // 规格类型
277
- s(u, "specTypeEnum", new p(
299
+ s(n, "goodsEnsureDict", new E(r.DICT_GOODS_ENSURE)), // 规格类型
300
+ s(n, "specTypeEnum", new p(
278
301
  r.MODULE_GOODS,
279
302
  r.ENUM_SPEC_TYPE
280
303
  )), // 商品查询枚举
281
- s(u, "goodsSpuListSortEnum", new p(
304
+ s(n, "goodsSpuListSortEnum", new p(
282
305
  r.MODULE_GOODS,
283
306
  r.ENUM_GOODS_SPU_List_SORT
284
307
  )), // 审核状态
285
- s(u, "approvalStatusEnum", new p(
308
+ s(n, "approvalStatusEnum", new p(
286
309
  r.MODULE_GOODS,
287
310
  r.ENUM_APPROVAL_STATUS
288
311
  )), // 启用禁用
289
- s(u, "enableDict", new v(r.ENABLE_VALUES, {})), // 商品分类
290
- s(u, "goodsCategoryListBizLayDict", new N(
312
+ s(n, "enableDict", new v(r.ENABLE_VALUES, {})), // 商品分类
313
+ s(n, "goodsCategoryListBizLayDict", new V(
291
314
  {}
292
315
  )), // 品牌列表
293
- s(u, "brandListBizDict", new w({})), // 标签列表
294
- s(u, "labelListBizDict", new B({}));
316
+ s(n, "brandListBizDict", new B({})), // 标签列表
317
+ s(n, "labelListBizDict", new G({})), // 商品列表
318
+ s(n, "goodsSpuBizDict", new z({}));
295
319
  export {
296
320
  r as C,
297
- u as D,
298
- b as S,
299
- V as a,
300
- U as g
321
+ n as D,
322
+ w as S,
323
+ b as a,
324
+ T as g
301
325
  };
@@ -3,7 +3,7 @@ import { useTableHooks as le, fileApi as D } from "jmash-core";
3
3
  import { useI18n as ae } from "vue-i18n";
4
4
  import { g as ne } from "./index-r0u-27m7.mjs";
5
5
  import re from "./edit-DxnsmaXV.mjs";
6
- import { D as de } from "./index-D3w33Nba.mjs";
6
+ import { D as de } from "./index-Dvaotk7B.mjs";
7
7
  const se = { class: "app-container" }, ie = { class: "search-container" }, ue = ["onClick"], me = ["onClick"], ye = /* @__PURE__ */ x({
8
8
  __name: "index",
9
9
  setup(pe) {