xyvcard-goods 0.0.21 → 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.
Files changed (33) hide show
  1. package/dist/ImageUpload-Dk6GY6PA.mjs +93 -0
  2. package/dist/{edit-CkR-I5aJ.mjs → edit-Byv9oYAC.mjs} +1 -1
  3. package/dist/{edit-tCGa_9Kt.mjs → edit-Nuaz9WSB.mjs} +170 -171
  4. package/dist/edit-exVf8d8b.mjs +367 -0
  5. package/dist/edit.vue_vue_type_script_setup_true_lang-DuSBj1Mm.mjs +24172 -0
  6. package/dist/{goodsList-HmPAwD_C.mjs → goodsList-CZUqc4nm.mjs} +1 -1
  7. package/dist/{goodsList-TX2ZnRR9.mjs → goodsList-IWDAvKOx.mjs} +1 -1
  8. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-f1Fc6pbd.mjs → goodsList.vue_vue_type_script_setup_true_lang-BhJn02Ym.mjs} +1 -1
  9. package/dist/{goodsList.vue_vue_type_script_setup_true_lang-CGV1dm3W.mjs → goodsList.vue_vue_type_script_setup_true_lang-CuzIDtTN.mjs} +1 -1
  10. package/dist/{index-B0SXNsHW.mjs → index-4i7TnWvV.mjs} +2 -3
  11. package/dist/{index-Dt3PP8dN.mjs → index-BVGn6Q_T.mjs} +2 -2
  12. package/dist/{index-BZw9XfQo.mjs → index-B_U2s9fI.mjs} +2 -2
  13. package/dist/{index-Ctva-XF0.mjs → index-CQIttgns.mjs} +1 -1
  14. package/dist/{index-CqOoZ5xQ.mjs → index-Dvaotk7B.mjs} +88 -68
  15. package/dist/{index-VFsDup14.mjs → index-_xxSoBUe.mjs} +1 -1
  16. package/dist/index.mjs +192 -181
  17. package/dist/{info-CrghLmS4.mjs → info-BH4MW3Sw.mjs} +2 -2
  18. package/dist/{info-BTKv0IRt.mjs → info-BQaaTFry.mjs} +2 -2
  19. package/dist/skuForm-AMIoZkH-.mjs +287 -0
  20. package/dist/{skuForm-D2n8sQJo.mjs → skuForm-CgjMd46J.mjs} +5 -5
  21. package/dist/{skuTable-CEwT-I1Q.mjs → skuTable-CyGQuTvR.mjs} +1 -1
  22. package/dist/{skuTable-D-awlXgj.mjs → skuTable-DDWSmvoz.mjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dts/api/dict.d.ts +3 -0
  25. package/dts/api/goods-spu/index.d.ts +1 -0
  26. package/dts/api/goods-spu/types.d.ts +17 -0
  27. package/dts/api/index.d.ts +2 -1
  28. package/dts/lang/goods/zh-cn.d.ts +5 -1
  29. package/dts/views/goods/goods-combination/skuForm.vue.d.ts +0 -9
  30. package/package.json +3 -2
  31. package/dist/edit-DFc_TNP3.mjs +0 -590
  32. package/dist/edit.vue_vue_type_script_setup_true_lang-BlNwikUO.mjs +0 -234
  33. package/dist/skuForm-C7rF2noo.mjs +0 -475
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b, openBlock as r, createElementBlock as k, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as s, createElementVNode as a, Fragment as L, renderList as I, createBlock as S, unref as _, createCommentVNode as B } from "vue";
2
2
  import { fileApi as w, routerUtil as F } from "jmash-core";
3
3
  import { useRouter as H, useRoute as O } from "vue-router";
4
- import { D as d, C as N, S as R } from "./index-CqOoZ5xQ.mjs";
5
- import Y from "./skuTable-D-awlXgj.mjs";
4
+ import { D as d, C as N, S as R } from "./index-Dvaotk7B.mjs";
5
+ import Y from "./skuTable-CyGQuTvR.mjs";
6
6
  import { goodsSpuApi as G } from "./index.mjs";
7
7
  import { g as J } from "./index-BHmGYIuc.mjs";
8
8
  const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "cell-item" }, ie = { class: "title-content" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = { class: "cell-item" }, _e = { class: "cell-item" }, fe = { class: "cell-item" }, ge = ["innerHTML"], Ie = /* @__PURE__ */ M({
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as M, ref as y, computed as q, watch as j, resolveComponent as b, openBlock as r, createElementBlock as k, createVNode as i, withCtx as e, createTextVNode as n, toDisplayString as s, createElementVNode as a, Fragment as L, renderList as I, createBlock as S, unref as _, createCommentVNode as B } from "vue";
2
2
  import { fileApi as w, routerUtil as F } from "jmash-core";
3
3
  import { useRouter as H, useRoute as O } from "vue-router";
4
- import { D as d, C as N, S as R } from "./index-CqOoZ5xQ.mjs";
5
- import Y from "./skuTable-CEwT-I1Q.mjs";
4
+ import { D as d, C as N, S as R } from "./index-Dvaotk7B.mjs";
5
+ import Y from "./skuTable-DDWSmvoz.mjs";
6
6
  import { goodsSpuApi as G } from "./index.mjs";
7
7
  import { g as J } from "./index-BHmGYIuc.mjs";
8
8
  const K = { class: "app-container" }, Q = { class: "cell-item" }, W = { class: "cell-item" }, X = { class: "cell-item" }, Z = { class: "cell-item" }, x = { class: "cell-item" }, ee = { class: "cell-item" }, le = { class: "cell-item" }, se = { class: "cell-item" }, te = { class: "cell-item" }, oe = { class: "cell-item" }, ue = { class: "cell-item" }, ae = { class: "cell-item" }, ie = { class: "title-content" }, ne = { class: "cell-item" }, ce = { class: "cell-item" }, de = { class: "cell-item" }, re = { class: "cell-item" }, pe = { class: "cell-item" }, me = { class: "cell-item" }, _e = { class: "cell-item" }, fe = { class: "cell-item" }, ge = ["innerHTML"], Ie = /* @__PURE__ */ M({
@@ -0,0 +1,287 @@
1
+ import { defineComponent as D, openBlock as _, createElementBlock as T, createElementVNode as z, ref as V, watch as C, resolveComponent as c, createBlock as b, withCtx as r, createVNode as o, unref as g, Fragment as M, renderList as Y, createCommentVNode as G, createTextVNode as H, toDisplayString as x } from "vue";
2
+ import { useI18n as J } from "vue-i18n";
3
+ import { D as E, C as v } from "./index-Dvaotk7B.mjs";
4
+ import { goodsSpuApi as K } from "./index.mjs";
5
+ import "jmash-core";
6
+ import { specValueApi as Q } from "xyvcard-shop";
7
+ import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
8
+ /*! Element Plus Icons Vue v2.3.1 */
9
+ var X = /* @__PURE__ */ D({
10
+ name: "Plus",
11
+ __name: "plus",
12
+ setup(I) {
13
+ return (y, P) => (_(), T("svg", {
14
+ xmlns: "http://www.w3.org/2000/svg",
15
+ viewBox: "0 0 1024 1024"
16
+ }, [
17
+ z("path", {
18
+ fill: "currentColor",
19
+ 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"
20
+ })
21
+ ]));
22
+ }
23
+ }), Z = X;
24
+ const w = /* @__PURE__ */ D({
25
+ __name: "skuForm",
26
+ props: {
27
+ form: {
28
+ type: Object,
29
+ default: () => {
30
+ }
31
+ }
32
+ },
33
+ emits: ["getGoodsSku", "getFormData"],
34
+ setup(I, { emit: y }) {
35
+ const { t: P } = J(), k = V([]), d = V([
36
+ {
37
+ salePrice: 0,
38
+ skuId: "",
39
+ spuId: "",
40
+ spuName: "",
41
+ saleNum: 0,
42
+ picUrl: "",
43
+ specType: "",
44
+ skuOptions: []
45
+ }
46
+ ]);
47
+ E.goodsSpuBizDict.useValues();
48
+ const $ = y;
49
+ function B(l, e) {
50
+ l.picUrl = e;
51
+ }
52
+ const S = I;
53
+ C(
54
+ S.form,
55
+ (l) => l,
56
+ {
57
+ deep: !0,
58
+ immediate: !0
59
+ }
60
+ ), S.form.spuId;
61
+ function F(l) {
62
+ const e = d.value.indexOf(l.row);
63
+ e !== 0 && d.value.splice(e, 1);
64
+ }
65
+ function O() {
66
+ d.value.push({
67
+ salePrice: 0,
68
+ skuId: "",
69
+ spuId: "",
70
+ spuName: "",
71
+ saleNum: 0,
72
+ picUrl: "",
73
+ specType: "",
74
+ skuOptions: []
75
+ });
76
+ }
77
+ const N = V({});
78
+ async function j(l) {
79
+ if (!k.value[l])
80
+ try {
81
+ const { data: e } = await Q.findById({
82
+ specValueId: l
83
+ });
84
+ return k.value[l] = e.valueName, e.valueName;
85
+ } catch {
86
+ }
87
+ }
88
+ async function A(l, e) {
89
+ var n, p;
90
+ if (e.skuId = "", e.skuOptions = [], e.picUrl = "", e.salePrice = 0, e.saleNum = 0, !l) {
91
+ e.skuId = "", e.picUrl = "", e.salePrice = 0, e.saleNum = 0, e.skuOptions = [];
92
+ return;
93
+ }
94
+ try {
95
+ const { data: u } = await K.findById({ spuId: l });
96
+ if (e.specType = u.specType, e.specType === v.SPEC_TYPE.UNIFIED_SPEC && (e.picUrl = u.picUrls ? u.picUrls.split(",")[0] : "", e.salePrice = (n = u.skuList) == null ? void 0 : n.results[0].salePrice, e.saleNum = (p = u.skuList) == null ? void 0 : p.results[0].stock), e.specType === v.SPEC_TYPE.MULTI_SPEC && u.skuList) {
97
+ const m = u.skuList.results, f = m.map((s) => s.specValues && Array.isArray(s.specValues) ? s.specValues.map(
98
+ (i) => i.specValueId
99
+ ) : []), h = f.flat().map((s) => j(s));
100
+ await Promise.all(h);
101
+ const U = f.map(
102
+ (s) => s.map((i) => k.value[i] || i)
103
+ );
104
+ e.skuOptions = m.map((s, i) => ({
105
+ key: s.skuId,
106
+ value: U[i].join(", "),
107
+ picUrl: s.picUrl || (u.picUrls ? u.picUrls.split(",")[0] : ""),
108
+ salePrice: s.salePrice,
109
+ stock: s.stock
110
+ })), m.forEach((s) => {
111
+ s.skuId && (N.value[s.skuId] = {
112
+ ...s,
113
+ spuPicUrls: u.picUrls
114
+ });
115
+ });
116
+ }
117
+ } catch {
118
+ }
119
+ }
120
+ function L(l) {
121
+ const e = d.value.find((n) => n.skuId === l);
122
+ if (e && l) {
123
+ const n = N.value[l];
124
+ if (n) {
125
+ const p = n.spuPicUrls ? n.spuPicUrls.split(",")[0] : "";
126
+ e.picUrl = n.picUrl || p, e.salePrice = n.salePrice, e.saleNum = n.stock;
127
+ }
128
+ }
129
+ }
130
+ return C(
131
+ d,
132
+ (l) => {
133
+ $("getGoodsSku", l);
134
+ },
135
+ {
136
+ deep: !0,
137
+ immediate: !0
138
+ }
139
+ ), (l, e) => {
140
+ const n = c("jmash-select"), p = c("el-table-column"), u = c("el-option"), m = c("el-select"), f = c("jmash-single-image-upload"), h = c("el-input-number"), U = c("DeleteFilled"), s = c("el-icon"), i = c("el-table"), R = c("el-button"), q = c("el-row");
141
+ return _(), b(q, null, {
142
+ default: r(() => [
143
+ o(i, {
144
+ data: d.value,
145
+ border: "",
146
+ style: { width: "100%" }
147
+ }, {
148
+ default: r(() => [
149
+ o(p, {
150
+ label: l.$t("goodsSpu.spuName"),
151
+ prop: "spuId",
152
+ "header-align": "center"
153
+ }, {
154
+ default: r(({ row: a }) => [
155
+ o(n, {
156
+ modelValue: a.spuId,
157
+ "onUpdate:modelValue": (t) => a.spuId = t,
158
+ data: g(E).goodsSpuBizDict.values,
159
+ filterable: "",
160
+ clearable: "",
161
+ placeholder: l.$t("goodsSpu.spuNameRequireds"),
162
+ class: "w-full",
163
+ onChange: (t) => A(a.spuId, a)
164
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "data", "placeholder", "onChange"])
165
+ ]),
166
+ _: 1
167
+ }, 8, ["label"]),
168
+ o(p, {
169
+ label: l.$t("goodsSpu.specType"),
170
+ prop: "skuId",
171
+ "header-align": "center"
172
+ }, {
173
+ default: r(({ row: a }) => [
174
+ o(m, {
175
+ modelValue: a.skuId,
176
+ "onUpdate:modelValue": (t) => a.skuId = t,
177
+ placeholder: l.$t("goodsSpu.specTypeRequired"),
178
+ disabled: a.specType === g(v).SPEC_TYPE.UNIFIED_SPEC,
179
+ onChange: (t) => L(a.skuId)
180
+ }, {
181
+ default: r(() => [
182
+ (_(!0), T(M, null, Y(a.skuOptions, (t) => (_(), b(u, {
183
+ key: t.key,
184
+ label: t.value,
185
+ value: t.key
186
+ }, null, 8, ["label", "value"]))), 128))
187
+ ]),
188
+ _: 2
189
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "onChange"])
190
+ ]),
191
+ _: 1
192
+ }, 8, ["label"]),
193
+ o(p, {
194
+ label: l.$t("goodsSpu.picUrls"),
195
+ prop: "picUrl",
196
+ width: "105",
197
+ "header-align": "center"
198
+ }, {
199
+ default: r(({ row: a }) => [
200
+ o(f, {
201
+ "picture-url": a.picUrl,
202
+ onImageSrc: (t) => B(a, t),
203
+ width: 80,
204
+ type: "trans"
205
+ }, null, 8, ["picture-url", "onImageSrc"])
206
+ ]),
207
+ _: 1
208
+ }, 8, ["label"]),
209
+ o(p, {
210
+ label: l.$t("goodsSpu.salePriceV1"),
211
+ prop: "salePrice",
212
+ "header-align": "center"
213
+ }, {
214
+ default: r(({ row: a }) => [
215
+ o(h, {
216
+ modelValue: a.salePrice,
217
+ "onUpdate:modelValue": (t) => a.salePrice = t,
218
+ precision: 2,
219
+ min: 0,
220
+ placeholder: l.$t("goodsSpu.salePriceV1Required"),
221
+ class: "w-full",
222
+ controls: !1
223
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
224
+ ]),
225
+ _: 1
226
+ }, 8, ["label"]),
227
+ o(p, {
228
+ label: l.$t("goodsSpu.saleNums"),
229
+ prop: "saleNum",
230
+ "header-align": "center"
231
+ }, {
232
+ default: r(({ row: a }) => [
233
+ o(h, {
234
+ modelValue: a.saleNum,
235
+ "onUpdate:modelValue": (t) => a.saleNum = t,
236
+ placeholder: l.$t("goodsSpu.saleNumRequireds"),
237
+ class: "w-full",
238
+ controls: !1,
239
+ precision: 0,
240
+ min: 0
241
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
242
+ ]),
243
+ _: 1
244
+ }, 8, ["label"]),
245
+ o(p, {
246
+ label: l.$t("common.operate"),
247
+ width: "60",
248
+ align: "center"
249
+ }, {
250
+ default: r((a) => [
251
+ a.$index !== 0 ? (_(), b(s, {
252
+ key: 0,
253
+ onClick: (t) => F(a),
254
+ size: "18",
255
+ style: { cursor: "pointer", color: "inherit" },
256
+ class: "hover-blue"
257
+ }, {
258
+ default: r(() => [
259
+ o(U)
260
+ ]),
261
+ _: 2
262
+ }, 1032, ["onClick"])) : G("", !0)
263
+ ]),
264
+ _: 1
265
+ }, 8, ["label"])
266
+ ]),
267
+ _: 1
268
+ }, 8, ["data"]),
269
+ o(R, {
270
+ icon: g(Z),
271
+ class: "addButton",
272
+ onClick: O
273
+ }, {
274
+ default: r(() => [
275
+ H(x(g(P)("common.add")), 1)
276
+ ]),
277
+ _: 1
278
+ }, 8, ["icon"])
279
+ ]),
280
+ _: 1
281
+ });
282
+ };
283
+ }
284
+ }), ue = /* @__PURE__ */ W(w, [["__scopeId", "data-v-429eb573"]]);
285
+ export {
286
+ ue as default
287
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as te, ref as S, computed as se, watch as $, resolveComponent as i, openBlock as m, createElementBlock as g, Fragment as k, unref as M, createVNode as o, withCtx as a, createCommentVNode as I, renderList as P, createElementVNode as b, toDisplayString as O, createTextVNode as y, createBlock as w } from "vue";
2
- import { C as D, D as ue, S as Y, a as ne } from "./index-CqOoZ5xQ.mjs";
3
- import re from "./skuTable-D-awlXgj.mjs";
2
+ import { C as D, D as ue, S as Y, a as ne } from "./index-Dvaotk7B.mjs";
3
+ import re from "./skuTable-CyGQuTvR.mjs";
4
4
  import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
5
  const pe = { key: 0 }, ce = {
6
6
  key: 1,
@@ -105,7 +105,7 @@ const pe = { key: 0 }, ce = {
105
105
  u.value[e].specValueList.splice(l, 1);
106
106
  }
107
107
  function X() {
108
- h.value = new ne({ shopId: v.form.shopId }), h.value.useValues().then((e) => {
108
+ h.value = new ne({ shopId: v.form.shopId }), console.log("handleSpecShow", h.value), h.value.useValues().then((e) => {
109
109
  e.forEach((l) => {
110
110
  Array.isArray(u.value) && u.value.length > 0 && u.value.forEach((t) => {
111
111
  l.key === t.id && (l.disabled = !0);
@@ -469,7 +469,7 @@ const pe = { key: 0 }, ce = {
469
469
  ], 64);
470
470
  };
471
471
  }
472
- }), he = /* @__PURE__ */ de(Ve, [["__scopeId", "data-v-c88d5f27"]]);
472
+ }), be = /* @__PURE__ */ de(Ve, [["__scopeId", "data-v-761a6cc9"]]);
473
473
  export {
474
- he as default
474
+ be as default
475
475
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as F, ref as U, computed as T, watch as S, resolveComponent as v, openBlock as g, createElementBlock as h, createElementVNode as n, createVNode as s, withCtx as r, createTextVNode as w, createCommentVNode as L, Fragment as G, renderList as O, createBlock as k, toDisplayString as I, unref as b } from "vue";
2
2
  import { f as H, d as J } from "./sku-B-IzfYLq.mjs";
3
- import { D as K } from "./index-CqOoZ5xQ.mjs";
3
+ import { D as K } from "./index-Dvaotk7B.mjs";
4
4
  import { fileApi as z } from "jmash-core";
5
5
  import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
6
  const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X = { class: "right-dis" }, Y = { class: "right-dis" }, Z = { class: "right-dis" }, ee = { class: "right-dis" }, le = { class: "right-dis" }, ae = { class: "right-dis" }, se = { class: "right-dis" }, oe = { key: 0 }, te = { key: 1 }, re = /* @__PURE__ */ F({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as F, ref as U, computed as T, watch as S, resolveComponent as v, openBlock as g, createElementBlock as h, createElementVNode as n, createVNode as s, withCtx as r, createTextVNode as w, createCommentVNode as L, Fragment as G, renderList as O, createBlock as k, toDisplayString as I, unref as b } from "vue";
2
2
  import { f as H, d as J } from "./sku-B-IzfYLq.mjs";
3
- import { D as K } from "./index-CqOoZ5xQ.mjs";
3
+ import { D as K } from "./index-Dvaotk7B.mjs";
4
4
  import { fileApi as z } from "jmash-core";
5
5
  import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
6
  const Q = { key: 0 }, R = { class: "title-set" }, W = { class: "right-dis" }, X = { class: "right-dis" }, Y = { class: "right-dis" }, Z = { class: "right-dis" }, ee = { class: "right-dis" }, le = { class: "right-dis" }, ae = { class: "right-dis" }, se = { class: "right-dis" }, oe = { key: 0 }, te = { key: 1 }, re = /* @__PURE__ */ F({
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .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%}.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}[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-5e9b6e63]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.goods-spec[data-v-c88d5f27]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-c88d5f27]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-c88d5f27]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-c88d5f27]{padding:10px 20px}.goods-tag[data-v-c88d5f27]{margin-bottom:10px}.position-center[data-v-90ddc8d1]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-90ddc8d1]{position:absolute;right:0;top:0;margin-top:8px}.position-center[data-v-7e1c2961]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-7e1c2961]{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-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-761a6cc9]{border:1px solid #ccc;margin-bottom:5px}.goods-title[data-v-761a6cc9]{display:flex;align-items:center;border-bottom:1px solid #ccc;padding:10px 20px}.goods-title .goods-delete[data-v-761a6cc9]{display:flex;align-items:center;margin-left:auto;color:red;font-size:14px}.goods-content[data-v-761a6cc9]{padding:10px 20px}.goods-tag[data-v-761a6cc9]{margin-bottom:10px}.addButton[data-v-429eb573]{margin-top:15px;margin-bottom:20px;width:100%}.hover-blue[data-v-429eb573]:hover{color:#409eff!important}.position-center[data-v-90ddc8d1]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-90ddc8d1]{position:absolute;right:0;top:0;margin-top:8px}.title-set[data-v-5e9b6e63]{display:flex;align-items:center;font-size:14px;padding:0 0 10px}.position-center[data-v-7e1c2961]{position:absolute;right:0;top:30%;transform:translateY(-30%)}.plus-position[data-v-7e1c2961]{position:absolute;right:0;top:0;margin-top:8px}
package/dts/api/dict.d.ts CHANGED
@@ -27,3 +27,6 @@ export declare class BrandListBizDict extends BizDict {
27
27
  export declare class LableListBizDict extends BizDict {
28
28
  useValues(): Promise<Entry[]>;
29
29
  }
30
+ export declare class GoodsSpuBizDict extends BizDict {
31
+ useValues(): Promise<Entry[]>;
32
+ }
@@ -26,6 +26,7 @@ declare class GoodsSpuApiImpl implements GoodsSpuApi {
26
26
  * @returns 返回一个Promise对象,解析为创建的商品SPU模型
27
27
  */
28
28
  create(data: GoodsSpuCreateReq): AxiosPromise<GoodsSpuModel>;
29
+ createList(data: GoodsSpuCreateReq): AxiosPromise<GoodsSpuModel>;
29
30
  /**
30
31
  * 修改实体商品SPU
31
32
  * @param data 包含要更新的商品SPU信息的对象
@@ -14,6 +14,7 @@ export interface GoodsSpuReq extends EntityReq {
14
14
  labelIds?: Array<string>;
15
15
  brandId?: string;
16
16
  goodsType?: string;
17
+ hasGoodsType?: boolean;
17
18
  }
18
19
  export interface GoodsSpuModel extends EntityModel {
19
20
  spuId?: string;
@@ -34,6 +35,7 @@ export interface GoodsSpuModel extends EntityModel {
34
35
  categoryIds?: Array<string>;
35
36
  brandId?: string;
36
37
  labelIds?: Array<string>;
38
+ groupInfos?: Array<GoodsGroupInfoCreateReq>;
37
39
  }
38
40
  export interface GoodsSpuList extends EntityList {
39
41
  results: Array<GoodsSpuModel>;
@@ -73,6 +75,7 @@ export interface GoodsSpuCreateReq extends EntityCreateReq {
73
75
  categoryIds?: Array<string>;
74
76
  brandId?: string;
75
77
  labelIds?: Array<string>;
78
+ groupInfos?: Array<GoodsGroupInfoCreateReq>;
76
79
  }
77
80
  export interface GoodsSpuUpdateReq extends EntityUpdateReq {
78
81
  spuId?: string;
@@ -94,6 +97,7 @@ export interface GoodsSpuUpdateReq extends EntityUpdateReq {
94
97
  categoryIds?: Array<string>;
95
98
  brandId?: string;
96
99
  labelIds?: Array<string>;
100
+ groupInfos?: Array<GoodsGroupInfoCreateReq>;
97
101
  }
98
102
  export type GoodsSpuFormReq = GoodsSpuCreateReq | GoodsSpuUpdateReq;
99
103
  export interface GoodsSpuEnableKey {
@@ -149,3 +153,16 @@ export interface TableContext {
149
153
  export interface GoodsSkuList {
150
154
  results: Array<GoodsSkuModel>;
151
155
  }
156
+ export interface GoodsGroupInfoCreateReq {
157
+ skuId?: string;
158
+ spuId?: string;
159
+ spuName?: string;
160
+ picUrl?: string;
161
+ saleNum?: number;
162
+ salePrice?: number;
163
+ specType?: string;
164
+ skuOptions?: {
165
+ key: string;
166
+ value: string;
167
+ }[];
168
+ }
@@ -1,6 +1,6 @@
1
1
  import { EnumDict } from "jmash-core";
2
2
  import { EntryDict } from "jmash-dict";
3
- import { CustomBizDict, ShopInfoBizDict, SpecInfoBizDict, SpecValueBizDict, GoodsCategoryListBizLayDict, BrandListBizDict, LableListBizDict } from "./dict";
3
+ import { CustomBizDict, ShopInfoBizDict, SpecInfoBizDict, SpecValueBizDict, GoodsCategoryListBizLayDict, BrandListBizDict, LableListBizDict, GoodsSpuBizDict } from "./dict";
4
4
  export declare class Dict {
5
5
  static readonly shopInfoBizDict: ShopInfoBizDict;
6
6
  static readonly specInfoDict: SpecInfoBizDict;
@@ -15,4 +15,5 @@ export declare class Dict {
15
15
  static readonly goodsCategoryListBizLayDict: GoodsCategoryListBizLayDict;
16
16
  static readonly brandListBizDict: BrandListBizDict;
17
17
  static readonly labelListBizDict: LableListBizDict;
18
+ static readonly goodsSpuBizDict: GoodsSpuBizDict;
18
19
  }
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  shelf: string;
14
14
  price: string;
15
15
  salePrice: string;
16
+ salePriceV1: string;
16
17
  salePriceV2: string;
17
18
  salePriceV3: string;
18
19
  marketPrice: string;
@@ -21,6 +22,7 @@ declare const _default: {
21
22
  weight: string;
22
23
  volume: string;
23
24
  saleNum: string;
25
+ saleNums: string;
24
26
  specType: string;
25
27
  approvalStatus: string;
26
28
  batchShelf: string;
@@ -31,8 +33,10 @@ declare const _default: {
31
33
  updateTime: string;
32
34
  shopIdRequired: string;
33
35
  spuNameRequired: string;
36
+ spuNameRequireds: string;
34
37
  freightAmountRequired: string;
35
38
  saleNumRequired: string;
39
+ saleNumRequireds: string;
36
40
  sellPointRequired: string;
37
41
  categoryIdRequired: string;
38
42
  spuCodeRequired: string;
@@ -41,9 +45,9 @@ declare const _default: {
41
45
  shelfRequired: string;
42
46
  specTypeRequired: string;
43
47
  picUrlsRequired: string;
44
- imageListsError: string;
45
48
  imageListsErrors: string;
46
49
  salePriceRequired: string;
50
+ salePriceV1Required: string;
47
51
  marketPriceRequired: string;
48
52
  costPriceRequired: string;
49
53
  stockRequired: string;
@@ -1,8 +1,4 @@
1
1
  declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
2
- specType: {
3
- type: StringConstructor;
4
- default: () => string;
5
- };
6
2
  form: {
7
3
  type: ObjectConstructor;
8
4
  default: () => void;
@@ -11,10 +7,6 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
11
7
  getGoodsSku: (...args: any[]) => void;
12
8
  getFormData: (...args: any[]) => void;
13
9
  }, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
14
- specType: {
15
- type: StringConstructor;
16
- default: () => string;
17
- };
18
10
  form: {
19
11
  type: ObjectConstructor;
20
12
  default: () => void;
@@ -24,6 +16,5 @@ declare const _default: import("vue").DefineComponent<globalThis.ExtractPropType
24
16
  onGetFormData?: ((...args: any[]) => any) | undefined;
25
17
  }>, {
26
18
  form: Record<string, any>;
27
- specType: string;
28
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
20
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xyvcard-goods",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "private": false,
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dts/index.d.ts",
@@ -57,6 +57,7 @@
57
57
  "@vueuse/core": "^10.9.0",
58
58
  "file-saver": "^2.0.5",
59
59
  "nprogress": "^0.2.0",
60
- "qs": "^6.12.0"
60
+ "qs": "^6.12.0",
61
+ "pinyin-pro": "^3.25.0"
61
62
  }
62
63
  }