custom/京贵投资

This commit is contained in:
lys 2024-10-30 10:20:43 +08:00
parent 8488f54aac
commit c5a62b3c26
6 changed files with 97 additions and 39 deletions

View File

@ -61,8 +61,8 @@ class AddItems extends Component {
render() {
const { form, condition = [] } = this.props;
return (
<div className="addItemsWrapper">
{getSearchs(form, condition)}
<div className="addItemsWrapper form-dialog-layout">
{getSearchs(form, condition, 2, false)}
<Tips><span>若此员工数据已存在在同期列表中则当前数据保存后会覆盖列表数据</span></Tips>
</div>
);

View File

@ -404,7 +404,7 @@ export const dataCollectCondition = [
fieldcol: 12,
label: "税款所属期",
lanId: 542240,
labelcol: 4,
labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
@ -414,7 +414,7 @@ export const dataCollectCondition = [
domkey: ["taxAgentId"],
fieldcol: 12,
label: "个税扣缴义务人",
labelcol: 4,
labelcol: 8,
lanId: 537996,
value: "",
options: [],
@ -448,7 +448,7 @@ export const dataCollectCondition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
labelcol: 4,
labelcol: 8,
rules: "required",
viewAttr: 3
}

View File

@ -244,10 +244,12 @@ class Index extends Component {
};
this.handleSaveDeduction(payload);
} else {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
f.showErrors();
this.forceUpdate();
// Modal.warning({
// title: "信息确认",
// content: "必要信息不完整,红色*为必填项!"
// });
}
});
};

View File

@ -5,9 +5,9 @@
* Date: 2023/2/17
*/
import React, { Component } from "react";
import UnifiedTable from "../../components/UnifiedTable";
// import UnifiedTable from "../../components/UnifiedTable";
import { getTableDate } from "../../apis/cumDeduct";
import { Menu, Popover } from "antd";
import { Menu, Popover, Spin } from "antd";
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
@ -16,24 +16,44 @@ class DataTables extends Component {
constructor(props) {
super(props);
this.state = {
loading: {
query: false
},
dataSource: [],
columns: [],
selectedRowKeys: [],
pageInfo: {
current: 1, pageSize: 10, total: 0
}
loading: { query: false }, dataSource: [], columns: [], selectedRowKeys: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
this.getTableDate();
window.addEventListener("message", this.handleReceive, false);
}
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
}
handleReceive = async ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
this.getTableDate();
} else if (type === "turn") {
switch (id) {
case "PAGEINFO":
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.getTableDate());
break;
case "CHECKBOX":
const { selectedRowKeys } = params;
this.setState({ selectedRowKeys });
break;
case "DEL":
break;
case "EDIT":
break;
default:
break;
}
}
};
getTableDate = (extraPayload = {}) => {
const { loading, pageInfo } = this.state;
const { loading, pageInfo, selectedRowKeys } = this.state;
const { url, payload } = this.props;
const module = {
...pageInfo, url, ...payload, ...extraPayload,
@ -45,10 +65,12 @@ class DataTables 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
}, () => this.postMessageToChild({
dataSource: this.state.dataSource, scrollHeight: 95, selectedRowKeys,
pageInfo: this.state.pageInfo, unitTableType: "dataAcquisition",
columns: this.state.columns
}));
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
};
@ -59,6 +81,14 @@ class DataTables extends Component {
* Date: 2023/2/20
*/
handleClearRows = () => this.setState({ selectedRowKeys: [] });
postMessageToChild = (payload = {}) => {
const i18n = {
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
"条": getLabel(18256, "条"), "删除": getLabel(111, "删除")
};
const childFrameObj = document.getElementById("unitTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
render() {
const { columns, dataSource, loading, selectedRowKeys, pageInfo } = this.state;
@ -168,15 +198,27 @@ class DataTables extends Component {
};
}
});
return <UnifiedTable
rowKey="id"
rowSelection={rowSelection}
columns={getColumns}
dataSource={dataSource}
pagination={pagination}
loading={loading.query}
xWidth={getColumns.length * 160}
/>;
let height = 280;
if (dataSource.length > 0) height = dataSource.length <= 10 ? dataSource.length * 46 + 108 : 500;
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"
id="unitTable"
/>
</Spin>
</div>);
// <UnifiedTable
// rowKey="id"
// rowSelection={rowSelection}
// columns={getColumns}
// dataSource={dataSource}
// pagination={pagination}
// loading={loading.query}
// xWidth={getColumns.length * 160}
// />;
}
}

View File

@ -57,6 +57,15 @@
height: 100%;
display: flex;
flex-direction: column;
background: #F6F6F6;
.wea-new-top-wapper, .wea-tab {
background: #FFF;
}
.wea-tab {
margin: 8px 16px;
}
.wea-tab-left {
min-width: 600px !important;
@ -112,8 +121,12 @@
}
.dataContent {
flex: 1;
overflow: hidden;
padding: 0 16px;
.ant-spin-nested-loading, .ant-spin-container {
height: 100% !important;
}
}
}

View File

@ -7,7 +7,7 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
import { WeaLocaleProvider, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
import ImportModal from "./importDialog";
import LogDialog from "../../components/logViewModal";
import SlideModalTitle from "../../components/slideModalTitle";
@ -99,6 +99,7 @@ class Layout extends Component {
]}
/>
<WeaTab
advanceHeight={162}
searchType={["base", "advanced"]}
replaceLeft={leftComp}
searchsAd={getSearchs(form, toJS(condition), 2)}
@ -111,7 +112,7 @@ class Layout extends Component {
searchsBaseValue={form.getFormParams().username}
/>
<div className="dataContent">
<WeaNewScroll height="100%">{children}</WeaNewScroll>
{children}
{/*导入弹框*/}
<ImportModal
visible={importVisiable} onCancel={onCancel} importParams={importFormComponent}
@ -124,7 +125,7 @@ class Layout extends Component {
visible={visible}
top={0}
measureT="%"
width={80}
width={50}
measureX="%"
height={100}
measureY="%"