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,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 { g as te } from "./index-jTDhsbYM.mjs";
5
- import ae from "./edit-BcokSKfN.mjs";
6
- import { D as ne } from "./index-Dvaotk7B.mjs";
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) {
@@ -1,5 +1,5 @@
1
1
  import { useUserStore as e, clearEmpty as s, request as r } from "jmash-core";
2
- import { q as d } from "./index-DR7GlHNd.mjs";
2
+ import { q as d } from "./index-C7oatDPl.mjs";
3
3
  class u {
4
4
  getKey(t) {
5
5
  return {
@@ -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
+ };