xyvcard-goods 0.0.8 → 0.0.10
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-BecI6njE.mjs → approveFailIndex-B-VGnf1U.mjs} +1 -1
- package/dist/{approveFailIndex.vue_vue_type_script_setup_true_lang-1FXHUoMJ.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-CiIyafoQ.mjs} +116 -110
- package/dist/{auditIndex-ByyMgebr.mjs → auditIndex-tEq8uYdA.mjs} +1 -1
- package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-DT2irP9g.mjs → auditIndex.vue_vue_type_script_setup_true_lang-BW22LRCL.mjs} +128 -122
- package/dist/edit-FCXD46Ef.mjs +556 -0
- package/dist/{index-BypI3ZNk.mjs → index-C9LeLF51.mjs} +174 -165
- package/dist/{index-AZ4TxL-_.mjs → index-CKeHa-Cx.mjs} +55 -55
- package/dist/index.mjs +9 -38
- package/dist/{info-BJ1Ld_6D.mjs → info-CScBSLKA.mjs} +27 -27
- package/dist/{saleIndex-CBtuv6um.mjs → saleIndex-B7TBQOB6.mjs} +1 -1
- package/dist/{saleIndex.vue_vue_type_script_setup_true_lang-Cxv3foxp.mjs → saleIndex.vue_vue_type_script_setup_true_lang-B6wKXUcV.mjs} +133 -146
- package/dist/{shelfIndex-CykEAeD4.mjs → shelfIndex-BfsIMQfD.mjs} +1 -1
- package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-UPt1ZDpP.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-C6RfhqIl.mjs} +122 -116
- package/dist/{skuForm-DdiMztDh.mjs → skuForm-CRnWdE9n.mjs} +57 -51
- package/dist/skuTable-Ck7bJzYP.mjs +536 -0
- package/dist/style.css +1 -1
- package/dts/api/goods-spu/types.d.ts +1 -1
- package/dts/components/ImageUpload.vue.d.ts +36 -0
- package/dts/constant.d.ts +4 -4
- package/dts/router/index.d.ts +2 -2
- package/package.json +65 -65
- package/dist/edit-BWUxDk9Y.mjs +0 -594
- package/dist/skuTable-Cg06m_5i.mjs +0 -606
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as te, ref as
|
|
2
|
-
import { C as
|
|
3
|
-
import { s as de, _ as re } from "./skuTable-
|
|
1
|
+
import { defineComponent as te, ref as b, computed as se, watch as D, resolveComponent as i, openBlock as m, createElementBlock as _, 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-CKeHa-Cx.mjs";
|
|
3
|
+
import { s as de, _ as re } from "./skuTable-Ck7bJzYP.mjs";
|
|
4
4
|
const pe = { key: 0 }, ce = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "w-full"
|
|
@@ -23,9 +23,9 @@ const pe = { key: 0 }, ce = {
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
emits: ["getGoodsSku", "getFormData"],
|
|
26
|
-
setup(
|
|
26
|
+
setup(L, { emit: J }) {
|
|
27
27
|
var T, q, R;
|
|
28
|
-
const r =
|
|
28
|
+
const r = b({
|
|
29
29
|
picUrl: "",
|
|
30
30
|
salePrice: 0,
|
|
31
31
|
marketPrice: 0,
|
|
@@ -34,17 +34,17 @@ const pe = { key: 0 }, ce = {
|
|
|
34
34
|
volume: 0,
|
|
35
35
|
stock: 0,
|
|
36
36
|
skuCode: ""
|
|
37
|
-
}), t =
|
|
37
|
+
}), t = b([]), C = b(), V = b([]), h = b([]), $ = b([]), v = L, U = J, F = se(() => t.value.filter(
|
|
38
38
|
(e) => e.name && e.specValueList != null && e.specValueList.length
|
|
39
39
|
));
|
|
40
|
-
|
|
40
|
+
D(
|
|
41
41
|
v.form,
|
|
42
42
|
(e) => e,
|
|
43
43
|
{
|
|
44
44
|
deep: !0,
|
|
45
45
|
immediate: !0
|
|
46
46
|
}
|
|
47
|
-
),
|
|
47
|
+
), D(
|
|
48
48
|
r,
|
|
49
49
|
(e) => {
|
|
50
50
|
U("getGoodsSku", e);
|
|
@@ -53,14 +53,14 @@ const pe = { key: 0 }, ce = {
|
|
|
53
53
|
deep: !0,
|
|
54
54
|
immediate: !0
|
|
55
55
|
}
|
|
56
|
-
),
|
|
56
|
+
), D(
|
|
57
57
|
F,
|
|
58
58
|
(e) => e,
|
|
59
59
|
{
|
|
60
60
|
deep: !0,
|
|
61
61
|
immediate: !0
|
|
62
62
|
}
|
|
63
|
-
), v.form.spuId && (v.form.specType ===
|
|
63
|
+
), v.form.spuId && (v.form.specType === E.SPEC_TYPE.UNIFIED_SPEC ? r.value = (T = v.form.skuList) == null ? void 0 : T.results[0] : ($.value = (q = v.form.skuList) == null ? void 0 : q.results, (R = v.form.skuList) == null || R.results.forEach((e) => {
|
|
64
64
|
var l;
|
|
65
65
|
(l = e.specValues) == null || l.map((s) => {
|
|
66
66
|
ue.specInfoDict.useValues().then((n) => {
|
|
@@ -76,13 +76,13 @@ const pe = { key: 0 }, ce = {
|
|
|
76
76
|
const p = /* @__PURE__ */ new Map();
|
|
77
77
|
t.value = t.value.filter(
|
|
78
78
|
(f) => !p.has(f.id) && p.set(f.id, f)
|
|
79
|
-
),
|
|
79
|
+
), K(s.specValueId);
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
82
|
})));
|
|
83
|
-
function
|
|
83
|
+
function K(e) {
|
|
84
84
|
t.value.forEach((l) => {
|
|
85
|
-
|
|
85
|
+
V.value = new H({ specId: l.id }), V.value.useValues().then((s) => {
|
|
86
86
|
s.forEach((n) => {
|
|
87
87
|
if (n.key === e) {
|
|
88
88
|
let p = {
|
|
@@ -99,14 +99,14 @@ const pe = { key: 0 }, ce = {
|
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Q(e) {
|
|
103
103
|
t.value.splice(e, 1);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function W(e, l) {
|
|
106
106
|
t.value[e].specValueList.splice(l, 1);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
|
|
108
|
+
function X() {
|
|
109
|
+
h.value = new ne({ shopId: v.form.shopId }), h.value.useValues().then((e) => {
|
|
110
110
|
e.forEach((l) => {
|
|
111
111
|
Array.isArray(t.value) && t.value.length > 0 && t.value.forEach((s) => {
|
|
112
112
|
l.key === s.id && (l.disabled = !0);
|
|
@@ -115,17 +115,17 @@ const pe = { key: 0 }, ce = {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
function Z(e) {
|
|
118
|
-
let l =
|
|
118
|
+
let l = h.value.values.filter((n) => n.key === e), s = {
|
|
119
119
|
id: l[0].key,
|
|
120
120
|
name: l[0].value,
|
|
121
121
|
specValueList: []
|
|
122
122
|
};
|
|
123
|
-
t.value.push(s),
|
|
123
|
+
t.value.push(s), C.value = "";
|
|
124
124
|
}
|
|
125
125
|
function z(e) {
|
|
126
|
-
|
|
126
|
+
V.value = new H({
|
|
127
127
|
specId: t.value[e].id
|
|
128
|
-
}),
|
|
128
|
+
}), V.value.useValues().then((l) => {
|
|
129
129
|
l.map((s) => {
|
|
130
130
|
Array.isArray(t.value[e].specValueList) && t.value[e].specValueList.length > 0 && t.value[e].specValueList.forEach((n) => {
|
|
131
131
|
s.key === n.id && (s.disabled = !0);
|
|
@@ -135,7 +135,7 @@ const pe = { key: 0 }, ce = {
|
|
|
135
135
|
}
|
|
136
136
|
function x(e, l) {
|
|
137
137
|
var d, p;
|
|
138
|
-
let s =
|
|
138
|
+
let s = V.value.values.filter((f) => f.key === e), n = {
|
|
139
139
|
id: s[0].key,
|
|
140
140
|
name: s[0].value
|
|
141
141
|
};
|
|
@@ -146,8 +146,8 @@ const pe = { key: 0 }, ce = {
|
|
|
146
146
|
}
|
|
147
147
|
return (e, l) => {
|
|
148
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(),
|
|
150
|
-
v.specType == O(
|
|
149
|
+
return m(), _(k, null, [
|
|
150
|
+
v.specType == O(E).SPEC_TYPE.UNIFIED_SPEC ? (m(), _("div", pe, [
|
|
151
151
|
o(p, null, {
|
|
152
152
|
default: a(() => [
|
|
153
153
|
o(d, { span: 8 }, {
|
|
@@ -162,6 +162,7 @@ const pe = { key: 0 }, ce = {
|
|
|
162
162
|
"onUpdate:modelValue": l[0] || (l[0] = (u) => r.value.salePrice = u),
|
|
163
163
|
precision: 2,
|
|
164
164
|
step: 0,
|
|
165
|
+
min: 0.01,
|
|
165
166
|
placeholder: e.$t("goodsSpu.salePriceRequired"),
|
|
166
167
|
class: "w-full",
|
|
167
168
|
controls: !1
|
|
@@ -184,6 +185,7 @@ const pe = { key: 0 }, ce = {
|
|
|
184
185
|
"onUpdate:modelValue": l[1] || (l[1] = (u) => r.value.marketPrice = u),
|
|
185
186
|
precision: 2,
|
|
186
187
|
step: 0,
|
|
188
|
+
min: 0.01,
|
|
187
189
|
placeholder: e.$t("goodsSpu.marketPriceRequired"),
|
|
188
190
|
class: "w-full",
|
|
189
191
|
controls: !1
|
|
@@ -206,6 +208,7 @@ const pe = { key: 0 }, ce = {
|
|
|
206
208
|
"onUpdate:modelValue": l[2] || (l[2] = (u) => r.value.costPrice = u),
|
|
207
209
|
precision: 2,
|
|
208
210
|
step: 0,
|
|
211
|
+
min: 0.01,
|
|
209
212
|
placeholder: e.$t("goodsSpu.costPriceRequired"),
|
|
210
213
|
class: "w-full",
|
|
211
214
|
controls: !1
|
|
@@ -229,7 +232,8 @@ const pe = { key: 0 }, ce = {
|
|
|
229
232
|
placeholder: e.$t("goodsSpu.stockRequired"),
|
|
230
233
|
class: "w-full",
|
|
231
234
|
controls: !1,
|
|
232
|
-
precision: 0
|
|
235
|
+
precision: 0,
|
|
236
|
+
min: 0
|
|
233
237
|
}, null, 8, ["modelValue", "placeholder"])
|
|
234
238
|
]),
|
|
235
239
|
_: 1
|
|
@@ -249,7 +253,8 @@ const pe = { key: 0 }, ce = {
|
|
|
249
253
|
"onUpdate:modelValue": l[4] || (l[4] = (u) => r.value.weight = u),
|
|
250
254
|
placeholder: e.$t("goodsSpu.weightRequired"),
|
|
251
255
|
class: "w-full",
|
|
252
|
-
controls: !1
|
|
256
|
+
controls: !1,
|
|
257
|
+
min: 0
|
|
253
258
|
}, null, 8, ["modelValue", "placeholder"])
|
|
254
259
|
]),
|
|
255
260
|
_: 1
|
|
@@ -269,7 +274,8 @@ const pe = { key: 0 }, ce = {
|
|
|
269
274
|
"onUpdate:modelValue": l[5] || (l[5] = (u) => r.value.volume = u),
|
|
270
275
|
controls: !1,
|
|
271
276
|
placeholder: e.$t("goodsSpu.volumeRequired"),
|
|
272
|
-
class: "w-full"
|
|
277
|
+
class: "w-full",
|
|
278
|
+
min: 0
|
|
273
279
|
}, null, 8, ["modelValue", "placeholder"])
|
|
274
280
|
]),
|
|
275
281
|
_: 1
|
|
@@ -280,21 +286,21 @@ const pe = { key: 0 }, ce = {
|
|
|
280
286
|
]),
|
|
281
287
|
_: 1
|
|
282
288
|
})
|
|
283
|
-
])) :
|
|
284
|
-
v.specType == O(
|
|
289
|
+
])) : I("", !0),
|
|
290
|
+
v.specType == O(E).SPEC_TYPE.MULTI_SPEC ? (m(), _("div", ce, [
|
|
285
291
|
o(M, { type: "border-card" }, {
|
|
286
292
|
default: a(() => [
|
|
287
293
|
o(G, { label: "商品规格" }, {
|
|
288
294
|
default: a(() => [
|
|
289
|
-
(m(!0),
|
|
295
|
+
(m(!0), _(k, null, y(t.value, (u, g) => (m(), _("div", {
|
|
290
296
|
class: "goods-spec",
|
|
291
297
|
key: g
|
|
292
298
|
}, [
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
299
|
+
S("div", ie, [
|
|
300
|
+
S("span", null, Y(u.name), 1),
|
|
301
|
+
S("span", {
|
|
296
302
|
class: "goods-delete",
|
|
297
|
-
onClick: (c) =>
|
|
303
|
+
onClick: (c) => Q(g)
|
|
298
304
|
}, [
|
|
299
305
|
o(le, null, {
|
|
300
306
|
default: a(() => [
|
|
@@ -305,17 +311,17 @@ const pe = { key: 0 }, ce = {
|
|
|
305
311
|
l[7] || (l[7] = w("移除 "))
|
|
306
312
|
], 8, me)
|
|
307
313
|
]),
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
(m(!0),
|
|
314
|
+
S("div", fe, [
|
|
315
|
+
S("div", ve, [
|
|
316
|
+
(m(!0), _(k, null, y(t.value[g].specValueList, (c, ae) => (m(), P(oe, {
|
|
311
317
|
key: c,
|
|
312
318
|
closable: "",
|
|
313
319
|
type: "info",
|
|
314
320
|
class: "right-dis",
|
|
315
|
-
onClose: (
|
|
321
|
+
onClose: (_e) => W(g, ae)
|
|
316
322
|
}, {
|
|
317
323
|
default: a(() => [
|
|
318
|
-
w(
|
|
324
|
+
w(Y(c.name), 1)
|
|
319
325
|
]),
|
|
320
326
|
_: 2
|
|
321
327
|
}, 1032, ["onClose"]))), 128))
|
|
@@ -342,7 +348,7 @@ const pe = { key: 0 }, ce = {
|
|
|
342
348
|
onChange: (c) => x(c, g)
|
|
343
349
|
}, {
|
|
344
350
|
default: a(() => [
|
|
345
|
-
(m(!0),
|
|
351
|
+
(m(!0), _(k, null, y(V.value.values, (c) => (m(), P(N, {
|
|
346
352
|
key: c.key,
|
|
347
353
|
label: c.value,
|
|
348
354
|
value: c.key,
|
|
@@ -360,12 +366,12 @@ const pe = { key: 0 }, ce = {
|
|
|
360
366
|
placement: "bottom",
|
|
361
367
|
width: 200,
|
|
362
368
|
trigger: "click",
|
|
363
|
-
onShow:
|
|
369
|
+
onShow: X
|
|
364
370
|
}, {
|
|
365
371
|
reference: a(() => [
|
|
366
372
|
o(B, {
|
|
367
373
|
class: "m-2",
|
|
368
|
-
disabled:
|
|
374
|
+
disabled: L.isDisabled
|
|
369
375
|
}, {
|
|
370
376
|
default: a(() => l[9] || (l[9] = [
|
|
371
377
|
w("添加规格")
|
|
@@ -375,13 +381,13 @@ const pe = { key: 0 }, ce = {
|
|
|
375
381
|
]),
|
|
376
382
|
default: a(() => [
|
|
377
383
|
o(j, {
|
|
378
|
-
modelValue:
|
|
379
|
-
"onUpdate:modelValue": l[6] || (l[6] = (u) =>
|
|
384
|
+
modelValue: C.value,
|
|
385
|
+
"onUpdate:modelValue": l[6] || (l[6] = (u) => C.value = u),
|
|
380
386
|
placeholder: e.$t("goodsSpu.specRequired"),
|
|
381
387
|
onChange: Z
|
|
382
388
|
}, {
|
|
383
389
|
default: a(() => [
|
|
384
|
-
(m(!0),
|
|
390
|
+
(m(!0), _(k, null, y(h.value.values, (u) => (m(), P(N, {
|
|
385
391
|
key: u.key,
|
|
386
392
|
label: u.value,
|
|
387
393
|
value: u.key,
|
|
@@ -403,23 +409,23 @@ const pe = { key: 0 }, ce = {
|
|
|
403
409
|
default: a(() => [
|
|
404
410
|
o(G, { label: "规格售价与库存" }, {
|
|
405
411
|
default: a(() => [
|
|
406
|
-
t.value.length > 0 ? (m(),
|
|
412
|
+
t.value.length > 0 ? (m(), P(de, {
|
|
407
413
|
key: 0,
|
|
408
414
|
specData: F.value,
|
|
409
|
-
goodsSku:
|
|
415
|
+
goodsSku: $.value,
|
|
410
416
|
onGetFormData: ee
|
|
411
|
-
}, null, 8, ["specData", "goodsSku"])) :
|
|
417
|
+
}, null, 8, ["specData", "goodsSku"])) : I("", !0)
|
|
412
418
|
]),
|
|
413
419
|
_: 1
|
|
414
420
|
})
|
|
415
421
|
]),
|
|
416
422
|
_: 1
|
|
417
423
|
})
|
|
418
|
-
])) :
|
|
424
|
+
])) : I("", !0)
|
|
419
425
|
], 64);
|
|
420
426
|
};
|
|
421
427
|
}
|
|
422
|
-
}),
|
|
428
|
+
}), Se = /* @__PURE__ */ re(ge, [["__scopeId", "data-v-d3b23fe5"]]);
|
|
423
429
|
export {
|
|
424
|
-
|
|
430
|
+
Se as default
|
|
425
431
|
};
|