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
bbeff74f
Commit
bbeff74f
authored
Apr 07, 2022
by
rainbowmorel@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收货单的 CRUD 操作 done
parent
25d27061
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
254 additions
and
116 deletions
+254
-116
AddressDrawer.tsx
src/components/AddressDrawer/AddressDrawer.tsx
+1
-1
BaseInfo.tsx
src/components/BaseInfo/BaseInfo.tsx
+5
-4
HandleFormSubmit.ts
src/pages/order/assets/handles/HandleFormSubmit.ts
+1
-0
ReceiveNotePage.tsx
src/pages/order/assets/handles/ReceiveNotePage.tsx
+27
-4
anchors.ts
src/pages/order/constants/anchors.ts
+3
-2
add.tsx
src/pages/order/receivingNote/deliveryNoteManage/add.tsx
+49
-29
details.tsx
src/pages/order/receivingNote/deliveryNoteManage/details.tsx
+87
-37
index.tsx
src/pages/order/receivingNote/deliveryNoteManage/index.tsx
+12
-8
details.tsx
src/pages/order/receivingNote/deliveryNoteQuery/details.tsx
+66
-30
index.tsx
src/pages/order/receivingNote/deliveryNoteQuery/index.tsx
+3
-1
No files found.
src/components/AddressDrawer/AddressDrawer.tsx
View file @
bbeff74f
...
...
@@ -90,7 +90,7 @@ function AddressDrawer(props: AddressDrawerProps) {
<
AddressRaioContextProvider
value=
{
addrList
}
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
20
}
>
<
Input
.
TextArea
disabled=
{
disabled
}
value=
{
`${value?.fullAddress
} ${value?.shipperName ? value?.shipperName : value?.receiverName} ${value?.phone
}`
}
/>
<
Input
.
TextArea
disabled=
{
disabled
}
value=
{
`${value?.fullAddress
??''} ${value?.shipperName ? value?.shipperName : value?.receiverName ?? ''} ${value?.phone??''
}`
}
/>
</
Col
>
<
Col
span=
{
4
}
>
...
...
src/components/BaseInfo/BaseInfo.tsx
View file @
bbeff74f
...
...
@@ -28,15 +28,16 @@ function BaseInfo({ title, className, children, cols = 2, id }: BaseInfoPorps) {
)
}
function
BaseInfoItem
({
label
,
children
}:
{
function
BaseInfoItem
({
label
,
children
,
className
}:
{
label
:
string
children
:
JSX
.
Element
|
string
|
React
.
ReactNode
children
:
JSX
.
Element
|
string
|
React
.
ReactNode
,
className
?:
string
})
{
return
(
<
div
className=
'base_info_item'
>
<
div
className=
{
`base_info_item ${className}`
}
>
<
Row
>
<
Col
span=
{
6
}
>
<
span
style=
{
{
color
:
'#91959B'
}
}
>
{
label
}
</
span
>
<
span
style=
{
{
color
:
'#91959B'
}
}
>
{
label
}
</
span
>
</
Col
>
<
Col
span=
{
18
}
>
{
typeof
children
===
'string'
?
<
div
>
{
children
}
</
div
>
:
children
}
...
...
src/pages/order/assets/handles/HandleFormSubmit.ts
View file @
bbeff74f
...
...
@@ -90,6 +90,7 @@ export class HandleFormSubmit {
"executorVO.phone"
:
data
.
executorVO
.
phone
,
sendTime
:
moment
(
data
.
sendTime
),
"executorVO.carNumbers"
:
data
.
executorVO
.
carNumbers
,
"receiverBO.phone"
:
data
.
receiverBO
.
phone
,
logisticsNo
:
data
.
logisticsNo
,
logisticsCompanyInt
:
{
label
:
data
.
logisticsCompany
,
...
...
src/pages/order/assets/handles/ReceiveNotePage.tsx
View file @
bbeff74f
import
{
getOrderReceiveOrderDeliveryPage
}
from
'@/services/OrderNewV2Api'
;
import
{
getOrderReceiveOrderDeliveryPage
,
getOrderReceiveOrderDetail
,
getOrderReceiveOrderDetailProductPage
,
getOrderReceiveOrderPage
,
}
from
'@/services/OrderNewV2Api'
;
// /order/receive/order/detail
class
ReceiveNoteBase
{
getDetailById
(
id
:
string
)
{
return
getOrderReceiveOrderDetail
({
id
}).
then
(
res
=>
res
.
data
)
}
getDetailProduct
({
id
,
current
})
{
return
getOrderReceiveOrderDetailProductPage
({
id
,
current
,
...{
pageSize
:
"10"
}
}).
then
(
res
=>
res
.
data
)
}
}
// 收货单送货单管理
class
ReceiveNoteManage
{
class
ReceiveNoteManage
extends
ReceiveNoteBase
{
getQuery
(
payload
?:
any
)
{
return
getOrderReceiveOrder
Delivery
Page
().
then
(
res
=>
{
return
getOrderReceiveOrderPage
().
then
(
res
=>
{
return
res
.
data
;
})
}
}
class
ReceiveNoteQuery
{
class
ReceiveNoteQuery
extends
ReceiveNoteBase
{
getQuery
(
payload
?:
any
)
{
return
getOrderReceiveOrderDeliveryPage
().
then
(
res
=>
{
return
res
.
data
;
})
}
}
...
...
src/pages/order/constants/anchors.ts
View file @
bbeff74f
...
...
@@ -82,10 +82,11 @@ const Remarks: AnchorsItem = {
const
DeliveryNoteQuery
:
AnchorsItem
[]
=
[
BillsInfo
,
Distribution
,
Harvest
,
DeliveryInfo
,
LogisticsInfo
,
Material
Material
,
ExternalRoamRecord
]
const
DeliveryPlanDetails
:
AnchorsItem
[]
=
[
...
...
src/pages/order/receivingNote/deliveryNoteManage/add.tsx
View file @
bbeff74f
...
...
@@ -6,11 +6,11 @@ import {
ReceiptAddLabel
,
NoteLabel
,
DeliveryTimeLabel
,
ConsigneeTimeLabel
,
LogisticsCompanyLabel
,
LogisticsCarNoLabel
,
LogisticsNoLabel
,
DeliveryAbstractLabel
,
BuyerLabel
,
DeliveryDateLabel
,
DeliveryNameLabel
,
DeliveryPhoneLabel
,
ReceivingAddress
,
DeliveryTypeLabel
,
DeliveryNoLabel
DeliveryPhoneLabel
,
ReceivingAddress
,
DeliveryTypeLabel
,
DeliveryNoLabel
,
ExternalRoamRecord
}
from
'../../constants'
import
{
Button
,
Form
,
Input
,
Radio
,
Table
}
from
'antd'
import
{
FormItem
,
required
}
from
'@/components/FormItem'
import
{
DeliveryNoticeTableColumn
}
from
"../../constants/page-table-column"
import
{
DeliveryNoticeTableColumn
,
ExternalRoamRecordTableColumn
}
from
"../../constants/page-table-column"
import
{
HarvestMaterialContextProvider
,
HarvestMaterialInput
}
from
'../../assets/context'
import
{
DeliveryNoteB2bUploadService
,
ReceiveOrderCreate
,
ReceivingNoteAddService
}
from
"../../assets/handles/HandleFormSubmit"
import
NoteFactoryService
from
"../../assets/handles/DeliveryNoteService"
...
...
@@ -30,6 +30,7 @@ const ContentBox = BaseInfo;
function
DeliveryNoteAddForm
()
{
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
([])
const
[
outerHistoryList
,
setOuterHistoryList
]
=
useState
([])
const
location
=
useLocation
()
const
{
id
}
=
(
location
as
any
).
query
const
[
form
]
=
useForm
()
...
...
@@ -53,10 +54,12 @@ function DeliveryNoteAddForm() {
});
service
.
getDetailById
(
id
).
then
(
res
=>
{
console
.
log
(
res
)
form
.
setFieldsValue
({
deliveryOrderId
:
id
,
...
res
})
setOuterHistoryList
(
res
.
outerHistoryList
)
})
},
[])
...
...
@@ -69,6 +72,14 @@ function DeliveryNoteAddForm() {
})
}
function
RenaderDeliveryType
({
value
}:
{
value
?:
any
})
{
return
(
<>
{
value
===
0
?
'自提'
:
'物流'
}
</>
)
}
return
(
<
AnchorPage
title=
{
ReceiptAddLabel
}
anchors=
{
anchors
}
...
...
@@ -92,10 +103,6 @@ function DeliveryNoteAddForm() {
<
Input
/>
</
FormItem
>
<
FormItem
label=
{
NoteLabel
}
name=
"remark"
>
<
Input
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
...
...
@@ -112,24 +119,29 @@ function DeliveryNoteAddForm() {
}
}
}
/>
</
FormItem
>
<
FormItem
label=
{
NoteLabel
}
name=
"remark"
>
<
Input
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
DeliveryInfo
.
name
}
id=
{
DeliveryInfo
.
key
}
>
<
ContentBox
title=
{
Harvest
.
name
}
id=
{
Harvest
.
key
}
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryDateLabel
}
name=
"delivery
Time"
>
<
DatePickerSelect
className=
'w-full'
/>
label=
{
ConsigneeTimeLabel
}
name=
"send
Time"
>
<
DatePickerSelect
className=
"w-full"
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
DeliveryNameLabel
}
name=
"delivery
VO"
>
label=
{
ReceivingAddress
}
name=
"receive
VO"
>
<
AddressDrawer
disabled=
{
false
}
addressListRequest=
{
(
val
)
=>
{
return
getLogisticsSelectListReceiverAddress
(
val
)
}
}
...
...
@@ -148,34 +160,36 @@ function DeliveryNoteAddForm() {
rules=
{
[
required
()
]
}
label=
{
Delivery
TimeLabel
}
name=
"deliveryRangeTim
e"
>
<
DatePickerSelect
.
RangePicker
className=
"w-full"
picker=
'time'
/>
label=
{
Delivery
PhoneLabel
}
name=
"receiverBO.phon
e"
>
<
Input
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
DeliveryInfo
.
name
}
id=
{
DeliveryInfo
.
key
}
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
Delivery
PhoneLabel
}
name=
"executorVO.phone
"
>
<
Input
/>
label=
{
Delivery
NoLabel
}
name=
"deliveryNo
"
>
<
Input
disabled=
{
true
}
/>
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
Harvest
.
name
}
id=
{
Harvest
.
key
}
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
Delivery
NoLabel
}
name=
"deliveryNo
"
>
<
Input
disabled=
{
true
}
/>
label=
{
Delivery
DateLabel
}
name=
"deliveryTime
"
>
<
DatePickerSelect
disabled=
{
true
}
className=
'w-full'
/>
</
FormItem
>
<
FormItem
rules=
{
[
required
()
]
}
label=
{
ReceivingAddress
}
name=
"receiveVO"
>
label=
{
DeliveryNameLabel
}
name=
"deliveryVO"
>
<
AddressDrawer
disabled=
{
true
}
addressListRequest=
{
(
val
)
=>
{
...
...
@@ -196,8 +210,8 @@ function DeliveryNoteAddForm() {
rules=
{
[
required
()
]
}
label=
{
ConsigneeTimeLabel
}
name=
"send
Time"
>
<
DatePickerSelect
disabled=
{
true
}
className=
"w-full"
/>
label=
{
DeliveryTimeLabel
}
name=
"deliveryRange
Time"
>
<
DatePickerSelect
.
RangePicker
disabled=
{
true
}
className=
"w-full"
/>
</
FormItem
>
</
ContentBox
>
...
...
@@ -209,11 +223,7 @@ function DeliveryNoteAddForm() {
required
()
]
}
label=
{
DeliveryTypeLabel
}
name=
"deliveryType"
>
<
Radio
.
Group
disabled=
{
true
}
>
<
Radio
.
Button
value=
{
1
}
>
物流
</
Radio
.
Button
>
<
Radio
.
Button
value=
{
2
}
>
自提
</
Radio
.
Button
>
{
/* <Radio.Button value={3}>无效配送</Radio.Button> */
}
</
Radio
.
Group
>
<
RenaderDeliveryType
/>
</
FormItem
>
<
FormItem
label=
{
LogisticsCarNoLabel
}
name=
"executorVO.carNumbers"
>
...
...
@@ -227,7 +237,6 @@ function DeliveryNoteAddForm() {
</
FormItem
>
</
ContentBox
>
<
ContentBox
title=
{
HarvestMaterial
.
name
}
id=
{
HarvestMaterial
.
key
}
cols=
{
1
}
>
<
HarvestMaterialContextProvider
value=
{
{
...
...
@@ -256,6 +265,17 @@ function DeliveryNoteAddForm() {
</
HarvestMaterialContextProvider
>
</
ContentBox
>
<
ContentBox
className=
'mt-15'
title=
{
ExternalRoamRecord
.
name
}
id=
{
ExternalRoamRecord
.
key
}
cols=
{
1
}
>
<
Table
columns=
{
[
...
ExternalRoamRecordTableColumn
,
]
}
rowKey=
"id"
dataSource=
{
outerHistoryList
}
/>
</
ContentBox
>
</
Form
>
</
AnchorPage
>
...
...
src/pages/order/receivingNote/deliveryNoteManage/details.tsx
View file @
bbeff74f
...
...
@@ -3,105 +3,155 @@
* @author: Gavin
* @description:
*/
import
React
,
{
useState
}
from
'react'
import
React
,
{
use
Effect
,
use
State
}
from
'react'
import
AnchorPage
from
'@/components/AnchorPage'
import
{
BaseInfo
as
ListInfo
}
from
'@/components/BaseInfo'
import
{
BillsInfo
,
DeliveryInfo
,
DeliveryNoteQuery
,
Distribution
,
LogisticsInfo
,
Material
}
from
'../../constants'
import
{
Tag
}
from
'antd'
;
import
{
BillsInfo
,
DeliveryInfo
,
DeliveryNoteQuery
,
Distribution
,
ExternalRoamRecord
,
Harvest
,
LogisticsInfo
,
Material
}
from
'../../constants'
import
{
Space
,
Spin
,
Table
,
Tag
}
from
'antd'
;
import
ReceiveNoteFacotry
from
'../../assets/handles/ReceiveNotePage'
;
import
{
useLocation
}
from
'umi'
;
import
{
DeliveryNoticeTableColumn
,
ExternalRoamRecordTableColumn
}
from
'../../constants/page-table-column'
;
import
{
DeliveryNumColumn
}
from
'../../constants/table-column'
;
const
ListInfoItem
=
ListInfo
.
BaseInfoItem
;
const
service
=
ReceiveNoteFacotry
.
getInstance
()
const
DeliveryNoteManageDetails
:
React
.
FC
=
()
=>
{
const
anchors
=
DeliveryNoteQuery
const
[
info
,
setInfo
]
=
useState
<
any
>
({})
const
[
tableDataSource
,
setTableDataSource
]
=
useState
([])
const
location
=
useLocation
()
const
{
id
}
=
(
location
as
any
).
query
const
[
loading
,
setLoading
]
=
useState
(
true
)
useEffect
(()
=>
{
Promise
.
all
([
service
.
getDetailById
(
id
),
service
.
getDetailProduct
({
id
,
current
:
1
})
]).
then
((
values
)
=>
{
setInfo
(
values
[
0
])
setTableDataSource
(
values
[
1
].
data
)
setLoading
(
false
)
})
},
[])
return
(
<
Spin
spinning=
{
loading
}
>
<
AnchorPage
title=
"2014-07-01 进口头层黄牛皮荔枝纹送货单|FH2014070100001"
title=
{
`${info?.deliveryNo}送货单详情`
}
anchors=
{
anchors
}
>
<
ListInfo
className=
'mt-15'
title=
{
BillsInfo
.
name
}
id=
{
BillsInfo
.
key
}
>
<
ListInfoItem
label=
'送货单'
>
SH2014071000001
{
info
?.
deliveryNo
}
</
ListInfoItem
>
<
ListInfoItem
label=
'供应会员'
>
广州白马
{
info
?.
buyerMemberName
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货单摘要'
>
广州白马
{
info
?.
digest
}
</
ListInfoItem
>
<
ListInfoItem
label=
'备注'
>
广州白马
{
info
?.
remark
}
</
ListInfoItem
>
<
ListInfoItem
label=
'外部状态'
>
<
Tag
color=
"green"
>
已提交
</
Tag
>
<
Tag
color=
"green"
>
{
info
?.
outerStatusName
}
</
Tag
>
</
ListInfoItem
>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
Distribution
.
name
}
id=
{
Distribution
.
key
}
>
<
ListInfoItem
label=
'送货日期'
>
SH2014071000001
<
ListInfo
className=
'mt-15'
title=
{
Harvest
.
name
}
id=
{
Harvest
.
key
}
>
<
div
>
<
ListInfoItem
className=
"mt-16"
label=
'送货日期'
>
{
info
?.
receiveTime
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货人'
>
广州白马
<
ListInfoItem
className=
"mt-16"
label=
'送货人'
>
{
info
?.
receiverBO
?.
consignee
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货时间
'
>
广州白马
<
ListInfoItem
className=
"mt-16"
label=
'送货电话
'
>
{
info
?.
receiverBO
?.
phone
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货电话'
>
广州白马
</
div
>
<
div
>
<
ListInfoItem
className=
"mt-16"
label=
'送货地址'
>
{
info
?.
receiverBO
?.
provinceName
??
''
}{
info
?.
receiverBO
?.
cityName
??
''
}{
info
?.
receiverBO
?.
districtName
??
''
}{
info
?.
receiverBO
?.
streetName
??
''
}{
info
?.
receiverBO
?.
address
??
''
}
</
ListInfoItem
>
</
div
>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
DeliveryInfo
.
name
}
id=
{
DeliveryInfo
.
key
}
>
<
ListInfoItem
label=
'送货日期'
>
SH2014071000001
<
div
>
<
ListInfoItem
className=
"mt-16"
label=
'送货单编号'
>
{
info
?.
deliveryNo
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货人
'
>
广州白马
<
ListInfoItem
className=
"mt-16"
label=
'发货时间
'
>
{
info
?.
sendTime
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货时间'
>
广州白马
</
ListInfoItem
>
<
ListInfoItem
label=
'送货电话'
>
广州白马
</
div
>
<
div
>
<
ListInfoItem
className=
"mt-16"
label=
'发货(自提)地址'
>
{
info
?.
deliverVO
?.
provinceName
??
''
}{
info
?.
deliverVO
?.
cityName
??
''
}{
info
?.
deliverVO
?.
districtName
??
''
}{
info
?.
deliverVO
?.
streetName
??
''
}{
info
?.
deliverVO
?.
address
??
''
}
</
ListInfoItem
>
</
div
>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
LogisticsInfo
.
name
}
id=
{
LogisticsInfo
.
key
}
>
<
ListInfoItem
label=
'物流方式'
>
SH2014071000001
</
ListInfoItem
>
<
ListInfoItem
label=
'物流单号'
>
广州白马
{
info
?.
logisticsNo
??
'-'
}
</
ListInfoItem
>
<
ListInfoItem
label=
'物流公司'
>
广州白马
{
info
?.
logisticsCompany
}
</
ListInfoItem
>
<
ListInfoItem
label=
'车牌号码'
>
广州白马
{
info
?.
deliverVO
?.
carNumbers
??
'-'
}
</
ListInfoItem
>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
Material
.
name
}
id=
{
Material
.
key
}
>
<
ListInfo
className=
'mt-15'
title=
{
Material
.
name
}
id=
{
Material
.
key
}
cols=
{
1
}
>
<
Table
rowKey=
{
row
=>
row
.
orderNo
}
columns=
{
[
...
DeliveryNoticeTableColumn
,
{
...
DeliveryNumColumn
,
render
:
(
t
,
rcode
,
index
)
=>
{
return
rcode
.
deliveryCount
}
}
]
}
dataSource=
{
tableDataSource
}
/>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
ExternalRoamRecord
.
name
}
id=
{
ExternalRoamRecord
.
key
}
cols=
{
1
}
>
<
Table
columns=
{
[
...
ExternalRoamRecordTableColumn
,
]
}
rowKey=
"id"
dataSource=
{
info
?.
outerHistoryList
}
/>
</
ListInfo
>
</
AnchorPage
>
</
Spin
>
)
}
...
...
src/pages/order/receivingNote/deliveryNoteManage/index.tsx
View file @
bbeff74f
...
...
@@ -39,9 +39,13 @@ const DeliveryNoteManage: React.FC = () => {
'查看'
:
true
,
}
const
operationHandler
=
{
'修改'
:
()
=>
{
console
.
log
(
'修改 :>> '
,)
},
'修改'
:
()
=>
{
},
'作废'
:
()
=>
{
console
.
log
(
'作废 :>> '
,)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
'查看'
:
()
=>
{
},
}
return
(
<
TableOperation
...
...
@@ -57,9 +61,9 @@ const DeliveryNoteManage: React.FC = () => {
dataIndex
:
'id'
,
key
:
'id'
,
width
:
160
,
render
:
(
t
ext
,
record
)
=>
<
EyePreview
url=
'/memberCenter/order/receivingNote/deliveryNoteManage/details'
>
{
text
}
render
:
(
t
,
r
)
=>
<
EyePreview
url=
{
`/memberCenter/order/receivingNote/deliveryNoteManage/details?id=${r.id}`
}
>
{
r
.
receiveNo
}
</
EyePreview
>
},
{
title
:
'收货单摘要'
,
dataIndex
:
'digest'
,
key
:
'digest'
},
...
...
@@ -71,7 +75,7 @@ const DeliveryNoteManage: React.FC = () => {
title
:
'外部状态'
,
dataIndex
:
'id6'
,
key
:
'id6'
,
render
:
(
text
:
string
,
record
:
any
)
=>
{
render
:
(
text
,
record
)
=>
{
const
styles
=
tagService
.
getTagStyle
(
record
.
outerStatus
);
return
(
<
Tag
color=
{
styles
.
bgColor
}
>
...
...
@@ -80,13 +84,13 @@ const DeliveryNoteManage: React.FC = () => {
)
}
},
{
/*
{
title: '操作',
dataIndex: '',
key: 'x',
align: 'center',
render: (record) => renderOptionButton(record)
},
},
*/
]
const
fetchData
=
(
params
:
unknown
)
=>
{
...
...
src/pages/order/receivingNote/deliveryNoteQuery/details.tsx
View file @
bbeff74f
...
...
@@ -3,17 +3,38 @@
* @author: Gavin
* @description:
*/
import
React
,
{
useState
}
from
'react'
import
React
,
{
use
Effect
,
use
State
}
from
'react'
import
AnchorPage
from
'@/components/AnchorPage'
import
{
BaseInfo
as
ListInfo
}
from
'@/components/BaseInfo'
import
{
BillsInfo
,
DeliveryInfo
,
DeliveryNoteQuery
,
LogisticsInfo
,
Material
,
Distribution
}
from
'../../constants'
import
{
Tag
}
from
'antd'
import
{
Table
,
Tag
}
from
'antd'
import
ReceiveNoteFacotry
from
'../../assets/handles/ReceiveNotePage'
import
{
useLocation
}
from
'umi'
import
{
DeliveryNoticeTableColumn
}
from
'../../constants/page-table-column'
import
{
DeliveryNumColumn
}
from
'../../constants/table-column'
const
service
=
ReceiveNoteFacotry
.
getInstance
(
'Query'
)
const
ListInfoItem
=
ListInfo
.
BaseInfoItem
;
const
DeliveryNoteDetails
:
React
.
FC
=
()
=>
{
const
anchors
=
DeliveryNoteQuery
const
[
info
,
setInfo
]
=
useState
<
any
>
({})
const
[
tableDataSource
,
setTableDataSource
]
=
useState
<
any
>
([])
const
location
=
useLocation
()
const
{
id
}
=
(
location
as
any
).
query
useEffect
(()
=>
{
Promise
.
all
([
service
.
getDetailById
(
id
),
service
.
getDetailProduct
({
id
,
current
:
"1"
})
]).
then
(
values
=>
{
console
.
log
(
values
[
0
])
setInfo
(
values
[
0
])
setTableDataSource
(
values
[
1
].
data
)
})
},
[])
return
(
<
AnchorPage
...
...
@@ -23,19 +44,19 @@ const DeliveryNoteDetails: React.FC = () => {
<
ListInfo
className=
'mt-15'
title=
{
BillsInfo
.
name
}
id=
{
BillsInfo
.
key
}
>
<
ListInfoItem
label=
'送货单'
>
SH2014071000001
{
info
?.
deliveryNo
}
</
ListInfoItem
>
<
ListInfoItem
label=
'供应会员'
>
广州白马
{
info
?.
buyerMemberName
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货单摘要'
>
广州白马
{
info
?.
digest
}
</
ListInfoItem
>
<
ListInfoItem
label=
'备注'
>
广州白马
{
info
?.
remark
}
</
ListInfoItem
>
<
ListInfoItem
label=
'外部状态'
>
...
...
@@ -45,60 +66,75 @@ const DeliveryNoteDetails: React.FC = () => {
<
ListInfo
className=
'mt-15'
title=
{
Distribution
.
name
}
id=
{
Distribution
.
key
}
>
<
ListInfoItem
label=
'送货日期'
>
SH2014071000001
{
info
?.
deliveryTime
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货人'
>
广州白马
</
ListInfoItem
>
<
ListInfoItem
label=
'送货时间'
>
广州白马
{
info
?.
deliverVO
?.
consignee
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货电话'
>
广州白马
{
info
?.
deliverVO
?.
phone
}
</
ListInfoItem
>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
DeliveryInfo
.
name
}
id=
{
DeliveryInfo
.
key
}
>
<
ListInfoItem
label=
'
送货日期
'
>
SH2014071000001
<
ListInfoItem
label=
'
发货时间
'
>
{
info
?.
sendTime
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货人'
>
广州白马
<
ListInfoItem
label=
'收货地址'
>
{
info
?.
receiverBO
?.
provinceName
}
{
info
?.
receiverBO
?.
cityName
}
{
info
?.
receiverBO
?.
districtName
}
{
info
?.
receiverBO
?.
streetName
}
{
info
?.
receiverBO
?.
address
}
{
info
?.
receiverBO
?.
consignee
}
/
{
info
?.
receiverBO
?.
phone
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货时间'
>
广州白马
<
ListInfoItem
label=
'发货(自提)地址'
>
{
info
?.
deliverVO
?.
provinceName
}
{
info
?.
deliverVO
?.
cityName
}
{
info
?.
deliverVO
?.
districtName
}
{
info
?.
deliverVO
?.
streetName
}
{
info
?.
deliverVO
?.
address
}
{
info
?.
deliverVO
?.
consignee
}
/
{
info
?.
deliverVO
?.
phone
}
</
ListInfoItem
>
<
ListInfoItem
label=
'送货电话'
>
广州白马
</
ListInfoItem
>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
LogisticsInfo
.
name
}
id=
{
LogisticsInfo
.
key
}
>
<
ListInfoItem
label=
'物流方式'
>
SH2014071000001
</
ListInfoItem
>
<
ListInfoItem
label=
'物流单号'
>
广州白马
{
info
?.
logisticsNo
}
</
ListInfoItem
>
<
ListInfoItem
label=
'物流公司'
>
广州白马
{
info
?.
logisticsCompany
}
</
ListInfoItem
>
<
ListInfoItem
label=
'车牌号码'
>
广州白马
{
info
?.
deliverVO
?.
carNumbers
}
</
ListInfoItem
>
</
ListInfo
>
<
ListInfo
className=
'mt-15'
title=
{
Material
.
name
}
id=
{
Material
.
key
}
>
<
ListInfo
className=
'mt-15'
title=
{
Material
.
name
}
id=
{
Material
.
key
}
cols=
{
1
}
>
<
Table
rowKey=
{
row
=>
row
.
orderNo
}
columns=
{
[
...
DeliveryNoticeTableColumn
,
{
...
DeliveryNumColumn
,
render
:
(
t
,
rcode
,
index
)
=>
{
return
rcode
.
deliveryCount
}
}
]
}
dataSource=
{
tableDataSource
}
/>
</
ListInfo
>
</
AnchorPage
>
...
...
src/pages/order/receivingNote/deliveryNoteQuery/index.tsx
View file @
bbeff74f
...
...
@@ -42,7 +42,9 @@ const DeliveryNoteQuery: React.FC = () => {
'生产收货单'
:
()
=>
{
history
.
push
(
`/memberCenter/order/receivingNote/deliveryNoteManage/add?id=
${
r
.
id
}
`
)
},
'查看'
:
()
=>
{
console
.
log
(
'查看 :>> '
,)
},
'查看'
:
()
=>
{
history
.
push
(
`/memberCenter/order/receivingNote/deliveryNoteQuery/details?id=
${
r
.
id
}
`
)
},
}
return
(
<
TableOperation
...
...
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