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
69b178a2
Commit
69b178a2
authored
Jan 14, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 开票管理-订单号点击跳转
-销售订单详情兼容订单号查询
parent
cc8cf398
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
index.tsx
src/pages/balance/accountsReceivable/invoice/index.tsx
+1
-1
useOrderDetail.tsx
...ages/transaction/_public/order/effects/useOrderDetail.tsx
+21
-20
No files found.
src/pages/balance/accountsReceivable/invoice/index.tsx
View file @
69b178a2
...
...
@@ -190,7 +190,7 @@ const SettlementList: React.FC = () => {
break
;
case
3
:
case
4
:
window
.
open
(
`/memberCenter/tranactionAbility/saleOrder/orderList/preview?
id=
${
record
.
dataId
}
`
)
window
.
open
(
`/memberCenter/tranactionAbility/saleOrder/orderList/preview?
orderNo=
${
record
.
orderNo
}
`
)
break
;
case
5
:
window
.
open
(
`/memberCenter/afterService/returnManage/returnQuery/detail?id=
${
record
.
dataId
}
`
)
...
...
src/pages/transaction/_public/order/effects/useOrderDetail.tsx
View file @
69b178a2
...
...
@@ -7,7 +7,7 @@ import StatusColors from '../../../components/statusColors'
import
{
message
}
from
'antd'
import
{
history
}
from
'umi'
import
{
OrderKindType
}
from
'@/constants/order'
import
{
getOrderBuyerDetail
,
getOrderBuyerValidatePayDetail
,
getOrderBuyerValidatePayType
,
getOrderBuyerValidateReceiveDetail
,
getOrderVendorDetail
,
getOrderVendorValidateDeliveryDetail
,
getOrderVendorValidatePayConfirmDetail
}
from
'@/services/OrderNewV2Api'
import
{
getOrderBuyerDetail
,
getOrderBuyerValidatePayDetail
,
getOrderBuyerValidatePayType
,
getOrderBuyerValidateReceiveDetail
,
getOrderVendorDetail
,
getOrderVendorValidateDeliveryDetail
,
getOrderVendorValidatePayConfirmDetail
,
getOrderCommonSettleOrderDetail
}
from
'@/services/OrderNewV2Api'
interface
OrderDetailHookProps
{
/** 采购、销售、待收货、待确认发货、待支付、待确认支付 */
...
...
@@ -27,18 +27,19 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
const
{
orderNo
}
=
history
.
location
.
query
const
{
type
}
=
options
const
dataRef
=
useRef
<
any
>
([
{
label
:
intl
.
formatMessage
({
id
:
'purchaseOrder.orderCollect.schema.quoteNo'
}),
name
:
'quoteNo'
,
span
:
8
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
type
[
0
]
===
's'
?
(
record
.
orderKind
===
OrderKindType
.
REQUISITION_ORDER
?
null
:
`/memberCenter/tranactionAbility/inquiryOffer/offerSearch/offer/preview?id=${record?.quoteId}`
)
:
(
record
.
orderKind
===
OrderKindType
.
REQUISITION_ORDER
?
`/memberCenter/procurementAbility/purchaseRequisition/purchaseRequisitionList/preview?id=${record?.quoteId}`
:
`/memberCenter/tranactionAbility/confirmOffer/offerSearch/offer/preview?id=${record?.quoteId}`
)
}
>
{
label
:
intl
.
formatMessage
({
id
:
'purchaseOrder.orderCollect.schema.quoteNo'
}),
name
:
'quoteNo'
,
span
:
8
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
type
[
0
]
===
's'
?
(
record
.
orderKind
===
OrderKindType
.
REQUISITION_ORDER
?
null
:
`/memberCenter/tranactionAbility/inquiryOffer/offerSearch/offer/preview?id=${record?.quoteId}`
)
:
(
record
.
orderKind
===
OrderKindType
.
REQUISITION_ORDER
?
`/memberCenter/procurementAbility/purchaseRequisition/purchaseRequisitionList/preview?id=${record?.quoteId}`
:
`/memberCenter/tranactionAbility/confirmOffer/offerSearch/offer/preview?id=${record?.quoteId}`
)
}
>
{
text
}
</
Link
>
},
{
label
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.dingdanzhaiyao'
}),
name
:
'digest'
,
span
:
8
},
{
label
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.dingdanzhaiyao'
}),
name
:
'digest'
,
span
:
8
},
{
label
:
type
[
0
]
===
's'
?
intl
.
formatMessage
({
id
:
'purchaseOrder.orderCollect.schema.buyerMemberMajorId'
})
:
intl
.
formatMessage
({
id
:
'purchaseOrder.orderCollect.schema.vendorMemberName'
}),
name
:
type
[
0
]
===
's'
?
'buyerMemberName'
:
'vendorMemberName'
,
span
:
8
},
{
label
:
intl
.
formatMessage
({
id
:
'purchaseOrder.orderCollect.schema.orderMode'
}),
name
:
'orderModeName'
,
span
:
8
},
{
label
:
intl
.
formatMessage
({
id
:
'purchaseOrder.orderCollect.schema.type'
}),
name
:
'orderTypeName'
,
span
:
8
},
...
...
@@ -71,15 +72,15 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
let
api
=
null
;
switch
(
type
)
{
case
'purchaseOrder'
:
api
=
getOrderBuyerDetail
;
break
;
case
'saleOrder'
:
api
=
getOrderVendorDetail
;
break
;
break
;
case
'saleOrder'
:
api
=
orderNo
?
getOrderCommonSettleOrderDetail
:
getOrderVendorDetail
;
break
;
case
'p_readyReceiveOrder'
:
api
=
getOrderBuyerValidateReceiveDetail
;
break
;
break
;
case
's_readyConfirmDelevedOrder'
:
api
=
getOrderVendorValidateDeliveryDetail
;
break
;
break
;
case
'p_readyPayOrder'
:
api
=
getOrderBuyerValidatePayDetail
;
break
;
break
;
case
's_readyPayResult'
:
api
=
getOrderVendorValidatePayConfirmDetail
;
default
:
api
=
getOrderBuyerDetail
;
...
...
@@ -91,15 +92,15 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
if
(
id
||
orderNo
)
{
const
fn
=
getDetailsApi
(
type
)
// @ts-ignore
fn
(
id
?
{
orderId
:
id
}
:
{
orderNo
},
{
ctlType
:
"none"
}).
then
(
res
=>
{
fn
(
id
?
{
orderId
:
id
}
:
{
orderNo
},
{
ctlType
:
"none"
}).
then
(
res
=>
{
const
{
code
,
data
,
message
:
msg
}
=
res
if
(
code
===
1000
)
{
setFormData
(
data
)
// 待支付订单获取所有支付方式
if
(
type
===
'p_readyPayOrder'
)
{
if
(
type
===
'p_readyPayOrder'
)
{
reloadPayList
(
id
)
}
if
(
data
.
payments
.
length
>
0
)
{
if
(
data
.
payments
.
length
>
0
)
{
// 过滤出未支付的 第一个
const
payObj
=
data
.
payments
.
filter
(
item
=>
item
.
showPayment
)[
0
]
setCurrentPayInfoId
(
payObj
?.
paymentId
?
payObj
.
paymentId
:
data
.
payments
[
0
].
paymentId
)
...
...
@@ -110,7 +111,7 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
},
[
id
])
const
reloadPayList
=
(
orderId
)
=>
{
getOrderBuyerValidatePayType
({
orderId
}).
then
(
res
=>
{
getOrderBuyerValidatePayType
({
orderId
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
)
{
setPaylist
(
data
)
...
...
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