xyvcard-goods 0.0.14 → 0.0.16

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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as q, ref as k, computed as j, watch as F, resolveComponent as S, openBlock as f, createElementBlock as V, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as l, createElementVNode as a, unref as r, Fragment as C, renderList as P, createBlock as b, createCommentVNode as w } from "vue";
2
- import { fileApi as B, routerUtil as z } from "jmash-core";
3
- import { useRouter as H, useRoute as O } from "vue-router";
4
- import { D as p, C as N, S as R } from "./index-DZJVaUh3.mjs";
5
- import { s as Y } from "./skuTable-YDBH_oRN.mjs";
1
+ import { defineComponent as q, ref as k, computed as j, watch as F, resolveComponent as S, openBlock as f, createElementBlock as V, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as l, createElementVNode as a, unref as p, Fragment as C, renderList as P, createBlock as b, createCommentVNode as w } from "vue";
2
+ import { fileApi as B, routerUtil as H } from "jmash-core";
3
+ import { useRouter as O, useRoute as R } from "vue-router";
4
+ import { D as m, C as N, S as Y } from "./index-CmKF2zdn.mjs";
5
+ import { s as z } from "./skuTable-DbNThlFG.mjs";
6
6
  import { goodsSpuApi as G } from "./index.mjs";
7
7
  import { g as J } from "./index-BHmGYIuc.mjs";
