Merge branch 'release/2.14.5.2406.03' into release/2.14.4.2406.02-个税
This commit is contained in:
commit
2c6bdc71ce
|
|
@ -99,13 +99,17 @@ class SalaryDetails extends Component {
|
|||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleExportSalaryList = (key) => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
let { selectedRowKeys, payload } = this.state;
|
||||
if (key === "SELECTED" && selectedRowKeys.length === 0) {
|
||||
message.warning(getLabel(543345, "请选择需要导出的数据!"));
|
||||
return;
|
||||
}
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = API.exportSalaryList({ ...payload, ids: key === "SELECTED" ? selectedRowKeys : [] });
|
||||
const promise = API.exportSalaryList({
|
||||
...payload, ids: key === "SELECTED" ? selectedRowKeys : [],
|
||||
columns: _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true" && item.dataIndex !== "acctTimes"), o => o.dataIndex)
|
||||
});
|
||||
};
|
||||
getColumns = () => {
|
||||
const { attendanceStore: { tableStore } } = this.props;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class salaryFileAdvanceSearchPannel extends Component {
|
|||
...child,
|
||||
options: _.map(userStatusList, o => ({ key: String(o.value), showname: o.defaultLabel }))
|
||||
};
|
||||
} else if (getKey(child) === "taxAgentId") {
|
||||
} else if (getKey(child) === "taxAgentIds") {
|
||||
return {
|
||||
...child,
|
||||
options: _.map(taxAgentList, o => ({ key: o.id, showname: o.content }))
|
||||
|
|
|
|||
|
|
@ -324,10 +324,11 @@ export const salaryFileSearchConditions = [
|
|||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentId"],
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(537996, "个税扣缴义务人"),
|
||||
labelcol: 8,
|
||||
multiple: true,
|
||||
options: [],
|
||||
viewAttr: 2
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Spin } from "antd";
|
||||
import { WeaEchart } from "ecCom";
|
||||
import { WeaEchart, WeaLocaleProvider } from "ecCom";
|
||||
import RightOptions from "./rightOptions";
|
||||
import ChartsRangeSettingsModal from "./chartsRangeSettingsModal";
|
||||
import { mapBarOptions, mapLineOptions, mapPieOptions } from "./condition";
|
||||
|
|
@ -15,6 +15,8 @@ import PovitpivotChartModal from "./povitpivotChartModal";
|
|||
import { getSalaryMonthValue } from "./statisticalMicroSettingsSlide";
|
||||
import "../index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class ReportContent extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -33,7 +35,8 @@ class ReportContent extends Component {
|
|||
rangSet: {
|
||||
visible: false, reportId: "",
|
||||
rangeVal: {}
|
||||
}
|
||||
},
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -56,9 +59,9 @@ class ReportContent extends Component {
|
|||
handleReceive = ({ data }) => {
|
||||
const { type, payload: { id, params } = {} } = data;
|
||||
if (type === "init") {
|
||||
const { columns, countResult, dataSource } = this.state;
|
||||
const { columns, countResult, dataSource, pageInfo } = this.state;
|
||||
this.postMessageToChild({
|
||||
columns, countResult, dataSource,
|
||||
columns, countResult, dataSource, pageInfo,
|
||||
showSum: !_.isEmpty(countResult)
|
||||
});
|
||||
} else if (type === "turn") {
|
||||
|
|
@ -72,30 +75,38 @@ class ReportContent extends Component {
|
|||
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
|
||||
}
|
||||
});
|
||||
} else if (id === "PAGEINFO") {
|
||||
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.reportStatisticsReportGetData(this.props.report));
|
||||
}
|
||||
}
|
||||
};
|
||||
postMessageToChild = (payload) => {
|
||||
const i18n = {
|
||||
"共": getLabel(18609, "共"), "条": getLabel(18256, "条"),
|
||||
"总计": getLabel(523, "总计")
|
||||
};
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const { dataSource, columns, showSum, countResult } = payload;
|
||||
const { dataSource, columns, showSum, countResult, pageInfo } = payload;
|
||||
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
|
||||
dataSource, columns, showSum, countResult
|
||||
dataSource, columns, showSum, countResult, i18n, pageInfo
|
||||
}), "*");
|
||||
};
|
||||
reportStatisticsReportGetData = (params) => {
|
||||
const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
|
||||
const { pageInfo } = this.state;
|
||||
const { id, dimension, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = params;
|
||||
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
||||
const payload = {
|
||||
id, dimensionId, isShare,
|
||||
id, dimensionId, isShare, ...pageInfo,
|
||||
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
reportStatisticsReportGetData(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && id.toString() === data.reportId.toString()) {
|
||||
const { countResult, columns, pageInfo: { list } } = data;
|
||||
const { countResult, columns, pageInfo: { list, pageNum, pageSize, total } } = data;
|
||||
this.setState({
|
||||
countResult,
|
||||
countResult, dataSource: list || [],
|
||||
pageInfo: dimension === getLabel(111, "人员") ? { ...pageInfo, current: pageNum, pageSize, total } : null,
|
||||
columns: _.map(columns, it => ({
|
||||
...it,
|
||||
dataIndex: it.column, width: it.width ? it.width + "px" : 150,
|
||||
|
|
@ -105,12 +116,11 @@ class ReportContent extends Component {
|
|||
dataIndex: child.column, width: child.width ? child.width + "px" : 150,
|
||||
title: child.text, align: "center"
|
||||
})) : []
|
||||
})),
|
||||
dataSource: list || []
|
||||
}))
|
||||
}, () => {
|
||||
this.postMessageToChild({
|
||||
columns: this.state.columns, countResult: this.state.countResult,
|
||||
dataSource: this.state.dataSource,
|
||||
dataSource: this.state.dataSource, pageInfo: this.state.pageInfo,
|
||||
showSum: !_.isEmpty(this.state.countResult)
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import React from "react";
|
||||
import { WeaFormItem, WeaSearchGroup } from "ecCom";
|
||||
import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
export const renderRuleForm = (form, condition, onChange) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
|
|
@ -15,7 +17,11 @@ export const renderRuleForm = (form, condition, onChange) => {
|
|||
label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom">
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams} onChange={onChange}/>
|
||||
<WeaSwitch
|
||||
fieldConfig={fields} form={form} formParams={formParams}
|
||||
onChange={v => getKey(fields) !== "salaryAcctFixedColumns" && onChange(v)}
|
||||
onBlur={(v) => getKey(fields) === "salaryAcctFixedColumns" && onChange({ salaryAcctFixedColumns: { value: v } })}
|
||||
/>
|
||||
</WeaFormItem>),
|
||||
colSpan: 1,
|
||||
hide: fields.hide
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class RuleConfig extends Component {
|
|||
super(props);
|
||||
this.state = { conditions: [], sysinfo: {}, progressVisible: false, progress: 50 };
|
||||
this.timer = null;
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
@ -116,16 +117,22 @@ class RuleConfig extends Component {
|
|||
case "taxAgentShowStatus":
|
||||
case "salaryShowStatus":
|
||||
case "adjustShowStatus":
|
||||
const confTitle = {
|
||||
welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
|
||||
welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
|
||||
salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
|
||||
extEmpsWitch: getLabel(544097, "开启非系统人员"),
|
||||
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
|
||||
salaryShowStatus: getLabel(111, "显示工资单页签"),
|
||||
adjustShowStatus: getLabel(111, "显示调薪记录页签")
|
||||
};
|
||||
this.unifiedSettings(key, confTitle[key]);
|
||||
if (!this.handleDebounce) {
|
||||
this.handleDebounce = _.debounce(() => {
|
||||
const confTitle = {
|
||||
welBaseDiffByPerAndCom: getLabel(111, "福利档案基数区分个人和公司"),
|
||||
welBaseAutoAdjust: getLabel(111, "福利档案导入基数不符合要求时自动调整为上限/下限"),
|
||||
salaryAcctFixedColumns: getLabel(545791, "薪资核算固定列头数"),
|
||||
extEmpsWitch: getLabel(544097, "开启非系统人员"),
|
||||
taxAgentShowStatus: getLabel(111, "显示【个税扣缴义务人】信息"),
|
||||
salaryShowStatus: getLabel(111, "显示工资单页签"),
|
||||
adjustShowStatus: getLabel(111, "显示调薪记录页签")
|
||||
};
|
||||
this.unifiedSettings(key, confTitle[key]);
|
||||
this.handleDebounce = null;
|
||||
}, 500);
|
||||
}
|
||||
this.handleDebounce();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class SalaryItemForm extends Component {
|
|||
return {
|
||||
...item,
|
||||
type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
|
||||
display: valueType && valueType.toString() === "1",
|
||||
display: valueType && valueType.toString() === "1" && useInEmployeeSalary == 0,
|
||||
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
|
||||
};
|
||||
case "formulaContent":
|
||||
|
|
|
|||
|
|
@ -26,11 +26,12 @@ export class PayrollFilesStore {
|
|||
@action("薪资档案-列表查询")
|
||||
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const { departmentIds, positionIds, subcompanyIds, statuses, ...extra } = searchItemsValue;
|
||||
const { departmentIds, positionIds, subcompanyIds, statuses, taxAgentIds, ...extra } = searchItemsValue;
|
||||
API.queryList({
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: positionIds ? positionIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
|
||||
statuses: statuses ? statuses.split(",") : [],
|
||||
...payload, ...extra, url
|
||||
}).then(res => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue