Merge branch 'feature/v2-数据采集-1024' into feature/v2-专项附加扣除-1103
This commit is contained in:
commit
b2164dbb46
|
|
@ -1,4 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from '../util/request';
|
||||
|
||||
//数据采集-累计专项附加扣除列表
|
||||
export const getCumDeductList = (params) => {
|
||||
|
|
@ -100,3 +101,25 @@ export const importCumDeductPreview = (params) => {
|
|||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
||||
//新增累计专项附加扣除
|
||||
export const createAddUpDeduction = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpDeduction/createAddUpDeduction', params);
|
||||
}
|
||||
//查看信息
|
||||
export const getAddUpDeduction = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpDeduction/getAddUpDeduction', params);
|
||||
}
|
||||
//编辑累计专项附加扣除
|
||||
export const editAddUpDeduction = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpDeduction/editAddUpDeduction', params);
|
||||
}
|
||||
//批量删除累计专项附加扣除
|
||||
export const deleteSelectAddUpDeduction = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpDeduction/deleteSelectAddUpDeduction', params);
|
||||
}
|
||||
//一键清空累计专项附加扣除
|
||||
export const deleteAllAddUpDeduction = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpDeduction/deleteAllAddUpDeduction', params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from '../util/request';
|
||||
|
||||
//数据采集-累计情况列表
|
||||
export const getCumSituationList = (params) => {
|
||||
|
|
@ -100,3 +101,23 @@ export const importCumSituationPreview = (params) => {
|
|||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//新建往期累计情况
|
||||
export const createAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/createAddUpSituation', params);
|
||||
}
|
||||
//编辑往期累计情况
|
||||
export const editAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/editAddUpSituation', params);
|
||||
}
|
||||
//删除所选往期累计情况
|
||||
export const deleteSelectAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteSelectAddUpSituation', params);
|
||||
}
|
||||
//一键清空往期累计情况
|
||||
export const deleteAllAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params);
|
||||
}
|
||||
//查看信息
|
||||
export const getAddUpSituation = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/addUpSituation/getAddUpSituation', params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from '../util/request';
|
||||
|
||||
//数据采集-其他免税扣除列表
|
||||
export const getOtherDeductList = (params) => {
|
||||
|
|
@ -105,3 +106,24 @@ export const importOtherDeductionPreview = (params) => {
|
|||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
//新增其他免税扣除
|
||||
export const createData = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/otherDeduction/createData', params);
|
||||
}
|
||||
//查看信息
|
||||
export const getData = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/otherDeduction/getData', params);
|
||||
}
|
||||
//编辑其他免税扣除
|
||||
export const editData = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/otherDeduction/editData', params);
|
||||
}
|
||||
//批量删除其他免税扣除
|
||||
export const deleteSelectData = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/otherDeduction/deleteSelectData', params);
|
||||
}
|
||||
//一键清空其他免税扣除
|
||||
export const deleteAllData = (params) => {
|
||||
return postFetch('/api/bs/hrmsalary/otherDeduction/deleteAllData', params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 } });
|
||||
|
|
|
|||
|
|
@ -0,0 +1,211 @@
|
|||
/*
|
||||
* 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: {
|
||||
declareMonth: "",
|
||||
taxAgentId: "",
|
||||
taxAgentName: "",
|
||||
employeeId: "",
|
||||
employeeName: "",
|
||||
personArea: "ORGANIZATION",
|
||||
username: "",
|
||||
idcard: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.editId !== this.props.editId) {
|
||||
this.setState({
|
||||
baseInfo: {
|
||||
...this.state.baseInfo,
|
||||
declareMonth: nextProps.editId.declareMonth,
|
||||
taxAgentId: nextProps.editId.taxAgentId,
|
||||
taxAgentName: nextProps.editId.taxAgentName,
|
||||
employeeId: nextProps.editId.employeeId,
|
||||
employeeName: nextProps.editId.username,
|
||||
}
|
||||
});
|
||||
const fields= _.map(nextProps.condition[0].items, it =>{
|
||||
return it.domkey[0]
|
||||
})
|
||||
fields.map(item => {
|
||||
nextProps.form.updateFields({
|
||||
[item]: nextProps.editId[item] || ''
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { taxAgentOption = [], form, condition = [], isCum, editId } = this.props;
|
||||
const { baseInfo } = this.state;
|
||||
const items = [
|
||||
{
|
||||
com: PickDate({
|
||||
label: "税款所属期",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 18 },
|
||||
format: "YYYY-MM",
|
||||
value: baseInfo.declareMonth,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, declareMonth: data.date } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Select({
|
||||
label: "个税扣缴义务人",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
options: taxAgentOption,
|
||||
value: baseInfo.taxAgentId,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, taxAgentId: data.selected, taxAgentName: data.showName } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Browser({
|
||||
label: "人员",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
value: baseInfo.employeeId,
|
||||
valueSpan: baseInfo.employeeName,
|
||||
onChange: ({ids, names}) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
const cumSituationitems = [
|
||||
{
|
||||
com: PickDate({
|
||||
label: "税款所属期",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 18 },
|
||||
format: "YYYY-MM",
|
||||
value: baseInfo.declareMonth,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, declareMonth: data.date } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Select({
|
||||
label: "个税扣缴义务人",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
options: taxAgentOption,
|
||||
value: baseInfo.taxAgentId,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, taxAgentId: data.selected, taxAgentName: data.showName } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Select({
|
||||
label: "人员范围",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
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: _.isEmpty(editId) ? 3 : 1,
|
||||
value: baseInfo.employeeId,
|
||||
valueSpan: baseInfo.employeeName,
|
||||
onChange: ({ids, names}) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
||||
}
|
||||
})
|
||||
}];
|
||||
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, value, valueSpan } = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
viewAttr={viewAttr}
|
||||
type={1}
|
||||
value={value}
|
||||
valueSpan={valueSpan}
|
||||
onChange={(ids, names)=> onChange({ids, names})}/>
|
||||
</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>
|
||||
);
|
||||
};
|
||||
|
|
@ -159,8 +159,8 @@ export default class Attendance extends React.Component {
|
|||
handleFinish() {
|
||||
this.setState({ modalVisiable: false });
|
||||
const { attendanceStore: { getAttendanceList, step } } = this.props;
|
||||
if (step == 2) {
|
||||
this.getAttendanceList({ ...this.pageInfo });
|
||||
if (step === 2) {
|
||||
getAttendanceList({ ...this.pageInfo });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -829,7 +829,7 @@ export default class Attendance extends React.Component {
|
|||
setFieldSettingAttendList(value);
|
||||
}}
|
||||
items={fieldSettingAttendList}
|
||||
title={"考勤模块"}
|
||||
title="考勤模块"
|
||||
/>
|
||||
<SelectItemsWrapper
|
||||
onChange={value => {
|
||||
|
|
@ -886,7 +886,7 @@ export default class Attendance extends React.Component {
|
|||
className="slideOuterWrapper"
|
||||
visible={slideVisiable}
|
||||
top={0}
|
||||
width={40}
|
||||
width={60}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
import React from "react";
|
||||
import { Row, Col, Table, DatePicker } from "antd";
|
||||
import { Col, DatePicker, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import {
|
||||
WeaInput,
|
||||
WeaTextarea,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaTable,
|
||||
} from "ecCom";
|
||||
import { WeaTable } from "ecCom";
|
||||
import "./editSlideContent.less";
|
||||
import moment from "moment";
|
||||
|
||||
|
|
@ -21,7 +15,7 @@ let emptyItem = {
|
|||
taxableIncomeLl: "0.00",
|
||||
taxableIncomeUl: "0.00",
|
||||
taxRate: "0.00",
|
||||
taxDeduction: "0.00",
|
||||
taxDeduction: "0.00"
|
||||
};
|
||||
|
||||
@inject("cumDeductStore", "taxAgentStore")
|
||||
|
|
@ -34,21 +28,21 @@ export default class EditSlideContent extends React.Component {
|
|||
startDate: "",
|
||||
endDate: "",
|
||||
editable:
|
||||
this.props.editable === undefined ? "true" : this.props.editable,
|
||||
this.props.editable === undefined ? "true" : this.props.editable
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
// 初始化渲染页面
|
||||
const {
|
||||
taxAgentStore: { fetchTaxAgentOption },
|
||||
taxAgentStore: { fetchTaxAgentOption }
|
||||
} = this.props;
|
||||
fetchTaxAgentOption();
|
||||
}
|
||||
|
||||
addItem() {
|
||||
const {
|
||||
taxRateStore: { setDataSource },
|
||||
taxRateStore: { setDataSource }
|
||||
} = this.props;
|
||||
let dataSource = [...this.props.taxRateStore.dataSource];
|
||||
let indexNum = 1;
|
||||
|
|
@ -78,7 +72,7 @@ export default class EditSlideContent extends React.Component {
|
|||
declareMonth.push(endDate);
|
||||
}
|
||||
let item = {
|
||||
taxAgentId: taxAgentId,
|
||||
taxAgentId: taxAgentId
|
||||
};
|
||||
if (declareMonth.length != 0) {
|
||||
item.declareMonth = declareMonth;
|
||||
|
|
@ -93,7 +87,7 @@ export default class EditSlideContent extends React.Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
taxAgentStore: { taxAgentOption },
|
||||
taxAgentStore: { taxAgentOption }
|
||||
} = this.props;
|
||||
const { cumDeductStore } = this.props;
|
||||
const {
|
||||
|
|
@ -103,7 +97,7 @@ export default class EditSlideContent extends React.Component {
|
|||
slidePageObj,
|
||||
slideTableDataSource,
|
||||
setSlidePageObj,
|
||||
slideLoading,
|
||||
slideLoading
|
||||
} = cumDeductStore;
|
||||
const { startDate, endDate, taxAgentId } = this.state;
|
||||
|
||||
|
|
@ -118,24 +112,14 @@ export default class EditSlideContent extends React.Component {
|
|||
setSlidePageObj({
|
||||
...slidePageObj,
|
||||
current,
|
||||
pageSize: slidePageObj.pageSize,
|
||||
pageSize: slidePageObj.pageSize
|
||||
});
|
||||
},
|
||||
};
|
||||
const newColumns = _.map([...slideColumns], (item) => {
|
||||
if (item.dataIndex === "declareMonth") {
|
||||
return {
|
||||
...item,
|
||||
width: 120,
|
||||
fixed: "left",
|
||||
};
|
||||
} else {
|
||||
return { ...item };
|
||||
}
|
||||
});
|
||||
};
|
||||
const newColumns = _.map([...slideColumns], (item) => ({ ...item }));
|
||||
const rowSelection = {
|
||||
selectedRowKeys: this.props.slideSelectedKey,
|
||||
onChange: this.onSelectChange,
|
||||
onChange: this.onSelectChange
|
||||
};
|
||||
return (
|
||||
<div className="cumDeductSlide">
|
||||
|
|
@ -144,7 +128,7 @@ export default class EditSlideContent extends React.Component {
|
|||
<span className="username">{currentRecord.username}</span>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<span className="formLabel">申报月份</span>
|
||||
<span className="formLabel">税款所属期</span>
|
||||
<div className="weaRangePickerWrapper">
|
||||
<div className="monthPickerWrapper">
|
||||
<MonthPicker
|
||||
|
|
@ -1,17 +1,19 @@
|
|||
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, Popover, 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 * as API from "../../../apis/cumDeduct";
|
||||
import "./index.less";
|
||||
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import EditSlideContent from "./editSlideContent";
|
||||
|
||||
@inject("cumDeductStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -19,6 +21,9 @@ export default class CumDeduct extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
addVisible: false,
|
||||
editId: {},
|
||||
saveLoading: false,
|
||||
value: "",
|
||||
selectedKey: [],
|
||||
slideSelectedKey: [], //详情表格的选中项
|
||||
|
|
@ -37,9 +42,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) => {
|
||||
|
|
@ -58,7 +64,7 @@ export default class CumDeduct extends React.Component {
|
|||
return (
|
||||
<div className="searchConditionWrapper">
|
||||
<div className="searchConditionItem">
|
||||
<span className="conditionFormLabel">申报月份:</span>
|
||||
<span className="conditionFormLabel">税款所属期:</span>
|
||||
<WeaDatePicker
|
||||
value={monthValue}
|
||||
format="YYYY-MM"
|
||||
|
|
@ -250,7 +256,7 @@ export default class CumDeduct extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
handleSearch() {
|
||||
handleSearch = () => {
|
||||
const { cumDeductStore: { getTableDatas } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
let params = {};
|
||||
|
|
@ -261,17 +267,160 @@ export default class CumDeduct extends React.Component {
|
|||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
getTableDatas(params);
|
||||
}
|
||||
};
|
||||
|
||||
//新功能
|
||||
handleSaveDeduction = (payload) => {
|
||||
const { editId } = this.state;
|
||||
this.setState({ saveLoading: true });
|
||||
if (!_.isEmpty(editId)) {
|
||||
API.editAddUpDeduction({ ...payload, id: editId.id }).then(({ status, errormsg }) => {
|
||||
this.setState({ saveLoading: false });
|
||||
if (status) {
|
||||
message.success("编辑成功");
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
}, () => {
|
||||
const { cumDeductStore: { doSearch, addForm } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
doSearch({
|
||||
declareMonth: [monthValue],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
addForm.resetForm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "编辑失败");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
API.createAddUpDeduction(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ saveLoading: false });
|
||||
if (status) {
|
||||
message.success("新增成功");
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
}, () => {
|
||||
const { cumDeductStore: { doSearch, addForm } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
doSearch({
|
||||
declareMonth: [monthValue],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
addForm.resetForm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "新增失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
deleteSelectAddUpDeduction = () => {
|
||||
const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state;
|
||||
const { cumDeductStore: { doSearch } } = this.props;
|
||||
if (selectedKey.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
declareMonth,
|
||||
ids: selectedKey
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。",
|
||||
onOk: () => {
|
||||
API.deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
doSearch({
|
||||
declareMonth: [declareMonth],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
deleteAllAddUpDeduction = () => {
|
||||
const { monthValue: declareMonth, taxAgentId } = this.state;
|
||||
const { cumDeductStore: { doSearch } } = this.props;
|
||||
const payload = {
|
||||
declareMonth,
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确定清空税款所属期为${declareMonth}的所有累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
|
||||
onOk: () => {
|
||||
API.deleteAllAddUpDeduction(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
doSearch({
|
||||
declareMonth: [declareMonth],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleOperate = ({ key }, row) => {
|
||||
const { monthValue: declareMonth, taxAgentId } = this.state;
|
||||
const { cumDeductStore: { doSearch } } = this.props;
|
||||
if (key === "edit") {
|
||||
this.setState({
|
||||
addVisible: true
|
||||
}, () => {
|
||||
API.getAddUpDeduction({ id: row.id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ editId: data });
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (key === "delete") {
|
||||
const payload = {
|
||||
declareMonth,
|
||||
ids: [row.id]
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的累计专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
|
||||
onOk: () => {
|
||||
API.deleteSelectAddUpDeduction(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
doSearch({
|
||||
declareMonth: [declareMonth],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { modalParam, slideSelectedKey, monthValue, taxAgentId } = this.state;
|
||||
const { modalParam, slideSelectedKey, monthValue, taxAgentId, addVisible, editId, saveLoading } = this.state;
|
||||
const { cumDeductStore, taxAgentStore } = this.props;
|
||||
const {
|
||||
loading,
|
||||
dataSource,
|
||||
columns,
|
||||
pageObj,
|
||||
hasRight,
|
||||
addForm,
|
||||
form,
|
||||
condition,
|
||||
tableStore,
|
||||
|
|
@ -298,10 +447,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 +480,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 +495,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 +526,26 @@ export default class CumDeduct extends React.Component {
|
|||
}
|
||||
type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>,
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
this.setState({
|
||||
addVisible: true,
|
||||
editId: {}
|
||||
}, () => addForm.resetForm());
|
||||
}}>
|
||||
新建
|
||||
</Button>,
|
||||
<Dropdown.Button
|
||||
onClick={this.deleteAllAddUpDeduction}
|
||||
overlay={
|
||||
<Menu onClick={this.deleteSelectAddUpDeduction}>
|
||||
<Menu.Item key="1">删除所选</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
type="ghost">
|
||||
一键清空
|
||||
</Dropdown.Button>
|
||||
];
|
||||
|
||||
|
|
@ -483,13 +637,25 @@ export default class CumDeduct extends React.Component {
|
|||
} else if (item.dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
width: 100,
|
||||
width: 120,
|
||||
fixed: "right",
|
||||
render: (text, record) => (
|
||||
<div className="linkWapper">
|
||||
<a href="javaScript:void(0);" onClick={() => this.onEdit(record)}>
|
||||
查看明细
|
||||
</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleOperate(e, record)}>
|
||||
<Menu.Item key="edit">编辑</Menu.Item>
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
};
|
||||
|
|
@ -497,7 +663,9 @@ export default class CumDeduct extends React.Component {
|
|||
return { ...item, width: 150 };
|
||||
}
|
||||
});
|
||||
|
||||
if (_.isEmpty(newColumns)) {
|
||||
return renderLoading();
|
||||
}
|
||||
return (
|
||||
<div className="cumDeductWrapper">
|
||||
<WeaRightMenu
|
||||
|
|
@ -509,11 +677,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 +742,71 @@ 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 ? (!_.isEmpty(editId) ? "编辑" : "新建") : "累计专项附加扣除记录"}
|
||||
loading={saveLoading}
|
||||
onSave={() => {
|
||||
this.state.currentOperate == "add" ? doSave() : doUpdate();
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v));
|
||||
if (!bool && _.isEmpty(editId)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
}}
|
||||
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}
|
||||
editId={editId}
|
||||
condition={dataCollectCondition}
|
||||
/> :
|
||||
<EditSlideContent
|
||||
slideSelectedKey={slideSelectedKey}
|
||||
onChangeSlideSelectKey={(val) =>
|
||||
this.setState({ slideSelectedKey: val })
|
||||
}
|
||||
/>
|
||||
}
|
||||
onClose={() => setSlideVisiable(false)}
|
||||
onClose={() => {
|
||||
setSlideVisiable(false);
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
});
|
||||
}}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => setSlideVisiable(false)}
|
||||
closeMaskOnClick={() => {
|
||||
setSlideVisiable(false);
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
position: relative;
|
||||
|
||||
.searchConditionWrapper {
|
||||
width: 600px;
|
||||
margin-left: 10px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
|
@ -37,6 +36,11 @@
|
|||
.linkWapper {
|
||||
a {
|
||||
color: #4d7ad8;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
|
|
@ -45,6 +49,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
.moreIconWrapper {
|
||||
.ant-popover-inner {
|
||||
min-width: 106px
|
||||
}
|
||||
|
||||
.ant-popover-inner-content {
|
||||
padding: 0;
|
||||
|
||||
.ant-menu {
|
||||
.ant-menu-item {
|
||||
border-right: none;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
.ant-table-tbody {
|
||||
tr {
|
||||
|
|
@ -56,30 +80,32 @@
|
|||
}
|
||||
}
|
||||
|
||||
.slideOuterWrapper{
|
||||
.wea-slide-modal-title{
|
||||
.slideOuterWrapper {
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.rodal-close{
|
||||
|
||||
.rodal-close {
|
||||
z-index: 99;
|
||||
top: 10px!important;
|
||||
top: 10px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px){
|
||||
.slideOuterWrapper{
|
||||
.reqTopWrapper .wea-new-top-req-title>div:first-child>div{
|
||||
max-width: 100%!important;
|
||||
@media (min-width: 1260px) {
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1060px) and (max-width: 1260px) {
|
||||
.slideOuterWrapper{
|
||||
.reqTopWrapper .wea-new-top-req-title>div:first-child>div{
|
||||
max-width: calc(100% - 96px)!important;
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: calc(100% - 96px) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,194 +1,406 @@
|
|||
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: ["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: ["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
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["addUpInfantCare"],
|
||||
fieldcol: 14,
|
||||
label: "累计婴幼儿照护",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "数据采集",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
||||
export const taxOptions = [
|
||||
{
|
||||
key: "01",
|
||||
showname: "一月",
|
||||
},
|
||||
{
|
||||
key: "02",
|
||||
showname: "二月"
|
||||
},
|
||||
{
|
||||
key: "03",
|
||||
showname: "三月"
|
||||
},
|
||||
{
|
||||
key: "04",
|
||||
showname: "四月"
|
||||
},
|
||||
{
|
||||
key: "05",
|
||||
showname: "五月"
|
||||
},
|
||||
{
|
||||
key: "06",
|
||||
showname: "六月"
|
||||
},
|
||||
{
|
||||
key: "07",
|
||||
showname: "七月"
|
||||
},
|
||||
{
|
||||
key: "08",
|
||||
showname: "八月"
|
||||
},
|
||||
{
|
||||
key: "09",
|
||||
showname: "九月"
|
||||
},
|
||||
{
|
||||
key: "10",
|
||||
showname: "十月"
|
||||
},
|
||||
{
|
||||
key: "11",
|
||||
showname: "十一月"
|
||||
},
|
||||
{
|
||||
key: "12",
|
||||
showname: "十二月"
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
import React from "react";
|
||||
import { Row, Col, Table, DatePicker } from "antd";
|
||||
import { Col, DatePicker, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import {
|
||||
WeaInput,
|
||||
WeaTextarea,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaTable,
|
||||
} from "ecCom";
|
||||
import { slideColumns } from "./columns";
|
||||
import { WeaTable } from "ecCom";
|
||||
import "./editSlideContent.less";
|
||||
import moment from "moment";
|
||||
|
||||
|
|
@ -22,7 +15,7 @@ let emptyItem = {
|
|||
taxableIncomeLl: "0.00",
|
||||
taxableIncomeUl: "0.00",
|
||||
taxRate: "0.00",
|
||||
taxDeduction: "0.00",
|
||||
taxDeduction: "0.00"
|
||||
};
|
||||
|
||||
@inject("cumSituationStore", "taxAgentStore")
|
||||
|
|
@ -35,21 +28,21 @@ export default class EditSlideContent extends React.Component {
|
|||
startDate: "",
|
||||
endDate: "",
|
||||
editable:
|
||||
this.props.editable === undefined ? "true" : this.props.editable,
|
||||
this.props.editable === undefined ? "true" : this.props.editable
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
// 初始化渲染页面
|
||||
const {
|
||||
taxAgentStore: { fetchTaxAgentOption },
|
||||
taxAgentStore: { fetchTaxAgentOption }
|
||||
} = this.props;
|
||||
fetchTaxAgentOption();
|
||||
}
|
||||
|
||||
addItem() {
|
||||
const {
|
||||
taxRateStore: { setDataSource },
|
||||
taxRateStore: { setDataSource }
|
||||
} = this.props;
|
||||
let dataSource = [...this.props.taxRateStore.dataSource];
|
||||
let indexNum = 1;
|
||||
|
|
@ -79,7 +72,7 @@ export default class EditSlideContent extends React.Component {
|
|||
declareMonth.push(endDate);
|
||||
}
|
||||
let item = {
|
||||
taxAgentId: taxAgentId,
|
||||
taxAgentId: taxAgentId
|
||||
};
|
||||
if (declareMonth.length != 0) {
|
||||
item.taxYearMonth = declareMonth;
|
||||
|
|
@ -94,7 +87,7 @@ export default class EditSlideContent extends React.Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
taxAgentStore: { taxAgentOption },
|
||||
taxAgentStore: { taxAgentOption }
|
||||
} = this.props;
|
||||
const { cumSituationStore } = this.props;
|
||||
const {
|
||||
|
|
@ -104,7 +97,7 @@ export default class EditSlideContent extends React.Component {
|
|||
slidePageObj,
|
||||
slideTableDataSource,
|
||||
setSlidePageObj,
|
||||
slideLoading,
|
||||
slideLoading
|
||||
} = cumSituationStore;
|
||||
const { startDate, endDate, taxAgentId } = this.state;
|
||||
|
||||
|
|
@ -119,24 +112,14 @@ export default class EditSlideContent extends React.Component {
|
|||
setSlidePageObj({
|
||||
...slidePageObj,
|
||||
current,
|
||||
pageSize: slidePageObj.pageSize,
|
||||
pageSize: slidePageObj.pageSize
|
||||
});
|
||||
},
|
||||
};
|
||||
const newColumns = _.map([...slideColumns], (item) => {
|
||||
if (item.dataIndex === "declareMonth") {
|
||||
return {
|
||||
...item,
|
||||
width: 120,
|
||||
fixed: "left",
|
||||
};
|
||||
} else {
|
||||
return { ...item };
|
||||
}
|
||||
});
|
||||
};
|
||||
const newColumns = _.map([...slideColumns], (item) => ({ ...item }));
|
||||
const rowSelection = {
|
||||
selectedRowKeys: this.props.slideSelectedKey,
|
||||
onChange: this.onSelectChange,
|
||||
onChange: this.onSelectChange
|
||||
};
|
||||
return (
|
||||
<div className="cumDeductSlide">
|
||||
|
|
@ -213,7 +196,7 @@ export default class EditSlideContent extends React.Component {
|
|||
dataSource={slideTableDataSource}
|
||||
pagination={pagination}
|
||||
loading={slideLoading}
|
||||
scroll={{ x: newColumns ? newColumns.length * 150 : 900}}
|
||||
scroll={{ x: newColumns ? newColumns.length * 150 : 900 }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,18 +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, Popover, 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, taxOptions } from "./columns";
|
||||
import { optionAddAll } from "../../../util/options";
|
||||
import "./index.less";
|
||||
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import EditSlideContent from "./editSlideContent";
|
||||
|
||||
import AddItems from "../addItems";
|
||||
import * as API from "../../../apis/cumSituation";
|
||||
import "./index.less";
|
||||
|
||||
@inject("cumSituationStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -20,12 +20,16 @@ export default class CumSituation extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
saveLoading: false,
|
||||
addVisible: false,
|
||||
editId: {},
|
||||
value: "",
|
||||
selectedKey: [],
|
||||
slideSelectedKey: [], //详情表格的选中项
|
||||
visiable: false,
|
||||
inited: false,
|
||||
monthValue: moment(new Date()).format("YYYY"),
|
||||
taxYearMonth: moment(new Date()).month() + 1 > 10 ? (moment(new Date()).month() + 1) + "" : "0" + (moment(new Date()).month() + 1),
|
||||
taxAgentId: "All",
|
||||
modalParam: {
|
||||
taxYearMonth: ""
|
||||
|
|
@ -36,10 +40,15 @@ export default class CumSituation extends React.Component {
|
|||
componentWillMount() {
|
||||
// 初始化渲染页面
|
||||
const {
|
||||
cumSituationStore: { doInit },
|
||||
cumSituationStore: { doInit, addForm },
|
||||
taxAgentStore: { fetchTaxAgentOption }
|
||||
} = this.props;
|
||||
doInit({ year: this.state.monthValue, taxAgentId: "" });
|
||||
addForm.initFormFields(dataCollectCondition);
|
||||
doInit({
|
||||
year: this.state.monthValue,
|
||||
taxAgentId: "",
|
||||
taxYearMonth: this.state.monthValue + "-" + this.state.taxYearMonth
|
||||
});
|
||||
fetchTaxAgentOption().then(() => {
|
||||
this.setState({
|
||||
inited: true
|
||||
|
|
@ -48,7 +57,7 @@ export default class CumSituation extends React.Component {
|
|||
}
|
||||
|
||||
getSearchsAdQuick() {
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
const { monthValue, taxAgentId, taxYearMonth } = this.state;
|
||||
const {
|
||||
taxAgentStore: { taxAgentOption },
|
||||
cumSituationStore: { form, getTableDatas }
|
||||
|
|
@ -61,22 +70,21 @@ export default class CumSituation extends React.Component {
|
|||
value={monthValue}
|
||||
format="YYYY"
|
||||
width={200}
|
||||
onChange={v => {
|
||||
this.setState({ monthValue: v });
|
||||
onChange={c => {
|
||||
this.setState({ monthValue: c, taxYearMonth: "01" });
|
||||
let params = {};
|
||||
if (taxAgentId == "All") {
|
||||
params.taxAgentId = "";
|
||||
} else {
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
if (v != null && v != "") {
|
||||
params.year = v;
|
||||
if (c != null && c !== "") {
|
||||
params.year = c;
|
||||
}
|
||||
getTableDatas(params);
|
||||
getTableDatas({ ...params, taxYearMonth: c + "-" + taxYearMonth });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="helperWrapper">
|
||||
<WeaHelpfulTip
|
||||
title="<div>提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额</div>"
|
||||
|
|
@ -85,6 +93,27 @@ export default class CumSituation extends React.Component {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className="searchConditionItem" style={{ marginRight: 10 }}>
|
||||
<span className="conditionFormLabel">税款所属期:</span>
|
||||
<WeaSelect
|
||||
style={{ width: 80 }}
|
||||
options={taxOptions}
|
||||
value={taxYearMonth}
|
||||
onChange={v => {
|
||||
this.setState({ taxYearMonth: v });
|
||||
let params = {};
|
||||
if (taxAgentId == "All") {
|
||||
params.taxAgentId = "";
|
||||
} else {
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
if (v != null && v != "") {
|
||||
params.taxYearMonth = monthValue + "-" + v;
|
||||
}
|
||||
getTableDatas({ ...params, year: monthValue });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="searchConditionItem">
|
||||
<span className="conditionFormLabel">个税扣缴义务人:</span>
|
||||
{this.state.inited &&
|
||||
|
|
@ -95,15 +124,15 @@ export default class CumSituation extends React.Component {
|
|||
value={taxAgentId}
|
||||
onChange={v => {
|
||||
let params = {};
|
||||
if (v == "All") {
|
||||
if (v === "All") {
|
||||
params.taxAgentId = "";
|
||||
} else {
|
||||
params.taxAgentId = v;
|
||||
}
|
||||
if (monthValue != null && monthValue != "") {
|
||||
if (monthValue != null && monthValue !== "") {
|
||||
params.year = monthValue;
|
||||
}
|
||||
getTableDatas(params);
|
||||
getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth });
|
||||
this.setState({ taxAgentId: v });
|
||||
}}
|
||||
/>}
|
||||
|
|
@ -197,14 +226,6 @@ export default class CumSituation extends React.Component {
|
|||
setStep(0);
|
||||
}
|
||||
|
||||
onOperatesClick = (record, index, operate, flag) => {
|
||||
switch (operate.index.toString()) {
|
||||
case "0": // 查看明细
|
||||
this.onEdit(record);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
showColumn = () => {
|
||||
const { cumSituationStore: { tableStore } } = this.props;
|
||||
tableStore.setColSetVisible(true);
|
||||
|
|
@ -227,9 +248,9 @@ export default class CumSituation extends React.Component {
|
|||
};
|
||||
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
handleSearch = () => {
|
||||
const { cumSituationStore: { getTableDatas } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
const { monthValue, taxAgentId, taxYearMonth } = this.state;
|
||||
let params = {};
|
||||
if (monthValue != null && monthValue !== "") {
|
||||
params.year = monthValue;
|
||||
|
|
@ -237,12 +258,133 @@ export default class CumSituation extends React.Component {
|
|||
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
getTableDatas(params);
|
||||
}
|
||||
getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth });
|
||||
};
|
||||
//新功能
|
||||
handleCreateUpSituation = (payload) => {
|
||||
const { editId } = this.state;
|
||||
this.setState({ saveLoading: true });
|
||||
if (!_.isEmpty(editId)) {
|
||||
API.editAddUpSituation({ ...payload, id: editId.id }).then(({ status, errormsg }) => {
|
||||
this.setState({ saveLoading: false });
|
||||
if (status) {
|
||||
message.success("编辑成功");
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
}, () => {
|
||||
const { cumSituationStore: { addForm } } = this.props;
|
||||
this.handleSearch();
|
||||
addForm.resetForm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "编辑失败");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
API.createAddUpSituation(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ saveLoading: false });
|
||||
if (status) {
|
||||
message.success("新增成功");
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
}, () => {
|
||||
const { cumSituationStore: { addForm } } = this.props;
|
||||
this.handleSearch();
|
||||
addForm.resetForm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "新增失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
handleOperate = ({ key }, row) => {
|
||||
const { monthValue: declareMonth, taxYearMonth } = this.state;
|
||||
if (key === "edit") {
|
||||
this.setState({
|
||||
addVisible: true
|
||||
}, () => {
|
||||
API.getAddUpSituation({ id: row.id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ editId: data });
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (key === "delete") {
|
||||
const payload = {
|
||||
taxYearMonth: declareMonth + "-" + taxYearMonth,
|
||||
ids: [row.id]
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的往期累计情况数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
|
||||
onOk: () => {
|
||||
API.deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.handleSearch();
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
deleteSelectAddUpSituation = () => {
|
||||
const { monthValue: declareMonth, selectedKey, taxYearMonth } = this.state;
|
||||
if (selectedKey.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
taxYearMonth: declareMonth + "-" + taxYearMonth,
|
||||
ids: selectedKey
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。",
|
||||
onOk: () => {
|
||||
API.deleteSelectAddUpSituation(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.handleSearch();
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
deleteAllAddUpSituation = () => {
|
||||
const { monthValue: declareMonth, taxYearMonth } = this.state;
|
||||
const payload = {
|
||||
taxYearMonth: declareMonth + "-" + taxYearMonth
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确定清空税款所属期为${declareMonth}的所有往期累计情况的数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
|
||||
onOk: () => {
|
||||
API.deleteAllAddUpSituation(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.handleSearch();
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { cumSituationStore, taxAgentStore } = this.props;
|
||||
const { slideSelectedKey } = this.state;
|
||||
const { slideSelectedKey, addVisible, editId, saveLoading } = this.state;
|
||||
const {
|
||||
loading,
|
||||
dataSource,
|
||||
|
|
@ -250,6 +392,7 @@ export default class CumSituation extends React.Component {
|
|||
pageObj,
|
||||
hasRight,
|
||||
form,
|
||||
addForm,
|
||||
condition,
|
||||
tableStore,
|
||||
showSearchAd,
|
||||
|
|
@ -275,11 +418,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 = [
|
||||
// 右键菜单
|
||||
// {
|
||||
|
|
@ -299,7 +437,7 @@ export default class CumSituation extends React.Component {
|
|||
};
|
||||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
<Button type="primary" onClick={doSearch}>
|
||||
<Button type="primary" onClick={() => this.handleSearch()}>
|
||||
搜索
|
||||
</Button>,
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>
|
||||
|
|
@ -373,6 +511,25 @@ export default class CumSituation extends React.Component {
|
|||
}
|
||||
type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>,
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
this.setState({
|
||||
addVisible: true
|
||||
}, () => addForm.resetForm());
|
||||
}}>
|
||||
新建
|
||||
</Button>,
|
||||
<Dropdown.Button
|
||||
onClick={this.deleteAllAddUpSituation}
|
||||
overlay={
|
||||
<Menu onClick={this.deleteSelectAddUpSituation}>
|
||||
<Menu.Item key="1">删除所选</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
type="ghost">
|
||||
一键清空
|
||||
</Dropdown.Button>
|
||||
];
|
||||
|
||||
|
|
@ -463,26 +620,40 @@ export default class CumSituation extends React.Component {
|
|||
} else if (item.dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
width: 100,
|
||||
width: 120,
|
||||
fixed: "right",
|
||||
render: (text, record) =>
|
||||
<div className="linkWapper">
|
||||
<a href="javaScript:void(0);" onClick={() => this.onEdit(record)}>
|
||||
查看明细
|
||||
</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleOperate(e, record)}>
|
||||
<Menu.Item key="edit">编辑</Menu.Item>
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</div>
|
||||
};
|
||||
} else {
|
||||
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 +713,71 @@ 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={"往期累计情况(工资、薪金)记录"}
|
||||
loading={saveLoading}
|
||||
subtitle={addVisible ? (!_.isEmpty(editId) ? "编辑" : "新建") : "往期累计情况(工资、薪金)记录"}
|
||||
onSave={() => {
|
||||
this.state.currentOperate == "add" ? doSave() : doUpdate();
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v));
|
||||
if (!bool && _.isEmpty(editId)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
taxYearMonth: baseInfo.declareMonth,
|
||||
..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleCreateUpSituation(payload);
|
||||
}}
|
||||
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
|
||||
editId={!_.isEmpty(editId) ? { ...editId, declareMonth: editId.taxYearMonth } : editId}
|
||||
condition={dataCollectCondition}/> :
|
||||
<EditSlideContent
|
||||
slideSelectedKey={slideSelectedKey}
|
||||
onChangeSlideSelectKey={val =>
|
||||
this.setState({ slideSelectedKey: val })}
|
||||
/>
|
||||
}
|
||||
onClose={() => setSlideVisiable(false)}
|
||||
onClose={() => {
|
||||
setSlideVisiable(false);
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
});
|
||||
}}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => setSlideVisiable(false)}
|
||||
closeMaskOnClick={() => {
|
||||
setSlideVisiable(false);
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
});
|
||||
}}
|
||||
/>}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,27 +1,64 @@
|
|||
.slideOuterWrapper{
|
||||
.wea-slide-modal-title{
|
||||
.slideOuterWrapper {
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.rodal-close{
|
||||
|
||||
.rodal-close {
|
||||
z-index: 99;
|
||||
top: 10px!important;
|
||||
top: 10px !important;
|
||||
}
|
||||
|
||||
.linkWapper {
|
||||
a {
|
||||
color: #4d7ad8;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px){
|
||||
.slideOuterWrapper{
|
||||
.reqTopWrapper .wea-new-top-req-title>div:first-child>div{
|
||||
max-width: 100%!important;
|
||||
.moreIconWrapper {
|
||||
.ant-popover-inner {
|
||||
min-width: 106px
|
||||
}
|
||||
|
||||
.ant-popover-inner-content {
|
||||
padding: 0;
|
||||
|
||||
.ant-menu {
|
||||
.ant-menu-item {
|
||||
border-right: none;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1260px) {
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1060px) and (max-width: 1260px) {
|
||||
.slideOuterWrapper{
|
||||
.reqTopWrapper .wea-new-top-req-title>div:first-child>div{
|
||||
max-width: calc(100% - 96px)!important;
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: calc(100% - 96px) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
.tipWrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 25px 20px 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -122,17 +122,7 @@ export default class EditSlideContent extends React.Component {
|
|||
});
|
||||
},
|
||||
};
|
||||
const newColumns = _.map([...slideColumns], (item) => {
|
||||
if (item.dataIndex === "declareMonth") {
|
||||
return {
|
||||
...item,
|
||||
width: 120,
|
||||
fixed: "left",
|
||||
};
|
||||
} else {
|
||||
return { ...item };
|
||||
}
|
||||
});
|
||||
const newColumns = _.map([...slideColumns], (item) => ({ ...item }));
|
||||
const rowSelection = {
|
||||
selectedRowKeys: this.props.slideSelectedKey,
|
||||
onChange: this.onSelectChange,
|
||||
|
|
@ -144,7 +134,7 @@ export default class EditSlideContent extends React.Component {
|
|||
<span className="username">{currentRecord.username}</span>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<span className="formLabel">申报月份</span>
|
||||
<span className="formLabel">税款所属期</span>
|
||||
<div className="weaRangePickerWrapper">
|
||||
<div className="monthPickerWrapper">
|
||||
<MonthPicker
|
||||
|
|
|
|||
|
|
@ -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, Popover, 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 * as API from "../../../apis/otherDeduct";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
@inject("otherDeductStore", "taxAgentStore")
|
||||
|
|
@ -20,6 +21,9 @@ export default class OtherDeduct extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
saveLoading: false,
|
||||
addVisible: false,
|
||||
editId: {},
|
||||
value: "",
|
||||
selectedKey: [],
|
||||
slideSelectedKey: [], //详情表格的选中项
|
||||
|
|
@ -36,9 +40,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({
|
||||
|
|
@ -56,7 +61,7 @@ export default class OtherDeduct extends React.Component {
|
|||
return (
|
||||
<div className="searchConditionWrapper">
|
||||
<div className="searchConditionItem">
|
||||
<span className="conditionFormLabel">申报月份:</span>
|
||||
<span className="conditionFormLabel">税款所属期:</span>
|
||||
<WeaDatePicker
|
||||
value={monthValue}
|
||||
format="YYYY-MM"
|
||||
|
|
@ -222,7 +227,7 @@ export default class OtherDeduct extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
handleSearch() {
|
||||
handleSearch = () => {
|
||||
const { otherDeductStore: { getTableDatas } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
let params = {};
|
||||
|
|
@ -233,7 +238,150 @@ export default class OtherDeduct extends React.Component {
|
|||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
getTableDatas(params);
|
||||
}
|
||||
};
|
||||
|
||||
//新功能
|
||||
handleCreateData = (payload) => {
|
||||
const { editId }= this.state;
|
||||
this.setState({ saveLoading: true });
|
||||
if (!_.isEmpty(editId)) {
|
||||
API.editData({ ...payload, id: editId.id }).then(({ status, errormsg }) => {
|
||||
this.setState({ saveLoading: false });
|
||||
if (status) {
|
||||
message.success("编辑成功");
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
}, () => {
|
||||
const { otherDeductStore: { doSearch, addForm } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
doSearch({
|
||||
declareMonth: [monthValue],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
addForm.resetForm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "编辑失败");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
API.createData(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ saveLoading: false });
|
||||
if (status) {
|
||||
message.success("新增成功");
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
}, () => {
|
||||
const { otherDeductStore: { doSearch, addForm } } = this.props;
|
||||
const { monthValue, taxAgentId } = this.state;
|
||||
doSearch({
|
||||
declareMonth: [monthValue],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
addForm.resetForm();
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "新增失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
handleOperate = ({ key }, row) => {
|
||||
const { monthValue: declareMonth, taxAgentId } = this.state;
|
||||
const { otherDeductStore: { doSearch } } = this.props;
|
||||
if (key === "edit") {
|
||||
this.setState({
|
||||
addVisible: true
|
||||
},()=>{
|
||||
API.getData({ id: row.id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ editId: data });
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (key === "delete") {
|
||||
const payload = {
|
||||
declareMonth,
|
||||
ids: [row.id]
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确定删除${row.departmentName}${row.username}(税款所属期:${declareMonth})的其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
|
||||
onOk: () => {
|
||||
API.deleteSelectData(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
doSearch({
|
||||
declareMonth: [declareMonth],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
deleteSelectData = () => {
|
||||
const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state;
|
||||
const { otherDeductStore: { doSearch } } = this.props;
|
||||
if (selectedKey.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
declareMonth,
|
||||
ids: selectedKey
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。",
|
||||
onOk: () => {
|
||||
API.deleteSelectData(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
doSearch({
|
||||
declareMonth: [declareMonth],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
deleteAllData = () => {
|
||||
const { monthValue: declareMonth, taxAgentId } = this.state;
|
||||
const { otherDeductStore: { doSearch } } = this.props;
|
||||
const payload = {
|
||||
declareMonth,
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
};
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: `确定清空税款所属期为${declareMonth}的所有其他免税扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
|
||||
onOk: () => {
|
||||
API.deleteAllData(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
doSearch({
|
||||
declareMonth: [declareMonth],
|
||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { otherDeductStore, taxAgentStore } = this.props;
|
||||
|
|
@ -251,7 +399,8 @@ export default class OtherDeduct extends React.Component {
|
|||
doSearch,
|
||||
setShowSearchAd,
|
||||
previewImport,
|
||||
importFile
|
||||
importFile,
|
||||
addForm
|
||||
} = otherDeductStore;
|
||||
const { taxAgentOption, showOperateBtn } = taxAgentStore;
|
||||
const {
|
||||
|
|
@ -267,13 +416,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, editId, saveLoading } = this.state;
|
||||
|
||||
const detailSelectedRowKeys = toJS(slideTableStore.selectedRowKeys) || [];
|
||||
if (!hasRight && !loading) {
|
||||
// 无权限处理
|
||||
return renderNoright();
|
||||
}
|
||||
|
||||
const rightMenu = [
|
||||
// 右键菜单
|
||||
|
|
@ -364,6 +509,26 @@ export default class OtherDeduct extends React.Component {
|
|||
}
|
||||
type="ghost">
|
||||
导出全部
|
||||
</Dropdown.Button>,
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
this.setState({
|
||||
addVisible: true,
|
||||
editId: {}
|
||||
},()=>addForm.resetForm());
|
||||
}}>
|
||||
新建
|
||||
</Button>,
|
||||
<Dropdown.Button
|
||||
onClick={this.deleteAllData}
|
||||
overlay={
|
||||
<Menu onClick={this.deleteSelectData}>
|
||||
<Menu.Item key="1">删除所选</Menu.Item>
|
||||
</Menu>
|
||||
}
|
||||
type="ghost">
|
||||
一键清空
|
||||
</Dropdown.Button>
|
||||
];
|
||||
|
||||
|
|
@ -437,8 +602,6 @@ export default class OtherDeduct extends React.Component {
|
|||
if (item.dataIndex === "username") {
|
||||
return {
|
||||
...item,
|
||||
width: 100,
|
||||
fixed: "left",
|
||||
render: (text, record) =>
|
||||
<div className="linkWapper">
|
||||
<a href="javaScript:void(0);" onClick={() => this.onEdit(record)}>
|
||||
|
|
@ -448,26 +611,37 @@ export default class OtherDeduct extends React.Component {
|
|||
};
|
||||
} else if (item.dataIndex === "taxAgentName") {
|
||||
return {
|
||||
...item,
|
||||
width: 180,
|
||||
fixed: "left"
|
||||
...item
|
||||
};
|
||||
} else if (item.dataIndex === "operate") {
|
||||
return {
|
||||
...item,
|
||||
width: 100,
|
||||
fixed: "right",
|
||||
render: (text, record) =>
|
||||
<div className="linkWapper">
|
||||
<a href="javaScript:void(0);" onClick={() => this.onEdit(record)}>
|
||||
查看明细
|
||||
</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
content={<Menu onClick={(e) => this.handleOperate(e, record)}>
|
||||
<Menu.Item key="edit">编辑</Menu.Item>
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
</Menu>} title="">
|
||||
<i className="icon-coms-more"/>
|
||||
</Popover>
|
||||
}
|
||||
</div>
|
||||
};
|
||||
} else {
|
||||
return { ...item };
|
||||
}
|
||||
});
|
||||
if (_.isEmpty(newColumns)) {
|
||||
return renderLoading();
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="cumDeductWrapper">
|
||||
|
|
@ -501,7 +675,6 @@ export default class OtherDeduct extends React.Component {
|
|||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading}
|
||||
scroll={{ x: 1300 }}
|
||||
/>
|
||||
</WeaTop>
|
||||
</WeaRightMenu>
|
||||
|
|
@ -538,36 +711,70 @@ 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 ? (!_.isEmpty(editId) ? "编辑" : "新建") : "其他免税扣除记录"}
|
||||
onSave={() => {
|
||||
this.state.currentOperate == "add" ? doSave() : doUpdate();
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v));
|
||||
if (!bool && _.isEmpty(editId)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleCreateData(payload);
|
||||
}}
|
||||
editable={false}
|
||||
loading={saveLoading}
|
||||
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}
|
||||
editId={editId}
|
||||
condition={dataCollectCondition}
|
||||
/> :
|
||||
<EditSlideContent
|
||||
slideSelectedKey={slideSelectedKey}
|
||||
onChangeSlideSelectKey={val =>
|
||||
this.setState({ slideSelectedKey: val })}
|
||||
/>
|
||||
}
|
||||
onClose={() => setSlideVisiable(false)}
|
||||
onClose={() => {
|
||||
setSlideVisiable(false);
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
});
|
||||
}}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => setSlideVisiable(false)}
|
||||
closeMaskOnClick={() => {
|
||||
setSlideVisiable(false);
|
||||
this.setState({
|
||||
addVisible: false,
|
||||
editId: {}
|
||||
});
|
||||
}}
|
||||
/>}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
.linkWapper {
|
||||
a {
|
||||
color: #4d7ad8;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
|
|
@ -9,30 +14,54 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.slideOuterWrapper{
|
||||
.wea-slide-modal-title{
|
||||
|
||||
.moreIconWrapper {
|
||||
.ant-popover-inner {
|
||||
min-width: 106px
|
||||
}
|
||||
|
||||
.ant-popover-inner-content {
|
||||
padding: 0;
|
||||
|
||||
.ant-menu {
|
||||
.ant-menu-item {
|
||||
border-right: none;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.slideOuterWrapper {
|
||||
.wea-slide-modal-title {
|
||||
height: initial;
|
||||
line-height: initial;
|
||||
text-align: left;
|
||||
}
|
||||
.rodal-close{
|
||||
|
||||
.rodal-close {
|
||||
z-index: 99;
|
||||
top: 10px!important;
|
||||
top: 10px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1260px){
|
||||
.slideOuterWrapper{
|
||||
.reqTopWrapper .wea-new-top-req-title>div:first-child>div{
|
||||
max-width: 100%!important;
|
||||
@media (min-width: 1260px) {
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1060px) and (max-width: 1260px) {
|
||||
.slideOuterWrapper{
|
||||
.reqTopWrapper .wea-new-top-req-title>div:first-child>div{
|
||||
max-width: calc(100% - 96px)!important;
|
||||
.slideOuterWrapper {
|
||||
.reqTopWrapper .wea-new-top-req-title > div:first-child > div {
|
||||
max-width: calc(100% - 96px) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -299,12 +299,12 @@ 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}
|
||||
onChange={(selected) => onChange({ type: label, selected })}/>
|
||||
<WeaSelect options={[{ key: "", showname: "" }, ...options]} viewAttr={viewAttr} value={value}
|
||||
onChange={(selected, showName) => onChange({ type: label, selected, showName })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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; // 高级搜索面板显示
|
||||
|
|
|
|||
|
|
@ -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; // 高级搜索面板显示
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ import { WeaForm, WeaTableNew } from "comsMobx";
|
|||
import { removePropertyCondition } from "../util/response";
|
||||
|
||||
import * as API from "../apis/otherDeduct"; // 引入API接口文件
|
||||
import * as TaxAgentApi from "../apis/taxAgent";
|
||||
|
||||
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; // 高级搜索面板显示
|
||||
|
|
|
|||
Loading…
Reference in New Issue