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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
20 deletions
+95
-20
index.tsx
src/pages/transaction/components/orderDeleveRecord/index.tsx
+90
-15
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
{
Tabs
,
Table
,
Button
}
from
'antd'
import
StatusColors
from
'@/pages/transaction/components/statusColors'
import
StatusColors
from
'@/pages/transaction/components/statusColors'
import
{
formatTimeString
}
from
'@/utils'
import
{
formatTimeString
}
from
'@/utils'
...
@@ -8,9 +8,15 @@ import NestTable from '@/components/NestTable'
...
@@ -8,9 +8,15 @@ import NestTable from '@/components/NestTable'
import
{
DeliverySideState
,
OrderKindType
}
from
'@/constants/order'
import
{
DeliverySideState
,
OrderKindType
}
from
'@/constants/order'
import
{
PublicApi
}
from
'@/services/api'
import
{
PublicApi
}
from
'@/services/api'
import
{
history
}
from
'umi'
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
{}
export
interface
OrderDeleveRecordProps
{}
const
receiveActions
=
createFormActions
()
// 订单发货记录
// 订单发货记录
const
OrderDeleveRecord
:
React
.
FC
<
OrderDeleveRecordProps
>
=
(
props
)
=>
{
const
OrderDeleveRecord
:
React
.
FC
<
OrderDeleveRecordProps
>
=
(
props
)
=>
{
...
@@ -22,7 +28,10 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
...
@@ -22,7 +28,10 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
const
isReturn
=
pathname
.
indexOf
(
'readyConfirmReturnOrder'
)
!==
-
1
const
isReturn
=
pathname
.
indexOf
(
'readyConfirmReturnOrder'
)
!==
-
1
// 用于储存已经修改过的订单id
// 用于储存已经修改过的订单id
const
dataRef
=
useRef
<
any
>
([])
const
dataRef
=
useRef
<
any
>
([])
const
receiveRef
=
useRef
<
any
>
({})
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
disabled
,
setDisabled
]
=
useState
<
boolean
>
(
false
)
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
{
token
}
=
getAuth
()
||
{}
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
data
,
reloadFormData
}
=
useContext
(
OrderDetailContext
)
const
{
deliveries
,
deliveryDetails
,
orderMode
,
orderKind
}
=
data
const
{
deliveries
,
deliveryDetails
,
orderMode
,
orderKind
}
=
data
...
@@ -204,8 +213,6 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
...
@@ -204,8 +213,6 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
},
},
]
]
const
sideChildrenCols
:
any
[]
=
[
const
sideChildrenCols
:
any
[]
=
[
{
{
title
:
'商品ID'
,
title
:
'商品ID'
,
...
@@ -399,21 +406,45 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
...
@@ -399,21 +406,45 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
// 确认收货
// 确认收货
const
handleConfirm
=
async
(
record
)
=>
{
const
handleConfirm
=
async
(
record
)
=>
{
const
params
=
{
//
const params = {
orderId
:
data
.
orderId
,
//
orderId: data.orderId,
batchNo
:
record
.
batchNo
//
batchNo: record.batchNo
}
//
}
setDisabled
(
true
)
setDisabled
(
true
)
const
{
code
}
=
await
PublicApi
.
postOrderBuyerValidateReceiveConfirm
(
params
)
// const { code } = await PublicApi.postOrderBuyerValidateReceiveConfirm(params)
if
(
code
===
1000
)
{
// if (code === 1000) {
dataRef
.
current
.
push
(
record
.
id
)
// dataRef.current.push(record.id)
reloadFormData
&&
reloadFormData
()
// reloadFormData && reloadFormData()
setDisabled
(
false
)
// setDisabled(false)
}
else
{
// } else {
setDisabled
(
false
)
// 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
)
=>
{
const
handleReturn
=
async
(
record
)
=>
{
const
params
=
{
const
params
=
{
...
@@ -460,6 +491,50 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
...
@@ -460,6 +491,50 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
</
Tabs
>
</
Tabs
>
</
MellowCard
>
</
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) => {
...
@@ -41,8 +41,8 @@ export const procurmentRenderInit = (initValue: any) => {
digest
:
initValue
.
digest
,
digest
:
initValue
.
digest
,
deliverDate
:
initValue
.
consignee
.
deliverDate
,
deliverDate
:
initValue
.
consignee
.
deliverDate
,
theInvoiceId
:
initValue
.
invoice
?.
invoiceId
||
null
,
theInvoiceId
:
initValue
.
invoice
?.
invoiceId
||
null
,
requisitionNo
:
initValue
.
requisition
No
,
requisitionNo
:
initValue
.
quote
No
,
requisitionId
:
initValue
.
requisition
Id
,
requisitionId
:
initValue
.
quote
Id
,
}
}
}
}
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/index.tsx
View file @
dcc6fe3f
...
@@ -64,10 +64,10 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
...
@@ -64,10 +64,10 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
<
div
>
合计金额
</
div
>
<
div
>
合计金额
</
div
>
<
div
>
{
`¥${sum.toFixed(2)}`
}
</
div
>
<
div
>
{
`¥${sum.toFixed(2)}`
}
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
2
}
>
{
/*
<Col span={2}>
<div>总计金额</div>
<div>总计金额</div>
<div>{`¥${(sum + freePrice).toFixed(2)}`}</div>
<div>{`¥${(sum + freePrice).toFixed(2)}`}</div>
</
Col
>
</Col>
*/
}
</
RowStyle
>
</
RowStyle
>
})
})
...
@@ -126,7 +126,7 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
...
@@ -126,7 +126,7 @@ const AddRequisitionOrder:React.FC<AddRequisitionOrderProps> = (props) => {
},
[])
},
[])
const
getJumpQuoteProducts
=
async
()
=>
{
const
getJumpQuoteProducts
=
async
()
=>
{
// 查询
询价
单详情
// 查询
请购
单详情
const
{
code
,
data
:
requisitionData
}
=
await
PublicApi
.
getPurchaseRequisitionTransferPurchaseDetail
({
id
:
requisitionId
})
const
{
code
,
data
:
requisitionData
}
=
await
PublicApi
.
getPurchaseRequisitionTransferPurchaseDetail
({
id
:
requisitionId
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
const
{
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