xyvcard-goods 0.0.22 → 0.0.24

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.
Files changed (38) hide show
  1. package/dist/{edit-Nuaz9WSB.mjs → edit-9jPSycsG.mjs} +185 -165
  2. package/dist/{edit-exVf8d8b.mjs → edit-CJpoa4Ck.mjs} +69 -68
  3. package/dist/{edit-DxnsmaXV.mjs → edit-CWQMgvVP.mjs} +38 -38
  4. package/dist/{edit-Byv9oYAC.mjs → edit-DU-BEAcq.mjs} +1 -1
  5. package/dist/{edit-BcokSKfN.mjs → edit-Ziwv43v0.mjs} +27 -27
  6. package/dist/{edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs → edit.vue_vue_type_script_setup_true_lang-BP0C4d2-.mjs} +8 -7
  7. package/dist/{goodsList-CZUqc4nm.mjs → goodsList-2AwsJVoO.mjs} +1 -1
  8. package/dist/{goodsList-IWDAvKOx.mjs → goodsList-CyWliLjg.mjs} +1 -1
  9. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs → goodsList.vue_vue_type_script_setup_true_lang-Bq06GIMe.mjs} +2 -2
  10. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs → goodsList.vue_vue_type_script_setup_true_lang-DjKzEAB7.mjs} +136 -147
  11. package/dist/{index-4i7TnWvV.mjs → index-8E7BciYp.mjs} +7 -6
  12. package/dist/{index-BVGn6Q_T.mjs → index-B1H5hqEi.mjs} +2 -2
  13. package/dist/{index-B_U2s9fI.mjs → index-B88acg0Q.mjs} +2 -2
  14. package/dist/{index-_xxSoBUe.mjs → index-BdP_dXBK.mjs} +3 -3
  15. package/dist/index-C7oatDPl.mjs +4432 -0
  16. package/dist/{index-CQIttgns.mjs → index-DPjR32Kv.mjs} +3 -3
  17. package/dist/{index-r0u-27m7.mjs → index-DR3Gk44r.mjs} +1 -1
  18. package/dist/index-jCpYt-EU.mjs +221 -0
  19. package/dist/index.mjs +6 -2875
  20. package/dist/info-BEMxnD6-.mjs +325 -0
  21. package/dist/{info-BQaaTFry.mjs → info-DFIeVs66.mjs} +3 -3
  22. package/dist/{skuForm-CgjMd46J.mjs → skuForm-BhAbf2AG.mjs} +16 -16
  23. package/dist/skuForm-C2aQcL90.mjs +314 -0
  24. package/dist/{skuTable-CyGQuTvR.mjs → skuTable-9JJqGeRx.mjs} +255 -208
  25. package/dist/style.css +1 -1
  26. package/dts/api/goods-category/types.d.ts +2 -0
  27. package/dts/api/goods-spu/index.d.ts +3 -1
  28. package/dts/api/goods-spu/types.d.ts +12 -1
  29. package/dts/index.d.ts +4 -0
  30. package/dts/router/index.d.ts +1 -0
  31. package/package.json +1 -1
  32. package/dist/index-DR7GlHNd.mjs +0 -1288
  33. package/dist/index-Dvaotk7B.mjs +0 -325
  34. package/dist/index-jTDhsbYM.mjs +0 -141
  35. package/dist/info-BH4MW3Sw.mjs +0 -365
  36. package/dist/sku-B-IzfYLq.mjs +0 -52
  37. package/dist/skuForm-AMIoZkH-.mjs +0 -287
  38. package/dist/skuTable-DDWSmvoz.mjs +0 -592
