xyvcard-goods 0.0.26 → 0.0.28
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/dist/{edit-Xn_nZjI6.mjs → edit-CYekSxUa.mjs} +3 -3
- package/dist/{edit-C5HGHhkb.mjs → edit-C_XCVJwM.mjs} +1 -1
- package/dist/{edit-DrbsKmwh.mjs → edit-CquWa3hI.mjs} +85 -82
- package/dist/{edit-Cb0aaC0q.mjs → edit-CuZnQH9w.mjs} +1 -1
- package/dist/{edit-eAHVEi0b.mjs → edit-D1FAN3TA.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-DBG-5gI4.mjs → edit.vue_vue_type_script_setup_true_lang-BSxqVyG4.mjs} +2 -2
- package/dist/{goodsList-CDQZGSh2.mjs → goodsList-DZlaY5k0.mjs} +1 -1
- package/dist/{goodsList-CKCG7ntZ.mjs → goodsList-wpPEPZqs.mjs} +1 -1
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-B6P3fso6.mjs → goodsList.vue_vue_type_script_setup_true_lang-BFXFifWr.mjs} +2 -2
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-DiRkiNJk.mjs → goodsList.vue_vue_type_script_setup_true_lang-iXycU5oS.mjs} +2 -2
- package/dist/{index-utNcRJx7.mjs → index-B27GuULR.mjs} +4 -4
- package/dist/{index-Bz206T2E.mjs → index-B3vvD7JH.mjs} +3 -3
- package/dist/{index-CMkWXcWe.mjs → index-COXyxAor.mjs} +2 -2
- package/dist/{index-CSeu2TZT.mjs → index-DFxg3rmo.mjs} +2 -2
- package/dist/{index-B8IdlGiz.mjs → index-Dd1dJx7i.mjs} +3 -3
- package/dist/{index-CDhEKnzj.mjs → index-Dy5JznUz.mjs} +2 -2
- package/dist/{index-DSbkvzGV.mjs → index-nCeCw43N.mjs} +3 -3
- package/dist/{index-D70qzGQF.mjs → index-wH3Sgvus.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{info-CX3zF0ZW.mjs → info-0Pf9u0GJ.mjs} +3 -3
- package/dist/info-NBnTd9fK.mjs +349 -0
- package/dist/{skuForm-DUR7U2Kn.mjs → skuForm-BsvKk2kD.mjs} +78 -77
- package/dist/{skuForm-B_8WQCr3.mjs → skuForm-CU0a2ltJ.mjs} +2 -2
- package/dist/{skuTable-D4LGL7B5.mjs → skuTable-DgDGWX-n.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dts/api/goods-spu/types.d.ts +4 -0
- package/package.json +1 -1
- package/dist/info-Dlte8Sn0.mjs +0 -325
package/dist/info-Dlte8Sn0.mjs
DELETED
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, ref as v, resolveComponent as f, openBlock as _, createElementBlock as k, createVNode as o, withCtx as l, createTextVNode as r, toDisplayString as u, createElementVNode as p, Fragment as V, renderList as E, createBlock as D, unref as m } from "vue";
|
|
2
|
-
import { fileApi as P, routerUtil as R } from "jmash-core";
|
|
3
|
-
import { useRouter as j, useRoute as G } from "vue-router";
|
|
4
|
-
import { D as y, C as S } from "./index-CMkWXcWe.mjs";
|
|
5
|
-
import { a as L } from "./index-utNcRJx7.mjs";
|
|
6
|
-
import { specValueApi as H } from "xyvcard-shop";
|
|
7
|
-
const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, w = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, se = { class: "cell-item" }, le = { key: 0 }, te = { key: 1 }, pe = /* @__PURE__ */ M({
|
|
8
|
-
__name: "info",
|
|
9
|
-
setup(ae) {
|
|
10
|
-
const O = j(), b = G(), d = v({}), $ = v([]), B = v({}), N = v([]);
|
|
11
|
-
y.goodsCategoryListBizLayDict.useValues(), y.labelListBizDict.useValues(), y.goodsSpuBizDict.useValues();
|
|
12
|
-
const U = v([
|
|
13
|
-
{
|
|
14
|
-
salePrice: 0,
|
|
15
|
-
skuId: "",
|
|
16
|
-
spuId: "",
|
|
17
|
-
specInfo: "",
|
|
18
|
-
saleNum: 0,
|
|
19
|
-
picUrl: "",
|
|
20
|
-
specType: "",
|
|
21
|
-
skuOptions: []
|
|
22
|
-
}
|
|
23
|
-
]);
|
|
24
|
-
b.query.spuId && (L.findById({ spuId: b.query.spuId }).then(({ data: s }) => {
|
|
25
|
-
var e;
|
|
26
|
-
d.value = Object.assign(d, s), $.value = (e = s.picUrls) == null ? void 0 : e.split(",");
|
|
27
|
-
}), L.findGroupList({ goodsId: b.query.spuId }).then(({ data: s }) => {
|
|
28
|
-
if (s && s.results.length > 0) {
|
|
29
|
-
U.value = [];
|
|
30
|
-
const e = s.results.map(async (t) => {
|
|
31
|
-
const i = {
|
|
32
|
-
salePrice: t.salePrice || 0,
|
|
33
|
-
skuId: t.skuId || "",
|
|
34
|
-
spuId: t.spuId || "",
|
|
35
|
-
saleNum: t.saleNum || 0,
|
|
36
|
-
picUrl: t.picUrl || "",
|
|
37
|
-
specType: "",
|
|
38
|
-
skuOptions: []
|
|
39
|
-
};
|
|
40
|
-
return await A(t.spuId, i), i.specType === S.SPEC_TYPE.MULTI_SPEC && t.skuId && (i.skuId = t.skuId || "", i.salePrice = t.salePrice || 0, i.saleNum = t.saleNum || 0, i.picUrl = t.picUrl || "", z(t.skuId)), i;
|
|
41
|
-
});
|
|
42
|
-
Promise.all(e).then((t) => {
|
|
43
|
-
U.value = t;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}));
|
|
47
|
-
async function A(s, e) {
|
|
48
|
-
var t, i, h;
|
|
49
|
-
if (e.skuId = "", e.skuOptions = [], e.picUrl = "", e.salePrice = 0, e.saleNum = 0, !s) {
|
|
50
|
-
e.skuId = "", e.picUrl = "", e.salePrice = 0, e.saleNum = 0, e.skuOptions = [];
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
try {
|
|
54
|
-
const { data: c } = await L.findById({ spuId: s });
|
|
55
|
-
if (e.specType = c.specType, e.specType === S.SPEC_TYPE.UNIFIED_SPEC && (e.picUrl = c.picUrls ? c.picUrls.split(",")[0] : "", e.salePrice = (t = c.skuList) == null ? void 0 : t.results[0].salePrice, e.saleNum = (i = c.skuList) == null ? void 0 : i.results[0].stock, e.skuId = (h = c.skuList) == null ? void 0 : h.results[0].skuId), e.specType === S.SPEC_TYPE.MULTI_SPEC && c.skuList) {
|
|
56
|
-
const I = c.skuList.results, g = I.map((n) => n.specValues && Array.isArray(n.specValues) ? n.specValues.map(
|
|
57
|
-
(a) => a.specValueId
|
|
58
|
-
) : []), C = g.flat().map((n) => Y(n));
|
|
59
|
-
await Promise.all(C);
|
|
60
|
-
const T = g.map(
|
|
61
|
-
(n) => n.map((a) => N.value[a] || a)
|
|
62
|
-
);
|
|
63
|
-
e.skuOptions = I.map((n, a) => ({
|
|
64
|
-
key: n.skuId,
|
|
65
|
-
value: T[a].join(" "),
|
|
66
|
-
picUrl: n.picUrl || (c.picUrls ? c.picUrls.split(",")[0] : ""),
|
|
67
|
-
salePrice: n.salePrice,
|
|
68
|
-
stock: n.stock
|
|
69
|
-
})), I.forEach((n) => {
|
|
70
|
-
n.skuId && (B.value[n.skuId] = {
|
|
71
|
-
...n,
|
|
72
|
-
spuPicUrls: c.picUrls
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
} catch {
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function z(s) {
|
|
80
|
-
const e = U.value.find((t) => t.skuId === s);
|
|
81
|
-
if (e && s) {
|
|
82
|
-
const t = B.value[s];
|
|
83
|
-
if (t) {
|
|
84
|
-
const i = t.spuPicUrls ? t.spuPicUrls.split(",")[0] : "";
|
|
85
|
-
e.picUrl = t.picUrl || i, e.salePrice = t.salePrice, e.saleNum = t.stock;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
async function Y(s) {
|
|
90
|
-
if (!N.value[s])
|
|
91
|
-
try {
|
|
92
|
-
const { data: e } = await H.findById({
|
|
93
|
-
specValueId: s
|
|
94
|
-
});
|
|
95
|
-
return N.value[s] = e.valueName, e.valueName;
|
|
96
|
-
} catch {
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function q(s) {
|
|
100
|
-
if (!s.skuId || !s.skuOptions || s.skuOptions.length === 0)
|
|
101
|
-
return "";
|
|
102
|
-
const e = s.skuOptions.find(
|
|
103
|
-
(t) => t.key === s.skuId
|
|
104
|
-
);
|
|
105
|
-
return e ? e.value : "";
|
|
106
|
-
}
|
|
107
|
-
function F() {
|
|
108
|
-
R.closeTagView(b.fullPath, O, !1);
|
|
109
|
-
}
|
|
110
|
-
return (s, e) => {
|
|
111
|
-
const t = f("el-button"), i = f("el-descriptions-item"), h = f("el-tag"), c = f("el-image"), I = f("el-descriptions"), g = f("el-table-column"), C = f("el-table"), T = f("el-row"), n = f("el-card");
|
|
112
|
-
return _(), k("div", J, [
|
|
113
|
-
o(n, { shadow: "never" }, {
|
|
114
|
-
header: l(() => [
|
|
115
|
-
o(t, {
|
|
116
|
-
type: "primary",
|
|
117
|
-
onClick: F
|
|
118
|
-
}, {
|
|
119
|
-
default: l(() => [
|
|
120
|
-
r(u(s.$t("common.back")), 1)
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
})
|
|
124
|
-
]),
|
|
125
|
-
default: l(() => [
|
|
126
|
-
e[0] || (e[0] = p("div", { class: "title-content" }, "基本信息", -1)),
|
|
127
|
-
o(I, {
|
|
128
|
-
class: "margin-top",
|
|
129
|
-
column: 2,
|
|
130
|
-
border: ""
|
|
131
|
-
}, {
|
|
132
|
-
default: l(() => [
|
|
133
|
-
o(i, null, {
|
|
134
|
-
label: l(() => [
|
|
135
|
-
p("div", K, u(s.$t("goodsSpu.spuName")), 1)
|
|
136
|
-
]),
|
|
137
|
-
default: l(() => [
|
|
138
|
-
r(" " + u(d.value.spuName), 1)
|
|
139
|
-
]),
|
|
140
|
-
_: 1
|
|
141
|
-
}),
|
|
142
|
-
o(i, null, {
|
|
143
|
-
label: l(() => [
|
|
144
|
-
p("div", Q, u(s.$t("goodsSpu.spuCode")), 1)
|
|
145
|
-
]),
|
|
146
|
-
default: l(() => [
|
|
147
|
-
r(" " + u(d.value.spuCode), 1)
|
|
148
|
-
]),
|
|
149
|
-
_: 1
|
|
150
|
-
}),
|
|
151
|
-
o(i, null, {
|
|
152
|
-
label: l(() => [
|
|
153
|
-
p("div", W, u(s.$t("goodsSpu.categoryId")), 1)
|
|
154
|
-
]),
|
|
155
|
-
default: l(() => [
|
|
156
|
-
(_(!0), k(V, null, E(d.value.categoryIds, (a) => (_(), D(h, {
|
|
157
|
-
type: "info",
|
|
158
|
-
key: a,
|
|
159
|
-
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
160
|
-
}, {
|
|
161
|
-
default: l(() => [
|
|
162
|
-
r(u(m(y).goodsCategoryListBizLayDict.getValue(a) || a), 1)
|
|
163
|
-
]),
|
|
164
|
-
_: 2
|
|
165
|
-
}, 1024))), 128))
|
|
166
|
-
]),
|
|
167
|
-
_: 1
|
|
168
|
-
}),
|
|
169
|
-
o(i, null, {
|
|
170
|
-
label: l(() => [
|
|
171
|
-
p("div", X, u(s.$t("goodsSpu.labelIds")), 1)
|
|
172
|
-
]),
|
|
173
|
-
default: l(() => [
|
|
174
|
-
(_(!0), k(V, null, E(d.value.labelIds, (a) => (_(), D(h, {
|
|
175
|
-
type: "info",
|
|
176
|
-
key: a,
|
|
177
|
-
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
178
|
-
}, {
|
|
179
|
-
default: l(() => [
|
|
180
|
-
r(u(m(y).labelListBizDict.getValue(a) || a), 1)
|
|
181
|
-
]),
|
|
182
|
-
_: 2
|
|
183
|
-
}, 1024))), 128))
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
}),
|
|
187
|
-
o(i, null, {
|
|
188
|
-
label: l(() => [
|
|
189
|
-
p("div", Z, u(s.$t("goodsSpu.picUrls")), 1)
|
|
190
|
-
]),
|
|
191
|
-
default: l(() => [
|
|
192
|
-
(_(!0), k(V, null, E($.value, (a) => (_(), D(c, {
|
|
193
|
-
key: a,
|
|
194
|
-
src: m(P).imageUrl(a, 80, 80),
|
|
195
|
-
"preview-src-list": [m(P).imageUrl(a)],
|
|
196
|
-
"preview-teleported": "",
|
|
197
|
-
"hide-on-click-modal": "",
|
|
198
|
-
fit: "contain"
|
|
199
|
-
}, null, 8, ["src", "preview-src-list"]))), 128))
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}),
|
|
203
|
-
o(i, null, {
|
|
204
|
-
label: l(() => [
|
|
205
|
-
p("div", w, u(s.$t("goodsSpu.freightType")), 1)
|
|
206
|
-
]),
|
|
207
|
-
default: l(() => [
|
|
208
|
-
r(" " + u(m(y).freightTypeEnum.getEnumValue(
|
|
209
|
-
d.value.freightType
|
|
210
|
-
)), 1)
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
}),
|
|
214
|
-
o(i, null, {
|
|
215
|
-
label: l(() => [
|
|
216
|
-
p("div", x, u(s.$t("goodsSpu.freightAmount")), 1)
|
|
217
|
-
]),
|
|
218
|
-
default: l(() => [
|
|
219
|
-
r(" " + u(d.value.freightAmount), 1)
|
|
220
|
-
]),
|
|
221
|
-
_: 1
|
|
222
|
-
}),
|
|
223
|
-
o(i, null, {
|
|
224
|
-
label: l(() => [
|
|
225
|
-
p("div", ee, u(s.$t("goodsSpu.shelf")), 1)
|
|
226
|
-
]),
|
|
227
|
-
default: l(() => [
|
|
228
|
-
r(" " + u(m(y).shelfDict.getValue(d.value.shelf)), 1)
|
|
229
|
-
]),
|
|
230
|
-
_: 1
|
|
231
|
-
}),
|
|
232
|
-
o(i, null, {
|
|
233
|
-
label: l(() => [
|
|
234
|
-
p("div", se, u(s.$t("goodsSpu.saleNum")), 1)
|
|
235
|
-
]),
|
|
236
|
-
default: l(() => [
|
|
237
|
-
r(" " + u(d.value.saleNum), 1)
|
|
238
|
-
]),
|
|
239
|
-
_: 1
|
|
240
|
-
})
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
}),
|
|
244
|
-
e[1] || (e[1] = p("div", { class: "title-content" }, "套装商品", -1)),
|
|
245
|
-
o(T, null, {
|
|
246
|
-
default: l(() => [
|
|
247
|
-
o(C, {
|
|
248
|
-
data: U.value,
|
|
249
|
-
border: "",
|
|
250
|
-
style: { width: "100%" }
|
|
251
|
-
}, {
|
|
252
|
-
default: l(() => [
|
|
253
|
-
o(g, {
|
|
254
|
-
label: s.$t("goodsSpu.spuName"),
|
|
255
|
-
prop: "spuId",
|
|
256
|
-
"header-align": "center"
|
|
257
|
-
}, {
|
|
258
|
-
default: l(({ row: a }) => [
|
|
259
|
-
r(u(m(y).goodsSpuBizDict.getValue(a.spuId)), 1)
|
|
260
|
-
]),
|
|
261
|
-
_: 1
|
|
262
|
-
}, 8, ["label"]),
|
|
263
|
-
o(g, {
|
|
264
|
-
label: s.$t("goodsSpu.specType"),
|
|
265
|
-
"header-align": "center"
|
|
266
|
-
}, {
|
|
267
|
-
default: l(({ row: a }) => [
|
|
268
|
-
a.specType === m(S).SPEC_TYPE.UNIFIED_SPEC ? (_(), k("span", le, " 统一规格 ")) : (_(), k("span", te, u(q(a)), 1))
|
|
269
|
-
]),
|
|
270
|
-
_: 1
|
|
271
|
-
}, 8, ["label"]),
|
|
272
|
-
o(g, {
|
|
273
|
-
label: s.$t("goodsSpu.picUrls"),
|
|
274
|
-
prop: "picUrl",
|
|
275
|
-
width: "105",
|
|
276
|
-
"header-align": "center"
|
|
277
|
-
}, {
|
|
278
|
-
default: l(({ row: a }) => [
|
|
279
|
-
o(c, {
|
|
280
|
-
src: m(P).imageUrl(a.picUrl, 80, 80),
|
|
281
|
-
"preview-src-list": [m(P).imageUrl(a.picUrl)],
|
|
282
|
-
"preview-teleported": "",
|
|
283
|
-
"hide-on-click-modal": "",
|
|
284
|
-
fit: "contain"
|
|
285
|
-
}, null, 8, ["src", "preview-src-list"])
|
|
286
|
-
]),
|
|
287
|
-
_: 1
|
|
288
|
-
}, 8, ["label"]),
|
|
289
|
-
o(g, {
|
|
290
|
-
label: s.$t("goodsSpu.salePriceV1"),
|
|
291
|
-
prop: "salePrice",
|
|
292
|
-
"header-align": "center"
|
|
293
|
-
}, {
|
|
294
|
-
default: l(({ row: a }) => [
|
|
295
|
-
r(u(a.salePrice), 1)
|
|
296
|
-
]),
|
|
297
|
-
_: 1
|
|
298
|
-
}, 8, ["label"]),
|
|
299
|
-
o(g, {
|
|
300
|
-
label: s.$t("goodsSpu.saleNums"),
|
|
301
|
-
prop: "saleNum",
|
|
302
|
-
"header-align": "center"
|
|
303
|
-
}, {
|
|
304
|
-
default: l(({ row: a }) => [
|
|
305
|
-
r(u(a.saleNum), 1)
|
|
306
|
-
]),
|
|
307
|
-
_: 1
|
|
308
|
-
}, 8, ["label"])
|
|
309
|
-
]),
|
|
310
|
-
_: 1
|
|
311
|
-
}, 8, ["data"])
|
|
312
|
-
]),
|
|
313
|
-
_: 1
|
|
314
|
-
})
|
|
315
|
-
]),
|
|
316
|
-
_: 1,
|
|
317
|
-
__: [0, 1]
|
|
318
|
-
})
|
|
319
|
-
]);
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
export {
|
|
324
|
-
pe as default
|
|
325
|
-
};
|