xyvcard-goods 0.0.12 → 0.0.14

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-h0S6bHag.mjs → edit-BlnYCDI4.mjs} +34 -32
  2. package/dist/edit-BsaWxeqY.mjs +4 -0
  3. package/dist/edit.vue_vue_type_script_setup_true_lang-DRAXgRwD.mjs +236 -0
  4. package/dist/goodsList-Dvsh76f7.mjs +4 -0
  5. package/dist/goodsList.vue_vue_type_script_setup_true_lang-CWJQd86q.mjs +647 -0
  6. package/dist/index-BF7PDcd4.mjs +55 -0
  7. package/dist/index-Ct0LRSwV.mjs +333 -0
  8. package/dist/index-DZJVaUh3.mjs +248 -0
  9. package/dist/index.mjs +139 -139
  10. package/dist/{info-lDMLR1ZW.mjs → info-wrevnU3P.mjs} +19 -18
  11. package/dist/{skuForm-ChaaXJgn.mjs → skuForm-B7yYjwdJ.mjs} +23 -21
  12. package/dist/{skuTable-BBiyXctZ.mjs → skuTable-YDBH_oRN.mjs} +18 -17
  13. package/dist/style.css +1 -1
  14. package/dts/api/dict.d.ts +2 -2
  15. package/dts/api/goods-category/index.d.ts +23 -0
  16. package/dts/api/goods-category/types.d.ts +68 -0
  17. package/dts/api/index.d.ts +3 -2
  18. package/dts/constant.d.ts +10 -0
  19. package/dts/views/goods/goods-category/edit.vue.d.ts +22 -0
  20. package/dts/{components/EnumRadio/index.vue.d.ts → views/goods/goods-spu/goodsList.vue.d.ts} +16 -11
  21. package/package.json +12 -15
  22. package/dist/approveFailIndex-B-VGnf1U.mjs +0 -4
  23. package/dist/approveFailIndex.vue_vue_type_script_setup_true_lang-CiIyafoQ.mjs +0 -418
  24. package/dist/auditIndex-tEq8uYdA.mjs +0 -4
  25. package/dist/auditIndex.vue_vue_type_script_setup_true_lang-BW22LRCL.mjs +0 -492
  26. package/dist/index-BMlIwb1h.mjs +0 -621
  27. package/dist/index-CKeHa-Cx.mjs +0 -139
  28. package/dist/saleIndex-B7TBQOB6.mjs +0 -4
  29. package/dist/saleIndex.vue_vue_type_script_setup_true_lang-B6wKXUcV.mjs +0 -415
  30. package/dist/shelfIndex-BfsIMQfD.mjs +0 -4
  31. package/dist/shelfIndex.vue_vue_type_script_setup_true_lang-C6RfhqIl.mjs +0 -447
  32. package/dts/components/GoodsUpload/ImageUpload.vue.d.ts +0 -40
  33. package/dts/components/GoodsUpload/MultiUpload.vue.d.ts +0 -24
  34. package/dts/components/GoodsUpload/index.vue.d.ts +0 -18
  35. package/dts/views/goods/goods-spu/auditIndex.vue.d.ts +0 -2
  36. package/dts/views/goods/goods-spu/saleIndex.vue.d.ts +0 -2
  37. package/dts/views/goods/goods-spu/shelfIndex.vue.d.ts +0 -2
  38. /package/dts/views/goods/{goods-spu/approveFailIndex.vue.d.ts → goods-category/index.vue.d.ts} +0 -0
@@ -1,139 +0,0 @@
1
- var p = Object.defineProperty;
2
- var h = (a, t, i) => t in a ? p(a, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[t] = i;
3
- var s = (a, t, i) => h(a, typeof t != "symbol" ? t + "" : t, i);
4
- import { BizDict as S, BizLayDict as E, EnumDict as l } from "jmash-core";
5
- import { EntryDict as _ } from "jmash-dict";
6
- import { ref as P, reactive as n } from "vue";
7
- import { goodsCategoryApi as O } from "xyvcard-emall";
8
- import { specValueApi as d, infoApi as v, specInfoApi as A } from "xyvcard-shop";
9
- class e {
10
- }
11
- // 模块
12
- s(e, "MODULE_GOODS", "goods"), // 商品规格类型
13
- s(e, "SPEC_TYPE", {
14
- UNIFIED_SPEC: "UNIFIED_SPEC",
15
- //统一规格
16
- MULTI_SPEC: "MULTI_SPEC"
17
- //多规格
18
- }), // 启用禁用
19
- s(e, "SHELF_VALUES", P([
20
- { key: !0, value: "上架" },
21
- { key: !1, value: "下架" }
22
- ])), // 运费类型
23
- s(e, "ENUM_FREIGHT_TYPE", "xyvcard.goods.protobuf.FreightType"), // 保障服务
24
- s(e, "DICT_GOODS_ENSURE", "goods_ensure"), // 规格类型
25
- s(e, "ENUM_SPEC_TYPE", "xyvcard.goods.protobuf.SpecType"), // 商品查询枚举
26
- s(e, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"), // 审核状态
27
- s(e, "ENUM_APPROVAL_STATUS", "xyvcard.goods.protobuf.ApprovalStatus"), // 审核状态常量
28
- s(e, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(e, "APPROVAL_PASS", "APPROVAL_PASS"), s(e, "APPROVALING", "APPROVALING");
29
- class L {
30
- constructor(t, i) {
31
- s(this, "values", n([]));
32
- // 查询条件
33
- s(this, "query");
34
- this.values.length = 0, this.values.push(...t.value), this.query = i;
35
- }
36
- // 根据给定键获取业务数据项的值的方法
37
- getValue(t) {
38
- for (const i of this.values)
39
- if (i.key == t)
40
- return i.value;
41
- return "";
42
- }
43
- }
44
- class f extends S {
45
- // 实现 useValues 方法
46
- useValues() {
47
- return new Promise((t, i) => {
48
- v.findList(this.query).then(({ data: o }) => {
49
- const r = o.results;
50
- this.values.length = 0, this.values.push(
51
- ...r.map(
52
- (c) => ({
53
- key: c.shopId,
54
- value: c.shopName
55
- })
56
- )
57
- ), t(this.values);
58
- }).catch(i);
59
- });
60
- }
61
- }
62
- class m extends E {
63
- // 实现 useValues 方法
64
- useValues() {
65
- return new Promise((t, i) => {
66
- O.findTreeListApi().then(({ data: o }) => {
67
- this.values.length = 0, this.values.push(...o.results), t(this.values);
68
- }).catch(i);
69
- });
70
- }
71
- }
72
- class y extends S {
73
- // 实现 useValues 方法
74
- useValues() {
75
- return new Promise((t, i) => {
76
- A.findList(this.query).then(({ data: o }) => {
77
- const r = o.results;
78
- this.values.length = 0, this.values.push(
79
- ...r.map(
80
- (c) => ({
81
- key: c.specId,
82
- value: c.specName,
83
- disabled: c.disabled
84
- })
85
- )
86
- ), t(this.values);
87
- }).catch(i);
88
- });
89
- }
90
- }
91
- class D extends S {
92
- // 实现 useValues 方法
93
- useValues() {
94
- return new Promise((t, i) => {
95
- d.findList(this.query).then(({ data: o }) => {
96
- const r = o.results;
97
- this.values.length = 0, this.values.push(
98
- ...r.map(
99
- (c) => ({
100
- key: c.specValueId,
101
- value: c.valueName
102
- })
103
- )
104
- ), t(this.values);
105
- }).catch(i);
106
- });
107
- }
108
- }
109
- class u {
110
- }
111
- // 店铺列表
112
- s(u, "shopInfoBizDict", new f({})), // 商品分类
113
- s(u, "goodsCategoryDict", new m({})), // 规格列表
114
- s(u, "specInfoDict", new y({})), // 规格值
115
- s(u, "specValueDict", new D({})), // 上架下架
116
- s(u, "shelfDict", new L(e.SHELF_VALUES, {})), // 运费类型
117
- s(u, "freightTypeEnum", new l(
118
- e.MODULE_GOODS,
119
- e.ENUM_FREIGHT_TYPE
120
- )), // 保障服务
121
- s(u, "goodsEnsureDict", new _(e.DICT_GOODS_ENSURE)), // 规格类型
122
- s(u, "specTypeEnum", new l(
123
- e.MODULE_GOODS,
124
- e.ENUM_SPEC_TYPE
125
- )), // 商品查询枚举
126
- s(u, "goodsSpuListSortEnum", new l(
127
- e.MODULE_GOODS,
128
- e.ENUM_GOODS_SPU_List_SORT
129
- )), // 审核状态
130
- s(u, "approvalStatusEnum", new l(
131
- e.MODULE_GOODS,
132
- e.ENUM_APPROVAL_STATUS
133
- ));
134
- export {
135
- e as C,
136
- u as D,
137
- D as S,
138
- y as a
139
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./saleIndex.vue_vue_type_script_setup_true_lang-B6wKXUcV.mjs";
2
- export {
3
- f as default
4
- };
@@ -1,415 +0,0 @@
1
- import { defineComponent as Z, getCurrentInstance as ee, ref as $, resolveComponent as u, resolveDirective as oe, openBlock as i, createElementBlock as v, createElementVNode as d, createVNode as t, withCtx as o, unref as a, withKeys as D, createTextVNode as m, toDisplayString as p, withDirectives as V, createBlock as I, isRef as R, createCommentVNode as le, Fragment as z } from "vue";
2
- import { ElMessage as j } from "element-plus";
3
- import { useRouter as te } from "vue-router";
4
- import { useTableHooks as ae, fileApi as E } from "jmash-core";
5
- import { useI18n as se } from "vue-i18n";
6
- import { goodsSpuApi as A } from "./index.mjs";
7
- import { C as ne, D as c } from "./index-CKeHa-Cx.mjs";
8
- const ue = { class: "search-container" }, pe = ["onClick"], we = /* @__PURE__ */ Z({
9
- __name: "saleIndex",
10
- setup(re) {
11
- const { t: w } = se(), T = te(), { proxy: B } = ee(), r = $({
12
- curPage: 1,
13
- pageSize: 10,
14
- shelf: "true",
15
- approvalStatus: ne.APPROVAL_PASS
16
- }), {
17
- tableHooks: n,
18
- multipleTableRef: k,
19
- queryFormRef: L,
20
- listLoading: q,
21
- tableData: H,
22
- total: b
23
- } = ae(w, A, r);
24
- let h = $([
25
- {
26
- label: "goodsSpu.shopId",
27
- prop: "shopId",
28
- slotName: "shopId",
29
- columnType: "slot",
30
- width: "250",
31
- isColumn: !0
32
- },
33
- {
34
- label: "goodsSpu.spuName",
35
- prop: "spuName",
36
- width: "200",
37
- isColumn: !0
38
- },
39
- {
40
- label: "goodsSpu.picUrls",
41
- prop: "picUrls",
42
- slotName: "picUrls",
43
- columnType: "slot",
44
- width: "100",
45
- isColumn: !0
46
- },
47
- {
48
- label: "goodsSpu.categoryId",
49
- prop: "categoryId",
50
- slotName: "categoryId",
51
- columnType: "slot",
52
- width: "150",
53
- isColumn: !0
54
- },
55
- {
56
- label: "goodsSpu.price",
57
- prop: "minPrice",
58
- width: "120",
59
- sortable: "custom",
60
- slotName: "minPrice",
61
- columnType: "slot",
62
- isColumn: !0
63
- },
64
- {
65
- label: "goodsSpu.spuCode",
66
- prop: "spuCode",
67
- width: "120",
68
- sortable: "custom",
69
- isColumn: !0
70
- },
71
- {
72
- label: "goodsSpu.saleNum",
73
- prop: "saleNum",
74
- width: "120",
75
- sortable: "custom",
76
- isColumn: !0
77
- },
78
- {
79
- label: "goodsSpu.specType",
80
- prop: "specType",
81
- width: "120",
82
- slotName: "specType",
83
- columnType: "slot",
84
- sortable: "custom",
85
- isColumn: !0
86
- },
87
- {
88
- label: "goodsSpu.shelf",
89
- prop: "shelf",
90
- width: "120",
91
- slotName: "shelf",
92
- columnType: "slot",
93
- sortable: "custom",
94
- isColumn: !0
95
- },
96
- {
97
- label: "goodsSpu.approvalStatus",
98
- prop: "approvalStatus",
99
- width: "120",
100
- slotName: "approvalStatus",
101
- columnType: "slot",
102
- isColumn: !0
103
- },
104
- {
105
- label: "goodsSpu.updateTime",
106
- prop: "updateTime",
107
- width: "180",
108
- sortable: "custom",
109
- slotName: "updateTime",
110
- columnType: "slot",
111
- isColumn: !0
112
- },
113
- {
114
- label: "common.operate",
115
- width: "200",
116
- slotName: "operation",
117
- columnType: "slot",
118
- fixed: "right",
119
- isColumn: !0
120
- }
121
- ]);
122
- c.shopInfoBizDict.useValues(), c.goodsCategoryDict.useValues();
123
- function Q() {
124
- T.push({ path: "/rawgoods/goods-spu/edit" });
125
- }
126
- function Y(s) {
127
- T.push({
128
- path: "/rawgoods/goods-spu/info",
129
- query: { spuId: s.spuId }
130
- });
131
- }
132
- function F(s) {
133
- n.selectionRows.value = s;
134
- }
135
- function K(s) {
136
- n.handleSort(s.prop, s.order);
137
- }
138
- function M() {
139
- if (n.selectionRows.value.length === 0) {
140
- j({
141
- message: w("goodsSpu.chooseShelf"),
142
- type: "warning"
143
- });
144
- return;
145
- }
146
- const s = n.selectionRows.value.map((l) => l.spuId);
147
- A.enable({ spuId: s }, !1).then((l) => {
148
- var y;
149
- l.status === 200 && j({
150
- message: w("goodsSpu.successOffShelf") + l.data + w("common.stripData"),
151
- type: "success"
152
- }), n.getList(), (y = k.value) == null || y.clearSelection();
153
- });
154
- }
155
- return n.getList(), (s, l) => {
156
- const y = u("jmash-select"), S = u("el-form-item"), g = u("el-col"), N = u("el-input"), _ = u("el-button"), P = u("el-row"), O = u("el-form"), x = u("jmash-column-select"), G = u("el-image"), U = u("el-switch"), J = u("jmash-table"), W = u("jmash-pagination"), X = u("el-card"), C = oe("hasPerm");
157
- return i(), v("div", null, [
158
- d("div", ue, [
159
- t(O, {
160
- ref_key: "queryFormRef",
161
- ref: L,
162
- model: r.value,
163
- inline: !0
164
- }, {
165
- default: o(() => [
166
- t(P, null, {
167
- default: o(() => [
168
- t(g, { span: 6 }, {
169
- default: o(() => [
170
- t(S, {
171
- label: s.$t("goodsSpu.shopId"),
172
- prop: "shopId"
173
- }, {
174
- default: o(() => [
175
- t(y, {
176
- modelValue: r.value.shopId,
177
- "onUpdate:modelValue": l[0] || (l[0] = (e) => r.value.shopId = e),
178
- placeholder: s.$t("goodsSpu.shopIdRequired"),
179
- data: a(c).shopInfoBizDict.values,
180
- filterable: ""
181
- }, null, 8, ["modelValue", "placeholder", "data"])
182
- ]),
183
- _: 1
184
- }, 8, ["label"])
185
- ]),
186
- _: 1
187
- }),
188
- t(g, { span: 6 }, {
189
- default: o(() => [
190
- t(S, {
191
- label: s.$t("goodsSpu.spuCode"),
192
- prop: "spuCode"
193
- }, {
194
- default: o(() => [
195
- t(N, {
196
- modelValue: r.value.spuCode,
197
- "onUpdate:modelValue": l[1] || (l[1] = (e) => r.value.spuCode = e),
198
- placeholder: s.$t("goodsSpu.spuCode"),
199
- onKeyup: l[2] || (l[2] = D((e) => a(n).handleQuery(), ["enter"])),
200
- class: "!w-[203px]"
201
- }, null, 8, ["modelValue", "placeholder"])
202
- ]),
203
- _: 1
204
- }, 8, ["label"])
205
- ]),
206
- _: 1
207
- }),
208
- t(g, { span: 6 }, {
209
- default: o(() => [
210
- t(S, {
211
- label: s.$t("goodsSpu.spuName"),
212
- prop: "likeSpuName"
213
- }, {
214
- default: o(() => [
215
- t(N, {
216
- modelValue: r.value.likeSpuName,
217
- "onUpdate:modelValue": l[3] || (l[3] = (e) => r.value.likeSpuName = e),
218
- placeholder: s.$t("goodsSpu.spuName"),
219
- onKeyup: l[4] || (l[4] = D((e) => a(n).handleQuery(), ["enter"])),
220
- class: "!w-[203px]"
221
- }, null, 8, ["modelValue", "placeholder"])
222
- ]),
223
- _: 1
224
- }, 8, ["label"])
225
- ]),
226
- _: 1
227
- }),
228
- t(g, { span: 6 }, {
229
- default: o(() => [
230
- t(S, { class: "search-btn" }, {
231
- default: o(() => [
232
- t(_, {
233
- type: "primary",
234
- onClick: l[5] || (l[5] = (e) => a(n).handleQuery())
235
- }, {
236
- default: o(() => [
237
- m(p(s.$t("common.search")), 1)
238
- ]),
239
- _: 1
240
- }),
241
- t(_, {
242
- onClick: l[6] || (l[6] = (e) => a(n).resetQuery())
243
- }, {
244
- default: o(() => [
245
- m(p(s.$t("common.reset")), 1)
246
- ]),
247
- _: 1
248
- })
249
- ]),
250
- _: 1
251
- })
252
- ]),
253
- _: 1
254
- })
255
- ]),
256
- _: 1
257
- })
258
- ]),
259
- _: 1
260
- }, 8, ["model"])
261
- ]),
262
- t(X, {
263
- shadow: "never",
264
- class: "table-container"
265
- }, {
266
- header: o(() => [
267
- t(P, null, {
268
- default: o(() => [
269
- t(g, { span: 17 }, {
270
- default: o(() => [
271
- V((i(), I(_, {
272
- type: "primary",
273
- onClick: Q
274
- }, {
275
- default: o(() => [
276
- m(p(s.$t("common.add")), 1)
277
- ]),
278
- _: 1
279
- })), [
280
- [C, ["goods:goods_spu:add"]]
281
- ]),
282
- V((i(), I(_, {
283
- type: "primary",
284
- onClick: M
285
- }, {
286
- default: o(() => [
287
- m(p(s.$t("goodsSpu.batchOffShelf")), 1)
288
- ]),
289
- _: 1
290
- })), [
291
- [C, ["goods:goods_spu:onSale"]]
292
- ])
293
- ]),
294
- _: 1
295
- }),
296
- t(g, {
297
- span: 7,
298
- class: "container-float"
299
- }, {
300
- default: o(() => [
301
- t(x, {
302
- modelValue: a(h),
303
- "onUpdate:modelValue": l[7] || (l[7] = (e) => R(h) ? h.value = e : h = e),
304
- "label-name": "goods/goods-spu"
305
- }, null, 8, ["modelValue"])
306
- ]),
307
- _: 1
308
- })
309
- ]),
310
- _: 1
311
- })
312
- ]),
313
- footer: o(() => [
314
- a(b) > 0 ? (i(), I(W, {
315
- key: 0,
316
- total: a(b),
317
- "onUpdate:total": l[8] || (l[8] = (e) => R(b) ? b.value = e : null),
318
- "current-page": r.value.curPage,
319
- "onUpdate:currentPage": l[9] || (l[9] = (e) => r.value.curPage = e),
320
- "page-size": r.value.pageSize,
321
- "onUpdate:pageSize": l[10] || (l[10] = (e) => r.value.pageSize = e),
322
- onPagination: l[11] || (l[11] = (e) => a(n).getList())
323
- }, null, 8, ["total", "current-page", "page-size"])) : le("", !0)
324
- ]),
325
- default: o(() => [
326
- t(J, {
327
- ref_key: "multipleTableRef",
328
- ref: k,
329
- "row-key": "spuId",
330
- "list-loading": a(q),
331
- data: a(H),
332
- "table-label": a(h),
333
- onSelectionChange: F,
334
- onSortChange: K
335
- }, {
336
- shopId: o((e) => [
337
- d("span", null, p(a(c).shopInfoBizDict.getValue(e.data.row.shopId)), 1)
338
- ]),
339
- categoryId: o((e) => [
340
- d("span", null, p(a(c).goodsCategoryDict.getValue(e.data.row.categoryId)), 1)
341
- ]),
342
- picUrls: o((e) => [
343
- d("span", null, [
344
- t(G, {
345
- src: a(E).imageUrl(e.data.row.picUrls.split(",")[0], 50, 50),
346
- "preview-src-list": [
347
- a(E).imageUrl(e.data.row.picUrls.split(",")[0])
348
- ],
349
- "preview-teleported": "",
350
- "hide-on-click-modal": "",
351
- fit: "contain"
352
- }, null, 8, ["src", "preview-src-list"])
353
- ])
354
- ]),
355
- shelf: o((e) => [
356
- d("span", null, [
357
- t(U, {
358
- modelValue: e.data.row.shelf,
359
- "onUpdate:modelValue": (f) => e.data.row.shelf = f,
360
- onClick: (f) => a(n).enableRecord(e.data.row, e.data.row.shelf)
361
- }, null, 8, ["modelValue", "onUpdate:modelValue", "onClick"])
362
- ])
363
- ]),
364
- minPrice: o((e) => [
365
- d("span", null, [
366
- e.data.row.minPrice === e.data.row.maxPrice ? (i(), v(z, { key: 0 }, [
367
- m(p(e.data.row.minPrice), 1)
368
- ], 64)) : (i(), v(z, { key: 1 }, [
369
- m(p(e.data.row.minPrice) + " ~ " + p(e.data.row.maxPrice), 1)
370
- ], 64))
371
- ])
372
- ]),
373
- specType: o((e) => [
374
- d("span", null, p(a(c).specTypeEnum.getEnumValue(e.data.row.specType)), 1)
375
- ]),
376
- approvalStatus: o((e) => [
377
- d("span", null, p(a(c).approvalStatusEnum.getEnumValue(
378
- e.data.row.approvalStatus
379
- )), 1)
380
- ]),
381
- updateTime: o((e) => [
382
- d("span", null, p(a(B).$moment.formatDate(
383
- e.data.row.updateTime,
384
- "YYYY-MM-DD HH:mm:ss"
385
- )), 1)
386
- ]),
387
- enable: o((e) => [
388
- t(U, {
389
- modelValue: e.data.row.enable,
390
- "onUpdate:modelValue": (f) => e.data.row.enable = f,
391
- onChange: (f) => a(n).enableRecord(e.data.row, e.data.row.enable)
392
- }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
393
- ]),
394
- operation: o((e) => [
395
- V((i(), v("span", {
396
- class: "el-button-color",
397
- onClick: (f) => Y(e.data.row)
398
- }, [
399
- m(p(s.$t("common.view")), 1)
400
- ], 8, pe)), [
401
- [C, ["goods:goods_spu:view"]]
402
- ])
403
- ]),
404
- _: 1
405
- }, 8, ["list-loading", "data", "table-label"])
406
- ]),
407
- _: 1
408
- })
409
- ]);
410
- };
411
- }
412
- });
413
- export {
414
- we as _
415
- };
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./shelfIndex.vue_vue_type_script_setup_true_lang-C6RfhqIl.mjs";
2
- export {
3
- f as default
4
- };