Merge branch 'release/2.17.1.2411.01' into release/2.17.1.2411.01-个税

# Conflicts:
#	pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
#	pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
This commit is contained in:
lys 2024-12-09 15:28:31 +08:00
commit f2b957578d
18 changed files with 398 additions and 154 deletions

View File

@ -150,3 +150,7 @@ export const getPageListTemplatelist = (params) => {
export const changePageListTemplate = (params) => { export const changePageListTemplate = (params) => {
return postFetch("/api/bs/hrmsalary/common/pageList/template/change", params); return postFetch("/api/bs/hrmsalary/common/pageList/template/change", params);
}; };
//薪酬统计报表-删除模板
export const deleteTemplatePageList = (params) => {
return postFetch("/api/bs/hrmsalary/common/pageList/template/delete", params);
};

View File

@ -8,7 +8,7 @@
* @description: * @description:
*/ */
import React, { Component } from "react"; import React, { Component } from "react";
import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll } from "ecCom"; import { WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaTable } from "ecCom";
import { Button, Col, Row, Spin } from "antd"; import { Button, Col, Row, Spin } from "antd";
import CustomBrowserMutiLeft from "./customBrowserMutiLeft"; import CustomBrowserMutiLeft from "./customBrowserMutiLeft";
import CustomBrowserMutiRight from "./customBrowserMutiRight"; import CustomBrowserMutiRight from "./customBrowserMutiRight";
@ -22,8 +22,8 @@ class CustomTransferDialog extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
loading: false, listDatas: [], loading: false, listDatas: [], columns: [], selectedRowKeys: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
query: { [props.searchParamsKey]: "" }, query: props.searchParamsKey ? { [props.searchParamsKey]: "" } : {},
leftListSelectedKeys: [], // 左侧table选择的keys leftListSelectedKeys: [], // 左侧table选择的keys
leftListSelectedData: [], // 左侧table选择的数据 leftListSelectedData: [], // 左侧table选择的数据
rightCheckedKeys: [], //右侧选择的keys rightCheckedKeys: [], //右侧选择的keys
@ -42,24 +42,27 @@ class CustomTransferDialog extends Component {
} }
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) { } else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.setState({ this.setState({
query: { [this.props.searchParamsKey]: "" }, query: { [this.props.searchParamsKey]: "" }, selectedRowKeys: [],
rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [] rightDatas: [], rightCheckedKeys: [], leftListSelectedData: [], leftListSelectedKeys: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }
}); });
this.selectedData = {}; this.selectedData = {};
} }
} }
getData = (init = false, props) => { getData = (init = false, props) => {
const { query } = this.state; const { query, pageInfo } = this.state;
const { completeURL, convertDatasource, dataParams = {} } = props || this.props; const { completeURL, convertDatasource, dataParams = {}, dialogType } = props || this.props;
let payload = { ...dataParams, ...query }; let payload = { ...dataParams, ...query };
dialogType === "table" && (payload = { ...payload, ...pageInfo });
this.setState({ loading: true }); this.setState({ loading: true });
postFetch(completeURL, payload).then(({ status, data }) => { postFetch(completeURL, payload).then(({ status, data }) => {
this.setState({ loading: false }); this.setState({ loading: false });
if (status && data.list) { if (status && data.list) {
const { pageNum: current, pageSize, total } = data; const { pageNum: current, pageSize, total } = data;
this.setState({ this.setState({
listDatas: convertDatasource ? convertDatasource(data.list) : data.list listDatas: convertDatasource ? convertDatasource(data.list) : data.list, columns: data.columns,
pageInfo: { ...pageInfo, current, pageSize, total }
}); });
} else { } else {
this.setState({ this.setState({
@ -132,18 +135,23 @@ class CustomTransferDialog extends Component {
}; };
renderTitle = () => { renderTitle = () => {
return (<div className="wea-hr-muti-dialog-title"> return (<div className="wea-hr-muti-dialog-title">
<span>{getLabel(111, "数据选择")}</span> <span>{this.props.title || getLabel(111, "数据选择")}</span>
<div/> <div>{this.props.titleOptsComs}</div>
</div>); </div>);
}; };
render() { render() {
const { loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys } = this.state; const {
const { searchParamsKey, saveLoading } = this.props; loading, listDatas, query, leftListSelectedKeys, rightDatas, rightCheckedKeys, pageInfo, selectedRowKeys,
const buttons = [ columns
} = this.state;
const {
searchParamsKey, saveLoading, dialogType = "", rowKey, tableOpts = {}, buttons = [
<Button type="primary" loading={saveLoading} onClick={this.handleOk} <Button type="primary" loading={saveLoading} onClick={this.handleOk}
disabled={_.isEmpty(rightDatas)}>{getLabel(111, "确 定")}</Button>, disabled={_.isEmpty(rightDatas)}>{getLabel(111, "确 定")}</Button>,
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>]; <Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>
]
} = this.props;
let rightActive = false, leftActive = false, rightAllActive = false; let rightActive = false, leftActive = false, rightAllActive = false;
if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true; if (leftListSelectedKeys && leftListSelectedKeys.length > 0) rightActive = true;
if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true; if (rightCheckedKeys && rightCheckedKeys.length > 0) leftActive = true;
@ -188,15 +196,45 @@ class CustomTransferDialog extends Component {
data={rightDatas} checkedKeys={rightCheckedKeys} data={rightDatas} checkedKeys={rightCheckedKeys}
checkedCb={rightCheckedKeys => this.setState({ rightCheckedKeys })} checkedCb={rightCheckedKeys => this.setState({ rightCheckedKeys })}
onDoubleClick={this.onRightDoubleClick} onDoubleClick={this.onRightDoubleClick}
onDrag={(data) => {this.setState({rightDatas: data})}} onDrag={(data) => {
this.setState({ rightDatas: data });
}}
/> />
</div> </div>
</div> </div>
</Spin>; </Spin>;
if (dialogType === "table") {
const sheight = this.dialog ? this.dialog.state.height - 156 : 260;
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
this.setState({
pageInfo: { ...pageInfo, current, pageSize }
}, () => this.getData());
},
onChange: current => {
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getData());
}
};
const rowSelection = {
selectedRowKeys,
onChange: selectedRowKeys => this.setState({ selectedRowKeys }, () => this.props.onSelect(selectedRowKeys))
};
dom = <div className="wea-hr-muti-input-table">
{this.props.children}
<WeaTable dataSource={listDatas} loading={loading} pagination={pagination} scroll={{ y: sheight }}
rowSelection={rowSelection} rowKey={rowKey || "id"}
columns={!_.isEmpty(tableOpts) ? [...columns, tableOpts] : columns}/>
</div>;
}
return ( return (
<WeaDialog <WeaDialog
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={this.renderTitle()} {...this.props} initLoadCss ref={dom => this.dialog = dom} title={this.renderTitle()}
className="custom_browser_dialog" draggable={false} style={{ className="custom_browser_dialog" draggable={true} style={{
width: 784, height: 460, minHeight: 200, minWidth: 380, width: 784, height: 460, minHeight: 200, minWidth: 380,
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)" maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
}} buttons={buttons}>{dom}</WeaDialog> }} buttons={buttons}>{dom}</WeaDialog>

View File

@ -3,6 +3,20 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.wea-select, .ant-select-selection, .ant-select {
width: 100%;
}
.wea-select {
display: inline-block;
position: relative;
}
.ant-select-selection {
height: 30px;
border-radius: 0;
}
} }
.wea-hr-muti-input-table { .wea-hr-muti-input-table {
@ -10,6 +24,19 @@
padding: 8px 16px; padding: 8px 16px;
height: 100%; height: 100%;
.table_opts {
display: flex;
align-items: center;
justify-content: flex-end;
width: 100%;
height: 40px;
background: #FFF;
.wea-button-icon {
margin-right: 10px;
}
}
.wea-new-table { .wea-new-table {
background: #FFF; background: #FFF;
} }

View File

@ -168,7 +168,7 @@ class PersonalScopeModal extends Component {
break; break;
case "SQL": case "SQL":
return <div style={{ display: "flex", alignItems: "center" }}> return <div style={{ display: "flex", alignItems: "center" }}>
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={targetTypeIds} <WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={targetTypeIdsNames}
onChange={val => this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/> onChange={val => this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>
<WeaHelpfulTip style={{ marginLeft: 10 }} width={200} placement="topLeft" title={<SQLHelpTip/>}/> <WeaHelpfulTip style={{ marginLeft: 10 }} width={200} placement="topLeft" title={<SQLHelpTip/>}/>
</div>; </div>;

View File

@ -5,15 +5,15 @@
* Date: 2024/3/26 * Date: 2024/3/26
*/ */
import React, { Component } from "react"; import React, { Component } from "react";
import { toJS } from "mobx";
import { inject, observer } from "mobx-react"; import { inject, observer } from "mobx-react";
import { WeaTableNew } from "comsMobx"; import { WeaTableNew } from "comsMobx";
import { WeaLoadingGlobal, WeaLocaleProvider, WeaSelect } from "ecCom"; import { WeaLoadingGlobal, WeaLocaleProvider, WeaSelect } from "ecCom";
import { message, Spin } from "antd"; import { Button, message, Modal, Spin } from "antd";
import { getIframeParentHeight } from "../../../util"; import { getIframeParentHeight } from "../../../util";
import { sysConfCodeRule } from "../../../apis/ruleconfig"; import { sysConfCodeRule } from "../../../apis/ruleconfig";
import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog"; import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog";
import SalaryDetailsTempDialog from "./salaryDetailsTempDialog"; import SalaryDetailsTempDialog from "./salaryDetailsTempDialog";
import SalaryTempMangerDialog from "./salaryTempMangerDialog";
import { MonthRangePicker } from "../../reportView/components/statisticalMicroSettingsSlide"; import { MonthRangePicker } from "../../reportView/components/statisticalMicroSettingsSlide";
import AdvanceInputBtn from "../components/advanceInputBtn"; import AdvanceInputBtn from "../components/advanceInputBtn";
import SearchPannel from "../components/searchPannel"; import SearchPannel from "../components/searchPannel";
@ -31,29 +31,28 @@ class SalaryDetails extends Component {
super(props); super(props);
this.state = { this.state = {
loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {}, loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {},
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", tempManageQuery: false,
showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} }, showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} },
transferDialog: { transferDialog: {
visible: false, searchParamsKey: "name", dataParams: { page: "salary_details_report" }, saveLoading: false, visible: false, searchParamsKey: "name", saveLoading: false,
dataParams: { page: "salary_details_report" },
completeURL: "", convertDatasource: datas => { completeURL: "", convertDatasource: datas => {
return { return {
listDatas: _.map(datas.setting, o => ({ id: o.id || o.column, name: o.name || o.text })), listDatas: _.map(datas.setting, o => ({ id: o.id || o.column, name: o.name || o.text })),
checked: this.converCheckedCol(datas) checked: converCheckedCol(datas)
}; };
}, },
type: "default" dialogType: "temp"
},
tempManageDialog: { //模板管理
visible: false, completeURL: "", dialogType: "table", dataParams: { page: "salary_details_report" }
} }
}; };
} }
async componentDidMount() { async componentDidMount() {
const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]); const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
this.setState({ this.setState({ showTotalCell: confCode === "1" });
showTotalCell: confCode === "1"
}, () => {
this.getSalaryList(this.props);
this.getPageListTemplatelist();
});
window.addEventListener("message", this.handleReceive, false); window.addEventListener("message", this.handleReceive, false);
window.addEventListener("resize", () => this.forceUpdate(), false); window.addEventListener("resize", () => this.forceUpdate(), false);
} }
@ -75,8 +74,7 @@ class SalaryDetails extends Component {
if (status) { if (status) {
this.setState({ this.setState({
tempPageList: _.map(data, o => ({ ...o, key: String(o.id), showname: o.name })), tempPageList: _.map(data, o => ({ ...o, key: String(o.id), showname: o.name })),
templateId: !_.isEmpty(_.find(data, o => !!o.checked)) ? String(_.find(data, o => !!o.checked).id) : "", templateId: !_.isEmpty(_.find(data, o => !!o.checked)) ? String(_.find(data, o => !!o.checked).id) : ""
transferDialog: { ...this.state.transferDialog, visible: false, type: "default" }
}); });
} }
}); });
@ -85,13 +83,13 @@ class SalaryDetails extends Component {
const { type, payload: { id, params } = {} } = data; const { type, payload: { id, params } = {} } = data;
const { pageInfo } = this.state; const { pageInfo } = this.state;
if (type === "init") { if (type === "init") {
this.getColumns(); // this.getColumns();
this.getSalaryList(this.props);
} else if (type === "turn") { } else if (type === "turn") {
if (id === "PAGEINFO") { if (id === "PAGEINFO") {
const { pageNum: current, size: pageSize } = params; const { pageNum: current, size: pageSize } = params;
this.setState({ this.setState({
pageInfo: { ...pageInfo, current, pageSize }, pageInfo: { ...pageInfo, current, pageSize }, updateSum: false
updateSum: false
}, () => this.getSalaryList(this.props)); }, () => this.getSalaryList(this.props));
} else if (id === "CHECKBOX") { } else if (id === "CHECKBOX") {
const { selectedRowKeys: checkBox } = params; const { selectedRowKeys: checkBox } = params;
@ -127,20 +125,24 @@ class SalaryDetails extends Component {
const { list: dataSource, pageNum: current, total, pageSize } = pageparams; const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
this.setState({ this.setState({
columns, dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload columns, dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload
}, () => tableStore.getDatas(dataKey.datas)); }, () => {
// tableStore.getDatas(dataKey.datas)
this.getColumns();
});
} }
}).catch(() => this.setState({ loading: false })); }).catch(() => this.setState({ loading: false }));
}; };
getSalaryListSum = (payload) => { getSalaryListSum = (payload) => {
API.getSalaryListSum(payload).then(({ status, data }) => { API.getSalaryListSum(payload).then(({ status, data }) => {
if (status) this.setState({ sumRow: data.sumRow }); if (status) this.setState({ sumRow: data.sumRow }, () => this.getColumns());
}); });
}; };
handleExportSalaryList = (key) => { handleExportSalaryList = (key) => {
const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props; // const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props;
let { selectedRowKeys, payload, columns: tempCols } = this.state; let { selectedRowKeys, payload, columns: tempCols } = this.state;
const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); // const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols; // const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols;
const columns = _.filter(tempCols, o => o.column !== "acctTimes");
if (key === "SELECTED" && selectedRowKeys.length === 0) { if (key === "SELECTED" && selectedRowKeys.length === 0) {
message.warning(getLabel(543345, "请选择需要导出的数据!")); message.warning(getLabel(543345, "请选择需要导出的数据!"));
return; return;
@ -151,12 +153,13 @@ class SalaryDetails extends Component {
}); });
}; };
getColumns = () => { getColumns = () => {
const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props; // const { attendanceStore: { tableStore }, salaryDetailShowType } = this.props;
const { const {
columns: tempCols, dataSource, pageInfo, selectedRowKeys, showTotalCell, sumRow, transferDialog columns: tempCols, dataSource, pageInfo, selectedRowKeys, showTotalCell, sumRow
} = this.state; } = this.state;
const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"); // const customCols = _.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes");
const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols; // const columns = salaryDetailShowType === "1" ? _.filter(tempCols, o => o.column !== "acctTimes") : customCols;
const columns = _.filter(tempCols, o => o.column !== "acctTimes");
if (!_.isEmpty(columns)) { if (!_.isEmpty(columns)) {
this.postMessageToChild({ this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow, dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
@ -170,31 +173,17 @@ class SalaryDetails extends Component {
} }
return []; return [];
}; };
handleSetDefCols = () => this.setState({ handleSetDefCols = (params = {}) => this.setState({
transferDialog: { transferDialog: {
...this.state.transferDialog, completeURL: "/api/bs/hrmsalary/common/pageList/get/setting", visible: true, ...this.state.transferDialog, visible: true, dataParams: { ...this.state.transferDialog.dataParams, ...params },
dataParams: { page: "salary_details_report" } completeURL: "/api/bs/hrmsalary/common/pageList/template/get", dialogType: "temp"
} }
}); }, () => this.getPageListTemplatelist());
converCheckedCol = (data) => {
const { salaryDetailShowType } = this.props;
return _.reduce(data.checked || [], (pre, cur) => {
const item = _.find(data.setting, k => (salaryDetailShowType !== "1" && k.id === cur) || (salaryDetailShowType === "1" && k.column === cur.column));
if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }];
return pre;
}, []);
};
savePageListSetting = (values) => { savePageListSetting = (values) => {
const { transferDialog, tempDialog } = this.state, { type } = transferDialog; const { transferDialog } = this.state;
if (type === "temp") {
this.setState({
tempDialog: { ...tempDialog, visible: true, setting: _.map(values, o => o.id) }
});
return;
}
const payload = { const payload = {
page: "salary_details_report", ...transferDialog.dataParams, setting: _.map(values, o => o.id)
setting: _.map(values, o => o.id)
}; };
this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: true } }); this.setState({ transferDialog: { ...this.state.transferDialog, saveLoading: true } });
API.savePageListSetting(payload).then(({ status, errormsg }) => { API.savePageListSetting(payload).then(({ status, errormsg }) => {
@ -202,57 +191,68 @@ class SalaryDetails extends Component {
if (status) { if (status) {
message.success(getLabel(111, "操作成功!")); message.success(getLabel(111, "操作成功!"));
this.setState({ this.setState({
transferDialog: { ...this.state.transferDialog, visible: false, type: "default" } transferDialog: { ...this.state.transferDialog, visible: false, dialogType: "temp" }
}, () => this.getSalaryList()); }, () => this.getSalaryList());
} else { } else {
message.error(errormsg); message.error(errormsg);
} }
}); });
}; };
handelAddTemp = (templateId) => { handelAddTemp = (templateId = "") => {
const { transferDialog, tempDialog, tempPageList } = this.state; const { tempDialog, tempPageList } = this.state;
this.setState({ this.setState({
transferDialog: { tempDialog: {
...transferDialog, visible: true, type: "temp", ...tempDialog, visible: true, setting: _.map(this.transferRef.state.rightDatas, o => o.id)
dataParams: { ...transferDialog.dataParams, id: templateId }, // template: _.find(tempPageList, o => o.key === templateId)
completeURL: "/api/bs/hrmsalary/common/pageList/template/get" }
},
tempDialog: { ...tempDialog, id: templateId, template: _.find(tempPageList, o => o.key === templateId) }
}); });
}; };
changePageListTemplate = (templateId) => { changePageListTemplate = (templateId) => {
this.setState({ templateId }, () => { this.setState({ templateId }, () => {
API.changePageListTemplate({ page: "salary_details_report", templateId }).then(({ status, errormsg }) => { API.changePageListTemplate({ page: "salary_details_report", templateId })
.then(({ status, errormsg }) => {
if (status) { if (status) {
message.success(getLabel(111, "操作成功!")); message.success(getLabel(111, "操作成功!"));
this.setState({
transferDialog: {
...this.state.transferDialog,
dataParams: { ...this.state.transferDialog.dataParams, id: templateId }
}
}, () => {
this.transferRef.getData(true);
this.getSalaryList(); this.getSalaryList();
});
} else { } else {
message.error(errormsg); message.error(errormsg);
} }
}); });
}); });
}; };
handleDelTemp = (ids) => {
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: getLabel(111, "确认删除吗?"),
onOk: () => {
API.deleteTemplatePageList({ ids }).then(({ status, errormsg }) => {
if (status) {
message.success(getLabel(111, "操作成功!"));
this.setState({ tempManageQuery: !this.state.tempManageQuery }, () => this.getPageListTemplatelist());
} else {
message.error(errormsg);
}
});
}
});
};
render() { render() {
const { loading, dataSource, transferDialog, tempDialog, tempPageList, templateId } = this.state; const {
const { attendanceStore: { tableStore }, dateRange, showSearchAd, salaryDetailShowType } = this.props; loading, dataSource, transferDialog, tempDialog, tempPageList, templateId, tempManageDialog, tempManageQuery
} = this.state;
const { dateRange, showSearchAd } = this.props;
const { dialogType } = transferDialog;
return (<React.Fragment> return (<React.Fragment>
<div className="query-div"> <div className="query-div">
{
salaryDetailShowType === "1" &&
<div className="custom-select">
<WeaSelect style={{ width: 200 }} hasAddBtn options={tempPageList} addOnClick={this.handelAddTemp}
showSearch optionFilterProp="children" value={templateId}
onChange={this.changePageListTemplate}/>
{
templateId &&
<span className="custom-select-edit" title={getLabel(111, "编辑模板")}
onClick={() => this.handelAddTemp(templateId)}>
<i className="icon-coms-BatchEditing-Hot"></i>
</span>
}
</div>
}
<MonthRangePicker dateRange={dateRange} viewAttr={2} onChange={this.props.onChange}/> <MonthRangePicker dateRange={dateRange} viewAttr={2} onChange={this.props.onChange}/>
<AdvanceInputBtn onOpenAdvanceSearch={this.props.handleOpenAdvanceSearch} <AdvanceInputBtn onOpenAdvanceSearch={this.props.handleOpenAdvanceSearch}
onAdvanceSearch={this.props.handleAdvanceSearch}/> onAdvanceSearch={this.props.handleAdvanceSearch}/>
@ -270,28 +270,47 @@ class SalaryDetails extends Component {
id="atdTable" id="atdTable"
/> />
</Spin> </Spin>
<WeaTableComx {/*<WeaTableComx*/}
style={{ display: "none" }} {/* style={{ display: "none" }}*/}
comsWeaTableStore={tableStore} {/* comsWeaTableStore={tableStore}*/}
needScroll={true} {/* needScroll={true}*/}
columns={this.getColumns()} {/* columns={this.getColumns()}*/}
/> {/*/>*/}
{/*默认显示列,薪资模板列表*/} {/*默认显示列,薪资模板列表*/}
<CustomTransferDialog {...transferDialog} onChange={this.savePageListSetting} <CustomTransferDialog {...transferDialog} ref={dom => this.transferRef = dom}
onCancel={() => this.setState({ onCancel={() => this.setState({
transferDialog: { transferDialog: { ...transferDialog, completeURL: "", visible: false }
...transferDialog, completeURL: "", visible: false, type: "default" })}
buttons={
dialogType === "temp" ? [
<Button type="primary"
onClick={this.handelAddTemp}>{getLabel(111, "存为模板")}</Button>,
<Button type="ghost" onClick={() => this.setState({
tempManageDialog: {
...tempManageDialog, visible: true,
completeURL: "/api/bs/hrmsalary/common/pageList/template/pageList"
} }
})}/> })}>{getLabel(111, "模板管理")}</Button>
] : []
}
titleOptsComs={
dialogType === "temp" ?
<WeaSelect style={{ width: 200 }} options={tempPageList}
showSearch optionFilterProp="children"
value={templateId}
onChange={this.changePageListTemplate}/> : null
}/>
{/*薪资明细模板设置*/} {/*薪资明细模板设置*/}
<SalaryDetailsTempDialog {...tempDialog} <SalaryDetailsTempDialog {...tempDialog}
onCancel={callback => this.setState({ onCancel={callback => this.setState({
tempDialog: { ...tempDialog, visible: false, setting: [] } tempDialog: { ...tempDialog, visible: false, setting: [] }
}, () => callback && callback())} }, () => callback && callback())}
onSuccess={() => { onSuccess={this.getPageListTemplatelist}/>
this.getPageListTemplatelist(); {/*薪资明细自定义列模板管理*/}
this.getSalaryList(); <SalaryTempMangerDialog {...tempManageDialog} onDelete={this.handleDelTemp} isQuery={tempManageQuery}
}}/> onSuccess={this.getPageListTemplatelist} onCancel={() => this.setState({
tempManageDialog: { ...tempManageDialog, completeURL: "", visible: false }
})}/>
</div> </div>
</React.Fragment> </React.Fragment>
); );
@ -299,3 +318,11 @@ class SalaryDetails extends Component {
} }
export default SalaryDetails; export default SalaryDetails;
export const converCheckedCol = (data) => {
return _.reduce(data.checked || [], (pre, cur) => {
const item = _.find(data.setting, k => k.column === cur.column);
if (!_.isEmpty(item)) return [...pre, { ...item, id: item.id || item.column, name: item.name || item.text }];
return pre;
}, []);
};

View File

@ -45,15 +45,15 @@ class SalaryDetailTempDialog extends Component {
...item, items: _.map(item.items, o => { ...item, items: _.map(item.items, o => {
if (getKey(o) === "sharedType") { if (getKey(o) === "sharedType") {
return { return {
...o, label: getLabel(o.lanId, o.label), value: id ? String(template["sharedType"]) : "0", ...o, label: getLabel(o.lanId, o.label), value: id ? String(template["sharedType"]) : "1",
options: [ options: [
{ key: "0", showname: getLabel(111, "公共") }, { key: "1", showname: getLabel(111, "私有") },
{ key: "1", showname: getLabel(111, "私有") } { key: "0", showname: getLabel(111, "共享") }
] ]
}; };
} else if (getKey(o) === "limitIds") { } else if (getKey(o) === "limitIds") {
return { return {
...o, label: getLabel(o.lanId, o.label), hide: !id || (id && template["sharedType"] === 0), ...o, label: getLabel(o.lanId, o.label), hide: !id || (id && template["sharedType"] === 1),
value: id ? template["limitIds"].join(",") : "", value: id ? template["limitIds"].join(",") : "",
options: _.map(data, o => ({ key: o.id, showname: o.content })) options: _.map(data, o => ({ key: o.id, showname: o.content }))
}; };
@ -98,8 +98,8 @@ class SalaryDetailTempDialog extends Component {
...item, items: _.map(item.items, o => { ...item, items: _.map(item.items, o => {
if (key === "sharedType" && getKey(o) === "limitIds") { if (key === "sharedType" && getKey(o) === "limitIds") {
return { return {
...o, hide: value !== "1", viewAttr: value === "1" ? 3 : 1, ...o, hide: value !== "0", viewAttr: value === "0" ? 3 : 1,
rules: value === "1" ? "required|string" : "" rules: value === "0" ? "required|string" : ""
}; };
} }
return { ...o }; return { ...o };

View File

@ -0,0 +1,59 @@
/*
* 薪酬报表-薪酬明细
* 模板管理新增编辑弹框
* @Author: 黎永顺
* @Date: 2024/12/4
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaDialog, WeaLocaleProvider, WeaTransfer } from "ecCom";
import { postFetch } from "../../../util/request";
import { Button } from "antd";
const getLabel = WeaLocaleProvider.getLabel;
class SalaryTempAdminDialog extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, selectedKeys: [], dataSource: []
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { dataParams = {} } = nextProps;
this.setState({ loading: true });
postFetch("/api/bs/hrmsalary/common/pageList/template/get", { ...dataParams })
.then(({ status, data }) => {
if (status) {
this.setState({
dataSource: _.map(data.setting, o => ({ id: o.column, name: o.text })),
selectedKeys: _.map(data.checked, o => o.column)
});
}
});
}
}
render() {
const { dataSource, selectedKeys } = this.state, { dataParams } = this.props;
return (<WeaDialog
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={getLabel(111, "模板管理")}
className="temp_admin_dialog" style={{
width: 784, height: 460, minHeight: 200, minWidth: 380,
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
}} buttons={[
<Button type="primary"
onClick={() => this.props.onAddTemp(dataParams.id, selectedKeys)}>{getLabel(111, "确 定")}</Button>,
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>
]}>
<WeaTransfer data={dataSource} selectedKeys={selectedKeys} onChange={v => this.setState({ selectedKeys: v })}
height={this.dialog ? this.dialog.state.height - 10 : 260}/>
</WeaDialog>);
}
}
export default SalaryTempAdminDialog;

View File

@ -0,0 +1,91 @@
/*
* 薪酬报表-薪酬明细
* 模板管理弹框
* @Author: 黎永顺
* @Date: 2024/12/4
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaButtonIcon, WeaLocaleProvider } from "ecCom";
import CustomTransferDialog from "../../../components/CustomBrowser/components/customTransferDialog";
import SalaryTempAdminDialog from "./salaryTempAdminDialog";
import SalaryDetailsTempDialog from "./salaryDetailsTempDialog";
const getLabel = WeaLocaleProvider.getLabel;
class SalaryTempMangerDialog extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys: [], tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } },
tempDialog: { visible: false, setting: [], id: "", template: {} }
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.isQuery !== this.props.isQuery) this.setState({ selectedRowKeys: [] }, () => this.tempManageRef.getData());
}
handleTempAdminCols = (params = {}) => this.setState({
tempAdminDialog: { visible: true, dataParams: { ...this.state.tempAdminDialog.dataParams, ...params } }
});
handelAddTemp = (id = "", setting = []) => {
this.setState({
tempDialog: {
visible: true, setting, id, template: _.find(this.tempManageRef.state.listDatas, o => o.id === id)
}
});
};
render() {
const { selectedRowKeys, tempAdminDialog, tempDialog } = this.state;
return (<CustomTransferDialog ref={dom => this.tempManageRef = dom} {...this.props} buttons={[]}
title={getLabel(111, "模板管理")}
onSelect={v => this.setState({ selectedRowKeys: v })}
tableOpts={{
title: getLabel(111, "操作"),
dataIndex: "options",
width: 120,
render: (text, record) => (<React.Fragment>
{
record.canEdit &&
<a href="javascript:void(0);"
onClick={() => this.handleTempAdminCols({ id: record.id })}
style={{ marginRight: 10 }}>{getLabel(111, "编辑")}</a>
}
{
record.canEdit &&
<a href="javascript:void(0);"
onClick={() => this.props.onDelete([record.id])}>{getLabel(111, "删除")}</a>
}
</React.Fragment>)
}}>
<div className="table_opts">
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={() => this.handleTempAdminCols()}/>
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
onClick={() => this.props.onDelete(selectedRowKeys)} disabled={_.isEmpty(selectedRowKeys)}/>
</div>
{/*模板管理*/}
<SalaryTempAdminDialog {...tempAdminDialog} onAddTemp={this.handelAddTemp} onCancel={() => this.setState({
tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } }
})}/>
{/*薪资明细模板设置*/}
<SalaryDetailsTempDialog {...tempDialog}
onCancel={callback => this.setState({
tempDialog: { ...tempDialog, visible: false, setting: [] }
}, () => callback && callback())}
onSuccess={() => this.setState({
tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } }
}, () => {
this.props.onSuccess();
this.tempManageRef.getData();
})}/>
</CustomTransferDialog>);
}
}
export default SalaryTempMangerDialog;

View File

@ -9,7 +9,7 @@ import { inject, observer } from "mobx-react";
import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom"; import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
import { Button, Dropdown, Menu } from "antd"; import { Button, Dropdown, Menu } from "antd";
import { condition, reportCondition } from "./components/conditions"; import { condition, reportCondition } from "./components/conditions";
import { commonEnumList, reportGetForm, sysinfo } from "../../apis/ruleconfig"; import { commonEnumList, reportGetForm } from "../../apis/ruleconfig";
import { dimensionGetForm } from "../../apis/statistics"; import { dimensionGetForm } from "../../apis/statistics";
import EmployeeDetails from "./components/employeeDetails"; import EmployeeDetails from "./components/employeeDetails";
import SalaryDetails from "./components/salaryDetails"; import SalaryDetails from "./components/salaryDetails";
@ -50,16 +50,12 @@ class Index extends Component {
title: "", visible: false, title: "", visible: false,
typeKey: "", id: "" typeKey: "", id: ""
}, },
logDialogVisible: false, filterConditions: "[]", logDialogVisible: false, filterConditions: "[]"
salaryDetailShowType: "0" //薪资明细列表显示方式
}; };
} }
componentDidMount() { componentDidMount() {
this.initReportFormCondition(); this.initReportFormCondition();
sysinfo().then(({ status, data }) => {
if (status) this.setState({ salaryDetailShowType: data.SALARY_DETAILS_REPORT_SHOW_TYPE });
});
} }
initReportFormCondition = (payload = {}) => { initReportFormCondition = (payload = {}) => {
@ -281,7 +277,7 @@ class Index extends Component {
const { const {
selectedKey, modalReq, slideReq, conditions, reportConditions, selectedKey, modalReq, slideReq, conditions, reportConditions,
reportName, keyword, year, logDialogVisible, filterConditions, reportName, keyword, year, logDialogVisible, filterConditions,
dateRange, showSearchAd, isQuery, salaryDetailShowType dateRange, showSearchAd, isQuery
} = this.state; } = this.state;
const buttons = selectedKey === "statistics" ? [ const buttons = selectedKey === "statistics" ? [
<Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>, <Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>,
@ -319,8 +315,9 @@ class Index extends Component {
icon: <i className="icon-coms-Custom"/>, icon: <i className="icon-coms-Custom"/>,
content: getLabel(111, "显示列定制"), content: getLabel(111, "显示列定制"),
onClick: () => { onClick: () => {
tableStore.setColSetVisible(true); this.salaryRef.wrappedInstance.handleSetDefCols();
tableStore.tableColSet(true); // tableStore.setColSetVisible(true);
// tableStore.tableColSet(true);
} }
} }
]; ];
@ -330,18 +327,13 @@ class Index extends Component {
{ key: "salaryDetail", title: getLabel(111, "薪资明细") } { key: "salaryDetail", title: getLabel(111, "薪资明细") }
]; ];
dropMenuDatas = selectedKey === "salaryDetail" ? dropMenuDatas.slice(-1) : dropMenuDatas.slice(0, 1); 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 ( return (
<WeaReqTop <WeaReqTop
title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey} title={getLabel(111, "薪酬统计报表")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper" iconBgcolor="#F14A2D" tabDatas={tabs} className="xc_tj_fx_wrapper"
buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10} buttons={(!statisticsReportBtn && selectedKey === "statistics") ? buttons.slice(-1) : buttons} buttonSpace={10}
onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())} onChange={selectedKey => this.setState({ selectedKey }, () => this.state.selectedKey === "statistics" && this.initReportFormCondition())}
showDropIcon={(selectedKey === "statistics") || (selectedKey === "salaryDetail" && salaryDetailShowType !== "1")} showDropIcon={selectedKey !== "detail"} onDropMenuClick={this.onDropMenuClick} dropMenuDatas={dropMenuDatas}>
onDropMenuClick={this.onDropMenuClick} dropMenuDatas={dropMenuDatas}>
{ {
selectedKey === "statistics" ? selectedKey === "statistics" ?
<ReportList <ReportList
@ -354,7 +346,6 @@ class Index extends Component {
keyword={keyword} year={year} keyword={keyword} year={year}
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)} onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
/> : <SalaryDetails ref={dom => this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery} /> : <SalaryDetails ref={dom => this.salaryRef = dom} dateRange={dateRange} isQuery={isQuery}
salaryDetailShowType={salaryDetailShowType}
showSearchAd={showSearchAd} handleOpenAdvanceSearch={this.handleOpenAdvanceSearch} showSearchAd={showSearchAd} handleOpenAdvanceSearch={this.handleOpenAdvanceSearch}
handleAdvanceSearch={this.handleAdvanceSearch} onAdSearch={this.onAdSearch} handleAdvanceSearch={this.handleAdvanceSearch} onAdSearch={this.onAdSearch}
onCancel={() => this.setState({ showSearchAd: false })} onCancel={() => this.setState({ showSearchAd: false })}

View File

@ -72,8 +72,7 @@ class Index extends Component {
if (this.timer) clearInterval(this.timer); if (this.timer) clearInterval(this.timer);
this.timer = setInterval(() => { this.timer = setInterval(() => {
API.getCalculateProgress(salaryAcctRecordId).then(({ data }) => { API.getCalculateProgress(salaryAcctRecordId).then(({ data }) => {
let progress = data.progress; if ((_.isNil(data) || data.progress === 1) && this.timer) {
if (progress === 1 && this.timer) {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
this.setState({ this.setState({
@ -91,7 +90,7 @@ class Index extends Component {
}); });
message.error(data.message); message.error(data.message);
} }
this.setState({ progress: Number(progress) * 100 }); this.setState({ progress: Number(data.progress) * 100 });
}); });
}, 1000); }, 1000);
}); });

