xyvcard-goods 0.0.29 → 0.0.31

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/{ImageUpload-Dk6GY6PA.mjs → ImageUpload-BMw9FVJL.mjs} +2 -2
  2. package/dist/{edit-Br1EAlBd.mjs → edit-Bgvy3bUQ.mjs} +131 -128
  3. package/dist/{edit-BzOoP1MM.mjs → edit-CAmBfr7s.mjs} +6 -6
  4. package/dist/{edit-BDHYnZTL.mjs → edit-CR4LNc6c.mjs} +1 -1
  5. package/dist/{edit-C0U9Ge6U.mjs → edit-DEKgI9dl.mjs} +3 -3
  6. package/dist/{edit-1TXe_HC2.mjs → edit-WZ-vVp0_.mjs} +3 -3
  7. package/dist/{edit.vue_vue_type_script_setup_true_lang-BmH1D2Ce.mjs → edit.vue_vue_type_script_setup_true_lang-CSjc2-0k.mjs} +76 -74
  8. package/dist/{index-DwDXNfWH.mjs → index-B9EvyZqu.mjs} +149 -141
  9. package/dist/{index-rRbEKDlL.mjs → index-Ba-YRVAR.mjs} +2 -2
  10. package/dist/{index-BreCG7fL.mjs → index-Br8OH0po.mjs} +129 -122
  11. package/dist/{index-DYo45BS3.mjs → index-CCDQbidt.mjs} +14 -14
  12. package/dist/{index-GWE4OrXj.mjs → index-CIOmQi5q.mjs} +1997 -1874
  13. package/dist/{index-D3Q39K5l.mjs → index-CnXaunj4.mjs} +14 -14
  14. package/dist/{index-ClnNQkIp.mjs → index-Dy5vhMgv.mjs} +1 -1
  15. package/dist/{index-RBIPJ3PM.mjs → index-w0WaL9Bq.mjs} +8 -8
  16. package/dist/index.mjs +1 -1
  17. package/dist/{info-Dji-jSuw.mjs → info-Cp_2nx9w.mjs} +4 -4
  18. package/dist/{info-DjDT9TId.mjs → info-CzP-Zg-I.mjs} +3 -3
  19. package/dist/{skuForm-9X82lvcF.mjs → skuForm-CVp5ywg4.mjs} +96 -93
  20. package/dist/{skuForm-BzxL1_v6.mjs → skuForm-D_Q4iyk2.mjs} +6 -6
  21. package/dist/{skuTable-RIQUU_Bl.mjs → skuTable-DcYM5x3V.mjs} +4 -4
  22. package/dist/style.css +1 -1
  23. package/dts/api/goods-spu/types.d.ts +1 -0
  24. package/package.json +3 -3
@@ -1,9 +1,9 @@
1
- import { defineComponent as x, ref as B, reactive as N, onActivated as ee, resolveComponent as d, resolveDirective as oe, openBlock as u, createElementBlock as V, createElementVNode as I, createVNode as t, withCtx as l, withKeys as te, unref as a, createTextVNode as p, toDisplayString as c, withDirectives as h, createBlock as k, isRef as R, createCommentVNode as S } from "vue";
1
+ import { defineComponent as x, ref as B, reactive as N, onActivated as ee, resolveComponent as d, resolveDirective as oe, createElementBlock as V, openBlock as u, createElementVNode as I, createVNode as t, createBlock as h, createCommentVNode as R, withCtx as l, withKeys as te, unref as a, createTextVNode as p, toDisplayString as c, withDirectives as k, isRef as S } from "vue";
2
2
  import { useTableHooks as le, fileApi as T } from "jmash-core";
3
3
  import { useI18n as ne } from "vue-i18n";
