xyvcard-goods 0.0.34 → 0.0.35

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 (64) hide show
  1. package/dist/BatchSetting-B1LcBFPD.mjs +333 -0
  2. package/dist/ChannelProfit-CNSIK87d.mjs +4 -0
  3. package/dist/ChannelProfit.vue_vue_type_script_setup_true_lang-BVTifRY8.mjs +320 -0
  4. package/dist/{GoodsBaseForm-BSvXc_XA.mjs → GoodsBaseForm-BZ2fZmmp.mjs} +1 -1
  5. package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-BxBTTLdA.mjs +407 -0
  6. package/dist/{GoodsLogisticsForm-1Bbd4Z52.mjs → GoodsLogisticsForm-BqlwdGQ1.mjs} +1 -1
  7. package/dist/{GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-PSnPNbmT.mjs → GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-DJREiSkD.mjs} +56 -57
  8. package/dist/GoodsProfitForm-COYRi8sx.mjs +4 -0
  9. package/dist/GoodsProfitForm.vue_vue_type_script_setup_true_lang-BYPWP95J.mjs +2550 -0
  10. package/dist/{GoodsSpecForm-Ddo1IZLZ.mjs → GoodsSpecForm-B4MtETRy.mjs} +1 -1
  11. package/dist/{GoodsSpecForm.vue_vue_type_script_setup_true_lang-CdWIufm4.mjs → GoodsSpecForm.vue_vue_type_script_setup_true_lang-BbVK_KNz.mjs} +130 -121
  12. package/dist/SingleSku-rWv9vVhv.mjs +351 -0
  13. package/dist/constant-sVd2JbJt.mjs +115 -0
  14. package/dist/edit-B1cmsJpy.mjs +70 -0
  15. package/dist/{edit-lfXK_dUp.mjs → edit-Br1Y569l.mjs} +8 -7
  16. package/dist/{edit-e5-aXV6K.mjs → edit-CET8Fr-t.mjs} +1 -1
  17. package/dist/{edit-pUKONjxH.mjs → edit-CagYTFKr.mjs} +1 -1
  18. package/dist/{edit-BgtwinSN.mjs → edit-iJGrWlSv.mjs} +1 -1
  19. package/dist/{edit.vue_vue_type_script_setup_true_lang-BtGT564r.mjs → edit.vue_vue_type_script_setup_true_lang-D_0YivhL.mjs} +2 -2
  20. package/dist/{el-message-BB2-39XJ.mjs → el-message-Dj6aaz4G.mjs} +490 -373
  21. package/dist/{index-DyLLV1NK.mjs → index copy-kNLE7fPg.mjs } +6 -5
  22. package/dist/index-C61SQFSx.mjs +264 -0
  23. package/dist/index-CeWPdEJD.mjs +713 -0
  24. package/dist/{index-CkJncbVf.mjs → index-Cg6GUdSP.mjs} +3 -3
  25. package/dist/index-CyxnVWnL.mjs +182 -0
  26. package/dist/{index-CkMWas2b.mjs → index-D9s8hsVw.mjs} +3 -3
  27. package/dist/{index-BSzOTWcG.mjs → index-DbnKa_BJ.mjs} +1 -1
  28. package/dist/{index-ChQ-ZxD1.mjs → index-DoxTu4kg.mjs} +5 -4
  29. package/dist/{index-BpKiAhvt.mjs → index-kw0UYOIu.mjs} +3 -3
  30. package/dist/{index-DhS4AuWf.mjs → index-xQgC-8Gd.mjs} +1106 -1038
  31. package/dist/index.mjs +1 -1
  32. package/dist/info-CTElDVo6.mjs +376 -0
  33. package/dist/{info-DOKoSi7a.mjs → info-DpGJgdac.mjs} +5 -4
  34. package/dist/{skuForm-DVGkw6rD.mjs → skuForm-C7w9YIDe.mjs} +24 -23
  35. package/dist/skuForm-CPlnCToi.mjs +279 -0
  36. package/dist/skuTable-C-LcASbX.mjs +594 -0
  37. package/dist/spec-DkiGCkuM.mjs +44 -0
  38. package/dist/style.css +1 -1
  39. package/dts/xyvcard-goods/src/api/dict.d.ts +5 -4
  40. package/dts/xyvcard-goods/src/api/goods-sku/types.d.ts +3 -0
  41. package/dts/xyvcard-goods/src/api/goods-spu/index.d.ts +4 -1
  42. package/dts/xyvcard-goods/src/api/goods-spu/types.d.ts +35 -9
  43. package/dts/xyvcard-goods/src/api/types.d.ts +4 -0
  44. package/dts/xyvcard-goods/src/lang/goods/zh-cn.d.ts +32 -0
  45. package/dts/xyvcard-goods/src/router/index.d.ts +1 -0
  46. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/BatchSetting.vue.d.ts +35 -0
  47. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/ChannelProfit.vue.d.ts +22 -0
  48. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsProfitForm.vue.d.ts +34 -0
  49. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/SingleSku.vue.d.ts +23 -0
  50. package/dts/xyvcard-goods/src/views/goods/goods-spu/index copy.vue.d.ts +2 -0
  51. package/dts/xyvcard-goods/src/views/goods/goods-spu/skuForm.vue.d.ts +17 -4
  52. package/dts/xyvcard-goods/src/views/goods/goods-spu/skuTable.vue.d.ts +14 -1
  53. package/dts/xyvcard-goods/src/views/goods/goods-spu/spec.vue.d.ts +2 -0
  54. package/package.json +4 -3
  55. package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-rsmqHXbJ.mjs +0 -381
  56. package/dist/edit copy 2-Yzf_M31V.mjs +0 -59
  57. package/dist/edit copy-CCnzlrgL.mjs +0 -526
  58. package/dist/edit-Dke5sWct.mjs +0 -526
  59. package/dist/index-BHmGYIuc.mjs +0 -24
  60. package/dist/index-Da2R0n8O.mjs +0 -374
  61. package/dist/index-vHQhUQSO.mjs +0 -95
  62. package/dist/info-De_pBN6A.mjs +0 -365
  63. package/dist/skuForm-YXHrhyPI.mjs +0 -476
  64. package/dist/skuTable-DOIQ9kiV.mjs +0 -639
@@ -0,0 +1,279 @@
1
+ import { defineComponent as Z, ref as _, computed as z, watch as M, resolveComponent as i, createElementBlock as g, openBlock as p, createVNode as r, withCtx as s, Fragment as b, renderList as S, createElementVNode as h, toDisplayString as $, createTextVNode as y, createBlock as D, createCommentVNode as x } from "vue";
2
+ import "./constant-sVd2JbJt.mjs";
3
+ import { D as ee, S as G, a as le } from "./index-C61SQFSx.mjs";
4
+ import te from "./skuTable-C-LcASbX.mjs";
5
+ import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
+ const oe = { class: "w-full" }, se = { class: "goods-title" }, ue = ["onClick"], ne = { class: "goods-content" }, ce = { class: "goods-tag" }, re = /* @__PURE__ */ Z({
7
+ __name: "skuForm",
8
+ props: {
9
+ // 规格类型
10
+ specType: {
11
+ type: String,
12
+ default: () => ""
13
+ },
14
+ form: {
15
+ type: Object,
16
+ default: () => {
17
+ }
18
+ },
19
+ goodsSpuModel: {
20
+ type: Object,
21
+ default: () => {
22
+ }
23
+ }
24
+ },
25
+ emits: ["getGoodsSku", "getFormData"],
26
+ setup(w, { expose: N, emit: q }) {
27
+ var E, j;
28
+ const t = _([]), L = _(), v = _([]), V = _([]), C = _([]), k = w, O = q, I = z(() => t.value.filter(
29
+ (e) => e.name && e.specValueList != null && e.specValueList.length
30
+ ));
31
+ M(
32
+ k.form,
33
+ (e) => e,
34
+ {
35
+ deep: !0,
36
+ immediate: !0
37
+ }
38
+ ), M(
39
+ I,
40
+ (e) => e,
41
+ {
42
+ deep: !0,
43
+ immediate: !0
44
+ }
45
+ ), k.form.spuId && (C.value = (E = k.goodsSpuModel.skuList) == null ? void 0 : E.results, (j = k.goodsSpuModel.skuList) == null || j.results.forEach((e) => {
46
+ var l;
47
+ (l = e.specValues) == null || l.map((a) => {
48
+ ee.specInfoDict.useValues().then((n) => {
49
+ const d = n.find((c) => a.specId === c.key);
50
+ if (d) {
51
+ let c = {
52
+ id: a.specId,
53
+ name: d.value,
54
+ specValueList: []
55
+ };
56
+ t.value.push(c);
57
+ }
58
+ const o = /* @__PURE__ */ new Map();
59
+ t.value = t.value.filter(
60
+ (c) => !o.has(c.id) && o.set(c.id, c)
61
+ ), U(a.specValueId);
62
+ });
63
+ });
64
+ }));
65
+ function U(e) {
66
+ t.value.forEach((l) => {
67
+ v.value = new G({ specId: l.id }), v.value.useValues().then((a) => {
68
+ a.forEach((n) => {
69
+ if (n.key === e) {
70
+ let o = {
71
+ id: e,
72
+ name: n.value
73
+ };
74
+ l.specValueList.push(o);
75
+ }
76
+ const d = /* @__PURE__ */ new Map();
77
+ l.specValueList = l.specValueList.filter(
78
+ (o) => !d.has(o.id) && d.set(o.id, o)
79
+ );
80
+ });
81
+ });
82
+ });
83
+ }
84
+ function H(e) {
85
+ t.value.splice(e, 1);
86
+ }
87
+ function J(e, l) {
88
+ t.value[e].specValueList.splice(l, 1);
89
+ }
90
+ function K() {
91
+ V.value = new le({}), V.value.useValues().then((e) => {
92
+ e.forEach((l) => {
93
+ Array.isArray(t.value) && t.value.length > 0 && t.value.forEach((a) => {
94
+ l.key === a.id && (l.disabled = !0);
95
+ });
96
+ });
97
+ });
98
+ }
99
+ function P(e) {
100
+ let l = V.value.values.filter((n) => n.key === e), a = {
101
+ id: l[0].key,
102
+ name: l[0].value,
103
+ specValueList: []
104
+ };
105
+ t.value.push(a), L.value = "";
106
+ }
107
+ function Q(e) {
108
+ v.value = new G({
109
+ specId: t.value[e].id
110
+ }), v.value.useValues().then((l) => {
111
+ l.map((a) => {
112
+ Array.isArray(t.value[e].specValueList) && t.value[e].specValueList.length > 0 && t.value[e].specValueList.forEach((n) => {
113
+ a.key === n.id && (a.disabled = !0);
114
+ });
115
+ });
116
+ });
117
+ }
118
+ function W(e, l) {
119
+ var d, o;
120
+ let a = v.value.values.filter((c) => c.key === e), n = {
121
+ id: a[0].key,
122
+ name: a[0].value
123
+ };
124
+ (o = (d = t.value[l]) == null ? void 0 : d.specValueList) == null || o.push(n), t.value[l].specValueId = "";
125
+ }
126
+ function X(e) {
127
+ O("getFormData", e);
128
+ }
129
+ const F = _();
130
+ return N({
131
+ formRef: () => {
132
+ var e;
133
+ return (e = F.value) == null ? void 0 : e.formRef();
134
+ }
135
+ }), (e, l) => {
136
+ const a = i("Delete"), n = i("el-icon"), d = i("el-tag"), o = i("el-button"), c = i("el-option"), R = i("el-select"), T = i("el-popover"), A = i("el-tab-pane"), B = i("el-tabs");
137
+ return p(), g("div", oe, [
138
+ r(B, { type: "border-card" }, {
139
+ default: s(() => [
140
+ r(A, { label: "商品规格" }, {
141
+ default: s(() => [
142
+ (p(!0), g(b, null, S(t.value, (f, m) => (p(), g("div", {
143
+ class: "goods-spec",
144
+ key: m
145
+ }, [
146
+ h("div", se, [
147
+ h("span", null, $(f.name), 1),
148
+ h("span", {
149
+ class: "goods-delete",
150
+ onClick: (u) => H(m)
151
+ }, [
152
+ r(n, null, {
153
+ default: s(() => [
154
+ r(a)
155
+ ]),
156
+ _: 1
157
+ }),
158
+ l[1] || (l[1] = y("移除 ", -1))
159
+ ], 8, ue)
160
+ ]),
161
+ h("div", ne, [
162
+ h("div", ce, [
163
+ (p(!0), g(b, null, S(t.value[m].specValueList, (u, Y) => (p(), D(d, {
164
+ key: u,
165
+ closable: "",
166
+ type: "info",
167
+ class: "right-dis",
168
+ onClose: (de) => J(m, Y)
169
+ }, {
170
+ default: s(() => [
171
+ y($(u.name), 1)
172
+ ]),
173
+ _: 2
174
+ }, 1032, ["onClose"]))), 128))
175
+ ]),
176
+ r(T, {
177
+ placement: "bottom",
178
+ width: 200,
179
+ trigger: "click",
180
+ onShow: (u) => Q(m)
181
+ }, {
182
+ reference: s(() => [
183
+ r(o, { class: "m-2" }, {
184
+ default: s(() => l[2] || (l[2] = [
185
+ y("添加规格值", -1)
186
+ ])),
187
+ _: 1,
188
+ __: [2]
189
+ })
190
+ ]),
191
+ default: s(() => [
192
+ r(R, {
193
+ modelValue: t.value[m].specValueId,
194
+ "onUpdate:modelValue": (u) => t.value[m].specValueId = u,
195
+ placeholder: e.$t("goodsSpu.specValueRequired"),
196
+ onChange: (u) => W(u, m)
197
+ }, {
198
+ default: s(() => [
199
+ (p(!0), g(b, null, S(v.value.values, (u) => (p(), D(c, {
200
+ key: u.key,
201
+ label: u.value,
202
+ value: u.key,
203
+ disabled: u.disabled
204
+ }, null, 8, ["label", "value", "disabled"]))), 128))
205
+ ]),
206
+ _: 2
207
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "onChange"])
208
+ ]),
209
+ _: 2
210
+ }, 1032, ["onShow"])
211
+ ])
212
+ ]))), 128)),
213
+ r(T, {
214
+ placement: "bottom",
215
+ width: 200,
216
+ trigger: "click",
217
+ onShow: K
218
+ }, {
219
+ reference: s(() => [
220
+ r(o, { class: "m-2" }, {
221
+ default: s(() => l[3] || (l[3] = [
222
+ y("添加规格", -1)
223
+ ])),
224
+ _: 1,
225
+ __: [3]
226
+ })
227
+ ]),
228
+ default: s(() => [
229
+ r(R, {
230
+ modelValue: L.value,
231
+ "onUpdate:modelValue": l[0] || (l[0] = (f) => L.value = f),
232
+ placeholder: e.$t("goodsSpu.specRequired"),
233
+ onChange: P
234
+ }, {
235
+ default: s(() => [
236
+ (p(!0), g(b, null, S(V.value.values, (f) => (p(), D(c, {
237
+ key: f.key,
238
+ label: f.value,
239
+ value: f.key,
240
+ disabled: f.disabled
241
+ }, null, 8, ["label", "value", "disabled"]))), 128))
242
+ ]),
243
+ _: 1
244
+ }, 8, ["modelValue", "placeholder"])
245
+ ]),
246
+ _: 1
247
+ })
248
+ ]),
249
+ _: 1
250
+ })
251
+ ]),
252
+ _: 1
253
+ }),
254
+ r(B, { type: "border-card" }, {
255
+ default: s(() => [
256
+ r(A, { label: "规格售价与库存" }, {
257
+ default: s(() => [
258
+ t.value.length > 0 ? (p(), D(te, {
259
+ key: 0,
260
+ ref_key: "skuTableRef",
261
+ ref: F,
262
+ specData: I.value,
263
+ goodsSku: C.value,
264
+ form: w.form,
265
+ onGetFormData: X
266
+ }, null, 8, ["specData", "goodsSku", "form"])) : x("", !0)
267
+ ]),
268
+ _: 1
269
+ })
270
+ ]),
271
+ _: 1
272
+ })
273
+ ]);
274
+ };
275
+ }
276
+ }), _e = /* @__PURE__ */ ae(re, [["__scopeId", "data-v-11e63cd5"]]);
277
+ export {
278
+ _e as default
279
+ };