数据采集页面添加新建功能

This commit is contained in:
18652063575 2022-10-24 18:42:15 +08:00
parent c4c24dd159
commit 8fa3b0918c
16 changed files with 1093 additions and 564 deletions

View File

@ -84,12 +84,13 @@ export const CheckBox = payload => {
};
export const PickDate = payload => {
const { label, onChange, value, viewAttr } = payload;
const { label, onChange, value, viewAttr, format, labelCol = { span: 8 }, wrapperCol = { span: 16 } } = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
<WeaFormItem label={label} labelCol={labelCol} wrapperCol={wrapperCol}>
<WeaDatePicker
value={value}
viewAttr={viewAttr}
format={format}
onChange={(date) => onChange({ type: label, date })}/>
</WeaFormItem>
);

View File

@ -69,16 +69,6 @@ export default class UserSure extends React.Component {
<WeaBrowser
isSingle={false}
value={key === "departmentIds" ? departmentIds : positionIds}
// tabs={key === "departmentIds" ? [
// {
// dataParams: { list: "1" },
// isSearch: true,
// key: "1",
// name: "按列表",
// selected: false,
// showOrder: 0
// }
// ] : null}
type={key === "departmentIds" ? 57 : 278}
onChange={(val) => {
this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } });

View File

@ -0,0 +1,178 @@
/*
* Author: 黎永顺
* name: 新增数据采集项
* Description:
*/
import React, { Component } from "react";
import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom";
import { getSearchs } from "../../util";
import { Select } from "../ruleConfig";
import { PickDate } from "../appConfig";
import "./index.less";
class AddItems extends Component {
constructor(props) {
super(props);
this.state = {
baseInfo: {
taxablePeriod: "",
taxAgentor: "",
employee: "",
personArea: "",
username: "",
idcard: ""
}
};
}
render() {
const { taxAgentOption = [], form, condition = [], isCum } = this.props;
const { baseInfo } = this.state;
const items = [
{
com: PickDate({
label: "税款所属期",
viewAttr: 3,
labelCol: { span: 6 },
wrapperCol: { span: 18 },
format: "YYYY-MM",
value: baseInfo.taxablePeriod,
onChange: (data) => {
this.setState({ baseInfo: { ...baseInfo, taxablePeriod: data.date } });
}
})
},
{
com: Select({
label: "个税扣缴义务人",
viewAttr: 3,
options: taxAgentOption,
value: baseInfo.taxAgentor,
onChange: (data) => {
this.setState({ baseInfo: { ...baseInfo, taxAgentor: data.selected } });
}
})
},
{
com: Browser({
label: "人员",
viewAttr: 3,
onChange: (employee) => {
this.setState({ baseInfo: { ...baseInfo, employee } });
}
})
}
];
const cumSituationitems = [
{
com: PickDate({
label: "税款所属期",
viewAttr: 3,
labelCol: { span: 6 },
wrapperCol: { span: 18 },
format: "YYYY-MM",
value: baseInfo.taxablePeriod,
onChange: (data) => {
this.setState({ baseInfo: { ...baseInfo, taxablePeriod: data.date } });
}
})
},
{
com: Select({
label: "个税扣缴义务人",
viewAttr: 3,
options: taxAgentOption,
value: baseInfo.taxAgentor,
onChange: (data) => {
this.setState({ baseInfo: { ...baseInfo, taxAgentor: data.selected } });
}
})
},
{
com: Select({
label: "人员范围",
viewAttr: 3,
options: [
{ key: "ORGANIZATION", showname: "内部人员" }, { key: "EXT_EMPLOYEE", showname: "非系统人员" }],
value: baseInfo.personArea,
onChange: (data) => {
this.setState({ baseInfo: { ...baseInfo, personArea: data.selected } });
}
})
}
];
const insider = [{
com: Browser({
label: "人员",
viewAttr: 3,
onChange: (employee) => {
this.setState({ baseInfo: { ...baseInfo, employee } });
}
})
}];
const noSysPerson = [
{
com: InputCus({
label: "姓名",
viewAttr: 2,
onChange: (username) => {
this.setState({ baseInfo: { ...baseInfo, username } });
}
})
},
{
com: InputCus({
label: "身份证号码",
viewAttr: 3,
onChange: (idcard) => {
this.setState({ baseInfo: { ...baseInfo, idcard } });
}
})
}
];
return (
<div className="addItemsWrapper">
<WeaSearchGroup
title="基础信息"
items={!isCum ? items : baseInfo.personArea === "ORGANIZATION" ? [...cumSituationitems, ...insider] : baseInfo.personArea === "EXT_EMPLOYEE" ? [...cumSituationitems, ...noSysPerson]: cumSituationitems}
needTigger showGroup center/>
{
getSearchs(form, condition, 2)
}
<Tips><span>若此员工数据已存在在同期列表中则当前数据保存后会覆盖列表数据</span></Tips>
</div>
);
}
}
export default AddItems;
export const Browser = payload => {
const { label, onChange, viewAttr = 3 } = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaBrowser
viewAttr={viewAttr}
type={1}
onChange={onChange}/>
</WeaFormItem>
);
};
export const InputCus = payload => {
const { label, onChange, value, viewAttr = 3 } = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInput value={value} onChange={onChange} viewAttr={viewAttr}/>
</WeaFormItem>
);
};
export const Tips = payload => {
const { children } = payload;
return (
<div className="tipWrapper">
<div className="title">小提示</div>
<div className="content">{children}</div>
</div>
);
};

