xyvcard-goods 0.0.32 → 0.0.33
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/README.md +51 -51
- package/dist/GoodsBaseForm-6rzBkBTh.mjs +4 -0
- package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-BmIR352P.mjs +374 -0
- package/dist/GoodsLogisticsForm-CHyQ99Mt.mjs +10 -0
- package/dist/GoodsSpecForm-BqaN71rS.mjs +4 -0
- package/dist/GoodsSpecForm.vue_vue_type_script_setup_true_lang-BTFKRiNW.mjs +140 -0
- package/dist/{ImageUpload-BMw9FVJL.mjs → ImageUpload-Bf2jhRs5.mjs} +1 -1
- package/dist/edit copy 2-DnKLaz3I.mjs +45 -0
- package/dist/edit copy-tfwJCdiV.mjs +526 -0
- package/dist/{edit-CyhVo22f.mjs → edit-1Lv_dvlq.mjs} +7 -7
- package/dist/{edit-CuGiM5xu.mjs → edit-CZwlbL9o.mjs} +9 -9
- package/dist/{edit-DvO1wYIL.mjs → edit-D2zcGl_U.mjs} +1 -1
- package/dist/{edit-Bh5jT6eo.mjs → edit-DBTNknBy.mjs} +4 -4
- package/dist/{edit-BlQj1xVR.mjs → edit-Db2EJ9dq.mjs} +4 -4
- package/dist/{edit.vue_vue_type_script_setup_true_lang-Bx32ZXck.mjs → edit.vue_vue_type_script_setup_true_lang-BmOhw098.mjs} +3 -3
- package/dist/el-message-BB2-39XJ.mjs +1221 -0
- package/dist/{index-BrBipAPq.mjs → index-BXa-atkT.mjs} +1 -1
- package/dist/{index-8JQB4NmH.mjs → index-BhUD_X30.mjs} +281 -250
- package/dist/{index-Dz9NSJh1.mjs → index-BpXZNA11.mjs} +3 -3
- package/dist/{index-BlZupHNB.mjs → index-CRfiEzkA.mjs} +1488 -1477
- package/dist/{index-CVM7nBhM.mjs → index-Cl4wz2yF.mjs} +3 -3
- package/dist/{index-DzUSeIbT.mjs → index-DGYGNHfx.mjs} +3 -3
- package/dist/{index-Dk9-_0Ir.mjs → index-DXIGHcIv.mjs} +2 -2
- package/dist/index-Df-F10aZ.mjs +264 -0
- package/dist/index-vHQhUQSO.mjs +95 -0
- package/dist/index.mjs +1 -1
- package/dist/{info-NFU_3fNY.mjs → info-DDi6GKQH.mjs} +3 -3
- package/dist/{info-CLt9Ea38.mjs → info-DfbU-CWk.mjs} +2 -2
- package/dist/{skuForm-8WZm2j5V.mjs → skuForm-DWIoveRP.mjs} +14 -14
- package/dist/{skuForm-Dr6dKGa4.mjs → skuForm-DoIpxDvq.mjs} +71 -86
- package/dist/{skuTable-BwIc5hr5.mjs → skuTable-BVBtWrf9.mjs} +13 -13
- package/dist/style.css +1 -1
- package/dts/api/goods-base/index.d.ts +11 -0
- package/dts/api/goods-base/types.d.ts +33 -0
- package/dts/api/goods-logistics/index.d.ts +8 -0
- package/dts/api/goods-logistics/types.d.ts +16 -0
- package/dts/api/goods-spec/index.d.ts +8 -0
- package/dts/api/goods-spec/types.d.ts +15 -0
- package/dts/api/goods-spu/index.d.ts +3 -0
- package/dts/api/goods-stock/index.d.ts +8 -0
- package/dts/api/goods-stock/types.d.ts +32 -0
- package/dts/api/index.d.ts +3 -0
- package/dts/constant.d.ts +26 -0
- package/dts/lang/goods/zh-cn.d.ts +12 -0
- package/dts/views/goods/goods-spu/components/GoodsBaseForm.vue.d.ts +7 -0
- package/dts/views/goods/goods-spu/components/GoodsLogisticsForm.vue.d.ts +2 -0
- package/dts/views/goods/goods-spu/components/GoodsSpecForm.vue.d.ts +7 -0
- package/dts/views/goods/goods-spu/edit copy 2.vue.d.ts +2 -0
- package/dts/views/goods/goods-spu/edit copy.vue.d.ts +2 -0
- package/package.json +63 -63
- package/dist/index-B7_M6fAN.mjs +0 -228
- package/dts/views/goods/goods-combination/goodsList.vue.d.ts +0 -14
- package/dts/views/goods/goods-combination/skuTable.vue.d.ts +0 -40
- package/dts/views/goods/goods-spu/goodsList.vue.d.ts +0 -23
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as z, ref as S, watch as E, resolveComponent as i, createBlock as P, openBlock as m, withCtx as r, createVNode as n, unref as h, createElementBlock as T, Fragment as Y, renderList as G, createCommentVNode as M, createTextVNode as H, toDisplayString as J } from "vue";
|
|
2
2
|
import { useI18n as K } from "vue-i18n";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
name: "Plus",
|
|
10
|
-
__name: "plus",
|
|
11
|
-
setup(b) {
|
|
12
|
-
return (C, E) => (m(), v("svg", {
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
-
viewBox: "0 0 1024 1024"
|
|
15
|
-
}, [
|
|
16
|
-
M("path", {
|
|
17
|
-
fill: "currentColor",
|
|
18
|
-
d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
|
|
19
|
-
})
|
|
20
|
-
]));
|
|
21
|
-
}
|
|
22
|
-
}), Z = X;
|
|
23
|
-
const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
3
|
+
import { p as Q } from "./index-vHQhUQSO.mjs";
|
|
4
|
+
import { D as V, C as U } from "./index-Df-F10aZ.mjs";
|
|
5
|
+
import { a as D } from "./index-CRfiEzkA.mjs";
|
|
6
|
+
import { specValueApi as W } from "xyvcard-shop";
|
|
7
|
+
import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
8
|
+
const Z = { key: 0 }, x = /* @__PURE__ */ z({
|
|
24
9
|
__name: "skuForm",
|
|
25
10
|
props: {
|
|
26
11
|
form: {
|
|
@@ -30,8 +15,8 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
30
15
|
}
|
|
31
16
|
},
|
|
32
17
|
emits: ["getGoodsSku", "getFormData"],
|
|
33
|
-
setup(
|
|
34
|
-
const { t:
|
|
18
|
+
setup($, { emit: B }) {
|
|
19
|
+
const { t: O } = K(), g = S([]), d = S([
|
|
35
20
|
{
|
|
36
21
|
salePrice: 0,
|
|
37
22
|
skuId: "",
|
|
@@ -44,20 +29,20 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
44
29
|
marketPrice: 0
|
|
45
30
|
}
|
|
46
31
|
]);
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
function
|
|
50
|
-
s.picUrl = e;
|
|
32
|
+
V.goodsSpuBizDict.useValues();
|
|
33
|
+
const j = B;
|
|
34
|
+
function F(s, e) {
|
|
35
|
+
s.picUrl = e.response.fileSrc;
|
|
51
36
|
}
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
37
|
+
const y = $;
|
|
38
|
+
E(
|
|
39
|
+
y.form,
|
|
55
40
|
(s) => s,
|
|
56
41
|
{
|
|
57
42
|
deep: !0,
|
|
58
43
|
immediate: !0
|
|
59
44
|
}
|
|
60
|
-
),
|
|
45
|
+
), y.form.spuId && D.findGroupList({ goodsId: y.form.spuId }).then(({ data: s }) => {
|
|
61
46
|
if (s && s.results.length > 0) {
|
|
62
47
|
d.value = [];
|
|
63
48
|
const e = s.results.map(async (l) => {
|
|
@@ -71,18 +56,18 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
71
56
|
specType: "",
|
|
72
57
|
skuOptions: []
|
|
73
58
|
};
|
|
74
|
-
return await
|
|
59
|
+
return await v(l.spuId, t), t.saleNum = l.saleNum || 1, t.salePrice = l.salePrice || 0, t.specType === U.SPEC_TYPE.MULTI_SPEC && l.skuId && (t.skuId = l.skuId || "", t.salePrice = l.salePrice || 0, t.saleNum = l.saleNum || 1, t.picUrl = l.picUrl || "", C(l.skuId)), t;
|
|
75
60
|
});
|
|
76
61
|
Promise.all(e).then((l) => {
|
|
77
62
|
d.value = l;
|
|
78
63
|
});
|
|
79
64
|
}
|
|
80
65
|
});
|
|
81
|
-
function
|
|
66
|
+
function L(s) {
|
|
82
67
|
const e = d.value.indexOf(s.row);
|
|
83
68
|
e !== 0 && d.value.splice(e, 1);
|
|
84
69
|
}
|
|
85
|
-
function
|
|
70
|
+
function A() {
|
|
86
71
|
d.value.push({
|
|
87
72
|
salePrice: 0,
|
|
88
73
|
skuId: "",
|
|
@@ -95,44 +80,44 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
95
80
|
marketPrice: 0
|
|
96
81
|
});
|
|
97
82
|
}
|
|
98
|
-
const
|
|
99
|
-
async function
|
|
100
|
-
if (!
|
|
83
|
+
const b = S({});
|
|
84
|
+
async function R(s) {
|
|
85
|
+
if (!g.value[s])
|
|
101
86
|
try {
|
|
102
|
-
const { data: e } = await
|
|
87
|
+
const { data: e } = await W.findById({
|
|
103
88
|
specValueId: s
|
|
104
89
|
});
|
|
105
|
-
return
|
|
90
|
+
return g.value[s] = e.valueName, e.valueName;
|
|
106
91
|
} catch {
|
|
107
92
|
}
|
|
108
93
|
}
|
|
109
|
-
async function
|
|
94
|
+
async function v(s, e) {
|
|
110
95
|
var l, t, I;
|
|
111
96
|
if (e.skuId = "", e.skuOptions = [], e.picUrl = "", e.salePrice = 0, e.saleNum = 1, e.skuName = "", e.marketPrice = 0, !s) {
|
|
112
|
-
e.skuId = "", e.picUrl = "", e.salePrice = 0, e.saleNum = 1, e.skuName = ((l =
|
|
97
|
+
e.skuId = "", e.picUrl = "", e.salePrice = 0, e.saleNum = 1, e.skuName = ((l = V.goodsSpuBizDict.values.find((o) => o.key === s)) == null ? void 0 : l.value) ?? "", e.skuOptions = [], e.marketPrice = 0;
|
|
113
98
|
return;
|
|
114
99
|
}
|
|
115
100
|
try {
|
|
116
|
-
const { data: o } = await
|
|
117
|
-
if (e.specType = o.specType, e.marketPrice = o.maxPrice, e.specType ===
|
|
118
|
-
const f = o.skuList.results,
|
|
101
|
+
const { data: o } = await D.findById({ spuId: s });
|
|
102
|
+
if (e.specType = o.specType, e.marketPrice = o.maxPrice, e.specType === U.SPEC_TYPE.UNIFIED_SPEC && (e.picUrl = o.picUrls ? o.picUrls.split(",")[0] : "", e.salePrice = (t = o.skuList) == null ? void 0 : t.results[0].salePrice, e.skuId = (I = o.skuList) == null ? void 0 : I.results[0].skuId, e.skuName = o.spuName), e.specType === U.SPEC_TYPE.MULTI_SPEC && o.skuList) {
|
|
103
|
+
const f = o.skuList.results, k = f.map((u) => u.specValues && Array.isArray(u.specValues) ? u.specValues.map(
|
|
119
104
|
(p) => p.specValueId
|
|
120
|
-
) : []),
|
|
121
|
-
await Promise.all(
|
|
122
|
-
const
|
|
123
|
-
(u) => u.map((p) =>
|
|
105
|
+
) : []), N = k.flat().map((u) => R(u));
|
|
106
|
+
await Promise.all(N);
|
|
107
|
+
const _ = k.map(
|
|
108
|
+
(u) => u.map((p) => g.value[p] || p)
|
|
124
109
|
);
|
|
125
110
|
e.skuOptions = f.map((u, p) => ({
|
|
126
111
|
key: u.skuId,
|
|
127
|
-
value:
|
|
128
|
-
specInfo:
|
|
112
|
+
value: _[p].join(" "),
|
|
113
|
+
specInfo: _[p].join(" "),
|
|
129
114
|
picUrl: u.picUrl || (o.picUrls ? o.picUrls.split(",")[0] : ""),
|
|
130
115
|
salePrice: u.salePrice,
|
|
131
116
|
stock: u.stock
|
|
132
117
|
})), f.forEach((u, p) => {
|
|
133
|
-
u.skuId && (
|
|
118
|
+
u.skuId && (b.value[u.skuId] = {
|
|
134
119
|
...u,
|
|
135
|
-
specInfo:
|
|
120
|
+
specInfo: _[p].join(" "),
|
|
136
121
|
spuPicUrls: o.picUrls
|
|
137
122
|
});
|
|
138
123
|
});
|
|
@@ -140,17 +125,17 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
140
125
|
} catch {
|
|
141
126
|
}
|
|
142
127
|
}
|
|
143
|
-
function
|
|
128
|
+
function C(s) {
|
|
144
129
|
const e = d.value.find((l) => l.skuId === s);
|
|
145
130
|
if (e && s) {
|
|
146
|
-
const l =
|
|
131
|
+
const l = b.value[s];
|
|
147
132
|
if (l) {
|
|
148
133
|
const t = l.spuPicUrls ? l.spuPicUrls.split(",")[0] : "";
|
|
149
134
|
e.picUrl = l.picUrl || t, e.salePrice = l.salePrice, e.specInfo = l.specInfo;
|
|
150
135
|
}
|
|
151
136
|
}
|
|
152
137
|
}
|
|
153
|
-
return
|
|
138
|
+
return E(
|
|
154
139
|
d,
|
|
155
140
|
(s) => {
|
|
156
141
|
const e = s.filter((l) => l.spuId && l.skuId).map((l) => ({
|
|
@@ -163,37 +148,37 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
163
148
|
skuName: l.skuName,
|
|
164
149
|
marketPrice: l.marketPrice
|
|
165
150
|
}));
|
|
166
|
-
console.log("filteredValue", e),
|
|
151
|
+
console.log("filteredValue", e), j("getGoodsSku", e);
|
|
167
152
|
},
|
|
168
153
|
{
|
|
169
154
|
deep: !0,
|
|
170
155
|
immediate: !0
|
|
171
156
|
}
|
|
172
157
|
), (s, e) => {
|
|
173
|
-
const l =
|
|
158
|
+
const l = i("jmash-select"), t = i("el-table-column"), I = i("el-option"), o = i("el-select"), f = i("jmash-single-image-upload"), k = i("el-input-number"), N = i("DeleteFilled"), _ = i("el-icon"), u = i("el-table"), p = i("el-button"), q = i("el-row");
|
|
174
159
|
return m(), P(q, null, {
|
|
175
|
-
default:
|
|
160
|
+
default: r(() => [
|
|
176
161
|
n(u, {
|
|
177
162
|
data: d.value,
|
|
178
163
|
border: "",
|
|
179
164
|
style: { width: "100%" }
|
|
180
165
|
}, {
|
|
181
|
-
default:
|
|
166
|
+
default: r(() => [
|
|
182
167
|
n(t, {
|
|
183
168
|
label: s.$t("goodsSpu.spuName"),
|
|
184
169
|
prop: "spuId",
|
|
185
170
|
"header-align": "center"
|
|
186
171
|
}, {
|
|
187
|
-
default:
|
|
172
|
+
default: r(({ row: a }) => [
|
|
188
173
|
n(l, {
|
|
189
174
|
modelValue: a.spuId,
|
|
190
175
|
"onUpdate:modelValue": (c) => a.spuId = c,
|
|
191
|
-
data: h(
|
|
176
|
+
data: h(V).goodsSpuBizDict.values,
|
|
192
177
|
filterable: "",
|
|
193
178
|
clearable: "",
|
|
194
179
|
placeholder: s.$t("goodsSpu.spuNameRequireds"),
|
|
195
180
|
class: "w-full",
|
|
196
|
-
onChange: (c) =>
|
|
181
|
+
onChange: (c) => v(a.spuId, a)
|
|
197
182
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data", "placeholder", "onChange"])
|
|
198
183
|
]),
|
|
199
184
|
_: 1
|
|
@@ -202,16 +187,16 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
202
187
|
label: s.$t("goodsSpu.specType"),
|
|
203
188
|
"header-align": "center"
|
|
204
189
|
}, {
|
|
205
|
-
default:
|
|
206
|
-
a.specType === h(
|
|
190
|
+
default: r(({ row: a }) => [
|
|
191
|
+
a.specType === h(U).SPEC_TYPE.UNIFIED_SPEC ? (m(), T("span", Z, " 统一规格 ")) : (m(), P(o, {
|
|
207
192
|
key: 1,
|
|
208
193
|
modelValue: a.skuId,
|
|
209
194
|
"onUpdate:modelValue": (c) => a.skuId = c,
|
|
210
195
|
placeholder: s.$t("goodsSpu.specTypeRequired"),
|
|
211
|
-
onChange: (c) =>
|
|
196
|
+
onChange: (c) => C(a.skuId)
|
|
212
197
|
}, {
|
|
213
|
-
default:
|
|
214
|
-
(m(!0),
|
|
198
|
+
default: r(() => [
|
|
199
|
+
(m(!0), T(Y, null, G(a.skuOptions, (c) => (m(), P(I, {
|
|
215
200
|
key: c.key,
|
|
216
201
|
label: c.value,
|
|
217
202
|
value: c.key
|
|
@@ -228,10 +213,10 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
228
213
|
width: "105",
|
|
229
214
|
"header-align": "center"
|
|
230
215
|
}, {
|
|
231
|
-
default:
|
|
216
|
+
default: r(({ row: a }) => [
|
|
232
217
|
n(f, {
|
|
233
218
|
"picture-url": a.picUrl,
|
|
234
|
-
onImageSrc: (c) =>
|
|
219
|
+
onImageSrc: (c) => F(a, c),
|
|
235
220
|
width: 80,
|
|
236
221
|
type: "trans"
|
|
237
222
|
}, null, 8, ["picture-url", "onImageSrc"])
|
|
@@ -243,8 +228,8 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
243
228
|
prop: "salePrice",
|
|
244
229
|
"header-align": "center"
|
|
245
230
|
}, {
|
|
246
|
-
default:
|
|
247
|
-
n(
|
|
231
|
+
default: r(({ row: a }) => [
|
|
232
|
+
n(k, {
|
|
248
233
|
modelValue: a.salePrice,
|
|
249
234
|
"onUpdate:modelValue": (c) => a.salePrice = c,
|
|
250
235
|
precision: 2,
|
|
@@ -261,8 +246,8 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
261
246
|
prop: "saleNum",
|
|
262
247
|
"header-align": "center"
|
|
263
248
|
}, {
|
|
264
|
-
default:
|
|
265
|
-
n(
|
|
249
|
+
default: r(({ row: a }) => [
|
|
250
|
+
n(k, {
|
|
266
251
|
modelValue: a.saleNum,
|
|
267
252
|
"onUpdate:modelValue": (c) => a.saleNum = c,
|
|
268
253
|
placeholder: s.$t("goodsSpu.saleNumRequireds"),
|
|
@@ -279,19 +264,19 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
279
264
|
width: "60",
|
|
280
265
|
align: "center"
|
|
281
266
|
}, {
|
|
282
|
-
default:
|
|
283
|
-
a.$index !== 0 ? (m(), P(
|
|
267
|
+
default: r((a) => [
|
|
268
|
+
a.$index !== 0 ? (m(), P(_, {
|
|
284
269
|
key: 0,
|
|
285
|
-
onClick: (c) =>
|
|
270
|
+
onClick: (c) => L(a),
|
|
286
271
|
size: "18",
|
|
287
272
|
style: { cursor: "pointer", color: "inherit" },
|
|
288
273
|
class: "hover-blue"
|
|
289
274
|
}, {
|
|
290
|
-
default:
|
|
291
|
-
n(
|
|
275
|
+
default: r(() => [
|
|
276
|
+
n(N)
|
|
292
277
|
]),
|
|
293
278
|
_: 2
|
|
294
|
-
}, 1032, ["onClick"])) :
|
|
279
|
+
}, 1032, ["onClick"])) : M("", !0)
|
|
295
280
|
]),
|
|
296
281
|
_: 1
|
|
297
282
|
}, 8, ["label"])
|
|
@@ -299,12 +284,12 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
299
284
|
_: 1
|
|
300
285
|
}, 8, ["data"]),
|
|
301
286
|
n(p, {
|
|
302
|
-
icon: h(
|
|
287
|
+
icon: h(Q),
|
|
303
288
|
class: "addButton",
|
|
304
|
-
onClick:
|
|
289
|
+
onClick: A
|
|
305
290
|
}, {
|
|
306
|
-
default:
|
|
307
|
-
|
|
291
|
+
default: r(() => [
|
|
292
|
+
H(J(h(O)("common.add")), 1)
|
|
308
293
|
]),
|
|
309
294
|
_: 1
|
|
310
295
|
}, 8, ["icon"])
|
|
@@ -313,7 +298,7 @@ const w = { key: 0 }, ee = /* @__PURE__ */ j({
|
|
|
313
298
|
});
|
|
314
299
|
};
|
|
315
300
|
}
|
|
316
|
-
}),
|
|
301
|
+
}), oe = /* @__PURE__ */ X(x, [["__scopeId", "data-v-278edbe2"]]);
|
|
317
302
|
export {
|
|
318
|
-
|
|
303
|
+
oe as default
|
|
319
304
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as T, ref as C, computed as F, watch as $, resolveComponent as g, createElementBlock as
|
|
2
|
-
import { D as O } from "./index-
|
|
1
|
+
import { defineComponent as T, ref as C, computed as F, watch as $, resolveComponent as g, createElementBlock as _, openBlock as P, createCommentVNode as M, createVNode as a, createElementVNode as u, createTextVNode as y, withCtx as d, Fragment as G, renderList as K, createBlock as z, toDisplayString as D, unref as x } from "vue";
|
|
2
|
+
import { D as O } from "./index-Df-F10aZ.mjs";
|
|
3
3
|
import { fileApi as E } from "jmash-core";
|
|
4
4
|
import { _ as H } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
5
|
function J(n, h = [], o) {
|
|
@@ -103,7 +103,7 @@ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z
|
|
|
103
103
|
s.forEach((r) => {
|
|
104
104
|
let c = i.specIds.split("_"), l = r.specIds.split("_"), V = !0;
|
|
105
105
|
c.forEach((m) => {
|
|
106
|
-
l.find((
|
|
106
|
+
l.find((b) => b == m) || (V = !1);
|
|
107
107
|
}), V && (i.picUrl = r.picUrl ? r.picUrl : "", i.skuCode = r.skuCode ? r.skuCode : void 0, i.skuId = r.skuId ? r.skuId : void 0, i.salePrice = r.salePrice, i.salePriceV2 = r.salePriceV2, i.salePriceV3 = r.salePriceV3, i.marketPrice = r.marketPrice, i.costPrice = r.costPrice, i.stock = r.stock, i.weight = r.weight, i.volume = r.volume, i.status = r.status);
|
|
108
108
|
});
|
|
109
109
|
}), t;
|
|
@@ -140,7 +140,7 @@ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z
|
|
|
140
140
|
let l = [];
|
|
141
141
|
t.forEach((V) => {
|
|
142
142
|
const m = f.value.find(
|
|
143
|
-
(
|
|
143
|
+
(b) => b.specIds === V.specIds
|
|
144
144
|
);
|
|
145
145
|
m ? l.push(m) : l.push({
|
|
146
146
|
...V,
|
|
@@ -199,12 +199,12 @@ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z
|
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
function v(t, s) {
|
|
202
|
-
s.picUrl = t;
|
|
202
|
+
s.picUrl = t.response.fileSrc;
|
|
203
203
|
}
|
|
204
204
|
return (t, s) => {
|
|
205
|
-
const i = g("Setting"), r = g("el-icon"), c = g("el-input-number"), l = g("el-tooltip"), V = g("el-button"), m = g("el-table-column"),
|
|
206
|
-
return P(),
|
|
207
|
-
n.isSettingShow ? (P(),
|
|
205
|
+
const i = g("Setting"), r = g("el-icon"), c = g("el-input-number"), l = g("el-tooltip"), V = g("el-button"), m = g("el-table-column"), b = g("jmash-single-image-upload"), A = g("el-image"), N = g("el-input"), j = g("el-switch"), q = g("el-table");
|
|
206
|
+
return P(), _("div", null, [
|
|
207
|
+
n.isSettingShow ? (P(), _("div", W, [
|
|
208
208
|
u("div", X, [
|
|
209
209
|
a(r, null, {
|
|
210
210
|
default: d(() => [
|
|
@@ -392,7 +392,7 @@ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z
|
|
|
392
392
|
}, {
|
|
393
393
|
default: d(() => [
|
|
394
394
|
a(m, { type: "index" }),
|
|
395
|
-
(P(!0),
|
|
395
|
+
(P(!0), _(G, null, K(n.specData, (e, p) => (P(), z(m, {
|
|
396
396
|
key: e.id,
|
|
397
397
|
prop: e.id,
|
|
398
398
|
label: e.name
|
|
@@ -407,7 +407,7 @@ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z
|
|
|
407
407
|
label: "图片"
|
|
408
408
|
}, {
|
|
409
409
|
default: d((e) => [
|
|
410
|
-
n.isSettingShow ? (P(), z(
|
|
410
|
+
n.isSettingShow ? (P(), z(b, {
|
|
411
411
|
key: 0,
|
|
412
412
|
"picture-url": e.row.picUrl,
|
|
413
413
|
onImageSrc: (p) => v(p, e.row)
|
|
@@ -618,12 +618,12 @@ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z
|
|
|
618
618
|
width: "80"
|
|
619
619
|
}, {
|
|
620
620
|
default: d((e) => [
|
|
621
|
-
n.isSettingShow ? (P(),
|
|
621
|
+
n.isSettingShow ? (P(), _("span", ie, [
|
|
622
622
|
a(j, {
|
|
623
623
|
modelValue: e.row.status,
|
|
624
624
|
"onUpdate:modelValue": (p) => e.row.status = p
|
|
625
625
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
626
|
-
])) : (P(),
|
|
626
|
+
])) : (P(), _("span", ne, D(x(O).shelfDict.getValue(e.row.status)), 1))
|
|
627
627
|
]),
|
|
628
628
|
_: 1
|
|
629
629
|
})
|
|
@@ -633,7 +633,7 @@ const W = { key: 0 }, X = { class: "title-set" }, Y = { class: "right-dis" }, Z
|
|
|
633
633
|
]);
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
}), me = /* @__PURE__ */ H(re, [["__scopeId", "data-v-
|
|
636
|
+
}), me = /* @__PURE__ */ H(re, [["__scopeId", "data-v-b94fa9cb"]]);
|
|
637
637
|
export {
|
|
638
638
|
me as default
|
|
639
639
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}[data-v-f10f6f7e] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-f10f6f7e] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}.title-set[data-v-6fc718ce]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-e6aa4b01]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-e6aa4b01]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-e6aa4b01]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-e6aa4b01]{padding:10px 20px}.goods-tag[data-v-e6aa4b01]{margin-bottom:10px}.addButton[data-v-6bb5afe9]{margin-top:15px;margin-bottom:20px;width:100%}.hover-blue[data-v-6bb5afe9]:hover{color:#409eff!important}.position-center[data-v-4d967c8a]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4d967c8a]{position:absolute;right:0;top:0;margin-top:8px}.position-center[data-v-4ec2418d]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-4ec2418d]{position:absolute;right:0;top:0;margin-top:8px}
|
|
1
|
+
@charset "UTF-8";.w-full{width:100%!important}.right-dis{margin-right:10px}.top-dis{margin-top:25px}.cell-item{display:flex;align-items:center;justify-content:flex-end}.el-descriptions__label{width:15%;text-align:right}.el-descriptions__content{width:35%}[data-v-611600ed] .el-upload--picture-card{width:80px;height:80px;border-radius:0}[data-v-611600ed] .el-upload-list--picture-card .el-upload-list__item{width:80px;height:80px}.title-set[data-v-b94fa9cb]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-95ee71d5]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-95ee71d5]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-95ee71d5]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-95ee71d5]{padding:10px 20px}.goods-tag[data-v-95ee71d5]{margin-bottom:10px}.addButton[data-v-278edbe2]{margin-top:15px;margin-bottom:20px;width:100%}.hover-blue[data-v-278edbe2]:hover{color:#409eff!important}.position-center[data-v-a7bde704]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-a7bde704]{position:absolute;right:0;top:0;margin-top:8px}.position-center[data-v-da50884a]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-da50884a]{position:absolute;right:0;top:0;margin-top:8px}:root{--el-color-white:#ffffff;--el-color-black:#000000;--el-color-primary-rgb:64,158,255;--el-color-success-rgb:103,194,58;--el-color-warning-rgb:230,162,60;--el-color-danger-rgb:245,108,108;--el-color-error-rgb:245,108,108;--el-color-info-rgb:144,147,153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645,.045,.355,1);--el-transition-function-fast-bezier:cubic-bezier(.23,1,.32,1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier),opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px;color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:rgb(121,187,255);--el-color-primary-light-5:rgb(160,207,255);--el-color-primary-light-7:rgb(198,226,255);--el-color-primary-light-8:rgb(217,236,255);--el-color-primary-light-9:rgb(236,245,255);--el-color-primary-dark-2:rgb(51,126,204);--el-color-success:#67c23a;--el-color-success-light-3:rgb(149,212,117);--el-color-success-light-5:rgb(179,225,157);--el-color-success-light-7:rgb(209,237,196);--el-color-success-light-8:rgb(225,243,216);--el-color-success-light-9:rgb(240,249,235);--el-color-success-dark-2:rgb(82,155,46);--el-color-warning:#e6a23c;--el-color-warning-light-3:rgb(238,190,119);--el-color-warning-light-5:rgb(243,209,158);--el-color-warning-light-7:rgb(248,227,197);--el-color-warning-light-8:rgb(250,236,216);--el-color-warning-light-9:rgb(253,246,236);--el-color-warning-dark-2:rgb(184,130,48);--el-color-danger:#f56c6c;--el-color-danger-light-3:rgb(248,152,152);--el-color-danger-light-5:rgb(250,182,182);--el-color-danger-light-7:rgb(252,211,211);--el-color-danger-light-8:rgb(253,226,226);--el-color-danger-light-9:rgb(254,240,240);--el-color-danger-dark-2:rgb(196,86,86);--el-color-error:#f56c6c;--el-color-error-light-3:rgb(248,152,152);--el-color-error-light-5:rgb(250,182,182);--el-color-error-light-7:rgb(252,211,211);--el-color-error-light-8:rgb(253,226,226);--el-color-error-light-9:rgb(254,240,240);--el-color-error-dark-2:rgb(196,86,86);--el-color-info:#909399;--el-color-info-light-3:rgb(177,179,184);--el-color-info-light-5:rgb(200,201,204);--el-color-info-light-7:rgb(222,223,224);--el-color-info-light-8:rgb(233,233,235);--el-color-info-light-9:rgb(244,244,245);--el-color-info-dark-2:rgb(115,118,122);--el-bg-color:#ffffff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#ffffff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#ffffff;--el-box-shadow:0px 12px 32px 4px rgba(0,0,0,.04),0px 8px 20px rgba(0,0,0,.08);--el-box-shadow-light:0px 0px 12px rgba(0,0,0,.12);--el-box-shadow-lighter:0px 0px 6px rgba(0,0,0,.12);--el-box-shadow-dark:0px 16px 48px 16px rgba(0,0,0,.08),0px 12px 32px rgba(0,0,0,.12),0px 8px 16px -8px rgba(0,0,0,.16);--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:rgba(0,0,0,.8);--el-overlay-color-light:rgba(0,0,0,.7);--el-overlay-color-lighter:rgba(0,0,0,.5);--el-mask-color:rgba(255,255,255,.9);--el-mask-color-extra-light:rgba(255,255,255,.3);--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transform-origin:center top;transition:var(--el-transition-md-fade)}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transform-origin:center bottom;transition:var(--el-transition-md-fade)}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transform-origin:top left;transition:var(--el-transition-md-fade)}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-enter-active,.el-collapse-transition-leave-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.el-icon{--color:inherit;align-items:center;display:inline-flex;height:1em;justify-content:center;line-height:1em;position:relative;width:1em;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}.el-badge{--el-badge-bg-color:var(--el-color-danger);--el-badge-radius:10px;--el-badge-font-size:12px;--el-badge-padding:6px;--el-badge-size:18px;display:inline-block;position:relative;vertical-align:middle;width:-moz-fit-content;width:fit-content}.el-badge__content{align-items:center;background-color:var(--el-badge-bg-color);border:1px solid var(--el-bg-color);border-radius:var(--el-badge-radius);color:var(--el-color-white);display:inline-flex;font-size:var(--el-badge-font-size);height:var(--el-badge-size);justify-content:center;padding:0 var(--el-badge-padding);white-space:nowrap}.el-badge__content.is-fixed{position:absolute;right:calc(1px + var(--el-badge-size)/2);top:0;transform:translateY(-50%) translate(100%);z-index:var(--el-index-normal)}.el-badge__content.is-fixed.is-dot{right:5px}.el-badge__content.is-dot{border-radius:50%;height:8px;padding:0;right:0;width:8px}.el-badge__content.is-hide-zero{display:none}.el-badge__content--primary{background-color:var(--el-color-primary)}.el-badge__content--success{background-color:var(--el-color-success)}.el-badge__content--warning{background-color:var(--el-color-warning)}.el-badge__content--info{background-color:var(--el-color-info)}.el-badge__content--danger{background-color:var(--el-color-danger)}.el-message{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-border-color-lighter);--el-message-padding:11px 15px;--el-message-close-size:16px;--el-message-close-icon-color:var(--el-text-color-placeholder);--el-message-close-hover-color:var(--el-text-color-secondary);align-items:center;background-color:var(--el-message-bg-color);border-color:var(--el-message-border-color);border-radius:var(--el-border-radius-base);border-style:var(--el-border-style);border-width:var(--el-border-width);box-sizing:border-box;display:flex;gap:8px;left:50%;max-width:calc(100% - 32px);padding:var(--el-message-padding);position:fixed;top:20px;transform:translate(-50%);transition:opacity var(--el-transition-duration),transform .4s,top .4s;width:-moz-fit-content;width:fit-content}.el-message.is-plain{background-color:var(--el-bg-color-overlay);border-color:var(--el-bg-color-overlay);box-shadow:var(--el-box-shadow-light)}.el-message p{margin:0}.el-message--primary{--el-message-bg-color:var(--el-color-primary-light-9);--el-message-border-color:var(--el-color-primary-light-8);--el-message-text-color:var(--el-color-primary)}.el-message--primary .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--primary{color:var(--el-message-text-color)}.el-message--success{--el-message-bg-color:var(--el-color-success-light-9);--el-message-border-color:var(--el-color-success-light-8);--el-message-text-color:var(--el-color-success)}.el-message--success .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--success{color:var(--el-message-text-color)}.el-message--info{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-color-info-light-8);--el-message-text-color:var(--el-color-info)}.el-message--info .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--info{color:var(--el-message-text-color)}.el-message--warning{--el-message-bg-color:var(--el-color-warning-light-9);--el-message-border-color:var(--el-color-warning-light-8);--el-message-text-color:var(--el-color-warning)}.el-message--warning .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--warning{color:var(--el-message-text-color)}.el-message--error{--el-message-bg-color:var(--el-color-error-light-9);--el-message-border-color:var(--el-color-error-light-8);--el-message-text-color:var(--el-color-error)}.el-message--error .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--error{color:var(--el-message-text-color)}.el-message .el-message__badge{position:absolute;right:-8px;top:-8px}.el-message__content{font-size:14px;line-height:1;padding:0}.el-message__content:focus{outline-width:0}.el-message .el-message__closeBtn{color:var(--el-message-close-icon-color);cursor:pointer;font-size:var(--el-message-close-size)}.el-message .el-message__closeBtn:focus{outline-width:0}.el-message .el-message__closeBtn:hover{color:var(--el-message-close-hover-color)}.el-message-fade-enter-from,.el-message-fade-leave-to{opacity:0;transform:translate(-50%,-100%)}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AxiosPromise } from "axios";
|
|
2
|
+
import type { GoodsBaseCreateReq, GoodsBaseImportReq, GoodsBaseUpdateReq } from "./types";
|
|
3
|
+
import type { GoodsSpuModel } from "../goods-spu/types";
|
|
4
|
+
declare class GoodsBaseApiImpl {
|
|
5
|
+
create(data: GoodsBaseCreateReq): AxiosPromise<GoodsSpuModel>;
|
|
6
|
+
update(data: GoodsBaseUpdateReq): AxiosPromise<GoodsSpuModel>;
|
|
7
|
+
downloadTemplate(): AxiosPromise;
|
|
8
|
+
importExcel(data: GoodsBaseImportReq): AxiosPromise<string>;
|
|
9
|
+
}
|
|
10
|
+
declare const goodsBaseApi: GoodsBaseApiImpl;
|
|
11
|
+
export { goodsBaseApi };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { EntityApi, EntityCreateReq, EntityUpdateReq, EntityImportReq } from "jmash-core";
|
|
2
|
+
export interface GoodsBaseCreateReq extends EntityCreateReq {
|
|
3
|
+
tenant?: string;
|
|
4
|
+
supClass: string;
|
|
5
|
+
isBranchPickup: boolean;
|
|
6
|
+
spuName: string;
|
|
7
|
+
categoryIds: string[];
|
|
8
|
+
brandId: string;
|
|
9
|
+
spuCode: string;
|
|
10
|
+
labelIds: string[];
|
|
11
|
+
picUrls: string;
|
|
12
|
+
sellPoint: string;
|
|
13
|
+
description: string;
|
|
14
|
+
appApiUrl: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GoodsBaseUpdateReq extends EntityUpdateReq {
|
|
17
|
+
tenant?: string;
|
|
18
|
+
spuId: string;
|
|
19
|
+
spuName: string;
|
|
20
|
+
categoryIds: string[];
|
|
21
|
+
brandId: string;
|
|
22
|
+
spuCode: string;
|
|
23
|
+
labelIds: string[];
|
|
24
|
+
picUrls: string;
|
|
25
|
+
sellPoint: string;
|
|
26
|
+
description: string;
|
|
27
|
+
appApiUrl: string;
|
|
28
|
+
}
|
|
29
|
+
export type GoodsBaseFormReq = GoodsBaseCreateReq | GoodsBaseUpdateReq;
|
|
30
|
+
export interface GoodsBaseImportReq extends EntityImportReq {
|
|
31
|
+
}
|
|
32
|
+
export interface GoodsBaseApi extends EntityApi {
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GoodsSpuModel } from "../goods-spu/types";
|
|
2
|
+
import type { AxiosPromise } from "axios";
|
|
3
|
+
import type { GoodsLogisticsCreateReq } from "./types";
|
|
4
|
+
declare class GoodsLogisticsApiImpl {
|
|
5
|
+
create(data: GoodsLogisticsCreateReq): AxiosPromise<GoodsSpuModel>;
|
|
6
|
+
}
|
|
7
|
+
declare const goodsLogisticsApi: GoodsLogisticsApiImpl;
|
|
8
|
+
export { goodsLogisticsApi };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EntityUpdateReq } from "jmash-core";
|
|
2
|
+
export interface GoodsLogisticsCreateReq extends EntityUpdateReq {
|
|
3
|
+
spuId: string;
|
|
4
|
+
deliveryType: string;
|
|
5
|
+
deliverySpotDate: string;
|
|
6
|
+
deliveryPresaleDate: string;
|
|
7
|
+
freightType: string;
|
|
8
|
+
freightAmount: number;
|
|
9
|
+
note: string;
|
|
10
|
+
useBranch: string;
|
|
11
|
+
branchIds: string[];
|
|
12
|
+
validityType: string;
|
|
13
|
+
validityDays: number;
|
|
14
|
+
validityDate: string;
|
|
15
|
+
ensureIds: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GoodsSpuModel } from "../goods-spu/types";
|
|
2
|
+
import type { GoodsSpecCreateReq } from "./types";
|
|
3
|
+
import type { AxiosPromise } from "axios";
|
|
4
|
+
declare class GoodsSpecApiImpl {
|
|
5
|
+
create(data: GoodsSpecCreateReq): AxiosPromise<GoodsSpuModel>;
|
|
6
|
+
}
|
|
7
|
+
declare const goodsSpecApi: GoodsSpecApiImpl;
|
|
8
|
+
export { goodsSpecApi };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EntityUpdateReq } from "jmash-core";
|
|
2
|
+
import type { GoodsSkuCreateReq } from "../goods-spu/types";
|
|
3
|
+
export interface GoodsSpecCreateReq extends EntityUpdateReq {
|
|
4
|
+
spuId: string;
|
|
5
|
+
presaleType: string;
|
|
6
|
+
isPointsGift: boolean;
|
|
7
|
+
isPointsDeduct: boolean;
|
|
8
|
+
purchaseLimit?: number;
|
|
9
|
+
balancePaymentType?: string;
|
|
10
|
+
balancePaymentDays?: number;
|
|
11
|
+
balancePaymentDate?: string;
|
|
12
|
+
specType?: string;
|
|
13
|
+
specId?: string[];
|
|
14
|
+
skiSpecValues?: GoodsSkuCreateReq[];
|
|
15
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AxiosPromise } from "axios";
|
|
2
2
|
import type { GoodsSpuApi, GoodsSpuReq, GoodsSpuModel, GoodsSpuPage, GoodsSpuList, GoodsSpuKey, GoodsSpuCreateReq, GoodsSpuUpdateReq, GoodsGroupInfoList, GoodsGroupInfoReq } from "./types";
|
|
3
|
+
import type { GoodsBaseImportReq } from "../goods-base/types";
|
|
3
4
|
declare class GoodsSpuApiImpl implements GoodsSpuApi {
|
|
4
5
|
getKey(model: GoodsSpuModel): GoodsSpuKey;
|
|
5
6
|
/**
|
|
@@ -61,6 +62,8 @@ declare class GoodsSpuApiImpl implements GoodsSpuApi {
|
|
|
61
62
|
* @returns 返回一个AxiosPromise,包含审核操作的结果,通常是一个数字状态码
|
|
62
63
|
*/
|
|
63
64
|
audit(key: GoodsSpuKey, status: string): AxiosPromise<number>;
|
|
65
|
+
downloadTemplate(): AxiosPromise;
|
|
66
|
+
importExcel(data: GoodsBaseImportReq): AxiosPromise<string>;
|
|
64
67
|
}
|
|
65
68
|
declare const goodsSpuApi: GoodsSpuApiImpl;
|
|
66
69
|
export { goodsSpuApi };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AxiosPromise } from "axios";
|
|
2
|
+
import type { GoodsSpuModel } from "../goods-spu/types";
|
|
3
|
+
import type { GoodsStockUpdateReq } from "./types";
|
|
4
|
+
declare class GoodsStockApiImpl {
|
|
5
|
+
update(data: GoodsStockUpdateReq): AxiosPromise<GoodsSpuModel>;
|
|
6
|
+
}
|
|
7
|
+
declare const goodsStockApi: GoodsStockApiImpl;
|
|
8
|
+
export { goodsStockApi };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { EntityUpdateReq } from "jmash-core";
|
|
2
|
+
export interface GoodsStockUpdateReq extends EntityUpdateReq {
|
|
3
|
+
spuId: string;
|
|
4
|
+
spu_id: string;
|
|
5
|
+
skuSpecValues: string;
|
|
6
|
+
presaleType: string;
|
|
7
|
+
isPointsGift: boolean;
|
|
8
|
+
isPointsDeduct: boolean;
|
|
9
|
+
purchaseLimit: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GoodsSkuCreateReq {
|
|
12
|
+
picUrl: string;
|
|
13
|
+
salePrice: number;
|
|
14
|
+
salePriceV2: number;
|
|
15
|
+
salePriceV3: number;
|
|
16
|
+
marketPrice: number;
|
|
17
|
+
costPrice: number;
|
|
18
|
+
stock: number;
|
|
19
|
+
weight: number;
|
|
20
|
+
volume: number;
|
|
21
|
+
status: boolean;
|
|
22
|
+
specValues: SpecValue[];
|
|
23
|
+
skuCode: string;
|
|
24
|
+
skuId: string;
|
|
25
|
+
pointsDeduct: number;
|
|
26
|
+
depositAmount: string;
|
|
27
|
+
earnestAmount: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SpecValue {
|
|
30
|
+
specId: string;
|
|
31
|
+
specValueId: string;
|
|
32
|
+
}
|
package/dts/api/index.d.ts
CHANGED
|
@@ -17,4 +17,7 @@ export declare class Dict {
|
|
|
17
17
|
static readonly brandListBizDict: BrandListBizDict;
|
|
18
18
|
static readonly labelListBizDict: LableListBizDict;
|
|
19
19
|
static readonly goodsSpuBizDict: GoodsSpuBizDict;
|
|
20
|
+
static readonly goodsSupClassEnum: EnumDict;
|
|
21
|
+
static readonly yesOrNoEnum: CustomBizDict;
|
|
22
|
+
static readonly presaleTypeEnum: EnumDict;
|
|
20
23
|
}
|