xyvcard-goods 0.0.28 → 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.
- package/dist/{edit-CquWa3hI.mjs → edit-BY1AVieE.mjs} +131 -128
- package/dist/{edit-CYekSxUa.mjs → edit-BYxk3lFr.mjs} +3 -3
- package/dist/{edit-C_XCVJwM.mjs → edit-CRc6GqY4.mjs} +8 -8
- package/dist/{edit-CuZnQH9w.mjs → edit-D9JqZTHN.mjs} +1 -1
- package/dist/{edit-D1FAN3TA.mjs → edit-ehVvbusK.mjs} +23 -30
- package/dist/{edit.vue_vue_type_script_setup_true_lang-BSxqVyG4.mjs → edit.vue_vue_type_script_setup_true_lang-d769FSho.mjs} +3 -3
- package/dist/index-BLO5ssji.mjs +562 -0
- package/dist/{index-nCeCw43N.mjs → index-BaX061kc.mjs} +87 -92
- package/dist/index-CNVwLggO.mjs +644 -0
- package/dist/{index-wH3Sgvus.mjs → index-DloS7z9I.mjs} +1 -1
- package/dist/{index-B27GuULR.mjs → index-Dpms2ryP.mjs} +9 -9
- package/dist/{index-B3vvD7JH.mjs → index-DvCC73mO.mjs} +61 -63
- package/dist/{index-Dd1dJx7i.mjs → index-R43ND-Ey.mjs} +32 -37
- package/dist/{index-COXyxAor.mjs → index-Vu01FEMS.mjs} +53 -46
- package/dist/index.mjs +1 -1
- package/dist/{info-NBnTd9fK.mjs → info-CJxN7XOi.mjs} +2 -2
- package/dist/{info-0Pf9u0GJ.mjs → info-CzhzwS5C.mjs} +3 -3
- package/dist/{skuForm-BsvKk2kD.mjs → skuForm-K3S131WX.mjs} +86 -83
- package/dist/{skuForm-CU0a2ltJ.mjs → skuForm-X1aeeUCX.mjs} +2 -2
- package/dist/{skuTable-DgDGWX-n.mjs → skuTable-7VaeJKGp.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dts/api/goods-spu/types.d.ts +1 -0
- package/dts/api/index.d.ts +1 -0
- package/dts/constant.d.ts +10 -0
- package/package.json +4 -4
- package/dist/goodsList-DZlaY5k0.mjs +0 -4
- package/dist/goodsList-wpPEPZqs.mjs +0 -4
- package/dist/goodsList.vue_vue_type_script_setup_true_lang-BFXFifWr.mjs +0 -565
- package/dist/goodsList.vue_vue_type_script_setup_true_lang-iXycU5oS.mjs +0 -714
- package/dist/index-DFxg3rmo.mjs +0 -55
- package/dist/index-Dy5JznUz.mjs +0 -53
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var S = Object.defineProperty;
|
|
2
2
|
var E = (u, e, t) => e in u ? S(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
|
3
3
|
var s = (u, e, t) => E(u, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { BizDict as
|
|
4
|
+
import { BizDict as c, BizLayDict as _, EnumDict as n } from "jmash-core";
|
|
5
5
|
import { EntryDict as v } from "jmash-dict";
|
|
6
|
-
import { ref as h, reactive as
|
|
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
|
|
9
|
-
import { g as m } from "./index-
|
|
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
|
// 模块
|
|
@@ -24,7 +24,13 @@ s(a, "SHELF_VALUES", h([
|
|
|
24
24
|
s(a, "ENUM_FREIGHT_TYPE", "xyvcard.goods.protobuf.FreightType"), // 保障服务
|
|
25
25
|
s(a, "DICT_GOODS_ENSURE", "goods_ensure"), // 规格类型
|
|
26
26
|
s(a, "ENUM_SPEC_TYPE", "xyvcard.goods.protobuf.SpecType"), // 商品查询枚举
|
|
27
|
-
s(a, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"),
|
|
27
|
+
s(a, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"), s(a, "GOODS_SPU_VALUES", h([
|
|
28
|
+
{ key: "goods_all", value: "全部商品" },
|
|
29
|
+
{ key: "goods_sale", value: "已上架" },
|
|
30
|
+
{ key: "goods_shelf", value: "待上架" },
|
|
31
|
+
{ key: "goods_audit", value: "审核中" },
|
|
32
|
+
{ key: "goods_notpass", value: "审核驳回" }
|
|
33
|
+
])), // 审核状态
|
|
28
34
|
s(a, "ENUM_APPROVAL_STATUS", "xyvcard.goods.protobuf.ApprovalStatus"), // 审核状态常量
|
|
29
35
|
s(a, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(a, "APPROVAL_PASS", "APPROVAL_PASS"), s(a, "APPROVALING", "APPROVALING"), // 启用禁用
|
|
30
36
|
s(a, "ENABLE_VALUES", h([
|
|
@@ -48,7 +54,7 @@ function d(u, e, t) {
|
|
|
48
54
|
}
|
|
49
55
|
class p {
|
|
50
56
|
constructor(e, t) {
|
|
51
|
-
s(this, "values",
|
|
57
|
+
s(this, "values", L([]));
|
|
52
58
|
// 查询条件
|
|
53
59
|
s(this, "query");
|
|
54
60
|
this.values.length = 0, this.values.push(...e.value), this.query = t;
|
|
@@ -61,12 +67,12 @@ class p {
|
|
|
61
67
|
return "";
|
|
62
68
|
}
|
|
63
69
|
}
|
|
64
|
-
class
|
|
70
|
+
class U extends c {
|
|
65
71
|
// 实现 useValues 方法
|
|
66
72
|
useValues() {
|
|
67
73
|
return new Promise((e, t) => {
|
|
68
|
-
P.findList(this.query).then(({ data:
|
|
69
|
-
const r =
|
|
74
|
+
P.findList(this.query).then(({ data: o }) => {
|
|
75
|
+
const r = o.results;
|
|
70
76
|
this.values.length = 0, this.values.push(
|
|
71
77
|
...r.map(
|
|
72
78
|
(i) => ({
|
|
@@ -79,22 +85,22 @@ class D extends o {
|
|
|
79
85
|
});
|
|
80
86
|
}
|
|
81
87
|
}
|
|
82
|
-
class
|
|
88
|
+
class D extends _ {
|
|
83
89
|
// 实现 useValues 方法
|
|
84
90
|
useValues() {
|
|
85
91
|
return new Promise((e, t) => {
|
|
86
|
-
O.findTreeListApi(this.query).then(({ data:
|
|
87
|
-
this.values.length = 0, this.values.push(...d(
|
|
92
|
+
O.findTreeListApi(this.query).then(({ data: o }) => {
|
|
93
|
+
this.values.length = 0, this.values.push(...d(o.results, "label", "value")), e(this.values);
|
|
88
94
|
}).catch(t);
|
|
89
95
|
});
|
|
90
96
|
}
|
|
91
97
|
}
|
|
92
|
-
class I extends
|
|
98
|
+
class I extends c {
|
|
93
99
|
// 实现 useValues 方法
|
|
94
100
|
useValues() {
|
|
95
101
|
return new Promise((e, t) => {
|
|
96
|
-
A.findList(this.query).then(({ data:
|
|
97
|
-
const r =
|
|
102
|
+
A.findList(this.query).then(({ data: o }) => {
|
|
103
|
+
const r = o.results;
|
|
98
104
|
this.values.length = 0, this.values.push(
|
|
99
105
|
...r.map(
|
|
100
106
|
(i) => ({
|
|
@@ -108,12 +114,12 @@ class I extends o {
|
|
|
108
114
|
});
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
|
-
class
|
|
117
|
+
class V extends c {
|
|
112
118
|
// 实现 useValues 方法
|
|
113
119
|
useValues() {
|
|
114
120
|
return new Promise((e, t) => {
|
|
115
|
-
y.findList(this.query).then(({ data:
|
|
116
|
-
const r =
|
|
121
|
+
y.findList(this.query).then(({ data: o }) => {
|
|
122
|
+
const r = o.results;
|
|
117
123
|
this.values.length = 0, this.values.push(
|
|
118
124
|
...r.map(
|
|
119
125
|
(i) => ({
|
|
@@ -126,12 +132,12 @@ class N extends o {
|
|
|
126
132
|
});
|
|
127
133
|
}
|
|
128
134
|
}
|
|
129
|
-
class
|
|
135
|
+
class N extends c {
|
|
130
136
|
// 实现 useValues 方法
|
|
131
137
|
useValues() {
|
|
132
138
|
return new Promise((e, t) => {
|
|
133
|
-
m.findList(this.query).then(({ data:
|
|
134
|
-
const r =
|
|
139
|
+
m.findList(this.query).then(({ data: o }) => {
|
|
140
|
+
const r = o.results;
|
|
135
141
|
this.values.length = 0, this.values.push(
|
|
136
142
|
...r.map(
|
|
137
143
|
(i) => ({
|
|
@@ -144,12 +150,12 @@ class T extends o {
|
|
|
144
150
|
});
|
|
145
151
|
}
|
|
146
152
|
}
|
|
147
|
-
class
|
|
153
|
+
class T extends c {
|
|
148
154
|
// 实现 useValues 方法
|
|
149
155
|
useValues() {
|
|
150
156
|
return new Promise((e, t) => {
|
|
151
|
-
|
|
152
|
-
const r =
|
|
157
|
+
g.findList(this.query).then(({ data: o }) => {
|
|
158
|
+
const r = o.results;
|
|
153
159
|
this.values.length = 0, this.values.push(
|
|
154
160
|
...r.map(
|
|
155
161
|
(i) => ({
|
|
@@ -162,12 +168,12 @@ class V extends o {
|
|
|
162
168
|
});
|
|
163
169
|
}
|
|
164
170
|
}
|
|
165
|
-
class w extends
|
|
171
|
+
class w extends c {
|
|
166
172
|
// 实现 useValues 方法
|
|
167
173
|
useValues() {
|
|
168
174
|
return new Promise((e, t) => {
|
|
169
|
-
|
|
170
|
-
const r =
|
|
175
|
+
f.findList(this.query).then(({ data: o }) => {
|
|
176
|
+
const r = o.results;
|
|
171
177
|
this.values.length = 0, this.values.push(
|
|
172
178
|
...r.map(
|
|
173
179
|
(i) => ({
|
|
@@ -180,42 +186,43 @@ class w extends o {
|
|
|
180
186
|
});
|
|
181
187
|
}
|
|
182
188
|
}
|
|
183
|
-
class
|
|
189
|
+
class l {
|
|
184
190
|
}
|
|
185
191
|
// 店铺列表
|
|
186
|
-
s(
|
|
187
|
-
|
|
188
|
-
//
|
|
189
|
-
s(
|
|
190
|
-
s(
|
|
191
|
-
s(c, "shelfDict", new p(a.SHELF_VALUES, {})), // 运费类型
|
|
192
|
-
s(c, "freightTypeEnum", new n(
|
|
192
|
+
s(l, "shopInfoBizDict", new U({})), // 规格列表
|
|
193
|
+
s(l, "specInfoDict", new I({})), // 规格值
|
|
194
|
+
s(l, "specValueDict", new V({})), // 上架下架
|
|
195
|
+
s(l, "shelfDict", new p(a.SHELF_VALUES, {})), // 运费类型
|
|
196
|
+
s(l, "freightTypeEnum", new n(
|
|
193
197
|
a.MODULE_GOODS,
|
|
194
198
|
a.ENUM_FREIGHT_TYPE
|
|
195
199
|
)), // 保障服务
|
|
196
|
-
s(
|
|
197
|
-
s(
|
|
200
|
+
s(l, "goodsEnsureDict", new v(a.DICT_GOODS_ENSURE)), // 规格类型
|
|
201
|
+
s(l, "specTypeEnum", new n(
|
|
198
202
|
a.MODULE_GOODS,
|
|
199
203
|
a.ENUM_SPEC_TYPE
|
|
200
204
|
)), // 商品查询枚举
|
|
201
|
-
s(
|
|
205
|
+
s(l, "goodsSpuListSortEnum", new n(
|
|
202
206
|
a.MODULE_GOODS,
|
|
203
207
|
a.ENUM_GOODS_SPU_List_SORT
|
|
208
|
+
)), s(l, "goodsSpuListSortDict", new p(
|
|
209
|
+
a.GOODS_SPU_VALUES,
|
|
210
|
+
{}
|
|
204
211
|
)), // 审核状态
|
|
205
|
-
s(
|
|
212
|
+
s(l, "approvalStatusEnum", new n(
|
|
206
213
|
a.MODULE_GOODS,
|
|
207
214
|
a.ENUM_APPROVAL_STATUS
|
|
208
215
|
)), // 启用禁用
|
|
209
|
-
s(
|
|
210
|
-
s(
|
|
216
|
+
s(l, "enableDict", new p(a.ENABLE_VALUES, {})), // 商品分类
|
|
217
|
+
s(l, "goodsCategoryListBizLayDict", new D(
|
|
211
218
|
{}
|
|
212
219
|
)), // 品牌列表
|
|
213
|
-
s(
|
|
214
|
-
s(
|
|
215
|
-
s(
|
|
220
|
+
s(l, "brandListBizDict", new N({})), // 标签列表
|
|
221
|
+
s(l, "labelListBizDict", new T({})), // 商品列表
|
|
222
|
+
s(l, "goodsSpuBizDict", new w({}));
|
|
216
223
|
export {
|
|
217
224
|
a as C,
|
|
218
|
-
|
|
219
|
-
|
|
225
|
+
l as D,
|
|
226
|
+
V as S,
|
|
220
227
|
I as a
|
|
221
228
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -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-
|
|
5
|
-
import { a as L } from "./index-
|
|
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-
|
|
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-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
|
|
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
|
|
4
|
-
import { a as O } from "./index-
|
|
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:
|
|
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,
|
|
49
|
-
s.picUrl =
|
|
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
|
|
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
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 = 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 (
|
|
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
|
|
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"), 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
|
-
|
|
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(V).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(), S("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), S(Y, null, G(a.skuOptions, (
|
|
212
|
-
key:
|
|
213
|
-
label:
|
|
214
|
-
value:
|
|
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
|
-
|
|
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(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
|
-
|
|
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
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-
|
|
3
|
-
import re from "./skuTable-
|
|
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-
|
|
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-
|
|
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}
|