Merge branch 'release/2.15.2.2409.01' into feature/2.15.2.2409.01合并业务线测试

# Conflicts:
#	pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/index.js
#	pc4mobx/hrmSalary/pages/variableSalary/index.js
#	pc4mobx/hrmSalary/stores/taxAgent.js
This commit is contained in:
黎永顺 2024-10-12 16:05:19 +08:00
commit 5c8e6b8133
14 changed files with 433 additions and 103 deletions

View File

@ -134,3 +134,7 @@ export const getSalaryListSum = (params) => {
export const exportSalaryList = (params) => {
return postExportFetch("/api/bs/hrmsalary/report/statistics/employee/exportSalaryList", params);
};
//薪酬统计报表-保存全局自定义列配置
export const savePageListSetting = (params) => {
return postFetch("/api/bs/hrmsalary/common/pageList/save/setting", params);
};

View File

@ -44,7 +44,7 @@ export const getVariableSalaryDetail = params => {
};
// 获取当前管理员下的所有的个税扣缴义务人
export const getAdminTaxAgentList = () => {
return WeaTools.callApi("/api/bs/hrmsalary/siaccount/getAdminTaxAgentList", "get", {});
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/selectList", "GET", { isShare: false });
};
// 浮动薪酬档案导出
export const exportVariableSalary = (params) => {

View File

@ -0,0 +1,206 @@
/*
* 自定义穿梭框组件
* 弹框选择
* @Author: 黎永顺
* @Date: 2024/8/30
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll } from "ecCom";
import { Button, Col, Row, Spin } from "antd";
import CustomBrowserMutiLeft from "./customBrowserMutiLeft";
import CustomBrowserMutiRight from "./customBrowserMutiRight";
import CustomBrowserOperation from "./customBrowserOperation";
import { postFetch } from "../../../util/request";
import "../index.less";
const getLabel = WeaLocaleProvider.getLabel;
class CustomTransferDialog extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, listDatas: [],
query: { [props.searchParamsKey]: "" },
leftListSelectedKeys: [], // 左侧table选择的keys
leftListSelectedData: [], // 左侧table选择的数据
rightCheckedKeys: [], //右侧选择的keys
rightDatas: [] // 右侧展示的数据
};
this.selectedData = {};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
this.getData(true);
if (nextProps.datas) {
this.setState({
leftListSelectedData: _.values(nextProps.datas), rightDatas: _.values(nextProps.datas)
});
}
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.setState({
query: { [this.props.searchParamsKey]: "" },
rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: []
});
this.selectedData = {};
}
}
getData = (init = false) => {
const { query } = this.state;
const { completeURL, convertDatasource, dataParams = {} } = this.props;
let payload = { ...dataParams, ...query };
this.setState({ loading: true });
postFetch(completeURL, payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status && data.list) {
const { pageNum: current, pageSize, total } = data;
this.setState({
listDatas: convertDatasource ? convertDatasource(data.list) : data.list
});
} else {
this.setState({
listDatas: convertDatasource ? convertDatasource(data).listDatas : [],
leftListSelectedData: (init && convertDatasource) ? convertDatasource(data).checked : this.state.leftListSelectedData,
rightDatas: (init && convertDatasource) ? convertDatasource(data).checked : this.state.rightDatas
});
}
});
};
handleOk = () => {
const { rightDatas } = this.state;
this.props.onChange && this.props.onChange(rightDatas);
};
onLeftListCheck = (keys, datas) => {
const { leftListSelectedData } = this.state;
let targets = leftListSelectedData.concat(datas);
targets = _.uniqBy(targets, "id");
targets = targets.filter((t) => keys.indexOf(t["id"]) > -1);
this.setState({ leftListSelectedKeys: keys, leftListSelectedData: targets });
};
onleftDoubleClick = (data) => {
const { rightDatas } = this.state;
this.setState({
rightDatas: rightDatas.concat(data),
rightCheckedKeys: [],
leftListSelectedData: [],
leftListSelectedKeys: []
});
};
onRightDoubleClick = (key) => {
const { rightDatas } = this.state;
const newRightDatas = rightDatas.filter(item => String(item.id) !== key);
this.setState({ rightDatas: newRightDatas, rightCheckedKeys: [] });
};
moveTo = (direction) => {
const { rightDatas, rightCheckedKeys, listDatas, leftListSelectedData } = this.state;
if (direction === "right") {
this.setState({
rightDatas: rightDatas.concat(leftListSelectedData),
leftListSelectedData: [],
leftListSelectedKeys: []
});
} else if (direction === "left") {
this.setState({
rightDatas: rightDatas.filter(item => !rightCheckedKeys.some(checkedKey => String(item.id) === checkedKey)),
rightCheckedKeys: []
});
} else if (direction === "allToLeft") {
this.setState({ rightDatas: [], rightCheckedKeys: [] });
} else if (direction === "allToRight") {
if (this.leftListAllActive()) {
this.setState({
rightDatas: rightDatas.concat(listDatas),
rightCheckedKeys: [],
leftListSelectedData: [],
leftListSelectedKeys: []
});
}
}
};
leftListAllActive = () => {
const { rightDatas, listDatas } = this.state;
let bool = true;
if (_.isEmpty(listDatas)) bool = false;
if (!_.isEmpty(listDatas) && !_.isEmpty(rightDatas)) {
bool = listDatas.filter((l) => !rightDatas.some(r => l.id === r.id)).length !== 0;
}
return bool;
};
renderTitle = () => {
return (<div className="wea-hr-muti-dialog-title">
<span>{getLabel(111, "数据选择")}</span>
<div/>
</div>);
};
render() {
const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state;
const { searchParamsKey, saveLoading } = this.props;
const buttons = [
<Button type="primary" loading={saveLoading} onClick={this.handleOk}
disabled={_.isEmpty(rightDatas)}>{getLabel(111, "确 定")}</Button>,
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>];
let rightActive = false, leftActive = false, rightAllActive = false;
if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true;
if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true;
if (rightDatas && rightDatas.length > 0) rightAllActive = true;
let dom = <Spin spinning={loading}>
<div className="wea-hr-muti-dialog">
<div className="wea-hr-muti-input-left">
<Row style={{ height: 35 }}>
<Col span="24">
<WeaInputSearch value={query[searchParamsKey]} onSearch={() => this.getData()}
onChange={value => this.setState({ query: { ...query, [searchParamsKey]: value } })}
/>
</Col>
</Row>
<div>
<WeaNewScroll height={this.dialog ? this.dialog.state.height - 51 : 260}>
<CustomBrowserMutiLeft
filterData={rightDatas}
datas={listDatas}
onDoubleClick={this.onleftDoubleClick}
onClick={this.onLeftListCheck}
selectedKeys={leftListSelectedKeys}
/>
</WeaNewScroll>
</div>
</div>
<div className="wea-transfer-opration">
<CustomBrowserOperation
rightActive={rightActive}
leftActive={leftActive}
leftAllActive={this.leftListAllActive()}
rightAllActive={rightAllActive}
moveToRight={() => this.moveTo("right")}
moveToLeft={() => this.moveTo("left")}
moveAllToRight={() => this.moveTo("allToRight")}
moveAllToLeft={() => this.moveTo("allToLeft")}
/>
</div>
<div className="wea-hr-muti-input-right">
<CustomBrowserMutiRight
height={this.dialog ? this.dialog.state.height - 51 : 260}
data={rightDatas} checkedKeys={rightCheckedKeys}
checkedCb={rightCheckedKeys => this.setState({ rightCheckedKeys })}
onDoubleClick={this.onRightDoubleClick}
/>
</div>
</div>
</Spin>;
return (
<WeaDialog
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={this.renderTitle()}
className="custom_browser_dialog" draggable={false} style={{
width: 784, height: 460, minHeight: 200, minWidth: 380,
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
}} buttons={buttons}>{dom}</WeaDialog>
);
}
}
export default CustomTransferDialog;

View File

@ -34,6 +34,7 @@ class Layout extends Component {
}
componentDidMount() {
this.setFontSize();
if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css";
const link = document.createElement("link");
@ -46,8 +47,31 @@ class Layout extends Component {
window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
window.location.hash.indexOf("mobilepayroll") !== -1 && stores.taxAgentStore.initPageAndOptAuth();
}
window.addEventListener("storage", this.setFontSize);
}
componentWillUnmount() {
window.removeEventListener("storage", this.setFontSize);
}
setFontSize = () => {
const { themeFontSize } = JSON.parse(localStorage.getItem("theme-themeInfo")) || { themeFontSize: "12" };
if (window.location.href.indexOf("/spa/hrmSalary/") !== -1) {
const href = `/cloudstore/resource/pc/com/font-size/${themeFontSize}px.css`;
jQuery("#theme-font").remove();
window.parent.jQuery("#theme-font1").remove();
jQuery(jQuery("head")[0]).append(`<link id="theme-font" rel="stylesheet" type="text/css" href="${href}" />`);
const link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", href);
link.setAttribute("id", "theme-font1");
setTimeout(() => {
window.parent.document.head.appendChild(link);
}, 500);
}
};
render() {
const { taxAgentStore: { PageAndOptAuth, loading } } = this.props;
return (<WeaLocaleProvider>

View File

@ -6,13 +6,14 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
import { WeaTableNew } from "comsMobx";
import { WeaLoadingGlobal, WeaLocaleProvider } from "ecCom";
import { message, Spin } from "antd";
import * as API from "../../../apis/statistics";
import { toJS } from "mobx";
import { getIframeParentHeight } from "../../../util";
import { sysConfCodeRule } from "../../../apis/ruleconfig";
import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog";
import * as API from "../../../apis/statistics";
import "../index.less";
const WeaTableComx = WeaTableNew.WeaTable;
@ -26,7 +27,16 @@ class SalaryDetails extends Component {
this.state = {
loading: false, dataSource: [], columns: [], selectedRowKeys: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
showTotalCell: false, updateSum: true
showTotalCell: false, updateSum: true,
transferDialog: {
visible: false, searchParamsKey: "name", dataParams: { page: "salary_details_report" }, saveLoading: false,
completeURL: "/api/bs/hrmsalary/common/pageList/get/setting", convertDatasource: datas => {
return {
listDatas: _.map(datas.setting, o => ({ id: o.id, name: o.name })),
checked: this.converCheckedCol(datas)
};
}
}
};
}
@ -73,10 +83,10 @@ class SalaryDetails extends Component {
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
getSalaryList = (props) => {
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props;
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props || this.props;
const [startDateStr, endDateStr] = dateRange;
const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams();
const { pageInfo } = this.state;
const { pageInfo, transferDialog } = this.state;
const payload = {
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
departmentIds: departmentIds ? departmentIds.split(",") : [],
@ -93,7 +103,7 @@ class SalaryDetails extends Component {
const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
this.setState({
dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload,
showTotalCell: confCode === "1"
showTotalCell: confCode === "1", transferDialog: { ...transferDialog, cancel: false }
}, () => tableStore.getDatas(dataKey.datas));
}
}).catch(() => this.setState({ loading: false }));
@ -113,10 +123,10 @@ class SalaryDetails extends Component {
};
getColumns = () => {
const { attendanceStore: { tableStore } } = this.props;
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum } = this.state;
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload, updateSum, transferDialog } = this.state;
const columns = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
const sumRowlistUrl = showTotalCell ? "/api/bs/hrmsalary/report/statistics/employee/salaryListSum" : "";
if (!_.isEmpty(columns)) {
if (!_.isEmpty(columns) && !transferDialog.visible && !transferDialog.cancel) {
this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
sumRowlistUrl, payload: { ...payload, updateSum },
@ -130,9 +140,33 @@ class SalaryDetails extends Component {
}
return [];
};
handleSetDefCols = () => this.setState({ transferDialog: { ...this.state.transferDialog, visible: true } });
converCheckedCol = (data) => {
return _.reduce(data.checked, (pre, cur) => {
const item = _.find(data.setting, k => k.id === cur);
if (!_.isEmpty(item)) return [...pre, item];
return pre;
}, []);
};
savePageListSetting = (values) => {
const payload = {
page: "salary_details_report",
setting: _.map(values, o => o.id)
};
this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: true } });
API.savePageListSetting(payload).then(({ status, errormsg }) => {
this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: false } });
if (status) {
message.success(getLabel(111, "操作成功!"));
this.setState({ transferDialog: { ...this.state.transferDialog, visible: false } }, () => this.getSalaryList());
} else {
message.error(errormsg);
}
});
};
render() {
const { loading, dataSource } = this.state;
const { loading, dataSource, transferDialog } = this.state;
const { attendanceStore: { tableStore } } = this.props;
return (
<div className="table-layout"
@ -151,6 +185,11 @@ class SalaryDetails extends Component {
needScroll={true}
columns={this.getColumns()}
/>
{/*默认显示列*/}
<CustomTransferDialog {...transferDialog} onChange={this.savePageListSetting}
onCancel={() => this.setState({
transferDialog: { ...transferDialog, visible: false, cancel: true }
})}/>
</div>
);
}

