xyvcard-goods 0.0.32 → 0.0.34

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 (112) hide show
  1. package/README.md +51 -51
  2. package/dist/GoodsBaseForm-BSvXc_XA.mjs +4 -0
  3. package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-rsmqHXbJ.mjs +381 -0
  4. package/dist/GoodsLogisticsForm-1Bbd4Z52.mjs +4 -0
  5. package/dist/GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-PSnPNbmT.mjs +434 -0
  6. package/dist/GoodsSpecForm-Ddo1IZLZ.mjs +4 -0
  7. package/dist/GoodsSpecForm.vue_vue_type_script_setup_true_lang-CdWIufm4.mjs +338 -0
  8. package/dist/{ImageUpload-BMw9FVJL.mjs → ImageUpload-Bf2jhRs5.mjs} +1 -1
  9. package/dist/edit copy 2-Yzf_M31V.mjs +59 -0
  10. package/dist/edit copy-CCnzlrgL.mjs +526 -0
  11. package/dist/{edit-DvO1wYIL.mjs → edit-BgtwinSN.mjs} +1 -1
  12. package/dist/{edit-BlQj1xVR.mjs → edit-Dke5sWct.mjs} +4 -4
  13. package/dist/{edit-CuGiM5xu.mjs → edit-e5-aXV6K.mjs} +15 -15
  14. package/dist/{edit-Bh5jT6eo.mjs → edit-lfXK_dUp.mjs} +4 -4
  15. package/dist/{edit-CyhVo22f.mjs → edit-pUKONjxH.mjs} +7 -7
  16. package/dist/{edit.vue_vue_type_script_setup_true_lang-Bx32ZXck.mjs → edit.vue_vue_type_script_setup_true_lang-BtGT564r.mjs} +33 -33
  17. package/dist/el-message-BB2-39XJ.mjs +1221 -0
  18. package/dist/{index-BrBipAPq.mjs → index-BSzOTWcG.mjs} +1 -1
  19. package/dist/{index-CVM7nBhM.mjs → index-BpKiAhvt.mjs} +3 -3
  20. package/dist/{index-Dk9-_0Ir.mjs → index-ChQ-ZxD1.mjs} +2 -2
  21. package/dist/{index-Dz9NSJh1.mjs → index-CkJncbVf.mjs} +3 -3
  22. package/dist/{index-DzUSeIbT.mjs → index-CkMWas2b.mjs} +3 -3
  23. package/dist/index-Da2R0n8O.mjs +374 -0
  24. package/dist/{index-BlZupHNB.mjs → index-DhS4AuWf.mjs} +1593 -1554
  25. package/dist/{index-8JQB4NmH.mjs → index-DyLLV1NK.mjs} +281 -250
  26. package/dist/index-vHQhUQSO.mjs +95 -0
  27. package/dist/index.mjs +1 -1
  28. package/dist/{info-CLt9Ea38.mjs → info-DOKoSi7a.mjs} +34 -34
  29. package/dist/{info-NFU_3fNY.mjs → info-De_pBN6A.mjs} +19 -19
  30. package/dist/{skuForm-Dr6dKGa4.mjs → skuForm-DVGkw6rD.mjs} +71 -86
  31. package/dist/{skuForm-8WZm2j5V.mjs → skuForm-YXHrhyPI.mjs} +111 -110
  32. package/dist/{skuTable-BwIc5hr5.mjs → skuTable-DOIQ9kiV.mjs} +71 -71
  33. package/dist/style.css +1 -1
  34. package/dts/api/goods-base/index.d.ts +11 -0
  35. package/dts/api/goods-base/types.d.ts +33 -0
  36. package/dts/api/goods-logistics/index.d.ts +8 -0
  37. package/dts/api/goods-logistics/types.d.ts +16 -0
  38. package/dts/api/goods-spec/index.d.ts +8 -0
  39. package/dts/api/goods-spec/types.d.ts +15 -0
  40. package/dts/api/goods-spu/index.d.ts +3 -0
  41. package/dts/api/goods-stock/index.d.ts +8 -0
  42. package/dts/api/goods-stock/types.d.ts +32 -0
  43. package/dts/api/index.d.ts +3 -0
  44. package/dts/constant.d.ts +26 -0
  45. package/dts/lang/goods/zh-cn.d.ts +12 -0
  46. package/dts/views/goods/goods-spu/components/GoodsBaseForm.vue.d.ts +7 -0
  47. package/dts/views/goods/goods-spu/components/GoodsLogisticsForm.vue.d.ts +2 -0
  48. package/dts/views/goods/goods-spu/components/GoodsSpecForm.vue.d.ts +7 -0
  49. package/dts/views/goods/goods-spu/edit copy 2.vue.d.ts +2 -0
  50. package/dts/views/goods/goods-spu/edit copy.vue.d.ts +2 -0
  51. package/dts/xyvcard-goods/src/App.vue.d.ts +2 -0
  52. package/dts/xyvcard-goods/src/api/dict.d.ts +35 -0
  53. package/dts/xyvcard-goods/src/api/goods-base/index.d.ts +11 -0
  54. package/dts/xyvcard-goods/src/api/goods-base/types.d.ts +33 -0
  55. package/dts/xyvcard-goods/src/api/goods-brand-info/index.d.ts +20 -0
  56. package/dts/xyvcard-goods/src/api/goods-brand-info/types.d.ts +73 -0
  57. package/dts/xyvcard-goods/src/api/goods-category/index.d.ts +23 -0
  58. package/dts/xyvcard-goods/src/api/goods-category/types.d.ts +70 -0
  59. package/dts/xyvcard-goods/src/api/goods-ensure/index.d.ts +13 -0
  60. package/dts/xyvcard-goods/src/api/goods-ensure/types.d.ts +13 -0
  61. package/dts/xyvcard-goods/src/api/goods-label-info/index.d.ts +20 -0
  62. package/dts/xyvcard-goods/src/api/goods-label-info/types.d.ts +70 -0
  63. package/dts/xyvcard-goods/src/api/goods-logistics/index.d.ts +8 -0
  64. package/dts/xyvcard-goods/src/api/goods-logistics/types.d.ts +16 -0
  65. package/dts/xyvcard-goods/src/api/goods-sku/types.d.ts +18 -0
  66. package/dts/xyvcard-goods/src/api/goods-spec/index.d.ts +8 -0
  67. package/dts/xyvcard-goods/src/api/goods-spec/types.d.ts +15 -0
  68. package/dts/xyvcard-goods/src/api/goods-spu/index.d.ts +69 -0
  69. package/dts/xyvcard-goods/src/api/goods-spu/types.d.ts +245 -0
  70. package/dts/xyvcard-goods/src/api/goods-stock/index.d.ts +8 -0
  71. package/dts/xyvcard-goods/src/api/goods-stock/types.d.ts +32 -0
  72. package/dts/xyvcard-goods/src/api/index.d.ts +29 -0
  73. package/dts/xyvcard-goods/src/api/shop-branch/index.d.ts +9 -0
  74. package/dts/xyvcard-goods/src/api/shop-branch/types.d.ts +28 -0
  75. package/dts/xyvcard-goods/src/components/ImageUpload.vue.d.ts +36 -0
  76. package/dts/xyvcard-goods/src/constant.d.ts +107 -0
  77. package/dts/xyvcard-goods/src/index.d.ts +12 -0
  78. package/dts/xyvcard-goods/src/lang/goods/en.d.ts +2 -0
  79. package/dts/xyvcard-goods/src/lang/goods/zh-cn.d.ts +141 -0
  80. package/dts/xyvcard-goods/src/lang/index.d.ts +1 -0
  81. package/dts/xyvcard-goods/src/main.d.ts +7 -0
  82. package/dts/xyvcard-goods/src/permission.d.ts +1 -0
  83. package/dts/xyvcard-goods/src/router/index.d.ts +6 -0
  84. package/dts/xyvcard-goods/src/utils/momentPlugin.d.ts +5 -0
  85. package/dts/xyvcard-goods/src/utils/returnBizLay.d.ts +2 -0
  86. package/dts/xyvcard-goods/src/utils/sku.d.ts +19 -0
  87. package/dts/xyvcard-goods/src/views/goods/goods-brand-info/edit.vue.d.ts +22 -0
  88. package/dts/xyvcard-goods/src/views/goods/goods-brand-info/index.vue.d.ts +2 -0
  89. package/dts/xyvcard-goods/src/views/goods/goods-category/edit.vue.d.ts +22 -0
  90. package/dts/xyvcard-goods/src/views/goods/goods-category/index.vue.d.ts +2 -0
  91. package/dts/xyvcard-goods/src/views/goods/goods-combination/edit.vue.d.ts +2 -0
  92. package/dts/xyvcard-goods/src/views/goods/goods-combination/index.vue.d.ts +2 -0
  93. package/dts/xyvcard-goods/src/views/goods/goods-combination/info.vue.d.ts +2 -0
  94. package/dts/xyvcard-goods/src/views/goods/goods-combination/skuForm.vue.d.ts +20 -0
  95. package/dts/xyvcard-goods/src/views/goods/goods-label-info/edit.vue.d.ts +22 -0
  96. package/dts/xyvcard-goods/src/views/goods/goods-label-info/index.vue.d.ts +2 -0
  97. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsBaseForm.vue.d.ts +34 -0
  98. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsLogisticsForm.vue.d.ts +42 -0
  99. package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsSpecForm.vue.d.ts +42 -0
  100. package/dts/xyvcard-goods/src/views/goods/goods-spu/edit copy 2.vue.d.ts +2 -0
  101. package/dts/xyvcard-goods/src/views/goods/goods-spu/edit copy.vue.d.ts +2 -0
  102. package/dts/xyvcard-goods/src/views/goods/goods-spu/edit.vue.d.ts +2 -0
  103. package/dts/xyvcard-goods/src/views/goods/goods-spu/index.vue.d.ts +2 -0
  104. package/dts/xyvcard-goods/src/views/goods/goods-spu/info.vue.d.ts +2 -0
  105. package/dts/xyvcard-goods/src/views/goods/goods-spu/skuForm.vue.d.ts +29 -0
  106. package/dts/xyvcard-shop/src/api/shop-branch/index.d.ts +14 -0
  107. package/dts/xyvcard-shop/src/api/shop-branch/types.d.ts +76 -0
  108. package/package.json +63 -63
  109. package/dist/index-B7_M6fAN.mjs +0 -228
  110. package/dts/views/goods/goods-combination/goodsList.vue.d.ts +0 -14
  111. package/dts/views/goods/goods-spu/goodsList.vue.d.ts +0 -23
  112. /package/dts/{views/goods/goods-combination → xyvcard-goods/src/views/goods/goods-spu}/skuTable.vue.d.ts +0 -0