View File

@ -41,8 +41,7 @@ class AttendanceDataViewSlide extends Component {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo; const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
this.setState({ this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
// o.dataIndex === "username" ? "left" : columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null }))
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
}); });
} }
}).catch(() => this.setState({ loading: { ...loading, query: false } })); }).catch(() => this.setState({ loading: { ...loading, query: false } }));
@ -103,7 +102,7 @@ class AttendanceDataViewSlide extends Component {
</div> </div>
<WeaTable <WeaTable
columns={columns} dataSource={dataSource} bordered pagination={pagination} columns={columns} dataSource={dataSource} bordered pagination={pagination}
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 225px)` }}/> loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/>
</div> </div>
} }
/> />

View File

@ -30,6 +30,7 @@ import TableRecord from "../components/tableRecord";
import { dataCollectCondition } from "./columns"; import { dataCollectCondition } from "./columns";
import { removePropertyCondition } from "../../../util/response"; import { removePropertyCondition } from "../../../util/response";
import { convertToUrlString } from "../../../util/url"; import { convertToUrlString } from "../../../util/url";
import { getDomkes } from "../../../util";
import Layout from "../layout"; import Layout from "../layout";
import moment from "moment"; import moment from "moment";
import SalaryCumDeductChooseTaxPeriodDialog from "./components/salaryCumDeductChooseTaxPeriodDialog"; import SalaryCumDeductChooseTaxPeriodDialog from "./components/salaryCumDeductChooseTaxPeriodDialog";
@ -253,6 +254,7 @@ class Index extends Component {
addForm.validateForm().then(f => { addForm.validateForm().then(f => {
if (f.isValid) { if (f.isValid) {
const payload = { const payload = {
..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(), ...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
}; };

View File

@ -29,6 +29,7 @@ import AddItems from "../addItems";
import TableRecord from "../components/tableRecord"; import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url"; import { convertToUrlString } from "../../../util/url";
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog"; import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
import { getDomkes } from "../../../util";
const getLabel = WeaLocaleProvider.getLabel; const getLabel = WeaLocaleProvider.getLabel;
const getKey = WeaTools.getKey; const getKey = WeaTools.getKey;
@ -429,6 +430,7 @@ class Index extends Component {
addForm.validateForm().then(f => { addForm.validateForm().then(f => {
if (f.isValid) { if (f.isValid) {
const payload = { const payload = {
..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(), ...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
}; };

View File

@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns";
import AddItems from "../addItems"; import AddItems from "../addItems";
import TableRecord from "../components/tableRecord"; import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url"; import { convertToUrlString } from "../../../util/url";
import { getDomkes } from "../../../util";
const getKey = WeaTools.getKey; const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel; const getLabel = WeaLocaleProvider.getLabel;
@ -407,6 +408,7 @@ class Index extends Component {
addForm.validateForm().then(f => { addForm.validateForm().then(f => {
if (f.isValid) { if (f.isValid) {
const payload = { const payload = {
..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(), ...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
}; };

View File

@ -20,6 +20,7 @@ import { condition } from "./components/condition";
import AddItems from "../addItems"; import AddItems from "../addItems";
import TableRecord from "../components/tableRecord"; import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url"; import { convertToUrlString } from "../../../util/url";
import { getDomkes } from "../../../util";
const getKey = WeaTools.getKey; const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel; const getLabel = WeaLocaleProvider.getLabel;
@ -345,6 +346,7 @@ class Index extends Component {
addForm.validateForm().then(f => { addForm.validateForm().then(f => {
if (f.isValid) { if (f.isValid) {
const payload = { const payload = {
..._.reduce(getDomkes(condition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(), ...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
}; };

View File

@ -114,6 +114,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
...pageInfo, ...pageInfo,
showTotal: total => `${total}`, showTotal: total => `${total}`,
showQuickJumper: true, showQuickJumper: true,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"], pageSizeOptions: ["10", "20", "50", "100"],
onChange: current => { onChange: current => {
this.setState({ this.setState({

View File

@ -215,16 +215,16 @@ export const conditions = [
labelcol: 8, labelcol: 8,
viewAttr: 2 viewAttr: 2
}, },
{ // {
conditionType: "SELECT", // conditionType: "SELECT",
domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"], // domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"],
fieldcol: 10, // fieldcol: 10,
label: "薪资明细显示模式", // label: "薪资明细显示模式",
lanId: 111, // lanId: 111,
options: [], // options: [],
labelcol: 8, // labelcol: 8,
viewAttr: 2 // viewAttr: 2
} // }
], ],
title: "薪资报表", title: "薪资报表",
lanId: 111, lanId: 111,

View File

@ -123,7 +123,7 @@ class Index extends Component {
const [__, fields] = this.state.conditions, { items } = fields; const [__, fields] = this.state.conditions, { items } = fields;
_.forEach(items, o => { _.forEach(items, o => {
if (getKey(o) === key && o.dataType === "number") { if (getKey(o) === key && o.dataType === "number") {
if (_.isNaN(Number(value))) { if (_.isNaN(Number(value)) || value.indexOf(" ") !== -1) {
const { baseTableStore: { VSSalaryFileForm } } = this.props; const { baseTableStore: { VSSalaryFileForm } } = this.props;
message.warning(getLabel(111, "数值类型有误!")); message.warning(getLabel(111, "数值类型有误!"));
VSSalaryFileForm.updateFields({ [getKey(o)]: { value: "" } }); VSSalaryFileForm.updateFields({ [getKey(o)]: { value: "" } });