Merge branch 'master' into feature/v2-对接个税设置-1121

This commit is contained in:
黎永顺 2022-11-30 17:45:30 +08:00
commit 4f3c27c53b
25 changed files with 1383 additions and 255 deletions

View File

@ -1,4 +1,5 @@
import { WeaTools } from "ecCom";
import { postFetch } from "../util/request";
//社会福利台账-获取正常缴纳列表
export const getCommonList = (params) => {
@ -7,9 +8,9 @@ export const getCommonList = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
@ -25,9 +26,9 @@ export const getNormalList = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-获取补缴列表
@ -36,9 +37,9 @@ export const getSupplementaryList = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
@ -48,9 +49,9 @@ export const getOverViewList = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
@ -60,9 +61,9 @@ export const getChangeList = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-保存并进入核算
@ -71,9 +72,9 @@ export const save = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-归档
@ -82,9 +83,9 @@ export const siaccountFile = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-核算异常列表
@ -93,9 +94,9 @@ export const inspectList = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-删除正常缴纳人员
@ -104,9 +105,9 @@ export const siaccountCommonDelete = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-添加正常缴纳人员
@ -115,9 +116,9 @@ export const siaccountCommonSave = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-添加补缴人员
@ -126,9 +127,9 @@ export const siaccountSupplementarySave = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-删除月份表单
@ -137,9 +138,9 @@ export const siaccountDelete = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
//社会福利台账-正常缴纳添加缴纳人员表单
@ -165,9 +166,9 @@ export const commonAccount = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
@ -177,9 +178,9 @@ export const socialSecurityBenefitsRecalculate = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
};
@ -191,7 +192,7 @@ export const getAdminTaxAgentList = () => {
"get",
{}
);
}
};
// 表单字段对应的接口
export const getWelfareList = () => {
@ -200,7 +201,7 @@ export const getWelfareList = () => {
"get",
{}
);
}
};
// 社保福利台账-导入预览
export const welfarePreview = (params) => {
@ -208,11 +209,11 @@ export const welfarePreview = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
}
};
// 社保福利台账-核算数据导入
export const importInsuranceAcctDetail = (params) => {
@ -220,11 +221,11 @@ export const importInsuranceAcctDetail = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
}
};
// 社保福利台账-线下对比数据导入
export const importExcelInsuranceDetail = (params) => {
@ -232,8 +233,39 @@ export const importExcelInsuranceDetail = (params) => {
method: "post",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(params),
body: JSON.stringify(params)
}).then((res) => res.json());
}
};
//获取当前登录人所控制的人员范围
export const getEmployeeListByTaxAgent = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/getEmployeeListByTaxAgent", params);
};
//新增退差数据
export const saveRecession = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/saveRecession", params);
};
//查询退差列表
export const recessionList = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
};
//删除退差数据
export const delRecession = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
};
//编辑社保福利缴纳数据
export const editAccount = (params) => {
return postFetch("/api/bs/hrmsalary/siaccount/editAccount", params);
};
//获取核算项个人和公司社保福利缴纳详情
export const getPaymentById = ({ id }) => {
return fetch(`/api/bs/hrmsalary/siaccount/getPaymentById?id=${id}`, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
}).then(res => res.json());
};

View File

