xyvcard-goods 0.0.29 → 0.0.30

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.
@@ -1,18 +1,18 @@
1
- import { _ as z } from "./ImageUpload-Dk6GY6PA.mjs";
2
- import { defineComponent as O, ref as R, reactive as I, resolveComponent as p, openBlock as h, createElementBlock as P, createElementVNode as f, createVNode as e, unref as t, withCtx as r, Fragment as x, renderList as M, createBlock as v, createTextVNode as U, toDisplayString as j, createCommentVNode as H } from "vue";
3
- import { ElMessage as w } from "element-plus";
1
+ import { _ as x } from "./ImageUpload-Dk6GY6PA.mjs";
2
+ import { defineComponent as z, ref as P, reactive as R, resolveComponent as p, openBlock as h, createElementBlock as I, createElementVNode as f, createVNode as e, unref as r, withCtx as s, Fragment as M, renderList as O, createBlock as k, createTextVNode as v, toDisplayString as H, createCommentVNode as j } from "vue";
3
+ import { ElMessage as U } from "element-plus";
4
4
  import { useRouter as Y, useRoute as J } from "vue-router";
5
- import { routerUtil as k } from "jmash-core";
5
+ import { routerUtil as w } from "jmash-core";
6
6
  import { useI18n as K } from "vue-i18n";
7
- import { D as m, C as Q } from "./index-rRbEKDlL.mjs";
8
- import { a as b } from "./index-GWE4OrXj.mjs";
9
- import W from "./skuForm-9X82lvcF.mjs";
10
- const X = { class: "app-container" }, Z = { class: "search-container" }, ee = { class: "image-card" }, pe = /* @__PURE__ */ O({
7
+ import { D as m, C as Q } from "./index-Vu01FEMS.mjs";
8
+ import { a as b } from "./index-Dpms2ryP.mjs";
9
+ import W from "./skuForm-K3S131WX.mjs";
10
+ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = { class: "image-card" }, pe = /* @__PURE__ */ z({
11
11
  __name: "edit",
12
12
  setup(le) {
13
- const { t: n } = K(), y = Y(), g = J(), V = R();
13
+ const { t: i } = K(), y = Y(), g = J(), V = P();
14
14
  m.goodsCategoryListBizLayDict.useValues(), m.labelListBizDict.useValues();
15
- let o = I({
15
+ let o = R({
16
16
  requestId: Math.random() * 10 + "",
17
17
  updateMask: "labelIds,minPrice,maxPrice,spuName,categoryIds,spuCode,freightType,freightAmount,picUrls,shelf,saleNum",
18
18
  skuSpecValues: [],
@@ -21,61 +21,61 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
21
21
  shelf: m.shelfDict.values[0].key,
22
22
  goodsType: Q.GOODS_TYPE.GROUP
23
23
  });
24
- const C = (s, l, i) => {
24
+ const C = (t, l, n) => {
25
25
  var d;
26
26
  const a = (d = o.picUrls) == null ? void 0 : d.split(",").filter(Boolean);
27
27
  if (a != null && a.length) {
28
28
  if ((a == null ? void 0 : a.length) < 1)
29
- return i(new Error(n("goodsSpu.imageListsErrors")));
30
- i();
31
- } else return i(new Error(n("goodsSpu.picUrlsRequired")));
32
- }, N = I({
29
+ return n(new Error(i("goodsSpu.imageListsErrors")));
30
+ n();
31
+ } else return n(new Error(i("goodsSpu.picUrlsRequired")));
32
+ }, N = R({
33
33
  spuName: [
34
34
  {
35
35
  required: !0,
36
- message: n("goodsSpu.spuNameRequired"),
36
+ message: i("goodsSpu.spuNameRequired"),
37
37
  trigger: "blur"
38
38
  }
39
39
  ],
40
40
  minPrice: [
41
41
  {
42
42
  required: !0,
43
- message: n("goodsSpu.minPriceRequired"),
43
+ message: i("goodsSpu.minPriceRequired"),
44
44
  trigger: "blur"
45
45
  }
46
46
  ],
47
47
  maxPrice: [
48
48
  {
49
49
  required: !0,
50
- message: n("goodsSpu.maxPriceRequired"),
50
+ message: i("goodsSpu.maxPriceRequired"),
51
51
  trigger: "blur"
52
52
  }
53
53
  ],
54
54
  categoryIds: [
55
55
  {
56
56
  required: !0,
57
- message: n("goodsSpu.categoryIdRequired"),
57
+ message: i("goodsSpu.categoryIdRequired"),
58
58
  trigger: "change"
59
59
  }
60
60
  ],
61
61
  spuCode: [
62
62
  {
63
63
  required: !0,
64
- message: n("goodsSpu.spuCodeRequired"),
64
+ message: i("goodsSpu.spuCodeRequired"),
65
65
  trigger: "change"
66
66
  }
67
67
  ],
68
68
  freightType: [
69
69
  {
70
70
  required: !0,
71
- message: n("goodsSpu.freightTypeRequired"),
71
+ message: i("goodsSpu.freightTypeRequired"),
72
72
  trigger: "change"
73
73
  }
74
74
  ],
75
75
  freightAmount: [
76
76
  {
77
77
  required: !0,
78
- message: n("goodsSpu.freightAmountRequired"),
78
+ message: i("goodsSpu.freightAmountRequired"),
79
79
  trigger: "blur"
80
80
  }
81
81
  ],
@@ -88,64 +88,66 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
88
88
  shelf: [
89
89
  {
90
90
  required: !0,
91
- message: n("goodsSpu.shelfRequired"),
91
+ message: i("goodsSpu.shelfRequired"),
92
92
  trigger: "change"
93
93
  }
94
94
  ]
95
- }), S = R(!1);
96
- function T(s) {
97
- o.groupInfos = s;
98
- const l = s.reduce((i, a) => i + (a.saleNum || 0) * (a.salePrice || 0), 0);
95
+ }), S = P(!1);
96
+ function T(t) {
97
+ o.groupInfos = t;
98
+ const l = t.reduce((a, d) => a + (d.saleNum || 0) * (d.salePrice || 0), 0);
99
99
  o.minPrice = l;
100
+ const n = t.reduce((a, d) => a + (d.marketPrice || 0), 0);
101
+ o.maxPrice = n, console.log(l, n);
100
102
  }
101
- g.query.spuId && b.findById({ spuId: g.query.spuId }).then(({ data: s }) => {
102
- Object.assign(o, s), S.value = !0;
103
+ g.query.spuId && b.findById({ spuId: g.query.spuId }).then(({ data: t }) => {
104
+ Object.assign(o, t), S.value = !0;
103
105
  });
104
106
  const $ = async () => {
105
- var s;
106
- await ((s = V.value) == null ? void 0 : s.validate((l) => {
107
- l && (g.query.spuId ? b.updateList(o).then((i) => {
108
- i.status === 200 && (w({
109
- message: n("common.submitSuccess"),
107
+ var t;
108
+ await ((t = V.value) == null ? void 0 : t.validate((l) => {
109
+ l && (g.query.spuId ? b.updateList(o).then((n) => {
110
+ n.status === 200 && (U({
111
+ message: i("common.submitSuccess"),
110
112
  type: "success"
111
- }), k.closeTagView(g.fullPath, y, !1));
112
- }) : b.createList(o).then((i) => {
113
- i.status === 200 && (w({
114
- message: n("common.submitSuccess"),
113
+ }), w.closeTagView(g.fullPath, y, !1));
114
+ }) : b.createList(o).then((n) => {
115
+ n.status === 200 && (U({
116
+ message: i("common.submitSuccess"),
115
117
  type: "success"
116
- }), k.closeTagView(g.fullPath, y, !1));
118
+ }), w.closeTagView(g.fullPath, y, !1));
117
119
  }));
118
120
  }));
119
121
  };
120
- function E(s) {
121
- s === "FREIGHT_FREE" && (o.freightAmount = 0);
122
+ function E(t) {
123
+ t === "FREIGHT_FREE" && (o.freightAmount = 0);
122
124
  }
123
- return (s, l) => {
124
- const i = p("el-input"), a = p("el-form-item"), d = p("el-col"), A = p("el-tree-select"), c = p("el-input-number"), q = p("jmash-enum-radio"), D = z, F = p("el-checkbox"), L = p("el-checkbox-group"), _ = p("el-row"), B = p("el-button"), G = p("el-form");
125
- return h(), P("div", X, [
125
+ return (t, l) => {
126
+ const n = p("el-input"), a = p("el-form-item"), d = p("el-col"), A = p("el-tree-select"), c = p("el-input-number"), q = p("jmash-enum-radio"), D = x, F = p("el-checkbox"), L = p("el-checkbox-group"), _ = p("el-row"), B = p("el-button"), G = p("el-form");
127
+ return h(), I("div", X, [
126
128
  f("div", Z, [
127
129
  e(G, {
128
130
  ref_key: "goodsSpuFormRef",
129
131
  ref: V,
130
- model: t(o),
132
+ model: r(o),
131
133
  "label-width": "120px",
132
134
  rules: N
133
135
  }, {
134
- default: r(() => [
136
+ default: s(() => [
135
137
  l[13] || (l[13] = f("div", { class: "title-content" }, "基本信息", -1)),
136
138
  e(_, null, {
137
- default: r(() => [
139
+ default: s(() => [
138
140
  e(d, { span: 12 }, {
139
- default: r(() => [
141
+ default: s(() => [
140
142
  e(a, {
141
- label: s.$t("goodsSpu.spuName"),
143
+ label: t.$t("goodsSpu.spuName"),
142
144
  prop: "spuName"
143
145
  }, {
144
- default: r(() => [
145
- e(i, {
146
- modelValue: t(o).spuName,
147
- "onUpdate:modelValue": l[0] || (l[0] = (u) => t(o).spuName = u),
148
- placeholder: s.$t("goodsSpu.spuNameRequired"),
146
+ default: s(() => [
147
+ e(n, {
148
+ modelValue: r(o).spuName,
149
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => r(o).spuName = u),
150
+ placeholder: t.$t("goodsSpu.spuNameRequired"),
149
151
  maxlength: "60",
150
152
  "show-word-limit": "",
151
153
  clearable: ""
@@ -157,16 +159,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
157
159
  _: 1
158
160
  }),
159
161
  e(d, { span: 12 }, {
160
- default: r(() => [
162
+ default: s(() => [
161
163
  e(a, {
162
- label: s.$t("goodsSpu.spuCode"),
164
+ label: t.$t("goodsSpu.spuCode"),
163
165
  prop: "spuCode"
164
166
  }, {
165
- default: r(() => [
166
- e(i, {
167
- modelValue: t(o).spuCode,
168
- "onUpdate:modelValue": l[1] || (l[1] = (u) => t(o).spuCode = u),
169
- placeholder: s.$t("goodsSpu.spuCodeRequired"),
167
+ default: s(() => [
168
+ e(n, {
169
+ modelValue: r(o).spuCode,
170
+ "onUpdate:modelValue": l[1] || (l[1] = (u) => r(o).spuCode = u),
171
+ placeholder: t.$t("goodsSpu.spuCodeRequired"),
170
172
  maxlength: "15",
171
173
  "show-word-limit": "",
172
174
  clearable: ""
@@ -178,20 +180,20 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
178
180
  _: 1
179
181
  }),
180
182
  e(d, { span: 12 }, {
181
- default: r(() => [
183
+ default: s(() => [
182
184
  e(a, {
183
- label: s.$t("goodsSpu.categoryId"),
185
+ label: t.$t("goodsSpu.categoryId"),
184
186
  prop: "categoryIds"
185
187
  }, {
186
- default: r(() => [
188
+ default: s(() => [
187
189
  e(A, {
188
- modelValue: t(o).categoryIds,
189
- "onUpdate:modelValue": l[2] || (l[2] = (u) => t(o).categoryIds = u),
190
- data: t(m).goodsCategoryListBizLayDict.values,
190
+ modelValue: r(o).categoryIds,
191
+ "onUpdate:modelValue": l[2] || (l[2] = (u) => r(o).categoryIds = u),
192
+ data: r(m).goodsCategoryListBizLayDict.values,
191
193
  multiple: "",
192
194
  "render-after-expand": !1,
193
195
  "show-checkbox": "",
194
- placeholder: s.$t("goodsSpu.categoryIdRequired"),
196
+ placeholder: t.$t("goodsSpu.categoryIdRequired"),
195
197
  class: "w-full"
196
198
  }, null, 8, ["modelValue", "data", "placeholder"])
197
199
  ]),
@@ -201,16 +203,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
201
203
  _: 1
202
204
  }),
203
205
  e(d, { span: 12 }, {
204
- default: r(() => [
206
+ default: s(() => [
205
207
  e(a, {
206
- label: s.$t("goodsSpu.saleNum"),
208
+ label: t.$t("goodsSpu.saleNum"),
207
209
  prop: "saleNum"
208
210
  }, {
209
- default: r(() => [
211
+ default: s(() => [
210
212
  e(c, {
211
- modelValue: t(o).saleNum,
212
- "onUpdate:modelValue": l[3] || (l[3] = (u) => t(o).saleNum = u),
213
- placeholder: s.$t("goodsSpu.saleNumRequired"),
213
+ modelValue: r(o).saleNum,
214
+ "onUpdate:modelValue": l[3] || (l[3] = (u) => r(o).saleNum = u),
215
+ placeholder: t.$t("goodsSpu.saleNumRequired"),
214
216
  class: "w-full",
215
217
  min: 0,
216
218
  controls: !1,
@@ -223,16 +225,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
223
225
  _: 1
224
226
  }),
225
227
  e(d, { span: 12 }, {
226
- default: r(() => [
228
+ default: s(() => [
227
229
  e(a, {
228
- label: s.$t("goodsSpu.freightType"),
230
+ label: t.$t("goodsSpu.freightType"),
229
231
  prop: "freightType"
230
232
  }, {
231
- default: r(() => [
233
+ default: s(() => [
232
234
  e(q, {
233
- modelValue: t(o).freightType,
234
- "onUpdate:modelValue": l[4] || (l[4] = (u) => t(o).freightType = u),
235
- data: t(m).freightTypeEnum.values,
235
+ modelValue: r(o).freightType,
236
+ "onUpdate:modelValue": l[4] || (l[4] = (u) => r(o).freightType = u),
237
+ data: r(m).freightTypeEnum.values,
236
238
  onChange: E
237
239
  }, null, 8, ["modelValue", "data"])
238
240
  ]),
@@ -242,21 +244,21 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
242
244
  _: 1
243
245
  }),
244
246
  e(d, { span: 12 }, {
245
- default: r(() => [
247
+ default: s(() => [
246
248
  e(a, {
247
- label: s.$t("goodsSpu.freightAmount"),
249
+ label: t.$t("goodsSpu.freightAmount"),
248
250
  prop: "freightAmount"
249
251
  }, {
250
- default: r(() => [
252
+ default: s(() => [
251
253
  e(c, {
252
- modelValue: t(o).freightAmount,
253
- "onUpdate:modelValue": l[5] || (l[5] = (u) => t(o).freightAmount = u),
254
- readonly: t(o).freightType === "FREIGHT_FREE",
254
+ modelValue: r(o).freightAmount,
255
+ "onUpdate:modelValue": l[5] || (l[5] = (u) => r(o).freightAmount = u),
256
+ readonly: r(o).freightType === "FREIGHT_FREE",
255
257
  precision: 2,
256
258
  step: 0.1,
257
259
  controls: !1,
258
260
  min: 0,
259
- placeholder: s.$t("goodsSpu.freightAmountRequired"),
261
+ placeholder: t.$t("goodsSpu.freightAmountRequired"),
260
262
  class: "w-full"
261
263
  }, null, 8, ["modelValue", "readonly", "placeholder"])
262
264
  ]),
@@ -266,20 +268,20 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
266
268
  _: 1
267
269
  }),
268
270
  e(d, { span: 12 }, {
269
- default: r(() => [
271
+ default: s(() => [
270
272
  e(a, {
271
- label: s.$t("goodsSpu.minPrice"),
273
+ label: t.$t("goodsSpu.minPrice"),
272
274
  prop: "minPrice"
273
275
  }, {
274
- default: r(() => [
276
+ default: s(() => [
275
277
  e(c, {
276
- modelValue: t(o).minPrice,
277
- "onUpdate:modelValue": l[6] || (l[6] = (u) => t(o).minPrice = u),
278
+ modelValue: r(o).minPrice,
279
+ "onUpdate:modelValue": l[6] || (l[6] = (u) => r(o).minPrice = u),
278
280
  precision: 2,
279
281
  step: 0.1,
280
282
  controls: !1,
281
283
  min: 0,
282
- placeholder: s.$t("goodsSpu.minPriceRequired"),
284
+ placeholder: t.$t("goodsSpu.minPriceRequired"),
283
285
  class: "w-full",
284
286
  disabled: ""
285
287
  }, null, 8, ["modelValue", "placeholder"])
@@ -290,21 +292,22 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
290
292
  _: 1
291
293
  }),
292
294
  e(d, { span: 12 }, {
293
- default: r(() => [
295
+ default: s(() => [
294
296
  e(a, {
295
- label: s.$t("goodsSpu.maxPrice"),
297
+ label: t.$t("goodsSpu.maxPrice"),
296
298
  prop: "maxPrice"
297
299
  }, {
298
- default: r(() => [
300
+ default: s(() => [
299
301
  e(c, {
300
- modelValue: t(o).maxPrice,
301
- "onUpdate:modelValue": l[7] || (l[7] = (u) => t(o).maxPrice = u),
302
+ modelValue: r(o).maxPrice,
303
+ "onUpdate:modelValue": l[7] || (l[7] = (u) => r(o).maxPrice = u),
302
304
  precision: 2,
303
305
  step: 0.1,
304
306
  controls: !1,
305
307
  min: 0,
306
- placeholder: s.$t("goodsSpu.maxPriceRequired"),
307
- class: "w-full"
308
+ placeholder: t.$t("goodsSpu.maxPriceRequired"),
309
+ class: "w-full",
310
+ disabled: ""
308
311
  }, null, 8, ["modelValue", "placeholder"])
309
312
  ]),
310
313
  _: 1
@@ -313,16 +316,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
313
316
  _: 1
314
317
  }),
315
318
  e(d, { span: 24 }, {
316
- default: r(() => [
319
+ default: s(() => [
317
320
  e(a, {
318
- label: s.$t("goodsSpu.picUrls"),
321
+ label: t.$t("goodsSpu.picUrls"),
319
322
  prop: "picUrls"
320
323
  }, {
321
- default: r(() => [
324
+ default: s(() => [
322
325
  f("div", ee, [
323
326
  e(D, {
324
- modelValue: t(o).picUrls,
325
- "onUpdate:modelValue": l[8] || (l[8] = (u) => t(o).picUrls = u),
327
+ modelValue: r(o).picUrls,
328
+ "onUpdate:modelValue": l[8] || (l[8] = (u) => r(o).picUrls = u),
326
329
  limit: 6,
327
330
  "list-type": "picture-card"
328
331
  }, null, 8, ["modelValue"]),
@@ -335,16 +338,16 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
335
338
  _: 1
336
339
  }),
337
340
  e(d, { span: 12 }, {
338
- default: r(() => [
341
+ default: s(() => [
339
342
  e(a, {
340
- label: s.$t("goodsSpu.shelf"),
343
+ label: t.$t("goodsSpu.shelf"),
341
344
  prop: "shelf"
342
345
  }, {
343
- default: r(() => [
346
+ default: s(() => [
344
347
  e(q, {
345
- modelValue: t(o).shelf,
346
- "onUpdate:modelValue": l[9] || (l[9] = (u) => t(o).shelf = u),
347
- data: t(m).shelfDict.values
348
+ modelValue: r(o).shelf,
349
+ "onUpdate:modelValue": l[9] || (l[9] = (u) => r(o).shelf = u),
350
+ data: r(m).shelfDict.values
348
351
  }, null, 8, ["modelValue", "data"])
349
352
  ]),
350
353
  _: 1
@@ -353,24 +356,24 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
353
356
  _: 1
354
357
  }),
355
358
  e(d, { span: 12 }, {
356
- default: r(() => [
359
+ default: s(() => [
357
360
  e(a, {
358
- label: s.$t("goodsSpu.labelIds"),
361
+ label: t.$t("goodsSpu.labelIds"),
359
362
  prop: "labelIds"
360
363
  }, {
361
- default: r(() => [
364
+ default: s(() => [
362
365
  e(L, {
363
- modelValue: t(o).labelIds,
364
- "onUpdate:modelValue": l[10] || (l[10] = (u) => t(o).labelIds = u),
366
+ modelValue: r(o).labelIds,
367
+ "onUpdate:modelValue": l[10] || (l[10] = (u) => r(o).labelIds = u),
365
368
  class: "w-full"
366
369
  }, {
367
- default: r(() => [
368
- (h(!0), P(x, null, M(t(m).labelListBizDict.values, (u) => (h(), v(F, {
370
+ default: s(() => [
371
+ (h(!0), I(M, null, O(r(m).labelListBizDict.values, (u) => (h(), k(F, {
369
372
  key: u.key,
370
373
  label: u.key
371
374
  }, {
372
- default: r(() => [
373
- U(j(u.value), 1)
375
+ default: s(() => [
376
+ v(H(u.value), 1)
374
377
  ]),
375
378
  _: 2
376
379
  }, 1032, ["label"]))), 128))
@@ -388,25 +391,25 @@ const X = { class: "app-container" }, Z = { class: "search-container" }, ee = {
388
391
  }),
389
392
  l[14] || (l[14] = f("div", { class: "title-content" }, "套装商品", -1)),
390
393
  e(_, null, {
391
- default: r(() => [
392
- !t(g).query.spuId || S.value ? (h(), v(W, {
394
+ default: s(() => [
395
+ !r(g).query.spuId || S.value ? (h(), k(W, {
393
396
  key: 0,
394
- form: t(o),
397
+ form: r(o),
395
398
  onGetGoodsSku: T
396
- }, null, 8, ["form"])) : H("", !0)
399
+ }, null, 8, ["form"])) : j("", !0)
397
400
  ]),
398
401
  _: 1
399
402
  }),
400
403
  e(_, null, {
401
- default: r(() => [
404
+ default: s(() => [
402
405
  e(a, null, {
403
- default: r(() => [
406
+ default: s(() => [
404
407
  e(B, {
405
408
  type: "primary",
406
409
  onClick: $
407
410
  }, {
408
- default: r(() => l[12] || (l[12] = [
409
- U("保存")
411
+ default: s(() => l[12] || (l[12] = [
412
+ v("保存")
410
413
  ])),
411
414
  _: 1,
412
415
  __: [12]
@@ -4,11 +4,11 @@ import { ElMessage as $ } from "element-plus";
4
4
  import { useRouter as Y, useRoute as Z } from "vue-router";
5
5
  import { routerUtil as E } from "jmash-core";
6
6
  import { useI18n as x } from "vue-i18n";
7
- import { D as i, C as ee } from "./index-rRbEKDlL.mjs";
8
- import { a as _ } from "./index-GWE4OrXj.mjs";
7
+ import { D as i, C as ee } from "./index-Vu01FEMS.mjs";
8
+ import { a as _ } from "./index-Dpms2ryP.mjs";
9
9
  import { g as le } from "./index-BHmGYIuc.mjs";
10
10
  import { WangEditor as oe } from "xyvcard-cms";
11
- import te from "./skuForm-BzxL1_v6.mjs";
11
+ import te from "./skuForm-X1aeeUCX.mjs";
12
12
  const se = { class: "app-container" }, ae = { class: "search-container" }, ue = { class: "image-card" }, he = /* @__PURE__ */ K({
13
13
  __name: "edit",
14
14
  setup(de) {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as j, mergeModels as v, ref as I, reactive as C, useModel as E, resolveComponent as m, openBlock as F, createBlock as K, withCtx as o, createElementVNode as O, createVNode as l, createTextVNode as L, toDisplayString as N, unref as r } from "vue";
2
2
  import { ElMessage as w } from "element-plus";
3
3
  import { useI18n as S } from "vue-i18n";
4
- import { b as c } from "./index-GWE4OrXj.mjs";
4
+ import { b as c } from "./index-Dpms2ryP.mjs";
5
5
  import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
6
  const x = { class: "dialog-footer" }, A = /* @__PURE__ */ j({
7
7
  __name: "edit",
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-BmH1D2Ce.mjs";
1
+ import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-d769FSho.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as E, mergeModels as V, ref as B, reactive as N, useModel as F, resolveComponent as r, openBlock as K, createBlock as O, withCtx as l, createElementVNode as x, createVNode as o, createTextVNode as w, toDisplayString as U, unref as d } from "vue";
2
2
  import { ElMessage as k } from "element-plus";
3
3
  import { useI18n as A } from "vue-i18n";
4
- import { g as p } from "./index-ClnNQkIp.mjs";
4
+ import { g as p } from "./index-DloS7z9I.mjs";
5
5
  import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
6
  const z = { class: "dialog-footer" }, G = /* @__PURE__ */ E({
7
7
  __name: "edit",
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as wn, mergeModels as E, ref as $, reactive as R, useModel as qn, onMounted as pn, resolveComponent as p, openBlock as an, createBlock as kn, withCtx as j, createElementVNode as Cn, createVNode as t, createTextVNode as A, toDisplayString as U, unref as x } from "vue";
2
2
  import { ElMessage as L } from "element-plus";
3
3
  import { useI18n as Sn } from "vue-i18n";
4
- import { g as B } from "./index-GWE4OrXj.mjs";
5
- import { D as O } from "./index-rRbEKDlL.mjs";
4
+ import { g as B } from "./index-Dpms2ryP.mjs";
5
+ import { D as O } from "./index-Vu01FEMS.mjs";
6
6
  const _n = /^[\uD800-\uDBFF]$/, Pn = /^[\uDC00-\uDFFF]$/, Dn = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
7
7
  var F;
8
8
  (function(n) {
@@ -3,8 +3,8 @@ import { useRoute as ye, useRouter as he } from "vue-router";
3
3
  import { ElMessage as R } from "element-plus";
4
4
  import { useI18n as _e } from "vue-i18n";
5
5
  import { useTableHooks as we, fileApi as Q } from "jmash-core";
6
- import { D as c, C as Se } from "./index-rRbEKDlL.mjs";
7
- import { a as E } from "./index-GWE4OrXj.mjs";
6
+ import { D as c, C as Se } from "./index-Vu01FEMS.mjs";
7
+ import { a as E } from "./index-Dpms2ryP.mjs";
8
8
  const Ce = { class: "app-container" }, ke = {
9
9
  key: 0,
10
10
  class: "app-container"
@@ -1,9 +1,9 @@
1
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";
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-Vu01FEMS.mjs";
5
+ import { g as re } from "./index-Dpms2ryP.mjs";
6
+ import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-d769FSho.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) {
@@ -3,8 +3,8 @@ import { useRoute as we, useRouter as Ve } from "vue-router";
3
3
  import { ElMessage as A } from "element-plus";
4
4
  import { useI18n as Ce } from "vue-i18n";
5
5
  import { useTableHooks as ke, fileApi as H } from "jmash-core";
6
- import { D as v, C as f } from "./index-rRbEKDlL.mjs";
7
- import { a as $ } from "./index-GWE4OrXj.mjs";
6
+ import { D as v, C as f } from "./index-Vu01FEMS.mjs";
7
+ import { a as $ } from "./index-Dpms2ryP.mjs";
8
8
  const Ae = { class: "app-container" }, Pe = {
9
9
  key: 0,
10
10
  class: "app-container"
@@ -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-Dpms2ryP.mjs";
3
3
  class u {
4
4
  getKey(t) {
5
5
  return {
@@ -108,7 +108,7 @@ function ai(e) {
108
108
  let r = e.global.getLocaleMessage("en");
109
109
  r = ln(r, ri), e.global.setLocaleMessage("zh-cn", t), e.global.setLocaleMessage("en", r);
110
110
  }
111
- const ii = () => import("./edit-BzOoP1MM.mjs"), si = () => import("./info-Dji-jSuw.mjs"), oi = () => import("./edit-Br1EAlBd.mjs"), li = () => import("./info-DjDT9TId.mjs"), ui = [
111
+ const ii = () => import("./edit-BYxk3lFr.mjs"), si = () => import("./info-CzhzwS5C.mjs"), oi = () => import("./edit-BY1AVieE.mjs"), li = () => import("./info-CJxN7XOi.mjs"), ui = [
112
112
  {
113
113
  path: "/rawgoods",
114
114
  component: Ja,
@@ -4422,7 +4422,7 @@ class Ld {
4422
4422
  });
4423
4423
  }
4424
4424
  }
4425
- const Vd = new Ld(), $d = /* @__PURE__ */ Object.assign({ "./views/goods/goods-brand-info/edit.vue": () => import("./edit-1TXe_HC2.mjs"), "./views/goods/goods-brand-info/index.vue": () => import("./index-D3Q39K5l.mjs"), "./views/goods/goods-category/edit.vue": () => import("./edit-BDHYnZTL.mjs"), "./views/goods/goods-category/index.vue": () => import("./index-RBIPJ3PM.mjs"), "./views/goods/goods-combination/edit.vue": () => import("./edit-Br1EAlBd.mjs"), "./views/goods/goods-combination/index.vue": () => import("./index-BreCG7fL.mjs"), "./views/goods/goods-combination/info.vue": () => import("./info-DjDT9TId.mjs"), "./views/goods/goods-combination/skuForm.vue": () => import("./skuForm-9X82lvcF.mjs"), "./views/goods/goods-label-info/edit.vue": () => import("./edit-C0U9Ge6U.mjs"), "./views/goods/goods-label-info/index.vue": () => import("./index-DYo45BS3.mjs"), "./views/goods/goods-spu/edit.vue": () => import("./edit-BzOoP1MM.mjs"), "./views/goods/goods-spu/index.vue": () => import("./index-DwDXNfWH.mjs"), "./views/goods/goods-spu/info.vue": () => import("./info-Dji-jSuw.mjs"), "./views/goods/goods-spu/skuForm.vue": () => import("./skuForm-BzxL1_v6.mjs"), "./views/goods/goods-spu/skuTable.vue": () => import("./skuTable-RIQUU_Bl.mjs") }), Bd = {
4425
+ const Vd = new Ld(), $d = /* @__PURE__ */ Object.assign({ "./views/goods/goods-brand-info/edit.vue": () => import("./edit-ehVvbusK.mjs"), "./views/goods/goods-brand-info/index.vue": () => import("./index-DvCC73mO.mjs"), "./views/goods/goods-category/edit.vue": () => import("./edit-D9JqZTHN.mjs"), "./views/goods/goods-category/index.vue": () => import("./index-BaX061kc.mjs"), "./views/goods/goods-combination/edit.vue": () => import("./edit-BY1AVieE.mjs"), "./views/goods/goods-combination/index.vue": () => import("./index-BLO5ssji.mjs"), "./views/goods/goods-combination/info.vue": () => import("./info-CJxN7XOi.mjs"), "./views/goods/goods-combination/skuForm.vue": () => import("./skuForm-K3S131WX.mjs"), "./views/goods/goods-label-info/edit.vue": () => import("./edit-CRc6GqY4.mjs"), "./views/goods/goods-label-info/index.vue": () => import("./index-R43ND-Ey.mjs"), "./views/goods/goods-spu/edit.vue": () => import("./edit-BYxk3lFr.mjs"), "./views/goods/goods-spu/index.vue": () => import("./index-CNVwLggO.mjs"), "./views/goods/goods-spu/info.vue": () => import("./info-CzhzwS5C.mjs"), "./views/goods/goods-spu/skuForm.vue": () => import("./skuForm-X1aeeUCX.mjs"), "./views/goods/goods-spu/skuTable.vue": () => import("./skuTable-7VaeJKGp.mjs") }), Bd = {
4426
4426
  install(e) {
4427
4427
  Xa($d, 7), ai(ti), ei(ui), e.use(du);
4428
4428
  }
@@ -1,9 +1,9 @@
1
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";
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-DloS7z9I.mjs";
5
+ import de from "./edit-ehVvbusK.mjs";
6
+ import { D as re } from "./index-Vu01FEMS.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) {
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as Y, ref as L, reactive as R, onActivated as Z, resolveComponent as s, resolveDirective as x, openBlock as u, createElementBlock as V, createElementVNode as $, createVNode as l, withCtx as t, withKeys as ee, unref as n, createTextVNode as p, toDisplayString as c, withDirectives as k, createBlock as C, isRef as S, createCommentVNode as D } from "vue";
2
2
  import { useTableHooks as oe } from "jmash-core";
3
3
  import { useI18n as le } from "vue-i18n";
4
- import { b as te } from "./index-GWE4OrXj.mjs";
5
- import ae from "./edit-C0U9Ge6U.mjs";
6
- import { D as ne } from "./index-rRbEKDlL.mjs";
4
+ import { b as te } from "./index-Dpms2ryP.mjs";
5
+ import ae from "./edit-CRc6GqY4.mjs";
6
+ import { D as ne } from "./index-Vu01FEMS.mjs";
7
7
  const se = { class: "app-container" }, de = { class: "search-container" }, ie = ["onClick"], re = ["onClick"], ve = /* @__PURE__ */ Y({
8
8
  __name: "index",
9
9
  setup(ue) {
@@ -5,8 +5,8 @@ import { BizDict as c, BizLayDict as _, EnumDict as n } from "jmash-core";
5
5
  import { EntryDict as v } from "jmash-dict";
6
6
  import { ref as h, reactive as L } from "vue";
7
7
  import { specValueApi as y, infoApi as P, specInfoApi as A } from "xyvcard-shop";
8
- import { g as O, b as g, a as f } from "./index-GWE4OrXj.mjs";
9
- import { g as m } from "./index-ClnNQkIp.mjs";
8
+ import { g as O, b as g, a as f } from "./index-Dpms2ryP.mjs";
9
+ import { g as m } from "./index-DloS7z9I.mjs";
10
10
  class a {
11
11
  }
12
12
  // 模块
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-Dpms2ryP.mjs";
3
3
  export {
4
4
  p as default,
5
5
  g as goodsCategoryApi,
@@ -1,8 +1,8 @@
1
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";
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-Vu01FEMS.mjs";
5
+ import { a as L } from "./index-Dpms2ryP.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,9 +1,9 @@
1
1
  import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b, openBlock as r, createElementBlock as k, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as s, createElementVNode as a, Fragment as L, renderList as I, createBlock as S, unref as _, createCommentVNode as B } from "vue";
2
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-Vu01FEMS.mjs";
5
+ import Y from "./skuTable-7VaeJKGp.mjs";
6
+ import { a as G } from "./index-Dpms2ryP.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,7 +1,7 @@
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, openBlock as m, createElementBlock as S, 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 V, C as g } from "./index-Vu01FEMS.mjs";
4
+ import { a as O } from "./index-Dpms2ryP.mjs";
5
5
  import { specValueApi as Q } from "xyvcard-shop";
6
6
  import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
7
7
  /*! Element Plus Icons Vue v2.3.1 */
@@ -37,16 +37,17 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
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
47
  V.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
52
  const y = b;
52
53
  B(
@@ -59,27 +60,27 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
59
60
  ), y.form.spuId && O.findGroupList({ goodsId: y.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
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 = V.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
120
  ) : []), N = _.flat().map((u) => z(u));
119
121
  await Promise.all(N);
120
- const I = _.map(
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"), N = 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(V).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(), S("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), S(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(N)
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
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";
2
+ import { C as D, D as ue, S as Y, a as ne } from "./index-Vu01FEMS.mjs";
3
+ import re from "./skuTable-7VaeJKGp.mjs";
4
4
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
5
  const pe = { key: 0 }, ce = {
6
6
  key: 1,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as T, ref as C, computed as F, watch as $, resolveComponent as g, openBlock as P, createElementBlock as b, createElementVNode as u, createVNode as a, withCtx as d, createTextVNode as y, createCommentVNode as M, Fragment as G, renderList as K, createBlock as z, toDisplayString as D, unref as x } from "vue";
2
- import { D as O } from "./index-rRbEKDlL.mjs";
2
+ import { D as O } from "./index-Vu01FEMS.mjs";
3
3
  import { fileApi as E } from "jmash-core";
4
4
  import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
5
  function J(n, h = [], o) {
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.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%}[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}.title-set[data-v-6fc718ce]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-e6aa4b01]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-e6aa4b01]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-e6aa4b01]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-e6aa4b01]{padding:10px 20px}.goods-tag[data-v-e6aa4b01]{margin-bottom:10px}.addButton[data-v-dc82ad15]{margin-top:15px;margin-bottom:20px;width:100%}.hover-blue[data-v-dc82ad15]:hover{color:#409eff!important}.position-center[data-v-4d967c8a]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4d967c8a]{position:absolute;right:0;top:0;margin-top:8px}.position-center[data-v-4ec2418d]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4ec2418d]{position:absolute;right:0;top:0;margin-top:8px}
1
+ @charset "UTF-8";.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%}[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}.title-set[data-v-6fc718ce]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-e6aa4b01]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-e6aa4b01]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-e6aa4b01]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-e6aa4b01]{padding:10px 20px}.goods-tag[data-v-e6aa4b01]{margin-bottom:10px}.addButton[data-v-6bb5afe9]{margin-top:15px;margin-bottom:20px;width:100%}.hover-blue[data-v-6bb5afe9]:hover{color:#409eff!important}.position-center[data-v-4d967c8a]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4d967c8a]{position:absolute;right:0;top:0;margin-top:8px}.position-center[data-v-4ec2418d]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4ec2418d]{position:absolute;right:0;top:0;margin-top:8px}
@@ -172,6 +172,7 @@ export interface GoodsGroupInfoCreateReq {
172
172
  picUrl?: string;
173
173
  saleNum?: number;
174
174
  salePrice?: number;
175
+ marketPrice?: number;
175
176
  specType?: string;
176
177
  skuName?: string;
177
178
  skuOptions?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-goods",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/index.d.ts",