custom/美之高
This commit is contained in:
parent
8eadce0ce3
commit
57272b9077
|
|
@ -227,6 +227,7 @@ class EditCalcTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
postMessageToChild = (payload = {}) => {
|
postMessageToChild = (payload = {}) => {
|
||||||
|
const { mzgOptPermission } = this.props;
|
||||||
const i18n = {
|
const i18n = {
|
||||||
"操作": getLabel(30585, "操作"), "编辑": getLabel(501169, "编辑"),
|
"操作": getLabel(30585, "操作"), "编辑": getLabel(501169, "编辑"),
|
||||||
"点击锁定所有解锁的项目值": getLabel(543649, "点击锁定所有解锁的项目值"),
|
"点击锁定所有解锁的项目值": getLabel(543649, "点击锁定所有解锁的项目值"),
|
||||||
|
|
@ -242,13 +243,13 @@ class EditCalcTable extends Component {
|
||||||
};
|
};
|
||||||
this.setState({ originPayloadData: { ...payload, i18n } });
|
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||||
const childFrameObj = document.getElementById("atdTable");
|
const childFrameObj = document.getElementById("atdTable");
|
||||||
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
|
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n, mzgOptPermission }), "*");
|
||||||
};
|
};
|
||||||
queryCalcResultList = () => {
|
queryCalcResultList = () => {
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state;
|
||||||
const {
|
const {
|
||||||
calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId },
|
calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId },
|
||||||
calcDetail = false
|
calcDetail = false, mzgOptPermission = false
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams();
|
const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams();
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -262,8 +263,16 @@ class EditCalcTable extends Component {
|
||||||
acctResultList(payload).then(({ status, data }) => {
|
acctResultList(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
const { columns, pageInfo: list } = data;
|
let { columns, pageInfo: list } = data;
|
||||||
const { list: dataSource, pageNum: current, pageSize, total } = list;
|
const { list: dataSource, pageNum: current, pageSize, total } = list;
|
||||||
|
// 美之高操作权限
|
||||||
|
columns = _.map(columns, it => {
|
||||||
|
if (!_.isEmpty(it.children)) {
|
||||||
|
return { ...it, children: _.map(it.children, o => ({ ...o, mzgOptPermission })), mzgOptPermission };
|
||||||
|
}
|
||||||
|
return { ...it, mzgOptPermission };
|
||||||
|
});
|
||||||
|
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize, total } }, () => {
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize, total } }, () => {
|
||||||
const { pageInfo, selectedRowKeys } = this.state;
|
const { pageInfo, selectedRowKeys } = this.state;
|
||||||
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
||||||
|
|
@ -331,13 +340,17 @@ const traverse = (arr, calcDetail) => {
|
||||||
return {
|
return {
|
||||||
title: item.text, width: item.width + "px", ellipsis: true, calcDetail,
|
title: item.text, width: item.width + "px", ellipsis: true, calcDetail,
|
||||||
dataIndex: item.column, children: traverse(item.children, calcDetail),
|
dataIndex: item.column, children: traverse(item.children, calcDetail),
|
||||||
fixed: item.fixed || false, dataType: item.dataType, align: "center"
|
fixed: item.fixed || false, dataType: item.dataType, align: "center",
|
||||||
|
//美之高操作权限
|
||||||
|
mzgOptPermission: item.mzgOptPermission
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
title: item.text, width: item.width + "px", fixed: item.fixed || false,
|
title: item.text, width: item.width + "px", fixed: item.fixed || false,
|
||||||
dataIndex: item.column, ellipsis: true, lockStatus: item.lockStatus, calcDetail,
|
dataIndex: item.column, ellipsis: true, lockStatus: item.lockStatus, calcDetail,
|
||||||
pattern: item.pattern, dataType: item.dataType, align: "center"
|
pattern: item.pattern, dataType: item.dataType, align: "center",
|
||||||
|
//美之高操作权限
|
||||||
|
mzgOptPermission: item.mzgOptPermission
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ class Index extends Component {
|
||||||
renderReqBtns = () => {
|
renderReqBtns = () => {
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
const { selectedKey, accountExceptInfo, approvalInfo } = this.state;
|
const { selectedKey, accountExceptInfo, approvalInfo } = this.state;
|
||||||
const { isOpenApproval, approvalWorkflowUrl, canEdit } = approvalInfo;
|
const { isOpenApproval, approvalWorkflowUrl, canEdit, hideEdit } = approvalInfo;
|
||||||
let reqBtns = [];
|
let reqBtns = [];
|
||||||
switch (selectedKey) {
|
switch (selectedKey) {
|
||||||
case "calc":
|
case "calc":
|
||||||
|
|
@ -164,7 +164,7 @@ class Index extends Component {
|
||||||
);
|
);
|
||||||
const moreMenu = (
|
const moreMenu = (
|
||||||
<Menu onClick={this.handleMoreMenuClick}>
|
<Menu onClick={this.handleMoreMenuClick}>
|
||||||
{canEdit && <Menu.Item key="import">{getLabel(32935, "导入")}</Menu.Item>}
|
{canEdit && !hideEdit && <Menu.Item key="import">{getLabel(32935, "导入")}</Menu.Item>}
|
||||||
<Menu.Item key="exportAll">{getLabel(81272, "导出全部")}</Menu.Item>
|
<Menu.Item key="exportAll">{getLabel(81272, "导出全部")}</Menu.Item>
|
||||||
<Menu.Item key="export_custom">{getLabel(544270, "自定义导出")}</Menu.Item>
|
<Menu.Item key="export_custom">{getLabel(544270, "自定义导出")}</Menu.Item>
|
||||||
<Menu.Item key="offlineCompare">{getLabel(543249, "线下对比")}</Menu.Item>
|
<Menu.Item key="offlineCompare">{getLabel(543249, "线下对比")}</Menu.Item>
|
||||||
|
|
@ -203,14 +203,15 @@ class Index extends Component {
|
||||||
};
|
};
|
||||||
renderContent = () => {
|
renderContent = () => {
|
||||||
const { selectedKey, approvalInfo } = this.state;
|
const { selectedKey, approvalInfo } = this.state;
|
||||||
const { canEdit } = approvalInfo;
|
const { canEdit, hideEdit } = approvalInfo;
|
||||||
let dom = null;
|
let dom = null;
|
||||||
switch (selectedKey) {
|
switch (selectedKey) {
|
||||||
case "person":
|
case "person":
|
||||||
dom = <SalaryCalcPersonConfirm calcDetail={!canEdit} {...this.props}/>;
|
dom = <SalaryCalcPersonConfirm calcDetail={!canEdit} {...this.props}/>;
|
||||||
break;
|
break;
|
||||||
case "calc":
|
case "calc":
|
||||||
dom = <SalaryEditCalc {...this.props} calcDetail={!canEdit} ref={dom => this.calc = dom}/>;
|
dom = <SalaryEditCalc {...this.props} calcDetail={!canEdit} mzgOptPermission={hideEdit}
|
||||||
|
ref={dom => this.calc = dom}/>;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue