xyvcard-goods 0.0.6 → 0.0.8

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 (24) hide show
  1. package/dist/{approveFailIndex-F3GtuNeX.mjs → approveFailIndex-BecI6njE.mjs} +1 -1
  2. package/dist/{approveFailIndex.vue_vue_type_script_setup_true_lang-8ykH4NF1.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-1FXHUoMJ.mjs} +9 -9
  3. package/dist/{auditIndex-DZUQQzVu.mjs → auditIndex-ByyMgebr.mjs} +1 -1
  4. package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-Bnc1wKbA.mjs → auditIndex.vue_vue_type_script_setup_true_lang-DT2irP9g.mjs} +44 -44
  5. package/dist/edit-BWUxDk9Y.mjs +594 -0
  6. package/dist/{index-D5_GsXR7.mjs → index-AZ4TxL-_.mjs} +48 -51
  7. package/dist/{index-kGlE0ywA.mjs → index-BypI3ZNk.mjs} +90 -90
  8. package/dist/index.mjs +2 -2
  9. package/dist/{info-kiOShGr4.mjs → info-BJ1Ld_6D.mjs} +20 -23
  10. package/dist/{saleIndex-CyMvOgxp.mjs → saleIndex-CBtuv6um.mjs} +1 -1
  11. package/dist/{saleIndex.vue_vue_type_script_setup_true_lang-BgZZMEph.mjs → saleIndex.vue_vue_type_script_setup_true_lang-Cxv3foxp.mjs} +69 -69
  12. package/dist/{shelfIndex-DZWqrqlw.mjs → shelfIndex-CykEAeD4.mjs} +1 -1
  13. package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-B7fw9wHp.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-UPt1ZDpP.mjs} +11 -11
  14. package/dist/{skuForm-Dtq2Ttjc.mjs → skuForm-DdiMztDh.mjs} +82 -77
  15. package/dist/{skuTable-8oPw0DhV.mjs → skuTable-Cg06m_5i.mjs} +122 -127
  16. package/dist/style.css +1 -1
  17. package/dts/api/dict.d.ts +6 -2
  18. package/dts/api/goods-spu/types.d.ts +6 -5
  19. package/dts/components/EnumRadio/index.vue.d.ts +4 -3
  20. package/dts/components/GoodsUpload/ImageUpload.vue.d.ts +10 -18
  21. package/dts/constant.d.ts +3 -3
  22. package/dts/views/goods/goods-spu/skuForm.vue.d.ts +9 -0
  23. package/package.json +65 -65
  24. package/dist/edit-C3imnLUq.mjs +0 -600
@@ -1,30 +1,30 @@
1
- import { defineComponent as E, openBlock as w, createElementBlock as P, createElementVNode as f, ref as I, toRefs as O, watchEffect as q, computed as T, resolveComponent as V, createBlock as $, withCtx as d, createVNode as n, unref as j, watch as D, Fragment as L, createTextVNode as C, createCommentVNode as H, renderList as G, toDisplayString as A } from "vue";
1
+ import { defineComponent as $, openBlock as w, createElementBlock as P, createElementVNode as m, ref as y, toRefs as O, watchEffect as q, computed as N, resolveComponent as V, createBlock as z, withCtx as d, createVNode as n, unref as T, watch as E, Fragment as D, createTextVNode as x, createCommentVNode as H, renderList as G, toDisplayString as L } from "vue";
2
2
  import { ElMessage as K } from "element-plus";
