xyvcard-goods 0.0.19 → 0.0.20
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.
- package/dist/edit-Bb2XgE0h.mjs +590 -0
- package/dist/edit-BcokSKfN.mjs +183 -0
- package/dist/{edit-E57LIt5x.mjs → edit-Cj13W2TC.mjs} +1 -1
- package/dist/edit-DxnsmaXV.mjs +186 -0
- package/dist/{edit.vue_vue_type_script_setup_true_lang-BHplO2tN.mjs → edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs} +1 -1
- package/dist/{goodsList-0TMcPn_Q.mjs → goodsList-DOXK1EwK.mjs} +1 -1
- package/dist/goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs +713 -0
- package/dist/index-BmOxm1P2.mjs +324 -0
- package/dist/index-C3FT_Oe7.mjs +318 -0
- package/dist/{index-CnyW3rxw.mjs → index-CGAoZY87.mjs} +2 -2
- package/dist/index-D3w33Nba.mjs +301 -0
- package/dist/{index-nSAowuoJ.mjs → index-DAJiqOCh.mjs} +2 -2
- package/dist/index-jTDhsbYM.mjs +141 -0
- package/dist/index-r0u-27m7.mjs +141 -0
- package/dist/index.mjs +163 -149
- package/dist/info-DImlMNq0.mjs +365 -0
- package/dist/{skuForm-DyYIl6H4.mjs → skuForm-Bt3arW0s.mjs} +154 -106
- package/dist/skuTable-Ahc3WlPp.mjs +639 -0
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +6 -0
- package/dts/api/goods-brand-info/types.d.ts +4 -1
- package/dts/api/goods-label-info/types.d.ts +3 -0
- package/dts/api/goods-sku/types.d.ts +2 -0
- package/dts/api/goods-spu/types.d.ts +12 -0
- package/dts/api/index.d.ts +3 -1
- package/dts/lang/goods/zh-cn.d.ts +18 -4
- package/package.json +2 -2
- package/dist/edit-B3Ripwo1.mjs +0 -437
- package/dist/edit-DEdWUJfi.mjs +0 -529
- package/dist/edit-SYuN1_Fg.mjs +0 -465
- package/dist/goodsList.vue_vue_type_script_setup_true_lang-Cd7-ryQA.mjs +0 -626
- package/dist/index-C0nlTW8F.mjs +0 -355
- package/dist/index-CmKF2zdn.mjs +0 -272
- package/dist/index-DH3UH0QC.mjs +0 -345
- package/dist/info-5OkZzwEV.mjs +0 -312
- package/dist/skuTable-B8v1DVIO.mjs +0 -543
package/dist/index-C0nlTW8F.mjs
DELETED
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as k, reactive as R, resolveComponent as s, resolveDirective as ee, openBlock as i, createElementBlock as B, createElementVNode as u, createVNode as r, withCtx as t, unref as l, createTextVNode as m, toDisplayString as a, withDirectives as _, createBlock as f, isRef as E, createCommentVNode as $ } from "vue";
|
|
2
|
-
import { useTableHooks as oe } from "jmash-core";
|
|
3
|
-
import { useI18n as te } from "vue-i18n";
|
|
4
|
-
import { g as ne, a as le } from "./edit-SYuN1_Fg.mjs";
|
|
5
|
-
const ae = { class: "app-container" }, de = { class: "search-container" }, re = ["onClick"], se = ["onClick"], ce = /* @__PURE__ */ Z({
|
|
6
|
-
__name: "index",
|
|
7
|
-
setup(ie) {
|
|
8
|
-
const { t: c } = te(), v = k({}), {
|
|
9
|
-
tableHooks: d,
|
|
10
|
-
multipleTableRef: N,
|
|
11
|
-
queryFormRef: S,
|
|
12
|
-
listLoading: T,
|
|
13
|
-
tableData: j,
|
|
14
|
-
total: I
|
|
15
|
-
} = oe(c, ne, v);
|
|
16
|
-
let y = k([
|
|
17
|
-
{
|
|
18
|
-
label: "goodsBrandInfo.tenantId",
|
|
19
|
-
prop: "tenantId",
|
|
20
|
-
width: "150",
|
|
21
|
-
sortable: "custom",
|
|
22
|
-
isColumn: !0
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: "goodsBrandInfo.brandId",
|
|
26
|
-
prop: "brandId",
|
|
27
|
-
width: "150",
|
|
28
|
-
sortable: "custom",
|
|
29
|
-
isColumn: !0
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: "goodsBrandInfo.shopId",
|
|
33
|
-
prop: "shopId",
|
|
34
|
-
width: "150",
|
|
35
|
-
sortable: "custom",
|
|
36
|
-
isColumn: !0
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: "goodsBrandInfo.brandName",
|
|
40
|
-
prop: "brandName",
|
|
41
|
-
width: "150",
|
|
42
|
-
sortable: "custom",
|
|
43
|
-
isColumn: !0
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: "goodsBrandInfo.logoUrl",
|
|
47
|
-
prop: "logoUrl",
|
|
48
|
-
width: "150",
|
|
49
|
-
sortable: "custom",
|
|
50
|
-
isColumn: !0
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
label: "goodsBrandInfo.description",
|
|
54
|
-
prop: "description",
|
|
55
|
-
width: "150",
|
|
56
|
-
sortable: "custom",
|
|
57
|
-
isColumn: !0
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label: "goodsBrandInfo.orderBy",
|
|
61
|
-
prop: "orderBy",
|
|
62
|
-
width: "150",
|
|
63
|
-
sortable: "custom",
|
|
64
|
-
isColumn: !0
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: "goodsBrandInfo.status",
|
|
68
|
-
prop: "status",
|
|
69
|
-
width: "150",
|
|
70
|
-
sortable: "custom",
|
|
71
|
-
isColumn: !0
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: "common.operate",
|
|
75
|
-
width: "200",
|
|
76
|
-
slotName: "operation",
|
|
77
|
-
columnType: "slot",
|
|
78
|
-
fixed: "right",
|
|
79
|
-
isColumn: !0
|
|
80
|
-
}
|
|
81
|
-
]);
|
|
82
|
-
const p = k({
|
|
83
|
-
title: c("common.edit"),
|
|
84
|
-
visible: !1
|
|
85
|
-
}), C = k(!1);
|
|
86
|
-
let h = R({});
|
|
87
|
-
function D() {
|
|
88
|
-
h = R({}), p.value.title = c("common.add"), p.value.visible = !0;
|
|
89
|
-
}
|
|
90
|
-
function P(n) {
|
|
91
|
-
h.brandId = n.brandId, p.value.title = c("common.edit"), p.value.visible = !0;
|
|
92
|
-
}
|
|
93
|
-
function z(n) {
|
|
94
|
-
d.selectionRows.value = n;
|
|
95
|
-
}
|
|
96
|
-
function L(n) {
|
|
97
|
-
d.handleSort(n.prop, n.order);
|
|
98
|
-
}
|
|
99
|
-
function q(n) {
|
|
100
|
-
n && d.getList();
|
|
101
|
-
}
|
|
102
|
-
function x() {
|
|
103
|
-
C.value = !1;
|
|
104
|
-
}
|
|
105
|
-
function M(n) {
|
|
106
|
-
n.updateMask = "", d.importExcel(n).then((o) => {
|
|
107
|
-
C.value = !1;
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
return d.getList(), (n, o) => {
|
|
111
|
-
const b = s("el-button"), A = s("el-form-item"), F = s("el-form"), V = s("el-col"), H = s("jmash-column-select"), Q = s("el-row"), K = s("Bottom"), U = s("el-icon"), O = s("Top"), G = s("el-switch"), J = s("jmash-table"), W = s("jmash-pagination"), X = s("el-card"), Y = s("jmash-import-upload"), g = ee("hasPerm");
|
|
112
|
-
return i(), B("div", ae, [
|
|
113
|
-
u("div", de, [
|
|
114
|
-
r(F, {
|
|
115
|
-
ref_key: "queryFormRef",
|
|
116
|
-
ref: S,
|
|
117
|
-
model: v.value,
|
|
118
|
-
inline: !0
|
|
119
|
-
}, {
|
|
120
|
-
default: t(() => [
|
|
121
|
-
r(A, { class: "search-btn" }, {
|
|
122
|
-
default: t(() => [
|
|
123
|
-
r(b, {
|
|
124
|
-
type: "primary",
|
|
125
|
-
onClick: o[0] || (o[0] = (e) => l(d).handleQuery())
|
|
126
|
-
}, {
|
|
127
|
-
default: t(() => [
|
|
128
|
-
m(a(n.$t("common.search")), 1)
|
|
129
|
-
]),
|
|
130
|
-
_: 1
|
|
131
|
-
}),
|
|
132
|
-
r(b, {
|
|
133
|
-
onClick: o[1] || (o[1] = (e) => l(d).resetQuery())
|
|
134
|
-
}, {
|
|
135
|
-
default: t(() => [
|
|
136
|
-
m(a(n.$t("common.reset")), 1)
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
})
|
|
140
|
-
]),
|
|
141
|
-
_: 1
|
|
142
|
-
})
|
|
143
|
-
]),
|
|
144
|
-
_: 1
|
|
145
|
-
}, 8, ["model"]),
|
|
146
|
-
o[13] || (o[13] = u("div", { class: "clear" }, null, -1))
|
|
147
|
-
]),
|
|
148
|
-
r(X, {
|
|
149
|
-
shadow: "never",
|
|
150
|
-
class: "table-container"
|
|
151
|
-
}, {
|
|
152
|
-
header: t(() => [
|
|
153
|
-
r(Q, null, {
|
|
154
|
-
default: t(() => [
|
|
155
|
-
r(V, { span: 17 }, {
|
|
156
|
-
default: t(() => [
|
|
157
|
-
_((i(), f(b, {
|
|
158
|
-
type: "primary",
|
|
159
|
-
onClick: D
|
|
160
|
-
}, {
|
|
161
|
-
default: t(() => [
|
|
162
|
-
m(a(n.$t("common.add")), 1)
|
|
163
|
-
]),
|
|
164
|
-
_: 1
|
|
165
|
-
})), [
|
|
166
|
-
[g, ["goods:goods_brand_info:add"]]
|
|
167
|
-
]),
|
|
168
|
-
_((i(), f(b, {
|
|
169
|
-
type: "primary",
|
|
170
|
-
onClick: o[2] || (o[2] = (e) => l(d).deleteRecords())
|
|
171
|
-
}, {
|
|
172
|
-
default: t(() => [
|
|
173
|
-
m(a(n.$t("common.batchDelete")), 1)
|
|
174
|
-
]),
|
|
175
|
-
_: 1
|
|
176
|
-
})), [
|
|
177
|
-
[g, ["goods:goods_brand_info:delete"]]
|
|
178
|
-
])
|
|
179
|
-
]),
|
|
180
|
-
_: 1
|
|
181
|
-
}),
|
|
182
|
-
r(V, {
|
|
183
|
-
span: 7,
|
|
184
|
-
class: "container-float"
|
|
185
|
-
}, {
|
|
186
|
-
default: t(() => [
|
|
187
|
-
_((i(), f(b, {
|
|
188
|
-
plain: "",
|
|
189
|
-
type: "primary",
|
|
190
|
-
onClick: o[3] || (o[3] = (e) => C.value = !0)
|
|
191
|
-
}, {
|
|
192
|
-
default: t(() => [
|
|
193
|
-
m(a(n.$t("common.import")), 1)
|
|
194
|
-
]),
|
|
195
|
-
_: 1
|
|
196
|
-
})), [
|
|
197
|
-
[g, ["goods:goods_brand_info:import"]]
|
|
198
|
-
]),
|
|
199
|
-
_((i(), f(b, {
|
|
200
|
-
plain: "",
|
|
201
|
-
type: "primary",
|
|
202
|
-
onClick: o[4] || (o[4] = (e) => l(d).handleExport(l(c)("goods.goodsBrandInfo.name")))
|
|
203
|
-
}, {
|
|
204
|
-
default: t(() => [
|
|
205
|
-
m(a(n.$t("common.export")), 1)
|
|
206
|
-
]),
|
|
207
|
-
_: 1
|
|
208
|
-
})), [
|
|
209
|
-
[g, ["goods:goods_brand_info:export"]]
|
|
210
|
-
]),
|
|
211
|
-
_((i(), f(b, {
|
|
212
|
-
plain: "",
|
|
213
|
-
type: "primary",
|
|
214
|
-
onClick: o[5] || (o[5] = (e) => l(d).handleExportPdf(l(c)("goods.goodsBrandInfo.name")))
|
|
215
|
-
}, {
|
|
216
|
-
default: t(() => [
|
|
217
|
-
m(a(n.$t("common.print")), 1)
|
|
218
|
-
]),
|
|
219
|
-
_: 1
|
|
220
|
-
})), [
|
|
221
|
-
[g, ["goods:goods_brand_info:print"]]
|
|
222
|
-
]),
|
|
223
|
-
r(H, {
|
|
224
|
-
modelValue: l(y),
|
|
225
|
-
"onUpdate:modelValue": o[6] || (o[6] = (e) => E(y) ? y.value = e : y = e),
|
|
226
|
-
"label-name": "goods/goods-brand-info"
|
|
227
|
-
}, null, 8, ["modelValue"])
|
|
228
|
-
]),
|
|
229
|
-
_: 1
|
|
230
|
-
})
|
|
231
|
-
]),
|
|
232
|
-
_: 1
|
|
233
|
-
})
|
|
234
|
-
]),
|
|
235
|
-
footer: t(() => [
|
|
236
|
-
l(I) > 0 ? (i(), f(W, {
|
|
237
|
-
key: 0,
|
|
238
|
-
total: l(I),
|
|
239
|
-
"onUpdate:total": o[7] || (o[7] = (e) => E(I) ? I.value = e : null),
|
|
240
|
-
"current-page": v.value.curPage,
|
|
241
|
-
"onUpdate:currentPage": o[8] || (o[8] = (e) => v.value.curPage = e),
|
|
242
|
-
"page-size": v.value.pageSize,
|
|
243
|
-
"onUpdate:pageSize": o[9] || (o[9] = (e) => v.value.pageSize = e),
|
|
244
|
-
onPagination: o[10] || (o[10] = (e) => l(d).getList())
|
|
245
|
-
}, null, 8, ["total", "current-page", "page-size"])) : $("", !0)
|
|
246
|
-
]),
|
|
247
|
-
default: t(() => [
|
|
248
|
-
r(J, {
|
|
249
|
-
ref_key: "multipleTableRef",
|
|
250
|
-
ref: N,
|
|
251
|
-
"row-key": "brandId",
|
|
252
|
-
"list-loading": l(T),
|
|
253
|
-
data: l(j),
|
|
254
|
-
"table-label": l(y),
|
|
255
|
-
onSelectionChange: z,
|
|
256
|
-
onSortChange: L
|
|
257
|
-
}, {
|
|
258
|
-
tenantId: t((e) => [
|
|
259
|
-
u("span", null, a(e.data.row.tenantId), 1)
|
|
260
|
-
]),
|
|
261
|
-
brandId: t((e) => [
|
|
262
|
-
u("span", null, a(e.data.row.brandId), 1)
|
|
263
|
-
]),
|
|
264
|
-
shopId: t((e) => [
|
|
265
|
-
u("span", null, a(e.data.row.shopId), 1)
|
|
266
|
-
]),
|
|
267
|
-
brandName: t((e) => [
|
|
268
|
-
u("span", null, a(e.data.row.brandName), 1)
|
|
269
|
-
]),
|
|
270
|
-
logoUrl: t((e) => [
|
|
271
|
-
u("span", null, a(e.data.row.logoUrl), 1)
|
|
272
|
-
]),
|
|
273
|
-
description: t((e) => [
|
|
274
|
-
u("span", null, a(e.data.row.description), 1)
|
|
275
|
-
]),
|
|
276
|
-
orderBy: t((e) => [
|
|
277
|
-
u("span", null, a(e.data.row.orderBy), 1)
|
|
278
|
-
]),
|
|
279
|
-
status: t((e) => [
|
|
280
|
-
u("span", null, a(e.data.row.status), 1)
|
|
281
|
-
]),
|
|
282
|
-
listOrder: t((e) => [
|
|
283
|
-
r(U, {
|
|
284
|
-
size: "16",
|
|
285
|
-
onClick: (w) => l(d).handleMove(e.data.row, !1)
|
|
286
|
-
}, {
|
|
287
|
-
default: t(() => [
|
|
288
|
-
r(K)
|
|
289
|
-
]),
|
|
290
|
-
_: 2
|
|
291
|
-
}, 1032, ["onClick"]),
|
|
292
|
-
r(U, {
|
|
293
|
-
size: "16",
|
|
294
|
-
onClick: (w) => l(d).handleMove(e.data.row, !0)
|
|
295
|
-
}, {
|
|
296
|
-
default: t(() => [
|
|
297
|
-
r(O)
|
|
298
|
-
]),
|
|
299
|
-
_: 2
|
|
300
|
-
}, 1032, ["onClick"])
|
|
301
|
-
]),
|
|
302
|
-
enable: t((e) => [
|
|
303
|
-
r(G, {
|
|
304
|
-
modelValue: e.data.row.enable,
|
|
305
|
-
"onUpdate:modelValue": (w) => e.data.row.enable = w,
|
|
306
|
-
onChange: (w) => l(d).enableRecord(e.data.row, e.data.row.enable)
|
|
307
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
308
|
-
]),
|
|
309
|
-
operation: t((e) => [
|
|
310
|
-
_((i(), B("span", {
|
|
311
|
-
class: "el-button-color",
|
|
312
|
-
onClick: (w) => P(e.data.row)
|
|
313
|
-
}, [
|
|
314
|
-
m(a(n.$t("common.edit")), 1)
|
|
315
|
-
], 8, re)), [
|
|
316
|
-
[g, ["goods:goods_brand_info:update"]]
|
|
317
|
-
]),
|
|
318
|
-
_((i(), B("span", {
|
|
319
|
-
class: "el-button-color dropdown-left",
|
|
320
|
-
onClick: (w) => l(d).deleteRecord(e.data.row)
|
|
321
|
-
}, [
|
|
322
|
-
m(a(n.$t("common.delete")), 1)
|
|
323
|
-
], 8, se)), [
|
|
324
|
-
[g, ["goods:goods_brand_info:delete"]]
|
|
325
|
-
])
|
|
326
|
-
]),
|
|
327
|
-
_: 1
|
|
328
|
-
}, 8, ["list-loading", "data", "table-label"])
|
|
329
|
-
]),
|
|
330
|
-
_: 1
|
|
331
|
-
}),
|
|
332
|
-
p.value.visible ? (i(), f(le, {
|
|
333
|
-
key: 0,
|
|
334
|
-
modelValue: p.value.visible,
|
|
335
|
-
"onUpdate:modelValue": o[11] || (o[11] = (e) => p.value.visible = e),
|
|
336
|
-
title: p.value.title,
|
|
337
|
-
"entity-key": l(h),
|
|
338
|
-
onRefresh: q,
|
|
339
|
-
width: "900px"
|
|
340
|
-
}, null, 8, ["modelValue", "title", "entity-key"])) : $("", !0),
|
|
341
|
-
C.value ? (i(), f(Y, {
|
|
342
|
-
key: 1,
|
|
343
|
-
"upload-visible": C.value,
|
|
344
|
-
"template-title": n.$t("sysUser.templateDownload"),
|
|
345
|
-
onTemplateDown: o[12] || (o[12] = (e) => l(d).downloadTemplate(l(c)("goods.goodsBrandInfo.name"))),
|
|
346
|
-
onImportEvents: M,
|
|
347
|
-
onUploadClosed: x
|
|
348
|
-
}, null, 8, ["upload-visible", "template-title"])) : $("", !0)
|
|
349
|
-
]);
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
export {
|
|
354
|
-
ce as default
|
|
355
|
-
};
|
package/dist/index-CmKF2zdn.mjs
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
var S = Object.defineProperty;
|
|
2
|
-
var y = (o, e, t) => e in o ? S(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
-
var s = (o, e, t) => y(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { useUserStore as c, clearEmpty as l, request as d, BizDict as p, BizLayDict as v, EnumDict as g } from "jmash-core";
|
|
5
|
-
import { EntryDict as A } from "jmash-dict";
|
|
6
|
-
import { ref as h, reactive as L } from "vue";
|
|
7
|
-
import { specValueApi as P, infoApi as m, specInfoApi as O } from "xyvcard-shop";
|
|
8
|
-
class a {
|
|
9
|
-
}
|
|
10
|
-
// 模块
|
|
11
|
-
s(a, "MODULE_GOODS", "goods"), // 商品规格类型
|
|
12
|
-
s(a, "SPEC_TYPE", {
|
|
13
|
-
UNIFIED_SPEC: "UNIFIED_SPEC",
|
|
14
|
-
//统一规格
|
|
15
|
-
MULTI_SPEC: "MULTI_SPEC"
|
|
16
|
-
//多规格
|
|
17
|
-
}), // 启用禁用
|
|
18
|
-
s(a, "SHELF_VALUES", h([
|
|
19
|
-
{ key: !0, value: "上架" },
|
|
20
|
-
{ key: !1, value: "下架" }
|
|
21
|
-
])), // 运费类型
|
|
22
|
-
s(a, "ENUM_FREIGHT_TYPE", "xyvcard.goods.protobuf.FreightType"), // 保障服务
|
|
23
|
-
s(a, "DICT_GOODS_ENSURE", "goods_ensure"), // 规格类型
|
|
24
|
-
s(a, "ENUM_SPEC_TYPE", "xyvcard.goods.protobuf.SpecType"), // 商品查询枚举
|
|
25
|
-
s(a, "ENUM_GOODS_SPU_List_SORT", "xyvcard.goods.protobuf.GoodsSpuListSort"), // 审核状态
|
|
26
|
-
s(a, "ENUM_APPROVAL_STATUS", "xyvcard.goods.protobuf.ApprovalStatus"), // 审核状态常量
|
|
27
|
-
s(a, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(a, "APPROVAL_PASS", "APPROVAL_PASS"), s(a, "APPROVALING", "APPROVALING"), // 启用禁用
|
|
28
|
-
s(a, "ENABLE_VALUES", h([
|
|
29
|
-
{ key: "true", value: "启用" },
|
|
30
|
-
{ key: "false", value: "禁用" }
|
|
31
|
-
]));
|
|
32
|
-
class f {
|
|
33
|
-
getKey(e) {
|
|
34
|
-
return {
|
|
35
|
-
categoryId: e.categoryId
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
// 查询翻页信息商城商品分类
|
|
39
|
-
findPage(e) {
|
|
40
|
-
const t = c().user.tenant;
|
|
41
|
-
return e && (e.hasStatus = e.status != null), l(e), d({
|
|
42
|
-
url: "/v1/goods/goods_category/list/" + t,
|
|
43
|
-
method: "get",
|
|
44
|
-
params: e
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
// 查询列表信息商城商品分类
|
|
48
|
-
findList(e) {
|
|
49
|
-
const t = c().user.tenant;
|
|
50
|
-
return l(e), d({
|
|
51
|
-
url: "/v1/goods/goods_category/list/" + t,
|
|
52
|
-
method: "get",
|
|
53
|
-
params: e
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
// 查询商城商品分类
|
|
57
|
-
findById(e) {
|
|
58
|
-
const t = c().user.tenant;
|
|
59
|
-
return l(e), d({
|
|
60
|
-
url: "/v1/goods/goods_category/id/" + t + "/" + e.categoryId,
|
|
61
|
-
method: "get"
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
// 创建实体商城商品分类
|
|
65
|
-
create(e) {
|
|
66
|
-
return e.tenant = c().user.tenant, l(e), d({
|
|
67
|
-
url: "/v1/goods/goods_category",
|
|
68
|
-
method: "post",
|
|
69
|
-
data: e
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
// 修改实体商城商品分类
|
|
73
|
-
update(e) {
|
|
74
|
-
return e.tenant = c().user.tenant, l(e), d({
|
|
75
|
-
url: "/v1/goods/goods_category",
|
|
76
|
-
method: "patch",
|
|
77
|
-
data: e
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
// 上移下移
|
|
81
|
-
move(e, t) {
|
|
82
|
-
const r = { ...e };
|
|
83
|
-
return r.tenant = c().user.tenant, r.up = t, l(r), d({
|
|
84
|
-
url: "/v1/goods/goods_category/move",
|
|
85
|
-
method: "put",
|
|
86
|
-
data: r
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
// 启用/禁用
|
|
90
|
-
enable(e, t) {
|
|
91
|
-
const r = { ...e };
|
|
92
|
-
return r.tenant = c().user.tenant, r.enable = t, l(r), d({
|
|
93
|
-
url: "/v1/goods/goods_category/enable",
|
|
94
|
-
method: "put",
|
|
95
|
-
data: r
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
// 删除商城商品分类
|
|
99
|
-
delete(e) {
|
|
100
|
-
return e.tenant = c().user.tenant, l(e), d({
|
|
101
|
-
url: "/v1/goods/goods_category/id",
|
|
102
|
-
method: "delete",
|
|
103
|
-
params: e
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
// 批量删除商城商品分类
|
|
107
|
-
batchDelete(e) {
|
|
108
|
-
const t = e.map((n) => n.categoryId), r = {
|
|
109
|
-
tenant: c().user.tenant,
|
|
110
|
-
categoryId: t
|
|
111
|
-
};
|
|
112
|
-
return l(r), d({
|
|
113
|
-
url: "/v1/goods/goods_category/batch",
|
|
114
|
-
method: "put",
|
|
115
|
-
data: r
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* 查询商品树列表的API接口
|
|
120
|
-
*
|
|
121
|
-
* @param query 可选的查询参数,符合GoodsCategoryReq接口的实例
|
|
122
|
-
* @returns 返回一个AxiosPromise,包含GoodsCategoryTree类型的响应数据
|
|
123
|
-
*/
|
|
124
|
-
findTreeListApi(e) {
|
|
125
|
-
const t = c().user.tenant;
|
|
126
|
-
return l(e), d({
|
|
127
|
-
url: "/v1/goods/goods_category/treelist/" + t,
|
|
128
|
-
method: "get",
|
|
129
|
-
params: e
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
const I = new f();
|
|
134
|
-
function E(o, e, t) {
|
|
135
|
-
return !Array.isArray(o) || o.length === 0 ? [] : o.map((n) => {
|
|
136
|
-
let u = [];
|
|
137
|
-
return Array.isArray(n.children) && n.children.length > 0 && (u = E(n.children, e, t)), {
|
|
138
|
-
value: n[t],
|
|
139
|
-
label: n[e],
|
|
140
|
-
parentId: n.parentId,
|
|
141
|
-
children: u
|
|
142
|
-
};
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
class _ {
|
|
146
|
-
constructor(e, t) {
|
|
147
|
-
s(this, "values", L([]));
|
|
148
|
-
// 查询条件
|
|
149
|
-
s(this, "query");
|
|
150
|
-
this.values.length = 0, this.values.push(...e.value), this.query = t;
|
|
151
|
-
}
|
|
152
|
-
// 根据给定键获取业务数据项的值的方法
|
|
153
|
-
getValue(e) {
|
|
154
|
-
for (const t of this.values)
|
|
155
|
-
if (t.key == e)
|
|
156
|
-
return t.value;
|
|
157
|
-
return "";
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
class U extends p {
|
|
161
|
-
// 实现 useValues 方法
|
|
162
|
-
useValues() {
|
|
163
|
-
return new Promise((e, t) => {
|
|
164
|
-
m.findList(this.query).then(({ data: r }) => {
|
|
165
|
-
const n = r.results;
|
|
166
|
-
this.values.length = 0, this.values.push(
|
|
167
|
-
...n.map(
|
|
168
|
-
(u) => ({
|
|
169
|
-
key: u.shopId,
|
|
170
|
-
value: u.shopName
|
|
171
|
-
})
|
|
172
|
-
)
|
|
173
|
-
), e(this.values);
|
|
174
|
-
}).catch(t);
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
class D extends v {
|
|
179
|
-
// // 实现 useValues 方法
|
|
180
|
-
// useValues(excludeId?: string): Promise<LayEntry[]> {
|
|
181
|
-
// return new Promise((resolve, reject) => {
|
|
182
|
-
// goodsCategoryApi
|
|
183
|
-
// .findTreeListApi({ excludeId })
|
|
184
|
-
// .then(({ data }) => {
|
|
185
|
-
// this.values.length = 0;
|
|
186
|
-
// this.values.push(...data.results);
|
|
187
|
-
// resolve(this.values);
|
|
188
|
-
// })
|
|
189
|
-
// .catch(reject);
|
|
190
|
-
// });
|
|
191
|
-
// }
|
|
192
|
-
// 实现 useValues 方法
|
|
193
|
-
useValues() {
|
|
194
|
-
return new Promise((e, t) => {
|
|
195
|
-
I.findTreeListApi(this.query).then(({ data: r }) => {
|
|
196
|
-
this.values.length = 0, this.values.push(...E(r.results, "label", "value")), e(this.values);
|
|
197
|
-
}).catch(t);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
class T extends p {
|
|
202
|
-
// 实现 useValues 方法
|
|
203
|
-
useValues() {
|
|
204
|
-
return new Promise((e, t) => {
|
|
205
|
-
O.findList(this.query).then(({ data: r }) => {
|
|
206
|
-
const n = r.results;
|
|
207
|
-
this.values.length = 0, this.values.push(
|
|
208
|
-
...n.map(
|
|
209
|
-
(u) => ({
|
|
210
|
-
key: u.specId,
|
|
211
|
-
value: u.specName,
|
|
212
|
-
disabled: u.disabled
|
|
213
|
-
})
|
|
214
|
-
)
|
|
215
|
-
), e(this.values);
|
|
216
|
-
}).catch(t);
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
class N extends p {
|
|
221
|
-
// 实现 useValues 方法
|
|
222
|
-
useValues() {
|
|
223
|
-
return new Promise((e, t) => {
|
|
224
|
-
P.findList(this.query).then(({ data: r }) => {
|
|
225
|
-
const n = r.results;
|
|
226
|
-
this.values.length = 0, this.values.push(
|
|
227
|
-
...n.map(
|
|
228
|
-
(u) => ({
|
|
229
|
-
key: u.specValueId,
|
|
230
|
-
value: u.valueName
|
|
231
|
-
})
|
|
232
|
-
)
|
|
233
|
-
), e(this.values);
|
|
234
|
-
}).catch(t);
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
class i {
|
|
239
|
-
}
|
|
240
|
-
// 店铺列表
|
|
241
|
-
s(i, "shopInfoBizDict", new U({})), // 商品分类
|
|
242
|
-
// static readonly goodsCategoryDict = new GoodsCategoryBizLayDict({});
|
|
243
|
-
// 规格列表
|
|
244
|
-
s(i, "specInfoDict", new T({})), // 规格值
|
|
245
|
-
s(i, "specValueDict", new N({})), // 上架下架
|
|
246
|
-
s(i, "shelfDict", new _(a.SHELF_VALUES, {})), // 运费类型
|
|
247
|
-
s(i, "freightTypeEnum", new g(
|
|
248
|
-
a.MODULE_GOODS,
|
|
249
|
-
a.ENUM_FREIGHT_TYPE
|
|
250
|
-
)), // 保障服务
|
|
251
|
-
s(i, "goodsEnsureDict", new A(a.DICT_GOODS_ENSURE)), // 规格类型
|
|
252
|
-
s(i, "specTypeEnum", new g(
|
|
253
|
-
a.MODULE_GOODS,
|
|
254
|
-
a.ENUM_SPEC_TYPE
|
|
255
|
-
)), // 商品查询枚举
|
|
256
|
-
s(i, "goodsSpuListSortEnum", new g(
|
|
257
|
-
a.MODULE_GOODS,
|
|
258
|
-
a.ENUM_GOODS_SPU_List_SORT
|
|
259
|
-
)), // 审核状态
|
|
260
|
-
s(i, "approvalStatusEnum", new g(
|
|
261
|
-
a.MODULE_GOODS,
|
|
262
|
-
a.ENUM_APPROVAL_STATUS
|
|
263
|
-
)), // 启用禁用
|
|
264
|
-
s(i, "enableDict", new _(a.ENABLE_VALUES, {})), // 商品分类
|
|
265
|
-
s(i, "goodsCategoryListBizLayDict", new D({}));
|
|
266
|
-
export {
|
|
267
|
-
a as C,
|
|
268
|
-
i as D,
|
|
269
|
-
N as S,
|
|
270
|
-
T as a,
|
|
271
|
-
I as g
|
|
272
|
-
};
|