Merge branch 'release/2.19.1.2501.01-个税' into release/2.19.1.2503.01-业务线个税
This commit is contained in:
commit
0c86bbcb82
|
|
@ -33,7 +33,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareGetForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.props.employeeDeclareStore.initDeclareForm()
|
||||
this.props.employeeDeclareStore.initDeclareForm();
|
||||
this.employeeChangeInfo = {};
|
||||
}
|
||||
}
|
||||
|
|
@ -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" });
|
||||
|
|
@ -178,6 +178,7 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
valueSpan: ["employeeId"]
|
||||
}
|
||||
});
|
||||
if (value === "NORMAL" && declareForm.getFormParams().dismissDate) declareForm.updateFields({ dismissDate: "" });
|
||||
});
|
||||
break;
|
||||
case "employmentType":
|
||||
|
|
@ -243,6 +244,63 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
});
|
||||
});
|
||||
break;
|
||||
case "dismissDate":
|
||||
const { employmentStatus } = declareForm.getFormParams();
|
||||
if (!value && employmentStatus === "ABNORMAL") 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: "NORMAL" }));
|
||||
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;
|
||||
}
|
||||
|
|
@ -254,12 +312,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, "\"预计离境时间\"未填写"));
|
||||
|
|
@ -286,7 +348,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 }) => {
|
||||
|
|
@ -329,4 +392,4 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default EmployeeDeclareDetailSchemaEditDialog;
|
||||
export default EmployeeDeclareDetailSchemaEditDialog;
|
||||
|
|
@ -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",
|
||||
|
|
@ -517,4 +541,4 @@ export const deductConditions = [
|
|||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
];
|
||||
|
|
@ -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}
|
||||
|
|
@ -607,4 +608,4 @@ class Index extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index;
|
||||
Loading…
Reference in New Issue