xyvcard-goods 0.0.18 → 0.0.20

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 (40) hide show
  1. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  2. package/dist/edit-Bb2XgE0h.mjs +590 -0
  3. package/dist/edit-BcokSKfN.mjs +183 -0
  4. package/dist/{edit-E57LIt5x.mjs → edit-Cj13W2TC.mjs} +1 -1
  5. package/dist/edit-DxnsmaXV.mjs +186 -0
  6. package/dist/{edit.vue_vue_type_script_setup_true_lang-BHplO2tN.mjs → edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs} +1 -1
  7. package/dist/{goodsList-0TMcPn_Q.mjs → goodsList-DOXK1EwK.mjs} +1 -1
  8. package/dist/goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs +713 -0
  9. package/dist/index-BmOxm1P2.mjs +324 -0
  10. package/dist/index-C3FT_Oe7.mjs +318 -0
  11. package/dist/{index-CnyW3rxw.mjs → index-CGAoZY87.mjs} +2 -2
  12. package/dist/index-D3w33Nba.mjs +301 -0
  13. package/dist/{index-nSAowuoJ.mjs → index-DAJiqOCh.mjs} +2 -2
  14. package/dist/index-DR7GlHNd.mjs +1288 -0
  15. package/dist/index-jTDhsbYM.mjs +141 -0
  16. package/dist/index-r0u-27m7.mjs +141 -0
  17. package/dist/index.mjs +321 -284
  18. package/dist/info-DImlMNq0.mjs +365 -0
  19. package/dist/{skuForm-H9IDa7ys.mjs → skuForm-Bt3arW0s.mjs} +157 -108
  20. package/dist/skuTable-Ahc3WlPp.mjs +639 -0
  21. package/dist/style.css +1 -1
  22. package/dts/api/dict.d.ts +6 -0
  23. package/dts/api/goods-brand-info/index.d.ts +20 -0
  24. package/dts/api/goods-brand-info/types.d.ts +73 -0
  25. package/dts/api/goods-label-info/index.d.ts +20 -0
  26. package/dts/api/goods-label-info/types.d.ts +70 -0
  27. package/dts/api/goods-sku/types.d.ts +2 -0
  28. package/dts/api/goods-spu/types.d.ts +13 -0
  29. package/dts/api/index.d.ts +3 -1
  30. package/dts/lang/goods/zh-cn.d.ts +35 -0
  31. package/dts/views/goods/goods-brand-info/edit.vue.d.ts +22 -0
  32. package/dts/views/goods/goods-brand-info/index.vue.d.ts +2 -0
  33. package/dts/views/goods/goods-label-info/edit.vue.d.ts +22 -0
  34. package/dts/views/goods/goods-label-info/index.vue.d.ts +2 -0
  35. package/package.json +2 -2
  36. package/dist/edit-CYk6B5NG.mjs +0 -529
  37. package/dist/goodsList.vue_vue_type_script_setup_true_lang-Cd7-ryQA.mjs +0 -626
  38. package/dist/index-CmKF2zdn.mjs +0 -272
  39. package/dist/info-D6MWRZ1y.mjs +0 -306
  40. package/dist/skuTable-DbNThlFG.mjs +0 -553
@@ -0,0 +1,301 @@
1
+ var E = Object.defineProperty;
2
+ var S = (o, e, t) => e in o ? E(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var s = (o, e, t) => S(o, 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 m } 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
+ class r {
11
+ }
12
+ // 模块
13
+ s(r, "MODULE_GOODS", "goods"), // 商品规格类型
14
+ s(r, "SPEC_TYPE", {
15
+ UNIFIED_SPEC: "UNIFIED_SPEC",
16
+ //统一规格
17
+ MULTI_SPEC: "MULTI_SPEC"
18
+ //多规格
19
+ }), // 启用禁用
20
+ s(r, "SHELF_VALUES", g([
21
+ { key: !0, value: "上架" },
22
+ { key: !1, value: "下架" }
23
+ ])), // 运费类型
24
+ s(r, "ENUM_FREIGHT_TYPE", "xyvcard.goods.protobuf.FreightType"), // 保障服务
25
+ s(r, "DICT_GOODS_ENSURE", "goods_ensure"), // 规格类型
26
+ s(r, "ENUM_SPEC_TYPE", "xyvcard.goods.protobuf.SpecType"), // 商品查询枚举
27
+ s(r, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"), // 审核状态
28
+ s(r, "ENUM_APPROVAL_STATUS", "xyvcard.goods.protobuf.ApprovalStatus"), // 审核状态常量
29
+ s(r, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(r, "APPROVAL_PASS", "APPROVAL_PASS"), s(r, "APPROVALING", "APPROVALING"), // 启用禁用
30
+ s(r, "ENABLE_VALUES", g([
31
+ { key: "true", value: "启用" },
32
+ { key: "false", value: "禁用" }
33
+ ]));
34
+ class D {
35
+ getKey(e) {
36
+ return {
37
+ categoryId: e.categoryId
38
+ };
39
+ }
40
+ // 查询翻页信息商城商品分类
41
+ findPage(e) {
42
+ const t = l().user.tenant;
43
+ return e && (e.hasStatus = e.status != null), c(e), d({
44
+ url: "/v1/goods/goods_category/list/" + t,
45
+ method: "get",
46
+ params: e
47
+ });
48
+ }
49
+ // 查询列表信息商城商品分类
50
+ findList(e) {
51
+ const t = l().user.tenant;
52
+ return c(e), d({
53
+ url: "/v1/goods/goods_category/list/" + t,
54
+ method: "get",
55
+ params: e
56
+ });
57
+ }
58
+ // 查询商城商品分类
59
+ findById(e) {
60
+ const t = l().user.tenant;
61
+ return c(e), d({
62
+ url: "/v1/goods/goods_category/id/" + t + "/" + e.categoryId,
63
+ method: "get"
64
+ });
65
+ }
66
+ // 创建实体商城商品分类
67
+ create(e) {
68
+ return e.tenant = l().user.tenant, c(e), d({
69
+ url: "/v1/goods/goods_category",
70
+ method: "post",
71
+ data: e
72
+ });
73
+ }
74
+ // 修改实体商城商品分类
75
+ update(e) {
76
+ return e.tenant = l().user.tenant, c(e), d({
77
+ url: "/v1/goods/goods_category",
78
+ method: "patch",
79
+ data: e
80
+ });
81
+ }
82
+ // 上移下移
83
+ move(e, t) {
84
+ const a = { ...e };
85
+ return a.tenant = l().user.tenant, a.up = t, c(a), d({
86
+ url: "/v1/goods/goods_category/move",
87
+ method: "put",
88
+ data: a
89
+ });
90
+ }
91
+ // 启用/禁用
92
+ enable(e, t) {
93
+ const a = { ...e };
94
+ return a.tenant = l().user.tenant, a.enable = t, c(a), d({
95
+ url: "/v1/goods/goods_category/enable",
96
+ method: "put",
97
+ data: a
98
+ });
99
+ }
100
+ // 删除商城商品分类
101
+ delete(e) {
102
+ return e.tenant = l().user.tenant, c(e), d({
103
+ url: "/v1/goods/goods_category/id",
104
+ method: "delete",
105
+ params: e
106
+ });
107
+ }
108
+ // 批量删除商城商品分类
109
+ batchDelete(e) {
110
+ const t = e.map((n) => n.categoryId), a = {
111
+ tenant: l().user.tenant,
112
+ categoryId: t
113
+ };
114
+ return c(a), d({
115
+ url: "/v1/goods/goods_category/batch",
116
+ method: "put",
117
+ data: a
118
+ });
119
+ }
120
+ /**
121
+ * 查询商品树列表的API接口
122
+ *
123
+ * @param query 可选的查询参数,符合GoodsCategoryReq接口的实例
124
+ * @returns 返回一个AxiosPromise,包含GoodsCategoryTree类型的响应数据
125
+ */
126
+ findTreeListApi(e) {
127
+ const t = l().user.tenant;
128
+ return c(e), d({
129
+ url: "/v1/goods/goods_category/treelist/" + t,
130
+ method: "get",
131
+ params: e
132
+ });
133
+ }
134
+ }
135
+ const U = new D();
136
+ function _(o, e, t) {
137
+ return !Array.isArray(o) || o.length === 0 ? [] : o.map((n) => {
138
+ let i = [];
139
+ return Array.isArray(n.children) && n.children.length > 0 && (i = _(n.children, e, t)), {
140
+ value: n[t],
141
+ label: n[e],
142
+ parentId: n.parentId,
143
+ children: i
144
+ };
145
+ });
146
+ }
147
+ class v {
148
+ constructor(e, t) {
149
+ s(this, "values", L([]));
150
+ // 查询条件
151
+ s(this, "query");
152
+ this.values.length = 0, this.values.push(...e.value), this.query = t;
153
+ }
154
+ // 根据给定键获取业务数据项的值的方法
155
+ getValue(e) {
156
+ for (const t of this.values)
157
+ if (t.key == e)
158
+ return t.value;
159
+ return "";
160
+ }
161
+ }
162
+ class T extends h {
163
+ // 实现 useValues 方法
164
+ useValues() {
165
+ return new Promise((e, t) => {
166
+ P.findList(this.query).then(({ data: a }) => {
167
+ const n = a.results;
168
+ this.values.length = 0, this.values.push(
169
+ ...n.map(
170
+ (i) => ({
171
+ key: i.shopId,
172
+ value: i.shopName
173
+ })
174
+ )
175
+ ), e(this.values);
176
+ }).catch(t);
177
+ });
178
+ }
179
+ }
180
+ class N extends y {
181
+ // 实现 useValues 方法
182
+ useValues() {
183
+ return new Promise((e, t) => {
184
+ U.findTreeListApi(this.query).then(({ data: a }) => {
185
+ this.values.length = 0, this.values.push(..._(a.results, "label", "value")), e(this.values);
186
+ }).catch(t);
187
+ });
188
+ }
189
+ }
190
+ class V extends h {
191
+ // 实现 useValues 方法
192
+ useValues() {
193
+ return new Promise((e, t) => {
194
+ f.findList(this.query).then(({ data: a }) => {
195
+ const n = a.results;
196
+ this.values.length = 0, this.values.push(
197
+ ...n.map(
198
+ (i) => ({
199
+ key: i.specId,
200
+ value: i.specName,
201
+ disabled: i.disabled
202
+ })
203
+ )
204
+ ), e(this.values);
205
+ }).catch(t);
206
+ });
207
+ }
208
+ }
209
+ class b extends h {
210
+ // 实现 useValues 方法
211
+ useValues() {
212
+ return new Promise((e, t) => {
213
+ A.findList(this.query).then(({ data: a }) => {
214
+ const n = a.results;
215
+ this.values.length = 0, this.values.push(
216
+ ...n.map(
217
+ (i) => ({
218
+ key: i.specValueId,
219
+ value: i.valueName
220
+ })
221
+ )
222
+ ), e(this.values);
223
+ }).catch(t);
224
+ });
225
+ }
226
+ }
227
+ class w extends h {
228
+ // 实现 useValues 方法
229
+ useValues() {
230
+ return new Promise((e, t) => {
231
+ O.findList(this.query).then(({ data: a }) => {
232
+ const n = a.results;
233
+ this.values.length = 0, this.values.push(
234
+ ...n.map(
235
+ (i) => ({
236
+ key: i.brandId,
237
+ value: i.brandName
238
+ })
239
+ )
240
+ ), e(this.values);
241
+ }).catch(t);
242
+ });
243
+ }
244
+ }
245
+ class B extends h {
246
+ // 实现 useValues 方法
247
+ useValues() {
248
+ return new Promise((e, t) => {
249
+ I.findList(this.query).then(({ data: a }) => {
250
+ const n = a.results;
251
+ this.values.length = 0, this.values.push(
252
+ ...n.map(
253
+ (i) => ({
254
+ key: i.labelId,
255
+ value: i.labelName
256
+ })
257
+ )
258
+ ), e(this.values);
259
+ }).catch(t);
260
+ });
261
+ }
262
+ }
263
+ class u {
264
+ }
265
+ // 店铺列表
266
+ s(u, "shopInfoBizDict", new T({})), // 商品分类
267
+ // static readonly goodsCategoryDict = new GoodsCategoryBizLayDict({});
268
+ // 规格列表
269
+ s(u, "specInfoDict", new V({})), // 规格值
270
+ s(u, "specValueDict", new b({})), // 上架下架
271
+ s(u, "shelfDict", new v(r.SHELF_VALUES, {})), // 运费类型
272
+ s(u, "freightTypeEnum", new p(
273
+ r.MODULE_GOODS,
274
+ r.ENUM_FREIGHT_TYPE
275
+ )), // 保障服务
276
+ s(u, "goodsEnsureDict", new m(r.DICT_GOODS_ENSURE)), // 规格类型
277
+ s(u, "specTypeEnum", new p(
278
+ r.MODULE_GOODS,
279
+ r.ENUM_SPEC_TYPE
280
+ )), // 商品查询枚举
281
+ s(u, "goodsSpuListSortEnum", new p(
282
+ r.MODULE_GOODS,
283
+ r.ENUM_GOODS_SPU_List_SORT
284
+ )), // 审核状态
285
+ s(u, "approvalStatusEnum", new p(
286
+ r.MODULE_GOODS,
287
+ r.ENUM_APPROVAL_STATUS
288
+ )), // 启用禁用
289
+ s(u, "enableDict", new v(r.ENABLE_VALUES, {})), // 商品分类
290
+ s(u, "goodsCategoryListBizLayDict", new N(
291
+ {}
292
+ )), // 品牌列表
293
+ s(u, "brandListBizDict", new w({})), // 标签列表
294
+ s(u, "labelListBizDict", new B({}));
295
+ export {
296
+ r as C,
297
+ u as D,
298
+ b as S,
299
+ V as a,
300
+ U as g
301
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as b, ref as S, onMounted as A, resolveComponent as p, openBlock as t, createElementBlock as c, createVNode as V, withCtx as m, Fragment as C, renderList as P, unref as h, createBlock as i, createCommentVNode as y } from "vue";
2
2
  import { useRoute as L } from "vue-router";
3
- import { D as _, C as l } from "./index-CmKF2zdn.mjs";
4
- import { _ as k } from "./goodsList.vue_vue_type_script_setup_true_lang-Cd7-ryQA.mjs";
3
+ import { D as _, C as l } from "./index-D3w33Nba.mjs";
4
+ import { _ as k } from "./goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs";
5
5
  const N = { class: "app-container" }, x = /* @__PURE__ */ b({
6
6
  __name: "index",
7
7
  setup(g) {