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
426be222
Commit
426be222
authored
Dec 24, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:处理销售待审核订单修改价格总价显示异常,处理待确认回单发货是否完成不需要提示,处理线下支付线上确认凭证上传完毕才能提交支付
parent
ac4310b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
65 deletions
+67
-65
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+1
-1
index.tsx
src/pages/transaction/components/orderSaleRecord/index.tsx
+4
-6
index.tsx
...es/transaction/components/saleOrderProductTable/index.tsx
+3
-3
index.tsx
...action/saleOrder/readyConfirmReturnOrder/detail/index.tsx
+59
-55
No files found.
src/pages/transaction/components/orderPayModal/index.tsx
View file @
426be222
...
...
@@ -246,7 +246,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
if
(
current
===
1
)
{
const
payOrderUrls
=
formRef
.
current
.
urlList
const
checkedId
=
checked
.
id
if
(
!
payOrderUrls
||
payOrderUrls
.
length
===
0
)
{
if
(
!
payOrderUrls
||
payOrderUrls
.
length
===
0
||
payOrderUrls
.
includes
(
''
)
)
{
message
.
error
(
'请先上传凭证'
)
return
;
}
...
...
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
426be222
...
...
@@ -287,10 +287,9 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 确认全部发货单已收到回单
const
handelReciveReturnOrder
=
async
()
=>
{
const
res
=
await
PublicApi
.
getOrderIsDeliveryCompleted
({
id
:
data
.
id
})
const
{
code
}
=
res
const
res
=
await
PublicApi
.
getOrderIsDeliveryCompleted
({
id
:
data
.
id
},
{
ctlType
:
"none"
})
let
tip
=
''
if
(
code
===
1000
)
if
(
res
.
data
)
tip
=
'是否确认本单全部发货单已收到回单?'
else
tip
=
'您还有未发货的商品,是否确认全部发货都已完成?'
...
...
@@ -306,10 +305,9 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
// 继续发货
const
handleContinueDeliver
=
async
()
=>
{
const
res
=
await
PublicApi
.
getOrderIsDeliveryCompleted
({
id
:
data
.
id
})
const
{
code
}
=
res
const
res
=
await
PublicApi
.
getOrderIsDeliveryCompleted
({
id
:
data
.
id
},
{
ctlType
:
'none'
})
let
tip
=
''
if
(
code
===
1000
)
if
(
res
.
data
)
tip
=
'您商品都已发货.是否确认还需要继续发货?'
else
tip
=
'是否继续发货?'
...
...
src/pages/transaction/components/saleOrderProductTable/index.tsx
View file @
426be222
...
...
@@ -97,12 +97,12 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
modelRef
.
current
.
setVisible
(
true
)
}
const
[
amountMoney
,
setAmountMoney
]
=
useState
<
number
>
(
sumPrice
||
sum
+
freePrice
)
const
[
amountMoney
,
setAmountMoney
]
=
useState
<
number
>
(
(
sumPrice
*
1000
)
/
1000
||
(
sum
*
1000
+
freePrice
*
1000
)
/
1000
)
// 总计金额
useEffect
(()
=>
{
console
.
log
(
sumPrice
||
(
sum
*
1000
+
freePrice
*
1000
)
/
1000
,
'iiiiii'
)
setAmountMoney
(()
=>
sumPrice
||
(
sum
*
1000
+
freePrice
*
1000
)
/
1000
)
console
.
log
(
(
sumPrice
*
1000
)
/
1000
||
(
sum
*
1000
+
freePrice
*
1000
)
/
1000
,
'iiiiii'
)
setAmountMoney
(()
=>
(
sumPrice
*
1000
)
/
1000
||
(
sum
*
1000
+
freePrice
*
1000
)
/
1000
)
},
[
sum
,
freePrice
,
sumPrice
])
const
handleConfirm
=
()
=>
{
...
...
src/pages/transaction/saleOrder/readyConfirmReturnOrder/detail/index.tsx
View file @
426be222
import
React
,
{
useState
,
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
OrderDetailHeader
from
'@/pages/transaction/components/OrderDetailHeader'
;
import
OrderDetailWrapper
from
'@/pages/transaction/components/OrderDetailWrapper'
;
import
PreLoading
from
'@/components/PreLoading'
;
import
{
useOrderDetail
}
from
'../../../_public/order/effects/useOrderDetail'
;
import
ApprovedOrderModal
from
'../../../components/approvedOrderModal'
;
import
{
history
}
from
'umi'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
OrderDetailSection
from
'../../../components/orderDetailSection'
;
const
ReadyConfirmReturnOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderReceiptOrderConfirmedAll
)
// 提交表单
const
handleSubmit
=
useCallback
(
async
()
=>
{
const
params
=
{
id
:
Number
(
id
),
state
:
1
}
const
result
=
await
run
(
params
)
if
(
result
.
code
===
1000
)
{
history
.
goBack
()
}
},
[])
return
(
<
div
>
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
// extraRight={
// <Button type='primary' onClick={handleSubmit} loading={loading}>
// 确认全部已回单
// </Button>
// }
/>
<
OrderDetailWrapper
>
<
PreLoading
loading=
{
!
formContext
.
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
OrderDetailSection
formContext=
{
formContext
}
type=
'saleOrder'
/>
</
PreLoading
>
</
OrderDetailWrapper
>
</
OrderDetailContext
.
Provider
>
</
div
>
);
};
export
default
ReadyConfirmReturnOrderDetail
;
\ No newline at end of file
import
React
,
{
useState
,
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
Button
}
from
'antd'
;
import
OrderDetailHeader
from
'@/pages/transaction/components/OrderDetailHeader'
;
import
OrderDetailWrapper
from
'@/pages/transaction/components/OrderDetailWrapper'
;
import
PreLoading
from
'@/components/PreLoading'
;
import
{
useOrderDetail
}
from
'../../../_public/order/effects/useOrderDetail'
;
import
ApprovedOrderModal
from
'../../../components/approvedOrderModal'
;
import
{
history
}
from
'umi'
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
OrderDetailSection
from
'../../../components/orderDetailSection'
;
const
ReadyConfirmReturnOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
'saleOrder'
})
const
{
run
,
loading
}
=
useHttpRequest
(
PublicApi
.
postOrderReceiptOrderConfirmedAll
)
// 提交表单
// const handleSubmit = useCallback(async () => {
// const params = {
// id: Number(id),
// state: 1
// }
// const result = await run(params)
// if (result.code === 1000) {
// history.goBack()
// }
// }, [])
const
handleSubmit
=
()
=>
{
const
deleveBox
=
document
.
querySelector
(
'#deleveBox'
)
as
any
window
.
scrollTo
(
0
,
deleveBox
.
offsetTop
)
}
return
(
<
div
>
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
extraRight=
{
<
Button
type=
'primary'
onClick=
{
handleSubmit
}
loading=
{
loading
}
>
确认全部已回单
</
Button
>
}
/>
<
OrderDetailWrapper
>
<
PreLoading
loading=
{
!
formContext
.
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
OrderDetailSection
formContext=
{
formContext
}
type=
'saleOrder'
/>
</
PreLoading
>
</
OrderDetailWrapper
>
</
OrderDetailContext
.
Provider
>
</
div
>
);
};
export
default
ReadyConfirmReturnOrderDetail
;
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