Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
dcc6fe3f
Commit
dcc6fe3f
authored
Nov 05, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 请购单修改
parent
66c3f0db
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
16 deletions
+91
-16
index.tsx
src/pages/transaction/components/orderDeleveRecord/index.tsx
+86
-11
index.tsx
.../purchaseOrder/orderCollectRequisition/constant/index.tsx
+2
-2
index.tsx
...ansaction/purchaseOrder/orderCollectRequisition/index.tsx
+3
-3
No files found.
src/pages/transaction/components/orderDeleveRecord/index.tsx
View file @
dcc6fe3f
import
React
,
{
useContext
,
useRef
,
useState
}
from
'react'
import
React
,
{
useC
allback
,
useC
ontext
,
useRef
,
useState
}
from
'react'
import
{
Tabs
,
Table
,
Button
}
from
'antd'
import
StatusColors
from
'@/pages/transaction/components/statusColors'
import
{
formatTimeString
}
from
'@/utils'
...
...
@@ -8,9 +8,15 @@ import NestTable from '@/components/NestTable'
import
{
DeliverySideState
,
OrderKindType
}
from
'@/constants/order'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
import
ModalForm
from
'@/components/ModalForm'
import
{
createFormActions
}
from
'@formily/antd'
import
{
getAuth
}
from
'@/utils/auth'
import
{
UPLOAD_TYPE
}
from
'@/constants'
export
interface
OrderDeleveRecordProps
{}
const
receiveActions
=
createFormActions
()
// 订单发货记录
const
OrderDeleveRecord
:
React
.
FC
<
OrderDeleveRecordProps
>
=
(
props
)
=>
{
...
...
@@ -22,7 +28,10 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const
isReturn
=
pathname
.
indexOf
(
'readyConfirmReturnOrder'
)
!==
-
1
// 用于储存已经修改过的订单id
const
dataRef
=
useRef
<
any
>
([])
const
receiveRef
=
useRef
<
any
>
({})
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
{
token
}
=
getAuth
()
||
{}
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
deliveries
,
deliveryDetails
,
orderMode
,
orderKind
}
=
data
...
...
@@ -204,8 +213,6 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
},
]
const
sideChildrenCols
:
any
[]
=
[
{
title
:
'商品ID'
,
...
...
@@ -399,20 +406,44 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
// 确认收货
const
handleConfirm
=
async
(
record
)
=>
{
const
params
=
{
orderId
:
data
.
orderId
,
batchNo
:
record
.
batchNo
}
//
const params = {
//
orderId: data.orderId,
//
batchNo: record.batchNo
//
}
setDisabled
(
true
)
const
{
code
}
=
await
PublicApi
.
postOrderBuyerValidateReceiveConfirm
(
params
)
if
(
code
===
1000
)
{
dataRef
.
current
.
push
(
record
.
id
)
// const { code } = await PublicApi.postOrderBuyerValidateReceiveConfirm(params)
// if (code === 1000) {
// dataRef.current.push(record.id)
// reloadFormData && reloadFormData()
// setDisabled(false)
// } else {
// setDisabled(false)
// }
receiveActions
.
setFieldValue
(
'orderId'
,
data
.
orderId
)
receiveActions
.
setFieldValue
(
'batchNo'
,
record
.
batchNo
)
receiveRef
.
current
.
setVisible
(
true
)
}
// 提交凭证
const
handleSubmit
=
useCallback
(()
=>
{
setLoading
(
true
)
receiveActions
.
submit
().
then
(
async
({
values
}:
any
)
=>
{
const
result
=
await
PublicApi
.
postOrderBuyerValidateReceiveConfirm
(
values
)
if
(
result
.
code
===
1000
)
{
receiveActions
.
reset
()
setLoading
(
false
)
receiveRef
.
current
.
setVisible
(
false
)
setTimeout
(()
=>
{
reloadFormData
&&
reloadFormData
()
setDisabled
(
false
)
},
800
)
}
else
{
setLoading
(
false
)
setDisabled
(
false
)
}
}
})
},
[])
// 确认回单
const
handleReturn
=
async
(
record
)
=>
{
...
...
@@ -460,6 +491,50 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
</
Tabs
>
</
MellowCard
>
}
<
ModalForm
modalTitle=
'确认收货'
currentRef=
{
receiveRef
}
confirm=
{
handleSubmit
}
actions=
{
receiveActions
}
schema=
{
{
type
:
'object'
,
properties
:
{
NO_SUBMIT
:
{
type
:
'object'
,
"x-component"
:
'mega-layout'
,
"x-component-props"
:
{
labelAlign
:
'top'
,
},
properties
:
{
orderId
:
{
type
:
'number'
,
title
:
'当前id'
,
visible
:
false
,
},
batchNo
:
{
type
:
'number'
,
title
:
'收货批次'
,
visible
:
false
,
},
url
:
{
title
:
'收货回单'
,
'x-component'
:
'Upload'
,
'x-component-props'
:
{
listType
:
'text'
,
maxCount
:
1
,
action
:
"/api/file/file/upload"
,
data
:
{
fileType
:
UPLOAD_TYPE
},
headers
:
{
token
}
}
}
}
}
}
}
}
modalProps=
{
{
confirmLoading
:
loading
}
}
/>
</>
)
}
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/constant/index.tsx
View file @
dcc6fe3f
...
...
@@ -41,8 +41,8 @@ export const procurmentRenderInit = (initValue: any) => {
digest
:
initValue
.
digest
,
deliverDate
:
initValue
.
consignee
.
deliverDate
,
theInvoiceId
:
initValue
.
invoice
?.
invoiceId
||
null
,
requisitionNo
:
initValue
.
requisition
No
,
requisitionId
:
initValue
.
requisition
Id
,
requisitionNo
:
initValue
.
quote
No
,
requisitionId
:
initValue
.
quote
Id
,
}
}
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/index.tsx
View file @
dcc6fe3f
...
...
@@ -64,10 +64,10 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
<
div
>
合计金额
</
div
>
<
div
>
{
`¥${sum.toFixed(2)}`
}
</
div
>
</
Col
>
<
Col
span=
{
2
}
>
{
/*
<Col span={2}>
<div>总计金额</div>
<div>{`¥${(sum + freePrice).toFixed(2)}`}</div>
</
Col
>
</Col>
*/
}
</
RowStyle
>
})
...
...
@@ -126,7 +126,7 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
},
[])
const
getJumpQuoteProducts
=
async
()
=>
{
// 查询
询价
单详情
// 查询
请购
单详情
const
{
code
,
data
:
requisitionData
}
=
await
PublicApi
.
getPurchaseRequisitionTransferPurchaseDetail
({
id
:
requisitionId
})
if
(
code
===
1000
)
{
const
{
...
...
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