xyvcard-goods 0.0.1 → 0.0.3

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 (35) hide show
  1. package/dist/{approveFailIndex-gl8MBbK6.mjs → approveFailIndex-C2BhoVKC.mjs} +1 -1
  2. package/dist/{approvedIndex.vue_vue_type_script_setup_true_lang-Wyt6TM2h.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-CSBlBFQo.mjs} +111 -94
  3. package/dist/{auditIndex-jOIDtl_l.mjs → auditIndex-BjjiwYrm.mjs} +1 -1
  4. package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-sZD3eYJR.mjs → auditIndex.vue_vue_type_script_setup_true_lang-UrMEjXo-.mjs} +139 -122
  5. package/dist/{edit-DpIovEhA.mjs → edit-B1_IbaHc.mjs} +5007 -5008
  6. package/dist/{index-C9KO9AZw.mjs → el-message-BBB-S2MS.mjs} +614 -595
  7. package/dist/{index-C9f6Lybt.mjs → index-CZD7OAWo.mjs} +49 -30
  8. package/dist/{index-BupW0ufK.mjs → index-vE-TE0cx.mjs} +108 -81
  9. package/dist/index.mjs +1099 -1046
  10. package/dist/info-Bm6Ifv7W.mjs +311 -0
  11. package/dist/{saleIndex-DOcefF_x.mjs → saleIndex-C9AD4DIj.mjs} +1 -1
  12. package/dist/saleIndex.vue_vue_type_script_setup_true_lang-qDsRE8JX.mjs +428 -0
  13. package/dist/{shelfIndex-CTAReFV-.mjs → shelfIndex-CyAp6rf5.mjs} +1 -1
  14. package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-BG3OCeN_.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-D3xUiFR2.mjs} +173 -159
  15. package/dist/skuForm-Ctu0Vbym.mjs +419 -0
  16. package/dist/skuTable-BbTTCq2m.mjs +585 -0
  17. package/dist/style.css +1 -1
  18. package/dts/api/goods-spu/types.d.ts +13 -6
  19. package/dts/constant.d.ts +4 -0
  20. package/dts/index.d.ts +2 -0
  21. package/dts/lang/goods/en.d.ts +1 -68
  22. package/dts/lang/goods/zh-cn.d.ts +0 -44
  23. package/dts/utils/sku.d.ts +19 -0
  24. package/dts/views/goods/goods-spu/{sku-form.vue.d.ts → skuForm.vue.d.ts} +7 -9
  25. package/dts/views/goods/goods-spu/skuTable.vue.d.ts +40 -0
  26. package/package.json +2 -2
  27. package/dist/approveFailIndex.vue_vue_type_script_setup_true_lang-WJ40OU9K.mjs +0 -544
  28. package/dist/approvedIndex-Cn6g11xv.mjs +0 -4
  29. package/dist/index-fu3gxdt_.mjs +0 -130
  30. package/dist/info-C6VRixBH.mjs +0 -301
  31. package/dist/saleIndex.vue_vue_type_script_setup_true_lang-Cfv3a-DK.mjs +0 -415
  32. package/dist/sku-form-BAi4HkUM.mjs +0 -463
  33. package/dist/sku-table-CRrisvJ1.mjs +0 -410
  34. package/dts/views/goods/goods-spu/approvedIndex.vue.d.ts +0 -2
  35. package/dts/views/goods/goods-spu/sku-table.vue.d.ts +0 -14
@@ -0,0 +1,311 @@
1
+ import { defineComponent as q, ref as b, computed as j, watch as F, resolveComponent as S, openBlock as g, createElementBlock as V, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as l, createElementVNode as a, unref as r, Fragment as w, renderList as C, createBlock as y, createCommentVNode as P } 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 p, C as N, S as z } from "./index-CZD7OAWo.mjs";
5
+ import { s as G } from "./skuTable-BbTTCq2m.mjs";
6
+ import { goodsSpuApi as J } from "./index.mjs";
7
+ import { g as K } from "./index-BHmGYIuc.mjs";
8
+ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Y = { 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"], ye = /* @__PURE__ */ q({
9
+ __name: "info",
10
+ setup(_e) {
11
+ const U = O(), k = R(), u = b({}), L = b([]), _ = b([]), D = b([]), $ = b([]), T = j(() => _.value.filter(
12
+ (s) => s.name && s.specValueList != null && s.specValueList.length
13
+ ));
14
+ F(
15
+ T,
16
+ (s) => s,
17
+ {
18
+ deep: !0,
19
+ immediate: !0
20
+ }
21
+ ), p.shopInfoBizDict.useValues(), p.goodsCategoryDict.useValues(), k.query.spuId && J.findById({ spuId: k.query.spuId }).then(({ data: s }) => {
22
+ var c, v, o;
23
+ u.value = Object.assign(u, s), L.value = (c = s.picUrls) == null ? void 0 : c.split(","), K.findById({ spuId: k.query.spuId }).then(({ data: m }) => {
24
+ u.value.ensureIds = m.ensures;
25
+ }), s.specType === N.specType.MULTI_SPEC && (D.value = (v = s.skuList) == null ? void 0 : v.results, (o = s.skuList) == null || o.results.forEach((m) => {
26
+ var d;
27
+ (d = m.specValues) == null || d.map((h) => {
28
+ p.specInfoDict.useValues().then((I) => {
29
+ const t = I.find((f) => h.specId === f.key);
30
+ if (console.log(t), t) {
31
+ let f = {
32
+ id: h.specId,
33
+ name: t.value,
34
+ specValueList: []
35
+ };
36
+ _.value.push(f);
37
+ }
38
+ const E = /* @__PURE__ */ new Map();
39
+ _.value = _.value.filter(
40
+ (f) => !E.has(f.id) && E.set(f.id, f)
41
+ ), A(h.specValueId);
42
+ });
43
+ });
44
+ }));
45
+ });
46
+ function A(s) {
47
+ _.value.forEach((c) => {
48
+ $.value = new z({ specId: c.id }), $.value.useValues().then((v) => {
49
+ v.forEach((o) => {
50
+ if (o.key === s) {
51
+ let d = {
52
+ id: s,
53
+ name: o.value
54
+ };
55
+ c.specValueList.push(d);
56
+ }
57
+ const m = /* @__PURE__ */ new Map();
58
+ c.specValueList = c.specValueList.filter(
59
+ (d) => !m.has(d.id) && m.set(d.id, d)
60
+ ), console.log(_.value);
61
+ });
62
+ });
63
+ });
64
+ }
65
+ function M() {
66
+ H.closeTagView(k.fullPath, U, !1);
67
+ }
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");
70
+ return g(), V("div", Q, [
71
+ i(I, { shadow: "never" }, {
72
+ header: e(() => [
73
+ i(v, {
74
+ type: "primary",
75
+ onClick: M
76
+ }, {
77
+ default: e(() => [
78
+ n(l(s.$t("common.back")), 1)
79
+ ]),
80
+ _: 1
81
+ })
82
+ ]),
83
+ default: e(() => [
84
+ c[0] || (c[0] = a("div", { class: "title-content" }, "基本信息", -1)),
85
+ i(h, {
86
+ class: "margin-top",
87
+ column: 2,
88
+ border: ""
89
+ }, {
90
+ default: e(() => [
91
+ i(o, null, {
92
+ label: e(() => [
93
+ a("div", W, 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", X, l(s.$t("goodsSpu.spuName")), 1)
103
+ ]),
104
+ default: e(() => [
105
+ n(" " + l(u.value.spuName), 1)
106
+ ]),
107
+ _: 1
108
+ }),
109
+ i(o, null, {
110
+ label: e(() => [
111
+ a("div", Y, l(s.$t("goodsSpu.categoryId")), 1)
112
+ ]),
113
+ default: e(() => [
114
+ n(" " + l(r(p).goodsCategoryDict.getValue(u.value.categoryId)), 1)
115
+ ]),
116
+ _: 1
117
+ }),
118
+ i(o, null, {
119
+ label: e(() => [
120
+ a("div", Z, l(s.$t("goodsSpu.spuCode")), 1)
121
+ ]),
122
+ default: e(() => [
123
+ n(" " + l(u.value.spuCode), 1)
124
+ ]),
125
+ _: 1
126
+ }),
127
+ i(o, null, {
128
+ label: e(() => [
129
+ a("div", x, l(s.$t("goodsSpu.freightType")), 1)
130
+ ]),
131
+ default: e(() => [
132
+ n(" " + l(r(p).freightTypeEnum.getEnumValue(
133
+ u.value.freightType
134
+ )), 1)
135
+ ]),
136
+ _: 1
137
+ }),
138
+ i(o, null, {
139
+ label: e(() => [
140
+ a("div", ee, l(s.$t("goodsSpu.freightAmount")), 1)
141
+ ]),
142
+ default: e(() => [
143
+ n(" " + l(u.value.freightAmount), 1)
144
+ ]),
145
+ _: 1
146
+ }),
147
+ i(o, null, {
148
+ label: e(() => [
149
+ a("div", le, l(s.$t("goodsSpu.picUrls")), 1)
150
+ ]),
151
+ default: e(() => [
152
+ (g(!0), V(w, null, C(L.value, (t) => (g(), y(m, {
153
+ src: r(B).imageUrl(t, 80, 80),
154
+ "preview-src-list": [r(B).imageUrl(t)],
155
+ "preview-teleported": "",
156
+ "hide-on-click-modal": "",
157
+ fit: "contain"
158
+ }, null, 8, ["src", "preview-src-list"]))), 256))
159
+ ]),
160
+ _: 1
161
+ }),
162
+ i(o, null, {
163
+ label: e(() => [
164
+ a("div", se, l(s.$t("goodsSpu.shelf")), 1)
165
+ ]),
166
+ default: e(() => {
167
+ var t;
168
+ return [
169
+ n(" " + l(r(p).shelfDict.getValue((t = u.value.shelf) == null ? void 0 : t.toString())), 1)
170
+ ];
171
+ }),
172
+ _: 1
173
+ }),
174
+ i(o, null, {
175
+ label: e(() => [
176
+ a("div", te, l(s.$t("goodsSpu.saleNum")), 1)
177
+ ]),
178
+ default: e(() => [
179
+ n(" " + l(u.value.saleNum), 1)
180
+ ]),
181
+ _: 1
182
+ }),
183
+ i(o, null, {
184
+ label: e(() => [
185
+ a("div", oe, l(s.$t("goodsSpu.sellPoint")), 1)
186
+ ]),
187
+ default: e(() => [
188
+ n(" " + l(u.value.sellPoint), 1)
189
+ ]),
190
+ _: 1
191
+ }),
192
+ i(o, null, {
193
+ label: e(() => [
194
+ a("div", ue, l(s.$t("goodsSpu.ensureIds")), 1)
195
+ ]),
196
+ default: e(() => [
197
+ (g(!0), V(w, null, C(u.value.ensureIds, (t) => (g(), y(d, { type: "info" }, {
198
+ default: e(() => [
199
+ n(l(r(p).goodsEnsureDict.getDictValue(t)), 1)
200
+ ]),
201
+ _: 2
202
+ }, 1024))), 256))
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ _: 1
208
+ }),
209
+ a("div", ae, " 商品规格(" + l(r(p).specTypeEnum.getEnumValue(u.value.specType)) + ") ", 1),
210
+ u.value.specType == r(N).specType.UNIFIED_SPEC ? (g(), y(h, {
211
+ key: 0,
212
+ class: "margin-top",
213
+ column: 2,
214
+ border: ""
215
+ }, {
216
+ default: e(() => [
217
+ i(o, null, {
218
+ label: e(() => [
219
+ a("div", ie, l(s.$t("goodsSpu.salePrice")), 1)
220
+ ]),
221
+ default: e(() => {
222
+ var t;
223
+ return [
224
+ n(" " + l((t = u.value.skuList) == null ? void 0 : t.results[0].salePrice) + "元 ", 1)
225
+ ];
226
+ }),
227
+ _: 1
228
+ }),
229
+ i(o, null, {
230
+ label: e(() => [
231
+ a("div", ne, l(s.$t("goodsSpu.marketPrice")), 1)
232
+ ]),
233
+ default: e(() => {
234
+ var t;
235
+ return [
236
+ n(" " + l((t = u.value.skuList) == null ? void 0 : t.results[0].marketPrice) + "元 ", 1)
237
+ ];
238
+ }),
239
+ _: 1
240
+ }),
241
+ i(o, null, {
242
+ label: e(() => [
243
+ a("div", ce, l(s.$t("goodsSpu.costPrice")), 1)
244
+ ]),
245
+ default: e(() => {
246
+ var t;
247
+ return [
248
+ n(" " + l((t = u.value.skuList) == null ? void 0 : t.results[0].costPrice) + "元 ", 1)
249
+ ];
250
+ }),
251
+ _: 1
252
+ }),
253
+ i(o, null, {
254
+ label: e(() => [
255
+ a("div", de, l(s.$t("goodsSpu.stock")), 1)
256
+ ]),
257
+ default: e(() => {
258
+ var t;
259
+ return [
260
+ n(" " + l((t = u.value.skuList) == null ? void 0 : t.results[0].stock), 1)
261
+ ];
262
+ }),
263
+ _: 1
264
+ }),
265
+ i(o, null, {
266
+ label: e(() => [
267
+ a("div", re, l(s.$t("goodsSpu.weight")), 1)
268
+ ]),
269
+ default: e(() => {
270
+ var t;
271
+ return [
272
+ n(" " + l((t = u.value.skuList) == null ? void 0 : t.results[0].weight), 1)
273
+ ];
274
+ }),
275
+ _: 1
276
+ }),
277
+ i(o, null, {
278
+ label: e(() => [
279
+ a("div", pe, l(s.$t("goodsSpu.volume")), 1)
280
+ ]),
281
+ default: e(() => {
282
+ var t;
283
+ return [
284
+ n(" " + l((t = u.value.skuList) == null ? void 0 : t.results[0].volume), 1)
285
+ ];
286
+ }),
287
+ _: 1
288
+ })
289
+ ]),
290
+ _: 1
291
+ })) : P("", !0),
292
+ _.value.length > 0 ? (g(), y(G, {
293
+ key: 1,
294
+ specData: T.value,
295
+ goodsSku: D.value,
296
+ isSettingShow: !1
297
+ }, null, 8, ["specData", "goodsSku"])) : P("", !0),
298
+ c[1] || (c[1] = a("div", { class: "title-content" }, "商品描述", -1)),
299
+ a("div", {
300
+ innerHTML: u.value.description
301
+ }, null, 8, me)
302
+ ]),
303
+ _: 1
304
+ })
305
+ ]);
306
+ };
307
+ }
308
+ });
309
+ export {
310
+ ye as default
311
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./saleIndex.vue_vue_type_script_setup_true_lang-Cfv3a-DK.mjs";
1
+ import { _ as f } from "./saleIndex.vue_vue_type_script_setup_true_lang-qDsRE8JX.mjs";
2
2
  export {
3
3
  f as default
4
4
  };