@ -12,6 +12,17 @@ export const getTaxAgentList = (params) => {
body: JSON.stringify(params),
}).then((res) => res.json());
};
//同步人员范围
export const taxAgentRangeSync = (params) => {
return fetch("/api/bs/hrmsalary/taxAgent/range/sync", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(params),
}).then((res) => res.json());
};
// 系统管理员权限
export const getPermission = (params) => {

View File

@ -3,11 +3,13 @@ import UserSure from "./userSure";
import { inject, observer } from "mobx-react";
import SalaryDetail from "./salaryDetail";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { WeaBrowser, WeaCheckbox, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
import { WeaBrowser, WeaCheckbox, WeaDropdown, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
import { getQueryString } from "../../util/url";
import AcctResultImportModal from "./acctResult/importModal/acctResultImportModal";
import ProgressModal from "../../components/progressModal";
const { ButtonSelect } = WeaDropdown;
@inject("calculateStore", "salaryFileStore")
@observer
export default class CalculateDetail extends React.Component {
@ -27,7 +29,8 @@ export default class CalculateDetail extends React.Component {
fieldData: {},
acctResultImportVisiable: false,
progressVisible: false,
progress: 0
progress: 0,
accountIds: []
};
this.id = "";
this.timer;
@ -100,8 +103,8 @@ export default class CalculateDetail extends React.Component {
<WeaSelect
value={status}
options={[
{ key: "", showname: "" }, {key: "ALL", showname: "全部"},
{ key: "NORMAL", showname: "在职" }, {key: "UNAVAILABLE", showname: "离职"}
{ key: "", showname: "" }, { key: "ALL", showname: "全部" },
{ key: "NORMAL", showname: "在职" }, { key: "UNAVAILABLE", showname: "离职" }
]}
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
</WeaFormItem>
@ -126,19 +129,23 @@ export default class CalculateDetail extends React.Component {
};
// 核算点击事件
handleAccount() {
handleAccount = (key) => {
const { calculateStore } = this.props;
const {
acctresultAccounting,
acctResultList,
getCalculateProgress
} = calculateStore;
const { acctresultAccounting, getCalculateProgress } = calculateStore;
if (key === "SELECT" && _.isEmpty(this.state.accountIds)) {
message.warning("请先选择表格数据");
return;
}
Modal.confirm({
title: "信息确认",
content: "点击核算,公式项将按照公式逻辑核算,核算结果将覆盖原数据",
onOk: () => {
this.setState({ progress: 0 });
acctresultAccounting(this.id).then(() => {
let payload = { salaryAcctRecordId: this.id };
if (key === "SELECT") {
payload = _.assign(payload, { ids: this.state.accountIds });
}
acctresultAccounting(payload).then(() => {
this.setState({
progressVisible: true
});
@ -152,7 +159,8 @@ export default class CalculateDetail extends React.Component {
clearInterval(this.timer);
this.timer = null;
this.setState({
progressVisible: false
progressVisible: false,
accountIds: []
});
message.success("核算完成");
// acctResultList({ salaryAcctRecordId: this.id });
@ -162,6 +170,7 @@ export default class CalculateDetail extends React.Component {
type: "PR",
listType: "",
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
selectedRowKeys: [],
queryParams: {
salaryAcctRecordId,
}
@ -171,7 +180,8 @@ export default class CalculateDetail extends React.Component {
clearInterval(this.timer);
this.timer = null;
this.setState({
progressVisible: false
progressVisible: false,
accountIds: []
});
message.error(data.message);
}
@ -183,7 +193,7 @@ export default class CalculateDetail extends React.Component {
onCancel() {
}
});
}
};
// 更多选项点击
handleMenuClick = e => {
@ -199,7 +209,7 @@ export default class CalculateDetail extends React.Component {
);
} else if (e.key == "3") {
window.open(
'/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=' + this.id +"&ids="
"/api/bs/hrmsalary/salaryacct/acctresult/export?salaryAcctRecordId=" + this.id + "&ids="
);
}
};
@ -223,7 +233,7 @@ export default class CalculateDetail extends React.Component {
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
queryParams: {
salaryAcctRecordId,
...params,
...params
}
};
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
@ -248,11 +258,14 @@ export default class CalculateDetail extends React.Component {
const renderRightOperation = () => {
return [
<Button
type="primary"
onClick={() => this.handleAccount()}>
核算
</Button>,
<ButtonSelect
datas={[
{ key: "ALL", show: "核算所有人", selected: true },
{ key: "SELECT", show: "核算所选人员", selected: false }
]}
btnOnClick={this.handleAccount}
menuOnClick={(key) => this.handleAccount(key)}
/>,
<Dropdown.Button overlay={menu}>
更多
</Dropdown.Button>
@ -333,7 +346,8 @@ export default class CalculateDetail extends React.Component {
searchsBaseValue={this.state.searchItemsValue.employeeName} // 外部input搜索值受控: 这里和高级搜索的requestname同步form.getFormParams().username
/>
{selectedKey == 0 && <UserSure/>}
{selectedKey == 1 && <SalaryDetail employeeName={this.state.searchValue}/>}
{selectedKey == 1 && <SalaryDetail onChangeAccountIds={(ids) => this.setState({ accountIds: ids })}
employeeName={this.state.searchValue}/>}
{acctResultImportVisiable &&
<AcctResultImportModal
visiable={acctResultImportVisiable}

View File

@ -96,6 +96,8 @@ export default class SalaryDetail extends React.Component {
}
};
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
} else if (id === "BATCHDELETE") {
this.props.onChangeAccountIds(record);
}
} else {
const payload = {

View File

@ -36,17 +36,17 @@ class AddItems extends Component {
taxAgentId: nextProps.editId.taxAgentId,
taxAgentName: nextProps.editId.taxAgentName,
employeeId: nextProps.editId.employeeId,
employeeName: nextProps.editId.username,
employeeName: nextProps.editId.username
}
});
const fields= _.map(nextProps.condition[0].items, it =>{
return it.domkey[0]
})
const fields = _.map(nextProps.condition[0].items, it => {
return it.domkey[0];
});
fields.map(item => {
nextProps.form.updateFields({
[item]: nextProps.editId[item] || ''
})
})
[item]: nextProps.editId[item] || ""
});
});
}
}
@ -84,7 +84,7 @@ class AddItems extends Component {
viewAttr: _.isEmpty(editId) ? 3 : 1,
value: baseInfo.employeeId,
valueSpan: baseInfo.employeeName,
onChange: ({ids, names}) => {
onChange: ({ ids, names }) => {
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
}
})
@ -136,7 +136,7 @@ class AddItems extends Component {
viewAttr: _.isEmpty(editId) ? 3 : 1,
value: baseInfo.employeeId,
valueSpan: baseInfo.employeeName,
onChange: ({ids, names}) => {
onChange: ({ ids, names }) => {
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
}
})
@ -180,15 +180,16 @@ class AddItems extends Component {
export default AddItems;
export const Browser = payload => {
const { label, onChange, viewAttr = 3, value, valueSpan } = payload;
const { label, onChange, viewAttr = 3, value, valueSpan, type = 1, isSingle = true } = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaBrowser
viewAttr={viewAttr}
type={1}
type={type}
isSingle={isSingle}
value={value}
valueSpan={valueSpan}
onChange={(ids, names)=> onChange({ids, names})}/>
onChange={(ids, names) => onChange({ ids, names })}/>
</WeaFormItem>
);
};

View File

@ -86,27 +86,33 @@ export default class EditSlideContent extends React.Component {
};
render() {
const {
taxAgentStore: { taxAgentOption }
} = this.props;
const { cumDeductStore } = this.props;
const {
slideTableStore,
currentRecord,
slideColumns,
slidePageObj,
slideTableDataSource,
setSlidePageObj,
slideLoading
slideLoading,
getCumDeductDetailList
} = cumDeductStore;
const { startDate, endDate, taxAgentId } = this.state;
const declareMonth = [startDate, endDate];
const pagination = {
current: slidePageObj.current,
pageSize: slidePageObj.pageSize,
total: slidePageObj.total,
showTotal: (total) => `${total}`,
showSizeChanger: true,
onShowSizeChange(current, pageSize) {
setSlidePageObj({ ...slidePageObj, current, pageSize });
getCumDeductDetailList(currentRecord.id, {
...slidePageObj,
taxAgentId: currentRecord.taxAgentId,
current,
pageSize,
declareMonth: _.filter(declareMonth, item => item)
});
},
onChange(current) {
setSlidePageObj({
@ -114,6 +120,11 @@ export default class EditSlideContent extends React.Component {
current,
pageSize: slidePageObj.pageSize
});
getCumDeductDetailList(currentRecord.id, {
...slidePageObj, current,
taxAgentId: currentRecord.taxAgentId,
declareMonth: _.filter(declareMonth, item => item)
});
}
};
const newColumns = _.map([...slideColumns], (item) => ({ ...item }));
@ -143,7 +154,7 @@ export default class EditSlideContent extends React.Component {
this.handleFetchCumDeductDetailList(
startDate,
endDate,
taxAgentId
currentRecord.taxAgentId
);
}}
/>
@ -169,19 +180,6 @@ export default class EditSlideContent extends React.Component {
</div>
</div>
</Col>
{/*<Col span={8}>*/}
{/* <span className="formLabel">个税扣缴义务人</span>*/}
{/* <WeaSelect*/}
{/* showSearch // 设置select可搜索*/}
{/* style={{ width: 100 }}*/}
{/* options={taxAgentOption}*/}
{/* value={taxAgentId}*/}
{/* onChange={(v) => {*/}
{/* this.setState({ taxAgentId: v });*/}
{/* this.handleFetchCumDeductDetailList(startDate, endDate, v);*/}
{/* }}*/}
{/* />*/}
{/*</Col>*/}
</Row>
<div>

View File

@ -86,12 +86,10 @@ export default class EditSlideContent extends React.Component {
};
render() {
const {
taxAgentStore: { taxAgentOption }
} = this.props;
const { cumSituationStore } = this.props;
const { startDate, endDate, taxAgentId } = this.state;
const {
slideTableStore,
getCumDeductDetailList,
currentRecord,
slideColumns,
slidePageObj,
@ -99,21 +97,35 @@ export default class EditSlideContent extends React.Component {
setSlidePageObj,
slideLoading
} = cumSituationStore;
const { startDate, endDate, taxAgentId } = this.state;
const declareMonth = [startDate, endDate];
const pagination = {
current: slidePageObj.current,
pageSize: slidePageObj.pageSize,
total: slidePageObj.total,
showTotal: (total) => `${total}`,
showSizeChanger: true,
onShowSizeChange(current, pageSize) {
setSlidePageObj({ ...slidePageObj, current, pageSize });
getCumDeductDetailList(currentRecord.id, {
...slidePageObj,
current,
pageSize,taxAgentId:currentRecord.taxAgentId,
declareMonth: _.filter(declareMonth, item => item)
});
},
onChange(current) {
setSlidePageObj({
...slidePageObj,
current,
current,taxAgentId:currentRecord.taxAgentId,
pageSize: slidePageObj.pageSize
});
getCumDeductDetailList(currentRecord.id, {
...slidePageObj,
current,
pageSize,
declareMonth: _.filter(declareMonth, item => item)
});
}
};
const newColumns = _.map([...slideColumns], (item) => ({ ...item }));
@ -163,29 +175,13 @@ export default class EditSlideContent extends React.Component {
this.handleFetchCumDeductDetailList(
startDate,
endDate,
taxAgentId
currentRecord.taxAgentId
);
}}
/>
</div>
</div>
</Col>
{/*<Col span={8}>*/}
{/* <span className="formLabel">个税扣缴义务人</span>*/}
{/* <WeaSelect*/}
{/* showSearch // 设置select可搜索*/}
{/* style={{ width: 100 }}*/}
{/* options={taxAgentOption}*/}
{/* value={taxAgentId}*/}
{/* onChange={(v) => {*/}
{/* this.setState({ taxAgentId: v });*/}
{/* this.fetchCumDeductDetailList({*/}
{/* declareMonth: [startDate, endDate],*/}
{/* taxAgentId: v,*/}
{/* });*/}
{/* }}*/}
{/* />*/}
{/*</Col>*/}
</Row>
<div>

View File

@ -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("otherDeductStore", "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;
@ -92,40 +86,51 @@ export default class EditSlideContent extends React.Component {
};
render() {
const {
taxAgentStore: { taxAgentOption },
} = this.props;
const { otherDeductStore } = this.props;
const {
slideTableStore,
getOtherDeductDetailList,
currentRecord,
slideColumns,
slidePageObj,
slideTableDataSource,
setSlidePageObj,
slideLoading,
slideLoading
} = otherDeductStore;
const { startDate, endDate, taxAgentId } = this.state;
const declareMonth = [startDate, endDate];
const pagination = {
current: slidePageObj.current,
pageSize: slidePageObj.pageSize,
total: slidePageObj.total,
showTotal: (total) => `${total}`,
showSizeChanger: true,
onShowSizeChange(current, pageSize) {
setSlidePageObj({ ...slidePageObj, current, pageSize });
getOtherDeductDetailList(currentRecord.id, {
...slidePageObj,
current,
pageSize,
declareMonth: _.filter(declareMonth, item => item)
});
},
onChange(current) {
setSlidePageObj({
...slidePageObj,
current,
pageSize: slidePageObj.pageSize,
current, taxAgentId: currentRecord.taxAgentId,
pageSize: slidePageObj.pageSize
});
},
getOtherDeductDetailList(currentRecord.id, {
...slidePageObj,
current, taxAgentId: currentRecord.taxAgentId,
declareMonth: _.filter(declareMonth, item => item)
});
}
};
const newColumns = _.map([...slideColumns], (item) => ({ ...item }));
const rowSelection = {
selectedRowKeys: this.props.slideSelectedKey,
onChange: this.onSelectChange,
onChange: this.onSelectChange
};
return (
<div className="cumDeductSlide">
@ -169,7 +174,7 @@ export default class EditSlideContent extends React.Component {
this.handleFetchCumDeductDetailList(
startDate,
endDate,
taxAgentId
currentRecord.taxAgentId
);
}}
/>

View File

@ -65,7 +65,74 @@ export const condition = [
viewAttr: 2
}
],
title: '数据采集',
title: "数据采集",
defaultshow: true
}
];
export const searchCondition = [
{
items: [
{
conditionType: "INPUT",
domkey: ["username"],
fieldcol: 16,
label: "姓名",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "BROWSER",
domkey: ["departmentName"],
browserConditionParam: {
linkUrl: "/spa/hrm/engine.html#/hrmengine/organization?showTree=false&type=department&id=",
tabs: [
{
dataParams: null,
dataURL: null,
isSearch: false,
key: "2",
name: "组织结构",
selected: false,
showOrder: 0
},
{
dataParams: { list: "1" },
dataURL: null,
isSearch: true,
key: "1",
name: "按列表",
selected: false,
showOrder: 0
}
],
title: '部门',
type: "4",
viewAttr: 2,
pageSize: 10,
noOperate: true,
isMultCheckbox: false,
icon: "icon-coms-hrm",
iconBgcolor: "#217346"
},
fieldcol: 16,
label: "部门",
labelcol: 8,
value: "",
viewAttr: 2
},
{
conditionType: "INPUT",
domkey: ["jobNum"],
fieldcol: 16,
label: "工号",
labelcol: 8,
value: "",
viewAttr: 2
}
],
title: "常用条件",
defaultshow: true
}
];

View File

@ -8,7 +8,7 @@ import * as API from "../../../apis/special";
import SlideModalTitle from "../../../components/slideModalTitle";
import AddItems from "../addItems";
import SpecialAddContent from "./components/specialAddContent";
import { condition } from "./components/condition";
import { condition, searchCondition } from "./components/condition";
import ImportModal from "../../../components/importModal";
import { specialModalColumns } from "../cumDeduct/columns";
import "./index.less";
@ -351,8 +351,9 @@ class SpecialAddDeduction extends Component {
};
getSearchsAdQuick = (isAd) => {
const { advanceParams } = this.state;
// advanceParams.condition
const { taxAgentStore: { taxAgentAdminOption }, specialAddStore: { advanceForm } } = this.props;
return isAd ? getSearchs(advanceForm, advanceParams.condition, 2)
return isAd ? getSearchs(advanceForm, searchCondition, 2)
: <InlineForm
ref={dom => this.inlineForm = dom}
taxAgentOption={taxAgentAdminOption}

View File

@ -487,7 +487,7 @@ class Index extends Component {
...item,
width: item.oldWidth,
render: (text) => {
return <span className='tdEllipsis' title={text}>{text}</span>
return <span className="tdEllipsis" title={text}>{text}</span>;
}
};
});
@ -541,7 +541,8 @@ class Index extends Component {
let arrList = [];
if (showOperateBtn && isShow === "true" && selectedKey === "fixed") {
arrList.push(<Button type="primary" onClick={() => {
window.open(`${url}&salaryArchiveId=${id}`);
const linkUrl = url.indexOf("http") !== -1 ? url : `${window.location.origin}${url}`;
window.open(`${linkUrl}&salaryArchiveId=${id}`);
}}>发起调薪</Button>);
}
if (showOperateBtn && selectedKey === "fixed") {

View File

@ -339,10 +339,25 @@ class Index extends Component {
export default Index;
export const Select = payload => {
const { label, onChange, value, options = [], viewAttr = 3 } = payload;
const {
label,
onChange,
value,
options = [],
viewAttr = 3,
detailtype = 1,
multiple = false,
showSearch = false
} = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaSelect options={[{ key: "", showname: "" }, ...options]} viewAttr={viewAttr} value={value}
<WeaSelect options={multiple ? options : [{ key: "", showname: "" }, ...options]} viewAttr={viewAttr}
detailtype={detailtype}
value={value}
multiple={multiple}
showSearch={showSearch}
optionFilterProp="children"
style={multiple ? { width: 600 } : {}}
onChange={(selected, showName) => onChange({ type: label, selected, showName })}/>
</WeaFormItem>
);

View File

@ -45,7 +45,12 @@ export default class StandingBook extends React.Component {
list: [],
total: 0
},
adminData: {},
adminData: {
isDefaultOpen: false,
isAdminEnable: false,
isChief: false,
isOpenDevolution: false
},
progressVisible: false,
progress: 0
};
@ -113,12 +118,12 @@ export default class StandingBook extends React.Component {
it = {
...it,
render: (text, r) => {
const { billMonth } = r;
const { billMonth, creator } = r;
return (
<a
href="javascript:;"
href="javascript:void(0);"
className="linkTo"
onClick={() => this.handleGoDetail(billMonth, "detail", r.paymentOrganizationId)}>
onClick={() => this.handleGoDetail(billMonth, "detail", r.paymentOrganizationId, creator)}>
{text}
</a>
);
@ -127,71 +132,83 @@ export default class StandingBook extends React.Component {
}
return { ...it };
});
if (!this.state.adminData.isDefaultOpen || (this.state.adminData.isDefaultOpen && this.state.adminData.isAdminEnable)) {
columns = [
...columns,
{
title: "操作",
dataIndex: "action",
key: "action",
fixed: "right",
render: (text, r) => {
const { billStatus, billMonth, creator } = r;
return (
<React.Fragment>
{billStatus === "未归档" && (
<a
href="javascript:void(0);"
className="linkTo"
onClick={() => this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}>
核算
</a>
)}
{billStatus === "已归档" && (
<a
href="javascript:void(0);"
className="linkTo"
onClick={() => this.socialSecurityBenefitsRecalculate({ id: r.id })}>
重新核算
</a>
)}
{billStatus === "未归档" && (
<Dropdown
overlay={
<Menu
onClick={({ key }) =>
this.handleOperate({
key,
billMonth,
paymentOrganizationId: r.paymentOrganizationId,
creator
})
}>
<Menu.Item key="archive">归档</Menu.Item>
{/* <Menu.Item key="detail">异常详情</Menu.Item> */}
<Menu.Item key="delete">删除</Menu.Item>
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
</Menu>
}>
<i className="icon-coms-more more"/>
</Dropdown>
)}
{billStatus === "已归档" && (
<Dropdown
overlay={
<Menu
onClick={({ key }) =>
this.handleOperate({
key,
billMonth,
paymentOrganizationId: r.paymentOrganizationId,
creator
})
}>
<Menu.Item key="view">查看</Menu.Item>
</Menu>
}>
<i className="icon-coms-more more"/>
</Dropdown>
)}
</React.Fragment>
);
}
}
];
}
this.setState({
tableData: {
list,
columns: [
...columns,
(!this.state.adminData.isDefaultOpen || (this.state.adminData.isDefaultOpen && this.state.adminData.isAdminEnable)) ? {
title: "操作",
dataIndex: "action",
key: "action",
fixed: "right",
render: (text, r) => {
const { billStatus, billMonth } = r;
return (
<React.Fragment>
{billStatus === "未归档" && (
<a
href="javascript:void(0);"
className="linkTo"
onClick={() => this.handleGoDetail(billMonth, "", r.paymentOrganizationId)}>
核算
</a>
)}
{billStatus === "已归档" && (
<a
href="javascript:void(0);"
className="linkTo"
onClick={() => this.socialSecurityBenefitsRecalculate({ id: r.id })}>
重新核算
</a>
)}
{billStatus === "未归档" && (
<Dropdown
overlay={
<Menu
onClick={({ key }) =>
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId })
}>
<Menu.Item key="archive">归档</Menu.Item>
{/* <Menu.Item key="detail">异常详情</Menu.Item> */}
<Menu.Item key="delete">删除</Menu.Item>
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
</Menu>
}>
<i className="icon-coms-more more"/>
</Dropdown>
)}
{billStatus === "已归档" && (
<Dropdown
overlay={
<Menu
onClick={({ key }) =>
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId })
}>
<Menu.Item key="view">查看</Menu.Item>
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
</Menu>
}>
<i className="icon-coms-more more"/>
</Dropdown>
)}
</React.Fragment>
);
}
} : {}
],
columns,
total
},
current: pageNum
@ -236,21 +253,21 @@ export default class StandingBook extends React.Component {
});
}
handleGoDetail = (billMonth, detail, paymentOrganization) => {
handleGoDetail = (billMonth, detail, paymentOrganization, creator) => {
if (detail) {
window.open(
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?type=${detail}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?type=${detail}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}&creator=${creator}`
);
} else {
window.open(
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}&creator=${creator}`
);
}
};
handleOperate = (payload) => {
const { siaccountFile, siaccountDelete, deleteLoading } =
this.props.standingBookStore;
const { key, billMonth, paymentOrganizationId } = payload;
const { key, billMonth, paymentOrganizationId, creator } = payload;
switch (key) {
case "archive":
Modal.confirm({
@ -295,7 +312,7 @@ export default class StandingBook extends React.Component {
});
break;
case "view":
this.handleGoDetail(billMonth, "detail", paymentOrganizationId);
this.handleGoDetail(billMonth, "detail", paymentOrganizationId, creator);
break;
default:
break;
@ -308,7 +325,7 @@ export default class StandingBook extends React.Component {
billMonth: moment(billMonth).format("YYYY-MM"),
...extra
};
save(payload).then(() => {
save(payload).then(({ data }) => {
this.setState({
progressVisible: true
}, () => {
@ -329,7 +346,7 @@ export default class StandingBook extends React.Component {
...this.state.tableParams,
current: this.state.current
});
this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "");
this.handleGoDetail(moment(billMonth).format("YYYY-MM"), "", extra.paymentOrganization ? extra.paymentOrganization : "", data);
});
}
}, 1000);
@ -361,15 +378,6 @@ export default class StandingBook extends React.Component {
});
};
handlePageChange(value) {
this.setState({ current: value });
this.pageInfo.current = value;
this.getCommonList({
...this.state.tableParams,
...this.pageInfo
});
}
handleShowSizeChange(pageInfo) {
this.getCommonList({
...this.state.tableParams,
@ -383,13 +391,7 @@ export default class StandingBook extends React.Component {
inspectLoading,
loading,
hasRight,
form,
condition,
tableStore,
showSearchAd,
getTableDatas,
doSearch,
setShowSearchAd
tableStore
} = standingBookStore;
const { list, columns, total } = this.state.tableData;
const { startTime, endTime } = this.state.tableParams;
@ -448,9 +450,6 @@ export default class StandingBook extends React.Component {
icon={<i className="icon-coms-fa"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
buttons={showOperateBtn ? rightBtns : []}
// showDropIcon={true} // 是否显示下拉按钮
// dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
// dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
>
<div className="billDateWrapper">
<div>账单月份</div>

View File

@ -24,7 +24,7 @@
padding: 8px 20px;
justify-content: flex-end;
i,button {
i, button {
cursor: pointer;
margin-right: 10px;
}
@ -37,4 +37,59 @@
margin-right: 0px;
}
}
}
}
//退差
.regressionWrapper {
height: calc(100vh - 47px);
overflow: auto;
.tdEllipsis {
display: inline-block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.optWrapper {
display: flex;
align-items: center;
i {
cursor: pointer;
}
}
.wea-new-top-wapper .wea-new-top {
background: #FFF;
.wea-new-top-title {
font-size: 12px;
& > span:first-child {
display: none;
}
}
}
.wea-new-top {
.ant-btn {
border-radius: 0;
padding: 0;
background: transparent;
border: none;
font-size: 18px;
line-height: 18px;
}
.ant-btn.ant-btn-primary[disabled] {
color: #d8d8d8;
background: transparent;
}
.ant-btn.ant-btn-primary {
color: #2db7f5;
}
}
}

View File

@ -0,0 +1,228 @@
/*
* Author: 黎永顺
* name: 添加退差人员弹框
* Description:
* Date: 2022/11/22
*/
import React, { Component } from "react";
import { WeaDatePicker, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
import { Button, Modal } from "antd";
import { Select } from "../../../ruleConfig";
import * as API from "../../../../apis/standingBook";
class RegAddEmployee extends Component {
constructor(props) {
super(props);
this.state = {
baseInfo: {
billMonth: "",
items: "",
itemsAll: ""
},
returnPersonInfo: {
employee: "",
employeeOptions: []
},
selectPersonInfo: {
employee: "",
employeeOptions: []
}
};
}
componentDidMount() {
this.getEmployeeListByTaxAgent();
}
getEmployeeListByTaxAgent = () => {
const { returnPersonInfo, selectPersonInfo } = this.state;
const payload = {
pageNum: 1,
pageSize: 10000,
name: null
};
API.getEmployeeListByTaxAgent(payload).then(({ status, data }) => {
if (status) {
const { list } = data;
this.setState({
returnPersonInfo: {
...returnPersonInfo,
employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username }))
},
selectPersonInfo: {
...selectPersonInfo,
employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username }))
}
});
}
});
};
handleReset = () => {
this.setState({
baseInfo: {
billMonth: "",
items: "",
itemsAll: ""
},
returnPersonInfo: {
...this.state.returnPersonInfo,
employee: ""
},
selectPersonInfo: {
...this.state.selectPersonInfo,
employee: ""
}
});
};
handleSave = () => {
const { baseInfo, returnPersonInfo, selectPersonInfo } = this.state;
const { onSave } = this.props;
const payload = {
recessionMonthList: baseInfo.billMonth.split(","),
projects: baseInfo.itemsAll ? ["0"] : baseInfo.items.split(","),
includes: returnPersonInfo.employee.split(","),
excludes: selectPersonInfo.employee.split(",")
};
if (_.isEmpty(baseInfo.billMonth) || _.isEmpty(baseInfo.items) || _.isEmpty(returnPersonInfo.employee)) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
onSave(payload);
};
render() {
const { baseInfo, returnPersonInfo, selectPersonInfo } = this.state;
const { loading } = this.props;
const buttons = [
<Button type="primary" onClick={this.handleSave} loading={loading.save}>保存</Button>,
<Button type="ghost" onClick={this.handleReset}>重置</Button>
];
const baseItems = [
{
com: Picker({
label: "退差月份",
value: baseInfo.billMonth,
onChange: (billMonth) => {
this.setState({ baseInfo: { ...baseInfo, billMonth } });
}
})
},
{
com: SelectWithAll({
label: "退差项目",
options: [
{ key: "1", showname: "社保" },
{ key: "2", showname: "公积金" },
{ key: "3", showname: "企业年金及其他福利" }
],
detailtype: 2,
valueAll: baseInfo.itemsAll,
value: baseInfo.items,
onChangeAll: ({ selected }) => {
if (selected) {
this.setState({ baseInfo: { ...baseInfo, itemsAll: selected, items: "1,2,3" } });
} else {
this.setState({ baseInfo: { ...baseInfo, itemsAll: selected, items: "" } });
}
},
onChange: ({ selected }) => {
const bool1 = selected.split(",").includes("1");
const bool2 = selected.split(",").includes("2");
const bool3 = selected.split(",").includes("3");
if (bool1 && bool2 && bool3) {
this.setState({ baseInfo: { ...baseInfo, itemsAll: "0", items: selected } });
} else {
this.setState({ baseInfo: { ...baseInfo, itemsAll: "", items: selected } });
}
}
})
}
];
const returnPersonItems = [
{
com: Select({
multiple: true,
label: "对象",
viewAttr: 3,
showSearch: true,
options: returnPersonInfo.employeeOptions,
value: returnPersonInfo.employee,
onChange: ({ selected }) => {
this.setState({ returnPersonInfo: { ...returnPersonInfo, employee: selected } });
}
})
}
];
const selectPersonItems = [
{
com: Select({
multiple: true,
label: "选择人员",
viewAttr: 2,
showSearch: true,
options: selectPersonInfo.employeeOptions,
value: selectPersonInfo.employee,
onChange: ({ selected }) => {
this.setState({ selectPersonInfo: { ...selectPersonInfo, employee: selected } });
}
})
}
];
return (
<WeaDialog
{...this.props}
style={{ width: 900 }}
hasScroll
buttons={buttons}
>
<WeaSearchGroup title="基础信息" items={baseItems} showGroup col={1}/>
<WeaSearchGroup title="退差人员" items={returnPersonItems} col={1} showGroup/>
<WeaSearchGroup title="人员范围中排除" items={selectPersonItems} col={1} showGroup/>
</WeaDialog>
);
}
}
export default RegAddEmployee;
export const Picker = payload => {
const { label, onChange, value, viewAttr = 3, format = "YYYY-MM" } = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaDatePicker
format={format}
value={value}
viewAttr={viewAttr}
onChange={onChange}
/>
</WeaFormItem>
);
};
export const SelectWithAll = payload => {
const { label, onChange, value, valueAll, onChangeAll, options = [], viewAttr = 3, detailtype = 1 } = payload;
return (
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<div>
<WeaSelect
options={[{ key: "0", showname: "全部" }]}
detailtype={detailtype}
value={valueAll}
onChange={(selected, showName) => onChangeAll({ selected, showName })}
style={{ width: "inherit" }}
/>
<WeaSelect
options={options}
viewAttr={viewAttr}
detailtype={detailtype}
value={value}
onChange={(selected, showName) => onChange({ type: label, selected, showName })}
style={{ width: "inherit" }}
/>
</div>
</WeaFormItem>
);
};

View File

@ -0,0 +1,265 @@
/*
* Author: 黎永顺
* name:退差编辑页面
* Description:
* Date: 2022/11/23
*/
import React, { Component } from "react";
import { WeaInputNumber, WeaSearchGroup, WeaSlideModal, WeaTable } from "ecCom";
import { message } from "antd";
import * as API from "../../../../apis/standingBook";
import SlideModalTitle from "../../../../components/slideModalTitle";
import { regColumns } from "../constant";
class RegEditDetial extends Component {
constructor(props) {
super(props);
this.state = {
loading: false,
listMap: [
{
key: "social",
label: "社保",
dataSource: [],
columns: _.map(regColumns, item => {
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
return {
...item,
render: (text, record) => {
return (
<WeaInputNumber
precision={2}
value={text}
onChange={v => this.handleChange("social", item.dataIndex, v, record)}
/>
);
}
};
}
return { ...item };
})
},
{
key: "fund",
label: "公积金",
dataSource: [],
columns: _.map(regColumns, item => {
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
return {
...item,
render: (text, record) => {
return (
<WeaInputNumber
precision={2}
value={text}
onChange={v => this.handleChange("fund", item.dataIndex, v, record)}
/>
);
}
};
}
return { ...item };
})
},
{
key: "other",
label: "企业年金及其他福利",
dataSource: [],
columns: _.map(regColumns, item => {
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
return {
...item,
render: (text, record) => {
return (
<WeaInputNumber
precision={2}
value={text}
onChange={v => this.handleChange("other", item.dataIndex, v, record)}
/>
);
}
};
}
return { ...item };
})
}
]
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.editId !== this.props.editId && nextProps.editId) {
this.getPaymentById(nextProps.editId);
}
}
handleSave = () => {
const { editId, onCancel } = this.props;
const { listMap } = this.state;
const [socialData, foundData, otherData] = listMap;
let payload = {
id: editId,
socialPerJson: {},
socialComJson: {},
fundPerJson: {},
fundComJson: {},
otherPerJson: {},
otherComJson: {}
};
_.forEach(socialData.dataSource, item => {
payload["socialPerJson"][item["insuranceId"]] = item.personalPaymentAmount || "0";
payload["socialComJson"][item["insuranceId"]] = item.companyPaymentAmount || "0";
});
_.forEach(foundData.dataSource, item => {
payload["fundPerJson"][item["insuranceId"]] = item.personalPaymentAmount || "0";
payload["fundComJson"][item["insuranceId"]] = item.companyPaymentAmount || "0";
});
_.forEach(otherData.dataSource, item => {
payload["otherPerJson"][item["insuranceId"]] = item.personalPaymentAmount || "0";
payload["otherComJson"][item["insuranceId"]] = item.companyPaymentAmount || "0";
});
_.forEach(Object.keys(payload), item => {
payload[item] = JSON.stringify(payload[item]);
});
this.setState({ loading: true });
API.editAccount(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
onCancel();
} else {
message.error(errormsg || "保存成功");
}
});
};
handleChange = (type, dataIndex, value, record) => {
const { listMap } = this.state;
const [socialData, foundData, otherData] = listMap;
switch (type) {
case "social":
const sociallist = _.map(socialData.dataSource, item => {
if (item.insuranceId === record.insuranceId) {
return { ...item, [dataIndex]: !_.isNil(value) ? String(value): "0" };
}
return { ...item };
});
this.setState({
listMap: [{ ...socialData, dataSource: sociallist }, { ...foundData }, { ...otherData }]
});
break;
case "fund":
const fundlist = _.map(foundData.dataSource, item => {
if (item.insuranceId === record.insuranceId) {
return { ...item, [dataIndex]: !_.isNil(value) ? String(value): "0" };
}
return { ...item };
});
this.setState({
listMap: [{ ...socialData }, { ...foundData, dataSource: fundlist }, { ...otherData }]
});
break;
case "other":
const otherlist = _.map(otherData.dataSource, item => {
if (item.insuranceId === record.insuranceId) {
return { ...item, [dataIndex]: !_.isNil(value) ? String(value): "0" };
}
return { ...item };
});
this.setState({
listMap: [{ ...socialData }, { ...foundData }, { ...otherData, dataSource: otherlist }]
});
break;
default:
break;
}
};
getPaymentById = (id) => {
const payload = { id };
const { listMap } = this.state;
const [socialData, foundData, otherData] = listMap;
API.getPaymentById(payload).then(({ status, data }) => {
if (status) {
let socialSecurity = [], accumulationFund = [], otherBenefits = [];
const { data: result } = data;
_.map(result, it => {
if (it.title.indexOf("社保") !== -1) {
socialSecurity.push(it);
}
if (it.title.indexOf("公积金") !== -1) {
accumulationFund.push(it);
}
if (it.title.indexOf("其他") !== -1) {
otherBenefits.push(it);
}
});
const social = this.combinedData(socialSecurity, result);
const fund = this.combinedData(accumulationFund, result);
const other = this.combinedData(otherBenefits, result);
this.setState({
listMap: [{ ...socialData, dataSource: social }, { ...foundData, dataSource: fund }, {
...otherData,
dataSource: other
}]
});
}
});
};
combinedData = (data = []) => {
const fieldItems = _.map(data, item => item.insuranceName);
let result = [];
result = _.map(_.uniqWith(fieldItems, _.isEqual), item => {
let obj = { benefits: item };
_.forEach(data, it => {
if (item === it.insuranceName && it.paymentScope === "个人") {
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
} else if (item === it.insuranceName && it.paymentScope === "公司") {
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
}
});
return obj;
});
return result;
};
render() {
const { visible, title, onCancel } = this.props;
const { listMap, loading } = this.state;
return (
<WeaSlideModal
className="slideOuterWrapper"
visible={visible}
top={0}
width={48}
height={100}
direction="right"
measure="%"
title={
<SlideModalTitle
loading={loading}
subtitle={title}
showOperateBtn={true}
editable={true}
onSave={this.handleSave}
/>
}
content={
<div className="regEditContentWrapper">
{
_.map(listMap, item => {
const { key, label, dataSource, columns } = item;
return <WeaSearchGroup title={label} items={[]} needTigger showGroup key={key}>
<WeaTable dataSource={dataSource} columns={columns} pagination={false}/>
</WeaSearchGroup>;
})
}
</div>
}
onClose={onCancel}
showMask={true}
/>
);
}
}
export default RegEditDetial;

