Merge branch 'release/2.19.1.2503.01-业务线个税' into custom-联特
This commit is contained in:
commit
c9a7d95ce7
|
|
@ -53,3 +53,7 @@ export const apiflowWarnReceiverGetForm = (params) => {
|
||||||
export const apiflowWarnReceiverDelete = (params) => {
|
export const apiflowWarnReceiverDelete = (params) => {
|
||||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/delete", "GET", 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);
|
||||||
|
};
|
||||||
|
|
@ -108,7 +108,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
||||||
if (id) {
|
if (id) {
|
||||||
const filedKes = _.map(columns, it => it.dataIndex);
|
const filedKes = _.map(columns, it => it.dataIndex);
|
||||||
_.map(filedKes, item => {
|
_.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" });
|
declareForm.updateFields({ [item]: result[item] || "OFF" });
|
||||||
} else if (item === "deductExpenses") {
|
} else if (item === "deductExpenses") {
|
||||||
declareForm.updateFields({ [item]: result[item] || "ON" });
|
declareForm.updateFields({ [item]: result[item] || "ON" });
|
||||||
|
|
@ -180,6 +180,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
||||||
valueSpan: ["employeeId"]
|
valueSpan: ["employeeId"]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (value === "NORMAL" && declareForm.getFormParams().dismissDate) declareForm.updateFields({ dismissDate: "" });
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "employmentType":
|
case "employmentType":
|
||||||
|
|
@ -245,6 +246,63 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -256,12 +314,16 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const {
|
const {
|
||||||
employmentType, employmentDate, employmentStatus, dismissDate, cardType, entryDate, departureDate,
|
employmentType, employmentDate, employmentStatus, dismissDate, cardType, entryDate, departureDate,
|
||||||
birthplace, taxReasons, ...params
|
birthplace, taxReasons, reissueSalary, reissueTaxCycle, ...params
|
||||||
} = form.getFormParams();
|
} = form.getFormParams();
|
||||||
if ((employmentType !== "OTHER" && !employmentDate) || (employmentStatus === "ABNORMAL" && !dismissDate)) {
|
if ((employmentType !== "OTHER" && !employmentDate) || (employmentStatus === "ABNORMAL" && !dismissDate)) {
|
||||||
form.showError("dismissDate", getLabel(111, "\"离职日期\"未填写"));
|
form.showError("dismissDate", getLabel(111, "\"离职日期\"未填写"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (reissueSalary === "ON" && !reissueTaxCycle) {
|
||||||
|
form.showError("reissueTaxCycle", getLabel(111, "\"补发税款所属月份\"未填写"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !entryDate && !departureDate && !birthplace && !taxReasons)) {
|
if ((cardType !== "RESIDENT_IDENTITY_CARDS" && !entryDate && !departureDate && !birthplace && !taxReasons)) {
|
||||||
form.showError("entryDate", getLabel(111, "\"首次入境时间\"未填写"));
|
form.showError("entryDate", getLabel(111, "\"首次入境时间\"未填写"));
|
||||||
form.showError("departureDate", getLabel(111, "\"预计离境时间\"未填写"));
|
form.showError("departureDate", getLabel(111, "\"预计离境时间\"未填写"));
|
||||||
|
|
@ -288,7 +350,8 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
||||||
const payload = {
|
const payload = {
|
||||||
...form.getFormParams(), id: this.props.id,
|
...form.getFormParams(), id: this.props.id,
|
||||||
taxAgentId: getQueryString("id"),
|
taxAgentId: getQueryString("id"),
|
||||||
taxCycle: this.props.taxCycle
|
taxCycle: this.props.taxCycle,
|
||||||
|
reissueTaxCycle: reissueTaxCycle ? `${reissueTaxCycle}-01` : ""
|
||||||
};
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
getEmployeeSave(payload).then(({ status, errormsg }) => {
|
getEmployeeSave(payload).then(({ status, errormsg }) => {
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,30 @@ export const declareConditions = [
|
||||||
value: "",
|
value: "",
|
||||||
viewAttr: 2
|
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,
|
colSpan: 1,
|
||||||
conditionType: "DATEPICKER",
|
conditionType: "DATEPICKER",
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,8 @@ class Index extends Component {
|
||||||
<span className="title">{getLabel(542240, "税款所属期")}:</span>
|
<span className="title">{getLabel(542240, "税款所属期")}:</span>
|
||||||
<WeaDatePicker arrow type="month" className="pickerDateCustom flex a-center" value={taxCycle}
|
<WeaDatePicker arrow type="month" className="pickerDateCustom flex a-center" value={taxCycle}
|
||||||
onChange={val => this.setState({
|
onChange={val => this.setState({
|
||||||
taxCycle: val, pageInfo: { ...pageInfo, current: 1 }
|
taxCycle: val, pageInfo: { ...pageInfo, current: 1 },
|
||||||
|
selectedRowKeys: []
|
||||||
}, () => this.queryEmployeeList())}/>
|
}, () => this.queryEmployeeList())}/>
|
||||||
</div>,
|
</div>,
|
||||||
<Button type="primary" onClick={this.employeedeclareDeclare}
|
<Button type="primary" onClick={this.employeedeclareDeclare}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import React, { Component } from "react";
|
||||||
import { Button, message, Spin } from "antd";
|
import { Button, message, Spin } from "antd";
|
||||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import { apiflowStatisticsInfo, apiflowStatisticsList } from "../../../apis/intelligentCalculateSalarySettings";
|
import { apiflowStatisticsInfo, apiflowStatisticsList } from "../../../apis/intelligentCalculateSalarySettings";
|
||||||
|
import MonthStaticsDetailDialog from "./monthStaticsDetailDialog";
|
||||||
|
|
||||||
const getLabel = WeaLocaleProvider.getLabel;
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
|
@ -34,7 +35,7 @@ class InterfaceFlowStatistics extends Component {
|
||||||
},
|
},
|
||||||
columns: [], dataSource: [],
|
columns: [], dataSource: [],
|
||||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||||
loading: false
|
loading: false, detailDialog: { visible: false, taxAgentId: "" }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,7 +97,7 @@ class InterfaceFlowStatistics extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { statisticsInfo, pageInfo, loading, dataSource, columns } = this.state;
|
const { statisticsInfo, pageInfo, loading, dataSource, columns, detailDialog } = this.state;
|
||||||
const { staticData } = statisticsInfo;
|
const { staticData } = statisticsInfo;
|
||||||
const pagination = {
|
const pagination = {
|
||||||
...pageInfo,
|
...pageInfo,
|
||||||
|
|
@ -147,13 +148,20 @@ class InterfaceFlowStatistics extends Component {
|
||||||
...columns,
|
...columns,
|
||||||
{
|
{
|
||||||
title: getLabel(30585, "操作"), dataIndex: "operate",
|
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)` }}
|
scroll={{ y: `calc(100vh - 190px)` }}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
<MonthStaticsDetailDialog {...detailDialog}
|
||||||
|
onCancel={() => this.setState({ detailDialog: { visible: false, taxAgentId: "" } })}/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
.statiscalDialog {
|
||||||
|
.wea-dialog-body {
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statiscalDialogContent {
|
||||||
|
background: #F6F6F6;
|
||||||
|
padding: 16px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.statiscalTable {
|
||||||
|
background: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -448,7 +448,9 @@ export const MonthRangePicker = (props) => {
|
||||||
<WeaDatePicker
|
<WeaDatePicker
|
||||||
value={startDate} disabled={disabled}
|
value={startDate} disabled={disabled}
|
||||||
disabledDate={(current) => {
|
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"
|
format="YYYY-MM"
|
||||||
onChange={(val) => onChange([val, endDate])}
|
onChange={(val) => onChange([val, endDate])}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue