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
3d629c1a
Commit
3d629c1a
authored
Apr 22, 2022
by
Gavin Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 新增送货计划SRM嵌套表格对齐测试
parent
a9558346
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
18 deletions
+30
-18
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+1
-0
page-table-column.tsx
src/pages/order/constants/page-table-column.tsx
+16
-16
create.tsx
...er/deliveryPlanManagement/deliveryPlanAwaitSRM/create.tsx
+13
-2
No files found.
src/layouts/BasicLayout.tsx
View file @
3d629c1a
...
@@ -191,6 +191,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
...
@@ -191,6 +191,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
{
...
settings
}
{
...
settings
}
>
>
{
children
}
{
children
}
{
defaultFooterDom
}
</
ProLayout
>
</
ProLayout
>
);
);
};
};
...
...
src/pages/order/constants/page-table-column.tsx
View file @
3d629c1a
...
@@ -128,9 +128,9 @@ export const DeliveryGoodsTableColumn: any = [
...
@@ -128,9 +128,9 @@ export const DeliveryGoodsTableColumn: any = [
// 送货计划管理,协同 B2B通用 column
// 送货计划管理,协同 B2B通用 column
export
const
columnB2B
=
[
export
const
columnB2B
=
[
{
...
CommodityNoColumn
,
dataIndex
:
'skuId'
,
width
:
80
,
ellipsis
:
true
,
},
{
...
CommodityNoColumn
,
dataIndex
:
'skuId'
,
width
:
80
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
TradeNameColumn
,
dataIndex
:
'productName'
,
width
:
192
,
ellipsis
:
true
,
},
{
...
TradeNameColumn
,
dataIndex
:
'productName'
,
width
:
192
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
ClassColumn
,
dataIndex
:
'category'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
ClassColumn
,
dataIndex
:
'category'
,
width
:
128
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
BrandColumn
,
dataIndex
:
'brand'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
BrandColumn
,
dataIndex
:
'brand'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
UntilColumn
,
dataIndex
:
'unit'
,
width
:
64
,
ellipsis
:
true
,
},
{
...
UntilColumn
,
dataIndex
:
'unit'
,
width
:
64
,
ellipsis
:
true
,
},
{
...
OrderNumColumn
,
dataIndex
:
'purchaseCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
OrderNumColumn
,
dataIndex
:
'purchaseCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
...
@@ -141,27 +141,27 @@ export const columnB2B = [
...
@@ -141,27 +141,27 @@ export const columnB2B = [
]
]
// 送货计划管理,协同 SRM通用 column
// 送货计划管理,协同 SRM通用 column
export
const
columnSRM
=
[
export
const
columnSRM
=
[
{
...
MaterialNoColumn
,
dataIndex
:
'skuId'
,
width
:
80
,
ellipsis
:
true
,
},
{
...
MaterialNoColumn
,
dataIndex
:
'skuId'
,
width
:
80
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
MaterialNameColumn
,
dataIndex
:
'productName'
,
width
:
192
,
ellipsis
:
true
,
},
{
...
MaterialNameColumn
,
dataIndex
:
'productName'
,
width
:
192
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
MaterialModelColumn
,
dataIndex
:
'spec'
,
width
:
128
,
ellipsis
:
true
,
},
{
...
MaterialModelColumn
,
dataIndex
:
'spec'
,
width
:
128
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
ClassColumn
,
dataIndex
:
'category'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
ClassColumn
,
dataIndex
:
'category'
,
width
:
96
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
BrandColumn
,
dataIndex
:
'brand'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
BrandColumn
,
dataIndex
:
'brand'
,
width
:
96
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
UntilColumn
,
dataIndex
:
'unit'
,
width
:
64
,
ellipsis
:
true
,
},
{
...
UntilColumn
,
dataIndex
:
'unit'
,
width
:
64
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
OrderNumColumn
,
dataIndex
:
'purchaseCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
OrderNumColumn
,
dataIndex
:
'purchaseCountSum'
,
width
:
96
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
ConsigneeNumColumn
,
dataIndex
:
'receiveCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
ConsigneeNumColumn
,
dataIndex
:
'receiveCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
TransitNumColumn
,
dataIndex
:
'transitCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
TransitNumColumn
,
dataIndex
:
'transitCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
DeliveredNumColumn
,
dataIndex
:
'leftCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
DeliveredNumColumn
,
dataIndex
:
'leftCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
PlannedDeliveryNumColumn
,
dataIndex
:
'planCountSum'
,
width
:
128
,
ellipsis
:
true
,
},
{
...
PlannedDeliveryNumColumn
,
dataIndex
:
'planCountSum'
,
width
:
96
,
ellipsis
:
true
,
},
]
]
// 送货计划管理,协同 SRM,B2B 嵌套表格通用 column - 不带地址
// 送货计划管理,协同 SRM,B2B 嵌套表格通用 column - 不带地址
export
const
initExpandIconColumn
=
[
export
const
initExpandIconColumn
=
[
{
...
OrderNoColumn
,
dataIndex
:
'orderNo'
,
width
:
80
,
ellipsis
:
true
,
},
{
...
OrderNoColumn
,
dataIndex
:
'orderNo'
,
width
:
108
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
OrderSummaryColumn
,
dataIndex
:
'orderDigest'
,
width
:
90
,
ellipsis
:
true
,
},
{
...
OrderSummaryColumn
,
dataIndex
:
'orderDigest'
,
width
:
400
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
OrderCreatedAtColumn
,
dataIndex
:
'createTime'
,
width
:
1
20
,
ellipsis
:
true
,
},
{
...
OrderCreatedAtColumn
,
dataIndex
:
'createTime'
,
width
:
1
80
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
OrderNumColumn
,
dataIndex
:
'purchaseCount'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
OrderNumColumn
,
dataIndex
:
'purchaseCount'
,
width
:
96
,
ellipsis
:
true
,
fixed
:
'left'
},
{
...
ConsigneeNumColumn
,
dataIndex
:
'receiveCount'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
ConsigneeNumColumn
,
dataIndex
:
'receiveCount'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
TransitNumColumn
,
dataIndex
:
'transitCount'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
TransitNumColumn
,
dataIndex
:
'transitCount'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
DeliveredNumColumn
,
dataIndex
:
'leftCount'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
DeliveredNumColumn
,
dataIndex
:
'leftCount'
,
width
:
96
,
ellipsis
:
true
,
},
{
...
PlannedDeliveryNumColumn
,
dataIndex
:
'planCount'
,
width
:
128
,
ellipsis
:
true
,
},
{
...
PlannedDeliveryNumColumn
,
dataIndex
:
'planCount'
,
width
:
96
,
ellipsis
:
true
,
},
]
]
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitSRM/create.tsx
View file @
3d629c1a
...
@@ -50,7 +50,7 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
...
@@ -50,7 +50,7 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
const
expandedRowRender
=
(
record
)
=>
{
const
expandedRowRender
=
(
record
)
=>
{
return
<
div
>
return
<
div
>
<
Table
rowKey=
{
'orderProductId'
}
columns=
{
expandIconColumn
}
dataSource=
{
record
.
orders
}
pagination=
{
false
}
tableLayout=
"fixed"
/>
<
Table
id=
'child'
rowKey=
{
'orderProductId'
}
columns=
{
expandIconColumn
}
dataSource=
{
record
.
orders
}
pagination=
{
false
}
tableLayout=
"fixed"
scroll=
{
{
x
:
'100%'
}
}
/>
</
div
>
</
div
>
}
}
...
@@ -125,7 +125,7 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
...
@@ -125,7 +125,7 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
const
dates
=
getDayAll
(
startDate
,
endDate
)
const
dates
=
getDayAll
(
startDate
,
endDate
)
datesRef
.
current
=
dates
datesRef
.
current
=
dates
setSelectedDate
([
startDate
,
endDate
])
setSelectedDate
([
startDate
,
endDate
])
const
datesColumn
=
dates
.
map
((
item
,
i
)
=>
({
title
:
item
.
substr
(
1
),
dataIndex
:
item
,
key
:
item
,
width
:
12
0
,
align
:
'center'
,
}))
const
datesColumn
=
dates
.
map
((
item
,
i
)
=>
({
title
:
item
.
substr
(
1
),
dataIndex
:
item
,
key
:
item
,
width
:
8
0
,
align
:
'center'
,
}))
const
datesExpandIconColumn
=
dates
.
map
((
item
,
i
)
=>
({
const
datesExpandIconColumn
=
dates
.
map
((
item
,
i
)
=>
({
title
:
item
.
substr
(
1
),
title
:
item
.
substr
(
1
),
dataIndex
:
item
,
dataIndex
:
item
,
...
@@ -199,6 +199,16 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
...
@@ -199,6 +199,16 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
}
}
},
[
selectedDate
,
selectedMember
])
},
[
selectedDate
,
selectedMember
])
useEffect
(()
=>
{
const
parent
=
document
.
querySelector
(
'#parent .ant-table-content'
)
parent
?.
addEventListener
(
'scroll'
,
()
=>
{
const
child
=
document
.
querySelector
(
'#child .ant-table-content'
)
if
(
child
)
{
child
.
scrollLeft
=
parent
.
scrollLeft
}
})
},[])
return
(
return
(
<
Spin
spinning=
{
spinning
}
>
<
Spin
spinning=
{
spinning
}
>
<
AnchorPage
<
AnchorPage
...
@@ -255,6 +265,7 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
...
@@ -255,6 +265,7 @@ const DeliveryPlanAwaitSRMCreate: React.FC = () => {
</
BaseInfo
>
</
BaseInfo
>
<
BaseInfo
className=
'mt-16'
title=
{
PlanMaterial
.
name
}
id=
{
PlanMaterial
.
key
}
cols=
{
1
}
>
<
BaseInfo
className=
'mt-16'
title=
{
PlanMaterial
.
name
}
id=
{
PlanMaterial
.
key
}
cols=
{
1
}
>
<
Table
<
Table
id=
'parent'
// defaultExpandAllRows
// defaultExpandAllRows
rowKey=
{
'planProductId'
}
rowKey=
{
'planProductId'
}
columns=
{
materialTableColumn
}
columns=
{
materialTableColumn
}
...
...
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