xyvcard-goods 0.0.22 → 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.
Files changed (37) hide show
  1. package/dist/{edit-Nuaz9WSB.mjs → edit-9jPSycsG.mjs} +185 -165
  2. package/dist/{edit-exVf8d8b.mjs → edit-CJpoa4Ck.mjs} +69 -68
  3. package/dist/{edit-DxnsmaXV.mjs → edit-CWQMgvVP.mjs} +38 -38
  4. package/dist/{edit-Byv9oYAC.mjs → edit-DU-BEAcq.mjs} +1 -1
  5. package/dist/{edit-BcokSKfN.mjs → edit-Ziwv43v0.mjs} +27 -27
  6. package/dist/{edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs → edit.vue_vue_type_script_setup_true_lang-BP0C4d2-.mjs} +8 -7
  7. package/dist/{goodsList-CZUqc4nm.mjs → goodsList-2AwsJVoO.mjs} +1 -1
  8. package/dist/{goodsList-IWDAvKOx.mjs → goodsList-CyWliLjg.mjs} +1 -1
  9. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs → goodsList.vue_vue_type_script_setup_true_lang-Bq06GIMe.mjs} +2 -2
  10. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs → goodsList.vue_vue_type_script_setup_true_lang-DjKzEAB7.mjs} +136 -147
  11. package/dist/{index-4i7TnWvV.mjs → index-8E7BciYp.mjs} +7 -6
  12. package/dist/{index-BVGn6Q_T.mjs → index-B1H5hqEi.mjs} +2 -2
  13. package/dist/{index-B_U2s9fI.mjs → index-B88acg0Q.mjs} +2 -2
  14. package/dist/{index-_xxSoBUe.mjs → index-BdP_dXBK.mjs} +3 -3
  15. package/dist/index-C7oatDPl.mjs +4432 -0
  16. package/dist/{index-CQIttgns.mjs → index-DPjR32Kv.mjs} +3 -3
  17. package/dist/{index-r0u-27m7.mjs → index-DR3Gk44r.mjs} +1 -1
  18. package/dist/index-jCpYt-EU.mjs +221 -0
  19. package/dist/index.mjs +6 -2875
  20. package/dist/info-BEMxnD6-.mjs +325 -0
  21. package/dist/{info-BQaaTFry.mjs → info-DFIeVs66.mjs} +3 -3
  22. package/dist/{skuForm-CgjMd46J.mjs → skuForm-BhAbf2AG.mjs} +16 -16
  23. package/dist/skuForm-C2aQcL90.mjs +314 -0
  24. package/dist/{skuTable-CyGQuTvR.mjs → skuTable-9JJqGeRx.mjs} +255 -208
  25. package/dist/style.css +1 -1
  26. package/dts/api/goods-spu/index.d.ts +3 -1
  27. package/dts/api/goods-spu/types.d.ts +12 -1
  28. package/dts/index.d.ts +4 -0
  29. package/dts/router/index.d.ts +1 -0
  30. package/package.json +1 -1
  31. package/dist/index-DR7GlHNd.mjs +0 -1288
  32. package/dist/index-Dvaotk7B.mjs +0 -325
  33. package/dist/index-jTDhsbYM.mjs +0 -141
  34. package/dist/info-BH4MW3Sw.mjs +0 -365
  35. package/dist/sku-B-IzfYLq.mjs +0 -52
  36. package/dist/skuForm-AMIoZkH-.mjs +0 -287
  37. package/dist/skuTable-DDWSmvoz.mjs +0 -592
