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
96e08733
Commit
96e08733
authored
Jul 26, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
d664a35f
6d2b2382
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
259 additions
and
2 deletions
+259
-2
dist.zip
dist.zip
+0
-0
SituationList.tsx
...ontract/coordination/details/components/SituationList.tsx
+258
-0
index.tsx
...transaction/electronicContracts/components/test/index.tsx
+0
-0
index.less
...stockSellStorage/bills/components/EllipsisText/index.less
+1
-2
No files found.
dist.zip
deleted
100644 → 0
View file @
d664a35f
File deleted
src/pages/contract/coordination/details/components/SituationList.tsx
0 → 100644
View file @
96e08733
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Button
,
Input
,
Table
,
Typography
,
Space
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
style
from
'../index.less'
;
import
{
IAntdSchemaFormProps
}
from
'@formily/antd'
import
EyePreview
from
'@/components/EyePreview'
;
import
moment
from
'moment'
;
export
interface
Iprops
extends
IAntdSchemaFormProps
{
contractId
:
any
}
const
{
Text
}
=
Typography
;
const
situationList
:
React
.
FC
<
Iprops
>
=
({
contractId
})
=>
{
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
size
,
setSize
]
=
useState
(
10
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
listLoading
,
setListLoading
]
=
useState
(
false
);
/* 单据总金额 */
const
[
orderAmount
,
setorderAmount
]
=
useState
<
number
>
(
0
);
/* 已付款 */
const
[
payAmount
,
setpayAmount
]
=
useState
<
number
>
(
0
);
/* 已请款待付款 */
const
[
unPayApplyAmount
,
setunPayApplyAmount
]
=
useState
<
number
>
(
0
)
/* 待请款 */
const
[
unApplyAmount
,
setunApplyAmount
]
=
useState
<
number
>
(
0
)
const
[
data
,
setdata
]
=
useState
<
any
>
([])
/* 执行请款的选中 */
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
/* 搜素 */
const
onSearch
=
(
values
)
=>
{
const
data
=
{
contractId
,
orderNo
:
values
,
orderAbstract
:
''
,
startTime
:
""
,
endTime
:
""
,
current
:
1
,
pageSize
:
5
,
}
getContracInfoList
(
data
)
}
/* 执行情况分页 */
const
getContracInfoList
=
(
data
)
=>
{
setListLoading
(
true
);
PublicApi
.
getContractExecutePageExecuteInfoList
(
data
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
orderAmount
=
0
,
payAmount
=
0
,
unPayApplyAmount
=
0
,
unApplyAmount
=
0
;
if
(
res
.
data
.
data
)
{
let
list
=
res
.
data
.
data
.
map
((
item
:
any
,
index
:
number
)
=>
{
orderAmount
+=
item
.
orderAmount
;
payAmount
+=
item
.
payAmount
;
unApplyAmount
+=
item
.
unApplyAmount
;
unPayApplyAmount
+=
item
.
unPayApplyAmount
;
return
{
...
item
,
keyId
:
index
+
1
,
}
})
setdata
(
list
)
}
setTotal
(
res
.
data
.
totalCount
)
setunApplyAmount
(
unApplyAmount
)
setunPayApplyAmount
(
unPayApplyAmount
)
setpayAmount
(
payAmount
)
setorderAmount
(
orderAmount
)
}
}).
finally
(()
=>
{
setListLoading
(
false
);
});
}
const
rowSelection
:
any
=
{
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
console
.
log
(
selectedRowKeys
,
selectedRows
)
setSelectedRowKeys
(
selectedRowKeys
)
setSelectRow
(
selectedRows
)
}
};
/* 查看付款明细 */
const
columns
:
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'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
Text
>
{
moment
(
Number
(
text
)).
format
(
'YYYY-MM-DD'
)
}
</
Text
>
)
}
},
{
dataIndex
:
'orderAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
单据金额
</
Text
>
<
Text
>
合计: ¥
{
orderAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
'含税/税率'
,
dataIndex
:
'taxRate'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
Space
direction=
'vertical'
>
<
Text
>
{
record
.
isHasTax
==
1
?
'是'
:
'否'
}
</
Text
>
<
Text
>
{
text
}
%
</
Text
>
</
Space
>
)
},
{
dataIndex
:
'payAmount'
,
align
:
'center'
,
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已付款
</
Text
>
<
Text
>
合计: ¥
{
payAmount
}
</
Text
>
</
Space
>
),
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
已请款待付款
</
Text
>
<
Text
>
合计: ¥
{
unPayApplyAmount
}
</
Text
>
</
Space
>
),
dataIndex
:
'unPayApplyAmount'
,
align
:
'center'
,
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
(
<
Space
direction=
'vertical'
>
<
Text
>
待请款
</
Text
>
<
Text
>
合计: ¥
{
unApplyAmount
}
</
Text
>
</
Space
>
),
dataIndex
:
'unApplyAmount'
,
align
:
'center'
,
render
:
(
text
)
=>
(
<
span
>
¥
{
text
}
</
span
>
)
},
{
title
:
'操作'
,
dataIndex
:
'type'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
{
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
return
(
<
div
>
{
// onClick =
{()
=>
getPayment
(
record
.
id
)}
record
.
payAmount
>
0
||
record
.
unPayApplyAmount
>
0
&&
<
a
className=
{
style
.
gesture
}
>
查看付款明细
</
a
>
}
</
div
>
)
}
},
];
const
handlePaginationChange
=
(
current
:
number
,
pageSize
:
number
)
=>
{
const
data
=
{
contractId
,
orderNo
:
''
,
orderAbstract
:
''
,
startTime
:
""
,
endTime
:
""
,
current
:
current
,
pageSize
:
pageSize
,
}
setSize
(
pageSize
)
getContracInfoList
(
data
)
};
useEffect
(()
=>
{
if
(
contractId
)
{
let
data
=
{
contractId
,
current
:
1
,
pageSize
:
8
}
getContracInfoList
(
data
)
}
console
.
log
(
data
,
'13132131'
)
},
[
contractId
])
return
(
<
div
id=
'docking'
className=
'ant-card ant-card-bordered'
>
<
div
className=
'ant-card-head'
>
<
div
className=
'ant-card-head-wrapper'
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
div
className=
'ant-card-head-wrapper'
>
执行情况
</
div
>
<
div
className=
{
style
.
wrapper
}
>
<
Input
.
Search
style=
{
{
width
:
240
}
}
placeholder=
"搜素"
allowClear
onSearch=
{
onSearch
}
/>
<
Button
style=
{
{
paddingLeft
:
10
,
paddingRight
:
10
,
marginLeft
:
10
,
marginRight
:
10
}
}
>
重置
</
Button
>
</
div
>
</
div
>
</
div
>
<
div
className=
'ant-card-body'
>
<
Table
rowKey=
'keyId'
rowSelection=
{
rowSelection
}
columns=
{
columns
}
dataSource=
{
data
}
loading=
{
listLoading
}
pagination=
{
{
defaultPageSize
:
20
,
pageSize
:
size
,
total
,
onChange
:
handlePaginationChange
}
}
style=
{
{
width
:
"100%"
}
}
/>
</
div
>
</
div
>
)
}
export
default
situationList
;
src/pages/transaction/electronicContracts/components/test/index.tsx
View file @
96e08733
This diff is collapsed.
Click to expand it.
src/pages/transaction/stockSellStorage/bills/components/EllipsisText/index.less
View file @
96e08733
...
...
@@ -2,4 +2,4 @@
.ellipsis {
.textOverflow();
}
\ No newline at end of file
}
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