3
- import { fileApi as z } from "jmash-core";
4
- import { D as R } from "./index-D5_GsXR7.mjs";
5
- const J = (s, m) => {
3
+ import { fileApi as C } from "jmash-core";
4
+ import { D as R } from "./index-AZ4TxL-_.mjs";
5
+ const J = (s, f) => {
6
6
  const a = s.__vccOpts || s;
7
- for (const [i, k] of m)
7
+ for (const [i, k] of f)
8
8
  a[i] = k;
9
9
  return a;
10
10
  };
11
11
  /*! Element Plus Icons Vue v2.3.1 */
12
- var Q = /* @__PURE__ */ E({
12
+ var Q = /* @__PURE__ */ $({
13
13
  name: "Plus",
14
14
  __name: "plus",
15
15
  setup(s) {
16
- return (m, a) => (w(), P("svg", {
16
+ return (f, a) => (w(), P("svg", {
17
17
  xmlns: "http://www.w3.org/2000/svg",
18
18
  viewBox: "0 0 1024 1024"
19
19
  }, [
20
- f("path", {
20
+ m("path", {
21
21
  fill: "currentColor",
22
22
  d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
23
23
  })
24
24
  ]));
25
25
  }
26
26
  }), W = Q;
27
- const X = ["src"], Y = /* @__PURE__ */ E({
27
+ const X = ["src"], Y = /* @__PURE__ */ $({
28
28
  __name: "index",
29
29
  props: {
30
30
  pictureUrl: {
@@ -33,23 +33,23 @@ const X = ["src"], Y = /* @__PURE__ */ E({
33
33
  }
34
34
  },
35
35
  emits: ["imageSrc"],
36
- setup(s, { emit: m }) {
37
- const a = I(z.uploadUrl()), i = I(z.authHeader()), k = s, { pictureUrl: b } = O(k), v = I("");
38
- v.value = b.value;
39
- const U = m;
36
+ setup(s, { emit: f }) {
37
+ const a = y(C.uploadUrl()), i = y(C.authHeader()), k = s, { pictureUrl: b } = O(k), g = y("");
38
+ g.value = b.value;
39
+ const U = f;
40
40
  function S(l) {
41
41
  l.fileSrc && (K({
42
42
  message: "上传成功",
43
43
  type: "success"
44
- }), v.value = l.fileSrc, U("imageSrc", l.fileSrc));
44
+ }), g.value = l.fileSrc, U("imageSrc", l.fileSrc));
45
45
  }
46
46
  q(() => {
47
- v.value = k.pictureUrl;
47
+ g.value = k.pictureUrl;
48
48
  });
49
- const _ = T(() => z.imageUrl(v.value));
49
+ const _ = N(() => C.imageUrl(g.value));
50
50
  return (l, o) => {
51
- const c = V("el-icon"), u = V("el-upload");
52
- return w(), $(u, {
51
+ const u = V("el-icon"), c = V("el-upload");
52
+ return w(), z(c, {
53
53
  class: "avatar-uploader",
54
54
  action: a.value,
55
55
  headers: i.value,
@@ -57,17 +57,17 @@ const X = ["src"], Y = /* @__PURE__ */ E({
57
57
  "on-success": S
58
58
  }, {
59
59
  default: d(() => [
60
- v.value ? (w(), P("img", {
60
+ g.value ? (w(), P("img", {
61
61
  key: 0,
62
62
  src: _.value,
63
63
  class: "avatar",
64
64
  alt: ""
65
- }, null, 8, X)) : (w(), $(c, {
65
+ }, null, 8, X)) : (w(), z(u, {
66
66
  key: 1,
67
67
  class: "avatar-uploader-icon"
68
68
  }, {
69
69
  default: d(() => [
70
- n(j(W))
70
+ n(T(W))
71
71
  ]),
72
72
  _: 1
73
73
  }))
@@ -77,55 +77,54 @@ const X = ["src"], Y = /* @__PURE__ */ E({
77
77
  };
78
78
  }
79
79
  });
80
- function Z(s, m = [], a) {
81
- console.log(s, m = [], a);
82
- let { optionValue: i = "id", optionText: k = "name" } = a || {}, b = [], v = 0, U = {};
80
+ function Z(s, f = [], a) {
81
+ let { optionValue: i = "id", optionText: k = "name" } = a || {}, b = [], g = 0, U = {};
83
82
  const S = ee(s);
84
- if (console.log(S), s.length === 0) return b;
83
+ if (s.length === 0) return b;
85
84
  s.forEach((_) => {
86
85
  const { specValueList: l } = _;
87
86
  if (!l || l.length === 0) return !0;
88
- v = (v || 1) * l.length;
89
- }), m.forEach((_) => {
87
+ g = (g || 1) * l.length;
88
+ }), f.forEach((_) => {
90
89
  let { specs: l, ...o } = _;
91
- U[l.map((c) => `${c.specId}_${c.specValueId}`).join("|")] = o;
90
+ U[l.map((u) => `${u.specId}_${u.specValueId}`).join("|")] = o;
92
91
  });
93
- for (let _ = 0; _ < v; _++) {
92
+ for (let _ = 0; _ < g; _++) {
94
93
  let l = [], o = [];
95
- s.forEach((u, r) => {
96
- const { specValueList: e } = u;
94
+ s.forEach((c, r) => {
95
+ const { specValueList: e } = c;
97
96
  let h = {};
98
97
  if (!e || e.length === 0) return !0;
99
98
  if (e.length > 1) {
100
- let g = Math.floor(_ / S[r]) % e.length;
101
- h = s[r].specValueList[g];
99
+ let v = Math.floor(_ / S[r]) % e.length;
100
+ h = s[r].specValueList[v];
102
101
  } else
103
102
  h = s[r].specValueList[0];
104
- console.log(u[i], h[i]), !(!u[i] || !h[i]) && (o.push(`${u[i]}_${h[i]}`), l.push({
105
- specId: u[i],
106
- specName: u[k],
103
+ !c[i] || !h[i] || (o.push(`${c[i]}_${h[i]}`), l.push({
104
+ specId: c[i],
105
+ specName: c[k],
107
106
  specValueId: h[i],
108
107
  specValueName: h[k]
109
108
  }));
110
109
  });
111
- let { ...c } = U[o.join("|")] || {};
112
- b.push({ ...c, specs: l });
110
+ let { ...u } = U[o.join("|")] || {};
111
+ b.push({ ...u, specs: l });
113
112
  }
114
113
  return b;
115
114
  }
116
115
  function ee(s) {
117
- let m = [];
116
+ let f = [];
118
117
  for (let a = s.length - 1; a >= 0; a--)
119
- s[a + 1] && s[a + 1].specValueList ? m[a] = s[a + 1].specValueList.length * m[a + 1] || 1 : m[a] = 1;
120
- return m;
118
+ s[a + 1] && s[a + 1].specValueList ? f[a] = s[a + 1].specValueList.length * f[a + 1] || 1 : f[a] = 1;
119
+ return f;
121
120
  }
122
- function N(s) {
121
+ function A(s) {
123
122
  return Array.from(new Set(s));
124
123
  }
125
- function le(s, m) {
126
- return s = N(s), m = N(m), s.concat(m).filter((a) => !(s.includes(a) && m.includes(a)));
124
+ function le(s, f) {
125
+ return s = A(s), f = A(f), s.concat(f).filter((a) => !(s.includes(a) && f.includes(a)));
127
126
  }
128
- const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" }, se = { class: "right-dis" }, ne = { class: "right-dis" }, ce = { class: "right-dis" }, ue = { class: "right-dis" }, re = { class: "right-dis" }, ie = { key: 0 }, de = { key: 1 }, pe = /* @__PURE__ */ E({
127
+ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" }, se = { class: "right-dis" }, ne = { class: "right-dis" }, ue = { class: "right-dis" }, ce = { class: "right-dis" }, re = { class: "right-dis" }, ie = { key: 0 }, de = { key: 1 }, pe = /* @__PURE__ */ $({
129
128
  __name: "skuTable",
130
129
  props: {
131
130
  specData: {
@@ -147,42 +146,41 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
147
146
  }
148
147
  },
149
148
  emits: ["getGoodsSku", "getFormData"],
150
- setup(s, { emit: m }) {
151
- const a = I({
149
+ setup(s, { emit: f }) {
150
+ const a = y({
152
151
  salePrice: 0,
153
152
  marketPrice: 0,
154
153
  costPrice: 0,
155
154
  weight: 0,
156
155
  volume: 0,
157
156
  stock: 0
158
- }), i = I([]), k = m, b = s, v = T(() => {
159
- let l = Z(b.specData, [], {}).map((c) => ({
160
- specValues: c.specs,
161
- specIds: c.specs.reduce(
162
- (u, r, e) => `${u}${r.specId}-${r.specValueId}${e === c.specs.length - 1 ? "" : "_"}`,
157
+ }), i = y([]), k = f, b = s, g = N(() => {
158
+ let l = Z(b.specData, [], {}).map((u) => ({
159
+ specValues: u.specs,
160
+ specIds: u.specs.reduce(
161
+ (c, r, e) => `${c}${r.specId}-${r.specValueId}${e === u.specs.length - 1 ? "" : "_"}`,
163
162
  ""
164
163
  )
165
- })), o = b.goodsSku.map((c) => ({
166
- ...c,
167
- specIds: c.specValues.reduce(
168
- (u, r, e) => `${u}${r.specId}-${r.specValueId}${e === c.specValues.length - 1 ? "" : "_"}`,
164
+ })), o = b.goodsSku.map((u) => ({
165
+ ...u,
166
+ specIds: u.specValues.reduce(
167
+ (c, r, e) => `${c}${r.specId}-${r.specValueId}${e === u.specValues.length - 1 ? "" : "_"}`,
169
168
  ""
170
169
  )
171
170
  }));
172
- return l.forEach(function(c) {
173
- o.forEach(function(u) {
174
- console.log(u);
175
- let r = c.specIds.split("_"), e = u.specIds.split("_"), h = !0;
176
- r.forEach(function(g) {
177
- e.find((y) => y == g) || (h = !1);
178
- }), h && (c.picUrl = u.picUrl ? u.picUrl : "", c.skuCode = u.skuCode ? u.skuCode : void 0, c.salePrice = u.salePrice, c.marketPrice = u.marketPrice, c.costPrice = u.costPrice, c.stock = u.stock, c.weight = u.weight, c.volume = u.volume, c.status = u.status);
171
+ return l.forEach(function(u) {
172
+ o.forEach(function(c) {
173
+ let r = u.specIds.split("_"), e = c.specIds.split("_"), h = !0;
174
+ r.forEach(function(v) {
175
+ e.find((I) => I == v) || (h = !1);
176
+ }), h && (u.picUrl = c.picUrl ? c.picUrl : "", u.skuCode = c.skuCode ? c.skuCode : void 0, u.skuId = c.skuId ? c.skuId : void 0, u.salePrice = c.salePrice, u.marketPrice = c.marketPrice, u.costPrice = c.costPrice, u.stock = c.stock, u.weight = c.weight, u.volume = c.volume, u.status = c.status);
179
177
  });
180
178
  }), l;
181
179
  });
182
- D(
183
- v,
180
+ E(
181
+ g,
184
182
  (l, o) => {
185
- var u, r;
183
+ var c, r;
186
184
  if (!l || !l.length) return i.value = [];
187
185
  if (!o || !o.length)
188
186
  return i.value = l.map((e) => ({
@@ -197,7 +195,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
197
195
  volume: e.volume ? e.volume : void 0,
198
196
  status: e.status ? e.status : !0
199
197
  }));
200
- if (((u = l[0].specValues) == null ? void 0 : u.length) !== ((r = o[0].specValues) == null ? void 0 : r.length))
198
+ if (((c = l[0].specValues) == null ? void 0 : c.length) !== ((r = o[0].specValues) == null ? void 0 : r.length))
201
199
  return i.value = l.map((e) => ({
202
200
  ...e,
203
201
  picUrl: "",
@@ -215,14 +213,14 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
215
213
  ...i.value[h],
216
214
  ...e
217
215
  }));
218
- const c = U(l, o);
216
+ const u = U(l, o);
219
217
  if (l.length > o.length) {
220
218
  let e = [];
221
219
  l.forEach((h) => {
222
- const g = i.value.find(
223
- (y) => y.specIds === h.specIds
220
+ const v = i.value.find(
221
+ (I) => I.specIds === h.specIds
224
222
  );
225
- g ? e.push(g) : e.push({
223
+ v ? e.push(v) : e.push({
226
224
  ...h,
227
225
  picUrl: "",
228
226
  skuCode: void 0,
@@ -237,17 +235,17 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
237
235
  }), i.value = e;
238
236
  } else
239
237
  i.value = i.value.filter(
240
- (e) => !c.includes(e.specIds)
238
+ (e) => !u.includes(e.specIds)
241
239
  );
242
240
  },
243
241
  {
244
242
  deep: !0,
245
243
  immediate: !0
246
244
  }
247
- ), D(
245
+ ), E(
248
246
  i,
249
247
  (l) => {
250
- console.log(l), k("getFormData", l);
248
+ k("getFormData", l);
251
249
  },
252
250
  {
253
251
  deep: !0,
@@ -255,7 +253,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
255
253
  }
256
254
  );
257
255
  function U(l, o) {
258
- return l = l.map((c) => c.specIds), o = o.map((c) => c.specIds), le(l, o);
256
+ return l = l.map((u) => u.specIds), o = o.map((u) => u.specIds), le(l, o);
259
257
  }
260
258
  function S() {
261
259
  i.value.forEach((l) => {
@@ -266,19 +264,19 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
266
264
  o.picUrl = l;
267
265
  }
268
266
  return (l, o) => {
269
- const c = V("Setting"), u = V("el-icon"), r = V("el-input-number"), e = V("el-tooltip"), h = V("el-button"), g = V("el-table-column"), y = Y, B = V("el-input"), M = V("el-switch"), F = V("el-table");
270
- return w(), P(L, null, [
267
+ const u = V("Setting"), c = V("el-icon"), r = V("el-input-number"), e = V("el-tooltip"), h = V("el-button"), v = V("el-table-column"), I = Y, j = V("el-input"), B = V("el-switch"), M = V("el-table");
268
+ return w(), P(D, null, [
271
269
  s.isSettingShow ? (w(), P("div", te, [
272
- f("div", oe, [
273
- n(u, null, {
270
+ m("div", oe, [
271
+ n(c, null, {
274
272
  default: d(() => [
275
- n(c)
273
+ n(u)
276
274
  ]),
277
275
  _: 1
278
276
  }),
279
- o[6] || (o[6] = C(" 批量设置 "))
277
+ o[6] || (o[6] = x(" 批量设置 "))
280
278
  ]),
281
- f("span", ae, [
279
+ m("span", ae, [
282
280
  n(e, {
283
281
  class: "box-item",
284
282
  effect: "dark",
@@ -298,7 +296,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
298
296
  _: 1
299
297
  })
300
298
  ]),
301
- f("span", se, [
299
+ m("span", se, [
302
300
  n(e, {
303
301
  class: "box-item",
304
302
  effect: "dark",
@@ -318,7 +316,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
318
316
  _: 1
319
317
  })
320
318
  ]),
321
- f("span", ne, [
319
+ m("span", ne, [
322
320
  n(e, {
323
321
  class: "box-item",
324
322
  effect: "dark",
@@ -338,7 +336,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
338
336
  _: 1
339
337
  })
340
338
  ]),
341
- f("span", ce, [
339
+ m("span", ue, [
342
340
  n(e, {
343
341
  class: "box-item",
344
342
  effect: "dark",
@@ -358,7 +356,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
358
356
  _: 1
359
357
  })
360
358
  ]),
361
- f("span", ue, [
359
+ m("span", ce, [
362
360
  n(e, {
363
361
  class: "box-item",
364
362
  effect: "dark",
@@ -378,7 +376,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
378
376
  _: 1
379
377
  })
380
378
  ]),
381
- f("span", re, [
379
+ m("span", re, [
382
380
  n(e, {
383
381
  class: "box-item",
384
382
  effect: "dark",
@@ -404,50 +402,50 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
404
402
  onClick: S
405
403
  }, {
406
404
  default: d(() => o[7] || (o[7] = [
407
- C("设置")
405
+ x("设置")
408
406
  ])),
409
407
  _: 1
410
408
  })
411
409
  ])) : H("", !0),
412
- n(F, {
410
+ n(M, {
413
411
  data: i.value,
414
412
  class: "w-full top-dis"
415
413
  }, {
416
414
  default: d(() => [
417
- n(g, { type: "index" }),
418
- (w(!0), P(L, null, G(s.specData, (t, p) => (w(), $(g, {
415
+ n(v, { type: "index" }),
416
+ (w(!0), P(D, null, G(s.specData, (t, p) => (w(), z(v, {
419
417
  key: t.id,
420
418
  prop: t.id,
421
419
  label: t.name
422
420
  }, {
423
- default: d((x) => [
424
- C(A(x.row.specValues[p].specValueName), 1)
421
+ default: d((F) => [
422
+ x(L(F.row.specValues[p].specValueName), 1)
425
423
  ]),
426
424
  _: 2
427
425
  }, 1032, ["prop", "label"]))), 128)),
428
- n(g, {
426
+ n(v, {
429
427
  prop: "picUrl",
430
428
  label: "图片"
431
429
  }, {
432
430
  default: d((t) => [
433
- n(y, {
431
+ n(I, {
434
432
  "picture-url": t.row.picUrl,
435
433
  onImageSrc: (p) => _(p, t.row)
436
434
  }, null, 8, ["picture-url", "onImageSrc"])
437
435
  ]),
438
436
  _: 1
439
437
  }),
440
- n(g, {
438
+ n(v, {
441
439
  prop: "salePrice",
442
440
  label: "销售价(元)",
443
441
  width: "150"
444
442
  }, {
445
443
  header: d(() => o[8] || (o[8] = [
446
- f("span", { class: "required_red" }, "*", -1),
447
- f("span", null, "销售价(元)", -1)
444
+ m("span", { class: "required_red" }, "*", -1),
445
+ m("span", null, "销售价(元)", -1)
448
446
  ])),
449
447
  default: d((t) => [
450
- f("span", null, [
448
+ m("span", null, [
451
449
  n(r, {
452
450
  modelValue: t.row.salePrice,
453
451
  "onUpdate:modelValue": (p) => t.row.salePrice = p,
@@ -461,12 +459,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
461
459
  ]),
462
460
  _: 1
463
461
  }),
464
- n(g, {
462
+ n(v, {
465
463
  prop: "marketPrice",
466
464
  label: "市场价(元)"
467
465
  }, {
468
466
  default: d((t) => [
469
- f("span", null, [
467
+ m("span", null, [
470
468
  n(r, {
471
469
  modelValue: t.row.marketPrice,
472
470
  "onUpdate:modelValue": (p) => t.row.marketPrice = p,
@@ -480,12 +478,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
480
478
  ]),
481
479
  _: 1
482
480
  }),
483
- n(g, {
481
+ n(v, {
484
482
  prop: "costPrice",
485
483
  label: "成本价(元)"
486
484
  }, {
487
485
  default: d((t) => [
488
- f("span", null, [
486
+ m("span", null, [
489
487
  n(r, {
490
488
  modelValue: t.row.costPrice,
491
489
  "onUpdate:modelValue": (p) => t.row.costPrice = p,
@@ -499,12 +497,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
499
497
  ]),
500
498
  _: 1
501
499
  }),
502
- n(g, {
500
+ n(v, {
503
501
  prop: "weight",
504
502
  label: "重量(kg)"
505
503
  }, {
506
504
  default: d((t) => [
507
- f("span", null, [
505
+ m("span", null, [
508
506
  n(r, {
509
507
  modelValue: t.row.weight,
510
508
  "onUpdate:modelValue": (p) => t.row.weight = p,
@@ -518,12 +516,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
518
516
  ]),
519
517
  _: 1
520
518
  }),
521
- n(g, {
519
+ n(v, {
522
520
  prop: "volume",
523
521
  label: "体积(m³)"
524
522
  }, {
525
523
  default: d((t) => [
526
- f("span", null, [
524
+ m("span", null, [
527
525
  n(r, {
528
526
  modelValue: t.row.volume,
529
527
  "onUpdate:modelValue": (p) => t.row.volume = p,
@@ -537,16 +535,16 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
537
535
  ]),
538
536
  _: 1
539
537
  }),
540
- n(g, {
538
+ n(v, {
541
539
  prop: "stock",
542
540
  label: "库存"
543
541
  }, {
544
542
  header: d(() => o[9] || (o[9] = [
545
- f("span", { class: "required_red" }, "*", -1),
546
- f("span", null, "库存", -1)
543
+ m("span", { class: "required_red" }, "*", -1),
544
+ m("span", null, "库存", -1)
547
545
  ])),
548
546
  default: d((t) => [
549
- f("span", null, [
547
+ m("span", null, [
550
548
  n(r, {
551
549
  modelValue: t.row.stock,
552
550
  "onUpdate:modelValue": (p) => t.row.stock = p,
@@ -560,13 +558,13 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
560
558
  ]),
561
559
  _: 1
562
560
  }),
563
- n(g, {
561
+ n(v, {
564
562
  prop: "skuCode",
565
563
  label: "sku编码"
566
564
  }, {
567
565
  default: d((t) => [
568
- f("span", null, [
569
- n(B, {
566
+ m("span", null, [
567
+ n(j, {
570
568
  modelValue: t.row.skuCode,
571
569
  "onUpdate:modelValue": (p) => t.row.skuCode = p,
572
570
  size: "small",
@@ -576,22 +574,19 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
576
574
  ]),
577
575
  _: 1
578
576
  }),
579
- n(g, {
577
+ n(v, {
580
578
  prop: "status",
581
579
  label: "是否上架",
582
580
  width: "80"
583
581
  }, {
584
- default: d((t) => {
585
- var p;
586
- return [
587
- s.isSettingShow ? (w(), P("span", ie, [
588
- n(M, {
589
- modelValue: t.row.status,
590
- "onUpdate:modelValue": (x) => t.row.status = x
591
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
592
- ])) : (w(), P("span", de, A(j(R).shelfDict.getValue((p = t.row.status) == null ? void 0 : p.toString())), 1))
593
- ];
594
- }),
582
+ default: d((t) => [
583
+ s.isSettingShow ? (w(), P("span", ie, [
584
+ n(B, {
585
+ modelValue: t.row.status,
586
+ "onUpdate:modelValue": (p) => t.row.status = p
587
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
588
+ ])) : (w(), P("span", de, L(T(R).shelfDict.getValue(t.row.status)), 1))
589
+ ]),
595
590
  _: 1
596
591
  })
597
592
  ]),
@@ -600,7 +595,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
600
595
  ], 64);
601
596
  };
602
597
  }
603
- }), me = /* @__PURE__ */ J(pe, [["__scopeId", "data-v-0d96a554"]]), _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
598
+ }), me = /* @__PURE__ */ J(pe, [["__scopeId", "data-v-78f1f000"]]), _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
604
599
  __proto__: null,
605
600
  default: me
606
601
  }, Symbol.toStringTag, { value: "Module" }));
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}.avatar-uploader .avatar{width:80px;height:80px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);cursor:pointer;position:relative;overflow:hidden;transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.avatar-uploader .el-icon.avatar-uploader-icon{font-size:26px;color:#8c939d;width:80px;height:80px;text-align:center}.title-set[data-v-0d96a554]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-de70dfa2]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-de70dfa2]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-de70dfa2]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-de70dfa2]{padding:10px 20px}.goods-tag[data-v-de70dfa2]{margin-bottom:10px}[data-v-23f4d200] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-23f4d200] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}
1
+ .w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}.avatar-uploader .avatar{width:80px;height:80px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);cursor:pointer;position:relative;overflow:hidden;transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.avatar-uploader .el-icon.avatar-uploader-icon{font-size:26px;color:#8c939d;width:80px;height:80px;text-align:center}.title-set[data-v-78f1f000]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-8e0ed544]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-8e0ed544]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-8e0ed544]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-8e0ed544]{padding:10px 20px}.goods-tag[data-v-8e0ed544]{margin-bottom:10px}[data-v-e7a4c473] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-e7a4c473] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}
package/dts/api/dict.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import { BizDict, type Entry, BizLayDict, type LayEntry } from "jmash-core";
2
+ export interface EntryBool {
3
+ key: boolean;
4
+ value: string;
5
+ }
2
6
  export declare class CustomBizDict {
3
- values: import("vue").Reactive<Entry[]>;
7
+ values: import("vue").Reactive<EntryBool[]>;
4
8
  query: any;
5
9
  constructor(results: any, query: any);
6
- getValue(key: string): string;
10
+ getValue(key: boolean): string;
7
11
  }
8
12
  export declare class ShopInfoBizDict extends BizDict {
9
13
  useValues(): Promise<Entry[]>;
@@ -22,7 +22,7 @@ export interface GoodsSpuModel extends EntityModel {
22
22
  picUrls?: string;
23
23
  sellPoint?: string;
24
24
  description?: string;
25
- shelf?: string;
25
+ shelf?: boolean;
26
26
  saleNum?: number;
27
27
  specType?: string;
28
28
  skuList?: GoodsSkuList;
@@ -58,11 +58,11 @@ export interface GoodsSpuCreateReq extends EntityCreateReq {
58
58
  sellPoint?: string;
59
59
  ensureIds?: Array<string>;
60
60
  description?: string;
61
- shelf?: string;
61
+ shelf?: boolean;
62
62
  saleNum?: number;
63
63
  specType?: string;
64
64
  specId?: Array<string>;
65
- skuSpecValues: Array<GoodsSkuCreateReq>;
65
+ skuSpecValues: Array<GoodsSkuModel>;
66
66
  }
67
67
  export interface GoodsSpuUpdateReq extends EntityUpdateReq {
68
68
  spuId?: string;
@@ -75,12 +75,12 @@ export interface GoodsSpuUpdateReq extends EntityUpdateReq {
75
75
  picUrls?: string;
76
76
  sellPoint?: string;
77
77
  description?: string;
78
- shelf?: string;
78
+ shelf?: boolean;
79
79
  saleNum?: number;
80
80
  specType?: string;
81
81
  ensureIds?: Array<string>;
82
82
  specId?: Array<string>;
83
- skuSpecValues: Array<GoodsSkuCreateReq>;
83
+ skuSpecValues: Array<GoodsSkuModel>;
84
84
  }
85
85
  export type GoodsSpuFormReq = GoodsSpuCreateReq | GoodsSpuUpdateReq;
86
86
  export interface GoodsSpuEnableKey {
@@ -98,6 +98,7 @@ export interface GoodsSkuCreateReq {
98
98
  stock?: number;
99
99
  specValues?: Array<SkuSpecValue>;
100
100
  skuCode?: string;
101
+ skuId?: string;
101
102
  status?: boolean;
102
103
  specIds?: string;
103
104
  }
@@ -1,18 +1,19 @@
1
1
  import type { PropType } from "vue";
2
2
  import type { Entry } from "jmash-core";
3
+ import type { EntryBool } from "@/api/dict";
3
4
  declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
4
5
  modelValue: PropType<string | boolean>;
5
6
  data: {
6
- type: PropType<Entry[]>;
7
+ type: PropType<EntryBool[] | Entry[]>;
7
8
  default: () => void;
8
9
  };
9
10
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
10
11
  modelValue: PropType<string | boolean>;
11
12
  data: {
12
- type: PropType<Entry[]>;
13
+ type: PropType<EntryBool[] | Entry[]>;
13
14
  default: () => void;
14
15
  };
15
16
  }>> & Readonly<{}>, {
16
- data: Entry[];
17
+ data: EntryBool[] | Entry[];
17
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
19
  export default _default;