xyvcard-goods 0.0.25 → 0.0.26
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-DiWa_ZLE.mjs → edit-C5HGHhkb.mjs} +1 -1
- package/dist/{edit-CajMDPUo.mjs → edit-Cb0aaC0q.mjs} +1 -1
- package/dist/edit-DrbsKmwh.mjs +428 -0
- package/dist/{edit-Dw0brF_L.mjs → edit-Xn_nZjI6.mjs} +3 -3
- package/dist/{edit-DAyPJb0b.mjs → edit-eAHVEi0b.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-C2XSQSoV.mjs → edit.vue_vue_type_script_setup_true_lang-DBG-5gI4.mjs} +2 -2
- package/dist/{goodsList-D5D6w8qJ.mjs → goodsList-CDQZGSh2.mjs} +1 -1
- package/dist/{goodsList-DebLyKkm.mjs → goodsList-CKCG7ntZ.mjs} +1 -1
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-BZZYw7U2.mjs → goodsList.vue_vue_type_script_setup_true_lang-B6P3fso6.mjs} +2 -2
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-BovyDKOb.mjs → goodsList.vue_vue_type_script_setup_true_lang-DiRkiNJk.mjs} +2 -2
- package/dist/{index-DcreTzbx.mjs → index-B8IdlGiz.mjs} +3 -3
- package/dist/{index-Ti58GY9z.mjs → index-Bz206T2E.mjs} +3 -3
- package/dist/{index-C4DAxQ7e.mjs → index-CDhEKnzj.mjs} +2 -2
- package/dist/{index-gnGbjAJC.mjs → index-CMkWXcWe.mjs} +2 -2
- package/dist/{index-Bq-VIy8T.mjs → index-CSeu2TZT.mjs} +2 -2
- package/dist/{index-C_El1x3C.mjs → index-D70qzGQF.mjs} +1 -1
- package/dist/{index-CtbKf0QD.mjs → index-DSbkvzGV.mjs} +3 -3
- package/dist/{index-DLPUpw3h.mjs → index-utNcRJx7.mjs} +7 -3
- package/dist/index.mjs +1 -1
- package/dist/{info-BYntI7av.mjs → info-CX3zF0ZW.mjs} +3 -3
- package/dist/{info-Bkzvf5Mw.mjs → info-Dlte8Sn0.mjs} +2 -2
- package/dist/{skuForm-C0s08DP2.mjs → skuForm-B_8WQCr3.mjs} +2 -2
- package/dist/{skuForm-WOvsR26d.mjs → skuForm-DUR7U2Kn.mjs} +82 -81
- package/dist/{skuTable-DyzW7iCQ.mjs → skuTable-D4LGL7B5.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dts/api/goods-spu/types.d.ts +4 -0
- package/dts/lang/goods/zh-cn.d.ts +4 -0
- package/package.json +1 -1
- package/dist/edit-CWq3UNZW.mjs +0 -368
package/dist/edit-CWq3UNZW.mjs
DELETED
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
import { _ as O } from "./ImageUpload-Dk6GY6PA.mjs";
|
|
2
|
-
import { defineComponent as P, ref as q, reactive as v, resolveComponent as n, openBlock as c, createElementBlock as R, createElementVNode as g, createVNode as e, unref as t, withCtx as s, Fragment as j, renderList as M, createBlock as k, createTextVNode as C, toDisplayString as H, createCommentVNode as Y } from "vue";
|
|
3
|
-
import { ElMessage as T } from "element-plus";
|
|
4
|
-
import { useRouter as J, useRoute as K } from "vue-router";
|
|
5
|
-
import { routerUtil as U } from "jmash-core";
|
|
6
|
-
import { useI18n as Q } from "vue-i18n";
|
|
7
|
-
import { D as m, C as W } from "./index-gnGbjAJC.mjs";
|
|
8
|
-
import { a as h } from "./index-DLPUpw3h.mjs";
|
|
9
|
-
import X from "./skuForm-WOvsR26d.mjs";
|
|
10
|
-
const Z = { class: "app-container" }, x = { class: "search-container" }, ee = { class: "image-card" }, ie = /* @__PURE__ */ P({
|
|
11
|
-
__name: "edit",
|
|
12
|
-
setup(le) {
|
|
13
|
-
const { t: p } = Q(), y = J(), f = K(), b = q();
|
|
14
|
-
m.goodsCategoryListBizLayDict.useValues(), m.labelListBizDict.useValues();
|
|
15
|
-
let o = v({
|
|
16
|
-
requestId: Math.random() * 10 + "",
|
|
17
|
-
updateMask: "labelIds,spuName,categoryIds,spuCode,freightType,freightAmount,picUrls,shelf,saleNum",
|
|
18
|
-
skuSpecValues: [],
|
|
19
|
-
freightType: m.freightTypeEnum.values[0].key,
|
|
20
|
-
freightAmount: 0,
|
|
21
|
-
shelf: m.shelfDict.values[0].key,
|
|
22
|
-
goodsType: W.GOODS_TYPE.GROUP
|
|
23
|
-
});
|
|
24
|
-
const w = (u, l, i) => {
|
|
25
|
-
var d;
|
|
26
|
-
const r = (d = o.picUrls) == null ? void 0 : d.split(",").filter(Boolean);
|
|
27
|
-
if (r != null && r.length) {
|
|
28
|
-
if ((r == null ? void 0 : r.length) < 1)
|
|
29
|
-
return i(new Error(p("goodsSpu.imageListsErrors")));
|
|
30
|
-
i();
|
|
31
|
-
} else return i(new Error(p("goodsSpu.picUrlsRequired")));
|
|
32
|
-
}, N = v({
|
|
33
|
-
spuName: [
|
|
34
|
-
{
|
|
35
|
-
required: !0,
|
|
36
|
-
message: p("goodsSpu.spuNameRequired"),
|
|
37
|
-
trigger: "blur"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
categoryIds: [
|
|
41
|
-
{
|
|
42
|
-
required: !0,
|
|
43
|
-
message: p("goodsSpu.categoryIdRequired"),
|
|
44
|
-
trigger: "change"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
spuCode: [
|
|
48
|
-
{
|
|
49
|
-
required: !0,
|
|
50
|
-
message: p("goodsSpu.spuCodeRequired"),
|
|
51
|
-
trigger: "change"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
freightType: [
|
|
55
|
-
{
|
|
56
|
-
required: !0,
|
|
57
|
-
message: p("goodsSpu.freightTypeRequired"),
|
|
58
|
-
trigger: "change"
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
freightAmount: [
|
|
62
|
-
{
|
|
63
|
-
required: !0,
|
|
64
|
-
message: p("goodsSpu.freightAmountRequired"),
|
|
65
|
-
trigger: "blur"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
picUrls: [
|
|
69
|
-
{
|
|
70
|
-
validator: w,
|
|
71
|
-
trigger: "change"
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
shelf: [
|
|
75
|
-
{
|
|
76
|
-
required: !0,
|
|
77
|
-
message: p("goodsSpu.shelfRequired"),
|
|
78
|
-
trigger: "change"
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}), V = q(!1);
|
|
82
|
-
function E(u) {
|
|
83
|
-
o.groupInfos = u;
|
|
84
|
-
}
|
|
85
|
-
f.query.spuId && h.findById({ spuId: f.query.spuId }).then(({ data: u }) => {
|
|
86
|
-
Object.assign(o, u), V.value = !0;
|
|
87
|
-
});
|
|
88
|
-
const $ = async () => {
|
|
89
|
-
var u;
|
|
90
|
-
await ((u = b.value) == null ? void 0 : u.validate((l) => {
|
|
91
|
-
l && (f.query.spuId ? h.updateList(o).then((i) => {
|
|
92
|
-
i.status === 200 && (T({
|
|
93
|
-
message: p("common.submitSuccess"),
|
|
94
|
-
type: "success"
|
|
95
|
-
}), U.closeTagView(f.fullPath, y, !1));
|
|
96
|
-
}) : h.createList(o).then((i) => {
|
|
97
|
-
i.status === 200 && (T({
|
|
98
|
-
message: p("common.submitSuccess"),
|
|
99
|
-
type: "success"
|
|
100
|
-
}), U.closeTagView(f.fullPath, y, !1));
|
|
101
|
-
}));
|
|
102
|
-
}));
|
|
103
|
-
};
|
|
104
|
-
function A(u) {
|
|
105
|
-
u === "FREIGHT_FREE" && (o.freightAmount = 0);
|
|
106
|
-
}
|
|
107
|
-
return (u, l) => {
|
|
108
|
-
const i = n("el-input"), r = n("el-form-item"), d = n("el-col"), D = n("el-tree-select"), S = n("jmash-enum-radio"), I = n("el-input-number"), F = O, L = n("el-checkbox"), B = n("el-checkbox-group"), _ = n("el-row"), G = n("el-button"), z = n("el-form");
|
|
109
|
-
return c(), R("div", Z, [
|
|
110
|
-
g("div", x, [
|
|
111
|
-
e(z, {
|
|
112
|
-
ref_key: "goodsSpuFormRef",
|
|
113
|
-
ref: b,
|
|
114
|
-
model: t(o),
|
|
115
|
-
"label-width": "120px",
|
|
116
|
-
rules: N
|
|
117
|
-
}, {
|
|
118
|
-
default: s(() => [
|
|
119
|
-
l[11] || (l[11] = g("div", { class: "title-content" }, "基本信息", -1)),
|
|
120
|
-
e(_, null, {
|
|
121
|
-
default: s(() => [
|
|
122
|
-
e(d, { span: 12 }, {
|
|
123
|
-
default: s(() => [
|
|
124
|
-
e(r, {
|
|
125
|
-
label: u.$t("goodsSpu.spuName"),
|
|
126
|
-
prop: "spuName"
|
|
127
|
-
}, {
|
|
128
|
-
default: s(() => [
|
|
129
|
-
e(i, {
|
|
130
|
-
modelValue: t(o).spuName,
|
|
131
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) => t(o).spuName = a),
|
|
132
|
-
placeholder: u.$t("goodsSpu.spuNameRequired"),
|
|
133
|
-
maxlength: "60",
|
|
134
|
-
"show-word-limit": "",
|
|
135
|
-
clearable: ""
|
|
136
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["label"])
|
|
140
|
-
]),
|
|
141
|
-
_: 1
|
|
142
|
-
}),
|
|
143
|
-
e(d, { span: 12 }, {
|
|
144
|
-
default: s(() => [
|
|
145
|
-
e(r, {
|
|
146
|
-
label: u.$t("goodsSpu.spuCode"),
|
|
147
|
-
prop: "spuCode"
|
|
148
|
-
}, {
|
|
149
|
-
default: s(() => [
|
|
150
|
-
e(i, {
|
|
151
|
-
modelValue: t(o).spuCode,
|
|
152
|
-
"onUpdate:modelValue": l[1] || (l[1] = (a) => t(o).spuCode = a),
|
|
153
|
-
placeholder: u.$t("goodsSpu.spuCodeRequired"),
|
|
154
|
-
maxlength: "15",
|
|
155
|
-
"show-word-limit": "",
|
|
156
|
-
clearable: ""
|
|
157
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
158
|
-
]),
|
|
159
|
-
_: 1
|
|
160
|
-
}, 8, ["label"])
|
|
161
|
-
]),
|
|
162
|
-
_: 1
|
|
163
|
-
}),
|
|
164
|
-
e(d, { span: 12 }, {
|
|
165
|
-
default: s(() => [
|
|
166
|
-
e(r, {
|
|
167
|
-
label: u.$t("goodsSpu.categoryId"),
|
|
168
|
-
prop: "categoryIds"
|
|
169
|
-
}, {
|
|
170
|
-
default: s(() => [
|
|
171
|
-
e(D, {
|
|
172
|
-
modelValue: t(o).categoryIds,
|
|
173
|
-
"onUpdate:modelValue": l[2] || (l[2] = (a) => t(o).categoryIds = a),
|
|
174
|
-
data: t(m).goodsCategoryListBizLayDict.values,
|
|
175
|
-
multiple: "",
|
|
176
|
-
"render-after-expand": !1,
|
|
177
|
-
"show-checkbox": "",
|
|
178
|
-
placeholder: u.$t("goodsSpu.categoryIdRequired"),
|
|
179
|
-
class: "w-full"
|
|
180
|
-
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
}, 8, ["label"])
|
|
184
|
-
]),
|
|
185
|
-
_: 1
|
|
186
|
-
}),
|
|
187
|
-
e(d, { span: 12 }, {
|
|
188
|
-
default: s(() => [
|
|
189
|
-
e(r, {
|
|
190
|
-
label: u.$t("goodsSpu.freightType"),
|
|
191
|
-
prop: "freightType"
|
|
192
|
-
}, {
|
|
193
|
-
default: s(() => [
|
|
194
|
-
e(S, {
|
|
195
|
-
modelValue: t(o).freightType,
|
|
196
|
-
"onUpdate:modelValue": l[3] || (l[3] = (a) => t(o).freightType = a),
|
|
197
|
-
data: t(m).freightTypeEnum.values,
|
|
198
|
-
onChange: A
|
|
199
|
-
}, null, 8, ["modelValue", "data"])
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}, 8, ["label"])
|
|
203
|
-
]),
|
|
204
|
-
_: 1
|
|
205
|
-
}),
|
|
206
|
-
e(d, { span: 12 }, {
|
|
207
|
-
default: s(() => [
|
|
208
|
-
e(r, {
|
|
209
|
-
label: u.$t("goodsSpu.freightAmount"),
|
|
210
|
-
prop: "freightAmount"
|
|
211
|
-
}, {
|
|
212
|
-
default: s(() => [
|
|
213
|
-
e(I, {
|
|
214
|
-
modelValue: t(o).freightAmount,
|
|
215
|
-
"onUpdate:modelValue": l[4] || (l[4] = (a) => t(o).freightAmount = a),
|
|
216
|
-
readonly: t(o).freightType === "FREIGHT_FREE",
|
|
217
|
-
precision: 2,
|
|
218
|
-
step: 0.1,
|
|
219
|
-
controls: !1,
|
|
220
|
-
min: 0,
|
|
221
|
-
placeholder: u.$t("goodsSpu.freightAmountRequired"),
|
|
222
|
-
class: "w-full"
|
|
223
|
-
}, null, 8, ["modelValue", "readonly", "placeholder"])
|
|
224
|
-
]),
|
|
225
|
-
_: 1
|
|
226
|
-
}, 8, ["label"])
|
|
227
|
-
]),
|
|
228
|
-
_: 1
|
|
229
|
-
}),
|
|
230
|
-
e(d, { span: 24 }, {
|
|
231
|
-
default: s(() => [
|
|
232
|
-
e(r, {
|
|
233
|
-
label: u.$t("goodsSpu.picUrls"),
|
|
234
|
-
prop: "picUrls"
|
|
235
|
-
}, {
|
|
236
|
-
default: s(() => [
|
|
237
|
-
g("div", ee, [
|
|
238
|
-
e(F, {
|
|
239
|
-
modelValue: t(o).picUrls,
|
|
240
|
-
"onUpdate:modelValue": l[5] || (l[5] = (a) => t(o).picUrls = a),
|
|
241
|
-
limit: 6,
|
|
242
|
-
"list-type": "picture-card"
|
|
243
|
-
}, null, 8, ["modelValue"]),
|
|
244
|
-
l[9] || (l[9] = g("div", { class: "red-color" }, " 推荐尺寸:100*100或同比例图片,最少上传1张 ", -1))
|
|
245
|
-
])
|
|
246
|
-
]),
|
|
247
|
-
_: 1
|
|
248
|
-
}, 8, ["label"])
|
|
249
|
-
]),
|
|
250
|
-
_: 1
|
|
251
|
-
}),
|
|
252
|
-
e(d, { span: 12 }, {
|
|
253
|
-
default: s(() => [
|
|
254
|
-
e(r, {
|
|
255
|
-
label: u.$t("goodsSpu.shelf"),
|
|
256
|
-
prop: "shelf"
|
|
257
|
-
}, {
|
|
258
|
-
default: s(() => [
|
|
259
|
-
e(S, {
|
|
260
|
-
modelValue: t(o).shelf,
|
|
261
|
-
"onUpdate:modelValue": l[6] || (l[6] = (a) => t(o).shelf = a),
|
|
262
|
-
data: t(m).shelfDict.values
|
|
263
|
-
}, null, 8, ["modelValue", "data"])
|
|
264
|
-
]),
|
|
265
|
-
_: 1
|
|
266
|
-
}, 8, ["label"])
|
|
267
|
-
]),
|
|
268
|
-
_: 1
|
|
269
|
-
}),
|
|
270
|
-
e(d, { span: 12 }, {
|
|
271
|
-
default: s(() => [
|
|
272
|
-
e(r, {
|
|
273
|
-
label: u.$t("goodsSpu.saleNum"),
|
|
274
|
-
prop: "saleNum"
|
|
275
|
-
}, {
|
|
276
|
-
default: s(() => [
|
|
277
|
-
e(I, {
|
|
278
|
-
modelValue: t(o).saleNum,
|
|
279
|
-
"onUpdate:modelValue": l[7] || (l[7] = (a) => t(o).saleNum = a),
|
|
280
|
-
placeholder: u.$t("goodsSpu.saleNumRequired"),
|
|
281
|
-
class: "w-full",
|
|
282
|
-
min: 0,
|
|
283
|
-
controls: !1,
|
|
284
|
-
precision: 0
|
|
285
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
286
|
-
]),
|
|
287
|
-
_: 1
|
|
288
|
-
}, 8, ["label"])
|
|
289
|
-
]),
|
|
290
|
-
_: 1
|
|
291
|
-
}),
|
|
292
|
-
e(d, { span: 24 }, {
|
|
293
|
-
default: s(() => [
|
|
294
|
-
e(r, {
|
|
295
|
-
label: u.$t("goodsSpu.labelIds"),
|
|
296
|
-
prop: "labelIds"
|
|
297
|
-
}, {
|
|
298
|
-
default: s(() => [
|
|
299
|
-
e(B, {
|
|
300
|
-
modelValue: t(o).labelIds,
|
|
301
|
-
"onUpdate:modelValue": l[8] || (l[8] = (a) => t(o).labelIds = a),
|
|
302
|
-
class: "w-full"
|
|
303
|
-
}, {
|
|
304
|
-
default: s(() => [
|
|
305
|
-
(c(!0), R(j, null, M(t(m).labelListBizDict.values, (a) => (c(), k(L, {
|
|
306
|
-
key: a.key,
|
|
307
|
-
label: a.key
|
|
308
|
-
}, {
|
|
309
|
-
default: s(() => [
|
|
310
|
-
C(H(a.value), 1)
|
|
311
|
-
]),
|
|
312
|
-
_: 2
|
|
313
|
-
}, 1032, ["label"]))), 128))
|
|
314
|
-
]),
|
|
315
|
-
_: 1
|
|
316
|
-
}, 8, ["modelValue"])
|
|
317
|
-
]),
|
|
318
|
-
_: 1
|
|
319
|
-
}, 8, ["label"])
|
|
320
|
-
]),
|
|
321
|
-
_: 1
|
|
322
|
-
})
|
|
323
|
-
]),
|
|
324
|
-
_: 1
|
|
325
|
-
}),
|
|
326
|
-
l[12] || (l[12] = g("div", { class: "title-content" }, "套装商品", -1)),
|
|
327
|
-
e(_, null, {
|
|
328
|
-
default: s(() => [
|
|
329
|
-
!t(f).query.spuId || V.value ? (c(), k(X, {
|
|
330
|
-
key: 0,
|
|
331
|
-
form: t(o),
|
|
332
|
-
onGetGoodsSku: E
|
|
333
|
-
}, null, 8, ["form"])) : Y("", !0)
|
|
334
|
-
]),
|
|
335
|
-
_: 1
|
|
336
|
-
}),
|
|
337
|
-
e(_, null, {
|
|
338
|
-
default: s(() => [
|
|
339
|
-
e(r, null, {
|
|
340
|
-
default: s(() => [
|
|
341
|
-
e(G, {
|
|
342
|
-
type: "primary",
|
|
343
|
-
onClick: $
|
|
344
|
-
}, {
|
|
345
|
-
default: s(() => l[10] || (l[10] = [
|
|
346
|
-
C("保存")
|
|
347
|
-
])),
|
|
348
|
-
_: 1,
|
|
349
|
-
__: [10]
|
|
350
|
-
})
|
|
351
|
-
]),
|
|
352
|
-
_: 1
|
|
353
|
-
})
|
|
354
|
-
]),
|
|
355
|
-
_: 1
|
|
356
|
-
})
|
|
357
|
-
]),
|
|
358
|
-
_: 1,
|
|
359
|
-
__: [11, 12]
|
|
360
|
-
}, 8, ["model", "rules"])
|
|
361
|
-
])
|
|
362
|
-
]);
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
export {
|
|
367
|
-
ie as default
|
|
368
|
-
};
|