xyvcard-goods 0.0.21 → 0.0.23
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 +93 -0
- package/dist/{edit-DFc_TNP3.mjs → edit-9jPSycsG.mjs} +148 -212
- package/dist/edit-CJpoa4Ck.mjs +368 -0
- package/dist/{edit-DxnsmaXV.mjs → edit-CWQMgvVP.mjs} +38 -38
- package/dist/{edit-CkR-I5aJ.mjs → edit-DU-BEAcq.mjs} +1 -1
- package/dist/{edit-BcokSKfN.mjs → edit-Ziwv43v0.mjs} +27 -27
- package/dist/edit.vue_vue_type_script_setup_true_lang-BP0C4d2-.mjs +24173 -0
- package/dist/{goodsList-HmPAwD_C.mjs → goodsList-2AwsJVoO.mjs} +1 -1
- package/dist/{goodsList-TX2ZnRR9.mjs → goodsList-CyWliLjg.mjs} +1 -1
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CGV1dm3W.mjs → goodsList.vue_vue_type_script_setup_true_lang-Bq06GIMe.mjs} +2 -2
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-f1Fc6pbd.mjs → goodsList.vue_vue_type_script_setup_true_lang-DjKzEAB7.mjs} +136 -147
- package/dist/{index-B0SXNsHW.mjs → index-8E7BciYp.mjs} +7 -7
- package/dist/{index-Dt3PP8dN.mjs → index-B1H5hqEi.mjs} +2 -2
- package/dist/{index-BZw9XfQo.mjs → index-B88acg0Q.mjs} +2 -2
- package/dist/{index-VFsDup14.mjs → index-BdP_dXBK.mjs} +3 -3
- package/dist/index-C7oatDPl.mjs +4432 -0
- package/dist/{index-Ctva-XF0.mjs → index-DPjR32Kv.mjs} +3 -3
- package/dist/{index-r0u-27m7.mjs → index-DR3Gk44r.mjs} +1 -1
- package/dist/index-jCpYt-EU.mjs +221 -0
- package/dist/index.mjs +6 -2864
- package/dist/info-BEMxnD6-.mjs +325 -0
- package/dist/{info-BTKv0IRt.mjs → info-DFIeVs66.mjs} +3 -3
- package/dist/{skuForm-C7rF2noo.mjs → skuForm-BhAbf2AG.mjs} +2 -2
- package/dist/skuForm-C2aQcL90.mjs +314 -0
- package/dist/{skuTable-CEwT-I1Q.mjs → skuTable-9JJqGeRx.mjs} +255 -208
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +3 -0
- package/dts/api/goods-spu/index.d.ts +4 -1
- package/dts/api/goods-spu/types.d.ts +28 -0
- package/dts/api/index.d.ts +2 -1
- package/dts/index.d.ts +4 -0
- package/dts/lang/goods/zh-cn.d.ts +5 -1
- package/dts/router/index.d.ts +1 -0
- package/dts/views/goods/goods-combination/skuForm.vue.d.ts +0 -9
- package/package.json +3 -2
- package/dist/edit-tCGa_9Kt.mjs +0 -507
- package/dist/edit.vue_vue_type_script_setup_true_lang-BlNwikUO.mjs +0 -234
- package/dist/index-CqOoZ5xQ.mjs +0 -305
- package/dist/index-DR7GlHNd.mjs +0 -1288
- package/dist/index-jTDhsbYM.mjs +0 -141
- package/dist/info-CrghLmS4.mjs +0 -365
- package/dist/sku-B-IzfYLq.mjs +0 -52
- package/dist/skuForm-D2n8sQJo.mjs +0 -475
- package/dist/skuTable-D-awlXgj.mjs +0 -592
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as Y, ref as L, reactive as R, onActivated as Z, resolveComponent as s, resolveDirective as x, openBlock as u, createElementBlock as V, createElementVNode as $, createVNode as l, withCtx as t, withKeys as ee, unref as n, createTextVNode as p, toDisplayString as c, withDirectives as k, createBlock as C, isRef as D, createCommentVNode as S } from "vue";
|
|
2
2
|
import { useTableHooks as oe } from "jmash-core";
|
|
3
3
|
import { useI18n as le } from "vue-i18n";
|
|
4
|
-
import {
|
|
5
|
-
import ae from "./edit-
|
|
6
|
-
import { D as ne } from "./index-
|
|
4
|
+
import { b as te } from "./index-C7oatDPl.mjs";
|
|
5
|
+
import ae from "./edit-Ziwv43v0.mjs";
|
|
6
|
+
import { D as ne } from "./index-jCpYt-EU.mjs";
|
|
7
7
|
const se = { class: "app-container" }, de = { class: "search-container" }, ie = ["onClick"], re = ["onClick"], ve = /* @__PURE__ */ Y({
|
|
8
8
|
__name: "index",
|
|
9
9
|
setup(ue) {
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var E = (u, e, t) => e in u ? S(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
|
3
|
+
var s = (u, e, t) => E(u, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { BizDict as o, BizLayDict as L, EnumDict as n } from "jmash-core";
|
|
5
|
+
import { EntryDict as v } from "jmash-dict";
|
|
6
|
+
import { ref as h, reactive as _ } from "vue";
|
|
7
|
+
import { specValueApi as y, infoApi as P, specInfoApi as A } from "xyvcard-shop";
|
|
8
|
+
import { g as O, b as f, a as g } from "./index-C7oatDPl.mjs";
|
|
9
|
+
import { g as m } from "./index-DR3Gk44r.mjs";
|
|
10
|
+
class a {
|
|
11
|
+
}
|
|
12
|
+
// 模块
|
|
13
|
+
s(a, "MODULE_GOODS", "goods"), // 商品规格类型
|
|
14
|
+
s(a, "SPEC_TYPE", {
|
|
15
|
+
UNIFIED_SPEC: "UNIFIED_SPEC",
|
|
16
|
+
//统一规格
|
|
17
|
+
MULTI_SPEC: "MULTI_SPEC"
|
|
18
|
+
//多规格
|
|
19
|
+
}), // 启用禁用
|
|
20
|
+
s(a, "SHELF_VALUES", h([
|
|
21
|
+
{ key: !0, value: "上架" },
|
|
22
|
+
{ key: !1, value: "下架" }
|
|
23
|
+
])), // 运费类型
|
|
24
|
+
s(a, "ENUM_FREIGHT_TYPE", "xyvcard.goods.protobuf.FreightType"), // 保障服务
|
|
25
|
+
s(a, "DICT_GOODS_ENSURE", "goods_ensure"), // 规格类型
|
|
26
|
+
s(a, "ENUM_SPEC_TYPE", "xyvcard.goods.protobuf.SpecType"), // 商品查询枚举
|
|
27
|
+
s(a, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"), // 审核状态
|
|
28
|
+
s(a, "ENUM_APPROVAL_STATUS", "xyvcard.goods.protobuf.ApprovalStatus"), // 审核状态常量
|
|
29
|
+
s(a, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(a, "APPROVAL_PASS", "APPROVAL_PASS"), s(a, "APPROVALING", "APPROVALING"), // 启用禁用
|
|
30
|
+
s(a, "ENABLE_VALUES", h([
|
|
31
|
+
{ key: "true", value: "启用" },
|
|
32
|
+
{ key: "false", value: "禁用" }
|
|
33
|
+
])), // 商品类型
|
|
34
|
+
s(a, "GOODS_TYPE", {
|
|
35
|
+
NORMAL: "normal",
|
|
36
|
+
GROUP: "group"
|
|
37
|
+
});
|
|
38
|
+
function d(u, e, t) {
|
|
39
|
+
return !Array.isArray(u) || u.length === 0 ? [] : u.map((r) => {
|
|
40
|
+
let i = [];
|
|
41
|
+
return Array.isArray(r.children) && r.children.length > 0 && (i = d(r.children, e, t)), {
|
|
42
|
+
value: r[t],
|
|
43
|
+
label: r[e],
|
|
44
|
+
parentId: r.parentId,
|
|
45
|
+
children: i
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
class p {
|
|
50
|
+
constructor(e, t) {
|
|
51
|
+
s(this, "values", _([]));
|
|
52
|
+
// 查询条件
|
|
53
|
+
s(this, "query");
|
|
54
|
+
this.values.length = 0, this.values.push(...e.value), this.query = t;
|
|
55
|
+
}
|
|
56
|
+
// 根据给定键获取业务数据项的值的方法
|
|
57
|
+
getValue(e) {
|
|
58
|
+
for (const t of this.values)
|
|
59
|
+
if (t.key == e)
|
|
60
|
+
return t.value;
|
|
61
|
+
return "";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
class D extends o {
|
|
65
|
+
// 实现 useValues 方法
|
|
66
|
+
useValues() {
|
|
67
|
+
return new Promise((e, t) => {
|
|
68
|
+
P.findList(this.query).then(({ data: l }) => {
|
|
69
|
+
const r = l.results;
|
|
70
|
+
this.values.length = 0, this.values.push(
|
|
71
|
+
...r.map(
|
|
72
|
+
(i) => ({
|
|
73
|
+
key: i.shopId,
|
|
74
|
+
value: i.shopName
|
|
75
|
+
})
|
|
76
|
+
)
|
|
77
|
+
), e(this.values);
|
|
78
|
+
}).catch(t);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
class U extends L {
|
|
83
|
+
// 实现 useValues 方法
|
|
84
|
+
useValues() {
|
|
85
|
+
return new Promise((e, t) => {
|
|
86
|
+
O.findTreeListApi(this.query).then(({ data: l }) => {
|
|
87
|
+
this.values.length = 0, this.values.push(...d(l.results, "label", "value")), e(this.values);
|
|
88
|
+
}).catch(t);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
class I extends o {
|
|
93
|
+
// 实现 useValues 方法
|
|
94
|
+
useValues() {
|
|
95
|
+
return new Promise((e, t) => {
|
|
96
|
+
A.findList(this.query).then(({ data: l }) => {
|
|
97
|
+
const r = l.results;
|
|
98
|
+
this.values.length = 0, this.values.push(
|
|
99
|
+
...r.map(
|
|
100
|
+
(i) => ({
|
|
101
|
+
key: i.specId,
|
|
102
|
+
value: i.specName,
|
|
103
|
+
disabled: i.disabled
|
|
104
|
+
})
|
|
105
|
+
)
|
|
106
|
+
), e(this.values);
|
|
107
|
+
}).catch(t);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
class N extends o {
|
|
112
|
+
// 实现 useValues 方法
|
|
113
|
+
useValues() {
|
|
114
|
+
return new Promise((e, t) => {
|
|
115
|
+
y.findList(this.query).then(({ data: l }) => {
|
|
116
|
+
const r = l.results;
|
|
117
|
+
this.values.length = 0, this.values.push(
|
|
118
|
+
...r.map(
|
|
119
|
+
(i) => ({
|
|
120
|
+
key: i.specValueId,
|
|
121
|
+
value: i.valueName
|
|
122
|
+
})
|
|
123
|
+
)
|
|
124
|
+
), e(this.values);
|
|
125
|
+
}).catch(t);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
class T extends o {
|
|
130
|
+
// 实现 useValues 方法
|
|
131
|
+
useValues() {
|
|
132
|
+
return new Promise((e, t) => {
|
|
133
|
+
m.findList(this.query).then(({ data: l }) => {
|
|
134
|
+
const r = l.results;
|
|
135
|
+
this.values.length = 0, this.values.push(
|
|
136
|
+
...r.map(
|
|
137
|
+
(i) => ({
|
|
138
|
+
key: i.brandId,
|
|
139
|
+
value: i.brandName
|
|
140
|
+
})
|
|
141
|
+
)
|
|
142
|
+
), e(this.values);
|
|
143
|
+
}).catch(t);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
class V extends o {
|
|
148
|
+
// 实现 useValues 方法
|
|
149
|
+
useValues() {
|
|
150
|
+
return new Promise((e, t) => {
|
|
151
|
+
f.findList(this.query).then(({ data: l }) => {
|
|
152
|
+
const r = l.results;
|
|
153
|
+
this.values.length = 0, this.values.push(
|
|
154
|
+
...r.map(
|
|
155
|
+
(i) => ({
|
|
156
|
+
key: i.labelId,
|
|
157
|
+
value: i.labelName
|
|
158
|
+
})
|
|
159
|
+
)
|
|
160
|
+
), e(this.values);
|
|
161
|
+
}).catch(t);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
class w extends o {
|
|
166
|
+
// 实现 useValues 方法
|
|
167
|
+
useValues() {
|
|
168
|
+
return new Promise((e, t) => {
|
|
169
|
+
g.findList(this.query).then(({ data: l }) => {
|
|
170
|
+
const r = l.results;
|
|
171
|
+
this.values.length = 0, this.values.push(
|
|
172
|
+
...r.map(
|
|
173
|
+
(i) => ({
|
|
174
|
+
key: i.spuId,
|
|
175
|
+
value: i.spuName
|
|
176
|
+
})
|
|
177
|
+
)
|
|
178
|
+
), e(this.values);
|
|
179
|
+
}).catch(t);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
class c {
|
|
184
|
+
}
|
|
185
|
+
// 店铺列表
|
|
186
|
+
s(c, "shopInfoBizDict", new D({})), // 商品分类
|
|
187
|
+
// static readonly goodsCategoryDict = new GoodsCategoryBizLayDict({});
|
|
188
|
+
// 规格列表
|
|
189
|
+
s(c, "specInfoDict", new I({})), // 规格值
|
|
190
|
+
s(c, "specValueDict", new N({})), // 上架下架
|
|
191
|
+
s(c, "shelfDict", new p(a.SHELF_VALUES, {})), // 运费类型
|
|
192
|
+
s(c, "freightTypeEnum", new n(
|
|
193
|
+
a.MODULE_GOODS,
|
|
194
|
+
a.ENUM_FREIGHT_TYPE
|
|
195
|
+
)), // 保障服务
|
|
196
|
+
s(c, "goodsEnsureDict", new v(a.DICT_GOODS_ENSURE)), // 规格类型
|
|
197
|
+
s(c, "specTypeEnum", new n(
|
|
198
|
+
a.MODULE_GOODS,
|
|
199
|
+
a.ENUM_SPEC_TYPE
|
|
200
|
+
)), // 商品查询枚举
|
|
201
|
+
s(c, "goodsSpuListSortEnum", new n(
|
|
202
|
+
a.MODULE_GOODS,
|
|
203
|
+
a.ENUM_GOODS_SPU_List_SORT
|
|
204
|
+
)), // 审核状态
|
|
205
|
+
s(c, "approvalStatusEnum", new n(
|
|
206
|
+
a.MODULE_GOODS,
|
|
207
|
+
a.ENUM_APPROVAL_STATUS
|
|
208
|
+
)), // 启用禁用
|
|
209
|
+
s(c, "enableDict", new p(a.ENABLE_VALUES, {})), // 商品分类
|
|
210
|
+
s(c, "goodsCategoryListBizLayDict", new U(
|
|
211
|
+
{}
|
|
212
|
+
)), // 品牌列表
|
|
213
|
+
s(c, "brandListBizDict", new T({})), // 标签列表
|
|
214
|
+
s(c, "labelListBizDict", new V({})), // 商品列表
|
|
215
|
+
s(c, "goodsSpuBizDict", new w({}));
|
|
216
|
+
export {
|
|
217
|
+
a as C,
|
|
218
|
+
c as D,
|
|
219
|
+
N as S,
|
|
220
|
+
I as a
|
|
221
|
+
};
|