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