@@ -1,365 +0,0 @@
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
- import { fileApi as w, routerUtil as F } from "jmash-core";
3
- import { useRouter as H, useRoute as O } from "vue-router";
4
- import { D as d, C as N, S as R } from "./index-Dvaotk7B.mjs";
5
- import Y from "./skuTable-CyGQuTvR.mjs";
6
- import { goodsSpuApi as G } from "./index.mjs";
7
- import { g as J } from "./index-BHmGYIuc.mjs";
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
- __name: "info",
10
- setup(ve) {
11
- d.brandListBizDict.useValues(), d.labelListBizDict.useValues();
12
- const U = H(), V = O(), u = y({}), $ = y([]), g = y([]), P = y([]), E = y([]), T = q(() => g.value.filter(
13
- (t) => t.name && t.specValueList != null && t.specValueList.length
14
- ));
15
- j(
16
- T,
17
- (t) => t,
18
- {
19
- deep: !0,
20
- immediate: !0
21
- }
22
- ), d.shopInfoBizDict.useValues(), d.goodsCategoryListBizLayDict.useValues(), V.query.spuId && G.findById({ spuId: V.query.spuId }).then(({ data: t }) => {
23
- var c, v, o;
24
- u.value = Object.assign(u, t), $.value = (c = t.picUrls) == null ? void 0 : c.split(","), J.findById({ spuId: V.query.spuId }).then(({ data: p }) => {
25
- u.value.ensureIds = p.ensures;
26
- }), t.specType === N.SPEC_TYPE.MULTI_SPEC && (P.value = (v = t.skuList) == null ? void 0 : v.results, (o = t.skuList) == null || o.results.forEach((p) => {
27
- var m;
28
- (m = p.specValues) == null || m.map((h) => {
29
- d.specInfoDict.useValues().then((D) => {
30
- const l = D.find((f) => h.specId === f.key);
31
- if (l) {
32
- let f = {
33
- id: h.specId,
34
- name: l.value,
35
- specValueList: []
36
- };
37
- g.value.push(f);
38
- }
39
- const C = /* @__PURE__ */ new Map();
40
- g.value = g.value.filter(
41
- (f) => !C.has(f.id) && C.set(f.id, f)
42
- ), z(h.specValueId);
43
- });
44
- });
45
- }));
46
- });
47
- function z(t) {
48
- g.value.forEach((c) => {
49
- E.value = new R({ specId: c.id }), E.value.useValues().then((v) => {
50
- v.forEach((o) => {
51
- if (o.key === t) {
52
- let m = {
53
- id: t,
54
- name: o.value
55
- };
56
- c.specValueList.push(m);
57
- }
58
- const p = /* @__PURE__ */ new Map();
59
- c.specValueList = c.specValueList.filter(
60
- (m) => !p.has(m.id) && p.set(m.id, m)
61
- );
62
- });
63
- });
64
- });
65
- }
66
- function A() {
67
- F.closeTagView(V.fullPath, U, !1);
68
- }
69
- return (t, c) => {
70
- const v = b("el-button"), o = b("el-descriptions-item"), p = b("el-tag"), m = b("el-image"), h = b("el-descriptions"), D = b("el-card");
71
- return r(), k("div", K, [
72
- i(D, { shadow: "never" }, {
73
- header: e(() => [
74
- i(v, {
75
- type: "primary",
76
- onClick: A
77
- }, {
78
- default: e(() => [
79
- n(s(t.$t("common.back")), 1)
80
- ]),
81
- _: 1
82
- })
83
- ]),
84
- default: e(() => [
85
- c[0] || (c[0] = a("div", { class: "title-content" }, "基本信息", -1)),
86
- i(h, {
87
- class: "margin-top",
88
- column: 2,
89
- border: ""
90
- }, {
91
- default: e(() => [
92
- i(o, null, {
93
- label: e(() => [
94
- a("div", Q, s(t.$t("goodsSpu.spuName")), 1)
95
- ]),
96
- default: e(() => [
97
- n(" " + s(u.value.spuName), 1)
98
- ]),
99
- _: 1
100
- }),
101
- i(o, null, {
102
- label: e(() => [
103
- a("div", W, s(t.$t("goodsSpu.spuCode")), 1)
104
- ]),
105
- default: e(() => [
106
- n(" " + s(u.value.spuCode), 1)
107
- ]),
108
- _: 1
109
- }),
110
- i(o, null, {
111
- label: e(() => [
112
- a("div", X, s(t.$t("goodsSpu.categoryId")), 1)
113
- ]),
114
- default: e(() => [
115
- (r(!0), k(L, null, I(u.value.categoryIds, (l) => (r(), S(p, {
116
- type: "info",
117
- key: l,
118
- style: { "margin-right": "8px", "margin-bottom": "4px" }
119
- }, {
120
- default: e(() => [
121
- n(s(_(d).goodsCategoryListBizLayDict.getValue(l) || l), 1)
122
- ]),
123
- _: 2
124
- }, 1024))), 128))
125
- ]),
126
- _: 1
127
- }),
128
- i(o, null, {
129
- label: e(() => [
130
- a("div", Z, s(t.$t("goodsSpu.brandId")), 1)
131
- ]),
132
- default: e(() => [
133
- n(" " + s(_(d).brandListBizDict.getValue(u.value.brandId)), 1)
134
- ]),
135
- _: 1
136
- }),
137
- i(o, null, {
138
- label: e(() => [
139
- a("div", x, s(t.$t("goodsSpu.labelIds")), 1)
140
- ]),
141
- default: e(() => [
142
- (r(!0), k(L, null, I(u.value.labelIds, (l) => (r(), S(p, {
143
- type: "info",
144
- key: l,
145
- style: { "margin-right": "8px", "margin-bottom": "4px" }
146
- }, {
147
- default: e(() => [
148
- n(s(_(d).labelListBizDict.getValue(l) || l), 1)
149
- ]),
150
- _: 2
151
- }, 1024))), 128))
152
- ]),
153
- _: 1
154
- }),
155
- i(o, null, {
156
- label: e(() => [
157
- a("div", ee, s(t.$t("goodsSpu.picUrls")), 1)
158
- ]),
159
- default: e(() => [
160
- (r(!0), k(L, null, I($.value, (l) => (r(), S(m, {
161
- key: l,
162
- src: _(w).imageUrl(l, 80, 80),
163
- "preview-src-list": [_(w).imageUrl(l)],
164
- "preview-teleported": "",
165
- "hide-on-click-modal": "",
166
- fit: "contain"
167
- }, null, 8, ["src", "preview-src-list"]))), 128))
168
- ]),
169
- _: 1
170
- }),
171
- i(o, null, {
172
- label: e(() => [
173
- a("div", le, s(t.$t("goodsSpu.freightType")), 1)
174
- ]),
175
- default: e(() => [
176
- n(" " + s(_(d).freightTypeEnum.getEnumValue(
177
- u.value.freightType
178
- )), 1)
179
- ]),
180
- _: 1
181
- }),
182
- i(o, null, {
183
- label: e(() => [
184
- a("div", se, s(t.$t("goodsSpu.freightAmount")), 1)
185
- ]),
186
- default: e(() => [
187
- n(" " + s(u.value.freightAmount), 1)
188
- ]),
189
- _: 1
190
- }),
191
- i(o, null, {
192
- label: e(() => [
193
- a("div", te, s(t.$t("goodsSpu.shelf")), 1)
194
- ]),
195
- default: e(() => [
196
- n(" " + s(_(d).shelfDict.getValue(u.value.shelf)), 1)
197
- ]),
198
- _: 1
199
- }),
200
- i(o, null, {
201
- label: e(() => [
202
- a("div", oe, s(t.$t("goodsSpu.saleNum")), 1)
203
- ]),
204
- default: e(() => [
205
- n(" " + s(u.value.saleNum), 1)
206
- ]),
207
- _: 1
208
- }),
209
- i(o, null, {
210
- label: e(() => [
211
- a("div", ue, s(t.$t("goodsSpu.sellPoint")), 1)
212
- ]),
213
- default: e(() => [
214
- n(" " + s(u.value.sellPoint), 1)
215
- ]),
216
- _: 1
217
- }),
218
- i(o, null, {
219
- label: e(() => [
220
- a("div", ae, s(t.$t("goodsSpu.ensureIds")), 1)
221
- ]),
222
- default: e(() => [
223
- (r(!0), k(L, null, I(u.value.ensureIds, (l) => (r(), S(p, {
224
- type: "info",
225
- key: l
226
- }, {
227
- default: e(() => [
228
- n(s(_(d).goodsEnsureDict.getDictValue(l)), 1)
229
- ]),
230
- _: 2
231
- }, 1024))), 128))
232
- ]),
233
- _: 1
234
- })
235
- ]),
236
- _: 1
237
- }),
238
- a("div", ie, " 商品规格(" + s(_(d).specTypeEnum.getEnumValue(u.value.specType)) + ") ", 1),
239
- u.value.specType == _(N).SPEC_TYPE.UNIFIED_SPEC ? (r(), S(h, {
240
- key: 0,
241
- class: "margin-top",
242
- column: 2,
243
- border: ""
244
- }, {
245
- default: e(() => [
246
- i(o, null, {
247
- label: e(() => [
248
- a("div", ne, s(t.$t("goodsSpu.salePrice")), 1)
249
- ]),
250
- default: e(() => {
251
- var l;
252
- return [
253
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].salePrice) + "元 ", 1)
254
- ];
255
- }),
256
- _: 1
257
- }),
258
- i(o, null, {
259
- label: e(() => [
260
- a("div", ce, s(t.$t("goodsSpu.salePriceV2")), 1)
261
- ]),
262
- default: e(() => {
263
- var l;
264
- return [
265
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].salePriceV2) + "元 ", 1)
266
- ];
267
- }),
268
- _: 1
269
- }),
270
- i(o, null, {
271
- label: e(() => [
272
- a("div", de, s(t.$t("goodsSpu.salePriceV3")), 1)
273
- ]),
274
- default: e(() => {
275
- var l;
276
- return [
277
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].salePriceV3) + "元 ", 1)
278
- ];
279
- }),
280
- _: 1
281
- }),
282
- i(o, null, {
283
- label: e(() => [
284
- a("div", re, s(t.$t("goodsSpu.marketPrice")), 1)
285
- ]),
286
- default: e(() => {
287
- var l;
288
- return [
289
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].marketPrice) + "元 ", 1)
290
- ];
291
- }),
292
- _: 1
293
- }),
294
- i(o, null, {
295
- label: e(() => [
296
- a("div", pe, s(t.$t("goodsSpu.costPrice")), 1)
297
- ]),
298
- default: e(() => {
299
- var l;
300
- return [
301
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].costPrice) + "元 ", 1)
302
- ];
303
- }),
304
- _: 1
305
- }),
306
- i(o, null, {
307
- label: e(() => [
308
- a("div", me, s(t.$t("goodsSpu.stock")), 1)
309
- ]),
310
- default: e(() => {
311
- var l;
312
- return [
313
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].stock), 1)
314
- ];
315
- }),
316
- _: 1
317
- }),
318
- i(o, null, {
319
- label: e(() => [
320
- a("div", _e, s(t.$t("goodsSpu.weight")), 1)
321
- ]),
322
- default: e(() => {
323
- var l;
324
- return [
325
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].weight), 1)
326
- ];
327
- }),
328
- _: 1
329
- }),
330
- i(o, null, {
331
- label: e(() => [
332
- a("div", fe, s(t.$t("goodsSpu.volume")), 1)
333
- ]),
334
- default: e(() => {
335
- var l;
336
- return [
337
- n(" " + s((l = u.value.skuList) == null ? void 0 : l.results[0].volume), 1)
338
- ];
339
- }),
340
- _: 1
341
- })
342
- ]),
343
- _: 1
344
- })) : B("", !0),
345
- g.value.length > 0 ? (r(), S(Y, {
346
- key: 1,
347
- specData: T.value,
348
- goodsSku: P.value,
349
- isSettingShow: !1
350
- }, null, 8, ["specData", "goodsSku"])) : B("", !0),
351
- c[1] || (c[1] = a("div", { class: "title-content" }, "商品描述", -1)),
352
- a("div", {
353
- innerHTML: u.value.description
354
- }, null, 8, ge)
355
- ]),
356
- _: 1,
357
- __: [0, 1]
358
- })
359
- ]);
360
- };
361
- }
362
- });
363
- export {
364
- Ie as default
365
- };
@@ -1,52 +0,0 @@
1
- function $(e, n = [], t) {
2
- const { optionValue: l = "id", optionText: d = "name" } = t || {}, f = [];
3
- let h = 0;
4
- const V = {}, L = I(e);
5
- if (e.length === 0) return f;
6
- e.forEach((c) => {
7
- const { specValueList: s } = c;
8
- if (!s || s.length === 0) return !0;
9
- h = (h || 1) * s.length;
10
- }), n.forEach((c) => {
11
- const { specs: s, ...u } = c;
12
- V[s.map((p) => `${p.specId}_${p.specValueId}`).join("|")] = u;
13
- });
14
- for (let c = 0; c < h; c++) {
15
- const s = [], u = [];
16
- e.forEach((i, r) => {
17
- const { specValueList: a } = i;
18
- let o = {};
19
- if (!a || a.length === 0) return !0;
20
- if (a.length > 1) {
21
- const m = Math.floor(c / L[r]) % a.length;
22
- o = e[r].specValueList[m];
23
- } else
24
- o = e[r].specValueList[0];
25
- !i[l] || !o[l] || (u.push(`${i[l]}_${o[l]}`), s.push({
26
- specId: i[l],
27
- specName: i[d],
28
- specValueId: o[l],
29
- specValueName: o[d]
30
- }));
31
- });
32
- const { ...p } = V[u.join("|")] || {};
33
- f.push({ ...p, specs: s });
34
- }
35
- return f;
36
- }
37
- function I(e) {
38
- const n = [];
39
- for (let t = e.length - 1; t >= 0; t--)
40
- e[t + 1] && e[t + 1].specValueList ? n[t] = e[t + 1].specValueList.length * n[t + 1] || 1 : n[t] = 1;
41
- return n;
42
- }
43
- function g(e) {
44
- return Array.from(new Set(e));
45
- }
46
- function v(e, n) {
47
- return e = g(e), n = g(n), e.concat(n).filter((t) => !(e.includes(t) && n.includes(t)));
48
- }
49
- export {
50
- v as d,
51
- $ as f
52
- };
@@ -1,287 +0,0 @@
1
- import { defineComponent as D, openBlock as _, createElementBlock as T, createElementVNode as z, ref as V, watch as C, resolveComponent as c, createBlock as b, withCtx as r, createVNode as o, unref as g, Fragment as M, renderList as Y, createCommentVNode as G, createTextVNode as H, toDisplayString as x } from "vue";
2
- import { useI18n as J } from "vue-i18n";
3
- import { D as E, C as v } from "./index-Dvaotk7B.mjs";
4
- import { goodsSpuApi as K } from "./index.mjs";
5
- import "jmash-core";
6
- import { specValueApi as Q } from "xyvcard-shop";
7
- import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
- /*! Element Plus Icons Vue v2.3.1 */
9
- var X = /* @__PURE__ */ D({
10
- name: "Plus",
11
- __name: "plus",
12
- setup(I) {
13
- return (y, P) => (_(), T("svg", {
14
- xmlns: "http://www.w3.org/2000/svg",
15
- viewBox: "0 0 1024 1024"
16
- }, [
17
- z("path", {
18
- fill: "currentColor",
19
- d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
20
- })
21
- ]));
22
- }
23
- }), Z = X;
24
- const w = /* @__PURE__ */ D({
25
- __name: "skuForm",
26
- props: {
27
- form: {
28
- type: Object,
29
- default: () => {
30
- }
31
- }
32
- },
33
- emits: ["getGoodsSku", "getFormData"],
34
- setup(I, { emit: y }) {
35
- const { t: P } = J(), k = V([]), d = V([
36
- {
37
- salePrice: 0,
38
- skuId: "",
39
- spuId: "",
40
- spuName: "",
41
- saleNum: 0,
42
- picUrl: "",
43
- specType: "",
44
- skuOptions: []
45
- }
46
- ]);
47
- E.goodsSpuBizDict.useValues();
48
- const $ = y;
49
- function B(l, e) {
50
- l.picUrl = e;
51
- }
52
- const S = I;
53
- C(
54
- S.form,
55
- (l) => l,
56
- {
57
- deep: !0,
58
- immediate: !0
59
- }
60
- ), S.form.spuId;
61
- function F(l) {
62
- const e = d.value.indexOf(l.row);
63
- e !== 0 && d.value.splice(e, 1);
64
- }
65
- function O() {
66
- d.value.push({
67
- salePrice: 0,
68
- skuId: "",
69
- spuId: "",
70
- spuName: "",
71
- saleNum: 0,
72
- picUrl: "",
73
- specType: "",
74
- skuOptions: []
75
- });
76
- }
77
- const N = V({});
78
- async function j(l) {
79
- if (!k.value[l])
80
- try {
81
- const { data: e } = await Q.findById({
82
- specValueId: l
83
- });
84
- return k.value[l] = e.valueName, e.valueName;
85
- } catch {
86
- }
87
- }
88
- async function A(l, e) {
89
- var n, p;
90
- if (e.skuId = "", e.skuOptions = [], e.picUrl = "", e.salePrice = 0, e.saleNum = 0, !l) {
91
- e.skuId = "", e.picUrl = "", e.salePrice = 0, e.saleNum = 0, e.skuOptions = [];
92
- return;
93
- }
94
- try {
95
- const { data: u } = await K.findById({ spuId: l });
96
- if (e.specType = u.specType, e.specType === v.SPEC_TYPE.UNIFIED_SPEC && (e.picUrl = u.picUrls ? u.picUrls.split(",")[0] : "", e.salePrice = (n = u.skuList) == null ? void 0 : n.results[0].salePrice, e.saleNum = (p = u.skuList) == null ? void 0 : p.results[0].stock), e.specType === v.SPEC_TYPE.MULTI_SPEC && u.skuList) {
97
- const m = u.skuList.results, f = m.map((s) => s.specValues && Array.isArray(s.specValues) ? s.specValues.map(
98
- (i) => i.specValueId
99
- ) : []), h = f.flat().map((s) => j(s));
100
- await Promise.all(h);
101
- const U = f.map(
102
- (s) => s.map((i) => k.value[i] || i)
103
- );
104
- e.skuOptions = m.map((s, i) => ({
105
- key: s.skuId,
106
- value: U[i].join(", "),
107
- picUrl: s.picUrl || (u.picUrls ? u.picUrls.split(",")[0] : ""),
108
- salePrice: s.salePrice,
109
- stock: s.stock
110
- })), m.forEach((s) => {
111
- s.skuId && (N.value[s.skuId] = {
112
- ...s,
113
- spuPicUrls: u.picUrls
114
- });
115
- });
116
- }
117
- } catch {
118
- }
119
- }
120
- function L(l) {
121
- const e = d.value.find((n) => n.skuId === l);
122
- if (e && l) {
123
- const n = N.value[l];
124
- if (n) {
125
- const p = n.spuPicUrls ? n.spuPicUrls.split(",")[0] : "";
126
- e.picUrl = n.picUrl || p, e.salePrice = n.salePrice, e.saleNum = n.stock;
127
- }
128
- }
129
- }
130
- return C(
131
- d,
132
- (l) => {
133
- $("getGoodsSku", l);
134
- },
135
- {
136
- deep: !0,
137
- immediate: !0
138
- }
139
- ), (l, e) => {
140
- const n = c("jmash-select"), p = c("el-table-column"), u = c("el-option"), m = c("el-select"), f = c("jmash-single-image-upload"), h = c("el-input-number"), U = c("DeleteFilled"), s = c("el-icon"), i = c("el-table"), R = c("el-button"), q = c("el-row");
141
- return _(), b(q, null, {
142
- default: r(() => [
143
- o(i, {
144
- data: d.value,
145
- border: "",
146
- style: { width: "100%" }
147
- }, {
148
- default: r(() => [
149
- o(p, {
150
- label: l.$t("goodsSpu.spuName"),
151
- prop: "spuId",
152
- "header-align": "center"
153
- }, {
154
- default: r(({ row: a }) => [
155
- o(n, {
156
- modelValue: a.spuId,
157
- "onUpdate:modelValue": (t) => a.spuId = t,
158
- data: g(E).goodsSpuBizDict.values,
159
- filterable: "",
160
- clearable: "",
161
- placeholder: l.$t("goodsSpu.spuNameRequireds"),
162
- class: "w-full",
163
- onChange: (t) => A(a.spuId, a)
164
- }, null, 8, ["modelValue", "onUpdate:modelValue", "data", "placeholder", "onChange"])
165
- ]),
166
- _: 1
167
- }, 8, ["label"]),
168
- o(p, {
169
- label: l.$t("goodsSpu.specType"),
170
- prop: "skuId",
171
- "header-align": "center"
172
- }, {
173
- default: r(({ row: a }) => [
174
- o(m, {
175
- modelValue: a.skuId,
176
- "onUpdate:modelValue": (t) => a.skuId = t,
177
- placeholder: l.$t("goodsSpu.specTypeRequired"),
178
- disabled: a.specType === g(v).SPEC_TYPE.UNIFIED_SPEC,
179
- onChange: (t) => L(a.skuId)
180
- }, {
181
- default: r(() => [
182
- (_(!0), T(M, null, Y(a.skuOptions, (t) => (_(), b(u, {
183
- key: t.key,
184
- label: t.value,
185
- value: t.key
186
- }, null, 8, ["label", "value"]))), 128))
187
- ]),
188
- _: 2
189
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "onChange"])
190
- ]),
191
- _: 1
192
- }, 8, ["label"]),
193
- o(p, {
194
- label: l.$t("goodsSpu.picUrls"),
195
- prop: "picUrl",
196
- width: "105",
197
- "header-align": "center"
198
- }, {
199
- default: r(({ row: a }) => [
200
- o(f, {
201
- "picture-url": a.picUrl,
202
- onImageSrc: (t) => B(a, t),
203
- width: 80,
204
- type: "trans"
205
- }, null, 8, ["picture-url", "onImageSrc"])
206
- ]),
207
- _: 1
208
- }, 8, ["label"]),
209
- o(p, {
210
- label: l.$t("goodsSpu.salePriceV1"),
211
- prop: "salePrice",
212
- "header-align": "center"
213
- }, {
214
- default: r(({ row: a }) => [
215
- o(h, {
216
- modelValue: a.salePrice,
217
- "onUpdate:modelValue": (t) => a.salePrice = t,
218
- precision: 2,
219
- min: 0,
220
- placeholder: l.$t("goodsSpu.salePriceV1Required"),
221
- class: "w-full",
222
- controls: !1
223
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
224
- ]),
225
- _: 1
226
- }, 8, ["label"]),
227
- o(p, {
228
- label: l.$t("goodsSpu.saleNums"),
229
- prop: "saleNum",
230
- "header-align": "center"
231
- }, {
232
- default: r(({ row: a }) => [
233
- o(h, {
234
- modelValue: a.saleNum,
235
- "onUpdate:modelValue": (t) => a.saleNum = t,
236
- placeholder: l.$t("goodsSpu.saleNumRequireds"),
237
- class: "w-full",
238
- controls: !1,
239
- precision: 0,
240
- min: 0
241
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
242
- ]),
243
- _: 1
244
- }, 8, ["label"]),
245
- o(p, {
246
- label: l.$t("common.operate"),
247
- width: "60",
248
- align: "center"
249
- }, {
250
- default: r((a) => [
251
- a.$index !== 0 ? (_(), b(s, {
252
- key: 0,
253
- onClick: (t) => F(a),
254
- size: "18",
255
- style: { cursor: "pointer", color: "inherit" },
256
- class: "hover-blue"
257
- }, {
258
- default: r(() => [
259
- o(U)
260
- ]),
261
- _: 2
262
- }, 1032, ["onClick"])) : G("", !0)
263
- ]),
264
- _: 1
265
- }, 8, ["label"])
266
- ]),
267
- _: 1
268
- }, 8, ["data"]),
269
- o(R, {
270
- icon: g(Z),
271
- class: "addButton",
272
- onClick: O
273
- }, {
274
- default: r(() => [
275
- H(x(g(P)("common.add")), 1)
276
- ]),
277
- _: 1
278
- }, 8, ["icon"])
279
- ]),
280
- _: 1
281
- });
282
- };
283
- }
284
- }), ue = /* @__PURE__ */ W(w, [["__scopeId", "data-v-429eb573"]]);
285
- export {
286
- ue as default
287
- };