薪资核算页面表格替换antd4.x的table组件
This commit is contained in:
parent
e243085a0d
commit
67f0de658a
|
|
@ -63,7 +63,7 @@ export const exportCumDeductDetailList = (id, ids = "") => {
|
|||
"/api/bs/hrmsalary/addUpDeduction/exportDetail?accumulatedSpecialAdditionalDeductionId=" +
|
||||
id +
|
||||
"&ids=" +
|
||||
ids
|
||||
ids+ "&taxAgentId=" + taxAgentId
|
||||
).then((res) =>
|
||||
res.blob().then((blob) => {
|
||||
var filename = `累计专项附加扣除.xlsx`;
|
||||
|
|
|
|||
|
|
@ -58,12 +58,12 @@ export const getCumSituationDetailList = (params) => {
|
|||
};
|
||||
|
||||
//数据采集-累计情况-导出明细
|
||||
export const exportCumSituationDetailList = (id, ids = "") => {
|
||||
export const exportCumSituationDetailList = (id, ids = "", taxAgentId='') => {
|
||||
fetch(
|
||||
"/api/bs/hrmsalary/addUpSituation/exportDetail?accumulatedSituationId=" +
|
||||
id +
|
||||
"&ids=" +
|
||||
ids
|
||||
ids + "&taxAgentId=" + taxAgentId
|
||||
).then((res) =>
|
||||
res.blob().then((blob) => {
|
||||
var filename = `往期累计情况(工资、薪金).xlsx`;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export const exportOtherDeductDetailList = (id, ids) => {
|
|||
"/api/bs/hrmsalary/otherDeduction/exportDetail?otherTaxExemptDeductionId=" +
|
||||
id +
|
||||
"&ids=" +
|
||||
ids
|
||||
ids + "&taxAgentId=" + taxAgentId
|
||||
).then((res) =>
|
||||
res.blob().then((blob) => {
|
||||
var filename = `其他免税扣除.xlsx`;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import "./index.less";
|
|||
|
||||
export default class CustomTable extends React.Component {
|
||||
render() {
|
||||
const { loading, isWeaTable = true } = this.props;
|
||||
const { loading, isWeaTable = true, className } = this.props;
|
||||
return (
|
||||
<div>
|
||||
{loading
|
||||
|
|
@ -19,7 +19,7 @@ export default class CustomTable extends React.Component {
|
|||
<Spin />
|
||||
</div>
|
||||
: isWeaTable
|
||||
? <WeaTable {...this.props} />
|
||||
? <WeaTable {...this.props} className={className}/>
|
||||
: <Table
|
||||
{...this.props}
|
||||
className="wea-new-table antd-wrap"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import ImportModal from "../../../../components/importModal";
|
|||
import { Button, message } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import SelectFieldModal from "./selectFieldModal";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
|
||||
@inject("calculateStore")
|
||||
@observer
|
||||
|
|
@ -47,19 +48,19 @@ export default class AcctResultImportModal extends React.Component {
|
|||
handleFinish() {
|
||||
this.setState({ step: 0 });
|
||||
this.props.onCancel();
|
||||
const { calculateStore: { acctResultList } } = this.props;
|
||||
acctResultList(this.props.id);
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
}
|
||||
|
||||
// 关闭
|
||||
handleCancel() {
|
||||
this.setState({
|
||||
modalVisiable: false,
|
||||
step: 0
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 渲染第一步表单
|
||||
renderFormComponent() {
|
||||
return <Button onClick={() => {
|
||||
|
|
|
|||
|
|
@ -153,7 +153,18 @@ export default class CalculateDetail extends React.Component {
|
|||
progressVisible: false
|
||||
});
|
||||
message.success("核算完成");
|
||||
acctResultList({ salaryAcctRecordId: this.id });
|
||||
// acctResultList({ salaryAcctRecordId: this.id });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
} else if (!data.status) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
|
|
@ -200,7 +211,19 @@ export default class CalculateDetail extends React.Component {
|
|||
// 核算结果搜索
|
||||
handleSearch(params) {
|
||||
const { calculateStore: { acctResultList } } = this.props;
|
||||
acctResultList({ salaryAcctRecordId: this.id, ...params });
|
||||
// acctResultList({ salaryAcctRecordId: this.id, ...params });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...params,
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
@ -310,8 +333,7 @@ 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 employeeName={this.state.searchValue}/>}
|
||||
{acctResultImportVisiable &&
|
||||
<AcctResultImportModal
|
||||
visiable={acctResultImportVisiable}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.wea-tab{
|
||||
border-bottom: none!important;
|
||||
}
|
||||
.crumbsWrapper {
|
||||
display: inline-block;
|
||||
|
||||
|
|
@ -69,8 +71,8 @@
|
|||
|
||||
.tableWrapper {
|
||||
margin-top: 10px;
|
||||
max-height: calc(100vh - 120px);
|
||||
overflow: auto;
|
||||
height: calc(100vh - 161px);
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import SlideModalTitle from "../../components/slideModalTitle";
|
|||
import { getQueryString } from "../../util/url";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -28,55 +27,55 @@ export default class SalaryDetail extends React.Component {
|
|||
componentWillMount() {
|
||||
let id = getQueryString("id");
|
||||
this.id = id;
|
||||
const { calculateStore: { acctResultList, getSalarySobCycle } } = this.props;
|
||||
acctResultList({ salaryAcctRecordId: id }).then(res => {
|
||||
this.getColumns(res);
|
||||
});
|
||||
const { calculateStore: { getSalarySobCycle } } = this.props;
|
||||
getSalarySobCycle(id);
|
||||
}
|
||||
|
||||
// 获取列表的列
|
||||
getColumns = (column) => {
|
||||
const { calculateStore: { acctResultListColumns } } = this.props;
|
||||
let columns = toJS(acctResultListColumns) ? [...toJS(acctResultListColumns)] : [...column];
|
||||
columns = columns.filter(item => item.hide == "FALSE").map(item => {
|
||||
let result = { ...item };
|
||||
result.title = <span onClick={() => this.setState({ columnIndex: item.column })}>{item.text}</span>;
|
||||
result.dataIndex = item.column;
|
||||
result.oldWidth = result.width;
|
||||
result.width = "150px";
|
||||
if (result.children) {
|
||||
result.width = (result.children.length * 150) + "px";
|
||||
result.children.map(child => {
|
||||
child.title = <span onClick={() => this.setState({ columnIndex: child.column })}>{child.text}</span>;
|
||||
child.dataIndex = child.column;
|
||||
child.width = "150px";
|
||||
});
|
||||
}
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleClick, false);
|
||||
}
|
||||
|
||||
if (result.dataIndex === "taxAgentName" || result.dataIndex === "username" || result.dataIndex === "departmentName") {
|
||||
result.fixed = "left";
|
||||
result.render = (text) => {
|
||||
return <span title={text}>{text}</span>;
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleClick, false);
|
||||
this.timer && clearTimeout(this.timer);
|
||||
}
|
||||
|
||||
handleClick = ({ data }) => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const { type, data: { id, data: record } = {} } = data;
|
||||
if (type === "PR") {
|
||||
if (id === "EDIT") {
|
||||
this.handleEdit(record);
|
||||
} else if (id === "COLUMNINDEX") {
|
||||
this.setState({ columnIndex: record });
|
||||
} else if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = record;
|
||||
this.pageInfo = { current, pageSize };
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName,
|
||||
current, pageSize
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
columns.push({
|
||||
title: "操作",
|
||||
key: "cz",
|
||||
width: "100px",
|
||||
fixed: "right",
|
||||
render: (text, record) => {
|
||||
return <a onClick={() => {
|
||||
this.handleEdit(record);
|
||||
}}>编辑</a>;
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
columns
|
||||
});
|
||||
} else {
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
}
|
||||
};
|
||||
|
||||
// 编辑时间回调
|
||||
|
|
@ -95,32 +94,27 @@ export default class SalaryDetail extends React.Component {
|
|||
slideVisiable: false
|
||||
});
|
||||
saveAcctResult(this.recordId).then(() => {
|
||||
acctResultList({ salaryAcctRecordId: this.id });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
// acctResultList({ salaryAcctRecordId: this.id });
|
||||
});
|
||||
}
|
||||
|
||||
// 分页
|
||||
handleDataPageChange(current) {
|
||||
const { calculateStore: { acctResultList } } = this.props;
|
||||
acctResultList({ salaryAcctRecordId: this.id, employeeName: this.props.employeeName, ...this.pageInfo, current });
|
||||
}
|
||||
|
||||
handleShowSizeChange(pageInfo) {
|
||||
const { calculateStore: { acctResultList } } = this.props;
|
||||
acctResultList({ salaryAcctRecordId: this.id, employeeName: this.props.employeeName, ...pageInfo });
|
||||
}
|
||||
|
||||
render() {
|
||||
const { slideVisiable, columnIndex, columns } = this.state;
|
||||
const { slideVisiable, columnIndex } = this.state;
|
||||
const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const {
|
||||
acctResultListDateSource,
|
||||
acctResultListColumns,
|
||||
baseSalarySobCycle,
|
||||
acctResultListPageInfo,
|
||||
loading,
|
||||
columnDescList
|
||||
} = calculateStore;
|
||||
const { baseSalarySobCycle, columnDescList } = calculateStore;
|
||||
|
||||
return (
|
||||
<div className="salaryDetail">
|
||||
|
|
@ -129,7 +123,8 @@ export default class SalaryDetail extends React.Component {
|
|||
<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title={`薪资周期\n
|
||||
title={
|
||||
`薪资周期\n
|
||||
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
|
||||
税款所属期\n
|
||||
${baseSalarySobCycle.taxCycle}\n
|
||||
|
|
@ -148,48 +143,36 @@ export default class SalaryDetail extends React.Component {
|
|||
<span>{toJS(columnDescList)[columnIndex] && toJS(columnDescList)[columnIndex].formulaContent}</span>
|
||||
</div>
|
||||
<div className="tableWrapper">
|
||||
<CustomPaginationTable
|
||||
columnIndex={columnIndex}
|
||||
loading={loading}
|
||||
dataSource={acctResultListDateSource}
|
||||
columns={columns}
|
||||
total={acctResultListPageInfo.total}
|
||||
current={acctResultListPageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={(value) => {
|
||||
this.pageInfo.current = value;
|
||||
this.handleDataPageChange(value);
|
||||
}}
|
||||
isWeaTable={false}
|
||||
scroll={{ x: 1500 }}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</div>
|
||||
<WarningModal visible={this.state.visible} onCancel={() => {
|
||||
this.setState({ visible: false });
|
||||
}}/>
|
||||
{
|
||||
slideVisiable && <WeaSlideModal visible={slideVisiable}
|
||||
top={0}
|
||||
width={60}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={"编辑薪资"}
|
||||
editable={true}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onSave={() => this.handleEditSlideSave()}
|
||||
/>
|
||||
}
|
||||
content={<EditSalaryDetail id={this.recordId}/>}
|
||||
onClose={() => this.setState({ slideVisiable: false })}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({ slideVisiable: false })}/>
|
||||
slideVisiable &&
|
||||
<WeaSlideModal
|
||||
visible={slideVisiable}
|
||||
top={0}
|
||||
width={60}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={"编辑薪资"}
|
||||
editable={true}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onSave={() => this.handleEditSlideSave()}
|
||||
/>
|
||||
}
|
||||
content={<EditSalaryDetail id={this.recordId}/>}
|
||||
onClose={() => this.setState({ slideVisiable: false })}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({ slideVisiable: false })}/>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSe
|
|||
import { inject, observer } from "mobx-react";
|
||||
import "./index.less";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
|
||||
@inject("calculateStore", "salaryFileStore")
|
||||
@observer
|
||||
|
|
@ -17,7 +16,7 @@ export default class UserSure extends React.Component {
|
|||
employeeName: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
status: "",
|
||||
status: ""
|
||||
},
|
||||
selectedKey: "0",
|
||||
selectedRowKeys: [], // table 选中项
|
||||
|
|
@ -26,7 +25,6 @@ export default class UserSure extends React.Component {
|
|||
this.id = "";
|
||||
this.current = 1;
|
||||
this.pageInfo = { current: 1, pageSize: 10 };
|
||||
this.reducePageInfo = { current: 1, pageSize: 10 };
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
|
@ -35,21 +33,9 @@ export default class UserSure extends React.Component {
|
|||
const { calculateStore } = this.props;
|
||||
const {
|
||||
salaryacctGetForm,
|
||||
acctemployeeList,
|
||||
reducedemployeeList,
|
||||
getSalarySobCycle
|
||||
} = calculateStore;
|
||||
salaryacctGetForm(id);
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: 1
|
||||
});
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: 1
|
||||
});
|
||||
this.current = 1;
|
||||
getSalarySobCycle(id);
|
||||
}
|
||||
|
|
@ -117,30 +103,90 @@ export default class UserSure extends React.Component {
|
|||
);
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("message", this.handleClick, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("message", this.handleClick, false);
|
||||
}
|
||||
|
||||
handleClick = ({ data }) => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const { type, data: { id, data: record, extraId = "" } = {} } = data;
|
||||
let payload = {};
|
||||
if (type === "PC") {
|
||||
if (id === "SA") {
|
||||
payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
|
||||
} else if (id === "DELETE") {
|
||||
this.handleDeleteItem(record);
|
||||
} else if (id === "BATCHDELETE") {
|
||||
this.onSelectChange(record);
|
||||
} else if (id === "PAGEINFO") {
|
||||
const { pageNum: current, size: pageSize } = record;
|
||||
this.pageInfo = { current, pageSize };
|
||||
if (extraId === "SA") {
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current,
|
||||
pageSize
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
} else if (extraId === "MA") {
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "MA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current, pageSize
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 添加人员回调
|
||||
handleUserBrowserChange(ids) {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
if (ids && ids.length > 0) {
|
||||
let idList = ids.split(",");
|
||||
const {
|
||||
calculateStore: {
|
||||
saveAcctemployee,
|
||||
reducedemployeeList,
|
||||
acctemployeeList,
|
||||
checkTaxAgent
|
||||
}
|
||||
calculateStore: { saveAcctemployee, checkTaxAgent }
|
||||
} = this.props;
|
||||
saveAcctemployee(this.id, idList).then(() => {
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: 1
|
||||
});
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: 1
|
||||
});
|
||||
this.current = 1;
|
||||
message.success("添加成功");
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.pageInfo
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
checkTaxAgent(this.id);
|
||||
});
|
||||
}
|
||||
|
|
@ -148,25 +194,20 @@ export default class UserSure extends React.Component {
|
|||
|
||||
// 导出
|
||||
handleExport() {
|
||||
const {
|
||||
calculateStore: { exportReducedEmployee, exportAcctEmployee }
|
||||
} = this.props;
|
||||
let url = "";
|
||||
if (this.state.selectedKey == 0) {
|
||||
exportAcctEmployee(this.id);
|
||||
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/acctemployee/export?salaryAcctRecordId=${this.id}`;
|
||||
} else {
|
||||
exportReducedEmployee(this.id);
|
||||
url = `${window.location.origin}/api/bs/hrmsalary/salaryacct/reducedemployee/export?salaryAcctRecordId=${this.id}`;
|
||||
}
|
||||
window.open(url, "_self");
|
||||
}
|
||||
|
||||
// 批量删除
|
||||
handleBatchDelete() {
|
||||
const { selectedRowKeys } = this.state;
|
||||
const {
|
||||
calculateStore: {
|
||||
deleteAcctemployee,
|
||||
reducedemployeeList,
|
||||
acctemployeeList
|
||||
}
|
||||
calculateStore: { deleteAcctemployee }
|
||||
} = this.props;
|
||||
if (selectedRowKeys.length == 0) {
|
||||
message.warning("未选择条目");
|
||||
|
|
@ -176,17 +217,21 @@ export default class UserSure extends React.Component {
|
|||
title: "信息确认",
|
||||
content: "确认删除",
|
||||
onOk: () => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
deleteAcctemployee(this.id, selectedRowKeys).then(() => {
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: this.current
|
||||
});
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: this.current
|
||||
});
|
||||
message.success("删除成功");
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.pageInfo
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
|
|
@ -194,61 +239,28 @@ export default class UserSure extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
// 人员范围列表
|
||||
getUserListColumns = () => {
|
||||
const { calculateStore: { acctemployeeListColumns } } = this.props;
|
||||
let columns = [...acctemployeeListColumns];
|
||||
columns.push({
|
||||
key: "cz",
|
||||
title: "操作",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<a
|
||||
onClick={() => {
|
||||
this.handleDeleteItem(record);
|
||||
}}>
|
||||
删除
|
||||
</a>
|
||||
);
|
||||
}
|
||||
});
|
||||
return columns;
|
||||
};
|
||||
|
||||
// 获取人员列表,添加key
|
||||
getUserListDataSource = () => {
|
||||
const { calculateStore: { acctemployeeListDataSource } } = this.props;
|
||||
return acctemployeeListDataSource.map(item => {
|
||||
item = { ...item };
|
||||
item.key = item.id;
|
||||
return item;
|
||||
});
|
||||
};
|
||||
|
||||
// 删除人员
|
||||
handleDeleteItem = record => {
|
||||
const {
|
||||
calculateStore: {
|
||||
deleteAcctemployee,
|
||||
reducedemployeeList,
|
||||
acctemployeeList
|
||||
}
|
||||
calculateStore: { deleteAcctemployee }
|
||||
} = this.props;
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "确认删除",
|
||||
onOk: () => {
|
||||
deleteAcctemployee(this.id, [record.id]).then(() => {
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: this.current
|
||||
});
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: this.current
|
||||
});
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
|
|
@ -258,21 +270,23 @@ export default class UserSure extends React.Component {
|
|||
|
||||
// 刷新薪资核算人员的个税扣缴义务人
|
||||
handleRefresh = () => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const {
|
||||
calculateStore: { refreshTaxAgent, reducedemployeeList, acctemployeeList }
|
||||
calculateStore: { refreshTaxAgent }
|
||||
} = this.props;
|
||||
refreshTaxAgent(this.id).then(() => {
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: 1
|
||||
});
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: 1
|
||||
});
|
||||
this.current = 1;
|
||||
refreshTaxAgent(salaryAcctRecordId).then(() => {
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.pageInfo
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -280,88 +294,40 @@ export default class UserSure extends React.Component {
|
|||
this.setState({ selectedRowKeys, userListSearchValue: "" });
|
||||
};
|
||||
|
||||
// 核算人员范围分页
|
||||
handleUserListPageChange(value) {
|
||||
const { calculateStore: { acctemployeeList } } = this.props;
|
||||
this.current = value;
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.pageInfo
|
||||
});
|
||||
}
|
||||
|
||||
handleShowSizeChange(pageInfo) {
|
||||
const { calculateStore: { acctemployeeList } } = this.props;
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...pageInfo
|
||||
});
|
||||
}
|
||||
|
||||
// 环比减少人员分页
|
||||
handleReducedemployeeListPageChange(value) {
|
||||
const { calculateStore: { reducedemployeeList } } = this.props;
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
current: value
|
||||
});
|
||||
this.current = value;
|
||||
}
|
||||
|
||||
handleReduceShowSizeChange(pageInfo) {
|
||||
const { calculateStore: { reducedemployeeList } } = this.props;
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...pageInfo
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索
|
||||
handleUserListSearch=(value)=> {
|
||||
const {
|
||||
calculateStore: { acctemployeeList, reducedemployeeList }
|
||||
} = this.props;
|
||||
handleUserListSearch = (value) => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
this.pageInfo.current = 1;
|
||||
if (this.state.selectedKey == 0) {
|
||||
acctemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
...value,
|
||||
...this.pageInfo
|
||||
});
|
||||
this.current = 1;
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...value
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
} else {
|
||||
reducedemployeeList({
|
||||
salaryAcctRecordId: this.id,
|
||||
...value,
|
||||
...this.pageInfo
|
||||
});
|
||||
this.current = 1;
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "MA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...value
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedRowKeys, showSearchAd, selectedKey } = this.state;
|
||||
const { showSearchAd, selectedKey } = this.state;
|
||||
const { calculateStore } = this.props;
|
||||
const {
|
||||
calculateBaseForm,
|
||||
acctemployeeListDataSource,
|
||||
acctemployeeListColumns,
|
||||
reducedemployeeListDataSource,
|
||||
reducedemployeeListColumns,
|
||||
baseSalarySobCycle,
|
||||
acctemployeeListPageInfo,
|
||||
loading,
|
||||
reducedemployeeListPageInfo
|
||||
} = calculateStore;
|
||||
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange
|
||||
};
|
||||
const { calculateBaseForm, baseSalarySobCycle } = calculateStore;
|
||||
|
||||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
|
|
@ -377,7 +343,7 @@ export default class UserSure extends React.Component {
|
|||
employeeName: "",
|
||||
departmentIds: "",
|
||||
positionIds: "",
|
||||
status: "",
|
||||
status: ""
|
||||
}
|
||||
})}>
|
||||
重置
|
||||
|
|
@ -407,20 +373,11 @@ export default class UserSure extends React.Component {
|
|||
<Col span={6}>
|
||||
薪资所属月:<WeaHelpfulTip
|
||||
width={100}
|
||||
title={`薪资周期\n
|
||||
${baseSalarySobCycle.salaryCycle &&
|
||||
baseSalarySobCycle.salaryCycle
|
||||
.fromDate}至${baseSalarySobCycle.salaryCycle &&
|
||||
baseSalarySobCycle.salaryCycle.endDate}\n
|
||||
税款所属期\n
|
||||
${baseSalarySobCycle.taxCycle}\n
|
||||
考勤取值周期\n
|
||||
${baseSalarySobCycle.attendCycle &&
|
||||
baseSalarySobCycle.attendCycle
|
||||
.fromDate}至${baseSalarySobCycle.attendCycle &&
|
||||
baseSalarySobCycle.attendCycle.endDate}\n
|
||||
福利台账月份\n
|
||||
引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
|
||||
title={`薪资周期\n${baseSalarySobCycle.salaryCycle &&
|
||||
baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle &&
|
||||
baseSalarySobCycle.salaryCycle.endDate}\n税款所属期\n${baseSalarySobCycle.taxCycle}\n考勤取值周期\n${baseSalarySobCycle.attendCycle &&
|
||||
baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle &&
|
||||
baseSalarySobCycle.attendCycle.endDate}\n福利台账月份\n引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Col>
|
||||
|
|
@ -440,7 +397,6 @@ export default class UserSure extends React.Component {
|
|||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Row>
|
||||
|
|
@ -462,7 +418,20 @@ export default class UserSure extends React.Component {
|
|||
: "crumbItem"
|
||||
}
|
||||
onClick={() => {
|
||||
this.setState({ selectedKey: "0" });
|
||||
this.setState({ selectedKey: "0" }, () => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "SA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
|
||||
});
|
||||
}}>
|
||||
核算人员范围
|
||||
</span>
|
||||
|
|
@ -479,7 +448,20 @@ export default class UserSure extends React.Component {
|
|||
: "crumbItem"
|
||||
}
|
||||
onClick={() => {
|
||||
this.setState({ selectedKey: "1" });
|
||||
this.setState({ selectedKey: "1" }, () => {
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const payload = {
|
||||
type: "PC",
|
||||
listType: "MA",
|
||||
url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
});
|
||||
}}>
|
||||
环比上月减少人员
|
||||
</span>
|
||||
|
|
@ -491,7 +473,7 @@ export default class UserSure extends React.Component {
|
|||
</div>
|
||||
<div className="crumbsOperateWrapper">
|
||||
<WeaTab
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
searchType={selectedKey == 0 ? ["base", "advanced"] : []} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={(bool) => this.setState({ showSearchAd: bool })} //高级搜索面板受控
|
||||
searchsAd={renderSearch()} // 高级搜索内部数据getSearchs(form, toJS(condition), 2)
|
||||
|
|
@ -514,9 +496,10 @@ export default class UserSure extends React.Component {
|
|||
customized
|
||||
onChange={(ids, names, datas) =>
|
||||
this.handleUserBrowserChange(ids)}>
|
||||
<Icon type="plus-square" title="新增"
|
||||
className="iconItem"
|
||||
style={{ fontSize: 16 }}/>
|
||||
<Icon
|
||||
type="plus-square" title="新增"
|
||||
className="iconItem"
|
||||
style={{ fontSize: 16 }}/>
|
||||
</WeaBrowser>,
|
||||
<i
|
||||
className="icon-coms-fawen iconItem"
|
||||
|
|
@ -525,16 +508,25 @@ export default class UserSure extends React.Component {
|
|||
}}
|
||||
style={{ fontSize: 20, position: "relative", top: 2 }}
|
||||
title="导出"
|
||||
/>,
|
||||
/>
|
||||
// <i
|
||||
// className="icon-coms-Synchro iconItem"
|
||||
// onClick={() => {
|
||||
// this.handleRefresh();
|
||||
// }}
|
||||
// style={{ fontSize: 20, position: "relative", top: 2 }}
|
||||
// title="刷新"
|
||||
// />
|
||||
] : [
|
||||
<i
|
||||
className="icon-coms-Synchro iconItem"
|
||||
className="icon-coms-fawen iconItem"
|
||||
onClick={() => {
|
||||
this.handleRefresh();
|
||||
this.handleExport();
|
||||
}}
|
||||
style={{ fontSize: 20, position: "relative", top: 2 }}
|
||||
title="刷新"
|
||||
title="导出"
|
||||
/>
|
||||
] : []}
|
||||
]}
|
||||
searchsBasePlaceHolder={"请输入姓名"}
|
||||
onSearchChange={(v) =>
|
||||
this.setState({
|
||||
|
|
@ -547,97 +539,15 @@ export default class UserSure extends React.Component {
|
|||
searchsBaseValue={this.state.searchItemsValue.employeeName} // 外部input搜索值受控: 这里和高级搜索的requestname同步form.getFormParams().username
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/*<div className="crumbsOperateWrapper">*/}
|
||||
{/*{this.state.selectedKey == "0" &&*/}
|
||||
{/* <div className="headerIcon">*/}
|
||||
{/* <Icon*/}
|
||||
{/* className="iconItem"*/}
|
||||
{/* type="minus-square"*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* this.handleBatchDelete();*/}
|
||||
{/* }}*/}
|
||||
{/* title="批量删除"*/}
|
||||
{/* />*/}
|
||||
{/* <WeaBrowser*/}
|
||||
{/* type={17}*/}
|
||||
{/* title="添加人员"*/}
|
||||
{/* isSingle={false}*/}
|
||||
{/* customized*/}
|
||||
{/* onChange={(ids, names, datas) =>*/}
|
||||
{/* this.handleUserBrowserChange(ids)}>*/}
|
||||
{/* <Icon className="iconItem" type="plus-square" title="新增"/>*/}
|
||||
{/* </WeaBrowser>*/}
|
||||
{/* <i*/}
|
||||
{/* className="icon-coms-fawen iconItem"*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* this.handleExport();*/}
|
||||
{/* }}*/}
|
||||
{/* style={{ fontSize: 20, position: "relative" }}*/}
|
||||
{/* title="导出"*/}
|
||||
{/* />*/}
|
||||
{/* <i*/}
|
||||
{/* className="icon-coms-Synchro iconItem"*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* this.handleRefresh();*/}
|
||||
{/* }}*/}
|
||||
{/* style={{ fontSize: 20, position: "relative" }}*/}
|
||||
{/* title="刷新"*/}
|
||||
{/* />*/}
|
||||
{/* </div>}*/}
|
||||
{/*<WeaInputSearch*/}
|
||||
{/* className="searchInput"*/}
|
||||
{/* value={this.state.userListSearchValue}*/}
|
||||
{/* onChange={value => {*/}
|
||||
{/* this.setState({ userListSearchValue: value });*/}
|
||||
{/* }}*/}
|
||||
{/* onSearch={value => {*/}
|
||||
{/* this.handleUserListSearch(value);*/}
|
||||
{/* }}*/}
|
||||
{/*/>*/}
|
||||
{/*</div>*/}
|
||||
|
||||
|
||||
</div>
|
||||
<div className="tableWrapper">
|
||||
{this.state.selectedKey == 0 &&
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
rowSelection={rowSelection}
|
||||
dataSource={this.getUserListDataSource()}
|
||||
columns={this.getUserListColumns()}
|
||||
total={acctemployeeListPageInfo.total}
|
||||
current={acctemployeeListPageInfo.pageNum}
|
||||
pageSize={this.pageInfo.pageSize}
|
||||
onPageChange={value => {
|
||||
this.pageInfo.current = value;
|
||||
this.handleUserListPageChange(value);
|
||||
}}
|
||||
isWeaTable={false}
|
||||
scroll={{ y: "calc(100vh - 340px)" }}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
/>}
|
||||
{this.state.selectedKey == 1 &&
|
||||
<CustomPaginationTable
|
||||
isWeaTable={false}
|
||||
scroll={{ y: "calc(100vh - 340px)" }}
|
||||
dataSource={reducedemployeeListDataSource}
|
||||
columns={reducedemployeeListColumns}
|
||||
total={reducedemployeeListPageInfo.total}
|
||||
current={reducedemployeeListPageInfo.pageNum}
|
||||
pageSize={this.reducePageInfo.pageSize}
|
||||
onPageChange={value => {
|
||||
this.reducePageInfo.current = value;
|
||||
this.handleReducedemployeeListPageChange(value);
|
||||
}}
|
||||
onShowSizeChange={(current, pageSize) => {
|
||||
this.pageInfo = { current, pageSize };
|
||||
this.handleReduceShowSizeChange(this.pageInfo);
|
||||
}}
|
||||
/>}
|
||||
<div style={{ width: "100%", height: "calc(100vh - 261px)" }}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -185,19 +185,19 @@ 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>
|
||||
{/*<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>
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ export default class CumDeduct extends React.Component {
|
|||
} = this.props;
|
||||
setSlideVisiable(true);
|
||||
setCurrentRecord(record);
|
||||
getCumDeductDetailList(record.id);
|
||||
getCumDeductDetailList(record.id,{taxAgentId:record.taxAgentId});
|
||||
};
|
||||
|
||||
// 增加编辑功能,重写columns绑定事件
|
||||
|
|
@ -398,7 +398,7 @@ export default class CumDeduct extends React.Component {
|
|||
const {
|
||||
cumDeductStore: { exportCumDeductDetailList, currentRecord }
|
||||
} = this.props;
|
||||
exportCumDeductDetailList(currentRecord.id);
|
||||
exportCumDeductDetailList(currentRecord.id, '' , currentRecord.taxAgentId);
|
||||
};
|
||||
|
||||
const handleExportSelectedDetailClick = () => {
|
||||
|
|
@ -411,7 +411,8 @@ export default class CumDeduct extends React.Component {
|
|||
} = this.props;
|
||||
exportCumDeductDetailList(
|
||||
currentRecord.id,
|
||||
this.state.slideSelectedKey.join(",")
|
||||
this.state.slideSelectedKey.join(","),
|
||||
currentRecord.taxAgentId
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -187,22 +187,22 @@ 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.fetchCumDeductDetailList({
|
||||
declareMonth: [startDate, endDate],
|
||||
taxAgentId: v,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -1,46 +1,19 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
|
||||
import {
|
||||
Button,
|
||||
Table,
|
||||
DatePicker,
|
||||
Dropdown,
|
||||
Menu,
|
||||
Modal,
|
||||
message,
|
||||
Row,
|
||||
Col
|
||||
} from "antd";
|
||||
|
||||
import {
|
||||
WeaTop,
|
||||
WeaTab,
|
||||
WeaRightMenu,
|
||||
WeaRangePicker,
|
||||
WeaDatePicker,
|
||||
WeaSelect,
|
||||
WeaHelpfulTip,
|
||||
WeaSlideModal,
|
||||
WeaTable
|
||||
} from "ecCom";
|
||||
import { Button, Col, Dropdown, Menu, message, Row } from "antd";
|
||||
import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
|
||||
import moment from "moment";
|
||||
|
||||
import { renderNoright, getSearchs } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../../components/customTab";
|
||||
import ContentWrapper from "../../../components/contentWrapper";
|
||||
import { getSearchs, renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import ImportModal from "../../../components/importModal";
|
||||
import { modalColumns } from "./columns";
|
||||
import { optionAddAll } from "../../../util/options";
|
||||
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
import "./index.less";
|
||||
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import EditSlideContent from "./editSlideContent";
|
||||
|
||||
|
||||
@inject("cumSituationStore", "taxAgentStore")
|
||||
@observer
|
||||
export default class CumSituation extends React.Component {
|
||||
|
|
@ -172,7 +145,7 @@ export default class CumSituation extends React.Component {
|
|||
} = this.props;
|
||||
setSlideVisiable(true);
|
||||
setCurrentRecord(record);
|
||||
getCumDeductDetailList(record.id);
|
||||
getCumDeductDetailList(record.id, { taxAgentId: record.taxAgentId });
|
||||
};
|
||||
|
||||
// 增加编辑功能,重写columns绑定事件
|
||||
|
|
@ -209,7 +182,7 @@ export default class CumSituation extends React.Component {
|
|||
</a>
|
||||
);
|
||||
default:
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }} />;
|
||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||
}
|
||||
};
|
||||
return newColumn;
|
||||
|
|
@ -340,7 +313,7 @@ export default class CumSituation extends React.Component {
|
|||
const topTab = [];
|
||||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div />;
|
||||
return <div/>;
|
||||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
|
|
@ -407,7 +380,7 @@ export default class CumSituation extends React.Component {
|
|||
const {
|
||||
cumSituationStore: { exportCumSituationDetailList, currentRecord }
|
||||
} = this.props;
|
||||
exportCumSituationDetailList(currentRecord.id);
|
||||
exportCumSituationDetailList(currentRecord.id, "", currentRecord.taxAgentId);
|
||||
};
|
||||
|
||||
const handleExportSelectedDetailClick = () => {
|
||||
|
|
@ -420,7 +393,8 @@ export default class CumSituation extends React.Component {
|
|||
} = this.props;
|
||||
exportCumSituationDetailList(
|
||||
currentRecord.id,
|
||||
this.state.slideSelectedKey.join(",")
|
||||
this.state.slideSelectedKey.join(","),
|
||||
currentRecord.taxAgentId
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -508,7 +482,7 @@ export default class CumSituation extends React.Component {
|
|||
<WeaRightMenu datas={rightMenu}>
|
||||
<WeaTop
|
||||
title="往期累计情况(工资、薪金)" // 文字
|
||||
icon={<i className="icon-coms-meeting" />} // 左侧图标
|
||||
icon={<i className="icon-coms-meeting"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={true} // 是否显示下拉按钮
|
||||
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
|
|
|
|||
|
|
@ -186,19 +186,19 @@ 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>
|
||||
{/*<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>
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ export default class OtherDeduct extends React.Component {
|
|||
|
||||
<div className="helperWrapper">
|
||||
<WeaHelpfulTip
|
||||
title="<div>提示:默认显示本年截至当前月所有员工申报的累计专项附加及其他扣除额</div>"
|
||||
title="<div>提示:默认显示当前月所有员工申报的其他免税扣除额</div>"
|
||||
placement="bottom"
|
||||
width={200}
|
||||
/>
|
||||
|
|
@ -147,7 +147,7 @@ export default class OtherDeduct extends React.Component {
|
|||
} = this.props;
|
||||
setSlideVisiable(true);
|
||||
setCurrentRecord(record);
|
||||
getOtherDeductDetailList(record.id);
|
||||
getOtherDeductDetailList(record.id,{taxAgentId:record.taxAgentId});
|
||||
};
|
||||
|
||||
// 增加编辑功能,重写columns绑定事件
|
||||
|
|
@ -330,12 +330,6 @@ export default class OtherDeduct extends React.Component {
|
|||
</Button>
|
||||
];
|
||||
|
||||
const topTab = [];
|
||||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div />;
|
||||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
// const { otherDeductStore: { exportOtherDeductList } } = this.props;
|
||||
// exportOtherDeductList();
|
||||
|
|
|
|||
|
|
@ -1,111 +1,111 @@
|
|||
import React from 'react'
|
||||
import { Table, Icon } from 'antd'
|
||||
import { WeaTable } from 'ecCom'
|
||||
import { slideStep4Columns} from './columns'
|
||||
import "./index.less"
|
||||
import RuleEditModal from './step4/RuleEditModal'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import React from "react";
|
||||
import { Icon } from "antd";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { slideStep4Columns } from "./columns";
|
||||
import "./index.less";
|
||||
import RuleEditModal from "./step4/RuleEditModal";
|
||||
import { inject, observer } from "mobx-react";
|
||||
|
||||
@inject('ledgerStore')
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
export default class CalRulesForm extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
modalVisible: false,
|
||||
slideStep4Columns: slideStep4Columns.map(item => {
|
||||
item = {...item}
|
||||
if(item.key == "cz") {
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<a onClick={() => {
|
||||
this.handleDeleteItem(record)
|
||||
}}>删除</a>
|
||||
)
|
||||
}
|
||||
}
|
||||
return item
|
||||
})
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
modalVisible: false,
|
||||
slideStep4Columns: slideStep4Columns.map(item => {
|
||||
item = { ...item };
|
||||
if (item.key == "cz") {
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<a onClick={() => {
|
||||
this.handleDeleteItem(record);
|
||||
}}>删除</a>
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
return item;
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { ledgerStore: { listAdjustmentRule }} = this.props;
|
||||
listAdjustmentRule()
|
||||
}
|
||||
componentWillMount() {
|
||||
const { ledgerStore: { listAdjustmentRule } } = this.props;
|
||||
listAdjustmentRule();
|
||||
}
|
||||
|
||||
handleSave(params) {
|
||||
const { ledgerStore: {sobItemRuleDataSource, setSobItemRuleDataSource}} = this.props;
|
||||
let dataSource = [...sobItemRuleDataSource]
|
||||
dataSource.push(params)
|
||||
setSobItemRuleDataSource(dataSource)
|
||||
}
|
||||
|
||||
handleDeleteItem(record) {
|
||||
const { ledgerStore: {sobItemRuleDataSource, setSobItemRuleDataSource}} = this.props;
|
||||
let dataSource = [...sobItemRuleDataSource]
|
||||
setSobItemRuleDataSource(dataSource.filter(item => item.salaryItemId != record.key))
|
||||
}
|
||||
handleSave(params) {
|
||||
const { ledgerStore: { sobItemRuleDataSource, setSobItemRuleDataSource } } = this.props;
|
||||
let dataSource = [...sobItemRuleDataSource];
|
||||
dataSource.push(params);
|
||||
setSobItemRuleDataSource(dataSource);
|
||||
}
|
||||
|
||||
convertAdjustmentType(index) {
|
||||
let nameList = ['取调整后薪资', '分段计薪', '取平均']
|
||||
return nameList[Number(index) - 1]
|
||||
}
|
||||
handleDeleteItem(record) {
|
||||
const { ledgerStore: { sobItemRuleDataSource, setSobItemRuleDataSource } } = this.props;
|
||||
let dataSource = [...sobItemRuleDataSource];
|
||||
setSobItemRuleDataSource(dataSource.filter(item => item.salaryItemId != record.key));
|
||||
}
|
||||
|
||||
getSalaryItemName(salaryItemId) {
|
||||
const { ledgerStore: {ruleOptionList}} = this.props;
|
||||
let result = ""
|
||||
ruleOptionList.map(item => {
|
||||
if(item.key == salaryItemId) {
|
||||
result = item.showname
|
||||
}
|
||||
})
|
||||
return result;
|
||||
}
|
||||
convertAdjustmentType(index) {
|
||||
let nameList = ["取调整后薪资", "分段计薪", "取平均"];
|
||||
return nameList[Number(index) - 1];
|
||||
}
|
||||
|
||||
convertDataSource(dataSoruce) {
|
||||
let result = [...dataSoruce];
|
||||
return result.map(item => {
|
||||
let resultStr = "";
|
||||
resultStr += `${item.dayOfMonth}号(含)之前调薪,${this.convertAdjustmentType(item.beforeAdjustmentType)};${item.dayOfMonth}号之后调薪,${this.convertAdjustmentType(item.afterAdjustmentType)}`
|
||||
return {
|
||||
key: item.salaryItemId,
|
||||
salaryItemId: item.salaryItemId,
|
||||
salaryItemName: item.salaryItemName ? item.salaryItemName : this.getSalaryItemName(item.salaryItemId),
|
||||
rule: resultStr
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const { ledgerStore: {sobItemRuleDataSource,baseInfoRequest}} = this.props;
|
||||
const { canEdit="true" } = baseInfoRequest;
|
||||
let datas = this.convertDataSource(sobItemRuleDataSource)
|
||||
return (
|
||||
<div className="calRulesForm">
|
||||
<div className="headerIcon">
|
||||
{
|
||||
canEdit ==='true'&&
|
||||
<Icon className="iconItem" type="plus-square" onClick={() => {
|
||||
this.setState({modalVisible: true})
|
||||
}}/>
|
||||
}
|
||||
</div>
|
||||
<div className="tableWrapper">
|
||||
<WeaTable dataSource={datas} columns={this.state.slideStep4Columns} pagination={false}/>
|
||||
</div>
|
||||
getSalaryItemName(salaryItemId) {
|
||||
const { ledgerStore: { ruleOptionList } } = this.props;
|
||||
let result = "";
|
||||
ruleOptionList.map(item => {
|
||||
if (item.key == salaryItemId) {
|
||||
result = item.showname;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
{
|
||||
this.state.modalVisible && <RuleEditModal
|
||||
visible={this.state.modalVisible}
|
||||
onCancel={() => this.setState({modalVisible: false})}
|
||||
onSave={(params) => {
|
||||
this.handleSave(params)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
convertDataSource(dataSoruce) {
|
||||
let result = [...dataSoruce];
|
||||
return result.map(item => {
|
||||
let resultStr = "";
|
||||
resultStr += `${item.dayOfMonth}号(含)之前调薪,${this.convertAdjustmentType(item.beforeAdjustmentType)};${item.dayOfMonth}号之后调薪,${this.convertAdjustmentType(item.afterAdjustmentType)}`;
|
||||
return {
|
||||
key: item.salaryItemId,
|
||||
salaryItemId: item.salaryItemId,
|
||||
salaryItemName: item.salaryItemName ? item.salaryItemName : this.getSalaryItemName(item.salaryItemId),
|
||||
rule: resultStr
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
const { ledgerStore: { sobItemRuleDataSource, baseInfoRequest } } = this.props;
|
||||
const { canEdit = "true" } = baseInfoRequest;
|
||||
let datas = this.convertDataSource(sobItemRuleDataSource);
|
||||
return (
|
||||
<div className="calRulesForm">
|
||||
<div className="headerIcon">
|
||||
{
|
||||
canEdit === "true" &&
|
||||
<Icon className="iconItem" type="plus-square" onClick={() => {
|
||||
this.setState({ modalVisible: true });
|
||||
}}/>
|
||||
}
|
||||
</div>
|
||||
<div className="tableWrapper">
|
||||
<WeaTable dataSource={datas} columns={this.state.slideStep4Columns} pagination={false}/>
|
||||
</div>
|
||||
|
||||
{
|
||||
this.state.modalVisible && <RuleEditModal
|
||||
visible={this.state.modalVisible}
|
||||
onCancel={() => this.setState({ modalVisible: false })}
|
||||
onSave={(params) => {
|
||||
this.handleSave(params);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@
|
|||
}
|
||||
|
||||
.tableItemWrapper {
|
||||
margin-top: 10px;
|
||||
|
||||
.rightBtnsWrapper {
|
||||
float: right;
|
||||
|
|
@ -118,6 +117,7 @@
|
|||
.iconItem {
|
||||
margin-right: 10px;
|
||||
color: #2db7f5;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -134,6 +134,7 @@
|
|||
|
||||
.headerIcon {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
.iconItem {
|
||||
margin-right: 10px;
|
||||
|
|
@ -196,17 +197,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
.copyModalWrapper{
|
||||
.ant-modal-body{
|
||||
.copyModalWrapper {
|
||||
.ant-modal-body {
|
||||
padding-left: 150px;
|
||||
}
|
||||
.wea-select{
|
||||
|
||||
.wea-select {
|
||||
width: 200px;
|
||||
.ant-select-show-search{
|
||||
|
||||
.ant-select-show-search {
|
||||
width: 100%;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
.ant-select-selection{
|
||||
|
||||
.ant-select-selection {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
|
|
|
|||
|
|
@ -1,184 +1,197 @@
|
|||
import React from 'react'
|
||||
import { Row, Col, Radio, Button, Modal, message } from 'antd'
|
||||
import { WeaSelect, WeaHelpfulTip} from 'ecCom'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import {daysOptions} from "../options"
|
||||
import RequiredLabelTip from '../../../components/requiredLabelTip';
|
||||
import { notNull } from '../../../util/validate';
|
||||
import React from "react";
|
||||
import { Button, Col, message, Radio, Row } from "antd";
|
||||
import { WeaDialog, WeaHelpfulTip, WeaSelect } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { daysOptions } from "../options";
|
||||
import RequiredLabelTip from "../../../components/requiredLabelTip";
|
||||
import { notNull } from "../../../util/validate";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
@inject('ledgerStore')
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
export default class RuleEditModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
itemValue: "",
|
||||
effectiveDate: "",
|
||||
beforeAdjustmentType: 1,
|
||||
afterAdjustmentType: 1,
|
||||
initedSelect: false
|
||||
}
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
itemValue: "",
|
||||
effectiveDate: "",
|
||||
beforeAdjustmentType: 1,
|
||||
afterAdjustmentType: 1,
|
||||
initedSelect: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { ledgerStore: { listSalarySobItem } } = this.props;
|
||||
listSalarySobItem().then(() => {
|
||||
this.setState({
|
||||
initedSelect: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
beforeAdjustmentTypeChange(e) {
|
||||
this.setState({ beforeAdjustmentType: e.target.value });
|
||||
}
|
||||
|
||||
afterAdjustmentTypeChange(e) {
|
||||
this.setState({ afterAdjustmentType: e.target.value });
|
||||
}
|
||||
|
||||
validateForm() {
|
||||
const { itemValue, effectiveDate, beforeAdjustmentType, afterAdjustmentType } = this.state;
|
||||
if (!notNull(itemValue)) {
|
||||
message.warning("薪资项目不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { ledgerStore: {listSalarySobItem}} = this.props;
|
||||
listSalarySobItem().then(() => {
|
||||
this.setState({
|
||||
initedSelect: true
|
||||
})
|
||||
})
|
||||
if (!notNull(effectiveDate)) {
|
||||
message.warning("计薪规则不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
beforeAdjustmentTypeChange(e) {
|
||||
this.setState({beforeAdjustmentType: e.target.value})
|
||||
if (!notNull(beforeAdjustmentType)) {
|
||||
message.warning("计薪规则不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
afterAdjustmentTypeChange(e) {
|
||||
this.setState({afterAdjustmentType: e.target.value})
|
||||
if (!notNull(afterAdjustmentType)) {
|
||||
message.warning("计薪规则不能为空");
|
||||
return false;
|
||||
}
|
||||
|
||||
validateForm() {
|
||||
const {itemValue, effectiveDate, beforeAdjustmentType, afterAdjustmentType} = this.state;
|
||||
if(!notNull(itemValue)) {
|
||||
message.warning("薪资项目不能为空")
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!notNull(effectiveDate)) {
|
||||
message.warning("计薪规则不能为空")
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!notNull(beforeAdjustmentType)) {
|
||||
message.warning("计薪规则不能为空")
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!notNull(afterAdjustmentType)) {
|
||||
message.warning("计薪规则不能为空")
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
handleSave() {
|
||||
if (!this.validateForm()) {
|
||||
return;
|
||||
}
|
||||
|
||||
handleSave() {
|
||||
if(!this.validateForm()) {
|
||||
return;
|
||||
}
|
||||
const { ledgerStore } = this.props;
|
||||
const { ruleOptionList } = ledgerStore;
|
||||
let salaryItemName = ""
|
||||
ruleOptionList.map(item => {
|
||||
if(item.key == this.state.itemValue) {
|
||||
salaryItemName = item.showname
|
||||
}
|
||||
})
|
||||
const { ledgerStore } = this.props;
|
||||
const { ruleOptionList } = ledgerStore;
|
||||
let salaryItemName = "";
|
||||
ruleOptionList.map(item => {
|
||||
if (item.key == this.state.itemValue) {
|
||||
salaryItemName = item.showname;
|
||||
}
|
||||
});
|
||||
|
||||
this.props.onSave({
|
||||
salaryItemId:this.state.itemValue,
|
||||
dayOfMonth:this.state.effectiveDate,
|
||||
beforeAdjustmentType:this.state.beforeAdjustmentType,
|
||||
afterAdjustmentType: this.state.afterAdjustmentType,
|
||||
salaryItemName
|
||||
})
|
||||
this.props.onSave({
|
||||
salaryItemId: this.state.itemValue,
|
||||
dayOfMonth: this.state.effectiveDate,
|
||||
beforeAdjustmentType: this.state.beforeAdjustmentType,
|
||||
afterAdjustmentType: this.state.afterAdjustmentType,
|
||||
salaryItemName
|
||||
});
|
||||
|
||||
this.props.onCancel()
|
||||
}
|
||||
render() {
|
||||
const { ledgerStore } = this.props;
|
||||
const { ruleOptionList } = ledgerStore;
|
||||
const { beforeAdjustmentType, afterAdjustmentType, initedSelect } = this.state
|
||||
return (
|
||||
<Modal visible={this.props.visible} onCancel={() => {
|
||||
this.props.onCancel()
|
||||
}} width={800}
|
||||
footer={<Button type="primary" onClick={() => {
|
||||
this.handleSave()
|
||||
}}>保存</Button>}
|
||||
title="调薪计薪规则项"
|
||||
>
|
||||
<div style={{padding: '20px'}}>
|
||||
<Row style={{lineHeight: '40px'}}>
|
||||
<Col span={8}>薪资项目<RequiredLabelTip /></Col>
|
||||
<Col span={16}>
|
||||
{
|
||||
initedSelect &&
|
||||
<WeaSelect style={{width: "200px"}} options={ruleOptionList} value={this.state.itemValue} onChange={(value) => {
|
||||
this.setState({itemValue: value})
|
||||
} } />
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{lineHeight: "40px"}}>
|
||||
<Col span={8}>计薪规则<RequiredLabelTip /></Col>
|
||||
<Col span={16}>
|
||||
<div>
|
||||
<WeaHelpfulTip
|
||||
style={{marginLeft: '10px'}}
|
||||
width={200}
|
||||
title="该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算"
|
||||
placement="topLeft"
|
||||
/>
|
||||
如果:调薪生效日期在
|
||||
<WeaSelect style={{width: '100px'}} options={daysOptions} value={this.state.effectiveDate} onChange={(value) => {
|
||||
this.setState({effectiveDate: value})
|
||||
}}/>
|
||||
this.props.onCancel();
|
||||
}
|
||||
|
||||
(含)之前
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
计薪规则为:
|
||||
<Radio.Group onChange={(value) => {
|
||||
this.beforeAdjustmentTypeChange(value)
|
||||
}} value={beforeAdjustmentType}>
|
||||
<Radio value={1}>取调整后薪资</Radio>
|
||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||
style={{marginLeft: "10px"}}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
placement="topLeft"
|
||||
/></Radio>
|
||||
<Radio value={3}>取平均<WeaHelpfulTip
|
||||
style={{marginLeft:"10px"}}
|
||||
width={200}
|
||||
title="=(调整前薪资+调整后薪资)/2"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
<div>
|
||||
否则:调薪生效日期在 {this.state.effectiveDate} 号之后
|
||||
</div>
|
||||
<div>
|
||||
计薪规则为:
|
||||
<Radio.Group onChange={(value) => {
|
||||
this.afterAdjustmentTypeChange(value)
|
||||
}} value={afterAdjustmentType}>
|
||||
<Radio value={1}>取调整前薪资</Radio>
|
||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||
style={{marginLeft: "10px"}}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
placement="topLeft"
|
||||
/></Radio>
|
||||
<Radio value={3}>取平均<WeaHelpfulTip
|
||||
style={{marginLeft: "10px"}}
|
||||
width={200}
|
||||
title="=(调整前薪资+调整后薪资)/2"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { ledgerStore } = this.props;
|
||||
const { ruleOptionList } = ledgerStore;
|
||||
const { beforeAdjustmentType, afterAdjustmentType, initedSelect } = this.state;
|
||||
return (
|
||||
<WeaDialog
|
||||
style={{ width: 800 }}
|
||||
initLoadCss
|
||||
title="调薪计薪规则项"
|
||||
visible={this.props.visible}
|
||||
onCancel={() => {
|
||||
this.props.onCancel();
|
||||
}}
|
||||
className="rule-modal-wrapper"
|
||||
footer={<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
this.handleSave();
|
||||
}}>保存</Button>}
|
||||
>
|
||||
<div style={{ padding: "20px" }}>
|
||||
<Row style={{ lineHeight: "40px" }}>
|
||||
<Col span={8}>薪资项目<RequiredLabelTip/></Col>
|
||||
<Col span={16}>
|
||||
{
|
||||
initedSelect &&
|
||||
<WeaSelect
|
||||
style={{ width: "200px" }}
|
||||
options={ruleOptionList}
|
||||
value={this.state.itemValue}
|
||||
onChange={(value) => {
|
||||
this.setState({ itemValue: value });
|
||||
}}/>
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style={{ lineHeight: "40px" }}>
|
||||
<Col span={8}>计薪规则<RequiredLabelTip/></Col>
|
||||
<Col span={16}>
|
||||
<div className="item">
|
||||
<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算"
|
||||
placement="topLeft"
|
||||
/>
|
||||
<span style={{ margin: "0 10px" }}>如果:调薪生效日期在</span>
|
||||
<WeaSelect
|
||||
style={{ width: "100px" }}
|
||||
options={daysOptions}
|
||||
value={this.state.effectiveDate}
|
||||
onChange={(value) => {
|
||||
this.setState({ effectiveDate: value });
|
||||
}}/>
|
||||
<span>(含)之前</span>
|
||||
</div>
|
||||
<div>
|
||||
计薪规则为:
|
||||
<Radio.Group onChange={(value) => {
|
||||
this.beforeAdjustmentTypeChange(value);
|
||||
}} value={beforeAdjustmentType}>
|
||||
<Radio value={1}>取调整后薪资</Radio>
|
||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
placement="topLeft"
|
||||
/></Radio>
|
||||
<Radio value={3}>取平均<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=(调整前薪资+调整后薪资)/2"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
<div>
|
||||
否则:调薪生效日期在 {this.state.effectiveDate} 号之后
|
||||
</div>
|
||||
<div>
|
||||
计薪规则为:
|
||||
<Radio.Group onChange={(value) => {
|
||||
this.afterAdjustmentTypeChange(value);
|
||||
}} value={afterAdjustmentType}>
|
||||
<Radio value={1}>取调整前薪资</Radio>
|
||||
<Radio value={2}>分段计薪<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
placement="topLeft"
|
||||
/></Radio>
|
||||
<Radio value={3}>取平均<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=(调整前薪资+调整后薪资)/2"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
.rule-modal-wrapper{
|
||||
.ant-select{
|
||||
width: 100%;
|
||||
.ant-select-selection{
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
.item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
|
@ -560,6 +560,7 @@ export default class SalaryFile extends React.Component {
|
|||
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
className="wea-antd-wrapper"
|
||||
rowSelection={rowSelection}
|
||||
columns={this.getColumns()}
|
||||
dataSource={dataSource}
|
||||
|
|
|
|||
|
|
@ -77,3 +77,15 @@
|
|||
padding-right: 291px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-antd-wrapper {
|
||||
.ant-table-fixed {
|
||||
tbody {
|
||||
tr > td:nth-child(2) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ export default class FormalFormModal extends React.Component {
|
|||
</Col>
|
||||
<Col span={12} className='dataList-wrapper'>
|
||||
<WeaFormItem
|
||||
label="数据源"
|
||||
label="外部数据源"
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 18 }}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker, Dropdown, Menu, Modal, Switch } from "antd";
|
||||
import { Button, Dropdown, Menu, Modal, Switch } from "antd";
|
||||
import { WeaInputSearch, WeaRightMenu, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
|
|
@ -11,9 +11,6 @@ import CustomSalaryItemSlide from "./customSalaryItemSlide";
|
|||
import DeleteSalaryItemModal from "./deleteSalaryItemModal";
|
||||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
|
||||
const { MonthPicker } = DatePicker;
|
||||
|
||||
|
||||
@inject("salaryItemStore", "taxAgentStore")
|
||||
@observer
|
||||
export default class SalaryItem extends React.Component {
|
||||
|
|
@ -79,7 +76,7 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
// 增加编辑功能,重写columns绑定事件
|
||||
getColumns = () => {
|
||||
const { salaryItemStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { salaryItemStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn } } = this.props;
|
||||
const { tableColumns } = salaryItemStore;
|
||||
let columns = tableColumns.map(column => {
|
||||
let newColumn = column;
|
||||
|
|
@ -107,11 +104,10 @@ export default class SalaryItem extends React.Component {
|
|||
return (
|
||||
<a onClick={() => {
|
||||
this.onEditItem(record, true);
|
||||
}}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||
}}>{(showOperateBtn || showSalaryItemBtn) ? "编辑" : "查看"}</a>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
columns.push({
|
||||
title: "",
|
||||
key: "moreOperate",
|
||||
|
|
@ -134,31 +130,15 @@ export default class SalaryItem extends React.Component {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
return columns;
|
||||
};
|
||||
|
||||
|
||||
// onOperatesClick = (record, index, operate, flag) => {
|
||||
|
||||
// switch(operate.index.toString()){
|
||||
// case '0': // 编辑
|
||||
// this.onEditItem(record, true);
|
||||
// break;
|
||||
// case "1": // 删除
|
||||
|
||||
// break;
|
||||
// }
|
||||
// };
|
||||
|
||||
|
||||
handleSearch(value) {
|
||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||
this.searchParams = { name: value, current: 1 };
|
||||
getTableDatas(this.searchParams);
|
||||
}
|
||||
|
||||
|
||||
handlePageChnage(value) {
|
||||
this.searchParams.current = value;
|
||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||
|
|
@ -171,15 +151,11 @@ export default class SalaryItem extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { salaryItemStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { salaryItemStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn } } = this.props;
|
||||
const {
|
||||
loading,
|
||||
hasRight,
|
||||
form,
|
||||
condition,
|
||||
tableStore,
|
||||
showSearchAd,
|
||||
getTableDatas,
|
||||
doSearch,
|
||||
setShowSearchAd
|
||||
} = salaryItemStore;
|
||||
|
|
@ -190,19 +166,16 @@ export default class SalaryItem extends React.Component {
|
|||
setSystemItemVisible,
|
||||
deleteItemVisible,
|
||||
setDeleteItemVisible,
|
||||
deleteItemList,
|
||||
editSlideVisible,
|
||||
setEditSlideVisible,
|
||||
request,
|
||||
pageInfo
|
||||
} = salaryItemStore;
|
||||
const { formalModalVisible } = this.state;
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
return renderNoright();
|
||||
}
|
||||
|
||||
const batchDelete = () => {
|
||||
// deleteItemList({})
|
||||
setDeleteItemVisible(true);
|
||||
};
|
||||
|
||||
|
|
@ -258,7 +231,7 @@ export default class SalaryItem extends React.Component {
|
|||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
return (<div style={{ display: "inline-block" }}>
|
||||
{
|
||||
showOperateBtn &&
|
||||
(showOperateBtn || showSalaryItemBtn) &&
|
||||
<Dropdown.Button overlay={menu} type="primary" style={{ marginRight: "10px" }}>新增</Dropdown.Button>
|
||||
}
|
||||
<WeaInputSearch value={this.state.searchValue} placeholder={"请输入名称"} onChange={(value) => {
|
||||
|
|
@ -329,15 +302,6 @@ export default class SalaryItem extends React.Component {
|
|||
renderRightOperation()
|
||||
}
|
||||
/>
|
||||
|
||||
{/* <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
comsWeaTableStore={tableStore} // table store
|
||||
hasOrder={true} // 是否启用排序
|
||||
needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
getColumns={this.getColumns}
|
||||
onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
dataSource={tableDataSource}
|
||||
|
|
@ -372,37 +336,38 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
{
|
||||
editSlideVisible &&
|
||||
<WeaSlideModal visible={editSlideVisible}
|
||||
top={0}
|
||||
width={40}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={(this.state.isAdd ? "新建" : "修改") + "自定义薪资项目"}
|
||||
editable={false}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={showOperateBtn ? renderCustomOperate() : null}
|
||||
subItemChange={
|
||||
(item) => {
|
||||
this.setState({ selectedTab: item.key });
|
||||
}
|
||||
}
|
||||
/>
|
||||
}
|
||||
content={<CustomSalaryItemSlide record={this.record} editable={this.state.editable}
|
||||
isAdd={this.state.isAdd} request={request}
|
||||
onChange={(value) => {
|
||||
handleSaveSlideChange(value);
|
||||
}}/>}
|
||||
onClose={() => setEditSlideVisible(false)}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => setEditSlideVisible(false)}/>
|
||||
|
||||
<WeaSlideModal
|
||||
visible={editSlideVisible}
|
||||
top={0}
|
||||
width={40}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={(this.state.isAdd ? "新建" : "修改") + "自定义薪资项目"}
|
||||
editable={false}
|
||||
showOperateBtn={showOperateBtn || showSalaryItemBtn}
|
||||
customOperate={(showOperateBtn || showSalaryItemBtn) ? renderCustomOperate() : null}
|
||||
subItemChange={
|
||||
(item) => {
|
||||
this.setState({ selectedTab: item.key });
|
||||
}
|
||||
}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<CustomSalaryItemSlide
|
||||
record={this.record} editable={this.state.editable}
|
||||
isAdd={this.state.isAdd} request={request}
|
||||
onChange={(value) => {
|
||||
handleSaveSlideChange(value);
|
||||
}}/>
|
||||
}
|
||||
onClose={() => setEditSlideVisible(false)}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => setEditSlideVisible(false)}/>
|
||||
}
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,8 +182,6 @@ export default class Archives extends React.Component {
|
|||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>
|
||||
];
|
||||
|
||||
const topTab = [];
|
||||
|
||||
// 导出全部
|
||||
const handleButtonClick = () => {
|
||||
const { archivesStore: { exportArchives } } = this.props;
|
||||
|
|
@ -215,11 +213,6 @@ export default class Archives extends React.Component {
|
|||
</Dropdown.Button>
|
||||
];
|
||||
|
||||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div></div>;
|
||||
};
|
||||
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange
|
||||
|
|
@ -240,7 +233,6 @@ export default class Archives extends React.Component {
|
|||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
buttons={showOperateBtn ? btns : []}
|
||||
>
|
||||
|
||||
<WeaTab
|
||||
searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||
|
|
@ -254,14 +246,6 @@ export default class Archives extends React.Component {
|
|||
onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||
searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||
/>
|
||||
{/* <WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
comsWeaTableStore={tableStore} // table store
|
||||
hasOrder={true} // 是否启用排序
|
||||
needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度
|
||||
|
||||
// getColumns={this.getColumns}
|
||||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
<CustomPaginationTable
|
||||
loading={loading}
|
||||
columns={this.getColumns()}
|
||||
|
|
@ -285,58 +269,59 @@ export default class Archives extends React.Component {
|
|||
|
||||
{
|
||||
this.state.editSlideVisible &&
|
||||
<WeaSlideModal visible={this.state.editSlideVisible}
|
||||
top={0}
|
||||
width={40}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={"员工福利档案"}
|
||||
tabs={[{ title: "基础设置", key: 0 }, { title: "社保", key: 1 }, {
|
||||
title: "公积金",
|
||||
key: 2
|
||||
}, { title: "企业年金及其他福利", key: 3 }]}
|
||||
editable={false}
|
||||
selectedTab={selectedTab}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={
|
||||
<div>
|
||||
{
|
||||
showOperateBtn && selectedTab != 0 && <Button type="primary" onClick={() => {
|
||||
this.handleEditSlideSave();
|
||||
}}>保存</Button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
subItemChange={
|
||||
(item) => {
|
||||
this.setState({ selectedTab: item.key });
|
||||
}
|
||||
}
|
||||
/>
|
||||
}
|
||||
content={<div>
|
||||
{
|
||||
selectedTab == 0 && <BaseForm employeeId={this.state.employeeId}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 1 &&
|
||||
<SocialSecurityForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 2 &&
|
||||
<AccumulationFundForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
<WeaSlideModal
|
||||
visible={this.state.editSlideVisible}
|
||||
top={0}
|
||||
width={40}
|
||||
height={100}
|
||||
direction={"right"}
|
||||
measure={"%"}
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={"员工福利档案"}
|
||||
tabs={[{ title: "基础设置", key: 0 }, { title: "社保", key: 1 }, {
|
||||
title: "公积金",
|
||||
key: 2
|
||||
}, { title: "企业年金及其他福利", key: 3 }]}
|
||||
editable={false}
|
||||
selectedTab={selectedTab}
|
||||
showOperateBtn={showOperateBtn}
|
||||
customOperate={
|
||||
<div>
|
||||
{
|
||||
showOperateBtn && selectedTab != 0 && <Button type="primary" onClick={() => {
|
||||
this.handleEditSlideSave();
|
||||
}}>保存</Button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
subItemChange={
|
||||
(item) => {
|
||||
this.setState({ selectedTab: item.key });
|
||||
}
|
||||
}
|
||||
/>
|
||||
}
|
||||
content={<div>
|
||||
{
|
||||
selectedTab == 0 && <BaseForm employeeId={this.state.employeeId}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 1 &&
|
||||
<SocialSecurityForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 2 &&
|
||||
<AccumulationFundForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
{
|
||||
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}/>
|
||||
}
|
||||
|
||||
</div>}
|
||||
onClose={() => this.setState({ editSlideVisible: false })}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({ editSlideVisible: false })}/>
|
||||
</div>}
|
||||
onClose={() => this.setState({ editSlideVisible: false })}
|
||||
showMask={true}
|
||||
closeMaskOnClick={() => this.setState({ editSlideVisible: false })}/>
|
||||
}
|
||||
{
|
||||
this.state.importVisible && <ImportModal
|
||||
|
|
|
|||
|
|
@ -328,22 +328,22 @@ export default class TaxAgent extends React.Component {
|
|||
onClick={() => this.showEditModal(record.id)}>
|
||||
编辑
|
||||
</a>
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item key="0">
|
||||
<a
|
||||
href="javaScript:void(0);"
|
||||
onClick={() => this.deleteTaxAgent(record.id)}>
|
||||
删除
|
||||
</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a className="ant-dropdown-link" href="javaScript:void(0);">
|
||||
<i className="icon-coms-more" />
|
||||
</a>
|
||||
</Dropdown>
|
||||
{/*<Dropdown*/}
|
||||
{/* overlay={*/}
|
||||
{/* <Menu>*/}
|
||||
{/* <Menu.Item key="0">*/}
|
||||
{/* <a*/}
|
||||
{/* href="javaScript:void(0);"*/}
|
||||
{/* onClick={() => this.deleteTaxAgent(record.id)}>*/}
|
||||
{/* 删除*/}
|
||||
{/* </a>*/}
|
||||
{/* </Menu.Item>*/}
|
||||
{/* </Menu>*/}
|
||||
{/* }>*/}
|
||||
{/* <a className="ant-dropdown-link" href="javaScript:void(0);">*/}
|
||||
{/* <i className="icon-coms-more" />*/}
|
||||
{/* </a>*/}
|
||||
{/*</Dropdown>*/}
|
||||
</div>
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ export class calculateStore {
|
|||
API.getSalarySobCycle({ salaryAcctRecordId: id }).then(res => {
|
||||
if (res.status) {
|
||||
this.baseSalarySobCycle = res.data;
|
||||
this.getColumnDesc({ salaryAcctRecordId: id });
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ export class CumDeductStore {
|
|||
};
|
||||
|
||||
// 导出明细
|
||||
@action exportCumDeductDetailList = (id, ids = "") => {
|
||||
API.exportCumDeductDetailList(id, ids);
|
||||
@action exportCumDeductDetailList = (id, ids = "", taxAgentId="") => {
|
||||
API.exportCumDeductDetailList(id, ids, taxAgentId);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ export class CumSituationStore {
|
|||
};
|
||||
|
||||
// 导出明细
|
||||
@action exportCumSituationDetailList = (id, ids = "") => {
|
||||
API.exportCumSituationDetailList(id, ids);
|
||||
@action exportCumSituationDetailList = (id, ids = "", taxAgentId="") => {
|
||||
API.exportCumSituationDetailList(id, ids, taxAgentId);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ export class OtherDeductStore {
|
|||
};
|
||||
|
||||
// 导出明细
|
||||
@action exportOtherDeductDetailList = (id, ids = "") => {
|
||||
API.exportOtherDeductDetailList(id, ids);
|
||||
@action exportOtherDeductDetailList = (id, ids = "", taxAgentId="") => {
|
||||
API.exportOtherDeductDetailList(id, ids, taxAgentId);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export class TaxAgentStore {
|
|||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||
@observable showSearchAd = false; // 高级搜索面板显示
|
||||
@observable showOperateBtn = false; // 页面操作按钮显示权限
|
||||
@observable showSalaryItemBtn = false; // 薪资项目管理页面操作按钮显示权限
|
||||
@observable loading = false; // 数据加载状态
|
||||
@observable modalVisiable = false; // EditModal 模态框
|
||||
@observable columns = [];
|
||||
|
|
@ -32,6 +33,8 @@ export class TaxAgentStore {
|
|||
|
||||
@action setShowOperateBtn = bool => (this.showOperateBtn = bool);
|
||||
|
||||
@action setSalaryItemBtn = bool => (this.showSalaryItemBtn = bool);//薪资项目权限
|
||||
|
||||
// 初始化操作
|
||||
@action
|
||||
doInit = params => {
|
||||
|
|
@ -119,10 +122,11 @@ export class TaxAgentStore {
|
|||
return new Promise((resolve, reject) => {
|
||||
API.getPermission(params).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { isAdminEnable, isOpenDevolution } = data;
|
||||
const { isAdminEnable, isChief, isOpenDevolution } = data;
|
||||
this.setShowOperateBtn(
|
||||
!isOpenDevolution ? true : isAdminEnable ? true : false
|
||||
);
|
||||
this.setSalaryItemBtn(isChief);
|
||||
resolve({ status, data });
|
||||
} else {
|
||||
reject();
|
||||
|
|
|
|||
Loading…
Reference in New Issue