xyvcard-goods 0.0.6 → 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,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, openBlock as w, createElementBlock as P, createElementVNode as m, ref as y, toRefs as O, watchEffect as q, computed as N, resolveComponent as V, createBlock as z, withCtx as d, createVNode as n, unref as T, watch as E, Fragment as D, createTextVNode as x, createCommentVNode as H, renderList as G, toDisplayString as L } from "vue";
|
|
2
2
|
import { ElMessage as K } from "element-plus";
|
|
3
|
-
import { fileApi as
|
|
4
|
-
import { D as R } from "./index-
|
|
5
|
-
const J = (s,
|
|
3
|
+
import { fileApi as C } from "jmash-core";
|
|
4
|
+
import { D as R } from "./index-AZ4TxL-_.mjs";
|
|
5
|
+
const J = (s, f) => {
|
|
6
6
|
const a = s.__vccOpts || s;
|
|
7
|
-
for (const [i, k] of
|
|
7
|
+
for (const [i, k] of f)
|
|
8
8
|
a[i] = k;
|
|
9
9
|
return a;
|
|
10
10
|
};
|
|
11
11
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
12
|
-
var Q = /* @__PURE__ */
|
|
12
|
+
var Q = /* @__PURE__ */ $({
|
|
13
13
|
name: "Plus",
|
|
14
14
|
__name: "plus",
|
|
15
15
|
setup(s) {
|
|
16
|
-
return (
|
|
16
|
+
return (f, a) => (w(), P("svg", {
|
|
17
17
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
18
|
viewBox: "0 0 1024 1024"
|
|
19
19
|
}, [
|
|
20
|
-
|
|
20
|
+
m("path", {
|
|
21
21
|
fill: "currentColor",
|
|
22
22
|
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
23
23
|
})
|
|
24
24
|
]));
|
|
25
25
|
}
|
|
26
26
|
}), W = Q;
|
|
27
|
-
const X = ["src"], Y = /* @__PURE__ */
|
|
27
|
+
const X = ["src"], Y = /* @__PURE__ */ $({
|
|
28
28
|
__name: "index",
|
|
29
29
|
props: {
|
|
30
30
|
pictureUrl: {
|
|
@@ -33,23 +33,23 @@ const X = ["src"], Y = /* @__PURE__ */ E({
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
emits: ["imageSrc"],
|
|
36
|
-
setup(s, { emit:
|
|
37
|
-
const a =
|
|
38
|
-
|
|
39
|
-
const U =
|
|
36
|
+
setup(s, { emit: f }) {
|
|
37
|
+
const a = y(C.uploadUrl()), i = y(C.authHeader()), k = s, { pictureUrl: b } = O(k), g = y("");
|
|
38
|
+
g.value = b.value;
|
|
39
|
+
const U = f;
|
|
40
40
|
function S(l) {
|
|
41
41
|
l.fileSrc && (K({
|
|
42
42
|
message: "上传成功",
|
|
43
43
|
type: "success"
|
|
44
|
-
}),
|
|
44
|
+
}), g.value = l.fileSrc, U("imageSrc", l.fileSrc));
|
|
45
45
|
}
|
|
46
46
|
q(() => {
|
|
47
|
-
|
|
47
|
+
g.value = k.pictureUrl;
|
|
48
48
|
});
|
|
49
|
-
const _ =
|
|
49
|
+
const _ = N(() => C.imageUrl(g.value));
|
|
50
50
|
return (l, o) => {
|
|
51
|
-
const
|
|
52
|
-
return w(),
|
|
51
|
+
const u = V("el-icon"), c = V("el-upload");
|
|
52
|
+
return w(), z(c, {
|
|
53
53
|
class: "avatar-uploader",
|
|
54
54
|
action: a.value,
|
|
55
55
|
headers: i.value,
|
|
@@ -57,17 +57,17 @@ const X = ["src"], Y = /* @__PURE__ */ E({
|
|
|
57
57
|
"on-success": S
|
|
58
58
|
}, {
|
|
59
59
|
default: d(() => [
|
|
60
|
-
|
|
60
|
+
g.value ? (w(), P("img", {
|
|
61
61
|
key: 0,
|
|
62
62
|
src: _.value,
|
|
63
63
|
class: "avatar",
|
|
64
64
|
alt: ""
|
|
65
|
-
}, null, 8, X)) : (w(),
|
|
65
|
+
}, null, 8, X)) : (w(), z(u, {
|
|
66
66
|
key: 1,
|
|
67
67
|
class: "avatar-uploader-icon"
|
|
68
68
|
}, {
|
|
69
69
|
default: d(() => [
|
|
70
|
-
n(
|
|
70
|
+
n(T(W))
|
|
71
71
|
]),
|
|
72
72
|
_: 1
|
|
73
73
|
}))
|
|
@@ -77,55 +77,54 @@ const X = ["src"], Y = /* @__PURE__ */ E({
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
function Z(s,
|
|
81
|
-
|
|
82
|
-
let { optionValue: i = "id", optionText: k = "name" } = a || {}, b = [], v = 0, U = {};
|
|
80
|
+
function Z(s, f = [], a) {
|
|
81
|
+
let { optionValue: i = "id", optionText: k = "name" } = a || {}, b = [], g = 0, U = {};
|
|
83
82
|
const S = ee(s);
|
|
84
|
-
if (
|
|
83
|
+
if (s.length === 0) return b;
|
|
85
84
|
s.forEach((_) => {
|
|
86
85
|
const { specValueList: l } = _;
|
|
87
86
|
if (!l || l.length === 0) return !0;
|
|
88
|
-
|
|
89
|
-
}),
|
|
87
|
+
g = (g || 1) * l.length;
|
|
88
|
+
}), f.forEach((_) => {
|
|
90
89
|
let { specs: l, ...o } = _;
|
|
91
|
-
U[l.map((
|
|
90
|
+
U[l.map((u) => `${u.specId}_${u.specValueId}`).join("|")] = o;
|
|
92
91
|
});
|
|
93
|
-
for (let _ = 0; _ <
|
|
92
|
+
for (let _ = 0; _ < g; _++) {
|
|
94
93
|
let l = [], o = [];
|
|
95
|
-
s.forEach((
|
|
96
|
-
const { specValueList: e } =
|
|
94
|
+
s.forEach((c, r) => {
|
|
95
|
+
const { specValueList: e } = c;
|
|
97
96
|
let h = {};
|
|
98
97
|
if (!e || e.length === 0) return !0;
|
|
99
98
|
if (e.length > 1) {
|
|
100
|
-
let
|
|
101
|
-
h = s[r].specValueList[
|
|
99
|
+
let v = Math.floor(_ / S[r]) % e.length;
|
|
100
|
+
h = s[r].specValueList[v];
|
|
102
101
|
} else
|
|
103
102
|
h = s[r].specValueList[0];
|
|
104
|
-
|
|
105
|
-
specId:
|
|
106
|
-
specName:
|
|
103
|
+
!c[i] || !h[i] || (o.push(`${c[i]}_${h[i]}`), l.push({
|
|
104
|
+
specId: c[i],
|
|
105
|
+
specName: c[k],
|
|
107
106
|
specValueId: h[i],
|
|
108
107
|
specValueName: h[k]
|
|
109
108
|
}));
|
|
110
109
|
});
|
|
111
|
-
let { ...
|
|
112
|
-
b.push({ ...
|
|
110
|
+
let { ...u } = U[o.join("|")] || {};
|
|
111
|
+
b.push({ ...u, specs: l });
|
|
113
112
|
}
|
|
114
113
|
return b;
|
|
115
114
|
}
|
|
116
115
|
function ee(s) {
|
|
117
|
-
let
|
|
116
|
+
let f = [];
|
|
118
117
|
for (let a = s.length - 1; a >= 0; a--)
|
|
119
|
-
s[a + 1] && s[a + 1].specValueList ?
|
|
120
|
-
return
|
|
118
|
+
s[a + 1] && s[a + 1].specValueList ? f[a] = s[a + 1].specValueList.length * f[a + 1] || 1 : f[a] = 1;
|
|
119
|
+
return f;
|
|
121
120
|
}
|
|
122
|
-
function
|
|
121
|
+
function A(s) {
|
|
123
122
|
return Array.from(new Set(s));
|
|
124
123
|
}
|
|
125
|
-
function le(s,
|
|
126
|
-
return s =
|
|
124
|
+
function le(s, f) {
|
|
125
|
+
return s = A(s), f = A(f), s.concat(f).filter((a) => !(s.includes(a) && f.includes(a)));
|
|
127
126
|
}
|
|
128
|
-
const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" }, se = { class: "right-dis" }, ne = { class: "right-dis" },
|
|
127
|
+
const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" }, se = { class: "right-dis" }, ne = { class: "right-dis" }, ue = { class: "right-dis" }, ce = { class: "right-dis" }, re = { class: "right-dis" }, ie = { key: 0 }, de = { key: 1 }, pe = /* @__PURE__ */ $({
|
|
129
128
|
__name: "skuTable",
|
|
130
129
|
props: {
|
|
131
130
|
specData: {
|
|
@@ -147,42 +146,41 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
147
146
|
}
|
|
148
147
|
},
|
|
149
148
|
emits: ["getGoodsSku", "getFormData"],
|
|
150
|
-
setup(s, { emit:
|
|
151
|
-
const a =
|
|
149
|
+
setup(s, { emit: f }) {
|
|
150
|
+
const a = y({
|
|
152
151
|
salePrice: 0,
|
|
153
152
|
marketPrice: 0,
|
|
154
153
|
costPrice: 0,
|
|
155
154
|
weight: 0,
|
|
156
155
|
volume: 0,
|
|
157
156
|
stock: 0
|
|
158
|
-
}), i =
|
|
159
|
-
let l = Z(b.specData, [], {}).map((
|
|
160
|
-
specValues:
|
|
161
|
-
specIds:
|
|
162
|
-
(
|
|
157
|
+
}), i = y([]), k = f, b = s, g = N(() => {
|
|
158
|
+
let l = Z(b.specData, [], {}).map((u) => ({
|
|
159
|
+
specValues: u.specs,
|
|
160
|
+
specIds: u.specs.reduce(
|
|
161
|
+
(c, r, e) => `${c}${r.specId}-${r.specValueId}${e === u.specs.length - 1 ? "" : "_"}`,
|
|
163
162
|
""
|
|
164
163
|
)
|
|
165
|
-
})), o = b.goodsSku.map((
|
|
166
|
-
...
|
|
167
|
-
specIds:
|
|
168
|
-
(
|
|
164
|
+
})), o = b.goodsSku.map((u) => ({
|
|
165
|
+
...u,
|
|
166
|
+
specIds: u.specValues.reduce(
|
|
167
|
+
(c, r, e) => `${c}${r.specId}-${r.specValueId}${e === u.specValues.length - 1 ? "" : "_"}`,
|
|
169
168
|
""
|
|
170
169
|
)
|
|
171
170
|
}));
|
|
172
|
-
return l.forEach(function(
|
|
173
|
-
o.forEach(function(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}), h && (c.picUrl = u.picUrl ? u.picUrl : "", c.skuCode = u.skuCode ? u.skuCode : void 0, c.salePrice = u.salePrice, c.marketPrice = u.marketPrice, c.costPrice = u.costPrice, c.stock = u.stock, c.weight = u.weight, c.volume = u.volume, c.status = u.status);
|
|
171
|
+
return l.forEach(function(u) {
|
|
172
|
+
o.forEach(function(c) {
|
|
173
|
+
let r = u.specIds.split("_"), e = c.specIds.split("_"), h = !0;
|
|
174
|
+
r.forEach(function(v) {
|
|
175
|
+
e.find((I) => I == v) || (h = !1);
|
|
176
|
+
}), h && (u.picUrl = c.picUrl ? c.picUrl : "", u.skuCode = c.skuCode ? c.skuCode : void 0, u.skuId = c.skuId ? c.skuId : void 0, u.salePrice = c.salePrice, u.marketPrice = c.marketPrice, u.costPrice = c.costPrice, u.stock = c.stock, u.weight = c.weight, u.volume = c.volume, u.status = c.status);
|
|
179
177
|
});
|
|
180
178
|
}), l;
|
|
181
179
|
});
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
E(
|
|
181
|
+
g,
|
|
184
182
|
(l, o) => {
|
|
185
|
-
var
|
|
183
|
+
var c, r;
|
|
186
184
|
if (!l || !l.length) return i.value = [];
|
|
187
185
|
if (!o || !o.length)
|
|
188
186
|
return i.value = l.map((e) => ({
|
|
@@ -197,7 +195,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
197
195
|
volume: e.volume ? e.volume : void 0,
|
|
198
196
|
status: e.status ? e.status : !0
|
|
199
197
|
}));
|
|
200
|
-
if (((
|
|
198
|
+
if (((c = l[0].specValues) == null ? void 0 : c.length) !== ((r = o[0].specValues) == null ? void 0 : r.length))
|
|
201
199
|
return i.value = l.map((e) => ({
|
|
202
200
|
...e,
|
|
203
201
|
picUrl: "",
|
|
@@ -215,14 +213,14 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
215
213
|
...i.value[h],
|
|
216
214
|
...e
|
|
217
215
|
}));
|
|
218
|
-
const
|
|
216
|
+
const u = U(l, o);
|
|
219
217
|
if (l.length > o.length) {
|
|
220
218
|
let e = [];
|
|
221
219
|
l.forEach((h) => {
|
|
222
|
-
const
|
|
223
|
-
(
|
|
220
|
+
const v = i.value.find(
|
|
221
|
+
(I) => I.specIds === h.specIds
|
|
224
222
|
);
|
|
225
|
-
|
|
223
|
+
v ? e.push(v) : e.push({
|
|
226
224
|
...h,
|
|
227
225
|
picUrl: "",
|
|
228
226
|
skuCode: void 0,
|
|
@@ -237,17 +235,17 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
237
235
|
}), i.value = e;
|
|
238
236
|
} else
|
|
239
237
|
i.value = i.value.filter(
|
|
240
|
-
(e) => !
|
|
238
|
+
(e) => !u.includes(e.specIds)
|
|
241
239
|
);
|
|
242
240
|
},
|
|
243
241
|
{
|
|
244
242
|
deep: !0,
|
|
245
243
|
immediate: !0
|
|
246
244
|
}
|
|
247
|
-
),
|
|
245
|
+
), E(
|
|
248
246
|
i,
|
|
249
247
|
(l) => {
|
|
250
|
-
|
|
248
|
+
k("getFormData", l);
|
|
251
249
|
},
|
|
252
250
|
{
|
|
253
251
|
deep: !0,
|
|
@@ -255,7 +253,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
255
253
|
}
|
|
256
254
|
);
|
|
257
255
|
function U(l, o) {
|
|
258
|
-
return l = l.map((
|
|
256
|
+
return l = l.map((u) => u.specIds), o = o.map((u) => u.specIds), le(l, o);
|
|
259
257
|
}
|
|
260
258
|
function S() {
|
|
261
259
|
i.value.forEach((l) => {
|
|
@@ -266,19 +264,19 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
266
264
|
o.picUrl = l;
|
|
267
265
|
}
|
|
268
266
|
return (l, o) => {
|
|
269
|
-
const
|
|
270
|
-
return w(), P(
|
|
267
|
+
const u = V("Setting"), c = V("el-icon"), r = V("el-input-number"), e = V("el-tooltip"), h = V("el-button"), v = V("el-table-column"), I = Y, j = V("el-input"), B = V("el-switch"), M = V("el-table");
|
|
268
|
+
return w(), P(D, null, [
|
|
271
269
|
s.isSettingShow ? (w(), P("div", te, [
|
|
272
|
-
|
|
273
|
-
n(
|
|
270
|
+
m("div", oe, [
|
|
271
|
+
n(c, null, {
|
|
274
272
|
default: d(() => [
|
|
275
|
-
n(
|
|
273
|
+
n(u)
|
|
276
274
|
]),
|
|
277
275
|
_: 1
|
|
278
276
|
}),
|
|
279
|
-
o[6] || (o[6] =
|
|
277
|
+
o[6] || (o[6] = x(" 批量设置 "))
|
|
280
278
|
]),
|
|
281
|
-
|
|
279
|
+
m("span", ae, [
|
|
282
280
|
n(e, {
|
|
283
281
|
class: "box-item",
|
|
284
282
|
effect: "dark",
|
|
@@ -298,7 +296,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
298
296
|
_: 1
|
|
299
297
|
})
|
|
300
298
|
]),
|
|
301
|
-
|
|
299
|
+
m("span", se, [
|
|
302
300
|
n(e, {
|
|
303
301
|
class: "box-item",
|
|
304
302
|
effect: "dark",
|
|
@@ -318,7 +316,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
318
316
|
_: 1
|
|
319
317
|
})
|
|
320
318
|
]),
|
|
321
|
-
|
|
319
|
+
m("span", ne, [
|
|
322
320
|
n(e, {
|
|
323
321
|
class: "box-item",
|
|
324
322
|
effect: "dark",
|
|
@@ -338,7 +336,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
338
336
|
_: 1
|
|
339
337
|
})
|
|
340
338
|
]),
|
|
341
|
-
|
|
339
|
+
m("span", ue, [
|
|
342
340
|
n(e, {
|
|
343
341
|
class: "box-item",
|
|
344
342
|
effect: "dark",
|
|
@@ -358,7 +356,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
358
356
|
_: 1
|
|
359
357
|
})
|
|
360
358
|
]),
|
|
361
|
-
|
|
359
|
+
m("span", ce, [
|
|
362
360
|
n(e, {
|
|
363
361
|
class: "box-item",
|
|
364
362
|
effect: "dark",
|
|
@@ -378,7 +376,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
378
376
|
_: 1
|
|
379
377
|
})
|
|
380
378
|
]),
|
|
381
|
-
|
|
379
|
+
m("span", re, [
|
|
382
380
|
n(e, {
|
|
383
381
|
class: "box-item",
|
|
384
382
|
effect: "dark",
|
|
@@ -404,50 +402,50 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
404
402
|
onClick: S
|
|
405
403
|
}, {
|
|
406
404
|
default: d(() => o[7] || (o[7] = [
|
|
407
|
-
|
|
405
|
+
x("设置")
|
|
408
406
|
])),
|
|
409
407
|
_: 1
|
|
410
408
|
})
|
|
411
409
|
])) : H("", !0),
|
|
412
|
-
n(
|
|
410
|
+
n(M, {
|
|
413
411
|
data: i.value,
|
|
414
412
|
class: "w-full top-dis"
|
|
415
413
|
}, {
|
|
416
414
|
default: d(() => [
|
|
417
|
-
n(
|
|
418
|
-
(w(!0), P(
|
|
415
|
+
n(v, { type: "index" }),
|
|
416
|
+
(w(!0), P(D, null, G(s.specData, (t, p) => (w(), z(v, {
|
|
419
417
|
key: t.id,
|
|
420
418
|
prop: t.id,
|
|
421
419
|
label: t.name
|
|
422
420
|
}, {
|
|
423
|
-
default: d((
|
|
424
|
-
|
|
421
|
+
default: d((F) => [
|
|
422
|
+
x(L(F.row.specValues[p].specValueName), 1)
|
|
425
423
|
]),
|
|
426
424
|
_: 2
|
|
427
425
|
}, 1032, ["prop", "label"]))), 128)),
|
|
428
|
-
n(
|
|
426
|
+
n(v, {
|
|
429
427
|
prop: "picUrl",
|
|
430
428
|
label: "图片"
|
|
431
429
|
}, {
|
|
432
430
|
default: d((t) => [
|
|
433
|
-
n(
|
|
431
|
+
n(I, {
|
|
434
432
|
"picture-url": t.row.picUrl,
|
|
435
433
|
onImageSrc: (p) => _(p, t.row)
|
|
436
434
|
}, null, 8, ["picture-url", "onImageSrc"])
|
|
437
435
|
]),
|
|
438
436
|
_: 1
|
|
439
437
|
}),
|
|
440
|
-
n(
|
|
438
|
+
n(v, {
|
|
441
439
|
prop: "salePrice",
|
|
442
440
|
label: "销售价(元)",
|
|
443
441
|
width: "150"
|
|
444
442
|
}, {
|
|
445
443
|
header: d(() => o[8] || (o[8] = [
|
|
446
|
-
|
|
447
|
-
|
|
444
|
+
m("span", { class: "required_red" }, "*", -1),
|
|
445
|
+
m("span", null, "销售价(元)", -1)
|
|
448
446
|
])),
|
|
449
447
|
default: d((t) => [
|
|
450
|
-
|
|
448
|
+
m("span", null, [
|
|
451
449
|
n(r, {
|
|
452
450
|
modelValue: t.row.salePrice,
|
|
453
451
|
"onUpdate:modelValue": (p) => t.row.salePrice = p,
|
|
@@ -461,12 +459,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
461
459
|
]),
|
|
462
460
|
_: 1
|
|
463
461
|
}),
|
|
464
|
-
n(
|
|
462
|
+
n(v, {
|
|
465
463
|
prop: "marketPrice",
|
|
466
464
|
label: "市场价(元)"
|
|
467
465
|
}, {
|
|
468
466
|
default: d((t) => [
|
|
469
|
-
|
|
467
|
+
m("span", null, [
|
|
470
468
|
n(r, {
|
|
471
469
|
modelValue: t.row.marketPrice,
|
|
472
470
|
"onUpdate:modelValue": (p) => t.row.marketPrice = p,
|
|
@@ -480,12 +478,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
480
478
|
]),
|
|
481
479
|
_: 1
|
|
482
480
|
}),
|
|
483
|
-
n(
|
|
481
|
+
n(v, {
|
|
484
482
|
prop: "costPrice",
|
|
485
483
|
label: "成本价(元)"
|
|
486
484
|
}, {
|
|
487
485
|
default: d((t) => [
|
|
488
|
-
|
|
486
|
+
m("span", null, [
|
|
489
487
|
n(r, {
|
|
490
488
|
modelValue: t.row.costPrice,
|
|
491
489
|
"onUpdate:modelValue": (p) => t.row.costPrice = p,
|
|
@@ -499,12 +497,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
499
497
|
]),
|
|
500
498
|
_: 1
|
|
501
499
|
}),
|
|
502
|
-
n(
|
|
500
|
+
n(v, {
|
|
503
501
|
prop: "weight",
|
|
504
502
|
label: "重量(kg)"
|
|
505
503
|
}, {
|
|
506
504
|
default: d((t) => [
|
|
507
|
-
|
|
505
|
+
m("span", null, [
|
|
508
506
|
n(r, {
|
|
509
507
|
modelValue: t.row.weight,
|
|
510
508
|
"onUpdate:modelValue": (p) => t.row.weight = p,
|
|
@@ -518,12 +516,12 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
518
516
|
]),
|
|
519
517
|
_: 1
|
|
520
518
|
}),
|
|
521
|
-
n(
|
|
519
|
+
n(v, {
|
|
522
520
|
prop: "volume",
|
|
523
521
|
label: "体积(m³)"
|
|
524
522
|
}, {
|
|
525
523
|
default: d((t) => [
|
|
526
|
-
|
|
524
|
+
m("span", null, [
|
|
527
525
|
n(r, {
|
|
528
526
|
modelValue: t.row.volume,
|
|
529
527
|
"onUpdate:modelValue": (p) => t.row.volume = p,
|
|
@@ -537,16 +535,16 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
537
535
|
]),
|
|
538
536
|
_: 1
|
|
539
537
|
}),
|
|
540
|
-
n(
|
|
538
|
+
n(v, {
|
|
541
539
|
prop: "stock",
|
|
542
540
|
label: "库存"
|
|
543
541
|
}, {
|
|
544
542
|
header: d(() => o[9] || (o[9] = [
|
|
545
|
-
|
|
546
|
-
|
|
543
|
+
m("span", { class: "required_red" }, "*", -1),
|
|
544
|
+
m("span", null, "库存", -1)
|
|
547
545
|
])),
|
|
548
546
|
default: d((t) => [
|
|
549
|
-
|
|
547
|
+
m("span", null, [
|
|
550
548
|
n(r, {
|
|
551
549
|
modelValue: t.row.stock,
|
|
552
550
|
"onUpdate:modelValue": (p) => t.row.stock = p,
|
|
@@ -560,13 +558,13 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
560
558
|
]),
|
|
561
559
|
_: 1
|
|
562
560
|
}),
|
|
563
|
-
n(
|
|
561
|
+
n(v, {
|
|
564
562
|
prop: "skuCode",
|
|
565
563
|
label: "sku编码"
|
|
566
564
|
}, {
|
|
567
565
|
default: d((t) => [
|
|
568
|
-
|
|
569
|
-
n(
|
|
566
|
+
m("span", null, [
|
|
567
|
+
n(j, {
|
|
570
568
|
modelValue: t.row.skuCode,
|
|
571
569
|
"onUpdate:modelValue": (p) => t.row.skuCode = p,
|
|
572
570
|
size: "small",
|
|
@@ -576,22 +574,19 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
576
574
|
]),
|
|
577
575
|
_: 1
|
|
578
576
|
}),
|
|
579
|
-
n(
|
|
577
|
+
n(v, {
|
|
580
578
|
prop: "status",
|
|
581
579
|
label: "是否上架",
|
|
582
580
|
width: "80"
|
|
583
581
|
}, {
|
|
584
|
-
default: d((t) =>
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
])) : (w(), P("span", de, A(j(R).shelfDict.getValue((p = t.row.status) == null ? void 0 : p.toString())), 1))
|
|
593
|
-
];
|
|
594
|
-
}),
|
|
582
|
+
default: d((t) => [
|
|
583
|
+
s.isSettingShow ? (w(), P("span", ie, [
|
|
584
|
+
n(B, {
|
|
585
|
+
modelValue: t.row.status,
|
|
586
|
+
"onUpdate:modelValue": (p) => t.row.status = p
|
|
587
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
588
|
+
])) : (w(), P("span", de, L(T(R).shelfDict.getValue(t.row.status)), 1))
|
|
589
|
+
]),
|
|
595
590
|
_: 1
|
|
596
591
|
})
|
|
597
592
|
]),
|
|
@@ -600,7 +595,7 @@ const te = { key: 0 }, oe = { class: "title-set" }, ae = { class: "right-dis" },
|
|
|
600
595
|
], 64);
|
|
601
596
|
};
|
|
602
597
|
}
|
|
603
|
-
}), me = /* @__PURE__ */ J(pe, [["__scopeId", "data-v-
|
|
598
|
+
}), me = /* @__PURE__ */ J(pe, [["__scopeId", "data-v-78f1f000"]]), _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
604
599
|
__proto__: null,
|
|
605
600
|
default: me
|
|
606
601
|
}, Symbol.toStringTag, { value: "Module" }));
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}.avatar-uploader .avatar{width:80px;height:80px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);cursor:pointer;position:relative;overflow:hidden;transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.avatar-uploader .el-icon.avatar-uploader-icon{font-size:26px;color:#8c939d;width:80px;height:80px;text-align:center}.title-set[data-v-
|
|
1
|
+
.w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}.avatar-uploader .avatar{width:80px;height:80px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);cursor:pointer;position:relative;overflow:hidden;transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.avatar-uploader .el-icon.avatar-uploader-icon{font-size:26px;color:#8c939d;width:80px;height:80px;text-align:center}.title-set[data-v-78f1f000]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-8e0ed544]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-8e0ed544]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-8e0ed544]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-8e0ed544]{padding:10px 20px}.goods-tag[data-v-8e0ed544]{margin-bottom:10px}[data-v-e7a4c473] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-e7a4c473] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}
|
package/dts/api/dict.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { BizDict, type Entry, BizLayDict, type LayEntry } from "jmash-core";
|
|
2
|
+
export interface EntryBool {
|
|
3
|
+
key: boolean;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
2
6
|
export declare class CustomBizDict {
|
|
3
|
-
values: import("vue").Reactive<
|
|
7
|
+
values: import("vue").Reactive<EntryBool[]>;
|
|
4
8
|
query: any;
|
|
5
9
|
constructor(results: any, query: any);
|
|
6
|
-
getValue(key:
|
|
10
|
+
getValue(key: boolean): string;
|
|
7
11
|
}
|
|
8
12
|
export declare class ShopInfoBizDict extends BizDict {
|
|
9
13
|
useValues(): Promise<Entry[]>;
|
|
@@ -22,7 +22,7 @@ export interface GoodsSpuModel extends EntityModel {
|
|
|
22
22
|
picUrls?: string;
|
|
23
23
|
sellPoint?: string;
|
|
24
24
|
description?: string;
|
|
25
|
-
shelf?:
|
|
25
|
+
shelf?: boolean;
|
|
26
26
|
saleNum?: number;
|
|
27
27
|
specType?: string;
|
|
28
28
|
skuList?: GoodsSkuList;
|
|
@@ -58,11 +58,11 @@ export interface GoodsSpuCreateReq extends EntityCreateReq {
|
|
|
58
58
|
sellPoint?: string;
|
|
59
59
|
ensureIds?: Array<string>;
|
|
60
60
|
description?: string;
|
|
61
|
-
shelf?:
|
|
61
|
+
shelf?: boolean;
|
|
62
62
|
saleNum?: number;
|
|
63
63
|
specType?: string;
|
|
64
64
|
specId?: Array<string>;
|
|
65
|
-
skuSpecValues: Array<
|
|
65
|
+
skuSpecValues: Array<GoodsSkuModel>;
|
|
66
66
|
}
|
|
67
67
|
export interface GoodsSpuUpdateReq extends EntityUpdateReq {
|
|
68
68
|
spuId?: string;
|
|
@@ -75,12 +75,12 @@ export interface GoodsSpuUpdateReq extends EntityUpdateReq {
|
|
|
75
75
|
picUrls?: string;
|
|
76
76
|
sellPoint?: string;
|
|
77
77
|
description?: string;
|
|
78
|
-
shelf?:
|
|
78
|
+
shelf?: boolean;
|
|
79
79
|
saleNum?: number;
|
|
80
80
|
specType?: string;
|
|
81
81
|
ensureIds?: Array<string>;
|
|
82
82
|
specId?: Array<string>;
|
|
83
|
-
skuSpecValues: Array<
|
|
83
|
+
skuSpecValues: Array<GoodsSkuModel>;
|
|
84
84
|
}
|
|
85
85
|
export type GoodsSpuFormReq = GoodsSpuCreateReq | GoodsSpuUpdateReq;
|
|
86
86
|
export interface GoodsSpuEnableKey {
|
|
@@ -98,6 +98,7 @@ export interface GoodsSkuCreateReq {
|
|
|
98
98
|
stock?: number;
|
|
99
99
|
specValues?: Array<SkuSpecValue>;
|
|
100
100
|
skuCode?: string;
|
|
101
|
+
skuId?: string;
|
|
101
102
|
status?: boolean;
|
|
102
103
|
specIds?: string;
|
|
103
104
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { PropType } from "vue";
|
|
2
2
|
import type { Entry } from "jmash-core";
|
|
3
|
+
import type { EntryBool } from "@/api/dict";
|
|
3
4
|
declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
5
|
modelValue: PropType<string | boolean>;
|
|
5
6
|
data: {
|
|
6
|
-
type: PropType<Entry[]>;
|
|
7
|
+
type: PropType<EntryBool[] | Entry[]>;
|
|
7
8
|
default: () => void;
|
|
8
9
|
};
|
|
9
10
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
10
11
|
modelValue: PropType<string | boolean>;
|
|
11
12
|
data: {
|
|
12
|
-
type: PropType<Entry[]>;
|
|
13
|
+
type: PropType<EntryBool[] | Entry[]>;
|
|
13
14
|
default: () => void;
|
|
14
15
|
};
|
|
15
16
|
}>> & Readonly<{}>, {
|
|
16
|
-
data: Entry[];
|
|
17
|
+
data: EntryBool[] | Entry[];
|
|
17
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
19
|
export default _default;
|