xyvcard-goods 0.0.34 → 0.0.35

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 (64) hide show
  1. package/dist/BatchSetting-B1LcBFPD.mjs +333 -0
  2. package/dist/ChannelProfit-CNSIK87d.mjs +4 -0
  3. package/dist/ChannelProfit.vue_vue_type_script_setup_true_lang-BVTifRY8.mjs +320 -0
  4. package/dist/{GoodsBaseForm-BSvXc_XA.mjs → GoodsBaseForm-BZ2fZmmp.mjs} +1 -1
  5. package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-BxBTTLdA.mjs +407 -0
  6. package/dist/{GoodsLogisticsForm-1Bbd4Z52.mjs → GoodsLogisticsForm-BqlwdGQ1.mjs} +1 -1
  7. package/dist/{GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-PSnPNbmT.mjs → GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-DJREiSkD.mjs} +56 -57
  8. package/dist/GoodsProfitForm-COYRi8sx.mjs +4 -0
  9. package/dist/GoodsProfitForm.vue_vue_type_script_setup_true_lang-BYPWP95J.mjs +2550 -0
  10. package/dist/{GoodsSpecForm-Ddo1IZLZ.mjs → GoodsSpecForm-B4MtETRy.mjs} +1 -1
  11. package/dist/{GoodsSpecForm.vue_vue_type_script_setup_true_lang-CdWIufm4.mjs → GoodsSpecForm.vue_vue_type_script_setup_true_lang-BbVK_KNz.mjs} +130 -121
  12. package/dist/SingleSku-rWv9vVhv.mjs +351 -0
  13. package/dist/constant-sVd2JbJt.mjs +115 -0
  14. package/dist/edit-B1cmsJpy.mjs +70 -0
  15. package/dist/{edit-lfXK_dUp.mjs → edit-Br1Y569l.mjs} +8 -7
  16. package/dist/{edit-e5-aXV6K.mjs → edit-CET8Fr-t.mjs} +1 -1
  17. package/dist/{edit-pUKONjxH.mjs → edit-CagYTFKr.mjs} +1 -1
  18. package/dist/{edit-BgtwinSN.mjs → edit-iJGrWlSv.mjs} +1 -1
  19. package/dist/{edit.vue_vue_type_script_setup_true_lang-BtGT564r.mjs → edit.vue_vue_type_script_setup_true_lang-D_0YivhL.mjs} +2 -2
  20. package/dist/{el-message-BB2-39XJ.mjs → el-message-Dj6aaz4G.mjs} +490 -373
  21. package/dist/{index-DyLLV1NK.mjs → index copy-kNLE7fPg.mjs } +6 -5
  22. package/dist/index-C61SQFSx.mjs +264 -0
  23. package/dist/index-CeWPdEJD.mjs +713 -0
  24. package/dist/{index-CkJncbVf.mjs → index-Cg6GUdSP.mjs} +3 -3
  25. package/dist/index-CyxnVWnL.mjs +182 -0
  26. package/dist/{index-CkMWas2b.mjs → index-D9s8hsVw.mjs} +3 -3
  27. package/dist/{index-BSzOTWcG.mjs → index-DbnKa_BJ.mjs} +1 -1
  28. package/dist/{index-ChQ-ZxD1.mjs → index-DoxTu4kg.mjs} +5 -4
  29. package/dist/{index-BpKiAhvt.mjs → index-kw0UYOIu.mjs} +3 -3
  30. package/dist/{index-DhS4AuWf.mjs → index-xQgC-8Gd.mjs} +1106 -1038
  31. package/dist/index.mjs +1 -1
  32. package/dist/info-CTElDVo6.mjs +376 -0
  33. package/dist/{info-DOKoSi7a.mjs → info-DpGJgdac.mjs} +5 -4
  34. package/dist/{skuForm-DVGkw6rD.mjs → skuForm-C7w9YIDe.mjs} +24 -23
  35. package/dist/skuForm-CPlnCToi.mjs +279 -0
  36. package/dist/skuTable-C-LcASbX.mjs +594 -0
  37. package/dist/spec-DkiGCkuM.mjs +44 -0
  38. package/dist/style.css +1 -1
  39. package/dts/xyvcard-goods/src/api/dict.d.ts +5 -4
  40. package/dts/xyvcard-goods/src/api/goods-sku/types.d.ts +3 -0
  41. package/dts/xyvcard-goods/src/api/goods-spu/index.d.ts +4 -1
  42. package/dts/xyvcard-goods/src/api/goods-spu/types.d.ts +35 -9
  43. package/dts/xyvcard-goods/src/api/types.d.ts +4 -0
  44. package/dts/xyvcard-goods/src/lang/goods/zh-cn.d.ts +32 -0
  45. package/dts/xyvcard-goods/src/router/index.d.ts +1 -0
  46. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/BatchSetting.vue.d.ts +35 -0
  47. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/ChannelProfit.vue.d.ts +22 -0
  48. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsProfitForm.vue.d.ts +34 -0
  49. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/SingleSku.vue.d.ts +23 -0
  50. package/dts/xyvcard-goods/src/views/goods/goods-spu/index copy.vue.d.ts +2 -0
  51. package/dts/xyvcard-goods/src/views/goods/goods-spu/skuForm.vue.d.ts +17 -4
  52. package/dts/xyvcard-goods/src/views/goods/goods-spu/skuTable.vue.d.ts +14 -1
  53. package/dts/xyvcard-goods/src/views/goods/goods-spu/spec.vue.d.ts +2 -0
  54. package/package.json +4 -3
  55. package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-rsmqHXbJ.mjs +0 -381
  56. package/dist/edit copy 2-Yzf_M31V.mjs +0 -59
  57. package/dist/edit copy-CCnzlrgL.mjs +0 -526
  58. package/dist/edit-Dke5sWct.mjs +0 -526
  59. package/dist/index-BHmGYIuc.mjs +0 -24
  60. package/dist/index-Da2R0n8O.mjs +0 -374
  61. package/dist/index-vHQhUQSO.mjs +0 -95
  62. package/dist/info-De_pBN6A.mjs +0 -365
  63. package/dist/skuForm-YXHrhyPI.mjs +0 -476
  64. package/dist/skuTable-DOIQ9kiV.mjs +0 -639
