xyvcard-goods 0.0.20 → 0.0.22
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/ImageUpload-Dk6GY6PA.mjs +93 -0
- package/dist/{edit-Cj13W2TC.mjs → edit-Byv9oYAC.mjs} +1 -1
- package/dist/{edit-Bb2XgE0h.mjs → edit-Nuaz9WSB.mjs} +160 -244
- package/dist/edit-exVf8d8b.mjs +367 -0
- package/dist/edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs +24172 -0
- package/dist/{goodsList-DOXK1EwK.mjs → goodsList-CZUqc4nm.mjs} +1 -1
- package/dist/goodsList-IWDAvKOx.mjs +4 -0
- package/dist/goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs +576 -0
- package/dist/{goodsList.vue_vue_type_script_setup_true_lang-COJVlEjX.mjs → goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs} +51 -50
- package/dist/{index-CGAoZY87.mjs → index-4i7TnWvV.mjs} +2 -3
- package/dist/index-BVGn6Q_T.mjs +53 -0
- package/dist/{index-DAJiqOCh.mjs → index-B_U2s9fI.mjs} +2 -2
- package/dist/{index-C3FT_Oe7.mjs → index-CQIttgns.mjs} +1 -1
- package/dist/{index-D3w33Nba.mjs → index-Dvaotk7B.mjs} +92 -68
- package/dist/{index-BmOxm1P2.mjs → index-_xxSoBUe.mjs} +1 -1
- package/dist/index.mjs +561 -538
- package/dist/{info-DImlMNq0.mjs → info-BH4MW3Sw.mjs} +2 -2
- package/dist/info-BQaaTFry.mjs +365 -0
- package/dist/sku-B-IzfYLq.mjs +52 -0
- package/dist/skuForm-AMIoZkH-.mjs +287 -0
- package/dist/{skuForm-Bt3arW0s.mjs → skuForm-CgjMd46J.mjs} +16 -16
- package/dist/{skuTable-Ahc3WlPp.mjs → skuTable-CyGQuTvR.mjs} +208 -255
- package/dist/skuTable-DDWSmvoz.mjs +592 -0
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +3 -0
- package/dts/api/goods-sku/types.d.ts +2 -2
- package/dts/api/goods-spu/index.d.ts +1 -0
- package/dts/api/goods-spu/types.d.ts +18 -1
- package/dts/api/index.d.ts +2 -1
- package/dts/constant.d.ts +4 -0
- package/dts/lang/goods/zh-cn.d.ts +6 -1
- package/dts/router/index.d.ts +1 -0
- package/dts/views/goods/goods-combination/edit.vue.d.ts +2 -0
- package/dts/views/goods/goods-combination/goodsList.vue.d.ts +14 -0
- package/dts/views/goods/goods-combination/index.vue.d.ts +2 -0
- package/dts/views/goods/goods-combination/info.vue.d.ts +2 -0
- package/dts/views/goods/goods-combination/skuForm.vue.d.ts +20 -0
- package/dts/views/goods/goods-combination/skuTable.vue.d.ts +40 -0
- package/package.json +62 -61
- package/dist/edit.vue_vue_type_script_setup_true_lang-D2w1583D.mjs +0 -234
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var m = (i, e, t) => e in i ? _(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var s = (i, e, t) => m(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { useUserStore as l, clearEmpty as c, request as d, BizDict as h, BizLayDict as y, EnumDict as p } from "jmash-core";
|
|
5
|
-
import { EntryDict as
|
|
5
|
+
import { EntryDict as E } from "jmash-dict";
|
|
6
6
|
import { ref as g, reactive as L } from "vue";
|
|
7
7
|
import { specValueApi as A, infoApi as P, specInfoApi as f } from "xyvcard-shop";
|
|
8
8
|
import { g as O } from "./index-r0u-27m7.mjs";
|
|
9
9
|
import { g as I } from "./index-jTDhsbYM.mjs";
|
|
10
|
+
import { goodsSpuApi as D } from "./index.mjs";
|
|
10
11
|
class r {
|
|
11
12
|
}
|
|
12
13
|
// 模块
|
|
@@ -30,8 +31,12 @@ s(r, "APPROVAL_NOT_PASS", "APPROVAL_NOT_PASS"), s(r, "APPROVAL_PASS", "APPROVAL_
|
|
|
30
31
|
s(r, "ENABLE_VALUES", g([
|
|
31
32
|
{ key: "true", value: "启用" },
|
|
32
33
|
{ key: "false", value: "禁用" }
|
|
33
|
-
]))
|
|
34
|
-
|
|
34
|
+
])), // 商品类型
|
|
35
|
+
s(r, "GOODS_TYPE", {
|
|
36
|
+
NORMAL: "normal",
|
|
37
|
+
GROUP: "group"
|
|
38
|
+
});
|
|
39
|
+
class U {
|
|
35
40
|
getKey(e) {
|
|
36
41
|
return {
|
|
37
42
|
categoryId: e.categoryId
|
|
@@ -107,7 +112,7 @@ class D {
|
|
|
107
112
|
}
|
|
108
113
|
// 批量删除商城商品分类
|
|
109
114
|
batchDelete(e) {
|
|
110
|
-
const t = e.map((
|
|
115
|
+
const t = e.map((u) => u.categoryId), a = {
|
|
111
116
|
tenant: l().user.tenant,
|
|
112
117
|
categoryId: t
|
|
113
118
|
};
|
|
@@ -132,15 +137,15 @@ class D {
|
|
|
132
137
|
});
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
|
-
const
|
|
136
|
-
function
|
|
137
|
-
return !Array.isArray(
|
|
138
|
-
let
|
|
139
|
-
return Array.isArray(
|
|
140
|
-
value:
|
|
141
|
-
label:
|
|
142
|
-
parentId:
|
|
143
|
-
children:
|
|
140
|
+
const T = new U();
|
|
141
|
+
function S(i, e, t) {
|
|
142
|
+
return !Array.isArray(i) || i.length === 0 ? [] : i.map((u) => {
|
|
143
|
+
let o = [];
|
|
144
|
+
return Array.isArray(u.children) && u.children.length > 0 && (o = S(u.children, e, t)), {
|
|
145
|
+
value: u[t],
|
|
146
|
+
label: u[e],
|
|
147
|
+
parentId: u.parentId,
|
|
148
|
+
children: o
|
|
144
149
|
};
|
|
145
150
|
});
|
|
146
151
|
}
|
|
@@ -159,17 +164,17 @@ class v {
|
|
|
159
164
|
return "";
|
|
160
165
|
}
|
|
161
166
|
}
|
|
162
|
-
class
|
|
167
|
+
class N extends h {
|
|
163
168
|
// 实现 useValues 方法
|
|
164
169
|
useValues() {
|
|
165
170
|
return new Promise((e, t) => {
|
|
166
171
|
P.findList(this.query).then(({ data: a }) => {
|
|
167
|
-
const
|
|
172
|
+
const u = a.results;
|
|
168
173
|
this.values.length = 0, this.values.push(
|
|
169
|
-
...
|
|
170
|
-
(
|
|
171
|
-
key:
|
|
172
|
-
value:
|
|
174
|
+
...u.map(
|
|
175
|
+
(o) => ({
|
|
176
|
+
key: o.shopId,
|
|
177
|
+
value: o.shopName
|
|
173
178
|
})
|
|
174
179
|
)
|
|
175
180
|
), e(this.values);
|
|
@@ -177,28 +182,28 @@ class T extends h {
|
|
|
177
182
|
});
|
|
178
183
|
}
|
|
179
184
|
}
|
|
180
|
-
class
|
|
185
|
+
class V extends y {
|
|
181
186
|
// 实现 useValues 方法
|
|
182
187
|
useValues() {
|
|
183
188
|
return new Promise((e, t) => {
|
|
184
|
-
|
|
185
|
-
this.values.length = 0, this.values.push(...
|
|
189
|
+
T.findTreeListApi(this.query).then(({ data: a }) => {
|
|
190
|
+
this.values.length = 0, this.values.push(...S(a.results, "label", "value")), e(this.values);
|
|
186
191
|
}).catch(t);
|
|
187
192
|
});
|
|
188
193
|
}
|
|
189
194
|
}
|
|
190
|
-
class
|
|
195
|
+
class b extends h {
|
|
191
196
|
// 实现 useValues 方法
|
|
192
197
|
useValues() {
|
|
193
198
|
return new Promise((e, t) => {
|
|
194
199
|
f.findList(this.query).then(({ data: a }) => {
|
|
195
|
-
const
|
|
200
|
+
const u = a.results;
|
|
196
201
|
this.values.length = 0, this.values.push(
|
|
197
|
-
...
|
|
198
|
-
(
|
|
199
|
-
key:
|
|
200
|
-
value:
|
|
201
|
-
disabled:
|
|
202
|
+
...u.map(
|
|
203
|
+
(o) => ({
|
|
204
|
+
key: o.specId,
|
|
205
|
+
value: o.specName,
|
|
206
|
+
disabled: o.disabled
|
|
202
207
|
})
|
|
203
208
|
)
|
|
204
209
|
), e(this.values);
|
|
@@ -206,17 +211,17 @@ class V extends h {
|
|
|
206
211
|
});
|
|
207
212
|
}
|
|
208
213
|
}
|
|
209
|
-
class
|
|
214
|
+
class w extends h {
|
|
210
215
|
// 实现 useValues 方法
|
|
211
216
|
useValues() {
|
|
212
217
|
return new Promise((e, t) => {
|
|
213
218
|
A.findList(this.query).then(({ data: a }) => {
|
|
214
|
-
const
|
|
219
|
+
const u = a.results;
|
|
215
220
|
this.values.length = 0, this.values.push(
|
|
216
|
-
...
|
|
217
|
-
(
|
|
218
|
-
key:
|
|
219
|
-
value:
|
|
221
|
+
...u.map(
|
|
222
|
+
(o) => ({
|
|
223
|
+
key: o.specValueId,
|
|
224
|
+
value: o.valueName
|
|
220
225
|
})
|
|
221
226
|
)
|
|
222
227
|
), e(this.values);
|
|
@@ -224,17 +229,17 @@ class b extends h {
|
|
|
224
229
|
});
|
|
225
230
|
}
|
|
226
231
|
}
|
|
227
|
-
class
|
|
232
|
+
class B extends h {
|
|
228
233
|
// 实现 useValues 方法
|
|
229
234
|
useValues() {
|
|
230
235
|
return new Promise((e, t) => {
|
|
231
236
|
O.findList(this.query).then(({ data: a }) => {
|
|
232
|
-
const
|
|
237
|
+
const u = a.results;
|
|
233
238
|
this.values.length = 0, this.values.push(
|
|
234
|
-
...
|
|
235
|
-
(
|
|
236
|
-
key:
|
|
237
|
-
value:
|
|
239
|
+
...u.map(
|
|
240
|
+
(o) => ({
|
|
241
|
+
key: o.brandId,
|
|
242
|
+
value: o.brandName
|
|
238
243
|
})
|
|
239
244
|
)
|
|
240
245
|
), e(this.values);
|
|
@@ -242,17 +247,35 @@ class w extends h {
|
|
|
242
247
|
});
|
|
243
248
|
}
|
|
244
249
|
}
|
|
245
|
-
class
|
|
250
|
+
class G extends h {
|
|
246
251
|
// 实现 useValues 方法
|
|
247
252
|
useValues() {
|
|
248
253
|
return new Promise((e, t) => {
|
|
249
254
|
I.findList(this.query).then(({ data: a }) => {
|
|
250
|
-
const
|
|
255
|
+
const u = a.results;
|
|
256
|
+
this.values.length = 0, this.values.push(
|
|
257
|
+
...u.map(
|
|
258
|
+
(o) => ({
|
|
259
|
+
key: o.labelId,
|
|
260
|
+
value: o.labelName
|
|
261
|
+
})
|
|
262
|
+
)
|
|
263
|
+
), e(this.values);
|
|
264
|
+
}).catch(t);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
class z extends h {
|
|
269
|
+
// 实现 useValues 方法
|
|
270
|
+
useValues() {
|
|
271
|
+
return new Promise((e, t) => {
|
|
272
|
+
D.findList(this.query).then(({ data: a }) => {
|
|
273
|
+
const u = a.results;
|
|
251
274
|
this.values.length = 0, this.values.push(
|
|
252
|
-
...
|
|
253
|
-
(
|
|
254
|
-
key:
|
|
255
|
-
value:
|
|
275
|
+
...u.map(
|
|
276
|
+
(o) => ({
|
|
277
|
+
key: o.spuId,
|
|
278
|
+
value: o.spuName
|
|
256
279
|
})
|
|
257
280
|
)
|
|
258
281
|
), e(this.values);
|
|
@@ -260,42 +283,43 @@ class B extends h {
|
|
|
260
283
|
});
|
|
261
284
|
}
|
|
262
285
|
}
|
|
263
|
-
class
|
|
286
|
+
class n {
|
|
264
287
|
}
|
|
265
288
|
// 店铺列表
|
|
266
|
-
s(
|
|
289
|
+
s(n, "shopInfoBizDict", new N({})), // 商品分类
|
|
267
290
|
// static readonly goodsCategoryDict = new GoodsCategoryBizLayDict({});
|
|
268
291
|
// 规格列表
|
|
269
|
-
s(
|
|
270
|
-
s(
|
|
271
|
-
s(
|
|
272
|
-
s(
|
|
292
|
+
s(n, "specInfoDict", new b({})), // 规格值
|
|
293
|
+
s(n, "specValueDict", new w({})), // 上架下架
|
|
294
|
+
s(n, "shelfDict", new v(r.SHELF_VALUES, {})), // 运费类型
|
|
295
|
+
s(n, "freightTypeEnum", new p(
|
|
273
296
|
r.MODULE_GOODS,
|
|
274
297
|
r.ENUM_FREIGHT_TYPE
|
|
275
298
|
)), // 保障服务
|
|
276
|
-
s(
|
|
277
|
-
s(
|
|
299
|
+
s(n, "goodsEnsureDict", new E(r.DICT_GOODS_ENSURE)), // 规格类型
|
|
300
|
+
s(n, "specTypeEnum", new p(
|
|
278
301
|
r.MODULE_GOODS,
|
|
279
302
|
r.ENUM_SPEC_TYPE
|
|
280
303
|
)), // 商品查询枚举
|
|
281
|
-
s(
|
|
304
|
+
s(n, "goodsSpuListSortEnum", new p(
|
|
282
305
|
r.MODULE_GOODS,
|
|
283
306
|
r.ENUM_GOODS_SPU_List_SORT
|
|
284
307
|
)), // 审核状态
|
|
285
|
-
s(
|
|
308
|
+
s(n, "approvalStatusEnum", new p(
|
|
286
309
|
r.MODULE_GOODS,
|
|
287
310
|
r.ENUM_APPROVAL_STATUS
|
|
288
311
|
)), // 启用禁用
|
|
289
|
-
s(
|
|
290
|
-
s(
|
|
312
|
+
s(n, "enableDict", new v(r.ENABLE_VALUES, {})), // 商品分类
|
|
313
|
+
s(n, "goodsCategoryListBizLayDict", new V(
|
|
291
314
|
{}
|
|
292
315
|
)), // 品牌列表
|
|
293
|
-
s(
|
|
294
|
-
s(
|
|
316
|
+
s(n, "brandListBizDict", new B({})), // 标签列表
|
|
317
|
+
s(n, "labelListBizDict", new G({})), // 商品列表
|
|
318
|
+
s(n, "goodsSpuBizDict", new z({}));
|
|
295
319
|
export {
|
|
296
320
|
r as C,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
321
|
+
n as D,
|
|
322
|
+
w as S,
|
|
323
|
+
b as a,
|
|
324
|
+
T as g
|
|
301
325
|
};
|
|
@@ -3,7 +3,7 @@ import { useTableHooks as le, fileApi as D } from "jmash-core";
|
|
|
3
3
|
import { useI18n as ae } from "vue-i18n";
|
|
4
4
|
import { g as ne } from "./index-r0u-27m7.mjs";
|
|
5
5
|
import re from "./edit-DxnsmaXV.mjs";
|
|
6
|
-
import { D as de } from "./index-
|
|
6
|
+
import { D as de } from "./index-Dvaotk7B.mjs";
|
|
7
7
|
const se = { class: "app-container" }, ie = { class: "search-container" }, ue = ["onClick"], me = ["onClick"], ye = /* @__PURE__ */ x({
|
|
8
8
|
__name: "index",
|
|
9
9
|
setup(pe) {
|