xyvcard-goods 0.0.7 → 0.0.9

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 (24) hide show
  1. package/dist/{approveFailIndex-F3GtuNeX.mjs → approveFailIndex-DJf9bHab.mjs} +1 -1
  2. package/dist/{approveFailIndex.vue_vue_type_script_setup_true_lang-8ykH4NF1.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-mXqZdtba.mjs} +39 -39
  3. package/dist/{auditIndex-DZUQQzVu.mjs → auditIndex-CCkGsSy2.mjs} +1 -1
  4. package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-Bnc1wKbA.mjs → auditIndex.vue_vue_type_script_setup_true_lang-DHolmNaP.mjs} +59 -59
  5. package/dist/edit-D37yka6Z.mjs +470 -0
  6. package/dist/{index-D5_GsXR7.mjs → index-CKeHa-Cx.mjs} +24 -27
  7. package/dist/{index-kGlE0ywA.mjs → index-vcmJ06-Y.mjs} +136 -136
  8. package/dist/index.mjs +8 -37
  9. package/dist/{info-kiOShGr4.mjs → info-CPZykxS1.mjs} +37 -40
  10. package/dist/{saleIndex-CyMvOgxp.mjs → saleIndex-CdAcvCzO.mjs} +1 -1
  11. package/dist/{saleIndex.vue_vue_type_script_setup_true_lang-BgZZMEph.mjs → saleIndex.vue_vue_type_script_setup_true_lang-CLzVH-ix.mjs} +94 -94
  12. package/dist/{shelfIndex-DZWqrqlw.mjs → shelfIndex-ZHuhzU_h.mjs} +1 -1
  13. package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-B7fw9wHp.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-CTv-j8Xe.mjs} +18 -18
  14. package/dist/{skuForm-Dtq2Ttjc.mjs → skuForm-BSlT4TYd.mjs} +81 -76
  15. package/dist/skuTable-DYmQYXk3.mjs +535 -0
  16. package/dist/style.css +1 -1
  17. package/dts/api/dict.d.ts +6 -2
  18. package/dts/api/goods-spu/types.d.ts +6 -5
  19. package/dts/constant.d.ts +7 -7
  20. package/dts/router/index.d.ts +2 -2
  21. package/dts/views/goods/goods-spu/skuForm.vue.d.ts +10 -1
  22. package/package.json +3 -3
  23. package/dist/edit-C3imnLUq.mjs +0 -600
  24. package/dist/skuTable-8oPw0DhV.mjs +0 -611
