xyvcard-goods 0.0.29 → 0.0.30
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-Br1EAlBd.mjs → edit-BY1AVieE.mjs} +131 -128
- package/dist/{edit-BzOoP1MM.mjs → edit-BYxk3lFr.mjs} +3 -3
- package/dist/{edit-C0U9Ge6U.mjs → edit-CRc6GqY4.mjs} +1 -1
- package/dist/{edit-BDHYnZTL.mjs → edit-D9JqZTHN.mjs} +1 -1
- package/dist/{edit-1TXe_HC2.mjs → edit-ehVvbusK.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-BmH1D2Ce.mjs → edit.vue_vue_type_script_setup_true_lang-d769FSho.mjs} +2 -2
- package/dist/{index-BreCG7fL.mjs → index-BLO5ssji.mjs} +2 -2
- package/dist/{index-RBIPJ3PM.mjs → index-BaX061kc.mjs} +3 -3
- package/dist/{index-DwDXNfWH.mjs → index-CNVwLggO.mjs} +2 -2
- package/dist/{index-ClnNQkIp.mjs → index-DloS7z9I.mjs} +1 -1
- package/dist/{index-GWE4OrXj.mjs → index-Dpms2ryP.mjs} +2 -2
- package/dist/{index-D3Q39K5l.mjs → index-DvCC73mO.mjs} +3 -3
- package/dist/{index-DYo45BS3.mjs → index-R43ND-Ey.mjs} +3 -3
- package/dist/{index-rRbEKDlL.mjs → index-Vu01FEMS.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{info-DjDT9TId.mjs → info-CJxN7XOi.mjs} +2 -2
- package/dist/{info-Dji-jSuw.mjs → info-CzhzwS5C.mjs} +3 -3
- package/dist/{skuForm-9X82lvcF.mjs → skuForm-K3S131WX.mjs} +86 -83
- package/dist/{skuForm-BzxL1_v6.mjs → skuForm-X1aeeUCX.mjs} +2 -2
- package/dist/{skuTable-RIQUU_Bl.mjs → skuTable-7VaeJKGp.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dts/api/goods-spu/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { ElMessage as
|
|
1
|
+
import { _ as x } from "./ImageUpload-Dk6GY6PA.mjs";
|
|
2
|
+
import { defineComponent as z, ref as P, reactive as R, resolveComponent as p, openBlock as h, createElementBlock as I, createElementVNode as f, createVNode as e, unref as r, withCtx as s, Fragment as M, renderList as O, createBlock as k, createTextVNode as v, toDisplayString as H, createCommentVNode as j } from "vue";
|
|
3
|
+
import { ElMessage as U } from "element-plus";
|
|
4
4
|
import { useRouter as Y, useRoute as J } from "vue-router";
|
|
5
|
-
import { routerUtil as
|
|
5
|
+
import { routerUtil as w } from "jmash-core";
|
|
6
6
|
import { useI18n as K } from "vue-i18n";
|
|
7
|
-
import { D as m, C as Q } from "./index-
|
|
8
|
-
import { a as b } from "./index-
|
|
9
|
-
import W from "./skuForm-
|
|
10
|
-
const X = { class: "app-container" }, Z = { class: "search-container" }, ee = { class: "image-card" }, pe = /* @__PURE__ */
|
|
7
|
+
import { D as m, C as Q } from "./index-Vu01FEMS.mjs";
|
|
8
|
+
import { a as b } from "./index-Dpms2ryP.mjs";
|
|
9
|
+
import W from "./skuForm-K3S131WX.mjs";
|
|
10
|
+
const X = { class: "app-container" }, Z = { class: "search-container" }, ee = { class: "image-card" }, pe = /* @__PURE__ */ z({
|
|
11
11
|
__name: "edit",
|
|
12
12
|
setup(le) {
|
|
13
|
-
const { t:
|
|
13
|
+
const { t: i } = K(), y = Y(), g = J(), V = P();
|
|
14
14
|
m.goodsCategoryListBizLayDict.useValues(), m.labelListBizDict.useValues();
|
|
15
|
-
let o =
|
|
15
|
+
let o = R({
|
|
16
16
|
requestId: Math.random() * 10 + "",
|
|
17
17
|
updateMask: "labelIds,minPrice,maxPrice,spuName,categoryIds,spuCode,freightType,freightAmount,picUrls,shelf,saleNum",
|
|
18
18
|
skuSpecValues: [],
|
|
@@ -21,61 +21,61 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
21
21
|
shelf: m.shelfDict.values[0].key,
|
|
22
22
|
goodsType: Q.GOODS_TYPE.GROUP
|
|
23
23
|
});
|
|
24
|
-
const C = (
|
|
24
|
+
const C = (t, l, n) => {
|
|
25
25
|
var d;
|
|
26
26
|
const a = (d = o.picUrls) == null ? void 0 : d.split(",").filter(Boolean);
|
|
27
27
|
if (a != null && a.length) {
|
|
28
28
|
if ((a == null ? void 0 : a.length) < 1)
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
} else return
|
|
32
|
-
}, N =
|
|
29
|
+
return n(new Error(i("goodsSpu.imageListsErrors")));
|
|
30
|
+
n();
|
|
31
|
+
} else return n(new Error(i("goodsSpu.picUrlsRequired")));
|
|
32
|
+
}, N = R({
|
|
33
33
|
spuName: [
|
|
34
34
|
{
|
|
35
35
|
required: !0,
|
|
36
|
-
message:
|
|
36
|
+
message: i("goodsSpu.spuNameRequired"),
|
|
37
37
|
trigger: "blur"
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
40
|
minPrice: [
|
|
41
41
|
{
|
|
42
42
|
required: !0,
|
|
43
|
-
message:
|
|
43
|
+
message: i("goodsSpu.minPriceRequired"),
|
|
44
44
|
trigger: "blur"
|
|
45
45
|
}
|
|
46
46
|
],
|
|
47
47
|
maxPrice: [
|
|
48
48
|
{
|
|
49
49
|
required: !0,
|
|
50
|
-
message:
|
|
50
|
+
message: i("goodsSpu.maxPriceRequired"),
|
|
51
51
|
trigger: "blur"
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
categoryIds: [
|
|
55
55
|
{
|
|
56
56
|
required: !0,
|
|
57
|
-
message:
|
|
57
|
+
message: i("goodsSpu.categoryIdRequired"),
|
|
58
58
|
trigger: "change"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
61
|
spuCode: [
|
|
62
62
|
{
|
|
63
63
|
required: !0,
|
|
64
|
-
message:
|
|
64
|
+
message: i("goodsSpu.spuCodeRequired"),
|
|
65
65
|
trigger: "change"
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
68
|
freightType: [
|
|
69
69
|
{
|
|
70
70
|
required: !0,
|
|
71
|
-
message:
|
|
71
|
+
message: i("goodsSpu.freightTypeRequired"),
|
|
72
72
|
trigger: "change"
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
75
|
freightAmount: [
|
|
76
76
|
{
|
|
77
77
|
required: !0,
|
|
78
|
-
message:
|
|
78
|
+
message: i("goodsSpu.freightAmountRequired"),
|
|
79
79
|
trigger: "blur"
|
|
80
80
|
}
|
|
81
81
|
],
|
|
@@ -88,64 +88,66 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
88
88
|
shelf: [
|
|
89
89
|
{
|
|
90
90
|
required: !0,
|
|
91
|
-
message:
|
|
91
|
+
message: i("goodsSpu.shelfRequired"),
|
|
92
92
|
trigger: "change"
|
|
93
93
|
}
|
|
94
94
|
]
|
|
95
|
-
}), S =
|
|
96
|
-
function T(
|
|
97
|
-
o.groupInfos =
|
|
98
|
-
const l =
|
|
95
|
+
}), S = P(!1);
|
|
96
|
+
function T(t) {
|
|
97
|
+
o.groupInfos = t;
|
|
98
|
+
const l = t.reduce((a, d) => a + (d.saleNum || 0) * (d.salePrice || 0), 0);
|
|
99
99
|
o.minPrice = l;
|
|
100
|
+
const n = t.reduce((a, d) => a + (d.marketPrice || 0), 0);
|
|
101
|
+
o.maxPrice = n, console.log(l, n);
|
|
100
102
|
}
|
|
101
|
-
g.query.spuId && b.findById({ spuId: g.query.spuId }).then(({ data:
|
|
102
|
-
Object.assign(o,
|
|
103
|
+
g.query.spuId && b.findById({ spuId: g.query.spuId }).then(({ data: t }) => {
|
|
104
|
+
Object.assign(o, t), S.value = !0;
|
|
103
105
|
});
|
|
104
106
|
const $ = async () => {
|
|
105
|
-
var
|
|
106
|
-
await ((
|
|
107
|
-
l && (g.query.spuId ? b.updateList(o).then((
|
|
108
|
-
|
|
109
|
-
message:
|
|
107
|
+
var t;
|
|
108
|
+
await ((t = V.value) == null ? void 0 : t.validate((l) => {
|
|
109
|
+
l && (g.query.spuId ? b.updateList(o).then((n) => {
|
|
110
|
+
n.status === 200 && (U({
|
|
111
|
+
message: i("common.submitSuccess"),
|
|
110
112
|
type: "success"
|
|
111
|
-
}),
|
|
112
|
-
}) : b.createList(o).then((
|
|
113
|
-
|
|
114
|
-
message:
|
|
113
|
+
}), w.closeTagView(g.fullPath, y, !1));
|
|
114
|
+
}) : b.createList(o).then((n) => {
|
|
115
|
+
n.status === 200 && (U({
|
|
116
|
+
message: i("common.submitSuccess"),
|
|
115
117
|
type: "success"
|
|
116
|
-
}),
|
|
118
|
+
}), w.closeTagView(g.fullPath, y, !1));
|
|
117
119
|
}));
|
|
118
120
|
}));
|
|
119
121
|
};
|
|
120
|
-
function E(
|
|
121
|
-
|
|
122
|
+
function E(t) {
|
|
123
|
+
t === "FREIGHT_FREE" && (o.freightAmount = 0);
|
|
122
124
|
}
|
|
123
|
-
return (
|
|
124
|
-
const
|
|
125
|
-
return h(),
|
|
125
|
+
return (t, l) => {
|
|
126
|
+
const n = p("el-input"), a = p("el-form-item"), d = p("el-col"), A = p("el-tree-select"), c = p("el-input-number"), q = p("jmash-enum-radio"), D = x, F = p("el-checkbox"), L = p("el-checkbox-group"), _ = p("el-row"), B = p("el-button"), G = p("el-form");
|
|
127
|
+
return h(), I("div", X, [
|
|
126
128
|
f("div", Z, [
|
|
127
129
|
e(G, {
|
|
128
130
|
ref_key: "goodsSpuFormRef",
|
|
129
131
|
ref: V,
|
|
130
|
-
model:
|
|
132
|
+
model: r(o),
|
|
131
133
|
"label-width": "120px",
|
|
132
134
|
rules: N
|
|
133
135
|
}, {
|
|
134
|
-
default:
|
|
136
|
+
default: s(() => [
|
|
135
137
|
l[13] || (l[13] = f("div", { class: "title-content" }, "基本信息", -1)),
|
|
136
138
|
e(_, null, {
|
|
137
|
-
default:
|
|
139
|
+
default: s(() => [
|
|
138
140
|
e(d, { span: 12 }, {
|
|
139
|
-
default:
|
|
141
|
+
default: s(() => [
|
|
140
142
|
e(a, {
|
|
141
|
-
label:
|
|
143
|
+
label: t.$t("goodsSpu.spuName"),
|
|
142
144
|
prop: "spuName"
|
|
143
145
|
}, {
|
|
144
|
-
default:
|
|
145
|
-
e(
|
|
146
|
-
modelValue:
|
|
147
|
-
"onUpdate:modelValue": l[0] || (l[0] = (u) =>
|
|
148
|
-
placeholder:
|
|
146
|
+
default: s(() => [
|
|
147
|
+
e(n, {
|
|
148
|
+
modelValue: r(o).spuName,
|
|
149
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => r(o).spuName = u),
|
|
150
|
+
placeholder: t.$t("goodsSpu.spuNameRequired"),
|
|
149
151
|
maxlength: "60",
|
|
150
152
|
"show-word-limit": "",
|
|
151
153
|
clearable: ""
|
|
@@ -157,16 +159,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
157
159
|
_: 1
|
|
158
160
|
}),
|
|
159
161
|
e(d, { span: 12 }, {
|
|
160
|
-
default:
|
|
162
|
+
default: s(() => [
|
|
161
163
|
e(a, {
|
|
162
|
-
label:
|
|
164
|
+
label: t.$t("goodsSpu.spuCode"),
|
|
163
165
|
prop: "spuCode"
|
|
164
166
|
}, {
|
|
165
|
-
default:
|
|
166
|
-
e(
|
|
167
|
-
modelValue:
|
|
168
|
-
"onUpdate:modelValue": l[1] || (l[1] = (u) =>
|
|
169
|
-
placeholder:
|
|
167
|
+
default: s(() => [
|
|
168
|
+
e(n, {
|
|
169
|
+
modelValue: r(o).spuCode,
|
|
170
|
+
"onUpdate:modelValue": l[1] || (l[1] = (u) => r(o).spuCode = u),
|
|
171
|
+
placeholder: t.$t("goodsSpu.spuCodeRequired"),
|
|
170
172
|
maxlength: "15",
|
|
171
173
|
"show-word-limit": "",
|
|
172
174
|
clearable: ""
|
|
@@ -178,20 +180,20 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
178
180
|
_: 1
|
|
179
181
|
}),
|
|
180
182
|
e(d, { span: 12 }, {
|
|
181
|
-
default:
|
|
183
|
+
default: s(() => [
|
|
182
184
|
e(a, {
|
|
183
|
-
label:
|
|
185
|
+
label: t.$t("goodsSpu.categoryId"),
|
|
184
186
|
prop: "categoryIds"
|
|
185
187
|
}, {
|
|
186
|
-
default:
|
|
188
|
+
default: s(() => [
|
|
187
189
|
e(A, {
|
|
188
|
-
modelValue:
|
|
189
|
-
"onUpdate:modelValue": l[2] || (l[2] = (u) =>
|
|
190
|
-
data:
|
|
190
|
+
modelValue: r(o).categoryIds,
|
|
191
|
+
"onUpdate:modelValue": l[2] || (l[2] = (u) => r(o).categoryIds = u),
|
|
192
|
+
data: r(m).goodsCategoryListBizLayDict.values,
|
|
191
193
|
multiple: "",
|
|
192
194
|
"render-after-expand": !1,
|
|
193
195
|
"show-checkbox": "",
|
|
194
|
-
placeholder:
|
|
196
|
+
placeholder: t.$t("goodsSpu.categoryIdRequired"),
|
|
195
197
|
class: "w-full"
|
|
196
198
|
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
197
199
|
]),
|
|
@@ -201,16 +203,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
201
203
|
_: 1
|
|
202
204
|
}),
|
|
203
205
|
e(d, { span: 12 }, {
|
|
204
|
-
default:
|
|
206
|
+
default: s(() => [
|
|
205
207
|
e(a, {
|
|
206
|
-
label:
|
|
208
|
+
label: t.$t("goodsSpu.saleNum"),
|
|
207
209
|
prop: "saleNum"
|
|
208
210
|
}, {
|
|
209
|
-
default:
|
|
211
|
+
default: s(() => [
|
|
210
212
|
e(c, {
|
|
211
|
-
modelValue:
|
|
212
|
-
"onUpdate:modelValue": l[3] || (l[3] = (u) =>
|
|
213
|
-
placeholder:
|
|
213
|
+
modelValue: r(o).saleNum,
|
|
214
|
+
"onUpdate:modelValue": l[3] || (l[3] = (u) => r(o).saleNum = u),
|
|
215
|
+
placeholder: t.$t("goodsSpu.saleNumRequired"),
|
|
214
216
|
class: "w-full",
|
|
215
217
|
min: 0,
|
|
216
218
|
controls: !1,
|
|
@@ -223,16 +225,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
223
225
|
_: 1
|
|
224
226
|
}),
|
|
225
227
|
e(d, { span: 12 }, {
|
|
226
|
-
default:
|
|
228
|
+
default: s(() => [
|
|
227
229
|
e(a, {
|
|
228
|
-
label:
|
|
230
|
+
label: t.$t("goodsSpu.freightType"),
|
|
229
231
|
prop: "freightType"
|
|
230
232
|
}, {
|
|
231
|
-
default:
|
|
233
|
+
default: s(() => [
|
|
232
234
|
e(q, {
|
|
233
|
-
modelValue:
|
|
234
|
-
"onUpdate:modelValue": l[4] || (l[4] = (u) =>
|
|
235
|
-
data:
|
|
235
|
+
modelValue: r(o).freightType,
|
|
236
|
+
"onUpdate:modelValue": l[4] || (l[4] = (u) => r(o).freightType = u),
|
|
237
|
+
data: r(m).freightTypeEnum.values,
|
|
236
238
|
onChange: E
|
|
237
239
|
}, null, 8, ["modelValue", "data"])
|
|
238
240
|
]),
|
|
@@ -242,21 +244,21 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
242
244
|
_: 1
|
|
243
245
|
}),
|
|
244
246
|
e(d, { span: 12 }, {
|
|
245
|
-
default:
|
|
247
|
+
default: s(() => [
|
|
246
248
|
e(a, {
|
|
247
|
-
label:
|
|
249
|
+
label: t.$t("goodsSpu.freightAmount"),
|
|
248
250
|
prop: "freightAmount"
|
|
249
251
|
}, {
|
|
250
|
-
default:
|
|
252
|
+
default: s(() => [
|
|
251
253
|
e(c, {
|
|
252
|
-
modelValue:
|
|
253
|
-
"onUpdate:modelValue": l[5] || (l[5] = (u) =>
|
|
254
|
-
readonly:
|
|
254
|
+
modelValue: r(o).freightAmount,
|
|
255
|
+
"onUpdate:modelValue": l[5] || (l[5] = (u) => r(o).freightAmount = u),
|
|
256
|
+
readonly: r(o).freightType === "FREIGHT_FREE",
|
|
255
257
|
precision: 2,
|
|
256
258
|
step: 0.1,
|
|
257
259
|
controls: !1,
|
|
258
260
|
min: 0,
|
|
259
|
-
placeholder:
|
|
261
|
+
placeholder: t.$t("goodsSpu.freightAmountRequired"),
|
|
260
262
|
class: "w-full"
|
|
261
263
|
}, null, 8, ["modelValue", "readonly", "placeholder"])
|
|
262
264
|
]),
|
|
@@ -266,20 +268,20 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
266
268
|
_: 1
|
|
267
269
|
}),
|
|
268
270
|
e(d, { span: 12 }, {
|
|
269
|
-
default:
|
|
271
|
+
default: s(() => [
|
|
270
272
|
e(a, {
|
|
271
|
-
label:
|
|
273
|
+
label: t.$t("goodsSpu.minPrice"),
|
|
272
274
|
prop: "minPrice"
|
|
273
275
|
}, {
|
|
274
|
-
default:
|
|
276
|
+
default: s(() => [
|
|
275
277
|
e(c, {
|
|
276
|
-
modelValue:
|
|
277
|
-
"onUpdate:modelValue": l[6] || (l[6] = (u) =>
|
|
278
|
+
modelValue: r(o).minPrice,
|
|
279
|
+
"onUpdate:modelValue": l[6] || (l[6] = (u) => r(o).minPrice = u),
|
|
278
280
|
precision: 2,
|
|
279
281
|
step: 0.1,
|
|
280
282
|
controls: !1,
|
|
281
283
|
min: 0,
|
|
282
|
-
placeholder:
|
|
284
|
+
placeholder: t.$t("goodsSpu.minPriceRequired"),
|
|
283
285
|
class: "w-full",
|
|
284
286
|
disabled: ""
|
|
285
287
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -290,21 +292,22 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
290
292
|
_: 1
|
|
291
293
|
}),
|
|
292
294
|
e(d, { span: 12 }, {
|
|
293
|
-
default:
|
|
295
|
+
default: s(() => [
|
|
294
296
|
e(a, {
|
|
295
|
-
label:
|
|
297
|
+
label: t.$t("goodsSpu.maxPrice"),
|
|
296
298
|
prop: "maxPrice"
|
|
297
299
|
}, {
|
|
298
|
-
default:
|
|
300
|
+
default: s(() => [
|
|
299
301
|
e(c, {
|
|
300
|
-
modelValue:
|
|
301
|
-
"onUpdate:modelValue": l[7] || (l[7] = (u) =>
|
|
302
|
+
modelValue: r(o).maxPrice,
|
|
303
|
+
"onUpdate:modelValue": l[7] || (l[7] = (u) => r(o).maxPrice = u),
|
|
302
304
|
precision: 2,
|
|
303
305
|
step: 0.1,
|
|
304
306
|
controls: !1,
|
|
305
307
|
min: 0,
|
|
306
|
-
placeholder:
|
|
307
|
-
class: "w-full"
|
|
308
|
+
placeholder: t.$t("goodsSpu.maxPriceRequired"),
|
|
309
|
+
class: "w-full",
|
|
310
|
+
disabled: ""
|
|
308
311
|
}, null, 8, ["modelValue", "placeholder"])
|
|
309
312
|
]),
|
|
310
313
|
_: 1
|
|
@@ -313,16 +316,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
313
316
|
_: 1
|
|
314
317
|
}),
|
|
315
318
|
e(d, { span: 24 }, {
|
|
316
|
-
default:
|
|
319
|
+
default: s(() => [
|
|
317
320
|
e(a, {
|
|
318
|
-
label:
|
|
321
|
+
label: t.$t("goodsSpu.picUrls"),
|
|
319
322
|
prop: "picUrls"
|
|
320
323
|
}, {
|
|
321
|
-
default:
|
|
324
|
+
default: s(() => [
|
|
322
325
|
f("div", ee, [
|
|
323
326
|
e(D, {
|
|
324
|
-
modelValue:
|
|
325
|
-
"onUpdate:modelValue": l[8] || (l[8] = (u) =>
|
|
327
|
+
modelValue: r(o).picUrls,
|
|
328
|
+
"onUpdate:modelValue": l[8] || (l[8] = (u) => r(o).picUrls = u),
|
|
326
329
|
limit: 6,
|
|
327
330
|
"list-type": "picture-card"
|
|
328
331
|
}, null, 8, ["modelValue"]),
|
|
@@ -335,16 +338,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
335
338
|
_: 1
|
|
336
339
|
}),
|
|
337
340
|
e(d, { span: 12 }, {
|
|
338
|
-
default:
|
|
341
|
+
default: s(() => [
|
|
339
342
|
e(a, {
|
|
340
|
-
label:
|
|
343
|
+
label: t.$t("goodsSpu.shelf"),
|
|
341
344
|
prop: "shelf"
|
|
342
345
|
}, {
|
|
343
|
-
default:
|
|
346
|
+
default: s(() => [
|
|
344
347
|
e(q, {
|
|
345
|
-
modelValue:
|
|
346
|
-
"onUpdate:modelValue": l[9] || (l[9] = (u) =>
|
|
347
|
-
data:
|
|
348
|
+
modelValue: r(o).shelf,
|
|
349
|
+
"onUpdate:modelValue": l[9] || (l[9] = (u) => r(o).shelf = u),
|
|
350
|
+
data: r(m).shelfDict.values
|
|
348
351
|
}, null, 8, ["modelValue", "data"])
|
|
349
352
|
]),
|
|
350
353
|
_: 1
|
|
@@ -353,24 +356,24 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
353
356
|
_: 1
|
|
354
357
|
}),
|
|
355
358
|
e(d, { span: 12 }, {
|
|
356
|
-
default:
|
|
359
|
+
default: s(() => [
|
|
357
360
|
e(a, {
|
|
358
|
-
label:
|
|
361
|
+
label: t.$t("goodsSpu.labelIds"),
|
|
359
362
|
prop: "labelIds"
|
|
360
363
|
}, {
|
|
361
|
-
default:
|
|
364
|
+
default: s(() => [
|
|
362
365
|
e(L, {
|
|
363
|
-
modelValue:
|
|
364
|
-
"onUpdate:modelValue": l[10] || (l[10] = (u) =>
|
|
366
|
+
modelValue: r(o).labelIds,
|
|
367
|
+
"onUpdate:modelValue": l[10] || (l[10] = (u) => r(o).labelIds = u),
|
|
365
368
|
class: "w-full"
|
|
366
369
|
}, {
|
|
367
|
-
default:
|
|
368
|
-
(h(!0),
|
|
370
|
+
default: s(() => [
|
|
371
|
+
(h(!0), I(M, null, O(r(m).labelListBizDict.values, (u) => (h(), k(F, {
|
|
369
372
|
key: u.key,
|
|
370
373
|
label: u.key
|
|
371
374
|
}, {
|
|
372
|
-
default:
|
|
373
|
-
|
|
375
|
+
default: s(() => [
|
|
376
|
+
v(H(u.value), 1)
|
|
374
377
|
]),
|
|
375
378
|
_: 2
|
|
376
379
|
}, 1032, ["label"]))), 128))
|
|
@@ -388,25 +391,25 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
|
|
|
388
391
|
}),
|
|
389
392
|
l[14] || (l[14] = f("div", { class: "title-content" }, "套装商品", -1)),
|
|
390
393
|
e(_, null, {
|
|
391
|
-
default:
|
|
392
|
-
!
|
|
394
|
+
default: s(() => [
|
|
395
|
+
!r(g).query.spuId || S.value ? (h(), k(W, {
|
|
393
396
|
key: 0,
|
|
394
|
-
form:
|
|
397
|
+
form: r(o),
|
|
395
398
|
onGetGoodsSku: T
|
|
396
|
-
}, null, 8, ["form"])) :
|
|
399
|
+
}, null, 8, ["form"])) : j("", !0)
|
|
397
400
|
]),
|
|
398
401
|
_: 1
|
|
399
402
|
}),
|
|
400
403
|
e(_, null, {
|
|
401
|
-
default:
|
|
404
|
+
default: s(() => [
|
|
402
405
|
e(a, null, {
|
|
403
|
-
default:
|
|
406
|
+
default: s(() => [
|
|
404
407
|
e(B, {
|
|
405
408
|
type: "primary",
|
|
406
409
|
onClick: $
|
|
407
410
|
}, {
|
|
408
|
-
default:
|
|
409
|
-
|
|
411
|
+
default: s(() => l[12] || (l[12] = [
|
|
412
|
+
v("保存")
|
|
410
413
|
])),
|
|
411
414
|
_: 1,
|
|
412
415
|
__: [12]
|
|
@@ -4,11 +4,11 @@ import { ElMessage as $ } from "element-plus";
|
|
|
4
4
|
import { useRouter as Y, useRoute as Z } from "vue-router";
|
|
5
5
|
import { routerUtil as E } from "jmash-core";
|
|
6
6
|
import { useI18n as x } from "vue-i18n";
|
|
7
|
-
import { D as i, C as ee } from "./index-
|
|
8
|
-
import { a as _ } from "./index-
|
|
7
|
+
import { D as i, C as ee } from "./index-Vu01FEMS.mjs";
|
|
8
|
+
import { a as _ } from "./index-Dpms2ryP.mjs";
|
|
9
9
|
import { g as le } from "./index-BHmGYIuc.mjs";
|
|
10
10
|
import { WangEditor as oe } from "xyvcard-cms";
|
|
11
|
-
import te from "./skuForm-
|
|
11
|
+
import te from "./skuForm-X1aeeUCX.mjs";
|
|
12
12
|
const se = { class: "app-container" }, ae = { class: "search-container" }, ue = { class: "image-card" }, he = /* @__PURE__ */ K({
|
|
13
13
|
__name: "edit",
|
|
14
14
|
setup(de) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as j, mergeModels as v, ref as I, reactive as C, useModel as E, resolveComponent as m, openBlock as F, createBlock as K, withCtx as o, createElementVNode as O, createVNode as l, createTextVNode as L, toDisplayString as N, unref as r } from "vue";
|
|
2
2
|
import { ElMessage as w } from "element-plus";
|
|
3
3
|
import { useI18n as S } from "vue-i18n";
|
|
4
|
-
import { b as c } from "./index-
|
|
4
|
+
import { b as c } from "./index-Dpms2ryP.mjs";
|
|
5
5
|
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
6
|
const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
7
7
|
__name: "edit",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as E, mergeModels as V, ref as B, reactive as N, useModel as F, resolveComponent as r, openBlock as K, createBlock as O, withCtx as l, createElementVNode as x, createVNode as o, createTextVNode as w, toDisplayString as U, unref as d } from "vue";
|
|
2
2
|
import { ElMessage as k } from "element-plus";
|
|
3
3
|
import { useI18n as A } from "vue-i18n";
|
|
4
|
-
import { g as p } from "./index-
|
|
4
|
+
import { g as p } from "./index-DloS7z9I.mjs";
|
|
5
5
|
import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
6
|
const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
7
7
|
__name: "edit",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as wn, mergeModels as E, ref as $, reactive as R, useModel as qn, onMounted as pn, resolveComponent as p, openBlock as an, createBlock as kn, withCtx as j, createElementVNode as Cn, createVNode as t, createTextVNode as A, toDisplayString as U, unref as x } from "vue";
|
|
2
2
|
import { ElMessage as L } from "element-plus";
|
|
3
3
|
import { useI18n as Sn } from "vue-i18n";
|
|
4
|
-
import { g as B } from "./index-
|
|
5
|
-
import { D as O } from "./index-
|
|
4
|
+
import { g as B } from "./index-Dpms2ryP.mjs";
|
|
5
|
+
import { D as O } from "./index-Vu01FEMS.mjs";
|
|
6
6
|
const _n = /^[\uD800-\uDBFF]$/, Pn = /^[\uDC00-\uDFFF]$/, Dn = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
7
7
|
var F;
|
|
8
8
|
(function(n) {
|
|
@@ -3,8 +3,8 @@ import { useRoute as ye, useRouter as he } from "vue-router";
|
|
|
3
3
|
import { ElMessage as R } from "element-plus";
|
|
4
4
|
import { useI18n as _e } from "vue-i18n";
|
|
5
5
|
import { useTableHooks as we, fileApi as Q } from "jmash-core";
|
|
6
|
-
import { D as c, C as Se } from "./index-
|
|
7
|
-
import { a as E } from "./index-
|
|
6
|
+
import { D as c, C as Se } from "./index-Vu01FEMS.mjs";
|
|
7
|
+
import { a as E } from "./index-Dpms2ryP.mjs";
|
|
8
8
|
const Ce = { class: "app-container" }, ke = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "app-container"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as x, ref as $, reactive as S, onActivated as ee, resolveComponent as r, resolveDirective as oe, openBlock as d, createElementBlock as w, createElementVNode as U, createVNode as l, withCtx as t, withKeys as te, unref as n, createTextVNode as p, toDisplayString as c, withDirectives as k, createBlock as _, isRef as T, createCommentVNode as D } from "vue";
|
|
2
2
|
import { useI18n as le } from "vue-i18n";
|
|
3
3
|
import { useTableHooks as ae, fileApi as j } from "jmash-core";
|
|
4
|
-
import { D as ne } from "./index-
|
|
5
|
-
import { g as re } from "./index-
|
|
6
|
-
import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { D as ne } from "./index-Vu01FEMS.mjs";
|
|
5
|
+
import { g as re } from "./index-Dpms2ryP.mjs";
|
|
6
|
+
import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-d769FSho.mjs";
|
|
7
7
|
const ie = { class: "app-container" }, de = { class: "search-container" }, ue = { key: 1 }, me = ["onClick"], pe = ["onClick"], Ce = /* @__PURE__ */ x({
|
|
8
8
|
__name: "index",
|
|
9
9
|
setup(ce) {
|
|
@@ -3,8 +3,8 @@ import { useRoute as we, useRouter as Ve } from "vue-router";
|
|
|
3
3
|
import { ElMessage as A } from "element-plus";
|
|
4
4
|
import { useI18n as Ce } from "vue-i18n";
|
|
5
5
|
import { useTableHooks as ke, fileApi as H } from "jmash-core";
|
|
6
|
-
import { D as v, C as f } from "./index-
|
|
7
|
-
import { a as $ } from "./index-
|
|
6
|
+
import { D as v, C as f } from "./index-Vu01FEMS.mjs";
|
|
7
|
+
import { a as $ } from "./index-Dpms2ryP.mjs";
|
|
8
8
|
const Ae = { class: "app-container" }, Pe = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "app-container"
|
|
@@ -108,7 +108,7 @@ function ai(e) {
|
|
|
108
108
|
let r = e.global.getLocaleMessage("en");
|
|
109
109
|
r = ln(r, ri), e.global.setLocaleMessage("zh-cn", t), e.global.setLocaleMessage("en", r);
|
|
110
110
|
}
|
|
111
|
-
const ii = () => import("./edit-
|
|
111
|
+
const ii = () => import("./edit-BYxk3lFr.mjs"), si = () => import("./info-CzhzwS5C.mjs"), oi = () => import("./edit-BY1AVieE.mjs"), li = () => import("./info-CJxN7XOi.mjs"), ui = [
|
|
112
112
|
{
|
|
113
113
|
path: "/rawgoods",
|
|
114
114
|
component: Ja,
|
|
@@ -4422,7 +4422,7 @@ class Ld {
|
|
|
4422
4422
|
});
|
|
4423
4423
|
}
|
|
4424
4424
|
}
|
|
4425
|
-
const Vd = new Ld(), $d = /* @__PURE__ */ Object.assign({ "./views/goods/goods-brand-info/edit.vue": () => import("./edit-
|
|
4425
|
+
const Vd = new Ld(), $d = /* @__PURE__ */ Object.assign({ "./views/goods/goods-brand-info/edit.vue": () => import("./edit-ehVvbusK.mjs"), "./views/goods/goods-brand-info/index.vue": () => import("./index-DvCC73mO.mjs"), "./views/goods/goods-category/edit.vue": () => import("./edit-D9JqZTHN.mjs"), "./views/goods/goods-category/index.vue": () => import("./index-BaX061kc.mjs"), "./views/goods/goods-combination/edit.vue": () => import("./edit-BY1AVieE.mjs"), "./views/goods/goods-combination/index.vue": () => import("./index-BLO5ssji.mjs"), "./views/goods/goods-combination/info.vue": () => import("./info-CJxN7XOi.mjs"), "./views/goods/goods-combination/skuForm.vue": () => import("./skuForm-K3S131WX.mjs"), "./views/goods/goods-label-info/edit.vue": () => import("./edit-CRc6GqY4.mjs"), "./views/goods/goods-label-info/index.vue": () => import("./index-R43ND-Ey.mjs"), "./views/goods/goods-spu/edit.vue": () => import("./edit-BYxk3lFr.mjs"), "./views/goods/goods-spu/index.vue": () => import("./index-CNVwLggO.mjs"), "./views/goods/goods-spu/info.vue": () => import("./info-CzhzwS5C.mjs"), "./views/goods/goods-spu/skuForm.vue": () => import("./skuForm-X1aeeUCX.mjs"), "./views/goods/goods-spu/skuTable.vue": () => import("./skuTable-7VaeJKGp.mjs") }), Bd = {
|
|
4426
4426
|
install(e) {
|
|
4427
4427
|
Xa($d, 7), ai(ti), ei(ui), e.use(du);
|
|
4428
4428
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as x, ref as B, reactive as N, onActivated as ee, resolveComponent as d, resolveDirective as oe, openBlock as u, createElementBlock as V, createElementVNode as I, createVNode as t, withCtx as l, withKeys as te, unref as a, createTextVNode as p, toDisplayString as c, withDirectives as h, createBlock as k, isRef as R, createCommentVNode as S } from "vue";
|
|
2
2
|
import { useTableHooks as le, fileApi as T } from "jmash-core";
|
|
3
3
|
import { useI18n as ne } from "vue-i18n";
|
|
4
|
-
import { g as ae } from "./index-
|
|
5
|
-
import de from "./edit-
|
|
6
|
-
import { D as re } from "./index-
|
|
4
|
+
import { g as ae } from "./index-DloS7z9I.mjs";
|
|
5
|
+
import de from "./edit-ehVvbusK.mjs";
|
|
6
|
+
import { D as re } from "./index-Vu01FEMS.mjs";
|
|
7
7
|
const se = { class: "app-container" }, ie = { class: "search-container" }, ue = ["onClick"], me = ["onClick"], ye = /* @__PURE__ */ x({
|
|
8
8
|
__name: "index",
|
|
9
9
|
setup(pe) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as Y, ref as L, reactive as R, onActivated as Z, resolveComponent as s, resolveDirective as x, openBlock as u, createElementBlock as V, createElementVNode as $, createVNode as l, withCtx as t, withKeys as ee, unref as n, createTextVNode as p, toDisplayString as c, withDirectives as k, createBlock as C, isRef as S, createCommentVNode as D } from "vue";
|
|
2
2
|
import { useTableHooks as oe } from "jmash-core";
|
|
3
3
|
import { useI18n as le } from "vue-i18n";
|
|
4
|
-
import { b as te } from "./index-
|
|
5
|
-
import ae from "./edit-
|
|
6
|
-
import { D as ne } from "./index-
|
|
4
|
+
import { b as te } from "./index-Dpms2ryP.mjs";
|
|
5
|
+
import ae from "./edit-CRc6GqY4.mjs";
|
|
6
|
+
import { D as ne } from "./index-Vu01FEMS.mjs";
|
|
7
7
|
const se = { class: "app-container" }, de = { class: "search-container" }, ie = ["onClick"], re = ["onClick"], ve = /* @__PURE__ */ Y({
|
|
8
8
|
__name: "index",
|
|
9
9
|
setup(ue) {
|
|
@@ -5,8 +5,8 @@ import { BizDict as c, BizLayDict as _, EnumDict as n } from "jmash-core";
|
|
|
5
5
|
import { EntryDict as v } from "jmash-dict";
|
|
6
6
|
import { ref as h, reactive as L } from "vue";
|
|
7
7
|
import { specValueApi as y, infoApi as P, specInfoApi as A } from "xyvcard-shop";
|
|
8
|
-
import { g as O, b as g, a as f } from "./index-
|
|
9
|
-
import { g as m } from "./index-
|
|
8
|
+
import { g as O, b as g, a as f } from "./index-Dpms2ryP.mjs";
|
|
9
|
+
import { g as m } from "./index-DloS7z9I.mjs";
|
|
10
10
|
class a {
|
|
11
11
|
}
|
|
12
12
|
// 模块
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as M, ref as P, resolveComponent as f, openBlock as _, createElementBlock as v, createVNode as o, withCtx as s, createTextVNode as p, toDisplayString as u, createElementVNode as d, Fragment as C, renderList as V, createBlock as D, unref as m } from "vue";
|
|
2
2
|
import { fileApi as S, routerUtil as R } from "jmash-core";
|
|
3
3
|
import { useRouter as j, useRoute as G } from "vue-router";
|
|
4
|
-
import { D as y, C as b } from "./index-
|
|
5
|
-
import { a as L } from "./index-
|
|
4
|
+
import { D as y, C as b } from "./index-Vu01FEMS.mjs";
|
|
5
|
+
import { a as L } from "./index-Dpms2ryP.mjs";
|
|
6
6
|
import { specValueApi as H } from "xyvcard-shop";
|
|
7
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" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, ae = { key: 0 }, ie = { key: 1 }, me = /* @__PURE__ */ M({
|
|
8
8
|
__name: "info",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b, openBlock as r, createElementBlock as k, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as s, createElementVNode as a, Fragment as L, renderList as I, createBlock as S, unref as _, createCommentVNode as B } from "vue";
|
|
2
2
|
import { fileApi as w, routerUtil as F } from "jmash-core";
|
|
3
3
|
import { useRouter as H, useRoute as O } from "vue-router";
|
|
4
|
-
import { D as d, C as N, S as R } from "./index-
|
|
5
|
-
import Y from "./skuTable-
|
|
6
|
-
import { a as G } from "./index-
|
|
4
|
+
import { D as d, C as N, S as R } from "./index-Vu01FEMS.mjs";
|
|
5
|
+
import Y from "./skuTable-7VaeJKGp.mjs";
|
|
6
|
+
import { a as G } from "./index-Dpms2ryP.mjs";
|
|
7
7
|
import { g as J } from "./index-BHmGYIuc.mjs";
|
|
8
8
|
const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "cell-item" }, ie = { class: "title-content" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = { class: "cell-item" }, _e = { class: "cell-item" }, fe = { class: "cell-item" }, ge = ["innerHTML"], Ie = /* @__PURE__ */ M({
|
|
9
9
|
__name: "info",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as j, openBlock as m, createElementBlock as S, createElementVNode as M, ref as v, watch as B, resolveComponent as r, createBlock as
|
|
1
|
+
import { defineComponent as j, openBlock as m, createElementBlock as S, createElementVNode as M, ref as v, watch as B, resolveComponent as r, createBlock as P, withCtx as i, createVNode as n, unref as h, Fragment as Y, renderList as G, createCommentVNode as H, createTextVNode as x, toDisplayString as J } from "vue";
|
|
2
2
|
import { useI18n as K } from "vue-i18n";
|
|
3
|
-
import { D as V, C as
|
|
4
|
-
import { a as O } from "./index-
|
|
3
|
+
import { D as V, C as g } from "./index-Vu01FEMS.mjs";
|
|
4
|
+
import { a as O } from "./index-Dpms2ryP.mjs";
|
|
5
5
|
import { specValueApi as Q } from "xyvcard-shop";
|
|
6
6
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
7
7
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
@@ -37,16 +37,17 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
37
37
|
skuId: "",
|
|
38
38
|
spuId: "",
|
|
39
39
|
specInfo: "",
|
|
40
|
-
saleNum:
|
|
40
|
+
saleNum: 1,
|
|
41
41
|
picUrl: "",
|
|
42
42
|
specType: "",
|
|
43
|
-
skuOptions: []
|
|
43
|
+
skuOptions: [],
|
|
44
|
+
marketPrice: 0
|
|
44
45
|
}
|
|
45
46
|
]);
|
|
46
47
|
V.goodsSpuBizDict.useValues();
|
|
47
48
|
const F = C;
|
|
48
|
-
function L(s,
|
|
49
|
-
s.picUrl =
|
|
49
|
+
function L(s, e) {
|
|
50
|
+
s.picUrl = e;
|
|
50
51
|
}
|
|
51
52
|
const y = b;
|
|
52
53
|
B(
|
|
@@ -59,27 +60,27 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
59
60
|
), y.form.spuId && O.findGroupList({ goodsId: y.form.spuId }).then(({ data: s }) => {
|
|
60
61
|
if (s && s.results.length > 0) {
|
|
61
62
|
d.value = [];
|
|
62
|
-
const
|
|
63
|
+
const e = s.results.map(async (l) => {
|
|
63
64
|
const t = {
|
|
64
|
-
salePrice:
|
|
65
|
-
skuId:
|
|
66
|
-
spuId:
|
|
67
|
-
saleNum:
|
|
68
|
-
picUrl:
|
|
69
|
-
skuName:
|
|
65
|
+
salePrice: l.salePrice || 0,
|
|
66
|
+
skuId: l.skuId || "",
|
|
67
|
+
spuId: l.spuId || "",
|
|
68
|
+
saleNum: l.saleNum || 1,
|
|
69
|
+
picUrl: l.picUrl || "",
|
|
70
|
+
skuName: l.skuName || "",
|
|
70
71
|
specType: "",
|
|
71
72
|
skuOptions: []
|
|
72
73
|
};
|
|
73
|
-
return await D(
|
|
74
|
+
return await D(l.spuId, t), t.saleNum = l.saleNum || 1, t.salePrice = l.salePrice || 0, t.specType === g.SPEC_TYPE.MULTI_SPEC && l.skuId && (t.skuId = l.skuId || "", t.salePrice = l.salePrice || 0, t.saleNum = l.saleNum || 1, t.picUrl = l.picUrl || "", $(l.skuId)), t;
|
|
74
75
|
});
|
|
75
|
-
Promise.all(
|
|
76
|
-
d.value =
|
|
76
|
+
Promise.all(e).then((l) => {
|
|
77
|
+
d.value = l;
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
function A(s) {
|
|
81
|
-
const
|
|
82
|
-
|
|
82
|
+
const e = d.value.indexOf(s.row);
|
|
83
|
+
e !== 0 && d.value.splice(e, 1);
|
|
83
84
|
}
|
|
84
85
|
function R() {
|
|
85
86
|
d.value.push({
|
|
@@ -87,50 +88,51 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
87
88
|
skuId: "",
|
|
88
89
|
spuId: "",
|
|
89
90
|
specInfo: "",
|
|
90
|
-
saleNum:
|
|
91
|
+
saleNum: 1,
|
|
91
92
|
picUrl: "",
|
|
92
93
|
specType: "",
|
|
93
|
-
skuOptions: []
|
|
94
|
+
skuOptions: [],
|
|
95
|
+
marketPrice: 0
|
|
94
96
|
});
|
|
95
97
|
}
|
|
96
98
|
const T = v({});
|
|
97
99
|
async function z(s) {
|
|
98
100
|
if (!U.value[s])
|
|
99
101
|
try {
|
|
100
|
-
const { data:
|
|
102
|
+
const { data: e } = await Q.findById({
|
|
101
103
|
specValueId: s
|
|
102
104
|
});
|
|
103
|
-
return U.value[s] =
|
|
105
|
+
return U.value[s] = e.valueName, e.valueName;
|
|
104
106
|
} catch {
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
|
-
async function D(s,
|
|
108
|
-
var
|
|
109
|
-
if (
|
|
110
|
-
|
|
109
|
+
async function D(s, e) {
|
|
110
|
+
var l, t, I;
|
|
111
|
+
if (e.skuId = "", e.skuOptions = [], e.picUrl = "", e.salePrice = 0, e.saleNum = 1, e.skuName = "", e.marketPrice = 0, !s) {
|
|
112
|
+
e.skuId = "", e.picUrl = "", e.salePrice = 0, e.saleNum = 1, e.skuName = ((l = V.goodsSpuBizDict.values.find((o) => o.key === s)) == null ? void 0 : l.value) ?? "", e.skuOptions = [], e.marketPrice = 0;
|
|
111
113
|
return;
|
|
112
114
|
}
|
|
113
115
|
try {
|
|
114
116
|
const { data: o } = await O.findById({ spuId: s });
|
|
115
|
-
if (
|
|
117
|
+
if (e.specType = o.specType, e.marketPrice = o.maxPrice, e.specType === g.SPEC_TYPE.UNIFIED_SPEC && (e.picUrl = o.picUrls ? o.picUrls.split(",")[0] : "", e.salePrice = (t = o.skuList) == null ? void 0 : t.results[0].salePrice, e.skuId = (I = o.skuList) == null ? void 0 : I.results[0].skuId, e.skuName = o.spuName), e.specType === g.SPEC_TYPE.MULTI_SPEC && o.skuList) {
|
|
116
118
|
const f = o.skuList.results, _ = f.map((u) => u.specValues && Array.isArray(u.specValues) ? u.specValues.map(
|
|
117
119
|
(p) => p.specValueId
|
|
118
120
|
) : []), N = _.flat().map((u) => z(u));
|
|
119
121
|
await Promise.all(N);
|
|
120
|
-
const
|
|
122
|
+
const k = _.map(
|
|
121
123
|
(u) => u.map((p) => U.value[p] || p)
|
|
122
124
|
);
|
|
123
|
-
|
|
125
|
+
e.skuOptions = f.map((u, p) => ({
|
|
124
126
|
key: u.skuId,
|
|
125
|
-
value:
|
|
126
|
-
specInfo:
|
|
127
|
+
value: k[p].join(" "),
|
|
128
|
+
specInfo: k[p].join(" "),
|
|
127
129
|
picUrl: u.picUrl || (o.picUrls ? o.picUrls.split(",")[0] : ""),
|
|
128
130
|
salePrice: u.salePrice,
|
|
129
131
|
stock: u.stock
|
|
130
132
|
})), f.forEach((u, p) => {
|
|
131
133
|
u.skuId && (T.value[u.skuId] = {
|
|
132
134
|
...u,
|
|
133
|
-
specInfo:
|
|
135
|
+
specInfo: k[p].join(" "),
|
|
134
136
|
spuPicUrls: o.picUrls
|
|
135
137
|
});
|
|
136
138
|
});
|
|
@@ -139,79 +141,80 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
143
|
function $(s) {
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
const t =
|
|
147
|
-
|
|
144
|
+
const e = d.value.find((l) => l.skuId === s);
|
|
145
|
+
if (e && s) {
|
|
146
|
+
const l = T.value[s];
|
|
147
|
+
if (l) {
|
|
148
|
+
const t = l.spuPicUrls ? l.spuPicUrls.split(",")[0] : "";
|
|
149
|
+
e.picUrl = l.picUrl || t, e.salePrice = l.salePrice, e.specInfo = l.specInfo;
|
|
148
150
|
}
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
153
|
return B(
|
|
152
154
|
d,
|
|
153
155
|
(s) => {
|
|
154
|
-
const
|
|
155
|
-
salePrice:
|
|
156
|
-
skuId:
|
|
157
|
-
spuId:
|
|
158
|
-
specInfo:
|
|
159
|
-
saleNum:
|
|
160
|
-
picUrl:
|
|
161
|
-
skuName:
|
|
156
|
+
const e = s.filter((l) => l.spuId && l.skuId).map((l) => ({
|
|
157
|
+
salePrice: l.salePrice,
|
|
158
|
+
skuId: l.skuId,
|
|
159
|
+
spuId: l.spuId,
|
|
160
|
+
specInfo: l.specInfo,
|
|
161
|
+
saleNum: l.saleNum,
|
|
162
|
+
picUrl: l.picUrl,
|
|
163
|
+
skuName: l.skuName,
|
|
164
|
+
marketPrice: l.marketPrice
|
|
162
165
|
}));
|
|
163
|
-
F("getGoodsSku",
|
|
166
|
+
console.log("filteredValue", e), F("getGoodsSku", e);
|
|
164
167
|
},
|
|
165
168
|
{
|
|
166
169
|
deep: !0,
|
|
167
170
|
immediate: !0
|
|
168
171
|
}
|
|
169
|
-
), (s,
|
|
170
|
-
const
|
|
171
|
-
return m(),
|
|
172
|
+
), (s, e) => {
|
|
173
|
+
const l = r("jmash-select"), t = r("el-table-column"), I = r("el-option"), o = r("el-select"), f = r("jmash-single-image-upload"), _ = r("el-input-number"), N = r("DeleteFilled"), k = r("el-icon"), u = r("el-table"), p = r("el-button"), q = r("el-row");
|
|
174
|
+
return m(), P(q, null, {
|
|
172
175
|
default: i(() => [
|
|
173
|
-
|
|
176
|
+
n(u, {
|
|
174
177
|
data: d.value,
|
|
175
178
|
border: "",
|
|
176
179
|
style: { width: "100%" }
|
|
177
180
|
}, {
|
|
178
181
|
default: i(() => [
|
|
179
|
-
|
|
182
|
+
n(t, {
|
|
180
183
|
label: s.$t("goodsSpu.spuName"),
|
|
181
184
|
prop: "spuId",
|
|
182
185
|
"header-align": "center"
|
|
183
186
|
}, {
|
|
184
187
|
default: i(({ row: a }) => [
|
|
185
|
-
|
|
188
|
+
n(l, {
|
|
186
189
|
modelValue: a.spuId,
|
|
187
|
-
"onUpdate:modelValue": (
|
|
188
|
-
data:
|
|
190
|
+
"onUpdate:modelValue": (c) => a.spuId = c,
|
|
191
|
+
data: h(V).goodsSpuBizDict.values,
|
|
189
192
|
filterable: "",
|
|
190
193
|
clearable: "",
|
|
191
194
|
placeholder: s.$t("goodsSpu.spuNameRequireds"),
|
|
192
195
|
class: "w-full",
|
|
193
|
-
onChange: (
|
|
196
|
+
onChange: (c) => D(a.spuId, a)
|
|
194
197
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "placeholder", "onChange"])
|
|
195
198
|
]),
|
|
196
199
|
_: 1
|
|
197
200
|
}, 8, ["label"]),
|
|
198
|
-
|
|
201
|
+
n(t, {
|
|
199
202
|
label: s.$t("goodsSpu.specType"),
|
|
200
203
|
"header-align": "center"
|
|
201
204
|
}, {
|
|
202
205
|
default: i(({ row: a }) => [
|
|
203
|
-
a.specType === g
|
|
206
|
+
a.specType === h(g).SPEC_TYPE.UNIFIED_SPEC ? (m(), S("span", w, " 统一规格 ")) : (m(), P(o, {
|
|
204
207
|
key: 1,
|
|
205
208
|
modelValue: a.skuId,
|
|
206
|
-
"onUpdate:modelValue": (
|
|
209
|
+
"onUpdate:modelValue": (c) => a.skuId = c,
|
|
207
210
|
placeholder: s.$t("goodsSpu.specTypeRequired"),
|
|
208
|
-
onChange: (
|
|
211
|
+
onChange: (c) => $(a.skuId)
|
|
209
212
|
}, {
|
|
210
213
|
default: i(() => [
|
|
211
|
-
(m(!0), S(Y, null, G(a.skuOptions, (
|
|
212
|
-
key:
|
|
213
|
-
label:
|
|
214
|
-
value:
|
|
214
|
+
(m(!0), S(Y, null, G(a.skuOptions, (c) => (m(), P(I, {
|
|
215
|
+
key: c.key,
|
|
216
|
+
label: c.value,
|
|
217
|
+
value: c.key
|
|
215
218
|
}, null, 8, ["label", "value"]))), 128))
|
|
216
219
|
]),
|
|
217
220
|
_: 2
|
|
@@ -219,31 +222,31 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
219
222
|
]),
|
|
220
223
|
_: 1
|
|
221
224
|
}, 8, ["label"]),
|
|
222
|
-
|
|
225
|
+
n(t, {
|
|
223
226
|
label: s.$t("goodsSpu.picUrls"),
|
|
224
227
|
prop: "picUrl",
|
|
225
228
|
width: "105",
|
|
226
229
|
"header-align": "center"
|
|
227
230
|
}, {
|
|
228
231
|
default: i(({ row: a }) => [
|
|
229
|
-
|
|
232
|
+
n(f, {
|
|
230
233
|
"picture-url": a.picUrl,
|
|
231
|
-
onImageSrc: (
|
|
234
|
+
onImageSrc: (c) => L(a, c),
|
|
232
235
|
width: 80,
|
|
233
236
|
type: "trans"
|
|
234
237
|
}, null, 8, ["picture-url", "onImageSrc"])
|
|
235
238
|
]),
|
|
236
239
|
_: 1
|
|
237
240
|
}, 8, ["label"]),
|
|
238
|
-
|
|
241
|
+
n(t, {
|
|
239
242
|
label: s.$t("goodsSpu.salePriceV1"),
|
|
240
243
|
prop: "salePrice",
|
|
241
244
|
"header-align": "center"
|
|
242
245
|
}, {
|
|
243
246
|
default: i(({ row: a }) => [
|
|
244
|
-
|
|
247
|
+
n(_, {
|
|
245
248
|
modelValue: a.salePrice,
|
|
246
|
-
"onUpdate:modelValue": (
|
|
249
|
+
"onUpdate:modelValue": (c) => a.salePrice = c,
|
|
247
250
|
precision: 2,
|
|
248
251
|
min: 0,
|
|
249
252
|
placeholder: s.$t("goodsSpu.salePriceV1Required"),
|
|
@@ -253,15 +256,15 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
253
256
|
]),
|
|
254
257
|
_: 1
|
|
255
258
|
}, 8, ["label"]),
|
|
256
|
-
|
|
259
|
+
n(t, {
|
|
257
260
|
label: s.$t("goodsSpu.saleNums"),
|
|
258
261
|
prop: "saleNum",
|
|
259
262
|
"header-align": "center"
|
|
260
263
|
}, {
|
|
261
264
|
default: i(({ row: a }) => [
|
|
262
|
-
|
|
265
|
+
n(_, {
|
|
263
266
|
modelValue: a.saleNum,
|
|
264
|
-
"onUpdate:modelValue": (
|
|
267
|
+
"onUpdate:modelValue": (c) => a.saleNum = c,
|
|
265
268
|
placeholder: s.$t("goodsSpu.saleNumRequireds"),
|
|
266
269
|
class: "w-full",
|
|
267
270
|
controls: !1,
|
|
@@ -271,21 +274,21 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
271
274
|
]),
|
|
272
275
|
_: 1
|
|
273
276
|
}, 8, ["label"]),
|
|
274
|
-
|
|
277
|
+
n(t, {
|
|
275
278
|
label: s.$t("common.operate"),
|
|
276
279
|
width: "60",
|
|
277
280
|
align: "center"
|
|
278
281
|
}, {
|
|
279
282
|
default: i((a) => [
|
|
280
|
-
a.$index !== 0 ? (m(),
|
|
283
|
+
a.$index !== 0 ? (m(), P(k, {
|
|
281
284
|
key: 0,
|
|
282
|
-
onClick: (
|
|
285
|
+
onClick: (c) => A(a),
|
|
283
286
|
size: "18",
|
|
284
287
|
style: { cursor: "pointer", color: "inherit" },
|
|
285
288
|
class: "hover-blue"
|
|
286
289
|
}, {
|
|
287
290
|
default: i(() => [
|
|
288
|
-
|
|
291
|
+
n(N)
|
|
289
292
|
]),
|
|
290
293
|
_: 2
|
|
291
294
|
}, 1032, ["onClick"])) : H("", !0)
|
|
@@ -295,13 +298,13 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
295
298
|
]),
|
|
296
299
|
_: 1
|
|
297
300
|
}, 8, ["data"]),
|
|
298
|
-
|
|
299
|
-
icon:
|
|
301
|
+
n(p, {
|
|
302
|
+
icon: h(Z),
|
|
300
303
|
class: "addButton",
|
|
301
304
|
onClick: R
|
|
302
305
|
}, {
|
|
303
306
|
default: i(() => [
|
|
304
|
-
x(J(
|
|
307
|
+
x(J(h(E)("common.add")), 1)
|
|
305
308
|
]),
|
|
306
309
|
_: 1
|
|
307
310
|
}, 8, ["icon"])
|
|
@@ -310,7 +313,7 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
310
313
|
});
|
|
311
314
|
};
|
|
312
315
|
}
|
|
313
|
-
}),
|
|
316
|
+
}), ce = /* @__PURE__ */ W(ee, [["__scopeId", "data-v-6bb5afe9"]]);
|
|
314
317
|
export {
|
|
315
|
-
|
|
318
|
+
ce as default
|
|
316
319
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as te, ref as S, computed as se, watch as $, resolveComponent as i, openBlock as m, createElementBlock as g, Fragment as b, unref as M, createVNode as o, withCtx as a, createCommentVNode as I, renderList as P, createElementVNode as k, toDisplayString as O, createTextVNode as y, createBlock as w } from "vue";
|
|
2
|
-
import { C as D, D as ue, S as Y, a as ne } from "./index-
|
|
3
|
-
import re from "./skuTable-
|
|
2
|
+
import { C as D, D as ue, S as Y, a as ne } from "./index-Vu01FEMS.mjs";
|
|
3
|
+
import re from "./skuTable-7VaeJKGp.mjs";
|
|
4
4
|
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
5
|
const pe = { key: 0 }, ce = {
|
|
6
6
|
key: 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as T, ref as C, computed as F, watch as $, resolveComponent as g, openBlock as P, createElementBlock as b, createElementVNode as u, createVNode as a, withCtx as d, createTextVNode as y, createCommentVNode as M, Fragment as G, renderList as K, createBlock as z, toDisplayString as D, unref as x } from "vue";
|
|
2
|
-
import { D as O } from "./index-
|
|
2
|
+
import { D as O } from "./index-Vu01FEMS.mjs";
|
|
3
3
|
import { fileApi as E } from "jmash-core";
|
|
4
4
|
import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
5
|
function J(n, h = [], o) {
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.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%}[data-v-f10f6f7e] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-f10f6f7e] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}.title-set[data-v-6fc718ce]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-e6aa4b01]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-e6aa4b01]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-e6aa4b01]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-e6aa4b01]{padding:10px 20px}.goods-tag[data-v-e6aa4b01]{margin-bottom:10px}.addButton[data-v-
|
|
1
|
+
@charset "UTF-8";.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%}[data-v-f10f6f7e] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-f10f6f7e] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}.title-set[data-v-6fc718ce]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-e6aa4b01]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-e6aa4b01]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-e6aa4b01]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-e6aa4b01]{padding:10px 20px}.goods-tag[data-v-e6aa4b01]{margin-bottom:10px}.addButton[data-v-6bb5afe9]{margin-top:15px;margin-bottom:20px;width:100%}.hover-blue[data-v-6bb5afe9]:hover{color:#409eff!important}.position-center[data-v-4d967c8a]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4d967c8a]{position:absolute;right:0;top:0;margin-top:8px}.position-center[data-v-4ec2418d]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4ec2418d]{position:absolute;right:0;top:0;margin-top:8px}
|