4
- import { g as ae } from "./index-ClnNQkIp.mjs";
5
- import de from "./edit-1TXe_HC2.mjs";
6
- import { D as re } from "./index-rRbEKDlL.mjs";
4
+ import { g as ae } from "./index-Dy5vhMgv.mjs";
5
+ import de from "./edit-WZ-vVp0_.mjs";
6
+ import { D as re } from "./index-Ba-YRVAR.mjs";
7
7
  const se = { class: "app-container" }, ie = { class: "search-container" }, ue = ["onClick"], me = ["onClick"], ye = /* @__PURE__ */ x({
8
8
  __name: "index",
9
9
  setup(pe) {
@@ -178,7 +178,7 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
178
178
  default: l(() => [
179
179
  t(_, { span: 17 }, {
180
180
  default: l(() => [
181
- h((u(), k(v, {
181
+ k((u(), h(v, {
182
182
  type: "primary",
183
183
  onClick: q
184
184
  }, {
@@ -189,7 +189,7 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
189
189
  })), [
190
190
  [y, ["goods:goods_brand_info:add"]]
191
191
  ]),
192
- h((u(), k(v, {
192
+ k((u(), h(v, {
193
193
  type: "primary",
194
194
  onClick: o[5] || (o[5] = (e) => a(r).deleteRecords())
195
195
  }, {
@@ -210,7 +210,7 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
210
210
  default: l(() => [
211
211
  t(M, {
212
212
  modelValue: a(f),
213
- "onUpdate:modelValue": o[6] || (o[6] = (e) => R(f) ? f.value = e : f = e),
213
+ "onUpdate:modelValue": o[6] || (o[6] = (e) => S(f) ? f.value = e : f = e),
214
214
  "label-name": "goods/goods-brand-info"
215
215
  }, null, 8, ["modelValue"])
216
216
  ]),
@@ -221,16 +221,16 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
221
221
  })
222
222
  ]),
223
223
  footer: l(() => [
224
- a(b) > 0 ? (u(), k(Y, {
224
+ a(b) > 0 ? (u(), h(Y, {
225
225
  key: 0,
226
226
  total: a(b),
227
- "onUpdate:total": o[7] || (o[7] = (e) => R(b) ? b.value = e : null),
227
+ "onUpdate:total": o[7] || (o[7] = (e) => S(b) ? b.value = e : null),
228
228
  "current-page": s.value.curPage,
229
229
  "onUpdate:currentPage": o[8] || (o[8] = (e) => s.value.curPage = e),
230
230
  "page-size": s.value.pageSize,
231
231
  "onUpdate:pageSize": o[9] || (o[9] = (e) => s.value.pageSize = e),
232
232
  onPagination: o[10] || (o[10] = (e) => a(r).getList())
233
- }, null, 8, ["total", "current-page", "page-size"])) : S("", !0)
233
+ }, null, 8, ["total", "current-page", "page-size"])) : R("", !0)
234
234
  ]),
235
235
  default: l(() => [
236
236
  t(X, {
@@ -282,7 +282,7 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
282
282
  ])
283
283
  ]),
284
284
  operation: l((e) => [
285
- h((u(), V("span", {
285
+ k((u(), V("span", {
286
286
  class: "el-button-color",
287
287
  onClick: (m) => L(e.data.row)
288
288
  }, [
@@ -290,7 +290,7 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
290
290
  ], 8, ue)), [
291
291
  [y, ["goods:goods_brand_info:update"]]
292
292
  ]),
293
- h((u(), V("span", {
293
+ k((u(), V("span", {
294
294
  class: "el-button-color dropdown-left",
295
295
  onClick: (m) => a(r).deleteRecord(e.data.row)
296
296
  }, [
@@ -304,7 +304,7 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
304
304
  ]),
305
305
  _: 1
306
306
  }),
307
- i.value.visible ? (u(), k(de, {
307
+ i.value.visible ? (u(), h(de, {
308
308
  key: 0,
309
309
  modelValue: i.value.visible,
310
310
  "onUpdate:modelValue": o[11] || (o[11] = (e) => i.value.visible = e),
@@ -312,7 +312,7 @@ const se = { class: "app-container" }, ie = { class: "search-container" }, ue =
312
312
  "entity-key": a(w),
313
313
  onRefresh: K,
314
314
  width: "500px"
315
- }, null, 8, ["modelValue", "title", "entity-key"])) : S("", !0)
315
+ }, null, 8, ["modelValue", "title", "entity-key"])) : R("", !0)
316
316
  ]);
317
317
  };
318
318
  }
@@ -1,5 +1,5 @@
1
1
  import { useUserStore as e, clearEmpty as s, request as r } from "jmash-core";
2
- import { q as d } from "./index-GWE4OrXj.mjs";
2
+ import { q as d } from "./index-CIOmQi5q.mjs";
3
3
  class u {
4
4
  getKey(t) {
5
5
  return {
@@ -1,9 +1,9 @@
1
- import { defineComponent as x, ref as $, reactive as S, onActivated as ee, resolveComponent as r, resolveDirective as oe, openBlock as d, createElementBlock as w, createElementVNode as U, createVNode as l, withCtx as t, withKeys as te, unref as n, createTextVNode as p, toDisplayString as c, withDirectives as k, createBlock as _, isRef as T, createCommentVNode as D } from "vue";
1
+ import { defineComponent as x, ref as $, reactive as S, onActivated as ee, resolveComponent as r, resolveDirective as oe, createElementBlock as w, openBlock as d, createElementVNode as U, createVNode as l, createBlock as _, createCommentVNode as T, withCtx as t, withKeys as te, unref as n, createTextVNode as p, toDisplayString as c, withDirectives as k, isRef as D } from "vue";
2
2
  import { useI18n as le } from "vue-i18n";
3
3
  import { useTableHooks as ae, fileApi as j } from "jmash-core";
4
- import { D as ne } from "./index-rRbEKDlL.mjs";
5
- import { g as re } from "./index-GWE4OrXj.mjs";
6
- import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-BmH1D2Ce.mjs";
4
+ import { D as ne } from "./index-Ba-YRVAR.mjs";
5
+ import { g as re } from "./index-CIOmQi5q.mjs";
6
+ import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-CSjc2-0k.mjs";
7
7
  const ie = { class: "app-container" }, de = { class: "search-container" }, ue = { key: 1 }, me = ["onClick"], pe = ["onClick"], Ce = /* @__PURE__ */ x({
8
8
  __name: "index",
9
9
  setup(ce) {
@@ -215,7 +215,7 @@ const ie = { class: "app-container" }, de = { class: "search-container" }, ue =
215
215
  default: t(() => [
216
216
  l(M, {
217
217
  modelValue: n(g),
218
- "onUpdate:modelValue": o[6] || (o[6] = (e) => T(g) ? g.value = e : g = e),
218
+ "onUpdate:modelValue": o[6] || (o[6] = (e) => D(g) ? g.value = e : g = e),
219
219
  "label-name": "goods/goods-spu"
220
220
  }, null, 8, ["modelValue"])
221
221
  ]),
@@ -229,13 +229,13 @@ const ie = { class: "app-container" }, de = { class: "search-container" }, ue =
229
229
  n(v) > 0 ? (d(), _(Y, {
230
230
  key: 0,
231
231
  total: n(v),
232
- "onUpdate:total": o[7] || (o[7] = (e) => T(v) ? v.value = e : null),
232
+ "onUpdate:total": o[7] || (o[7] = (e) => D(v) ? v.value = e : null),
233
233
  "current-page": i.value.curPage,
234
234
  "onUpdate:currentPage": o[8] || (o[8] = (e) => i.value.curPage = e),
235
235
  "page-size": i.value.pageSize,
236
236
  "onUpdate:pageSize": o[9] || (o[9] = (e) => i.value.pageSize = e),
237
237
  onPagination: o[10] || (o[10] = (e) => n(s).getList())
238
- }, null, 8, ["total", "current-page", "page-size"])) : D("", !0)
238
+ }, null, 8, ["total", "current-page", "page-size"])) : T("", !0)
239
239
  ]),
240
240
  default: t(() => [
241
241
  l(X, {
@@ -318,7 +318,7 @@ const ie = { class: "app-container" }, de = { class: "search-container" }, ue =
318
318
  "entity-key": n(h),
319
319
  onRefresh: Q,
320
320
  width: "600px"
321
- }, null, 8, ["modelValue", "title", "entity-key"])) : D("", !0)
321
+ }, null, 8, ["modelValue", "title", "entity-key"])) : T("", !0)
322
322
  ]);
323
323
  };
324
324
  }
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "jmash-core";
2
- import { c as p, g, b as d, a as e } from "./index-GWE4OrXj.mjs";
2
+ import { c as p, g, b as d, a as e } from "./index-CIOmQi5q.mjs";
3
3
  export {
4
4
  p as default,
5
5
  g as goodsCategoryApi,
@@ -1,9 +1,9 @@
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";
1
+ import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b, createElementBlock as k, openBlock as r, createVNode as i, withCtx as e, createElementVNode as a, createBlock as S, createCommentVNode as B, createTextVNode as n, toDisplayString as s, Fragment as L, renderList as I, unref as _ } from "vue";
2
2
  import { fileApi as w, routerUtil as F } from "jmash-core";
3
3
  import { useRouter as H, useRoute as O } from "vue-router";
4
- import { D as d, C as N, S as R } from "./index-rRbEKDlL.mjs";
5
- import Y from "./skuTable-RIQUU_Bl.mjs";
6
- import { a as G } from "./index-GWE4OrXj.mjs";
4
+ import { D as d, C as N, S as R } from "./index-Ba-YRVAR.mjs";
5
+ import Y from "./skuTable-DcYM5x3V.mjs";
6
+ import { a as G } from "./index-CIOmQi5q.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: "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
9
  __name: "info",
@@ -1,8 +1,8 @@
1
- import { defineComponent as M, ref as P, resolveComponent as f, openBlock as _, createElementBlock as v, createVNode as o, withCtx as s, createTextVNode as p, toDisplayString as u, createElementVNode as d, Fragment as C, renderList as V, createBlock as D, unref as m } from "vue";
1
+ import { defineComponent as M, ref as P, resolveComponent as f, createElementBlock as v, openBlock as _, createVNode as o, withCtx as s, createElementVNode as d, createTextVNode as p, toDisplayString as u, Fragment as C, renderList as V, createBlock as D, unref as m } from "vue";
2
2
  import { fileApi as S, routerUtil as R } from "jmash-core";
3
3
  import { useRouter as j, useRoute as G } from "vue-router";
4
- import { D as y, C as b } from "./index-rRbEKDlL.mjs";
5
- import { a as L } from "./index-GWE4OrXj.mjs";
4
+ import { D as y, C as b } from "./index-Ba-YRVAR.mjs";
5
+ import { a as L } from "./index-CIOmQi5q.mjs";
6
6
  import { specValueApi as H } from "xyvcard-shop";
7
7
  const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, w = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, ae = { key: 0 }, ie = { key: 1 }, me = /* @__PURE__ */ M({
8
8
  __name: "info",
@@ -1,15 +1,15 @@
1
- import { defineComponent as j, openBlock as m, createElementBlock as S, createElementVNode as M, ref as v, watch as B, resolveComponent as r, createBlock as h, withCtx as i, createVNode as c, unref as g, Fragment as Y, renderList as G, createCommentVNode as H, createTextVNode as x, toDisplayString as J } from "vue";
1
+ import { defineComponent as j, createElementBlock as v, openBlock as m, createElementVNode as M, ref as V, watch as B, resolveComponent as r, createBlock as P, withCtx as i, createVNode as n, unref as h, Fragment as Y, renderList as G, createCommentVNode as H, createTextVNode as x, toDisplayString as J } from "vue";
2
2
  import { useI18n as K } from "vue-i18n";
3
- import { D as V, C as P } from "./index-rRbEKDlL.mjs";
4
- import { a as O } from "./index-GWE4OrXj.mjs";
3
+ import { D as S, C as g } from "./index-Ba-YRVAR.mjs";
4
+ import { a as O } from "./index-CIOmQi5q.mjs";
5
5
  import { specValueApi as Q } from "xyvcard-shop";
6
6
  import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
- /*! Element Plus Icons Vue v2.3.1 */
7
+ /*! Element Plus Icons Vue v2.3.2 */
8
8
  var X = /* @__PURE__ */ j({
9
9
  name: "Plus",
10
10
  __name: "plus",
11
11
  setup(b) {
12
- return (C, E) => (m(), S("svg", {
12
+ return (C, E) => (m(), v("svg", {
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  viewBox: "0 0 1024 1024"
15
15
  }, [
@@ -31,55 +31,56 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
31
31
  },
32
32
  emits: ["getGoodsSku", "getFormData"],
33
33
  setup(b, { emit: C }) {
34
- const { t: E } = K(), U = v([]), d = v([
34
+ const { t: E } = K(), U = V([]), d = V([
35
35
  {
36
36
  salePrice: 0,
37
37
  skuId: "",
38
38
  spuId: "",
39
39
  specInfo: "",
40
- saleNum: 0,
40
+ saleNum: 1,
41
41
  picUrl: "",
42
42
  specType: "",
43
- skuOptions: []
43
+ skuOptions: [],
44
+ marketPrice: 0
44
45
  }
45
46
  ]);
46
- V.goodsSpuBizDict.useValues();
47
+ S.goodsSpuBizDict.useValues();
47
48
  const F = C;
48
- function L(s, l) {
49
- s.picUrl = l;
49
+ function L(s, e) {
50
+ s.picUrl = e;
50
51
  }
51
- const y = b;
52
+ const N = b;
52
53
  B(
53
- y.form,
54
+ N.form,
54
55
  (s) => s,
55
56
  {
56
57
  deep: !0,
57
58
  immediate: !0
58
59
  }
59
- ), y.form.spuId && O.findGroupList({ goodsId: y.form.spuId }).then(({ data: s }) => {
60
+ ), N.form.spuId && O.findGroupList({ goodsId: N.form.spuId }).then(({ data: s }) => {
60
61
  if (s && s.results.length > 0) {
61
62
  d.value = [];
62
- const l = s.results.map(async (e) => {
63
+ const e = s.results.map(async (l) => {
63
64
  const t = {
64
- salePrice: e.salePrice || 0,
65
- skuId: e.skuId || "",
66
- spuId: e.spuId || "",
67
- saleNum: e.saleNum || 0,
68
- picUrl: e.picUrl || "",
69
- skuName: e.skuName || "",
65
+ salePrice: l.salePrice || 0,
66
+ skuId: l.skuId || "",
67
+ spuId: l.spuId || "",
68
+ saleNum: l.saleNum || 1,
69
+ picUrl: l.picUrl || "",
70
+ skuName: l.skuName || "",
70
71
  specType: "",
71
72
  skuOptions: []
72
73
  };
73
- return await D(e.spuId, t), t.saleNum = e.saleNum || 0, t.salePrice = e.salePrice || 0, t.specType === P.SPEC_TYPE.MULTI_SPEC && e.skuId && (t.skuId = e.skuId || "", t.salePrice = e.salePrice || 0, t.saleNum = e.saleNum || 0, t.picUrl = e.picUrl || "", $(e.skuId)), t;
74
+ return await D(l.spuId, t), t.saleNum = l.saleNum || 1, t.salePrice = l.salePrice || 0, t.specType === g.SPEC_TYPE.MULTI_SPEC && l.skuId && (t.skuId = l.skuId || "", t.salePrice = l.salePrice || 0, t.saleNum = l.saleNum || 1, t.picUrl = l.picUrl || "", $(l.skuId)), t;
74
75
  });
75
- Promise.all(l).then((e) => {
76
- d.value = e;
76
+ Promise.all(e).then((l) => {
77
+ d.value = l;
77
78
  });
78
79
  }
79
80
  });
80
81
  function A(s) {
81
- const l = d.value.indexOf(s.row);
82
- l !== 0 && d.value.splice(l, 1);
82
+ const e = d.value.indexOf(s.row);
83
+ e !== 0 && d.value.splice(e, 1);
83
84
  }
84
85
  function R() {
85
86
  d.value.push({
@@ -87,50 +88,51 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
87
88
  skuId: "",
88
89
  spuId: "",
89
90
  specInfo: "",
90
- saleNum: 0,
91
+ saleNum: 1,
91
92
  picUrl: "",
92
93
  specType: "",
93
- skuOptions: []
94
+ skuOptions: [],
95
+ marketPrice: 0
94
96
  });
95
97
  }
96
- const T = v({});
98
+ const T = V({});
97
99
  async function z(s) {
98
100
  if (!U.value[s])
99
101
  try {
100
- const { data: l } = await Q.findById({
102
+ const { data: e } = await Q.findById({
101
103
  specValueId: s
102
104
  });
103
- return U.value[s] = l.valueName, l.valueName;
105
+ return U.value[s] = e.valueName, e.valueName;
104
106
  } catch {
105
107
  }
106
108
  }
107
- async function D(s, l) {
108
- var e, t, k;
109
- if (l.skuId = "", l.skuOptions = [], l.picUrl = "", l.salePrice = 0, l.saleNum = 0, l.skuName = "", !s) {
110
- l.skuId = "", l.picUrl = "", l.salePrice = 0, l.saleNum = 0, l.skuName = ((e = V.goodsSpuBizDict.values.find((o) => o.key === s)) == null ? void 0 : e.value) ?? "", l.skuOptions = [];
109
+ async function D(s, e) {
110
+ var l, t, I;
111
+ if (e.skuId = "", e.skuOptions = [], e.picUrl = "", e.salePrice = 0, e.saleNum = 1, e.skuName = "", e.marketPrice = 0, !s) {
112
+ e.skuId = "", e.picUrl = "", e.salePrice = 0, e.saleNum = 1, e.skuName = ((l = S.goodsSpuBizDict.values.find((o) => o.key === s)) == null ? void 0 : l.value) ?? "", e.skuOptions = [], e.marketPrice = 0;
111
113
  return;
112
114
  }
113
115
  try {
114
116
  const { data: o } = await O.findById({ spuId: s });
115
- if (l.specType = o.specType, l.specType === P.SPEC_TYPE.UNIFIED_SPEC && (l.picUrl = o.picUrls ? o.picUrls.split(",")[0] : "", l.salePrice = (t = o.skuList) == null ? void 0 : t.results[0].salePrice, l.skuId = (k = o.skuList) == null ? void 0 : k.results[0].skuId, l.skuName = o.spuName), l.specType === P.SPEC_TYPE.MULTI_SPEC && o.skuList) {
117
+ if (e.specType = o.specType, e.marketPrice = o.maxPrice, e.specType === g.SPEC_TYPE.UNIFIED_SPEC && (e.picUrl = o.picUrls ? o.picUrls.split(",")[0] : "", e.salePrice = (t = o.skuList) == null ? void 0 : t.results[0].salePrice, e.skuId = (I = o.skuList) == null ? void 0 : I.results[0].skuId, e.skuName = o.spuName), e.specType === g.SPEC_TYPE.MULTI_SPEC && o.skuList) {
116
118
  const f = o.skuList.results, _ = f.map((u) => u.specValues && Array.isArray(u.specValues) ? u.specValues.map(
117
119
  (p) => p.specValueId
118
- ) : []), N = _.flat().map((u) => z(u));
119
- await Promise.all(N);
120
- const I = _.map(
120
+ ) : []), y = _.flat().map((u) => z(u));
121
+ await Promise.all(y);
122
+ const k = _.map(
121
123
  (u) => u.map((p) => U.value[p] || p)
122
124
  );
123
- l.skuOptions = f.map((u, p) => ({
125
+ e.skuOptions = f.map((u, p) => ({
124
126
  key: u.skuId,
125
- value: I[p].join(" "),
126
- specInfo: I[p].join(" "),
127
+ value: k[p].join(" "),
128
+ specInfo: k[p].join(" "),
127
129
  picUrl: u.picUrl || (o.picUrls ? o.picUrls.split(",")[0] : ""),
128
130
  salePrice: u.salePrice,
129
131
  stock: u.stock
130
132
  })), f.forEach((u, p) => {
131
133
  u.skuId && (T.value[u.skuId] = {
132
134
  ...u,
133
- specInfo: I[p].join(" "),
135
+ specInfo: k[p].join(" "),
134
136
  spuPicUrls: o.picUrls
135
137
  });
136
138
  });
@@ -139,79 +141,80 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
139
141
  }
140
142
  }
141
143
  function $(s) {
142
- const l = d.value.find((e) => e.skuId === s);
143
- if (l && s) {
144
- const e = T.value[s];
145
- if (e) {
146
- const t = e.spuPicUrls ? e.spuPicUrls.split(",")[0] : "";
147
- l.picUrl = e.picUrl || t, l.salePrice = e.salePrice, l.specInfo = e.specInfo;
144
+ const e = d.value.find((l) => l.skuId === s);
145
+ if (e && s) {
146
+ const l = T.value[s];
147
+ if (l) {
148
+ const t = l.spuPicUrls ? l.spuPicUrls.split(",")[0] : "";
149
+ e.picUrl = l.picUrl || t, e.salePrice = l.salePrice, e.specInfo = l.specInfo;
148
150
  }
149
151
  }
150
152
  }
151
153
  return B(
152
154
  d,
153
155
  (s) => {
154
- const l = s.filter((e) => e.spuId && e.skuId).map((e) => ({
155
- salePrice: e.salePrice,
156
- skuId: e.skuId,
157
- spuId: e.spuId,
158
- specInfo: e.specInfo,
159
- saleNum: e.saleNum,
160
- picUrl: e.picUrl,
161
- skuName: e.skuName
156
+ const e = s.filter((l) => l.spuId && l.skuId).map((l) => ({
157
+ salePrice: l.salePrice,
158
+ skuId: l.skuId,
159
+ spuId: l.spuId,
160
+ specInfo: l.specInfo,
161
+ saleNum: l.saleNum,
162
+ picUrl: l.picUrl,
163
+ skuName: l.skuName,
164
+ marketPrice: l.marketPrice
162
165
  }));
163
- F("getGoodsSku", l);
166
+ console.log("filteredValue", e), F("getGoodsSku", e);
164
167
  },
165
168
  {
166
169
  deep: !0,
167
170
  immediate: !0
168
171
  }
169
- ), (s, l) => {
170
- const e = r("jmash-select"), t = r("el-table-column"), k = r("el-option"), o = r("el-select"), f = r("jmash-single-image-upload"), _ = r("el-input-number"), N = r("DeleteFilled"), I = r("el-icon"), u = r("el-table"), p = r("el-button"), q = r("el-row");
171
- return m(), h(q, null, {
172
+ ), (s, e) => {
173
+ const l = r("jmash-select"), t = r("el-table-column"), I = r("el-option"), o = r("el-select"), f = r("jmash-single-image-upload"), _ = r("el-input-number"), y = r("DeleteFilled"), k = r("el-icon"), u = r("el-table"), p = r("el-button"), q = r("el-row");
174
+ return m(), P(q, null, {
172
175
  default: i(() => [
173
- c(u, {
176
+ n(u, {
174
177
  data: d.value,
175
178
  border: "",
176
179
  style: { width: "100%" }
177
180
  }, {
178
181
  default: i(() => [
179
- c(t, {
182
+ n(t, {
180
183
  label: s.$t("goodsSpu.spuName"),
181
184
  prop: "spuId",
182
185
  "header-align": "center"
183
186
  }, {
184
187
  default: i(({ row: a }) => [
185
- c(e, {
188
+ n(l, {
186
189
  modelValue: a.spuId,
187
- "onUpdate:modelValue": (n) => a.spuId = n,
188
- data: g(V).goodsSpuBizDict.values,
190
+ "onUpdate:modelValue": (c) => a.spuId = c,
191
+ data: h(S).goodsSpuBizDict.values,
189
192
  filterable: "",
190
193
  clearable: "",
191
194
  placeholder: s.$t("goodsSpu.spuNameRequireds"),
192
195
  class: "w-full",
193
- onChange: (n) => D(a.spuId, a)
196
+ onChange: (c) => D(a.spuId, a)
194
197
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data", "placeholder", "onChange"])
195
198
  ]),
196
199
  _: 1
197
200
  }, 8, ["label"]),
198
- c(t, {
201
+ n(t, {
199
202
  label: s.$t("goodsSpu.specType"),
200
203
  "header-align": "center"
201
204
  }, {
202
205
  default: i(({ row: a }) => [
203
- a.specType === g(P).SPEC_TYPE.UNIFIED_SPEC ? (m(), S("span", w, " 统一规格 ")) : (m(), h(o, {
206
+ a.specType === h(g).SPEC_TYPE.UNIFIED_SPEC ? (m(), v("span", w, " 统一规格 ")) : (m(), P(o, {
204
207
  key: 1,
205
208
  modelValue: a.skuId,
206
- "onUpdate:modelValue": (n) => a.skuId = n,
209
+ "onUpdate:modelValue": (c) => a.skuId = c,
207
210
  placeholder: s.$t("goodsSpu.specTypeRequired"),
208
- onChange: (n) => $(a.skuId)
211
+ onChange: (c) => $(a.skuId)
209
212
  }, {
210
213
  default: i(() => [
211
- (m(!0), S(Y, null, G(a.skuOptions, (n) => (m(), h(k, {
212
- key: n.key,
213
- label: n.value,
214
- value: n.key
214
+ (m(!0), v(Y, null, G(a.skuOptions, (c) => (m(), P(I, {
215
+ key: c.key,
216
+ label: c.value,
217
+ value: c.key
215
218
  }, null, 8, ["label", "value"]))), 128))
216
219
  ]),
217
220
  _: 2
@@ -219,31 +222,31 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
219
222
  ]),
220
223
  _: 1
221
224
  }, 8, ["label"]),
222
- c(t, {
225
+ n(t, {
223
226
  label: s.$t("goodsSpu.picUrls"),
224
227
  prop: "picUrl",
225
228
  width: "105",
226
229
  "header-align": "center"
227
230
  }, {
228
231
  default: i(({ row: a }) => [
229
- c(f, {
232
+ n(f, {
230
233
  "picture-url": a.picUrl,
231
- onImageSrc: (n) => L(a, n),
234
+ onImageSrc: (c) => L(a, c),
232
235
  width: 80,
233
236
  type: "trans"
234
237
  }, null, 8, ["picture-url", "onImageSrc"])
235
238
  ]),
236
239
  _: 1
237
240
  }, 8, ["label"]),
238
- c(t, {
241
+ n(t, {
239
242
  label: s.$t("goodsSpu.salePriceV1"),
240
243
  prop: "salePrice",
241
244
  "header-align": "center"
242
245
  }, {
243
246
  default: i(({ row: a }) => [
244
- c(_, {
247
+ n(_, {
245
248
  modelValue: a.salePrice,
246
- "onUpdate:modelValue": (n) => a.salePrice = n,
249
+ "onUpdate:modelValue": (c) => a.salePrice = c,
247
250
  precision: 2,
248
251
  min: 0,
249
252
  placeholder: s.$t("goodsSpu.salePriceV1Required"),
@@ -253,15 +256,15 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
253
256
  ]),
254
257
  _: 1
255
258
  }, 8, ["label"]),
256
- c(t, {
259
+ n(t, {
257
260
  label: s.$t("goodsSpu.saleNums"),
258
261
  prop: "saleNum",
259
262
  "header-align": "center"
260
263
  }, {
261
264
  default: i(({ row: a }) => [
262
- c(_, {
265
+ n(_, {
263
266
  modelValue: a.saleNum,
264
- "onUpdate:modelValue": (n) => a.saleNum = n,
267
+ "onUpdate:modelValue": (c) => a.saleNum = c,
265
268
  placeholder: s.$t("goodsSpu.saleNumRequireds"),
266
269
  class: "w-full",
267
270
  controls: !1,
@@ -271,21 +274,21 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
271
274
  ]),
272
275
  _: 1
273
276
  }, 8, ["label"]),
274
- c(t, {
277
+ n(t, {
275
278
  label: s.$t("common.operate"),
276
279
  width: "60",
277
280
  align: "center"
278
281
  }, {
279
282
  default: i((a) => [
280
- a.$index !== 0 ? (m(), h(I, {
283
+ a.$index !== 0 ? (m(), P(k, {
281
284
  key: 0,
282
- onClick: (n) => A(a),
285
+ onClick: (c) => A(a),
283
286
  size: "18",
284
287
  style: { cursor: "pointer", color: "inherit" },
285
288
  class: "hover-blue"
286
289
  }, {
287
290
  default: i(() => [
288
- c(N)
291
+ n(y)
289
292
  ]),
290
293
  _: 2
291
294
  }, 1032, ["onClick"])) : H("", !0)
@@ -295,13 +298,13 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
295
298
  ]),
296
299
  _: 1
297
300
  }, 8, ["data"]),
298
- c(p, {
299
- icon: g(Z),
301
+ n(p, {
302
+ icon: h(Z),
300
303
  class: "addButton",
301
304
  onClick: R
302
305
  }, {
303
306
  default: i(() => [
304
- x(J(g(E)("common.add")), 1)
307
+ x(J(h(E)("common.add")), 1)
305
308
  ]),
306
309
  _: 1
307
310
  }, 8, ["icon"])
@@ -310,7 +313,7 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
310
313
  });
311
314
  };
312
315
  }
313
- }), ne = /* @__PURE__ */ W(ee, [["__scopeId", "data-v-dc82ad15"]]);
316
+ }), ce = /* @__PURE__ */ W(ee, [["__scopeId", "data-v-6bb5afe9"]]);
314
317
  export {
315
- ne as default
318
+ ce as default
316
319
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as te, ref as S, computed as se, watch as $, resolveComponent as i, openBlock as m, createElementBlock as g, Fragment as b, unref as M, createVNode as o, withCtx as a, createCommentVNode as I, renderList as P, createElementVNode as k, toDisplayString as O, createTextVNode as y, createBlock as w } from "vue";
2
- import { C as D, D as ue, S as Y, a as ne } from "./index-rRbEKDlL.mjs";
3
- import re from "./skuTable-RIQUU_Bl.mjs";
1
+ import { defineComponent as te, ref as S, computed as se, watch as $, resolveComponent as i, createElementBlock as g, openBlock as m, Fragment as b, createCommentVNode as I, unref as M, createVNode as o, withCtx as a, renderList as P, createElementVNode as k, toDisplayString as O, createTextVNode as y, createBlock as w } from "vue";
2
+ import { C as D, D as ue, S as Y, a as ne } from "./index-Ba-YRVAR.mjs";
3
+ import re from "./skuTable-DcYM5x3V.mjs";
4
4
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
5
  const pe = { key: 0 }, ce = {
6
6
  key: 1,
@@ -353,7 +353,7 @@ const pe = { key: 0 }, ce = {
353
353
  ]),
354
354
  _: 1
355
355
  }),
356
- l[9] || (l[9] = y("移除 "))
356
+ l[9] || (l[9] = y("移除 ", -1))
357
357
  ], 8, me)
358
358
  ]),
359
359
  k("div", fe, [
@@ -380,7 +380,7 @@ const pe = { key: 0 }, ce = {
380
380
  reference: a(() => [
381
381
  o(R, { class: "m-2" }, {
382
382
  default: a(() => l[10] || (l[10] = [
383
- y("添加规格值")
383
+ y("添加规格值", -1)
384
384
  ])),
385
385
  _: 1,
386
386
  __: [10]
@@ -417,7 +417,7 @@ const pe = { key: 0 }, ce = {
417
417
  reference: a(() => [
418
418
  o(R, { class: "m-2" }, {
419
419
  default: a(() => l[11] || (l[11] = [
420
- y("添加规格")
420
+ y("添加规格", -1)
421
421
  ])),
422
422
  _: 1,
423
423
  __: [11]