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