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
@@ -0,0 +1,428 @@
1
+ import { defineComponent as X, getCurrentInstance as x, ref as D, resolveComponent as p, resolveDirective as ee, openBlock as m, createElementBlock as I, createElementVNode as d, createVNode as t, withCtx as l, unref as s, withKeys as R, createTextVNode as c, toDisplayString as u, withDirectives as y, 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 g } from "./index-CZD7OAWo.mjs";
7
+ import { Z as E } from "./el-message-D15RmjW3.mjs";
8
+ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe = ["onClick"], re = ["onClick"], we = /* @__PURE__ */ X({
9
+ __name: "saleIndex",
10
+ setup(de) {
11
+ const { t: _ } = ae(), T = le(), { proxy: B } = x(), r = D({
12
+ curPage: 1,
13
+ pageSize: 10,
14
+ shelf: "true",
15
+ approvalStatus: se.approval_pass
16
+ }), {
17
+ tableHooks: n,
18
+ multipleTableRef: $,
19
+ queryFormRef: q,
20
+ listLoading: L,
21
+ tableData: H,
22
+ total: v
23
+ } = te(_, j, r);
24
+ let h = D([
25
+ {
26
+ label: "goodsSpu.shopId",
27
+ prop: "shopId",
28
+ slotName: "shopId",
29
+ columnType: "slot",
30
+ width: "150",
31
+ isColumn: !0
32
+ },
33
+ {
34
+ label: "goodsSpu.spuName",
35
+ prop: "spuName",
36
+ width: "150",
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: "130",
59
+ sortable: "custom",
60
+ slotName: "minPrice",
61
+ columnType: "slot",
62
+ isColumn: !0
63
+ },
64
+ {
65
+ label: "goodsSpu.spuCode",
66
+ prop: "spuCode",
67
+ width: "150",
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: "130",
82
+ slotName: "specType",
83
+ columnType: "slot",
84
+ sortable: "custom",
85
+ isColumn: !0
86
+ },
87
+ {
88
+ label: "goodsSpu.shelf",
89
+ prop: "shelf",
90
+ width: "150",
91
+ slotName: "shelf",
92
+ columnType: "slot",
93
+ sortable: "custom",
94
+ isColumn: !0
95
+ },
96
+ {
97
+ label: "goodsSpu.approvalStatus",
98
+ prop: "approvalStatus",
99
+ width: "130",
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
+ g.shopInfoBizDict.useValues(), g.goodsCategoryDict.useValues();
123
+ function Q() {
124
+ T.push({ path: "/rawgoods/goods-spu/edit" });
125
+ }
126
+ function Y(a) {
127
+ T.push({
128
+ path: "/rawgoods/goods-spu/info",
129
+ query: { spuId: a.spuId }
130
+ });
131
+ }
132
+ function A(a) {
133
+ n.selectionRows.value = a;
134
+ }
135
+ function K(a) {
136
+ n.handleSort(a.prop, a.order);
137
+ }
138
+ function M() {
139
+ if (n.selectionRows.value.length === 0) {
140
+ E({
141
+ message: _("goodsSpu.chooseShelf"),
142
+ type: "warning"
143
+ });
144
+ return;
145
+ }
146
+ const a = n.selectionRows.value.map((o) => o.spuId);
147
+ console.log(a), j.enable({ spuId: a }, !1).then((o) => {
148
+ var C;
149
+ console.log(o), o.status === 200 && E({
150
+ message: _("goodsSpu.successOffShelf") + o.data + _("common.stripData"),
151
+ type: "success"
152
+ }), n.getList(), (C = $.value) == null || C.clearSelection();
153
+ });
154
+ }
155
+ return n.getList(), (a, o) => {
156
+ const C = p("jmash-select"), S = p("el-form-item"), f = p("el-col"), N = p("el-input"), b = p("el-button"), k = p("el-row"), F = p("el-form"), O = p("jmash-column-select"), Z = p("el-image"), U = p("el-switch"), G = p("jmash-table"), J = p("jmash-pagination"), W = p("el-card"), w = ee("hasPerm");
157
+ return m(), I("div", ne, [
158
+ d("div", ue, [
159
+ t(F, {
160
+ ref_key: "queryFormRef",
161
+ ref: q,
162
+ model: r.value,
163
+ inline: !0
164
+ }, {
165
+ default: l(() => [
166
+ t(k, null, {
167
+ default: l(() => [
168
+ t(f, { span: 6 }, {
169
+ default: l(() => [
170
+ t(S, {
171
+ label: a.$t("goodsSpu.shopId"),
172
+ prop: "shopId"
173
+ }, {
174
+ default: l(() => [
175
+ t(C, {
176
+ modelValue: r.value.shopId,
177
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => r.value.shopId = e),
178
+ placeholder: a.$t("goodsSpu.shopIdRequired"),
179
+ data: s(g).shopInfoBizDict.values,
180
+ filterable: ""
181
+ }, null, 8, ["modelValue", "placeholder", "data"])
182
+ ]),
183
+ _: 1
184
+ }, 8, ["label"])
185
+ ]),
186
+ _: 1
187
+ }),
188
+ t(f, { span: 6 }, {
189
+ default: l(() => [
190
+ t(S, {
191
+ label: a.$t("goodsSpu.spuCode"),
192
+ prop: "spuCode"
193
+ }, {
194
+ default: l(() => [
195
+ t(N, {
196
+ modelValue: r.value.spuCode,
197
+ "onUpdate:modelValue": o[1] || (o[1] = (e) => r.value.spuCode = e),
198
+ placeholder: a.$t("goodsSpu.spuCode"),
199
+ onKeyup: o[2] || (o[2] = R((e) => s(n).handleQuery(), ["enter"])),
200
+ class: "!w-[203px]"
201
+ }, null, 8, ["modelValue", "placeholder"])
202
+ ]),
203
+ _: 1
204
+ }, 8, ["label"])
205
+ ]),
206
+ _: 1
207
+ }),
208
+ t(f, { span: 6 }, {
209
+ default: l(() => [
210
+ t(S, {
211
+ label: a.$t("goodsSpu.spuName"),
212
+ prop: "spuName"
213
+ }, {
214
+ default: l(() => [
215
+ t(N, {
216
+ modelValue: r.value.spuName,
217
+ "onUpdate:modelValue": o[3] || (o[3] = (e) => r.value.spuName = e),
218
+ placeholder: a.$t("goodsSpu.spuName"),
219
+ onKeyup: o[4] || (o[4] = R((e) => s(n).handleQuery(), ["enter"])),
220
+ class: "!w-[203px]"
221
+ }, null, 8, ["modelValue", "placeholder"])
222
+ ]),
223
+ _: 1
224
+ }, 8, ["label"])
225
+ ]),
226
+ _: 1
227
+ }),
228
+ t(f, { span: 6 }, {
229
+ default: l(() => [
230
+ t(S, { class: "search-btn" }, {
231
+ default: l(() => [
232
+ t(b, {
233
+ type: "primary",
234
+ onClick: o[5] || (o[5] = (e) => s(n).handleQuery())
235
+ }, {
236
+ default: l(() => [
237
+ c(u(a.$t("common.search")), 1)
238
+ ]),
239
+ _: 1
240
+ }),
241
+ t(b, {
242
+ onClick: o[6] || (o[6] = (e) => s(n).resetQuery())
243
+ }, {
244
+ default: l(() => [
245
+ c(u(a.$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(W, {
263
+ shadow: "never",
264
+ class: "table-container"
265
+ }, {
266
+ header: l(() => [
267
+ t(k, null, {
268
+ default: l(() => [
269
+ t(f, { span: 17 }, {
270
+ default: l(() => [
271
+ y((m(), V(b, {
272
+ type: "primary",
273
+ onClick: Q
274
+ }, {
275
+ default: l(() => [
276
+ c(u(a.$t("common.add")), 1)
277
+ ]),
278
+ _: 1
279
+ })), [
280
+ [w, ["goods:goods_spu:add"]]
281
+ ]),
282
+ y((m(), V(b, {
283
+ type: "primary",
284
+ onClick: o[7] || (o[7] = (e) => s(n).deleteRecords())
285
+ }, {
286
+ default: l(() => [
287
+ c(u(a.$t("common.batchDelete")), 1)
288
+ ]),
289
+ _: 1
290
+ })), [
291
+ [w, ["goods:goods_spu:delete"]]
292
+ ]),
293
+ y((m(), V(b, {
294
+ type: "primary",
295
+ onClick: M
296
+ }, {
297
+ default: l(() => [
298
+ c(u(a.$t("goodsSpu.batchOffShelf")), 1)
299
+ ]),
300
+ _: 1
301
+ })), [
302
+ [w, ["goods:goods_spu:onSale"]]
303
+ ])
304
+ ]),
305
+ _: 1
306
+ }),
307
+ t(f, {
308
+ span: 7,
309
+ class: "container-float"
310
+ }, {
311
+ default: l(() => [
312
+ t(O, {
313
+ modelValue: s(h),
314
+ "onUpdate:modelValue": o[8] || (o[8] = (e) => P(h) ? h.value = e : h = e),
315
+ "label-name": "goods/goods-spu"
316
+ }, null, 8, ["modelValue"])
317
+ ]),
318
+ _: 1
319
+ })
320
+ ]),
321
+ _: 1
322
+ })
323
+ ]),
324
+ footer: l(() => [
325
+ s(v) > 0 ? (m(), V(J, {
326
+ key: 0,
327
+ total: s(v),
328
+ "onUpdate:total": o[9] || (o[9] = (e) => P(v) ? v.value = e : null),
329
+ "current-page": r.value.curPage,
330
+ "onUpdate:currentPage": o[10] || (o[10] = (e) => r.value.curPage = e),
331
+ "page-size": r.value.pageSize,
332
+ "onUpdate:pageSize": o[11] || (o[11] = (e) => r.value.pageSize = e),
333
+ onPagination: o[12] || (o[12] = (e) => s(n).getList())
334
+ }, null, 8, ["total", "current-page", "page-size"])) : oe("", !0)
335
+ ]),
336
+ default: l(() => [
337
+ t(G, {
338
+ ref_key: "multipleTableRef",
339
+ ref: $,
340
+ "row-key": "spuId",
341
+ "list-loading": s(L),
342
+ data: s(H),
343
+ "table-label": s(h),
344
+ onSelectionChange: A,
345
+ onSortChange: K
346
+ }, {
347
+ shopId: l((e) => [
348
+ d("span", null, u(s(g).shopInfoBizDict.getValue(e.data.row.shopId)), 1)
349
+ ]),
350
+ categoryId: l((e) => [
351
+ d("span", null, u(s(g).goodsCategoryDict.getValue(e.data.row.categoryId)), 1)
352
+ ]),
353
+ picUrls: l((e) => [
354
+ d("span", null, [
355
+ t(Z, {
356
+ src: s(z).imageUrl(e.data.row.picUrls.split(",")[0], 50, 50),
357
+ "preview-src-list": [
358
+ s(z).imageUrl(e.data.row.picUrls.split(",")[0])
359
+ ],
360
+ "preview-teleported": "",
361
+ "hide-on-click-modal": "",
362
+ fit: "contain"
363
+ }, null, 8, ["src", "preview-src-list"])
364
+ ])
365
+ ]),
366
+ shelf: l((e) => [
367
+ d("span", null, [
368
+ t(U, {
369
+ modelValue: e.data.row.shelf,
370
+ "onUpdate:modelValue": (i) => e.data.row.shelf = i,
371
+ onClick: (i) => s(n).enableRecord(e.data.row, e.data.row.shelf)
372
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "onClick"])
373
+ ])
374
+ ]),
375
+ minPrice: l((e) => [
376
+ d("span", null, u(e.data.row.minPrice) + " ~ " + u(e.data.row.maxPrice), 1)
377
+ ]),
378
+ specType: l((e) => [
379
+ d("span", null, u(s(g).specTypeEnum.getEnumValue(e.data.row.specType)), 1)
380
+ ]),
381
+ approvalStatus: l((e) => [
382
+ d("span", null, u(s(g).approvalStatusEnum.getEnumValue(
383
+ e.data.row.approvalStatus
384
+ )), 1)
385
+ ]),
386
+ updateTime: l((e) => [
387
+ d("span", null, u(s(B).$moment.formatDate(
388
+ e.data.row.updateTime,
389
+ "YYYY-MM-DD HH:mm:ss"
390
+ )), 1)
391
+ ]),
392
+ enable: l((e) => [
393
+ t(U, {
394
+ modelValue: e.data.row.enable,
395
+ "onUpdate:modelValue": (i) => e.data.row.enable = i,
396
+ onChange: (i) => s(n).enableRecord(e.data.row, e.data.row.enable)
397
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
398
+ ]),
399
+ operation: l((e) => [
400
+ y((m(), I("span", {
401
+ class: "el-button-color",
402
+ onClick: (i) => s(n).deleteRecord(e.data.row)
403
+ }, [
404
+ c(u(a.$t("common.delete")), 1)
405
+ ], 8, pe)), [
406
+ [w, ["goods:goods_spu:delete"]]
407
+ ]),
408
+ y((m(), I("span", {
409
+ class: "el-button-color dropdown-left",
410
+ onClick: (i) => Y(e.data.row)
411
+ }, [
412
+ c(u(a.$t("common.view")), 1)
413
+ ], 8, re)), [
414
+ [w, ["goods:goods_spu:view"]]
415
+ ])
416
+ ]),
417
+ _: 1
418
+ }, 8, ["list-loading", "data", "table-label"])
419
+ ]),
420
+ _: 1
421
+ })
422
+ ]);
423
+ };
424
+ }
425
+ });
426
+ export {
427
+ we as _
428
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./shelfIndex.vue_vue_type_script_setup_true_lang-BG3OCeN_.mjs";
1
+ import { _ as f } from "./shelfIndex.vue_vue_type_script_setup_true_lang-DS__493K.mjs";
2
2
  export {
3
3
  f as default
4
4
  };