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