Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
acdec884
Commit
acdec884
authored
Jun 09, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
fix: 确认接单复制结果优先使用 errorSkuList 输出 SKU See merge request
!208
parents
ad38ddd5
dc385373
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
22 deletions
+32
-22
src/types/api/order/common/index.ts
+1
-0
src/utils/index.ts
+15
-8
src/views/order/components/ResultInfo.vue
+16
-14
No files found.
src/types/api/order/common/index.ts
View file @
acdec884
...
@@ -3,4 +3,5 @@ export interface ResultInfoDataItem {
...
@@ -3,4 +3,5 @@ export interface ResultInfoDataItem {
status
?:
boolean
status
?:
boolean
factoryOrderNumber
?:
string
factoryOrderNumber
?:
string
message
?:
string
message
?:
string
errorSkuList
?:
string
[]
}
}
src/utils/index.ts
View file @
acdec884
...
@@ -13,14 +13,21 @@ export function val<T>(data: T, key: string | ((data: T) => any)) {
...
@@ -13,14 +13,21 @@ export function val<T>(data: T, key: string | ((data: T) => any)) {
* @param {*} text
* @param {*} text
*/
*/
export
function
copyText
(
text
:
string
)
{
export
function
copyText
(
text
:
string
)
{
const
oInput
=
document
.
createElement
(
'input'
)
if
(
navigator
.
clipboard
?.
writeText
)
{
oInput
.
value
=
text
navigator
.
clipboard
.
writeText
(
text
).
then
(()
=>
{
document
.
body
.
appendChild
(
oInput
)
ElMessage
.
success
(
'复制成功'
)
oInput
.
select
()
// 选择对象
})
document
.
execCommand
(
'Copy'
)
// 执行浏览器复制命令
return
oInput
.
className
=
'oInput'
}
oInput
.
style
.
display
=
'none'
document
.
body
.
removeChild
(
oInput
)
const
oTextarea
=
document
.
createElement
(
'textarea'
)
oTextarea
.
value
=
text
oTextarea
.
style
.
position
=
'fixed'
oTextarea
.
style
.
left
=
'-9999px'
document
.
body
.
appendChild
(
oTextarea
)
oTextarea
.
select
()
document
.
execCommand
(
'Copy'
)
document
.
body
.
removeChild
(
oTextarea
)
ElMessage
.
success
(
'复制成功'
)
ElMessage
.
success
(
'复制成功'
)
}
}
...
...
src/views/order/components/ResultInfo.vue
View file @
acdec884
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<div
style=
"height: 50vh; overflow: auto"
>
<div
style=
"height: 50vh; overflow: auto"
>
<div
style=
"margin: 15px 0"
></div>
<div
style=
"margin: 15px 0"
></div>
<el-checkbox-group
v-model=
"selectedList"
@
change=
"checkChange"
>
<el-checkbox-group
v-model=
"selectedList"
@
change=
"checkChange"
>
<div
style=
"display: block"
v-for=
"(item, index) in list"
:key=
"index
"
>
<div
v-for=
"(item, index) in list"
:key=
"index"
style=
"display: block
"
>
<el-checkbox
:value=
"item"
style=
"user-select: text;"
>
<el-checkbox
:value=
"item"
style=
"user-select: text;"
>
{{
'工厂订单号:'
+
item
.
factoryOrderNumber
+
' '
+
item
.
message
}}
{{
'工厂订单号:'
+
item
.
factoryOrderNumber
+
' '
+
item
.
message
}}
</el-checkbox>
</el-checkbox>
...
@@ -108,24 +108,26 @@ const resultfilter = (bool: boolean) => {
...
@@ -108,24 +108,26 @@ const resultfilter = (bool: boolean) => {
isIndeterminate
.
value
=
checkedCount
>
0
&&
checkedCount
<
props
.
list
.
length
isIndeterminate
.
value
=
checkedCount
>
0
&&
checkedCount
<
props
.
list
.
length
}
}
// 复制店铺单号
const
formatCopyText
=
(
item
:
ResultInfoDataItem
)
=>
{
if
(
item
.
errorSkuList
?.
length
)
{
return
item
.
errorSkuList
.
join
(
','
)
}
return
(
'工厂订单号:'
+
item
.
factoryOrderNumber
+
','
+
'处理结果:'
+
item
.
message
)
}
// 复制结果
const
copyAllCode
=
()
=>
{
const
copyAllCode
=
()
=>
{
if
(
!
selectedList
.
value
.
length
)
{
if
(
!
selectedList
.
value
.
length
)
{
return
ElMessage
.
warning
(
'请先选择数据'
)
return
ElMessage
.
warning
(
'请先选择数据'
)
}
}
const
str
=
selectedList
.
value
const
str
=
selectedList
.
value
.
map
(
formatCopyText
).
join
(
'
\
n'
)
.
map
(
(
el
)
=>
'工厂订单号:'
+
el
[
'factoryOrderNumber'
]
+
','
+
'处理结果:'
+
el
[
'message'
],
)
.
join
(
'
\
n'
)
console
.
log
(
'复制店铺单号'
,
str
)
copyText
(
str
)
copyText
(
str
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment