custom-艾志工业-合并个税

This commit is contained in:
lys 2025-04-22 10:53:03 +08:00
parent f4726da0fc
commit 2b32f348ba
3 changed files with 75 additions and 57 deletions

View File

@ -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

View File

@ -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}

View File

@ -111,7 +111,18 @@ export const renderReqBtns = (selectedKey, salaryImportTypes, onSalaryOpts, show
return reqBtns;
};
export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
let menus = [{
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, "显示列定制")
@ -119,7 +130,8 @@ export const renderDropMenuDatas = (selectedKey, showOperateBtn) => {
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: []
}
];