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
4beddd16
Commit
4beddd16
authored
Apr 09, 2022
by
Gavin Peng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复选择会员组件分页器已知问题
parent
fe2e17d3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
14 deletions
+38
-14
RoleSelect.tsx
src/components/RoleSelect/RoleSelect.tsx
+11
-6
create.tsx
...er/deliveryPlanManagement/deliveryPlanAwaitSRM/create.tsx
+14
-5
update.tsx
...er/deliveryPlanManagement/deliveryPlanAwaitSRM/update.tsx
+13
-3
No files found.
src/components/RoleSelect/RoleSelect.tsx
View file @
4beddd16
...
...
@@ -32,6 +32,7 @@ function RoleSelect(props: RoleSelectProps) {
const
[
dataSource
,
setDataSource
]
=
useState
([])
const
[
total
,
setTotal
]
=
useState
(
0
)
const
[
current
,
setCurrent
]
=
useState
(
1
);
const
[
pageSize
,
setPageSize
]
=
useState
(
10
);
const
showDrawer
=
useCallback
(()
=>
{
setVisible
(
true
)
...
...
@@ -106,12 +107,16 @@ function RoleSelect(props: RoleSelectProps) {
columns=
{
TableMemberColumn
}
dataSource=
{
dataSource
}
pagination=
{
{
total
:
total
,
pageSize
:
10
,
current
:
current
,
onChange
:
(
page
:
number
)
=>
{
form
.
setFieldsValue
({
'current'
:
page
});
setCurrent
(
page
);
position
:
[
'bottomCenter'
],
total
,
pageSize
,
current
,
showTotal
:
(
total
:
number
,
range
:
[
number
,
number
])
=>
(
`共 ${total} 条`
),
showQuickJumper
:
true
,
onChange
:
(
page
:
number
,
pageSize
:
number
)
=>
{
form
.
setFieldsValue
({
'current'
:
page
})
setCurrent
(
page
)
setPageSize
(
pageSize
)
fetchData
()
}
}
}
...
...
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitSRM/create.tsx
View file @
4beddd16
...
...
@@ -7,7 +7,7 @@
import
{
history
}
from
'umi'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
BaseInfo
as
base_Info
,
Remarks
,
PlanningCycle
,
SupplyMembersLabel
,
PlanSummary
,
ExternalState
,
Circulation
,
Purchaser
,
SubmitDeliveryPlan
,
Supplier
,
ConfirmDeliveryPlan
,
PlannedDelivery
,
DeliveryPlanText
,
DeliveryPlanRemark
,
CreateDeliveryPlanTitleSRM
}
from
'../../constants'
import
{
Button
,
DatePicker
,
Form
,
Input
,
InputNumber
,
message
,
Space
,
Steps
,
Table
}
from
'antd'
import
{
Button
,
DatePicker
,
Form
,
Input
,
InputNumber
,
message
,
Space
,
S
pin
,
S
teps
,
Table
}
from
'antd'
import
{
SaveOutlined
}
from
'@ant-design/icons'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
_
from
'lodash'
...
...
@@ -55,7 +55,9 @@ const initExpandIconColumn = [
const
datesRef
=
useRef
<
any
>
(
null
)
const
materialTableDataRef
=
useRef
(
null
)
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
const
[
spinning
,
setSpinning
]
=
useState
<
boolean
>
(
false
)
const
[
iAnchors
,
setIAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
base_Info
,
PlannedDelivery
,
...
...
@@ -78,8 +80,6 @@ const initExpandIconColumn = [
const
[
selectedMember
,
setSelectedMember
]
=
useState
<
any
>
({})
// 计划送货物料 列表
const
[
materialTableData
,
setMaterialTableData
]
=
useState
<
any
>
(
null
)
// 外部流转单据记录
const
[
externalRoamRecordData
,
setExternalRoamRecordData
]
=
useState
<
any
>
(
null
)
// 保存
const
save
=
()
=>
{
...
...
@@ -87,8 +87,10 @@ const initExpandIconColumn = [
// console.log('values :>> ', values)
if
(
_
.
isEmpty
(
materialTableDataRef
.
current
))
{
message
.
warning
(
'没有找到可执行计划送货'
)
setSpinning
(
false
)
return
}
setSpinning
(
true
)
const
productList
=
materialTableDataRef
.
current
.
map
((
item
:
any
)
=>
{
return
{
...
item
,
...
...
@@ -111,7 +113,12 @@ const initExpandIconColumn = [
remark
:
values
.
remark
,
productList
}).
then
((
res
:
any
)
=>
{
console
.
log
(
'保存 :>> '
,
res
)
setSpinning
(
false
)
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
}).
catch
(
err
=>
{
setSpinning
(
false
)
})
})
}
...
...
@@ -202,6 +209,7 @@ const initExpandIconColumn = [
},
[
selectedDate
,
selectedMember
])
return
(
<
Spin
spinning=
{
spinning
}
>
<
AnchorPage
title=
{
CreateDeliveryPlanTitleSRM
}
onBack=
{
()
=>
history
.
goBack
()
}
...
...
@@ -284,6 +292,7 @@ const initExpandIconColumn = [
</
BaseInfo
>
</
Form
>
</
AnchorPage
>
</
Spin
>
)
}
...
...
src/pages/order/deliveryPlanManagement/deliveryPlanAwaitSRM/update.tsx
View file @
4beddd16
...
...
@@ -7,7 +7,7 @@ import React, { useEffect, useRef, useState } from 'react'
import
{
history
,
useHistory
}
from
'umi'
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
import
{
BaseInfo
as
base_Info
,
Remarks
,
PlanningCycle
,
SupplyMembersLabel
,
PlanSummary
,
ExternalRoamRecord
,
ExternalState
,
Circulation
,
Purchaser
,
SubmitDeliveryPlan
,
Supplier
,
ConfirmDeliveryPlan
,
PlannedDelivery
,
DeliveryPlanRemark
}
from
'../../constants'
import
{
Button
,
Form
,
Input
,
InputNumber
,
message
,
Space
,
Steps
,
Table
,
Tag
}
from
'antd'
import
{
Button
,
Form
,
Input
,
InputNumber
,
message
,
Space
,
S
pin
,
S
teps
,
Table
,
Tag
}
from
'antd'
import
{
SaveOutlined
}
from
'@ant-design/icons'
import
BaseInfo
from
'@/components/BaseInfo/BaseInfo'
import
{
ExternalRoamRecordTableColumn
}
from
'../../constants/page-table-column'
...
...
@@ -32,7 +32,9 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
const
datesRef
=
useRef
(
null
)
const
materialTableDataRef
=
useRef
(
null
)
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
const
[
spinning
,
setSpinning
]
=
useState
<
boolean
>
(
false
)
const
[
iAnchors
,
setIAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
base_Info
,
PlannedDelivery
,
...
...
@@ -85,6 +87,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
message
.
warning
(
'没有找到可执行计划送货'
)
return
}
setSpinning
(
true
)
const
orders
=
materialTableDataRef
.
current
.
flatMap
((
item
:
any
)
=>
item
.
orders
).
flatMap
((
o
:
any
)
=>
({
...
o
,
planDays
:
Object
.
keys
(
o
).
filter
((
f
:
any
)
=>
f
.
startsWith
(
'$'
)).
map
((
p
:
any
)
=>
o
[
p
])
...
...
@@ -95,7 +98,12 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
remark
:
values
.
remark
,
orders
}).
then
((
res
:
any
)
=>
{
console
.
log
(
'保存 :>> '
,
res
)
setSpinning
(
false
)
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
}
}).
catch
(
err
=>
{
setSpinning
(
false
)
})
})
}
...
...
@@ -181,6 +189,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
},
[])
return
(
<
Spin
spinning=
{
spinning
}
>
<
AnchorPage
title=
{
details
?.
planNo
}
onBack=
{
()
=>
history
.
goBack
()
}
...
...
@@ -254,6 +263,7 @@ const DeliveryPlanAwaitSRMUpdate: React.FC = () => {
</
BaseInfo
>
</
Form
>
</
AnchorPage
>
</
Spin
>
)
}
...
...
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