salary-management-front/pc4mobx/hrmSalary/pages/salary/components/taxFillingInfoDialog.js

64 lines
1.8 KiB
JavaScript

/*
* Author: 黎永顺
* name: 个税申报-异常、失败详情
* Description:
* Date: 2023/8/18
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { Button } from "antd";
import { taxFillCondition } from "./constants";
import { getSearchs } from "../../../util";
const { getLabel } = WeaLocaleProvider;
@inject("taxAgentStore")
@observer
class TaxFilingInfoDialofg extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible && !_.isEmpty(nextProps.taxAgentTaxReturnCheckFormDTO)) {
const { taxAgentTaxReturnCheckFormDTO, taxAgentStore: { taxfillInfoForm } } = nextProps;
taxfillInfoForm.initFormFields(taxFillCondition);
const fields = _.map(taxFillCondition[0].items, it => {
return it.domkey[0];
});
fields.map(item => {
taxfillInfoForm.updateFields({
[item]: taxAgentTaxReturnCheckFormDTO[item] || ""
});
});
}
}
render() {
const { taxAgentStore: { taxfillInfoForm } } = this.props;
return (
<WeaDialog
{...this.props}
hasScroll className="taxfillingDialog" initLoadCss
buttons={[
<Button type="primary" onClick={this.props.onCancel}>{getLabel(111, "知道了")}</Button>
]}
style={{
width: 850,
height: 606.6,
minHeight: 200,
minWidth: 380,
maxHeight: "50%",
maxWidth: "50%",
overflow: "hidden",
transform: "translate(0px, 0px)"
}}
>
<div className="taxfillingDialogContent">
{getSearchs(taxfillInfoForm, taxFillCondition, 1)}
</div>
</WeaDialog>
);
}
}
export default TaxFilingInfoDialofg;