View File

@ -314,7 +314,7 @@ class Index extends Component {
<AdvanceInputBtn onOpenAdvanceSearch={this.handleOpenAdvanceSearch}
onAdvanceSearch={this.handleAdvanceSearch}/>
];
const dropMenuDatas = [
let dropMenuDatas = [
{
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
content: getLabel(545781, "操作日志")
@ -334,6 +334,11 @@ class Index extends Component {
{ key: "detail", title: getLabel(111, "员工明细") },
{ key: "salaryDetail", title: getLabel(111, "薪资明细") }
];
dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1);
(PageAndOptAuth.isChief && selectedKey === "salaryDetail") && (dropMenuDatas = [...dropMenuDatas, {
key: "DEF_COLUMN", icon: <i className="icon-coms-Custom"/>, content: getLabel(111, "默认显示列"),
onClick: () => this.salaryRef.wrappedInstance.handleSetDefCols()
}]);
return (
<WeaReqTop
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
@ -341,8 +346,7 @@ class Index extends Component {
buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10}
onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())}
showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick}
dropMenuDatas={selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1)}
>
dropMenuDatas={dropMenuDatas}>
<div className={cs("searchAdvanced-condition-container", { "searchAdvanced-condition-hide": !showSearchAd })}>
<SearchPannel onCancel={() => this.setState({ showSearchAd: false })} onAdSearch={this.onAdSearch}/>
</div>

