Compare commits
3 Commits
f4726da0fc
...
3be80d9ab2
| Author | SHA1 | Date |
|---|---|---|
|
|
3be80d9ab2 | |
|
|
c1269e7dd3 | |
|
|
2b32f348ba |
|
|
@ -24,7 +24,7 @@ import "../index.less";
|
|||
const WeaTableComx = WeaTableNew.WeaTable;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("attendanceStore")
|
||||
@inject("attendanceStore", "taxAgentStore")
|
||||
@observer
|
||||
class SalaryDetails extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -256,7 +256,8 @@ class SalaryDetails extends Component {
|
|||
const {
|
||||
loading, dataSource, transferDialog, tempDialog, tempPageList, templateId, tempManageDialog, tempManageQuery
|
||||
} = this.state;
|
||||
const { dateRange, showSearchAd } = this.props;
|
||||
const { taxAgentStore: { PageAndOptAuth }, dateRange, showSearchAd } = this.props;
|
||||
const { isOpenDevolution, isChief } = PageAndOptAuth;
|
||||
const { dialogType } = transferDialog;
|
||||
return (<React.Fragment>
|
||||
<div className="query-div">
|
||||
|
|
@ -289,7 +290,7 @@ class SalaryDetails extends Component {
|
|||
transferDialog: { ...transferDialog, completeURL: "", visible: false }
|
||||
})}
|
||||
buttons={
|
||||
dialogType === "temp" ? [
|
||||
dialogType === "temp" && isOpenDevolution && isChief ? [
|
||||
<Button type="primary"
|
||||
onClick={this.handelAddTemp}>{getLabel(111, "存为模板")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class Index extends Component {
|
|||
conditions: [],
|
||||
convertConditions: [],
|
||||
reportConditions: [],
|
||||
selectedKey: "salaryDetail",
|
||||
selectedKey: "statistics",
|
||||
reportName: "",
|
||||
keyword: "",
|
||||
year: moment().format("YYYY"),
|
||||
|
|
@ -323,12 +323,12 @@ class Index extends Component {
|
|||
}
|
||||
];
|
||||
const tabs = [
|
||||
// { key: "statistics", title: getLabel(111, "统计表") },
|
||||
{ key: "statistics", title: getLabel(111, "统计表") },
|
||||
// { key: "detail", title: getLabel(111, "员工明细") },
|
||||
{ key: "salaryDetail", title: getLabel(111, "薪资明细") }
|
||||
];
|
||||
dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1);
|
||||
isOpenDevolution && !isChief && dropMenuDatas.shift();
|
||||
// isOpenDevolution && !isChief && dropMenuDatas.shift();
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ class EditCalcTable extends Component {
|
|||
calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId },
|
||||
taxAgentStore: { showOperateBtn, PageAndOptAuth }, calcDetail = false
|
||||
} = this.props;
|
||||
const { confirmAuth, submitAuth } = toJS(PageAndOptAuth);
|
||||
const { confirmAuth, submitAuth, isAdminEnable, isChief } = toJS(PageAndOptAuth);
|
||||
const {
|
||||
employeeIds, subcompanyIds, departmentIds, positionIds, statuses, htqslxList, rsdlgsList, ...extra
|
||||
} = ECSearchForm.getFormParams();
|
||||
|
|
@ -277,8 +277,9 @@ class EditCalcTable extends Component {
|
|||
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, sumRowlistUrl, payload,
|
||||
calcDetail: (calcDetail || !showOperateBtn) && !confirmAuth && !submitAuth,
|
||||
showSee: (calcDetail || !showOperateBtn), tableScrollHeight: 265, pageSum,
|
||||
calcDetail: (((calcDetail || !showOperateBtn) && !confirmAuth && !submitAuth) || (!isAdminEnable && !isChief)),
|
||||
showSee: calcDetail && (isAdminEnable || isChief), tableScrollHeight: 265, pageSum,
|
||||
// (calcDetail || !showOperateBtn)
|
||||
columns: _.every(traverse(columns, (calcDetail || !showOperateBtn)), (it, idx) => !it.fixed) ? _.map(traverse(columns, (calcDetail || !showOperateBtn)), (it, idx) => ({
|
||||
...it,
|
||||
fixed: idx < 2 ? "left" : false
|
||||
|
|
|
|||
|
|
@ -244,7 +244,12 @@ class Index extends Component {
|
|||
<Menu.Item key="calc_selected">{getLabel(543546, "核算所选人员")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
const moreMenu = (
|
||||
const moreMenu = (!showOperateBtn && (confirmAuth || submitAuth)) ? (
|
||||
<Menu onClick={this.handleMoreMenuClick}>
|
||||
<Menu.Item key="exportAll">{getLabel(81272, "导出全部")}</Menu.Item>
|
||||
<Menu.Item key="export_custom">{getLabel(544270, "自定义导出")}</Menu.Item>
|
||||
</Menu>
|
||||
) : (
|
||||
<Menu onClick={this.handleMoreMenuClick}>
|
||||
{canEdit && <Menu.Item key="import">{getLabel(32935, "导入")}</Menu.Item>}
|
||||
<Menu.Item key="exportAll">{getLabel(81272, "导出全部")}</Menu.Item>
|
||||
|
|
@ -270,7 +275,7 @@ class Index extends Component {
|
|||
isOpenApproval && reqBtns.unshift(<Button type="ghost" onClick={() => {
|
||||
window.open(`${approvalWorkflowUrl}&salaryAcctRecordId=${salaryAcctRecordId}`, "_blank");
|
||||
}}>{getLabel(111, "发起审批")}</Button>);
|
||||
!showOperateBtn && (reqBtns = reqBtns.slice(-1));
|
||||
(!showOperateBtn && (confirmAuth || submitAuth)) && (reqBtns = reqBtns.slice(-2));
|
||||
confirmAuth && reqBtns.unshift(<Button type="primary" loading={loading.az}
|
||||
onClick={() => this.handleAZCalcOperate("azReturn")}>{getLabel(111, "退回")}</Button>);
|
||||
confirmAuth && reqBtns.unshift(<Button type="primary" loading={loading.az}
|
||||
|
|
|
|||
|
|
@ -111,15 +111,27 @@ export const renderReqBtns = (selectedKey, salaryImportTypes, onSalaryOpts, show
|
|||
return reqBtns;
|
||||
};
|
||||
export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
|
||||
let menus = [{
|
||||
key: "custom_cols",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(32535, "显示列定制")
|
||||
}, {
|
||||
key: "log",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}];
|
||||
let menus = [
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
{
|
||||
key: "custom_cols",
|
||||
icon: <i className="icon-coms-Custom"/>,
|
||||
content: getLabel(32535, "显示列定制")
|
||||
}, {
|
||||
key: "log",
|
||||
icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
];
|
||||
switch (selectedKey) {
|
||||
case "pending":
|
||||
menus = [
|
||||
|
|
@ -133,31 +145,31 @@ export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
|
|||
// icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||
// content: getLabel(543186, "批量删除待办")
|
||||
// },
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
// {
|
||||
// key: "exportAll",
|
||||
// icon: <i className="iconfont icon-daochu"/>,
|
||||
// content: getLabel(81272, "导出全部")
|
||||
// },
|
||||
// {
|
||||
// key: "exportSelected",
|
||||
// icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
// content: getLabel(512938, "导出选中")
|
||||
// },
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "fixed":
|
||||
menus = [
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
// {
|
||||
// key: "exportAll",
|
||||
// icon: <i className="iconfont icon-daochu"/>,
|
||||
// content: getLabel(81272, "导出全部")
|
||||
// },
|
||||
// {
|
||||
// key: "exportSelected",
|
||||
// icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
// content: getLabel(512938, "导出选中")
|
||||
// },
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
|
|
@ -178,38 +190,38 @@ export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
|
|||
// icon: <i className="iconfont icon-piliangshanchu"/>,
|
||||
// content: getLabel(543186, "批量删除待办")
|
||||
// },
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
// {
|
||||
// key: "exportAll",
|
||||
// icon: <i className="iconfont icon-daochu"/>,
|
||||
// content: getLabel(81272, "导出全部")
|
||||
// },
|
||||
// {
|
||||
// key: "exportSelected",
|
||||
// icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
// content: getLabel(512938, "导出选中")
|
||||
// },
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
case "stop":
|
||||
menus = [
|
||||
{
|
||||
key: "exportAll",
|
||||
icon: <i className="iconfont icon-daochu"/>,
|
||||
content: getLabel(81272, "导出全部")
|
||||
},
|
||||
{
|
||||
key: "exportSelected",
|
||||
icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
content: getLabel(512938, "导出选中")
|
||||
},
|
||||
// {
|
||||
// key: "exportAll",
|
||||
// icon: <i className="iconfont icon-daochu"/>,
|
||||
// content: getLabel(81272, "导出全部")
|
||||
// },
|
||||
// {
|
||||
// key: "exportSelected",
|
||||
// icon: <i className="iconfont icon-piliangdaochu"/>,
|
||||
// content: getLabel(512938, "导出选中")
|
||||
// },
|
||||
...menus
|
||||
];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return showOperateBtn ? menus : _.filter(menus, o => o.key === "custom_cols");
|
||||
return showOperateBtn ? menus : _.filter(menus, o => o.key === "custom_cols" || o.key === "exportAll" || o.key === "exportSelected");
|
||||
};
|
||||
|
||||
export const salaryFileSearchConditions = [
|
||||
|
|
@ -449,7 +461,7 @@ export const salaryFilesConditions = [
|
|||
},
|
||||
{
|
||||
defaultshow: true, title: getLabel(543329, "发薪设置"),
|
||||
col: 1,lanId: 543329,
|
||||
col: 1, lanId: 543329,
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
|
|
@ -502,7 +514,7 @@ export const salaryFilesConditions = [
|
|||
defaultshow: true, title: getLabel(538004, "薪资档案"),
|
||||
titleHelpful: getLabel(543330, "提示:显示已生效的最新数据"),
|
||||
titleHelpfulLanId: 543330,
|
||||
col: 2, salaryFile: true,lanId: 538004,
|
||||
col: 2, salaryFile: true, lanId: 538004,
|
||||
items: []
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in New Issue