View File

@ -0,0 +1,158 @@
/*
* Author: 黎永顺
* name: 退差列表
* Description:
* Date: 2022/11/23
*/
import React, { Component } from "react";
import { WeaTable } from "ecCom";
import { getQueryString } from "../../../../util/url";
import * as API from "../../../../apis/standingBook";
import "./index.less";
class RegList extends Component {
constructor(props) {
super(props);
this.state = {
columns: [],
dataSource: [],
selectedRowKeys: [],
loading: {
query: false
},
pageInfo: {
current: 1,
pageSize: 10,
total: 0
}
};
}
componentDidMount() {
this.recessionList();
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible) {
this.recessionList();
}
}
handleResetSelectRowKeys = (selectedRowKeys) => {
this.setState({ selectedRowKeys });
};
recessionList = (module = {}) => {
const { loading, pageInfo } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const creator = Number(getQueryString("creator"));
const paymentStatus = "3";
const payload = {
billMonth, paymentStatus,
creator, paymentOrganization,
...pageInfo,
...module
};
this.setState({ loading: { ...loading, query: true } });
API.recessionList(payload).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
if (status) {
const { pageInfo: list } = data;
const { columns, list: dataSource, pageNum: current, pageSize, total } = list;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total },
dataSource,
columns: _.map(_.filter(columns, it => it.dataIndex !== "id"), items => {
if (items.dataIndex === "employeeId") {
return {
...items,
width: 110,
title: "姓名",
fixed: "left",
render: (text, r) => {
const { userName } = r;
return (
<span>{userName}</span>
);
}
};
}
return {
...items,
title: <span dangerouslySetInnerHTML={{ __html: items.title }}/>,
width: 120,
render: (text) => {
return <span className="tdEllipsis" title={text}>{text}</span>;
}
};
})
});
}
}).catch(() => {
this.setState({ loading: { ...loading, query: false } });
});
};
handleChangeRow = (selectedRowKeys) => {
const { onChangeRowkey } = this.props;
this.setState({ selectedRowKeys });
onChangeRowkey(selectedRowKeys);
};
render() {
const { loading, pageInfo, selectedRowKeys, dataSource, columns } = this.state;
const { onEdit } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${total}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
this.recessionList();
});
},
onChange: (current) => {
this.setState({ pageInfo: { ...pageInfo, current } }, () => {
this.recessionList();
});
}
};
const rowSelection = {
selectedRowKeys,
onChange: this.handleChangeRow
};
return (
<WeaTable
rowKey="id"
columns={[
...columns,
{
title: "操作",
dataIndex: "operate",
fixed: "right",
width: "120px",
render: (text, record) => {
return (
<div className="optWrapper">
<a
href="javascript:void(0);"
className="mr10"
onClick={() => onEdit(record)}
>编辑</a>
</div>
);
}
}
]}
dataSource={dataSource}
loading={loading.query}
pagination={pagination}
rowSelection={rowSelection}
scroll={{ x: 900 }}
/>
);
}
}
export default RegList;

