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