xyvcard-goods 0.0.4 → 0.0.6
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/{auditIndex-BXUxPTBo.mjs → auditIndex-DZUQQzVu.mjs} +1 -1
- package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-2LQeWrbt.mjs → auditIndex.vue_vue_type_script_setup_true_lang-Bnc1wKbA.mjs} +8 -8
- package/dist/edit-C3imnLUq.mjs +600 -0
- package/dist/{index-PA3Mh5x6.mjs → index-kGlE0ywA.mjs} +60 -59
- package/dist/index.mjs +2 -21
- package/dist/{info-8-HEtfzY.mjs → info-kiOShGr4.mjs} +18 -14
- package/dist/{saleIndex-vZV2Dq0y.mjs → saleIndex-CyMvOgxp.mjs} +1 -1
- package/dist/{saleIndex.vue_vue_type_script_setup_true_lang-BpHE0pi0.mjs → saleIndex.vue_vue_type_script_setup_true_lang-BgZZMEph.mjs} +16 -16
- package/dist/{shelfIndex-Ciis-I11.mjs → shelfIndex-DZWqrqlw.mjs} +1 -1
- package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-GCWPCxCX.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-B7fw9wHp.mjs} +16 -16
- package/dist/{skuForm-DaxgHBOV.mjs → skuForm-Dtq2Ttjc.mjs} +35 -37
- package/dist/{skuTable-C4mHW-e9.mjs → skuTable-8oPw0DhV.mjs} +113 -96
- package/dist/style.css +1 -1
- package/dts/components/EnumRadio/index.vue.d.ts +2 -2
- package/dts/components/GoodsUpload/ImageUpload.vue.d.ts +4 -2
- package/dts/components/GoodsUpload/MultiUpload.vue.d.ts +4 -4
- package/dts/components/GoodsUpload/index.vue.d.ts +2 -2
- package/dts/constant.d.ts +1 -1
- package/dts/main.d.ts +1 -0
- package/dts/views/goods/goods-spu/skuForm.vue.d.ts +2 -2
- package/dts/views/goods/goods-spu/skuTable.vue.d.ts +2 -2
- package/package.json +19 -16
- package/dist/edit-B_KK1orD.mjs +0 -2976
- package/dist/el-message-D15RmjW3.mjs +0 -1504
- package/dts/api/emall/goods-category/index.d.ts +0 -14
- package/dts/api/emall/goods-category/types.d.ts +0 -19
- package/dts/api/shop/shop-info/index.d.ts +0 -8
- package/dts/api/shop/shop-info/types.d.ts +0 -16
- package/dts/api/shop/spec-info/index.d.ts +0 -8
- package/dts/api/shop/spec-info/types.d.ts +0 -21
- package/dts/api/shop/spec-value/index.d.ts +0 -8
- package/dts/api/shop/spec-value/types.d.ts +0 -21
- package/dts/views/goods/goods-spu/approvedIndex.vue.d.ts +0 -2
- package/dts/views/goods/goods-spu/sku-form.vue.d.ts +0 -31
- package/dts/views/goods/goods-spu/sku-table.vue.d.ts +0 -14
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as x, getCurrentInstance as ee, ref as D, resolveComponent as p, resolveDirective as oe, openBlock as m, createElementBlock as V, createElementVNode as r, createVNode as a, withCtx as l, unref as s, withKeys as R, createTextVNode as c, toDisplayString as u, withDirectives as b, createBlock as I, isRef as P, createCommentVNode as le } from "vue";
|
|
2
|
+
import { ElMessage as z } from "element-plus";
|
|
2
3
|
import { useRouter as te } from "vue-router";
|
|
3
|
-
import { useTableHooks as ae, fileApi as
|
|
4
|
+
import { useTableHooks as ae, fileApi as j } from "jmash-core";
|
|
4
5
|
import { useI18n as se } from "vue-i18n";
|
|
5
|
-
import { goodsSpuApi as
|
|
6
|
+
import { goodsSpuApi as E } from "./index.mjs";
|
|
6
7
|
import { D as g } from "./index-D5_GsXR7.mjs";
|
|
7
|
-
import { Z as E } from "./el-message-D15RmjW3.mjs";
|
|
8
8
|
const ne = { class: "app-container" }, ue = { class: "search-container" }, pe = ["onClick"], de = ["onClick"], re = ["onClick"], ye = /* @__PURE__ */ x({
|
|
9
9
|
__name: "shelfIndex",
|
|
10
10
|
setup(ie) {
|
|
@@ -19,7 +19,7 @@ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe =
|
|
|
19
19
|
listLoading: L,
|
|
20
20
|
tableData: H,
|
|
21
21
|
total: v
|
|
22
|
-
} = ae(_,
|
|
22
|
+
} = ae(_, E, d);
|
|
23
23
|
let w = D([
|
|
24
24
|
{
|
|
25
25
|
label: "goodsSpu.shopId",
|
|
@@ -142,26 +142,26 @@ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe =
|
|
|
142
142
|
}
|
|
143
143
|
function F() {
|
|
144
144
|
if (n.selectionRows.value.length === 0) {
|
|
145
|
-
|
|
145
|
+
z({
|
|
146
146
|
message: _("goodsSpu.chooseShelf"),
|
|
147
147
|
type: "warning"
|
|
148
148
|
});
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
const t = n.selectionRows.value.map((o) => o.spuId);
|
|
152
|
-
console.log(t),
|
|
152
|
+
console.log(t), E.enable({ spuId: t }, !0).then((o) => {
|
|
153
153
|
var C;
|
|
154
|
-
console.log(o), o.status === 200 && (
|
|
154
|
+
console.log(o), o.status === 200 && (z({
|
|
155
155
|
message: _("goodsSpu.successShelf") + o.data + _("common.stripData"),
|
|
156
156
|
type: "success"
|
|
157
157
|
}), n.getList(), (C = T.value) == null || C.clearSelection());
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
return n.getList(), (t, o) => {
|
|
161
|
-
const C = p("jmash-select"), S = p("el-form-item"), f = p("el-col"), k = p("el-input"), y = p("el-button"), N = p("el-row"),
|
|
161
|
+
const C = p("jmash-select"), S = p("el-form-item"), f = p("el-col"), k = p("el-input"), y = p("el-button"), N = p("el-row"), G = p("el-form"), J = p("jmash-column-select"), O = p("el-image"), U = p("el-switch"), W = p("jmash-table"), X = p("jmash-pagination"), Z = p("el-card"), h = oe("hasPerm");
|
|
162
162
|
return m(), V("div", ne, [
|
|
163
163
|
r("div", ue, [
|
|
164
|
-
a(
|
|
164
|
+
a(G, {
|
|
165
165
|
ref_key: "queryFormRef",
|
|
166
166
|
ref: B,
|
|
167
167
|
model: d.value,
|
|
@@ -264,7 +264,7 @@ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe =
|
|
|
264
264
|
_: 1
|
|
265
265
|
}, 8, ["model"])
|
|
266
266
|
]),
|
|
267
|
-
a(
|
|
267
|
+
a(Z, {
|
|
268
268
|
shadow: "never",
|
|
269
269
|
class: "table-container"
|
|
270
270
|
}, {
|
|
@@ -314,7 +314,7 @@ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe =
|
|
|
314
314
|
class: "container-float"
|
|
315
315
|
}, {
|
|
316
316
|
default: l(() => [
|
|
317
|
-
a(
|
|
317
|
+
a(J, {
|
|
318
318
|
modelValue: s(w),
|
|
319
319
|
"onUpdate:modelValue": o[8] || (o[8] = (e) => P(w) ? w.value = e : w = e),
|
|
320
320
|
"label-name": "goods/goods-spu"
|
|
@@ -327,7 +327,7 @@ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe =
|
|
|
327
327
|
})
|
|
328
328
|
]),
|
|
329
329
|
footer: l(() => [
|
|
330
|
-
s(v) > 0 ? (m(), I(
|
|
330
|
+
s(v) > 0 ? (m(), I(X, {
|
|
331
331
|
key: 0,
|
|
332
332
|
total: s(v),
|
|
333
333
|
"onUpdate:total": o[9] || (o[9] = (e) => P(v) ? v.value = e : null),
|
|
@@ -339,7 +339,7 @@ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe =
|
|
|
339
339
|
}, null, 8, ["total", "current-page", "page-size"])) : le("", !0)
|
|
340
340
|
]),
|
|
341
341
|
default: l(() => [
|
|
342
|
-
a(
|
|
342
|
+
a(W, {
|
|
343
343
|
ref_key: "multipleTableRef",
|
|
344
344
|
ref: T,
|
|
345
345
|
"row-key": "spuId",
|
|
@@ -357,10 +357,10 @@ const ne = { class: "app-container" }, ue = { class: "search-container" }, pe =
|
|
|
357
357
|
]),
|
|
358
358
|
picUrls: l((e) => [
|
|
359
359
|
r("span", null, [
|
|
360
|
-
a(
|
|
361
|
-
src: s(
|
|
360
|
+
a(O, {
|
|
361
|
+
src: s(j).imageUrl(e.data.row.picUrls.split(",")[0], 50, 50),
|
|
362
362
|
"preview-src-list": [
|
|
363
|
-
s(
|
|
363
|
+
s(j).imageUrl(e.data.row.picUrls.split(",")[0])
|
|
364
364
|
],
|
|
365
365
|
"preview-teleported": "",
|
|
366
366
|
"hide-on-click-modal": "",
|
|
@@ -2,7 +2,7 @@ import { defineComponent as te, ref as k, computed as se, watch as C, resolveCom
|
|
|
2
2
|
import "jmash-core";
|
|
3
3
|
import "xyvcard-shop";
|
|
4
4
|
import { C as L, D as ue, S as H, a as ne } from "./index-D5_GsXR7.mjs";
|
|
5
|
-
import { s as
|
|
5
|
+
import { s as pe, _ as re } from "./skuTable-8oPw0DhV.mjs";
|
|
6
6
|
const de = { key: 0 }, ce = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "w-full"
|
|
@@ -22,8 +22,8 @@ const de = { key: 0 }, ce = {
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["getGoodsSku", "getFormData"],
|
|
24
24
|
setup(J, { emit: K }) {
|
|
25
|
-
var F,
|
|
26
|
-
const
|
|
25
|
+
var F, T, q;
|
|
26
|
+
const r = k({
|
|
27
27
|
picUrl: "",
|
|
28
28
|
salePrice: 0,
|
|
29
29
|
marketPrice: 0,
|
|
@@ -43,7 +43,7 @@ const de = { key: 0 }, ce = {
|
|
|
43
43
|
immediate: !0
|
|
44
44
|
}
|
|
45
45
|
), C(
|
|
46
|
-
|
|
46
|
+
r,
|
|
47
47
|
(e) => {
|
|
48
48
|
E("getGoodsSku", e);
|
|
49
49
|
},
|
|
@@ -58,15 +58,15 @@ const de = { key: 0 }, ce = {
|
|
|
58
58
|
deep: !0,
|
|
59
59
|
immediate: !0
|
|
60
60
|
}
|
|
61
|
-
), v.form.spuId && (v.form.specType === L.specType.UNIFIED_SPEC ?
|
|
61
|
+
), v.form.spuId && (v.form.specType === L.specType.UNIFIED_SPEC ? r.value = (F = v.form.skuList) == null ? void 0 : F.results[0] : ($.value = (T = v.form.skuList) == null ? void 0 : T.results, (q = v.form.skuList) == null || q.results.forEach((e) => {
|
|
62
62
|
var l;
|
|
63
63
|
(l = e.specValues) == null || l.map((s) => {
|
|
64
64
|
ue.specInfoDict.useValues().then((n) => {
|
|
65
|
-
const
|
|
66
|
-
if (console.log(
|
|
65
|
+
const p = n.find((f) => s.specId === f.key);
|
|
66
|
+
if (console.log(p), p) {
|
|
67
67
|
let f = {
|
|
68
68
|
id: s.specId,
|
|
69
|
-
name:
|
|
69
|
+
name: p.value,
|
|
70
70
|
specValueList: []
|
|
71
71
|
};
|
|
72
72
|
t.value.push(f);
|
|
@@ -89,9 +89,9 @@ const de = { key: 0 }, ce = {
|
|
|
89
89
|
};
|
|
90
90
|
l.specValueList.push(d);
|
|
91
91
|
}
|
|
92
|
-
const
|
|
92
|
+
const p = /* @__PURE__ */ new Map();
|
|
93
93
|
l.specValueList = l.specValueList.filter(
|
|
94
|
-
(d) => !
|
|
94
|
+
(d) => !p.has(d.id) && p.set(d.id, d)
|
|
95
95
|
), console.log(t.value);
|
|
96
96
|
});
|
|
97
97
|
});
|
|
@@ -132,33 +132,32 @@ const de = { key: 0 }, ce = {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
function x(e, l) {
|
|
135
|
-
var
|
|
135
|
+
var p, d;
|
|
136
136
|
let s = V.value.values.filter((f) => f.key === e), n = {
|
|
137
137
|
id: s[0].key,
|
|
138
138
|
name: s[0].value
|
|
139
139
|
};
|
|
140
|
-
(d = (
|
|
140
|
+
(d = (p = t.value[l]) == null ? void 0 : p.specValueList) == null || d.push(n), t.value[l].specValueId = "";
|
|
141
141
|
}
|
|
142
142
|
function ee(e) {
|
|
143
143
|
E("getFormData", e);
|
|
144
144
|
}
|
|
145
145
|
return (e, l) => {
|
|
146
|
-
const s = i("el-input-number"), n = i("el-form-item"),
|
|
146
|
+
const s = i("el-input-number"), n = i("el-form-item"), p = i("el-col"), d = i("el-row"), f = i("Delete"), le = i("el-icon"), oe = i("el-tag"), R = i("el-button"), N = i("el-option"), j = i("el-select"), A = i("el-popover"), B = i("el-tab-pane"), G = i("el-tabs");
|
|
147
147
|
return m(), _(h, null, [
|
|
148
148
|
v.specType == M(L).specType.UNIFIED_SPEC ? (m(), _("div", de, [
|
|
149
149
|
o(d, null, {
|
|
150
150
|
default: a(() => [
|
|
151
|
-
o(
|
|
151
|
+
o(p, { span: 8 }, {
|
|
152
152
|
default: a(() => [
|
|
153
153
|
o(n, {
|
|
154
154
|
label: e.$t("goodsSpu.salePrice"),
|
|
155
|
-
prop: "salePrice"
|
|
156
|
-
required: ""
|
|
155
|
+
prop: "salePrice"
|
|
157
156
|
}, {
|
|
158
157
|
default: a(() => [
|
|
159
158
|
o(s, {
|
|
160
|
-
modelValue:
|
|
161
|
-
"onUpdate:modelValue": l[0] || (l[0] = (u) =>
|
|
159
|
+
modelValue: r.value.salePrice,
|
|
160
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => r.value.salePrice = u),
|
|
162
161
|
precision: 2,
|
|
163
162
|
step: 0,
|
|
164
163
|
placeholder: e.$t("goodsSpu.salePriceRequired"),
|
|
@@ -171,7 +170,7 @@ const de = { key: 0 }, ce = {
|
|
|
171
170
|
]),
|
|
172
171
|
_: 1
|
|
173
172
|
}),
|
|
174
|
-
o(
|
|
173
|
+
o(p, { span: 8 }, {
|
|
175
174
|
default: a(() => [
|
|
176
175
|
o(n, {
|
|
177
176
|
label: e.$t("goodsSpu.marketPrice"),
|
|
@@ -179,8 +178,8 @@ const de = { key: 0 }, ce = {
|
|
|
179
178
|
}, {
|
|
180
179
|
default: a(() => [
|
|
181
180
|
o(s, {
|
|
182
|
-
modelValue:
|
|
183
|
-
"onUpdate:modelValue": l[1] || (l[1] = (u) =>
|
|
181
|
+
modelValue: r.value.marketPrice,
|
|
182
|
+
"onUpdate:modelValue": l[1] || (l[1] = (u) => r.value.marketPrice = u),
|
|
184
183
|
precision: 2,
|
|
185
184
|
step: 0,
|
|
186
185
|
placeholder: e.$t("goodsSpu.marketPriceRequired"),
|
|
@@ -193,7 +192,7 @@ const de = { key: 0 }, ce = {
|
|
|
193
192
|
]),
|
|
194
193
|
_: 1
|
|
195
194
|
}),
|
|
196
|
-
o(
|
|
195
|
+
o(p, { span: 8 }, {
|
|
197
196
|
default: a(() => [
|
|
198
197
|
o(n, {
|
|
199
198
|
label: e.$t("goodsSpu.costPrice"),
|
|
@@ -201,8 +200,8 @@ const de = { key: 0 }, ce = {
|
|
|
201
200
|
}, {
|
|
202
201
|
default: a(() => [
|
|
203
202
|
o(s, {
|
|
204
|
-
modelValue:
|
|
205
|
-
"onUpdate:modelValue": l[2] || (l[2] = (u) =>
|
|
203
|
+
modelValue: r.value.costPrice,
|
|
204
|
+
"onUpdate:modelValue": l[2] || (l[2] = (u) => r.value.costPrice = u),
|
|
206
205
|
precision: 2,
|
|
207
206
|
step: 0,
|
|
208
207
|
placeholder: e.$t("goodsSpu.costPriceRequired"),
|
|
@@ -215,17 +214,16 @@ const de = { key: 0 }, ce = {
|
|
|
215
214
|
]),
|
|
216
215
|
_: 1
|
|
217
216
|
}),
|
|
218
|
-
o(
|
|
217
|
+
o(p, { span: 8 }, {
|
|
219
218
|
default: a(() => [
|
|
220
219
|
o(n, {
|
|
221
220
|
label: e.$t("goodsSpu.stock"),
|
|
222
|
-
prop: "stock"
|
|
223
|
-
required: ""
|
|
221
|
+
prop: "stock"
|
|
224
222
|
}, {
|
|
225
223
|
default: a(() => [
|
|
226
224
|
o(s, {
|
|
227
|
-
modelValue:
|
|
228
|
-
"onUpdate:modelValue": l[3] || (l[3] = (u) =>
|
|
225
|
+
modelValue: r.value.stock,
|
|
226
|
+
"onUpdate:modelValue": l[3] || (l[3] = (u) => r.value.stock = u),
|
|
229
227
|
placeholder: e.$t("goodsSpu.stockRequired"),
|
|
230
228
|
class: "w-full",
|
|
231
229
|
controls: !1,
|
|
@@ -237,7 +235,7 @@ const de = { key: 0 }, ce = {
|
|
|
237
235
|
]),
|
|
238
236
|
_: 1
|
|
239
237
|
}),
|
|
240
|
-
o(
|
|
238
|
+
o(p, { span: 8 }, {
|
|
241
239
|
default: a(() => [
|
|
242
240
|
o(n, {
|
|
243
241
|
label: e.$t("goodsSpu.weight"),
|
|
@@ -245,8 +243,8 @@ const de = { key: 0 }, ce = {
|
|
|
245
243
|
}, {
|
|
246
244
|
default: a(() => [
|
|
247
245
|
o(s, {
|
|
248
|
-
modelValue:
|
|
249
|
-
"onUpdate:modelValue": l[4] || (l[4] = (u) =>
|
|
246
|
+
modelValue: r.value.weight,
|
|
247
|
+
"onUpdate:modelValue": l[4] || (l[4] = (u) => r.value.weight = u),
|
|
250
248
|
placeholder: e.$t("goodsSpu.weightRequired"),
|
|
251
249
|
class: "w-full",
|
|
252
250
|
controls: !1
|
|
@@ -257,7 +255,7 @@ const de = { key: 0 }, ce = {
|
|
|
257
255
|
]),
|
|
258
256
|
_: 1
|
|
259
257
|
}),
|
|
260
|
-
o(
|
|
258
|
+
o(p, { span: 8 }, {
|
|
261
259
|
default: a(() => [
|
|
262
260
|
o(n, {
|
|
263
261
|
label: e.$t("goodsSpu.volume"),
|
|
@@ -265,8 +263,8 @@ const de = { key: 0 }, ce = {
|
|
|
265
263
|
}, {
|
|
266
264
|
default: a(() => [
|
|
267
265
|
o(s, {
|
|
268
|
-
modelValue:
|
|
269
|
-
"onUpdate:modelValue": l[5] || (l[5] = (u) =>
|
|
266
|
+
modelValue: r.value.volume,
|
|
267
|
+
"onUpdate:modelValue": l[5] || (l[5] = (u) => r.value.volume = u),
|
|
270
268
|
controls: !1,
|
|
271
269
|
placeholder: e.$t("goodsSpu.volumeRequired"),
|
|
272
270
|
class: "w-full"
|
|
@@ -400,7 +398,7 @@ const de = { key: 0 }, ce = {
|
|
|
400
398
|
default: a(() => [
|
|
401
399
|
o(B, { label: "规格售价与库存" }, {
|
|
402
400
|
default: a(() => [
|
|
403
|
-
t.value.length > 0 ? (m(), P(
|
|
401
|
+
t.value.length > 0 ? (m(), P(pe, {
|
|
404
402
|
key: 0,
|
|
405
403
|
specData: U.value,
|
|
406
404
|
goodsSku: $.value,
|
|
@@ -416,7 +414,7 @@ const de = { key: 0 }, ce = {
|
|
|
416
414
|
], 64);
|
|
417
415
|
};
|
|
418
416
|
}
|
|
419
|
-
}), ye = /* @__PURE__ */
|
|
417
|
+
}), ye = /* @__PURE__ */ re(ge, [["__scopeId", "data-v-de70dfa2"]]);
|
|
420
418
|
export {
|
|
421
419
|
ye as default
|
|
422
420
|
};
|