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
02402c38
Commit
02402c38
authored
Aug 17, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 打印操作单报错提示优化 #1012634
parent
9bf605b9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
13 deletions
+97
-13
src/api/factoryOrderNew.ts
+2
-1
src/types/api/factoryOrderNew/index.ts
+14
-0
src/views/order/components/ResultInfo.vue
+47
-9
src/views/order/factoryOrderNew/component/BatchManageTable.vue
+34
-3
No files found.
src/api/factoryOrderNew.ts
View file @
02402c38
...
...
@@ -3,6 +3,7 @@ import type { BasePaginationData, BaseRespData } from '@/types/api'
import
type
{
BatchManageData
,
FactoryOrderNewListData
,
PrintProductionPdfResult
,
LogListData
,
operateOrderListData
,
OrderInventoryData
,
...
...
@@ -439,7 +440,7 @@ export function printPickPdfByBatchNumberApi(params: {
export
function
printProductionPdfByBatchNumberApi
(
params
:
{
batchArrangeNumber
:
string
})
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
PrintProductionPdfResult
>>
(
`factory/podOrderOperation/printProductionPdfByBatchNumber`
,
{
params
,
...
...
src/types/api/factoryOrderNew/index.ts
View file @
02402c38
...
...
@@ -211,6 +211,20 @@ export interface BatchManageData {
type
?:
string
}
export
interface
BatchReturnVOItem
{
id
:
number
status
:
boolean
number
?:
string
message
?:
string
}
export
interface
PrintProductionPdfResult
{
id
:
number
status
:
boolean
number
?:
string
message
?:
string
batchReturnVOList
:
BatchReturnVOItem
[]
|
null
}
export
interface
RestockData
{
id
:
number
factoryId
:
number
...
...
src/views/order/components/ResultInfo.vue
View file @
02402c38
<
template
>
<el-dialog
title=
"处理结果"
v-model=
"resultDialog"
title=
"处理结果"
width=
"60%"
:close-on-click-modal=
"false"
@
closed=
"closedFn"
>
<div
style=
"display: flex"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
:indeterminate=
"isIndeterminate"
style=
"margin-right: 20px"
@
change=
"checkAllChange"
>
{{
'全选'
}}
</el-checkbox>
<el-button
v-if=
"config.isShowButtons"
type=
"success"
style=
"margin-left: 20px"
@
click=
"resultfilter(true)"
>
{{
'选择正常'
}}
</el-button>
<el-button
type=
"danger"
@
click=
"resultfilter(false)"
>
<el-button
v-if=
"config.isShowButtons"
type=
"danger"
@
click=
"resultfilter(false)"
>
{{
'选择异常'
}}
</el-button>
<el-button
type=
"success"
@
click=
"copyAllCode()"
>
<el-button
v-if=
"isCopyResult"
type=
"success"
@
click=
"copyAllCode()"
>
{{
'复制结果'
}}
</el-button>
<el-button
v-if=
"isCopyNumber"
type=
"success"
@
click=
"copyNumberCode()"
>
{{
'复制'
+
config
.
numberTitle
}}
</el-button>
</div>
<div
style=
"height: 50vh; overflow: auto"
>
<div
style=
"margin: 15px 0"
></div>
<el-checkbox-group
v-model=
"selectedList"
@
change=
"checkChange"
>
<div
v-for=
"(item, index) in list"
:key=
"index"
style=
"display: block"
>
<el-checkbox
:value=
"item"
style=
"user-select: text;"
>
{{
'工厂订单号:'
+
item
.
factoryOrderNumber
+
' '
+
item
.
message
}}
<el-checkbox
:value=
"item"
style=
"user-select: text"
>
{{
`${config.numberTitle
}
:`
+
item
[
config
.
factoryOrderNumber
]
+
' '
+
item
.
message
}}
<
/el-checkbox
>
<
/div
>
<
/el-checkbox-group
>
...
...
@@ -53,14 +66,28 @@
import
{
ref
,
watch
}
from
'vue'
import
{
copyText
}
from
'@/utils/index'
import
{
ResultInfoDataItem
}
from
'@/types/api/order/common'
;
import
{
ResultInfoDataItem
}
from
'@/types/api/order/common'
const
props
=
withDefaults
(
defineProps
<
{
list
:
ResultInfoDataItem
[]
isCopyResult
?:
boolean
isCopyNumber
?:
boolean
config
?:
{
factoryOrderNumber
:
keyof
ResultInfoDataItem
numberTitle
:
string
isShowButtons
:
boolean
}
}
>
(),
{
list
:
()
=>
[],
isCopyResult
:
true
,
isCopyNumber
:
false
,
config
:
()
=>
({
factoryOrderNumber
:
'factoryOrderNumber'
,
numberTitle
:
'工厂订单号'
,
isShowButtons
:
true
,
}
),
}
,
)
// 响应式数据
...
...
@@ -114,7 +141,7 @@ const formatCopyText = (item: ResultInfoDataItem) => {
}
return
(
'工厂订单号:'
+
item
.
factoryOrderNumber
+
item
[
props
.
config
.
factoryOrderNumber
]
+
','
+
'处理结果:'
+
item
.
message
...
...
@@ -131,6 +158,17 @@ const copyAllCode = () => {
copyText
(
str
)
}
// 复制单号
const
copyNumberCode
=
()
=>
{
if
(
!
selectedList
.
value
.
length
)
{
return
ElMessage
.
warning
(
'请先选择数据'
)
}
const
str
=
selectedList
.
value
.
map
((
item
)
=>
item
[
props
.
config
.
factoryOrderNumber
])
.
join
(
','
)
copyText
(
str
)
}
function
closedFn
()
{
if
(
key
===
'stockOut'
)
return
emits
(
'confirm'
,
selectedList
.
value
)
...
...
src/views/order/factoryOrderNew/component/BatchManageTable.vue
View file @
02402c38
...
...
@@ -92,7 +92,9 @@
<ElButton
type=
"primary"
@
click=
"refresh"
>
查询
</ElButton>
</span>
<span
class=
"item"
>
<ElButton
type=
"danger"
@
click=
"() => handleBatchDelete()"
>
批量删除
</ElButton>
<ElButton
type=
"danger"
@
click=
"() => handleBatchDelete()"
>
批量删除
</ElButton>
</span>
</div>
...
...
@@ -183,6 +185,17 @@
@
current-change=
"onCurrentPageChange"
/>
</div>
<ResultInfo
ref=
"resultInfoRef"
:list=
"resultInfoList"
:is-copy-result=
"false"
:is-copy-number=
"true"
:config=
"{
factoryOrderNumber: 'factoryOrderNumber',
numberTitle: '操作单号',
isShowButtons: false,
}"
/>
</div>
</template>
...
...
@@ -196,7 +209,10 @@ import {
printPickPdfByBatchNumberApi
,
printProductionPdfByBatchNumberApi
,
}
from
'@/api/factoryOrderNew'
import
type
{
BatchManageData
}
from
'@/types/api/factoryOrderNew'
import
type
{
BatchManageData
,
BatchReturnVOItem
,
}
from
'@/types/api/factoryOrderNew'
import
type
{
PaginationData
}
from
'@/types/api'
import
TableView
from
'@/components/TableView.vue'
import
ArrangeDialog
from
'./ArrangeDialog.vue'
...
...
@@ -205,10 +221,14 @@ import type { userData } from '@/types/api/user'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
filePath
}
from
'@/api/axios'
import
{
batchDownloadDesignImagesApi
}
from
'@/api/factoryOrderNew'
import
ResultInfo
from
'@/views/order/components/ResultInfo.vue'
import
type
{
ResultInfoDataItem
}
from
'@/types/api/order/common'
const
selectedRows
=
ref
<
BatchManageData
[]
>
([])
const
employeeList
=
ref
<
userData
[]
>
([])
const
arrangeDialogRef
=
ref
<
InstanceType
<
typeof
ArrangeDialog
>>
()
const
resultInfoRef
=
ref
<
InstanceType
<
typeof
ResultInfo
>>
()
const
resultInfoList
=
ref
<
ResultInfoDataItem
[]
>
([])
interface
ProcessTypeData
{
label
:
string
value
:
string
...
...
@@ -551,8 +571,19 @@ const handlePrintProduction = async (row: BatchManageData) => {
})
if
(
res
?.
code
!==
200
)
return
if
(
res
?.
data
?.
status
===
false
)
{
resultInfoList
.
value
=
res
.
data
.
batchReturnVOList
?.
map
((
item
:
BatchReturnVOItem
)
=>
({
id
:
item
.
id
,
status
:
item
.
status
,
factoryOrderNumber
:
item
.
number
,
message
:
item
.
message
,
}))
||
[]
resultInfoRef
.
value
?.
showDialog
()
}
else
{
ElMessage
.
success
(
'操作成功'
)
window
.
open
(
filePath
+
res
?.
message
)
window
.
open
(
filePath
+
res
?.
data
?.
message
)
}
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
...
...
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