Merge branch 'feature/2.16.1.2410.01-数据采集重构' into feature/2.16.1.2410.01-薪资账套配置流程审批
This commit is contained in:
commit
728e683777
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,400 +1,3 @@
|
|||
export const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
export const modalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "addUpChildEducation",
|
||||
key: "addUpChildEducation"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "addUpContinuingEducation",
|
||||
key: "addUpContinuingEducation"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "addUpHousingLoanInterest",
|
||||
key: "addUpHousingLoanInterest"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "addUpHousingRent",
|
||||
key: "addUpHousingRent"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "addUpSupportElderly",
|
||||
key: "addUpSupportElderly"
|
||||
},
|
||||
{
|
||||
title: "累计婴幼儿照护",
|
||||
dataIndex: "addUpInfantCare",
|
||||
key: "addUpInfantCare"
|
||||
},
|
||||
{
|
||||
title: "累计大病医疗",
|
||||
dataIndex: "addUpIllnessMedical",
|
||||
key: "addUpIllnessMedical"
|
||||
}
|
||||
];
|
||||
export const specialModalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "子女教育",
|
||||
dataIndex: "childrenEducation",
|
||||
key: "childrenEducation"
|
||||
},
|
||||
{
|
||||
title: "继续教育",
|
||||
dataIndex: "continuingEducation",
|
||||
key: "continuingEducation"
|
||||
},
|
||||
{
|
||||
title: "住房贷款利息",
|
||||
dataIndex: "housingLoanInterest",
|
||||
key: "housingLoanInterest"
|
||||
},
|
||||
{
|
||||
title: "住房租金",
|
||||
dataIndex: "housingRent",
|
||||
key: "housingRent"
|
||||
},
|
||||
{
|
||||
title: "赡养老人",
|
||||
dataIndex: "supportingElder",
|
||||
key: "supportingElder"
|
||||
},
|
||||
{
|
||||
title: "婴幼儿照护",
|
||||
dataIndex: "infantCare",
|
||||
key: "infantCare"
|
||||
},
|
||||
{
|
||||
title: "大病医疗",
|
||||
dataIndex: "seriousIllnessTreatment",
|
||||
key: "seriousIllnessTreatment"
|
||||
}
|
||||
];
|
||||
export const otherModalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "商业健康保险",
|
||||
dataIndex: "businessHealthyInsurance",
|
||||
key: "businessHealthyInsurance"
|
||||
},
|
||||
{
|
||||
title: "税延养老保险",
|
||||
dataIndex: "taxDelayEndowmentInsurance",
|
||||
key: "taxDelayEndowmentInsurance"
|
||||
},
|
||||
{
|
||||
title: "其他",
|
||||
dataIndex: "otherDeduction",
|
||||
key: "otherDeduction"
|
||||
},
|
||||
{
|
||||
title: "准予扣除的捐赠额",
|
||||
dataIndex: "deductionAllowedDonation",
|
||||
key: "deductionAllowedDonation"
|
||||
}
|
||||
];
|
||||
export const situationModalColumns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "username",
|
||||
key: "username"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "taxAgentName",
|
||||
key: "taxAgentName"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "departmentName",
|
||||
key: "departmentName"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "mobile",
|
||||
key: "mobile"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobNum",
|
||||
key: "jobNum"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "idNo",
|
||||
key: "idNo"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "hiredate",
|
||||
key: "hiredate"
|
||||
},
|
||||
{
|
||||
title: "累计收入额",
|
||||
dataIndex: "addUpIncome",
|
||||
key: "addUpIncome"
|
||||
},
|
||||
{
|
||||
title: "累计减除费用",
|
||||
dataIndex: "addUpSubtraction",
|
||||
key: "addUpSubtraction"
|
||||
},
|
||||
{
|
||||
title: "累计社保个人合计",
|
||||
dataIndex: "addUpSocialSecurityTotal",
|
||||
key: "addUpSocialSecurityTotal"
|
||||
},
|
||||
{
|
||||
title: "累计公积金个人合计",
|
||||
dataIndex: "addUpAccumulationFundTotal",
|
||||
key: "addUpAccumulationFundTotal"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "addUpChildEducation",
|
||||
key: "addUpChildEducation"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "addUpContinuingEducation",
|
||||
key: "addUpContinuingEducation"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "addUpHousingLoanInterest",
|
||||
key: "addUpHousingLoanInterest"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "addUpHousingRent",
|
||||
key: "addUpHousingRent"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "addUpSupportElderly",
|
||||
key: "addUpSupportElderly"
|
||||
},
|
||||
{
|
||||
title: "累计企业(职业)年金及其他福利",
|
||||
dataIndex: "addUpEnterpriseAndOther",
|
||||
key: "addUpEnterpriseAndOther"
|
||||
},
|
||||
{
|
||||
title: "累计其他免税扣除",
|
||||
dataIndex: "addUpOtherDeduction",
|
||||
key: "addUpOtherDeduction"
|
||||
},
|
||||
{
|
||||
title: "累计免税收入",
|
||||
dataIndex: "addUpTaxExemptIncome",
|
||||
key: "addUpTaxExemptIncome"
|
||||
},
|
||||
{
|
||||
title: "累计准予扣除的捐赠额",
|
||||
dataIndex: "addUpAllowedDonation",
|
||||
key: "addUpAllowedDonation"
|
||||
},
|
||||
{
|
||||
title: "累计减免税额",
|
||||
dataIndex: "addUpTaxSavings",
|
||||
key: "addUpTaxSavings"
|
||||
},
|
||||
{
|
||||
title: "累计已预扣预缴税额",
|
||||
dataIndex: "addUpAdvanceTax",
|
||||
key: "addUpAdvanceTax"
|
||||
},
|
||||
{
|
||||
title: "累计婴幼儿照护",
|
||||
dataIndex: "addUpInfantCare",
|
||||
key: "addUpInfantCare"
|
||||
},
|
||||
{
|
||||
title: "累计大病医疗",
|
||||
dataIndex: "addUpIllnessMedical",
|
||||
key: "addUpIllnessMedical"
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
|
||||
export const dataSource = [];
|
||||
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -404,7 +7,7 @@ export const dataCollectCondition = [
|
|||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
|
|
@ -414,7 +17,7 @@ export const dataCollectCondition = [
|
|||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
|
|
@ -448,7 +51,7 @@ export const dataCollectCondition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,70 +1,3 @@
|
|||
export const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -74,7 +7,7 @@ export const dataCollectCondition = [
|
|||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
|
|
@ -84,7 +17,7 @@ export const dataCollectCondition = [
|
|||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
|
|
@ -133,7 +66,7 @@ export const dataCollectCondition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import UnifiedTable from "../../components/UnifiedTable";
|
||||
import { getTableDate } from "../../apis/cumDeduct";
|
||||
import { Menu, Popover } from "antd";
|
||||
import { Spin } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -16,25 +15,53 @@ 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":
|
||||
this.props.onTableOperate({ key: "deleteSelectAddUpDeduction" }, params);
|
||||
break;
|
||||
case "EDIT":
|
||||
this.props.onTableOperate({ key: "handleAddData" }, params);
|
||||
break;
|
||||
case "VIEW":
|
||||
this.props.onViewDetails(params);
|
||||
break;
|
||||
case "log":
|
||||
this.props.onTableOperate({ key: "log" }, params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
getTableDate = (extraPayload = {}) => {
|
||||
const { loading, pageInfo } = this.state;
|
||||
const { url, payload } = this.props;
|
||||
const { loading, pageInfo, selectedRowKeys } = this.state;
|
||||
const { url, payload, isSpecial } = this.props;
|
||||
const module = {
|
||||
...pageInfo, url, ...payload, ...extraPayload,
|
||||
departmentIds: extraPayload.departmentIds ? extraPayload.departmentIds.split(",") : []
|
||||
|
|
@ -45,10 +72,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: 103, selectedRowKeys, isSpecial,
|
||||
pageInfo: this.state.pageInfo, unitTableType: "dataAcquisition",
|
||||
columns: this.state.columns
|
||||
}));
|
||||
}
|
||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||
};
|
||||
|
|
@ -59,124 +88,34 @@ 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, "删除"), "查看明细": getLabel(111, "查看明细"),
|
||||
"操作日志": getLabel(545781, "操作日志")
|
||||
};
|
||||
const childFrameObj = document.getElementById("unitTable");
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { columns, dataSource, loading, selectedRowKeys, pageInfo } = this.state;
|
||||
const { showOperateBtn, onTableOperate, onViewDetails, isSpecial = false, form } = this.props;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
|
||||
};
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => {
|
||||
this.getTableDate({ ...form.getFormParams() });
|
||||
});
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => {
|
||||
this.getTableDate({ ...form.getFormParams() });
|
||||
});
|
||||
}
|
||||
};
|
||||
const getColumns = _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
if (dataIndex === "username") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
return <a
|
||||
className="ellipsis"
|
||||
href={`javaScript:openhrm(${record.employeeId});`}
|
||||
onClick={e => window.pointerXY(e)}
|
||||
title={text}
|
||||
>
|
||||
{text}
|
||||
</a>;
|
||||
}
|
||||
};
|
||||
} else if (dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
width: 150,
|
||||
render: (text, record) => (
|
||||
<div className="linkWapper">
|
||||
{
|
||||
!isSpecial &&
|
||||
<React.Fragment>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onViewDetails(record)}>查看明细</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="deleteSelectAddUpDeduction">删除</Menu.Item>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
isSpecial &&
|
||||
<React.Fragment>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<React.Fragment>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "handleAddData" }, record)}>编辑</a>
|
||||
<a href="javaScript:void(0);" style={{ marginRight: 12 }}
|
||||
onClick={() => onTableOperate({ key: "deleteSelectAddUpDeduction" }, record)}>删除</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => onTableOperate(e, record)}>
|
||||
<Menu.Item key="log">{getLabel(545781, "操作日志")}</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className="ellipsis" title={text}> {text} </span>;
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
return <UnifiedTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
columns={getColumns}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={getColumns.length * 160}
|
||||
/>;
|
||||
const { dataSource, loading } = this.state;
|
||||
const dom = document.querySelector(".dataContent");
|
||||
let height = 280;
|
||||
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"
|
||||
id="unitTable"
|
||||
/>
|
||||
</Spin>
|
||||
</div>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,33 +23,17 @@
|
|||
}
|
||||
|
||||
.addItemsWrapper {
|
||||
padding-bottom: 8px;
|
||||
|
||||
.baseForm {
|
||||
.wea-form-cell {
|
||||
padding-right: 20% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group {
|
||||
.wea-form-cell-wrapper {
|
||||
border: 1px solid #e5e5e5;
|
||||
|
||||
& > div:last-child {
|
||||
border-bottom: none
|
||||
}
|
||||
|
||||
.wea-form-cell {
|
||||
padding: 4px 16px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.wea-form-item {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tipWrapper {
|
||||
background: #FFF;
|
||||
margin: 0 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -57,6 +41,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;
|
||||
|
|
@ -114,6 +107,68 @@
|
|||
.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 {
|
||||
background: #f6f6f6;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.titleDialog {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 46px 8px 16px;
|
||||
background: #fff;
|
||||
|
||||
.titleCol {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.titleLeftBox {
|
||||
.titleIcon {
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #F14A2D;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
padding-left: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.titleRightBox {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
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 { Button } from "antd";
|
||||
import ImportModal from "./importDialog";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import { getSearchs } from "../../util";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -73,15 +73,29 @@ class Layout extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { slidePayload, slideLoading, detailOptBtns, onSave } = this.props;
|
||||
const { title } = slidePayload;
|
||||
return <div className="titleDialog">
|
||||
<div className="titleCol titleLeftBox">
|
||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||
<div className="title">{title}</div>
|
||||
</div>
|
||||
<div className="titleCol titleRightBox">
|
||||
{(slidePayload.children && slidePayload.children.props.className) ? [...detailOptBtns] :
|
||||
<Button type="primary" loading={slideLoading} onClick={onSave}>{getLabel(537558, "保存")}</Button>}
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
||||
render() {
|
||||
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
|
||||
|
|
@ -99,6 +113,7 @@ class Layout extends Component {
|
|||
]}
|
||||
/>
|
||||
<WeaTab
|
||||
advanceHeight={162}
|
||||
searchType={["base", "advanced"]}
|
||||
replaceLeft={leftComp}
|
||||
searchsAd={getSearchs(form, toJS(condition), 2)}
|
||||
|
|
@ -111,7 +126,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,21 +139,12 @@ class Layout extends Component {
|
|||
visible={visible}
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={80}
|
||||
measureX="%"
|
||||
width={850}
|
||||
measureX="px"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction="right"
|
||||
title={
|
||||
<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}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,70 +1,3 @@
|
|||
export const columns = [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "个税扣缴义务人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "证件号码",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "入职日期",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计子女教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计继续教育",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房贷款利息",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计住房租金",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "累计赡养老人",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "title",
|
||||
key: "title"
|
||||
}
|
||||
];
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
|
|
@ -74,7 +7,7 @@ export const dataCollectCondition = [
|
|||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
|
|
@ -84,7 +17,7 @@ export const dataCollectCondition = [
|
|||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
|
|
@ -118,7 +51,7 @@ export const dataCollectCondition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export const condition = [
|
|||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
|
|
@ -40,7 +40,7 @@ export const condition = [
|
|||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
labelcol: 8,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ class Index extends Component {
|
|||
...slidePayload,
|
||||
visible: false,
|
||||
title: "",
|
||||
chidren: null,
|
||||
children: null,
|
||||
data: {}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue