xyvcard-goods 0.0.11 → 0.0.13

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.
@@ -1,613 +0,0 @@
1
- import { defineComponent as he, getCurrentInstance as we, ref as A, resolveComponent as n, resolveDirective as be, openBlock as p, createElementBlock as b, createVNode as t, withCtx as o, Fragment as z, renderList as Se, unref as s, createBlock as g, createElementVNode as _, withKeys as J, createTextVNode as r, toDisplayString as u, withDirectives as y, isRef as G, createCommentVNode as $ } from "vue";
2
- import { ElMessage as I } from "element-plus";
3
- import { useRouter as ve } from "vue-router";
4
- import { useTableHooks as ye, fileApi as W } from "jmash-core";
5
- import { useI18n as Ce } from "vue-i18n";
6
- import { goodsSpuApi as L } from "./index.mjs";
7
- import { D as S, C as j } from "./index-CKeHa-Cx.mjs";
8
- import { _ as ke } from "./saleIndex.vue_vue_type_script_setup_true_lang-B6wKXUcV.mjs";
9
- import { _ as Ve } from "./shelfIndex.vue_vue_type_script_setup_true_lang-C6RfhqIl.mjs";
10
- import { _ as $e } from "./auditIndex.vue_vue_type_script_setup_true_lang-BW22LRCL.mjs";
11
- import { _ as Ie } from "./approveFailIndex.vue_vue_type_script_setup_true_lang-CiIyafoQ.mjs";
12
- const Te = { class: "app-container" }, Ne = { key: 0 }, Pe = { class: "search-container" }, Re = ["onClick"], Ue = ["onClick"], De = ["onClick"], Ke = /* @__PURE__ */ he({
13
- __name: "index",
14
- setup(Ae) {
15
- const { t: c } = Ce(), R = ve(), { proxy: X } = we(), i = A({
16
- curPage: 1,
17
- pageSize: 10
18
- }), {
19
- tableHooks: d,
20
- multipleTableRef: U,
21
- queryFormRef: E,
22
- listLoading: Z,
23
- tableData: x,
24
- total: N
25
- } = ye(c, L, i), ee = () => {
26
- E.value[0].resetFields();
27
- };
28
- let T = A([
29
- {
30
- label: "goodsSpu.shopId",
31
- prop: "shopId",
32
- slotName: "shopId",
33
- columnType: "slot",
34
- width: "250",
35
- isColumn: !0
36
- },
37
- {
38
- label: "goodsSpu.spuName",
39
- prop: "spuName",
40
- width: "200",
41
- isColumn: !0
42
- },
43
- {
44
- label: "goodsSpu.picUrls",
45
- prop: "picUrls",
46
- slotName: "picUrls",
47
- columnType: "slot",
48
- width: "100",
49
- isColumn: !0
50
- },
51
- {
52
- label: "goodsSpu.categoryId",
53
- prop: "categoryId",
54
- slotName: "categoryId",
55
- columnType: "slot",
56
- width: "150",
57
- isColumn: !0
58
- },
59
- {
60
- label: "goodsSpu.price",
61
- prop: "minPrice",
62
- width: "120",
63
- sortable: "custom",
64
- slotName: "minPrice",
65
- columnType: "slot",
66
- isColumn: !0
67
- },
68
- {
69
- label: "goodsSpu.spuCode",
70
- prop: "spuCode",
71
- width: "120",
72
- sortable: "custom",
73
- isColumn: !0
74
- },
75
- {
76
- label: "goodsSpu.saleNum",
77
- prop: "saleNum",
78
- width: "120",
79
- sortable: "custom",
80
- isColumn: !0
81
- },
82
- {
83
- label: "goodsSpu.specType",
84
- prop: "specType",
85
- width: "120",
86
- slotName: "specType",
87
- columnType: "slot",
88
- sortable: "custom",
89
- isColumn: !0
90
- },
91
- {
92
- label: "goodsSpu.shelf",
93
- prop: "shelf",
94
- width: "120",
95
- slotName: "shelf",
96
- columnType: "slot",
97
- sortable: "custom",
98
- isColumn: !0
99
- },
100
- {
101
- label: "goodsSpu.approvalStatus",
102
- prop: "approvalStatus",
103
- width: "120",
104
- slotName: "approvalStatus",
105
- columnType: "slot",
106
- isColumn: !0
107
- },
108
- {
109
- label: "goodsSpu.updateTime",
110
- prop: "updateTime",
111
- width: "180",
112
- sortable: "custom",
113
- slotName: "updateTime",
114
- columnType: "slot",
115
- isColumn: !0
116
- },
117
- {
118
- label: "common.operate",
119
- width: "200",
120
- slotName: "operation",
121
- columnType: "slot",
122
- fixed: "right",
123
- isColumn: !0
124
- }
125
- ]);
126
- S.shopInfoBizDict.useValues(), S.goodsCategoryDict.useValues();
127
- const h = A(0);
128
- function oe() {
129
- R.push({ path: "/rawgoods/goods-spu/edit" });
130
- }
131
- function te(l) {
132
- R.push({
133
- path: "/rawgoods/goods-spu/edit",
134
- query: { spuId: l.spuId }
135
- });
136
- }
137
- function le(l) {
138
- R.push({
139
- path: "/rawgoods/goods-spu/info",
140
- query: { spuId: l.spuId }
141
- });
142
- }
143
- function ae(l) {
144
- d.selectionRows.value = l;
145
- }
146
- function se(l) {
147
- d.handleSort(l.prop, l.order);
148
- }
149
- function ne(l) {
150
- if (d.selectionRows.value.length === 0) {
151
- I({
152
- message: c("goodsSpu.chooseShelf"),
153
- type: "warning"
154
- });
155
- return;
156
- }
157
- const a = d.selectionRows.value.map((m) => m.spuId);
158
- L.enable({ spuId: a }, JSON.parse(l)).then((m) => {
159
- var f;
160
- m.status === 200 && (l === "true" ? I({
161
- message: c("goodsSpu.successShelf") + m.data + c("common.stripData"),
162
- type: "success"
163
- }) : I({
164
- message: c("goodsSpu.successOffShelf") + m.data + c("common.stripData"),
165
- type: "success"
166
- }), d.getList(), (f = U.value) == null || f.clearSelection());
167
- });
168
- }
169
- function ue(l) {
170
- if (d.selectionRows.value.length === 0) {
171
- I({
172
- message: c("goodsSpu.chooseShelf"),
173
- type: "warning"
174
- });
175
- return;
176
- }
177
- const a = d.selectionRows.value.map((m) => m.spuId);
178
- L.audit({ spuId: a }, l).then((m) => {
179
- var f;
180
- m.status === 200 && (l === j.APPROVAL_PASS ? I({
181
- message: c("goodsSpu.successApproval") + m.data + c("common.stripData"),
182
- type: "success"
183
- }) : I({
184
- message: c("goodsSpu.successFilled") + m.data + c("common.stripData"),
185
- type: "success"
186
- }), d.getList(), (f = U.value) == null || f.clearSelection());
187
- });
188
- }
189
- function de(l) {
190
- h.value = Number(l.index), Number(l.index) === 0 && d.handleQuery();
191
- }
192
- return d.getList(), (l, a) => {
193
- const m = n("jmash-select"), f = n("el-form-item"), C = n("el-col"), O = n("el-input"), k = n("el-button"), q = n("el-row"), pe = n("el-form"), B = n("arrow-down"), V = n("el-icon"), F = n("Unlock"), P = n("el-dropdown-item"), Q = n("Lock"), H = n("el-dropdown-menu"), Y = n("el-dropdown"), re = n("jmash-column-select"), me = n("el-image"), K = n("el-switch"), ie = n("jmash-table"), ce = n("jmash-pagination"), fe = n("el-card"), ge = n("el-tab-pane"), _e = n("el-tabs"), v = be("hasPerm");
194
- return p(), b("div", Te, [
195
- t(_e, {
196
- modelValue: h.value,
197
- "onUpdate:modelValue": a[12] || (a[12] = (D) => h.value = D),
198
- type: "border-card",
199
- onTabClick: de
200
- }, {
201
- default: o(() => [
202
- (p(!0), b(z, null, Se(s(S).goodsSpuListSortEnum.values, (D, M) => (p(), g(ge, {
203
- key: M,
204
- label: D.value,
205
- name: M
206
- }, {
207
- default: o(() => [
208
- h.value === 0 ? (p(), b("div", Ne, [
209
- _("div", Pe, [
210
- t(pe, {
211
- ref_for: !0,
212
- ref_key: "queryFormRef",
213
- ref: E,
214
- model: i.value,
215
- inline: !0
216
- }, {
217
- default: o(() => [
218
- t(q, null, {
219
- default: o(() => [
220
- t(C, { span: 6 }, {
221
- default: o(() => [
222
- t(f, {
223
- label: l.$t("goodsSpu.shopId"),
224
- prop: "shopId"
225
- }, {
226
- default: o(() => [
227
- t(m, {
228
- modelValue: i.value.shopId,
229
- "onUpdate:modelValue": a[0] || (a[0] = (e) => i.value.shopId = e),
230
- placeholder: l.$t("goodsSpu.shopIdRequired"),
231
- data: s(S).shopInfoBizDict.values,
232
- filterable: ""
233
- }, null, 8, ["modelValue", "placeholder", "data"])
234
- ]),
235
- _: 1
236
- }, 8, ["label"])
237
- ]),
238
- _: 1
239
- }),
240
- t(C, { span: 6 }, {
241
- default: o(() => [
242
- t(f, {
243
- label: l.$t("goodsSpu.spuCode"),
244
- prop: "spuCode"
245
- }, {
246
- default: o(() => [
247
- t(O, {
248
- modelValue: i.value.spuCode,
249
- "onUpdate:modelValue": a[1] || (a[1] = (e) => i.value.spuCode = e),
250
- placeholder: l.$t("goodsSpu.spuCode"),
251
- class: "!w-[203px]",
252
- onKeyup: a[2] || (a[2] = J((e) => s(d).handleQuery(), ["enter"]))
253
- }, null, 8, ["modelValue", "placeholder"])
254
- ]),
255
- _: 1
256
- }, 8, ["label"])
257
- ]),
258
- _: 1
259
- }),
260
- t(C, { span: 6 }, {
261
- default: o(() => [
262
- t(f, {
263
- label: l.$t("goodsSpu.spuName"),
264
- prop: "likeSpuName"
265
- }, {
266
- default: o(() => [
267
- t(O, {
268
- modelValue: i.value.likeSpuName,
269
- "onUpdate:modelValue": a[3] || (a[3] = (e) => i.value.likeSpuName = e),
270
- placeholder: l.$t("goodsSpu.spuName"),
271
- class: "!w-[203px]",
272
- onKeyup: a[4] || (a[4] = J((e) => s(d).handleQuery(), ["enter"]))
273
- }, null, 8, ["modelValue", "placeholder"])
274
- ]),
275
- _: 1
276
- }, 8, ["label"])
277
- ]),
278
- _: 1
279
- }),
280
- t(C, { span: 6 }, {
281
- default: o(() => [
282
- t(f, { class: "search-btn" }, {
283
- default: o(() => [
284
- t(k, {
285
- type: "primary",
286
- onClick: a[5] || (a[5] = (e) => s(d).handleQuery())
287
- }, {
288
- default: o(() => [
289
- r(u(l.$t("common.search")), 1)
290
- ]),
291
- _: 1
292
- }),
293
- t(k, { onClick: ee }, {
294
- default: o(() => [
295
- r(u(l.$t("common.reset")), 1)
296
- ]),
297
- _: 1
298
- })
299
- ]),
300
- _: 1
301
- })
302
- ]),
303
- _: 1
304
- })
305
- ]),
306
- _: 1
307
- })
308
- ]),
309
- _: 1
310
- }, 8, ["model"])
311
- ]),
312
- t(fe, {
313
- shadow: "never",
314
- class: "table-container"
315
- }, {
316
- header: o(() => [
317
- t(q, null, {
318
- default: o(() => [
319
- t(C, { span: 17 }, {
320
- default: o(() => [
321
- y((p(), g(k, {
322
- type: "primary",
323
- onClick: oe
324
- }, {
325
- default: o(() => [
326
- r(u(l.$t("common.add")), 1)
327
- ]),
328
- _: 1
329
- })), [
330
- [v, ["goods:goods_spu:add"]]
331
- ]),
332
- y((p(), g(k, {
333
- type: "primary",
334
- onClick: a[6] || (a[6] = (e) => s(d).deleteRecords())
335
- }, {
336
- default: o(() => [
337
- r(u(l.$t("common.batchDelete")), 1)
338
- ]),
339
- _: 1
340
- })), [
341
- [v, ["goods:goods_spu:delete"]]
342
- ]),
343
- y((p(), g(Y, {
344
- class: "dropdown-left",
345
- onCommand: ne
346
- }, {
347
- dropdown: o(() => [
348
- t(H, null, {
349
- default: o(() => [
350
- t(P, { command: "true" }, {
351
- default: o(() => [
352
- t(V, { size: "14" }, {
353
- default: o(() => [
354
- t(F)
355
- ]),
356
- _: 1
357
- }),
358
- r(" " + u(l.$t("goodsSpu.batchShelf")), 1)
359
- ]),
360
- _: 1
361
- }),
362
- t(P, { command: "false" }, {
363
- default: o(() => [
364
- t(V, { size: "14" }, {
365
- default: o(() => [
366
- t(Q)
367
- ]),
368
- _: 1
369
- }),
370
- r(" " + u(l.$t("goodsSpu.batchOffShelf")), 1)
371
- ]),
372
- _: 1
373
- })
374
- ]),
375
- _: 1
376
- })
377
- ]),
378
- default: o(() => [
379
- t(k, { type: "primary" }, {
380
- default: o(() => [
381
- r(u(l.$t("goodsSpu.batchShelf")) + "/" + u(l.$t("goodsSpu.batchOffShelf")) + " ", 1),
382
- t(V, { class: "el-icon--right" }, {
383
- default: o(() => [
384
- t(B)
385
- ]),
386
- _: 1
387
- })
388
- ]),
389
- _: 1
390
- })
391
- ]),
392
- _: 1
393
- })), [
394
- [v, ["goods:goods_spu:onSale"]]
395
- ]),
396
- y((p(), g(Y, {
397
- class: "dropdown-left",
398
- onCommand: ue
399
- }, {
400
- dropdown: o(() => [
401
- t(H, null, {
402
- default: o(() => [
403
- t(P, {
404
- command: s(j).APPROVAL_PASS
405
- }, {
406
- default: o(() => [
407
- t(V, { size: "14" }, {
408
- default: o(() => [
409
- t(F)
410
- ]),
411
- _: 1
412
- }),
413
- r(" " + u(l.$t("goodsSpu.batchApprovaled")), 1)
414
- ]),
415
- _: 1
416
- }, 8, ["command"]),
417
- t(P, {
418
- command: s(j).APPROVAL_NOT_PASS
419
- }, {
420
- default: o(() => [
421
- t(V, { size: "14" }, {
422
- default: o(() => [
423
- t(Q)
424
- ]),
425
- _: 1
426
- }),
427
- r(" " + u(l.$t("goodsSpu.batchRejected")), 1)
428
- ]),
429
- _: 1
430
- }, 8, ["command"])
431
- ]),
432
- _: 1
433
- })
434
- ]),
435
- default: o(() => [
436
- t(k, { type: "primary" }, {
437
- default: o(() => [
438
- r(u(l.$t("goodsSpu.batchApproval")) + " ", 1),
439
- t(V, { class: "el-icon--right" }, {
440
- default: o(() => [
441
- t(B)
442
- ]),
443
- _: 1
444
- })
445
- ]),
446
- _: 1
447
- })
448
- ]),
449
- _: 1
450
- })), [
451
- [v, ["goods:goods_spu:approve"]]
452
- ])
453
- ]),
454
- _: 1
455
- }),
456
- t(C, {
457
- span: 7,
458
- class: "container-float"
459
- }, {
460
- default: o(() => [
461
- t(re, {
462
- modelValue: s(T),
463
- "onUpdate:modelValue": a[7] || (a[7] = (e) => G(T) ? T.value = e : T = e),
464
- "label-name": "goods/goods-spu"
465
- }, null, 8, ["modelValue"])
466
- ]),
467
- _: 1
468
- })
469
- ]),
470
- _: 1
471
- })
472
- ]),
473
- footer: o(() => [
474
- s(N) > 0 ? (p(), g(ce, {
475
- key: 0,
476
- total: s(N),
477
- "onUpdate:total": a[8] || (a[8] = (e) => G(N) ? N.value = e : null),
478
- "current-page": i.value.curPage,
479
- "onUpdate:currentPage": a[9] || (a[9] = (e) => i.value.curPage = e),
480
- "page-size": i.value.pageSize,
481
- "onUpdate:pageSize": a[10] || (a[10] = (e) => i.value.pageSize = e),
482
- onPagination: a[11] || (a[11] = (e) => s(d).getList())
483
- }, null, 8, ["total", "current-page", "page-size"])) : $("", !0)
484
- ]),
485
- default: o(() => [
486
- t(ie, {
487
- ref_for: !0,
488
- ref_key: "multipleTableRef",
489
- ref: U,
490
- "row-key": "spuId",
491
- "list-loading": s(Z),
492
- data: s(x),
493
- "table-label": s(T),
494
- onSelectionChange: ae,
495
- onSortChange: se
496
- }, {
497
- shopId: o((e) => [
498
- _("span", null, u(s(S).shopInfoBizDict.getValue(e.data.row.shopId)), 1)
499
- ]),
500
- categoryId: o((e) => [
501
- _("span", null, u(s(S).goodsCategoryDict.getValue(e.data.row.categoryId)), 1)
502
- ]),
503
- picUrls: o((e) => [
504
- _("span", null, [
505
- t(me, {
506
- src: s(W).imageUrl(
507
- e.data.row.picUrls.split(",")[0],
508
- 50,
509
- 50
510
- ),
511
- "preview-src-list": [
512
- s(W).imageUrl(e.data.row.picUrls.split(",")[0])
513
- ],
514
- "preview-teleported": "",
515
- "hide-on-click-modal": "",
516
- fit: "contain"
517
- }, null, 8, ["src", "preview-src-list"])
518
- ])
519
- ]),
520
- shelf: o((e) => [
521
- _("span", null, [
522
- t(K, {
523
- modelValue: e.data.row.shelf,
524
- "onUpdate:modelValue": (w) => e.data.row.shelf = w,
525
- onClick: (w) => s(d).enableRecord(
526
- e.data.row,
527
- e.data.row.shelf
528
- )
529
- }, null, 8, ["modelValue", "onUpdate:modelValue", "onClick"])
530
- ])
531
- ]),
532
- minPrice: o((e) => [
533
- _("span", null, [
534
- e.data.row.minPrice === e.data.row.maxPrice ? (p(), b(z, { key: 0 }, [
535
- r(u(e.data.row.minPrice), 1)
536
- ], 64)) : (p(), b(z, { key: 1 }, [
537
- r(u(e.data.row.minPrice) + " ~ " + u(e.data.row.maxPrice), 1)
538
- ], 64))
539
- ])
540
- ]),
541
- specType: o((e) => [
542
- _("span", null, u(s(S).specTypeEnum.getEnumValue(e.data.row.specType)), 1)
543
- ]),
544
- approvalStatus: o((e) => [
545
- _("span", null, u(s(S).approvalStatusEnum.getEnumValue(
546
- e.data.row.approvalStatus
547
- )), 1)
548
- ]),
549
- updateTime: o((e) => [
550
- _("span", null, u(s(X).$moment.formatDate(
551
- e.data.row.updateTime,
552
- "YYYY-MM-DD HH:mm:ss"
553
- )), 1)
554
- ]),
555
- enable: o((e) => [
556
- t(K, {
557
- modelValue: e.data.row.enable,
558
- "onUpdate:modelValue": (w) => e.data.row.enable = w,
559
- onChange: (w) => s(d).enableRecord(
560
- e.data.row,
561
- e.data.row.enable
562
- )
563
- }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
564
- ]),
565
- operation: o((e) => [
566
- y((p(), b("span", {
567
- class: "el-button-color",
568
- onClick: (w) => te(e.data.row)
569
- }, [
570
- r(u(l.$t("common.edit")), 1)
571
- ], 8, Re)), [
572
- [v, ["goods:goods_spu:update"]]
573
- ]),
574
- y((p(), b("span", {
575
- class: "el-button-color dropdown-left",
576
- onClick: (w) => s(d).deleteRecord(e.data.row)
577
- }, [
578
- r(u(l.$t("common.delete")), 1)
579
- ], 8, Ue)), [
580
- [v, ["goods:goods_spu:delete"]]
581
- ]),
582
- y((p(), b("span", {
583
- class: "el-button-color dropdown-left",
584
- onClick: (w) => le(e.data.row)
585
- }, [
586
- r(u(l.$t("common.view")), 1)
587
- ], 8, De)), [
588
- [v, ["goods:goods_spu:view"]]
589
- ])
590
- ]),
591
- _: 1
592
- }, 8, ["list-loading", "data", "table-label"])
593
- ]),
594
- _: 1
595
- })
596
- ])) : $("", !0),
597
- h.value === 1 ? (p(), g(ke, { key: 1 })) : $("", !0),
598
- h.value === 2 ? (p(), g(Ve, { key: 2 })) : $("", !0),
599
- h.value === 3 ? (p(), g($e, { key: 3 })) : $("", !0),
600
- h.value === 4 ? (p(), g(Ie, { key: 4 })) : $("", !0)
601
- ]),
602
- _: 2
603
- }, 1032, ["label", "name"]))), 128))
604
- ]),
605
- _: 1
606
- }, 8, ["modelValue"])
607
- ]);
608
- };
609
- }
610
- });
611
- export {
612
- Ke as default
613
- };
@@ -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
- };