@@ -0,0 +1,594 @@
1
+ import { defineComponent as x, ref as B, computed as K, watch as O, reactive as H, resolveComponent as A, createElementBlock as L, openBlock as P, createBlock as D, createCommentVNode as C, createVNode as r, unref as g, withCtx as a, Fragment as J, renderList as Q, createTextVNode as W, toDisplayString as I, createElementVNode as k } from "vue";
2
+ import { D as X } from "./index-C61SQFSx.mjs";
3
+ import { fileApi as j } from "jmash-core";
4
+ import Z from "./BatchSetting-B1LcBFPD.mjs";
5
+ import { C as F } from "./constant-sVd2JbJt.mjs";
6
+ import { useI18n as ee } from "vue-i18n";
7
+ import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
+ function te(s, S = [], V) {
9
+ const { optionValue: h = "id", optionText: m = "name" } = V || {}, y = [];
10
+ let $ = 0;
11
+ const w = {}, R = se(s);
12
+ if (s.length === 0) return y;
13
+ s.forEach((U) => {
14
+ const { specValueList: b } = U;
15
+ if (!b || b.length === 0) return !0;
16
+ $ = ($ || 1) * b.length;
17
+ }), S.forEach((U) => {
18
+ const { specs: b, ...q } = U;
19
+ w[b.map((f) => `${f.specId}_${f.specValueId}`).join("|")] = q;
20
+ });
21
+ for (let U = 0; U < $; U++) {
22
+ const b = [], q = [];
23
+ s.forEach((_, l) => {
24
+ const { specValueList: u } = _;
25
+ let e = {};
26
+ if (!u || u.length === 0) return !0;
27
+ if (u.length > 1) {
28
+ const n = Math.floor(U / R[l]) % u.length;
29
+ e = s[l].specValueList[n];
30
+ } else
31
+ e = s[l].specValueList[0];
32
+ !_[h] || !e[h] || (q.push(`${_[h]}_${e[h]}`), b.push({
33
+ specId: _[h],
34
+ specName: _[m],
35
+ specValueId: e[h],
36
+ specValueName: e[m]
37
+ }));
38
+ });
39
+ const { ...f } = w[q.join("|")] || {};
40
+ y.push({ ...f, specs: b });
41
+ }
42
+ return y;
43
+ }
44
+ function se(s) {
45
+ const S = [];
46
+ for (let V = s.length - 1; V >= 0; V--)
47
+ s[V + 1] && s[V + 1].specValueList ? S[V] = s[V + 1].specValueList.length * S[V + 1] || 1 : S[V] = 1;
48
+ return S;
49
+ }
50
+ function G(s) {
51
+ return Array.from(new Set(s));
52
+ }
53
+ function ue(s, S) {
54
+ return s = G(s), S = G(S), s.concat(S).filter((V) => !(s.includes(V) && S.includes(V)));
55
+ }
56
+ const oe = { key: 1 }, ae = /* @__PURE__ */ x({
57
+ __name: "skuTable",
58
+ props: {
59
+ // 规格批量设置模型
60
+ form: {
61
+ type: Object,
62
+ default: () => ({})
63
+ },
64
+ specData: {
65
+ type: Array,
66
+ default() {
67
+ return [];
68
+ }
69
+ },
70
+ goodsSku: {
71
+ type: Array,
72
+ default() {
73
+ return [];
74
+ }
75
+ },
76
+ // 是否显示批量设置,主要是用于详情展示
77
+ isSettingShow: {
78
+ type: Boolean,
79
+ default: !0
80
+ }
81
+ },
82
+ emits: ["getGoodsSku", "getFormData"],
83
+ setup(s, { expose: S, emit: V }) {
84
+ const { t: h } = ee(), m = B([]), y = V, $ = s, w = K(() => {
85
+ let l = te($.specData, [], {}).map((e) => ({
86
+ specValues: e.specs,
87
+ specIds: e.specs.reduce(
88
+ (n, p, o) => `${n}${p.specId}-${p.specValueId}${o === e.specs.length - 1 ? "" : "_"}`,
89
+ ""
90
+ )
91
+ })), u = $.goodsSku.map((e) => {
92
+ var n;
93
+ return {
94
+ ...e,
95
+ specIds: (n = e.specValues) == null ? void 0 : n.reduce(
96
+ (p, o, c) => `${p}${o.specId}-${o.specValueId}${c === e.specValues.length - 1 ? "" : "_"}`,
97
+ ""
98
+ )
99
+ };
100
+ });
101
+ return l.forEach((e) => {
102
+ u.forEach((n) => {
103
+ let p = e.specIds.split("_"), o = n.specIds.split("_"), c = !0;
104
+ p.forEach((v) => {
105
+ o.find((E) => E == v) || (c = !1);
106
+ }), c && (e.picUrl = n.picUrl ?? "", e.skuCode = n.skuCode ?? "", e.skuId = n.skuId ?? "", e.salePrice = n.salePrice ?? null, e.marketPrice = n.marketPrice ?? null, e.costPrice = n.costPrice ?? null, e.stock = n.stock ?? null, e.status = n.status ?? !0, e.pointsDeduct = n.pointsDeduct ?? null, e.earnestAmount = Number(n.earnestAmount) || null, e.depositAmount = Number(n.depositAmount) || null);
107
+ });
108
+ }), l;
109
+ });
110
+ O(
111
+ w,
112
+ (l, u) => {
113
+ var n, p;
114
+ if (!l || !l.length) return m.value = [];
115
+ if (!u || !u.length)
116
+ return;
117
+ if (((n = l[0].specValues) == null ? void 0 : n.length) !== ((p = u[0].specValues) == null ? void 0 : p.length))
118
+ return m.value = l.map((o) => ({
119
+ ...o,
120
+ picUrl: "",
121
+ skuCode: "",
122
+ salePrice: null,
123
+ marketPrice: null,
124
+ costPrice: null,
125
+ stock: null,
126
+ pointsDeduct: null,
127
+ earnestAmount: null,
128
+ depositAmount: null,
129
+ status: !0
130
+ }));
131
+ if (l.length === u.length)
132
+ return m.value = l.map((o, c) => ({
133
+ ...m.value[c],
134
+ ...o
135
+ }));
136
+ const e = R(l, u);
137
+ if (l.length > u.length) {
138
+ let o = [];
139
+ l.forEach((c) => {
140
+ const v = m.value.find(
141
+ (E) => E.specIds === c.specIds
142
+ );
143
+ v ? o.push(v) : o.push({
144
+ ...c,
145
+ picUrl: "",
146
+ skuCode: "",
147
+ salePrice: null,
148
+ marketPrice: null,
149
+ costPrice: null,
150
+ stock: null,
151
+ pointsDeduct: null,
152
+ earnestAmount: null,
153
+ depositAmount: null,
154
+ status: !0
155
+ });
156
+ }), m.value = o;
157
+ } else
158
+ m.value = m.value.filter(
159
+ (o) => !e.includes(o.specIds)
160
+ );
161
+ m.value = l.map((o) => ({
162
+ ...o,
163
+ picUrl: o.picUrl ?? "",
164
+ skuCode: o.skuCode ?? "",
165
+ salePrice: o.salePrice ?? null,
166
+ marketPrice: o.marketPrice ?? null,
167
+ costPrice: o.costPrice ?? null,
168
+ stock: o.stock ?? null,
169
+ pointsDeduct: o.pointsDeduct ?? null,
170
+ earnestAmount: o.earnestAmount ?? null,
171
+ depositAmount: o.depositAmount ?? null,
172
+ status: o.status ?? !0
173
+ }));
174
+ },
175
+ {
176
+ deep: !0,
177
+ immediate: !0
178
+ }
179
+ ), O(
180
+ m,
181
+ (l) => {
182
+ y("getFormData", l);
183
+ },
184
+ {
185
+ deep: !0,
186
+ immediate: !0
187
+ }
188
+ );
189
+ function R(l, u) {
190
+ return l = l.map((e) => e.specIds), u = u.map((e) => e.specIds), ue(l, u);
191
+ }
192
+ function U(l) {
193
+ m.value = m.value.map((u) => ({
194
+ ...u,
195
+ ...l
196
+ }));
197
+ }
198
+ function b(l, u) {
199
+ u.picUrl = l.response.fileSrc;
200
+ }
201
+ const f = H({
202
+ picUrl: [
203
+ {
204
+ validator: (l, u, e) => {
205
+ if (!u)
206
+ return e(new Error(h("goodsSpu.picUrlRequired")));
207
+ e();
208
+ },
209
+ trigger: "change"
210
+ }
211
+ ],
212
+ salePrice: [
213
+ {
214
+ required: !0,
215
+ message: h("goodsSpu.salePriceRequired"),
216
+ trigger: "blur"
217
+ }
218
+ ],
219
+ costPrice: [
220
+ {
221
+ required: !0,
222
+ message: h("goodsSpu.costPriceRequired"),
223
+ trigger: "blur"
224
+ }
225
+ ],
226
+ marketPrice: [
227
+ {
228
+ required: !0,
229
+ message: h("goodsSpu.marketPriceRequired"),
230
+ trigger: "blur"
231
+ }
232
+ ],
233
+ pointsDeduct: [
234
+ {
235
+ required: !0,
236
+ message: h("goodsSpu.pointsDeductRequired"),
237
+ trigger: "blur"
238
+ }
239
+ ],
240
+ earnestAmount: [
241
+ {
242
+ required: !0,
243
+ message: h("goodsSpu.earnestAmountRequired"),
244
+ trigger: "blur"
245
+ }
246
+ ],
247
+ depositAmount: [
248
+ {
249
+ required: !0,
250
+ message: h("goodsSpu.depositAmountRequired"),
251
+ trigger: "blur"
252
+ }
253
+ ],
254
+ stock: [
255
+ { required: !0, message: h("goodsSpu.stockRequired"), trigger: "blur" }
256
+ ]
257
+ }), _ = B();
258
+ return S({
259
+ formRef: () => _.value
260
+ }), (l, u) => {
261
+ const e = A("el-table-column"), n = A("jmash-single-image-upload"), p = A("el-form-item"), o = A("el-image"), c = A("el-input-number"), v = A("el-input"), E = A("el-switch"), M = A("el-table"), Y = A("el-form");
262
+ return P(), L("div", null, [
263
+ s.isSettingShow ? (P(), D(Z, {
264
+ key: 0,
265
+ "goods-spec-model": s.form,
266
+ onBatchSetting: U
267
+ }, null, 8, ["goods-spec-model"])) : C("", !0),
268
+ r(Y, {
269
+ ref_key: "formRef",
270
+ ref: _,
271
+ model: s.form,
272
+ rules: g(f),
273
+ class: "w-full"
274
+ }, {
275
+ default: a(() => [
276
+ r(M, {
277
+ data: m.value,
278
+ border: "",
279
+ class: "w-full top-dis"
280
+ }, {
281
+ default: a(() => {
282
+ var T, N, z;
283
+ return [
284
+ r(e, {
285
+ type: "index",
286
+ label: l.$t("goodsSpu.index"),
287
+ width: "55",
288
+ align: "center"
289
+ }, null, 8, ["label"]),
290
+ (P(!0), L(J, null, Q(s.specData, (t, d) => (P(), D(e, {
291
+ key: t.id,
292
+ prop: t.id,
293
+ label: t.name
294
+ }, {
295
+ default: a(({ row: i }) => [
296
+ W(I(i.specValues[d].specValueName), 1)
297
+ ]),
298
+ _: 2
299
+ }, 1032, ["prop", "label"]))), 128)),
300
+ r(e, {
301
+ prop: "picUrl",
302
+ "min-width": "104"
303
+ }, {
304
+ header: a(() => [
305
+ u[0] || (u[0] = k("span", { class: "required_red" }, "*", -1)),
306
+ k("span", null, I(l.$t("goodsSpu.picUrl")), 1)
307
+ ]),
308
+ default: a(({ row: t, $index: d }) => [
309
+ s.isSettingShow ? (P(), D(p, {
310
+ key: 0,
311
+ prop: "skuSpecValues." + d + ".picUrl",
312
+ rules: g(f).picUrl
313
+ }, {
314
+ default: a(() => [
315
+ r(n, {
316
+ "picture-url": t.picUrl,
317
+ onUploadFile: (i) => b(i, t)
318
+ }, null, 8, ["picture-url", "onUploadFile"])
319
+ ]),
320
+ _: 2
321
+ }, 1032, ["prop", "rules"])) : (P(), D(o, {
322
+ key: 1,
323
+ "preview-teleported": "",
324
+ style: { width: "80px", height: "80px" },
325
+ src: g(j).imageUrl(t.picUrl, 80, 80),
326
+ "zoom-rate": 1.2,
327
+ "max-scale": 7,
328
+ "min-scale": 0.2,
329
+ "preview-src-list": [g(j).imageUrl(t.picUrl)],
330
+ fit: "cover"
331
+ }, null, 8, ["src", "preview-src-list"]))
332
+ ]),
333
+ _: 1
334
+ }),
335
+ r(e, {
336
+ prop: "salePrice",
337
+ "min-width": "120"
338
+ }, {
339
+ header: a(() => [
340
+ u[1] || (u[1] = k("span", { class: "required_red" }, "*", -1)),
341
+ k("span", null, I(l.$t("goodsSpu.salePrice")), 1)
342
+ ]),
343
+ default: a(({ row: t, $index: d }) => [
344
+ r(p, {
345
+ prop: "skuSpecValues." + d + ".salePrice",
346
+ rules: g(f).salePrice
347
+ }, {
348
+ default: a(() => [
349
+ r(c, {
350
+ modelValue: t.salePrice,
351
+ "onUpdate:modelValue": (i) => t.salePrice = i,
352
+ precision: 2,
353
+ size: "small",
354
+ controls: !1,
355
+ class: "w-full",
356
+ disabled: !s.isSettingShow
357
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
358
+ ]),
359
+ _: 2
360
+ }, 1032, ["prop", "rules"])
361
+ ]),
362
+ _: 1
363
+ }),
364
+ r(e, {
365
+ prop: "marketPrice",
366
+ label: l.$t("goodsSpu.marketPrice"),
367
+ "min-width": "120"
368
+ }, {
369
+ default: a(({ row: t, $index: d }) => [
370
+ r(p, {
371
+ prop: "skuSpecValues." + d + ".marketPrice",
372
+ rules: g(f).marketPrice
373
+ }, {
374
+ default: a(() => [
375
+ r(c, {
376
+ modelValue: t.marketPrice,
377
+ "onUpdate:modelValue": (i) => t.marketPrice = i,
378
+ precision: 2,
379
+ min: t.salePrice,
380
+ size: "small",
381
+ controls: !1,
382
+ class: "w-full",
383
+ disabled: !s.isSettingShow
384
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "min", "disabled"])
385
+ ]),
386
+ _: 2
387
+ }, 1032, ["prop", "rules"])
388
+ ]),
389
+ _: 1
390
+ }, 8, ["label"]),
391
+ r(e, {
392
+ prop: "costPrice",
393
+ label: l.$t("goodsSpu.costPrice"),
394
+ "min-width": "120"
395
+ }, {
396
+ default: a(({ row: t, $index: d }) => [
397
+ r(p, {
398
+ prop: "skuSpecValues." + d + ".costPrice",
399
+ rules: g(f).costPrice
400
+ }, {
401
+ default: a(() => [
402
+ r(c, {
403
+ modelValue: t.costPrice,
404
+ "onUpdate:modelValue": (i) => t.costPrice = i,
405
+ max: t.salePrice,
406
+ precision: 2,
407
+ size: "small",
408
+ controls: !1,
409
+ class: "w-full",
410
+ disabled: !s.isSettingShow
411
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "max", "disabled"])
412
+ ]),
413
+ _: 2
414
+ }, 1032, ["prop", "rules"])
415
+ ]),
416
+ _: 1
417
+ }, 8, ["label"]),
418
+ ((T = s.form) == null ? void 0 : T.isPointsDeduct) === !0 ? (P(), D(e, {
419
+ key: 0,
420
+ prop: "stock",
421
+ label: l.$t("goodsSpu.pointsDeduct"),
422
+ width: "140"
423
+ }, {
424
+ header: a(() => [
425
+ u[2] || (u[2] = k("span", { class: "required_red" }, "*", -1)),
426
+ k("span", null, I(l.$t("goodsSpu.pointsDeduct")), 1)
427
+ ]),
428
+ default: a(({ row: t, $index: d }) => [
429
+ r(p, {
430
+ prop: "skuSpecValues." + d + ".pointsDeduct",
431
+ rules: g(f).pointsDeduct
432
+ }, {
433
+ default: a(() => [
434
+ r(c, {
435
+ modelValue: t.pointsDeduct,
436
+ "onUpdate:modelValue": (i) => t.pointsDeduct = i,
437
+ size: "small",
438
+ controls: !1,
439
+ class: "w-full",
440
+ disabled: !s.isSettingShow
441
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
442
+ ]),
443
+ _: 2
444
+ }, 1032, ["prop", "rules"])
445
+ ]),
446
+ _: 1
447
+ }, 8, ["label"])) : C("", !0),
448
+ ((N = s.form) == null ? void 0 : N.presaleType) === g(F).GOODS_PRESALE_TYPE_VALUES.DEPOSIT ? (P(), D(e, {
449
+ key: 1,
450
+ prop: "earnestAmount",
451
+ width: "120"
452
+ }, {
453
+ header: a(() => [
454
+ u[3] || (u[3] = k("span", { class: "required_red" }, "*", -1)),
455
+ k("span", null, I(l.$t("goodsSpu.earnestAmount")), 1)
456
+ ]),
457
+ default: a(({ row: t, $index: d }) => [
458
+ r(p, {
459
+ prop: "skuSpecValues." + d + ".earnestAmount",
460
+ rules: g(f).earnestAmount
461
+ }, {
462
+ default: a(() => [
463
+ r(c, {
464
+ modelValue: t.earnestAmount,
465
+ "onUpdate:modelValue": (i) => t.earnestAmount = i,
466
+ precision: 2,
467
+ size: "small",
468
+ controls: !1,
469
+ class: "w-full",
470
+ disabled: !s.isSettingShow
471
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
472
+ ]),
473
+ _: 2
474
+ }, 1032, ["prop", "rules"])
475
+ ]),
476
+ _: 1
477
+ })) : C("", !0),
478
+ ((z = s.form) == null ? void 0 : z.presaleType) === g(F).GOODS_PRESALE_TYPE_VALUES.DEPOSIT_RETURN ? (P(), D(e, {
479
+ key: 2,
480
+ prop: "depositAmount",
481
+ width: "120"
482
+ }, {
483
+ header: a(() => [
484
+ u[4] || (u[4] = k("span", { class: "required_red" }, "*", -1)),
485
+ k("span", null, I(l.$t("goodsSpu.depositAmount")), 1)
486
+ ]),
487
+ default: a(({ row: t, $index: d }) => [
488
+ r(p, {
489
+ prop: "skuSpecValues." + d + ".depositAmount",
490
+ rules: g(f).depositAmount
491
+ }, {
492
+ default: a(() => [
493
+ r(c, {
494
+ modelValue: t.depositAmount,
495
+ "onUpdate:modelValue": (i) => t.depositAmount = i,
496
+ precision: 2,
497
+ size: "small",
498
+ controls: !1,
499
+ class: "w-full"
500
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
501
+ ]),
502
+ _: 2
503
+ }, 1032, ["prop", "rules"])
504
+ ]),
505
+ _: 1
506
+ })) : C("", !0),
507
+ r(e, {
508
+ prop: "stock",
509
+ label: l.$t("goodsSpu.stock"),
510
+ width: "90"
511
+ }, {
512
+ header: a(() => [
513
+ u[5] || (u[5] = k("span", { class: "required_red" }, "*", -1)),
514
+ k("span", null, I(l.$t("goodsSpu.stock")), 1)
515
+ ]),
516
+ default: a(({ row: t, $index: d }) => [
517
+ r(p, {
518
+ prop: "skuSpecValues." + d + ".stock",
519
+ rules: g(f).stock
520
+ }, {
521
+ default: a(() => [
522
+ r(c, {
523
+ modelValue: t.stock,
524
+ "onUpdate:modelValue": (i) => t.stock = i,
525
+ size: "small",
526
+ controls: !1,
527
+ class: "w-full",
528
+ disabled: !s.isSettingShow
529
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
530
+ ]),
531
+ _: 2
532
+ }, 1032, ["prop", "rules"])
533
+ ]),
534
+ _: 1
535
+ }, 8, ["label"]),
536
+ r(e, {
537
+ prop: "skuCode",
538
+ label: l.$t("goodsSpu.skuCode"),
539
+ width: "120"
540
+ }, {
541
+ default: a(({ row: t, $index: d }) => [
542
+ r(p, {
543
+ prop: "skuSpecValues." + d + ".skuCode",
544
+ rules: g(f).skuCode
545
+ }, {
546
+ default: a(() => [
547
+ r(v, {
548
+ modelValue: t.skuCode,
549
+ "onUpdate:modelValue": (i) => t.skuCode = i,
550
+ size: "small",
551
+ disabled: !s.isSettingShow
552
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
553
+ ]),
554
+ _: 2
555
+ }, 1032, ["prop", "rules"])
556
+ ]),
557
+ _: 1
558
+ }, 8, ["label"]),
559
+ r(e, {
560
+ prop: "status",
561
+ label: l.$t("goodsSpu.status"),
562
+ width: "90"
563
+ }, {
564
+ default: a(({ row: t, $index: d }) => [
565
+ s.isSettingShow ? (P(), D(p, {
566
+ key: 0,
567
+ prop: "skuSpecValues." + d + ".status",
568
+ rules: g(f).status
569
+ }, {
570
+ default: a(() => [
571
+ r(E, {
572
+ modelValue: t.status,
573
+ "onUpdate:modelValue": (i) => t.status = i
574
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
575
+ ]),
576
+ _: 2
577
+ }, 1032, ["prop", "rules"])) : (P(), L("span", oe, I(g(X).shelfDict.getValue(t.status)), 1))
578
+ ]),
579
+ _: 1
580
+ }, 8, ["label"])
581
+ ];
582
+ }),
583
+ _: 1
584
+ }, 8, ["data"])
585
+ ]),
586
+ _: 1
587
+ }, 8, ["model", "rules"])
588
+ ]);
589
+ };
590
+ }
591
+ }), fe = /* @__PURE__ */ le(ae, [["__scopeId", "data-v-7d41aa66"]]);
592
+ export {
593
+ fe as default
594
+ };
@@ -0,0 +1,44 @@
1
+ import { defineComponent as f, reactive as _, ref as b, resolveComponent as l, createElementBlock as g, openBlock as r, createVNode as u, unref as n, isRef as V, withCtx as v, createBlock as y, createCommentVNode as I } from "vue";
2
+ import { _ as S } from "./GoodsSpecForm.vue_vue_type_script_setup_true_lang-BbVK_KNz.mjs";
3
+ import { useRoute as h, useRouter as k } from "vue-router";
4
+ import { a as B } from "./index-xQgC-8Gd.mjs";
5
+ import { routerUtil as C } from "jmash-core";
6
+ const R = { class: "app-container" }, $ = /* @__PURE__ */ f({
7
+ __name: "spec",
8
+ setup(q) {
9
+ const e = _({}), o = h(), p = k(), t = b("spec");
10
+ o.query.spuId && B.findById({ spuId: o.query.spuId }).then(({ data: s }) => {
11
+ Object.assign(e, s);
12
+ });
13
+ function c() {
14
+ C.closeTagView(o.fullPath, p, !1);
15
+ }
16
+ return (s, a) => {
17
+ const d = l("el-tab-pane"), m = l("el-tabs");
18
+ return r(), g("div", R, [
19
+ u(m, {
20
+ type: "border-card",
21
+ modelValue: n(t),
22
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => V(t) ? t.value = i : null),
23
+ class: "demo-tabs"
24
+ }, {
25
+ default: v(() => [
26
+ u(d, {
27
+ label: s.$t("goodsSpu.spec"),
28
+ name: "spec"
29
+ }, null, 8, ["label"]),
30
+ n(e).spuId ? (r(), y(S, {
31
+ key: 0,
32
+ "goods-spu-model": n(e),
33
+ onSubmit: c
34
+ }, null, 8, ["goods-spu-model"])) : I("", !0)
35
+ ]),
36
+ _: 1
37
+ }, 8, ["modelValue"])
38
+ ]);
39
+ };
40
+ }
41
+ });
42
+ export {
43
+ $ as default
44
+ };