|
@@ -2,7 +2,7 @@
|
|
|
* @Author: your name
|
|
|
* @Date: 2021-07-26 10:13:13
|
|
|
|
|
|
- * @LastEditTime: 2021-08-28 19:08:04
|
|
|
+ * @LastEditTime: 2021-08-31 10:43:53
|
|
|
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
* @Description: In User Settings Edit
|
|
@@ -26,12 +26,13 @@ import 'moment/locale/zh-cn';
|
|
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
|
import './index.less';
|
|
|
|
|
|
-const AfterCollectionSearch = () => {
|
|
|
+const AfterCostShareSearch = () => {
|
|
|
|
|
|
const [currentTime, setCurrentTime] = useState(moment(new Date()).subtract(1,'months').format('YYYY-MM'));
|
|
|
const [selectableResponsibilityList, setSelectableResponsibilityList] = useState([]);
|
|
|
const [selectedResponsibilityCode,setSelectedResponsibilityCode] = useState(null);
|
|
|
-
|
|
|
+ const [windowH,setWindowH] = useState(500);
|
|
|
+ const [windowW,setWindowW] = useState(1500);
|
|
|
const [selectableAccountingSubjectList,setSelectableAccountingSubjectList] = useState([]);
|
|
|
|
|
|
// const [selectableCostProjectList, setSelectableCostProjectList] = useState([])
|
|
@@ -106,30 +107,35 @@ const AfterCollectionSearch = () => {
|
|
|
dataIndex: 'levelName',
|
|
|
key: 'levelName',
|
|
|
hideInSearch: true,
|
|
|
+ ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '责任中心编码',
|
|
|
dataIndex: 'responsibilityCode',
|
|
|
key: 'responsibilityCode',
|
|
|
hideInSearch: true,
|
|
|
+ ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '责任中心名',
|
|
|
dataIndex: 'responsibilityName',
|
|
|
key: 'responsibilityName',
|
|
|
hideInSearch: true,
|
|
|
+ ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '会计科目编码',
|
|
|
dataIndex: 'accountingCode',
|
|
|
key: 'accountingCode',
|
|
|
hideInSearch: true,
|
|
|
+ ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '会计科目名',
|
|
|
dataIndex: 'accountingName',
|
|
|
key: 'accountingName',
|
|
|
hideInSearch: true,
|
|
|
+ ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
title: '金额',
|
|
@@ -173,8 +179,6 @@ const AfterCollectionSearch = () => {
|
|
|
const renderDrawerHandle = () => {
|
|
|
|
|
|
setDrawerVisible(true);
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
const getReportData = async (params = {}, sort, filter)=>{
|
|
@@ -194,7 +198,7 @@ const AfterCollectionSearch = () => {
|
|
|
key: item[0],
|
|
|
fixed:index == 0?'left':'right',
|
|
|
hideInSearch: true,
|
|
|
- width: 100,
|
|
|
+ width: 150,
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
@@ -202,10 +206,10 @@ const AfterCollectionSearch = () => {
|
|
|
dataIndex: item[0],
|
|
|
key: item[0],
|
|
|
hideInSearch: true,
|
|
|
- width: 500,
|
|
|
+ width: 150,
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ setWindowW((columns.length)*150);
|
|
|
setReportTableColumns(columns);
|
|
|
setTotalData(totalMapToArr);
|
|
|
|
|
@@ -228,6 +232,9 @@ const AfterCollectionSearch = () => {
|
|
|
const { data: { list } } = responsibilityList;
|
|
|
setSelectableResponsibilityList(list);
|
|
|
await getAllAccountingSubjectForSearch();
|
|
|
+
|
|
|
+ setWindowH(window.document.body.clientHeight-300);
|
|
|
+
|
|
|
}, []);
|
|
|
|
|
|
return (
|
|
@@ -268,7 +275,7 @@ const AfterCollectionSearch = () => {
|
|
|
bordered
|
|
|
pagination={false}
|
|
|
search={false}
|
|
|
- scroll={{ x: 1500, y: 300 }}
|
|
|
+ scroll={{ x: windowW, y:windowH }}
|
|
|
summary={() => (
|
|
|
<Table.Summary fixed >
|
|
|
<Table.Summary.Row className="rowCell">
|
|
@@ -292,4 +299,4 @@ const AfterCollectionSearch = () => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-export default AfterCollectionSearch;
|
|
|
+export default AfterCostShareSearch;
|