View File

@ -1,148 +1,220 @@
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',
}
]
{
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'
}
]
{
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 dataSource = [];
export const dataCollectCondition = [
{
items: [
{
conditionType: "INPUT",
domkey: ["addUpChildEducation"],
fieldcol: 14,
label: "累计子女教育",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpContinuingEducation"],
fieldcol: 14,
label: "累计继续教育",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpHousingLoanInterest"],
fieldcol: 14,
label: "累计住房贷款利息",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpHousingRent"],
fieldcol: 14,
label: "累计住房租金",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpSupportElderly"],
fieldcol: 14,
label: "累计赡养老人",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpIllnessMedical"],
fieldcol: 14,
label: "累计大病医疗",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpInfantCare"],
fieldcol: 14,
label: "累计婴幼儿照护",
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: '数据采集',
defaultshow: true
}
];

View File

@ -1,17 +1,18 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { Button, Col, Dropdown, Menu, message, Row } from "antd";
import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd";
import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
import moment from "moment";
import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import ImportModal from "../../../components/importModal";
import { modalColumns } from "./columns";
import { dataCollectCondition, modalColumns } from "./columns";
import { optionAddAll } from "../../../util/options";
import SlideModalTitle from "../../../components/slideModalTitle";
import EditSlideContent from "./components/editSlideContent";
import AddItems from "../addItems";
import "./index.less";
import SlideModalTitle from "../../../components/slideModalTitle";
import EditSlideContent from "./editSlideContent";
@inject("cumDeductStore", "taxAgentStore")
@observer
@ -19,6 +20,7 @@ export default class CumDeduct extends React.Component {
constructor(props) {
super(props);
this.state = {
addVisible: false,
value: "",
selectedKey: [],
slideSelectedKey: [], //详情表格的选中项
@ -37,9 +39,10 @@ export default class CumDeduct extends React.Component {
componentWillMount() {
// 初始化渲染页面
const {
cumDeductStore: { doInit },
cumDeductStore: { doInit, addForm },
taxAgentStore: { fetchTaxAgentOption, getTaxAgentSelectListAsAdmin }
} = this.props;
addForm.initFormFields(dataCollectCondition);
doInit({ declareMonth: [this.state.monthValue], taxAgentId: "" });
getTaxAgentSelectListAsAdmin();
fetchTaxAgentOption().then((res) => {
@ -264,14 +267,14 @@ export default class CumDeduct extends React.Component {
}
render() {
const { modalParam, slideSelectedKey, monthValue, taxAgentId } = this.state;
const { modalParam, slideSelectedKey, monthValue, taxAgentId, addVisible } = this.state;
const { cumDeductStore, taxAgentStore } = this.props;
const {
loading,
dataSource,
columns,
pageObj,
hasRight,
addForm,
form,
condition,
tableStore,
@ -298,10 +301,6 @@ export default class CumDeduct extends React.Component {
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
if (!hasRight && !loading) {
// 无权限处理
return renderNoright();
}
const rightMenu = [
// 右键菜单
@ -335,14 +334,8 @@ export default class CumDeduct extends React.Component {
};
const handleButtonClick = () => {
// const {
// cumDeductStore: { exportCumDeductList },
// } = this.props;
// exportCumDeductList();
const { selectedKey } = this.state;
const url = `${window.location
.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
.taxAgentId == "All"
.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${this.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All"
? ""
: this.state.taxAgentId}`;
window.open(url, "_self");
@ -356,15 +349,10 @@ export default class CumDeduct extends React.Component {
const url = `${window.location
.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${this.state.selectedKey.join(
","
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state
.taxAgentId == "All"
)}&declareMonth=${this.state.monthValue}&taxAgentId=${this.state.taxAgentId == "All"
? ""
: this.state.taxAgentId}`;
window.open(url, "_self");
// const {
// cumDeductStore: { exportCumDeductList },
// } = this.props;
// exportCumDeductList(this.state.selectedKey.join(","));
};
const handleBtnImport = () => {
@ -392,6 +380,25 @@ export default class CumDeduct extends React.Component {
}
type="ghost">
导出全部
</Dropdown.Button>,
<Button
type="primary"
onClick={() => {
this.setState({
addVisible: true
});
}}>
新建
</Button>,
<Dropdown.Button
onClick={handleButtonClick}
overlay={
<Menu onClick={handleMenuClick}>
<Menu.Item key="1">删除所选</Menu.Item>
</Menu>
}
type="ghost">
一键清空
</Dropdown.Button>
];
@ -497,7 +504,9 @@ export default class CumDeduct extends React.Component {
return { ...item, width: 150 };
}
});
if (_.isEmpty(newColumns)) {
return renderLoading();
}
return (
<div className="cumDeductWrapper">
<WeaRightMenu
@ -509,11 +518,12 @@ export default class CumDeduct extends React.Component {
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={false} // 是否显示下拉按钮
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
buttons={showOperateBtn ? btns : []}>
buttons={showOperateBtn ? btns : []}
>
<div className="weaTabWrapper">
<WeaTab
searchType={["base", "advanced"]} // base基础搜索框 advanced显示高级搜索按钮
searchsBasePlaceHolder={"请输入姓名"}
searchsBasePlaceHolder="请输入姓名"
showSearchAd={showSearchAd} // 是否展开高级搜索面板
setShowSearchAd={(bool) => setShowSearchAd(bool)} //高级搜索面板受控
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
@ -573,37 +583,59 @@ export default class CumDeduct extends React.Component {
/>
)}
{slideVisiable && (
{(slideVisiable || addVisible) && (
<WeaSlideModal
className="slideOuterWrapper"
visible={slideVisiable}
visible={slideVisiable || addVisible}
top={0}
width={60}
height={100}
direction={"right"}
measure={"%"}
direction="right"
measure="%"
title={
<SlideModalTitle
subtitle={"累计专项附加扣除记录"}
subtitle={addVisible ? "新建" : "累计专项附加扣除记录"}
onSave={() => {
this.state.currentOperate == "add" ? doSave() : doUpdate();
const { baseInfo } = this.addItemRef.state;
const bool = _.every(baseInfo, v => !_.isEmpty(v));
if (!bool) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
console.log(baseInfo);
}}
editable={false}
editable={!!addVisible}
showOperateBtn={showOperateBtn}
customOperate={showOperateBtn ? renderBtns() : []}
customOperate={(showOperateBtn && !addVisible) ? renderBtns() : []}
/>
}
content={
<EditSlideContent
slideSelectedKey={slideSelectedKey}
onChangeSlideSelectKey={(val) =>
this.setState({ slideSelectedKey: val })
}
/>
addVisible ?
<AddItems ref={(dom) => this.addItemRef = dom} taxAgentOption={taxAgentOption} form={addForm}
condition={dataCollectCondition}/> :
<EditSlideContent
slideSelectedKey={slideSelectedKey}
onChangeSlideSelectKey={(val) =>
this.setState({ slideSelectedKey: val })
}
/>
}
onClose={() => setSlideVisiable(false)}
onClose={() => {
setSlideVisiable(false);
this.setState({
addVisible: false
});
}}
showMask={true}
closeMaskOnClick={() => setSlideVisiable(false)}
closeMaskOnClick={() => {
setSlideVisiable(false);
this.setState({
addVisible: false
});
}}
/>
)}
</div>

View File

@ -1,194 +1,293 @@
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',
}
]
{
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: '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',
}
{
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: [
{
conditionType: "INPUT",
domkey: ["addUpIncome"],
fieldcol: 14,
label: "累计收入额",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpSubtraction"],
fieldcol: 14,
label: "累计减除费用",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpSocialSecurityTotal"],
fieldcol: 14,
label: "累计社保个人合计",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpAccumulationFundTotal"],
fieldcol: 14,
label: "累计公积金个人合计",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpEnterpriseAndOther"],
fieldcol: 14,
label: "累计企业(职业)年金及其他福利",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpOtherDeduction"],
fieldcol: 14,
label: "累计其他免税扣除",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpTaxExemptIncome"],
fieldcol: 14,
label: "累计免税收入",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpAllowedDonation"],
fieldcol: 14,
label: "累计准予扣除的捐赠额",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpTaxSavings"],
fieldcol: 14,
label: "累计减免税额",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["addUpAdvanceTax"],
fieldcol: 14,
label: "累计已预扣预缴税额",
labelcol: 8,
value: "",
viewAttr: 2
},
],
title: "数据采集",
defaultshow: true
}
];

View File

@ -1,17 +1,17 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { Button, Col, Dropdown, Menu, message, Row } from "antd";
import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd";
import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
import moment from "moment";
import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import ImportModal from "../../../components/importModal";
import { modalColumns } from "./columns";
import { dataCollectCondition, modalColumns } from "./columns";
import { optionAddAll } from "../../../util/options";
import "./index.less";
import SlideModalTitle from "../../../components/slideModalTitle";
import EditSlideContent from "./editSlideContent";
import AddItems from "../addItems";
import "./index.less";
@inject("cumSituationStore", "taxAgentStore")
@ -20,6 +20,7 @@ export default class CumSituation extends React.Component {
constructor(props) {
super(props);
this.state = {
addVisible: false,
value: "",
selectedKey: [],
slideSelectedKey: [], //详情表格的选中项
@ -36,9 +37,10 @@ export default class CumSituation extends React.Component {
componentWillMount() {
// 初始化渲染页面
const {
cumSituationStore: { doInit },
cumSituationStore: { doInit, addForm },
taxAgentStore: { fetchTaxAgentOption }
} = this.props;
addForm.initFormFields(dataCollectCondition);
doInit({ year: this.state.monthValue, taxAgentId: "" });
fetchTaxAgentOption().then(() => {
this.setState({
@ -242,7 +244,7 @@ export default class CumSituation extends React.Component {
render() {
const { cumSituationStore, taxAgentStore } = this.props;
const { slideSelectedKey } = this.state;
const { slideSelectedKey, addVisible } = this.state;
const {
loading,
dataSource,
@ -250,6 +252,7 @@ export default class CumSituation extends React.Component {
pageObj,
hasRight,
form,
addForm,
condition,
tableStore,
showSearchAd,
@ -275,11 +278,6 @@ export default class CumSituation extends React.Component {
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const { modalParam, monthValue, taxAgentId } = this.state;
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
if (!hasRight && !loading) {
// 无权限处理
return renderNoright();
}
const rightMenu = [
// 右键菜单
// {
@ -373,6 +371,25 @@ export default class CumSituation extends React.Component {
}
type="ghost">
导出全部
</Dropdown.Button>,
<Button
type="primary"
onClick={() => {
this.setState({
addVisible: true
});
}}>
新建
</Button>,
<Dropdown.Button
onClick={handleButtonClick}
overlay={
<Menu onClick={handleMenuClick}>
<Menu.Item key="1">删除所选</Menu.Item>
</Menu>
}
type="ghost">
一键清空
</Dropdown.Button>
];
@ -476,13 +493,15 @@ export default class CumSituation extends React.Component {
return { ...item, width: 150 };
}
});
if (_.isEmpty(newColumns)) {
return renderLoading();
}
return (
<div className="cumDeductWrapper">
<WeaRightMenu datas={rightMenu}>
<WeaTop
title="往期累计情况(工资、薪金)" // 文字
icon={<i className="icon-coms-fa" />} // 左侧图标
icon={<i className="icon-coms-fa"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={false} // 是否显示下拉按钮
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
@ -542,36 +561,62 @@ export default class CumSituation extends React.Component {
this.handleCancel();
}}
/>}
{slideVisiable &&
{(slideVisiable || addVisible) &&
<WeaSlideModal
className="slideOuterWrapper"
visible={slideVisiable}
visible={slideVisiable || addVisible}
top={0}
width={60}
height={100}
direction={"right"}
measure={"%"}
direction="right"
measure="%"
title={
<SlideModalTitle
subtitle={"往期累计情况(工资、薪金)记录"}
subtitle={addVisible ? "新建" : "往期累计情况(工资、薪金)记录"}
onSave={() => {
this.state.currentOperate == "add" ? doSave() : doUpdate();
const { baseInfo } = this.addItemRef.state;
const bool = _.every(baseInfo, v => !_.isEmpty(v));
if (!bool) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
console.log(baseInfo);
}}
editable={false}
editable={!!addVisible}
showOperateBtn={showOperateBtn}
customOperate={showOperateBtn ? renderBtns() : []}
customOperate={(showOperateBtn && !addVisible) ? renderBtns() : []}
/>
}
content={
<EditSlideContent
slideSelectedKey={slideSelectedKey}
onChangeSlideSelectKey={val =>
this.setState({ slideSelectedKey: val })}
/>
addVisible ?
<AddItems
ref={(dom) => this.addItemRef = dom}
taxAgentOption={taxAgentOption}
form={addForm}
isCum
condition={dataCollectCondition}/> :
<EditSlideContent
slideSelectedKey={slideSelectedKey}
onChangeSlideSelectKey={val =>
this.setState({ slideSelectedKey: val })}
/>
}
onClose={() => setSlideVisiable(false)}
onClose={() => {
setSlideVisiable(false);
this.setState({
addVisible: false
});
}}
showMask={true}
closeMaskOnClick={() => setSlideVisiable(false)}
closeMaskOnClick={() => {
setSlideVisiable(false);
this.setState({
addVisible: false
});
}}
/>}
</div>
);

View File

@ -0,0 +1,21 @@
.tipWrapper{
display: flex;
flex-direction: column;
margin: 0 25px;
border: 1px solid #e5e5e5;
.title{
border-bottom: 1px solid #e5e5e5;
height: 40px;
line-height: 40px;
padding-left: 16px;
background: #f6f6f6;
font-size: 14px;
}
.content{
width: 100%;
display: flex;
flex-direction: column;
padding: 10px 16px;
color: #999;
}
}

View File

@ -1,132 +1,177 @@
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',
}
]
{
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: 'businessHealthyInsurance',
key: 'businessHealthyInsurance',
},
{
title: "税延养老保险",
dataIndex: 'taxDelayEndowmentInsurance',
key: 'taxDelayEndowmentInsurance',
},
{
title: "其他",
dataIndex: 'otherDeduction',
key: 'otherDeduction',
},
{
title: "准予扣除的捐赠额",
dataIndex: 'deductionAllowedDonation',
key: 'deductionAllowedDonation',
}
]
{
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 dataSource = [];
export const dataCollectCondition = [
{
items: [
{
conditionType: "INPUT",
domkey: ["businessHealthyInsurance"],
fieldcol: 14,
label: "商业健康保险",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["taxDelayEndowmentInsurance"],
fieldcol: 14,
label: "税延养老保险",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["otherDeduction"],
fieldcol: 14,
label: "其他",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["deductionAllowedDonation"],
fieldcol: 14,
label: "准予扣除的捐赠额",
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: "数据采集",
defaultshow: true
}
];

View File

@ -1,17 +1,17 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { Button, Col, Dropdown, Menu, message, Row } from "antd";
import { Button, Col, Dropdown, Menu, message, Modal, Row } from "antd";
import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
import moment from "moment";
import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import ImportModal from "../../../components/importModal";
import { modalColumns } from "./columns";
import "./index.less";
import { dataCollectCondition, modalColumns } from "./columns";
import AddItems from "../addItems";
import SlideModalTitle from "../../../components/slideModalTitle";
import EditSlideContent from "./editSlideContent";
import { optionAddAll } from "../../../util/options";
import "./index.less";
@inject("otherDeductStore", "taxAgentStore")
@ -20,6 +20,7 @@ export default class OtherDeduct extends React.Component {
constructor(props) {
super(props);
this.state = {
addVisible: false,
value: "",
selectedKey: [],
slideSelectedKey: [], //详情表格的选中项
@ -36,9 +37,10 @@ export default class OtherDeduct extends React.Component {
componentWillMount() {
// 初始化渲染页面
const {
otherDeductStore: { doInit },
otherDeductStore: { doInit, addForm },
taxAgentStore: { fetchTaxAgentOption }
} = this.props;
addForm.initFormFields(dataCollectCondition);
doInit({ declareMonth: [this.state.monthValue], taxAgentId: "" });
fetchTaxAgentOption().then(() => {
this.setState({
@ -251,7 +253,8 @@ export default class OtherDeduct extends React.Component {
doSearch,
setShowSearchAd,
previewImport,
importFile
importFile,
addForm
} = otherDeductStore;
const { taxAgentOption, showOperateBtn } = taxAgentStore;
const {
@ -267,13 +270,9 @@ export default class OtherDeduct extends React.Component {
setPageObj
} = otherDeductStore;
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || [];
const { modalParam, monthValue, taxAgentId, slideSelectedKey } = this.state;
const { modalParam, monthValue, taxAgentId, slideSelectedKey, addVisible } = this.state;
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
if (!hasRight && !loading) {
// 无权限处理
return renderNoright();
}
const rightMenu = [
// 右键菜单
@ -364,6 +363,25 @@ export default class OtherDeduct extends React.Component {
}
type="ghost">
导出全部
</Dropdown.Button>,
<Button
type="primary"
onClick={() => {
this.setState({
addVisible: true
});
}}>
新建
</Button>,
<Dropdown.Button
onClick={handleButtonClick}
overlay={
<Menu onClick={handleMenuClick}>
<Menu.Item key="1">删除所选</Menu.Item>
</Menu>
}
type="ghost">
一键清空
</Dropdown.Button>
];
@ -468,6 +486,9 @@ export default class OtherDeduct extends React.Component {
return { ...item };
}
});
if (_.isEmpty(newColumns)) {
return renderLoading();
}
return (
<div className="cumDeductWrapper">
@ -538,36 +559,58 @@ export default class OtherDeduct extends React.Component {
this.handleCancel();
}}
/>}
{slideVisiable &&
{(slideVisiable || addVisible) &&
<WeaSlideModal
className="slideOuterWrapper"
visible={slideVisiable}
visible={slideVisiable || addVisible}
top={0}
width={60}
height={100}
direction={"right"}
measure={"%"}
direction="right"
measure="%"
title={
<SlideModalTitle
subtitle={"其他免税扣除记录"}
subtitle={addVisible ? "新建" : "其他免税扣除记录"}
onSave={() => {
this.state.currentOperate == "add" ? doSave() : doUpdate();
const { baseInfo } = this.addItemRef.state;
const bool = _.every(baseInfo, v => !_.isEmpty(v));
if (!bool) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
console.log(baseInfo);
}}
editable={false}
editable={!!addVisible}
showOperateBtn={showOperateBtn}
customOperate={showOperateBtn ? renderBtns() : []}
customOperate={(showOperateBtn && !addVisible) ? renderBtns() : []}
/>
}
content={
<EditSlideContent
slideSelectedKey={slideSelectedKey}
onChangeSlideSelectKey={val =>
this.setState({ slideSelectedKey: val })}
/>
addVisible ?
<AddItems ref={(dom) => this.addItemRef = dom} taxAgentOption={taxAgentOption} form={addForm}
condition={dataCollectCondition}/> :
<EditSlideContent
slideSelectedKey={slideSelectedKey}
onChangeSlideSelectKey={val =>
this.setState({ slideSelectedKey: val })}
/>
}
onClose={() => setSlideVisiable(false)}
onClose={() => {
setSlideVisiable(false);
this.setState({
addVisible: false
});
}}
showMask={true}
closeMaskOnClick={() => setSlideVisiable(false)}
closeMaskOnClick={() => {
setSlideVisiable(false);
this.setState({
addVisible: false
});
}}
/>}
</div>
);

View File

@ -277,11 +277,11 @@ class Index extends Component {
export default Index;
const Select = payload => {
const { label, onChange, value, options = [] } = payload;
export const Select = payload => {
const { label, onChange, value, options = [], viewAttr=3 } = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaSelect options={[{ key: "", showname: "" }, ...options]} viewAttr={3} value={value}
<WeaSelect options={[{ key: "", showname: "" }, ...options]} viewAttr={viewAttr} value={value}
onChange={(selected) => onChange({ type: label, selected })}/>
</WeaFormItem>
);

View File

@ -10,7 +10,8 @@ const { TableStore } = WeaTableNew;
export class CumDeductStore {
@observable tableStore = new TableStore(); // new table
@observable slideTableStore = new TableStore();
@observable form = new WeaForm(); // nrew 一个form
@observable form = new WeaForm(); // new 一个form
@observable addForm = new WeaForm(); // 新增form
@observable condition = []; // 存储后台得到的form数据
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示

View File

@ -10,7 +10,8 @@ const { TableStore } = WeaTableNew;
export class CumSituationStore {
@observable tableStore = new TableStore(); // new table
@observable slideTableStore = new TableStore();
@observable form = new WeaForm(); // nrew 一个form
@observable form = new WeaForm(); // new 一个form
@observable addForm = new WeaForm(); // 新增form
@observable condition = []; // 存储后台得到的form数据
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示

View File

@ -11,7 +11,8 @@ const { TableStore } = WeaTableNew;
export class OtherDeductStore {
@observable tableStore = new TableStore(); // new table
@observable slideTableStore = new TableStore();
@observable form = new WeaForm(); // nrew 一个form
@observable form = new WeaForm(); // new 一个form
@observable addForm = new WeaForm(); // 新增form
@observable condition = []; // 存储后台得到的form数据
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示