hotfix/2.12.1.2404.02

薪酬统计报表合计行展示列表优化
This commit is contained in:
黎永顺 2024-05-10 16:33:02 +08:00
parent 70d7449602
commit aaf733fdd2
3 changed files with 11 additions and 9 deletions

View File

@ -36,7 +36,6 @@ class Index extends Component {
handleSendCaptcha = () => {
sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
if (status) {
console.log(data);
this.timeRef = setInterval(() => {
const { time } = this.state;
this.setState({ time: time - 1 }, () => {

View File

@ -26,7 +26,7 @@ class SalaryDetails extends Component {
this.state = {
loading: false, dataSource: [], columns: [], selectedRowKeys: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {},
countResult: {}, showTotalCell: false
showTotalCell: false
};
}
@ -82,14 +82,15 @@ class SalaryDetails extends Component {
};
this.setState({ loading: true });
API.getSalaryList(payload).then(async ({ status, data }) => {
const [{ data: sumData }, { data: confCode }] = await Promise.all([API.getSalaryListSum(payload), sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
// API.getSalaryListSum(payload),
const [{ data: confCode }] = await Promise.all([sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })]);
this.setState({ loading: false });
if (status) {
const { dataKey, pageInfo: pageparams } = data;
const { list: dataSource, pageNum: current, total, pageSize } = pageparams;
this.setState({
dataSource, pageInfo: { ...pageInfo, current, total, pageSize }, payload,
countResult: sumData.sumRow, showTotalCell: confCode === "1"
showTotalCell: confCode === "1"
}, () => tableStore.getDatas(dataKey.datas));
}
}).catch(() => this.setState({ loading: false }));
@ -105,12 +106,13 @@ class SalaryDetails extends Component {
};
getColumns = () => {
const { attendanceStore: { tableStore } } = this.props;
const { dataSource, pageInfo, selectedRowKeys, countResult, showTotalCell } = this.state;
const { dataSource, pageInfo, selectedRowKeys, showTotalCell, payload } = 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)) {
this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154,
sumRow: countResult,
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, payload,
sumRowlistUrl,
columns: _.map(columns, (it, idx) => ({
...it,
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : it.oldWidth,

View File

@ -27,8 +27,9 @@ class Index extends Component {
<span>{getLabel(111, "发放时间")}</span>
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
</div>
<a href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&type=phone`}
target="_blank">
<a
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&recipient=${it.employeeId}&type=phone`}
target="_blank">
{`${getLabel(33564, "查看")}>`}
</a>
</li>;