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
linweijiong
jinfa-platform
Commits
b2d5a596
Commit
b2d5a596
authored
Dec 16, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增待发货订单页面
parent
0646817e
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
324 additions
and
3 deletions
+324
-3
purchaseOrder.ts
config/routes/tranactionRoute/purchaseOrder.ts
+14
-0
order.ts
src/locales/en-US/order.ts
+2
-0
order.ts
src/locales/ko-KR/order.ts
+2
-0
order.ts
src/locales/zh-CN/order.ts
+2
-0
index.tsx
src/pages/transaction/components/orderPayModal/index.tsx
+1
-3
index.less
...saction/purchaseOrder/readyDelevedOrder/detail/index.less
+0
-0
index.tsx
...nsaction/purchaseOrder/readyDelevedOrder/detail/index.tsx
+64
-0
index.tsx
...ges/transaction/purchaseOrder/readyDelevedOrder/index.tsx
+62
-0
useSelfTable.tsx
...on/purchaseOrder/readyDelevedOrder/model/useSelfTable.tsx
+100
-0
index.ts
...ansaction/purchaseOrder/readyDelevedOrder/schema/index.ts
+77
-0
No files found.
config/routes/tranactionRoute/purchaseOrder.ts
View file @
b2d5a596
...
...
@@ -364,6 +364,20 @@ export default [
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待发货订单
{
path
:
'/memberCenter/tranactionAbility/purchaseOrder/readyDelevedOrder'
,
name
:
'readyDelevedOrder'
,
component
:
'@/pages/transaction/purchaseOrder/readyDelevedOrder'
},
// 待发货订单-详情
{
path
:
'/memberCenter/tranactionAbility/purchaseOrder/readyDelevedOrder/detail'
,
name
:
'readyDelevedOrderDetail'
,
component
:
'@/pages/transaction/purchaseOrder/readyDelevedOrder/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
]
}
]
src/locales/en-US/order.ts
View file @
b2d5a596
...
...
@@ -409,6 +409,8 @@ export default {
'saleOrder.querenshougongfa'
:
'Confirm manual delivery'
,
'saleOrder.qufahuo'
:
'Go to ship'
,
'saleOrder.querenfahuo'
:
'Confirm shipment'
,
'saleOrder.haoyoupintuan'
:
'Invite friends to join a group'
,
'saleOrder.shouhou'
:
'after sale'
,
'saleOrder.xianshangzhifu'
:
'Online payment'
,
'saleOrder.xianxiazhifu'
:
'Offline payment'
,
'saleOrder.shouxinzhifu'
:
'Credit Payment'
,
...
...
src/locales/ko-KR/order.ts
View file @
b2d5a596
...
...
@@ -409,6 +409,8 @@ export default {
'saleOrder.querenshougongfa'
:
'수동 배송 확인'
,
'saleOrder.qufahuo'
:
'출하하다'
,
'saleOrder.querenfahuo'
:
'배송 확인'
,
'saleOrder.haoyoupintuan'
:
'친한 친구를 초청하여 단체 모임을 결성하다'
,
'saleOrder.shouhou'
:
'판매 후'
,
'saleOrder.xianshangzhifu'
:
'온라인 지불'
,
'saleOrder.xianxiazhifu'
:
'오프라인 지불'
,
'saleOrder.shouxinzhifu'
:
'여신 지불'
,
...
...
src/locales/zh-CN/order.ts
View file @
b2d5a596
...
...
@@ -409,6 +409,8 @@ export default {
'saleOrder.querenshougongfa'
:
'确认手工发货'
,
'saleOrder.qufahuo'
:
'去发货'
,
'saleOrder.querenfahuo'
:
'确认发货'
,
'saleOrder.haoyoupintuan'
:
'邀请好友拼团'
,
'saleOrder.shouhou'
:
'售后'
,
'saleOrder.xianshangzhifu'
:
'线上支付'
,
'saleOrder.xianxiazhifu'
:
'线下支付'
,
'saleOrder.shouxinzhifu'
:
'授信支付'
,
...
...
src/pages/transaction/components/orderPayModal/index.tsx
View file @
b2d5a596
...
...
@@ -12,10 +12,8 @@ import { encryptedByAES } from '@/utils/cryptoAes'
import
QRCode
from
'qrcode'
import
{
getOrderBuyerValidatePayResult
,
postOrderBuyerValidatePay
}
from
'@/services/OrderNewV2Api'
import
{
getSettleAccountsCommonCorporateAccountDetail
}
from
'@/services/SettleV2Api'
import
{
getPayAssetAccountBalance
,
getPayCreditGetCredit
,
getPayEAccountAllInPayGet
UserBalance
,
getPayEAccountAllInPayReSendPayCode
}
from
'@/services/PayV2Api'
import
{
getPayAssetAccountBalance
,
getPayCreditGetCredit
,
getPayEAccountAllInPayGet
AccountDetail
,
getPayEAccountAllInPayGetUserBalance
,
getPayEAccountAllInPayReSendPayCode
,
postPayEAccountAllInPayConfirmPay
}
from
'@/services/PayV2Api'
import
useCountDown
from
'@/utils/hooks'
import
{
postPayEAccountAllInPayConfirmPay
}
from
'@/services/PayV2Api/id13209'
import
{
getPayEAccountAllInPayGetAccountDetail
}
from
'@/services/PayV2Api/id13209'
const
intl
=
getIntl
();
export
interface
OrderPayModalProps
{
currentRef
:
any
,
...
...
src/pages/transaction/purchaseOrder/readyDelevedOrder/detail/index.less
0 → 100644
View file @
b2d5a596
src/pages/transaction/purchaseOrder/readyDelevedOrder/detail/index.tsx
0 → 100644
View file @
b2d5a596
import
React
,
{
useCallback
,
useRef
}
from
'react'
;
import
{
OrderDetailContext
}
from
'../../../_public/order/context'
;
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
OrderHandDeleved
from
'../../../components/orderHandDeleved'
;
import
OrderDetailSection
from
'../../../components/orderDetailSection'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
useIntl
}
from
'umi'
;
const
ReadyConfirmDelevedOrderDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
detailList
}
=
useOrderDetail
({
type
:
's_readyConfirmDelevedOrder'
})
const
{
batchNo
}
=
usePageStatus
()
const
intl
=
useIntl
()
// // 是否是手工发货
// const isHandDeleved = formContext.data && formContext.data.purchaseOrderInteriorState === SaleOrderInsideWorkState.HAND_DELEVED_ORDER
// // 所有发货单都是否已经发货了
// const isShowBtn = isHandDeleved || formContext.data?.orderDeliveryDetailsResponses?.some(v => v.interiorState === DeliverySideState.ADD_LOGISTICS_ORDER)
// 是否发过货
// const isHandDeleved = Number(batchNo) <= 0
const
isHandDeleved
=
true
// 是否发货完成
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
useCallback
(()
=>
{
if
(
isHandDeleved
)
{
approvedRef
.
current
.
setVisible
(
true
)
}
else
{
const
deleveBox
=
document
.
querySelector
(
'#deleveBox'
)
as
any
window
.
scrollTo
(
0
,
deleveBox
.
offsetTop
)
}
},
[
isHandDeleved
])
return
(
<
div
>
<
OrderDetailContext
.
Provider
value=
{
formContext
}
>
<
OrderDetailHeader
detailList=
{
detailList
}
detailData=
{
formContext
.
data
}
extraRight=
{
<
Button
type=
'primary'
onClick=
{
handleClick
}
>
{
isHandDeleved
?
intl
.
formatMessage
({
id
:
'saleOrder.querenshougongfa'
,
defaultMessage
:
'确认手工发货'
})
:
intl
.
formatMessage
({
id
:
'saleOrder.qufahuo'
,
defaultMessage
:
'去发货'
})
}
</
Button
>
}
/>
<
OrderDetailWrapper
>
<
PreLoading
loading=
{
!
formContext
.
data
}
active
paragraph=
{
{
rows
:
6
}
}
>
<
OrderDetailSection
formContext=
{
formContext
}
type=
'saleOrder'
/>
</
PreLoading
>
</
OrderDetailWrapper
>
{
/* 提交时触发的弹窗集合 */
}
<
OrderHandDeleved
currentRef=
{
approvedRef
}
/>
</
OrderDetailContext
.
Provider
>
</
div
>
);
};
export
default
ReadyConfirmDelevedOrderDetail
;
src/pages/transaction/purchaseOrder/readyDelevedOrder/index.tsx
0 → 100644
View file @
b2d5a596
import
React
from
'react'
import
{
Card
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
useSelfTable
}
from
'./model/useSelfTable'
import
{
baseOrderListColumns
}
from
'../constant'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
'../index.less'
import
{
getOrderBuyerValidateDeliveryPage
}
from
'@/services/OrderNewV2Api'
// 待发货订单
export
interface
ReadyDelevedOrderProps
{}
const
fetchTableData
=
async
(
params
)
=>
{
const
{
data
}
=
await
getOrderBuyerValidateDeliveryPage
(
params
)
return
data
}
const
ReadyDelevedOrder
:
React
.
FC
<
ReadyDelevedOrderProps
>
=
()
=>
{
const
{
columns
}
=
useSelfTable
()
return
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
fetchTableData=
{
params
=>
fetchTableData
(
params
)
}
columns=
{
columns
}
rowKey=
{
'orderNo'
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
baseOrderListColumns
(),
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
);
},
components
:
{
DateRangePickerUnix
,
Submit
}
}
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
}
ReadyDelevedOrder
.
defaultProps
=
{}
export
default
ReadyDelevedOrder
src/pages/transaction/purchaseOrder/readyDelevedOrder/model/useSelfTable.tsx
0 → 100644
View file @
b2d5a596
import
{
useRef
}
from
'react'
import
{
history
,
useIntl
}
from
'umi'
import
{
Button
}
from
'antd'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
StatusColors
from
'@/pages/transaction/components/statusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
ORDER_TYPE_CHANNEL_POINTS
,
ORDER_TYPE_POINTS
}
from
'@/constants/order'
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
intl
=
useIntl
()
const
customOrderColumns
:
any
[]
=
[
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.dingdanhao'
,
defaultMessage
:
'订单号'
}),
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/preview?id=${record.orderId}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.dingdanzhaiyao'
,
defaultMessage
:
'订单摘要/下单时间'
}),
align
:
'center'
,
dataIndex
:
'digest'
,
key
:
'digest'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.caigouhuiyuan'
,
defaultMessage
:
'采购会员'
}),
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.zongjine'
,
defaultMessage
:
'总金额'
}),
align
:
'center'
,
dataIndex
:
'amount'
,
key
:
'amount'
,
render
:
(
t
,
r
)
=>
(
r
.
orderType
===
ORDER_TYPE_POINTS
||
r
.
orderType
===
ORDER_TYPE_CHANNEL_POINTS
)
?
t
:
`¥
${
t
}
`
},
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.dingdanleixing'
,
defaultMessage
:
'订单类型'
}),
align
:
'center'
,
dataIndex
:
'orderTypeName'
,
key
:
'orderTypeName'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.waibuzhuangtai'
,
defaultMessage
:
'外部状态'
}),
align
:
'center'
,
dataIndex
:
'outerStatus'
,
key
:
'outerStatus'
,
render
:
(
text
,
record
)
=>
<
StatusColors
status=
{
text
}
type=
'out'
text=
{
record
[
'outerStatusName'
]
}
/>,
},
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.neibuzhuangtai'
,
defaultMessage
:
'内部状态'
}),
align
:
'center'
,
dataIndex
:
'innerStatus'
,
key
:
'innerStatus'
,
render
:
(
text
,
record
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
text=
{
record
[
'innerStatusName'
]
}
/>,
},
{
title
:
intl
.
formatMessage
({
id
:
'saleOrder.caozuo'
,
defaultMessage
:
'操作'
}),
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
showInvite
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'saleOrder.haoyoupintuan'
,
defaultMessage
:
'邀请好友拼团'
})
}
</
Button
>
}
{
record
.
showAfterSales
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'saleOrder.shouhou'
,
defaultMessage
:
'售后'
})
}
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
// history.push(`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/detail?id=${record.orderId}&batchNo=${record.batchNo}`)
}
return
{
columns
:
customOrderColumns
}
}
src/pages/transaction/purchaseOrder/readyDelevedOrder/schema/index.ts
0 → 100644
View file @
b2d5a596
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getSaleOrderAuditPageSelectOption
}
from
'@/pages/transaction/effect'
;
import
{
useIntl
}
from
'umi'
;
export
const
tableListSchema
:
any
=
()
=>
{
const
intl
=
useIntl
()
const
res
=
getSaleOrderAuditPageSelectOption
()
if
(
res
)
{
const
{
orderTypes
:
OrderType
,
}
=
res
return
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'saleOrder.qingshurudingdanOrderNo'
,
defaultMessage
:
'请输入订单编号'
}),
align
:
'flex-start'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginRight
:
20
}
},
properties
:
{
digest
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'saleOrder.qingshurudingdanDigest'
,
defaultMessage
:
'请输入订单摘要'
}),
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'saleOrder.qingshurucaigouMemberName'
,
defaultMessage
:
'请输入采购会员名称'
})
}
},
"orderType"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'saleOrder.qingxuanzedingdanOrderType'
,
defaultMessage
:
'请选择订单类型'
})
},
enum
:
OrderType
.
map
(
item
=>
({
label
:
item
[
'text'
],
value
:
item
[
'id'
],
}))
},
"[startDate,endDate]"
:
{
type
:
'daterange'
,
// "x-component": 'DateRangePickerUnix',
'x-component-props'
:
{
placeholder
:
[
intl
.
formatMessage
({
id
:
'saleOrder.kaishishijian'
,
defaultMessage
:
'开始时间'
}),
intl
.
formatMessage
({
id
:
'saleOrder.jieshushijian'
,
defaultMessage
:
'结束时间'
})],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
intl
.
formatMessage
({
id
:
'saleOrder.chaxun'
,
defaultMessage
:
'查询'
}),
},
},
},
},
}
}
}
}
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