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.
- package/dist/BatchSetting-B1LcBFPD.mjs +333 -0
- package/dist/ChannelProfit-CNSIK87d.mjs +4 -0
- package/dist/ChannelProfit.vue_vue_type_script_setup_true_lang-BVTifRY8.mjs +320 -0
- package/dist/{GoodsBaseForm-BSvXc_XA.mjs → GoodsBaseForm-BZ2fZmmp.mjs} +1 -1
- package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-BxBTTLdA.mjs +407 -0
- package/dist/{GoodsLogisticsForm-1Bbd4Z52.mjs → GoodsLogisticsForm-BqlwdGQ1.mjs} +1 -1
- package/dist/{GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-PSnPNbmT.mjs → GoodsLogisticsForm.vue_vue_type_script_setup_true_lang-DJREiSkD.mjs} +56 -57
- package/dist/GoodsProfitForm-COYRi8sx.mjs +4 -0
- package/dist/GoodsProfitForm.vue_vue_type_script_setup_true_lang-BYPWP95J.mjs +2550 -0
- package/dist/{GoodsSpecForm-Ddo1IZLZ.mjs → GoodsSpecForm-B4MtETRy.mjs} +1 -1
- 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
- package/dist/SingleSku-rWv9vVhv.mjs +351 -0
- package/dist/constant-sVd2JbJt.mjs +115 -0
- package/dist/edit-B1cmsJpy.mjs +70 -0
- package/dist/{edit-lfXK_dUp.mjs → edit-Br1Y569l.mjs} +8 -7
- package/dist/{edit-e5-aXV6K.mjs → edit-CET8Fr-t.mjs} +1 -1
- package/dist/{edit-pUKONjxH.mjs → edit-CagYTFKr.mjs} +1 -1
- package/dist/{edit-BgtwinSN.mjs → edit-iJGrWlSv.mjs} +1 -1
- 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
- package/dist/{el-message-BB2-39XJ.mjs → el-message-Dj6aaz4G.mjs} +490 -373
- package/dist/{index-DyLLV1NK.mjs → index copy-kNLE7fPg.mjs } +6 -5
- package/dist/index-C61SQFSx.mjs +264 -0
- package/dist/index-CeWPdEJD.mjs +713 -0
- package/dist/{index-CkJncbVf.mjs → index-Cg6GUdSP.mjs} +3 -3
- package/dist/index-CyxnVWnL.mjs +182 -0
- package/dist/{index-CkMWas2b.mjs → index-D9s8hsVw.mjs} +3 -3
- package/dist/{index-BSzOTWcG.mjs → index-DbnKa_BJ.mjs} +1 -1
- package/dist/{index-ChQ-ZxD1.mjs → index-DoxTu4kg.mjs} +5 -4
- package/dist/{index-BpKiAhvt.mjs → index-kw0UYOIu.mjs} +3 -3
- package/dist/{index-DhS4AuWf.mjs → index-xQgC-8Gd.mjs} +1106 -1038
- package/dist/index.mjs +1 -1
- package/dist/info-CTElDVo6.mjs +376 -0
- package/dist/{info-DOKoSi7a.mjs → info-DpGJgdac.mjs} +5 -4
- package/dist/{skuForm-DVGkw6rD.mjs → skuForm-C7w9YIDe.mjs} +24 -23
- package/dist/skuForm-CPlnCToi.mjs +279 -0
- package/dist/skuTable-C-LcASbX.mjs +594 -0
- package/dist/spec-DkiGCkuM.mjs +44 -0
- package/dist/style.css +1 -1
- package/dts/xyvcard-goods/src/api/dict.d.ts +5 -4
- package/dts/xyvcard-goods/src/api/goods-sku/types.d.ts +3 -0
- package/dts/xyvcard-goods/src/api/goods-spu/index.d.ts +4 -1
- package/dts/xyvcard-goods/src/api/goods-spu/types.d.ts +35 -9
- package/dts/xyvcard-goods/src/api/types.d.ts +4 -0
- package/dts/xyvcard-goods/src/lang/goods/zh-cn.d.ts +32 -0
- package/dts/xyvcard-goods/src/router/index.d.ts +1 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/BatchSetting.vue.d.ts +35 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/ChannelProfit.vue.d.ts +22 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/GoodsProfitForm.vue.d.ts +34 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/components/SingleSku.vue.d.ts +23 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/index copy.vue.d.ts +2 -0
- package/dts/xyvcard-goods/src/views/goods/goods-spu/skuForm.vue.d.ts +17 -4
- package/dts/xyvcard-goods/src/views/goods/goods-spu/skuTable.vue.d.ts +14 -1
- package/dts/xyvcard-goods/src/views/goods/goods-spu/spec.vue.d.ts +2 -0
- package/package.json +4 -3
- package/dist/GoodsBaseForm.vue_vue_type_script_setup_true_lang-rsmqHXbJ.mjs +0 -381
- package/dist/edit copy 2-Yzf_M31V.mjs +0 -59
- package/dist/edit copy-CCnzlrgL.mjs +0 -526
- package/dist/edit-Dke5sWct.mjs +0 -526
- package/dist/index-BHmGYIuc.mjs +0 -24
- package/dist/index-Da2R0n8O.mjs +0 -374
- package/dist/index-vHQhUQSO.mjs +0 -95
- package/dist/info-De_pBN6A.mjs +0 -365
- package/dist/skuForm-YXHrhyPI.mjs +0 -476
- package/dist/skuTable-DOIQ9kiV.mjs +0 -639
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { defineComponent as T, reactive as k, ref as C, resolveComponent as u, createBlock as c, openBlock as m, withCtx as t, createVNode as e, createTextVNode as V, createCommentVNode as f, unref as A, toDisplayString as O } from "vue";
|
|
2
|
+
import { useI18n as v } from "vue-i18n";
|
|
3
|
+
import { C as h } from "./constant-sVd2JbJt.mjs";
|
|
4
|
+
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const I = /* @__PURE__ */ T({
|
|
6
|
+
__name: "BatchSetting",
|
|
7
|
+
props: {
|
|
8
|
+
goodsSpecModel: { default: () => ({}) }
|
|
9
|
+
},
|
|
10
|
+
emits: ["batchSetting"],
|
|
11
|
+
setup(L, { emit: $ }) {
|
|
12
|
+
const { t: i } = v(), l = k({
|
|
13
|
+
salePrice: null,
|
|
14
|
+
costPrice: null,
|
|
15
|
+
marketPrice: null,
|
|
16
|
+
pointsDeduct: null,
|
|
17
|
+
earnestAmount: null,
|
|
18
|
+
depositAmount: null,
|
|
19
|
+
stock: null,
|
|
20
|
+
status: !0
|
|
21
|
+
}), D = k({
|
|
22
|
+
salePrice: [
|
|
23
|
+
{
|
|
24
|
+
required: !0,
|
|
25
|
+
message: i("goodsSpu.salePriceRequired"),
|
|
26
|
+
trigger: "blur"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
pointsDeduct: [
|
|
30
|
+
{
|
|
31
|
+
required: !0,
|
|
32
|
+
message: i("goodsSpu.pointsDeductRequired"),
|
|
33
|
+
trigger: "blur"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
earnestAmount: [
|
|
37
|
+
{
|
|
38
|
+
required: !0,
|
|
39
|
+
message: i("goodsSpu.earnestAmountRequired"),
|
|
40
|
+
trigger: "blur"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
depositAmount: [
|
|
44
|
+
{
|
|
45
|
+
required: !0,
|
|
46
|
+
message: i("goodsSpu.depositAmountRequired"),
|
|
47
|
+
trigger: "blur"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
stock: [
|
|
51
|
+
{
|
|
52
|
+
required: !0,
|
|
53
|
+
message: i("goodsSpu.stockRequired"),
|
|
54
|
+
trigger: "blur"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}), g = C(), b = $, w = () => {
|
|
58
|
+
var o;
|
|
59
|
+
(o = g.value) == null || o.validate().then((n) => {
|
|
60
|
+
n && b("batchSetting", l);
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return (o, n) => {
|
|
64
|
+
const E = u("Setting"), R = u("el-icon"), r = u("el-form-item"), p = u("el-input-number"), d = u("el-tooltip"), a = u("el-col"), q = u("el-button"), U = u("el-row"), y = u("el-form");
|
|
65
|
+
return m(), c(y, {
|
|
66
|
+
ref_key: "formRef",
|
|
67
|
+
ref: g,
|
|
68
|
+
model: l,
|
|
69
|
+
rules: D,
|
|
70
|
+
class: "w-full"
|
|
71
|
+
}, {
|
|
72
|
+
default: t(() => [
|
|
73
|
+
e(r, { class: "flex items-center gap" }, {
|
|
74
|
+
default: t(() => [
|
|
75
|
+
e(R, null, {
|
|
76
|
+
default: t(() => [
|
|
77
|
+
e(E)
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}),
|
|
81
|
+
n[7] || (n[7] = V("批量设置 ", -1))
|
|
82
|
+
]),
|
|
83
|
+
_: 1,
|
|
84
|
+
__: [7]
|
|
85
|
+
}),
|
|
86
|
+
e(U, { gutter: 20 }, {
|
|
87
|
+
default: t(() => {
|
|
88
|
+
var _, S, P;
|
|
89
|
+
return [
|
|
90
|
+
e(a, { span: 6 }, {
|
|
91
|
+
default: t(() => [
|
|
92
|
+
e(r, { prop: "salePrice" }, {
|
|
93
|
+
default: t(() => [
|
|
94
|
+
e(d, {
|
|
95
|
+
effect: "dark",
|
|
96
|
+
content: o.$t("goodsSpu.salePrice"),
|
|
97
|
+
placement: "top-start"
|
|
98
|
+
}, {
|
|
99
|
+
default: t(() => [
|
|
100
|
+
e(p, {
|
|
101
|
+
modelValue: l.salePrice,
|
|
102
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => l.salePrice = s),
|
|
103
|
+
precision: 2,
|
|
104
|
+
step: 0.01,
|
|
105
|
+
min: 0.01,
|
|
106
|
+
placeholder: o.$t("goodsSpu.salePrice"),
|
|
107
|
+
class: "w-full",
|
|
108
|
+
"controls-position": "right"
|
|
109
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["content"])
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
})
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
}),
|
|
119
|
+
e(a, { span: 6 }, {
|
|
120
|
+
default: t(() => [
|
|
121
|
+
e(r, { prop: "costPrice" }, {
|
|
122
|
+
default: t(() => [
|
|
123
|
+
e(d, {
|
|
124
|
+
effect: "dark",
|
|
125
|
+
content: o.$t("goodsSpu.costPrice"),
|
|
126
|
+
placement: "top-start"
|
|
127
|
+
}, {
|
|
128
|
+
default: t(() => [
|
|
129
|
+
e(p, {
|
|
130
|
+
modelValue: l.costPrice,
|
|
131
|
+
"onUpdate:modelValue": n[1] || (n[1] = (s) => l.costPrice = s),
|
|
132
|
+
precision: 2,
|
|
133
|
+
step: 0.01,
|
|
134
|
+
max: l.salePrice,
|
|
135
|
+
placeholder: o.$t("goodsSpu.costPrice"),
|
|
136
|
+
class: "w-full",
|
|
137
|
+
"controls-position": "right"
|
|
138
|
+
}, null, 8, ["modelValue", "max", "placeholder"])
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
}, 8, ["content"])
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
})
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}),
|
|
148
|
+
e(a, { span: 6 }, {
|
|
149
|
+
default: t(() => [
|
|
150
|
+
e(r, { prop: "marketPrice" }, {
|
|
151
|
+
default: t(() => [
|
|
152
|
+
e(d, {
|
|
153
|
+
effect: "dark",
|
|
154
|
+
content: o.$t("goodsSpu.marketPrice"),
|
|
155
|
+
placement: "top-start"
|
|
156
|
+
}, {
|
|
157
|
+
default: t(() => [
|
|
158
|
+
e(p, {
|
|
159
|
+
modelValue: l.marketPrice,
|
|
160
|
+
"onUpdate:modelValue": n[2] || (n[2] = (s) => l.marketPrice = s),
|
|
161
|
+
precision: 2,
|
|
162
|
+
step: 0.01,
|
|
163
|
+
min: l.salePrice,
|
|
164
|
+
placeholder: o.$t("goodsSpu.marketPrice"),
|
|
165
|
+
class: "w-full",
|
|
166
|
+
"controls-position": "right"
|
|
167
|
+
}, null, 8, ["modelValue", "min", "placeholder"])
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["content"])
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
})
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
}),
|
|
177
|
+
((_ = o.goodsSpecModel) == null ? void 0 : _.isPointsDeduct) === !0 ? (m(), c(a, {
|
|
178
|
+
key: 0,
|
|
179
|
+
span: 6
|
|
180
|
+
}, {
|
|
181
|
+
default: t(() => [
|
|
182
|
+
e(r, { prop: "pointsDeduct" }, {
|
|
183
|
+
default: t(() => [
|
|
184
|
+
e(d, {
|
|
185
|
+
effect: "dark",
|
|
186
|
+
content: o.$t("goodsSpu.pointsDeduct"),
|
|
187
|
+
placement: "top-start"
|
|
188
|
+
}, {
|
|
189
|
+
default: t(() => [
|
|
190
|
+
e(p, {
|
|
191
|
+
modelValue: l.pointsDeduct,
|
|
192
|
+
"onUpdate:modelValue": n[3] || (n[3] = (s) => l.pointsDeduct = s),
|
|
193
|
+
precision: 0,
|
|
194
|
+
step: 1,
|
|
195
|
+
min: 0,
|
|
196
|
+
placeholder: o.$t("goodsSpu.pointsDeduct"),
|
|
197
|
+
class: "w-full",
|
|
198
|
+
"controls-position": "right"
|
|
199
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["content"])
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
})
|
|
206
|
+
]),
|
|
207
|
+
_: 1
|
|
208
|
+
})) : f("", !0),
|
|
209
|
+
((S = o.goodsSpecModel) == null ? void 0 : S.presaleType) === A(h).GOODS_PRESALE_TYPE_VALUES.DEPOSIT ? (m(), c(a, {
|
|
210
|
+
key: 1,
|
|
211
|
+
span: 6
|
|
212
|
+
}, {
|
|
213
|
+
default: t(() => [
|
|
214
|
+
e(r, { prop: "earnestAmount" }, {
|
|
215
|
+
default: t(() => [
|
|
216
|
+
e(d, {
|
|
217
|
+
effect: "dark",
|
|
218
|
+
content: o.$t("goodsSpu.earnestAmount"),
|
|
219
|
+
placement: "top-start"
|
|
220
|
+
}, {
|
|
221
|
+
default: t(() => [
|
|
222
|
+
e(p, {
|
|
223
|
+
modelValue: l.earnestAmount,
|
|
224
|
+
"onUpdate:modelValue": n[4] || (n[4] = (s) => l.earnestAmount = s),
|
|
225
|
+
precision: 2,
|
|
226
|
+
step: 0.01,
|
|
227
|
+
min: 0.01,
|
|
228
|
+
placeholder: o.$t("goodsSpu.earnestAmount"),
|
|
229
|
+
class: "w-full",
|
|
230
|
+
"controls-position": "right"
|
|
231
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
}, 8, ["content"])
|
|
235
|
+
]),
|
|
236
|
+
_: 1
|
|
237
|
+
})
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
})) : f("", !0),
|
|
241
|
+
((P = o.goodsSpecModel) == null ? void 0 : P.presaleType) === A(h).GOODS_PRESALE_TYPE_VALUES.DEPOSIT_RETURN ? (m(), c(a, {
|
|
242
|
+
key: 2,
|
|
243
|
+
span: 6
|
|
244
|
+
}, {
|
|
245
|
+
default: t(() => [
|
|
246
|
+
e(r, { prop: "depositAmount" }, {
|
|
247
|
+
default: t(() => [
|
|
248
|
+
e(d, {
|
|
249
|
+
effect: "dark",
|
|
250
|
+
content: o.$t("goodsSpu.depositAmount"),
|
|
251
|
+
placement: "top-start"
|
|
252
|
+
}, {
|
|
253
|
+
default: t(() => [
|
|
254
|
+
e(p, {
|
|
255
|
+
modelValue: l.depositAmount,
|
|
256
|
+
"onUpdate:modelValue": n[5] || (n[5] = (s) => l.depositAmount = s),
|
|
257
|
+
precision: 2,
|
|
258
|
+
step: 0.01,
|
|
259
|
+
min: 0.01,
|
|
260
|
+
placeholder: o.$t("goodsSpu.depositAmount"),
|
|
261
|
+
class: "w-full",
|
|
262
|
+
"controls-position": "right"
|
|
263
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["content"])
|
|
267
|
+
]),
|
|
268
|
+
_: 1
|
|
269
|
+
})
|
|
270
|
+
]),
|
|
271
|
+
_: 1
|
|
272
|
+
})) : f("", !0),
|
|
273
|
+
e(a, { span: 6 }, {
|
|
274
|
+
default: t(() => [
|
|
275
|
+
e(r, { prop: "stock" }, {
|
|
276
|
+
default: t(() => [
|
|
277
|
+
e(d, {
|
|
278
|
+
effect: "dark",
|
|
279
|
+
content: o.$t("goodsSpu.stock"),
|
|
280
|
+
placement: "top-start"
|
|
281
|
+
}, {
|
|
282
|
+
default: t(() => [
|
|
283
|
+
e(p, {
|
|
284
|
+
modelValue: l.stock,
|
|
285
|
+
"onUpdate:modelValue": n[6] || (n[6] = (s) => l.stock = s),
|
|
286
|
+
precision: 0,
|
|
287
|
+
step: 1,
|
|
288
|
+
min: 0,
|
|
289
|
+
placeholder: o.$t("goodsSpu.stock"),
|
|
290
|
+
class: "w-full",
|
|
291
|
+
"controls-position": "right"
|
|
292
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
293
|
+
]),
|
|
294
|
+
_: 1
|
|
295
|
+
}, 8, ["content"])
|
|
296
|
+
]),
|
|
297
|
+
_: 1
|
|
298
|
+
})
|
|
299
|
+
]),
|
|
300
|
+
_: 1
|
|
301
|
+
}),
|
|
302
|
+
e(a, { span: 6 }, {
|
|
303
|
+
default: t(() => [
|
|
304
|
+
e(r, null, {
|
|
305
|
+
default: t(() => [
|
|
306
|
+
e(q, {
|
|
307
|
+
type: "primary",
|
|
308
|
+
onClick: w
|
|
309
|
+
}, {
|
|
310
|
+
default: t(() => [
|
|
311
|
+
V(O(o.$t("goodsSpu.batchSetting")), 1)
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
})
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
})
|
|
318
|
+
]),
|
|
319
|
+
_: 1
|
|
320
|
+
})
|
|
321
|
+
];
|
|
322
|
+
}),
|
|
323
|
+
_: 1
|
|
324
|
+
})
|
|
325
|
+
]),
|
|
326
|
+
_: 1
|
|
327
|
+
}, 8, ["model", "rules"]);
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}), j = /* @__PURE__ */ B(I, [["__scopeId", "data-v-7ad0149d"]]);
|
|
331
|
+
export {
|
|
332
|
+
j as default
|
|
333
|
+
};
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { defineComponent as O, mergeModels as F, ref as x, reactive as w, useModel as z, resolveComponent as i, createBlock as C, openBlock as _, withCtx as l, createVNode as r, unref as d, createElementVNode as V, createTextVNode as u, toDisplayString as y, createElementBlock as H, Fragment as J, renderList as Q } from "vue";
|
|
2
|
+
import { ElMessage as W } from "element-plus";
|
|
3
|
+
import { useI18n as X } from "vue-i18n";
|
|
4
|
+
import { useRouter as Y } from "vue-router";
|
|
5
|
+
import "jmash-core";
|
|
6
|
+
import { Dict as $, channelProfitApi as R } from "xyvcard-channel";
|
|
7
|
+
import { a as Z } from "./index-xQgC-8Gd.mjs";
|
|
8
|
+
const ee = { style: { display: "flex", gap: "30px" } }, oe = { style: { display: "flex", gap: "30px" } }, te = { class: "dialog-footer" }, pe = /* @__PURE__ */ O({
|
|
9
|
+
__name: "ChannelProfit",
|
|
10
|
+
props: /* @__PURE__ */ F({
|
|
11
|
+
entityKey: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
modelValue: { type: Boolean },
|
|
18
|
+
modelModifiers: {}
|
|
19
|
+
}),
|
|
20
|
+
emits: /* @__PURE__ */ F(["refresh"], ["update:modelValue"]),
|
|
21
|
+
setup(b, { emit: k }) {
|
|
22
|
+
const { t: f } = X(), v = Y();
|
|
23
|
+
$.channelListBizDict.useValues();
|
|
24
|
+
const I = x();
|
|
25
|
+
let t = w({
|
|
26
|
+
requestId: Math.random() * 10 + ""
|
|
27
|
+
});
|
|
28
|
+
const T = w({
|
|
29
|
+
channelId: [
|
|
30
|
+
{
|
|
31
|
+
required: !0,
|
|
32
|
+
message: f("goodsSpu.channelIdRequired"),
|
|
33
|
+
trigger: "change"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
profitId: [
|
|
37
|
+
{
|
|
38
|
+
required: !0,
|
|
39
|
+
message: f("goodsSpu.profitIdRequired"),
|
|
40
|
+
trigger: "change"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
profitFirst: [
|
|
44
|
+
{
|
|
45
|
+
required: !0,
|
|
46
|
+
message: f("goodsSpu.profitFirstRequired"),
|
|
47
|
+
trigger: "change"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
profitSecond: [
|
|
51
|
+
{
|
|
52
|
+
required: !0,
|
|
53
|
+
message: f("goodsSpu.profitSecondRequired"),
|
|
54
|
+
trigger: "change"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
profitThird: [
|
|
58
|
+
{
|
|
59
|
+
required: !0,
|
|
60
|
+
message: f("goodsSpu.profitThirdRequired"),
|
|
61
|
+
trigger: "change"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}), m = z(b, "modelValue"), P = b, B = k, A = async () => {
|
|
65
|
+
var o;
|
|
66
|
+
await ((o = I.value) == null ? void 0 : o.validate((e) => {
|
|
67
|
+
e && (t.spuIds = P.entityKey.spuIds, Z.createGoodsSpuProfit(t).then((s) => {
|
|
68
|
+
console.log(s), s.status === 200 && (W({
|
|
69
|
+
message: f("common.submitSuccess"),
|
|
70
|
+
type: "success"
|
|
71
|
+
}), m.value && (m.value = !1), B("refresh", s.status === 200));
|
|
72
|
+
}));
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
function h() {
|
|
76
|
+
m.value && (m.value = !1);
|
|
77
|
+
}
|
|
78
|
+
let g = [];
|
|
79
|
+
async function D(o) {
|
|
80
|
+
if (!o) {
|
|
81
|
+
t.profitId = "", t.profitFirst = "", t.profitSecond = "", t.profitThird = "";
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
g = [], await q(o);
|
|
85
|
+
}
|
|
86
|
+
async function q(o, e = 1, s = 20) {
|
|
87
|
+
try {
|
|
88
|
+
const n = await R.findPage({
|
|
89
|
+
curPage: e,
|
|
90
|
+
pageSize: s,
|
|
91
|
+
channelId: o
|
|
92
|
+
});
|
|
93
|
+
n.data.results.forEach((p) => {
|
|
94
|
+
g.push({
|
|
95
|
+
key: p.profitId,
|
|
96
|
+
value: p.profitName
|
|
97
|
+
});
|
|
98
|
+
}), n.data.results.length === s && await q(o, e + 1, s);
|
|
99
|
+
} catch (n) {
|
|
100
|
+
console.error("获取分页数据失败:", n);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function U(o) {
|
|
104
|
+
if (!o) {
|
|
105
|
+
t.profitFirst = "", t.profitSecond = "", t.profitThird = "";
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
R.findById({ profitId: o }).then((e) => {
|
|
109
|
+
t.profitFirst = e.data.profitFirst, t.profitSecond = e.data.profitSecond, t.profitThird = e.data.profitThird;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function M() {
|
|
113
|
+
h(), v.push({ path: "/channel/channel-info" });
|
|
114
|
+
}
|
|
115
|
+
function E() {
|
|
116
|
+
h(), v.push({ path: "/channel/channel-profit" });
|
|
117
|
+
}
|
|
118
|
+
return (o, e) => {
|
|
119
|
+
const s = i("jmash-select"), n = i("el-form-item"), p = i("el-button"), c = i("el-col"), N = i("el-option"), j = i("el-select"), S = i("el-input"), L = i("el-row"), K = i("el-form"), G = i("el-dialog");
|
|
120
|
+
return _(), C(G, {
|
|
121
|
+
modelValue: m.value,
|
|
122
|
+
"onUpdate:modelValue": e[7] || (e[7] = (a) => m.value = a),
|
|
123
|
+
onClose: h
|
|
124
|
+
}, {
|
|
125
|
+
footer: l(() => [
|
|
126
|
+
V("div", te, [
|
|
127
|
+
r(p, { onClick: h }, {
|
|
128
|
+
default: l(() => [
|
|
129
|
+
u(y(o.$t("common.cancel")), 1)
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
}),
|
|
133
|
+
r(p, {
|
|
134
|
+
type: "primary",
|
|
135
|
+
onClick: A
|
|
136
|
+
}, {
|
|
137
|
+
default: l(() => [
|
|
138
|
+
u(y(o.$t("common.save")), 1)
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
})
|
|
142
|
+
])
|
|
143
|
+
]),
|
|
144
|
+
default: l(() => [
|
|
145
|
+
r(K, {
|
|
146
|
+
ref_key: "channelProfitFormRef",
|
|
147
|
+
ref: I,
|
|
148
|
+
model: d(t),
|
|
149
|
+
"label-width": "120px",
|
|
150
|
+
rules: T
|
|
151
|
+
}, {
|
|
152
|
+
default: l(() => [
|
|
153
|
+
r(L, null, {
|
|
154
|
+
default: l(() => [
|
|
155
|
+
r(c, { span: 24 }, {
|
|
156
|
+
default: l(() => [
|
|
157
|
+
V("div", ee, [
|
|
158
|
+
r(n, {
|
|
159
|
+
label: o.$t("goodsSpu.channelId"),
|
|
160
|
+
prop: "channelId",
|
|
161
|
+
style: { width: "100%" }
|
|
162
|
+
}, {
|
|
163
|
+
default: l(() => [
|
|
164
|
+
r(s, {
|
|
165
|
+
class: "w-full",
|
|
166
|
+
modelValue: d(t).channelId,
|
|
167
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => d(t).channelId = a),
|
|
168
|
+
data: d($).channelListBizDict.values,
|
|
169
|
+
placeholder: o.$t("goodsSpu.channelIdRequired"),
|
|
170
|
+
clearable: "",
|
|
171
|
+
onChange: e[1] || (e[1] = (a) => D(a))
|
|
172
|
+
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
}, 8, ["label"]),
|
|
176
|
+
r(p, {
|
|
177
|
+
style: { width: "130px" },
|
|
178
|
+
type: "primary",
|
|
179
|
+
onClick: M
|
|
180
|
+
}, {
|
|
181
|
+
default: l(() => [
|
|
182
|
+
u(y(o.$t("goodsSpu.addChannel")), 1)
|
|
183
|
+
]),
|
|
184
|
+
_: 1
|
|
185
|
+
})
|
|
186
|
+
])
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}),
|
|
190
|
+
r(c, { span: 24 }, {
|
|
191
|
+
default: l(() => [
|
|
192
|
+
V("div", oe, [
|
|
193
|
+
r(n, {
|
|
194
|
+
label: o.$t("goodsSpu.profitId"),
|
|
195
|
+
prop: "profitId",
|
|
196
|
+
style: { width: "100%" }
|
|
197
|
+
}, {
|
|
198
|
+
default: l(() => [
|
|
199
|
+
r(j, {
|
|
200
|
+
class: "w-full",
|
|
201
|
+
modelValue: d(t).profitId,
|
|
202
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => d(t).profitId = a),
|
|
203
|
+
placeholder: o.$t("goodsSpu.profitIdRequired"),
|
|
204
|
+
data: d(g),
|
|
205
|
+
clearable: "",
|
|
206
|
+
onChange: e[3] || (e[3] = (a) => U(a))
|
|
207
|
+
}, {
|
|
208
|
+
default: l(() => [
|
|
209
|
+
(_(!0), H(J, null, Q(d(g), (a) => (_(), C(N, {
|
|
210
|
+
key: a.key,
|
|
211
|
+
label: a.value,
|
|
212
|
+
value: a.key
|
|
213
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}, 8, ["modelValue", "placeholder", "data"])
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}, 8, ["label"]),
|
|
220
|
+
r(p, {
|
|
221
|
+
style: { width: "130px" },
|
|
222
|
+
type: "primary",
|
|
223
|
+
onClick: E
|
|
224
|
+
}, {
|
|
225
|
+
default: l(() => [
|
|
226
|
+
u(y(o.$t("goodsSpu.addProfit")), 1)
|
|
227
|
+
]),
|
|
228
|
+
_: 1
|
|
229
|
+
})
|
|
230
|
+
])
|
|
231
|
+
]),
|
|
232
|
+
_: 1
|
|
233
|
+
}),
|
|
234
|
+
r(c, { span: 20 }, {
|
|
235
|
+
default: l(() => [
|
|
236
|
+
r(n, {
|
|
237
|
+
label: o.$t("goodsSpu.profitFirst"),
|
|
238
|
+
prop: "profitFirst"
|
|
239
|
+
}, {
|
|
240
|
+
default: l(() => [
|
|
241
|
+
r(S, {
|
|
242
|
+
modelValue: d(t).profitFirst,
|
|
243
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => d(t).profitFirst = a),
|
|
244
|
+
readonly: "",
|
|
245
|
+
placeholder: o.$t("goodsSpu.profitFirstRequired")
|
|
246
|
+
}, {
|
|
247
|
+
suffix: l(() => e[8] || (e[8] = [
|
|
248
|
+
u("%", -1)
|
|
249
|
+
])),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 8, ["modelValue", "placeholder"])
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
}, 8, ["label"])
|
|
255
|
+
]),
|
|
256
|
+
_: 1
|
|
257
|
+
}),
|
|
258
|
+
r(c, { span: 20 }, {
|
|
259
|
+
default: l(() => [
|
|
260
|
+
r(n, {
|
|
261
|
+
label: o.$t("goodsSpu.profitSecond"),
|
|
262
|
+
prop: "profitSecond"
|
|
263
|
+
}, {
|
|
264
|
+
default: l(() => [
|
|
265
|
+
r(S, {
|
|
266
|
+
modelValue: d(t).profitSecond,
|
|
267
|
+
"onUpdate:modelValue": e[5] || (e[5] = (a) => d(t).profitSecond = a),
|
|
268
|
+
readonly: "",
|
|
269
|
+
placeholder: o.$t("goodsSpu.profitSecondRequired")
|
|
270
|
+
}, {
|
|
271
|
+
suffix: l(() => e[9] || (e[9] = [
|
|
272
|
+
u("%", -1)
|
|
273
|
+
])),
|
|
274
|
+
_: 1
|
|
275
|
+
}, 8, ["modelValue", "placeholder"])
|
|
276
|
+
]),
|
|
277
|
+
_: 1
|
|
278
|
+
}, 8, ["label"])
|
|
279
|
+
]),
|
|
280
|
+
_: 1
|
|
281
|
+
}),
|
|
282
|
+
r(c, { span: 20 }, {
|
|
283
|
+
default: l(() => [
|
|
284
|
+
r(n, {
|
|
285
|
+
label: o.$t("goodsSpu.profitThird"),
|
|
286
|
+
prop: "profitThird"
|
|
287
|
+
}, {
|
|
288
|
+
default: l(() => [
|
|
289
|
+
r(S, {
|
|
290
|
+
modelValue: d(t).profitThird,
|
|
291
|
+
"onUpdate:modelValue": e[6] || (e[6] = (a) => d(t).profitThird = a),
|
|
292
|
+
readonly: "",
|
|
293
|
+
placeholder: o.$t("goodsSpu.profitThirdRequired")
|
|
294
|
+
}, {
|
|
295
|
+
suffix: l(() => e[10] || (e[10] = [
|
|
296
|
+
u("%", -1)
|
|
297
|
+
])),
|
|
298
|
+
_: 1
|
|
299
|
+
}, 8, ["modelValue", "placeholder"])
|
|
300
|
+
]),
|
|
301
|
+
_: 1
|
|
302
|
+
}, 8, ["label"])
|
|
303
|
+
]),
|
|
304
|
+
_: 1
|
|
305
|
+
})
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
})
|
|
309
|
+
]),
|
|
310
|
+
_: 1
|
|
311
|
+
}, 8, ["model", "rules"])
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
}, 8, ["modelValue"]);
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
export {
|
|
319
|
+
pe as _
|
|
320
|
+
};
|