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
shenshaokai
jinfa-platform
Commits
52195e37
Commit
52195e37
authored
Mar 25, 2022
by
Gavin Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完善送货计划详情
parent
e1a97150
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
70 deletions
+111
-70
page-table-column.tsx
src/pages/order/constants/page-table-column.tsx
+46
-11
table-column.ts
src/pages/order/constants/table-column.ts
+52
-17
details.tsx
...rder/deliveryPlanManagement/deliveryPlanQuery/details.tsx
+13
-42
No files found.
src/pages/order/constants/page-table-column.tsx
View file @
52195e37
/**
* 订单模块 Table Column 组装
* @author: 莫雷
*/
import
{
HarvestMaterialInput
}
from
"../assets/context"
;
import
{
BrandColumn
,
ClassColumn
,
Co
nsigneeNumColumn
,
DeliveryNumColumn
,
FlowNoteColumn
,
FlowOnColumn
,
FlowOptionsColumn
,
FlowOptionsTimeColumn
,
FlowRoleColumn
,
FlowStatusColumn
,
MaterialNameColumn
,
MaterialNoColumn
,
OrderCreatedAtColumn
,
OrderNoColumn
,
Oredr
NumColumn
,
UntilColumn
}
from
"./table-column"
;
import
{
BrandColumn
,
ClassColumn
,
Co
mmodityIdColumn
,
ConsigneeNumColumn
,
DeliveredNumColumn
,
DeliveryNumColumn
,
FlowNoteColumn
,
FlowOnColumn
,
FlowOptionsColumn
,
FlowOptionsTimeColumn
,
FlowRoleColumn
,
FlowStatusColumn
,
MaterialModelColumn
,
MaterialNameColumn
,
MaterialNoColumn
,
OrderCreatedAtColumn
,
OrderNoColumn
,
OrderSummaryColumn
,
OredrNumColumn
,
PlannedDeliveryNumColumn
,
TradeNameColumn
,
Transit
NumColumn
,
UntilColumn
}
from
"./table-column"
;
export
const
DeliveryNoteAddFromTableColumn
=
[
MaterialNoColumn
,
...
...
@@ -34,14 +38,8 @@ export const OutStatusLogTableColumn = [
export
const
DeliveryNoticeTableColumn
=
[
{
title
:
'商品ID'
,
render
:
(
txt
)
=>
txt
},
{
title
:
"商品名称"
,
render
:
(
_
,
roced
)
=>
roced
.
id
},
CommodityIdColumn
,
TradeNameColumn
,
ClassColumn
,
BrandColumn
,
UntilColumn
,
...
...
@@ -49,4 +47,41 @@ export const DeliveryNoticeTableColumn = [
OrderCreatedAtColumn
,
OredrNumColumn
,
DeliveryNumColumn
];
\ No newline at end of file
];
// 计划送货物料表格
export
const
PlannedDeliveryMaterialTableColumn
:
any
=
[
{
dataIndex
:
'name1'
,
width
:
80
,
...
MaterialNoColumn
,
},
{
dataIndex
:
'name2'
,
width
:
192
,
...
MaterialNameColumn
,
},
{
dataIndex
:
'name3'
,
width
:
128
,
...
MaterialModelColumn
,
},
{
dataIndex
:
'name4'
,
width
:
96
,
...
ClassColumn
,
},
{
dataIndex
:
'name5'
,
width
:
96
,
...
BrandColumn
,
},
{
dataIndex
:
'name6'
,
width
:
64
,
...
UntilColumn
,
},
{
dataIndex
:
'name7'
,
width
:
96
,
...
OredrNumColumn
,
},
{
dataIndex
:
'name8'
,
width
:
96
,
...
ConsigneeNumColumn
,
},
{
dataIndex
:
'name9'
,
width
:
96
,
...
TransitNumColumn
,
},
{
dataIndex
:
'name10'
,
width
:
96
,
...
DeliveredNumColumn
,
},
{
dataIndex
:
'name11'
,
width
:
128
,
...
PlannedDeliveryNumColumn
,
},
];
// 计划送货物料子表格
export
const
PlannedDeliveryMaterialExpandableTableColumn
:
any
=
[
{
dataIndex
:
'name1'
,
...
OrderNoColumn
,
},
{
dataIndex
:
'name2'
,
...
OrderSummaryColumn
,
},
{
dataIndex
:
'name3'
,
...
OrderCreatedAtColumn
,
},
{
dataIndex
:
'name4'
,
...
OredrNumColumn
,
},
{
dataIndex
:
'name5'
,
...
ConsigneeNumColumn
,
},
{
dataIndex
:
'name6'
,
...
TransitNumColumn
,
},
{
dataIndex
:
'name7'
,
...
DeliveredNumColumn
,
},
{
dataIndex
:
'name8'
,
...
PlannedDeliveryNumColumn
,
},
];
// // 外部单据流转记录
export
const
ExternalRoamRecordTableColumn
:
any
=
[
{
dataIndex
:
'name1'
,
...
FlowOnColumn
,
},
{
dataIndex
:
'name2'
,
...
FlowRoleColumn
,
},
{
dataIndex
:
'name4'
,
...
FlowStatusColumn
,
},
{
dataIndex
:
'name5'
,
...
FlowOptionsColumn
,
},
{
dataIndex
:
'name6'
,
...
FlowOptionsTimeColumn
,
},
{
dataIndex
:
'name7'
,
...
FlowNoteColumn
},
]
\ No newline at end of file
src/pages/order/constants/table-column.ts
View file @
52195e37
import
{
TableColumnProps
}
from
"antd"
;
/**
* 订单模块 Table Column 分离 (国际化统一配置)
* @author: 莫雷
*/
export
const
CommodityIdColumn
=
{
title
:
'商品ID'
,
align
:
'center'
,
}
export
const
TradeNameColumn
=
{
title
:
'商品名称'
,
align
:
'center'
,
}
export
const
MaterialNoColumn
=
{
title
:
'物料编号'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
MaterialNo
align
:
'center'
,
}
export
const
MaterialNameColumn
=
{
title
:
'物料名称'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
MaterialName
align
:
'center'
,
}
export
const
MaterialModelColumn
=
{
title
:
'规格型号'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
MaterialModel
align
:
'center'
,
}
export
const
ClassColumn
=
{
title
:
'品类'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
Class
align
:
'center'
,
}
export
const
BrandColumn
=
{
title
:
'品牌'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
Brand
align
:
'center'
,
}
export
const
UntilColumn
=
{
title
:
'单位'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
Until
align
:
'center'
,
}
export
const
OrderNoColumn
=
{
title
:
'订单号'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
OrderNo
align
:
'center'
,
}
export
const
OrderSummaryColumn
=
{
title
:
'订单摘要'
,
align
:
'center'
,
}
export
const
OrderCreatedAtColumn
=
{
title
:
'下单时间'
,
align
:
'center'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
OrderCreatedAt
}
export
const
OredrNumColumn
=
{
title
:
'订单数量'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
OredrNum
align
:
'center'
,
}
export
const
DeliveryNumColumn
=
{
title
:
'送货数量'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
DeliveryNum
align
:
'center'
,
}
export
const
ConsigneeNumColumn
=
{
title
:
'收货数量'
,
render
:
(
txt
,
rcoed
)
=>
rcoed
.
ConsigneeNum
align
:
'center'
,
}
export
const
TransitNumColumn
=
{
title
:
'在途数量'
,
align
:
'center'
,
render
:
(
txt
,
rcoed
)
=>
txt
}
export
const
DeliveredNumColumn
=
{
title
:
'待送货数量'
,
align
:
'center'
,
}
export
const
PlannedDeliveryNumColumn
=
{
title
:
'计划送货数量'
,
align
:
'center'
,
}
export
const
FlowOnColumn
=
{
title
:
'流转顺序号'
,
render
:
(
_
,
rcode
)
=>
rcode
.
FlowOnColumn
align
:
'center'
,
}
export
const
FlowRoleColumn
=
{
title
:
'操作角色'
,
render
:
(
_
,
rcode
)
=>
rcode
.
FlowRoleColumn
align
:
'center'
,
}
export
const
FlowStatusColumn
=
{
title
:
'状态'
,
render
:
(
_
,
rcode
)
=>
rcode
.
FlowStatusColumn
align
:
'center'
,
}
export
const
FlowOptionsColumn
=
{
title
:
'操作'
,
render
:
(
_
,
rcode
)
=>
rcode
.
FlowOptionsColumn
align
:
'center'
,
}
export
const
FlowOptionsTimeColumn
=
{
title
:
'操作时间'
,
render
:
(
_
,
rcode
)
=>
rcode
.
FlowOptionsTimeColumn
align
:
'center'
,
}
export
const
FlowNoteColumn
=
{
title
:
'备注'
,
render
:
(
_
,
rcode
)
=>
rcode
.
FlowNoteColumn
align
:
'center'
,
}
\ No newline at end of file
src/pages/order/deliveryPlanManagement/deliveryPlanQuery/details.tsx
View file @
52195e37
...
...
@@ -4,32 +4,18 @@
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
history
}
from
'umi'
import
{
Card
,
Descriptions
,
Steps
,
Table
,
Tag
}
from
'antd'
import
{
Steps
,
Table
,
Tag
}
from
'antd'
import
AnchorPage
from
'@/components/AnchorPage'
import
{
AnchorsItem
}
from
"@/components/AnchorPage"
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
{
BaseInfo
as
base_Info
,
Circulation
,
ConfirmDeliveryPlan
,
DeliveryPlanDetails
,
ExternalRoamRecord
,
ExternalState
,
PlanMaterial
,
PlanningCycle
,
PlanNumber
,
PlanSummary
,
Purchaser
,
SubmitDeliveryPlan
,
Supplier
,
SupplyMember
,
}
from
'../../constants'
import
{
ExternalRoamRecordTableColumn
,
PlannedDeliveryMaterialExpandableTableColumn
,
PlannedDeliveryMaterialTableColumn
}
from
'../../constants/page-table-column'
const
DeliveryPlanManagementDetails
:
React
.
FC
=
()
=>
{
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
(
DeliveryPlanDetails
)
const
[
details
,
setDetails
]
=
useState
<
any
>
({})
const
[
test
,
setTest
]
=
useState
<
any
>
([])
// 计划送货物料
const
columns
=
[
{
title
:
'物料编号'
,
dataIndex
:
'name1'
,
width
:
80
,
ellipsis
:
true
,
align
:
'center'
},
{
title
:
'物料名称'
,
dataIndex
:
'name2'
,
width
:
192
,
ellipsis
:
true
,
align
:
'center'
},
{
title
:
'规格型号'
,
dataIndex
:
'name3'
,
width
:
128
,
align
:
'center'
},
{
title
:
'品类'
,
dataIndex
:
'name4'
,
width
:
96
,
align
:
'center'
},
{
title
:
'品牌'
,
dataIndex
:
'name5'
,
width
:
96
,
align
:
'center'
},
{
title
:
'单位'
,
dataIndex
:
'name6'
,
width
:
64
,
align
:
'center'
},
{
title
:
'订单数量'
,
dataIndex
:
'name7'
,
width
:
96
,
align
:
'center'
},
{
title
:
'收货数量'
,
dataIndex
:
'name8'
,
width
:
96
,
align
:
'center'
},
{
title
:
'在途数量'
,
dataIndex
:
'name9'
,
width
:
96
,
align
:
'center'
},
{
title
:
'待送货数量'
,
dataIndex
:
'name10'
,
width
:
96
,
align
:
'center'
},
{
title
:
'计划送货数量'
,
dataIndex
:
'name11'
,
width
:
128
,
align
:
'center'
},
...
test
]
const
data
=
[
{
id
:
'1'
,
...
...
@@ -89,17 +75,6 @@ const DeliveryPlanManagementDetails: React.FC = () => {
},
]
const
expandedRowRender
=
()
=>
{
const
columns
=
[
{
title
:
'订单号'
,
dataIndex
:
'name1'
,
align
:
'center'
},
{
title
:
'订单摘要'
,
dataIndex
:
'name2'
,
align
:
'center'
},
{
title
:
'下单时间'
,
dataIndex
:
'name3'
,
align
:
'center'
},
{
title
:
'订单数量'
,
dataIndex
:
'name4'
,
align
:
'center'
},
{
title
:
'收货数量'
,
dataIndex
:
'name5'
,
align
:
'center'
},
{
title
:
'在途数量'
,
dataIndex
:
'name6'
,
align
:
'center'
},
{
title
:
'待送货数量'
,
dataIndex
:
'name7'
,
align
:
'center'
},
{
title
:
'计划送货数量'
,
dataIndex
:
'name8'
,
align
:
'center'
},
...
test
]
const
data
=
[
{
id
:
'1'
,
...
...
@@ -135,21 +110,17 @@ const DeliveryPlanManagementDetails: React.FC = () => {
'name8'
:
'14,000'
,
}
]
return
<
Table
rowKey=
{
'id'
}
columns=
{
columns
}
dataSource=
{
data
}
pagination=
{
false
}
/>
return
<
Table
rowKey=
{
'id'
}
columns=
{
[...
PlannedDeliveryMaterialExpandableTableColumn
,
...
test
]
}
dataSource=
{
data
}
pagination=
{
false
}
/>
}
useEffect
(()
=>
{
setTimeout
(()
=>
{
let
arr
=
Array
.
from
(
Array
(
90
)).
map
((
item
,
i
)
=>
({
title
:
'日期'
+
i
,
dataIndex
:
'date'
+
i
,
width
:
64
,
align
:
'center'
}))
console
.
log
(
'执行渲染 :>> '
,
arr
);
setTest
(
arr
)
let
arr
=
Array
.
from
(
Array
(
90
)).
map
((
item
,
i
)
=>
({
title
:
'日期'
+
i
,
dataIndex
:
'date'
+
i
,
width
:
'64px'
,
align
:
'center'
}))
console
.
log
(
'执行渲染 :>> '
,
arr
);
setTest
(
PlannedDeliveryMaterialTableColumn
.
concat
(
arr
)
)
},
0
)
},
[])
// 外部单据流转记录
const
externalRoamColumns
=
[
{
title
:
'物料名称'
,
dataIndex
:
'name1'
,
},
]
return
(
<
AnchorPage
title=
{
details
?.
name
||
'没有title'
}
...
...
@@ -181,20 +152,20 @@ const DeliveryPlanManagementDetails: React.FC = () => {
</
BaseInfo
>
<
BaseInfo
className=
'mt-1'
title=
{
PlanMaterial
.
name
}
id=
{
PlanMaterial
.
key
}
cols=
{
1
}
>
<
Table
defaultExpandAllRows
//
defaultExpandAllRows
rowKey=
{
'id'
}
columns=
{
columns
}
columns=
{
[...
PlannedDeliveryMaterialTableColumn
,
...
test
]
}
expandable=
{
{
expandedRowRender
}
}
dataSource=
{
data
}
tableLayout=
"fixed"
scroll=
{
{
x
:
2022
}
}
/>
</
BaseInfo
>
<
BaseInfo
className=
'mt-1'
title=
{
ExternalRoamRecord
.
name
}
id=
{
ExternalRoamRecord
.
key
}
cols=
{
1
}
>
<
Table
rowKey=
{
'id'
}
columns=
{
externalRoamColumns
}
dataSource=
{
[]
}
/>
<
Table
dataSource=
{
data
}
columns=
{
ExternalRoamRecordTableColumn
}
/>
</
BaseInfo
>
</
AnchorPage
>
)
...
...
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