View File

@ -0,0 +1,72 @@
import React, { Component } from "react";
import { Button } from "antd";
import { WeaHelpfulTip, WeaInputSearch, WeaTop } from "ecCom";
import { getQueryString } from "../../../../util/url";
class RegTop extends Component {
constructor(props) {
super(props);
this.state = {
name: ""
};
}
renderTopBtns = () => {
const { name } = this.state;
const { onChange, selectKey } = this.props;
const type = getQueryString("type");
let dom = [
<WeaHelpfulTip
title={
<div>
<div>提示</div>
<div>个人合计=社保个人合计+公积金个人合计+其他福利个人合计</div>
<div>单位合计=社保单位合计+公积金单位合计+其他福利单位合计</div>
<div>社保合计=社保个人合计+社保单位合计</div>
<div>公积金合计=公积金个人合计+公积金单位合计</div>
<div>其他福利合计=其他福利个人合计+其他福利单位合计</div>
<div>合计=社保合计+公积金合计+其他福利合计</div>
</div>
}
placement="bottomRight"
width={250}
/>,
<Button type="primary" size="small" onClick={() => onChange("export")}>
<span className="icon-coms02-coms2-export" title="导出全部"></span>
</Button>,
<WeaInputSearch
value={name}
style={{ width: 250 }}
placeholder="请输入员工姓名"
onChange={name => this.setState({ name })}
onSearch={() => onChange("search")}
/>
];
if (!type) {
const [dom1, ...extra] = dom;
dom = [
dom1,
<Button type="primary" size="small" disabled={_.isEmpty(selectKey)} onClick={() => onChange("delete")}>
<span className="icon-coms-form-delete-hot" title="删除"></span>
</Button>,
<Button type="primary" size="small" onClick={() => onChange("add")}>
<span className="icon-coms-Add-to-hot" title="添加"></span>
</Button>,
...extra
];
}
return dom;
};
render() {
const { billMonth } = this.props;
return (
<WeaTop
title={<span><span style={{ paddingRight: 10 }}>账单月份</span><span>{billMonth}</span></span>}
buttons={this.renderTopBtns()}
/>
);
}
}
export default RegTop;

