xyvcard-goods 0.0.31 → 0.0.33
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/README.md +51 -51
- package/dist/GoodsBaseForm-6rzBkBTh.mjs +4 -0
- package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-BmIR352P.mjs +374 -0
- package/dist/GoodsLogisticsForm-CHyQ99Mt.mjs +10 -0
- package/dist/GoodsSpecForm-BqaN71rS.mjs +4 -0
- package/dist/GoodsSpecForm.vue_vue_type_script_setup_true_lang-BTFKRiNW.mjs +140 -0
- package/dist/{ImageUpload-BMw9FVJL.mjs → ImageUpload-Bf2jhRs5.mjs} +1 -1
- package/dist/edit copy 2-DnKLaz3I.mjs +45 -0
- package/dist/edit copy-tfwJCdiV.mjs +526 -0
- package/dist/{edit-DEKgI9dl.mjs → edit-1Lv_dvlq.mjs} +7 -7
- package/dist/{edit-WZ-vVp0_.mjs → edit-CZwlbL9o.mjs} +9 -9
- package/dist/{edit-CR4LNc6c.mjs → edit-D2zcGl_U.mjs} +1 -1
- package/dist/{edit-Bgvy3bUQ.mjs → edit-DBTNknBy.mjs} +4 -4
- package/dist/{edit-CAmBfr7s.mjs → edit-Db2EJ9dq.mjs} +4 -4
- package/dist/{edit.vue_vue_type_script_setup_true_lang-CSjc2-0k.mjs → edit.vue_vue_type_script_setup_true_lang-BmOhw098.mjs} +3 -3
- package/dist/el-message-BB2-39XJ.mjs +1221 -0
- package/dist/{index-Dy5vhMgv.mjs → index-BXa-atkT.mjs} +1 -1
- package/dist/{index-B9EvyZqu.mjs → index-BhUD_X30.mjs} +281 -250
- package/dist/{index-w0WaL9Bq.mjs → index-BpXZNA11.mjs} +3 -3
- package/dist/{index-CIOmQi5q.mjs → index-CRfiEzkA.mjs} +1489 -1478
- package/dist/{index-CCDQbidt.mjs → index-Cl4wz2yF.mjs} +3 -3
- package/dist/{index-CnXaunj4.mjs → index-DGYGNHfx.mjs} +3 -3
- package/dist/{index-Br8OH0po.mjs → index-DXIGHcIv.mjs} +2 -2
- package/dist/index-Df-F10aZ.mjs +264 -0
- package/dist/index-vHQhUQSO.mjs +95 -0
- package/dist/index.mjs +1 -1
- package/dist/{info-Cp_2nx9w.mjs → info-DDi6GKQH.mjs} +3 -3
- package/dist/{info-CzP-Zg-I.mjs → info-DfbU-CWk.mjs} +2 -2
- package/dist/{skuForm-D_Q4iyk2.mjs → skuForm-DWIoveRP.mjs} +14 -14
- package/dist/{skuForm-CVp5ywg4.mjs → skuForm-DoIpxDvq.mjs} +71 -86
- package/dist/{skuTable-DcYM5x3V.mjs → skuTable-BVBtWrf9.mjs} +13 -13
- package/dist/style.css +1 -1
- package/dts/api/goods-base/index.d.ts +11 -0
- package/dts/api/goods-base/types.d.ts +33 -0
- package/dts/api/goods-logistics/index.d.ts +8 -0
- package/dts/api/goods-logistics/types.d.ts +16 -0
- package/dts/api/goods-spec/index.d.ts +8 -0
- package/dts/api/goods-spec/types.d.ts +15 -0
- package/dts/api/goods-spu/index.d.ts +3 -0
- package/dts/api/goods-stock/index.d.ts +8 -0
- package/dts/api/goods-stock/types.d.ts +32 -0
- package/dts/api/index.d.ts +3 -0
- package/dts/constant.d.ts +26 -0
- package/dts/lang/goods/zh-cn.d.ts +12 -0
- package/dts/views/goods/goods-spu/components/GoodsBaseForm.vue.d.ts +7 -0
- package/dts/views/goods/goods-spu/components/GoodsLogisticsForm.vue.d.ts +2 -0
- package/dts/views/goods/goods-spu/components/GoodsSpecForm.vue.d.ts +7 -0
- package/dts/views/goods/goods-spu/edit copy 2.vue.d.ts +2 -0
- package/dts/views/goods/goods-spu/edit copy.vue.d.ts +2 -0
- package/package.json +63 -63
- package/dist/index-Ba-YRVAR.mjs +0 -228
- package/dts/views/goods/goods-combination/goodsList.vue.d.ts +0 -14
- package/dts/views/goods/goods-combination/skuTable.vue.d.ts +0 -40
- package/dts/views/goods/goods-spu/goodsList.vue.d.ts +0 -23
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as u, ref as f, computed as b, resolveComponent as l, createElementBlock as r, openBlock as n, createVNode as k, unref as s, isRef as v, withCtx as C, Fragment as B, renderList as y, createBlock as F } from "vue";
|
|
2
|
+
import { C as m } from "./index-Df-F10aZ.mjs";
|
|
3
|
+
import { _ as V } from "./GoodsBaseForm.vue_vue_type_script_setup_true_lang-BmIR352P.mjs";
|
|
4
|
+
import { _ as x } from "./GoodsSpecForm.vue_vue_type_script_setup_true_lang-BTFKRiNW.mjs";
|
|
5
|
+
import A from "./GoodsLogisticsForm-CHyQ99Mt.mjs";
|
|
6
|
+
const E = { class: "app-container" }, L = /* @__PURE__ */ u({
|
|
7
|
+
__name: "edit copy 2",
|
|
8
|
+
setup(G) {
|
|
9
|
+
const e = f(m.TAB_ENUM[0].key), c = {
|
|
10
|
+
GoodsBaseForm: V,
|
|
11
|
+
GoodsSpecForm: x,
|
|
12
|
+
GoodsLogisticsForm: A
|
|
13
|
+
};
|
|
14
|
+
b(
|
|
15
|
+
() => c[e.value]
|
|
16
|
+
);
|
|
17
|
+
function p(a, t) {
|
|
18
|
+
e.value = a.props.name;
|
|
19
|
+
}
|
|
20
|
+
return (a, t) => {
|
|
21
|
+
const _ = l("el-tab-pane"), i = l("el-tabs");
|
|
22
|
+
return n(), r("div", E, [
|
|
23
|
+
k(i, {
|
|
24
|
+
type: "border-card",
|
|
25
|
+
modelValue: s(e),
|
|
26
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => v(e) ? e.value = o : null),
|
|
27
|
+
class: "demo-tabs",
|
|
28
|
+
onTabClick: p
|
|
29
|
+
}, {
|
|
30
|
+
default: C(() => [
|
|
31
|
+
(n(!0), r(B, null, y(s(m).TAB_ENUM, (o, d) => (n(), F(_, {
|
|
32
|
+
key: d,
|
|
33
|
+
label: o.value,
|
|
34
|
+
name: o.key
|
|
35
|
+
}, null, 8, ["label", "name"]))), 128))
|
|
36
|
+
]),
|
|
37
|
+
_: 1
|
|
38
|
+
}, 8, ["modelValue"])
|
|
39
|
+
]);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
L as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { _ as J } from "./ImageUpload-Bf2jhRs5.mjs";
|
|
2
|
+
import { defineComponent as K, ref as v, reactive as T, resolveComponent as n, createElementBlock as V, openBlock as f, createElementVNode as c, createVNode as e, unref as t, withCtx as s, Fragment as w, renderList as R, createBlock as h, createTextVNode as U, toDisplayString as Q, createCommentVNode as X } from "vue";
|
|
3
|
+
import { ElMessage as $ } from "element-plus";
|
|
4
|
+
import { useRouter as Y, useRoute as Z } from "vue-router";
|
|
5
|
+
import { routerUtil as E } from "jmash-core";
|
|
6
|
+
import { useI18n as x } from "vue-i18n";
|
|
7
|
+
import { D as i, C as ee } from "./index-Df-F10aZ.mjs";
|
|
8
|
+
import { a as _ } from "./index-CRfiEzkA.mjs";
|
|
9
|
+
import { g as le } from "./index-BHmGYIuc.mjs";
|
|
10
|
+
import { WangEditor as oe } from "xyvcard-cms";
|
|
11
|
+
import te from "./skuForm-DWIoveRP.mjs";
|
|
12
|
+
const se = { class: "app-container" }, ae = { class: "search-container" }, ue = { class: "image-card" }, he = /* @__PURE__ */ K({
|
|
13
|
+
__name: "edit copy",
|
|
14
|
+
setup(de) {
|
|
15
|
+
const { t: m } = x();
|
|
16
|
+
i.brandListBizDict.useValues();
|
|
17
|
+
const S = Y(), g = Z(), I = v();
|
|
18
|
+
i.shopInfoBizDict.useValues(), i.goodsCategoryListBizLayDict.useValues(), i.labelListBizDict.useValues();
|
|
19
|
+
let o = T({
|
|
20
|
+
requestId: Math.random() * 10 + "",
|
|
21
|
+
updateMask: "labelIds,brandId,spuName,categoryIds,spuCode,note,freightType,freightAmount,picUrls,shelf,saleNum,sellPoint,specType,description",
|
|
22
|
+
skuSpecValues: [],
|
|
23
|
+
freightType: i.freightTypeEnum.values[0].key,
|
|
24
|
+
freightAmount: 0,
|
|
25
|
+
shelf: i.shelfDict.values[0].key,
|
|
26
|
+
specType: i.specTypeEnum.values[0].key
|
|
27
|
+
});
|
|
28
|
+
const C = (u, l, p) => {
|
|
29
|
+
var r;
|
|
30
|
+
const d = (r = o.picUrls) == null ? void 0 : r.split(",").filter(Boolean);
|
|
31
|
+
if (d != null && d.length) {
|
|
32
|
+
if ((d == null ? void 0 : d.length) < 1)
|
|
33
|
+
return p(new Error(m("goodsSpu.imageListsErrors")));
|
|
34
|
+
p();
|
|
35
|
+
} else return p(new Error(m("goodsSpu.picUrlsRequired")));
|
|
36
|
+
}, N = T({
|
|
37
|
+
brandId: [
|
|
38
|
+
{
|
|
39
|
+
required: !0,
|
|
40
|
+
message: m("goodsSpu.brandIdRequired"),
|
|
41
|
+
trigger: "change"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
spuName: [
|
|
45
|
+
{
|
|
46
|
+
required: !0,
|
|
47
|
+
message: m("goodsSpu.spuNameRequired"),
|
|
48
|
+
trigger: "blur"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
categoryIds: [
|
|
52
|
+
{
|
|
53
|
+
required: !0,
|
|
54
|
+
message: m("goodsSpu.categoryIdRequired"),
|
|
55
|
+
trigger: "change"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
spuCode: [
|
|
59
|
+
{
|
|
60
|
+
required: !0,
|
|
61
|
+
message: m("goodsSpu.spuCodeRequired"),
|
|
62
|
+
trigger: "change"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
freightType: [
|
|
66
|
+
{
|
|
67
|
+
required: !0,
|
|
68
|
+
message: m("goodsSpu.freightTypeRequired"),
|
|
69
|
+
trigger: "change"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
freightAmount: [
|
|
73
|
+
{
|
|
74
|
+
required: !0,
|
|
75
|
+
message: m("goodsSpu.freightAmountRequired"),
|
|
76
|
+
trigger: "blur"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
picUrls: [
|
|
80
|
+
{
|
|
81
|
+
validator: C,
|
|
82
|
+
trigger: "change"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
shelf: [
|
|
86
|
+
{
|
|
87
|
+
required: !0,
|
|
88
|
+
message: m("goodsSpu.shelfRequired"),
|
|
89
|
+
trigger: "change"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
specType: [
|
|
93
|
+
{
|
|
94
|
+
required: !0,
|
|
95
|
+
message: m("goodsSpu.specTypeRequired"),
|
|
96
|
+
trigger: "change"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}), q = v(!1);
|
|
100
|
+
function D(u) {
|
|
101
|
+
o.skuSpecValues.push(u), o.skuSpecValues = o.skuSpecValues.slice(-1);
|
|
102
|
+
}
|
|
103
|
+
function B(u) {
|
|
104
|
+
u.forEach((l) => {
|
|
105
|
+
var p;
|
|
106
|
+
o.specId = (p = l.specValues) == null ? void 0 : p.map((d) => d.specId), o.skuSpecValues.push(l);
|
|
107
|
+
}), o.skuSpecValues = o.skuSpecValues.slice(-u.length);
|
|
108
|
+
}
|
|
109
|
+
g.query.spuId && _.findById({ spuId: g.query.spuId }).then(({ data: u }) => {
|
|
110
|
+
Object.assign(o, u), q.value = !0, le.findById({ spuId: g.query.spuId }).then(({ data: l }) => {
|
|
111
|
+
o.ensureIds = l.ensures;
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
const L = async () => {
|
|
115
|
+
var u;
|
|
116
|
+
await ((u = I.value) == null ? void 0 : u.validate((l) => {
|
|
117
|
+
l && (g.query.spuId ? _.update(o).then((p) => {
|
|
118
|
+
p.status === 200 && ($({
|
|
119
|
+
message: m("common.submitSuccess"),
|
|
120
|
+
type: "success"
|
|
121
|
+
}), E.closeTagView(g.fullPath, S, !1));
|
|
122
|
+
}) : _.create(o).then((p) => {
|
|
123
|
+
p.status === 200 && ($({
|
|
124
|
+
message: m("common.submitSuccess"),
|
|
125
|
+
type: "success"
|
|
126
|
+
}), E.closeTagView(g.fullPath, S, !1));
|
|
127
|
+
}));
|
|
128
|
+
}));
|
|
129
|
+
};
|
|
130
|
+
function F(u) {
|
|
131
|
+
u === "FREIGHT_FREE" && (o.freightAmount = 0);
|
|
132
|
+
}
|
|
133
|
+
return (u, l) => {
|
|
134
|
+
const p = n("el-input"), d = n("el-form-item"), r = n("el-col"), A = n("el-option"), z = n("el-select"), P = n("el-tree-select"), b = n("jmash-enum-radio"), k = n("el-input-number"), G = J, j = n("jmash-dict-checkbox"), M = n("el-checkbox"), O = n("el-checkbox-group"), y = n("el-row"), H = n("el-button"), W = n("el-form");
|
|
135
|
+
return f(), V("div", se, [
|
|
136
|
+
c("div", ae, [
|
|
137
|
+
e(W, {
|
|
138
|
+
ref_key: "goodsSpuFormRef",
|
|
139
|
+
ref: I,
|
|
140
|
+
model: t(o),
|
|
141
|
+
"label-width": "120px",
|
|
142
|
+
rules: N
|
|
143
|
+
}, {
|
|
144
|
+
default: s(() => [
|
|
145
|
+
l[17] || (l[17] = c("div", { class: "title-content" }, "基本信息", -1)),
|
|
146
|
+
e(y, null, {
|
|
147
|
+
default: s(() => [
|
|
148
|
+
e(r, { span: 12 }, {
|
|
149
|
+
default: s(() => [
|
|
150
|
+
e(d, {
|
|
151
|
+
label: u.$t("goodsSpu.spuName"),
|
|
152
|
+
prop: "spuName"
|
|
153
|
+
}, {
|
|
154
|
+
default: s(() => [
|
|
155
|
+
e(p, {
|
|
156
|
+
modelValue: t(o).spuName,
|
|
157
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => t(o).spuName = a),
|
|
158
|
+
placeholder: u.$t("goodsSpu.spuNameRequired"),
|
|
159
|
+
maxlength: "60",
|
|
160
|
+
"show-word-limit": "",
|
|
161
|
+
clearable: ""
|
|
162
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
}, 8, ["label"])
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
}),
|
|
169
|
+
e(r, { span: 12 }, {
|
|
170
|
+
default: s(() => [
|
|
171
|
+
e(d, {
|
|
172
|
+
label: u.$t("goodsSpu.spuCode"),
|
|
173
|
+
prop: "spuCode"
|
|
174
|
+
}, {
|
|
175
|
+
default: s(() => [
|
|
176
|
+
e(p, {
|
|
177
|
+
modelValue: t(o).spuCode,
|
|
178
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => t(o).spuCode = a),
|
|
179
|
+
placeholder: u.$t("goodsSpu.spuCodeRequired"),
|
|
180
|
+
maxlength: "15",
|
|
181
|
+
"show-word-limit": "",
|
|
182
|
+
clearable: ""
|
|
183
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}, 8, ["label"])
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}),
|
|
190
|
+
e(r, { span: 12 }, {
|
|
191
|
+
default: s(() => [
|
|
192
|
+
e(d, {
|
|
193
|
+
label: u.$t("goodsSpu.brandId"),
|
|
194
|
+
prop: "brandId"
|
|
195
|
+
}, {
|
|
196
|
+
default: s(() => [
|
|
197
|
+
e(z, {
|
|
198
|
+
modelValue: t(o).brandId,
|
|
199
|
+
"onUpdate:modelValue": l[2] || (l[2] = (a) => t(o).brandId = a),
|
|
200
|
+
data: t(i).brandListBizDict.values,
|
|
201
|
+
placeholder: u.$t("goodsSpu.brandIdRequired"),
|
|
202
|
+
class: "w-full"
|
|
203
|
+
}, {
|
|
204
|
+
default: s(() => [
|
|
205
|
+
(f(!0), V(w, null, R(t(i).brandListBizDict.values, (a) => (f(), h(A, {
|
|
206
|
+
key: a.key,
|
|
207
|
+
label: a.value,
|
|
208
|
+
value: a.key
|
|
209
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
210
|
+
]),
|
|
211
|
+
_: 1
|
|
212
|
+
}, 8, ["modelValue", "data", "placeholder"])
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
}, 8, ["label"])
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}),
|
|
219
|
+
e(r, { span: 12 }, {
|
|
220
|
+
default: s(() => [
|
|
221
|
+
e(d, {
|
|
222
|
+
label: u.$t("goodsSpu.categoryId"),
|
|
223
|
+
prop: "categoryIds"
|
|
224
|
+
}, {
|
|
225
|
+
default: s(() => [
|
|
226
|
+
e(P, {
|
|
227
|
+
modelValue: t(o).categoryIds,
|
|
228
|
+
"onUpdate:modelValue": l[3] || (l[3] = (a) => t(o).categoryIds = a),
|
|
229
|
+
data: t(i).goodsCategoryListBizLayDict.values,
|
|
230
|
+
multiple: "",
|
|
231
|
+
"render-after-expand": !1,
|
|
232
|
+
"show-checkbox": "",
|
|
233
|
+
placeholder: u.$t("goodsSpu.categoryIdRequired"),
|
|
234
|
+
class: "w-full"
|
|
235
|
+
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["label"])
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
}),
|
|
242
|
+
e(r, { span: 12 }, {
|
|
243
|
+
default: s(() => [
|
|
244
|
+
e(d, {
|
|
245
|
+
label: u.$t("goodsSpu.freightType"),
|
|
246
|
+
prop: "freightType"
|
|
247
|
+
}, {
|
|
248
|
+
default: s(() => [
|
|
249
|
+
e(b, {
|
|
250
|
+
modelValue: t(o).freightType,
|
|
251
|
+
"onUpdate:modelValue": l[4] || (l[4] = (a) => t(o).freightType = a),
|
|
252
|
+
data: t(i).freightTypeEnum.values,
|
|
253
|
+
onChange: F
|
|
254
|
+
}, null, 8, ["modelValue", "data"])
|
|
255
|
+
]),
|
|
256
|
+
_: 1
|
|
257
|
+
}, 8, ["label"])
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}),
|
|
261
|
+
e(r, { span: 12 }, {
|
|
262
|
+
default: s(() => [
|
|
263
|
+
e(d, {
|
|
264
|
+
label: u.$t("goodsSpu.freightAmount"),
|
|
265
|
+
prop: "freightAmount"
|
|
266
|
+
}, {
|
|
267
|
+
default: s(() => [
|
|
268
|
+
e(k, {
|
|
269
|
+
modelValue: t(o).freightAmount,
|
|
270
|
+
"onUpdate:modelValue": l[5] || (l[5] = (a) => t(o).freightAmount = a),
|
|
271
|
+
readonly: t(o).freightType === "FREIGHT_FREE",
|
|
272
|
+
precision: 2,
|
|
273
|
+
step: 0.1,
|
|
274
|
+
controls: !1,
|
|
275
|
+
min: 0,
|
|
276
|
+
placeholder: u.$t("goodsSpu.freightAmountRequired"),
|
|
277
|
+
class: "w-full"
|
|
278
|
+
}, null, 8, ["modelValue", "readonly", "placeholder"])
|
|
279
|
+
]),
|
|
280
|
+
_: 1
|
|
281
|
+
}, 8, ["label"])
|
|
282
|
+
]),
|
|
283
|
+
_: 1
|
|
284
|
+
}),
|
|
285
|
+
e(r, { span: 24 }, {
|
|
286
|
+
default: s(() => [
|
|
287
|
+
e(d, {
|
|
288
|
+
label: u.$t("goodsSpu.picUrls"),
|
|
289
|
+
prop: "picUrls"
|
|
290
|
+
}, {
|
|
291
|
+
default: s(() => [
|
|
292
|
+
c("div", ue, [
|
|
293
|
+
e(G, {
|
|
294
|
+
modelValue: t(o).picUrls,
|
|
295
|
+
"onUpdate:modelValue": l[6] || (l[6] = (a) => t(o).picUrls = a),
|
|
296
|
+
limit: 6,
|
|
297
|
+
"list-type": "picture-card"
|
|
298
|
+
}, null, 8, ["modelValue"]),
|
|
299
|
+
l[15] || (l[15] = c("div", { class: "red-color" }, " 推荐尺寸:100*100或同比例图片,最少上传1张 ", -1))
|
|
300
|
+
])
|
|
301
|
+
]),
|
|
302
|
+
_: 1
|
|
303
|
+
}, 8, ["label"])
|
|
304
|
+
]),
|
|
305
|
+
_: 1
|
|
306
|
+
}),
|
|
307
|
+
e(r, { span: 12 }, {
|
|
308
|
+
default: s(() => [
|
|
309
|
+
e(d, {
|
|
310
|
+
label: u.$t("goodsSpu.shelf"),
|
|
311
|
+
prop: "shelf"
|
|
312
|
+
}, {
|
|
313
|
+
default: s(() => [
|
|
314
|
+
e(b, {
|
|
315
|
+
modelValue: t(o).shelf,
|
|
316
|
+
"onUpdate:modelValue": l[7] || (l[7] = (a) => t(o).shelf = a),
|
|
317
|
+
data: t(i).shelfDict.values
|
|
318
|
+
}, null, 8, ["modelValue", "data"])
|
|
319
|
+
]),
|
|
320
|
+
_: 1
|
|
321
|
+
}, 8, ["label"])
|
|
322
|
+
]),
|
|
323
|
+
_: 1
|
|
324
|
+
}),
|
|
325
|
+
e(r, { span: 12 }, {
|
|
326
|
+
default: s(() => [
|
|
327
|
+
e(d, {
|
|
328
|
+
label: u.$t("goodsSpu.saleNum"),
|
|
329
|
+
prop: "saleNum"
|
|
330
|
+
}, {
|
|
331
|
+
default: s(() => [
|
|
332
|
+
e(k, {
|
|
333
|
+
modelValue: t(o).saleNum,
|
|
334
|
+
"onUpdate:modelValue": l[8] || (l[8] = (a) => t(o).saleNum = a),
|
|
335
|
+
placeholder: u.$t("goodsSpu.saleNumRequired"),
|
|
336
|
+
class: "w-full",
|
|
337
|
+
min: 0,
|
|
338
|
+
controls: !1,
|
|
339
|
+
precision: 0
|
|
340
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
341
|
+
]),
|
|
342
|
+
_: 1
|
|
343
|
+
}, 8, ["label"])
|
|
344
|
+
]),
|
|
345
|
+
_: 1
|
|
346
|
+
}),
|
|
347
|
+
e(r, { span: 24 }, {
|
|
348
|
+
default: s(() => [
|
|
349
|
+
e(d, {
|
|
350
|
+
label: u.$t("goodsSpu.sellPoint"),
|
|
351
|
+
prop: "sellPoint"
|
|
352
|
+
}, {
|
|
353
|
+
default: s(() => [
|
|
354
|
+
e(p, {
|
|
355
|
+
modelValue: t(o).sellPoint,
|
|
356
|
+
"onUpdate:modelValue": l[9] || (l[9] = (a) => t(o).sellPoint = a),
|
|
357
|
+
placeholder: u.$t("goodsSpu.sellPointRequired"),
|
|
358
|
+
maxlength: "250",
|
|
359
|
+
"show-word-limit": "",
|
|
360
|
+
clearable: "",
|
|
361
|
+
rows: 4,
|
|
362
|
+
type: "textarea"
|
|
363
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["label"])
|
|
367
|
+
]),
|
|
368
|
+
_: 1
|
|
369
|
+
}),
|
|
370
|
+
e(r, { span: 24 }, {
|
|
371
|
+
default: s(() => [
|
|
372
|
+
e(d, {
|
|
373
|
+
label: u.$t("goodsLabelInfo.note"),
|
|
374
|
+
prop: "note"
|
|
375
|
+
}, {
|
|
376
|
+
default: s(() => [
|
|
377
|
+
e(p, {
|
|
378
|
+
modelValue: t(o).note,
|
|
379
|
+
"onUpdate:modelValue": l[10] || (l[10] = (a) => t(o).note = a),
|
|
380
|
+
placeholder: u.$t("goodsLabelInfo.noteRequired"),
|
|
381
|
+
maxlength: "250",
|
|
382
|
+
"show-word-limit": "",
|
|
383
|
+
clearable: "",
|
|
384
|
+
rows: 4,
|
|
385
|
+
type: "textarea"
|
|
386
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
387
|
+
]),
|
|
388
|
+
_: 1
|
|
389
|
+
}, 8, ["label"])
|
|
390
|
+
]),
|
|
391
|
+
_: 1
|
|
392
|
+
}),
|
|
393
|
+
e(r, { span: 24 }, {
|
|
394
|
+
default: s(() => [
|
|
395
|
+
e(d, {
|
|
396
|
+
label: u.$t("goodsSpu.ensureIds"),
|
|
397
|
+
prop: "ensureIds"
|
|
398
|
+
}, {
|
|
399
|
+
default: s(() => [
|
|
400
|
+
e(j, {
|
|
401
|
+
modelValue: t(o).ensureIds,
|
|
402
|
+
"onUpdate:modelValue": l[11] || (l[11] = (a) => t(o).ensureIds = a),
|
|
403
|
+
"type-code": t(ee).DICT_GOODS_ENSURE
|
|
404
|
+
}, null, 8, ["modelValue", "type-code"])
|
|
405
|
+
]),
|
|
406
|
+
_: 1
|
|
407
|
+
}, 8, ["label"])
|
|
408
|
+
]),
|
|
409
|
+
_: 1
|
|
410
|
+
}),
|
|
411
|
+
e(r, { span: 24 }, {
|
|
412
|
+
default: s(() => [
|
|
413
|
+
e(d, {
|
|
414
|
+
label: u.$t("goodsSpu.labelIds"),
|
|
415
|
+
prop: "labelIds"
|
|
416
|
+
}, {
|
|
417
|
+
default: s(() => [
|
|
418
|
+
e(O, {
|
|
419
|
+
modelValue: t(o).labelIds,
|
|
420
|
+
"onUpdate:modelValue": l[12] || (l[12] = (a) => t(o).labelIds = a),
|
|
421
|
+
class: "w-full"
|
|
422
|
+
}, {
|
|
423
|
+
default: s(() => [
|
|
424
|
+
(f(!0), V(w, null, R(t(i).labelListBizDict.values, (a) => (f(), h(M, {
|
|
425
|
+
key: a.key,
|
|
426
|
+
label: a.key
|
|
427
|
+
}, {
|
|
428
|
+
default: s(() => [
|
|
429
|
+
U(Q(a.value), 1)
|
|
430
|
+
]),
|
|
431
|
+
_: 2
|
|
432
|
+
}, 1032, ["label"]))), 128))
|
|
433
|
+
]),
|
|
434
|
+
_: 1
|
|
435
|
+
}, 8, ["modelValue"])
|
|
436
|
+
]),
|
|
437
|
+
_: 1
|
|
438
|
+
}, 8, ["label"])
|
|
439
|
+
]),
|
|
440
|
+
_: 1
|
|
441
|
+
})
|
|
442
|
+
]),
|
|
443
|
+
_: 1
|
|
444
|
+
}),
|
|
445
|
+
l[18] || (l[18] = c("div", { class: "title-content" }, "商品规格", -1)),
|
|
446
|
+
e(y, null, {
|
|
447
|
+
default: s(() => [
|
|
448
|
+
e(r, { span: 24 }, {
|
|
449
|
+
default: s(() => [
|
|
450
|
+
e(d, {
|
|
451
|
+
label: u.$t("goodsSpu.specType"),
|
|
452
|
+
prop: "specType"
|
|
453
|
+
}, {
|
|
454
|
+
default: s(() => [
|
|
455
|
+
e(b, {
|
|
456
|
+
modelValue: t(o).specType,
|
|
457
|
+
"onUpdate:modelValue": l[13] || (l[13] = (a) => t(o).specType = a),
|
|
458
|
+
data: t(i).specTypeEnum.values
|
|
459
|
+
}, null, 8, ["modelValue", "data"])
|
|
460
|
+
]),
|
|
461
|
+
_: 1
|
|
462
|
+
}, 8, ["label"])
|
|
463
|
+
]),
|
|
464
|
+
_: 1
|
|
465
|
+
}),
|
|
466
|
+
!t(g).query.spuId || q.value ? (f(), h(te, {
|
|
467
|
+
key: 0,
|
|
468
|
+
"spec-type": t(o).specType,
|
|
469
|
+
form: t(o),
|
|
470
|
+
onGetGoodsSku: D,
|
|
471
|
+
onGetFormData: B
|
|
472
|
+
}, null, 8, ["spec-type", "form"])) : X("", !0)
|
|
473
|
+
]),
|
|
474
|
+
_: 1
|
|
475
|
+
}),
|
|
476
|
+
l[19] || (l[19] = c("div", { class: "title-content" }, "商品详情", -1)),
|
|
477
|
+
e(y, null, {
|
|
478
|
+
default: s(() => [
|
|
479
|
+
e(r, { span: 24 }, {
|
|
480
|
+
default: s(() => [
|
|
481
|
+
e(d, {
|
|
482
|
+
label: u.$t("goodsSpu.description"),
|
|
483
|
+
prop: "description"
|
|
484
|
+
}, {
|
|
485
|
+
default: s(() => [
|
|
486
|
+
e(t(oe), {
|
|
487
|
+
modelValue: t(o).description,
|
|
488
|
+
"onUpdate:modelValue": l[14] || (l[14] = (a) => t(o).description = a),
|
|
489
|
+
style: { width: "100%" }
|
|
490
|
+
}, null, 8, ["modelValue"])
|
|
491
|
+
]),
|
|
492
|
+
_: 1
|
|
493
|
+
}, 8, ["label"])
|
|
494
|
+
]),
|
|
495
|
+
_: 1
|
|
496
|
+
}),
|
|
497
|
+
e(d, null, {
|
|
498
|
+
default: s(() => [
|
|
499
|
+
e(H, {
|
|
500
|
+
type: "primary",
|
|
501
|
+
onClick: L
|
|
502
|
+
}, {
|
|
503
|
+
default: s(() => l[16] || (l[16] = [
|
|
504
|
+
U("保存", -1)
|
|
505
|
+
])),
|
|
506
|
+
_: 1,
|
|
507
|
+
__: [16]
|
|
508
|
+
})
|
|
509
|
+
]),
|
|
510
|
+
_: 1
|
|
511
|
+
})
|
|
512
|
+
]),
|
|
513
|
+
_: 1
|
|
514
|
+
})
|
|
515
|
+
]),
|
|
516
|
+
_: 1,
|
|
517
|
+
__: [17, 18, 19]
|
|
518
|
+
}, 8, ["model", "rules"])
|
|
519
|
+
])
|
|
520
|
+
]);
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
export {
|
|
525
|
+
he as default
|
|
526
|
+
};
|
|
@@ -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, createBlock as F, openBlock as K, withCtx as o, createVNode as l, unref as r, createElementVNode as O, createTextVNode as L, toDisplayString as N } from "vue";
|
|
2
2
|
import { ElMessage as w } from "element-plus";
|
|
3
3
|
import { useI18n as S } from "vue-i18n";
|
|
4
|
-
import { b as
|
|
4
|
+
import { b as p } from "./index-CRfiEzkA.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",
|
|
@@ -16,7 +16,7 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
16
16
|
modelModifiers: {}
|
|
17
17
|
}),
|
|
18
18
|
emits: /* @__PURE__ */ v(["refresh"], ["update:modelValue"]),
|
|
19
|
-
setup(
|
|
19
|
+
setup(c, { emit: k }) {
|
|
20
20
|
const { t: u } = S(), b = I();
|
|
21
21
|
let a = C({
|
|
22
22
|
requestId: Math.random() * 10 + "",
|
|
@@ -37,19 +37,19 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
37
37
|
trigger: "change"
|
|
38
38
|
}
|
|
39
39
|
]
|
|
40
|
-
}), s = E(
|
|
41
|
-
y.value &&
|
|
40
|
+
}), s = E(c, "modelValue"), g = c, _ = k, $ = Object.keys(g.entityKey), y = I($.length >= 1);
|
|
41
|
+
y.value && p.findById(g.entityKey).then(({ data: e }) => {
|
|
42
42
|
Object.assign(a, e);
|
|
43
43
|
});
|
|
44
44
|
const R = async () => {
|
|
45
45
|
var e;
|
|
46
46
|
await ((e = b.value) == null ? void 0 : e.validate((t) => {
|
|
47
|
-
t && (y.value ?
|
|
47
|
+
t && (y.value ? p.update(a).then((n) => {
|
|
48
48
|
n.status === 200 && (w({
|
|
49
49
|
message: u("common.submitSuccess"),
|
|
50
50
|
type: "success"
|
|
51
51
|
}), s.value && (s.value = !1), _("refresh", n.status === 200));
|
|
52
|
-
}) :
|
|
52
|
+
}) : p.create(a).then((n) => {
|
|
53
53
|
n.status === 200 && (w({
|
|
54
54
|
message: u("common.submitSuccess"),
|
|
55
55
|
type: "success"
|
|
@@ -170,7 +170,7 @@ const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
|
|
|
170
170
|
}, 8, ["modelValue"]);
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
}), P = /* @__PURE__ */ D(A, [["__scopeId", "data-v-
|
|
173
|
+
}), P = /* @__PURE__ */ D(A, [["__scopeId", "data-v-da50884a"]]);
|
|
174
174
|
export {
|
|
175
175
|
P as default
|
|
176
176
|
};
|
|
@@ -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, createBlock as K, openBlock as O, withCtx as l, createVNode as o, unref as d, createElementVNode as x, createTextVNode as w, toDisplayString as U } 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-BXa-atkT.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",
|
|
@@ -32,13 +32,13 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
32
32
|
]
|
|
33
33
|
}), a = F(f, "modelValue"), _ = f;
|
|
34
34
|
function M(e) {
|
|
35
|
-
t.logoUrl = e;
|
|
35
|
+
t.logoUrl = e.response.fileSrc;
|
|
36
36
|
}
|
|
37
|
-
const b = $,
|
|
37
|
+
const b = $, S = Object.keys(_.entityKey), y = B(S.length >= 1);
|
|
38
38
|
y.value && p.findById(_.entityKey).then(({ data: e }) => {
|
|
39
39
|
Object.assign(t, e);
|
|
40
40
|
});
|
|
41
|
-
const
|
|
41
|
+
const j = async () => {
|
|
42
42
|
var e;
|
|
43
43
|
await ((e = g.value) == null ? void 0 : e.validate((n) => {
|
|
44
44
|
n && (y.value ? p.update(t).then((s) => {
|
|
@@ -58,7 +58,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
58
58
|
a.value && (a.value = !1);
|
|
59
59
|
}
|
|
60
60
|
return (e, n) => {
|
|
61
|
-
const s = r("jmash-single-image-upload"), u = r("el-form-item"), c = r("el-col"), v = r("el-input"),
|
|
61
|
+
const s = r("jmash-single-image-upload"), u = r("el-form-item"), c = r("el-col"), v = r("el-input"), q = r("el-row"), R = r("el-form"), I = r("el-button"), D = r("el-dialog");
|
|
62
62
|
return O(), K(D, {
|
|
63
63
|
modelValue: a.value,
|
|
64
64
|
"onUpdate:modelValue": n[2] || (n[2] = (m) => a.value = m),
|
|
@@ -74,7 +74,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
74
74
|
}),
|
|
75
75
|
o(I, {
|
|
76
76
|
type: "primary",
|
|
77
|
-
onClick:
|
|
77
|
+
onClick: j
|
|
78
78
|
}, {
|
|
79
79
|
default: l(() => [
|
|
80
80
|
w(U(e.$t("common.confirm")), 1)
|
|
@@ -84,7 +84,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
84
84
|
])
|
|
85
85
|
]),
|
|
86
86
|
default: l(() => [
|
|
87
|
-
o(
|
|
87
|
+
o(R, {
|
|
88
88
|
ref_key: "goodsBrandInfoFormRef",
|
|
89
89
|
ref: g,
|
|
90
90
|
model: d(t),
|
|
@@ -92,7 +92,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
92
92
|
rules: C
|
|
93
93
|
}, {
|
|
94
94
|
default: l(() => [
|
|
95
|
-
o(
|
|
95
|
+
o(q, null, {
|
|
96
96
|
default: l(() => [
|
|
97
97
|
o(c, { span: 24 }, {
|
|
98
98
|
default: l(() => [
|
|
@@ -166,7 +166,7 @@ const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
|
|
|
166
166
|
}, 8, ["modelValue"]);
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
}), W = /* @__PURE__ */ T(G, [["__scopeId", "data-v-
|
|
169
|
+
}), W = /* @__PURE__ */ T(G, [["__scopeId", "data-v-a7bde704"]]);
|
|
170
170
|
export {
|
|
171
171
|
W as default
|
|
172
172
|
};
|