薪资核算解锁锁定的功能
This commit is contained in:
parent
ea9359c728
commit
68069df58b
|
|
@ -487,3 +487,14 @@ export const getColumnDesc = (params) => {
|
|||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/getColumnDesc", "get", params);
|
||||
};
|
||||
|
||||
// 更新薪资核算结果的锁定状态
|
||||
export const updateLockStatus = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/salaryacct/acctresult/updateLockStatus", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { WeaHelpfulTip, WeaSlideModal } from "ecCom";
|
||||
import { Modal } from 'antd';
|
||||
import { message, Modal } from "antd";
|
||||
import WarningModal from "./warningModal";
|
||||
import EditSalaryDetail from "./editSalaryDetail";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
|
|
@ -49,29 +49,31 @@ export default class SalaryDetail extends React.Component {
|
|||
if (id === "EDIT") {
|
||||
this.handleEdit(record);
|
||||
} else if (id === "COLUMNINDEX") {
|
||||
if(!extraId){
|
||||
if (!extraId) {
|
||||
this.setState({ columnIndex: record });
|
||||
}else if(extraId === 'LOCK'){
|
||||
} else if (extraId === "LOCK") {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: <div>
|
||||
<div style={{textAlign: "center"}}>确定要批量锁定项目值吗?</div>
|
||||
<div style={{textAlign: "center"}}>确定后,则项目输入值锁定,项目公式失效;点击核算将按锁定的输入值重新核算!</div>
|
||||
<div style={{ textAlign: "center" }}>确定要批量锁定项目值吗?</div>
|
||||
<div
|
||||
style={{ textAlign: "center" }}>确定后,则项目输入值锁定,项目公式失效;点击核算将按锁定的输入值重新核算!
|
||||
</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
},
|
||||
onOk: () => this.updateLockStatus("LOCK", record),
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
}else if(extraId === 'UNLOCK'){
|
||||
} else if (extraId === "UNLOCK") {
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: <div>
|
||||
<div style={{textAlign: "center"}}>确定要批量解锁项目值吗?</div>
|
||||
<div style={{textAlign: "center"}}>确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!</div>
|
||||
<div style={{ textAlign: "center" }}>确定要批量解锁项目值吗?</div>
|
||||
<div
|
||||
style={{ textAlign: "center" }}>确定后,则项目公式生效,页面仍显示手动修改的项目值;点击核算将按公式重新核算,不再显示解锁标识!
|
||||
</div>
|
||||
</div>,
|
||||
onOk: () => {
|
||||
},
|
||||
onOk: () => this.updateLockStatus("UNLOCK", record),
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
|
|
@ -105,6 +107,35 @@ export default class SalaryDetail extends React.Component {
|
|||
}
|
||||
};
|
||||
|
||||
//列头解锁和锁定
|
||||
updateLockStatus = (lockStatus, salaryItemId) => {
|
||||
const { calculateStore: { updateLockStatus } } = this.props;
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const module = {
|
||||
lockStatus,
|
||||
salaryItemId,
|
||||
salaryAcctRecordId
|
||||
};
|
||||
updateLockStatus(module).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功");
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.props.employeeName
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 编辑时间回调
|
||||
handleEdit(record) {
|
||||
this.recordId = record.id;
|
||||
|
|
@ -116,7 +147,7 @@ export default class SalaryDetail extends React.Component {
|
|||
// 侧边栏保存
|
||||
handleEditSlideSave() {
|
||||
const { calculateStore } = this.props;
|
||||
const { saveAcctResult, acctResultList, acctresultDetail } = calculateStore;
|
||||
const { saveAcctResult } = calculateStore;
|
||||
this.setState({
|
||||
slideVisiable: false
|
||||
});
|
||||
|
|
|
|||
|
|
@ -437,6 +437,7 @@ export default class Ledger extends React.Component {
|
|||
currentStep == 0 ? [
|
||||
<Button
|
||||
type="primary"
|
||||
loading={saveLoading}
|
||||
onClick={() => {
|
||||
handleStep1Save();
|
||||
}}>
|
||||
|
|
@ -476,6 +477,7 @@ export default class Ledger extends React.Component {
|
|||
</Button>,
|
||||
<Button
|
||||
type="primary"
|
||||
loading={saveLoading}
|
||||
style={{ marginLeft: "10px" }}
|
||||
onClick={() => {
|
||||
handleStepSave();
|
||||
|
|
|
|||
|
|
@ -468,7 +468,13 @@ class Index extends Component {
|
|||
}
|
||||
};
|
||||
}
|
||||
return { ...item, width: item.oldWidth };
|
||||
return {
|
||||
...item,
|
||||
width: item.oldWidth,
|
||||
render: (text) => {
|
||||
return <span className='tdEllipsis' title={text}>{text}</span>
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
handleEdit = (record) => {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,14 @@
|
|||
background: #F1F3F4;
|
||||
}
|
||||
|
||||
.tdEllipsis {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.optWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -60,8 +68,9 @@
|
|||
line-height: initial;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.wea-slide-modal-title + div {
|
||||
padding-bottom: 70px!important;
|
||||
padding-bottom: 70px !important;
|
||||
}
|
||||
|
||||
.rodal-close {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,15 @@ export default class Archives extends React.Component {
|
|||
title: item.text
|
||||
};
|
||||
}
|
||||
return { ...item, dataIndex: item.column, title: item.text };
|
||||
return {
|
||||
...item,
|
||||
dataIndex:
|
||||
item.column,
|
||||
title: item.text,
|
||||
render: (text) => {
|
||||
return <span className='tdEllipsis' title={text}>{text}</span>
|
||||
}
|
||||
};
|
||||
});
|
||||
return tmpV.length > 0 ? [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,6 +24,13 @@
|
|||
}
|
||||
}
|
||||
.mySalaryBenefitsWrapper{
|
||||
.tdEllipsis{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.optWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
|
||||
import { Button, DatePicker, Dropdown, Menu, message, Modal } from "antd";
|
||||
|
||||
import { WeaRightMenu, WeaTop } from "ecCom";
|
||||
|
||||
import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import Accountdialog from "./components/accountDialog";
|
||||
import AbnormalDrawer from "./components/abnormalDrawer";
|
||||
|
|
@ -480,7 +477,12 @@ export default class StandingBook extends React.Component {
|
|||
columns={_.filter(columns, (it) => it.dataIndex !== "id").map(item => {
|
||||
item.width = "150px";
|
||||
if (item.dataIndex === "billMonth") item.fixed = "left";
|
||||
return item;
|
||||
return {
|
||||
...item,
|
||||
render: (text) => {
|
||||
return <span className='tdEllipsis' title={text}>{text}</span>
|
||||
}
|
||||
};
|
||||
})}
|
||||
dataSource={list}
|
||||
total={total}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,13 @@
|
|||
color: #4d7ad8;
|
||||
// display: none;
|
||||
}
|
||||
.tdEllipsis{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.billDateWrapper {
|
||||
|
|
|
|||
|
|
@ -168,12 +168,34 @@ export class ArchivesStore {
|
|||
@action
|
||||
getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization = "") => {
|
||||
API.getPaymentForm({ employeeId, welfareTypeEnum, schemeId, paymentOrganization }).then(res => {
|
||||
if (welfareTypeEnum == "SOCIAL_SECURITY") {
|
||||
this.socialSecurityPaymentForm = res.data;
|
||||
} else if (welfareTypeEnum == "ACCUMULATION_FUND") {
|
||||
this.accumulationFundPaymentForm = res.data;
|
||||
} else if (welfareTypeEnum == "OTHER") {
|
||||
this.otherPaymentForm = res.data;
|
||||
if (res.status) {
|
||||
let obj = {};
|
||||
const { items } = res.data;
|
||||
const [baseList] = items;
|
||||
if (!_.isEmpty(baseList.items)) {
|
||||
_.map(baseList.items, item => {
|
||||
obj = {
|
||||
...obj,
|
||||
[item["domkey"][0]]: ""
|
||||
};
|
||||
});
|
||||
}
|
||||
if (welfareTypeEnum == "SOCIAL_SECURITY") {
|
||||
this.socialSecurityPaymentForm = res.data.data ? {
|
||||
...res.data,
|
||||
data: { ...obj, ...res.data.data }
|
||||
} : { ...res.data, data: obj };
|
||||
} else if (welfareTypeEnum == "ACCUMULATION_FUND") {
|
||||
this.accumulationFundPaymentForm = res.data.data ? {
|
||||
...res.data,
|
||||
data: { ...obj, ...res.data.data }
|
||||
} : { ...res.data, data: obj };
|
||||
} else if (welfareTypeEnum == "OTHER") {
|
||||
this.otherPaymentForm = res.data.data ? { ...res.data, data: { ...obj, ...res.data.data } } : {
|
||||
...res.data,
|
||||
data: obj
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -185,13 +207,13 @@ export class ArchivesStore {
|
|||
let paymentForm = "";
|
||||
if (welfareType == "SOCIAL_SECURITY") {
|
||||
baseForm = JSON.stringify(this.socialSecurityForm.data);
|
||||
paymentForm = JSON.stringify(this.socialSecurityPaymentForm.data);
|
||||
paymentForm = this.socialSecurityForm.data.socialSchemeId ? JSON.stringify(this.socialSecurityPaymentForm.data) : "";
|
||||
} else if (welfareType == "ACCUMULATION_FUND") {
|
||||
baseForm = JSON.stringify(this.accumulationFundForm.data);
|
||||
paymentForm = JSON.stringify(this.accumulationFundPaymentForm.data);
|
||||
paymentForm = this.accumulationFundForm.data.fundSchemeId ? JSON.stringify(this.accumulationFundPaymentForm.data) : "";
|
||||
} else if (welfareType == "OTHER") {
|
||||
baseForm = JSON.stringify(this.otherForm.data);
|
||||
paymentForm = JSON.stringify(this.otherPaymentForm.data);
|
||||
paymentForm = this.otherForm.data.otherSchemeId ? JSON.stringify(this.otherPaymentForm.data) : "";
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
API.save({ welfareType, baseForm, paymentForm }).then(res => {
|
||||
|
|
|
|||
|
|
@ -660,4 +660,9 @@ export class calculateStore {
|
|||
});
|
||||
});
|
||||
};
|
||||
|
||||
@action("更新薪资核算结果的锁定状态")
|
||||
updateLockStatus = (params) => {
|
||||
return API.updateLockStatus(params)
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue