xyvcard-goods 0.0.1 → 0.0.2

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 (31) hide show
  1. package/dist/{approveFailIndex-gl8MBbK6.mjs → approveFailIndex-BS-H7i3Y.mjs} +1 -1
  2. package/dist/{approvedIndex.vue_vue_type_script_setup_true_lang-Wyt6TM2h.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-CebPGseh.mjs} +111 -94
  3. package/dist/{auditIndex-jOIDtl_l.mjs → auditIndex-DHQPvPdG.mjs} +1 -1
  4. package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-sZD3eYJR.mjs → auditIndex.vue_vue_type_script_setup_true_lang-B-ghb-zu.mjs} +142 -125
  5. package/dist/{edit-DpIovEhA.mjs → edit-DOqDV4qb.mjs} +3792 -3789
  6. package/dist/{index-C9KO9AZw.mjs → el-message-D15RmjW3.mjs} +368 -367
  7. package/dist/{index-BupW0ufK.mjs → index-CIN1Wvug.mjs} +102 -75
  8. package/dist/{index-C9f6Lybt.mjs → index-CZD7OAWo.mjs} +49 -30
  9. package/dist/index.mjs +519 -593
  10. package/dist/info-MqipS9Ok.mjs +311 -0
  11. package/dist/{saleIndex-DOcefF_x.mjs → saleIndex-D2vlM6ww.mjs} +1 -1
  12. package/dist/saleIndex.vue_vue_type_script_setup_true_lang-B1iRvFF9.mjs +428 -0
  13. package/dist/{shelfIndex-CTAReFV-.mjs → shelfIndex-CEgDzOX1.mjs} +1 -1
  14. package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-BG3OCeN_.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-DS__493K.mjs} +174 -160
  15. package/dist/skuForm-BMRF5whq.mjs +419 -0
  16. package/dist/skuTable-Ddo1obnO.mjs +585 -0
  17. package/dist/style.css +1 -1
  18. package/dts/api/goods-spu/types.d.ts +13 -6
  19. package/dts/constant.d.ts +4 -0
  20. package/dts/lang/goods/en.d.ts +1 -68
  21. package/dts/lang/goods/zh-cn.d.ts +0 -44
  22. package/dts/utils/sku.d.ts +19 -0
  23. package/dts/views/goods/goods-spu/skuForm.vue.d.ts +29 -0
  24. package/dts/views/goods/goods-spu/skuTable.vue.d.ts +40 -0
  25. package/package.json +2 -2
  26. package/dist/approveFailIndex.vue_vue_type_script_setup_true_lang-WJ40OU9K.mjs +0 -544
  27. package/dist/approvedIndex-Cn6g11xv.mjs +0 -4
  28. package/dist/info-C6VRixBH.mjs +0 -301
  29. package/dist/saleIndex.vue_vue_type_script_setup_true_lang-Cfv3a-DK.mjs +0 -415
  30. package/dist/sku-form-BAi4HkUM.mjs +0 -463
  31. package/dist/sku-table-CRrisvJ1.mjs +0 -410
@@ -1,415 +0,0 @@
1
- import { defineComponent as W, getCurrentInstance as X, ref as I, reactive as x, resolveComponent as u, resolveDirective as ee, openBlock as f, createElementBlock as T, createElementVNode as d, createVNode as t, withCtx as o, unref as a, withKeys as R, createTextVNode as h, toDisplayString as p, withDirectives as S, createBlock as V, isRef as P, createCommentVNode as oe } from "vue";
2
- import { useRouter as le } from "vue-router";
3
- import { useTableHooks as te, fileApi as z } from "jmash-core";
4
- import { useI18n as ae } from "vue-i18n";
5
- import { g as j } from "./index-fu3gxdt_.mjs";
6
- import { C as se, D as b } from "./index-C9f6Lybt.mjs";
7
- /* empty css */
8
- import { Z as N } from "./index-C9KO9AZw.mjs";
9
- const ne = { class: "app-container" }, pe = { class: "search-container" }, ue = ["onClick"], re = ["onClick"], ye = /* @__PURE__ */ W({
10
- __name: "saleIndex",
11
- setup(de) {
12
- const { t: i } = ae(), E = le(), { proxy: B } = X(), r = I({
13
- curPage: 1,
14
- pageSize: 10,
15
- shelf: "true",
16
- approvalStatus: se.approval_pass
17
- }), { tableHooks: n, multipleTableRef: $, queryFormRef: L, listLoading: q, tableData: H, total: C } = te(i, j, r);
18
- let y = I([
19
- {
20
- label: "goodsSpu.shopId",
21
- prop: "shopId",
22
- slotName: "shopId",
23
- columnType: "slot",
24
- width: "150",
25
- isColumn: !0
26
- },
27
- {
28
- label: "goodsSpu.spuName",
29
- prop: "spuName",
30
- width: "150",
31
- isColumn: !0
32
- },
33
- {
34
- label: "goodsSpu.picUrls",
35
- prop: "picUrls",
36
- slotName: "picUrls",
37
- columnType: "slot",
38
- width: "100",
39
- isColumn: !0
40
- },
41
- {
42
- label: "goodsSpu.categoryId",
43
- prop: "categoryId",
44
- slotName: "categoryId",
45
- columnType: "slot",
46
- width: "150",
47
- isColumn: !0
48
- },
49
- {
50
- label: "goodsSpu.price",
51
- prop: "minPrice",
52
- width: "130",
53
- sortable: "custom",
54
- slotName: "minPrice",
55
- columnType: "slot",
56
- isColumn: !0
57
- },
58
- {
59
- label: "goodsSpu.spuCode",
60
- prop: "spuCode",
61
- width: "150",
62
- sortable: "custom",
63
- isColumn: !0
64
- },
65
- {
66
- label: "goodsSpu.saleNum",
67
- prop: "saleNum",
68
- width: "120",
69
- sortable: "custom",
70
- isColumn: !0
71
- },
72
- {
73
- label: "goodsSpu.specType",
74
- prop: "specType",
75
- width: "130",
76
- slotName: "specType",
77
- columnType: "slot",
78
- sortable: "custom",
79
- isColumn: !0
80
- },
81
- {
82
- label: "goodsSpu.shelf",
83
- prop: "shelf",
84
- width: "150",
85
- slotName: "shelf",
86
- columnType: "slot",
87
- sortable: "custom",
88
- isColumn: !0
89
- },
90
- {
91
- label: "goodsSpu.approvalStatus",
92
- prop: "approvalStatus",
93
- width: "130",
94
- slotName: "approvalStatus",
95
- columnType: "slot",
96
- isColumn: !0
97
- },
98
- {
99
- label: "goodsSpu.updateTime",
100
- prop: "updateTime",
101
- width: "180",
102
- sortable: "custom",
103
- slotName: "updateTime",
104
- columnType: "slot",
105
- isColumn: !0
106
- },
107
- {
108
- label: "common.operate",
109
- width: "200",
110
- slotName: "operation",
111
- columnType: "slot",
112
- fixed: "right",
113
- isColumn: !0
114
- }
115
- ]);
116
- b.shopInfoBizDict.useValues(), b.goodsCategoryDict.useValues(), I({
117
- title: i("common.edit"),
118
- visible: !1
119
- }), x({});
120
- function Q() {
121
- E.push({ path: "/rawgoods/goods-spu/edit" });
122
- }
123
- function Y(s) {
124
- n.selectionRows.value = s;
125
- }
126
- function A(s) {
127
- n.handleSort(s.prop, s.order);
128
- }
129
- function K(s) {
130
- if (n.selectionRows.value.length === 0) {
131
- N({
132
- message: i("goodsSpu.chooseShelf"),
133
- type: "warning"
134
- });
135
- return;
136
- }
137
- const l = n.selectionRows.value.map((m) => m.spuId);
138
- console.log(l), j.enable({ spuId: l }, JSON.parse(s)).then((m) => {
139
- var c;
140
- console.log(m), m.status === 200 && (s === "true" ? N({
141
- message: i("goodsSpu.successShelf") + m.data + i("common.stripData"),
142
- type: "success"
143
- }) : N({
144
- message: i("goodsSpu.successOffShelf") + m.data + i("common.stripData"),
145
- type: "success"
146
- }), n.getList(), (c = $.value) == null || c.clearSelection());
147
- });
148
- }
149
- return n.getList(), (s, l) => {
150
- const m = u("jmash-select"), c = u("el-form-item"), w = u("el-col"), k = u("el-input"), _ = u("el-button"), U = u("el-row"), M = u("el-form"), O = u("jmash-column-select"), F = u("el-image"), D = u("el-switch"), J = u("jmash-table"), Z = u("jmash-pagination"), G = u("el-card"), v = ee("hasPerm");
151
- return f(), T("div", ne, [
152
- d("div", pe, [
153
- t(M, {
154
- ref_key: "queryFormRef",
155
- ref: L,
156
- model: r.value,
157
- inline: !0
158
- }, {
159
- default: o(() => [
160
- t(U, null, {
161
- default: o(() => [
162
- t(w, { span: 6 }, {
163
- default: o(() => [
164
- t(c, {
165
- label: s.$t("goodsSpu.shopId"),
166
- prop: "shopId"
167
- }, {
168
- default: o(() => [
169
- t(m, {
170
- modelValue: r.value.shopId,
171
- "onUpdate:modelValue": l[0] || (l[0] = (e) => r.value.shopId = e),
172
- placeholder: s.$t("goodsSpu.shopIdRequired"),
173
- data: a(b).shopInfoBizDict.values,
174
- filterable: ""
175
- }, null, 8, ["modelValue", "placeholder", "data"])
176
- ]),
177
- _: 1
178
- }, 8, ["label"])
179
- ]),
180
- _: 1
181
- }),
182
- t(w, { span: 6 }, {
183
- default: o(() => [
184
- t(c, {
185
- label: s.$t("goodsSpu.spuCode"),
186
- prop: "spuCode"
187
- }, {
188
- default: o(() => [
189
- t(k, {
190
- modelValue: r.value.spuCode,
191
- "onUpdate:modelValue": l[1] || (l[1] = (e) => r.value.spuCode = e),
192
- placeholder: s.$t("goodsSpu.spuCode"),
193
- onKeyup: l[2] || (l[2] = R((e) => a(n).handleQuery(), ["enter"])),
194
- class: "!w-[203px]"
195
- }, null, 8, ["modelValue", "placeholder"])
196
- ]),
197
- _: 1
198
- }, 8, ["label"])
199
- ]),
200
- _: 1
201
- }),
202
- t(w, { span: 6 }, {
203
- default: o(() => [
204
- t(c, {
205
- label: s.$t("goodsSpu.spuName"),
206
- prop: "spuName"
207
- }, {
208
- default: o(() => [
209
- t(k, {
210
- modelValue: r.value.spuName,
211
- "onUpdate:modelValue": l[3] || (l[3] = (e) => r.value.spuName = e),
212
- placeholder: s.$t("goodsSpu.spuName"),
213
- onKeyup: l[4] || (l[4] = R((e) => a(n).handleQuery(), ["enter"])),
214
- class: "!w-[203px]"
215
- }, null, 8, ["modelValue", "placeholder"])
216
- ]),
217
- _: 1
218
- }, 8, ["label"])
219
- ]),
220
- _: 1
221
- }),
222
- t(w, { span: 6 }, {
223
- default: o(() => [
224
- t(c, { class: "search-btn" }, {
225
- default: o(() => [
226
- t(_, {
227
- type: "primary",
228
- onClick: l[5] || (l[5] = (e) => a(n).handleQuery())
229
- }, {
230
- default: o(() => [
231
- h(p(s.$t("common.search")), 1)
232
- ]),
233
- _: 1
234
- }),
235
- t(_, {
236
- onClick: l[6] || (l[6] = (e) => a(n).resetQuery())
237
- }, {
238
- default: o(() => [
239
- h(p(s.$t("common.reset")), 1)
240
- ]),
241
- _: 1
242
- })
243
- ]),
244
- _: 1
245
- })
246
- ]),
247
- _: 1
248
- })
249
- ]),
250
- _: 1
251
- })
252
- ]),
253
- _: 1
254
- }, 8, ["model"])
255
- ]),
256
- t(G, {
257
- shadow: "never",
258
- class: "table-container"
259
- }, {
260
- header: o(() => [
261
- t(U, null, {
262
- default: o(() => [
263
- t(w, { span: 17 }, {
264
- default: o(() => [
265
- S((f(), V(_, {
266
- type: "primary",
267
- onClick: Q
268
- }, {
269
- default: o(() => [
270
- h(p(s.$t("common.add")), 1)
271
- ]),
272
- _: 1
273
- })), [
274
- [v, ["goods:goods_spu:add"]]
275
- ]),
276
- S((f(), V(_, {
277
- type: "primary",
278
- onClick: l[7] || (l[7] = (e) => a(n).deleteRecords())
279
- }, {
280
- default: o(() => [
281
- h(p(s.$t("common.batchDelete")), 1)
282
- ]),
283
- _: 1
284
- })), [
285
- [v, ["goods:goods_spu:delete"]]
286
- ]),
287
- S((f(), V(_, {
288
- type: "primary",
289
- onClick: K
290
- }, {
291
- default: o(() => [
292
- h(p(s.$t("goodsSpu.batchOffShelf")), 1)
293
- ]),
294
- _: 1
295
- })), [
296
- [v, ["goods:goods_spu:onSale"]]
297
- ])
298
- ]),
299
- _: 1
300
- }),
301
- t(w, {
302
- span: 7,
303
- class: "container-float"
304
- }, {
305
- default: o(() => [
306
- t(O, {
307
- modelValue: a(y),
308
- "onUpdate:modelValue": l[8] || (l[8] = (e) => P(y) ? y.value = e : y = e),
309
- "label-name": "goods/goods-spu"
310
- }, null, 8, ["modelValue"])
311
- ]),
312
- _: 1
313
- })
314
- ]),
315
- _: 1
316
- })
317
- ]),
318
- footer: o(() => [
319
- a(C) > 0 ? (f(), V(Z, {
320
- key: 0,
321
- total: a(C),
322
- "onUpdate:total": l[9] || (l[9] = (e) => P(C) ? C.value = e : null),
323
- "current-page": r.value.curPage,
324
- "onUpdate:currentPage": l[10] || (l[10] = (e) => r.value.curPage = e),
325
- "page-size": r.value.pageSize,
326
- "onUpdate:pageSize": l[11] || (l[11] = (e) => r.value.pageSize = e),
327
- onPagination: l[12] || (l[12] = (e) => a(n).getList())
328
- }, null, 8, ["total", "current-page", "page-size"])) : oe("", !0)
329
- ]),
330
- default: o(() => [
331
- t(J, {
332
- ref_key: "multipleTableRef",
333
- ref: $,
334
- "row-key": "spuId",
335
- "list-loading": a(q),
336
- data: a(H),
337
- "table-label": a(y),
338
- onSelectionChange: Y,
339
- onSortChange: A
340
- }, {
341
- shopId: o((e) => [
342
- d("span", null, p(a(b).shopInfoBizDict.getValue(e.data.row.shopId)), 1)
343
- ]),
344
- categoryId: o((e) => [
345
- d("span", null, p(a(b).goodsCategoryDict.getValue(e.data.row.categoryId)), 1)
346
- ]),
347
- picUrls: o((e) => [
348
- d("span", null, [
349
- t(F, {
350
- src: a(z).imageUrl(e.data.row.picUrls.split(",")[0], 50, 50),
351
- "preview-src-list": [a(z).imageUrl(e.data.row.picUrls.split(",")[0])],
352
- "preview-teleported": "",
353
- "hide-on-click-modal": "",
354
- fit: "contain"
355
- }, null, 8, ["src", "preview-src-list"])
356
- ])
357
- ]),
358
- shelf: o((e) => [
359
- d("span", null, [
360
- t(D, {
361
- modelValue: e.data.row.shelf,
362
- "onUpdate:modelValue": (g) => e.data.row.shelf = g,
363
- onClick: (g) => a(n).enableRecord(e.data.row, e.data.row.shelf)
364
- }, null, 8, ["modelValue", "onUpdate:modelValue", "onClick"])
365
- ])
366
- ]),
367
- minPrice: o((e) => [
368
- d("span", null, p(e.data.row.minPrice) + " ~ " + p(e.data.row.maxPrice), 1)
369
- ]),
370
- specType: o((e) => [
371
- d("span", null, p(a(b).specTypeEnum.getEnumValue(e.data.row.specType)), 1)
372
- ]),
373
- approvalStatus: o((e) => [
374
- d("span", null, p(a(b).approvalStatusEnum.getEnumValue(e.data.row.approvalStatus)), 1)
375
- ]),
376
- updateTime: o((e) => [
377
- d("span", null, p(a(B).$moment.formatDate(e.data.row.updateTime, "YYYY-MM-DD HH:mm:ss")), 1)
378
- ]),
379
- enable: o((e) => [
380
- t(D, {
381
- modelValue: e.data.row.enable,
382
- "onUpdate:modelValue": (g) => e.data.row.enable = g,
383
- onChange: (g) => a(n).enableRecord(e.data.row, e.data.row.enable)
384
- }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
385
- ]),
386
- operation: o((e) => [
387
- S((f(), T("span", {
388
- class: "el-button-color dropdown-left",
389
- onClick: (g) => a(n).deleteRecord(e.data.row)
390
- }, [
391
- h(p(s.$t("common.delete")), 1)
392
- ], 8, ue)), [
393
- [v, ["goods:goods_spu:delete"]]
394
- ]),
395
- S((f(), T("span", {
396
- class: "el-button-color dropdown-left",
397
- onClick: (g) => a(n).deleteRecord(e.data.row)
398
- }, [
399
- h(p(s.$t("common.delete")), 1)
400
- ], 8, re)), [
401
- [v, ["goods:goods_spu:delete"]]
402
- ])
403
- ]),
404
- _: 1
405
- }, 8, ["list-loading", "data", "table-label"])
406
- ]),
407
- _: 1
408
- })
409
- ]);
410
- };
411
- }
412
- });
413
- export {
414
- ye as _
415
- };