@@ -0,0 +1,338 @@
1
+ import { defineComponent as U, reactive as E, ref as G, resolveComponent as d, createBlock as g, openBlock as f, unref as a, withCtx as s, createVNode as l, createElementBlock as C, createCommentVNode as P, Fragment as M, createTextVNode as I } from "vue";
2
+ import { useI18n as v } from "vue-i18n";
3
+ import { useRoute as w, useRouter as $ } from "vue-router";
4
+ import { useUserStore as F, clearEmpty as O, request as B, routerUtil as j } from "jmash-core";
5
+ import { D as i, C as c } from "./index-Da2R0n8O.mjs";
6
+ import X from "./skuForm-YXHrhyPI.mjs";
7
+ import { E as z } from "./el-message-BB2-39XJ.mjs";
8
+ class H {
9
+ // A设置商品规格与定价信息
10
+ create(y) {
11
+ return y.tenant = F().user.tenant, O(y), B({
12
+ url: "/v1/goods/goods_spec",
13
+ method: "patch",
14
+ data: y
15
+ });
16
+ }
17
+ }
18
+ const J = new H(), le = /* @__PURE__ */ U({
19
+ __name: "GoodsSpecForm",
20
+ props: {
21
+ goodsSpuModel: { default: () => ({ skuList: { results: [{}] } }) }
22
+ },
23
+ emits: ["submit"],
24
+ setup(b, { emit: y }) {
25
+ const V = b;
26
+ i.presaleTypeEnum.useEnumValues(), i.balancePaymentTypeEnum.useEnumValues(), i.specTypeEnum.useEnumValues();
27
+ const { t: r } = v(), _ = w(), D = $();
28
+ let e = E({
29
+ requestId: Math.random() * 10 + "",
30
+ updateMask: "presaleType,isPointsGift,isPointsDeduct,purchaseLimit,balancePaymentType,balancePaymentDays,balancePaymentDate,specType,specId,skuSpecValues",
31
+ isPointsGift: !1,
32
+ isPointsDeduct: !1,
33
+ purchaseLimit: 0,
34
+ spuId: _.query.spuId,
35
+ presaleType: c.GOODS_PRESALE_TYPE_VALUES.NONE,
36
+ balancePaymentType: c.BALANCE_PAYMENT_TYPE_VALUES.DYNAMIC_DATE,
37
+ skuSpecValues: [],
38
+ specType: c.SPEC_TYPE_VALUES.UNIFIED_SPEC,
39
+ ...V.goodsSpuModel
40
+ });
41
+ const A = E({
42
+ presaleType: [
43
+ {
44
+ required: !0,
45
+ message: r("goodsSpu.presaleTypeRequired"),
46
+ trigger: "change"
47
+ }
48
+ ],
49
+ balancePaymentType: [
50
+ {
51
+ required: !0,
52
+ message: r("goodsSpu.balancePaymentTypeRequired"),
53
+ trigger: "change"
54
+ }
55
+ ],
56
+ balancePaymentDays: [
57
+ {
58
+ required: !0,
59
+ message: r("goodsSpu.balancePaymentDaysRequired"),
60
+ trigger: "blur"
61
+ }
62
+ ],
63
+ balancePaymentDate: [
64
+ {
65
+ required: !0,
66
+ message: r("goodsSpu.balancePaymentDateRequired"),
67
+ trigger: "change"
68
+ }
69
+ ],
70
+ isPointsGift: [
71
+ {
72
+ required: !0,
73
+ message: r("goodsSpu.isPointsGiftRequired"),
74
+ trigger: "change"
75
+ }
76
+ ],
77
+ isPointsDeduct: [
78
+ {
79
+ required: !0,
80
+ message: r("goodsSpu.isPointsDeductRequired"),
81
+ trigger: "change"
82
+ }
83
+ ],
84
+ purchaseLimit: [
85
+ {
86
+ required: !0,
87
+ message: r("goodsSpu.purchaseLimitRequired"),
88
+ trigger: "blur"
89
+ }
90
+ ],
91
+ specType: [
92
+ {
93
+ required: !0,
94
+ message: r("goodsSpu.specTypeRequired"),
95
+ trigger: "change"
96
+ }
97
+ ]
98
+ });
99
+ function k(o) {
100
+ e.skuSpecValues.push(o), e.skuSpecValues = e.skuSpecValues.slice(-1);
101
+ }
102
+ function q(o) {
103
+ o.forEach((t) => {
104
+ var p;
105
+ e.specId = (p = t.specValues) == null ? void 0 : p.map((n) => n.specId), e.skuSpecValues.push(t);
106
+ }), e.skuSpecValues = e.skuSpecValues.slice(-o.length);
107
+ }
108
+ const S = G();
109
+ function L() {
110
+ var o;
111
+ (o = S.value) == null || o.validate((t) => {
112
+ t && J.create(e).then((p) => {
113
+ p.status === 200 && (z({
114
+ message: r("common.submitSuccess"),
115
+ type: "success"
116
+ }), j.closeTagView(_.fullPath, D, !1));
117
+ });
118
+ });
119
+ }
120
+ return (o, t) => {
121
+ const p = d("jmash-enum-radio"), n = d("el-form-item"), m = d("el-col"), T = d("el-input-number"), h = d("el-date-picker"), Y = d("el-row"), N = d("el-button"), R = d("el-form");
122
+ return f(), g(R, {
123
+ ref_key: "goodsSpecFormRef",
124
+ ref: S,
125
+ model: a(e),
126
+ "label-width": "140px",
127
+ rules: A
128
+ }, {
129
+ default: s(() => [
130
+ l(Y, null, {
131
+ default: s(() => [
132
+ l(m, { span: 8 }, {
133
+ default: s(() => [
134
+ l(n, {
135
+ label: o.$t("goodsSpu.presaleType"),
136
+ prop: "presaleType"
137
+ }, {
138
+ default: s(() => [
139
+ l(p, {
140
+ modelValue: a(e).presaleType,
141
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => a(e).presaleType = u),
142
+ data: a(i).presaleTypeEnum.values
143
+ }, null, 8, ["modelValue", "data"])
144
+ ]),
145
+ _: 1
146
+ }, 8, ["label"])
147
+ ]),
148
+ _: 1
149
+ }),
150
+ a(e).presaleType !== a(c).GOODS_PRESALE_TYPE_VALUES.NONE ? (f(), C(M, { key: 0 }, [
151
+ l(m, { span: 8 }, {
152
+ default: s(() => [
153
+ l(n, {
154
+ label: o.$t("goodsSpu.balancePaymentType"),
155
+ prop: "balancePaymentType"
156
+ }, {
157
+ default: s(() => [
158
+ l(p, {
159
+ modelValue: a(e).balancePaymentType,
160
+ "onUpdate:modelValue": t[1] || (t[1] = (u) => a(e).balancePaymentType = u),
161
+ data: a(i).balancePaymentTypeEnum.values
162
+ }, null, 8, ["modelValue", "data"])
163
+ ]),
164
+ _: 1
165
+ }, 8, ["label"])
166
+ ]),
167
+ _: 1
168
+ }),
169
+ a(e).balancePaymentType === a(c).BALANCE_PAYMENT_TYPE_VALUES.DYNAMIC_DATE ? (f(), g(m, {
170
+ key: 0,
171
+ span: 8
172
+ }, {
173
+ default: s(() => [
174
+ l(n, {
175
+ label: o.$t("goodsSpu.balancePaymentDays"),
176
+ prop: "balancePaymentDays"
177
+ }, {
178
+ default: s(() => [
179
+ l(T, {
180
+ class: "w-full",
181
+ modelValue: a(e).balancePaymentDays,
182
+ "onUpdate:modelValue": t[2] || (t[2] = (u) => a(e).balancePaymentDays = u),
183
+ placeholder: o.$t("goodsSpu.balancePaymentDaysRequired"),
184
+ min: 0,
185
+ step: 1,
186
+ "controls-position": "right",
187
+ clearable: ""
188
+ }, null, 8, ["modelValue", "placeholder"])
189
+ ]),
190
+ _: 1
191
+ }, 8, ["label"])
192
+ ]),
193
+ _: 1
194
+ })) : P("", !0),
195
+ a(e).balancePaymentType === a(c).BALANCE_PAYMENT_TYPE_VALUES.FIXED_DATE ? (f(), g(m, {
196
+ key: 1,
197
+ span: 8
198
+ }, {
199
+ default: s(() => [
200
+ l(n, {
201
+ label: o.$t("goodsSpu.balancePaymentDate"),
202
+ prop: "balancePaymentDate"
203
+ }, {
204
+ default: s(() => [
205
+ l(h, {
206
+ class: "w-full",
207
+ modelValue: a(e).balancePaymentDate,
208
+ "onUpdate:modelValue": t[3] || (t[3] = (u) => a(e).balancePaymentDate = u),
209
+ placeholder: o.$t("goodsSpu.balancePaymentDateRequired"),
210
+ "show-word-limit": "",
211
+ type: "date",
212
+ format: "YYYY-MM-DD",
213
+ "value-format": "YYYY-MM-DD",
214
+ clearable: "",
215
+ "value-on-clear": ""
216
+ }, null, 8, ["modelValue", "placeholder"])
217
+ ]),
218
+ _: 1
219
+ }, 8, ["label"])
220
+ ]),
221
+ _: 1
222
+ })) : P("", !0)
223
+ ], 64)) : P("", !0),
224
+ l(m, { span: 8 }, {
225
+ default: s(() => [
226
+ l(n, {
227
+ label: o.$t("goodsSpu.isPointsGift"),
228
+ prop: "isPointsGift"
229
+ }, {
230
+ default: s(() => [
231
+ l(p, {
232
+ modelValue: a(e).isPointsGift,
233
+ "onUpdate:modelValue": t[4] || (t[4] = (u) => a(e).isPointsGift = u),
234
+ data: a(i).yesOrNoEnum.values
235
+ }, null, 8, ["modelValue", "data"])
236
+ ]),
237
+ _: 1
238
+ }, 8, ["label"])
239
+ ]),
240
+ _: 1
241
+ }),
242
+ l(m, { span: 8 }, {
243
+ default: s(() => [
244
+ l(n, {
245
+ label: o.$t("goodsSpu.isPointsDeduct"),
246
+ prop: "isPointsDeduct"
247
+ }, {
248
+ default: s(() => [
249
+ l(p, {
250
+ modelValue: a(e).isPointsDeduct,
251
+ "onUpdate:modelValue": t[5] || (t[5] = (u) => a(e).isPointsDeduct = u),
252
+ data: a(i).yesOrNoEnum.values
253
+ }, null, 8, ["modelValue", "data"])
254
+ ]),
255
+ _: 1
256
+ }, 8, ["label"])
257
+ ]),
258
+ _: 1
259
+ }),
260
+ l(m, { span: 8 }, {
261
+ default: s(() => [
262
+ l(n, {
263
+ label: o.$t("goodsSpu.purchaseLimit"),
264
+ prop: "purchaseLimit"
265
+ }, {
266
+ default: s(() => [
267
+ l(T, {
268
+ class: "w-full",
269
+ modelValue: a(e).purchaseLimit,
270
+ "onUpdate:modelValue": t[6] || (t[6] = (u) => a(e).purchaseLimit = u),
271
+ placeholder: o.$t("goodsSpu.purchaseLimitRequired"),
272
+ min: 0,
273
+ step: 1,
274
+ "controls-position": "right",
275
+ clearable: ""
276
+ }, null, 8, ["modelValue", "placeholder"])
277
+ ]),
278
+ _: 1
279
+ }, 8, ["label"])
280
+ ]),
281
+ _: 1
282
+ }),
283
+ l(m, { span: 8 }, {
284
+ default: s(() => [
285
+ l(n, {
286
+ label: o.$t("goodsSpu.specType"),
287
+ prop: "specType"
288
+ }, {
289
+ default: s(() => [
290
+ l(p, {
291
+ modelValue: a(e).specType,
292
+ "onUpdate:modelValue": t[7] || (t[7] = (u) => a(e).specType = u),
293
+ data: a(i).specTypeEnum.values
294
+ }, null, 8, ["modelValue", "data"])
295
+ ]),
296
+ _: 1
297
+ }, 8, ["label"])
298
+ ]),
299
+ _: 1
300
+ }),
301
+ l(m, { span: 24 }, {
302
+ default: s(() => [
303
+ l(X, {
304
+ "spec-type": a(e).specType,
305
+ form: a(e),
306
+ onGetGoodsSku: k,
307
+ onGetFormData: q
308
+ }, null, 8, ["spec-type", "form"])
309
+ ]),
310
+ _: 1
311
+ })
312
+ ]),
313
+ _: 1
314
+ }),
315
+ l(n, null, {
316
+ default: s(() => [
317
+ l(N, {
318
+ type: "primary",
319
+ onClick: L
320
+ }, {
321
+ default: s(() => t[8] || (t[8] = [
322
+ I("保存", -1)
323
+ ])),
324
+ _: 1,
325
+ __: [8]
326
+ })
327
+ ]),
328
+ _: 1
329
+ })
330
+ ]),
331
+ _: 1
332
+ }, 8, ["model", "rules"]);
333
+ };
334
+ }
335
+ });
336
+ export {
337
+ le as _
338
+ };
@@ -87,7 +87,7 @@ const z = ["src"], A = /* @__PURE__ */ b({
87
87
  ], 64);
88
88
  };
89
89
  }
90
- }), J = /* @__PURE__ */ q(A, [["__scopeId", "data-v-f10f6f7e"]]);
90
+ }), J = /* @__PURE__ */ q(A, [["__scopeId", "data-v-611600ed"]]);
91
91
  export {
92
92
  J as _
93
93
  };
@@ -0,0 +1,59 @@
1
+ import { defineComponent as k, reactive as C, ref as B, computed as g, resolveComponent as p, createElementBlock as u, openBlock as a, createVNode as I, unref as t, isRef as A, withCtx as S, createBlock as d, Fragment as h, renderList as E, resolveDynamicComponent as F } from "vue";
2
+ import { useRoute as M } from "vue-router";
3
+ import { C as l } from "./index-Da2R0n8O.mjs";
4
+ import { a as N } from "./index-DhS4AuWf.mjs";
5
+ import { _ as T } from "./GoodsBaseForm.vue_vue_type_script_setup_true_lang-rsmqHXbJ.mjs";
6
+ import { _ as U } from "./GoodsSpecForm.vue_vue_type_script_setup_true_lang-CdWIufm4.mjs";
7
+ import { _ as V } from "./GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-PSnPNbmT.mjs";
8
+ const x = { class: "app-container" }, D = /* @__PURE__ */ k({
9
+ __name: "edit copy 2",
10
+ setup(G) {
11
+ const n = C({}), m = M();
12
+ m.query.spuId && N.findById({ spuId: m.query.spuId }).then(({ data: o }) => {
13
+ Object.assign(n, o);
14
+ });
15
+ const e = B(l.TAB_ENUM[0].key), c = {
16
+ GoodsBaseForm: T,
17
+ GoodsSpecForm: U,
18
+ GoodsLogisticsForm: V
19
+ }, i = g(
20
+ () => c[e.value]
21
+ );
22
+ function _(o, r) {
23
+ e.value = o.props.name;
24
+ }
25
+ function f(o) {
26
+ Object.assign(n, o), e.value = l.TAB_ENUM[1].key;
27
+ }
28
+ return (o, r) => {
29
+ const b = p("el-tab-pane"), v = p("el-tabs");
30
+ return a(), u("div", x, [
31
+ I(v, {
32
+ type: "border-card",
33
+ modelValue: t(e),
34
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => A(e) ? e.value = s : null),
35
+ class: "demo-tabs",
36
+ onTabClick: _
37
+ }, {
38
+ default: S(() => [
39
+ (a(!0), u(h, null, E(t(l).TAB_ENUM, (s, y) => (a(), d(b, {
40
+ key: y,
41
+ label: s.value,
42
+ name: s.key,
43
+ disabled: !t(n).spuId
44
+ }, null, 8, ["label", "name", "disabled"]))), 128)),
45
+ (a(), d(F(t(i)), {
46
+ key: t(n).spuId,
47
+ "goods-spu-model": t(n),
48
+ onSubmit: f
49
+ }, null, 40, ["goods-spu-model"]))
50
+ ]),
51
+ _: 1
52
+ }, 8, ["modelValue"])
53
+ ]);
54
+ };
55
+ }
56
+ });
57
+ export {
58
+ D as default
59
+ };