xyvcard-goods 0.0.10 → 0.0.11

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.
@@ -2,13 +2,13 @@ import { defineComponent as j, ref as g, watchEffect as O, computed as W, resolv
2
2
  import { ElMessageBox as Y, ElMessage as F } from "element-plus";
3
3
  import { fileApi as k, routerUtil as P } from "jmash-core";
4
4
  import { useI18n as L } from "vue-i18n";
5
- import { _ as x } from "./skuTable-Ck7bJzYP.mjs";
5
+ import { _ as x } from "./skuTable-BlK2s902.mjs";
6
6
  import { useRouter as ee, useRoute as le } from "vue-router";
7
7
  import { D as m, C as oe } from "./index-CKeHa-Cx.mjs";
8
8
  import { goodsSpuApi as D } from "./index.mjs";
9
9
  import { g as te } from "./index-BHmGYIuc.mjs";
10
10
  import { WangEditor as se } from "xyvcard-cms";
11
- import ae from "./skuForm-CRnWdE9n.mjs";
11
+ import ae from "./skuForm-DuMlHj7f.mjs";
12
12
  const ue = ["src"], re = /* @__PURE__ */ j({
13
13
  __name: "ImageUpload",
14
14
  props: {
package/dist/index.mjs CHANGED
@@ -62,7 +62,7 @@ function Ps(e) {
62
62
  let s = e.global.getLocaleMessage("en");
63
63
  s = Tt(s, xs), e.global.setLocaleMessage("zh-cn", t), e.global.setLocaleMessage("en", s);
64
64
  }
65
- const Ns = () => import("./edit-FCXD46Ef.mjs"), Ws = () => import("./info-CScBSLKA.mjs"), Fs = [
65
+ const Ns = () => import("./edit-Bk7YJzrm.mjs"), Ws = () => import("./info-lw-aEq4N.mjs"), Fs = [
66
66
  {
67
67
  path: "/rawgoods",
68
68
  component: Ys,
@@ -2806,7 +2806,7 @@ class Ci {
2806
2806
  });
2807
2807
  }
2808
2808
  }
2809
- const Hi = new Ci(), Ui = /* @__PURE__ */ Object.assign({ "./views/goods/goods-spu/approveFailIndex.vue": () => import("./approveFailIndex-B-VGnf1U.mjs"), "./views/goods/goods-spu/auditIndex.vue": () => import("./auditIndex-tEq8uYdA.mjs"), "./views/goods/goods-spu/edit.vue": () => import("./edit-FCXD46Ef.mjs"), "./views/goods/goods-spu/index.vue": () => import("./index-C9LeLF51.mjs"), "./views/goods/goods-spu/info.vue": () => import("./info-CScBSLKA.mjs"), "./views/goods/goods-spu/saleIndex.vue": () => import("./saleIndex-B7TBQOB6.mjs"), "./views/goods/goods-spu/shelfIndex.vue": () => import("./shelfIndex-BfsIMQfD.mjs"), "./views/goods/goods-spu/skuForm.vue": () => import("./skuForm-CRnWdE9n.mjs"), "./views/goods/goods-spu/skuTable.vue": () => import("./skuTable-Ck7bJzYP.mjs").then((e) => e.a) }), Ei = {
2809
+ const Hi = new Ci(), Ui = /* @__PURE__ */ Object.assign({ "./views/goods/goods-spu/approveFailIndex.vue": () => import("./approveFailIndex-B-VGnf1U.mjs"), "./views/goods/goods-spu/auditIndex.vue": () => import("./auditIndex-tEq8uYdA.mjs"), "./views/goods/goods-spu/edit.vue": () => import("./edit-Bk7YJzrm.mjs"), "./views/goods/goods-spu/index.vue": () => import("./index-C9LeLF51.mjs"), "./views/goods/goods-spu/info.vue": () => import("./info-lw-aEq4N.mjs"), "./views/goods/goods-spu/saleIndex.vue": () => import("./saleIndex-B7TBQOB6.mjs"), "./views/goods/goods-spu/shelfIndex.vue": () => import("./shelfIndex-BfsIMQfD.mjs"), "./views/goods/goods-spu/skuForm.vue": () => import("./skuForm-DuMlHj7f.mjs"), "./views/goods/goods-spu/skuTable.vue": () => import("./skuTable-BlK2s902.mjs").then((e) => e.a) }), Ei = {
2810
2810
  install(e) {
2811
2811
  Os(Ui, 7), Ps(bs), Ts(Fs), e.use(Li);
2812
2812
  }
@@ -2,7 +2,7 @@ import { defineComponent as q, ref as k, computed as j, watch as F, resolveCompo
2
2
  import { fileApi as B, routerUtil as H } from "jmash-core";
3
3
  import { useRouter as O, useRoute as R } from "vue-router";
4
4
  import { D as p, C as N, S as Y } from "./index-CKeHa-Cx.mjs";
5
- import { s as z } from "./skuTable-Ck7bJzYP.mjs";
5
+ import { s as z } from "./skuTable-BlK2s902.mjs";
6
6
  import { goodsSpuApi as G } from "./index.mjs";
7
7
  import { g as J } from "./index-BHmGYIuc.mjs";
8
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: "title-content" }, ie = { class: "cell-item" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = ["innerHTML"], ye = /* @__PURE__ */ q({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as te, ref as b, computed as se, watch as D, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as k, unref as O, createVNode as o, withCtx as a, createCommentVNode as I, renderList as y, createElementVNode as S, toDisplayString as Y, createTextVNode as w, createBlock as P } from "vue";
2
2
  import { C as E, D as ue, S as H, a as ne } from "./index-CKeHa-Cx.mjs";
3
- import { s as de, _ as re } from "./skuTable-Ck7bJzYP.mjs";
3
+ import { s as de, _ as re } from "./skuTable-BlK2s902.mjs";
4
4
  const pe = { key: 0 }, ce = {
5
5
  key: 1,
6
6
  class: "w-full"
@@ -1,60 +1,61 @@
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
- const G = (n, g) => {
4
- const s = n.__vccOpts || n;
5
- for (const [r, _] of g)
6
- s[r] = _;
1
+ import { defineComponent as O, ref as C, computed as q, watch as $, resolveComponent as v, openBlock as w, createElementBlock as U, createElementVNode as f, createVNode as n, withCtx as d, createTextVNode as S, createCommentVNode as F, Fragment as M, renderList as G, createBlock as x, toDisplayString as D, unref as z } from "vue";
2
+ import { D as K } from "./index-CKeHa-Cx.mjs";
3
+ import { fileApi as E } from "jmash-core";
4
+ const H = (a, h) => {
5
+ const s = a.__vccOpts || a;
6
+ for (const [u, _] of h)
7
+ s[u] = _;
7
8
  return s;
8
9
  };
9
- function K(n, g = [], s) {
10
- const { optionValue: r = "id", optionText: _ = "name" } = s || {}, k = [];
10
+ function J(a, h = [], s) {
11
+ const { optionValue: u = "id", optionText: _ = "name" } = s || {}, k = [];
11
12
  let b = 0;
12
- const I = {}, S = H(n);
13
- if (n.length === 0) return k;
14
- n.forEach((v) => {
15
- const { specValueList: o } = v;
13
+ const I = {}, y = Q(a);
14
+ if (a.length === 0) return k;
15
+ a.forEach((V) => {
16
+ const { specValueList: o } = V;
16
17
  if (!o || o.length === 0) return !0;
17
18
  b = (b || 1) * o.length;
18
- }), g.forEach((v) => {
19
- const { specs: o, ...t } = v;
20
- I[o.map((u) => `${u.specId}_${u.specValueId}`).join("|")] = t;
19
+ }), h.forEach((V) => {
20
+ const { specs: o, ...t } = V;
21
+ I[o.map((i) => `${i.specId}_${i.specValueId}`).join("|")] = t;
21
22
  });
22
- for (let v = 0; v < b; v++) {
23
+ for (let V = 0; V < b; V++) {
23
24
  const o = [], t = [];
24
- n.forEach((c, i) => {
25
- const { specValueList: e } = c;
26
- let h = {};
25
+ a.forEach((r, c) => {
26
+ const { specValueList: e } = r;
27
+ let g = {};
27
28
  if (!e || e.length === 0) return !0;
28
29
  if (e.length > 1) {
29
- const m = Math.floor(v / S[i]) % e.length;
30
- h = n[i].specValueList[m];
30
+ const m = Math.floor(V / y[c]) % e.length;
31
+ g = a[c].specValueList[m];
31
32
  } else
32
- h = n[i].specValueList[0];
33
- !c[r] || !h[r] || (t.push(`${c[r]}_${h[r]}`), o.push({
34
- specId: c[r],
35
- specName: c[_],
36
- specValueId: h[r],
37
- specValueName: h[_]
33
+ g = a[c].specValueList[0];
34
+ !r[u] || !g[u] || (t.push(`${r[u]}_${g[u]}`), o.push({
35
+ specId: r[u],
36
+ specName: r[_],
37
+ specValueId: g[u],
38
+ specValueName: g[_]
38
39
  }));
39
40
  });
40
- const { ...u } = I[t.join("|")] || {};
41
- k.push({ ...u, specs: o });
41
+ const { ...i } = I[t.join("|")] || {};
42
+ k.push({ ...i, specs: o });
42
43
  }
43
44
  return k;
44
45
  }
45
- function H(n) {
46
- const g = [];
47
- for (let s = n.length - 1; s >= 0; s--)
48
- n[s + 1] && n[s + 1].specValueList ? g[s] = n[s + 1].specValueList.length * g[s + 1] || 1 : g[s] = 1;
49
- return g;
46
+ function Q(a) {
47
+ const h = [];
48
+ for (let s = a.length - 1; s >= 0; s--)
49
+ a[s + 1] && a[s + 1].specValueList ? h[s] = a[s + 1].specValueList.length * h[s + 1] || 1 : h[s] = 1;
50
+ return h;
50
51
  }
51
- function D(n) {
52
- return Array.from(new Set(n));
52
+ function L(a) {
53
+ return Array.from(new Set(a));
53
54
  }
54
- function J(n, g) {
55
- return n = D(n), g = D(g), n.concat(g).filter((s) => !(n.includes(s) && g.includes(s)));
55
+ function R(a, h) {
56
+ return a = L(a), h = L(h), a.concat(h).filter((s) => !(a.includes(s) && h.includes(s)));
56
57
  }
57
- const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X = { class: "right-dis" }, Y = { class: "right-dis" }, Z = { class: "right-dis" }, ee = { class: "right-dis" }, le = { class: "right-dis" }, te = { key: 0 }, oe = { key: 1 }, se = /* @__PURE__ */ A({
58
+ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z = { class: "right-dis" }, ee = { class: "right-dis" }, le = { class: "right-dis" }, te = { class: "right-dis" }, oe = { class: "right-dis" }, se = { key: 0 }, ae = { key: 1 }, ne = /* @__PURE__ */ O({
58
59
  __name: "skuTable",
59
60
  props: {
60
61
  specData: {
@@ -76,7 +77,7 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
76
77
  }
77
78
  },
78
79
  emits: ["getGoodsSku", "getFormData"],
79
- setup(n, { emit: g }) {
80
+ setup(a, { emit: h }) {
80
81
  const s = C({
81
82
  salePrice: 0,
82
83
  marketPrice: 0,
@@ -84,49 +85,38 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
84
85
  weight: 0,
85
86
  volume: 0,
86
87
  stock: 0
87
- }), r = C([]), _ = g, k = n, b = T(() => {
88
- let o = K(k.specData, [], {}).map((u) => ({
89
- specValues: u.specs,
90
- specIds: u.specs.reduce(
91
- (c, i, e) => `${c}${i.specId}-${i.specValueId}${e === u.specs.length - 1 ? "" : "_"}`,
88
+ }), u = C([]), _ = h, k = a, b = q(() => {
89
+ let o = J(k.specData, [], {}).map((i) => ({
90
+ specValues: i.specs,
91
+ specIds: i.specs.reduce(
92
+ (r, c, e) => `${r}${c.specId}-${c.specValueId}${e === i.specs.length - 1 ? "" : "_"}`,
92
93
  ""
93
94
  )
94
- })), t = k.goodsSku.map((u) => ({
95
- ...u,
96
- specIds: u.specValues.reduce(
97
- (c, i, e) => `${c}${i.specId}-${i.specValueId}${e === u.specValues.length - 1 ? "" : "_"}`,
95
+ })), t = k.goodsSku.map((i) => ({
96
+ ...i,
97
+ specIds: i.specValues.reduce(
98
+ (r, c, e) => `${r}${c.specId}-${c.specValueId}${e === i.specValues.length - 1 ? "" : "_"}`,
98
99
  ""
99
100
  )
100
101
  }));
101
- return o.forEach(function(u) {
102
- t.forEach(function(c) {
103
- let i = u.specIds.split("_"), e = c.specIds.split("_"), h = !0;
104
- i.forEach(function(m) {
105
- e.find((P) => P == m) || (h = !1);
106
- }), 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);
102
+ return o.forEach((i) => {
103
+ t.forEach((r) => {
104
+ let c = i.specIds.split("_"), e = r.specIds.split("_"), g = !0;
105
+ c.forEach((m) => {
106
+ e.find((P) => P == m) || (g = !1);
107
+ }), g && (i.picUrl = r.picUrl ? r.picUrl : "", i.skuCode = r.skuCode ? r.skuCode : void 0, i.skuId = r.skuId ? r.skuId : void 0, i.salePrice = r.salePrice, i.marketPrice = r.marketPrice, i.costPrice = r.costPrice, i.stock = r.stock, i.weight = r.weight, i.volume = r.volume, i.status = r.status);
107
108
  });
108
109
  }), o;
109
110
  });
110
- z(
111
+ $(
111
112
  b,
112
113
  (o, t) => {
113
- var c, i;
114
- if (!o || !o.length) return r.value = [];
114
+ var r, c;
115
+ if (!o || !o.length) return u.value = [];
115
116
  if (!t || !t.length)
116
- return r.value = o.map((e) => ({
117
- ...e,
118
- picUrl: e.picUrl ? e.picUrl : "",
119
- skuCode: e.skuCode ? e.skuCode : void 0,
120
- salePrice: e.salePrice ? e.salePrice : 0,
121
- marketPrice: e.marketPrice ? e.marketPrice : void 0,
122
- costPrice: e.costPrice ? e.costPrice : void 0,
123
- stock: e.stock ? e.stock : 0,
124
- weight: e.weight ? e.weight : void 0,
125
- volume: e.volume ? e.volume : void 0,
126
- status: e.status ? e.status : !0
127
- }));
128
- if (((c = o[0].specValues) == null ? void 0 : c.length) !== ((i = t[0].specValues) == null ? void 0 : i.length))
129
- return r.value = o.map((e) => ({
117
+ return;
118
+ if (((r = o[0].specValues) == null ? void 0 : r.length) !== ((c = t[0].specValues) == null ? void 0 : c.length))
119
+ return u.value = o.map((e) => ({
130
120
  ...e,
131
121
  picUrl: "",
132
122
  skuCode: void 0,
@@ -139,19 +129,19 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
139
129
  status: !0
140
130
  }));
141
131
  if (o.length === t.length)
142
- return r.value = o.map((e, h) => ({
143
- ...r.value[h],
132
+ return u.value = o.map((e, g) => ({
133
+ ...u.value[g],
144
134
  ...e
145
135
  }));
146
- const u = I(o, t);
136
+ const i = I(o, t);
147
137
  if (o.length > t.length) {
148
138
  let e = [];
149
- o.forEach((h) => {
150
- const m = r.value.find(
151
- (P) => P.specIds === h.specIds
139
+ o.forEach((g) => {
140
+ const m = u.value.find(
141
+ (P) => P.specIds === g.specIds
152
142
  );
153
143
  m ? e.push(m) : e.push({
154
- ...h,
144
+ ...g,
155
145
  picUrl: "",
156
146
  skuCode: void 0,
157
147
  salePrice: 0,
@@ -162,18 +152,30 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
162
152
  volume: void 0,
163
153
  status: !0
164
154
  });
165
- }), r.value = e;
155
+ }), u.value = e;
166
156
  } else
167
- r.value = r.value.filter(
168
- (e) => !u.includes(e.specIds)
157
+ u.value = u.value.filter(
158
+ (e) => !i.includes(e.specIds)
169
159
  );
160
+ u.value = o.map((e) => ({
161
+ ...e,
162
+ picUrl: e.picUrl ? e.picUrl : "",
163
+ skuCode: e.skuCode ? e.skuCode : void 0,
164
+ salePrice: e.salePrice ? e.salePrice : 0,
165
+ marketPrice: e.marketPrice ? e.marketPrice : void 0,
166
+ costPrice: e.costPrice ? e.costPrice : void 0,
167
+ stock: e.stock ? e.stock : 0,
168
+ weight: e.weight ? e.weight : void 0,
169
+ volume: e.volume ? e.volume : void 0,
170
+ status: e.status ? e.status : !0
171
+ }));
170
172
  },
171
173
  {
172
174
  deep: !0,
173
175
  immediate: !0
174
176
  }
175
- ), z(
176
- r,
177
+ ), $(
178
+ u,
177
179
  (o) => {
178
180
  _("getFormData", o);
179
181
  },
@@ -183,38 +185,38 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
183
185
  }
184
186
  );
185
187
  function I(o, t) {
186
- return o = o.map((u) => u.specIds), t = t.map((u) => u.specIds), J(o, t);
188
+ return o = o.map((i) => i.specIds), t = t.map((i) => i.specIds), R(o, t);
187
189
  }
188
- function S() {
189
- r.value.forEach((o) => {
190
+ function y() {
191
+ u.value.forEach((o) => {
190
192
  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;
191
193
  });
192
194
  }
193
- function v(o, t) {
195
+ function V(o, t) {
194
196
  t.picUrl = o;
195
197
  }
196
198
  return (o, t) => {
197
- 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");
198
- return w(), U(x, null, [
199
- n.isSettingShow ? (w(), U("div", Q, [
200
- f("div", R, [
201
- a(c, null, {
199
+ const i = v("Setting"), r = v("el-icon"), c = v("el-input-number"), e = v("el-tooltip"), g = v("el-button"), m = v("el-table-column"), P = v("jmash-single-image-upload"), j = v("el-image"), A = v("el-input"), N = v("el-switch"), T = v("el-table");
200
+ return w(), U("div", null, [
201
+ a.isSettingShow ? (w(), U("div", W, [
202
+ f("div", X, [
203
+ n(r, null, {
202
204
  default: d(() => [
203
- a(u)
205
+ n(i)
204
206
  ]),
205
207
  _: 1
206
208
  }),
207
- t[6] || (t[6] = y(" 批量设置 "))
209
+ t[6] || (t[6] = S(" 批量设置 "))
208
210
  ]),
209
- f("span", W, [
210
- a(e, {
211
+ f("span", Y, [
212
+ n(e, {
211
213
  class: "box-item",
212
214
  effect: "dark",
213
215
  content: "销售价(元)",
214
216
  placement: "top-start"
215
217
  }, {
216
218
  default: d(() => [
217
- a(i, {
219
+ n(c, {
218
220
  modelValue: s.value.salePrice,
219
221
  "onUpdate:modelValue": t[0] || (t[0] = (l) => s.value.salePrice = l),
220
222
  precision: 2,
@@ -226,15 +228,15 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
226
228
  _: 1
227
229
  })
228
230
  ]),
229
- f("span", X, [
230
- a(e, {
231
+ f("span", Z, [
232
+ n(e, {
231
233
  class: "box-item",
232
234
  effect: "dark",
233
235
  content: "市场价(元)",
234
236
  placement: "top-start"
235
237
  }, {
236
238
  default: d(() => [
237
- a(i, {
239
+ n(c, {
238
240
  modelValue: s.value.marketPrice,
239
241
  "onUpdate:modelValue": t[1] || (t[1] = (l) => s.value.marketPrice = l),
240
242
  precision: 2,
@@ -246,15 +248,15 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
246
248
  _: 1
247
249
  })
248
250
  ]),
249
- f("span", Y, [
250
- a(e, {
251
+ f("span", ee, [
252
+ n(e, {
251
253
  class: "box-item",
252
254
  effect: "dark",
253
255
  content: "成本价(元)",
254
256
  placement: "top-start"
255
257
  }, {
256
258
  default: d(() => [
257
- a(i, {
259
+ n(c, {
258
260
  modelValue: s.value.costPrice,
259
261
  "onUpdate:modelValue": t[2] || (t[2] = (l) => s.value.costPrice = l),
260
262
  precision: 2,
@@ -266,15 +268,15 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
266
268
  _: 1
267
269
  })
268
270
  ]),
269
- f("span", Z, [
270
- a(e, {
271
+ f("span", le, [
272
+ n(e, {
271
273
  class: "box-item",
272
274
  effect: "dark",
273
275
  content: "重量(kg)",
274
276
  placement: "top-start"
275
277
  }, {
276
278
  default: d(() => [
277
- a(i, {
279
+ n(c, {
278
280
  modelValue: s.value.weight,
279
281
  "onUpdate:modelValue": t[3] || (t[3] = (l) => s.value.weight = l),
280
282
  precision: 2,
@@ -286,15 +288,15 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
286
288
  _: 1
287
289
  })
288
290
  ]),
289
- f("span", ee, [
290
- a(e, {
291
+ f("span", te, [
292
+ n(e, {
291
293
  class: "box-item",
292
294
  effect: "dark",
293
295
  content: "体积(m³)",
294
296
  placement: "top-start"
295
297
  }, {
296
298
  default: d(() => [
297
- a(i, {
299
+ n(c, {
298
300
  modelValue: s.value.volume,
299
301
  "onUpdate:modelValue": t[4] || (t[4] = (l) => s.value.volume = l),
300
302
  precision: 2,
@@ -306,15 +308,15 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
306
308
  _: 1
307
309
  })
308
310
  ]),
309
- f("span", le, [
310
- a(e, {
311
+ f("span", oe, [
312
+ n(e, {
311
313
  class: "box-item",
312
314
  effect: "dark",
313
315
  content: "库存",
314
316
  placement: "top-start"
315
317
  }, {
316
318
  default: d(() => [
317
- a(i, {
319
+ n(c, {
318
320
  modelValue: s.value.stock,
319
321
  "onUpdate:modelValue": t[5] || (t[5] = (l) => s.value.stock = l),
320
322
  precision: 0,
@@ -326,46 +328,57 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
326
328
  _: 1
327
329
  })
328
330
  ]),
329
- a(h, {
331
+ n(g, {
330
332
  type: "primary",
331
333
  size: "small",
332
- onClick: S
334
+ onClick: y
333
335
  }, {
334
336
  default: d(() => t[7] || (t[7] = [
335
- y("设置")
337
+ S("设置")
336
338
  ])),
337
339
  _: 1
338
340
  })
339
- ])) : B("", !0),
340
- a(j, {
341
- data: r.value,
341
+ ])) : F("", !0),
342
+ n(T, {
343
+ data: u.value,
342
344
  class: "w-full top-dis"
343
345
  }, {
344
346
  default: d(() => [
345
- a(m, { type: "index" }),
346
- (w(!0), U(x, null, O(n.specData, (l, p) => (w(), q(m, {
347
+ n(m, { type: "index" }),
348
+ (w(!0), U(M, null, G(a.specData, (l, p) => (w(), x(m, {
347
349
  key: l.id,
348
350
  prop: l.id,
349
351
  label: l.name
350
352
  }, {
351
- default: d((N) => [
352
- y($(N.row.specValues[p].specValueName), 1)
353
+ default: d((B) => [
354
+ S(D(B.row.specValues[p].specValueName), 1)
353
355
  ]),
354
356
  _: 2
355
357
  }, 1032, ["prop", "label"]))), 128)),
356
- a(m, {
358
+ n(m, {
357
359
  prop: "picUrl",
358
360
  label: "图片"
359
361
  }, {
360
362
  default: d((l) => [
361
- a(P, {
363
+ a.isSettingShow ? (w(), x(P, {
364
+ key: 0,
362
365
  "picture-url": l.row.picUrl,
363
- onImageSrc: (p) => v(p, l.row)
364
- }, null, 8, ["picture-url", "onImageSrc"])
366
+ onImageSrc: (p) => V(p, l.row)
367
+ }, null, 8, ["picture-url", "onImageSrc"])) : (w(), x(j, {
368
+ key: 1,
369
+ "preview-teleported": "",
370
+ style: { width: "80px", height: "80px" },
371
+ src: z(E).imageUrl(l.row.picUrl, 80, 80),
372
+ "zoom-rate": 1.2,
373
+ "max-scale": 7,
374
+ "min-scale": 0.2,
375
+ "preview-src-list": [z(E).imageUrl(l.row.picUrl)],
376
+ fit: "cover"
377
+ }, null, 8, ["src", "preview-src-list"]))
365
378
  ]),
366
379
  _: 1
367
380
  }),
368
- a(m, {
381
+ n(m, {
369
382
  prop: "salePrice",
370
383
  label: "销售价(元)",
371
384
  width: "150"
@@ -376,96 +389,96 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
376
389
  ])),
377
390
  default: d((l) => [
378
391
  f("span", null, [
379
- a(i, {
392
+ n(c, {
380
393
  modelValue: l.row.salePrice,
381
394
  "onUpdate:modelValue": (p) => l.row.salePrice = p,
382
395
  precision: 2,
383
396
  size: "small",
384
397
  controls: !1,
385
398
  class: "w-full",
386
- disabled: !n.isSettingShow
399
+ disabled: !a.isSettingShow
387
400
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
388
401
  ])
389
402
  ]),
390
403
  _: 1
391
404
  }),
392
- a(m, {
405
+ n(m, {
393
406
  prop: "marketPrice",
394
407
  label: "市场价(元)"
395
408
  }, {
396
409
  default: d((l) => [
397
410
  f("span", null, [
398
- a(i, {
411
+ n(c, {
399
412
  modelValue: l.row.marketPrice,
400
413
  "onUpdate:modelValue": (p) => l.row.marketPrice = p,
401
414
  precision: 2,
402
415
  size: "small",
403
416
  controls: !1,
404
417
  class: "w-full",
405
- disabled: !n.isSettingShow
418
+ disabled: !a.isSettingShow
406
419
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
407
420
  ])
408
421
  ]),
409
422
  _: 1
410
423
  }),
411
- a(m, {
424
+ n(m, {
412
425
  prop: "costPrice",
413
426
  label: "成本价(元)"
414
427
  }, {
415
428
  default: d((l) => [
416
429
  f("span", null, [
417
- a(i, {
430
+ n(c, {
418
431
  modelValue: l.row.costPrice,
419
432
  "onUpdate:modelValue": (p) => l.row.costPrice = p,
420
433
  precision: 2,
421
434
  size: "small",
422
435
  controls: !1,
423
436
  class: "w-full",
424
- disabled: !n.isSettingShow
437
+ disabled: !a.isSettingShow
425
438
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
426
439
  ])
427
440
  ]),
428
441
  _: 1
429
442
  }),
430
- a(m, {
443
+ n(m, {
431
444
  prop: "weight",
432
445
  label: "重量(kg)"
433
446
  }, {
434
447
  default: d((l) => [
435
448
  f("span", null, [
436
- a(i, {
449
+ n(c, {
437
450
  modelValue: l.row.weight,
438
451
  "onUpdate:modelValue": (p) => l.row.weight = p,
439
452
  precision: 2,
440
453
  size: "small",
441
454
  controls: !1,
442
455
  class: "w-full",
443
- disabled: !n.isSettingShow
456
+ disabled: !a.isSettingShow
444
457
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
445
458
  ])
446
459
  ]),
447
460
  _: 1
448
461
  }),
449
- a(m, {
462
+ n(m, {
450
463
  prop: "volume",
451
464
  label: "体积(m³)"
452
465
  }, {
453
466
  default: d((l) => [
454
467
  f("span", null, [
455
- a(i, {
468
+ n(c, {
456
469
  modelValue: l.row.volume,
457
470
  "onUpdate:modelValue": (p) => l.row.volume = p,
458
471
  precision: 2,
459
472
  size: "small",
460
473
  controls: !1,
461
474
  class: "w-full",
462
- disabled: !n.isSettingShow
475
+ disabled: !a.isSettingShow
463
476
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
464
477
  ])
465
478
  ]),
466
479
  _: 1
467
480
  }),
468
- a(m, {
481
+ n(m, {
469
482
  prop: "stock",
470
483
  label: "库存"
471
484
  }, {
@@ -475,62 +488,62 @@ const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X
475
488
  ])),
476
489
  default: d((l) => [
477
490
  f("span", null, [
478
- a(i, {
491
+ n(c, {
479
492
  modelValue: l.row.stock,
480
493
  "onUpdate:modelValue": (p) => l.row.stock = p,
481
494
  precision: 2,
482
495
  size: "small",
483
496
  controls: !1,
484
497
  class: "w-full",
485
- disabled: !n.isSettingShow
498
+ disabled: !a.isSettingShow
486
499
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
487
500
  ])
488
501
  ]),
489
502
  _: 1
490
503
  }),
491
- a(m, {
504
+ n(m, {
492
505
  prop: "skuCode",
493
506
  label: "sku编码"
494
507
  }, {
495
508
  default: d((l) => [
496
509
  f("span", null, [
497
- a(E, {
510
+ n(A, {
498
511
  modelValue: l.row.skuCode,
499
512
  "onUpdate:modelValue": (p) => l.row.skuCode = p,
500
513
  size: "small",
501
- disabled: !n.isSettingShow
514
+ disabled: !a.isSettingShow
502
515
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
503
516
  ])
504
517
  ]),
505
518
  _: 1
506
519
  }),
507
- a(m, {
520
+ n(m, {
508
521
  prop: "status",
509
522
  label: "是否上架",
510
523
  width: "80"
511
524
  }, {
512
525
  default: d((l) => [
513
- n.isSettingShow ? (w(), U("span", te, [
514
- a(L, {
526
+ a.isSettingShow ? (w(), U("span", se, [
527
+ n(N, {
515
528
  modelValue: l.row.status,
516
529
  "onUpdate:modelValue": (p) => l.row.status = p
517
530
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
518
- ])) : (w(), U("span", oe, $(F(M).shelfDict.getValue(l.row.status)), 1))
531
+ ])) : (w(), U("span", ae, D(z(K).shelfDict.getValue(l.row.status)), 1))
519
532
  ]),
520
533
  _: 1
521
534
  })
522
535
  ]),
523
536
  _: 1
524
537
  }, 8, ["data"])
525
- ], 64);
538
+ ]);
526
539
  };
527
540
  }
528
- }), ae = /* @__PURE__ */ G(se, [["__scopeId", "data-v-28216104"]]), ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
541
+ }), ie = /* @__PURE__ */ H(ne, [["__scopeId", "data-v-35aefe40"]]), de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
529
542
  __proto__: null,
530
- default: ae
543
+ default: ie
531
544
  }, Symbol.toStringTag, { value: "Module" }));
532
545
  export {
533
- G as _,
534
- ce as a,
535
- ae as s
546
+ H as _,
547
+ de as a,
548
+ ie as s
536
549
  };
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%}.title-set[data-v-28216104]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-d3b23fe5]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-d3b23fe5]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-d3b23fe5]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-d3b23fe5]{padding:10px 20px}.goods-tag[data-v-d3b23fe5]{margin-bottom:10px}[data-v-f10f6f7e] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-f10f6f7e] .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-35aefe40]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-d3b23fe5]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-d3b23fe5]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-d3b23fe5]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-d3b23fe5]{padding:10px 20px}.goods-tag[data-v-d3b23fe5]{margin-bottom:10px}[data-v-f10f6f7e] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-f10f6f7e] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-goods",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/index.d.ts",
@@ -21,16 +21,16 @@
21
21
  "peerDependencies": {
22
22
  "axios": "^1.7.7",
23
23
  "element-plus": "^2.8.7",
24
- "jmash-core": "^0.0.108",
25
- "jmash-dict": "^0.0.44",
26
- "jmash-rbac": "^0.0.40",
24
+ "jmash-core": "^0.0.120",
25
+ "jmash-dict": "^0.0.47",
26
+ "jmash-rbac": "^0.0.43",
27
27
  "pinia": "^2.2.4",
28
28
  "vue": "^3.5.11",
29
29
  "vue-i18n": "^9.14.1",
30
30
  "vue-router": "^4.4.5",
31
31
  "xyvcard-emall": "^0.0.6",
32
32
  "xyvcard-shop": "^0.0.16",
33
- "xyvcard-cms": "file:xyvcard-cms-0.0.34.tgz"
33
+ "xyvcard-cms": "0.0.36"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@eslint/js": "^9.16.0",