xyvcard-goods 0.0.21 → 0.0.23
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/ImageUpload-Dk6GY6PA.mjs +93 -0
- package/dist/{edit-DFc_TNP3.mjs → edit-9jPSycsG.mjs} +148 -212
- package/dist/edit-CJpoa4Ck.mjs +368 -0
- package/dist/{edit-DxnsmaXV.mjs → edit-CWQMgvVP.mjs} +38 -38
- package/dist/{edit-CkR-I5aJ.mjs → edit-DU-BEAcq.mjs} +1 -1
- package/dist/{edit-BcokSKfN.mjs → edit-Ziwv43v0.mjs} +27 -27
- package/dist/edit.vue_vue_type_script_setup_true_lang-BP0C4d2-.mjs +24173 -0
- package/dist/{goodsList-HmPAwD_C.mjs → goodsList-2AwsJVoO.mjs} +1 -1
- package/dist/{goodsList-TX2ZnRR9.mjs → goodsList-CyWliLjg.mjs} +1 -1
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CGV1dm3W.mjs → goodsList.vue_vue_type_script_setup_true_lang-Bq06GIMe.mjs} +2 -2
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-f1Fc6pbd.mjs → goodsList.vue_vue_type_script_setup_true_lang-DjKzEAB7.mjs} +136 -147
- package/dist/{index-B0SXNsHW.mjs → index-8E7BciYp.mjs} +7 -7
- package/dist/{index-Dt3PP8dN.mjs → index-B1H5hqEi.mjs} +2 -2
- package/dist/{index-BZw9XfQo.mjs → index-B88acg0Q.mjs} +2 -2
- package/dist/{index-VFsDup14.mjs → index-BdP_dXBK.mjs} +3 -3
- package/dist/index-C7oatDPl.mjs +4432 -0
- package/dist/{index-Ctva-XF0.mjs → index-DPjR32Kv.mjs} +3 -3
- package/dist/{index-r0u-27m7.mjs → index-DR3Gk44r.mjs} +1 -1
- package/dist/index-jCpYt-EU.mjs +221 -0
- package/dist/index.mjs +6 -2864
- package/dist/info-BEMxnD6-.mjs +325 -0
- package/dist/{info-BTKv0IRt.mjs → info-DFIeVs66.mjs} +3 -3
- package/dist/{skuForm-C7rF2noo.mjs → skuForm-BhAbf2AG.mjs} +2 -2
- package/dist/skuForm-C2aQcL90.mjs +314 -0
- package/dist/{skuTable-CEwT-I1Q.mjs → skuTable-9JJqGeRx.mjs} +255 -208
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +3 -0
- package/dts/api/goods-spu/index.d.ts +4 -1
- package/dts/api/goods-spu/types.d.ts +28 -0
- package/dts/api/index.d.ts +2 -1
- package/dts/index.d.ts +4 -0
- package/dts/lang/goods/zh-cn.d.ts +5 -1
- package/dts/router/index.d.ts +1 -0
- package/dts/views/goods/goods-combination/skuForm.vue.d.ts +0 -9
- package/package.json +3 -2
- package/dist/edit-tCGa_9Kt.mjs +0 -507
- package/dist/edit.vue_vue_type_script_setup_true_lang-BlNwikUO.mjs +0 -234
- package/dist/index-CqOoZ5xQ.mjs +0 -305
- package/dist/index-DR7GlHNd.mjs +0 -1288
- package/dist/index-jTDhsbYM.mjs +0 -141
- package/dist/info-CrghLmS4.mjs +0 -365
- package/dist/sku-B-IzfYLq.mjs +0 -52
- package/dist/skuForm-D2n8sQJo.mjs +0 -475
- package/dist/skuTable-D-awlXgj.mjs +0 -592
|
@@ -0,0 +1,368 @@
|
|
|
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-jCpYt-EU.mjs";
|
|
8
|
+
import { a as h } from "./index-C7oatDPl.mjs";
|
|
9
|
+
import X from "./skuForm-C2aQcL90.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
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as E, mergeModels as B, ref as V, reactive as N, useModel as F, resolveComponent as
|
|
1
|
+
import { defineComponent as E, mergeModels as B, ref as V, reactive as N, useModel as F, resolveComponent as r, openBlock as K, createBlock as O, withCtx as t, createElementVNode as x, createVNode as o, createTextVNode as U, toDisplayString as w, unref as s } from "vue";
|
|
2
2
|
import { ElMessage as q } from "element-plus";
|
|
3
3
|
import { useI18n as A } from "vue-i18n";
|
|
4
|
-
import { g as f } from "./index-
|
|
4
|
+
import { g as f } from "./index-DR3Gk44r.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",
|
|
@@ -18,7 +18,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
18
18
|
emits: /* @__PURE__ */ B(["refresh"], ["update:modelValue"]),
|
|
19
19
|
setup(p, { emit: k }) {
|
|
20
20
|
const g = V(), { t: i } = A();
|
|
21
|
-
let
|
|
21
|
+
let l = N({
|
|
22
22
|
requestId: Math.random() * 10 + "",
|
|
23
23
|
updateMask: "brandName,logoUrl,description"
|
|
24
24
|
});
|
|
@@ -44,44 +44,44 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
44
44
|
trigger: "change"
|
|
45
45
|
}
|
|
46
46
|
]
|
|
47
|
-
}),
|
|
47
|
+
}), a = F(p, "modelValue"), _ = p;
|
|
48
48
|
function $(e) {
|
|
49
|
-
|
|
49
|
+
l.logoUrl = e;
|
|
50
50
|
}
|
|
51
51
|
const b = k, C = Object.keys(_.entityKey), y = V(C.length >= 1);
|
|
52
52
|
y.value && f.findById(_.entityKey).then(({ data: e }) => {
|
|
53
|
-
Object.assign(
|
|
53
|
+
Object.assign(l, e);
|
|
54
54
|
});
|
|
55
55
|
const M = async () => {
|
|
56
56
|
var e;
|
|
57
|
-
await ((e = g.value) == null ? void 0 : e.validate((
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
await ((e = g.value) == null ? void 0 : e.validate((n) => {
|
|
58
|
+
n && (y.value ? f.update(l).then((d) => {
|
|
59
|
+
d.status === 200 && (q({
|
|
60
60
|
message: i("common.submitSuccess"),
|
|
61
61
|
type: "success"
|
|
62
|
-
}),
|
|
63
|
-
}) : f.create(
|
|
64
|
-
|
|
62
|
+
}), a.value && (a.value = !1), b("refresh", d.status === 200));
|
|
63
|
+
}) : f.create(l).then((d) => {
|
|
64
|
+
d.status === 200 && (q({
|
|
65
65
|
message: i("common.submitSuccess"),
|
|
66
66
|
type: "success"
|
|
67
|
-
}),
|
|
67
|
+
}), a.value && (a.value = !1), b("refresh", d.status === 200));
|
|
68
68
|
}));
|
|
69
69
|
}));
|
|
70
70
|
};
|
|
71
71
|
function h() {
|
|
72
|
-
|
|
72
|
+
a.value && (a.value = !1);
|
|
73
73
|
}
|
|
74
|
-
return (e,
|
|
75
|
-
const
|
|
74
|
+
return (e, n) => {
|
|
75
|
+
const d = r("jmash-single-image-upload"), u = r("el-form-item"), c = r("el-col"), I = r("el-input"), j = r("el-row"), S = r("el-form"), v = r("el-button"), D = r("el-dialog");
|
|
76
76
|
return K(), O(D, {
|
|
77
|
-
modelValue:
|
|
78
|
-
"onUpdate:modelValue":
|
|
77
|
+
modelValue: a.value,
|
|
78
|
+
"onUpdate:modelValue": n[2] || (n[2] = (m) => a.value = m),
|
|
79
79
|
onClose: h
|
|
80
80
|
}, {
|
|
81
|
-
footer:
|
|
81
|
+
footer: t(() => [
|
|
82
82
|
x("div", z, [
|
|
83
83
|
o(v, { onClick: h }, {
|
|
84
|
-
default:
|
|
84
|
+
default: t(() => [
|
|
85
85
|
U(w(e.$t("common.cancel")), 1)
|
|
86
86
|
]),
|
|
87
87
|
_: 1
|
|
@@ -90,33 +90,33 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
90
90
|
type: "primary",
|
|
91
91
|
onClick: M
|
|
92
92
|
}, {
|
|
93
|
-
default:
|
|
93
|
+
default: t(() => [
|
|
94
94
|
U(w(e.$t("common.confirm")), 1)
|
|
95
95
|
]),
|
|
96
96
|
_: 1
|
|
97
97
|
})
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
100
|
-
default:
|
|
100
|
+
default: t(() => [
|
|
101
101
|
o(S, {
|
|
102
102
|
ref_key: "goodsBrandInfoFormRef",
|
|
103
103
|
ref: g,
|
|
104
|
-
model: s(
|
|
104
|
+
model: s(l),
|
|
105
105
|
"label-width": "120px",
|
|
106
106
|
rules: R
|
|
107
107
|
}, {
|
|
108
|
-
default:
|
|
108
|
+
default: t(() => [
|
|
109
109
|
o(j, null, {
|
|
110
|
-
default:
|
|
110
|
+
default: t(() => [
|
|
111
111
|
o(c, { span: 24 }, {
|
|
112
|
-
default:
|
|
112
|
+
default: t(() => [
|
|
113
113
|
o(u, {
|
|
114
114
|
label: e.$t("goodsBrandInfo.logoUrl"),
|
|
115
115
|
prop: "logoUrl"
|
|
116
116
|
}, {
|
|
117
|
-
default:
|
|
118
|
-
o(
|
|
119
|
-
"picture-url": s(
|
|
117
|
+
default: t(() => [
|
|
118
|
+
o(d, {
|
|
119
|
+
"picture-url": s(l).logoUrl,
|
|
120
120
|
onImageSrc: $,
|
|
121
121
|
width: 80,
|
|
122
122
|
type: "trans"
|
|
@@ -128,15 +128,15 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
128
128
|
_: 1
|
|
129
129
|
}),
|
|
130
130
|
o(c, { span: 24 }, {
|
|
131
|
-
default:
|
|
131
|
+
default: t(() => [
|
|
132
132
|
o(u, {
|
|
133
133
|
label: e.$t("goodsBrandInfo.brandName"),
|
|
134
134
|
prop: "brandName"
|
|
135
135
|
}, {
|
|
136
|
-
default:
|
|
136
|
+
default: t(() => [
|
|
137
137
|
o(I, {
|
|
138
|
-
modelValue: s(
|
|
139
|
-
"onUpdate:modelValue":
|
|
138
|
+
modelValue: s(l).brandName,
|
|
139
|
+
"onUpdate:modelValue": n[0] || (n[0] = (m) => s(l).brandName = m),
|
|
140
140
|
placeholder: e.$t("goodsBrandInfo.brandNameRequired"),
|
|
141
141
|
maxlength: "30",
|
|
142
142
|
"show-word-limit": "",
|
|
@@ -149,15 +149,15 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
149
149
|
_: 1
|
|
150
150
|
}),
|
|
151
151
|
o(c, { span: 24 }, {
|
|
152
|
-
default:
|
|
152
|
+
default: t(() => [
|
|
153
153
|
o(u, {
|
|
154
154
|
label: e.$t("goodsBrandInfo.description"),
|
|
155
155
|
prop: "description"
|
|
156
156
|
}, {
|
|
157
|
-
default:
|
|
157
|
+
default: t(() => [
|
|
158
158
|
o(I, {
|
|
159
|
-
modelValue: s(
|
|
160
|
-
"onUpdate:modelValue":
|
|
159
|
+
modelValue: s(l).description,
|
|
160
|
+
"onUpdate:modelValue": n[1] || (n[1] = (m) => s(l).description = m),
|
|
161
161
|
type: "textarea",
|
|
162
162
|
placeholder: e.$t("goodsBrandInfo.descriptionRequired"),
|
|
163
163
|
"show-word-limit": "",
|
|
@@ -180,7 +180,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
180
180
|
}, 8, ["modelValue"]);
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
}), W = /* @__PURE__ */ T(G, [["__scopeId", "data-v-
|
|
183
|
+
}), W = /* @__PURE__ */ T(G, [["__scopeId", "data-v-05285e5f"]]);
|
|
184
184
|
export {
|
|
185
185
|
W as default
|
|
186
186
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as j, mergeModels as I, ref as v, reactive as C, useModel as E, resolveComponent as r, openBlock as F, createBlock as K, withCtx as l, createElementVNode as O, createVNode as o, createTextVNode as L, toDisplayString as N, unref as m } from "vue";
|
|
2
2
|
import { ElMessage as q } from "element-plus";
|
|
3
3
|
import { useI18n as S } from "vue-i18n";
|
|
4
|
-
import {
|
|
4
|
+
import { b as c } from "./index-C7oatDPl.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",
|
|
@@ -18,7 +18,7 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
18
18
|
emits: /* @__PURE__ */ I(["refresh"], ["update:modelValue"]),
|
|
19
19
|
setup(p, { emit: w }) {
|
|
20
20
|
const { t: u } = S(), b = v();
|
|
21
|
-
let
|
|
21
|
+
let a = C({
|
|
22
22
|
requestId: Math.random() * 10 + "",
|
|
23
23
|
updateMask: "labelName,labelCode,note"
|
|
24
24
|
});
|
|
@@ -44,34 +44,34 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
44
44
|
trigger: "change"
|
|
45
45
|
}
|
|
46
46
|
]
|
|
47
|
-
}),
|
|
47
|
+
}), s = E(p, "modelValue"), g = p, _ = w, R = Object.keys(g.entityKey), y = v(R.length >= 1);
|
|
48
48
|
y.value && c.findById(g.entityKey).then(({ data: e }) => {
|
|
49
|
-
Object.assign(
|
|
49
|
+
Object.assign(a, e);
|
|
50
50
|
});
|
|
51
51
|
const $ = async () => {
|
|
52
52
|
var e;
|
|
53
|
-
await ((e = b.value) == null ? void 0 : e.validate((
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
await ((e = b.value) == null ? void 0 : e.validate((t) => {
|
|
54
|
+
t && (y.value ? c.update(a).then((n) => {
|
|
55
|
+
n.status === 200 && (q({
|
|
56
56
|
message: u("common.submitSuccess"),
|
|
57
57
|
type: "success"
|
|
58
|
-
}),
|
|
59
|
-
}) : c.create(
|
|
60
|
-
|
|
58
|
+
}), s.value && (s.value = !1), _("refresh", n.status === 200));
|
|
59
|
+
}) : c.create(a).then((n) => {
|
|
60
|
+
n.status === 200 && (q({
|
|
61
61
|
message: u("common.submitSuccess"),
|
|
62
62
|
type: "success"
|
|
63
|
-
}),
|
|
63
|
+
}), s.value && (s.value = !1), _("refresh", n.status === 200));
|
|
64
64
|
}));
|
|
65
65
|
}));
|
|
66
66
|
};
|
|
67
67
|
function V() {
|
|
68
|
-
|
|
68
|
+
s.value && (s.value = !1);
|
|
69
69
|
}
|
|
70
|
-
return (e,
|
|
71
|
-
const
|
|
70
|
+
return (e, t) => {
|
|
71
|
+
const n = r("el-input"), i = r("el-form-item"), f = r("el-col"), M = r("el-row"), B = r("el-form"), h = r("el-button"), U = r("el-dialog");
|
|
72
72
|
return F(), K(U, {
|
|
73
|
-
modelValue:
|
|
74
|
-
"onUpdate:modelValue":
|
|
73
|
+
modelValue: s.value,
|
|
74
|
+
"onUpdate:modelValue": t[3] || (t[3] = (d) => s.value = d),
|
|
75
75
|
onClose: V
|
|
76
76
|
}, {
|
|
77
77
|
footer: l(() => [
|
|
@@ -97,7 +97,7 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
97
97
|
o(B, {
|
|
98
98
|
ref_key: "goodsLabelInfoFormRef",
|
|
99
99
|
ref: b,
|
|
100
|
-
model: m(
|
|
100
|
+
model: m(a),
|
|
101
101
|
"label-width": "120px",
|
|
102
102
|
rules: k
|
|
103
103
|
}, {
|
|
@@ -111,9 +111,9 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
111
111
|
prop: "labelName"
|
|
112
112
|
}, {
|
|
113
113
|
default: l(() => [
|
|
114
|
-
o(
|
|
115
|
-
modelValue: m(
|
|
116
|
-
"onUpdate:modelValue":
|
|
114
|
+
o(n, {
|
|
115
|
+
modelValue: m(a).labelName,
|
|
116
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => m(a).labelName = d),
|
|
117
117
|
placeholder: e.$t("goodsLabelInfo.labelNameRequired"),
|
|
118
118
|
maxlength: "30",
|
|
119
119
|
"show-word-limit": "",
|
|
@@ -132,9 +132,9 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
132
132
|
prop: "labelCode"
|
|
133
133
|
}, {
|
|
134
134
|
default: l(() => [
|
|
135
|
-
o(
|
|
136
|
-
modelValue: m(
|
|
137
|
-
"onUpdate:modelValue":
|
|
135
|
+
o(n, {
|
|
136
|
+
modelValue: m(a).labelCode,
|
|
137
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => m(a).labelCode = d),
|
|
138
138
|
placeholder: e.$t("goodsLabelInfo.labelCodeRequired"),
|
|
139
139
|
maxlength: "30",
|
|
140
140
|
"show-word-limit": "",
|
|
@@ -153,9 +153,9 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
153
153
|
prop: "note"
|
|
154
154
|
}, {
|
|
155
155
|
default: l(() => [
|
|
156
|
-
o(
|
|
157
|
-
modelValue: m(
|
|
158
|
-
"onUpdate:modelValue":
|
|
156
|
+
o(n, {
|
|
157
|
+
modelValue: m(a).note,
|
|
158
|
+
"onUpdate:modelValue": t[2] || (t[2] = (d) => m(a).note = d),
|
|
159
159
|
placeholder: e.$t("goodsLabelInfo.noteRequired"),
|
|
160
160
|
clearable: "",
|
|
161
161
|
type: "textarea"
|
|
@@ -177,7 +177,7 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
177
177
|
}, 8, ["modelValue"]);
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
}), P = /* @__PURE__ */ D(A, [["__scopeId", "data-v-
|
|
180
|
+
}), P = /* @__PURE__ */ D(A, [["__scopeId", "data-v-3bb58ee1"]]);
|
|
181
181
|
export {
|
|
182
182
|
P as default
|
|
183
183
|
};
|