xyvcard-goods 0.0.33 → 0.0.35
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/BatchSetting-B1LcBFPD.mjs +333 -0
- package/dist/ChannelProfit-CNSIK87d.mjs +4 -0
- package/dist/ChannelProfit.vue_vue_type_script_setup_true_lang-BVTifRY8.mjs +320 -0
- package/dist/{GoodsBaseForm-6rzBkBTh.mjs → GoodsBaseForm-BZ2fZmmp.mjs} +1 -1
- package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-BxBTTLdA.mjs +407 -0
- package/dist/GoodsLogisticsForm-BqlwdGQ1.mjs +4 -0
- package/dist/GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-DJREiSkD.mjs +433 -0
- package/dist/GoodsProfitForm-COYRi8sx.mjs +4 -0
- package/dist/GoodsProfitForm.vue_vue_type_script_setup_true_lang-BYPWP95J.mjs +2550 -0
- package/dist/{GoodsSpecForm-BqaN71rS.mjs → GoodsSpecForm-B4MtETRy.mjs} +1 -1
- package/dist/GoodsSpecForm.vue_vue_type_script_setup_true_lang-BbVK_KNz.mjs +347 -0
- package/dist/SingleSku-rWv9vVhv.mjs +351 -0
- package/dist/constant-sVd2JbJt.mjs +115 -0
- package/dist/edit-B1cmsJpy.mjs +70 -0
- package/dist/{edit-DBTNknBy.mjs → edit-Br1Y569l.mjs} +8 -7
- package/dist/{edit-CZwlbL9o.mjs → edit-CET8Fr-t.mjs} +18 -18
- package/dist/{edit-1Lv_dvlq.mjs → edit-CagYTFKr.mjs} +1 -1
- package/dist/{edit-D2zcGl_U.mjs → edit-iJGrWlSv.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-BmOhw098.mjs → edit.vue_vue_type_script_setup_true_lang-D_0YivhL.mjs} +32 -32
- package/dist/{el-message-BB2-39XJ.mjs → el-message-Dj6aaz4G.mjs} +490 -373
- package/dist/{index-BhUD_X30.mjs → index copy-kNLE7fPg.mjs } +6 -5
- package/dist/index-C61SQFSx.mjs +264 -0
- package/dist/index-CeWPdEJD.mjs +713 -0
- package/dist/{index-BpXZNA11.mjs → index-Cg6GUdSP.mjs} +3 -3
- package/dist/index-CyxnVWnL.mjs +182 -0
- package/dist/{index-DGYGNHfx.mjs → index-D9s8hsVw.mjs} +3 -3
- package/dist/{index-BXa-atkT.mjs → index-DbnKa_BJ.mjs} +1 -1
- package/dist/{index-DXIGHcIv.mjs → index-DoxTu4kg.mjs} +5 -4
- package/dist/{index-Cl4wz2yF.mjs → index-kw0UYOIu.mjs} +3 -3
- package/dist/{index-CRfiEzkA.mjs → index-xQgC-8Gd.mjs} +1237 -1141
- package/dist/index.mjs +1 -1
- package/dist/info-CTElDVo6.mjs +376 -0
- package/dist/{info-DfbU-CWk.mjs → info-DpGJgdac.mjs} +37 -36
- package/dist/{skuForm-DoIpxDvq.mjs → skuForm-C7w9YIDe.mjs} +40 -39
- package/dist/skuForm-CPlnCToi.mjs +279 -0
- package/dist/skuTable-C-LcASbX.mjs +594 -0
- package/dist/spec-DkiGCkuM.mjs +44 -0
- package/dist/style.css +1 -1
- package/dts/xyvcard-goods/src/App.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/api/dict.d.ts +36 -0
- package/dts/xyvcard-goods/src/api/goods-base/index.d.ts +11 -0
- package/dts/xyvcard-goods/src/api/goods-base/types.d.ts +33 -0
- package/dts/xyvcard-goods/src/api/goods-brand-info/index.d.ts +20 -0
- package/dts/xyvcard-goods/src/api/goods-brand-info/types.d.ts +73 -0
- package/dts/xyvcard-goods/src/api/goods-category/index.d.ts +23 -0
- package/dts/xyvcard-goods/src/api/goods-category/types.d.ts +70 -0
- package/dts/xyvcard-goods/src/api/goods-ensure/index.d.ts +13 -0
- package/dts/xyvcard-goods/src/api/goods-ensure/types.d.ts +13 -0
- package/dts/xyvcard-goods/src/api/goods-label-info/index.d.ts +20 -0
- package/dts/xyvcard-goods/src/api/goods-label-info/types.d.ts +70 -0
- package/dts/xyvcard-goods/src/api/goods-logistics/index.d.ts +8 -0
- package/dts/xyvcard-goods/src/api/goods-logistics/types.d.ts +16 -0
- package/dts/xyvcard-goods/src/api/goods-sku/types.d.ts +21 -0
- package/dts/xyvcard-goods/src/api/goods-spec/index.d.ts +8 -0
- package/dts/xyvcard-goods/src/api/goods-spec/types.d.ts +15 -0
- package/dts/xyvcard-goods/src/api/goods-spu/index.d.ts +72 -0
- package/dts/xyvcard-goods/src/api/goods-spu/types.d.ts +271 -0
- package/dts/xyvcard-goods/src/api/goods-stock/index.d.ts +8 -0
- package/dts/xyvcard-goods/src/api/goods-stock/types.d.ts +32 -0
- package/dts/xyvcard-goods/src/api/index.d.ts +29 -0
- package/dts/xyvcard-goods/src/api/shop-branch/index.d.ts +9 -0
- package/dts/xyvcard-goods/src/api/shop-branch/types.d.ts +28 -0
- package/dts/xyvcard-goods/src/api/types.d.ts +4 -0
- package/dts/xyvcard-goods/src/components/ImageUpload.vue.d.ts +36 -0
- package/dts/xyvcard-goods/src/constant.d.ts +107 -0
- package/dts/xyvcard-goods/src/index.d.ts +12 -0
- package/dts/xyvcard-goods/src/lang/goods/en.d.ts +2 -0
- package/dts/xyvcard-goods/src/lang/goods/zh-cn.d.ts +173 -0
- package/dts/xyvcard-goods/src/lang/index.d.ts +1 -0
- package/dts/xyvcard-goods/src/main.d.ts +7 -0
- package/dts/xyvcard-goods/src/permission.d.ts +1 -0
- package/dts/xyvcard-goods/src/router/index.d.ts +7 -0
- package/dts/xyvcard-goods/src/utils/momentPlugin.d.ts +5 -0
- package/dts/xyvcard-goods/src/utils/returnBizLay.d.ts +2 -0
- package/dts/xyvcard-goods/src/utils/sku.d.ts +19 -0
- package/dts/xyvcard-goods/src/views/goods/goods-brand-info/edit.vue.d.ts +22 -0
- package/dts/xyvcard-goods/src/views/goods/goods-brand-info/index.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-category/edit.vue.d.ts +22 -0
- package/dts/xyvcard-goods/src/views/goods/goods-category/index.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-combination/edit.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-combination/index.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-combination/info.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-combination/skuForm.vue.d.ts +20 -0
- package/dts/xyvcard-goods/src/views/goods/goods-label-info/edit.vue.d.ts +22 -0
- package/dts/xyvcard-goods/src/views/goods/goods-label-info/index.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/BatchSetting.vue.d.ts +35 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/ChannelProfit.vue.d.ts +22 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsBaseForm.vue.d.ts +34 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsLogisticsForm.vue.d.ts +42 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsProfitForm.vue.d.ts +34 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsSpecForm.vue.d.ts +42 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/SingleSku.vue.d.ts +23 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/edit copy 2.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/edit copy.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/edit.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/index copy.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/index.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/info.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/skuForm.vue.d.ts +42 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/skuTable.vue.d.ts +53 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/spec.vue.d.ts +2 -0
- package/dts/xyvcard-shop/src/api/shop-branch/index.d.ts +14 -0
- package/dts/xyvcard-shop/src/api/shop-branch/types.d.ts +76 -0
- package/package.json +6 -5
- package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-BmIR352P.mjs +0 -374
- package/dist/GoodsLogisticsForm-CHyQ99Mt.mjs +0 -10
- package/dist/GoodsSpecForm.vue_vue_type_script_setup_true_lang-BTFKRiNW.mjs +0 -140
- package/dist/edit copy 2-DnKLaz3I.mjs +0 -45
- package/dist/edit copy-tfwJCdiV.mjs +0 -526
- package/dist/edit-Db2EJ9dq.mjs +0 -526
- package/dist/index-BHmGYIuc.mjs +0 -24
- package/dist/index-Df-F10aZ.mjs +0 -264
- package/dist/index-vHQhUQSO.mjs +0 -95
- package/dist/info-DDi6GKQH.mjs +0 -365
- package/dist/skuForm-DWIoveRP.mjs +0 -475
- package/dist/skuTable-BVBtWrf9.mjs +0 -639
package/dist/index.mjs
CHANGED
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { defineComponent as z, ref as k, computed as M, watch as Y, resolveComponent as b, createElementBlock as L, openBlock as c, createVNode as i, withCtx as e, createElementVNode as a, createBlock as f, createCommentVNode as E, createTextVNode as n, toDisplayString as t, Fragment as V, renderList as D, unref as r } from "vue";
|
|
2
|
+
import { useUserStore as j, clearEmpty as q, request as F, fileApi as w, routerUtil as G } from "jmash-core";
|
|
3
|
+
import { useRouter as H, useRoute as K } from "vue-router";
|
|
4
|
+
import { C as T } from "./constant-sVd2JbJt.mjs";
|
|
5
|
+
import { D as p, S as J } from "./index-C61SQFSx.mjs";
|
|
6
|
+
import Q from "./skuTable-C-LcASbX.mjs";
|
|
7
|
+
import { a as W } from "./index-xQgC-8Gd.mjs";
|
|
8
|
+
import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
9
|
+
class Z {
|
|
10
|
+
getKey(g) {
|
|
11
|
+
return {
|
|
12
|
+
spuId: g.spuId
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 查询商品保障信息
|
|
17
|
+
* @param query 查询参数对象,包含需要查询的商品保障的关键信息
|
|
18
|
+
* @returns 返回一个Promise对象,包含商品保障信息
|
|
19
|
+
*/
|
|
20
|
+
findById(g) {
|
|
21
|
+
return g.tenant = j().user.tenant, q(g), F({
|
|
22
|
+
url: "/v1/goods/goods_ensures",
|
|
23
|
+
method: "get",
|
|
24
|
+
params: g
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const x = new Z(), ee = { class: "app-container" }, te = { class: "cell-item" }, se = { class: "cell-item" }, le = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "cell-item" }, 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 = { class: "tag-container" }, _e = { class: "title-content" }, fe = { class: "cell-item" }, ge = { class: "cell-item" }, ve = { class: "cell-item" }, he = { class: "cell-item" }, Se = { class: "cell-item" }, ye = { class: "cell-item" }, be = { class: "cell-item" }, ke = ["innerHTML"], Le = /* @__PURE__ */ z({
|
|
29
|
+
__name: "info",
|
|
30
|
+
setup(N) {
|
|
31
|
+
p.brandListBizDict.useValues(), p.labelListBizDict.useValues();
|
|
32
|
+
const g = H(), I = K(), o = k({}), $ = k([]), h = k([]), A = k([]), B = k([]), C = M(() => h.value.filter(
|
|
33
|
+
(l) => l.name && l.specValueList != null && l.specValueList.length
|
|
34
|
+
));
|
|
35
|
+
Y(
|
|
36
|
+
C,
|
|
37
|
+
(l) => l,
|
|
38
|
+
{
|
|
39
|
+
deep: !0,
|
|
40
|
+
immediate: !0
|
|
41
|
+
}
|
|
42
|
+
), p.shopInfoBizDict.useValues(), p.goodsCategoryListBizLayDict.useValues(), I.query.spuId && W.findById({ spuId: I.query.spuId }).then(({ data: l }) => {
|
|
43
|
+
var d, S, u;
|
|
44
|
+
o.value = Object.assign(o, l), $.value = (d = l.picUrls) == null ? void 0 : d.split(","), x.findById({ spuId: I.query.spuId }).then(({ data: m }) => {
|
|
45
|
+
o.value.ensureIds = m.ensures;
|
|
46
|
+
}), l.specType === T.SPEC_TYPE_VALUES.MULTI_SPEC && (A.value = (S = l.skuList) == null ? void 0 : S.results, (u = l.skuList) == null || u.results.forEach((m) => {
|
|
47
|
+
var _;
|
|
48
|
+
(_ = m.specValues) == null || _.map((y) => {
|
|
49
|
+
p.specInfoDict.useValues().then((P) => {
|
|
50
|
+
const s = P.find((v) => y.specId === v.key);
|
|
51
|
+
if (s) {
|
|
52
|
+
let v = {
|
|
53
|
+
id: y.specId,
|
|
54
|
+
name: s.value,
|
|
55
|
+
specValueList: []
|
|
56
|
+
};
|
|
57
|
+
h.value.push(v);
|
|
58
|
+
}
|
|
59
|
+
const U = /* @__PURE__ */ new Map();
|
|
60
|
+
h.value = h.value.filter(
|
|
61
|
+
(v) => !U.has(v.id) && U.set(v.id, v)
|
|
62
|
+
), O(y.specValueId);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}));
|
|
66
|
+
});
|
|
67
|
+
function O(l) {
|
|
68
|
+
h.value.forEach((d) => {
|
|
69
|
+
B.value = new J({ specId: d.id }), B.value.useValues().then((S) => {
|
|
70
|
+
S.forEach((u) => {
|
|
71
|
+
if (u.key === l) {
|
|
72
|
+
let _ = {
|
|
73
|
+
id: l,
|
|
74
|
+
name: u.value
|
|
75
|
+
};
|
|
76
|
+
d.specValueList.push(_);
|
|
77
|
+
}
|
|
78
|
+
const m = /* @__PURE__ */ new Map();
|
|
79
|
+
d.specValueList = d.specValueList.filter(
|
|
80
|
+
(_) => !m.has(_.id) && m.set(_.id, _)
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function R() {
|
|
87
|
+
G.closeTagView(I.fullPath, g, !1);
|
|
88
|
+
}
|
|
89
|
+
return (l, d) => {
|
|
90
|
+
const S = b("el-button"), u = b("el-descriptions-item"), m = b("el-tag"), _ = b("el-image"), y = b("el-descriptions"), P = b("el-card");
|
|
91
|
+
return c(), L("div", ee, [
|
|
92
|
+
i(P, { shadow: "never" }, {
|
|
93
|
+
header: e(() => [
|
|
94
|
+
i(S, {
|
|
95
|
+
type: "primary",
|
|
96
|
+
onClick: R
|
|
97
|
+
}, {
|
|
98
|
+
default: e(() => [
|
|
99
|
+
n(t(l.$t("common.back")), 1)
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
})
|
|
103
|
+
]),
|
|
104
|
+
default: e(() => [
|
|
105
|
+
d[0] || (d[0] = a("div", { class: "title-content" }, "基本信息", -1)),
|
|
106
|
+
i(y, {
|
|
107
|
+
class: "margin-top",
|
|
108
|
+
column: 2,
|
|
109
|
+
border: ""
|
|
110
|
+
}, {
|
|
111
|
+
default: e(() => [
|
|
112
|
+
i(u, null, {
|
|
113
|
+
label: e(() => [
|
|
114
|
+
a("div", te, t(l.$t("goodsSpu.spuName")), 1)
|
|
115
|
+
]),
|
|
116
|
+
default: e(() => [
|
|
117
|
+
n(" " + t(o.value.spuName), 1)
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
}),
|
|
121
|
+
i(u, null, {
|
|
122
|
+
label: e(() => [
|
|
123
|
+
a("div", se, t(l.$t("goodsSpu.spuCode")), 1)
|
|
124
|
+
]),
|
|
125
|
+
default: e(() => [
|
|
126
|
+
n(" " + t(o.value.spuCode), 1)
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}),
|
|
130
|
+
i(u, null, {
|
|
131
|
+
label: e(() => [
|
|
132
|
+
a("div", le, t(l.$t("goodsSpu.categoryId")), 1)
|
|
133
|
+
]),
|
|
134
|
+
default: e(() => [
|
|
135
|
+
(c(!0), L(V, null, D(o.value.categoryIds, (s) => (c(), f(m, {
|
|
136
|
+
type: "info",
|
|
137
|
+
key: s,
|
|
138
|
+
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
139
|
+
}, {
|
|
140
|
+
default: e(() => [
|
|
141
|
+
n(t(r(p).goodsCategoryListBizLayDict.getValue(s) || s), 1)
|
|
142
|
+
]),
|
|
143
|
+
_: 2
|
|
144
|
+
}, 1024))), 128))
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}),
|
|
148
|
+
i(u, null, {
|
|
149
|
+
label: e(() => [
|
|
150
|
+
a("div", oe, t(l.$t("goodsSpu.brandId")), 1)
|
|
151
|
+
]),
|
|
152
|
+
default: e(() => [
|
|
153
|
+
n(" " + t(r(p).brandListBizDict.getValue(o.value.brandId)), 1)
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}),
|
|
157
|
+
i(u, null, {
|
|
158
|
+
label: e(() => [
|
|
159
|
+
a("div", ue, t(l.$t("goodsSpu.labelIds")), 1)
|
|
160
|
+
]),
|
|
161
|
+
default: e(() => [
|
|
162
|
+
(c(!0), L(V, null, D(o.value.labelIds, (s) => (c(), f(m, {
|
|
163
|
+
type: "info",
|
|
164
|
+
key: s,
|
|
165
|
+
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
166
|
+
}, {
|
|
167
|
+
default: e(() => [
|
|
168
|
+
n(t(r(p).labelListBizDict.getValue(s) || s), 1)
|
|
169
|
+
]),
|
|
170
|
+
_: 2
|
|
171
|
+
}, 1024))), 128))
|
|
172
|
+
]),
|
|
173
|
+
_: 1
|
|
174
|
+
}),
|
|
175
|
+
i(u, null, {
|
|
176
|
+
label: e(() => [
|
|
177
|
+
a("div", ae, t(l.$t("goodsSpu.picUrls")), 1)
|
|
178
|
+
]),
|
|
179
|
+
default: e(() => [
|
|
180
|
+
(c(!0), L(V, null, D($.value, (s) => (c(), f(_, {
|
|
181
|
+
key: s,
|
|
182
|
+
src: r(w).imageUrl(s, 80, 80),
|
|
183
|
+
"preview-src-list": [r(w).imageUrl(s)],
|
|
184
|
+
"preview-teleported": "",
|
|
185
|
+
"hide-on-click-modal": "",
|
|
186
|
+
fit: "contain"
|
|
187
|
+
}, null, 8, ["src", "preview-src-list"]))), 128))
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
}),
|
|
191
|
+
i(u, null, {
|
|
192
|
+
label: e(() => [
|
|
193
|
+
a("div", ie, t(l.$t("goodsSpu.freightType")), 1)
|
|
194
|
+
]),
|
|
195
|
+
default: e(() => [
|
|
196
|
+
n(" " + t(r(p).freightTypeEnum.getEnumValue(
|
|
197
|
+
o.value.freightType
|
|
198
|
+
)), 1)
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}),
|
|
202
|
+
i(u, null, {
|
|
203
|
+
label: e(() => [
|
|
204
|
+
a("div", ne, t(l.$t("goodsSpu.freightAmount")), 1)
|
|
205
|
+
]),
|
|
206
|
+
default: e(() => [
|
|
207
|
+
n(" " + t(o.value.freightAmount), 1)
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}),
|
|
211
|
+
i(u, null, {
|
|
212
|
+
label: e(() => [
|
|
213
|
+
a("div", ce, t(l.$t("goodsSpu.shelf")), 1)
|
|
214
|
+
]),
|
|
215
|
+
default: e(() => [
|
|
216
|
+
n(" " + t(r(p).shelfDict.getValue(o.value.shelf)), 1)
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}),
|
|
220
|
+
i(u, null, {
|
|
221
|
+
label: e(() => [
|
|
222
|
+
a("div", de, t(l.$t("goodsSpu.saleNum")), 1)
|
|
223
|
+
]),
|
|
224
|
+
default: e(() => [
|
|
225
|
+
n(" " + t(o.value.saleNum), 1)
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}),
|
|
229
|
+
i(u, null, {
|
|
230
|
+
label: e(() => [
|
|
231
|
+
a("div", re, t(l.$t("goodsSpu.sellPoint")), 1)
|
|
232
|
+
]),
|
|
233
|
+
default: e(() => [
|
|
234
|
+
n(" " + t(o.value.sellPoint), 1)
|
|
235
|
+
]),
|
|
236
|
+
_: 1
|
|
237
|
+
}),
|
|
238
|
+
i(u, null, {
|
|
239
|
+
label: e(() => [
|
|
240
|
+
a("div", pe, t(l.$t("goodsSpu.ensureIds")), 1)
|
|
241
|
+
]),
|
|
242
|
+
default: e(() => [
|
|
243
|
+
a("div", me, [
|
|
244
|
+
(c(!0), L(V, null, D(o.value.ensureIds, (s) => (c(), f(m, {
|
|
245
|
+
type: "info",
|
|
246
|
+
key: s
|
|
247
|
+
}, {
|
|
248
|
+
default: e(() => [
|
|
249
|
+
n(t(r(p).goodsEnsureDict.getDictValue(s)), 1)
|
|
250
|
+
]),
|
|
251
|
+
_: 2
|
|
252
|
+
}, 1024))), 128))
|
|
253
|
+
])
|
|
254
|
+
]),
|
|
255
|
+
_: 1
|
|
256
|
+
})
|
|
257
|
+
]),
|
|
258
|
+
_: 1
|
|
259
|
+
}),
|
|
260
|
+
a("div", _e, " 商品规格(" + t(r(p).specTypeEnum.getEnumValue(o.value.specType)) + ") ", 1),
|
|
261
|
+
o.value.specType == r(T).SPEC_TYPE_VALUES.UNIFIED_SPEC ? (c(), f(y, {
|
|
262
|
+
key: 0,
|
|
263
|
+
class: "margin-top",
|
|
264
|
+
column: 2,
|
|
265
|
+
border: ""
|
|
266
|
+
}, {
|
|
267
|
+
default: e(() => [
|
|
268
|
+
i(u, null, {
|
|
269
|
+
label: e(() => [
|
|
270
|
+
a("div", fe, t(l.$t("goodsSpu.salePrice")), 1)
|
|
271
|
+
]),
|
|
272
|
+
default: e(() => {
|
|
273
|
+
var s;
|
|
274
|
+
return [
|
|
275
|
+
n(" " + t((s = o.value.skuList) == null ? void 0 : s.results[0].salePrice), 1)
|
|
276
|
+
];
|
|
277
|
+
}),
|
|
278
|
+
_: 1
|
|
279
|
+
}),
|
|
280
|
+
i(u, null, {
|
|
281
|
+
label: e(() => [
|
|
282
|
+
a("div", ge, t(l.$t("goodsSpu.marketPrice")), 1)
|
|
283
|
+
]),
|
|
284
|
+
default: e(() => {
|
|
285
|
+
var s;
|
|
286
|
+
return [
|
|
287
|
+
n(" " + t((s = o.value.skuList) == null ? void 0 : s.results[0].marketPrice), 1)
|
|
288
|
+
];
|
|
289
|
+
}),
|
|
290
|
+
_: 1
|
|
291
|
+
}),
|
|
292
|
+
i(u, null, {
|
|
293
|
+
label: e(() => [
|
|
294
|
+
a("div", ve, t(l.$t("goodsSpu.costPrice")), 1)
|
|
295
|
+
]),
|
|
296
|
+
default: e(() => {
|
|
297
|
+
var s;
|
|
298
|
+
return [
|
|
299
|
+
n(" " + t((s = o.value.skuList) == null ? void 0 : s.results[0].costPrice), 1)
|
|
300
|
+
];
|
|
301
|
+
}),
|
|
302
|
+
_: 1
|
|
303
|
+
}),
|
|
304
|
+
o.value.isPointsDeduct === !0 ? (c(), f(u, { key: 0 }, {
|
|
305
|
+
label: e(() => [
|
|
306
|
+
a("div", he, t(l.$t("goodsSpu.pointsDeduct")), 1)
|
|
307
|
+
]),
|
|
308
|
+
default: e(() => {
|
|
309
|
+
var s;
|
|
310
|
+
return [
|
|
311
|
+
n(" " + t((s = o.value.skuList) == null ? void 0 : s.results[0].pointsDeduct), 1)
|
|
312
|
+
];
|
|
313
|
+
}),
|
|
314
|
+
_: 1
|
|
315
|
+
})) : E("", !0),
|
|
316
|
+
o.value.presaleType === r(T).GOODS_PRESALE_TYPE_VALUES.DEPOSIT ? (c(), f(u, { key: 1 }, {
|
|
317
|
+
label: e(() => [
|
|
318
|
+
a("div", Se, t(l.$t("goodsSpu.earnestAmount")), 1)
|
|
319
|
+
]),
|
|
320
|
+
default: e(() => {
|
|
321
|
+
var s;
|
|
322
|
+
return [
|
|
323
|
+
n(" " + t((s = o.value.skuList) == null ? void 0 : s.results[0].earnestAmount), 1)
|
|
324
|
+
];
|
|
325
|
+
}),
|
|
326
|
+
_: 1
|
|
327
|
+
})) : E("", !0),
|
|
328
|
+
o.value.presaleType === r(T).GOODS_PRESALE_TYPE_VALUES.DEPOSIT_RETURN ? (c(), f(u, { key: 2 }, {
|
|
329
|
+
label: e(() => [
|
|
330
|
+
a("div", ye, t(l.$t("goodsSpu.depositAmount")), 1)
|
|
331
|
+
]),
|
|
332
|
+
default: e(() => {
|
|
333
|
+
var s;
|
|
334
|
+
return [
|
|
335
|
+
n(" " + t((s = o.value.skuList) == null ? void 0 : s.results[0].depositAmount), 1)
|
|
336
|
+
];
|
|
337
|
+
}),
|
|
338
|
+
_: 1
|
|
339
|
+
})) : E("", !0),
|
|
340
|
+
i(u, null, {
|
|
341
|
+
label: e(() => [
|
|
342
|
+
a("div", be, t(l.$t("goodsSpu.stock")), 1)
|
|
343
|
+
]),
|
|
344
|
+
default: e(() => {
|
|
345
|
+
var s;
|
|
346
|
+
return [
|
|
347
|
+
n(" " + t((s = o.value.skuList) == null ? void 0 : s.results[0].stock), 1)
|
|
348
|
+
];
|
|
349
|
+
}),
|
|
350
|
+
_: 1
|
|
351
|
+
})
|
|
352
|
+
]),
|
|
353
|
+
_: 1
|
|
354
|
+
})) : E("", !0),
|
|
355
|
+
h.value.length > 0 ? (c(), f(Q, {
|
|
356
|
+
key: 1,
|
|
357
|
+
specData: C.value,
|
|
358
|
+
goodsSku: A.value,
|
|
359
|
+
isSettingShow: !1
|
|
360
|
+
}, null, 8, ["specData", "goodsSku"])) : E("", !0),
|
|
361
|
+
d[1] || (d[1] = a("div", { class: "title-content" }, "商品描述", -1)),
|
|
362
|
+
a("div", {
|
|
363
|
+
class: "description-content",
|
|
364
|
+
innerHTML: o.value.description
|
|
365
|
+
}, null, 8, ke)
|
|
366
|
+
]),
|
|
367
|
+
_: 1,
|
|
368
|
+
__: [0, 1]
|
|
369
|
+
})
|
|
370
|
+
]);
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
}), Be = /* @__PURE__ */ X(Le, [["__scopeId", "data-v-adca63f1"]]);
|
|
374
|
+
export {
|
|
375
|
+
Be as default
|
|
376
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as M, ref as P, resolveComponent as
|
|
2
|
-
import { fileApi as
|
|
1
|
+
import { defineComponent as M, ref as P, resolveComponent as _, createElementBlock as v, openBlock as f, createVNode as o, withCtx as s, createElementVNode as d, createTextVNode as p, toDisplayString as u, Fragment as T, renderList as C, createBlock as L, unref as m } from "vue";
|
|
2
|
+
import { fileApi as b, routerUtil as R } from "jmash-core";
|
|
3
3
|
import { useRouter as j, useRoute as G } from "vue-router";
|
|
4
|
-
import { D as y
|
|
5
|
-
import {
|
|
4
|
+
import { D as y } from "./index-C61SQFSx.mjs";
|
|
5
|
+
import { C as U } from "./constant-sVd2JbJt.mjs";
|
|
6
|
+
import { a as D } from "./index-xQgC-8Gd.mjs";
|
|
6
7
|
import { specValueApi as H } from "xyvcard-shop";
|
|
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 },
|
|
8
|
+
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 }, _e = /* @__PURE__ */ M({
|
|
8
9
|
__name: "info",
|
|
9
10
|
setup(ue) {
|
|
10
|
-
const
|
|
11
|
+
const B = j(), S = G(), r = P({}), $ = P([]), A = P({}), E = P([]);
|
|
11
12
|
y.goodsCategoryListBizLayDict.useValues(), y.labelListBizDict.useValues(), y.goodsSpuBizDict.useValues();
|
|
12
13
|
const h = P([
|
|
13
14
|
{
|
|
@@ -21,11 +22,11 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
21
22
|
skuOptions: []
|
|
22
23
|
}
|
|
23
24
|
]);
|
|
24
|
-
|
|
25
|
+
S.query.spuId && (D.findById({ spuId: S.query.spuId }).then(({ data: e }) => {
|
|
25
26
|
var l;
|
|
26
27
|
r.value = Object.assign(r, e), $.value = (l = e.picUrls) == null ? void 0 : l.split(",");
|
|
27
|
-
}),
|
|
28
|
-
if (r.value.specType ===
|
|
28
|
+
}), D.findGroupList({ goodsId: S.query.spuId }).then(({ data: e }) => {
|
|
29
|
+
if (r.value.specType === U.SPEC_TYPE_VALUES.UNIFIED_SPEC) {
|
|
29
30
|
e.results.forEach((l) => {
|
|
30
31
|
l.specType = r.value.specType;
|
|
31
32
|
}), h.value = e.results;
|
|
@@ -43,37 +44,37 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
43
44
|
specType: "",
|
|
44
45
|
skuOptions: []
|
|
45
46
|
};
|
|
46
|
-
return await
|
|
47
|
+
return await O(t.spuId, i), i.saleNum = t.saleNum || 0, i.salePrice = t.salePrice || 0, i.specType === U.SPEC_TYPE_VALUES.MULTI_SPEC && t.skuId && (i.skuId = t.skuId || "", i.salePrice = t.salePrice || 0, i.saleNum = t.saleNum || 0, i.picUrl = t.picUrl || "", z(t.skuId)), i;
|
|
47
48
|
});
|
|
48
49
|
Promise.all(l).then((t) => {
|
|
49
50
|
console.log(t), h.value = t;
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
}));
|
|
53
|
-
async function
|
|
54
|
+
async function O(e, l) {
|
|
54
55
|
var t, i, k;
|
|
55
56
|
if (l.skuId = "", l.skuOptions = [], l.picUrl = "", l.salePrice = 0, l.saleNum = 0, !e) {
|
|
56
57
|
l.skuId = "", l.picUrl = "", l.salePrice = 0, l.saleNum = 0, l.skuOptions = [];
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
59
60
|
try {
|
|
60
|
-
const { data: n } = await
|
|
61
|
-
if (l.specType = n.specType, l.specType ===
|
|
61
|
+
const { data: n } = await D.findById({ spuId: e });
|
|
62
|
+
if (l.specType = n.specType, l.specType === U.SPEC_TYPE_VALUES.UNIFIED_SPEC && (l.picUrl = n.picUrls ? n.picUrls.split(",")[0] : "", l.salePrice = (t = n.skuList) == null ? void 0 : t.results[0].salePrice, l.saleNum = (i = n.skuList) == null ? void 0 : i.results[0].stock, l.skuId = (k = n.skuList) == null ? void 0 : k.results[0].skuId), l.specType === U.SPEC_TYPE_VALUES.MULTI_SPEC && n.skuList) {
|
|
62
63
|
const I = n.skuList.results, g = I.map((c) => c.specValues && Array.isArray(c.specValues) ? c.specValues.map(
|
|
63
64
|
(a) => a.specValueId
|
|
64
|
-
) : []),
|
|
65
|
-
await Promise.all(
|
|
66
|
-
const
|
|
67
|
-
(c) => c.map((a) =>
|
|
65
|
+
) : []), N = g.flat().map((c) => Y(c));
|
|
66
|
+
await Promise.all(N);
|
|
67
|
+
const V = g.map(
|
|
68
|
+
(c) => c.map((a) => E.value[a] || a)
|
|
68
69
|
);
|
|
69
70
|
l.skuOptions = I.map((c, a) => ({
|
|
70
71
|
key: c.skuId,
|
|
71
|
-
value:
|
|
72
|
+
value: V[a].join(" "),
|
|
72
73
|
picUrl: c.picUrl || (n.picUrls ? n.picUrls.split(",")[0] : ""),
|
|
73
74
|
salePrice: c.salePrice,
|
|
74
75
|
stock: c.stock
|
|
75
76
|
})), I.forEach((c) => {
|
|
76
|
-
c.skuId && (
|
|
77
|
+
c.skuId && (A.value[c.skuId] = {
|
|
77
78
|
...c,
|
|
78
79
|
spuPicUrls: n.picUrls
|
|
79
80
|
});
|
|
@@ -85,7 +86,7 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
85
86
|
function z(e) {
|
|
86
87
|
const l = h.value.find((t) => t.skuId === e);
|
|
87
88
|
if (l && e) {
|
|
88
|
-
const t =
|
|
89
|
+
const t = A.value[e];
|
|
89
90
|
if (t) {
|
|
90
91
|
const i = t.spuPicUrls ? t.spuPicUrls.split(",")[0] : "";
|
|
91
92
|
l.picUrl = t.picUrl || i, l.salePrice = t.salePrice, l.saleNum = t.stock;
|
|
@@ -93,12 +94,12 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
async function Y(e) {
|
|
96
|
-
if (!
|
|
97
|
+
if (!E.value[e])
|
|
97
98
|
try {
|
|
98
99
|
const { data: l } = await H.findById({
|
|
99
100
|
specValueId: e
|
|
100
101
|
});
|
|
101
|
-
return
|
|
102
|
+
return E.value[e] = l.valueName, l.valueName;
|
|
102
103
|
} catch {
|
|
103
104
|
}
|
|
104
105
|
}
|
|
@@ -111,11 +112,11 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
111
112
|
return l ? l.value : "";
|
|
112
113
|
}
|
|
113
114
|
function q() {
|
|
114
|
-
R.closeTagView(
|
|
115
|
+
R.closeTagView(S.fullPath, B, !1);
|
|
115
116
|
}
|
|
116
117
|
return (e, l) => {
|
|
117
|
-
const t =
|
|
118
|
-
return
|
|
118
|
+
const t = _("el-button"), i = _("el-descriptions-item"), k = _("el-tag"), n = _("el-image"), I = _("el-descriptions"), g = _("el-table-column"), N = _("el-table"), V = _("el-row"), c = _("el-card");
|
|
119
|
+
return f(), v("div", J, [
|
|
119
120
|
o(c, { shadow: "never" }, {
|
|
120
121
|
header: s(() => [
|
|
121
122
|
o(t, {
|
|
@@ -159,7 +160,7 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
159
160
|
d("div", W, u(e.$t("goodsSpu.categoryId")), 1)
|
|
160
161
|
]),
|
|
161
162
|
default: s(() => [
|
|
162
|
-
(
|
|
163
|
+
(f(!0), v(T, null, C(r.value.categoryIds, (a) => (f(), L(k, {
|
|
163
164
|
type: "info",
|
|
164
165
|
key: a,
|
|
165
166
|
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
@@ -224,10 +225,10 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
224
225
|
d("div", le, u(e.$t("goodsSpu.picUrls")), 1)
|
|
225
226
|
]),
|
|
226
227
|
default: s(() => [
|
|
227
|
-
(
|
|
228
|
+
(f(!0), v(T, null, C($.value, (a) => (f(), L(n, {
|
|
228
229
|
key: a,
|
|
229
|
-
src: m(
|
|
230
|
-
"preview-src-list": [m(
|
|
230
|
+
src: m(b).imageUrl(a, 80, 80),
|
|
231
|
+
"preview-src-list": [m(b).imageUrl(a)],
|
|
231
232
|
"preview-teleported": "",
|
|
232
233
|
"hide-on-click-modal": "",
|
|
233
234
|
fit: "contain"
|
|
@@ -249,7 +250,7 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
249
250
|
d("div", te, u(e.$t("goodsSpu.labelIds")), 1)
|
|
250
251
|
]),
|
|
251
252
|
default: s(() => [
|
|
252
|
-
(
|
|
253
|
+
(f(!0), v(T, null, C(r.value.labelIds, (a) => (f(), L(k, {
|
|
253
254
|
type: "info",
|
|
254
255
|
key: a,
|
|
255
256
|
style: { "margin-right": "8px", "margin-bottom": "4px" }
|
|
@@ -266,9 +267,9 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
266
267
|
_: 1
|
|
267
268
|
}),
|
|
268
269
|
l[1] || (l[1] = d("div", { class: "title-content" }, "套装商品", -1)),
|
|
269
|
-
o(
|
|
270
|
+
o(V, null, {
|
|
270
271
|
default: s(() => [
|
|
271
|
-
o(
|
|
272
|
+
o(N, {
|
|
272
273
|
data: h.value,
|
|
273
274
|
border: "",
|
|
274
275
|
style: { width: "100%" }
|
|
@@ -289,7 +290,7 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
289
290
|
"header-align": "center"
|
|
290
291
|
}, {
|
|
291
292
|
default: s(({ row: a }) => [
|
|
292
|
-
a.specType === m(
|
|
293
|
+
a.specType === m(U).SPEC_TYPE_VALUES.UNIFIED_SPEC ? (f(), v("span", ae, " 统一规格 ")) : (f(), v("span", ie, u(F(a)), 1))
|
|
293
294
|
]),
|
|
294
295
|
_: 1
|
|
295
296
|
}, 8, ["label"]),
|
|
@@ -301,8 +302,8 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
301
302
|
}, {
|
|
302
303
|
default: s(({ row: a }) => [
|
|
303
304
|
o(n, {
|
|
304
|
-
src: m(
|
|
305
|
-
"preview-src-list": [m(
|
|
305
|
+
src: m(b).imageUrl(a.picUrl, 80, 80),
|
|
306
|
+
"preview-src-list": [m(b).imageUrl(a.picUrl)],
|
|
306
307
|
"preview-teleported": "",
|
|
307
308
|
"hide-on-click-modal": "",
|
|
308
309
|
fit: "contain"
|
|
@@ -345,5 +346,5 @@ const J = { class: "app-container" }, K = { class: "cell-item" }, Q = { class: "
|
|
|
345
346
|
}
|
|
346
347
|
});
|
|
347
348
|
export {
|
|
348
|
-
|
|
349
|
+
_e as default
|
|
349
350
|
};
|