xyvcard-goods 0.0.7 → 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.
- package/dist/{approveFailIndex-F3GtuNeX.mjs → approveFailIndex-BecI6njE.mjs} +1 -1
- package/dist/{approveFailIndex.vue_vue_type_script_setup_true_lang-8ykH4NF1.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-1FXHUoMJ.mjs} +9 -9
- package/dist/{auditIndex-DZUQQzVu.mjs → auditIndex-ByyMgebr.mjs} +1 -1
- package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-Bnc1wKbA.mjs → auditIndex.vue_vue_type_script_setup_true_lang-DT2irP9g.mjs} +44 -44
- package/dist/edit-BWUxDk9Y.mjs +594 -0
- package/dist/{index-D5_GsXR7.mjs → index-AZ4TxL-_.mjs} +48 -51
- package/dist/{index-kGlE0ywA.mjs → index-BypI3ZNk.mjs} +90 -90
- package/dist/index.mjs +2 -2
- package/dist/{info-kiOShGr4.mjs → info-BJ1Ld_6D.mjs} +20 -23
- package/dist/{saleIndex-CyMvOgxp.mjs → saleIndex-CBtuv6um.mjs} +1 -1
- package/dist/{saleIndex.vue_vue_type_script_setup_true_lang-BgZZMEph.mjs → saleIndex.vue_vue_type_script_setup_true_lang-Cxv3foxp.mjs} +69 -69
- package/dist/{shelfIndex-DZWqrqlw.mjs → shelfIndex-CykEAeD4.mjs} +1 -1
- package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-B7fw9wHp.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-UPt1ZDpP.mjs} +11 -11
- package/dist/{skuForm-Dtq2Ttjc.mjs → skuForm-DdiMztDh.mjs} +82 -77
- package/dist/{skuTable-8oPw0DhV.mjs → skuTable-Cg06m_5i.mjs} +122 -127
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +6 -2
- package/dts/api/goods-spu/types.d.ts +6 -5
- package/dts/components/EnumRadio/index.vue.d.ts +4 -3
- package/dts/components/GoodsUpload/ImageUpload.vue.d.ts +10 -18
- package/dts/constant.d.ts +3 -3
- package/dts/views/goods/goods-spu/skuForm.vue.d.ts +9 -0
- package/package.json +65 -65
- package/dist/edit-C3imnLUq.mjs +0 -600
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { defineComponent as te, ref as k, computed as se, watch as
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
import { s as pe, _ as re } from "./skuTable-8oPw0DhV.mjs";
|
|
6
|
-
const de = { key: 0 }, ce = {
|
|
1
|
+
import { defineComponent as te, ref as k, computed as se, watch as I, resolveComponent as i, openBlock as m, createElementBlock as V, Fragment as b, unref as O, createVNode as o, withCtx as a, createCommentVNode as C, renderList as y, createElementVNode as h, toDisplayString as H, createTextVNode as w, createBlock as D } from "vue";
|
|
2
|
+
import { C as L, D as ue, S as J, a as ne } from "./index-AZ4TxL-_.mjs";
|
|
3
|
+
import { s as de, _ as re } from "./skuTable-Cg06m_5i.mjs";
|
|
4
|
+
const pe = { key: 0 }, ce = {
|
|
7
5
|
key: 1,
|
|
8
6
|
class: "w-full"
|
|
9
7
|
}, ie = { class: "goods-title" }, me = ["onClick"], fe = { class: "goods-content" }, ve = { class: "goods-tag" }, ge = /* @__PURE__ */ te({
|
|
@@ -18,11 +16,15 @@ const de = { key: 0 }, ce = {
|
|
|
18
16
|
type: Object,
|
|
19
17
|
default: () => {
|
|
20
18
|
}
|
|
19
|
+
},
|
|
20
|
+
isDisabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
25
|
emits: ["getGoodsSku", "getFormData"],
|
|
24
|
-
setup(
|
|
25
|
-
var
|
|
26
|
+
setup($, { emit: K }) {
|
|
27
|
+
var T, q, R;
|
|
26
28
|
const r = k({
|
|
27
29
|
picUrl: "",
|
|
28
30
|
salePrice: 0,
|
|
@@ -32,67 +34,67 @@ const de = { key: 0 }, ce = {
|
|
|
32
34
|
volume: 0,
|
|
33
35
|
stock: 0,
|
|
34
36
|
skuCode: ""
|
|
35
|
-
}), t = k([]),
|
|
37
|
+
}), t = k([]), P = k(), _ = k([]), S = k([]), E = k([]), v = $, U = K, F = se(() => t.value.filter(
|
|
36
38
|
(e) => e.name && e.specValueList != null && e.specValueList.length
|
|
37
39
|
));
|
|
38
|
-
|
|
40
|
+
I(
|
|
39
41
|
v.form,
|
|
40
42
|
(e) => e,
|
|
41
43
|
{
|
|
42
44
|
deep: !0,
|
|
43
45
|
immediate: !0
|
|
44
46
|
}
|
|
45
|
-
),
|
|
47
|
+
), I(
|
|
46
48
|
r,
|
|
47
49
|
(e) => {
|
|
48
|
-
|
|
50
|
+
U("getGoodsSku", e);
|
|
49
51
|
},
|
|
50
52
|
{
|
|
51
53
|
deep: !0,
|
|
52
54
|
immediate: !0
|
|
53
55
|
}
|
|
54
|
-
),
|
|
55
|
-
|
|
56
|
+
), I(
|
|
57
|
+
F,
|
|
56
58
|
(e) => e,
|
|
57
59
|
{
|
|
58
60
|
deep: !0,
|
|
59
61
|
immediate: !0
|
|
60
62
|
}
|
|
61
|
-
), v.form.spuId && (v.form.specType === L.specType.UNIFIED_SPEC ? r.value = (
|
|
63
|
+
), v.form.spuId && (v.form.specType === L.specType.UNIFIED_SPEC ? r.value = (T = v.form.skuList) == null ? void 0 : T.results[0] : (E.value = (q = v.form.skuList) == null ? void 0 : q.results, (R = v.form.skuList) == null || R.results.forEach((e) => {
|
|
62
64
|
var l;
|
|
63
65
|
(l = e.specValues) == null || l.map((s) => {
|
|
64
66
|
ue.specInfoDict.useValues().then((n) => {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
+
const d = n.find((f) => s.specId === f.key);
|
|
68
|
+
if (d) {
|
|
67
69
|
let f = {
|
|
68
70
|
id: s.specId,
|
|
69
|
-
name:
|
|
71
|
+
name: d.value,
|
|
70
72
|
specValueList: []
|
|
71
73
|
};
|
|
72
74
|
t.value.push(f);
|
|
73
75
|
}
|
|
74
|
-
const
|
|
76
|
+
const p = /* @__PURE__ */ new Map();
|
|
75
77
|
t.value = t.value.filter(
|
|
76
|
-
(f) => !
|
|
78
|
+
(f) => !p.has(f.id) && p.set(f.id, f)
|
|
77
79
|
), Q(s.specValueId);
|
|
78
80
|
});
|
|
79
81
|
});
|
|
80
82
|
})));
|
|
81
83
|
function Q(e) {
|
|
82
84
|
t.value.forEach((l) => {
|
|
83
|
-
|
|
85
|
+
_.value = new J({ specId: l.id }), _.value.useValues().then((s) => {
|
|
84
86
|
s.forEach((n) => {
|
|
85
87
|
if (n.key === e) {
|
|
86
|
-
let
|
|
88
|
+
let p = {
|
|
87
89
|
id: e,
|
|
88
90
|
name: n.value
|
|
89
91
|
};
|
|
90
|
-
l.specValueList.push(
|
|
92
|
+
l.specValueList.push(p);
|
|
91
93
|
}
|
|
92
|
-
const
|
|
94
|
+
const d = /* @__PURE__ */ new Map();
|
|
93
95
|
l.specValueList = l.specValueList.filter(
|
|
94
|
-
(
|
|
95
|
-
)
|
|
96
|
+
(p) => !d.has(p.id) && d.set(p.id, p)
|
|
97
|
+
);
|
|
96
98
|
});
|
|
97
99
|
});
|
|
98
100
|
});
|
|
@@ -104,26 +106,26 @@ const de = { key: 0 }, ce = {
|
|
|
104
106
|
t.value[e].specValueList.splice(l, 1);
|
|
105
107
|
}
|
|
106
108
|
function Y() {
|
|
107
|
-
|
|
109
|
+
S.value = new ne({ shopId: v.form.shopId }), S.value.useValues().then((e) => {
|
|
108
110
|
e.forEach((l) => {
|
|
109
|
-
Array.isArray(t.value) && t.value.length > 0 &&
|
|
111
|
+
Array.isArray(t.value) && t.value.length > 0 && t.value.forEach((s) => {
|
|
110
112
|
l.key === s.id && (l.disabled = !0);
|
|
111
|
-
})
|
|
113
|
+
});
|
|
112
114
|
});
|
|
113
115
|
});
|
|
114
116
|
}
|
|
115
117
|
function Z(e) {
|
|
116
|
-
let l =
|
|
118
|
+
let l = S.value.values.filter((n) => n.key === e), s = {
|
|
117
119
|
id: l[0].key,
|
|
118
120
|
name: l[0].value,
|
|
119
121
|
specValueList: []
|
|
120
122
|
};
|
|
121
|
-
t.value.push(s),
|
|
123
|
+
t.value.push(s), P.value = "";
|
|
122
124
|
}
|
|
123
125
|
function z(e) {
|
|
124
|
-
|
|
126
|
+
_.value = new J({
|
|
125
127
|
specId: t.value[e].id
|
|
126
|
-
}),
|
|
128
|
+
}), _.value.useValues().then((l) => {
|
|
127
129
|
l.map((s) => {
|
|
128
130
|
Array.isArray(t.value[e].specValueList) && t.value[e].specValueList.length > 0 && t.value[e].specValueList.forEach((n) => {
|
|
129
131
|
s.key === n.id && (s.disabled = !0);
|
|
@@ -132,23 +134,23 @@ const de = { key: 0 }, ce = {
|
|
|
132
134
|
});
|
|
133
135
|
}
|
|
134
136
|
function x(e, l) {
|
|
135
|
-
var
|
|
136
|
-
let s =
|
|
137
|
+
var d, p;
|
|
138
|
+
let s = _.value.values.filter((f) => f.key === e), n = {
|
|
137
139
|
id: s[0].key,
|
|
138
140
|
name: s[0].value
|
|
139
141
|
};
|
|
140
|
-
(
|
|
142
|
+
(p = (d = t.value[l]) == null ? void 0 : d.specValueList) == null || p.push(n), t.value[l].specValueId = "";
|
|
141
143
|
}
|
|
142
144
|
function ee(e) {
|
|
143
|
-
|
|
145
|
+
U("getFormData", e);
|
|
144
146
|
}
|
|
145
147
|
return (e, l) => {
|
|
146
|
-
const s = i("el-input-number"), n = i("el-form-item"),
|
|
147
|
-
return m(),
|
|
148
|
-
v.specType ==
|
|
149
|
-
o(
|
|
148
|
+
const s = i("el-input-number"), n = i("el-form-item"), d = i("el-col"), p = i("el-row"), f = i("Delete"), le = i("el-icon"), oe = i("el-tag"), B = i("el-button"), N = i("el-option"), j = i("el-select"), A = i("el-popover"), G = i("el-tab-pane"), M = i("el-tabs");
|
|
149
|
+
return m(), V(b, null, [
|
|
150
|
+
v.specType == O(L).specType.UNIFIED_SPEC ? (m(), V("div", pe, [
|
|
151
|
+
o(p, null, {
|
|
150
152
|
default: a(() => [
|
|
151
|
-
o(
|
|
153
|
+
o(d, { span: 8 }, {
|
|
152
154
|
default: a(() => [
|
|
153
155
|
o(n, {
|
|
154
156
|
label: e.$t("goodsSpu.salePrice"),
|
|
@@ -170,7 +172,7 @@ const de = { key: 0 }, ce = {
|
|
|
170
172
|
]),
|
|
171
173
|
_: 1
|
|
172
174
|
}),
|
|
173
|
-
o(
|
|
175
|
+
o(d, { span: 8 }, {
|
|
174
176
|
default: a(() => [
|
|
175
177
|
o(n, {
|
|
176
178
|
label: e.$t("goodsSpu.marketPrice"),
|
|
@@ -192,7 +194,7 @@ const de = { key: 0 }, ce = {
|
|
|
192
194
|
]),
|
|
193
195
|
_: 1
|
|
194
196
|
}),
|
|
195
|
-
o(
|
|
197
|
+
o(d, { span: 8 }, {
|
|
196
198
|
default: a(() => [
|
|
197
199
|
o(n, {
|
|
198
200
|
label: e.$t("goodsSpu.costPrice"),
|
|
@@ -214,7 +216,7 @@ const de = { key: 0 }, ce = {
|
|
|
214
216
|
]),
|
|
215
217
|
_: 1
|
|
216
218
|
}),
|
|
217
|
-
o(
|
|
219
|
+
o(d, { span: 8 }, {
|
|
218
220
|
default: a(() => [
|
|
219
221
|
o(n, {
|
|
220
222
|
label: e.$t("goodsSpu.stock"),
|
|
@@ -235,7 +237,7 @@ const de = { key: 0 }, ce = {
|
|
|
235
237
|
]),
|
|
236
238
|
_: 1
|
|
237
239
|
}),
|
|
238
|
-
o(
|
|
240
|
+
o(d, { span: 8 }, {
|
|
239
241
|
default: a(() => [
|
|
240
242
|
o(n, {
|
|
241
243
|
label: e.$t("goodsSpu.weight"),
|
|
@@ -255,7 +257,7 @@ const de = { key: 0 }, ce = {
|
|
|
255
257
|
]),
|
|
256
258
|
_: 1
|
|
257
259
|
}),
|
|
258
|
-
o(
|
|
260
|
+
o(d, { span: 8 }, {
|
|
259
261
|
default: a(() => [
|
|
260
262
|
o(n, {
|
|
261
263
|
label: e.$t("goodsSpu.volume"),
|
|
@@ -278,19 +280,19 @@ const de = { key: 0 }, ce = {
|
|
|
278
280
|
]),
|
|
279
281
|
_: 1
|
|
280
282
|
})
|
|
281
|
-
])) :
|
|
282
|
-
v.specType ==
|
|
283
|
-
o(
|
|
283
|
+
])) : C("", !0),
|
|
284
|
+
v.specType == O(L).specType.MULTI_SPEC ? (m(), V("div", ce, [
|
|
285
|
+
o(M, { type: "border-card" }, {
|
|
284
286
|
default: a(() => [
|
|
285
|
-
o(
|
|
287
|
+
o(G, { label: "商品规格" }, {
|
|
286
288
|
default: a(() => [
|
|
287
|
-
(m(!0),
|
|
289
|
+
(m(!0), V(b, null, y(t.value, (u, g) => (m(), V("div", {
|
|
288
290
|
class: "goods-spec",
|
|
289
291
|
key: g
|
|
290
292
|
}, [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
293
|
+
h("div", ie, [
|
|
294
|
+
h("span", null, H(u.name), 1),
|
|
295
|
+
h("span", {
|
|
294
296
|
class: "goods-delete",
|
|
295
297
|
onClick: (c) => W(g)
|
|
296
298
|
}, [
|
|
@@ -300,20 +302,20 @@ const de = { key: 0 }, ce = {
|
|
|
300
302
|
]),
|
|
301
303
|
_: 1
|
|
302
304
|
}),
|
|
303
|
-
l[7] || (l[7] = w("移除"))
|
|
305
|
+
l[7] || (l[7] = w("移除 "))
|
|
304
306
|
], 8, me)
|
|
305
307
|
]),
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
(m(!0),
|
|
308
|
+
h("div", fe, [
|
|
309
|
+
h("div", ve, [
|
|
310
|
+
(m(!0), V(b, null, y(t.value[g].specValueList, (c, ae) => (m(), D(oe, {
|
|
309
311
|
key: c,
|
|
310
312
|
closable: "",
|
|
311
313
|
type: "info",
|
|
312
314
|
class: "right-dis",
|
|
313
|
-
onClose: (
|
|
315
|
+
onClose: (Ve) => X(g, ae)
|
|
314
316
|
}, {
|
|
315
317
|
default: a(() => [
|
|
316
|
-
w(
|
|
318
|
+
w(H(c.name), 1)
|
|
317
319
|
]),
|
|
318
320
|
_: 2
|
|
319
321
|
}, 1032, ["onClose"]))), 128))
|
|
@@ -325,7 +327,7 @@ const de = { key: 0 }, ce = {
|
|
|
325
327
|
onShow: (c) => z(g)
|
|
326
328
|
}, {
|
|
327
329
|
reference: a(() => [
|
|
328
|
-
o(
|
|
330
|
+
o(B, { class: "m-2" }, {
|
|
329
331
|
default: a(() => l[8] || (l[8] = [
|
|
330
332
|
w("添加规格值")
|
|
331
333
|
])),
|
|
@@ -340,7 +342,7 @@ const de = { key: 0 }, ce = {
|
|
|
340
342
|
onChange: (c) => x(c, g)
|
|
341
343
|
}, {
|
|
342
344
|
default: a(() => [
|
|
343
|
-
(m(!0),
|
|
345
|
+
(m(!0), V(b, null, y(_.value.values, (c) => (m(), D(N, {
|
|
344
346
|
key: c.key,
|
|
345
347
|
label: c.value,
|
|
346
348
|
value: c.key,
|
|
@@ -361,22 +363,25 @@ const de = { key: 0 }, ce = {
|
|
|
361
363
|
onShow: Y
|
|
362
364
|
}, {
|
|
363
365
|
reference: a(() => [
|
|
364
|
-
o(
|
|
366
|
+
o(B, {
|
|
367
|
+
class: "m-2",
|
|
368
|
+
disabled: $.isDisabled
|
|
369
|
+
}, {
|
|
365
370
|
default: a(() => l[9] || (l[9] = [
|
|
366
371
|
w("添加规格")
|
|
367
372
|
])),
|
|
368
373
|
_: 1
|
|
369
|
-
})
|
|
374
|
+
}, 8, ["disabled"])
|
|
370
375
|
]),
|
|
371
376
|
default: a(() => [
|
|
372
377
|
o(j, {
|
|
373
|
-
modelValue:
|
|
374
|
-
"onUpdate:modelValue": l[6] || (l[6] = (u) =>
|
|
378
|
+
modelValue: P.value,
|
|
379
|
+
"onUpdate:modelValue": l[6] || (l[6] = (u) => P.value = u),
|
|
375
380
|
placeholder: e.$t("goodsSpu.specRequired"),
|
|
376
381
|
onChange: Z
|
|
377
382
|
}, {
|
|
378
383
|
default: a(() => [
|
|
379
|
-
(m(!0),
|
|
384
|
+
(m(!0), V(b, null, y(S.value.values, (u) => (m(), D(N, {
|
|
380
385
|
key: u.key,
|
|
381
386
|
label: u.value,
|
|
382
387
|
value: u.key,
|
|
@@ -394,27 +399,27 @@ const de = { key: 0 }, ce = {
|
|
|
394
399
|
]),
|
|
395
400
|
_: 1
|
|
396
401
|
}),
|
|
397
|
-
o(
|
|
402
|
+
o(M, { type: "border-card" }, {
|
|
398
403
|
default: a(() => [
|
|
399
|
-
o(
|
|
404
|
+
o(G, { label: "规格售价与库存" }, {
|
|
400
405
|
default: a(() => [
|
|
401
|
-
t.value.length > 0 ? (m(),
|
|
406
|
+
t.value.length > 0 ? (m(), D(de, {
|
|
402
407
|
key: 0,
|
|
403
|
-
specData:
|
|
404
|
-
goodsSku:
|
|
408
|
+
specData: F.value,
|
|
409
|
+
goodsSku: E.value,
|
|
405
410
|
onGetFormData: ee
|
|
406
|
-
}, null, 8, ["specData", "goodsSku"])) :
|
|
411
|
+
}, null, 8, ["specData", "goodsSku"])) : C("", !0)
|
|
407
412
|
]),
|
|
408
413
|
_: 1
|
|
409
414
|
})
|
|
410
415
|
]),
|
|
411
416
|
_: 1
|
|
412
417
|
})
|
|
413
|
-
])) :
|
|
418
|
+
])) : C("", !0)
|
|
414
419
|
], 64);
|
|
415
420
|
};
|
|
416
421
|
}
|
|
417
|
-
}),
|
|
422
|
+
}), he = /* @__PURE__ */ re(ge, [["__scopeId", "data-v-8e0ed544"]]);
|
|
418
423
|
export {
|
|
419
|
-
|
|
424
|
+
he as default
|
|
420
425
|
};
|