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
cd220b1a
Commit
cd220b1a
authored
May 13, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 打印生产单
parent
ed638dda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
src/api/podUsOrder.ts
+6
-0
src/views/order/podUs/index.vue
+21
-2
No files found.
src/api/podUsOrder.ts
View file @
cd220b1a
...
...
@@ -103,3 +103,9 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) {
},
)
}
export
function
printProductionOrderApi
(
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderUs/printProducePdf'
,
orderIds
,
)
}
src/views/order/podUs/index.vue
View file @
cd220b1a
...
...
@@ -94,12 +94,15 @@
<
span
v
-
if
=
"status === 'EXCEPTION'"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"updateOrder"
>
更新
<
/ElButton
>
<
/span
>
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
<
ElButton
type
=
"primary"
@
click
=
"printProductionOrder"
>
打印生产单
<
/ElButton
>
<
/span
>
<
span
v
-
if
=
"status === 'TO_BE_CONFIRMED'"
class
=
"item"
>
<
ElButton
type
=
"warning"
@
click
=
"changeExceptionOrder"
>
转为异常单
<
/ElButton
>
<
/span
>
<
span
v
-
if
=
"status
!== 'IN_PRODUC
TION'"
class
=
"item"
>
<
span
v
-
if
=
"status
=== 'TO_BE_CONFIRMED' || status === 'EXCEP
TION'"
class
=
"item"
>
<
ElButton
type
=
"danger"
@
click
=
"cancelOrder"
>
取消
<
/ElButton
>
<
/span
>
<
span
v
-
if
=
"status !== 'IN_PRODUCTION'"
class
=
"item"
>
...
...
@@ -512,6 +515,7 @@ import {
getOperationLogApi
,
downloadMaterialApi
,
updateExceptionOrderApi
,
printProductionOrderApi
,
}
from
'@/api/podUsOrder'
import
TableView
from
'@/components/TableView.vue'
import
{
...
...
@@ -723,7 +727,22 @@ const updateOrder = async () => {
console
.
error
(
e
)
}
}
const
printProductionOrder
=
async
()
=>
{
if
(
cardSelection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
const
orderIds
=
cardSelection
.
value
.
map
((
item
)
=>
item
.
id
)
try
{
const
res
=
await
printProductionOrderApi
(
orderIds
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
window
.
open
(
filePath
+
res
.
message
)
search
()
loadTabData
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
changeExceptionOrder
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
...
...
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