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.
- package/dist/{ImageUpload-Dk6GY6PA.mjs → ImageUpload-BMw9FVJL.mjs} +2 -2
- package/dist/{edit-Br1EAlBd.mjs → edit-Bgvy3bUQ.mjs} +131 -128
- package/dist/{edit-BzOoP1MM.mjs → edit-CAmBfr7s.mjs} +6 -6
- package/dist/{edit-BDHYnZTL.mjs → edit-CR4LNc6c.mjs} +1 -1
- package/dist/{edit-C0U9Ge6U.mjs → edit-DEKgI9dl.mjs} +3 -3
- package/dist/{edit-1TXe_HC2.mjs → edit-WZ-vVp0_.mjs} +3 -3
- 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
- package/dist/{index-DwDXNfWH.mjs → index-B9EvyZqu.mjs} +149 -141
- package/dist/{index-rRbEKDlL.mjs → index-Ba-YRVAR.mjs} +2 -2
- package/dist/{index-BreCG7fL.mjs → index-Br8OH0po.mjs} +129 -122
- package/dist/{index-DYo45BS3.mjs → index-CCDQbidt.mjs} +14 -14
- package/dist/{index-GWE4OrXj.mjs → index-CIOmQi5q.mjs} +1997 -1874
- package/dist/{index-D3Q39K5l.mjs → index-CnXaunj4.mjs} +14 -14
- package/dist/{index-ClnNQkIp.mjs → index-Dy5vhMgv.mjs} +1 -1
- package/dist/{index-RBIPJ3PM.mjs → index-w0WaL9Bq.mjs} +8 -8
- package/dist/index.mjs +1 -1
- package/dist/{info-Dji-jSuw.mjs → info-Cp_2nx9w.mjs} +4 -4
- package/dist/{info-DjDT9TId.mjs → info-CzP-Zg-I.mjs} +3 -3
- package/dist/{skuForm-9X82lvcF.mjs → skuForm-CVp5ywg4.mjs} +96 -93
- package/dist/{skuForm-BzxL1_v6.mjs → skuForm-D_Q4iyk2.mjs} +6 -6
- package/dist/{skuTable-RIQUU_Bl.mjs → skuTable-DcYM5x3V.mjs} +4 -4
- package/dist/style.css +1 -1
- package/dts/api/goods-spu/types.d.ts +1 -0
- 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,
|
|
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-
|
|
5
|
-
import de from "./edit-
|
|
6
|
-
import { D as re } from "./index-
|
|
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
|
-
|
|
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
|
-
|
|
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) =>
|
|
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(),
|
|
224
|
+
a(b) > 0 ? (u(), h(Y, {
|
|
225
225
|
key: 0,
|
|
226
226
|
total: a(b),
|
|
227
|
-
"onUpdate:total": o[7] || (o[7] = (e) =>
|
|
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"])) :
|
|
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
|
-
|
|
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
|
-
|
|
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(),
|
|
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"])) :
|
|
315
|
+
}, null, 8, ["modelValue", "title", "entity-key"])) : R("", !0)
|
|
316
316
|
]);
|
|
317
317
|
};
|
|
318
318
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as x, ref as $, reactive as S, onActivated as ee, resolveComponent as r, resolveDirective as oe,
|
|
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-
|
|
5
|
-
import { g as re } from "./index-
|
|
6
|
-
import { _ as se } from "./edit.vue_vue_type_script_setup_true_lang-
|
|
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) =>
|
|
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) =>
|
|
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"])) :
|
|
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"])) :
|
|
321
|
+
}, null, 8, ["modelValue", "title", "entity-key"])) : T("", !0)
|
|
322
322
|
]);
|
|
323
323
|
};
|
|
324
324
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b,
|
|
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-
|
|
5
|
-
import Y from "./skuTable-
|
|
6
|
-
import { a as G } from "./index-
|
|
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,
|
|
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-
|
|
5
|
-
import { a as L } from "./index-
|
|
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,
|
|
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
|
|
4
|
-
import { a as O } from "./index-
|
|
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.
|
|
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(),
|
|
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 =
|
|
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:
|
|
40
|
+
saleNum: 1,
|
|
41
41
|
picUrl: "",
|
|
42
42
|
specType: "",
|
|
43
|
-
skuOptions: []
|
|
43
|
+
skuOptions: [],
|
|
44
|
+
marketPrice: 0
|
|
44
45
|
}
|
|
45
46
|
]);
|
|
46
|
-
|
|
47
|
+
S.goodsSpuBizDict.useValues();
|
|
47
48
|
const F = C;
|
|
48
|
-
function L(s,
|
|
49
|
-
s.picUrl =
|
|
49
|
+
function L(s, e) {
|
|
50
|
+
s.picUrl = e;
|
|
50
51
|
}
|
|
51
|
-
const
|
|
52
|
+
const N = b;
|
|
52
53
|
B(
|
|
53
|
-
|
|
54
|
+
N.form,
|
|
54
55
|
(s) => s,
|
|
55
56
|
{
|
|
56
57
|
deep: !0,
|
|
57
58
|
immediate: !0
|
|
58
59
|
}
|
|
59
|
-
),
|
|
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
|
|
63
|
+
const e = s.results.map(async (l) => {
|
|
63
64
|
const t = {
|
|
64
|
-
salePrice:
|
|
65
|
-
skuId:
|
|
66
|
-
spuId:
|
|
67
|
-
saleNum:
|
|
68
|
-
picUrl:
|
|
69
|
-
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(
|
|
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(
|
|
76
|
-
d.value =
|
|
76
|
+
Promise.all(e).then((l) => {
|
|
77
|
+
d.value = l;
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
function A(s) {
|
|
81
|
-
const
|
|
82
|
-
|
|
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:
|
|
91
|
+
saleNum: 1,
|
|
91
92
|
picUrl: "",
|
|
92
93
|
specType: "",
|
|
93
|
-
skuOptions: []
|
|
94
|
+
skuOptions: [],
|
|
95
|
+
marketPrice: 0
|
|
94
96
|
});
|
|
95
97
|
}
|
|
96
|
-
const T =
|
|
98
|
+
const T = V({});
|
|
97
99
|
async function z(s) {
|
|
98
100
|
if (!U.value[s])
|
|
99
101
|
try {
|
|
100
|
-
const { data:
|
|
102
|
+
const { data: e } = await Q.findById({
|
|
101
103
|
specValueId: s
|
|
102
104
|
});
|
|
103
|
-
return U.value[s] =
|
|
105
|
+
return U.value[s] = e.valueName, e.valueName;
|
|
104
106
|
} catch {
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
|
-
async function D(s,
|
|
108
|
-
var
|
|
109
|
-
if (
|
|
110
|
-
|
|
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 (
|
|
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
|
-
) : []),
|
|
119
|
-
await Promise.all(
|
|
120
|
-
const
|
|
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
|
-
|
|
125
|
+
e.skuOptions = f.map((u, p) => ({
|
|
124
126
|
key: u.skuId,
|
|
125
|
-
value:
|
|
126
|
-
specInfo:
|
|
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:
|
|
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
|
|
143
|
-
if (
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
const t =
|
|
147
|
-
|
|
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
|
|
155
|
-
salePrice:
|
|
156
|
-
skuId:
|
|
157
|
-
spuId:
|
|
158
|
-
specInfo:
|
|
159
|
-
saleNum:
|
|
160
|
-
picUrl:
|
|
161
|
-
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",
|
|
166
|
+
console.log("filteredValue", e), F("getGoodsSku", e);
|
|
164
167
|
},
|
|
165
168
|
{
|
|
166
169
|
deep: !0,
|
|
167
170
|
immediate: !0
|
|
168
171
|
}
|
|
169
|
-
), (s,
|
|
170
|
-
const
|
|
171
|
-
return m(),
|
|
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
|
-
|
|
176
|
+
n(u, {
|
|
174
177
|
data: d.value,
|
|
175
178
|
border: "",
|
|
176
179
|
style: { width: "100%" }
|
|
177
180
|
}, {
|
|
178
181
|
default: i(() => [
|
|
179
|
-
|
|
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
|
-
|
|
188
|
+
n(l, {
|
|
186
189
|
modelValue: a.spuId,
|
|
187
|
-
"onUpdate:modelValue": (
|
|
188
|
-
data:
|
|
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: (
|
|
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
|
-
|
|
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
|
|
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": (
|
|
209
|
+
"onUpdate:modelValue": (c) => a.skuId = c,
|
|
207
210
|
placeholder: s.$t("goodsSpu.specTypeRequired"),
|
|
208
|
-
onChange: (
|
|
211
|
+
onChange: (c) => $(a.skuId)
|
|
209
212
|
}, {
|
|
210
213
|
default: i(() => [
|
|
211
|
-
(m(!0),
|
|
212
|
-
key:
|
|
213
|
-
label:
|
|
214
|
-
value:
|
|
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
|
-
|
|
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
|
-
|
|
232
|
+
n(f, {
|
|
230
233
|
"picture-url": a.picUrl,
|
|
231
|
-
onImageSrc: (
|
|
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
|
-
|
|
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
|
-
|
|
247
|
+
n(_, {
|
|
245
248
|
modelValue: a.salePrice,
|
|
246
|
-
"onUpdate:modelValue": (
|
|
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
|
-
|
|
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
|
-
|
|
265
|
+
n(_, {
|
|
263
266
|
modelValue: a.saleNum,
|
|
264
|
-
"onUpdate:modelValue": (
|
|
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
|
-
|
|
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(),
|
|
283
|
+
a.$index !== 0 ? (m(), P(k, {
|
|
281
284
|
key: 0,
|
|
282
|
-
onClick: (
|
|
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
|
-
|
|
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
|
-
|
|
299
|
-
icon:
|
|
301
|
+
n(p, {
|
|
302
|
+
icon: h(Z),
|
|
300
303
|
class: "addButton",
|
|
301
304
|
onClick: R
|
|
302
305
|
}, {
|
|
303
306
|
default: i(() => [
|
|
304
|
-
x(J(
|
|
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
|
-
}),
|
|
316
|
+
}), ce = /* @__PURE__ */ W(ee, [["__scopeId", "data-v-6bb5afe9"]]);
|
|
314
317
|
export {
|
|
315
|
-
|
|
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,
|
|
2
|
-
import { C as D, D as ue, S as Y, a as ne } from "./index-
|
|
3
|
-
import re from "./skuTable-
|
|
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]
|