8
- const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "title-content" }, ie = { class: "cell-item" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = ["innerHTML"], be = /* @__PURE__ */ q({
8
+ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "title-content" }, ae = { class: "cell-item" }, ie = { class: "cell-item" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = ["innerHTML"], ye = /* @__PURE__ */ q({
9
9
  __name: "info",
10
- setup(_e) {
11
- const U = H(), y = O(), u = k({}), L = k([]), g = k([]), D = k([]), E = k([]), $ = j(() => g.value.filter(
10
+ setup(me) {
11
+ const U = O(), y = R(), u = k({}), I = k([]), g = k([]), E = k([]), D = k([]), $ = j(() => g.value.filter(
12
12
  (s) => s.name && s.specValueList != null && s.specValueList.length
13
13
  ));
14
14
  F(
@@ -18,15 +18,15 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
18
18
  deep: !0,
19
19
  immediate: !0
20
20
  }
21
- ), p.shopInfoBizDict.useValues(), p.goodsCategoryListBizLayDict.useValues(), y.query.spuId && G.findById({ spuId: y.query.spuId }).then(({ data: s }) => {
21
+ ), m.shopInfoBizDict.useValues(), m.goodsCategoryListBizLayDict.useValues(), y.query.spuId && G.findById({ spuId: y.query.spuId }).then(({ data: s }) => {
22
22
  var c, v, o;
23
- u.value = Object.assign(u, s), L.value = (c = s.picUrls) == null ? void 0 : c.split(","), J.findById({ spuId: y.query.spuId }).then(({ data: m }) => {
24
- u.value.ensureIds = m.ensures;
25
- }), s.specType === N.SPEC_TYPE.MULTI_SPEC && (D.value = (v = s.skuList) == null ? void 0 : v.results, (o = s.skuList) == null || o.results.forEach((m) => {
23
+ u.value = Object.assign(u, s), I.value = (c = s.picUrls) == null ? void 0 : c.split(","), J.findById({ spuId: y.query.spuId }).then(({ data: r }) => {
24
+ u.value.ensureIds = r.ensures;
25
+ }), s.specType === N.SPEC_TYPE.MULTI_SPEC && (E.value = (v = s.skuList) == null ? void 0 : v.results, (o = s.skuList) == null || o.results.forEach((r) => {
26
26
  var d;
27
- (d = m.specValues) == null || d.map((h) => {
28
- p.specInfoDict.useValues().then((I) => {
29
- const t = I.find((_) => h.specId === _.key);
27
+ (d = r.specValues) == null || d.map((h) => {
28
+ m.specInfoDict.useValues().then((L) => {
29
+ const t = L.find((_) => h.specId === _.key);
30
30
  if (t) {
31
31
  let _ = {
32
32
  id: h.specId,
@@ -45,7 +45,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
45
45
  });
46
46
  function A(s) {
47
47
  g.value.forEach((c) => {
48
- E.value = new R({ specId: c.id }), E.value.useValues().then((v) => {
48
+ D.value = new Y({ specId: c.id }), D.value.useValues().then((v) => {
49
49
  v.forEach((o) => {
50
50
  if (o.key === s) {
51
51
  let d = {
@@ -54,21 +54,21 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
54
54
  };
55
55
  c.specValueList.push(d);
56
56
  }
57
- const m = /* @__PURE__ */ new Map();
57
+ const r = /* @__PURE__ */ new Map();
58
58
  c.specValueList = c.specValueList.filter(
59
- (d) => !m.has(d.id) && m.set(d.id, d)
59
+ (d) => !r.has(d.id) && r.set(d.id, d)
60
60
  );
61
61
  });
62
62
  });
63
63
  });
64
64
  }
65
65
  function M() {
66
- z.closeTagView(y.fullPath, U, !1);
66
+ H.closeTagView(y.fullPath, U, !1);
67
67
  }
68
68
  return (s, c) => {
69
- const v = S("el-button"), o = S("el-descriptions-item"), m = S("el-image"), d = S("el-tag"), h = S("el-descriptions"), I = S("el-card");
69
+ const v = S("el-button"), o = S("el-descriptions-item"), r = S("el-image"), d = S("el-tag"), h = S("el-descriptions"), L = S("el-card");
70
70
  return f(), V("div", K, [
71
- i(I, { shadow: "never" }, {
71
+ i(L, { shadow: "never" }, {
72
72
  header: e(() => [
73
73
  i(v, {
74
74
  type: "primary",
@@ -90,16 +90,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
90
90
  default: e(() => [
91
91
  i(o, null, {
92
92
  label: e(() => [
93
- a("div", Q, l(s.$t("goodsSpu.shopId")), 1)
94
- ]),
95
- default: e(() => [
96
- n(" " + l(r(p).shopInfoBizDict.getValue(u.value.shopId)), 1)
97
- ]),
98
- _: 1
99
- }),
100
- i(o, null, {
101
- label: e(() => [
102
- a("div", W, l(s.$t("goodsSpu.spuName")), 1)
93
+ a("div", Q, l(s.$t("goodsSpu.spuName")), 1)
103
94
  ]),
104
95
  default: e(() => [
105
96
  n(" " + l(u.value.spuName), 1)
@@ -108,16 +99,18 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
108
99
  }),
109
100
  i(o, null, {
110
101
  label: e(() => [
111
- a("div", X, l(s.$t("goodsSpu.categoryId")), 1)
102
+ a("div", W, l(s.$t("goodsSpu.categoryId")), 1)
112
103
  ]),
113
104
  default: e(() => [
114
- n(" " + l(r(p).goodsCategoryListBizLayDict.getValue(u.value.categoryId)), 1)
105
+ n(" " + l(p(m).goodsCategoryListBizLayDict.getValue(
106
+ u.value.categoryId
107
+ )), 1)
115
108
  ]),
116
109
  _: 1
117
110
  }),
118
111
  i(o, null, {
119
112
  label: e(() => [
120
- a("div", Z, l(s.$t("goodsSpu.spuCode")), 1)
113
+ a("div", X, l(s.$t("goodsSpu.spuCode")), 1)
121
114
  ]),
122
115
  default: e(() => [
123
116
  n(" " + l(u.value.spuCode), 1)
@@ -126,10 +119,10 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
126
119
  }),
127
120
  i(o, null, {
128
121
  label: e(() => [
129
- a("div", x, l(s.$t("goodsSpu.freightType")), 1)
122
+ a("div", Z, l(s.$t("goodsSpu.freightType")), 1)
130
123
  ]),
131
124
  default: e(() => [
132
- n(" " + l(r(p).freightTypeEnum.getEnumValue(
125
+ n(" " + l(p(m).freightTypeEnum.getEnumValue(
133
126
  u.value.freightType
134
127
  )), 1)
135
128
  ]),
@@ -137,7 +130,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
137
130
  }),
138
131
  i(o, null, {
139
132
  label: e(() => [
140
- a("div", ee, l(s.$t("goodsSpu.freightAmount")), 1)
133
+ a("div", x, l(s.$t("goodsSpu.freightAmount")), 1)
141
134
  ]),
142
135
  default: e(() => [
143
136
  n(" " + l(u.value.freightAmount), 1)
@@ -146,13 +139,13 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
146
139
  }),
147
140
  i(o, null, {
148
141
  label: e(() => [
149
- a("div", le, l(s.$t("goodsSpu.picUrls")), 1)
142
+ a("div", ee, l(s.$t("goodsSpu.picUrls")), 1)
150
143
  ]),
151
144
  default: e(() => [
152
- (f(!0), V(C, null, P(L.value, (t) => (f(), b(m, {
145
+ (f(!0), V(C, null, P(I.value, (t) => (f(), b(r, {
153
146
  key: t,
154
- src: r(B).imageUrl(t, 80, 80),
155
- "preview-src-list": [r(B).imageUrl(t)],
147
+ src: p(B).imageUrl(t, 80, 80),
148
+ "preview-src-list": [p(B).imageUrl(t)],
156
149
  "preview-teleported": "",
157
150
  "hide-on-click-modal": "",
158
151
  fit: "contain"
@@ -162,16 +155,16 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
162
155
  }),
163
156
  i(o, null, {
164
157
  label: e(() => [
165
- a("div", se, l(s.$t("goodsSpu.shelf")), 1)
158
+ a("div", le, l(s.$t("goodsSpu.shelf")), 1)
166
159
  ]),
167
160
  default: e(() => [
168
- n(" " + l(r(p).shelfDict.getValue(u.value.shelf)), 1)
161
+ n(" " + l(p(m).shelfDict.getValue(u.value.shelf)), 1)
169
162
  ]),
170
163
  _: 1
171
164
  }),
172
165
  i(o, null, {
173
166
  label: e(() => [
174
- a("div", te, l(s.$t("goodsSpu.saleNum")), 1)
167
+ a("div", se, l(s.$t("goodsSpu.saleNum")), 1)
175
168
  ]),
176
169
  default: e(() => [
177
170
  n(" " + l(u.value.saleNum), 1)
@@ -180,7 +173,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
180
173
  }),
181
174
  i(o, null, {
182
175
  label: e(() => [
183
- a("div", oe, l(s.$t("goodsSpu.sellPoint")), 1)
176
+ a("div", te, l(s.$t("goodsSpu.sellPoint")), 1)
184
177
  ]),
185
178
  default: e(() => [
186
179
  n(" " + l(u.value.sellPoint), 1)
@@ -189,7 +182,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
189
182
  }),
190
183
  i(o, null, {
191
184
  label: e(() => [
192
- a("div", ue, l(s.$t("goodsSpu.ensureIds")), 1)
185
+ a("div", oe, l(s.$t("goodsSpu.ensureIds")), 1)
193
186
  ]),
194
187
  default: e(() => [
195
188
  (f(!0), V(C, null, P(u.value.ensureIds, (t) => (f(), b(d, {
@@ -197,7 +190,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
197
190
  key: t
198
191
  }, {
199
192
  default: e(() => [
200
- n(l(r(p).goodsEnsureDict.getDictValue(t)), 1)
193
+ n(l(p(m).goodsEnsureDict.getDictValue(t)), 1)
201
194
  ]),
202
195
  _: 2
203
196
  }, 1024))), 128))
@@ -207,8 +200,8 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
207
200
  ]),
208
201
  _: 1
209
202
  }),
210
- a("div", ae, " 商品规格(" + l(r(p).specTypeEnum.getEnumValue(u.value.specType)) + ") ", 1),
211
- u.value.specType == r(N).SPEC_TYPE.UNIFIED_SPEC ? (f(), b(h, {
203
+ a("div", ue, " 商品规格(" + l(p(m).specTypeEnum.getEnumValue(u.value.specType)) + ") ", 1),
204
+ u.value.specType == p(N).SPEC_TYPE.UNIFIED_SPEC ? (f(), b(h, {
212
205
  key: 0,
213
206
  class: "margin-top",
214
207
  column: 2,
@@ -217,7 +210,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
217
210
  default: e(() => [
218
211
  i(o, null, {
219
212
  label: e(() => [
220
- a("div", ie, l(s.$t("goodsSpu.salePrice")), 1)
213
+ a("div", ae, l(s.$t("goodsSpu.salePrice")), 1)
221
214
  ]),
222
215
  default: e(() => {
223
216
  var t;
@@ -229,7 +222,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
229
222
  }),
230
223
  i(o, null, {
231
224
  label: e(() => [
232
- a("div", ne, l(s.$t("goodsSpu.marketPrice")), 1)
225
+ a("div", ie, l(s.$t("goodsSpu.marketPrice")), 1)
233
226
  ]),
234
227
  default: e(() => {
235
228
  var t;
@@ -241,7 +234,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
241
234
  }),
242
235
  i(o, null, {
243
236
  label: e(() => [
244
- a("div", ce, l(s.$t("goodsSpu.costPrice")), 1)
237
+ a("div", ne, l(s.$t("goodsSpu.costPrice")), 1)
245
238
  ]),
246
239
  default: e(() => {
247
240
  var t;
@@ -253,7 +246,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
253
246
  }),
254
247
  i(o, null, {
255
248
  label: e(() => [
256
- a("div", de, l(s.$t("goodsSpu.stock")), 1)
249
+ a("div", ce, l(s.$t("goodsSpu.stock")), 1)
257
250
  ]),
258
251
  default: e(() => {
259
252
  var t;
@@ -265,7 +258,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
265
258
  }),
266
259
  i(o, null, {
267
260
  label: e(() => [
268
- a("div", re, l(s.$t("goodsSpu.weight")), 1)
261
+ a("div", de, l(s.$t("goodsSpu.weight")), 1)
269
262
  ]),
270
263
  default: e(() => {
271
264
  var t;
@@ -277,7 +270,7 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
277
270
  }),
278
271
  i(o, null, {
279
272
  label: e(() => [
280
- a("div", pe, l(s.$t("goodsSpu.volume")), 1)
273
+ a("div", re, l(s.$t("goodsSpu.volume")), 1)
281
274
  ]),
282
275
  default: e(() => {
283
276
  var t;
@@ -290,16 +283,16 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
290
283
  ]),
291
284
  _: 1
292
285
  })) : w("", !0),
293
- g.value.length > 0 ? (f(), b(Y, {
286
+ g.value.length > 0 ? (f(), b(z, {
294
287
  key: 1,
295
288
  specData: $.value,
296
- goodsSku: D.value,
289
+ goodsSku: E.value,
297
290
  isSettingShow: !1
298
291
  }, null, 8, ["specData", "goodsSku"])) : w("", !0),
299
292
  c[1] || (c[1] = a("div", { class: "title-content" }, "商品描述", -1)),
300
293
  a("div", {
301
294
  innerHTML: u.value.description
302
- }, null, 8, me)
295
+ }, null, 8, pe)
303
296
  ]),
304
297
  _: 1,
305
298
  __: [0, 1]
@@ -309,5 +302,5 @@ const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "
309
302
  }
310
303
  });
311
304
  export {
312
- be as default
305
+ ye as default
313
306
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as te, ref as b, computed as se, watch as D, resolveComponent as i, openBlock as m, createElementBlock as g, Fragment as k, unref as O, createVNode as o, withCtx as a, createCommentVNode as I, renderList as y, createElementVNode as S, toDisplayString as Y, createTextVNode as w, createBlock as P } from "vue";
2
- import { C as E, D as ue, S as H, a as ne } from "./index-DZJVaUh3.mjs";
3
- import { s as de, _ as re } from "./skuTable-YDBH_oRN.mjs";
2
+ import { C as E, D as ue, S as H, a as ne } from "./index-CmKF2zdn.mjs";
3
+ import { s as de, _ as re } from "./skuTable-DbNThlFG.mjs";
4
4
  const pe = { key: 0 }, ce = {
5
5
  key: 1,
6
6
  class: "w-full"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as O, ref as C, computed as q, watch as $, resolveComponent as v, openBlock as _, createElementBlock as U, createElementVNode as g, createVNode as n, withCtx as d, createTextVNode as S, createCommentVNode as F, Fragment as M, renderList as G, createBlock as x, toDisplayString as D, unref as z } from "vue";
2
- import { D as K } from "./index-DZJVaUh3.mjs";
2
+ import { D as K } from "./index-CmKF2zdn.mjs";
3
3
  import { fileApi as E } from "jmash-core";
4
4
  const H = (a, h) => {
5
5
  const s = a.__vccOpts || a;
package/dts/api/dict.d.ts CHANGED
@@ -13,7 +13,7 @@ export declare class ShopInfoBizDict extends BizDict {
13
13
  useValues(): Promise<Entry[]>;
14
14
  }
15
15
  export declare class GoodsCategoryListBizLayDict extends BizLayDict {
16
- useValues(excludeId?: string): Promise<LayEntry[]>;
16
+ useValues(): Promise<LayEntry[]>;
17
17
  }
18
18
  export declare class SpecInfoBizDict extends BizDict {
19
19
  useValues(): Promise<Entry[]>;
@@ -49,7 +49,7 @@ export interface GoodsSpuKeyList extends EntityKeyList {
49
49
  }
50
50
  export interface GoodsSpuCreateReq extends EntityCreateReq {
51
51
  shopId?: string;
52
- categoryId?: string;
52
+ categoryId?: Array<string>;
53
53
  freightType?: string;
54
54
  freightAmount?: number;
55
55
  spuCode?: string;
@@ -67,7 +67,7 @@ export interface GoodsSpuCreateReq extends EntityCreateReq {
67
67
  export interface GoodsSpuUpdateReq extends EntityUpdateReq {
68
68
  spuId?: string;
69
69
  shopId?: string;
70
- categoryId?: string;
70
+ categoryId?: Array<string>;
71
71
  freightType?: string;
72
72
  freightAmount?: number;
73
73
  spuCode?: string;
@@ -0,0 +1,2 @@
1
+ import type { LayEntry } from 'jmash-core';
2
+ export declare function returnBizLay(list: any, label: string, value: string): LayEntry[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-goods",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/index.d.ts",