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
88d77bd0
Commit
88d77bd0
authored
Apr 27, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同请款bug修复
parent
d6fccea7
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
577 additions
and
321 deletions
+577
-321
index.css
src/pages/contract/contractexecution/details/index.css
+5
-3
index.less
src/pages/contract/contractexecution/details/index.less
+8
-1
index.tsx
src/pages/contract/contractexecution/details/index.tsx
+321
-57
crossSellProducts.tsx
...tract/coordination/components/modal/crossSellProducts.tsx
+1
-0
index.tsx
src/pages/contract/coordination/details/index.tsx
+31
-134
index.tsx
src/pages/contract/coordination/implement/index.tsx
+1
-1
add.tsx
src/pages/contract/funds/addbill/add.tsx
+5
-14
info.tsx
src/pages/contract/funds/addbill/components/info.tsx
+49
-25
table.tsx
src/pages/contract/funds/addbill/components/table.tsx
+87
-35
index.tsx
src/pages/contract/funds/bill/index.tsx
+4
-3
materials.tsx
src/pages/contract/funds/details/components/materials.tsx
+26
-28
index.tsx
src/pages/contract/funds/details/index.tsx
+6
-6
index.tsx
src/pages/contract/funds/levelpayment/index.tsx
+1
-2
index.tsx
src/pages/contract/funds/secondpayment/index.tsx
+1
-1
index.tsx
src/pages/contract/funds/submitpayment/index.tsx
+1
-1
index.tsx
src/pages/contract/manage/QueryList/index.tsx
+2
-0
addList.tsx
src/pages/contract/manage/add/addList.tsx
+22
-2
information.tsx
src/pages/contract/manage/add/components/information.tsx
+2
-4
index.tsx
src/pages/contract/manage/signacontract/index.tsx
+4
-4
No files found.
src/pages/contract/contractexecution/details/index.css
View file @
88d77bd0
...
...
@@ -58,9 +58,7 @@
}
.card
.list
{
display
:
flex
;
}
.card
.list
h5
{
margin-bottom
:
2em
;
margin-bottom
:
1.5em
;
}
.card
.list
.listLable
{
flex
:
0
0
25%
;
...
...
@@ -157,3 +155,7 @@
margin-left
:
19px
;
color
:
#c0c4cc
;
}
.gesture
{
color
:
#00B37A
;
cursor
:
pointer
;
}
src/pages/contract/contractexecution/details/index.less
View file @
88d77bd0
...
...
@@ -66,8 +66,9 @@
}
.list {
display: flex;
margin-bottom: 1.5em;
h5 {
margin-bottom: 2em;
}
.listLable {
flex: 0 0 25%;
...
...
@@ -174,4 +175,10 @@
}
}
}
}
.gesture{
color: #00B37A;
cursor:pointer;
}
src/pages/contract/contractexecution/details/index.tsx
View file @
88d77bd0
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Anchor
,
Row
,
Col
,
Table
,
Input
,
Space
,
Typography
,
Button
,
Modal
,
Select
}
from
'antd'
;
import
{
Anchor
,
Row
,
Col
,
Table
,
Input
,
Space
,
Modal
,
Form
,
Typography
,
message
,
Button
,
Drawer
,
Select
}
from
'antd'
;
import
style
from
'./index.less'
;
import
{
ArrowLeftOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
DrawerTable
from
'@/components/DrawerTable'
import
{
PublicApi
}
from
'@/services/api'
;
const
Option
=
Select
.
Option
;
import
StatusTag
from
'@/components/StatusTag'
;
const
{
Link
}
=
Anchor
;
import
{
history
}
from
'umi'
import
EyePreview
from
'@/components/EyePreview'
;
const
{
Text
}
=
Typography
;
const
activeAnchorClassName
=
'ant-anchor-link-active'
const
Details
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
[
currLink
,
setCurrLink
]
=
useState
(
activeAnchorClassName
)
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
const
{
location
:
{
query
:
{
contractId
}
}
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 抽屉选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
/**
* 渲染信息
* @param basics 基础信息
...
...
@@ -46,13 +46,33 @@ const Details = (props: any) => {
{
id
:
'record'
,
title
:
'请款统计'
},
])
const
[
targetOffset
,
setTargetOffset
]
=
useState
<
number
|
undefined
>
(
undefined
);
/* 单据总金额 */
const
[
orderAmount
,
setorderAmount
]
=
useState
<
number
>
(
0
);
/* 已付款 */
const
[
payAmount
,
setpayAmount
]
=
useState
<
number
>
(
0
);
/* 已请款待付款 */
const
[
unPayApplyAmount
,
setunPayApplyAmount
]
=
useState
<
number
>
(
0
)
/* 待请款 */
const
[
unApplyAmount
,
setunApplyAmount
]
=
useState
<
number
>
(
0
)
/* 请款单id */
const
[
applyId
,
setapplyId
]
=
useState
<
number
>
(
0
)
/* 执行情况分页 */
const
getContracInfoList
=
(
data
)
=>
{
PublicApi
.
getContractExecutePageExecuteInfoList
(
data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
.
data
)
// setdata(res.data)
setdata
(
res
.
data
.
data
)
let
orderAmount
=
0
,
payAmount
=
0
,
unPayApplyAmount
=
0
,
unApplyAmount
=
0
;
res
.
data
.
data
.
map
((
item
:
any
)
=>
{
orderAmount
+=
item
.
orderAmount
;
payAmount
+=
item
.
payAmount
;
unApplyAmount
+=
item
.
unApplyAmount
;
unPayApplyAmount
+=
item
.
unPayApplyAmount
;
})
setunApplyAmount
(
unApplyAmount
)
setunPayApplyAmount
(
unPayApplyAmount
)
setpayAmount
(
payAmount
)
setorderAmount
(
orderAmount
)
}
else
{
}
...
...
@@ -60,7 +80,6 @@ const Details = (props: any) => {
}
/* 获取详情的数据 */
const
getDetail
=
()
=>
{
// /contract/execute / getDetail
console
.
log
(
contractId
)
PublicApi
.
getContractExecuteGetDetail
({
contractId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -70,13 +89,13 @@ const Details = (props: any) => {
setbasics
(
basics
)
const
basicInfo
=
{
col1
:
[
{
label
:
'合同编号:'
,
extra
:
basics
.
contractNo
?
basics
.
contractNo
:
''
},
{
label
:
'合同编号:'
,
extra
:
basics
.
contractNo
?
basics
.
contractNo
:
''
,
url
:
`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=
${
basics
.
id
}
`
},
{
label
:
'合同摘要:'
,
extra
:
basics
.
contractAbstract
?
basics
.
contractAbstract
:
''
},
{
label
:
'外部状态:'
,
extra
:
basics
.
outerStatusName
?
basics
.
outerStatusName
:
''
},
],
col2
:
[
{
label
:
'寻源类型:'
,
extra
:
basics
.
sourceTypeName
?
basics
.
sourceTypeName
:
''
},
{
label
:
'对应单据:'
,
extra
:
basics
.
sourceNo
?
basics
.
sourceNo
:
''
},
{
label
:
'对应单据:'
,
extra
:
basics
.
sourceNo
?
basics
.
sourceNo
:
''
,
url
:
''
},
{
label
:
'合同乙方:'
,
extra
:
basics
.
partyAName
?
basics
.
partyAName
:
''
},
],
...
...
@@ -88,10 +107,10 @@ const Details = (props: any) => {
}
const
data
=
{
contractId
,
orderNo
:
basics
.
sourceNo
?
basics
.
sourceNo
:
''
,
orderNo
:
''
,
orderAbstract
:
''
,
startTime
:
basics
.
startTime
,
endTime
:
basics
.
endTime
,
startTime
:
""
,
endTime
:
""
,
current
:
1
,
pageSize
:
5
,
}
...
...
@@ -117,106 +136,273 @@ const Details = (props: any) => {
setCurrLink
(
activeAnchorClassName
)
}
};
/* 查看付款明细 */
const
columns
:
any
=
[
{
title
:
'单据号/摘要'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'center'
,
},
{
title
:
'单据类型'
,
dataIndex
:
'age'
,
key
:
'age'
,
align
:
'center'
,
},
{
title
:
'单据状态'
,
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
},
{
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
title
:
'单据号/摘要'
,
dataIndex
:
'orderNO'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/preview?id=${record.orderId}`
}
>
{
text
}
</
EyePreview
>
<
p
>
{
record
.
orderAbstract
}
</
p
>
</
div
>
);
},
},
{
title
:
'单据类型'
,
dataIndex
:
'orderTypeName'
,
align
:
'center'
,
},
{
title
:
'单据状态'
,
dataIndex
:
'orderStatusName'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'orderTime'
,
align
:
'center'
,
},
{
dataIndex
:
'orderAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
单据金额
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
orderAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
'含税/税率'
,
dataIndex
:
'taxRate'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
Space
direction=
'vertical'
>
<
Text
>
{
record
.
isHasTax
}
</
Text
>
<
Text
>
%
{
text
}
</
Text
>
</
Space
>
)
},
{
title
:
'含税/税率'
,
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
},
{
dataIndex
:
'
address'
,
key
:
'address
'
,
align
:
'center'
,
dataIndex
:
'
payAmount
'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已付款
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
payAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已请款待付款
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
unPayApplyAmount
}
</
Text
>
</
Space
>
),
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
dataIndex
:
'unPayApplyAmount'
,
align
:
'center'
,
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
待请款
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
unApplyAmount
}
</
Text
>
</
Space
>
),
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
dataIndex
:
'unApplyAmount'
,
align
:
'center'
,
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
'操作'
,
dataIndex
:
'type'
,
align
:
'center'
,
key
:
'x'
,
render
:
(
text
)
=>
{
let
title
=
[
'查看付款明细'
,
'付款明细'
,
]
title
:
'操作'
,
dataIndex
:
'type'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
{
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
return
(
<
a
onClick=
{
text
==
1
?
()
=>
setVisible
(
!
visible
)
:
handleCancel
}
>
{
title
[
text
]
}
</
a
>
<
div
>
{
record
.
payAmount
>
0
||
record
.
unPayApplyAmount
>
0
&&
<
a
onClick=
{
()
=>
getPayment
(
record
.
id
)
}
className=
{
style
.
gesture
}
>
查看付款明细
</
a
>
}
<
a
onClick=
{
()
=>
onModal
(
record
,
false
)
}
style=
{
{
marginLeft
:
10
}
}
className=
{
style
.
gesture
}
>
请款
</
a
>
</
div
>
)
}
},
];
/* 明细 */
const
columnsList
:
any
=
[
{
title
:
'请款次数'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'center'
,
},
{
title
:
'请款单号/摘要'
,
dataIndex
:
'age'
,
key
:
'age'
,
align
:
'center'
,
},
{
title
:
'请款时间'
,
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
},
{
title
:
'付款时间'
,
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
},
{
title
:
'付款金额'
,
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
},
{
title
:
'付款方式'
,
dataIndex
:
'address'
,
key
:
'address'
,
align
:
'center'
,
},
];
const
[
form
]
=
Form
.
useForm
();
const
[
ModalVisible
,
setIsModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
payType
,
setpayType
]
=
useState
<
any
>
([])
const
[
select
,
setSelect
]
=
useState
<
any
[]
>
([])
// 抽屉选择的行数据
const
[
selectedRow
,
setSelectedRow
]
=
useState
<
Array
<
string
>>
([])
const
rowSelect
:
any
=
{
selectedRowKeys
:
selectedRow
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
console
.
log
(
selectedRows
)
setSelect
(
selectedRows
)
setSelectedRow
(
selectedRowKeys
)
}
}
// 单个
const
[
record
,
setrecord
]
=
useState
<
any
>
([])
const
[
Multiple
,
setMultiple
]
=
useState
<
boolean
>
(
false
);
/* 显示模态款 */
const
onModal
=
(
record
,
Multiple
)
=>
{
const
List
=
[];
List
.
push
(
record
)
setrecord
(
List
)
PublicApi
.
getContractManageGetContractInfoByApplyAmountOrder
({
contractId
}).
then
(
res
=>
{
if
(
res
.
code
==
1000
)
{
setpayType
(
res
.
data
.
payPlanList
)
setIsModalVisible
(
!
ModalVisible
)
setMultiple
(
Multiple
)
}
})
const
handleCancel
=
(
text
)
=>
{
setIsModalVisible
(
!
isModalVisible
);
}
/* 批量 */
const
onselect
=
()
=>
{
if
(
select
.
length
!=
0
)
{
onModal
({},
true
)
}
else
{
const
msg
=
message
.
loading
({
content
:
'请勾选请款账单'
,
duration
:
0
,
});
msg
();
}
}
/* 确定 */
const
onFinish
=
(
values
:
any
)
=>
{
sessionStorage
.
setItem
(
'basics'
,
JSON
.
stringify
(
basics
));
console
.
log
(
JSON
.
stringify
(
Multiple
?
select
:
record
))
sessionStorage
.
setItem
(
'list'
,
JSON
.
stringify
(
Multiple
?
select
:
record
));
history
.
push
(
'/memberCenter/contract/funds/addbill/Add?applyId='
+
contractId
+
'&sourceType='
+
2
)
}
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
};
/* 点击显示弹出 */
const
getPayment
=
(
id
)
=>
{
setapplyId
(
id
)
setVisible
(
!
visible
)
}
const
PaymentList
:
any
=
[
{
title
:
'单据号/摘要'
,
dataIndex
:
'orderNO'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/preview?id=${record.orderId}`
}
>
{
text
}
</
EyePreview
>
<
p
>
{
record
.
orderAbstract
}
</
p
>
</
div
>
);
},
},
{
title
:
'单据类型'
,
dataIndex
:
'orderTypeName'
,
align
:
'center'
,
},
{
title
:
'单据状态'
,
dataIndex
:
'orderStatusName'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'orderTime'
,
align
:
'center'
,
},
]
/* 请求查看付款明细 */
const
getPaymentList
=
(
params
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getContractExecuteExecuteInfoPayDetailInfoPagePayDetail
({
...
params
,
applyId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
,
'请求查看付款明细'
)
resolve
(
res
.
data
)
}
})
})
}
/* 查看付款明细————————————————————查看付款明细———————————————————— */
const
rowSelection
:
any
=
{
type
:
'radio'
,
//
type: 'radio',
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
console
.
log
(
selectedRowKeys
,
selectedRows
)
//
console.log(selectedRowKeys, selectedRows)
setSelectRow
(
selectedRows
)
setSelectedRowKeys
(
selectedRowKeys
)
}
}
/* 请款统计 */
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getContractExecutePageListForSummaryByPartyA
({
...
params
,
contractId
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
console
.
log
(
res
.
data
)
// setdata
(res.data)
console
.
log
(
res
,
'这个是什么玩意'
)
resolve
(
res
.
data
)
}
else
{
}
})
})
}
const
columnsList
:
any
=
[
{
title
:
'请款次数'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
{
return
(
<
span
>
{
index
+
1
}
</
span
>
)
},
},
{
title
:
'请款单号/摘要'
,
dataIndex
:
'applyNo'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/contract/funds/bill/details?applyId=${record.id}&type=pageDetailList`
}
>
{
text
}
</
EyePreview
>
<
p
>
{
record
.
applyAbstract
}
</
p
>
</
div
>
);
}
},
{
title
:
'请款时间'
,
dataIndex
:
'applyTime'
,
align
:
'center'
,
},
{
title
:
'请款金额'
,
dataIndex
:
'applyAmount'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
{
return
(
<
span
>
¥
{
text
}
</
span
>
)
},
},
{
title
:
'付款时间'
,
dataIndex
:
'payTime'
,
align
:
'center'
,
},
{
title
:
'付款金额'
,
dataIndex
:
'payAmount'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
{
return
(
<
span
>
¥
{
text
}
</
span
>
)
},
},
{
title
:
'付款方式'
,
dataIndex
:
'payWayName'
,
align
:
'center'
,
},
];
/* 请款统计 */
/* 非手工单进入请款 */
const
like
=
(
sourceType
)
=>
{
// basics.
sessionStorage
.
setItem
(
'basics'
,
JSON
.
stringify
(
basics
));
history
.
push
(
'/memberCenter/contract/funds/addbill/Add?applyId='
+
contractId
+
'&sourceType='
+
sourceType
)
}
...
...
@@ -280,7 +466,15 @@ const Details = (props: any) => {
{
basicInfo
.
col1
.
map
((
item
:
any
,
index
:
number
)
=>
(
<
div
className=
{
style
.
list
}
key=
{
`col1_${index + 1}`
}
>
<
h5
className=
{
style
.
listLable
}
>
{
item
.
label
}
</
h5
>
<
h5
className=
{
style
.
listContent
}
>
{
item
.
extra
}
</
h5
>
{
item
.
url
?
<
h5
className=
{
style
.
gesture
}
onClick=
{
()
=>
history
.
push
(
item
.
url
)
}
>
{
item
.
extra
}
</
h5
>
:
item
.
label
===
'外部状态:'
?
<
StatusTag
type=
"success"
title=
{
item
.
extra
}
/>
:
<
h5
className=
{
style
.
listContent
}
>
{
item
.
extra
}
</
h5
>
}
</
div
>
))
}
</
Col
>
...
...
@@ -288,7 +482,14 @@ const Details = (props: any) => {
{
basicInfo
.
col2
.
map
((
item
:
any
,
index
:
number
)
=>
(
<
div
className=
{
style
.
list
}
key=
{
`col2_${index + 1}`
}
>
<
h5
className=
{
style
.
listLable
}
>
{
item
.
label
}
</
h5
>
<
h5
className=
{
style
.
listContent
}
>
{
item
.
extra
}
</
h5
>
{
item
.
url
?
<
h5
className=
{
style
.
gesture
}
onClick=
{
()
=>
history
.
push
(
item
.
url
)
}
>
{
item
.
extra
}
</
h5
>
:
<
h5
className=
{
style
.
listContent
}
>
{
item
.
extra
}
</
h5
>
}
</
div
>
))
}
</
Col
>
...
...
@@ -360,8 +561,8 @@ const Details = (props: any) => {
placeholder=
"店铺名称"
allowClear
/>
<
Button
style=
{
{
paddingLeft
:
10
,
paddingRight
:
10
}
}
>
重置
</
Button
>
<
Button
type=
"primary"
>
批量请款
</
Button
>
<
Button
style=
{
{
paddingLeft
:
10
,
paddingRight
:
10
,
marginLeft
:
10
,
marginRight
:
10
}
}
>
重置
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
onselect
()
}
>
批量请款
</
Button
>
</
div
>
</
div
>
</
div
>
...
...
@@ -369,6 +570,7 @@ const Details = (props: any) => {
<
Table
columns=
{
columns
}
dataSource=
{
data
}
rowSelection=
{
rowSelect
}
style=
{
{
width
:
"100%"
}
}
...
...
@@ -397,7 +599,69 @@ const Details = (props: any) => {
</
div
>
</
div
>
{
/* 选择弹出内容 */
}
{
/* 选择弹出内容 */
}
<
Drawer
visible=
{
visible
}
onClose=
{
()
=>
setVisible
(
!
visible
)
}
title=
"付款明细"
width=
{
900
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
()
=>
setVisible
(
!
visible
)
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
setVisible
(
!
visible
)
}
>
确定
</
Button
>
</
div
>
}
destroyOnClose
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
PaymentList
}
currentRef=
{
ref
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
getPaymentList
(
params
)
}
/>
</
Drawer
>
<
Modal
footer=
{
null
}
title=
"提交审核"
visible=
{
ModalVisible
}
onOk=
{
()
=>
setIsModalVisible
(
!
ModalVisible
)
}
onCancel=
{
()
=>
setIsModalVisible
(
!
ModalVisible
)
}
>
<
Form
name=
"basic"
form=
{
form
}
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
.
Item
label=
'选择付款阶段'
initialValue=
{
payType
.
length
!=
0
?
payType
[
0
].
id
:
''
}
name=
"opinion"
rules=
{
[{
required
:
true
,
message
:
'选择付款阶段'
}]
}
>
<
Select
style=
{
{
width
:
'290px'
}
}
>
{
payType
.
map
(
item
=>
(
<
Option
value=
{
item
.
id
}
>
{
item
.
payStage
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
}
}
>
<
Button
style=
{
{
marginRight
:
10
}
}
onClick=
{
()
=>
setIsModalVisible
(
!
ModalVisible
)
}
>
取消
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
>
确定
</
Button
>
</
div
>
</
Form
>
</
Modal
>
</
div
>
)
}
...
...
src/pages/contract/coordination/components/modal/crossSellProducts.tsx
View file @
88d77bd0
...
...
@@ -84,6 +84,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
placement=
'right'
width=
{
800
}
className=
{
style
.
drawer
}
onClose=
{
handleClose
}
visible=
{
visible
}
footer=
{
<
div
...
...
src/pages/contract/coordination/details/index.tsx
View file @
88d77bd0
...
...
@@ -73,7 +73,6 @@ const Details = (props: any) => {
{
id
:
'docking'
,
title
:
'电子合同'
},
{
id
:
'record'
,
title
:
'流转记录'
},
])
/* 获取详情的数据 */
const
getDetail
=
()
=>
{
PublicApi
.
getContractCoordinationGetDetail
({
contractId
}).
then
(
res
=>
{
...
...
@@ -139,19 +138,7 @@ const Details = (props: any) => {
})
}
const
fetchListData
=
(
params
)
=>
{
PublicApi
.
getContractCoordinationPagePurchaseMaterielList
({
...
params
,
contractId
}).
then
(
res
=>
{
setListData
(
res
.
data
.
data
)
})
}
// 展开/收起的回调
const
onExpand
=
expandedKeys
=>
{
};
useEffect
(()
=>
{
const
columnsTab
=
(
Numberamount
,
Totalamount
)
=>
{
const
columns
:
any
=
[
{
title
:
'物料编号/名称'
,
dataIndex
:
'materielNo'
,
align
:
'center'
,
},
{
title
:
'规格型号'
,
dataIndex
:
'type'
,
align
:
'center'
,
},
...
...
@@ -167,7 +154,7 @@ const Details = (props: any) => {
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
授标数量
</
Text
>
<
Text
>
合计:
¥156.000.00
</
Text
>
<
Text
>
合计:
{
Numberamount
}
</
Text
>
</
Space
>
),
},
...
...
@@ -176,12 +163,37 @@ const Details = (props: any) => {
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
金额(不含税)
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
Totalamount
}
</
Text
>
</
Space
>
),
},
];
console
.
log
(
type
,
'这个id是刷'
)
setcolumns
(
columns
)
}
const
[
Totalamount
,
setTotalamount
]
=
useState
(
0
)
const
[
Numberamount
,
setNumberamount
]
=
useState
(
0
)
const
fetchListData
=
(
params
)
=>
{
PublicApi
.
getContractCoordinationPagePurchaseMaterielList
({
...
params
,
contractId
}).
then
(
res
=>
{
let
Totalamount
=
0
,
Numberamount
=
0
;
res
.
data
.
data
.
map
(
item
=>
{
Totalamount
+=
item
.
bidAmount
;
Numberamount
+=
item
.
bidCount
})
setTotalamount
(
Totalamount
)
setNumberamount
(
Numberamount
)
columnsTab
(
Totalamount
,
Numberamount
)
setListData
(
res
.
data
.
data
)
})
}
// 展开/收起的回调
const
onExpand
=
expandedKeys
=>
{
};
useEffect
(()
=>
{
switch
(
type
)
{
// 关联报价商品
case
'submitExamine'
:
...
...
@@ -204,7 +216,7 @@ const Details = (props: any) => {
default
:
break
;
}
setcolumns
(
columns
)
setTargetOffset
(
window
.
innerHeight
/
6
);
getDetail
()
let
data
=
{
...
...
@@ -212,6 +224,7 @@ const Details = (props: any) => {
pageSize
:
10
}
fetchListData
(
data
)
},
[]);
const
handleAnchorClick
=
(
e
)
=>
{
...
...
@@ -275,49 +288,6 @@ const Details = (props: any) => {
{
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
},
{
title
:
'审核意见'
,
dataIndex
:
'opinion'
,
align
:
'center'
,
},
]
/* 付款明细 */
const
infoListcolumns
:
any
=
[
{
title
:
'单据号/摘要'
,
dataIndex
:
'name'
,
align
:
'center'
,
render
:
(
_
,
record
,
index
)
=>
index
+
1
,
},
{
title
:
'单据类型'
,
dataIndex
:
'department'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'jobTitle'
,
align
:
'center'
,
},
{
title
:
'单据状态'
,
dataIndex
:
'statusName'
,
align
:
'center'
,
},
{
title
:
<
Space
direction=
'vertical'
>
<
Text
>
单据金额
</
Text
>
<
Text
>
合计: ¥156.000.00
</
Text
>
</
Space
>
,
dataIndex
:
'operate'
,
align
:
'center'
,
},
{
title
:
'含税/税率'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
},
{
title
:
<
Space
direction=
'vertical'
>
<
Text
>
付款金额
</
Text
>
<
Text
>
合计: ¥156.000.00
</
Text
>
</
Space
>
,
dataIndex
:
'opinion'
,
align
:
'center'
,
},
]
const
infoListcolumnsgetData
=
(
params
)
=>
{
console
.
log
(
'===================================='
);
console
.
log
(
params
);
console
.
log
(
'===================================='
);
// return new Promise((resolve, reject) => {
// PublicApi.getContractExecutePageListForSummary({
// ...params,
// contractId: contractId
// }).then(res => {
// console.log(res.data, listIndex)
// resolve(res.data)
// }).catch(err => {
// console.log(err)
// })
// })
}
const
uploadProps
=
{
name
:
'file'
,
action
:
'/api/file/file/upload/prefix'
,
...
...
@@ -345,7 +315,6 @@ const Details = (props: any) => {
/** 确定关联商品 */
const
handleConfirm
=
(
params
:
any
)
=>
{
const
data
=
[...
ListData
];
data
[
index
].
associatedCategory
=
params
.
product
.
customerCategoryName
;
data
[
index
].
associatedBrand
=
params
.
product
.
brandName
;
data
[
index
].
associatedGoods
=
params
.
product
.
name
;
...
...
@@ -762,79 +731,7 @@ const Details = (props: any) => {
</
div
>
</
Form
>
</
Modal
>
{
/* 付款详情 */
}
<
Drawer
title=
"合同付款详情"
placement=
"right"
closable=
{
false
}
width=
{
1200
}
onClose=
{
()
=>
setDrawervisible
(
false
)
}
visible=
{
Drawervisible
}
>
{
/* 基本信息 */
}
<
div
className=
{
style
.
info
}
>
<
div
className=
{
style
.
infoTitle
}
>
基本信息
</
div
>
<
div
className=
{
style
.
infoMian
}
>
<
div
className=
{
style
.
item
}
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
收款账户:
</
div
>
<
div
className=
{
style
.
text
}
>
广州白马皮具交易中心
</
div
>
</
div
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
银行账号:
</
div
>
<
div
className=
{
style
.
text
}
>
622202 110868 11424 45
</
div
>
</
div
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
开户行:
</
div
>
<
div
className=
{
style
.
text
}
>
中国建设银行广州市分行营业部
</
div
>
</
div
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
付款阶段:
</
div
>
<
div
className=
{
style
.
text
}
>
合同中期款
</
div
>
</
div
>
</
div
>
<
div
className=
{
style
.
item
}
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
付款金额:
</
div
>
<
div
className=
{
style
.
text
}
>
广州白马皮具交易中心
</
div
>
</
div
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
付款时间:
</
div
>
<
div
className=
{
style
.
text
}
>
622202 110868 11424 45
</
div
>
</
div
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
付款方式:
</
div
>
<
div
className=
{
style
.
text
}
>
中国建设银行广州市分行营业部
</
div
>
</
div
>
</
div
>
<
div
className=
{
style
.
item
}
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
支付方式:
</
div
>
<
div
className=
{
style
.
text
}
>
广州白马皮具交易中心
</
div
>
</
div
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
发票编号:
</
div
>
<
div
className=
{
style
.
text
}
>
622202 110868 11424 45
</
div
>
</
div
>
<
div
className=
{
style
.
box
}
>
<
div
className=
{
style
.
lalbel
}
>
开票日期:
</
div
>
<
div
className=
{
style
.
text
}
>
中国建设银行广州市分行营业部
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
style
.
infoTitle
}
style=
{
{
marginTop
:
20
,
}
}
>
付款明细
</
div
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
currentRef=
{
ref
}
columns=
{
infoListcolumns
}
fetchTableData=
{
(
params
:
any
)
=>
infoListcolumnsgetData
(
params
)
}
/>
</
div
>
</
Drawer
>
</
div
>
)
}
...
...
src/pages/contract/coordination/implement/index.tsx
View file @
88d77bd0
...
...
@@ -99,7 +99,7 @@ const Sign = () => {
</
div
>
},
{
title
:
'外部状态
1
'
,
title
:
'外部状态'
,
dataIndex
:
'outerStatusName'
,
align
:
'center'
,
render
:
(
text
)
=>
{
...
...
src/pages/contract/funds/addbill/add.tsx
View file @
88d77bd0
...
...
@@ -15,12 +15,11 @@ const formActions = createFormActions();
const
{
TabPane
}
=
Tabs
;
const
Add
:
React
.
FC
<
{}
>
=
(
props
)
=>
{
const
Add
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
{
location
:
{
query
:
{
sourceType
}
}
}
=
props
;
console
.
log
(
sourceType
)
const
currentBasic
=
useRef
<
any
>
({});
const
detailData
=
useRef
<
any
>
({});
const
[
flag
,
setflag
]
=
useState
<
any
>
(
false
);
const
[
id
,
setid
]
=
useState
(
''
);
...
...
@@ -37,6 +36,7 @@ const Add: React.FC<{}> = (props) => {
<
AddInfo
currentRef=
{
currentBasic
}
getcontractId=
{
getflag
}
sourceType=
{
sourceType
}
/>
},
{
...
...
@@ -45,23 +45,14 @@ const Add: React.FC<{}> = (props) => {
flag=
{
flag
}
id=
{
id
}
currentRef=
{
detailData
}
sourceType=
{
sourceType
}
/>
},
]
const
submit
=
async
()
=>
{
const
basicsVO
=
await
currentBasic
.
current
.
get
();
// const detailList = await detailData.current.get();
let
detailList
=
[
{
id
:
0
,
applyAmount
:
100
,
orderId
:
41
,
orderNO
:
'JJHJ23484'
,
isHasTax
:
1
,
taxRate
:
10
}
]
console
.
log
(
basicsVO
,
detailList
)
const
detailList
=
await
Object
.
keys
(
detailData
.
current
).
length
!=
0
?
await
detailData
.
current
.
get
()
:
[];
basicsVO
.
data
.
sourceType
=
sourceType
?
sourceType
:
3
;
let
data
=
{
basics
:
basicsVO
.
data
,
...
...
src/pages/contract/funds/addbill/components/info.tsx
View file @
88d77bd0
...
...
@@ -17,7 +17,7 @@ const { Option } = Select;
import
{
Schema
}
from
"./schema"
const
AddInfo
=
(
props
:
any
)
=>
{
const
{
currentRef
,
getcontractId
}
=
props
;
const
{
currentRef
,
getcontractId
,
sourceType
}
=
props
;
const
refs
=
useRef
({});
/* 显示弹出 */
const
[
attrValueForm
]
=
Form
.
useForm
();
...
...
@@ -53,11 +53,11 @@ const AddInfo = (props: any) => {
/* 付款阶段 */
const
[
payPlanList
,
setpayPlanList
]
=
useState
<
any
>
([]);
/* 选中设置值 */
const
tag
=
[
{
name
:
'账期(默认)'
,
Index
:
1
},
{
name
:
'现结'
,
Index
:
2
},
{
name
:
'月结'
,
Index
:
3
},
]
//
const tag = [
//
{ name: '账期(默认)', Index: 1 },
//
{ name: '现结', Index: 2 },
//
{ name: '月结', Index: 3 },
//
]
const
[
Index
,
setIndex
]
=
useState
<
number
>
(
1
)
const
columnsList
:
any
=
[
{
...
...
@@ -110,6 +110,8 @@ const AddInfo = (props: any) => {
},
]
const
[
applyAmount
,
setapplyAmount
]
=
useState
<
string
>
(
''
);
const
[
tag
,
setTag
]
=
useState
<
any
>
([]);
/**
* 选中值
*/
...
...
@@ -142,11 +144,23 @@ const AddInfo = (props: any) => {
basicsData
.
contractNo
=
selectRow
.
contractNo
;
basicsData
.
contractId
=
selectRow
.
id
;
info
.
startTime
=
selectRow
.
startTime
;
setapplyAmount
(
res
.
data
.
payPlanList
[
0
].
payAmount
)
info
.
status
=
"同意签订合同"
;
// basicsData.applyAmount = res.data.payPlanList[0].applyAmount;
setpayPlanList
(
res
.
data
.
payPlanList
)
setInfo
(
info
)
getcontractId
({
flag
:
true
,
selectRow
})
/* 设置tab点击数组
* payWay 1 账期 2 月结 3 现结
*/
const
tagList
:
any
=
[];
res
.
data
.
payPlanList
.
map
((
item
,
index
)
=>
{
tagList
.
push
({
name
:
item
.
payWay
==
1
?
'账期'
:
item
.
payWay
==
2
?
'月结'
:
'现结'
,
payParam
:
item
.
payParam
,
Index
:
index
+
1
})
})
setTag
(
tagList
)
getcontractId
({
flag
:
sourceType
==
1
||
sourceType
==
2
?
false
:
true
,
selectRow
})
const
auth
=
JSON
.
parse
(
localStorage
.
getItem
(
'auth'
));
setaccount
(
auth
.
account
);
setBasics
(
basicsData
)
...
...
@@ -155,10 +169,12 @@ const AddInfo = (props: any) => {
})
}
useEffect
(()
=>
{
let
basics
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'basics'
))
if
(
basics
)
{
getAmountOrder
(
basics
);
setisFalg
(
true
)
if
(
sourceType
)
{
let
basics
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'basics'
))
if
(
basics
)
{
getAmountOrder
(
basics
);
setisFalg
(
true
)
}
}
},
[])
useEffect
(()
=>
{
...
...
@@ -243,6 +259,7 @@ const AddInfo = (props: any) => {
:
<
Search
placeholder=
"最长60个字符,30个汉字"
readOnly
enterButton=
{
<
div
onClick=
{
()
=>
setvisible
(
!
visible
)
}
><
LinkOutlined
/>
选择
</
div
>
}
/>
}
</
Form
.
Item
>
<
Form
.
Item
label=
"收款方"
labelAlign=
"left"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
<
span
>
{
account
}
</
span
>
...
...
@@ -267,7 +284,7 @@ const AddInfo = (props: any) => {
>
{
payPlanList
.
map
(
item
=>
(
<
Option
value=
{
item
.
id
}
>
{
item
.
pay
WayNam
e
}
</
Option
>
<
Option
value=
{
item
.
id
}
>
{
item
.
pay
Stag
e
}
</
Option
>
))
}
</
Select
>
...
...
@@ -285,6 +302,7 @@ const AddInfo = (props: any) => {
label=
"请款金额"
name=
"applyAmount"
labelAlign=
"left"
initialValue=
{
applyAmount
}
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
rules=
{
[
...
...
@@ -309,18 +327,23 @@ const AddInfo = (props: any) => {
/>
</
Form
.
Item
>
{
/* tag */
}
<
Form
.
Item
label=
"付款方式"
labelAlign=
"left"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
{
tag
.
map
((
item
:
any
)
=>
{
return
(
<
span
className=
{
item
.
Index
==
Index
?
styles
.
tative
:
styles
.
tag
}
onClick=
{
()
=>
setIndex
(
item
.
Index
)
}
>
{
item
.
name
}
</
span
>
)
})
}
</
Form
.
Item
>
<
Form
.
Item
label=
" "
labelAlign=
"left"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
<
Input
addonAfter=
{
Index
===
0
?
'天'
:
Index
===
2
?
'号'
:
null
}
disabled=
{
Index
==
1
?
true
:
false
}
/>
</
Form
.
Item
>
{
tag
.
length
!=
0
&&
<>
<
Form
.
Item
label=
"付款方式"
labelAlign=
"left"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
{
tag
.
map
((
item
:
any
)
=>
{
return
(
<
span
className=
{
item
.
Index
==
Index
?
styles
.
tative
:
styles
.
tag
}
onClick=
{
()
=>
setIndex
(
item
.
Index
)
}
>
{
item
.
name
}
</
span
>
)
})
}
</
Form
.
Item
>
<
Form
.
Item
label=
" "
labelAlign=
"left"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
<
Input
addonAfter=
{
Index
===
1
?
'天'
:
Index
===
3
?
'号'
:
null
}
value=
{
tag
[
Index
-
1
].
name
===
'现结'
?
''
:
tag
[
Index
-
1
].
payParam
}
disabled=
{
tag
[
Index
-
1
].
name
===
'现结'
?
true
:
false
}
/>
</
Form
.
Item
>
</>
}
<
Form
.
Item
label=
"支付方式"
labelAlign=
"left"
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
18
}
}
>
<
div
...
...
@@ -435,6 +458,7 @@ const AddInfo = (props: any) => {
}
}
/>
</
Drawer
>
</
div
>
)
}
...
...
src/pages/contract/funds/addbill/components/table.tsx
View file @
88d77bd0
...
...
@@ -8,7 +8,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
import
{
Schema
}
from
"./schema"
import
moment
from
'moment'
;
import
{
PlusOutlined
...
...
@@ -18,11 +18,15 @@ import { PublicApi } from '@/services/api';
const
{
Text
}
=
Typography
;
const
table
=
(
props
:
any
)
=>
{
const
{
flag
,
id
,
currentRef
}
=
props
;
const
{
flag
,
id
,
currentRef
,
sourceType
}
=
props
;
const
refs
=
useRef
({});
const
[
visible
,
setvisible
]
=
useState
<
boolean
>
(
false
);
const
[
rowSelection
,
RowCtl
]
=
useRowSelectionTable
({
customKey
:
'orderId'
,
type
:
'radio'
});
const
[
toorderAmount
,
settoorderAmount
]
=
useState
<
number
>
(
0
);
const
[
topayAmount
,
settopayAmount
]
=
useState
<
number
>
(
0
);
const
[
tounPayApplyAmount
,
settounPayApplyAmount
]
=
useState
<
number
>
(
0
);
const
[
payAmount
,
setpayAmount
]
=
useState
<
number
>
(
0
)
const
[
applyAmount
,
setapplyAmount
]
=
useState
<
number
>
(
0
)
const
[
PlanList
,
setPlanList
]
=
useState
<
any
>
([
]);
...
...
@@ -31,7 +35,7 @@ const table = (props: any) => {
title
:
'单据编号/摘要'
,
dataIndex
:
'applyNo'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
{
text
}
</
p
>
<
div
>
{
text
}
</
div
>
{
/* <p>{record.applyAbstract}</p> */
}
</
div
>
...
...
@@ -41,15 +45,15 @@ const table = (props: any) => {
title
:
'订单类型'
,
dataIndex
:
'orderTypeName'
,
align
:
'center'
,
render
:
(
text
)
=>
<
div
>
<
p
>
{
text
}
</
p
>
<
div
>
{
text
}
</
div
>
</
div
>
},
{
title
:
'单据状态'
,
dataIndex
:
'outerStatus'
,
align
:
'center'
,
title
:
'单据状态'
,
dataIndex
:
'outerStatus
Name
'
,
align
:
'center'
,
render
:
(
text
)
=>
<
div
>
<
p
>
{
text
}
</
p
>
<
div
>
{
text
}
</
div
>
</
div
>
},
...
...
@@ -66,7 +70,7 @@ const table = (props: any) => {
dataIndex
:
'orderAmount'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
¥
{
text
}
</
p
>
<
div
>
¥
{
text
}
</
div
>
</
div
>
},
...
...
@@ -74,8 +78,8 @@ const table = (props: any) => {
title
:
'含税/税率'
,
dataIndex
:
'taxRate'
,
align
:
'left'
,
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
{
text
?
'是'
:
'否'
}
</
p
>
<
p
>
%
{
text
}
</
p
>
<
div
>
{
text
?
'是'
:
'否'
}
</
div
>
<
div
>
%
{
text
}
</
div
>
</
div
>
},
...
...
@@ -84,12 +88,12 @@ const table = (props: any) => {
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已付款
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
topayAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
¥
{
text
?
text
:
0
}
</
p
>
<
div
>
¥
{
text
?
text
:
0
}
</
div
>
</
div
>
},
{
...
...
@@ -97,20 +101,20 @@ const table = (props: any) => {
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已请款待付款
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
tounPayApplyAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
¥
{
text
?
text
:
0
}
</
p
>
<
div
>
¥
{
text
?
text
:
0
}
</
div
>
</
div
>
},
{
dataIndex
:
'
pa
yAmount'
,
align
:
'center'
,
dataIndex
:
'
appl
yAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
请款金额
</
Text
>
<
Text
>
合计: ¥
156.000.00
</
Text
>
<
Text
>
合计: ¥
{
applyAmount
}
</
Text
>
</
Space
>
),
...
...
@@ -121,7 +125,8 @@ const table = (props: any) => {
width
:
130
,
}
}
placeholder=
""
onChange=
{
(
e
)
=>
onSelectChange
(
e
,
'payAmount'
,
index
)
}
onChange=
{
(
e
)
=>
onSelectChange
(
e
,
'applyAmount'
,
index
)
}
onBlur=
{
()
=>
Amount
()
}
/>
},
{
...
...
@@ -130,31 +135,47 @@ const table = (props: any) => {
align
:
'center'
,
key
:
'x'
,
render
:
(
_
,
item
,
index
)
=>
<
a
onClick=
{
()
=>
Delete
(
item
,
index
)
}
>
删除
</
a
>,
}
,
}
];
const
onSelectChange
=
(
e
,
name
,
idx
)
=>
{
// console.log(e, name, idx)
let
item
=
[...
PlanList
];
switch
(
name
)
{
case
'applyAmount'
:
item
[
idx
].
applyAmount
=
e
.
target
.
value
;
break
;
}
console
.
log
(
item
);
setPlanList
(
item
)
}
/* 计算金额 */
const
Amount
=
()
=>
{
// bidCount
let
tobidCount
=
0
;
let
toorderAmount
=
0
;
let
tounPayApplyAmount
=
0
;
let
toorderAmount
=
0
;
// 单据金额
let
topayAmount
=
0
;
let
payAmount
=
0
;
// 已付款
let
applyAmount
=
0
;
PlanList
.
map
(
item
=>
{
toorderAmount
+=
item
.
orderAmount
;
tounPayApplyAmount
+=
item
.
unPayApplyAmount
?
item
.
unPayApplyAmount
:
0
;
topayAmount
+=
item
.
payAmount
?
Number
(
item
.
payAmount
)
:
0
;
payAmount
+=
item
.
payAmount
?
item
.
payAmount
:
0
;
applyAmount
+=
item
.
applyAmount
?
Number
(
item
.
applyAmount
)
:
0
})
settopayAmount
(
topayAmount
)
setpayAmount
(
payAmount
)
setapplyAmount
(
applyAmount
)
settounPayApplyAmount
(
tounPayApplyAmount
)
settoorderAmount
(
toorderAmount
)
}
/* 删除 */
const
Delete
=
(
elm
,
idx
)
=>
{
// const dataSource = [...PlanList];
// const arr = [...payNumArr]
// let List = dataSource.filter((item, index) => index !== idx);
// let numberArr = arr.filter((item, index) => elm.payNum !== item);
// console.log(numberArr);
// setpayNumArr(numberArr)
// setPlanList(List)
const
dataSource
=
[...
PlanList
];
let
List
=
dataSource
.
filter
((
item
,
index
)
=>
index
!==
idx
);
setPlanList
(
List
)
};
const
columnsList
:
any
=
[
...
...
@@ -164,8 +185,8 @@ const table = (props: any) => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
{
text
}
</
p
>
<
p
>
{
record
.
applyAbstract
}
</
p
>
<
div
>
{
text
}
</
div
>
<
div
>
{
record
.
applyAbstract
}
</
div
>
</
div
>
},
{
...
...
@@ -175,7 +196,7 @@ const table = (props: any) => {
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
{
text
}
</
p
>
<
div
>
{
text
}
</
div
>
</
div
>
},
{
...
...
@@ -185,11 +206,11 @@ const table = (props: any) => {
},
{
title
:
'单据状态'
,
dataIndex
:
'outerStatus'
,
dataIndex
:
'outerStatus
Name
'
,
align
:
'center'
,
render
:
(
text
)
=>
<
div
>
<
p
>
{
text
}
</
p
>
<
div
>
{
text
}
</
div
>
</
div
>
},
{
...
...
@@ -198,7 +219,7 @@ const table = (props: any) => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
¥
{
text
}
</
p
>
<
div
>
¥
{
text
}
</
div
>
</
div
>
},
{
...
...
@@ -207,10 +228,11 @@ const table = (props: any) => {
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
div
>
<
p
>
¥
{
text
}
</
p
>
<
div
>
¥
{
text
}
</
div
>
</
div
>
},
]
/***
* @function fetchData 请求表格数据
**/
...
...
@@ -219,6 +241,9 @@ const table = (props: any) => {
return
new
Promise
(
resolve
=>
{
PublicApi
.
getContractApplyAmountContractOrderPageList
({
...
params
}).
then
(
res
=>
{
console
.
log
(
res
)
res
.
data
.
data
.
find
(
item
=>
{
item
.
orderTime
=
item
.
orderTime
?
moment
().
format
(
'YYYY-MM-DD'
)
:
''
;
})
resolve
(
res
.
data
)
})
})
...
...
@@ -231,13 +256,40 @@ const table = (props: any) => {
setvisible
(
false
)
Amount
()
}
useEffect
(()
=>
{
currentRef
.
current
=
{
get
:
()
=>
new
Promise
((
resolve
:
any
)
=>
{
let
data
=
[];
PlanList
.
map
((
item
:
any
)
=>
{
data
.
push
(
{
id
:
0
,
applyAmount
:
item
.
applyAmount
,
orderId
:
item
.
orderId
,
orderNO
:
item
.
applyNo
,
isHasTax
:
item
.
isHasTax
,
taxRate
:
item
.
taxRate
,
executeId
:
item
.
id
?
item
.
id
:
''
,
}
)
})
resolve
(
data
)
})
}
})
useEffect
(()
=>
{
let
PlanList
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'list'
))
console
.
log
(
PlanList
,
sourceType
)
if
(
sourceType
==
2
)
{
PlanList
.
map
((
item
)
=>
{
item
.
applyNo
=
item
.
orderNO
;
item
.
outerStatusName
=
item
.
orderStatusName
;
})
setPlanList
(
PlanList
)
}
},
[])
return
(
<
div
className=
"table"
>
{
...
...
src/pages/contract/funds/bill/index.tsx
View file @
88d77bd0
...
...
@@ -89,9 +89,10 @@ const Bill: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<>
<
span
style=
{
statuStyle
.
success
}
>
已完成签约
</
span
>
</>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
justifyContent
:
'center'
}
}
>
<
span
style=
{
{
marginRight
:
10
,
background
:
'#FFC400'
,
display
:
"inline-block"
,
width
:
'6px'
,
height
:
'6px'
,
borderRadius
:
'50%'
}
}
></
span
>
<
span
>
{
text
}
</
span
>
</
div
>
)
return
component
}
...
...
src/pages/contract/funds/details/components/materials.tsx
View file @
88d77bd0
...
...
@@ -22,44 +22,42 @@ const Materials = (props: any) => {
</
div
>
)
}
const
[
total
,
setTotal
]
=
useState
<
any
>
({
totalorderAmount
:
0
,
totalpayAmount
:
0
,
totalunPayApplyAmount
:
0
,
totalapplyAmount
:
0
,
})
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
let
fn
;
switch
(
type
)
{
/* 查询请款明细 */
case
'pageDetailList'
:
fn
=
PublicApi
.
getContractApplyAmountPageDetailList
break
;
case
'submitExamine'
:
fn
=
PublicApi
.
getContractApplyAmountPageToBeAdd
break
;
case
'PageToBeExamineOne'
:
fn
=
PublicApi
.
getContractApplyAmountPageToBeExamineOne
break
;
case
'ToBeExamineTwo'
:
fn
=
PublicApi
.
getContractApplyAmountPageToBeExamineTwo
break
;
case
'pageToBeSubmit'
:
fn
=
PublicApi
.
getContractApplyAmountPageToBeSubmit
break
;
// case '':
// fn = PublicApi.postContractApplyAmountExamineStepTwo
// break;
}
fn
({
PublicApi
.
getContractApplyAmountPageDetailList
({
applyId
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
let
totals
=
{
totalorderAmount
:
0
,
totalpayAmount
:
0
,
totalunPayApplyAmount
:
0
,
totalapplyAmount
:
0
,
}
res
.
data
.
data
.
map
(
item
=>
{
totals
.
totalorderAmount
+=
item
.
orderAmount
;
totals
.
totalpayAmount
+=
item
.
payAmount
;
totals
.
totalunPayApplyAmount
+=
item
.
PayApplyAmount
;
totals
.
totalapplyAmount
+=
item
.
applyAmount
;
})
setTotal
(
totals
)
})
})
}
/* 请款明细 */
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'单据号/摘要'
,
dataIndex
:
type
==
'pageDetailList'
?
'orderNO'
:
'applyNo'
,
dataIndex
:
"orderNO"
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
div
>
...
...
@@ -86,7 +84,7 @@ const Materials = (props: any) => {
defaultSortOrder
:
'descend'
,
},
{
title
:
isTitle
(
'单据金额'
,
'188999'
),
title
:
isTitle
(
'单据金额'
,
total
.
totalorderAmount
),
dataIndex
:
'orderAmount'
,
align
:
'center'
,
},
...
...
@@ -96,17 +94,17 @@ const Materials = (props: any) => {
align
:
'center'
,
},
{
title
:
isTitle
(
'已付款'
,
'188999'
),
title
:
isTitle
(
'已付款'
,
total
.
totalpayAmount
),
dataIndex
:
'payAmount'
,
align
:
'center'
,
},
{
title
:
isTitle
(
'已请款待付款'
,
'188999'
),
title
:
isTitle
(
'已请款待付款'
,
total
.
totalunPayApplyAmount
),
dataIndex
:
'unPayApplyAmount'
,
align
:
'center'
,
},
{
title
:
isTitle
(
'请款金额'
,
'18000'
),
title
:
isTitle
(
'请款金额'
,
total
.
totalapplyAmount
),
dataIndex
:
'applyAmount'
,
align
:
'center'
,
}]
...
...
src/pages/contract/funds/details/index.tsx
View file @
88d77bd0
...
...
@@ -87,12 +87,12 @@ const BillDetails = (props: any) => {
{
label
:
'请款备注'
,
extra
:
basics
.
remark
?
basics
.
remark
:
''
},
],
col3
:
[
{
label
:
'合同付款阶段
:
'
,
extra
:
basics
.
payStage
?
basics
.
payStage
:
''
},
{
label
:
'合同付款比例
:
'
,
extra
:
basics
.
payRatio
?
`
${
basics
.
payRatio
}
%`
:
''
},
{
label
:
'请款金额
:
'
,
extra
:
basics
.
payRatio
?
`¥
${
basics
.
payRatio
}
`
:
''
},
{
label
:
'预计付款时间
:
'
,
extra
:
basics
.
expectPayTime
?
basics
.
expectPayTime
:
''
},
{
label
:
'付款方式
:'
,
extra
:
`
${
payWay
[
basics
.
payWay
]}
:
${
basics
.
payParam
}${
basics
.
payWay
==
3
?
'月'
:
basics
.
payWay
==
2
?
'天'
:
''
}
`
},
{
label
:
'支付方式
:
'
,
extra
:
basics
.
moneyPayWay
==
2
?
'线下支付'
:
''
},
{
label
:
'合同付款阶段'
,
extra
:
basics
.
payStage
?
basics
.
payStage
:
''
},
{
label
:
'合同付款比例'
,
extra
:
basics
.
payRatio
?
`
${
basics
.
payRatio
}
%`
:
''
},
{
label
:
'请款金额'
,
extra
:
basics
.
payRatio
?
`¥
${
basics
.
payRatio
}
`
:
''
},
{
label
:
'预计付款时间'
,
extra
:
basics
.
expectPayTime
?
basics
.
expectPayTime
:
''
},
{
label
:
'付款方式
'
,
extra
:
basics
.
payWayName
},
{
label
:
'支付方式'
,
extra
:
basics
.
moneyPayWay
==
2
?
'线下支付'
:
''
},
],
}
...
...
src/pages/contract/funds/levelpayment/index.tsx
View file @
88d77bd0
...
...
@@ -32,8 +32,7 @@ const Levelpayment: React.FC<{}> = () => {
return
(
<
div
>
<
EyePreview
// url={`/memberCenter/contract/funds/levelpayment/Details?applyId=${record.id}&type=PageToBeExamineOne`}
url=
{
`/memberCenter/contract/funds/addbill/Details?applyId=${record.id}&type=PageToBeExamineOne`
}
url=
{
`/memberCenter/contract/funds/levelpayment/details?applyId=${record.id}&type=PageToBeExamineOne`
}
>
{
text
}
</
EyePreview
>
...
...
src/pages/contract/funds/secondpayment/index.tsx
View file @
88d77bd0
...
...
@@ -32,7 +32,7 @@ const Secondpayment: React.FC<{}> = () => {
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/contract/funds/
addbill/D
etails?applyId=${record.id}&type=ToBeExamineTwo`
}
url=
{
`/memberCenter/contract/funds/
secondpayment/d
etails?applyId=${record.id}&type=ToBeExamineTwo`
}
>
{
text
}
</
EyePreview
>
...
...
src/pages/contract/funds/submitpayment/index.tsx
View file @
88d77bd0
...
...
@@ -31,7 +31,7 @@ const Submitpayment: React.FC<{}> = () => {
return
(
<
div
>
<
EyePreview
url=
{
`/memberCenter/contract/funds/
addbill/D
etails?applyId=${record.id}&type=pageToBeSubmit`
}
url=
{
`/memberCenter/contract/funds/
submitpayment/d
etails?applyId=${record.id}&type=pageToBeSubmit`
}
>
{
text
}
</
EyePreview
>
...
...
src/pages/contract/manage/QueryList/index.tsx
View file @
88d77bd0
...
...
@@ -155,6 +155,8 @@ const QueryList = () => {
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
params
.
startTime
=
params
.
startTime
?
moment
().
format
(
'YYYY-MM-DD'
)
:
''
;
params
.
endTime
=
params
.
endTime
?
moment
().
format
(
'YYYY-MM-DD'
)
:
''
;
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getContractManagePageList
({
...
params
,
...
...
src/pages/contract/manage/add/addList.tsx
View file @
88d77bd0
...
...
@@ -2,7 +2,7 @@
import
React
,
{
useRef
,
useState
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Button
,
Space
,
message
}
from
'antd'
import
{
Card
,
Button
,
Space
,
message
,
Popconfirm
}
from
'antd'
import
{
history
}
from
'umi'
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
...
...
@@ -141,13 +141,33 @@ const addList = () => {
}
{
/* 只有内部状态为待提交乙方签订合同状态且从未提交过的才可以删除,删除前需要提示,确认后才能删除 */
}
{
record
.
innerStatus
==
'1'
?
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
>
删除
</
span
>
:
''
record
.
innerStatus
==
'1'
&&
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
confirmDel
(
record
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
style=
{
{
marginRight
:
10
}
}
type=
"link"
>
删除
</
Button
>
</
Popconfirm
>
}
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
,
marginRight
:
10
}
}
onClick=
{
()
=>
submit
(
record
.
id
)
}
>
提交
</
span
>
</
div
>
)
}
}]
/**删除 */
const
confirmDel
=
(
recode
:
any
)
=>
{
console
.
log
(
recode
)
// / contract / manage / delete
PublicApi
.
postContractManageDelete
({
contractId
:
recode
.
id
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
/* 修改 */
const
edit
=
(
record
)
=>
{
...
...
src/pages/contract/manage/add/components/information.tsx
View file @
88d77bd0
...
...
@@ -237,9 +237,6 @@ const Information = (props: any) => {
}
}
}
console
.
log
(
'===================================='
);
console
.
log
(
data
);
console
.
log
(
'===================================='
);
return
data
;
}
}
...
...
@@ -267,7 +264,8 @@ const Information = (props: any) => {
},
]
}
>
<
Input
placeholder=
'请输入合同编号'
disabled
/>
{
/* disabled */
}
<
Input
placeholder=
'请输入合同编号'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"合同摘要"
...
...
src/pages/contract/manage/signacontract/index.tsx
View file @
88d77bd0
...
...
@@ -115,10 +115,10 @@ const Signacontract = () => {
title
:
'内部状态'
,
dataIndex
:
'innerStatus'
,
align
:
'center'
,
filters
:
[
{
text
:
'Joe'
,
value
:
'Joe'
},
{
text
:
'Jim'
,
value
:
'Jim'
},
],
//
filters: [
//
{ text: 'Joe', value: 'Joe' },
//
{ text: 'Jim', value: 'Jim' },
//
],
render
:
(
text
,
record
)
=>
{
return
(
...
...
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