View File

@ -156,7 +156,7 @@ class Index extends Component {
}
}, () => {
const { selectItems: salaryItems } = this.state.headerFieldsDialog;
cacheImportField({ salaryItems: salaryItems ? salaryItems.split(",") : [] })
cacheImportField({ salaryAcctRecordId, salaryItemIds: salaryItems ? salaryItems.split(",") : [] })
.then(({ status, errormsg }) => {
if (status) {
const payload = {

View File

@ -125,6 +125,15 @@ class Index extends Component {
case "offlineCompare":
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcOc/${salaryAcctRecordId}`, "_blank");
break;
case "LOCK":
case "UNLOCK":
const { selectedRowKeys } = this.calc.calcTableRef.wrappedInstance.state;
if (_.isEmpty(selectedRowKeys)) {
message.warning(getLabel(543303, "请选择表格数据!"));
return;
}
this.calc.calcTableRef.wrappedInstance.updateEmpLockStatus({ lockStatus: key, acctEmpIds: selectedRowKeys });
break;
default:
break;
}
@ -145,6 +154,8 @@ class Index extends Component {
<Menu.Item key="exportAll">{getLabel(81272, "导出全部")}</Menu.Item>
<Menu.Item key="export_custom">{getLabel(544270, "自定义导出")}</Menu.Item>
<Menu.Item key="offlineCompare">{getLabel(543249, "线下对比")}</Menu.Item>
<Menu.Item key="LOCK">{getLabel(111, "批量锁定")}</Menu.Item>
<Menu.Item key="UNLOCK">{getLabel(111, "批量解锁")}</Menu.Item>
</Menu>
);
reqBtns = [

View File

@ -150,7 +150,7 @@ class Index extends Component {
"操作日志": getLabel(545781, "操作日志")
};
const childFrameObj = document.getElementById("atdTable");
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
getSalaryFileList = (props, init = false) => {
const { pageInfo } = this.state;

View File

@ -174,7 +174,7 @@ class Index extends Component {
if (it === "ackFeedbackStatus" || it === "feedbackStatus") {
payrollTempFeedbackForm.updateFields({ [it]: fieldsEchoData[it] ? "1" : "0" });
} else {
payrollTempFeedbackForm.updateFields({ [it]: !_.isNil(fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
payrollTempFeedbackForm.updateFields({ [it]: (!_.isNil(fieldsEchoData[it]) && fieldsEchoData[it]) ? fieldsEchoData[it].toString() : "/" });
}
});
this.setState({

View File

@ -1,16 +1,29 @@
import React from "react";
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
export const conditions = [
{
items: [
{
conditionType: "SELECT",
domkey: ["rule"],
fieldcol: 10,
label: "人员字段",
lanId: 543352,
labelcol: 8,
options: [],
viewAttr: 2
}
],
title: "人员校验规则",
lanId: 543357,
defaultshow: true
},
{
items: [
{
conditionType: "SELECT",
domkey: ["orderRule"],
fieldcol: 10,
label: getLabel(15512, "排序字段"),
label: "排序字段",
lanId: 15512,
labelcol: 8,
options: [],
viewAttr: 2
@ -19,28 +32,15 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["ascOrDesc"],
fieldcol: 10,
label: getLabel(543351, "正序/倒序"),
label: "正序/倒序",
lanId: 543351,
labelcol: 8,
options: [],
viewAttr: 2
}
],
title: getLabel(543356, "排序规则"),
defaultshow: true
},
{
items: [
{
conditionType: "SELECT",
domkey: ["rule"],
fieldcol: 10,
label: getLabel(543352, "人员字段"),
labelcol: 8,
options: [],
viewAttr: 2
}
],
title: getLabel(543357, "人员校验规则"),
title: "排序规则",
lanId: 543356,
defaultshow: true
},
{
@ -49,48 +49,48 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["OPEN_APPLICATION_ENCRYPT"],
fieldcol: 10,
label: getLabel(526997, "加密设置"),
label: "加密设置",
lanId: 526997,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(543358, "加密规则"),
title: "加密规则",
lanId: 543358,
defaultshow: true
},
{
items: [
{
conditionType: "SWITCH",
domkey: ["taxDeclarationFunction"],
domkey: ["salaryShowStatus"],
fieldcol: 10,
label: getLabel(111, "系统算税"),
label: "显示工资单页签",
lanId: 111,
labelcol: 8,
viewAttr: 1
viewAttr: 2
},
{
conditionType: "SWITCH",
domkey: ["WITHDRAW_TAX_DECLARATION"],
domkey: ["adjustShowStatus"],
fieldcol: 10,
label: getLabel(111, "撤回申报表"),
label: "显示调薪记录页签",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "算税规则"),
defaultshow: true
},
{
items: [
},
{
conditionType: "SWITCH",
domkey: ["salaryArchiveDelete"],
domkey: ["taxAgentShowStatus"],
fieldcol: 10,
label: getLabel(111, "允许删除档案"),
label: "显示【个税扣缴义务人】信息",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(538004, "薪资档案"),
title: "我的薪资福利设置",
lanId: 111,
defaultshow: true
},
{
@ -99,7 +99,8 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["welBaseDiffByPerAndCom"],
fieldcol: 10,
label: getLabel(111, "区分个人和公司"),
label: "区分个人和公司",
lanId: 111,
labelcol: 8,
viewAttr: 2
},
@ -107,12 +108,30 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["welBaseAutoAdjust"],
fieldcol: 10,
label: getLabel(111, "导入基数自动调整上/下限"),
label: "导入基数自动调整上/下限",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "福利档案基数"),
title: "福利档案基数",
lanId: 111,
defaultshow: true
},
{
items: [
{
conditionType: "SWITCH",
domkey: ["salaryArchiveDelete"],
fieldcol: 10,
label: "允许删除档案",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: "薪资档案",
lanId: 538004,
defaultshow: true
},
{
@ -121,73 +140,84 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["matchRule"],
fieldcol: 10,
label: getLabel(111, "匹配规则"),
label: "匹配规则",
lanId: 111,
options: [],
labelcol: 8,
viewAttr: 2
},
{
conditionType: "INPUTNUMBER",
domkey: ["salaryAcctFixedColumns"],
fieldcol: 10,
label: "固定数",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "薪资核算人员匹配规则"),
title: "薪资核算",
lanId: 111,
defaultshow: true
},
{
items: [
{
conditionType: "INPUTNUMBER",
domkey: ["salaryAcctFixedColumns"],
conditionType: "SWITCH",
domkey: ["taxDeclarationFunction"],
fieldcol: 10,
label: getLabel(111, "固定数"),
label: "系统算税",
lanId: 111,
labelcol: 8,
viewAttr: 1
},
{
conditionType: "SWITCH",
domkey: ["WITHDRAW_TAX_DECLARATION"],
fieldcol: 10,
label: "撤回申报表",
lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "薪资核算固定列头数"),
title: "算税规则",
lanId: 111,
defaultshow: true
},
{
items: [
{
conditionType: "SELECT",
domkey: ["REPORT_ORGANIZATIN_TYPE"],
fieldcol: 10,
label: "组织信息",
lanId: 111,
options: [],
labelcol: 8,
viewAttr: 2
}
],
title: "薪资报表",
lanId: 111,
defaultshow: true
}
// {
// items: [
// {
// conditionType: "SWITCH",
// domkey: ["extEmpsWitch"],
// fieldcol: 10,
// label: getLabel(111, "开启非系统人员"),
// label: "开启非系统人员",
// lanId: 111,
// labelcol: 8,
// viewAttr: 2
// }
// ],
// title: getLabel(111, "非系统人员"),
// title: "非系统人员",
// lanId: 111,
// defaultshow: true
// },
{
items: [
{
conditionType: "SWITCH",
domkey: ["salaryShowStatus"],
fieldcol: 10,
label: getLabel(111, "显示工资单页签"),
labelcol: 8,
viewAttr: 2
},
{
conditionType: "SWITCH",
domkey: ["adjustShowStatus"],
fieldcol: 10,
label: getLabel(111, "显示调薪记录页签"),
labelcol: 8,
viewAttr: 2
},
{
conditionType: "SWITCH",
domkey: ["taxAgentShowStatus"],
fieldcol: 10,
label: getLabel(111, "显示【个税扣缴义务人】信息"),
labelcol: 8,
viewAttr: 2
}
],
title: getLabel(111, "我的薪资福利设置"),
defaultshow: true
}
];
export const payloadList = [
{ enumClass: "com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum" },

View File

@ -3,7 +3,7 @@
overflow: hidden !important;
.ruleWrapper {
padding: 16px;
padding: 8px 16px 0;
background: #e5e5e5;
height: 100%;
overflow: hidden auto;

View File

@ -39,10 +39,18 @@ class RuleConfig extends Component {
const optionsList = { matchRule, orderRule, ascOrDesc, rule };
this.setState({
sysinfo, conditions: _.map(conditions, item => ({
...item,
...item, title: getLabel(item.lanId, item.title),
items: _.map(item.items, o => {
o = { ...o, label: getLabel(o.lanId, o.label) };
if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") {
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
} else if (getKey(o) === "REPORT_ORGANIZATIN_TYPE") {
return {
...o, options: [
{ key: "0", showname: getLabel(111, "核算时组织信息"), selected: true },
{ key: "1", showname: getLabel(111, "实时组织信息"), selected: false }
]
};
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
return { ...o, viewAttr: sysinfo.showEncryptOperationButton === "true" ? 2 : 1 };
} else if (getKey(o) === "taxDeclarationFunction") {
@ -69,7 +77,9 @@ class RuleConfig extends Component {
} else if (item === "matchRule") {
form.updateFields({ [item]: { value: sysinfo["salaryAcctEmployeeRule"] || "" } });
} else if (item === "taxDeclarationFunction") {
form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } });
form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "1") } });
} else if (item === "REPORT_ORGANIZATIN_TYPE") {
form.updateFields({ [item]: { value: sysinfo[item] === "0" ? "0" : (sysinfo[item] || "0") } });
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
} else if (item === "OPEN_APPLICATION_ENCRYPT") {
@ -117,6 +127,7 @@ class RuleConfig extends Component {
case "taxAgentShowStatus":
case "salaryShowStatus":
case "adjustShowStatus":
case "REPORT_ORGANIZATIN_TYPE":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@ -126,7 +137,8 @@ class RuleConfig extends Component {
extEmpsWitch: getLabel(544097, "开启非系统人员"),
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
salaryShowStatus: getLabel(111, "显示工资单页签"),
adjustShowStatus: getLabel(111, "显示调薪记录页签")
adjustShowStatus: getLabel(111, "显示调薪记录页签"),
REPORT_ORGANIZATIN_TYPE: getLabel(111, "组织信息")
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;

View File

@ -236,7 +236,7 @@ class Index extends Component {
"操作日志": getLabel(545781, "操作日志")
};
const childFrameObj = document.getElementById("atdTable");
childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
handleChangeProgramme = (type, schemeId, payload) => {
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })