Merge branch 'release/2.19.1.2503.01-业务线个税' into custom/杭州钱塘新区建设投资集团有限公司(0401个税)

This commit is contained in:
黎永顺 2026-02-03 17:43:38 +08:00
commit e8cf1e8626
3 changed files with 96 additions and 8 deletions

View File

@ -33,7 +33,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
componentWillReceiveProps(nextProps, nextContext) { componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareGetForm(nextProps); if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareGetForm(nextProps);
if (nextProps.visible !== this.props.visible && !nextProps.visible) { if (nextProps.visible !== this.props.visible && !nextProps.visible) {
this.props.employeeDeclareStore.initDeclareForm() this.props.employeeDeclareStore.initDeclareForm();
this.employeeChangeInfo = {}; this.employeeChangeInfo = {};
} }
} }
@ -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" });
@ -178,6 +178,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
valueSpan: ["employeeId"] valueSpan: ["employeeId"]
} }
}); });
if (value === "NORMAL" && declareForm.getFormParams().dismissDate) declareForm.updateFields({ dismissDate: "" });
}); });
break; break;
case "employmentType": case "employmentType":
@ -243,6 +244,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;
} }
@ -254,12 +312,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, "\"预计离境时间\"未填写"));
@ -286,7 +348,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 }) => {
@ -329,4 +392,4 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
} }
} }
export default EmployeeDeclareDetailSchemaEditDialog; export default EmployeeDeclareDetailSchemaEditDialog;

View File

@ -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",
@ -517,4 +541,4 @@ export const deductConditions = [
], ],
defaultshow: true defaultshow: true
} }
]; ];

View File

@ -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}
@ -607,4 +608,4 @@ class Index extends Component {
} }
} }
export default Index; export default Index;