jgy-public-component 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.
- package/README.md +42 -0
- package/dist/components/JProductDetail/JProductDetailDialog.d.ts +41 -0
- package/dist/components/JProductDetail/JSkuLink.d.ts +36 -0
- package/dist/components/JProductDetail/index.d.ts +4 -0
- package/dist/components/JProductDetail/types.d.ts +38 -0
- package/dist/components/JProductDetail/useProductDetailDialog.d.ts +16 -0
- package/dist/components/JSearchInputDialog/JSearchInputDialog.d.ts +112 -0
- package/dist/components/JSearchInputDialog/index.d.ts +2 -0
- package/dist/components/JSearchInputDialog/types.d.ts +33 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +1979 -634
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElImage as
|
|
3
|
-
import { Delete as
|
|
4
|
-
import
|
|
5
|
-
import { Icon as
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as ee, openBlock as u, createElementBlock as b, normalizeClass as ue, createCommentVNode as B, renderSlot as te, ref as q, watch as be, createVNode as n, unref as t, withCtx as a, createElementVNode as S, withModifiers as ge, createBlock as C, Fragment as P, toDisplayString as m, mergeProps as yt, computed as j, onMounted as bt, onBeforeUnmount as kt, normalizeStyle as ce, createTextVNode as p, useModel as Se, renderList as G, mergeModels as ye, resolveComponent as de, createSlots as wt, withDirectives as xt, withKeys as $t } from "vue";
|
|
2
|
+
import { ElImage as se, ElIcon as ie, ElUpload as Ce, ElImageViewer as St, ElMessage as H, ElCard as We, ElForm as Ct, ElButton as le, ElDialog as Ke, ElDivider as jt, ElLink as At, ElRow as Le, ElCol as pe, ElTable as ne, ElTableColumn as T, ElSubMenu as It, ElMenuItem as Xe, ElMenu as Ge, ElDropdown as Dt, ElDropdownMenu as Et, ElDropdownItem as Pe, vLoading as qe, ElDescriptions as oe, ElDescriptionsItem as w, ElTag as _e, ElEmpty as Tt } from "element-plus";
|
|
3
|
+
import { Delete as je, Plus as Ae, Loading as Fe, ZoomIn as Mt, Search as Rt, Refresh as Bt, ArrowDown as Ze, Memo as Vt } from "@element-plus/icons-vue";
|
|
4
|
+
import zt from "vuedraggable";
|
|
5
|
+
import { Icon as Jt } from "@iconify/vue";
|
|
6
|
+
import * as re from "xlsx";
|
|
7
|
+
import Ie from "nprogress";
|
|
8
|
+
const Lt = ["disabled"], Pt = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "j-button__loading-icon"
|
|
11
|
-
},
|
|
11
|
+
}, qt = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "j-button__text"
|
|
14
|
-
},
|
|
14
|
+
}, Ft = /* @__PURE__ */ ee({
|
|
15
15
|
__name: "JButton",
|
|
16
16
|
props: {
|
|
17
17
|
type: { default: "default" },
|
|
@@ -22,13 +22,13 @@ const We = ["disabled"], qe = {
|
|
|
22
22
|
loading: { type: Boolean, default: !1 }
|
|
23
23
|
},
|
|
24
24
|
emits: ["click"],
|
|
25
|
-
setup(e, { emit:
|
|
26
|
-
const
|
|
27
|
-
function
|
|
28
|
-
!
|
|
25
|
+
setup(e, { emit: h }) {
|
|
26
|
+
const s = e, o = h;
|
|
27
|
+
function r(f) {
|
|
28
|
+
!s.disabled && !s.loading && o("click", f);
|
|
29
29
|
}
|
|
30
|
-
return (
|
|
31
|
-
class:
|
|
30
|
+
return (f, v) => (u(), b("button", {
|
|
31
|
+
class: ue(["j-button", [
|
|
32
32
|
`j-button--${e.type}`,
|
|
33
33
|
`j-button--${e.size}`,
|
|
34
34
|
{
|
|
@@ -39,29 +39,29 @@ const We = ["disabled"], qe = {
|
|
|
39
39
|
}
|
|
40
40
|
]]),
|
|
41
41
|
disabled: e.disabled || e.loading,
|
|
42
|
-
onClick:
|
|
42
|
+
onClick: r
|
|
43
43
|
}, [
|
|
44
|
-
e.loading ? (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
])) :
|
|
48
|
-
], 10,
|
|
44
|
+
e.loading ? (u(), b("span", Pt)) : B("", !0),
|
|
45
|
+
f.$slots.default ? (u(), b("span", qt, [
|
|
46
|
+
te(f.$slots, "default", {}, void 0, !0)
|
|
47
|
+
])) : B("", !0)
|
|
48
|
+
], 10, Lt));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
51
|
-
const
|
|
52
|
-
for (const [
|
|
53
|
-
|
|
54
|
-
return
|
|
55
|
-
},
|
|
50
|
+
}), ae = (e, h) => {
|
|
51
|
+
const s = e.__vccOpts || e;
|
|
52
|
+
for (const [o, r] of h)
|
|
53
|
+
s[o] = r;
|
|
54
|
+
return s;
|
|
55
|
+
}, Ot = /* @__PURE__ */ ae(Ft, [["__scopeId", "data-v-22864824"]]), Nt = { class: "j-upload-img-container" }, Ut = {
|
|
56
56
|
key: 0,
|
|
57
57
|
class: "images-wrapper"
|
|
58
|
-
},
|
|
58
|
+
}, Ht = { class: "image-item" }, Wt = ["onClick"], Kt = {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "image-item single-image-item"
|
|
61
|
-
},
|
|
61
|
+
}, Xt = { class: "image-actions" }, Gt = {
|
|
62
62
|
key: 2,
|
|
63
63
|
class: "upload-tip"
|
|
64
|
-
},
|
|
64
|
+
}, Zt = { key: 0 }, Qt = /* @__PURE__ */ ee({
|
|
65
65
|
name: "JUploadImg",
|
|
66
66
|
__name: "JUploadImg",
|
|
67
67
|
props: {
|
|
@@ -76,185 +76,185 @@ const We = ["disabled"], qe = {
|
|
|
76
76
|
uploadFn: { type: Function, default: void 0 }
|
|
77
77
|
},
|
|
78
78
|
emits: ["update:modelValue", "success", "error"],
|
|
79
|
-
setup(e, { emit:
|
|
80
|
-
const
|
|
81
|
-
|
|
79
|
+
setup(e, { emit: h }) {
|
|
80
|
+
const s = e, o = h, r = q(""), f = q(!1), v = s.showTip, k = () => {
|
|
81
|
+
f.value = !0;
|
|
82
82
|
}, c = () => {
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
uid: Date.now() +
|
|
87
|
-
url:
|
|
83
|
+
r.value = "", o("update:modelValue", ""), H.success("删除成功");
|
|
84
|
+
}, $ = q([]), I = q(!1), N = (F) => {
|
|
85
|
+
$.value = F.map((R, _) => ({
|
|
86
|
+
uid: Date.now() + _,
|
|
87
|
+
url: R
|
|
88
88
|
}));
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
be(() => s.modelValue, (F) => {
|
|
91
|
+
s.multiple ? Array.isArray(F) && F.length > 0 ? N(F) : $.value = [] : typeof F == "string" ? r.value = F : r.value = "";
|
|
92
92
|
}, { immediate: !0 });
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
100
|
-
|
|
93
|
+
const V = () => {
|
|
94
|
+
W();
|
|
95
|
+
}, M = (F) => {
|
|
96
|
+
$.value.splice(F, 1), W(), H.success("删除成功");
|
|
97
|
+
}, E = async (F) => {
|
|
98
|
+
const R = F.raw;
|
|
99
|
+
if (!R) {
|
|
100
|
+
H.error("文件不存在,请重试");
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
103
|
+
if (R.size > s.maxSize * 1024 * 1024) {
|
|
104
|
+
H.error(`图片大小不能超过 ${s.maxSize}MB`);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
if (!
|
|
108
|
-
|
|
107
|
+
if (!s.uploadFn) {
|
|
108
|
+
H.error("未配置上传函数 (uploadFn)");
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
try {
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
} catch (
|
|
116
|
-
console.error("上传出错:",
|
|
112
|
+
I.value = !0;
|
|
113
|
+
const _ = await s.uploadFn(R);
|
|
114
|
+
s.multiple ? ($.value.push({ uid: Date.now(), url: _ }), W()) : (r.value = _, o("update:modelValue", _)), o("success", _), H.success("上传成功");
|
|
115
|
+
} catch (_) {
|
|
116
|
+
console.error("上传出错:", _), H.error("上传失败,请重试"), o("error", _);
|
|
117
117
|
} finally {
|
|
118
|
-
|
|
118
|
+
I.value = !1;
|
|
119
119
|
}
|
|
120
|
-
},
|
|
121
|
-
const
|
|
122
|
-
|
|
120
|
+
}, W = () => {
|
|
121
|
+
const F = $.value.map((R) => R.url);
|
|
122
|
+
o("update:modelValue", F);
|
|
123
123
|
};
|
|
124
|
-
return (
|
|
125
|
-
e.multiple ? (
|
|
126
|
-
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue":
|
|
124
|
+
return (F, R) => (u(), b("div", Nt, [
|
|
125
|
+
e.multiple ? (u(), b("div", Ut, [
|
|
126
|
+
n(t(zt), {
|
|
127
|
+
modelValue: $.value,
|
|
128
|
+
"onUpdate:modelValue": R[0] || (R[0] = (_) => $.value = _),
|
|
129
129
|
class: "images-list",
|
|
130
130
|
"item-key": "uid",
|
|
131
131
|
animation: 200,
|
|
132
132
|
disabled: e.disabled,
|
|
133
|
-
onEnd:
|
|
133
|
+
onEnd: V
|
|
134
134
|
}, {
|
|
135
|
-
item:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
src:
|
|
139
|
-
"preview-src-list":
|
|
140
|
-
"initial-index":
|
|
135
|
+
item: a(({ element: _, index: D }) => [
|
|
136
|
+
S("div", Ht, [
|
|
137
|
+
n(t(se), {
|
|
138
|
+
src: _.url,
|
|
139
|
+
"preview-src-list": $.value.map((z) => z.url),
|
|
140
|
+
"initial-index": D,
|
|
141
141
|
fit: "cover",
|
|
142
142
|
class: "image-preview",
|
|
143
143
|
"preview-teleported": !0,
|
|
144
144
|
"hide-on-click-modal": !0
|
|
145
145
|
}, null, 8, ["src", "preview-src-list", "initial-index"]),
|
|
146
|
-
e.disabled ?
|
|
146
|
+
e.disabled ? B("", !0) : (u(), b("div", {
|
|
147
147
|
key: 0,
|
|
148
148
|
class: "delete-btn",
|
|
149
|
-
onClick:
|
|
149
|
+
onClick: ge((z) => M(D), ["stop"])
|
|
150
150
|
}, [
|
|
151
|
-
|
|
152
|
-
default:
|
|
153
|
-
|
|
151
|
+
n(t(ie), { class: "icon-delete" }, {
|
|
152
|
+
default: a(() => [
|
|
153
|
+
n(t(je))
|
|
154
154
|
]),
|
|
155
155
|
_: 1
|
|
156
156
|
})
|
|
157
|
-
], 8,
|
|
157
|
+
], 8, Wt))
|
|
158
158
|
])
|
|
159
159
|
]),
|
|
160
160
|
_: 1
|
|
161
161
|
}, 8, ["modelValue", "disabled"]),
|
|
162
|
-
!e.disabled && (!e.limit ||
|
|
162
|
+
!e.disabled && (!e.limit || $.value.length < e.limit) ? (u(), C(t(Ce), {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "image-uploader",
|
|
165
165
|
"auto-upload": !1,
|
|
166
166
|
"show-file-list": !1,
|
|
167
|
-
"on-change":
|
|
168
|
-
disabled:
|
|
167
|
+
"on-change": E,
|
|
168
|
+
disabled: I.value,
|
|
169
169
|
"list-type": "picture-card",
|
|
170
170
|
accept: e.accept
|
|
171
171
|
}, {
|
|
172
|
-
default:
|
|
173
|
-
|
|
172
|
+
default: a(() => [
|
|
173
|
+
I.value ? (u(), C(t(ie), {
|
|
174
174
|
key: 1,
|
|
175
175
|
class: "uploader-icon is-loading"
|
|
176
176
|
}, {
|
|
177
|
-
default:
|
|
178
|
-
|
|
177
|
+
default: a(() => [
|
|
178
|
+
n(t(Fe))
|
|
179
179
|
]),
|
|
180
180
|
_: 1
|
|
181
|
-
})) : (
|
|
181
|
+
})) : (u(), C(t(ie), {
|
|
182
182
|
key: 0,
|
|
183
183
|
class: "uploader-icon"
|
|
184
184
|
}, {
|
|
185
|
-
default:
|
|
186
|
-
|
|
185
|
+
default: a(() => [
|
|
186
|
+
n(t(Ae))
|
|
187
187
|
]),
|
|
188
188
|
_: 1
|
|
189
189
|
}))
|
|
190
190
|
]),
|
|
191
191
|
_: 1
|
|
192
|
-
}, 8, ["disabled", "accept"])) :
|
|
193
|
-
])) : (
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
src:
|
|
192
|
+
}, 8, ["disabled", "accept"])) : B("", !0)
|
|
193
|
+
])) : (u(), b(P, { key: 1 }, [
|
|
194
|
+
r.value ? (u(), b("div", Kt, [
|
|
195
|
+
n(t(se), {
|
|
196
|
+
src: r.value,
|
|
197
197
|
fit: "cover",
|
|
198
198
|
class: "image-preview"
|
|
199
199
|
}, null, 8, ["src"]),
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
S("div", Xt, [
|
|
201
|
+
n(t(ie), {
|
|
202
202
|
class: "action-icon",
|
|
203
|
-
onClick:
|
|
203
|
+
onClick: ge(k, ["stop"])
|
|
204
204
|
}, {
|
|
205
|
-
default:
|
|
206
|
-
|
|
205
|
+
default: a(() => [
|
|
206
|
+
n(t(Mt))
|
|
207
207
|
]),
|
|
208
208
|
_: 1
|
|
209
209
|
}),
|
|
210
|
-
e.disabled ?
|
|
210
|
+
e.disabled ? B("", !0) : (u(), C(t(ie), {
|
|
211
211
|
key: 0,
|
|
212
212
|
class: "action-icon",
|
|
213
|
-
onClick:
|
|
213
|
+
onClick: ge(c, ["stop"])
|
|
214
214
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
|
|
215
|
+
default: a(() => [
|
|
216
|
+
n(t(je))
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
219
219
|
}))
|
|
220
220
|
])
|
|
221
|
-
])) : (
|
|
221
|
+
])) : (u(), C(t(Ce), {
|
|
222
222
|
key: 1,
|
|
223
223
|
class: "image-uploader",
|
|
224
224
|
"auto-upload": !1,
|
|
225
225
|
"show-file-list": !1,
|
|
226
|
-
"on-change":
|
|
227
|
-
disabled: e.disabled ||
|
|
226
|
+
"on-change": E,
|
|
227
|
+
disabled: e.disabled || I.value,
|
|
228
228
|
accept: e.accept,
|
|
229
229
|
"list-type": "picture-card"
|
|
230
230
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
|
|
233
|
-
default:
|
|
234
|
-
|
|
231
|
+
default: a(() => [
|
|
232
|
+
n(t(ie), { class: "uploader-icon" }, {
|
|
233
|
+
default: a(() => [
|
|
234
|
+
I.value ? (u(), C(t(Fe), {
|
|
235
235
|
key: 1,
|
|
236
236
|
class: "is-loading"
|
|
237
|
-
})) : (
|
|
237
|
+
})) : (u(), C(t(Ae), { key: 0 }))
|
|
238
238
|
]),
|
|
239
239
|
_: 1
|
|
240
240
|
})
|
|
241
241
|
]),
|
|
242
242
|
_: 1
|
|
243
243
|
}, 8, ["disabled", "accept"])),
|
|
244
|
-
|
|
244
|
+
f.value ? (u(), C(t(St), {
|
|
245
245
|
key: 2,
|
|
246
|
-
"url-list": [
|
|
246
|
+
"url-list": [r.value],
|
|
247
247
|
teleported: !0,
|
|
248
|
-
onClose:
|
|
249
|
-
}, null, 8, ["url-list"])) :
|
|
248
|
+
onClose: R[1] || (R[1] = (_) => f.value = !1)
|
|
249
|
+
}, null, 8, ["url-list"])) : B("", !0)
|
|
250
250
|
], 64)),
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
e.multiple && e.limit ? (
|
|
254
|
-
])) :
|
|
251
|
+
t(v) ? (u(), b("div", Gt, [
|
|
252
|
+
S("span", null, m(e.tip), 1),
|
|
253
|
+
e.multiple && e.limit ? (u(), b("span", Zt, " (最多 " + m(e.limit) + " 张)", 1)) : B("", !0)
|
|
254
|
+
])) : B("", !0)
|
|
255
255
|
]));
|
|
256
256
|
}
|
|
257
|
-
}),
|
|
257
|
+
}), Yt = /* @__PURE__ */ ae(Qt, [["__scopeId", "data-v-7dc4f798"]]), ve = /* @__PURE__ */ ee({
|
|
258
258
|
name: "JIconRender",
|
|
259
259
|
__name: "JIconRender",
|
|
260
260
|
props: {
|
|
@@ -262,14 +262,14 @@ const We = ["disabled"], qe = {
|
|
|
262
262
|
size: { default: 24 }
|
|
263
263
|
},
|
|
264
264
|
setup(e) {
|
|
265
|
-
return (
|
|
265
|
+
return (h, s) => e.icon ? (u(), C(t(Jt), yt({
|
|
266
266
|
key: 0,
|
|
267
267
|
icon: e.icon,
|
|
268
268
|
width: e.size,
|
|
269
269
|
height: e.size
|
|
270
|
-
},
|
|
270
|
+
}, h.$attrs), null, 16, ["icon", "width", "height"])) : B("", !0);
|
|
271
271
|
}
|
|
272
|
-
}),
|
|
272
|
+
}), el = { class: "action-left" }, tl = /* @__PURE__ */ ee({
|
|
273
273
|
name: "JSearchHeader",
|
|
274
274
|
__name: "JSearchHeader",
|
|
275
275
|
props: {
|
|
@@ -282,142 +282,142 @@ const We = ["disabled"], qe = {
|
|
|
282
282
|
showReset: { type: Boolean, default: !0 }
|
|
283
283
|
},
|
|
284
284
|
emits: ["search", "reset", "add", "batchDelete"],
|
|
285
|
-
setup(e, { emit:
|
|
286
|
-
const
|
|
287
|
-
if (!
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
292
|
-
const
|
|
293
|
-
c.value =
|
|
285
|
+
setup(e, { emit: h }) {
|
|
286
|
+
const s = e, o = h, r = q(), f = q(!1), v = q(!1), k = q(0), c = q(0), $ = j(() => k.value > s.defaultVisible), I = () => {
|
|
287
|
+
if (!r.value) return;
|
|
288
|
+
const M = Array.from(r.value.children);
|
|
289
|
+
k.value = M.length;
|
|
290
|
+
const E = M[s.defaultVisible - 1];
|
|
291
|
+
if (E && r.value) {
|
|
292
|
+
const W = r.value.getBoundingClientRect(), F = E.getBoundingClientRect();
|
|
293
|
+
c.value = F.bottom - W.top;
|
|
294
294
|
}
|
|
295
|
-
},
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
298
|
-
if (
|
|
299
|
-
|
|
295
|
+
}, N = () => {
|
|
296
|
+
const M = r.value;
|
|
297
|
+
if (M)
|
|
298
|
+
if (f.value)
|
|
299
|
+
I(), f.value = !1, M.style.maxHeight = M.scrollHeight + "px", M.offsetHeight, M.style.maxHeight = c.value + "px";
|
|
300
300
|
else {
|
|
301
|
-
|
|
302
|
-
const
|
|
303
|
-
|
|
301
|
+
f.value = !0, M.style.maxHeight = M.scrollHeight + "px";
|
|
302
|
+
const E = () => {
|
|
303
|
+
M.style.maxHeight = "none", M.removeEventListener("transitionend", E);
|
|
304
304
|
};
|
|
305
|
-
|
|
305
|
+
M.addEventListener("transitionend", E);
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
|
-
let
|
|
309
|
-
return
|
|
310
|
-
|
|
308
|
+
let V = null;
|
|
309
|
+
return bt(() => {
|
|
310
|
+
I(), $.value && r.value && (r.value.style.maxHeight = c.value + "px"), requestAnimationFrame(() => {
|
|
311
311
|
requestAnimationFrame(() => {
|
|
312
|
-
|
|
312
|
+
v.value = !0;
|
|
313
313
|
});
|
|
314
|
-
}),
|
|
315
|
-
|
|
316
|
-
}),
|
|
317
|
-
}),
|
|
318
|
-
|
|
319
|
-
}), (
|
|
314
|
+
}), r.value && (V = new MutationObserver(() => {
|
|
315
|
+
I(), $.value && !f.value && r.value && (r.value.style.maxHeight = c.value + "px");
|
|
316
|
+
}), V.observe(r.value, { childList: !0 }));
|
|
317
|
+
}), kt(() => {
|
|
318
|
+
V == null || V.disconnect();
|
|
319
|
+
}), (M, E) => (u(), C(t(We), {
|
|
320
320
|
shadow: "never",
|
|
321
321
|
class: "j-search-header-card"
|
|
322
322
|
}, {
|
|
323
|
-
default:
|
|
324
|
-
|
|
323
|
+
default: a(() => [
|
|
324
|
+
n(t(Ct), {
|
|
325
325
|
inline: "",
|
|
326
326
|
class: "search-form"
|
|
327
327
|
}, {
|
|
328
|
-
default:
|
|
329
|
-
|
|
328
|
+
default: a(() => [
|
|
329
|
+
S("div", {
|
|
330
330
|
ref_key: "formItemsRef",
|
|
331
|
-
ref:
|
|
332
|
-
class:
|
|
331
|
+
ref: r,
|
|
332
|
+
class: ue(["form-items-wrapper", { "is-animated": v.value }])
|
|
333
333
|
}, [
|
|
334
|
-
|
|
334
|
+
te(M.$slots, "default", {}, void 0, !0)
|
|
335
335
|
], 2)
|
|
336
336
|
]),
|
|
337
337
|
_: 3
|
|
338
338
|
}),
|
|
339
|
-
|
|
339
|
+
S("div", {
|
|
340
340
|
class: "action-bar",
|
|
341
|
-
style:
|
|
341
|
+
style: ce({ marginTop: f.value ? "0px" : "10px" })
|
|
342
342
|
}, [
|
|
343
|
-
|
|
344
|
-
e.showAdd ? (
|
|
343
|
+
S("div", el, [
|
|
344
|
+
e.showAdd ? (u(), C(t(le), {
|
|
345
345
|
key: 0,
|
|
346
346
|
type: "primary",
|
|
347
|
-
icon:
|
|
348
|
-
onClick:
|
|
347
|
+
icon: t(Ae),
|
|
348
|
+
onClick: E[0] || (E[0] = (W) => o("add"))
|
|
349
349
|
}, {
|
|
350
|
-
default:
|
|
351
|
-
|
|
350
|
+
default: a(() => [
|
|
351
|
+
p(m(e.addText), 1)
|
|
352
352
|
]),
|
|
353
353
|
_: 1
|
|
354
|
-
}, 8, ["icon"])) :
|
|
355
|
-
e.showBatchDelete ? (
|
|
354
|
+
}, 8, ["icon"])) : B("", !0),
|
|
355
|
+
e.showBatchDelete ? (u(), C(t(le), {
|
|
356
356
|
key: 1,
|
|
357
357
|
type: "danger",
|
|
358
|
-
icon:
|
|
358
|
+
icon: t(je),
|
|
359
359
|
disabled: e.selectedCount === 0,
|
|
360
|
-
onClick:
|
|
360
|
+
onClick: E[1] || (E[1] = (W) => o("batchDelete"))
|
|
361
361
|
}, {
|
|
362
|
-
default:
|
|
363
|
-
|
|
362
|
+
default: a(() => [
|
|
363
|
+
p(" 批量删除" + m(e.selectedCount ? `(${e.selectedCount})` : ""), 1)
|
|
364
364
|
]),
|
|
365
365
|
_: 1
|
|
366
|
-
}, 8, ["icon", "disabled"])) :
|
|
367
|
-
e.showSearch ? (
|
|
366
|
+
}, 8, ["icon", "disabled"])) : B("", !0),
|
|
367
|
+
e.showSearch ? (u(), C(t(le), {
|
|
368
368
|
key: 2,
|
|
369
369
|
type: "primary",
|
|
370
|
-
icon:
|
|
371
|
-
onClick:
|
|
370
|
+
icon: t(Rt),
|
|
371
|
+
onClick: E[2] || (E[2] = (W) => o("search"))
|
|
372
372
|
}, {
|
|
373
|
-
default:
|
|
374
|
-
|
|
373
|
+
default: a(() => [...E[4] || (E[4] = [
|
|
374
|
+
p("搜索", -1)
|
|
375
375
|
])]),
|
|
376
376
|
_: 1
|
|
377
|
-
}, 8, ["icon"])) :
|
|
378
|
-
e.showReset ? (
|
|
377
|
+
}, 8, ["icon"])) : B("", !0),
|
|
378
|
+
e.showReset ? (u(), C(t(le), {
|
|
379
379
|
key: 3,
|
|
380
|
-
icon:
|
|
381
|
-
onClick:
|
|
380
|
+
icon: t(Bt),
|
|
381
|
+
onClick: E[3] || (E[3] = (W) => o("reset"))
|
|
382
382
|
}, {
|
|
383
|
-
default:
|
|
384
|
-
|
|
383
|
+
default: a(() => [...E[5] || (E[5] = [
|
|
384
|
+
p("重置", -1)
|
|
385
385
|
])]),
|
|
386
386
|
_: 1
|
|
387
|
-
}, 8, ["icon"])) :
|
|
388
|
-
|
|
387
|
+
}, 8, ["icon"])) : B("", !0),
|
|
388
|
+
te(M.$slots, "actions", {}, void 0, !0)
|
|
389
389
|
]),
|
|
390
|
-
|
|
390
|
+
$.value ? (u(), C(t(le), {
|
|
391
391
|
key: 0,
|
|
392
392
|
link: "",
|
|
393
393
|
type: "primary",
|
|
394
|
-
onClick:
|
|
394
|
+
onClick: N
|
|
395
395
|
}, {
|
|
396
|
-
default:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
class:
|
|
396
|
+
default: a(() => [
|
|
397
|
+
p(m(f.value ? "收起" : "展开") + " ", 1),
|
|
398
|
+
n(t(ie), {
|
|
399
|
+
class: ue(["toggle-icon", { "is-expanded": f.value }])
|
|
400
400
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
|
|
401
|
+
default: a(() => [
|
|
402
|
+
n(t(Ze))
|
|
403
403
|
]),
|
|
404
404
|
_: 1
|
|
405
405
|
}, 8, ["class"])
|
|
406
406
|
]),
|
|
407
407
|
_: 1
|
|
408
|
-
})) :
|
|
408
|
+
})) : B("", !0)
|
|
409
409
|
], 4)
|
|
410
410
|
]),
|
|
411
411
|
_: 3
|
|
412
412
|
}));
|
|
413
413
|
}
|
|
414
|
-
}),
|
|
414
|
+
}), ll = /* @__PURE__ */ ae(tl, [["__scopeId", "data-v-c1f4bf4c"]]), al = { class: "j-import-upload-row" }, nl = { class: "j-import-stat-num" }, sl = { class: "j-import-stat-num" }, il = { class: "j-import-stat-num" }, ol = {
|
|
415
415
|
key: 0,
|
|
416
416
|
class: "j-import-status-fail"
|
|
417
|
-
},
|
|
417
|
+
}, ul = { key: 1 }, rl = /* @__PURE__ */ ee({
|
|
418
418
|
name: "JImportExcel",
|
|
419
419
|
__name: "JImportExcel",
|
|
420
|
-
props: /* @__PURE__ */
|
|
420
|
+
props: /* @__PURE__ */ ye({
|
|
421
421
|
getFieldListApi: {},
|
|
422
422
|
importApi: {},
|
|
423
423
|
excludeFields: { default: () => ["id", "ctime", "mtime"] },
|
|
@@ -426,177 +426,177 @@ const We = ["disabled"], qe = {
|
|
|
426
426
|
modelValue: { type: Boolean, default: !1 },
|
|
427
427
|
modelModifiers: {}
|
|
428
428
|
}),
|
|
429
|
-
emits: /* @__PURE__ */
|
|
430
|
-
setup(e, { emit:
|
|
431
|
-
const
|
|
429
|
+
emits: /* @__PURE__ */ ye(["success"], ["update:modelValue"]),
|
|
430
|
+
setup(e, { emit: h }) {
|
|
431
|
+
const s = e, o = h, r = Se(e, "modelValue"), f = q(!1), v = q({}), k = q([]), c = q({ total: 0, success: 0, fail: 0 }), $ = {
|
|
432
432
|
0: "待创建",
|
|
433
433
|
1: "创建成功",
|
|
434
434
|
2: "创建中",
|
|
435
435
|
[-1]: "创建失败"
|
|
436
|
-
},
|
|
436
|
+
}, I = j(() => Object.entries(v.value).filter(([R]) => !s.excludeFields.includes(R)).map(([R, _]) => ({ id: R, label: _, prop: R }))), N = async () => {
|
|
437
437
|
try {
|
|
438
|
-
const
|
|
439
|
-
|
|
438
|
+
const R = await s.getFieldListApi();
|
|
439
|
+
v.value = R.data.tableFieldsInfo ?? {};
|
|
440
440
|
} catch {
|
|
441
|
-
|
|
441
|
+
H.error("获取字段列表失败");
|
|
442
442
|
}
|
|
443
|
-
},
|
|
444
|
-
const
|
|
445
|
-
if (!
|
|
443
|
+
}, V = (R) => {
|
|
444
|
+
const _ = R.raw;
|
|
445
|
+
if (!_) return;
|
|
446
446
|
if (![
|
|
447
447
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
448
448
|
"application/vnd.ms-excel"
|
|
449
|
-
].includes(
|
|
450
|
-
|
|
449
|
+
].includes(_.type) && !_.name.match(/\.xlsx?$/i)) {
|
|
450
|
+
H.warning("请上传 .xlsx 或 .xls 格式文件");
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
|
|
453
|
+
const z = new FileReader();
|
|
454
|
+
z.onload = (y) => {
|
|
455
455
|
try {
|
|
456
|
-
const
|
|
456
|
+
const K = re.read(y.target.result, { type: "binary" }), L = K.SheetNames[0], O = K.Sheets[L], x = re.utils.sheet_to_json(O, {
|
|
457
457
|
header: 1,
|
|
458
458
|
defval: ""
|
|
459
|
-
}).slice(1).filter((
|
|
460
|
-
if (!
|
|
461
|
-
|
|
459
|
+
}).slice(1).filter((Z) => Z.some((Q) => Q !== ""));
|
|
460
|
+
if (!x.length) {
|
|
461
|
+
H.warning("文件内容为空");
|
|
462
462
|
return;
|
|
463
463
|
}
|
|
464
|
-
const
|
|
465
|
-
const
|
|
466
|
-
return
|
|
467
|
-
|
|
468
|
-
}),
|
|
464
|
+
const J = x.map((Z) => {
|
|
465
|
+
const Q = { _status: 0, _error: "" };
|
|
466
|
+
return I.value.forEach((me, he) => {
|
|
467
|
+
Q[me.prop] = Z[he] !== void 0 ? Z[he] : "";
|
|
468
|
+
}), Q;
|
|
469
469
|
});
|
|
470
|
-
|
|
470
|
+
k.value = J, c.value = { total: J.length, success: 0, fail: 0 };
|
|
471
471
|
} catch {
|
|
472
|
-
|
|
472
|
+
H.error("解析文件失败,请检查文件格式");
|
|
473
473
|
}
|
|
474
|
-
},
|
|
475
|
-
},
|
|
476
|
-
|
|
477
|
-
},
|
|
478
|
-
const
|
|
479
|
-
if (!
|
|
480
|
-
|
|
474
|
+
}, z.readAsBinaryString(_);
|
|
475
|
+
}, M = (R) => {
|
|
476
|
+
k.value.splice(R, 1), c.value.total = k.value.length;
|
|
477
|
+
}, E = async () => {
|
|
478
|
+
const R = k.value.filter((_) => _._status === 0).map(({ _status: _, _error: D, ...z }) => z);
|
|
479
|
+
if (!R.length) {
|
|
480
|
+
H.warning("没有可导入的数据");
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
483
|
-
|
|
483
|
+
f.value = !0;
|
|
484
484
|
try {
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}), c.value.success =
|
|
485
|
+
const _ = await s.importApi(R);
|
|
486
|
+
_.code === 1 ? (k.value.forEach((D) => {
|
|
487
|
+
D._status === 0 && (D._status = 1);
|
|
488
|
+
}), c.value.success = k.value.filter((D) => D._status === 1).length, H.success("导入成功"), o("success")) : H.error(_.msg || "导入失败");
|
|
489
489
|
} catch {
|
|
490
|
-
|
|
490
|
+
H.error("导入失败,请重试");
|
|
491
491
|
} finally {
|
|
492
|
-
|
|
492
|
+
f.value = !1;
|
|
493
493
|
}
|
|
494
|
-
},
|
|
494
|
+
}, W = () => {
|
|
495
495
|
try {
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
|
|
496
|
+
const R = re.utils.book_new(), _ = I.value.map((y) => y.label), D = {};
|
|
497
|
+
_.forEach((y) => D[y] = "");
|
|
498
|
+
const z = re.utils.json_to_sheet([D]);
|
|
499
|
+
re.utils.book_append_sheet(R, z, "模板"), re.writeFile(R, "导入模板.xlsx");
|
|
500
500
|
} catch {
|
|
501
|
-
|
|
501
|
+
H.error("模板下载失败");
|
|
502
502
|
}
|
|
503
|
-
},
|
|
504
|
-
|
|
503
|
+
}, F = () => {
|
|
504
|
+
f.value || (r.value = !1, k.value = [], c.value = { total: 0, success: 0, fail: 0 });
|
|
505
505
|
};
|
|
506
|
-
return (
|
|
507
|
-
modelValue:
|
|
508
|
-
"onUpdate:modelValue":
|
|
509
|
-
title:
|
|
506
|
+
return (R, _) => (u(), C(t(Ke), {
|
|
507
|
+
modelValue: r.value,
|
|
508
|
+
"onUpdate:modelValue": _[0] || (_[0] = (D) => r.value = D),
|
|
509
|
+
title: s.title,
|
|
510
510
|
width: "900px",
|
|
511
511
|
"close-on-click-modal": !1,
|
|
512
|
-
onOpen:
|
|
513
|
-
onClose:
|
|
512
|
+
onOpen: N,
|
|
513
|
+
onClose: F
|
|
514
514
|
}, {
|
|
515
|
-
footer:
|
|
516
|
-
|
|
517
|
-
default:
|
|
518
|
-
|
|
515
|
+
footer: a(() => [
|
|
516
|
+
n(t(le), { onClick: F }, {
|
|
517
|
+
default: a(() => [..._[9] || (_[9] = [
|
|
518
|
+
p("关闭", -1)
|
|
519
519
|
])]),
|
|
520
520
|
_: 1
|
|
521
521
|
})
|
|
522
522
|
]),
|
|
523
|
-
default:
|
|
524
|
-
|
|
523
|
+
default: a(() => [
|
|
524
|
+
n(t(We), {
|
|
525
525
|
shadow: "never",
|
|
526
526
|
class: "j-import-upload-card"
|
|
527
527
|
}, {
|
|
528
|
-
default:
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
528
|
+
default: a(() => [
|
|
529
|
+
_[3] || (_[3] = S("div", { class: "j-import-upload-card-title" }, "导入 EXCEL", -1)),
|
|
530
|
+
n(t(jt), { style: { margin: "10px 0" } }),
|
|
531
|
+
S("div", al, [
|
|
532
|
+
n(t(Ce), {
|
|
533
533
|
accept: ".xlsx,.xls",
|
|
534
534
|
"auto-upload": !1,
|
|
535
535
|
"show-file-list": !1,
|
|
536
|
-
"on-change":
|
|
536
|
+
"on-change": V
|
|
537
537
|
}, {
|
|
538
|
-
default:
|
|
539
|
-
|
|
540
|
-
default:
|
|
541
|
-
|
|
538
|
+
default: a(() => [
|
|
539
|
+
n(t(le), { size: "small" }, {
|
|
540
|
+
default: a(() => [..._[1] || (_[1] = [
|
|
541
|
+
p("点击上传", -1)
|
|
542
542
|
])]),
|
|
543
543
|
_: 1
|
|
544
544
|
})
|
|
545
545
|
]),
|
|
546
546
|
_: 1
|
|
547
547
|
}),
|
|
548
|
-
|
|
548
|
+
I.value.length ? (u(), C(t(At), {
|
|
549
549
|
key: 0,
|
|
550
550
|
type: "primary",
|
|
551
551
|
class: "j-import-no-wrap",
|
|
552
|
-
onClick:
|
|
552
|
+
onClick: W
|
|
553
553
|
}, {
|
|
554
|
-
default:
|
|
555
|
-
|
|
554
|
+
default: a(() => [..._[2] || (_[2] = [
|
|
555
|
+
p(" 下载导入模板.xlsx ", -1)
|
|
556
556
|
])]),
|
|
557
557
|
_: 1
|
|
558
|
-
})) :
|
|
558
|
+
})) : B("", !0)
|
|
559
559
|
])
|
|
560
560
|
]),
|
|
561
561
|
_: 1
|
|
562
562
|
}),
|
|
563
|
-
|
|
563
|
+
n(t(Le), {
|
|
564
564
|
class: "j-import-stats-row",
|
|
565
565
|
gutter: 20,
|
|
566
566
|
align: "middle"
|
|
567
567
|
}, {
|
|
568
|
-
default:
|
|
569
|
-
|
|
570
|
-
default:
|
|
571
|
-
|
|
572
|
-
default:
|
|
573
|
-
|
|
568
|
+
default: a(() => [
|
|
569
|
+
n(t(pe), { span: 18 }, {
|
|
570
|
+
default: a(() => [
|
|
571
|
+
n(t(Le), { class: "j-import-stats-cols" }, {
|
|
572
|
+
default: a(() => [
|
|
573
|
+
n(t(pe), {
|
|
574
574
|
span: 4,
|
|
575
575
|
class: "j-import-stat-item"
|
|
576
576
|
}, {
|
|
577
|
-
default:
|
|
578
|
-
|
|
579
|
-
|
|
577
|
+
default: a(() => [
|
|
578
|
+
S("div", nl, m(c.value.total), 1),
|
|
579
|
+
_[4] || (_[4] = S("div", { class: "j-import-stat-label" }, "导入数量", -1))
|
|
580
580
|
]),
|
|
581
581
|
_: 1
|
|
582
582
|
}),
|
|
583
|
-
|
|
583
|
+
n(t(pe), {
|
|
584
584
|
span: 4,
|
|
585
585
|
class: "j-import-stat-item"
|
|
586
586
|
}, {
|
|
587
|
-
default:
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
default: a(() => [
|
|
588
|
+
S("div", sl, m(c.value.fail), 1),
|
|
589
|
+
_[5] || (_[5] = S("div", { class: "j-import-stat-label" }, "失败数量", -1))
|
|
590
590
|
]),
|
|
591
591
|
_: 1
|
|
592
592
|
}),
|
|
593
|
-
|
|
593
|
+
n(t(pe), {
|
|
594
594
|
span: 4,
|
|
595
595
|
class: "j-import-stat-item"
|
|
596
596
|
}, {
|
|
597
|
-
default:
|
|
598
|
-
|
|
599
|
-
|
|
597
|
+
default: a(() => [
|
|
598
|
+
S("div", il, m(c.value.success), 1),
|
|
599
|
+
_[6] || (_[6] = S("div", { class: "j-import-stat-label" }, "成功数量", -1))
|
|
600
600
|
]),
|
|
601
601
|
_: 1
|
|
602
602
|
})
|
|
@@ -606,20 +606,20 @@ const We = ["disabled"], qe = {
|
|
|
606
606
|
]),
|
|
607
607
|
_: 1
|
|
608
608
|
}),
|
|
609
|
-
|
|
609
|
+
n(t(pe), {
|
|
610
610
|
span: 6,
|
|
611
611
|
class: "j-import-confirm-col"
|
|
612
612
|
}, {
|
|
613
|
-
default:
|
|
614
|
-
|
|
613
|
+
default: a(() => [
|
|
614
|
+
n(t(le), {
|
|
615
615
|
type: "primary",
|
|
616
616
|
size: "small",
|
|
617
|
-
loading:
|
|
618
|
-
disabled: !
|
|
619
|
-
onClick:
|
|
617
|
+
loading: f.value,
|
|
618
|
+
disabled: !k.value.length,
|
|
619
|
+
onClick: E
|
|
620
620
|
}, {
|
|
621
|
-
default:
|
|
622
|
-
|
|
621
|
+
default: a(() => [..._[7] || (_[7] = [
|
|
622
|
+
p(" 确认导入 ", -1)
|
|
623
623
|
])]),
|
|
624
624
|
_: 1
|
|
625
625
|
}, 8, ["loading", "disabled"])
|
|
@@ -629,49 +629,49 @@ const We = ["disabled"], qe = {
|
|
|
629
629
|
]),
|
|
630
630
|
_: 1
|
|
631
631
|
}),
|
|
632
|
-
|
|
633
|
-
data:
|
|
632
|
+
n(t(ne), {
|
|
633
|
+
data: k.value,
|
|
634
634
|
border: "",
|
|
635
635
|
size: "small",
|
|
636
636
|
"max-height": "360",
|
|
637
637
|
class: "j-import-data-table"
|
|
638
638
|
}, {
|
|
639
|
-
default:
|
|
640
|
-
(
|
|
641
|
-
key:
|
|
642
|
-
prop:
|
|
643
|
-
label:
|
|
639
|
+
default: a(() => [
|
|
640
|
+
(u(!0), b(P, null, G(I.value, (D) => (u(), C(t(T), {
|
|
641
|
+
key: D.prop,
|
|
642
|
+
prop: D.prop,
|
|
643
|
+
label: D.label,
|
|
644
644
|
"min-width": 120,
|
|
645
645
|
"show-overflow-tooltip": ""
|
|
646
646
|
}, null, 8, ["prop", "label"]))), 128)),
|
|
647
|
-
|
|
647
|
+
n(t(T), {
|
|
648
648
|
label: "状态",
|
|
649
649
|
width: "110",
|
|
650
650
|
align: "center",
|
|
651
651
|
fixed: "right"
|
|
652
652
|
}, {
|
|
653
|
-
default:
|
|
654
|
-
|
|
653
|
+
default: a(({ row: D }) => [
|
|
654
|
+
D._status === -1 ? (u(), b("span", ol, m(D._error || "创建失败"), 1)) : (u(), b("span", ul, m($[D._status]), 1))
|
|
655
655
|
]),
|
|
656
656
|
_: 1
|
|
657
657
|
}),
|
|
658
|
-
|
|
658
|
+
n(t(T), {
|
|
659
659
|
label: "操作",
|
|
660
660
|
width: "80",
|
|
661
661
|
align: "center",
|
|
662
662
|
fixed: "right"
|
|
663
663
|
}, {
|
|
664
|
-
default:
|
|
665
|
-
|
|
664
|
+
default: a(({ $index: D, row: z }) => [
|
|
665
|
+
z._status === 0 ? (u(), C(t(le), {
|
|
666
666
|
key: 0,
|
|
667
667
|
size: "small",
|
|
668
|
-
onClick: (
|
|
668
|
+
onClick: (y) => M(D)
|
|
669
669
|
}, {
|
|
670
|
-
default:
|
|
671
|
-
|
|
670
|
+
default: a(() => [..._[8] || (_[8] = [
|
|
671
|
+
p(" 删除 ", -1)
|
|
672
672
|
])]),
|
|
673
673
|
_: 1
|
|
674
|
-
}, 8, ["onClick"])) :
|
|
674
|
+
}, 8, ["onClick"])) : B("", !0)
|
|
675
675
|
]),
|
|
676
676
|
_: 1
|
|
677
677
|
})
|
|
@@ -682,7 +682,7 @@ const We = ["disabled"], qe = {
|
|
|
682
682
|
_: 1
|
|
683
683
|
}, 8, ["modelValue", "title"]));
|
|
684
684
|
}
|
|
685
|
-
}),
|
|
685
|
+
}), dl = /* @__PURE__ */ ae(rl, [["__scopeId", "data-v-74dcefaa"]]), cl = { class: "j-sidebar__menu-item-title" }, ml = /* @__PURE__ */ ee({
|
|
686
686
|
name: "JSideMenuItem",
|
|
687
687
|
__name: "JSideMenuItem",
|
|
688
688
|
props: {
|
|
@@ -691,54 +691,54 @@ const We = ["disabled"], qe = {
|
|
|
691
691
|
depth: { default: 0 }
|
|
692
692
|
},
|
|
693
693
|
emits: ["menu-click"],
|
|
694
|
-
setup(e, { emit:
|
|
695
|
-
const
|
|
696
|
-
|
|
694
|
+
setup(e, { emit: h }) {
|
|
695
|
+
const s = e, o = h, r = () => {
|
|
696
|
+
o("menu-click", s.menuItem);
|
|
697
697
|
};
|
|
698
|
-
return (
|
|
699
|
-
const
|
|
700
|
-
return e.menuItem.children && e.menuItem.children.length > 0 ? (
|
|
698
|
+
return (f, v) => {
|
|
699
|
+
const k = de("JSideMenuItem", !0);
|
|
700
|
+
return e.menuItem.children && e.menuItem.children.length > 0 ? (u(), C(t(It), {
|
|
701
701
|
key: 0,
|
|
702
702
|
index: e.menuItem.path,
|
|
703
|
-
class:
|
|
703
|
+
class: ue([`j-sidebar__depth-${e.depth}`])
|
|
704
704
|
}, {
|
|
705
|
-
title:
|
|
706
|
-
e.menuItem.icon && e.depth === 0 ? (
|
|
705
|
+
title: a(() => [
|
|
706
|
+
e.menuItem.icon && e.depth === 0 ? (u(), C(t(ve), {
|
|
707
707
|
key: 0,
|
|
708
708
|
icon: e.menuItem.icon
|
|
709
|
-
}, null, 8, ["icon"])) :
|
|
710
|
-
|
|
709
|
+
}, null, 8, ["icon"])) : B("", !0),
|
|
710
|
+
S("span", cl, m(e.menuItem.title || e.menuItem.name), 1)
|
|
711
711
|
]),
|
|
712
|
-
default:
|
|
713
|
-
(
|
|
712
|
+
default: a(() => [
|
|
713
|
+
(u(!0), b(P, null, G(e.menuItem.children, (c) => (u(), C(k, {
|
|
714
714
|
key: c.path,
|
|
715
715
|
"menu-item": c,
|
|
716
716
|
"is-collapse": e.isCollapse,
|
|
717
717
|
depth: e.depth + 1,
|
|
718
|
-
onMenuClick:
|
|
718
|
+
onMenuClick: v[0] || (v[0] = ($) => o("menu-click", $))
|
|
719
719
|
}, null, 8, ["menu-item", "is-collapse", "depth"]))), 128))
|
|
720
720
|
]),
|
|
721
721
|
_: 1
|
|
722
|
-
}, 8, ["index", "class"])) : (
|
|
722
|
+
}, 8, ["index", "class"])) : (u(), C(t(Xe), {
|
|
723
723
|
key: 1,
|
|
724
724
|
index: e.menuItem.path,
|
|
725
|
-
class:
|
|
726
|
-
onClick:
|
|
725
|
+
class: ue([`j-sidebar__depth-${e.depth}`]),
|
|
726
|
+
onClick: r
|
|
727
727
|
}, {
|
|
728
|
-
title:
|
|
729
|
-
|
|
728
|
+
title: a(() => [
|
|
729
|
+
S("span", null, m(e.menuItem.title || e.menuItem.name), 1)
|
|
730
730
|
]),
|
|
731
|
-
default:
|
|
732
|
-
e.menuItem.icon && e.depth === 0 ? (
|
|
731
|
+
default: a(() => [
|
|
732
|
+
e.menuItem.icon && e.depth === 0 ? (u(), C(t(ve), {
|
|
733
733
|
key: 0,
|
|
734
734
|
icon: e.menuItem.icon
|
|
735
|
-
}, null, 8, ["icon"])) :
|
|
735
|
+
}, null, 8, ["icon"])) : B("", !0)
|
|
736
736
|
]),
|
|
737
737
|
_: 1
|
|
738
738
|
}, 8, ["index", "class"]));
|
|
739
739
|
};
|
|
740
740
|
}
|
|
741
|
-
}),
|
|
741
|
+
}), Qe = /* @__PURE__ */ ae(ml, [["__scopeId", "data-v-3a990426"]]), pl = { class: "j-sidebar__logo" }, fl = { class: "j-sidebar__title" }, vl = { class: "j-sidebar__menu-wrapper" }, hl = { class: "j-sidebar__footer" }, _l = /* @__PURE__ */ ee({
|
|
742
742
|
name: "JSidebar",
|
|
743
743
|
__name: "JSidebar",
|
|
744
744
|
props: {
|
|
@@ -752,66 +752,66 @@ const We = ["disabled"], qe = {
|
|
|
752
752
|
router: { type: Boolean, default: !0 }
|
|
753
753
|
},
|
|
754
754
|
emits: ["update:collapsed", "menu-click"],
|
|
755
|
-
setup(e, { emit:
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
|
|
755
|
+
setup(e, { emit: h }) {
|
|
756
|
+
const s = e, o = h, r = q(s.collapsed);
|
|
757
|
+
be(() => s.collapsed, (v) => {
|
|
758
|
+
r.value = v;
|
|
759
759
|
});
|
|
760
|
-
const
|
|
761
|
-
|
|
760
|
+
const f = () => {
|
|
761
|
+
r.value = !r.value, o("update:collapsed", r.value);
|
|
762
762
|
};
|
|
763
|
-
return (
|
|
764
|
-
class:
|
|
765
|
-
style:
|
|
763
|
+
return (v, k) => (u(), b("div", {
|
|
764
|
+
class: ue(["j-sidebar", r.value ? "j-sidebar--collapsed" : "j-sidebar--expanded"]),
|
|
765
|
+
style: ce({ width: r.value ? `${e.collapsedWidth}px` : `${e.expandedWidth}px` })
|
|
766
766
|
}, [
|
|
767
|
-
|
|
768
|
-
|
|
767
|
+
S("div", pl, [
|
|
768
|
+
te(v.$slots, "logo", { collapsed: r.value }, () => {
|
|
769
769
|
var c;
|
|
770
770
|
return [
|
|
771
|
-
|
|
771
|
+
S("h2", fl, m(r.value ? e.collapsedTitle || ((c = e.title) == null ? void 0 : c.charAt(0)) || "" : e.title), 1)
|
|
772
772
|
];
|
|
773
773
|
}, !0)
|
|
774
774
|
]),
|
|
775
|
-
|
|
776
|
-
|
|
775
|
+
S("div", vl, [
|
|
776
|
+
n(t(Ge), {
|
|
777
777
|
"default-active": e.activeMenu,
|
|
778
778
|
class: "j-sidebar__menu",
|
|
779
779
|
router: e.router,
|
|
780
|
-
collapse:
|
|
780
|
+
collapse: r.value,
|
|
781
781
|
"collapse-transition": !1
|
|
782
782
|
}, {
|
|
783
|
-
default:
|
|
784
|
-
(
|
|
783
|
+
default: a(() => [
|
|
784
|
+
(u(!0), b(P, null, G(e.menus, (c) => (u(), C(Qe, {
|
|
785
785
|
key: c.path,
|
|
786
786
|
"menu-item": c,
|
|
787
|
-
"is-collapse":
|
|
788
|
-
onMenuClick:
|
|
787
|
+
"is-collapse": r.value,
|
|
788
|
+
onMenuClick: k[0] || (k[0] = ($) => o("menu-click", $))
|
|
789
789
|
}, null, 8, ["menu-item", "is-collapse"]))), 128))
|
|
790
790
|
]),
|
|
791
791
|
_: 1
|
|
792
792
|
}, 8, ["default-active", "router", "collapse"])
|
|
793
793
|
]),
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
collapsed:
|
|
797
|
-
toggle:
|
|
794
|
+
S("div", hl, [
|
|
795
|
+
te(v.$slots, "footer", {
|
|
796
|
+
collapsed: r.value,
|
|
797
|
+
toggle: f
|
|
798
798
|
}, () => [
|
|
799
|
-
|
|
799
|
+
S("button", {
|
|
800
800
|
class: "j-sidebar__collapse-btn",
|
|
801
|
-
onClick:
|
|
801
|
+
onClick: f
|
|
802
802
|
}, [
|
|
803
|
-
|
|
804
|
-
icon:
|
|
803
|
+
n(t(ve), {
|
|
804
|
+
icon: r.value ? "mdi:chevron-right" : "mdi:chevron-left"
|
|
805
805
|
}, null, 8, ["icon"])
|
|
806
806
|
])
|
|
807
807
|
], !0)
|
|
808
808
|
])
|
|
809
809
|
], 6));
|
|
810
810
|
}
|
|
811
|
-
}),
|
|
811
|
+
}), Ye = /* @__PURE__ */ ae(_l, [["__scopeId", "data-v-a3fac9de"]]), gl = { class: "j-admin-layout__right-panel" }, yl = { class: "j-admin-layout__header" }, bl = { class: "j-admin-layout__header-left" }, kl = {
|
|
812
812
|
key: 0,
|
|
813
813
|
class: "j-admin-layout__logo"
|
|
814
|
-
},
|
|
814
|
+
}, wl = { class: "j-admin-layout__header-right" }, xl = { class: "j-admin-layout__user" }, $l = { class: "j-admin-layout__content-container" }, Sl = /* @__PURE__ */ ee({
|
|
815
815
|
name: "JAdminLayout",
|
|
816
816
|
__name: "JAdminLayout",
|
|
817
817
|
props: {
|
|
@@ -837,73 +837,73 @@ const We = ["disabled"], qe = {
|
|
|
837
837
|
hideContentScrollbar: { type: Boolean, default: !1 }
|
|
838
838
|
},
|
|
839
839
|
emits: ["update:collapsed", "top-menu-select", "side-menu-click", "profile", "logout"],
|
|
840
|
-
setup(e, { emit:
|
|
841
|
-
const
|
|
842
|
-
get: () =>
|
|
843
|
-
set: (c) =>
|
|
844
|
-
}),
|
|
845
|
-
"--j-admin-layout-header-height":
|
|
846
|
-
"--j-admin-layout-content-padding":
|
|
847
|
-
"--j-admin-layout-content-bg":
|
|
848
|
-
"--j-admin-layout-header-bg":
|
|
849
|
-
})),
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
|
|
840
|
+
setup(e, { emit: h }) {
|
|
841
|
+
const s = e, o = h, r = j({
|
|
842
|
+
get: () => s.collapsed,
|
|
843
|
+
set: (c) => o("update:collapsed", c)
|
|
844
|
+
}), f = j(() => ({
|
|
845
|
+
"--j-admin-layout-header-height": s.headerHeight,
|
|
846
|
+
"--j-admin-layout-content-padding": s.contentPadding,
|
|
847
|
+
"--j-admin-layout-content-bg": s.contentBackground,
|
|
848
|
+
"--j-admin-layout-header-bg": s.headerBackground
|
|
849
|
+
})), v = (c) => {
|
|
850
|
+
o("top-menu-select", c);
|
|
851
|
+
}, k = (c) => {
|
|
852
|
+
o("side-menu-click", c);
|
|
853
853
|
};
|
|
854
|
-
return (c,
|
|
854
|
+
return (c, $) => (u(), b("div", {
|
|
855
855
|
class: "j-admin-layout",
|
|
856
|
-
style:
|
|
856
|
+
style: ce(f.value)
|
|
857
857
|
}, [
|
|
858
|
-
e.sideMenus.length > 0 ? (
|
|
858
|
+
e.sideMenus.length > 0 ? (u(), C(t(Ye), {
|
|
859
859
|
key: 0,
|
|
860
|
-
collapsed:
|
|
861
|
-
"onUpdate:collapsed":
|
|
860
|
+
collapsed: r.value,
|
|
861
|
+
"onUpdate:collapsed": $[0] || ($[0] = (I) => r.value = I),
|
|
862
862
|
menus: e.sideMenus,
|
|
863
863
|
"active-menu": e.activeMenu,
|
|
864
864
|
title: e.title,
|
|
865
865
|
"collapsed-title": e.collapsedTitle,
|
|
866
866
|
"collapsed-width": e.sidebarCollapsedWidth,
|
|
867
867
|
"expanded-width": e.sidebarExpandedWidth,
|
|
868
|
-
onMenuClick:
|
|
869
|
-
},
|
|
868
|
+
onMenuClick: k
|
|
869
|
+
}, wt({ _: 2 }, [
|
|
870
870
|
c.$slots.sidebarFooter ? {
|
|
871
871
|
name: "footer",
|
|
872
|
-
fn:
|
|
873
|
-
|
|
874
|
-
collapsed:
|
|
875
|
-
toggle:
|
|
872
|
+
fn: a(({ collapsed: I, toggle: N }) => [
|
|
873
|
+
te(c.$slots, "sidebarFooter", {
|
|
874
|
+
collapsed: I,
|
|
875
|
+
toggle: N
|
|
876
876
|
}, void 0, !0)
|
|
877
877
|
]),
|
|
878
878
|
key: "0"
|
|
879
879
|
} : void 0
|
|
880
|
-
]), 1032, ["collapsed", "menus", "active-menu", "title", "collapsed-title", "collapsed-width", "expanded-width"])) :
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
e.sideMenus.length === 0 ? (
|
|
885
|
-
|
|
886
|
-
|
|
880
|
+
]), 1032, ["collapsed", "menus", "active-menu", "title", "collapsed-title", "collapsed-width", "expanded-width"])) : B("", !0),
|
|
881
|
+
S("div", gl, [
|
|
882
|
+
S("div", yl, [
|
|
883
|
+
S("div", bl, [
|
|
884
|
+
e.sideMenus.length === 0 ? (u(), b("div", kl, [
|
|
885
|
+
te(c.$slots, "logo", {}, () => [
|
|
886
|
+
S("h2", null, m(e.logoTitle || e.title), 1)
|
|
887
887
|
], !0)
|
|
888
|
-
])) :
|
|
889
|
-
|
|
888
|
+
])) : B("", !0),
|
|
889
|
+
n(t(Ge), {
|
|
890
890
|
mode: "horizontal",
|
|
891
891
|
"default-active": e.activeTopMenu,
|
|
892
892
|
class: "j-admin-layout__top-menu",
|
|
893
|
-
onSelect:
|
|
893
|
+
onSelect: v
|
|
894
894
|
}, {
|
|
895
|
-
default:
|
|
896
|
-
(
|
|
897
|
-
key:
|
|
898
|
-
index:
|
|
895
|
+
default: a(() => [
|
|
896
|
+
(u(!0), b(P, null, G(e.topMenus, (I) => (u(), C(t(Xe), {
|
|
897
|
+
key: I.path,
|
|
898
|
+
index: I.path
|
|
899
899
|
}, {
|
|
900
|
-
default:
|
|
901
|
-
|
|
900
|
+
default: a(() => [
|
|
901
|
+
I.icon ? (u(), C(t(ve), {
|
|
902
902
|
key: 0,
|
|
903
|
-
icon:
|
|
903
|
+
icon: I.icon,
|
|
904
904
|
class: "j-admin-layout__top-menu-icon"
|
|
905
|
-
}, null, 8, ["icon"])) :
|
|
906
|
-
|
|
905
|
+
}, null, 8, ["icon"])) : B("", !0),
|
|
906
|
+
S("span", null, m(I.title || I.name), 1)
|
|
907
907
|
]),
|
|
908
908
|
_: 2
|
|
909
909
|
}, 1032, ["index"]))), 128))
|
|
@@ -911,341 +911,1686 @@ const We = ["disabled"], qe = {
|
|
|
911
911
|
_: 1
|
|
912
912
|
}, 8, ["default-active"])
|
|
913
913
|
]),
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
e.showProfile || e.showLogout ? (
|
|
917
|
-
dropdown:
|
|
918
|
-
|
|
919
|
-
default:
|
|
920
|
-
e.showProfile ? (
|
|
914
|
+
S("div", wl, [
|
|
915
|
+
te(c.$slots, "headerRight", { username: e.username }, () => [
|
|
916
|
+
e.showProfile || e.showLogout ? (u(), C(t(Dt), { key: 0 }, {
|
|
917
|
+
dropdown: a(() => [
|
|
918
|
+
n(t(Et), null, {
|
|
919
|
+
default: a(() => [
|
|
920
|
+
e.showProfile ? (u(), C(t(Pe), {
|
|
921
921
|
key: 0,
|
|
922
|
-
onClick:
|
|
922
|
+
onClick: $[1] || ($[1] = (I) => o("profile"))
|
|
923
923
|
}, {
|
|
924
|
-
default:
|
|
925
|
-
|
|
924
|
+
default: a(() => [
|
|
925
|
+
p(m(e.profileText), 1)
|
|
926
926
|
]),
|
|
927
927
|
_: 1
|
|
928
|
-
})) :
|
|
929
|
-
e.showLogout ? (
|
|
928
|
+
})) : B("", !0),
|
|
929
|
+
e.showLogout ? (u(), C(t(Pe), {
|
|
930
930
|
key: 1,
|
|
931
|
-
onClick:
|
|
931
|
+
onClick: $[2] || ($[2] = (I) => o("logout"))
|
|
932
932
|
}, {
|
|
933
|
-
default:
|
|
934
|
-
|
|
933
|
+
default: a(() => [
|
|
934
|
+
p(m(e.logoutText), 1)
|
|
935
935
|
]),
|
|
936
936
|
_: 1
|
|
937
|
-
})) :
|
|
937
|
+
})) : B("", !0)
|
|
938
938
|
]),
|
|
939
939
|
_: 1
|
|
940
940
|
})
|
|
941
941
|
]),
|
|
942
|
-
default:
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
default:
|
|
947
|
-
|
|
942
|
+
default: a(() => [
|
|
943
|
+
S("span", xl, [
|
|
944
|
+
p(m(e.username) + " ", 1),
|
|
945
|
+
n(t(ie), null, {
|
|
946
|
+
default: a(() => [
|
|
947
|
+
n(t(Ze))
|
|
948
948
|
]),
|
|
949
949
|
_: 1
|
|
950
950
|
})
|
|
951
951
|
])
|
|
952
952
|
]),
|
|
953
953
|
_: 1
|
|
954
|
-
})) :
|
|
954
|
+
})) : B("", !0)
|
|
955
955
|
], !0)
|
|
956
956
|
])
|
|
957
957
|
]),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
class:
|
|
958
|
+
S("div", $l, [
|
|
959
|
+
te(c.$slots, "tabs", {}, void 0, !0),
|
|
960
|
+
S("div", {
|
|
961
|
+
class: ue([
|
|
962
962
|
"j-admin-layout__content",
|
|
963
963
|
{ "j-admin-layout__content--scrollbar-hidden": e.hideContentScrollbar }
|
|
964
964
|
])
|
|
965
965
|
}, [
|
|
966
|
-
|
|
966
|
+
te(c.$slots, "default", {}, void 0, !0)
|
|
967
967
|
], 2)
|
|
968
968
|
])
|
|
969
969
|
])
|
|
970
970
|
], 4));
|
|
971
971
|
}
|
|
972
|
-
}),
|
|
973
|
-
|
|
974
|
-
|
|
972
|
+
}), Cl = /* @__PURE__ */ ae(Sl, [["__scopeId", "data-v-51b44ebf"]]), jl = { class: "pdd-body" }, Al = ["href"], Il = ["innerHTML"], Dl = { key: 1 }, El = { key: 1 }, Tl = { key: 1 }, Ml = { class: "pdd-supplier-head" }, Rl = { class: "pdd-supplier-name" }, Bl = { class: "pdd-supplier-meta" }, Vl = { class: "pdd-supplier-meta" }, zl = { key: 1 }, Jl = { key: 1 }, Ll = { key: 1 }, Pl = { key: 1 }, ql = ["href"], Fl = { key: 1 }, et = q([]), De = q([]), tt = q([]), lt = q([]), at = q([]), nt = q([]);
|
|
973
|
+
let Oe = !1, fe = null;
|
|
974
|
+
const Ol = (e) => {
|
|
975
|
+
const h = (s, o) => e({ url: s, method: "post", data: o });
|
|
976
|
+
return Oe ? Promise.resolve() : fe || (fe = Promise.all([
|
|
977
|
+
h("/bis-app/comm/productAttrValue/getAll", { pageSize: 999 }).then((s) => {
|
|
978
|
+
var o, r, f;
|
|
979
|
+
s.code === 1 && (et.value = ((o = s.data) == null ? void 0 : o.brand) || [], De.value = ((r = s.data) == null ? void 0 : r.unit) || [], tt.value = ((f = s.data) == null ? void 0 : f.sale) || []);
|
|
980
|
+
}).catch(() => {
|
|
981
|
+
}),
|
|
982
|
+
h("/bis-app/comm/company/list", { pageSize: 999, subject_type: "purchase" }).then((s) => {
|
|
983
|
+
var o;
|
|
984
|
+
s.code === 1 && (lt.value = ((o = s.data) == null ? void 0 : o.list) || s.data || []);
|
|
985
|
+
}).catch(() => {
|
|
986
|
+
}),
|
|
987
|
+
h("/bis-app/comm/tagCategoryValue/list", { tag_code: "PRODUCT_TAG", pageIndex: 1, pageSize: 999 }).then((s) => {
|
|
988
|
+
var o;
|
|
989
|
+
s.code === 1 && (at.value = ((o = s.data) == null ? void 0 : o.list) || s.data || []);
|
|
990
|
+
}).catch(() => {
|
|
991
|
+
}),
|
|
992
|
+
h("/bis-app/comm/customAttr/list", { pageIndex: 1, pageSize: 999 }).then((s) => {
|
|
993
|
+
var o;
|
|
994
|
+
s.code === 1 && (nt.value = ((o = s.data) == null ? void 0 : o.list) || s.data || []);
|
|
995
|
+
}).catch(() => {
|
|
996
|
+
})
|
|
997
|
+
]).then(() => {
|
|
998
|
+
Oe = !0;
|
|
999
|
+
}).finally(() => {
|
|
1000
|
+
fe = null;
|
|
1001
|
+
}), fe);
|
|
1002
|
+
}, Nl = /* @__PURE__ */ ee({
|
|
1003
|
+
name: "JProductDetailDialog",
|
|
1004
|
+
directives: { loading: qe },
|
|
1005
|
+
__name: "JProductDetailDialog",
|
|
1006
|
+
props: {
|
|
1007
|
+
visible: { type: Boolean, default: !1 },
|
|
1008
|
+
code: { default: "" },
|
|
1009
|
+
type: { default: "sku" },
|
|
1010
|
+
id: { default: void 0 },
|
|
1011
|
+
request: {}
|
|
1012
|
+
},
|
|
1013
|
+
emits: ["update:visible"],
|
|
1014
|
+
setup(e, { emit: h }) {
|
|
1015
|
+
const s = e, o = h, r = (i, d) => s.request({ url: i, method: "post", data: d }), f = q(!1), v = q(null), k = async () => {
|
|
1016
|
+
if (!s.code && s.id === void 0) return;
|
|
1017
|
+
v.value = null, Ol(s.request);
|
|
1018
|
+
const i = s.type === "spu" ? "/bis-app/comm/spu/doDetail" : "/bis-app/comm/sku/doDetail", d = s.type === "spu" ? { id: s.id, spu_code: s.code } : { id: s.id, sku_code: s.code };
|
|
1019
|
+
f.value = !0;
|
|
1020
|
+
try {
|
|
1021
|
+
const l = await r(i, d);
|
|
1022
|
+
l.code === 1 && l.data ? v.value = l.data : H.error(l.msg || "获取详情失败");
|
|
1023
|
+
} catch {
|
|
1024
|
+
H.error("获取详情失败");
|
|
1025
|
+
} finally {
|
|
1026
|
+
f.value = !1;
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
be(() => s.visible, (i) => {
|
|
1030
|
+
i && k();
|
|
1031
|
+
});
|
|
1032
|
+
const c = j(() => {
|
|
1033
|
+
var i;
|
|
1034
|
+
return ((i = v.value) == null ? void 0 : i.basic_info) ?? v.value ?? {};
|
|
1035
|
+
}), $ = j(() => {
|
|
1036
|
+
var i;
|
|
1037
|
+
return ((i = v.value) == null ? void 0 : i.spec_info) ?? {};
|
|
1038
|
+
}), I = j(() => {
|
|
1039
|
+
var i, d;
|
|
1040
|
+
return ((i = v.value) == null ? void 0 : i.images_info) ?? ((d = v.value) == null ? void 0 : d.image_info) ?? {};
|
|
1041
|
+
}), N = j(() => {
|
|
1042
|
+
var i;
|
|
1043
|
+
return ((i = v.value) == null ? void 0 : i.purchase_info) ?? {};
|
|
1044
|
+
}), V = j(() => {
|
|
1045
|
+
var i;
|
|
1046
|
+
return ((i = v.value) == null ? void 0 : i.declaration_info) ?? {};
|
|
1047
|
+
}), M = j(() => {
|
|
1048
|
+
var i;
|
|
1049
|
+
return ((i = v.value) == null ? void 0 : i.qc_info) ?? {};
|
|
1050
|
+
}), E = j(() => {
|
|
1051
|
+
var i;
|
|
1052
|
+
return ((i = v.value) == null ? void 0 : i.bind_sku_info) ?? {};
|
|
1053
|
+
}), W = j(() => {
|
|
1054
|
+
var i;
|
|
1055
|
+
return ((i = v.value) == null ? void 0 : i.spu_bind_sku) ?? {};
|
|
1056
|
+
}), F = j(() => {
|
|
1057
|
+
var i;
|
|
1058
|
+
return ((i = v.value) == null ? void 0 : i.spec_box_info) ?? $.value.spec_box_info ?? [];
|
|
1059
|
+
}), R = j(() => {
|
|
1060
|
+
var i;
|
|
1061
|
+
return ((i = v.value) == null ? void 0 : i.sku_supplier) ?? N.value.supplier_list ?? [];
|
|
1062
|
+
}), _ = j(() => String(c.value.product_type ?? (s.type === "spu" ? "30" : "10"))), D = j(() => _.value === "30"), z = j(() => ({ 10: "单品", 20: "组合产品", 30: "多属性产品" })[_.value] || _.value), y = j(() => D.value && c.value.spu_name || c.value.product_name), K = j(() => D.value && c.value.spu_name_en || c.value.product_name_en), L = j(() => D.value ? c.value.spu_code : c.value.sku_code), O = (i) => {
|
|
1063
|
+
if (i == null || i === "") return [];
|
|
1064
|
+
if (Array.isArray(i)) return i.map(String).filter(Boolean);
|
|
1065
|
+
if (typeof i == "string") {
|
|
1066
|
+
const d = i.trim();
|
|
1067
|
+
if (!d) return [];
|
|
1068
|
+
if (d.startsWith("["))
|
|
1069
|
+
try {
|
|
1070
|
+
const l = JSON.parse(d);
|
|
1071
|
+
return Array.isArray(l) ? l.map(String).filter(Boolean) : [];
|
|
1072
|
+
} catch {
|
|
1073
|
+
}
|
|
1074
|
+
return d.split(",").map((l) => l.trim()).filter(Boolean);
|
|
1075
|
+
}
|
|
1076
|
+
return [String(i)];
|
|
1077
|
+
}, X = (i) => {
|
|
1078
|
+
let d = [];
|
|
1079
|
+
if (Array.isArray(i)) d = i;
|
|
1080
|
+
else if (typeof i == "string" && i.trim())
|
|
1081
|
+
try {
|
|
1082
|
+
const l = JSON.parse(i);
|
|
1083
|
+
d = Array.isArray(l) ? l : [i];
|
|
1084
|
+
} catch {
|
|
1085
|
+
d = [i];
|
|
1086
|
+
}
|
|
1087
|
+
return d.map((l) => {
|
|
1088
|
+
if (typeof l == "string") return { name: l.split("/").pop() || l, url: l };
|
|
1089
|
+
const g = (l == null ? void 0 : l.url) || (l == null ? void 0 : l.file_url) || (l == null ? void 0 : l.path) || "";
|
|
1090
|
+
return { name: (l == null ? void 0 : l.name) || (l == null ? void 0 : l.file_name) || g.split("/").pop() || "附件", url: g };
|
|
1091
|
+
}).filter((l) => l.url);
|
|
1092
|
+
}, x = (i) => i == null || i === "" ? "—" : i, J = (i, d) => i == null || i === "" ? "—" : `${i} ${d || ""}`.trim(), Z = (i, d, l, g = "cm") => {
|
|
1093
|
+
if ([i, d, l].every((U) => U == null || U === "")) return "—";
|
|
1094
|
+
const A = (U) => U == null || U === "" ? "—" : U;
|
|
1095
|
+
return `${A(i)} × ${A(d)} × ${A(l)} ${g}`;
|
|
1096
|
+
}, Q = (i, d) => {
|
|
1097
|
+
if (d == null || d === "") return "";
|
|
1098
|
+
const l = i.find((g) => String(g.id) === String(d));
|
|
1099
|
+
return (l == null ? void 0 : l.attr_value_name) || "";
|
|
1100
|
+
}, me = j(() => c.value.brand_name || Q(et.value, c.value.brand_id)), he = j(() => c.value.unit_name || Q(De.value, c.value.unit_id)), it = j(
|
|
1101
|
+
() => c.value.sale_status_name || c.value.status_name || Q(tt.value, c.value.status)
|
|
1102
|
+
), ot = j(
|
|
1103
|
+
() => V.value.declaration_unit_name || Q(De.value, V.value.declaration_unit_id) || V.value.declaration_unit_id
|
|
1104
|
+
), ut = j(() => {
|
|
1105
|
+
if (c.value.pe_code_name) return c.value.pe_code_name;
|
|
1106
|
+
const i = O(c.value.pe_codes);
|
|
1107
|
+
return i.length ? i.map((d) => {
|
|
1108
|
+
var l;
|
|
1109
|
+
return ((l = lt.value.find((g) => String(g.company_code) === String(d))) == null ? void 0 : l.company_name) || d;
|
|
1110
|
+
}).join("、") : "";
|
|
1111
|
+
}), Te = j(
|
|
1112
|
+
() => O(c.value.tags).map((i) => {
|
|
1113
|
+
const d = at.value.find((l) => String(l.tag_value_code) === String(i));
|
|
1114
|
+
return { code: i, name: (d == null ? void 0 : d.tag_value_name) || i, color: (d == null ? void 0 : d.tag_color) || "" };
|
|
1115
|
+
})
|
|
1116
|
+
), rt = j(() => {
|
|
1117
|
+
const i = c.value.sku_attr;
|
|
1118
|
+
return !i || typeof i != "object" || Array.isArray(i) ? "" : Object.entries(i).map(([d, l]) => `${d}: ${l}`).join(";");
|
|
1119
|
+
}), Me = j(() => X(c.value.att_files)), dt = j(() => {
|
|
1120
|
+
const i = c.value.product_desc || "";
|
|
1121
|
+
return String(i).replace(/<[^>]*>/g, "").trim().length > 0 || /<img/i.test(String(i));
|
|
1122
|
+
}), ke = j(() => {
|
|
1123
|
+
var i;
|
|
1124
|
+
return I.value.main_image || ((i = v.value) == null ? void 0 : i.product_image) || "";
|
|
1125
|
+
}), we = j(() => {
|
|
1126
|
+
var i;
|
|
1127
|
+
return O(I.value.size_images ?? ((i = v.value) == null ? void 0 : i.size_images));
|
|
1128
|
+
}), xe = j(() => O(I.value.selling_point_images)), ct = j(
|
|
1129
|
+
() => ({ spot: "抽检", full: "全检", exempt: "免检" })[M.value.qc_method] || x(M.value.qc_method)
|
|
1130
|
+
), $e = j(() => O(M.value.images)), Re = j(() => X(M.value.att_files)), Be = j(() => Array.isArray(M.value.qc_content) ? M.value.qc_content : []), Ve = (i) => String(i.custom_attr_id ?? i.id ?? i.attr_id ?? i.attr_code ?? "").trim(), mt = (i) => {
|
|
1131
|
+
const d = Array.isArray(i) ? i : i != null && i !== "" ? [i] : [], l = [];
|
|
1132
|
+
for (const g of d)
|
|
1133
|
+
if (typeof g == "string")
|
|
1134
|
+
g.split(/[,,、\n]/).map((A) => A.trim()).filter(Boolean).forEach((A) => l.push({ id: "", name: A }));
|
|
1135
|
+
else if (g && typeof g == "object") {
|
|
1136
|
+
const A = String(g.attr_value ?? g.value ?? g.label ?? g.attr_value_name ?? g.name ?? "").trim(), U = String(g.id ?? g.attr_value_id ?? g.value_id ?? "");
|
|
1137
|
+
A && l.push({ id: U, name: A });
|
|
1138
|
+
}
|
|
1139
|
+
return l;
|
|
1140
|
+
}, pt = j(() => {
|
|
1141
|
+
const i = /* @__PURE__ */ new Map();
|
|
1142
|
+
for (const d of nt.value) {
|
|
1143
|
+
const l = Ve(d);
|
|
1144
|
+
l && i.set(l, d);
|
|
1145
|
+
}
|
|
1146
|
+
return i;
|
|
1147
|
+
}), ze = j(() => {
|
|
1148
|
+
var g;
|
|
1149
|
+
const i = (g = v.value) == null ? void 0 : g.custom_attr_info, d = (i == null ? void 0 : i.list) ?? i;
|
|
1150
|
+
return (Array.isArray(d) ? d : []).map((A) => {
|
|
1151
|
+
const U = Ve(A), Y = pt.value.get(U);
|
|
1152
|
+
return {
|
|
1153
|
+
...A,
|
|
1154
|
+
custom_attr_id: U,
|
|
1155
|
+
// 属性名:详情自带优先,否则取字典
|
|
1156
|
+
attr_name: A.attr_name || (Y == null ? void 0 : Y.attr_name) || U,
|
|
1157
|
+
options: mt((Y == null ? void 0 : Y.attr_value) ?? (Y == null ? void 0 : Y.options) ?? A.options ?? A.attr_value)
|
|
1158
|
+
};
|
|
1159
|
+
});
|
|
1160
|
+
}), ft = (i) => {
|
|
1161
|
+
const d = O(i.custom_attr_value_id ?? i.custom_attr_value);
|
|
1162
|
+
if (!d.length) return "—";
|
|
1163
|
+
const l = i.options || [];
|
|
1164
|
+
return d.map((g) => {
|
|
1165
|
+
var A;
|
|
1166
|
+
return ((A = l.find((U) => U.id && String(U.id) === String(g) || String(U.name) === String(g))) == null ? void 0 : A.name) || g;
|
|
1167
|
+
}).join("、");
|
|
1168
|
+
}, vt = j(() => E.value.bind_sku_list ?? []), Je = j(() => W.value.sku_attr ?? []), ht = j(() => W.value.sku_list ?? []), _t = (i, d) => {
|
|
1169
|
+
var A;
|
|
1170
|
+
const l = (A = i.sku_attr) == null ? void 0 : A[d.attr_code];
|
|
1171
|
+
if (l == null || l === "") return "—";
|
|
1172
|
+
const g = (d.childs || []).find((U) => String(U.attr_value_code) === String(l));
|
|
1173
|
+
return (g == null ? void 0 : g.attr_value_name) || String(l);
|
|
1174
|
+
}, gt = (i) => {
|
|
1175
|
+
const d = [];
|
|
1176
|
+
for (const l of i.supplier_quote || [])
|
|
1177
|
+
for (const g of l.quote_list || [])
|
|
1178
|
+
d.push({
|
|
1179
|
+
currency: l.quote_currency_code,
|
|
1180
|
+
is_tax: l.is_tax,
|
|
1181
|
+
tax_rate: l.tax_rate,
|
|
1182
|
+
...g
|
|
1183
|
+
});
|
|
1184
|
+
return d;
|
|
1185
|
+
};
|
|
1186
|
+
return (i, d) => (u(), C(t(Ke), {
|
|
1187
|
+
"model-value": e.visible,
|
|
1188
|
+
title: "查看产品",
|
|
1189
|
+
width: "1200px",
|
|
1190
|
+
top: "4vh",
|
|
1191
|
+
"close-on-click-modal": !1,
|
|
1192
|
+
"onUpdate:modelValue": d[1] || (d[1] = (l) => o("update:visible", l))
|
|
1193
|
+
}, {
|
|
1194
|
+
footer: a(() => [
|
|
1195
|
+
n(t(le), {
|
|
1196
|
+
onClick: d[0] || (d[0] = (l) => o("update:visible", !1))
|
|
1197
|
+
}, {
|
|
1198
|
+
default: a(() => [...d[17] || (d[17] = [
|
|
1199
|
+
p("关闭", -1)
|
|
1200
|
+
])]),
|
|
1201
|
+
_: 1
|
|
1202
|
+
})
|
|
1203
|
+
]),
|
|
1204
|
+
default: a(() => [
|
|
1205
|
+
xt((u(), b("div", jl, [
|
|
1206
|
+
v.value ? (u(), b(P, { key: 0 }, [
|
|
1207
|
+
d[13] || (d[13] = S("div", { class: "pdd-title" }, "基本信息", -1)),
|
|
1208
|
+
n(t(oe), {
|
|
1209
|
+
column: 3,
|
|
1210
|
+
border: "",
|
|
1211
|
+
size: "small"
|
|
1212
|
+
}, {
|
|
1213
|
+
default: a(() => [
|
|
1214
|
+
n(t(w), {
|
|
1215
|
+
label: D.value ? "中文款式" : "中文品名"
|
|
1216
|
+
}, {
|
|
1217
|
+
default: a(() => [
|
|
1218
|
+
p(m(x(y.value)), 1)
|
|
1219
|
+
]),
|
|
1220
|
+
_: 1
|
|
1221
|
+
}, 8, ["label"]),
|
|
1222
|
+
n(t(w), {
|
|
1223
|
+
label: D.value ? "英文款式" : "英文品名"
|
|
1224
|
+
}, {
|
|
1225
|
+
default: a(() => [
|
|
1226
|
+
p(m(x(K.value)), 1)
|
|
1227
|
+
]),
|
|
1228
|
+
_: 1
|
|
1229
|
+
}, 8, ["label"]),
|
|
1230
|
+
n(t(w), {
|
|
1231
|
+
label: D.value ? "SPU" : "SKU"
|
|
1232
|
+
}, {
|
|
1233
|
+
default: a(() => [
|
|
1234
|
+
p(m(x(L.value)), 1)
|
|
1235
|
+
]),
|
|
1236
|
+
_: 1
|
|
1237
|
+
}, 8, ["label"]),
|
|
1238
|
+
n(t(w), { label: "产品类型" }, {
|
|
1239
|
+
default: a(() => [
|
|
1240
|
+
p(m(z.value), 1)
|
|
1241
|
+
]),
|
|
1242
|
+
_: 1
|
|
1243
|
+
}),
|
|
1244
|
+
n(t(w), { label: "采购公司" }, {
|
|
1245
|
+
default: a(() => [
|
|
1246
|
+
p(m(x(ut.value)), 1)
|
|
1247
|
+
]),
|
|
1248
|
+
_: 1
|
|
1249
|
+
}),
|
|
1250
|
+
n(t(w), { label: "状态" }, {
|
|
1251
|
+
default: a(() => [
|
|
1252
|
+
p(m(x(it.value)), 1)
|
|
1253
|
+
]),
|
|
1254
|
+
_: 1
|
|
1255
|
+
}),
|
|
1256
|
+
n(t(w), { label: "品类" }, {
|
|
1257
|
+
default: a(() => [
|
|
1258
|
+
p(m(x(c.value.category_path_name || c.value.category_name)), 1)
|
|
1259
|
+
]),
|
|
1260
|
+
_: 1
|
|
1261
|
+
}),
|
|
1262
|
+
n(t(w), { label: "品牌" }, {
|
|
1263
|
+
default: a(() => [
|
|
1264
|
+
p(m(x(me.value)), 1)
|
|
1265
|
+
]),
|
|
1266
|
+
_: 1
|
|
1267
|
+
}),
|
|
1268
|
+
n(t(w), { label: "单位" }, {
|
|
1269
|
+
default: a(() => [
|
|
1270
|
+
p(m(x(he.value)), 1)
|
|
1271
|
+
]),
|
|
1272
|
+
_: 1
|
|
1273
|
+
}),
|
|
1274
|
+
n(t(w), { label: "产品标签" }, {
|
|
1275
|
+
default: a(() => [
|
|
1276
|
+
Te.value.length ? (u(!0), b(P, { key: 0 }, G(Te.value, (l) => (u(), C(t(_e), {
|
|
1277
|
+
key: l.code,
|
|
1278
|
+
size: "small",
|
|
1279
|
+
class: "pdd-tag",
|
|
1280
|
+
style: ce(l.color ? { backgroundColor: l.color, borderColor: l.color, color: "#fff" } : {})
|
|
1281
|
+
}, {
|
|
1282
|
+
default: a(() => [
|
|
1283
|
+
p(m(l.name), 1)
|
|
1284
|
+
]),
|
|
1285
|
+
_: 2
|
|
1286
|
+
}, 1032, ["style"]))), 128)) : (u(), b(P, { key: 1 }, [
|
|
1287
|
+
p("—")
|
|
1288
|
+
], 64))
|
|
1289
|
+
]),
|
|
1290
|
+
_: 1
|
|
1291
|
+
}),
|
|
1292
|
+
n(t(w), { label: "材质" }, {
|
|
1293
|
+
default: a(() => [
|
|
1294
|
+
p(m(x(c.value.material)), 1)
|
|
1295
|
+
]),
|
|
1296
|
+
_: 1
|
|
1297
|
+
}),
|
|
1298
|
+
n(t(w), { label: "型号" }, {
|
|
1299
|
+
default: a(() => [
|
|
1300
|
+
p(m(x(c.value.product_model)), 1)
|
|
1301
|
+
]),
|
|
1302
|
+
_: 1
|
|
1303
|
+
}),
|
|
1304
|
+
n(t(w), { label: "开发员" }, {
|
|
1305
|
+
default: a(() => [
|
|
1306
|
+
p(m(x(c.value.develop_leader_name || c.value.develop_user)), 1)
|
|
1307
|
+
]),
|
|
1308
|
+
_: 1
|
|
1309
|
+
}),
|
|
1310
|
+
n(t(w), { label: "采购员" }, {
|
|
1311
|
+
default: a(() => [
|
|
1312
|
+
p(m(x(c.value.purchase_leader_name || c.value.purchase_user)), 1)
|
|
1313
|
+
]),
|
|
1314
|
+
_: 1
|
|
1315
|
+
}),
|
|
1316
|
+
n(t(w), { label: "产品运营" }, {
|
|
1317
|
+
default: a(() => [
|
|
1318
|
+
p(m(x(c.value.sales_leader_name || c.value.sales_user)), 1)
|
|
1319
|
+
]),
|
|
1320
|
+
_: 1
|
|
1321
|
+
}),
|
|
1322
|
+
D.value ? B("", !0) : (u(), C(t(w), {
|
|
1323
|
+
key: 0,
|
|
1324
|
+
label: "关联SPU"
|
|
1325
|
+
}, {
|
|
1326
|
+
default: a(() => [
|
|
1327
|
+
p(m(x(c.value.spu_code)), 1)
|
|
1328
|
+
]),
|
|
1329
|
+
_: 1
|
|
1330
|
+
})),
|
|
1331
|
+
D.value ? B("", !0) : (u(), C(t(w), {
|
|
1332
|
+
key: 1,
|
|
1333
|
+
label: "产品属性",
|
|
1334
|
+
span: 2
|
|
1335
|
+
}, {
|
|
1336
|
+
default: a(() => [
|
|
1337
|
+
p(m(x(rt.value)), 1)
|
|
1338
|
+
]),
|
|
1339
|
+
_: 1
|
|
1340
|
+
})),
|
|
1341
|
+
n(t(w), {
|
|
1342
|
+
label: "附件",
|
|
1343
|
+
span: 3
|
|
1344
|
+
}, {
|
|
1345
|
+
default: a(() => [
|
|
1346
|
+
Me.value.length ? (u(!0), b(P, { key: 0 }, G(Me.value, (l, g) => (u(), b("a", {
|
|
1347
|
+
key: g,
|
|
1348
|
+
href: l.url,
|
|
1349
|
+
target: "_blank",
|
|
1350
|
+
class: "pdd-file"
|
|
1351
|
+
}, m(l.name), 9, Al))), 128)) : (u(), b(P, { key: 1 }, [
|
|
1352
|
+
p("—")
|
|
1353
|
+
], 64))
|
|
1354
|
+
]),
|
|
1355
|
+
_: 1
|
|
1356
|
+
}),
|
|
1357
|
+
n(t(w), {
|
|
1358
|
+
label: "详细描述",
|
|
1359
|
+
span: 3
|
|
1360
|
+
}, {
|
|
1361
|
+
default: a(() => [
|
|
1362
|
+
dt.value ? (u(), b("div", {
|
|
1363
|
+
key: 0,
|
|
1364
|
+
class: "pdd-rich",
|
|
1365
|
+
innerHTML: c.value.product_desc
|
|
1366
|
+
}, null, 8, Il)) : (u(), b(P, { key: 1 }, [
|
|
1367
|
+
p("—")
|
|
1368
|
+
], 64))
|
|
1369
|
+
]),
|
|
1370
|
+
_: 1
|
|
1371
|
+
})
|
|
1372
|
+
]),
|
|
1373
|
+
_: 1
|
|
1374
|
+
}),
|
|
1375
|
+
_.value === "20" ? (u(), b(P, { key: 0 }, [
|
|
1376
|
+
d[2] || (d[2] = S("div", { class: "pdd-title" }, "产品组成", -1)),
|
|
1377
|
+
n(t(oe), {
|
|
1378
|
+
column: 3,
|
|
1379
|
+
border: "",
|
|
1380
|
+
size: "small"
|
|
1381
|
+
}, {
|
|
1382
|
+
default: a(() => [
|
|
1383
|
+
n(t(w), { label: "单位加工费" }, {
|
|
1384
|
+
default: a(() => [
|
|
1385
|
+
p(m(E.value.unit_process_cost != null && E.value.unit_process_cost !== "" ? `${E.value.unit_process_cost} ${E.value.unit_process_currency_code || ""}` : "—"), 1)
|
|
1386
|
+
]),
|
|
1387
|
+
_: 1
|
|
1388
|
+
}),
|
|
1389
|
+
n(t(w), {
|
|
1390
|
+
label: "加工备注",
|
|
1391
|
+
span: 2
|
|
1392
|
+
}, {
|
|
1393
|
+
default: a(() => [
|
|
1394
|
+
p(m(x(E.value.unit_process_remark)), 1)
|
|
1395
|
+
]),
|
|
1396
|
+
_: 1
|
|
1397
|
+
})
|
|
1398
|
+
]),
|
|
1399
|
+
_: 1
|
|
1400
|
+
}),
|
|
1401
|
+
n(t(ne), {
|
|
1402
|
+
data: vt.value,
|
|
1403
|
+
border: "",
|
|
1404
|
+
size: "small",
|
|
1405
|
+
class: "pdd-table"
|
|
1406
|
+
}, {
|
|
1407
|
+
default: a(() => [
|
|
1408
|
+
n(t(T), {
|
|
1409
|
+
label: "图片",
|
|
1410
|
+
width: "70",
|
|
1411
|
+
align: "center"
|
|
1412
|
+
}, {
|
|
1413
|
+
default: a(({ row: l }) => [
|
|
1414
|
+
l.image || l.product_image ? (u(), C(t(se), {
|
|
1415
|
+
key: 0,
|
|
1416
|
+
src: l.image || l.product_image,
|
|
1417
|
+
"preview-src-list": [l.image || l.product_image],
|
|
1418
|
+
"preview-teleported": "",
|
|
1419
|
+
fit: "cover",
|
|
1420
|
+
class: "pdd-thumb"
|
|
1421
|
+
}, null, 8, ["src", "preview-src-list"])) : (u(), b("span", Dl, "—"))
|
|
1422
|
+
]),
|
|
1423
|
+
_: 1
|
|
1424
|
+
}),
|
|
1425
|
+
n(t(T), {
|
|
1426
|
+
label: "品名",
|
|
1427
|
+
prop: "product_name",
|
|
1428
|
+
"min-width": "140",
|
|
1429
|
+
"show-overflow-tooltip": ""
|
|
1430
|
+
}),
|
|
1431
|
+
n(t(T), {
|
|
1432
|
+
label: "SKU",
|
|
1433
|
+
prop: "sku_code",
|
|
1434
|
+
"min-width": "120",
|
|
1435
|
+
"show-overflow-tooltip": ""
|
|
1436
|
+
}),
|
|
1437
|
+
n(t(T), {
|
|
1438
|
+
label: "单位",
|
|
1439
|
+
"min-width": "70"
|
|
1440
|
+
}, {
|
|
1441
|
+
default: a(({ row: l }) => [
|
|
1442
|
+
p(m(x(l.unit || l.unit_name)), 1)
|
|
1443
|
+
]),
|
|
1444
|
+
_: 1
|
|
1445
|
+
}),
|
|
1446
|
+
n(t(T), {
|
|
1447
|
+
label: "数量",
|
|
1448
|
+
"min-width": "70"
|
|
1449
|
+
}, {
|
|
1450
|
+
default: a(({ row: l }) => [
|
|
1451
|
+
p(m(x(l.quantity ?? l.sku_quantity)), 1)
|
|
1452
|
+
]),
|
|
1453
|
+
_: 1
|
|
1454
|
+
}),
|
|
1455
|
+
n(t(T), {
|
|
1456
|
+
label: "品类",
|
|
1457
|
+
prop: "category_path_name",
|
|
1458
|
+
"min-width": "120",
|
|
1459
|
+
"show-overflow-tooltip": ""
|
|
1460
|
+
}),
|
|
1461
|
+
n(t(T), {
|
|
1462
|
+
label: "型号",
|
|
1463
|
+
"min-width": "90"
|
|
1464
|
+
}, {
|
|
1465
|
+
default: a(({ row: l }) => [
|
|
1466
|
+
p(m(x(l.model_no || l.product_model)), 1)
|
|
1467
|
+
]),
|
|
1468
|
+
_: 1
|
|
1469
|
+
}),
|
|
1470
|
+
n(t(T), {
|
|
1471
|
+
label: "材质",
|
|
1472
|
+
prop: "material",
|
|
1473
|
+
"min-width": "90",
|
|
1474
|
+
"show-overflow-tooltip": ""
|
|
1475
|
+
}),
|
|
1476
|
+
n(t(T), {
|
|
1477
|
+
label: "单品尺寸",
|
|
1478
|
+
"min-width": "140"
|
|
1479
|
+
}, {
|
|
1480
|
+
default: a(({ row: l }) => {
|
|
1481
|
+
var g, A, U, Y;
|
|
1482
|
+
return [
|
|
1483
|
+
p(m(Z((g = l.spec_info) == null ? void 0 : g.length, (A = l.spec_info) == null ? void 0 : A.width, (U = l.spec_info) == null ? void 0 : U.height, ((Y = l.spec_info) == null ? void 0 : Y.height_unit) || "cm")), 1)
|
|
1484
|
+
];
|
|
1485
|
+
}),
|
|
1486
|
+
_: 1
|
|
1487
|
+
}),
|
|
1488
|
+
n(t(T), {
|
|
1489
|
+
label: "净重",
|
|
1490
|
+
"min-width": "80"
|
|
1491
|
+
}, {
|
|
1492
|
+
default: a(({ row: l }) => {
|
|
1493
|
+
var g, A;
|
|
1494
|
+
return [
|
|
1495
|
+
p(m(J(((g = l.spec_info) == null ? void 0 : g.net_weight) ?? l.net_weight, (A = l.spec_info) == null ? void 0 : A.product_unit)), 1)
|
|
1496
|
+
];
|
|
1497
|
+
}),
|
|
1498
|
+
_: 1
|
|
1499
|
+
}),
|
|
1500
|
+
n(t(T), {
|
|
1501
|
+
label: "毛重",
|
|
1502
|
+
"min-width": "80"
|
|
1503
|
+
}, {
|
|
1504
|
+
default: a(({ row: l }) => {
|
|
1505
|
+
var g, A;
|
|
1506
|
+
return [
|
|
1507
|
+
p(m(J(((g = l.spec_info) == null ? void 0 : g.gross_weight) ?? l.gross_weight, (A = l.spec_info) == null ? void 0 : A.product_unit)), 1)
|
|
1508
|
+
];
|
|
1509
|
+
}),
|
|
1510
|
+
_: 1
|
|
1511
|
+
})
|
|
1512
|
+
]),
|
|
1513
|
+
_: 1
|
|
1514
|
+
}, 8, ["data"])
|
|
1515
|
+
], 64)) : B("", !0),
|
|
1516
|
+
D.value ? (u(), b(P, { key: 1 }, [
|
|
1517
|
+
d[3] || (d[3] = S("div", { class: "pdd-title" }, "款式属性", -1)),
|
|
1518
|
+
n(t(ne), {
|
|
1519
|
+
data: Je.value,
|
|
1520
|
+
border: "",
|
|
1521
|
+
size: "small",
|
|
1522
|
+
class: "pdd-table"
|
|
1523
|
+
}, {
|
|
1524
|
+
default: a(() => [
|
|
1525
|
+
n(t(T), {
|
|
1526
|
+
label: "属性",
|
|
1527
|
+
prop: "attr_name",
|
|
1528
|
+
width: "160"
|
|
1529
|
+
}),
|
|
1530
|
+
n(t(T), { label: "属性值" }, {
|
|
1531
|
+
default: a(({ row: l }) => [
|
|
1532
|
+
(u(!0), b(P, null, G(l.childs || [], (g) => (u(), C(t(_e), {
|
|
1533
|
+
key: g.attr_value_code,
|
|
1534
|
+
size: "small",
|
|
1535
|
+
class: "pdd-tag"
|
|
1536
|
+
}, {
|
|
1537
|
+
default: a(() => [
|
|
1538
|
+
p(m(g.attr_value_name), 1)
|
|
1539
|
+
]),
|
|
1540
|
+
_: 2
|
|
1541
|
+
}, 1024))), 128))
|
|
1542
|
+
]),
|
|
1543
|
+
_: 1
|
|
1544
|
+
})
|
|
1545
|
+
]),
|
|
1546
|
+
_: 1
|
|
1547
|
+
}, 8, ["data"]),
|
|
1548
|
+
d[4] || (d[4] = S("div", { class: "pdd-subtitle" }, "关联产品信息", -1)),
|
|
1549
|
+
n(t(ne), {
|
|
1550
|
+
data: ht.value,
|
|
1551
|
+
border: "",
|
|
1552
|
+
size: "small",
|
|
1553
|
+
class: "pdd-table"
|
|
1554
|
+
}, {
|
|
1555
|
+
default: a(() => [
|
|
1556
|
+
n(t(T), {
|
|
1557
|
+
label: "图片",
|
|
1558
|
+
width: "70",
|
|
1559
|
+
align: "center"
|
|
1560
|
+
}, {
|
|
1561
|
+
default: a(({ row: l }) => [
|
|
1562
|
+
l.main_image ? (u(), C(t(se), {
|
|
1563
|
+
key: 0,
|
|
1564
|
+
src: l.main_image,
|
|
1565
|
+
"preview-src-list": [l.main_image],
|
|
1566
|
+
"preview-teleported": "",
|
|
1567
|
+
fit: "cover",
|
|
1568
|
+
class: "pdd-thumb"
|
|
1569
|
+
}, null, 8, ["src", "preview-src-list"])) : (u(), b("span", El, "—"))
|
|
1570
|
+
]),
|
|
1571
|
+
_: 1
|
|
1572
|
+
}),
|
|
1573
|
+
n(t(T), {
|
|
1574
|
+
label: "SKU",
|
|
1575
|
+
prop: "sku_code",
|
|
1576
|
+
"min-width": "130",
|
|
1577
|
+
"show-overflow-tooltip": ""
|
|
1578
|
+
}),
|
|
1579
|
+
n(t(T), {
|
|
1580
|
+
label: "中文品名",
|
|
1581
|
+
prop: "product_name",
|
|
1582
|
+
"min-width": "150",
|
|
1583
|
+
"show-overflow-tooltip": ""
|
|
1584
|
+
}),
|
|
1585
|
+
n(t(T), {
|
|
1586
|
+
label: "英文品名",
|
|
1587
|
+
"min-width": "150",
|
|
1588
|
+
"show-overflow-tooltip": ""
|
|
1589
|
+
}, {
|
|
1590
|
+
default: a(({ row: l }) => [
|
|
1591
|
+
p(m(x(l.product_name_en || l.product_en_name)), 1)
|
|
1592
|
+
]),
|
|
1593
|
+
_: 1
|
|
1594
|
+
}),
|
|
1595
|
+
(u(!0), b(P, null, G(Je.value, (l) => (u(), C(t(T), {
|
|
1596
|
+
key: l.attr_code,
|
|
1597
|
+
label: l.attr_name,
|
|
1598
|
+
"min-width": "100"
|
|
1599
|
+
}, {
|
|
1600
|
+
default: a(({ row: g }) => [
|
|
1601
|
+
p(m(_t(g, l)), 1)
|
|
1602
|
+
]),
|
|
1603
|
+
_: 2
|
|
1604
|
+
}, 1032, ["label"]))), 128))
|
|
1605
|
+
]),
|
|
1606
|
+
_: 1
|
|
1607
|
+
}, 8, ["data"])
|
|
1608
|
+
], 64)) : B("", !0),
|
|
1609
|
+
d[14] || (d[14] = S("div", { class: "pdd-title" }, "规格信息", -1)),
|
|
1610
|
+
n(t(oe), {
|
|
1611
|
+
column: 3,
|
|
1612
|
+
border: "",
|
|
1613
|
+
size: "small"
|
|
1614
|
+
}, {
|
|
1615
|
+
default: a(() => [
|
|
1616
|
+
n(t(w), { label: "单品毛重" }, {
|
|
1617
|
+
default: a(() => [
|
|
1618
|
+
p(m(J($.value.gross_weight, $.value.gross_weight_unit)), 1)
|
|
1619
|
+
]),
|
|
1620
|
+
_: 1
|
|
1621
|
+
}),
|
|
1622
|
+
n(t(w), { label: "单品净重" }, {
|
|
1623
|
+
default: a(() => [
|
|
1624
|
+
p(m(J($.value.net_weight, $.value.net_weight_unit)), 1)
|
|
1625
|
+
]),
|
|
1626
|
+
_: 1
|
|
1627
|
+
}),
|
|
1628
|
+
n(t(w), { label: "包装重" }, {
|
|
1629
|
+
default: a(() => [
|
|
1630
|
+
p(m(J($.value.tare_weight, $.value.tare_weight_unit)), 1)
|
|
1631
|
+
]),
|
|
1632
|
+
_: 1
|
|
1633
|
+
}),
|
|
1634
|
+
n(t(w), { label: "单品尺寸" }, {
|
|
1635
|
+
default: a(() => [
|
|
1636
|
+
p(m(Z($.value.length, $.value.width, $.value.height)), 1)
|
|
1637
|
+
]),
|
|
1638
|
+
_: 1
|
|
1639
|
+
}),
|
|
1640
|
+
n(t(w), {
|
|
1641
|
+
label: "包装尺寸",
|
|
1642
|
+
span: 2
|
|
1643
|
+
}, {
|
|
1644
|
+
default: a(() => [
|
|
1645
|
+
p(m(Z($.value.tare_length, $.value.tare_width, $.value.tare_height)), 1)
|
|
1646
|
+
]),
|
|
1647
|
+
_: 1
|
|
1648
|
+
})
|
|
1649
|
+
]),
|
|
1650
|
+
_: 1
|
|
1651
|
+
}),
|
|
1652
|
+
F.value.length ? (u(), b(P, { key: 2 }, [
|
|
1653
|
+
d[6] || (d[6] = S("div", { class: "pdd-subtitle" }, "装箱规格", -1)),
|
|
1654
|
+
n(t(ne), {
|
|
1655
|
+
data: F.value,
|
|
1656
|
+
border: "",
|
|
1657
|
+
size: "small",
|
|
1658
|
+
class: "pdd-table"
|
|
1659
|
+
}, {
|
|
1660
|
+
default: a(() => [
|
|
1661
|
+
n(t(T), {
|
|
1662
|
+
type: "index",
|
|
1663
|
+
label: "序号",
|
|
1664
|
+
width: "60",
|
|
1665
|
+
align: "center"
|
|
1666
|
+
}),
|
|
1667
|
+
n(t(T), {
|
|
1668
|
+
label: "箱规名称",
|
|
1669
|
+
prop: "box_name",
|
|
1670
|
+
"min-width": "130",
|
|
1671
|
+
"show-overflow-tooltip": ""
|
|
1672
|
+
}),
|
|
1673
|
+
n(t(T), {
|
|
1674
|
+
label: "单箱数量",
|
|
1675
|
+
"min-width": "90"
|
|
1676
|
+
}, {
|
|
1677
|
+
default: a(({ row: l }) => [
|
|
1678
|
+
p(m(l.box_quantity != null ? `${l.box_quantity} pcs` : "—"), 1)
|
|
1679
|
+
]),
|
|
1680
|
+
_: 1
|
|
1681
|
+
}),
|
|
1682
|
+
n(t(T), {
|
|
1683
|
+
label: "单箱重量",
|
|
1684
|
+
"min-width": "100"
|
|
1685
|
+
}, {
|
|
1686
|
+
default: a(({ row: l }) => [
|
|
1687
|
+
p(m(J(l.one_box_weight, l.one_box_unit)), 1)
|
|
1688
|
+
]),
|
|
1689
|
+
_: 1
|
|
1690
|
+
}),
|
|
1691
|
+
n(t(T), {
|
|
1692
|
+
label: "箱子重量",
|
|
1693
|
+
"min-width": "100"
|
|
1694
|
+
}, {
|
|
1695
|
+
default: a(({ row: l }) => [
|
|
1696
|
+
p(m(J(l.box_weight, l.box_unit)), 1)
|
|
1697
|
+
]),
|
|
1698
|
+
_: 1
|
|
1699
|
+
}),
|
|
1700
|
+
n(t(T), {
|
|
1701
|
+
label: "外箱尺寸",
|
|
1702
|
+
"min-width": "150"
|
|
1703
|
+
}, {
|
|
1704
|
+
default: a(({ row: l }) => [
|
|
1705
|
+
p(m(Z(l.box_length, l.box_width, l.box_height)), 1)
|
|
1706
|
+
]),
|
|
1707
|
+
_: 1
|
|
1708
|
+
}),
|
|
1709
|
+
n(t(T), {
|
|
1710
|
+
label: "首选",
|
|
1711
|
+
width: "70",
|
|
1712
|
+
align: "center"
|
|
1713
|
+
}, {
|
|
1714
|
+
default: a(({ row: l }) => [
|
|
1715
|
+
Number(l.is_preferred) === 1 ? (u(), C(t(_e), {
|
|
1716
|
+
key: 0,
|
|
1717
|
+
size: "small",
|
|
1718
|
+
type: "success"
|
|
1719
|
+
}, {
|
|
1720
|
+
default: a(() => [...d[5] || (d[5] = [
|
|
1721
|
+
p("首选", -1)
|
|
1722
|
+
])]),
|
|
1723
|
+
_: 1
|
|
1724
|
+
})) : (u(), b("span", Tl, "—"))
|
|
1725
|
+
]),
|
|
1726
|
+
_: 1
|
|
1727
|
+
})
|
|
1728
|
+
]),
|
|
1729
|
+
_: 1
|
|
1730
|
+
}, 8, ["data"])
|
|
1731
|
+
], 64)) : B("", !0),
|
|
1732
|
+
D.value ? B("", !0) : (u(), b(P, { key: 3 }, [
|
|
1733
|
+
d[9] || (d[9] = S("div", { class: "pdd-title" }, "采购信息", -1)),
|
|
1734
|
+
n(t(oe), {
|
|
1735
|
+
column: 3,
|
|
1736
|
+
border: "",
|
|
1737
|
+
size: "small"
|
|
1738
|
+
}, {
|
|
1739
|
+
default: a(() => [
|
|
1740
|
+
n(t(w), { label: "采购成本" }, {
|
|
1741
|
+
default: a(() => [
|
|
1742
|
+
p(m(x(N.value.purchase_cost)), 1)
|
|
1743
|
+
]),
|
|
1744
|
+
_: 1
|
|
1745
|
+
}),
|
|
1746
|
+
n(t(w), { label: "采购交期" }, {
|
|
1747
|
+
default: a(() => [
|
|
1748
|
+
p(m(N.value.delivery_day != null && N.value.delivery_day !== "" ? `${N.value.delivery_day} 天` : "—"), 1)
|
|
1749
|
+
]),
|
|
1750
|
+
_: 1
|
|
1751
|
+
}),
|
|
1752
|
+
n(t(w), { label: "采购税率" }, {
|
|
1753
|
+
default: a(() => [
|
|
1754
|
+
p(m(N.value.tax_rate != null && N.value.tax_rate !== "" ? `${N.value.tax_rate} %` : "—"), 1)
|
|
1755
|
+
]),
|
|
1756
|
+
_: 1
|
|
1757
|
+
}),
|
|
1758
|
+
n(t(w), {
|
|
1759
|
+
label: "采购备注",
|
|
1760
|
+
span: 3
|
|
1761
|
+
}, {
|
|
1762
|
+
default: a(() => [
|
|
1763
|
+
p(m(x(N.value.purchase_remark)), 1)
|
|
1764
|
+
]),
|
|
1765
|
+
_: 1
|
|
1766
|
+
})
|
|
1767
|
+
]),
|
|
1768
|
+
_: 1
|
|
1769
|
+
}),
|
|
1770
|
+
R.value.length ? (u(), b(P, { key: 0 }, [
|
|
1771
|
+
d[8] || (d[8] = S("div", { class: "pdd-subtitle" }, "报价信息", -1)),
|
|
1772
|
+
(u(!0), b(P, null, G(R.value, (l, g) => (u(), b("div", {
|
|
1773
|
+
key: g,
|
|
1774
|
+
class: "pdd-supplier"
|
|
1775
|
+
}, [
|
|
1776
|
+
S("div", Ml, [
|
|
1777
|
+
S("span", Rl, m(l.supplier_name || l.supplier_code || "—"), 1),
|
|
1778
|
+
Number(l.is_preferred) === 1 ? (u(), C(t(_e), {
|
|
1779
|
+
key: 0,
|
|
1780
|
+
size: "small",
|
|
1781
|
+
type: "success"
|
|
1782
|
+
}, {
|
|
1783
|
+
default: a(() => [...d[7] || (d[7] = [
|
|
1784
|
+
p("首选", -1)
|
|
1785
|
+
])]),
|
|
1786
|
+
_: 1
|
|
1787
|
+
})) : B("", !0),
|
|
1788
|
+
S("span", Bl, "预计交期:" + m(l.delivery_day != null && l.delivery_day !== "" ? `${l.delivery_day} 天` : "—"), 1),
|
|
1789
|
+
S("span", Vl, "报价备注:" + m(x(l.purchase_remark ?? l.remark)), 1)
|
|
1790
|
+
]),
|
|
1791
|
+
n(t(ne), {
|
|
1792
|
+
data: gt(l),
|
|
1793
|
+
border: "",
|
|
1794
|
+
size: "small"
|
|
1795
|
+
}, {
|
|
1796
|
+
default: a(() => [
|
|
1797
|
+
n(t(T), {
|
|
1798
|
+
label: "币种",
|
|
1799
|
+
prop: "currency",
|
|
1800
|
+
width: "80"
|
|
1801
|
+
}),
|
|
1802
|
+
n(t(T), {
|
|
1803
|
+
label: "含税",
|
|
1804
|
+
width: "70",
|
|
1805
|
+
align: "center"
|
|
1806
|
+
}, {
|
|
1807
|
+
default: a(({ row: A }) => [
|
|
1808
|
+
p(m(Number(A.is_tax) === 1 ? "是" : "否"), 1)
|
|
1809
|
+
]),
|
|
1810
|
+
_: 1
|
|
1811
|
+
}),
|
|
1812
|
+
n(t(T), {
|
|
1813
|
+
label: "税率",
|
|
1814
|
+
width: "80"
|
|
1815
|
+
}, {
|
|
1816
|
+
default: a(({ row: A }) => [
|
|
1817
|
+
p(m(A.tax_rate != null && A.tax_rate !== "" ? `${A.tax_rate} %` : "—"), 1)
|
|
1818
|
+
]),
|
|
1819
|
+
_: 1
|
|
1820
|
+
}),
|
|
1821
|
+
n(t(T), {
|
|
1822
|
+
label: "采购数量 ≥",
|
|
1823
|
+
"min-width": "100"
|
|
1824
|
+
}, {
|
|
1825
|
+
default: a(({ row: A }) => [
|
|
1826
|
+
p(m(x(A.purchase_quantity)), 1)
|
|
1827
|
+
]),
|
|
1828
|
+
_: 1
|
|
1829
|
+
}),
|
|
1830
|
+
n(t(T), {
|
|
1831
|
+
label: "单价",
|
|
1832
|
+
"min-width": "100"
|
|
1833
|
+
}, {
|
|
1834
|
+
default: a(({ row: A }) => [
|
|
1835
|
+
p(m(x(A.purchase_price)), 1)
|
|
1836
|
+
]),
|
|
1837
|
+
_: 1
|
|
1838
|
+
}),
|
|
1839
|
+
n(t(T), {
|
|
1840
|
+
label: "含税单价",
|
|
1841
|
+
"min-width": "100"
|
|
1842
|
+
}, {
|
|
1843
|
+
default: a(({ row: A }) => [
|
|
1844
|
+
p(m(x(A.purchase_price_tax)), 1)
|
|
1845
|
+
]),
|
|
1846
|
+
_: 1
|
|
1847
|
+
})
|
|
1848
|
+
]),
|
|
1849
|
+
_: 1
|
|
1850
|
+
}, 8, ["data"])
|
|
1851
|
+
]))), 128))
|
|
1852
|
+
], 64)) : B("", !0)
|
|
1853
|
+
], 64)),
|
|
1854
|
+
D.value ? B("", !0) : (u(), b(P, { key: 4 }, [
|
|
1855
|
+
d[10] || (d[10] = S("div", { class: "pdd-title" }, "产品图片", -1)),
|
|
1856
|
+
n(t(oe), {
|
|
1857
|
+
column: 1,
|
|
1858
|
+
border: "",
|
|
1859
|
+
size: "small"
|
|
1860
|
+
}, {
|
|
1861
|
+
default: a(() => [
|
|
1862
|
+
n(t(w), { label: "主图" }, {
|
|
1863
|
+
default: a(() => [
|
|
1864
|
+
ke.value ? (u(), C(t(se), {
|
|
1865
|
+
key: 0,
|
|
1866
|
+
src: ke.value,
|
|
1867
|
+
"preview-src-list": [ke.value],
|
|
1868
|
+
"preview-teleported": "",
|
|
1869
|
+
fit: "cover",
|
|
1870
|
+
class: "pdd-img"
|
|
1871
|
+
}, null, 8, ["src", "preview-src-list"])) : (u(), b("span", zl, "—"))
|
|
1872
|
+
]),
|
|
1873
|
+
_: 1
|
|
1874
|
+
}),
|
|
1875
|
+
n(t(w), { label: "尺寸图" }, {
|
|
1876
|
+
default: a(() => [
|
|
1877
|
+
we.value.length ? (u(!0), b(P, { key: 0 }, G(we.value, (l, g) => (u(), C(t(se), {
|
|
1878
|
+
key: g,
|
|
1879
|
+
src: l,
|
|
1880
|
+
"preview-src-list": we.value,
|
|
1881
|
+
"initial-index": g,
|
|
1882
|
+
"preview-teleported": "",
|
|
1883
|
+
fit: "cover",
|
|
1884
|
+
class: "pdd-img"
|
|
1885
|
+
}, null, 8, ["src", "preview-src-list", "initial-index"]))), 128)) : (u(), b("span", Jl, "—"))
|
|
1886
|
+
]),
|
|
1887
|
+
_: 1
|
|
1888
|
+
}),
|
|
1889
|
+
n(t(w), { label: "卖点图" }, {
|
|
1890
|
+
default: a(() => [
|
|
1891
|
+
xe.value.length ? (u(!0), b(P, { key: 0 }, G(xe.value, (l, g) => (u(), C(t(se), {
|
|
1892
|
+
key: g,
|
|
1893
|
+
src: l,
|
|
1894
|
+
"preview-src-list": xe.value,
|
|
1895
|
+
"initial-index": g,
|
|
1896
|
+
"preview-teleported": "",
|
|
1897
|
+
fit: "cover",
|
|
1898
|
+
class: "pdd-img"
|
|
1899
|
+
}, null, 8, ["src", "preview-src-list", "initial-index"]))), 128)) : (u(), b("span", Ll, "—"))
|
|
1900
|
+
]),
|
|
1901
|
+
_: 1
|
|
1902
|
+
})
|
|
1903
|
+
]),
|
|
1904
|
+
_: 1
|
|
1905
|
+
})
|
|
1906
|
+
], 64)),
|
|
1907
|
+
d[15] || (d[15] = S("div", { class: "pdd-title" }, "申报信息", -1)),
|
|
1908
|
+
n(t(oe), {
|
|
1909
|
+
column: 3,
|
|
1910
|
+
border: "",
|
|
1911
|
+
size: "small"
|
|
1912
|
+
}, {
|
|
1913
|
+
default: a(() => [
|
|
1914
|
+
n(t(w), { label: "中文申报名" }, {
|
|
1915
|
+
default: a(() => [
|
|
1916
|
+
p(m(x(V.value.declaration_name)), 1)
|
|
1917
|
+
]),
|
|
1918
|
+
_: 1
|
|
1919
|
+
}),
|
|
1920
|
+
n(t(w), { label: "英文申报名" }, {
|
|
1921
|
+
default: a(() => [
|
|
1922
|
+
p(m(x(V.value.declaration_name_en)), 1)
|
|
1923
|
+
]),
|
|
1924
|
+
_: 1
|
|
1925
|
+
}),
|
|
1926
|
+
n(t(w), { label: "中文材质" }, {
|
|
1927
|
+
default: a(() => [
|
|
1928
|
+
p(m(x(V.value.material)), 1)
|
|
1929
|
+
]),
|
|
1930
|
+
_: 1
|
|
1931
|
+
}),
|
|
1932
|
+
n(t(w), { label: "英文材质" }, {
|
|
1933
|
+
default: a(() => [
|
|
1934
|
+
p(m(x(V.value.material_en)), 1)
|
|
1935
|
+
]),
|
|
1936
|
+
_: 1
|
|
1937
|
+
}),
|
|
1938
|
+
n(t(w), { label: "中文用途" }, {
|
|
1939
|
+
default: a(() => [
|
|
1940
|
+
p(m(x(V.value.use)), 1)
|
|
1941
|
+
]),
|
|
1942
|
+
_: 1
|
|
1943
|
+
}),
|
|
1944
|
+
n(t(w), { label: "英文用途" }, {
|
|
1945
|
+
default: a(() => [
|
|
1946
|
+
p(m(x(V.value.use_en)), 1)
|
|
1947
|
+
]),
|
|
1948
|
+
_: 1
|
|
1949
|
+
}),
|
|
1950
|
+
n(t(w), { label: "中文功能" }, {
|
|
1951
|
+
default: a(() => [
|
|
1952
|
+
p(m(x(V.value.usage)), 1)
|
|
1953
|
+
]),
|
|
1954
|
+
_: 1
|
|
1955
|
+
}),
|
|
1956
|
+
n(t(w), { label: "英文功能" }, {
|
|
1957
|
+
default: a(() => [
|
|
1958
|
+
p(m(x(V.value.usage_en)), 1)
|
|
1959
|
+
]),
|
|
1960
|
+
_: 1
|
|
1961
|
+
}),
|
|
1962
|
+
n(t(w), { label: "申报价值" }, {
|
|
1963
|
+
default: a(() => [
|
|
1964
|
+
p(m(V.value.declaration_value != null && V.value.declaration_value !== "" ? `${V.value.declaration_value} ${V.value.declaration_currency_code || ""}` : "—"), 1)
|
|
1965
|
+
]),
|
|
1966
|
+
_: 1
|
|
1967
|
+
}),
|
|
1968
|
+
n(t(w), { label: "海关编码" }, {
|
|
1969
|
+
default: a(() => [
|
|
1970
|
+
p(m(x(V.value.hs_code)), 1)
|
|
1971
|
+
]),
|
|
1972
|
+
_: 1
|
|
1973
|
+
}),
|
|
1974
|
+
n(t(w), { label: "报关型号" }, {
|
|
1975
|
+
default: a(() => [
|
|
1976
|
+
p(m(x(V.value.declaration_model)), 1)
|
|
1977
|
+
]),
|
|
1978
|
+
_: 1
|
|
1979
|
+
}),
|
|
1980
|
+
n(t(w), { label: "原产地" }, {
|
|
1981
|
+
default: a(() => [
|
|
1982
|
+
p(m(x(V.value.country_of_origin)), 1)
|
|
1983
|
+
]),
|
|
1984
|
+
_: 1
|
|
1985
|
+
}),
|
|
1986
|
+
n(t(w), { label: "境内货源地" }, {
|
|
1987
|
+
default: a(() => [
|
|
1988
|
+
p(m(x(V.value.domestic_source_location)), 1)
|
|
1989
|
+
]),
|
|
1990
|
+
_: 1
|
|
1991
|
+
}),
|
|
1992
|
+
n(t(w), {
|
|
1993
|
+
label: "申报单位",
|
|
1994
|
+
span: 2
|
|
1995
|
+
}, {
|
|
1996
|
+
default: a(() => [
|
|
1997
|
+
p(m(x(ot.value)), 1)
|
|
1998
|
+
]),
|
|
1999
|
+
_: 1
|
|
2000
|
+
})
|
|
2001
|
+
]),
|
|
2002
|
+
_: 1
|
|
2003
|
+
}),
|
|
2004
|
+
d[16] || (d[16] = S("div", { class: "pdd-title" }, "质检项", -1)),
|
|
2005
|
+
n(t(oe), {
|
|
2006
|
+
column: 3,
|
|
2007
|
+
border: "",
|
|
2008
|
+
size: "small"
|
|
2009
|
+
}, {
|
|
2010
|
+
default: a(() => [
|
|
2011
|
+
n(t(w), { label: "质检方式" }, {
|
|
2012
|
+
default: a(() => [
|
|
2013
|
+
p(m(ct.value), 1)
|
|
2014
|
+
]),
|
|
2015
|
+
_: 1
|
|
2016
|
+
}),
|
|
2017
|
+
n(t(w), {
|
|
2018
|
+
label: "模板",
|
|
2019
|
+
span: 2
|
|
2020
|
+
}, {
|
|
2021
|
+
default: a(() => [
|
|
2022
|
+
p(m(x(M.value.template_name || M.value.template_id || M.value.qc_temp_id)), 1)
|
|
2023
|
+
]),
|
|
2024
|
+
_: 1
|
|
2025
|
+
}),
|
|
2026
|
+
n(t(w), {
|
|
2027
|
+
label: "图片",
|
|
2028
|
+
span: 3
|
|
2029
|
+
}, {
|
|
2030
|
+
default: a(() => [
|
|
2031
|
+
$e.value.length ? (u(!0), b(P, { key: 0 }, G($e.value, (l, g) => (u(), C(t(se), {
|
|
2032
|
+
key: g,
|
|
2033
|
+
src: l,
|
|
2034
|
+
"preview-src-list": $e.value,
|
|
2035
|
+
"initial-index": g,
|
|
2036
|
+
"preview-teleported": "",
|
|
2037
|
+
fit: "cover",
|
|
2038
|
+
class: "pdd-img"
|
|
2039
|
+
}, null, 8, ["src", "preview-src-list", "initial-index"]))), 128)) : (u(), b("span", Pl, "—"))
|
|
2040
|
+
]),
|
|
2041
|
+
_: 1
|
|
2042
|
+
}),
|
|
2043
|
+
n(t(w), {
|
|
2044
|
+
label: "附件",
|
|
2045
|
+
span: 3
|
|
2046
|
+
}, {
|
|
2047
|
+
default: a(() => [
|
|
2048
|
+
Re.value.length ? (u(!0), b(P, { key: 0 }, G(Re.value, (l, g) => (u(), b("a", {
|
|
2049
|
+
key: g,
|
|
2050
|
+
href: l.url,
|
|
2051
|
+
target: "_blank",
|
|
2052
|
+
class: "pdd-file"
|
|
2053
|
+
}, m(l.name), 9, ql))), 128)) : (u(), b("span", Fl, "—"))
|
|
2054
|
+
]),
|
|
2055
|
+
_: 1
|
|
2056
|
+
})
|
|
2057
|
+
]),
|
|
2058
|
+
_: 1
|
|
2059
|
+
}),
|
|
2060
|
+
Be.value.length ? (u(), b(P, { key: 5 }, [
|
|
2061
|
+
d[11] || (d[11] = S("div", { class: "pdd-subtitle" }, "自定义质检项", -1)),
|
|
2062
|
+
n(t(ne), {
|
|
2063
|
+
data: Be.value,
|
|
2064
|
+
border: "",
|
|
2065
|
+
size: "small",
|
|
2066
|
+
class: "pdd-table"
|
|
2067
|
+
}, {
|
|
2068
|
+
default: a(() => [
|
|
2069
|
+
n(t(T), {
|
|
2070
|
+
type: "index",
|
|
2071
|
+
label: "序号",
|
|
2072
|
+
width: "60",
|
|
2073
|
+
align: "center"
|
|
2074
|
+
}),
|
|
2075
|
+
n(t(T), {
|
|
2076
|
+
label: "质检项",
|
|
2077
|
+
prop: "qc_item",
|
|
2078
|
+
"min-width": "150",
|
|
2079
|
+
"show-overflow-tooltip": ""
|
|
2080
|
+
}),
|
|
2081
|
+
n(t(T), {
|
|
2082
|
+
label: "质检内容",
|
|
2083
|
+
prop: "qc_content",
|
|
2084
|
+
"min-width": "250",
|
|
2085
|
+
"show-overflow-tooltip": ""
|
|
2086
|
+
})
|
|
2087
|
+
]),
|
|
2088
|
+
_: 1
|
|
2089
|
+
}, 8, ["data"])
|
|
2090
|
+
], 64)) : B("", !0),
|
|
2091
|
+
ze.value.length ? (u(), b(P, { key: 6 }, [
|
|
2092
|
+
d[12] || (d[12] = S("div", { class: "pdd-title" }, "自定义属性", -1)),
|
|
2093
|
+
n(t(ne), {
|
|
2094
|
+
data: ze.value,
|
|
2095
|
+
border: "",
|
|
2096
|
+
size: "small",
|
|
2097
|
+
class: "pdd-table"
|
|
2098
|
+
}, {
|
|
2099
|
+
default: a(() => [
|
|
2100
|
+
n(t(T), {
|
|
2101
|
+
label: "属性名称",
|
|
2102
|
+
prop: "attr_name",
|
|
2103
|
+
width: "200",
|
|
2104
|
+
"show-overflow-tooltip": ""
|
|
2105
|
+
}),
|
|
2106
|
+
n(t(T), { label: "属性值" }, {
|
|
2107
|
+
default: a(({ row: l }) => [
|
|
2108
|
+
p(m(ft(l)), 1)
|
|
2109
|
+
]),
|
|
2110
|
+
_: 1
|
|
2111
|
+
})
|
|
2112
|
+
]),
|
|
2113
|
+
_: 1
|
|
2114
|
+
}, 8, ["data"])
|
|
2115
|
+
], 64)) : B("", !0)
|
|
2116
|
+
], 64)) : f.value ? B("", !0) : (u(), C(t(Tt), {
|
|
2117
|
+
key: 1,
|
|
2118
|
+
description: "暂无数据"
|
|
2119
|
+
}))
|
|
2120
|
+
])), [
|
|
2121
|
+
[t(qe), f.value]
|
|
2122
|
+
])
|
|
2123
|
+
]),
|
|
2124
|
+
_: 1
|
|
2125
|
+
}, 8, ["model-value"]));
|
|
2126
|
+
}
|
|
2127
|
+
}), Ul = /* @__PURE__ */ ae(Nl, [["__scopeId", "data-v-8f050f53"]]), Hl = {
|
|
2128
|
+
key: 1,
|
|
2129
|
+
class: "j-sku-link-empty"
|
|
2130
|
+
}, Wl = /* @__PURE__ */ ee({
|
|
2131
|
+
name: "JSkuLink",
|
|
2132
|
+
__name: "JSkuLink",
|
|
2133
|
+
props: {
|
|
2134
|
+
code: {},
|
|
2135
|
+
emptyText: { default: "-" }
|
|
2136
|
+
},
|
|
2137
|
+
emits: ["open"],
|
|
2138
|
+
setup(e, { emit: h }) {
|
|
2139
|
+
const s = e, o = h, r = j(() => String(s.code ?? "").trim() || s.emptyText), f = j(() => {
|
|
2140
|
+
const k = String(s.code ?? "").trim();
|
|
2141
|
+
return k !== "" && k !== "-";
|
|
2142
|
+
}), v = () => {
|
|
2143
|
+
f.value && o("open", String(s.code).trim());
|
|
2144
|
+
};
|
|
2145
|
+
return (k, c) => f.value ? (u(), b("span", {
|
|
2146
|
+
key: 0,
|
|
2147
|
+
class: "j-sku-link",
|
|
2148
|
+
onClick: ge(v, ["stop"])
|
|
2149
|
+
}, m(r.value), 1)) : (u(), b("span", Hl, m(e.emptyText), 1));
|
|
2150
|
+
}
|
|
2151
|
+
}), Kl = /* @__PURE__ */ ae(Wl, [["__scopeId", "data-v-7f661ba5"]]);
|
|
2152
|
+
function ma() {
|
|
2153
|
+
const e = q(!1), h = q("");
|
|
2154
|
+
return {
|
|
2155
|
+
productDetailDialogVisible: e,
|
|
2156
|
+
productDetailDialogCode: h,
|
|
2157
|
+
openProductDetailDialog: (o) => {
|
|
2158
|
+
const r = String(o ?? "").trim();
|
|
2159
|
+
!r || r === "-" || (h.value = r, e.value = !0);
|
|
2160
|
+
}
|
|
2161
|
+
};
|
|
975
2162
|
}
|
|
976
|
-
|
|
2163
|
+
const Xl = /* @__PURE__ */ ee({
|
|
2164
|
+
name: "JSearchInputDialog",
|
|
2165
|
+
__name: "JSearchInputDialog",
|
|
2166
|
+
props: /* @__PURE__ */ ye({
|
|
2167
|
+
options: { default: () => [] },
|
|
2168
|
+
placeholder: { default: "请输入关键词" },
|
|
2169
|
+
width: { default: "320px" },
|
|
2170
|
+
selectWidth: { default: "100px" },
|
|
2171
|
+
separator: { default: "," },
|
|
2172
|
+
dialogTitle: { default: "" },
|
|
2173
|
+
dialogWidth: { default: "480px" },
|
|
2174
|
+
rows: { default: 8 },
|
|
2175
|
+
textareaPlaceholder: { default: "支持换行、逗号、空格分隔,确定后自动合并" },
|
|
2176
|
+
clearOnTypeChange: { type: Boolean, default: !1 }
|
|
2177
|
+
}, {
|
|
2178
|
+
type: { default: "" },
|
|
2179
|
+
typeModifiers: {},
|
|
2180
|
+
keyword: { default: "" },
|
|
2181
|
+
keywordModifiers: {}
|
|
2182
|
+
}),
|
|
2183
|
+
emits: /* @__PURE__ */ ye(["confirm", "search"], ["update:type", "update:keyword"]),
|
|
2184
|
+
setup(e, { expose: h, emit: s }) {
|
|
2185
|
+
var _, D;
|
|
2186
|
+
const o = e, r = Se(e, "type"), f = Se(e, "keyword"), v = s, k = q(!1), c = q(""), $ = j(
|
|
2187
|
+
() => o.options.find((z) => z.value === r.value)
|
|
2188
|
+
), I = j(() => {
|
|
2189
|
+
var y;
|
|
2190
|
+
return o.dialogTitle ? o.dialogTitle : `批量输入${((y = $.value) == null ? void 0 : y.label) || "关键词"}`;
|
|
2191
|
+
}), N = (z) => {
|
|
2192
|
+
if (!z) return "";
|
|
2193
|
+
const y = z.split(/[\n\r,,;;\s\t]+/).map((O) => O.trim()).filter(Boolean), K = [], L = /* @__PURE__ */ new Set();
|
|
2194
|
+
for (const O of y)
|
|
2195
|
+
L.has(O) || (L.add(O), K.push(O));
|
|
2196
|
+
return K.join(o.separator);
|
|
2197
|
+
}, V = (z) => z ? z.split(/[\n\r,,;;\s\t.]+/).map((y) => y.trim()).filter(Boolean).join(`
|
|
2198
|
+
`) : "", M = () => {
|
|
2199
|
+
c.value = V(f.value), k.value = !0;
|
|
2200
|
+
}, E = () => {
|
|
2201
|
+
f.value = N(c.value), k.value = !1, v("confirm", {
|
|
2202
|
+
type: r.value,
|
|
2203
|
+
keyword: f.value
|
|
2204
|
+
});
|
|
2205
|
+
}, W = () => {
|
|
2206
|
+
c.value = "";
|
|
2207
|
+
};
|
|
2208
|
+
return !r.value && ((_ = o.options) != null && _.length) && (r.value = ((D = o.options[0]) == null ? void 0 : D.value) || ""), be(r, (z, y) => {
|
|
2209
|
+
o.clearOnTypeChange && z !== y && (f.value = "");
|
|
2210
|
+
}), h({
|
|
2211
|
+
reset: (z) => {
|
|
2212
|
+
var y, K;
|
|
2213
|
+
r.value = z || ((K = (y = o.options) == null ? void 0 : y[0]) == null ? void 0 : K.value) || "", f.value = "";
|
|
2214
|
+
},
|
|
2215
|
+
toParams: () => !f.value || !r.value ? {} : { [r.value]: f.value },
|
|
2216
|
+
openDialog: M
|
|
2217
|
+
}), (z, y) => {
|
|
2218
|
+
const K = de("el-option"), L = de("el-select"), O = de("el-button"), X = de("el-input"), x = de("el-dialog");
|
|
2219
|
+
return u(), b("div", {
|
|
2220
|
+
class: "j-search-input-dialog",
|
|
2221
|
+
style: ce({ width: e.width })
|
|
2222
|
+
}, [
|
|
2223
|
+
n(X, {
|
|
2224
|
+
modelValue: f.value,
|
|
2225
|
+
"onUpdate:modelValue": y[1] || (y[1] = (J) => f.value = J),
|
|
2226
|
+
placeholder: e.placeholder,
|
|
2227
|
+
clearable: "",
|
|
2228
|
+
class: "j-search-input-dialog__input",
|
|
2229
|
+
onKeyup: y[2] || (y[2] = $t((J) => v("search"), ["enter"]))
|
|
2230
|
+
}, {
|
|
2231
|
+
prepend: a(() => [
|
|
2232
|
+
n(L, {
|
|
2233
|
+
modelValue: r.value,
|
|
2234
|
+
"onUpdate:modelValue": y[0] || (y[0] = (J) => r.value = J),
|
|
2235
|
+
style: ce({ width: e.selectWidth }),
|
|
2236
|
+
disabled: !e.options.length
|
|
2237
|
+
}, {
|
|
2238
|
+
default: a(() => [
|
|
2239
|
+
(u(!0), b(P, null, G(e.options, (J) => (u(), C(K, {
|
|
2240
|
+
key: J.value,
|
|
2241
|
+
label: J.label,
|
|
2242
|
+
value: J.value
|
|
2243
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
2244
|
+
]),
|
|
2245
|
+
_: 1
|
|
2246
|
+
}, 8, ["modelValue", "style", "disabled"])
|
|
2247
|
+
]),
|
|
2248
|
+
append: a(() => [
|
|
2249
|
+
n(O, {
|
|
2250
|
+
icon: t(Vt),
|
|
2251
|
+
title: I.value,
|
|
2252
|
+
onClick: M
|
|
2253
|
+
}, null, 8, ["icon", "title"])
|
|
2254
|
+
]),
|
|
2255
|
+
_: 1
|
|
2256
|
+
}, 8, ["modelValue", "placeholder"]),
|
|
2257
|
+
n(x, {
|
|
2258
|
+
modelValue: k.value,
|
|
2259
|
+
"onUpdate:modelValue": y[5] || (y[5] = (J) => k.value = J),
|
|
2260
|
+
title: I.value,
|
|
2261
|
+
width: e.dialogWidth,
|
|
2262
|
+
"append-to-body": "",
|
|
2263
|
+
"destroy-on-close": "",
|
|
2264
|
+
"close-on-click-modal": !1,
|
|
2265
|
+
onClosed: W
|
|
2266
|
+
}, {
|
|
2267
|
+
footer: a(() => [
|
|
2268
|
+
n(O, {
|
|
2269
|
+
onClick: y[4] || (y[4] = (J) => k.value = !1)
|
|
2270
|
+
}, {
|
|
2271
|
+
default: a(() => [...y[6] || (y[6] = [
|
|
2272
|
+
p("取消", -1)
|
|
2273
|
+
])]),
|
|
2274
|
+
_: 1
|
|
2275
|
+
}),
|
|
2276
|
+
n(O, {
|
|
2277
|
+
type: "primary",
|
|
2278
|
+
onClick: E
|
|
2279
|
+
}, {
|
|
2280
|
+
default: a(() => [...y[7] || (y[7] = [
|
|
2281
|
+
p("确定", -1)
|
|
2282
|
+
])]),
|
|
2283
|
+
_: 1
|
|
2284
|
+
})
|
|
2285
|
+
]),
|
|
2286
|
+
default: a(() => [
|
|
2287
|
+
n(X, {
|
|
2288
|
+
modelValue: c.value,
|
|
2289
|
+
"onUpdate:modelValue": y[3] || (y[3] = (J) => c.value = J),
|
|
2290
|
+
type: "textarea",
|
|
2291
|
+
rows: e.rows,
|
|
2292
|
+
placeholder: e.textareaPlaceholder,
|
|
2293
|
+
resize: "vertical"
|
|
2294
|
+
}, null, 8, ["modelValue", "rows", "placeholder"])
|
|
2295
|
+
]),
|
|
2296
|
+
_: 1
|
|
2297
|
+
}, 8, ["modelValue", "title", "width"])
|
|
2298
|
+
], 4);
|
|
2299
|
+
};
|
|
2300
|
+
}
|
|
2301
|
+
}), Gl = /* @__PURE__ */ ae(Xl, [["__scopeId", "data-v-29890413"]]);
|
|
2302
|
+
function Ee(e, h) {
|
|
2303
|
+
return Array.isArray(e) ? e.map((s) => Ee(s, h)) : e !== null && typeof e == "object" && !(e instanceof Date) ? h(e) : e;
|
|
2304
|
+
}
|
|
2305
|
+
function Zl(e, h = []) {
|
|
977
2306
|
return Object.fromEntries(
|
|
978
|
-
Object.entries(e).map(([
|
|
979
|
-
const
|
|
980
|
-
return
|
|
2307
|
+
Object.entries(e).map(([s, o]) => {
|
|
2308
|
+
const r = Ee(o, (v) => Zl(v, h));
|
|
2309
|
+
return h.includes(s) ? [s, r] : [s.replace(/([A-Z])/g, "_$1").toLowerCase(), r];
|
|
981
2310
|
})
|
|
982
2311
|
);
|
|
983
2312
|
}
|
|
984
|
-
function
|
|
2313
|
+
function Ql(e, h = []) {
|
|
985
2314
|
return Object.fromEntries(
|
|
986
|
-
Object.entries(e).map(([
|
|
987
|
-
const
|
|
988
|
-
return
|
|
2315
|
+
Object.entries(e).map(([s, o]) => {
|
|
2316
|
+
const r = Ee(o, (v) => Ql(v, h));
|
|
2317
|
+
return h.includes(s) ? [s, r] : [s.replace(/_([a-z])/g, (v, k) => k.toUpperCase()), r];
|
|
989
2318
|
})
|
|
990
2319
|
);
|
|
991
2320
|
}
|
|
992
|
-
function
|
|
993
|
-
const
|
|
994
|
-
for (const
|
|
995
|
-
|
|
996
|
-
return
|
|
2321
|
+
function pa(e, h) {
|
|
2322
|
+
const s = {};
|
|
2323
|
+
for (const o of h)
|
|
2324
|
+
o in e && (s[o] = e[o]);
|
|
2325
|
+
return s;
|
|
997
2326
|
}
|
|
998
|
-
function
|
|
999
|
-
const
|
|
1000
|
-
for (const
|
|
1001
|
-
delete
|
|
1002
|
-
return
|
|
2327
|
+
function fa(e, h) {
|
|
2328
|
+
const s = { ...e };
|
|
2329
|
+
for (const o of h)
|
|
2330
|
+
delete s[o];
|
|
2331
|
+
return s;
|
|
1003
2332
|
}
|
|
1004
|
-
function
|
|
2333
|
+
function Ne(e) {
|
|
1005
2334
|
if (e === null || typeof e != "object") return e;
|
|
1006
2335
|
if (e instanceof Date) return new Date(e.getTime());
|
|
1007
2336
|
if (e instanceof RegExp) return new RegExp(e.source, e.flags);
|
|
1008
|
-
if (Array.isArray(e)) return e.map((
|
|
1009
|
-
const
|
|
1010
|
-
for (const
|
|
1011
|
-
s
|
|
1012
|
-
return
|
|
2337
|
+
if (Array.isArray(e)) return e.map((s) => Ne(s));
|
|
2338
|
+
const h = {};
|
|
2339
|
+
for (const s of Object.keys(e))
|
|
2340
|
+
h[s] = Ne(e[s]);
|
|
2341
|
+
return h;
|
|
1013
2342
|
}
|
|
1014
|
-
function
|
|
1015
|
-
const
|
|
1016
|
-
for (const [
|
|
1017
|
-
if (!(
|
|
1018
|
-
if (
|
|
1019
|
-
const
|
|
1020
|
-
Object.keys(
|
|
2343
|
+
function Yl(e, h = !1) {
|
|
2344
|
+
const s = {};
|
|
2345
|
+
for (const [o, r] of Object.entries(e))
|
|
2346
|
+
if (!(r == null || r === ""))
|
|
2347
|
+
if (h && typeof r == "object" && !Array.isArray(r) && !(r instanceof Date)) {
|
|
2348
|
+
const f = Yl(r, !0);
|
|
2349
|
+
Object.keys(f).length > 0 && (s[o] = f);
|
|
1021
2350
|
} else
|
|
1022
|
-
|
|
1023
|
-
return
|
|
2351
|
+
s[o] = r;
|
|
2352
|
+
return s;
|
|
1024
2353
|
}
|
|
1025
|
-
function
|
|
1026
|
-
const
|
|
1027
|
-
for (const [
|
|
1028
|
-
const
|
|
1029
|
-
|
|
2354
|
+
function ea(e, h = "", s = ".") {
|
|
2355
|
+
const o = {};
|
|
2356
|
+
for (const [r, f] of Object.entries(e)) {
|
|
2357
|
+
const v = h ? `${h}${s}${r}` : r;
|
|
2358
|
+
f !== null && typeof f == "object" && !Array.isArray(f) && !(f instanceof Date) ? Object.assign(o, ea(f, v, s)) : o[v] = f;
|
|
1030
2359
|
}
|
|
1031
|
-
return
|
|
2360
|
+
return o;
|
|
1032
2361
|
}
|
|
1033
|
-
function
|
|
1034
|
-
const
|
|
1035
|
-
for (const [
|
|
1036
|
-
const
|
|
1037
|
-
let
|
|
1038
|
-
for (let
|
|
1039
|
-
const c =
|
|
1040
|
-
c in
|
|
2362
|
+
function va(e, h = ".") {
|
|
2363
|
+
const s = {};
|
|
2364
|
+
for (const [o, r] of Object.entries(e)) {
|
|
2365
|
+
const f = o.split(h);
|
|
2366
|
+
let v = s;
|
|
2367
|
+
for (let k = 0; k < f.length - 1; k++) {
|
|
2368
|
+
const c = f[k];
|
|
2369
|
+
c in v || (v[c] = {}), v = v[c];
|
|
1041
2370
|
}
|
|
1042
|
-
|
|
2371
|
+
v[f[f.length - 1]] = r;
|
|
1043
2372
|
}
|
|
1044
|
-
return
|
|
2373
|
+
return s;
|
|
1045
2374
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return Object.entries(e).map(([
|
|
1048
|
-
id:
|
|
1049
|
-
label:
|
|
1050
|
-
prop:
|
|
2375
|
+
function ha(e) {
|
|
2376
|
+
return Object.entries(e).map(([h, s]) => ({
|
|
2377
|
+
id: h,
|
|
2378
|
+
label: s,
|
|
2379
|
+
prop: h
|
|
1051
2380
|
}));
|
|
1052
2381
|
}
|
|
1053
|
-
function
|
|
2382
|
+
function ta(e, h) {
|
|
1054
2383
|
if (!e) return null;
|
|
1055
|
-
let
|
|
1056
|
-
|
|
1057
|
-
const
|
|
1058
|
-
return
|
|
2384
|
+
let s = e.replace(/^@\//, "");
|
|
2385
|
+
s.startsWith("views/") || (s = `views/${s}`), s.endsWith(".vue") || (s = `${s}.vue`);
|
|
2386
|
+
const o = `/src/${s}`;
|
|
2387
|
+
return h[o] ?? h["/src/views/common/NotFound.vue"] ?? null;
|
|
1059
2388
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const
|
|
1062
|
-
return e.forEach((
|
|
1063
|
-
const
|
|
1064
|
-
if (!
|
|
1065
|
-
|
|
2389
|
+
function la(e) {
|
|
2390
|
+
const h = /* @__PURE__ */ new Map(), s = [];
|
|
2391
|
+
return e.forEach((o) => h.set(o.name, { ...o, children: [] })), e.forEach((o) => {
|
|
2392
|
+
const r = h.get(o.name);
|
|
2393
|
+
if (!o.parent_name)
|
|
2394
|
+
s.push(r);
|
|
1066
2395
|
else {
|
|
1067
|
-
const
|
|
1068
|
-
|
|
2396
|
+
const f = h.get(o.parent_name);
|
|
2397
|
+
f ? (f.children ?? (f.children = []), f.children.push(r)) : s.push(r);
|
|
1069
2398
|
}
|
|
1070
|
-
}),
|
|
2399
|
+
}), s;
|
|
1071
2400
|
}
|
|
1072
|
-
function
|
|
1073
|
-
return e.filter((
|
|
1074
|
-
var
|
|
1075
|
-
const
|
|
1076
|
-
path:
|
|
1077
|
-
name:
|
|
2401
|
+
function st(e, h, s) {
|
|
2402
|
+
return e.filter((o) => !s || !o.project || o.project === s).map((o) => {
|
|
2403
|
+
var v;
|
|
2404
|
+
const r = {
|
|
2405
|
+
path: o.path,
|
|
2406
|
+
name: o.name,
|
|
1078
2407
|
meta: {
|
|
1079
|
-
requiresAuth:
|
|
1080
|
-
title:
|
|
1081
|
-
permissions:
|
|
1082
|
-
params:
|
|
2408
|
+
requiresAuth: o.requiresAuth === 1,
|
|
2409
|
+
title: o.title,
|
|
2410
|
+
permissions: o.permissions ? o.permissions.split(",").map((k) => k.trim()).filter(Boolean) : [],
|
|
2411
|
+
params: o.params ? o.params.split("&").map((k) => k.trim()).filter(Boolean) : []
|
|
1083
2412
|
}
|
|
1084
|
-
},
|
|
1085
|
-
return
|
|
2413
|
+
}, f = ta(o.component, h);
|
|
2414
|
+
return f && (r.component = f), o.redirect && (r.redirect = o.redirect), (v = o.children) != null && v.length && (r.children = st(o.children, h, s)), r;
|
|
1086
2415
|
});
|
|
1087
2416
|
}
|
|
1088
|
-
function
|
|
1089
|
-
const
|
|
1090
|
-
e.forEach((
|
|
1091
|
-
const
|
|
1092
|
-
let
|
|
2417
|
+
function _a(e, h, s, o) {
|
|
2418
|
+
const r = /* @__PURE__ */ new Map();
|
|
2419
|
+
e.forEach((v) => r.set(v.name, v));
|
|
2420
|
+
const f = (v) => {
|
|
2421
|
+
let k = v.parent_name;
|
|
1093
2422
|
const c = /* @__PURE__ */ new Set();
|
|
1094
|
-
for (;
|
|
1095
|
-
if (
|
|
1096
|
-
if (c.has(
|
|
1097
|
-
c.add(
|
|
1098
|
-
const
|
|
1099
|
-
if (
|
|
1100
|
-
|
|
2423
|
+
for (; k; ) {
|
|
2424
|
+
if (k === s) return !0;
|
|
2425
|
+
if (c.has(k)) return !1;
|
|
2426
|
+
c.add(k);
|
|
2427
|
+
const $ = r.get(k);
|
|
2428
|
+
if (!$) return !1;
|
|
2429
|
+
k = $.parent_name;
|
|
1101
2430
|
}
|
|
1102
2431
|
return !1;
|
|
1103
2432
|
};
|
|
1104
2433
|
return e.filter(
|
|
1105
|
-
(
|
|
1106
|
-
).sort((
|
|
2434
|
+
(v) => v.name !== s && v.is_show === 1 && v.component && h.includes(v.code) && f(v) && (!o || !v.project || v.project === o)
|
|
2435
|
+
).sort((v, k) => v.sorts - k.sorts)[0];
|
|
1107
2436
|
}
|
|
1108
|
-
|
|
1109
|
-
const
|
|
1110
|
-
},
|
|
1111
|
-
},
|
|
2437
|
+
Ie.configure({ showSpinner: !1 });
|
|
2438
|
+
const Ue = (...e) => {
|
|
2439
|
+
}, He = (...e) => {
|
|
2440
|
+
}, aa = (...e) => {
|
|
1112
2441
|
console.error("[Router]", ...e);
|
|
1113
2442
|
};
|
|
1114
|
-
function
|
|
2443
|
+
function ga(e, h) {
|
|
1115
2444
|
const {
|
|
1116
|
-
getRouteStore:
|
|
1117
|
-
getPermissionStore:
|
|
1118
|
-
getUserStore:
|
|
1119
|
-
isAuthenticated:
|
|
1120
|
-
viewModules:
|
|
1121
|
-
homeComponent:
|
|
2445
|
+
getRouteStore: s,
|
|
2446
|
+
getPermissionStore: o,
|
|
2447
|
+
getUserStore: r,
|
|
2448
|
+
isAuthenticated: f,
|
|
2449
|
+
viewModules: v,
|
|
2450
|
+
homeComponent: k,
|
|
1122
2451
|
notFoundComponent: c,
|
|
1123
|
-
projectName:
|
|
1124
|
-
layoutRouteName:
|
|
1125
|
-
publicPaths:
|
|
1126
|
-
loginRouteName:
|
|
1127
|
-
forbiddenRouteName:
|
|
1128
|
-
homeRouteName:
|
|
1129
|
-
homeRoutePath:
|
|
1130
|
-
homeTitle:
|
|
1131
|
-
noPermissionMessage:
|
|
1132
|
-
} =
|
|
1133
|
-
let
|
|
1134
|
-
function
|
|
1135
|
-
const
|
|
1136
|
-
O.forEach((
|
|
1137
|
-
|
|
1138
|
-
}), e.hasRoute(
|
|
1139
|
-
path:
|
|
1140
|
-
name:
|
|
1141
|
-
component:
|
|
1142
|
-
meta: { title:
|
|
2452
|
+
projectName: $,
|
|
2453
|
+
layoutRouteName: I = "Layout",
|
|
2454
|
+
publicPaths: N = ["/login", "/register"],
|
|
2455
|
+
loginRouteName: V = "login",
|
|
2456
|
+
forbiddenRouteName: M = "Forbidden",
|
|
2457
|
+
homeRouteName: E = "Home",
|
|
2458
|
+
homeRoutePath: W = "home",
|
|
2459
|
+
homeTitle: F = "首页",
|
|
2460
|
+
noPermissionMessage: R = "暂无权限"
|
|
2461
|
+
} = h;
|
|
2462
|
+
let _ = !1;
|
|
2463
|
+
function D(y) {
|
|
2464
|
+
const L = la(y).find((X) => X.name === I), O = L != null && L.children ? st(L.children, v, $) : [];
|
|
2465
|
+
O.forEach((X) => {
|
|
2466
|
+
X.name && e.hasRoute(X.name) || (e.addRoute(I, X), Ue(`Add route: ${String(X.name)} -> ${X.path}`));
|
|
2467
|
+
}), e.hasRoute(E) || e.addRoute(I, {
|
|
2468
|
+
path: W,
|
|
2469
|
+
name: E,
|
|
2470
|
+
component: k,
|
|
2471
|
+
meta: { title: F }
|
|
1143
2472
|
}), e.hasRoute("NotFound") || e.addRoute({
|
|
1144
2473
|
path: "/:pathMatch(.*)*",
|
|
1145
2474
|
name: "NotFound",
|
|
1146
2475
|
component: c
|
|
1147
|
-
}),
|
|
2476
|
+
}), Ue(`Dynamic routes added: ${O.length}`);
|
|
1148
2477
|
}
|
|
1149
|
-
function
|
|
1150
|
-
if (
|
|
1151
|
-
|
|
2478
|
+
function z(y, K) {
|
|
2479
|
+
if (y === E) {
|
|
2480
|
+
K();
|
|
1152
2481
|
return;
|
|
1153
2482
|
}
|
|
1154
|
-
e.hasRoute(
|
|
2483
|
+
e.hasRoute(E) ? K({ name: E, replace: !0 }) : K();
|
|
1155
2484
|
}
|
|
1156
|
-
return e.beforeEach(async (
|
|
1157
|
-
if (
|
|
2485
|
+
return e.beforeEach(async (y, K, L) => {
|
|
2486
|
+
if (Ie.start(), f() && !_)
|
|
1158
2487
|
try {
|
|
1159
|
-
const
|
|
1160
|
-
if (await
|
|
1161
|
-
|
|
2488
|
+
const J = s(), Z = o();
|
|
2489
|
+
if (await J.initRoutes(), await Z.loadUserPermissions(), D(J.backendRoutes), _ = !0, y.path === "/" || y.path === "") {
|
|
2490
|
+
z(y.name, L);
|
|
1162
2491
|
return;
|
|
1163
2492
|
}
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
2493
|
+
if (y.name === I) {
|
|
2494
|
+
z(y.name, L);
|
|
1166
2495
|
return;
|
|
1167
2496
|
}
|
|
1168
|
-
const
|
|
1169
|
-
if (
|
|
1170
|
-
|
|
2497
|
+
const Q = J.backendRoutes.find((me) => me.name === y.name);
|
|
2498
|
+
if (Q && !Z.routePermissions.includes(Q.code)) {
|
|
2499
|
+
He("No route permission:", y.path), L({ name: M, replace: !0 });
|
|
1171
2500
|
return;
|
|
1172
2501
|
}
|
|
1173
|
-
|
|
1174
|
-
path:
|
|
1175
|
-
query:
|
|
1176
|
-
hash:
|
|
2502
|
+
L({
|
|
2503
|
+
path: y.path,
|
|
2504
|
+
query: y.query,
|
|
2505
|
+
hash: y.hash,
|
|
1177
2506
|
replace: !0
|
|
1178
2507
|
});
|
|
1179
2508
|
return;
|
|
1180
|
-
} catch (
|
|
1181
|
-
|
|
2509
|
+
} catch (J) {
|
|
2510
|
+
aa("Failed to load route permissions:", J), _ = !1, await r().logout(), L({ name: V, replace: !0 });
|
|
1182
2511
|
return;
|
|
1183
2512
|
}
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
2513
|
+
if (N.includes(y.path)) {
|
|
2514
|
+
f() ? L({ path: "/", replace: !0 }) : L();
|
|
1186
2515
|
return;
|
|
1187
2516
|
}
|
|
1188
|
-
if (!
|
|
1189
|
-
|
|
2517
|
+
if (!f()) {
|
|
2518
|
+
L({ name: V, replace: !0 });
|
|
1190
2519
|
return;
|
|
1191
2520
|
}
|
|
1192
|
-
const O =
|
|
1193
|
-
if (
|
|
1194
|
-
|
|
2521
|
+
const O = o(), X = s();
|
|
2522
|
+
if (y.name === E) {
|
|
2523
|
+
L();
|
|
1195
2524
|
return;
|
|
1196
2525
|
}
|
|
1197
2526
|
if (O.routePermissions.length === 0) {
|
|
1198
|
-
|
|
2527
|
+
y.path !== "/" ? (H.warning(R), L({ path: "/", replace: !0 })) : z(y.name, L);
|
|
1199
2528
|
return;
|
|
1200
2529
|
}
|
|
1201
|
-
if (
|
|
1202
|
-
|
|
2530
|
+
if (y.path === "/") {
|
|
2531
|
+
z(y.name, L);
|
|
1203
2532
|
return;
|
|
1204
2533
|
}
|
|
1205
|
-
if (
|
|
1206
|
-
|
|
2534
|
+
if (y.name === I) {
|
|
2535
|
+
z(y.name, L);
|
|
1207
2536
|
return;
|
|
1208
2537
|
}
|
|
1209
|
-
const
|
|
1210
|
-
if (
|
|
1211
|
-
|
|
2538
|
+
const x = X.backendRoutes.find((J) => J.name === y.name);
|
|
2539
|
+
if (x && !O.routePermissions.includes(x.code)) {
|
|
2540
|
+
He("No route permission:", y.path), L({ name: M, replace: !0 });
|
|
1212
2541
|
return;
|
|
1213
2542
|
}
|
|
1214
|
-
|
|
1215
|
-
}), e.afterEach(() =>
|
|
2543
|
+
L();
|
|
2544
|
+
}), e.afterEach(() => Ie.done()), {
|
|
1216
2545
|
resetRouterState: () => {
|
|
1217
|
-
|
|
2546
|
+
_ = !1;
|
|
1218
2547
|
}
|
|
1219
2548
|
};
|
|
1220
2549
|
}
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1223
|
-
|
|
2550
|
+
const na = [
|
|
2551
|
+
Ot,
|
|
2552
|
+
Yt,
|
|
2553
|
+
ve,
|
|
2554
|
+
ll,
|
|
2555
|
+
dl,
|
|
2556
|
+
Ye,
|
|
2557
|
+
Qe,
|
|
2558
|
+
Cl,
|
|
2559
|
+
Ul,
|
|
2560
|
+
Kl,
|
|
2561
|
+
Gl
|
|
2562
|
+
], sa = (e) => {
|
|
2563
|
+
na.forEach((h) => {
|
|
2564
|
+
e.component(h.name ?? h.__name ?? "", h);
|
|
1224
2565
|
});
|
|
1225
|
-
},
|
|
2566
|
+
}, ya = { install: sa };
|
|
1226
2567
|
export {
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
2568
|
+
Cl as JAdminLayout,
|
|
2569
|
+
Ot as JButton,
|
|
2570
|
+
ve as JIconRender,
|
|
2571
|
+
dl as JImportExcel,
|
|
2572
|
+
Ul as JProductDetailDialog,
|
|
2573
|
+
ll as JSearchHeader,
|
|
2574
|
+
Gl as JSearchInputDialog,
|
|
2575
|
+
Qe as JSideMenuItem,
|
|
2576
|
+
Ye as JSidebar,
|
|
2577
|
+
Kl as JSkuLink,
|
|
2578
|
+
Yt as JUploadImg,
|
|
2579
|
+
la as buildRouteTree,
|
|
2580
|
+
ga as createRouterGuard,
|
|
2581
|
+
Ne as deepClone,
|
|
2582
|
+
ya as default,
|
|
2583
|
+
Yl as filterEmpty,
|
|
2584
|
+
_a as findFirstAllowedRoute,
|
|
2585
|
+
ea as flatten,
|
|
2586
|
+
ta as getComponentImport,
|
|
2587
|
+
fa as omit,
|
|
2588
|
+
pa as pick,
|
|
2589
|
+
Ql as toCamelCase,
|
|
2590
|
+
Zl as toSnakeCase,
|
|
2591
|
+
ha as toTableColumns,
|
|
2592
|
+
st as transformBackendRoutes,
|
|
2593
|
+
va as unflatten,
|
|
2594
|
+
ma as useProductDetailDialog
|
|
1250
2595
|
};
|
|
1251
2596
|
//# sourceMappingURL=index.js.map
|