Compare commits

..

14 Commits

8 changed files with 229 additions and 13 deletions

View File

@ -53,3 +53,7 @@ export const apiflowWarnReceiverGetForm = (params) => {
export const apiflowWarnReceiverDelete = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/delete", "GET", params);
};
//智能算薪-月度统计详情
export const getStatisticsDetailList = (params) => {
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/statistics/detail/list", params);
};

View File

@ -108,7 +108,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
if (id) {
const filedKes = _.map(columns, it => it.dataIndex);
_.map(filedKes, item => {
if (item === "disability" || item === "lonelyOld" || item === "martyrDependents") {
if (item === "disability" || item === "lonelyOld" || item === "martyrDependents" || item === "reissueSalary") {
declareForm.updateFields({ [item]: result[item] || "OFF" });
} else if (item === "deductExpenses") {
declareForm.updateFields({ [item]: result[item] || "ON" });
@ -180,6 +180,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
valueSpan: ["employeeId"]
}
});
if (value === "NORMAL" && declareForm.getFormParams().dismissDate) declareForm.updateFields({ dismissDate: "" });
});
break;
case "employmentType":
@ -245,6 +246,63 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
});
});
break;
case "dismissDate":
const { employmentStatus } = declareForm.getFormParams();
this.setState({
eConditions: _.map(eConditions, it => {
return {
...it, items: _.map(it.items, child => {
if (getKey(child) === "dismissDate") {
return { ...child, viewAttr: 2 };
}
return { ...child };
})
};
})
}, () => declareForm.updateFields({ employmentStatus: (!value && employmentStatus === "ABNORMAL") ? "NORMAL" : "ABNORMAL" }));
break;
case "reissueSalary":
this.setState({
eConditions: _.map(eConditions, it => {
return {
...it, items: _.map(it.items, child => {
if (getKey(child) === "reissueTaxCycle") {
return { ...child, viewAttr: value === "ON" ? 3 : 2 };
}
return { ...child };
})
};
})
}, () => {
declareForm.initFormFields(this.state.eConditions);
const [employeeData] = this.state.employeeInfo["employee"] || this.employeeChangeInfo["employee"] || [];
!_.isEmpty(employeeData) && declareForm.updateFields({
employeeType: {
value: [employeeData._entityType, [employeeData.id, employeeData.name, [{
id: employeeData.id,
lastname: employeeData.name
}]]],
valueSpan: ["employeeId"]
}
});
if (value === "OFF" && declareForm.getFormParams().reissueTaxCycle) declareForm.updateFields({ reissueTaxCycle: "" });
});
break;
case "reissueTaxCycle":
const { reissueSalary } = declareForm.getFormParams();
if (!value && reissueSalary === "ON") this.setState({
eConditions: _.map(eConditions, it => {
return {
...it, items: _.map(it.items, child => {
if (getKey(child) === "reissueTaxCycle") {
return { ...child, viewAttr: 2 };
}
return { ...child };
})
};
})
}, () => declareForm.updateFields({ reissueSalary: "OFF" }));
break;
default:
break;
}
@ -256,12 +314,16 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
if (f.isValid) {
const {
employmentType, employmentDate, employmentStatus, dismissDate, cardType, entryDate, departureDate,
birthplace, taxReasons, ...params
birthplace, taxReasons, reissueSalary, reissueTaxCycle, ...params
} = form.getFormParams();
if ((employmentType !== "OTHER" && !employmentDate) || (employmentStatus === "ABNORMAL" && !dismissDate)) {
form.showError("dismissDate", getLabel(111, "\"离职日期\"未填写"));
return;
}
if (reissueSalary === "ON" && !reissueTaxCycle) {
form.showError("reissueTaxCycle", getLabel(111, "\"补发税款所属月份\"未填写"));
return;
}
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !entryDate && !departureDate && !birthplace && !taxReasons)) {
form.showError("entryDate", getLabel(111, "\"首次入境时间\"未填写"));
form.showError("departureDate", getLabel(111, "\"预计离境时间\"未填写"));
@ -288,7 +350,8 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
const payload = {
...form.getFormParams(), id: this.props.id,
taxAgentId: getQueryString("id"),
taxCycle: this.props.taxCycle
taxCycle: this.props.taxCycle,
reissueTaxCycle: reissueTaxCycle ? `${reissueTaxCycle}-01` : ""
};
this.setState({ loading: true });
getEmployeeSave(payload).then(({ status, errormsg }) => {

View File

@ -371,6 +371,30 @@ export const declareConditions = [
value: "",
viewAttr: 2
},
{
colSpan: 1,
conditionType: "SELECT",
domkey: ["reissueSalary"],
fieldcol: 12,
label: "是否离职后补发工资",
lanId: 111,
labelcol: 6,
value: "OFF",
viewAttr: 2,
detailtype: 3,
options: []
},
{
colSpan: 1,
conditionType: "MONTHPICKER",
domkey: ["reissueTaxCycle"],
fieldcol: 12,
label: "补发税款所属月份",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 2
},
{
colSpan: 1,
conditionType: "DATEPICKER",

View File

@ -468,7 +468,8 @@ class Index extends Component {
<span className="title">{getLabel(542240, "税款所属期")}</span>
<WeaDatePicker arrow type="month" className="pickerDateCustom flex a-center" value={taxCycle}
onChange={val => this.setState({
taxCycle: val, pageInfo: { ...pageInfo, current: 1 }
taxCycle: val, pageInfo: { ...pageInfo, current: 1 },
selectedRowKeys: []
}, () => this.queryEmployeeList())}/>
</div>,
<Button type="primary" onClick={this.employeedeclareDeclare}

View File

@ -8,6 +8,7 @@ import React, { Component } from "react";
import { Button, message, Spin } from "antd";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { apiflowStatisticsInfo, apiflowStatisticsList } from "../../../apis/intelligentCalculateSalarySettings";
import MonthStaticsDetailDialog from "./monthStaticsDetailDialog";
const getLabel = WeaLocaleProvider.getLabel;
@ -34,7 +35,7 @@ class InterfaceFlowStatistics extends Component {
},
columns: [], dataSource: [],
pageInfo: { current: 1, pageSize: 10, total: 0 },
loading: false
loading: false, detailDialog: { visible: false, taxAgentId: "" }
};
}
@ -96,7 +97,7 @@ class InterfaceFlowStatistics extends Component {
};
render() {
const { statisticsInfo, pageInfo, loading, dataSource, columns } = this.state;
const { statisticsInfo, pageInfo, loading, dataSource, columns, detailDialog } = this.state;
const { staticData } = statisticsInfo;
const pagination = {
...pageInfo,
@ -147,13 +148,20 @@ class InterfaceFlowStatistics extends Component {
...columns,
{
title: getLabel(30585, "操作"), dataIndex: "operate",
render: () => (<a href="">{getLabel(111, "月统计详情")}</a>)
render: (__, record) => (<a href="javascript:void(0);" rel="noreferrer"
onClick={() => this.setState({
detailDialog: {
visible: true, taxAgentId: record.taxAgentId
}
})}>{getLabel(111, "月统计详情")}</a>)
}
]}
scroll={{ y: `calc(100vh - 190px)` }}
/>
}
</div>
<MonthStaticsDetailDialog {...detailDialog}
onCancel={() => this.setState({ detailDialog: { visible: false, taxAgentId: "" } })}/>
</div>
);
}

View File

@ -0,0 +1,98 @@
/*
* 月度统计详情
*
* @Author: 黎永顺
* @Date: 2026/2/10
* @Wechat:
* @Email: 971387674@qq.com
* @description:
*/
import React, { Component } from "react";
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
import { getStatisticsDetailList } from "../../../../apis/intelligentCalculateSalarySettings";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class MonthStaticsDetailDialog extends Component {
constructor(props) {
super(props);
this.state = {
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
loading: false
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getStatisticsDetailList(nextProps);
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.setState({
dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 },
loading: false
});
}
}
getStatisticsDetailList = (props) => {
const { pageInfo } = this.state, { taxAgentId } = props || this.props;
const payload = { ...pageInfo, taxAgentId };
this.setState({ loading: true });
getStatisticsDetailList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
pageInfo: { current, pageSize, total }, dataSource, columns
});
}
}).catch(() => this.setState({ loading: false }));
};
render() {
const { loading, dataSource, columns, pageInfo } = this.state;
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.getStatisticsDetailList());
},
onChange: current => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.getStatisticsDetailList());
}
};
const scrollHeight = this.logRef ? this.logRef.state.height - 144 : 606.6;
return (
<WeaDialog
{...this.props} title={getLabel(111, "月度统计详情")}
ref={dom => this.logRef = dom} className="statiscalDialog" initLoadCss
style={{
width: 1150,
height: 606.6,
minHeight: 200,
minWidth: 380,
maxHeight: "90%",
maxWidth: "90%",
overflow: "hidden",
transform: "translate(0px, 0px)"
}}
>
<div className="statiscalDialogContent">
<WeaTable
columns={columns} dataSource={dataSource}
loading={loading} className="statiscalTable"
pagination={pagination} scroll={{ y: `${scrollHeight}px` }}
/>
</div>
</WeaDialog>
);
}
}
export default MonthStaticsDetailDialog;

View File

@ -0,0 +1,16 @@
.statiscalDialog {
.wea-dialog-body {
overflow-y: hidden;
}
.statiscalDialogContent {
background: #F6F6F6;
padding: 16px;
width: 100%;
height: 100%;
.statiscalTable {
background: #FFFFFF;
}
}
}

View File

@ -448,7 +448,9 @@ export const MonthRangePicker = (props) => {
<WeaDatePicker
value={startDate} disabled={disabled}
disabledDate={(current) => {
return current && endDate && current.getTime() > new Date(endDate).getTime();
// 20251212前版本(问题时不能选到当月)
// return current && endDate && current.getTime() > new Date(endDate).getTime();
return current && endDate && moment(`${new Date(current.getTime()).getFullYear()}-${new Date(current.getTime()).getMonth() + 1}`).isAfter(moment(endDate));
}}
format="YYYY-MM"
onChange={(val) => onChange([val, endDate])}