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
0176c3dc
Commit
0176c3dc
authored
Jul 20, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
b1710c11
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
141 additions
and
119 deletions
+141
-119
index.tsx
src/components/NestTable/index.tsx
+3
-4
index.tsx
...ages/contract/components/detailCard/PaymentCard/index.tsx
+1
-2
PopModal.tsx
src/pages/contract/contractexecution/details/PopModal.tsx
+9
-2
index.css
src/pages/contract/contractexecution/details/index.css
+0
-3
index.less
src/pages/contract/contractexecution/details/index.less
+1
-1
index.tsx
src/pages/contract/contractexecution/details/index.tsx
+11
-2
situationList.tsx
src/pages/contract/coordination/details/situationList.tsx
+3
-2
add.tsx
src/pages/contract/funds/addbill/add.tsx
+6
-7
info.tsx
src/pages/contract/funds/addbill/components/info.tsx
+14
-13
index.tsx
src/pages/contract/funds/details/index.tsx
+3
-4
fromtable.tsx
src/pages/contract/manage/add/components/fromtable.tsx
+35
-48
FormList.tsx
src/pages/contract/manage/editing/components/FormList.tsx
+1
-0
fromtable.tsx
src/pages/contract/manage/editing/components/fromtable.tsx
+54
-31
No files found.
src/components/NestTable/index.tsx
View file @
0176c3dc
...
@@ -49,8 +49,8 @@ const NestTable: React.FC<NestTableProps> = (props) => {
...
@@ -49,8 +49,8 @@ const NestTable: React.FC<NestTableProps> = (props) => {
expanded
?
(
expanded
?
(
<
CaretDownOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
<
CaretDownOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
:
(
)
:
(
<
CaretRightOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
<
CaretRightOutlined
onClick=
{
e
=>
onExpand
(
record
,
e
)
}
/>
)
)
}
}
}
}
pagination=
{
pagination
}
pagination=
{
pagination
}
{
...
resetProps
}
{
...
resetProps
}
...
@@ -60,4 +60,4 @@ const NestTable: React.FC<NestTableProps> = (props) => {
...
@@ -60,4 +60,4 @@ const NestTable: React.FC<NestTableProps> = (props) => {
NestTable
.
defaultProps
=
{}
NestTable
.
defaultProps
=
{}
export
default
NestTable
export
default
NestTable
\ No newline at end of file
src/pages/contract/components/detailCard/PaymentCard/index.tsx
View file @
0176c3dc
...
@@ -54,9 +54,8 @@ const PaymentCard: React.FC<Iprops> = ({
...
@@ -54,9 +54,8 @@ const PaymentCard: React.FC<Iprops> = ({
<
div
className=
{
style
.
proportion
}
>
{
item
.
payRatio
}
%
</
div
>
<
div
className=
{
style
.
proportion
}
>
{
item
.
payRatio
}
%
</
div
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}
}
>
<
div
className=
{
style
.
Price
}
>
¥
{
item
.
payAmount
}
</
div
>
<
div
className=
{
style
.
Price
}
>
¥
{
item
.
payAmount
}
</
div
>
{
/* IsShow && <div onClick={() => like(1, item)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</div> */
}
{
{
children
children
?
children
:
IsShow
&&
<
div
onClick=
{
()
=>
like
(
1
,
item
)
}
style=
{
{
cursor
:
'pointer'
,
fontSize
:
12
,
backgroundColor
:
'#00B37A'
,
color
:
'#fff'
,
padding
:
'4px 8px'
}
}
>
请款
</
div
>
}
}
</
div
>
</
div
>
<
div
className=
{
style
.
warp_List
}
>
<
div
className=
{
style
.
warp_List
}
>
...
...
src/pages/contract/contractexecution/details/PopModal.tsx
View file @
0176c3dc
...
@@ -25,19 +25,23 @@ const PopModal: React.FC<Iprops> = ({
...
@@ -25,19 +25,23 @@ const PopModal: React.FC<Iprops> = ({
})
=>
{
})
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
/* 选中 */
const
[
paymentId
,
setpaymentId
]
=
useState
<
any
>
()
/* 确定 */
/* 确定 */
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
sessionStorage
.
setItem
(
'basics'
,
JSON
.
stringify
(
basics
))
sessionStorage
.
setItem
(
'basics'
,
JSON
.
stringify
(
basics
))
sessionStorage
.
setItem
(
'list'
,
JSON
.
stringify
(
selectRowList
))
sessionStorage
.
setItem
(
'list'
,
JSON
.
stringify
(
selectRowList
))
history
.
push
(
'/memberCenter/contract/funds/addbill/Add?applyId='
+
contractId
+
'&sourceType='
+
2
)
let
payid
=
paymentId
?
paymentId
:
payType
[
0
].
id
;
history
.
push
(
'/memberCenter/contract/funds/addbill/Add?applyId='
+
contractId
+
'&sourceType='
+
2
+
'&paymentId='
+
payid
)
}
}
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
console
.
log
(
'Failed:'
,
errorInfo
);
};
};
return
(
return
(
<
Modal
<
Modal
footer=
{
null
}
footer=
{
null
}
title=
"提交
审核
"
title=
"提交
请款单
"
visible=
{
ModalVisible
}
visible=
{
ModalVisible
}
onOk=
{
()
=>
setDrawerPopModal
()
}
onOk=
{
()
=>
setDrawerPopModal
()
}
onCancel=
{
()
=>
setDrawerPopModal
()
}
>
onCancel=
{
()
=>
setDrawerPopModal
()
}
>
...
@@ -55,6 +59,9 @@ const PopModal: React.FC<Iprops> = ({
...
@@ -55,6 +59,9 @@ const PopModal: React.FC<Iprops> = ({
style=
{
{
style=
{
{
width
:
'290px'
width
:
'290px'
}
}
}
}
onChange=
{
(
value
)
=>
{
setpaymentId
(
value
)
}
}
>
>
{
{
payType
.
map
(
item
=>
(
payType
.
map
(
item
=>
(
...
...
src/pages/contract/contractexecution/details/index.css
View file @
0176c3dc
...
@@ -159,9 +159,6 @@
...
@@ -159,9 +159,6 @@
color
:
#00B37A
;
color
:
#00B37A
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.wrapper
:global
.ant-input-search
.ant-input-group
.ant-input
{
padding
:
0px
!important
;
}
.wrapper
:global
.ant-input-search
.ant-input-group-addon
.ant-input-search-button
{
.wrapper
:global
.ant-input-search
.ant-input-group-addon
.ant-input-search-button
{
background-color
:
#F7F8FA
;
background-color
:
#F7F8FA
;
}
}
src/pages/contract/contractexecution/details/index.less
View file @
0176c3dc
...
@@ -188,7 +188,7 @@
...
@@ -188,7 +188,7 @@
.ant-input-search {
.ant-input-search {
.ant-input-group {
.ant-input-group {
.ant-input {
.ant-input {
padding: 0px !important;
//
padding: 0px !important;
}
}
}
}
.ant-input-group-addon {
.ant-input-group-addon {
...
...
src/pages/contract/contractexecution/details/index.tsx
View file @
0176c3dc
...
@@ -361,9 +361,16 @@ const Details = (props: any) => {
...
@@ -361,9 +361,16 @@ const Details = (props: any) => {
current
:
current
,
current
:
current
,
pageSize
:
pageSize
,
pageSize
:
pageSize
,
}
}
setSize
(
pageSize
)
console
.
log
(
current
,
pageSize
,
size
)
getContracInfoList
(
data
)
getContracInfoList
(
data
)
};
};
const
like
=
(
sourceType
,
item
)
=>
{
console
.
log
(
sourceType
,
item
);
// sessionStorage.setItem('basics', JSON.stringify(basics));
// history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + sourceType + '&paymentId=' + item.id)
}
return
(
return
(
<
div
className=
{
style
.
anchorWrap
}
>
<
div
className=
{
style
.
anchorWrap
}
>
<
Anchor
<
Anchor
...
@@ -411,7 +418,9 @@ const Details = (props: any) => {
...
@@ -411,7 +418,9 @@ const Details = (props: any) => {
{
/* 基本信息 */
}
{
/* 基本信息 */
}
<
BasicInfo
basicInfo=
{
basicInfo
}
/>
<
BasicInfo
basicInfo=
{
basicInfo
}
/>
{
/* 付款计划 */
}
{
/* 付款计划 */
}
<
PaymentCard
payPlanList=
{
payPlanList
}
basics=
{
basicInfo
}
contractId=
{
contractId
}
/>
<
PaymentCard
IsShow=
{
true
}
payPlanList=
{
payPlanList
}
basics=
{
basics
}
contractId=
{
contractId
}
/>
{
/* 执行情况 */
}
{
/* 执行情况 */
}
<
div
id=
'docking'
className=
'ant-card ant-card-bordered'
>
<
div
id=
'docking'
className=
'ant-card ant-card-bordered'
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head'
>
...
...
src/pages/contract/coordination/details/situationList.tsx
View file @
0176c3dc
...
@@ -19,7 +19,7 @@ export interface Iprops extends IAntdSchemaFormProps {
...
@@ -19,7 +19,7 @@ export interface Iprops extends IAntdSchemaFormProps {
const
{
Text
}
=
Typography
;
const
{
Text
}
=
Typography
;
const
situationList
:
React
.
FC
<
Iprops
>
=
({
contractId
})
=>
{
const
situationList
:
React
.
FC
<
Iprops
>
=
({
contractId
})
=>
{
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
size
,
setSize
]
=
useState
(
8
);
const
[
size
,
setSize
]
=
useState
(
10
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
listLoading
,
setListLoading
]
=
useState
(
false
);
const
[
listLoading
,
setListLoading
]
=
useState
(
false
);
/* 单据总金额 */
/* 单据总金额 */
...
@@ -226,9 +226,10 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
...
@@ -226,9 +226,10 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
data
}
dataSource=
{
data
}
loading=
{
listLoading
}
loading=
{
listLoading
}
pagination=
{
pagination=
{
{
{
defaultPageSize
:
20
,
pageSize
:
size
,
pageSize
:
size
,
total
,
total
,
onChange
:
handlePaginationChange
onChange
:
handlePaginationChange
...
...
src/pages/contract/funds/addbill/add.tsx
View file @
0176c3dc
...
@@ -29,14 +29,13 @@ const Add: React.FC<{}> = (props: any) => {
...
@@ -29,14 +29,13 @@ const Add: React.FC<{}> = (props: any) => {
setid
(
data
.
selectRow
.
id
)
setid
(
data
.
selectRow
.
id
)
console
.
log
(
data
)
console
.
log
(
data
)
}
}
useEffect
(()
=>
{
// useEffect(() => {
// contract
// PublicApi.getContractApplyAmountGetDetail({ applyId: paymentId }).then((res) => {
PublicApi
.
getContractApplyAmountGetDetail
({
applyId
:
paymentId
}).
then
((
res
)
=>
{
// console.log(res)
console
.
log
(
res
)
// }).catch((err) => {
}).
catch
((
err
)
=>
{
});
//
});
},
[])
//
}, [])
const
TabList
=
[
const
TabList
=
[
{
{
name
:
'基本信息'
,
components
:
name
:
'基本信息'
,
components
:
...
...
src/pages/contract/funds/addbill/components/info.tsx
View file @
0176c3dc
...
@@ -129,19 +129,19 @@ const AddInfo = (props: any) => {
...
@@ -129,19 +129,19 @@ const AddInfo = (props: any) => {
const
info
=
Info
;
const
info
=
Info
;
if
(
res
.
code
==
1000
)
{
if
(
res
.
code
==
1000
)
{
if
(
res
.
data
.
payPlanList
.
length
!=
0
)
{
if
(
res
.
data
.
payPlanList
.
length
!=
0
)
{
res
.
data
.
payPlanList
.
map
((
item
,
index
)
=>
{
for
(
let
i
=
0
;
i
<
res
.
data
.
payPlanList
.
length
;
i
++
)
{
console
.
log
(
index
)
if
(
res
.
data
.
payPlanList
[
i
].
id
==
paymentId
)
{
if
(
item
.
id
==
paymentId
)
{
console
.
log
(
1232131
);
const
expectPayTime
=
new
Date
(
item
.
expectPayTime
).
getTime
();
const
expectPayTime
=
new
Date
(
res
.
data
.
payPlanList
[
i
]
.
expectPayTime
).
getTime
();
basicsData
.
payPlanId
=
item
.
id
;
basicsData
.
payPlanId
=
res
.
data
.
payPlanList
[
i
]
.
id
;
basicsData
.
payRatio
=
item
.
payRatio
;
basicsData
.
payRatio
=
res
.
data
.
payPlanList
[
i
]
.
payRatio
;
basicsData
.
expectPayTime
=
moment
(
expectPayTime
);
basicsData
.
expectPayTime
=
moment
(
expectPayTime
);
basicsData
.
payWay
=
item
.
payWay
;
basicsData
.
payWay
=
res
.
data
.
payPlanList
[
i
]
.
payWay
;
basicsData
.
payParam
=
item
.
payParam
;
basicsData
.
payParam
=
res
.
data
.
payPlanList
[
i
]
.
payParam
;
basicsData
.
applyAmount
=
item
.
payAmount
;
basicsData
.
applyAmount
=
res
.
data
.
payPlanList
[
i
]
.
payAmount
;
setapplyAmount
(
item
.
payAmount
)
setapplyAmount
(
res
.
data
.
payPlanList
[
i
]
.
payAmount
)
setIndex
(
i
ndex
+
1
)
setIndex
(
i
+
1
)
return
;
break
;
}
else
{
}
else
{
const
expectPayTime
=
new
Date
(
res
.
data
.
payPlanList
[
0
].
expectPayTime
).
getTime
();
const
expectPayTime
=
new
Date
(
res
.
data
.
payPlanList
[
0
].
expectPayTime
).
getTime
();
basicsData
.
payPlanId
=
res
.
data
.
payPlanList
[
0
].
id
;
basicsData
.
payPlanId
=
res
.
data
.
payPlanList
[
0
].
id
;
...
@@ -152,7 +152,7 @@ const AddInfo = (props: any) => {
...
@@ -152,7 +152,7 @@ const AddInfo = (props: any) => {
basicsData
.
applyAmount
=
res
.
data
.
payPlanList
[
0
].
payAmount
;
basicsData
.
applyAmount
=
res
.
data
.
payPlanList
[
0
].
payAmount
;
setapplyAmount
(
res
.
data
.
payPlanList
[
0
].
payAmount
)
setapplyAmount
(
res
.
data
.
payPlanList
[
0
].
payAmount
)
}
}
}
)
}
}
}
basicsData
.
contractNo
=
selectRow
.
contractNo
;
basicsData
.
contractNo
=
selectRow
.
contractNo
;
...
@@ -183,6 +183,7 @@ const AddInfo = (props: any) => {
...
@@ -183,6 +183,7 @@ const AddInfo = (props: any) => {
const
auth
=
JSON
.
parse
(
localStorage
.
getItem
(
'auth'
));
const
auth
=
JSON
.
parse
(
localStorage
.
getItem
(
'auth'
));
setaccount
(
auth
.
account
);
setaccount
(
auth
.
account
);
setBasics
(
basicsData
)
setBasics
(
basicsData
)
console
.
log
(
basicsData
,
'basicsData'
)
attrValueForm
.
setFieldsValue
(
basicsData
);
attrValueForm
.
setFieldsValue
(
basicsData
);
}
}
})
})
...
...
src/pages/contract/funds/details/index.tsx
View file @
0176c3dc
...
@@ -33,9 +33,7 @@ const BillDetails = (props: any) => {
...
@@ -33,9 +33,7 @@ const BillDetails = (props: any) => {
const
[
reason
,
setDatareason
]
=
useState
(
''
);
const
[
reason
,
setDatareason
]
=
useState
(
''
);
const
[
status
,
setstatus
]
=
useState
<
any
>
()
const
[
status
,
setstatus
]
=
useState
<
any
>
()
const
[
ExamineFlag
,
setExamineFlag
]
=
useState
<
boolean
>
(
false
);
const
[
ExamineFlag
,
setExamineFlag
]
=
useState
<
boolean
>
(
false
);
useEffect
(()
=>
{
setTargetOffset
(
window
.
innerHeight
/
6
);
},
[]);
const
handleAnchorClick
=
(
e
)
=>
{
const
handleAnchorClick
=
(
e
)
=>
{
e
.
preventDefault
()
e
.
preventDefault
()
}
}
...
@@ -54,6 +52,7 @@ const BillDetails = (props: any) => {
...
@@ -54,6 +52,7 @@ const BillDetails = (props: any) => {
})
})
/* 获取详情的数据 */
/* 获取详情的数据 */
const
getDetail
=
()
=>
{
const
getDetail
=
()
=>
{
console
.
log
(
applyId
,
'applyId'
)
PublicApi
.
getContractApplyAmountGetDetail
({
applyId
}).
then
(
res
=>
{
PublicApi
.
getContractApplyAmountGetDetail
({
applyId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
if
(
res
.
code
===
1000
)
{
let
{
basics
,
taskStepList
}
=
res
.
data
let
{
basics
,
taskStepList
}
=
res
.
data
...
@@ -134,7 +133,7 @@ const BillDetails = (props: any) => {
...
@@ -134,7 +133,7 @@ const BillDetails = (props: any) => {
setIsModalVisible
(
!
isModalVisible
);
setIsModalVisible
(
!
isModalVisible
);
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setTargetOffset
(
window
.
innerHeight
/
6
);
setTargetOffset
(
window
.
innerHeight
/
4
);
getDetail
()
getDetail
()
},
[]);
},
[]);
...
...
src/pages/contract/manage/add/components/fromtable.tsx
View file @
0176c3dc
...
@@ -12,13 +12,14 @@ import moment from 'moment';
...
@@ -12,13 +12,14 @@ import moment from 'moment';
const
FormList
=
(
props
:
any
)
=>
{
const
FormList
=
(
props
:
any
)
=>
{
console
.
log
(
props
)
console
.
log
(
props
)
const
{
fromData
,
currentRef
,
fetchdata
}
=
props
;
const
{
fromData
,
currentRef
,
fetchdata
}
=
props
;
const
[
keys
,
setkeys
]
=
useState
<
any
>
();
// 记录上次删除的
const
[
options
,
setoptions
]
=
useState
<
any
>
([
const
[
options
,
setoptions
]
=
useState
<
any
>
([
{
{
value
:
1
,
value
:
1
,
disabled
:
true
disabled
:
true
}
}
])
])
const
[
id
,
setId
]
=
useState
<
any
>
(
''
);
// 记录上次的id
const
[
PlanList
,
setPlanList
]
=
useState
<
any
>
([
const
[
PlanList
,
setPlanList
]
=
useState
<
any
>
([
{
{
payNum
:
'1'
,
payNum
:
'1'
,
...
@@ -30,6 +31,7 @@ const FormList = (props: any) => {
...
@@ -30,6 +31,7 @@ const FormList = (props: any) => {
payParam
:
''
,
payParam
:
''
,
id
:
0
,
id
:
0
,
rowId
:
1
,
rowId
:
1
,
disabled
:
true
},
},
]);
]);
...
@@ -130,36 +132,43 @@ const FormList = (props: any) => {
...
@@ -130,36 +132,43 @@ const FormList = (props: any) => {
/* 添加 */
/* 添加 */
const
addtable
=
()
=>
{
const
addtable
=
()
=>
{
const
data
=
[...
PlanList
];
const
data
=
[...
PlanList
];
data
.
push
(
{
if
(
keys
)
{
payNum
:
''
,
data
.
push
(
keys
);
payStage
:
''
,
setkeys
(
''
);
expectPayTime
:
''
,
}
else
{
payRatio
:
''
,
data
.
push
(
payAmount
:
''
,
{
payWay
:
'1'
,
payNum
:
data
.
length
+
1
,
payParam
:
''
,
payStage
:
''
,
id
:
0
,
expectPayTime
:
''
,
rowId
:
data
.
length
+
1
,
payRatio
:
''
,
},
payAmount
:
''
,
)
payWay
:
'1'
,
let
optionsData
=
[];
payParam
:
''
,
data
.
map
((
item
,
index
)
=>
{
id
:
0
,
console
.
log
(
item
.
payNum
,
index
+
1
)
rowId
:
data
.
length
+
1
,
optionsData
.
push
({
disabled
:
false
,
value
:
index
+
1
,
},
)
}
let
optionsData
=
data
.
map
((
item
,
index
)
=>
{
return
{
value
:
item
.
payNum
?
item
.
payNum
:
index
+
1
,
disabled
:
item
.
payNum
?
true
:
false
,
disabled
:
item
.
payNum
?
true
:
false
,
})
rowId
:
item
.
rowId
,
}
})
})
console
.
log
(
optionsData
,
'optionsDataadd'
,
options
)
console
.
log
(
'optionsDataadd'
,
data
,
optionsData
,
'optionsList'
)
setPlanList
(
data
)
setPlanList
(
data
)
setoptions
(
optionsData
)
setoptions
(
optionsData
)
};
};
/* 删除 */
/* 删除 */
const
Delete
=
(
elm
,
idx
)
=>
{
const
Delete
=
(
elm
,
idx
)
=>
{
const
dataSource
=
[...
PlanList
];
const
dataSource
=
[...
PlanList
];
let
List
=
dataSource
.
filter
((
item
,
index
)
=>
index
!==
idx
);
let
List
=
dataSource
.
filter
((
item
,
index
)
=>
index
!==
idx
);
setPlanList
(
List
)
let
optionsData
=
options
.
map
((
keys
=>
{
let
optionsData
=
options
.
map
((
keys
=>
{
if
(
elm
.
payNum
==
keys
.
value
)
{
if
(
elm
.
payNum
==
keys
.
value
)
{
keys
.
disabled
=
false
;
keys
.
disabled
=
false
;
...
@@ -168,7 +177,8 @@ const FormList = (props: any) => {
...
@@ -168,7 +177,8 @@ const FormList = (props: any) => {
...
keys
...
keys
}
}
}))
}))
console
.
log
(
optionsData
,
'del'
)
setkeys
(
elm
);
setPlanList
(
List
)
setoptions
(
optionsData
)
setoptions
(
optionsData
)
};
};
...
@@ -181,7 +191,7 @@ const FormList = (props: any) => {
...
@@ -181,7 +191,7 @@ const FormList = (props: any) => {
break
;
break
;
case
'payNum'
:
case
'payNum'
:
item
[
idx
].
payNum
=
e
;
item
[
idx
].
payNum
=
e
;
setId
(
e
);
break
;
break
;
case
'expectPayTime'
:
case
'expectPayTime'
:
item
[
idx
].
expectPayTime
=
moment
(
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
item
[
idx
].
expectPayTime
=
moment
(
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
...
@@ -199,30 +209,7 @@ const FormList = (props: any) => {
...
@@ -199,30 +209,7 @@ const FormList = (props: any) => {
item
[
idx
].
payParam
=
e
;
item
[
idx
].
payParam
=
e
;
break
;
break
;
}
}
let
optionsData
=
[];
if
(
id
)
{
optionsData
=
options
.
map
((
keys
=>
{
if
(
id
==
keys
.
value
)
{
keys
.
disabled
=
false
;
}
if
(
keys
.
value
==
e
)
{
keys
.
disabled
=
true
;
}
return
{
...
keys
}
}))
}
else
{
optionsData
=
options
.
map
((
keys
=>
{
if
(
keys
.
value
==
e
)
{
keys
.
disabled
=
true
;
}
return
{
...
keys
}
}))
}
setoptions
(
optionsData
)
setPlanList
(
item
)
setPlanList
(
item
)
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
src/pages/contract/manage/editing/components/FormList.tsx
View file @
0176c3dc
...
@@ -11,6 +11,7 @@ const FormList = (props: any) => {
...
@@ -11,6 +11,7 @@ const FormList = (props: any) => {
const
{
currentRef
,
purchaseMaterielList
}
=
props
;
const
{
currentRef
,
purchaseMaterielList
}
=
props
;
const
[
dataList
,
setData
]
=
useState
([])
const
[
dataList
,
setData
]
=
useState
([])
const
columnsTab
:
any
=
[
const
columnsTab
:
any
=
[
{
{
title
:
'物料编号/名称'
,
dataIndex
:
'materielName'
,
align
:
'center'
,
title
:
'物料编号/名称'
,
dataIndex
:
'materielName'
,
align
:
'center'
,
...
...
src/pages/contract/manage/editing/components/fromtable.tsx
View file @
0176c3dc
...
@@ -10,7 +10,16 @@ const { Option } = Select;
...
@@ -10,7 +10,16 @@ const { Option } = Select;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
const
FormList
=
(
props
:
any
)
=>
{
const
FormList
=
(
props
:
any
)
=>
{
const
{
currentRef
,
payPlanList
}
=
props
;
const
{
currentRef
,
payPlanList
}
=
props
;
const
[
payNumArr
,
setpayNumArr
]
=
useState
<
any
>
([
1
,])
// const [payNumArr, setpayNumArr] = useState<any>([1,])
const
[
keys
,
setkeys
]
=
useState
<
any
>
();
// 记录上次删除的
const
[
options
,
setoptions
]
=
useState
<
any
>
([
{
value
:
1
,
disabled
:
true
}
])
const
[
PlanList
,
setPlanList
]
=
useState
<
any
>
([
const
[
PlanList
,
setPlanList
]
=
useState
<
any
>
([
]);
]);
/* 显示模态框 */
/* 显示模态框 */
...
@@ -18,14 +27,6 @@ const FormList = (props: any) => {
...
@@ -18,14 +27,6 @@ const FormList = (props: any) => {
{
{
title
:
'付款次数'
,
dataIndex
:
'payNum'
,
align
:
'center'
,
title
:
'付款次数'
,
dataIndex
:
'payNum'
,
align
:
'center'
,
render
:
(
_
,
item
,
index
)
=>
{
render
:
(
_
,
item
,
index
)
=>
{
const
options
=
[];
for
(
let
i
=
0
;
i
<
PlanList
.
length
;
i
++
)
{
let
Index
=
payNumArr
.
indexOf
(
i
+
1
);
options
.
push
({
value
:
i
+
1
,
disabled
:
Index
==
-
1
?
false
:
true
});
}
return
(
return
(
<
Select
<
Select
style=
{
{
width
:
200
}
}
style=
{
{
width
:
200
}
}
...
@@ -119,38 +120,61 @@ const FormList = (props: any) => {
...
@@ -119,38 +120,61 @@ const FormList = (props: any) => {
/* 添加 */
/* 添加 */
const
addtable
=
()
=>
{
const
addtable
=
()
=>
{
const
data
=
[...
PlanList
];
const
data
=
[...
PlanList
];
data
.
push
(
{
if
(
keys
)
{
payNum
:
''
,
data
.
push
(
keys
);
payStage
:
''
,
setkeys
(
''
);
expectPayTime
:
''
,
}
else
{
payRatio
:
''
,
data
.
push
(
payAmount
:
''
,
{
payWay
:
'1'
,
payNum
:
data
.
length
+
1
,
payParam
:
'1'
,
payStage
:
''
,
id
:
0
,
expectPayTime
:
''
,
rowId
:
data
.
length
+
1
,
payRatio
:
''
,
},
payAmount
:
''
,
)
payWay
:
'1'
,
console
.
log
(
data
)
payParam
:
''
,
id
:
0
,
rowId
:
data
.
length
+
1
,
disabled
:
false
,
},
)
}
let
optionsData
=
data
.
map
((
item
,
index
)
=>
{
return
{
value
:
item
.
payNum
?
item
.
payNum
:
index
+
1
,
disabled
:
item
.
payNum
?
true
:
false
,
rowId
:
item
.
rowId
,
}
})
console
.
log
(
'optionsDataadd'
,
data
,
optionsData
,
'optionsList'
)
setPlanList
(
data
)
setPlanList
(
data
)
setoptions
(
optionsData
)
};
};
/* 删除 */
/* 删除 */
const
Delete
=
(
elm
,
idx
)
=>
{
const
Delete
=
(
elm
,
idx
)
=>
{
const
dataSource
=
[...
PlanList
];
const
dataSource
=
[...
PlanList
];
const
arr
=
[...
payNumArr
]
let
List
=
dataSource
.
filter
((
item
,
index
)
=>
index
!==
idx
);
let
List
=
dataSource
.
filter
((
item
,
index
)
=>
index
!==
idx
);
let
numberArr
=
arr
.
filter
((
item
,
index
)
=>
elm
.
payNum
!==
item
);
let
optionsData
=
options
.
map
((
keys
=>
{
console
.
log
(
numberArr
);
if
(
elm
.
payNum
==
keys
.
value
)
{
setpayNumArr
(
numberArr
)
keys
.
disabled
=
false
;
}
return
{
...
keys
}
}))
setkeys
(
elm
);
setPlanList
(
List
)
setPlanList
(
List
)
setoptions
(
optionsData
)
};
};
/* 选中设置值 */
/* 选中设置值 */
const
onSelectChange
=
(
e
,
name
,
idx
)
=>
{
const
onSelectChange
=
(
e
,
name
,
idx
)
=>
{
console
.
log
(
e
,
name
,
idx
)
console
.
log
(
e
,
name
,
idx
)
let
item
=
[...
PlanList
];
let
item
=
[...
PlanList
];
let
NumArr
=
[...
payNumArr
]
console
.
log
(
item
,
'哈哈'
);
console
.
log
(
item
,
'哈哈'
);
// return;
// return;
switch
(
name
)
{
switch
(
name
)
{
...
@@ -159,7 +183,7 @@ const FormList = (props: any) => {
...
@@ -159,7 +183,7 @@ const FormList = (props: any) => {
break
;
break
;
case
'payNum'
:
case
'payNum'
:
item
[
idx
].
payNum
=
e
;
item
[
idx
].
payNum
=
e
;
NumArr
.
push
(
e
);
break
;
break
;
case
'expectPayTime'
:
case
'expectPayTime'
:
item
[
idx
].
expectPayTime
=
moment
(
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
item
[
idx
].
expectPayTime
=
moment
(
e
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
...
@@ -177,8 +201,7 @@ const FormList = (props: any) => {
...
@@ -177,8 +201,7 @@ const FormList = (props: any) => {
item
[
idx
].
payParam
=
e
;
item
[
idx
].
payParam
=
e
;
break
;
break
;
}
}
NumArr
=
Array
.
from
(
new
Set
(
NumArr
))
setpayNumArr
(
NumArr
)
setPlanList
(
item
)
setPlanList
(
item
)
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
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