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
72da9eb4
Commit
72da9eb4
authored
Aug 29, 2024
by
zhuzhequan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wq'
parents
c04e8f83
caafaa17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
26 deletions
+65
-26
src/api/order.ts
+23
-18
src/views/order/ProductInfo.vue
+18
-7
src/views/order/index.vue
+24
-1
No files found.
src/api/order.ts
View file @
72da9eb4
...
...
@@ -9,7 +9,9 @@ import {
ShipmentForm
,
ShipmentOrderRes
,
Tab
,
InspectionData
,
CountStatus
,
Confirm
,
InspectionData
,
CountStatus
,
Confirm
,
}
from
'@/types/api/order'
import
{
AccountStatementNote
,
...
...
@@ -64,9 +66,9 @@ export function reCreateScriptUrlApi(id: number) {
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/customJomallOrder/rebuildFileByOrderId'
,
{
params
:{
id
}
params
:
{
id
,
}
,
},
)
}
...
...
@@ -80,7 +82,7 @@ export function printOrder(ids: number[]) {
}
// 导出生产单
export
function
exportOrder
(
data
?:
{
ids
:
number
[]
,
status
:
string
|
number
})
{
export
function
exportOrder
(
data
?:
{
ids
:
number
[]
;
status
:
string
|
number
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/customJomallOrder/exportData'
,
data
,
...
...
@@ -155,7 +157,18 @@ export function backEndCommentsApi(id: number, remark: string) {
{
params
:
{
id
,
remark
remark
,
},
},
)
}
//重新生成
export
function
regenerateSingle
(
subNumber
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
SendOrderData
[]
>>
(
'productionFile/regenerateSingle'
,
{
params
:
{
subNumber
,
},
},
)
...
...
@@ -302,9 +315,7 @@ export function customJomallReconciliationLog(reconciliationId?: number) {
)
}
export
function
updateReconciliation
(
data
:
AccountStatementNote
,
)
{
export
function
updateReconciliation
(
data
:
AccountStatementNote
)
{
return
axios
.
post
(
'factory/customJomallReconciliation/updateReconciliation'
,
data
,
...
...
@@ -322,11 +333,6 @@ export function getShipmentDetailsById(shipmentId?: string) {
)
}
export
function
factoryConfirm
(
data
:
Confirm
[],
)
{
return
axios
.
post
(
'factory/customJomallReconciliation/factoryConfirm'
,
data
,
)
}
\ No newline at end of file
export
function
factoryConfirm
(
data
:
Confirm
[])
{
return
axios
.
post
(
'factory/customJomallReconciliation/factoryConfirm'
,
data
)
}
src/views/order/ProductInfo.vue
View file @
72da9eb4
...
...
@@ -112,7 +112,7 @@
<el-icon
class=
"icon"
style=
"color: #e6a23c"
@
click=
"setRemarks(item.id, (item as InterItem).remark
||
'')"
@
click=
"setRemarks(item.id, (item as InterItem).remark
||
'')"
><EditPen
/></el-icon>
</div>
...
...
@@ -173,6 +173,12 @@
@
click=
"downloadManuscriptBySubOrder(item)"
>
下载稿件
</el-button
>
<el-button
type=
"primary"
size=
"small"
@
click=
"regenerate(item.subOrderNumber || '')"
>
重新生成
</el-button
>
</div>
</div>
</div>
...
...
@@ -182,7 +188,7 @@ import { DocumentCopy, EditPen } from '@element-plus/icons-vue'
import
{
filePath
}
from
'@/api/axios'
import
{
downloadOrder
}
from
'@/api/order'
import
{
OrderData
,
ProductList
}
from
'@/types/api/order'
import
{
PropType
,
defineEmits
}
from
'vue'
import
{
PropType
,
defineEmits
}
from
'vue'
defineProps
({
row
:
{
type
:
Object
as
PropType
<
OrderData
>
,
...
...
@@ -197,13 +203,15 @@ defineProps({
},
})
interface
InterItem
{
id
:
number
;
remark
?:
string
;
// 可选属性
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
;
// 额外属性
id
:
number
remark
?:
string
// 可选属性
[
propName
:
string
]:
string
|
number
|
boolean
|
undefined
|
unknown
// 额外属性
}
// 传递多个emit 带参数的事件
const
emit
=
defineEmits
<
{
(
e
:
'update-remark'
,
payload
:
{
id
:
number
;
remark
:
string
}):
void
;
}
>
();
(
e
:
'update-remark'
,
payload
:
{
id
:
number
;
remark
:
string
}):
void
(
e
:
'again-generated'
,
payload
:
{
id
:
string
}):
void
}
>
()
const
downloadManuscriptBySubOrder
=
async
(
item
:
ProductList
)
=>
{
try
{
const
res
=
await
downloadOrder
(
item
.
id
)
...
...
@@ -212,6 +220,9 @@ const downloadManuscriptBySubOrder = async (item: ProductList) => {
//showError(e)
}
}
const
regenerate
=
async
(
id
:
string
)
=>
{
emit
(
'again-generated'
,
{
id
})
}
const
copy
=
(
text
:
string
)
=>
{
navigator
.
clipboard
.
writeText
(
text
)
ElMessage
.
success
(
'复制成功'
)
...
...
src/views/order/index.vue
View file @
72da9eb4
...
...
@@ -216,7 +216,10 @@
>
重新生成稿件
<
/ElButton
>
<
/span
>
<
span
v
-
if
=
"statusCode === 2 || statusCode === 3 || statusCode === 4"
class
=
"item"
>
<
span
v
-
if
=
"statusCode === 2 || statusCode === 3 || statusCode === 4"
class
=
"item"
>
<
ElButton
:
loading
=
"btnLoading"
type
=
"primary"
...
...
@@ -280,6 +283,7 @@
:
row
=
"row"
:
status
=
"statusCode"
@
update
-
remark
=
"handleUpdateRemark"
@
again
-
generated
=
"handleAgainGenerated"
/>
<
template
v
-
if
=
"row.productList.length > 2"
>
<
div
class
=
"order-list-expand_more"
>
...
...
@@ -919,6 +923,7 @@ import {
exportOrder
,
addInternalTagApi
,
backEndCommentsApi
,
regenerateSingle
,
loadSendOutList
,
getLogList
,
getOrderDetail
,
...
...
@@ -1225,6 +1230,24 @@ const handleUpdateRemark = (payload: { id: number; remark: string }) => {
inputValue
.
value
=
payload
.
remark
remarkId
.
value
=
payload
.
id
}
// 重新生成
const
handleAgainGenerated
=
async
(
payload
:
{
id
:
string
}
)
=>
{
try
{
const
res
=
await
regenerateSingle
(
payload
.
id
)
search
()
ElMessage
({
message
:
res
.
message
,
type
:
'success'
,
offset
:
window
.
innerHeight
/
2
,
}
)
}
catch
(
e
)
{
ElMessage
({
message
:
'提交失败,请重试'
,
type
:
'error'
,
offset
:
window
.
innerHeight
/
2
,
}
)
}
}
const
submitRemark
=
async
()
=>
{
try
{
const
res
=
await
backEndCommentsApi
(
remarkId
.
value
,
inputValue
.
value
)
...
...
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