xyvcard-goods 0.0.7 → 0.0.9
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/{approveFailIndex-F3GtuNeX.mjs → approveFailIndex-DJf9bHab.mjs} +1 -1
- package/dist/{approveFailIndex.vue_vue_type_script_setup_true_lang-8ykH4NF1.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-mXqZdtba.mjs} +39 -39
- package/dist/{auditIndex-DZUQQzVu.mjs → auditIndex-CCkGsSy2.mjs} +1 -1
- package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-Bnc1wKbA.mjs → auditIndex.vue_vue_type_script_setup_true_lang-DHolmNaP.mjs} +59 -59
- package/dist/edit-D37yka6Z.mjs +470 -0
- package/dist/{index-D5_GsXR7.mjs → index-CKeHa-Cx.mjs} +24 -27
- package/dist/{index-kGlE0ywA.mjs → index-vcmJ06-Y.mjs} +136 -136
- package/dist/index.mjs +8 -37
- package/dist/{info-kiOShGr4.mjs → info-CPZykxS1.mjs} +37 -40
- package/dist/{saleIndex-CyMvOgxp.mjs → saleIndex-CdAcvCzO.mjs} +1 -1
- package/dist/{saleIndex.vue_vue_type_script_setup_true_lang-BgZZMEph.mjs → saleIndex.vue_vue_type_script_setup_true_lang-CLzVH-ix.mjs} +94 -94
- package/dist/{shelfIndex-DZWqrqlw.mjs → shelfIndex-ZHuhzU_h.mjs} +1 -1
- package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-B7fw9wHp.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-CTv-j8Xe.mjs} +18 -18
- package/dist/{skuForm-Dtq2Ttjc.mjs → skuForm-BSlT4TYd.mjs} +81 -76
- package/dist/skuTable-DYmQYXk3.mjs +535 -0
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +6 -2
- package/dts/api/goods-spu/types.d.ts +6 -5
- package/dts/constant.d.ts +7 -7
- package/dts/router/index.d.ts +2 -2
- package/dts/views/goods/goods-spu/skuForm.vue.d.ts +10 -1
- package/package.json +3 -3
- package/dist/edit-C3imnLUq.mjs +0 -600
- package/dist/skuTable-8oPw0DhV.mjs +0 -611
package/dist/index.mjs
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
import { deepMerge as Tt, Layout as Ys, useUserStore as E, clearEmpty as V, request as G, addViteMenus as Os, addDynamicRoute as Ts, i18n as bs } from "jmash-core";
|
|
2
2
|
const xs = {}, Rs = {
|
|
3
|
-
// 商品SKU
|
|
4
|
-
// goodsSku: {
|
|
5
|
-
// name : "商品SKU",
|
|
6
|
-
// skuId: "标识",
|
|
7
|
-
// spuId: "商品ID",
|
|
8
|
-
// skuCode: "编码",
|
|
9
|
-
// picUrl: "图片",
|
|
10
|
-
// salePrice: "销售价格",
|
|
11
|
-
// marketPrice: "市场价",
|
|
12
|
-
// costPrice: "成本价",
|
|
13
|
-
// stock: "库存",
|
|
14
|
-
// weight: "重量",
|
|
15
|
-
// volume: "体积(m³)",
|
|
16
|
-
// status: "状态",
|
|
17
|
-
// },
|
|
18
|
-
// 商品SKU规格值
|
|
19
|
-
// goodsSkuSpecValue: {
|
|
20
|
-
// name : "商品SKU规格值",
|
|
21
|
-
// skuId: "sku_id",
|
|
22
|
-
// specId: "规格ID",
|
|
23
|
-
// specValueId: "规格值",
|
|
24
|
-
// },
|
|
25
3
|
// 商品SPU
|
|
26
4
|
goodsSpu: {
|
|
27
|
-
shopId: "
|
|
5
|
+
shopId: "所属商家",
|
|
28
6
|
categoryId: "商品分类",
|
|
29
7
|
freightType: "运费类型",
|
|
30
8
|
freightAmount: "运费金额",
|
|
@@ -51,7 +29,7 @@ const xs = {}, Rs = {
|
|
|
51
29
|
batchRejected: "批量拒绝审核",
|
|
52
30
|
batchApproval: "批量审核",
|
|
53
31
|
updateTime: "最后更新时间",
|
|
54
|
-
shopIdRequired: "
|
|
32
|
+
shopIdRequired: "请选择所属商家",
|
|
55
33
|
spuNameRequired: "请输入商品名称",
|
|
56
34
|
freightAmountRequired: "请输入运费金额",
|
|
57
35
|
saleNumRequired: "请输入虚拟销量",
|
|
@@ -77,13 +55,6 @@ const xs = {}, Rs = {
|
|
|
77
55
|
successFilled: "审核失败",
|
|
78
56
|
successApproval: "审核通过"
|
|
79
57
|
}
|
|
80
|
-
// 商品SPU规格
|
|
81
|
-
// goodsSpuSpec: {
|
|
82
|
-
// name : "商品SPU规格",
|
|
83
|
-
// spuId: "商品SPUID",
|
|
84
|
-
// specId: "规格ID",
|
|
85
|
-
// orderBy: "排序",
|
|
86
|
-
// },
|
|
87
58
|
};
|
|
88
59
|
function Ps(e) {
|
|
89
60
|
let t = e.global.getLocaleMessage("zh-cn");
|
|
@@ -91,7 +62,7 @@ function Ps(e) {
|
|
|
91
62
|
let s = e.global.getLocaleMessage("en");
|
|
92
63
|
s = Tt(s, xs), e.global.setLocaleMessage("zh-cn", t), e.global.setLocaleMessage("en", s);
|
|
93
64
|
}
|
|
94
|
-
const Ns = () => import("./edit-
|
|
65
|
+
const Ns = () => import("./edit-D37yka6Z.mjs"), Ws = () => import("./info-CPZykxS1.mjs"), Fs = [
|
|
95
66
|
{
|
|
96
67
|
path: "/rawgoods",
|
|
97
68
|
component: Ys,
|
|
@@ -103,7 +74,7 @@ const Ns = () => import("./edit-C3imnLUq.mjs"), Ws = () => import("./info-kiOShG
|
|
|
103
74
|
{
|
|
104
75
|
path: "goods-spu/edit",
|
|
105
76
|
component: Ns,
|
|
106
|
-
name: "
|
|
77
|
+
name: "goodsSpuEdit",
|
|
107
78
|
meta: {
|
|
108
79
|
hidden: !0,
|
|
109
80
|
title: "全部商品",
|
|
@@ -114,7 +85,7 @@ const Ns = () => import("./edit-C3imnLUq.mjs"), Ws = () => import("./info-kiOShG
|
|
|
114
85
|
{
|
|
115
86
|
path: "goods-spu/info",
|
|
116
87
|
component: Ws,
|
|
117
|
-
name: "
|
|
88
|
+
name: "goodsSpuInfo",
|
|
118
89
|
meta: {
|
|
119
90
|
hidden: !0,
|
|
120
91
|
title: "全部商品",
|
|
@@ -2785,7 +2756,7 @@ class Ci {
|
|
|
2785
2756
|
* @returns 返回一个AxiosPromise对象解析为一个布尔值表示操作是否成功
|
|
2786
2757
|
*/
|
|
2787
2758
|
enable(t, s) {
|
|
2788
|
-
|
|
2759
|
+
const r = { ...t };
|
|
2789
2760
|
return r.tenant = E().user.tenant, r.shelf = s, V(r), G({
|
|
2790
2761
|
url: "/v1/goods/goods_spu/on_sale",
|
|
2791
2762
|
method: "put",
|
|
@@ -2827,7 +2798,7 @@ class Ci {
|
|
|
2827
2798
|
* @returns 返回一个AxiosPromise,包含审核操作的结果,通常是一个数字状态码
|
|
2828
2799
|
*/
|
|
2829
2800
|
audit(t, s) {
|
|
2830
|
-
|
|
2801
|
+
const r = { ...t };
|
|
2831
2802
|
return r.tenant = E().user.tenant, r.status = s, V(r), G({
|
|
2832
2803
|
url: "/v1/goods/goods_spu/audit",
|
|
2833
2804
|
method: "put",
|
|
@@ -2835,7 +2806,7 @@ class Ci {
|
|
|
2835
2806
|
});
|
|
2836
2807
|
}
|
|
2837
2808
|
}
|
|
2838
|
-
const Hi = new Ci(), Ui = /* @__PURE__ */ Object.assign({ "./views/goods/goods-spu/approveFailIndex.vue": () => import("./approveFailIndex-
|
|
2809
|
+
const Hi = new Ci(), Ui = /* @__PURE__ */ Object.assign({ "./views/goods/goods-spu/approveFailIndex.vue": () => import("./approveFailIndex-DJf9bHab.mjs"), "./views/goods/goods-spu/auditIndex.vue": () => import("./auditIndex-CCkGsSy2.mjs"), "./views/goods/goods-spu/edit.vue": () => import("./edit-D37yka6Z.mjs"), "./views/goods/goods-spu/index.vue": () => import("./index-vcmJ06-Y.mjs"), "./views/goods/goods-spu/info.vue": () => import("./info-CPZykxS1.mjs"), "./views/goods/goods-spu/saleIndex.vue": () => import("./saleIndex-CdAcvCzO.mjs"), "./views/goods/goods-spu/shelfIndex.vue": () => import("./shelfIndex-ZHuhzU_h.mjs"), "./views/goods/goods-spu/skuForm.vue": () => import("./skuForm-BSlT4TYd.mjs"), "./views/goods/goods-spu/skuTable.vue": () => import("./skuTable-DYmQYXk3.mjs").then((e) => e.a) }), Ei = {
|
|
2839
2810
|
install(e) {
|
|
2840
2811
|
Os(Ui, 7), Ps(bs), Ts(Fs), e.use(Li);
|
|
2841
2812
|
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { defineComponent as q, ref as k, computed as j, watch as F, resolveComponent as S, openBlock as
|
|
1
|
+
import { defineComponent as q, ref as k, computed as j, watch as F, resolveComponent as S, openBlock as f, createElementBlock as V, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as l, createElementVNode as a, unref as r, Fragment as C, renderList as P, createBlock as y, createCommentVNode as w } from "vue";
|
|
2
2
|
import { fileApi as B, routerUtil as H } from "jmash-core";
|
|
3
3
|
import { useRouter as O, useRoute as R } from "vue-router";
|
|
4
|
-
import { D as p, C as N, S as
|
|
5
|
-
import { s as
|
|
6
|
-
import { goodsSpuApi as
|
|
7
|
-
import { g as
|
|
8
|
-
const
|
|
4
|
+
import { D as p, C as N, S as Y } from "./index-CKeHa-Cx.mjs";
|
|
5
|
+
import { s as z } from "./skuTable-DYmQYXk3.mjs";
|
|
6
|
+
import { goodsSpuApi as G } from "./index.mjs";
|
|
7
|
+
import { g as J } from "./index-BHmGYIuc.mjs";
|
|
8
|
+
const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "title-content" }, ie = { class: "cell-item" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = ["innerHTML"], ye = /* @__PURE__ */ q({
|
|
9
9
|
__name: "info",
|
|
10
10
|
setup(_e) {
|
|
11
|
-
const U = O(),
|
|
11
|
+
const U = O(), b = R(), u = k({}), L = k([]), g = k([]), D = k([]), E = k([]), $ = j(() => g.value.filter(
|
|
12
12
|
(s) => s.name && s.specValueList != null && s.specValueList.length
|
|
13
13
|
));
|
|
14
14
|
F(
|
|
15
|
-
|
|
15
|
+
$,
|
|
16
16
|
(s) => s,
|
|
17
17
|
{
|
|
18
18
|
deep: !0,
|
|
19
19
|
immediate: !0
|
|
20
20
|
}
|
|
21
|
-
), p.shopInfoBizDict.useValues(), p.goodsCategoryDict.useValues(),
|
|
21
|
+
), p.shopInfoBizDict.useValues(), p.goodsCategoryDict.useValues(), b.query.spuId && G.findById({ spuId: b.query.spuId }).then(({ data: s }) => {
|
|
22
22
|
var c, v, o;
|
|
23
|
-
u.value = Object.assign(u, s), L.value = (c = s.picUrls) == null ? void 0 : c.split(","),
|
|
23
|
+
u.value = Object.assign(u, s), L.value = (c = s.picUrls) == null ? void 0 : c.split(","), J.findById({ spuId: b.query.spuId }).then(({ data: m }) => {
|
|
24
24
|
u.value.ensureIds = m.ensures;
|
|
25
|
-
}), s.specType === N.
|
|
25
|
+
}), s.specType === N.SPEC_TYPE.MULTI_SPEC && (D.value = (v = s.skuList) == null ? void 0 : v.results, (o = s.skuList) == null || o.results.forEach((m) => {
|
|
26
26
|
var d;
|
|
27
27
|
(d = m.specValues) == null || d.map((h) => {
|
|
28
28
|
p.specInfoDict.useValues().then((I) => {
|
|
29
|
-
const t = I.find((
|
|
30
|
-
if (
|
|
31
|
-
let
|
|
29
|
+
const t = I.find((_) => h.specId === _.key);
|
|
30
|
+
if (t) {
|
|
31
|
+
let _ = {
|
|
32
32
|
id: h.specId,
|
|
33
33
|
name: t.value,
|
|
34
34
|
specValueList: []
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
g.value.push(_);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
(
|
|
38
|
+
const T = /* @__PURE__ */ new Map();
|
|
39
|
+
g.value = g.value.filter(
|
|
40
|
+
(_) => !T.has(_.id) && T.set(_.id, _)
|
|
41
41
|
), A(h.specValueId);
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
}));
|
|
45
45
|
});
|
|
46
46
|
function A(s) {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
g.value.forEach((c) => {
|
|
48
|
+
E.value = new Y({ specId: c.id }), E.value.useValues().then((v) => {
|
|
49
49
|
v.forEach((o) => {
|
|
50
50
|
if (o.key === s) {
|
|
51
51
|
let d = {
|
|
@@ -57,17 +57,17 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
57
57
|
const m = /* @__PURE__ */ new Map();
|
|
58
58
|
c.specValueList = c.specValueList.filter(
|
|
59
59
|
(d) => !m.has(d.id) && m.set(d.id, d)
|
|
60
|
-
)
|
|
60
|
+
);
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
function M() {
|
|
66
|
-
H.closeTagView(
|
|
66
|
+
H.closeTagView(b.fullPath, U, !1);
|
|
67
67
|
}
|
|
68
68
|
return (s, c) => {
|
|
69
69
|
const v = S("el-button"), o = S("el-descriptions-item"), m = S("el-image"), d = S("el-tag"), h = S("el-descriptions"), I = S("el-card");
|
|
70
|
-
return
|
|
70
|
+
return f(), V("div", K, [
|
|
71
71
|
i(I, { shadow: "never" }, {
|
|
72
72
|
header: e(() => [
|
|
73
73
|
i(v, {
|
|
@@ -90,7 +90,7 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
90
90
|
default: e(() => [
|
|
91
91
|
i(o, null, {
|
|
92
92
|
label: e(() => [
|
|
93
|
-
a("div",
|
|
93
|
+
a("div", Q, l(s.$t("goodsSpu.shopId")), 1)
|
|
94
94
|
]),
|
|
95
95
|
default: e(() => [
|
|
96
96
|
n(" " + l(r(p).shopInfoBizDict.getValue(u.value.shopId)), 1)
|
|
@@ -99,7 +99,7 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
99
99
|
}),
|
|
100
100
|
i(o, null, {
|
|
101
101
|
label: e(() => [
|
|
102
|
-
a("div",
|
|
102
|
+
a("div", W, l(s.$t("goodsSpu.spuName")), 1)
|
|
103
103
|
]),
|
|
104
104
|
default: e(() => [
|
|
105
105
|
n(" " + l(u.value.spuName), 1)
|
|
@@ -108,7 +108,7 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
108
108
|
}),
|
|
109
109
|
i(o, null, {
|
|
110
110
|
label: e(() => [
|
|
111
|
-
a("div",
|
|
111
|
+
a("div", X, l(s.$t("goodsSpu.categoryId")), 1)
|
|
112
112
|
]),
|
|
113
113
|
default: e(() => [
|
|
114
114
|
n(" " + l(r(p).goodsCategoryDict.getValue(u.value.categoryId)), 1)
|
|
@@ -149,7 +149,7 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
149
149
|
a("div", le, l(s.$t("goodsSpu.picUrls")), 1)
|
|
150
150
|
]),
|
|
151
151
|
default: e(() => [
|
|
152
|
-
(
|
|
152
|
+
(f(!0), V(C, null, P(L.value, (t) => (f(), y(m, {
|
|
153
153
|
key: t,
|
|
154
154
|
src: r(B).imageUrl(t, 80, 80),
|
|
155
155
|
"preview-src-list": [r(B).imageUrl(t)],
|
|
@@ -164,12 +164,9 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
164
164
|
label: e(() => [
|
|
165
165
|
a("div", se, l(s.$t("goodsSpu.shelf")), 1)
|
|
166
166
|
]),
|
|
167
|
-
default: e(() =>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
n(" " + l(r(p).shelfDict.getValue((t = u.value.shelf) == null ? void 0 : t.toString())), 1)
|
|
171
|
-
];
|
|
172
|
-
}),
|
|
167
|
+
default: e(() => [
|
|
168
|
+
n(" " + l(r(p).shelfDict.getValue(u.value.shelf)), 1)
|
|
169
|
+
]),
|
|
173
170
|
_: 1
|
|
174
171
|
}),
|
|
175
172
|
i(o, null, {
|
|
@@ -195,7 +192,7 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
195
192
|
a("div", ue, l(s.$t("goodsSpu.ensureIds")), 1)
|
|
196
193
|
]),
|
|
197
194
|
default: e(() => [
|
|
198
|
-
(
|
|
195
|
+
(f(!0), V(C, null, P(u.value.ensureIds, (t) => (f(), y(d, {
|
|
199
196
|
type: "info",
|
|
200
197
|
key: t
|
|
201
198
|
}, {
|
|
@@ -211,7 +208,7 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
211
208
|
_: 1
|
|
212
209
|
}),
|
|
213
210
|
a("div", ae, " 商品规格(" + l(r(p).specTypeEnum.getEnumValue(u.value.specType)) + ") ", 1),
|
|
214
|
-
u.value.specType == r(N).
|
|
211
|
+
u.value.specType == r(N).SPEC_TYPE.UNIFIED_SPEC ? (f(), y(h, {
|
|
215
212
|
key: 0,
|
|
216
213
|
class: "margin-top",
|
|
217
214
|
column: 2,
|
|
@@ -292,13 +289,13 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
292
289
|
})
|
|
293
290
|
]),
|
|
294
291
|
_: 1
|
|
295
|
-
})) :
|
|
296
|
-
|
|
292
|
+
})) : w("", !0),
|
|
293
|
+
g.value.length > 0 ? (f(), y(z, {
|
|
297
294
|
key: 1,
|
|
298
|
-
specData:
|
|
295
|
+
specData: $.value,
|
|
299
296
|
goodsSku: D.value,
|
|
300
297
|
isSettingShow: !1
|
|
301
|
-
}, null, 8, ["specData", "goodsSku"])) :
|
|
298
|
+
}, null, 8, ["specData", "goodsSku"])) : w("", !0),
|
|
302
299
|
c[1] || (c[1] = a("div", { class: "title-content" }, "商品描述", -1)),
|
|
303
300
|
a("div", {
|
|
304
301
|
innerHTML: u.value.description
|
|
@@ -311,5 +308,5 @@ const Q = { class: "app-container" }, W = { class: "cell-item" }, X = { class: "
|
|
|
311
308
|
}
|
|
312
309
|
});
|
|
313
310
|
export {
|
|
314
|
-
|
|
311
|
+
ye as default
|
|
315
312
|
};
|