@@ -0,0 +1,535 @@
1
+ import { defineComponent as A, ref as C, computed as T, watch as z, resolveComponent as V, openBlock as w, createElementBlock as U, Fragment as x, createElementVNode as f, createVNode as a, withCtx as d, createTextVNode as y, createCommentVNode as B, renderList as O, createBlock as q, toDisplayString as $, unref as F } from "vue";
2
+ import { D as M } from "./index-CKeHa-Cx.mjs";
3
+ function G(n, g = [], s) {
4
+ const { optionValue: r = "id", optionText: _ = "name" } = s || {}, k = [];
5
+ let b = 0;
6
+ const I = {}, S = K(n);
7
+ if (n.length === 0) return k;
8
+ n.forEach((v) => {
9
+ const { specValueList: o } = v;
10
+ if (!o || o.length === 0) return !0;
11
+ b = (b || 1) * o.length;
12
+ }), g.forEach((v) => {
13
+ const { specs: o, ...t } = v;
14
+ I[o.map((u) => `${u.specId}_${u.specValueId}`).join("|")] = t;
15
+ });
16
+ for (let v = 0; v < b; v++) {
17
+ const o = [], t = [];
18
+ n.forEach((c, i) => {
19
+ const { specValueList: e } = c;
20
+ let h = {};
21
+ if (!e || e.length === 0) return !0;
22
+ if (e.length > 1) {
23
+ const m = Math.floor(v / S[i]) % e.length;
24
+ h = n[i].specValueList[m];
25
+ } else
26
+ h = n[i].specValueList[0];
27
+ !c[r] || !h[r] || (t.push(`${c[r]}_${h[r]}`), o.push({
28
+ specId: c[r],
29
+ specName: c[_],
30
+ specValueId: h[r],
31
+ specValueName: h[_]
32
+ }));
33
+ });
34
+ const { ...u } = I[t.join("|")] || {};
35
+ k.push({ ...u, specs: o });
36
+ }
37
+ return k;
38
+ }
39
+ function K(n) {
40
+ const g = [];
41
+ for (let s = n.length - 1; s >= 0; s--)
42
+ n[s + 1] && n[s + 1].specValueList ? g[s] = n[s + 1].specValueList.length * g[s + 1] || 1 : g[s] = 1;
43
+ return g;
44
+ }
45
+ function D(n) {
46
+ return Array.from(new Set(n));
47
+ }
48
+ function H(n, g) {
49
+ return n = D(n), g = D(g), n.concat(g).filter((s) => !(n.includes(s) && g.includes(s)));
50
+ }
51
+ const J = { key: 0 }, Q = { class: "title-set" }, R = { class: "right-dis" }, W = { class: "right-dis" }, X = { class: "right-dis" }, Y = { class: "right-dis" }, Z = { class: "right-dis" }, ee = { class: "right-dis" }, le = { key: 0 }, te = { key: 1 }, oe = /* @__PURE__ */ A({
52
+ __name: "skuTable",
53
+ props: {
54
+ specData: {
55
+ type: Array,
56
+ default() {
57
+ return [];
58
+ }
59
+ },
60
+ goodsSku: {
61
+ type: Array,
62
+ default() {
63
+ return [];
64
+ }
65
+ },
66
+ // 是否显示批量设置,主要是用于详情展示
67
+ isSettingShow: {
68
+ type: Boolean,
69
+ default: !0
70
+ }
71
+ },
72
+ emits: ["getGoodsSku", "getFormData"],
73
+ setup(n, { emit: g }) {
74
+ const s = C({
75
+ salePrice: 0,
76
+ marketPrice: 0,
77
+ costPrice: 0,
78
+ weight: 0,
79
+ volume: 0,
80
+ stock: 0
81
+ }), r = C([]), _ = g, k = n, b = T(() => {
82
+ let o = G(k.specData, [], {}).map((u) => ({
83
+ specValues: u.specs,
84
+ specIds: u.specs.reduce(
85
+ (c, i, e) => `${c}${i.specId}-${i.specValueId}${e === u.specs.length - 1 ? "" : "_"}`,
86
+ ""
87
+ )
88
+ })), t = k.goodsSku.map((u) => ({
89
+ ...u,
90
+ specIds: u.specValues.reduce(
91
+ (c, i, e) => `${c}${i.specId}-${i.specValueId}${e === u.specValues.length - 1 ? "" : "_"}`,
92
+ ""
93
+ )
94
+ }));
95
+ return o.forEach(function(u) {
96
+ t.forEach(function(c) {
97
+ let i = u.specIds.split("_"), e = c.specIds.split("_"), h = !0;
98
+ i.forEach(function(m) {
99
+ e.find((P) => P == m) || (h = !1);
100
+ }), h && (u.picUrl = c.picUrl ? c.picUrl : "", u.skuCode = c.skuCode ? c.skuCode : void 0, u.skuId = c.skuId ? c.skuId : void 0, u.salePrice = c.salePrice, u.marketPrice = c.marketPrice, u.costPrice = c.costPrice, u.stock = c.stock, u.weight = c.weight, u.volume = c.volume, u.status = c.status);
101
+ });
102
+ }), o;
103
+ });
104
+ z(
105
+ b,
106
+ (o, t) => {
107
+ var c, i;
108
+ if (!o || !o.length) return r.value = [];
109
+ if (!t || !t.length)
110
+ return r.value = o.map((e) => ({
111
+ ...e,
112
+ picUrl: e.picUrl ? e.picUrl : "",
113
+ skuCode: e.skuCode ? e.skuCode : void 0,
114
+ salePrice: e.salePrice ? e.salePrice : 0,
115
+ marketPrice: e.marketPrice ? e.marketPrice : void 0,
116
+ costPrice: e.costPrice ? e.costPrice : void 0,
117
+ stock: e.stock ? e.stock : 0,
118
+ weight: e.weight ? e.weight : void 0,
119
+ volume: e.volume ? e.volume : void 0,
120
+ status: e.status ? e.status : !0
121
+ }));
122
+ if (((c = o[0].specValues) == null ? void 0 : c.length) !== ((i = t[0].specValues) == null ? void 0 : i.length))
123
+ return r.value = o.map((e) => ({
124
+ ...e,
125
+ picUrl: "",
126
+ skuCode: void 0,
127
+ salePrice: 0,
128
+ marketPrice: void 0,
129
+ costPrice: void 0,
130
+ stock: 0,
131
+ weight: void 0,
132
+ volume: void 0,
133
+ status: !0
134
+ }));
135
+ if (o.length === t.length)
136
+ return r.value = o.map((e, h) => ({
137
+ ...r.value[h],
138
+ ...e
139
+ }));
140
+ const u = I(o, t);
141
+ if (o.length > t.length) {
142
+ let e = [];
143
+ o.forEach((h) => {
144
+ const m = r.value.find(
145
+ (P) => P.specIds === h.specIds
146
+ );
147
+ m ? e.push(m) : e.push({
148
+ ...h,
149
+ picUrl: "",
150
+ skuCode: void 0,
151
+ salePrice: 0,
152
+ marketPrice: void 0,
153
+ costPrice: void 0,
154
+ stock: 0,
155
+ weight: void 0,
156
+ volume: void 0,
157
+ status: !0
158
+ });
159
+ }), r.value = e;
160
+ } else
161
+ r.value = r.value.filter(
162
+ (e) => !u.includes(e.specIds)
163
+ );
164
+ },
165
+ {
166
+ deep: !0,
167
+ immediate: !0
168
+ }
169
+ ), z(
170
+ r,
171
+ (o) => {
172
+ _("getFormData", o);
173
+ },
174
+ {
175
+ deep: !0,
176
+ immediate: !0
177
+ }
178
+ );
179
+ function I(o, t) {
180
+ return o = o.map((u) => u.specIds), t = t.map((u) => u.specIds), H(o, t);
181
+ }
182
+ function S() {
183
+ r.value.forEach((o) => {
184
+ o.salePrice = s.value.salePrice, o.marketPrice = s.value.marketPrice, o.costPrice = s.value.costPrice, o.weight = s.value.weight, o.volume = s.value.volume, o.stock = s.value.stock;
185
+ });
186
+ }
187
+ function v(o, t) {
188
+ t.picUrl = o;
189
+ }
190
+ return (o, t) => {
191
+ const u = V("Setting"), c = V("el-icon"), i = V("el-input-number"), e = V("el-tooltip"), h = V("el-button"), m = V("el-table-column"), P = V("jmash-single-image-upload"), E = V("el-input"), L = V("el-switch"), j = V("el-table");
192
+ return w(), U(x, null, [
193
+ n.isSettingShow ? (w(), U("div", J, [
194
+ f("div", Q, [
195
+ a(c, null, {
196
+ default: d(() => [
197
+ a(u)
198
+ ]),
199
+ _: 1
200
+ }),
201
+ t[6] || (t[6] = y(" 批量设置 "))
202
+ ]),
203
+ f("span", R, [
204
+ a(e, {
205
+ class: "box-item",
206
+ effect: "dark",
207
+ content: "销售价(元)",
208
+ placement: "top-start"
209
+ }, {
210
+ default: d(() => [
211
+ a(i, {
212
+ modelValue: s.value.salePrice,
213
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => s.value.salePrice = l),
214
+ precision: 2,
215
+ size: "small",
216
+ placeholder: "销售价(元)",
217
+ "controls-position": "right"
218
+ }, null, 8, ["modelValue"])
219
+ ]),
220
+ _: 1
221
+ })
222
+ ]),
223
+ f("span", W, [
224
+ a(e, {
225
+ class: "box-item",
226
+ effect: "dark",
227
+ content: "市场价(元)",
228
+ placement: "top-start"
229
+ }, {
230
+ default: d(() => [
231
+ a(i, {
232
+ modelValue: s.value.marketPrice,
233
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => s.value.marketPrice = l),
234
+ precision: 2,
235
+ size: "small",
236
+ placeholder: "市场价(元)",
237
+ "controls-position": "right"
238
+ }, null, 8, ["modelValue"])
239
+ ]),
240
+ _: 1
241
+ })
242
+ ]),
243
+ f("span", X, [
244
+ a(e, {
245
+ class: "box-item",
246
+ effect: "dark",
247
+ content: "成本价(元)",
248
+ placement: "top-start"
249
+ }, {
250
+ default: d(() => [
251
+ a(i, {
252
+ modelValue: s.value.costPrice,
253
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => s.value.costPrice = l),
254
+ precision: 2,
255
+ size: "small",
256
+ placeholder: "成本价(元)",
257
+ "controls-position": "right"
258
+ }, null, 8, ["modelValue"])
259
+ ]),
260
+ _: 1
261
+ })
262
+ ]),
263
+ f("span", Y, [
264
+ a(e, {
265
+ class: "box-item",
266
+ effect: "dark",
267
+ content: "重量(kg)",
268
+ placement: "top-start"
269
+ }, {
270
+ default: d(() => [
271
+ a(i, {
272
+ modelValue: s.value.weight,
273
+ "onUpdate:modelValue": t[3] || (t[3] = (l) => s.value.weight = l),
274
+ precision: 2,
275
+ size: "small",
276
+ placeholder: "重量(kg)",
277
+ "controls-position": "right"
278
+ }, null, 8, ["modelValue"])
279
+ ]),
280
+ _: 1
281
+ })
282
+ ]),
283
+ f("span", Z, [
284
+ a(e, {
285
+ class: "box-item",
286
+ effect: "dark",
287
+ content: "体积(m³)",
288
+ placement: "top-start"
289
+ }, {
290
+ default: d(() => [
291
+ a(i, {
292
+ modelValue: s.value.volume,
293
+ "onUpdate:modelValue": t[4] || (t[4] = (l) => s.value.volume = l),
294
+ precision: 2,
295
+ size: "small",
296
+ placeholder: "体积(m³)",
297
+ "controls-position": "right"
298
+ }, null, 8, ["modelValue"])
299
+ ]),
300
+ _: 1
301
+ })
302
+ ]),
303
+ f("span", ee, [
304
+ a(e, {
305
+ class: "box-item",
306
+ effect: "dark",
307
+ content: "库存",
308
+ placement: "top-start"
309
+ }, {
310
+ default: d(() => [
311
+ a(i, {
312
+ modelValue: s.value.stock,
313
+ "onUpdate:modelValue": t[5] || (t[5] = (l) => s.value.stock = l),
314
+ precision: 0,
315
+ size: "small",
316
+ placeholder: "库存",
317
+ "controls-position": "right"
318
+ }, null, 8, ["modelValue"])
319
+ ]),
320
+ _: 1
321
+ })
322
+ ]),
323
+ a(h, {
324
+ type: "primary",
325
+ size: "small",
326
+ onClick: S
327
+ }, {
328
+ default: d(() => t[7] || (t[7] = [
329
+ y("设置")
330
+ ])),
331
+ _: 1
332
+ })
333
+ ])) : B("", !0),
334
+ a(j, {
335
+ data: r.value,
336
+ class: "w-full top-dis"
337
+ }, {
338
+ default: d(() => [
339
+ a(m, { type: "index" }),
340
+ (w(!0), U(x, null, O(n.specData, (l, p) => (w(), q(m, {
341
+ key: l.id,
342
+ prop: l.id,
343
+ label: l.name
344
+ }, {
345
+ default: d((N) => [
346
+ y($(N.row.specValues[p].specValueName), 1)
347
+ ]),
348
+ _: 2
349
+ }, 1032, ["prop", "label"]))), 128)),
350
+ a(m, {
351
+ prop: "picUrl",
352
+ label: "图片"
353
+ }, {
354
+ default: d((l) => [
355
+ a(P, {
356
+ "picture-url": l.row.picUrl,
357
+ onImageSrc: (p) => v(p, l.row)
358
+ }, null, 8, ["picture-url", "onImageSrc"])
359
+ ]),
360
+ _: 1
361
+ }),
362
+ a(m, {
363
+ prop: "salePrice",
364
+ label: "销售价(元)",
365
+ width: "150"
366
+ }, {
367
+ header: d(() => t[8] || (t[8] = [
368
+ f("span", { class: "required_red" }, "*", -1),
369
+ f("span", null, "销售价(元)", -1)
370
+ ])),
371
+ default: d((l) => [
372
+ f("span", null, [
373
+ a(i, {
374
+ modelValue: l.row.salePrice,
375
+ "onUpdate:modelValue": (p) => l.row.salePrice = p,
376
+ precision: 2,
377
+ size: "small",
378
+ controls: !1,
379
+ class: "w-full",
380
+ disabled: !n.isSettingShow
381
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
382
+ ])
383
+ ]),
384
+ _: 1
385
+ }),
386
+ a(m, {
387
+ prop: "marketPrice",
388
+ label: "市场价(元)"
389
+ }, {
390
+ default: d((l) => [
391
+ f("span", null, [
392
+ a(i, {
393
+ modelValue: l.row.marketPrice,
394
+ "onUpdate:modelValue": (p) => l.row.marketPrice = p,
395
+ precision: 2,
396
+ size: "small",
397
+ controls: !1,
398
+ class: "w-full",
399
+ disabled: !n.isSettingShow
400
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
401
+ ])
402
+ ]),
403
+ _: 1
404
+ }),
405
+ a(m, {
406
+ prop: "costPrice",
407
+ label: "成本价(元)"
408
+ }, {
409
+ default: d((l) => [
410
+ f("span", null, [
411
+ a(i, {
412
+ modelValue: l.row.costPrice,
413
+ "onUpdate:modelValue": (p) => l.row.costPrice = p,
414
+ precision: 2,
415
+ size: "small",
416
+ controls: !1,
417
+ class: "w-full",
418
+ disabled: !n.isSettingShow
419
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
420
+ ])
421
+ ]),
422
+ _: 1
423
+ }),
424
+ a(m, {
425
+ prop: "weight",
426
+ label: "重量(kg)"
427
+ }, {
428
+ default: d((l) => [
429
+ f("span", null, [
430
+ a(i, {
431
+ modelValue: l.row.weight,
432
+ "onUpdate:modelValue": (p) => l.row.weight = p,
433
+ precision: 2,
434
+ size: "small",
435
+ controls: !1,
436
+ class: "w-full",
437
+ disabled: !n.isSettingShow
438
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
439
+ ])
440
+ ]),
441
+ _: 1
442
+ }),
443
+ a(m, {
444
+ prop: "volume",
445
+ label: "体积(m³)"
446
+ }, {
447
+ default: d((l) => [
448
+ f("span", null, [
449
+ a(i, {
450
+ modelValue: l.row.volume,
451
+ "onUpdate:modelValue": (p) => l.row.volume = p,
452
+ precision: 2,
453
+ size: "small",
454
+ controls: !1,
455
+ class: "w-full",
456
+ disabled: !n.isSettingShow
457
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
458
+ ])
459
+ ]),
460
+ _: 1
461
+ }),
462
+ a(m, {
463
+ prop: "stock",
464
+ label: "库存"
465
+ }, {
466
+ header: d(() => t[9] || (t[9] = [
467
+ f("span", { class: "required_red" }, "*", -1),
468
+ f("span", null, "库存", -1)
469
+ ])),
470
+ default: d((l) => [
471
+ f("span", null, [
472
+ a(i, {
473
+ modelValue: l.row.stock,
474
+ "onUpdate:modelValue": (p) => l.row.stock = p,
475
+ precision: 2,
476
+ size: "small",
477
+ controls: !1,
478
+ class: "w-full",
479
+ disabled: !n.isSettingShow
480
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
481
+ ])
482
+ ]),
483
+ _: 1
484
+ }),
485
+ a(m, {
486
+ prop: "skuCode",
487
+ label: "sku编码"
488
+ }, {
489
+ default: d((l) => [
490
+ f("span", null, [
491
+ a(E, {
492
+ modelValue: l.row.skuCode,
493
+ "onUpdate:modelValue": (p) => l.row.skuCode = p,
494
+ size: "small",
495
+ disabled: !n.isSettingShow
496
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
497
+ ])
498
+ ]),
499
+ _: 1
500
+ }),
501
+ a(m, {
502
+ prop: "status",
503
+ label: "是否上架",
504
+ width: "80"
505
+ }, {
506
+ default: d((l) => [
507
+ n.isSettingShow ? (w(), U("span", le, [
508
+ a(L, {
509
+ modelValue: l.row.status,
510
+ "onUpdate:modelValue": (p) => l.row.status = p
511
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
512
+ ])) : (w(), U("span", te, $(F(M).shelfDict.getValue(l.row.status)), 1))
513
+ ]),
514
+ _: 1
515
+ })
516
+ ]),
517
+ _: 1
518
+ }, 8, ["data"])
519
+ ], 64);
520
+ };
521
+ }
522
+ }), se = (n, g) => {
523
+ const s = n.__vccOpts || n;
524
+ for (const [r, _] of g)
525
+ s[r] = _;
526
+ return s;
527
+ }, ae = /* @__PURE__ */ se(oe, [["__scopeId", "data-v-28216104"]]), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
528
+ __proto__: null,
529
+ default: ae
530
+ }, Symbol.toStringTag, { value: "Module" }));
531
+ export {
532
+ se as _,
533
+ ce as a,
534
+ ae as s
535
+ };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}.avatar-uploader .avatar{width:80px;height:80px;display:block}.avatar-uploader .el-upload{border:1px dashed var(--el-border-color);cursor:pointer;position:relative;overflow:hidden;transition:var(--el-transition-duration-fast)}.avatar-uploader .el-upload:hover{border-color:var(--el-color-primary)}.avatar-uploader .el-icon.avatar-uploader-icon{font-size:26px;color:#8c939d;width:80px;height:80px;text-align:center}.title-set[data-v-0d96a554]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-de70dfa2]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-de70dfa2]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-de70dfa2]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-de70dfa2]{padding:10px 20px}.goods-tag[data-v-de70dfa2]{margin-bottom:10px}[data-v-23f4d200] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-23f4d200] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}
1
+ .w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}.title-set[data-v-28216104]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-1db08e7e]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-1db08e7e]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-1db08e7e]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-1db08e7e]{padding:10px 20px}.goods-tag[data-v-1db08e7e]{margin-bottom:10px}
package/dts/api/dict.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import { BizDict, type Entry, BizLayDict, type LayEntry } from "jmash-core";
2
+ export interface EntryBool {
3
+ key: boolean;
4
+ value: string;
5
+ }
2
6
  export declare class CustomBizDict {
3
- values: import("vue").Reactive<Entry[]>;
7
+ values: import("vue").Reactive<EntryBool[]>;
4
8
  query: any;
5
9
  constructor(results: any, query: any);
6
- getValue(key: string): string;
10
+ getValue(key: boolean): string;
7
11
  }
8
12
  export declare class ShopInfoBizDict extends BizDict {
9
13
  useValues(): Promise<Entry[]>;
@@ -22,7 +22,7 @@ export interface GoodsSpuModel extends EntityModel {
22
22
  picUrls?: string;
23
23
  sellPoint?: string;
24
24
  description?: string;
25
- shelf?: string;
25
+ shelf?: boolean;
26
26
  saleNum?: number;
27
27
  specType?: string;
28
28
  skuList?: GoodsSkuList;
@@ -58,11 +58,11 @@ export interface GoodsSpuCreateReq extends EntityCreateReq {
58
58
  sellPoint?: string;
59
59
  ensureIds?: Array<string>;
60
60
  description?: string;
61
- shelf?: string;
61
+ shelf?: boolean;
62
62
  saleNum?: number;
63
63
  specType?: string;
64
64
  specId?: Array<string>;
65
- skuSpecValues: Array<GoodsSkuCreateReq>;
65
+ skuSpecValues: Array<GoodsSkuModel>;
66
66
  }
67
67
  export interface GoodsSpuUpdateReq extends EntityUpdateReq {
68
68
  spuId?: string;
@@ -75,12 +75,12 @@ export interface GoodsSpuUpdateReq extends EntityUpdateReq {
75
75
  picUrls?: string;
76
76
  sellPoint?: string;
77
77
  description?: string;
78
- shelf?: string;
78
+ shelf?: boolean;
79
79
  saleNum?: number;
80
80
  specType?: string;
81
81
  ensureIds?: Array<string>;
82
82
  specId?: Array<string>;
83
- skuSpecValues: Array<GoodsSkuCreateReq>;
83
+ skuSpecValues: Array<GoodsSkuModel>;
84
84
  }
85
85
  export type GoodsSpuFormReq = GoodsSpuCreateReq | GoodsSpuUpdateReq;
86
86
  export interface GoodsSpuEnableKey {
@@ -98,6 +98,7 @@ export interface GoodsSkuCreateReq {
98
98
  stock?: number;
99
99
  specValues?: Array<SkuSpecValue>;
100
100
  skuCode?: string;
101
+ skuId?: string;
101
102
  status?: boolean;
102
103
  specIds?: string;
103
104
  }
package/dts/constant.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  export declare class Constant {
2
2
  static readonly MODULE_GOODS = "goods";
3
- static readonly specType: {
3
+ static readonly SPEC_TYPE: {
4
4
  UNIFIED_SPEC: string;
5
5
  MULTI_SPEC: string;
6
6
  };
7
7
  static readonly SHELF_VALUES: globalThis.Ref<{
8
- key: string;
8
+ key: boolean;
9
9
  value: string;
10
10
  }[], {
11
- key: string;
11
+ key: boolean;
12
12
  value: string;
13
13
  }[] | {
14
- key: string;
14
+ key: boolean;
15
15
  value: string;
16
16
  }[]>;
17
17
  static readonly ENUM_FREIGHT_TYPE = "xyvcard.goods.protobuf.FreightType";
@@ -19,7 +19,7 @@ export declare class Constant {
19
19
  static readonly ENUM_SPEC_TYPE = "xyvcard.goods.protobuf.SpecType";
20
20
  static readonly ENUM_GOODS_SPU_List_SORT = "xyvcard.goods.protobuf.GoodsSpuListSort";
21
21
  static readonly ENUM_APPROVAL_STATUS = "xyvcard.goods.protobuf.ApprovalStatus";
22
- static readonly approval_not_pass = "APPROVAL_NOT_PASS";
23
- static readonly approval_pass = "APPROVAL_PASS";
24
- static readonly approvaling = "APPROVALING";
22
+ static readonly APPROVAL_NOT_PASS = "APPROVAL_NOT_PASS";
23
+ static readonly APPROVAL_PASS = "APPROVAL_PASS";
24
+ static readonly APPROVALING = "APPROVALING";
25
25
  }
@@ -1,4 +1,4 @@
1
1
  import type { RouteRecordRaw } from "vue-router";
2
- export declare const GoodsSpuEdit: () => Promise<typeof import("@/views/goods/goods-spu/edit.vue")>;
3
- export declare const GoodsSpuInfo: () => Promise<typeof import("@/views/goods/goods-spu/info.vue")>;
2
+ export declare const goodsSpuEdit: () => Promise<typeof import("@/views/goods/goods-spu/edit.vue")>;
3
+ export declare const goodsSpuInfo: () => Promise<typeof import("@/views/goods/goods-spu/info.vue")>;
4
4
  export declare const goodsRoutes: RouteRecordRaw[];
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
7
7
  type: ObjectConstructor;
8
8
  default: () => void;
9
9
  };
10
+ isDisabled: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
10
14
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
15
  getGoodsSku: (...args: any[]) => void;
12
16
  getFormData: (...args: any[]) => void;
@@ -19,11 +23,16 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
19
23
  type: ObjectConstructor;
20
24
  default: () => void;
21
25
  };
26
+ isDisabled: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
22
30
  }>> & Readonly<{
23
31
  onGetGoodsSku?: ((...args: any[]) => any) | undefined;
24
32
  onGetFormData?: ((...args: any[]) => any) | undefined;
25
33
  }>, {
26
- form: Record<string, any>;
27
34
  specType: string;
35
+ form: Record<string, any>;
36
+ isDisabled: boolean;
28
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
38
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-goods",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/index.d.ts",
@@ -11,9 +11,9 @@
11
11
  "peerDependencies": {
12
12
  "axios": "^1.7.7",
13
13
  "element-plus": "^2.8.7",
14
- "jmash-core": "^0.0.102",
14
+ "jmash-core": "^0.0.108",
15
15
  "jmash-dict": "^0.0.44",
16
- "jmash-rbac": "^0.0.35",
16
+ "jmash-rbac": "^0.0.40",
17
17
  "pinia": "^2.2.4",
18
18
  "vue": "^3.5.11",
19
19
  "vue-i18n": "^9.14.1",