@@ -1,325 +0,0 @@
1
- var _ = Object.defineProperty;
2
- var m = (i, e, t) => e in i ? _(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var s = (i, e, t) => m(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { useUserStore as l, clearEmpty as c, request as d, BizDict as h, BizLayDict as y, EnumDict as p } from "jmash-core";
5
- import { EntryDict as E } from "jmash-dict";
6
- import { ref as g, reactive as L } from "vue";
7
- import { specValueApi as A, infoApi as P, specInfoApi as f } from "xyvcard-shop";
8
- import { g as O } from "./index-r0u-27m7.mjs";
9
- import { g as I } from "./index-jTDhsbYM.mjs";
10
- import { goodsSpuApi as D } from "./index.mjs";
11
- class r {
12
- }
13
- // 模块
14
- s(r, "MODULE_GOODS", "goods"), // 商品规格类型
15
- s(r, "SPEC_TYPE", {
16
- UNIFIED_SPEC: "UNIFIED_SPEC",
17
- //统一规格
18
- MULTI_SPEC: "MULTI_SPEC"
19
- //多规格
20
- }), // 启用禁用
21
- s(r, "SHELF_VALUES", g([
22
- { key: !0, value: "上架" },
23
- { key: !1, value: "下架" }
24
- ])), // 运费类型
25
- s(r, "ENUM_FREIGHT_TYPE", "xyvcard.goods.protobuf.FreightType"), // 保障服务
26
- s(r, "DICT_GOODS_ENSURE", "goods_ensure"), // 规格类型
27
- s(r, "ENUM_SPEC_TYPE", "xyvcard.goods.protobuf.SpecType"), // 商品查询枚举
28
- s(r, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"), // 审核状态
29
- s(r, "ENUM_APPROVAL_STATUS", "xyvcard.goods.protobuf.ApprovalStatus"), // 审核状态常量
30
- s(r, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(r, "APPROVAL_PASS", "APPROVAL_PASS"), s(r, "APPROVALING", "APPROVALING"), // 启用禁用
31
- s(r, "ENABLE_VALUES", g([
32
- { key: "true", value: "启用" },
33
- { key: "false", value: "禁用" }
34
- ])), // 商品类型
35
- s(r, "GOODS_TYPE", {
36
- NORMAL: "normal",
37
- GROUP: "group"
38
- });
39
- class U {
40
- getKey(e) {
41
- return {
42
- categoryId: e.categoryId
43
- };
44
- }
45
- // 查询翻页信息商城商品分类
46
- findPage(e) {
47
- const t = l().user.tenant;
48
- return e && (e.hasStatus = e.status != null), c(e), d({
49
- url: "/v1/goods/goods_category/list/" + t,
50
- method: "get",
51
- params: e
52
- });
53
- }
54
- // 查询列表信息商城商品分类
55
- findList(e) {
56
- const t = l().user.tenant;
57
- return c(e), d({
58
- url: "/v1/goods/goods_category/list/" + t,
59
- method: "get",
60
- params: e
61
- });
62
- }
63
- // 查询商城商品分类
64
- findById(e) {
65
- const t = l().user.tenant;
66
- return c(e), d({
67
- url: "/v1/goods/goods_category/id/" + t + "/" + e.categoryId,
68
- method: "get"
69
- });
70
- }
71
- // 创建实体商城商品分类
72
- create(e) {
73
- return e.tenant = l().user.tenant, c(e), d({
74
- url: "/v1/goods/goods_category",
75
- method: "post",
76
- data: e
77
- });
78
- }
79
- // 修改实体商城商品分类
80
- update(e) {
81
- return e.tenant = l().user.tenant, c(e), d({
82
- url: "/v1/goods/goods_category",
83
- method: "patch",
84
- data: e
85
- });
86
- }
87
- // 上移下移
88
- move(e, t) {
89
- const a = { ...e };
90
- return a.tenant = l().user.tenant, a.up = t, c(a), d({
91
- url: "/v1/goods/goods_category/move",
92
- method: "put",
93
- data: a
94
- });
95
- }
96
- // 启用/禁用
97
- enable(e, t) {
98
- const a = { ...e };
99
- return a.tenant = l().user.tenant, a.enable = t, c(a), d({
100
- url: "/v1/goods/goods_category/enable",
101
- method: "put",
102
- data: a
103
- });
104
- }
105
- // 删除商城商品分类
106
- delete(e) {
107
- return e.tenant = l().user.tenant, c(e), d({
108
- url: "/v1/goods/goods_category/id",
109
- method: "delete",
110
- params: e
111
- });
112
- }
113
- // 批量删除商城商品分类
114
- batchDelete(e) {
115
- const t = e.map((u) => u.categoryId), a = {
116
- tenant: l().user.tenant,
117
- categoryId: t
118
- };
119
- return c(a), d({
120
- url: "/v1/goods/goods_category/batch",
121
- method: "put",
122
- data: a
123
- });
124
- }
125
- /**
126
- * 查询商品树列表的API接口
127
- *
128
- * @param query 可选的查询参数,符合GoodsCategoryReq接口的实例
129
- * @returns 返回一个AxiosPromise,包含GoodsCategoryTree类型的响应数据
130
- */
131
- findTreeListApi(e) {
132
- const t = l().user.tenant;
133
- return c(e), d({
134
- url: "/v1/goods/goods_category/treelist/" + t,
135
- method: "get",
136
- params: e
137
- });
138
- }
139
- }
140
- const T = new U();
141
- function S(i, e, t) {
142
- return !Array.isArray(i) || i.length === 0 ? [] : i.map((u) => {
143
- let o = [];
144
- return Array.isArray(u.children) && u.children.length > 0 && (o = S(u.children, e, t)), {
145
- value: u[t],
146
- label: u[e],
147
- parentId: u.parentId,
148
- children: o
149
- };
150
- });
151
- }
152
- class v {
153
- constructor(e, t) {
154
- s(this, "values", L([]));
155
- // 查询条件
156
- s(this, "query");
157
- this.values.length = 0, this.values.push(...e.value), this.query = t;
158
- }
159
- // 根据给定键获取业务数据项的值的方法
160
- getValue(e) {
161
- for (const t of this.values)
162
- if (t.key == e)
163
- return t.value;
164
- return "";
165
- }
166
- }
167
- class N extends h {
168
- // 实现 useValues 方法
169
- useValues() {
170
- return new Promise((e, t) => {
171
- P.findList(this.query).then(({ data: a }) => {
172
- const u = a.results;
173
- this.values.length = 0, this.values.push(
174
- ...u.map(
175
- (o) => ({
176
- key: o.shopId,
177
- value: o.shopName
178
- })
179
- )
180
- ), e(this.values);
181
- }).catch(t);
182
- });
183
- }
184
- }
185
- class V extends y {
186
- // 实现 useValues 方法
187
- useValues() {
188
- return new Promise((e, t) => {
189
- T.findTreeListApi(this.query).then(({ data: a }) => {
190
- this.values.length = 0, this.values.push(...S(a.results, "label", "value")), e(this.values);
191
- }).catch(t);
192
- });
193
- }
194
- }
195
- class b extends h {
196
- // 实现 useValues 方法
197
- useValues() {
198
- return new Promise((e, t) => {
199
- f.findList(this.query).then(({ data: a }) => {
200
- const u = a.results;
201
- this.values.length = 0, this.values.push(
202
- ...u.map(
203
- (o) => ({
204
- key: o.specId,
205
- value: o.specName,
206
- disabled: o.disabled
207
- })
208
- )
209
- ), e(this.values);
210
- }).catch(t);
211
- });
212
- }
213
- }
214
- class w extends h {
215
- // 实现 useValues 方法
216
- useValues() {
217
- return new Promise((e, t) => {
218
- A.findList(this.query).then(({ data: a }) => {
219
- const u = a.results;
220
- this.values.length = 0, this.values.push(
221
- ...u.map(
222
- (o) => ({
223
- key: o.specValueId,
224
- value: o.valueName
225
- })
226
- )
227
- ), e(this.values);
228
- }).catch(t);
229
- });
230
- }
231
- }
232
- class B extends h {
233
- // 实现 useValues 方法
234
- useValues() {
235
- return new Promise((e, t) => {
236
- O.findList(this.query).then(({ data: a }) => {
237
- const u = a.results;
238
- this.values.length = 0, this.values.push(
239
- ...u.map(
240
- (o) => ({
241
- key: o.brandId,
242
- value: o.brandName
243
- })
244
- )
245
- ), e(this.values);
246
- }).catch(t);
247
- });
248
- }
249
- }
250
- class G extends h {
251
- // 实现 useValues 方法
252
- useValues() {
253
- return new Promise((e, t) => {
254
- I.findList(this.query).then(({ data: a }) => {
255
- const u = a.results;
256
- this.values.length = 0, this.values.push(
257
- ...u.map(
258
- (o) => ({
259
- key: o.labelId,
260
- value: o.labelName
261
- })
262
- )
263
- ), e(this.values);
264
- }).catch(t);
265
- });
266
- }
267
- }
268
- class z extends h {
269
- // 实现 useValues 方法
270
- useValues() {
271
- return new Promise((e, t) => {
272
- D.findList(this.query).then(({ data: a }) => {
273
- const u = a.results;
274
- this.values.length = 0, this.values.push(
275
- ...u.map(
276
- (o) => ({
277
- key: o.spuId,
278
- value: o.spuName
279
- })
280
- )
281
- ), e(this.values);
282
- }).catch(t);
283
- });
284
- }
285
- }
286
- class n {
287
- }
288
- // 店铺列表
289
- s(n, "shopInfoBizDict", new N({})), // 商品分类
290
- // static readonly goodsCategoryDict = new GoodsCategoryBizLayDict({});
291
- // 规格列表
292
- s(n, "specInfoDict", new b({})), // 规格值
293
- s(n, "specValueDict", new w({})), // 上架下架
294
- s(n, "shelfDict", new v(r.SHELF_VALUES, {})), // 运费类型
295
- s(n, "freightTypeEnum", new p(
296
- r.MODULE_GOODS,
297
- r.ENUM_FREIGHT_TYPE
298
- )), // 保障服务
299
- s(n, "goodsEnsureDict", new E(r.DICT_GOODS_ENSURE)), // 规格类型
300
- s(n, "specTypeEnum", new p(
301
- r.MODULE_GOODS,
302
- r.ENUM_SPEC_TYPE
303
- )), // 商品查询枚举
304
- s(n, "goodsSpuListSortEnum", new p(
305
- r.MODULE_GOODS,
306
- r.ENUM_GOODS_SPU_List_SORT
307
- )), // 审核状态
308
- s(n, "approvalStatusEnum", new p(
309
- r.MODULE_GOODS,
310
- r.ENUM_APPROVAL_STATUS
311
- )), // 启用禁用
312
- s(n, "enableDict", new v(r.ENABLE_VALUES, {})), // 商品分类
313
- s(n, "goodsCategoryListBizLayDict", new V(
314
- {}
315
- )), // 品牌列表
316
- s(n, "brandListBizDict", new B({})), // 标签列表
317
- s(n, "labelListBizDict", new G({})), // 商品列表
318
- s(n, "goodsSpuBizDict", new z({}));
319
- export {
320
- r as C,
321
- n as D,
322
- w as S,
323
- b as a,
324
- T as g
325
- };
@@ -1,141 +0,0 @@
1
- import { useUserStore as n, clearEmpty as a, request as s } from "jmash-core";
2
- import { q as l } from "./index-DR7GlHNd.mjs";
3
- class d {
4
- getKey(e) {
5
- return {
6
- labelId: e.labelId
7
- };
8
- }
9
- // 查询翻页信息标签管理
10
- findPage(e) {
11
- const o = n().user.tenant;
12
- return a(e), e && (e.hasStatus = e.status != null), s({
13
- url: "/v1/goods/goods_label_info/page/" + o,
14
- method: "get",
15
- params: e
16
- });
17
- }
18
- // 查询列表信息标签管理
19
- findList(e) {
20
- const o = n().user.tenant;
21
- return a(e), s({
22
- url: "/v1/goods/goods_label_info/list/" + o,
23
- method: "get",
24
- params: e
25
- });
26
- }
27
- // 查询标签管理
28
- findById(e) {
29
- const o = n().user.tenant;
30
- return a(e), s({
31
- url: "/v1/goods/goods_label_info/id/" + o + "/" + e.labelId,
32
- method: "get"
33
- });
34
- }
35
- // 创建实体标签管理
36
- create(e) {
37
- return e.tenant = n().user.tenant, a(e), s({
38
- url: "/v1/goods/goods_label_info",
39
- method: "post",
40
- data: e
41
- });
42
- }
43
- // 修改实体标签管理
44
- update(e) {
45
- return e.tenant = n().user.tenant, a(e), s({
46
- url: "/v1/goods/goods_label_info",
47
- method: "patch",
48
- data: e
49
- });
50
- }
51
- // 上移下移
52
- move(e, o) {
53
- const t = { ...e };
54
- return t.tenant = n().user.tenant, t.up = o, a(t), s({
55
- url: "/v1/goods/goods_label_info/move",
56
- method: "put",
57
- data: t
58
- });
59
- }
60
- // 启用/禁用
61
- enable(e, o) {
62
- const t = { ...e };
63
- return t.tenant = n().user.tenant, t.enable = o, a(t), s({
64
- url: "/v1/goods/goods_label_info/enable",
65
- method: "put",
66
- data: t
67
- });
68
- }
69
- // 删除标签管理
70
- delete(e) {
71
- return e.tenant = n().user.tenant, a(e), s({
72
- url: "/v1/goods/goods_label_info/id",
73
- method: "delete",
74
- params: e
75
- });
76
- }
77
- // 批量删除标签管理
78
- batchDelete(e) {
79
- const o = e.map((r) => r.labelId), t = {
80
- tenant: n().user.tenant,
81
- labelId: o
82
- };
83
- return a(t), s({
84
- url: "/v1/goods/goods_label_info/batch",
85
- method: "put",
86
- data: t
87
- });
88
- }
89
- // 下载导入模板标签管理
90
- downloadTemplate() {
91
- const e = n().user.tenant;
92
- return s({
93
- url: "/v1/goods/goods_label_info/" + e + "/template.xlsx",
94
- method: "get",
95
- responseType: "blob",
96
- params: {
97
- tenant: n().user.tenant
98
- }
99
- });
100
- }
101
- // 导入标签管理
102
- importExcel(e) {
103
- return e.tenant = n().user.tenant, a(e), s({
104
- url: "/v1/goods/goods_label_info/import",
105
- method: "patch",
106
- data: e
107
- });
108
- }
109
- // 导出标签管理Excel文件
110
- exportExcel(e) {
111
- const o = n().user.tenant;
112
- a(e);
113
- const t = l.stringify(e, {
114
- arrayFormat: "brackets",
115
- allowDots: !0
116
- });
117
- return s({
118
- url: "/v1/goods/goods_label_info/" + o + "/goods_label_infos.xlsx?" + t,
119
- method: "get",
120
- responseType: "blob"
121
- });
122
- }
123
- // 打印标签管理PDF文件
124
- exportPdf(e) {
125
- const o = n().user.tenant;
126
- a(e);
127
- const t = l.stringify(e, {
128
- arrayFormat: "brackets",
129
- allowDots: !0
130
- });
131
- return s({
132
- url: "/v1/goods/goods_label_info/" + o + "/goods_label_infos.pdf?" + t,
133
- method: "get",
134
- responseType: "blob"
135
- });
136
- }
137
- }
138
- const i = new d();
139
- export {
140
- i as g
141
- };