feature/2.16.1.2410.01-数据采集重构

This commit is contained in:
lys 2024-10-31 10:22:16 +08:00
parent 004175f882
commit 66c6c68460
10 changed files with 99 additions and 66 deletions

View File

@ -4,7 +4,15 @@
flex-direction: column;
.wea-form-item {
padding: 8px 16px 0 16px;
height: 46px;
line-height: 46px;
background: #FFF;
margin: 8px 16px 0 16px;
.wea-form-item-label {
line-height: 46px !important;
padding-left: 8px !important;
}
.to {
padding: 0 10px
@ -15,7 +23,7 @@
flex: 1;
overflow: hidden;
background: #FFF;
margin: 16px;
margin: 8px 16px;
}
.linkWapper {

View File

@ -1,13 +1,41 @@
.tableRecordWrapper {
padding: 0 16px;
.form-dialog-layout {
padding: 0 !important;
.wea-search-group {
padding: 16px 0 !important;
}
}
.wea-form-cell-wrapper {
& > div:first-child {
height: 47px !important;
line-height: 47px;
}
& > div:last-child {
.wea-form-item-wrapper {
display: flex !important;
align-items: center;
.to {
padding: 0 10px;
}
}
}
}
.accumulated {
.wea-form-cell-wrapper {
& > div:first-child {
height: 46px !important;
line-height: 46px;
height: 47px !important;
line-height: 47px;
}
& > div:nth-child(2) {
//width: 40% !important;
.wea-form-item-wrapper {
display: flex !important;
@ -18,10 +46,6 @@
}
}
}
& > div:last-child {
//width: 40% !important;
}
}
}
}

View File

@ -5,8 +5,7 @@
* Date: 2023/2/20
*/
import React, { Component } from "react";
import { WeaSearchGroup } from "ecCom";
import UnifiedTable from "../../../components/UnifiedTable";
import { WeaSearchGroup, WeaTable } from "ecCom";
import { getTableRecordDate } from "../../../apis/cumDeduct";
import { DataCollectionDateRangePick, DataCollectionSelect, Input } from "../cumDeduct";
import "./index.less";
@ -87,9 +86,22 @@ class TableRecord extends Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total },
dataSource,
columns
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
columns: _.map(columns, (o, i) => {
let col = {
...o, width: 110,
render: text => (<span className="dataAc-ellipsis" title={text}>{text}</span>)
};
switch (o.dataIndex) {
case "taxAgentName":
col = { ...col, width: 180 };
break;
default:
col = { ...col };
break;
}
return i === 0 ? { ...col, fixed: "left" } : col;
})
});
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
@ -161,14 +173,6 @@ class TableRecord extends Component {
{
com: Input({ value: record.username })
},
{
com: DataCollectionDateRangePick({
label: "税款所属期",
range: recordPayload[screenParams[screenParams.length - 1]] || [],
onChange: this.handleTablerecordScreen,
key: screenParams[screenParams.length - 1]
})
},
{
com: DataCollectionSelect({
label: "个税扣缴义务人",
@ -177,28 +181,26 @@ class TableRecord extends Component {
onChange: this.handleTablerecordScreen,
key: "taxAgentId"
})
},
{
com: DataCollectionDateRangePick({
label: "税款所属期",
range: recordPayload[screenParams[screenParams.length - 1]] || [],
onChange: this.handleTablerecordScreen,
key: screenParams[screenParams.length - 1]
})
}
];
return (
<div className="tableRecordWrapper">
{
!_.isEmpty(screenParams) &&
<WeaSearchGroup className={className} showGroup needTigger={false} items={items} col={width > 1280 ? 3 : 2}/>
<div className="form-dialog-layout">
<WeaSearchGroup className={className} showGroup needTigger={false} items={items} col={2}/>
</div>
}
<UnifiedTable
rowKey="id"
rowSelection={rowSelection}
columns={_.map(columns, item => ({
...item,
render: (text) => {
return <span className="ellipsis" title={text}> {text} </span>;
}
}))}
dataSource={dataSource}
pagination={pagination}
loading={loading.query}
xWidth={columns.length * 180}
/>
<WeaTable rowKey="id" rowSelection={rowSelection} bordered dataSource={dataSource} pagination={pagination}
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 310px)` }} columns={columns}/>
</div>
);
}

View File

@ -332,7 +332,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
chidren: null,
children: null,
data: {}
}
});

View File

@ -379,7 +379,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
chidren: null,
children: null,
data: {}
}
});

View File

@ -74,7 +74,7 @@ class DataTables extends Component {
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns
}, () => this.postMessageToChild({
dataSource: this.state.dataSource, scrollHeight: 95, selectedRowKeys, isSpecial,
dataSource: this.state.dataSource, scrollHeight: 103, selectedRowKeys, isSpecial,
pageInfo: this.state.pageInfo, unitTableType: "dataAcquisition",
columns: this.state.columns
}));
@ -100,14 +100,18 @@ class DataTables extends Component {
render() {
const { dataSource, loading } = this.state;
const dom = document.querySelector(".dataContent");
let height = 280;
if (dataSource.length > 0) height = dataSource.length <= 10 ? dataSource.length * 46 + 124 : 500;
if (dataSource.length > 0 && dom) {
const tableHeight = dataSource.length * 46 + 124;
height = dom.offsetHeight > tableHeight ? tableHeight : dom.offsetHeight;
}
return (<div style={{ height: height + "px" }}>
<Spin spinning={loading.query}>
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
src="http://localhost:7607/#/unitTable"
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
// src="http://localhost:7607/#/unitTable"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
id="unitTable"
/>
</Spin>

View File

@ -105,11 +105,20 @@
}
.dataContent {
flex: 1;
overflow: hidden;
padding: 0 16px;
.wea-new-table {
background: #FFF;
.dataAc-ellipsis {
display: inline-block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.wea-slide-modal .wea-slide-modal-content {
@ -158,10 +167,6 @@
.titleRightBox {
justify-content: flex-end;
button:last-child {
margin-left: 10px;
}
}
}
}

View File

@ -11,7 +11,6 @@ import { WeaLocaleProvider, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
import { Button } from "antd";
import ImportModal from "./importDialog";
import LogDialog from "../../components/logViewModal";
import SlideModalTitle from "../../components/slideModalTitle";
import { getSearchs } from "../../util";
import "./index.less";
@ -75,7 +74,7 @@ class Layout extends Component {
}
};
renderTitle = () => {
const { slidePayload, slideLoading, onSave } = this.props;
const { slidePayload, slideLoading, detailOptBtns, onSave } = this.props;
const { title } = slidePayload;
return <div className="titleDialog">
<div className="titleCol titleLeftBox">
@ -83,7 +82,8 @@ class Layout extends Component {
<div className="title">{title}</div>
</div>
<div className="titleCol titleRightBox">
<Button type="primary" loading={slideLoading} onClick={onSave}>{getLabel(537558, "保存")}</Button>
{(slidePayload.children && slidePayload.children.props.className) ? [...detailOptBtns] :
<Button type="primary" loading={slideLoading} onClick={onSave}>{getLabel(537558, "保存")}</Button>}
</div>
</div>;
};
@ -92,10 +92,10 @@ class Layout extends Component {
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
const {
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
slidePayload, onClose, onSave, slideLoading, form, condition, onImportFile,
onAdSearch, onCancel, importPayload, detailOptBtns, logFunction, onClearTargrtid
slidePayload, onClose, form, condition, onImportFile,
onAdSearch, onCancel, importPayload, logFunction, onClearTargrtid
} = this.props;
const { visible, title: subtitle, children: slideChildren } = slidePayload;
const { visible, children: slideChildren } = slidePayload;
const {
visible: importVisiable, importFormComponent, importOpts,
importResult, templateLink, previewUrl
@ -144,17 +144,7 @@ class Layout extends Component {
height={100}
measureY="%"
direction="right"
title={
this.renderTitle()
// <SlideModalTitle
// subtitle={subtitle}
// loading={slideLoading}
// onSave={onSave}
// editable={subtitle.length <= 2}
// showOperateBtn={showOperateBtn}
// customOperate={subtitle.length <= 2 ? [] : detailOptBtns}
// />
}
title={this.renderTitle()}
content={slideChildren}
onClose={onClose}
/>

View File

@ -394,7 +394,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
chidren: null,
children: null,
data: {}
}
});

View File

@ -332,7 +332,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
chidren: null,
children: null,
data: {}
}
});