View File

@ -0,0 +1,154 @@
/*
* Author: 黎永顺
* name: 退差组件
* Description:
* Date: 2022/11/22
*/
import React, { Component } from "react";
import { message, Modal } from "antd";
import RegTop from "./regTop";
import RegList from "./regList";
import RegAddEmployee from "./regAddEmployee";
import RegEditDetial from "./regEditDetial";
import { getQueryString } from "../../../../util/url";
import { calcPageNo } from "../../../../util";
import * as API from "../../../../apis/standingBook";
import "./index.less";
class Regression extends Component {
constructor(props) {
super(props);
this.state = {
selectKey: [],
returnPersonModal: {
title: "添加退差人员",
visible: false
},
returnEditPersonSlide: {
title: "",
editId: "",
visible: false
},
loading: { save: false }
};
this.regEmmployeeRef = null;
this.regListRef = null;
this.regTopRef = null;
}
delRecession = () => {
const { selectKey } = this.state;
API.delRecession(selectKey).then(({ status, errormsg }) => {
if (status) {
message.success("删除成功");
const current = calcPageNo(this.regListRef.state.pageInfo.total, this.regListRef.state.pageInfo.current, 10, selectKey.length);
this.regListRef.recessionList({ current });
this.regListRef.handleResetSelectRowKeys([]);
this.setState({ selectKey: [] });
} else {
message.error(errormsg || "删除失败");
}
});
};
handleSave = (params) => {
const { loading } = this.state;
const billMonth = getQueryString("billMonth");
const paymentOrganization = getQueryString("paymentOrganization");
const payload = {
...params,
billMonth,
paymentOrganization
};
this.setState({ loading: { ...loading, save: true } });
API.saveRecession(payload).then(({ status, errormsg }) => {
this.setState({ loading: { ...loading, save: false } });
if (status) {
message.success("操作成功。若退差月无核算明细,账单月则无法获取退差数据。");
this.handleCloseModal();
} else {
message.error(errormsg || "操作失败");
}
});
};
handleChangeOpt = (key) => {
const { returnPersonModal } = this.state;
const name = this.regTopRef.state.name;
const billMonth = getQueryString("billMonth");
const creator = Number(getQueryString("creator"));
const paymentOrganization = getQueryString("paymentOrganization");
switch (key) {
case "add":
this.setState({ returnPersonModal: { ...returnPersonModal, visible: true } });
break;
case "delete":
Modal.confirm({
title: "信息确认",
content: "删除人员本账单月将不包含该人员的退差数据!",
onOk: () => {
this.delRecession();
},
onCancel: () => {
}
});
break;
case "export":
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/recession/export?creator=${creator}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`;
window.open(url, "_self");
break;
case "search":
this.regListRef.recessionList({ userName: name });
break;
default:
break;
}
};
handleCloseModal = () => {
const { returnPersonModal, returnEditPersonSlide } = this.state;
this.setState({
returnPersonModal: { ...returnPersonModal, visible: false, title: "添加退差人员" },
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
}, () => {
this.regEmmployeeRef.handleReset();
});
};
handleEdit = (record) => {
const { userName, id: editId } = record;
const { returnEditPersonSlide } = this.state;
this.setState({
returnEditPersonSlide: { ...returnEditPersonSlide, visible: true, title: userName, editId }
});
};
render() {
const billMonth = getQueryString("billMonth");
const { returnPersonModal, returnEditPersonSlide, selectKey, loading } = this.state;
return (
<div className="regressionWrapper">
<RegTop
ref={dom => this.regTopRef = dom}
billMonth={billMonth}
onChange={this.handleChangeOpt}
selectKey={selectKey}
/>
<RegList
ref={dom => this.regListRef = dom}
visible={returnPersonModal.visible}
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
onEdit={this.handleEdit}
/>
{/*编辑弹框*/}
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
{/* 弹框 */}
<RegAddEmployee
ref={dom => this.regEmmployeeRef = dom}
{...returnPersonModal}
loading={loading}
onCancel={this.handleCloseModal}
onSave={this.handleSave}
/>
</div>
);
}
}
export default Regression;

View File

@ -30,3 +30,21 @@ export const archiveTabs = [
viewcondition: "OVERVIEW",
},
];
export const regColumns = [
{
title: '福利项',
dataIndex: 'benefits',
key: 'benefits',
},
{
title: '个人缴纳金额',
dataIndex: 'personalPaymentAmount',
key: 'personalPaymentAmount',
},
{
title: '单位缴纳金额',
dataIndex: 'companyPaymentAmount',
key: 'companyPaymentAmount',
},
];

View File

@ -10,6 +10,7 @@ import { WeaTab } from "ecCom";
import NormalIndex from "./components/normal";
import OverViewIndex from "./components/overView";
import AbnormalListIndex from "./components/abnormalList";
import Regression from "./components/regression";
@inject("standingBookStore")
@observer
@ -27,7 +28,6 @@ class StandingBookDetail extends Component {
}
componentDidMount() {
this.getTabList();
}
@ -39,6 +39,7 @@ class StandingBookDetail extends Component {
getTabList({ billMonth, paymentOrganization: this.paymentOrganization }).then(({ data }) => {
const { tabList, remarks, billMonth } = data;
let newTabList = tabList.filter(item => item.id != "2");
newTabList[newTabList.length - 2] = newTabList.splice(newTabList.length - 1, 1, newTabList[newTabList.length - 2])[0]
this.setState({
selectedKey: newTabList[0].id,
tabList: _.map(newTabList, it => ({ title: it.content, viewcondition: it.id })),
@ -72,6 +73,9 @@ class StandingBookDetail extends Component {
selectedKey === "4" &&
<OverViewIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
}
{
selectedKey === "5" && <Regression />
}
</div>
);
}

View File

@ -1,7 +1,7 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { Col, message, Modal, Row, Switch } from "antd";
import { WeaFormItem, WeaRightMenu, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
import { Button, Col, message, Modal, Row, Switch } from "antd";
import { WeaFormItem, WeaRightMenu, WeaSearchGroup, WeaTable, WeaTop, WeaInputSearch } from "ecCom";
import { renderNoright } from "../../util"; // 渲染form数据的方法因为多个页面都会使用所以抽的公共方法在util中
import EditModal from "./editModal";
import TipLabel from "../../components/TipLabel";
@ -14,6 +14,7 @@ export default class TaxAgent extends React.Component {
constructor(props) {
super(props);
this.state = {
name: '',
editModalProps: {
title: "新增个税扣缴义务人",
visible: false,
@ -28,7 +29,8 @@ export default class TaxAgent extends React.Component {
devolutionStatus: 0,
conditions: editConditions,
decentralizationConditions: decentralizationConditions,
permission: {}
permission: {},
syncLoading: false
};
}
@ -120,7 +122,7 @@ export default class TaxAgent extends React.Component {
this.setState(
{
conditions: [{ defaultshow: true, items: conditionMap }],
decentralizationConditions: [{ defaultshow: true, items: conditionMap }],
decentralizationConditions: [{ defaultshow: true, items: conditionMap }]
},
() => {
devolutionStatus === 1 ? getCondition(this.state.conditions) : getFormDecentralizationCondition(this.state.decentralizationConditions);
@ -268,6 +270,19 @@ export default class TaxAgent extends React.Component {
}
});
};
taxAgentRangeSync = () => {
const { taxAgentStore } = this.props;
const { taxAgentRangeSync, getTaxAgentList } = taxAgentStore;
this.setState({ syncLoading: true });
taxAgentRangeSync({}).then(({ status, data }) => {
this.setState({ syncLoading: false });
if (status) {
message.success(data || "操作成功");
getTaxAgentList();
}
});
};
render() {
const { taxAgentStore } = this.props;
@ -277,7 +292,9 @@ export default class TaxAgent extends React.Component {
devolutionStatus,
conditions,
decentralizationConditions,
permission
permission,
syncLoading,
name
} = this.state;
const {
loading,
@ -285,7 +302,8 @@ export default class TaxAgent extends React.Component {
dataSource,
columns,
doInit,
hasRight
hasRight,
getTaxAgentList
} = taxAgentStore;
if (!hasRight && !loading) {
@ -293,6 +311,16 @@ export default class TaxAgent extends React.Component {
return renderNoright();
}
const btns = [
<Button type="primary" onClick={this.taxAgentRangeSync} loading={syncLoading}>同步人员范围</Button>,
<WeaInputSearch
value={name}
style={{ width: 250 }}
placeholder="请输入个税扣缴义务人名称"
onChange={name => this.setState({ name })}
onSearch={() => getTaxAgentList({name})}
/>
];
const renderTipsLabel = () => {
const tipList = [
"1、个税扣缴义务人与档案中的个税扣缴义务人匹配修改个税扣缴义务人名称薪资档案的个税扣缴义务人数据同步更新",
@ -376,6 +404,7 @@ export default class TaxAgent extends React.Component {
title="个税扣缴义务人" // 文字
icon={<i className="icon-coms-fa"/>} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
buttons={btns}
showDropIcon={true}>
<Row
gutter={16}

View File

@ -332,7 +332,7 @@ export class calculateStore {
delete params[key];
}
}
return new Promise((resolve,reject) => {
return new Promise((resolve, reject) => {
API.acctResultList({ ...params }).then(res => {
if (res.status) {
let list = res.data.pageInfo.list ? res.data.pageInfo.list : [];
@ -366,11 +366,10 @@ export class calculateStore {
// 核算结果--薪资核算
@action
acctresultAccounting = (salaryAcctRecordId) => {
acctresultAccounting = (params) => {
return new Promise((resolve, reject) => {
API.acctresultAccounting({ salaryAcctRecordId }).then(res => {
API.acctresultAccounting(params).then(res => {
if (res.status) {
// message.success("核算成功")
resolve();
} else {
message.error(res.errormsg || "核算失败");
@ -449,7 +448,7 @@ export class calculateStore {
message.error(res.errormsg || "归档失败");
reject(res);
}
})
});
});
};
@ -662,6 +661,6 @@ export class calculateStore {
@action("更新薪资核算结果的锁定状态")
updateLockStatus = (params) => {
return API.updateLockStatus(params)
return API.updateLockStatus(params);
};
}

View File

@ -191,7 +191,7 @@ export class CumDeductStore {
pageSize
});
} else {
this.setSlideTableDataSource(list);
this.setSlideTableDataSource([]);
this.setSlidePageObj({
...this.slidePageObj,
total: 0

View File

@ -4,7 +4,6 @@ import { WeaForm, WeaTableNew } from "comsMobx";
import * as API from "../apis/taxAgent"; // 引入API接口文件
import { decentralizationConditions, editConditions } from "../pages/taxAgent/editConditions";
import { hasIconInTax } from "../apis/taxAgent";
const { TableStore } = WeaTableNew;
@ -91,6 +90,11 @@ export class TaxAgentStore {
@action setShowSearchAd = bool => (this.showSearchAd = bool);
@action("同步人员范围")
taxAgentRangeSync = params => {
return API.taxAgentRangeSync(params);
};
// 高级搜索 - 搜索
@action
doSearch = name => {