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.
Files changed (44) hide show
  1. package/dist/ImageUpload-Dk6GY6PA.mjs +93 -0
  2. package/dist/{edit-DFc_TNP3.mjs → edit-9jPSycsG.mjs} +148 -212
  3. package/dist/edit-CJpoa4Ck.mjs +368 -0
  4. package/dist/{edit-DxnsmaXV.mjs → edit-CWQMgvVP.mjs} +38 -38
  5. package/dist/{edit-CkR-I5aJ.mjs → edit-DU-BEAcq.mjs} +1 -1
  6. package/dist/{edit-BcokSKfN.mjs → edit-Ziwv43v0.mjs} +27 -27
  7. package/dist/edit.vue_vue_type_script_setup_true_lang-BP0C4d2-.mjs +24173 -0
  8. package/dist/{goodsList-HmPAwD_C.mjs → goodsList-2AwsJVoO.mjs} +1 -1
  9. package/dist/{goodsList-TX2ZnRR9.mjs → goodsList-CyWliLjg.mjs} +1 -1
  10. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CGV1dm3W.mjs → goodsList.vue_vue_type_script_setup_true_lang-Bq06GIMe.mjs} +2 -2
  11. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-f1Fc6pbd.mjs → goodsList.vue_vue_type_script_setup_true_lang-DjKzEAB7.mjs} +136 -147
  12. package/dist/{index-B0SXNsHW.mjs → index-8E7BciYp.mjs} +7 -7
  13. package/dist/{index-Dt3PP8dN.mjs → index-B1H5hqEi.mjs} +2 -2
  14. package/dist/{index-BZw9XfQo.mjs → index-B88acg0Q.mjs} +2 -2
  15. package/dist/{index-VFsDup14.mjs → index-BdP_dXBK.mjs} +3 -3
  16. package/dist/index-C7oatDPl.mjs +4432 -0
  17. package/dist/{index-Ctva-XF0.mjs → index-DPjR32Kv.mjs} +3 -3
  18. package/dist/{index-r0u-27m7.mjs → index-DR3Gk44r.mjs} +1 -1
  19. package/dist/index-jCpYt-EU.mjs +221 -0
  20. package/dist/index.mjs +6 -2864
  21. package/dist/info-BEMxnD6-.mjs +325 -0
  22. package/dist/{info-BTKv0IRt.mjs → info-DFIeVs66.mjs} +3 -3
  23. package/dist/{skuForm-C7rF2noo.mjs → skuForm-BhAbf2AG.mjs} +2 -2
  24. package/dist/skuForm-C2aQcL90.mjs +314 -0
  25. package/dist/{skuTable-CEwT-I1Q.mjs → skuTable-9JJqGeRx.mjs} +255 -208
  26. package/dist/style.css +1 -1
  27. package/dts/api/dict.d.ts +3 -0
  28. package/dts/api/goods-spu/index.d.ts +4 -1
  29. package/dts/api/goods-spu/types.d.ts +28 -0
  30. package/dts/api/index.d.ts +2 -1
  31. package/dts/index.d.ts +4 -0
  32. package/dts/lang/goods/zh-cn.d.ts +5 -1
  33. package/dts/router/index.d.ts +1 -0
  34. package/dts/views/goods/goods-combination/skuForm.vue.d.ts +0 -9
  35. package/package.json +3 -2
  36. package/dist/edit-tCGa_9Kt.mjs +0 -507
  37. package/dist/edit.vue_vue_type_script_setup_true_lang-BlNwikUO.mjs +0 -234
  38. package/dist/index-CqOoZ5xQ.mjs +0 -305
  39. package/dist/index-DR7GlHNd.mjs +0 -1288
  40. package/dist/index-jTDhsbYM.mjs +0 -141
  41. package/dist/info-CrghLmS4.mjs +0 -365
  42. package/dist/sku-B-IzfYLq.mjs +0 -52
  43. package/dist/skuForm-D2n8sQJo.mjs +0 -475
  44. package/dist/skuTable-D-awlXgj.mjs +0 -592
@@ -1,234 +0,0 @@
1
- import { defineComponent as F, mergeModels as V, ref as h, reactive as v, useModel as O, onMounted as E, resolveComponent as n, openBlock as A, createBlock as T, withCtx as l, createElementVNode as G, createVNode as e, createTextVNode as w, toDisplayString as I, unref as r } from "vue";
2
- import { ElMessage as U } from "element-plus";
3
- import { useI18n as H } from "vue-i18n";
4
- import { D as q, g as N } from "./index-CqOoZ5xQ.mjs";
5
- const J = { class: "dialog-footer" }, Y = /* @__PURE__ */ F({
6
- __name: "edit",
7
- props: /* @__PURE__ */ V({
8
- entityKey: {
9
- type: Object,
10
- default: () => {
11
- }
12
- }
13
- }, {
14
- modelValue: { type: Boolean },
15
- modelModifiers: {}
16
- }),
17
- emits: /* @__PURE__ */ V(["refresh"], ["update:modelValue"]),
18
- setup(g, { emit: $ }) {
19
- var C;
20
- const { t: u } = H(), y = h();
21
- let o = v({
22
- requestId: Math.random() * 10 + "",
23
- updateMask: "categoryName,parentId,picUrl,description"
24
- });
25
- const R = v({
26
- categoryName: [
27
- {
28
- required: !0,
29
- message: u("goodsCategory.categoryNameRequired"),
30
- trigger: "blur"
31
- }
32
- ],
33
- categoryCode: [
34
- {
35
- required: !0,
36
- message: u("goodsCategory.categoryCodeRequired"),
37
- trigger: "blur"
38
- }
39
- ],
40
- picUrl: [
41
- {
42
- required: !0,
43
- message: u("goodsCategory.picUrlRequired"),
44
- trigger: "change"
45
- }
46
- ]
47
- }), i = O(g, "modelValue"), p = g, k = Object.keys(p.entityKey), D = h(k.length >= 1);
48
- E(() => {
49
- q.goodsCategoryListBizLayDict.useValues();
50
- });
51
- const f = $;
52
- (C = p.entityKey) != null && C.categoryId && (o = Object.assign(o, p.entityKey), o.parentId === "00000000-0000-0000-0000-000000000000" && (o.parentId = ""));
53
- const M = async () => {
54
- var t;
55
- await ((t = y.value) == null ? void 0 : t.validate((a) => {
56
- a && (o.categoryId ? N.update(o).then((d) => {
57
- d.status === 200 && (U({
58
- message: u("common.submitSuccess"),
59
- type: "success"
60
- }), i.value && (i.value = !1), f("refresh", d.status === 200));
61
- }) : N.create(o).then((d) => {
62
- d.status === 200 && (U({
63
- message: u("common.submitSuccess"),
64
- type: "success"
65
- }), i.value && (i.value = !1), f("refresh", d.status === 200));
66
- }));
67
- }));
68
- };
69
- function _() {
70
- i.value && (i.value = !1);
71
- }
72
- function j(t) {
73
- o.picUrl = t;
74
- }
75
- return (t, a) => {
76
- const d = n("el-input"), m = n("el-form-item"), c = n("el-col"), B = n("el-tree-select"), S = n("jmash-single-image-upload"), K = n("el-row"), L = n("el-form"), b = n("el-button"), z = n("el-dialog");
77
- return A(), T(z, {
78
- modelValue: i.value,
79
- "onUpdate:modelValue": a[4] || (a[4] = (s) => i.value = s),
80
- onClose: _
81
- }, {
82
- footer: l(() => [
83
- G("div", J, [
84
- e(b, { onClick: _ }, {
85
- default: l(() => [
86
- w(I(t.$t("common.cancel")), 1)
87
- ]),
88
- _: 1
89
- }),
90
- e(b, {
91
- type: "primary",
92
- onClick: M
93
- }, {
94
- default: l(() => [
95
- w(I(t.$t("common.confirm")), 1)
96
- ]),
97
- _: 1
98
- })
99
- ])
100
- ]),
101
- default: l(() => [
102
- e(L, {
103
- ref_key: "goodsCategoryFormRef",
104
- ref: y,
105
- model: r(o),
106
- "label-width": "120px",
107
- rules: R
108
- }, {
109
- default: l(() => [
110
- e(K, null, {
111
- default: l(() => [
112
- e(c, { span: 24 }, {
113
- default: l(() => [
114
- e(m, {
115
- label: t.$t("goodsCategory.categoryName"),
116
- prop: "categoryName"
117
- }, {
118
- default: l(() => [
119
- e(d, {
120
- modelValue: r(o).categoryName,
121
- "onUpdate:modelValue": a[0] || (a[0] = (s) => r(o).categoryName = s),
122
- placeholder: t.$t("goodsCategory.categoryNameRequired"),
123
- maxlength: "60",
124
- "show-word-limit": "",
125
- clearable: ""
126
- }, null, 8, ["modelValue", "placeholder"])
127
- ]),
128
- _: 1
129
- }, 8, ["label"])
130
- ]),
131
- _: 1
132
- }),
133
- e(c, { span: 24 }, {
134
- default: l(() => [
135
- e(m, {
136
- label: t.$t("goodsCategory.categoryCode"),
137
- prop: "categoryCode"
138
- }, {
139
- default: l(() => [
140
- e(d, {
141
- modelValue: r(o).categoryCode,
142
- "onUpdate:modelValue": a[1] || (a[1] = (s) => r(o).categoryCode = s),
143
- disabled: D.value,
144
- placeholder: t.$t("goodsCategory.categoryCodeRequired"),
145
- maxlength: "30",
146
- "show-word-limit": "",
147
- clearable: ""
148
- }, null, 8, ["modelValue", "disabled", "placeholder"])
149
- ]),
150
- _: 1
151
- }, 8, ["label"])
152
- ]),
153
- _: 1
154
- }),
155
- e(c, { span: 24 }, {
156
- default: l(() => [
157
- e(m, {
158
- label: t.$t("goodsCategory.parentId"),
159
- prop: "parentId"
160
- }, {
161
- default: l(() => [
162
- e(B, {
163
- modelValue: r(o).parentId,
164
- "onUpdate:modelValue": a[2] || (a[2] = (s) => r(o).parentId = s),
165
- data: r(q).goodsCategoryListBizLayDict.values,
166
- filterable: "",
167
- clearable: "",
168
- "check-strictly": "",
169
- "render-after-expand": !1,
170
- placeholder: t.$t("goodsCategory.parentIdRequired")
171
- }, null, 8, ["modelValue", "data", "placeholder"])
172
- ]),
173
- _: 1
174
- }, 8, ["label"])
175
- ]),
176
- _: 1
177
- }),
178
- e(c, { span: 24 }, {
179
- default: l(() => [
180
- e(m, {
181
- label: t.$t("goodsCategory.picUrl"),
182
- prop: "picUrl"
183
- }, {
184
- default: l(() => [
185
- e(S, {
186
- "picture-url": r(o).picUrl,
187
- onImageSrc: j,
188
- width: 80,
189
- type: "trans"
190
- }, null, 8, ["picture-url"])
191
- ]),
192
- _: 1
193
- }, 8, ["label"])
194
- ]),
195
- _: 1
196
- }),
197
- e(c, { span: 24 }, {
198
- default: l(() => [
199
- e(m, {
200
- label: t.$t("goodsCategory.description"),
201
- prop: "description"
202
- }, {
203
- default: l(() => [
204
- e(d, {
205
- modelValue: r(o).description,
206
- "onUpdate:modelValue": a[3] || (a[3] = (s) => r(o).description = s),
207
- type: "textarea",
208
- autosize: { minRows: 2 },
209
- maxlength: "200",
210
- "show-word-limit": "",
211
- placeholder: t.$t("goodsCategory.descriptionRequired"),
212
- clearable: ""
213
- }, null, 8, ["modelValue", "placeholder"])
214
- ]),
215
- _: 1
216
- }, 8, ["label"])
217
- ]),
218
- _: 1
219
- })
220
- ]),
221
- _: 1
222
- })
223
- ]),
224
- _: 1
225
- }, 8, ["model", "rules"])
226
- ]),
227
- _: 1
228
- }, 8, ["modelValue"]);
229
- };
230
- }
231
- });
232
- export {
233
- Y as _
234
- };
@@ -1,305 +0,0 @@
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
- s(r, "GOODS_TYPE", {
35
- NORMAL: "normal",
36
- GROUP: "group"
37
- });
38
- class D {
39
- getKey(e) {
40
- return {
41
- categoryId: e.categoryId
42
- };
43
- }
44
- // 查询翻页信息商城商品分类
45
- findPage(e) {
46
- const t = l().user.tenant;
47
- return e && (e.hasStatus = e.status != null), c(e), d({
48
- url: "/v1/goods/goods_category/list/" + t,
49
- method: "get",
50
- params: e
51
- });
52
- }
53
- // 查询列表信息商城商品分类
54
- findList(e) {
55
- const t = l().user.tenant;
56
- return c(e), d({
57
- url: "/v1/goods/goods_category/list/" + t,
58
- method: "get",
59
- params: e
60
- });
61
- }
62
- // 查询商城商品分类
63
- findById(e) {
64
- const t = l().user.tenant;
65
- return c(e), d({
66
- url: "/v1/goods/goods_category/id/" + t + "/" + e.categoryId,
67
- method: "get"
68
- });
69
- }
70
- // 创建实体商城商品分类
71
- create(e) {
72
- return e.tenant = l().user.tenant, c(e), d({
73
- url: "/v1/goods/goods_category",
74
- method: "post",
75
- data: e
76
- });
77
- }
78
- // 修改实体商城商品分类
79
- update(e) {
80
- return e.tenant = l().user.tenant, c(e), d({
81
- url: "/v1/goods/goods_category",
82
- method: "patch",
83
- data: e
84
- });
85
- }
86
- // 上移下移
87
- move(e, t) {
88
- const a = { ...e };
89
- return a.tenant = l().user.tenant, a.up = t, c(a), d({
90
- url: "/v1/goods/goods_category/move",
91
- method: "put",
92
- data: a
93
- });
94
- }
95
- // 启用/禁用
96
- enable(e, t) {
97
- const a = { ...e };
98
- return a.tenant = l().user.tenant, a.enable = t, c(a), d({
99
- url: "/v1/goods/goods_category/enable",
100
- method: "put",
101
- data: a
102
- });
103
- }
104
- // 删除商城商品分类
105
- delete(e) {
106
- return e.tenant = l().user.tenant, c(e), d({
107
- url: "/v1/goods/goods_category/id",
108
- method: "delete",
109
- params: e
110
- });
111
- }
112
- // 批量删除商城商品分类
113
- batchDelete(e) {
114
- const t = e.map((n) => n.categoryId), a = {
115
- tenant: l().user.tenant,
116
- categoryId: t
117
- };
118
- return c(a), d({
119
- url: "/v1/goods/goods_category/batch",
120
- method: "put",
121
- data: a
122
- });
123
- }
124
- /**
125
- * 查询商品树列表的API接口
126
- *
127
- * @param query 可选的查询参数,符合GoodsCategoryReq接口的实例
128
- * @returns 返回一个AxiosPromise,包含GoodsCategoryTree类型的响应数据
129
- */
130
- findTreeListApi(e) {
131
- const t = l().user.tenant;
132
- return c(e), d({
133
- url: "/v1/goods/goods_category/treelist/" + t,
134
- method: "get",
135
- params: e
136
- });
137
- }
138
- }
139
- const U = new D();
140
- function v(o, e, t) {
141
- return !Array.isArray(o) || o.length === 0 ? [] : o.map((n) => {
142
- let i = [];
143
- return Array.isArray(n.children) && n.children.length > 0 && (i = v(n.children, e, t)), {
144
- value: n[t],
145
- label: n[e],
146
- parentId: n.parentId,
147
- children: i
148
- };
149
- });
150
- }
151
- class _ {
152
- constructor(e, t) {
153
- s(this, "values", L([]));
154
- // 查询条件
155
- s(this, "query");
156
- this.values.length = 0, this.values.push(...e.value), this.query = t;
157
- }
158
- // 根据给定键获取业务数据项的值的方法
159
- getValue(e) {
160
- for (const t of this.values)
161
- if (t.key == e)
162
- return t.value;
163
- return "";
164
- }
165
- }
166
- class T extends h {
167
- // 实现 useValues 方法
168
- useValues() {
169
- return new Promise((e, t) => {
170
- P.findList(this.query).then(({ data: a }) => {
171
- const n = a.results;
172
- this.values.length = 0, this.values.push(
173
- ...n.map(
174
- (i) => ({
175
- key: i.shopId,
176
- value: i.shopName
177
- })
178
- )
179
- ), e(this.values);
180
- }).catch(t);
181
- });
182
- }
183
- }
184
- class N extends y {
185
- // 实现 useValues 方法
186
- useValues() {
187
- return new Promise((e, t) => {
188
- U.findTreeListApi(this.query).then(({ data: a }) => {
189
- this.values.length = 0, this.values.push(...v(a.results, "label", "value")), e(this.values);
190
- }).catch(t);
191
- });
192
- }
193
- }
194
- class V extends h {
195
- // 实现 useValues 方法
196
- useValues() {
197
- return new Promise((e, t) => {
198
- f.findList(this.query).then(({ data: a }) => {
199
- const n = a.results;
200
- this.values.length = 0, this.values.push(
201
- ...n.map(
202
- (i) => ({
203
- key: i.specId,
204
- value: i.specName,
205
- disabled: i.disabled
206
- })
207
- )
208
- ), e(this.values);
209
- }).catch(t);
210
- });
211
- }
212
- }
213
- class b extends h {
214
- // 实现 useValues 方法
215
- useValues() {
216
- return new Promise((e, t) => {
217
- A.findList(this.query).then(({ data: a }) => {
218
- const n = a.results;
219
- this.values.length = 0, this.values.push(
220
- ...n.map(
221
- (i) => ({
222
- key: i.specValueId,
223
- value: i.valueName
224
- })
225
- )
226
- ), e(this.values);
227
- }).catch(t);
228
- });
229
- }
230
- }
231
- class w extends h {
232
- // 实现 useValues 方法
233
- useValues() {
234
- return new Promise((e, t) => {
235
- O.findList(this.query).then(({ data: a }) => {
236
- const n = a.results;
237
- this.values.length = 0, this.values.push(
238
- ...n.map(
239
- (i) => ({
240
- key: i.brandId,
241
- value: i.brandName
242
- })
243
- )
244
- ), e(this.values);
245
- }).catch(t);
246
- });
247
- }
248
- }
249
- class B extends h {
250
- // 实现 useValues 方法
251
- useValues() {
252
- return new Promise((e, t) => {
253
- I.findList(this.query).then(({ data: a }) => {
254
- const n = a.results;
255
- this.values.length = 0, this.values.push(
256
- ...n.map(
257
- (i) => ({
258
- key: i.labelId,
259
- value: i.labelName
260
- })
261
- )
262
- ), e(this.values);
263
- }).catch(t);
264
- });
265
- }
266
- }
267
- class u {
268
- }
269
- // 店铺列表
270
- s(u, "shopInfoBizDict", new T({})), // 商品分类
271
- // static readonly goodsCategoryDict = new GoodsCategoryBizLayDict({});
272
- // 规格列表
273
- s(u, "specInfoDict", new V({})), // 规格值
274
- s(u, "specValueDict", new b({})), // 上架下架
275
- s(u, "shelfDict", new _(r.SHELF_VALUES, {})), // 运费类型
276
- s(u, "freightTypeEnum", new p(
277
- r.MODULE_GOODS,
278
- r.ENUM_FREIGHT_TYPE
279
- )), // 保障服务
280
- s(u, "goodsEnsureDict", new m(r.DICT_GOODS_ENSURE)), // 规格类型
281
- s(u, "specTypeEnum", new p(
282
- r.MODULE_GOODS,
283
- r.ENUM_SPEC_TYPE
284
- )), // 商品查询枚举
285
- s(u, "goodsSpuListSortEnum", new p(
286
- r.MODULE_GOODS,
287
- r.ENUM_GOODS_SPU_List_SORT
288
- )), // 审核状态
289
- s(u, "approvalStatusEnum", new p(
290
- r.MODULE_GOODS,
291
- r.ENUM_APPROVAL_STATUS
292
- )), // 启用禁用
293
- s(u, "enableDict", new _(r.ENABLE_VALUES, {})), // 商品分类
294
- s(u, "goodsCategoryListBizLayDict", new N(
295
- {}
296
- )), // 品牌列表
297
- s(u, "brandListBizDict", new w({})), // 标签列表
298
- s(u, "labelListBizDict", new B({}));
299
- export {
300
- r as C,
301
- u as D,
302
- b as S,
303
- V as a,
304
- U as g
305
- };