parent
28d8ebe64d
commit
9eec50099d
|
|
@ -31,9 +31,9 @@ class IncomeTaxDeclarationPersonnelSlide extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { declareStore: { initTaxDecForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxDecForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
const { declareStore: { initTaxDecForm } } = nextProps;
|
||||
this.setState({
|
||||
conditions: [], employeeDeclares: [], taxReportColumns: [],
|
||||
loading: false, detailInfo: {}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class TabEditDialog extends Component {
|
|||
const { declareStore: { tabDecForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 480 }} initLoadCss title={getLabel(1421, "新增")}
|
||||
{...this.props} style={{ width: 480, height: 80 }} initLoadCss title={getLabel(1421, "新增")}
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(826, "确定")}</Button>
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ class TaxDeclarationInfo extends Component {
|
|||
<span className="value">
|
||||
{declareInfo[item["key"]]}
|
||||
{
|
||||
(item["key"] === "declareStatusDesc" && declareInfo["displayIcon"]) &&
|
||||
((item["key"] === "declareStatusDesc" && declareInfo["displayIcon"]) || declareInfo["declareErrorMsg"]) &&
|
||||
<span
|
||||
title={declareInfo["declareErrorMsg"] || getLabel(111, "该个税申报表对应的核算数据被重新核算")}
|
||||
title={declareInfo["declareErrorMsg"] || getLabel(545219, "该个税申报表对应的核算数据被重新核算")}
|
||||
className="icon-span">
|
||||
<Tag closable onClose={this.handleUpdateicon}>
|
||||
<i className="icon-coms02-Warning-01"/>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class Index extends Component {
|
|||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
init = async () => {
|
||||
init = async (isInit = true) => {
|
||||
const [tabsResult, infoResult, calcResult] = await Promise.all([this.getTaxDeclarationTab(), this.getDeclareInfo(), this.apiflowBillingConfigStatus()]);
|
||||
const { data: tabDataSource, status: tabStatus } = tabsResult;
|
||||
const { data: infoDataSource, status: infoStatus } = infoResult;
|
||||
|
|
@ -82,7 +82,9 @@ class Index extends Component {
|
|||
viewcondition: `${it.incomeCategory}%%${it.taxDeclarationId}`,
|
||||
title: it.tabName, editable: true
|
||||
})) : this.state.tabs,
|
||||
selectedKey: tabStatus ? `${_.take(tabDataSource)[0].incomeCategory}%%${_.take(tabDataSource)[0].taxDeclarationId}` : this.state.selectedKey,
|
||||
selectedKey: (tabStatus && isInit) ?
|
||||
`${_.first(tabDataSource).incomeCategory}%%${_.first(tabDataSource).taxDeclarationId}` :
|
||||
`${_.last(tabDataSource).incomeCategory}%%${_.last(tabDataSource).taxDeclarationId}`,
|
||||
declareInfo: infoStatus ? infoDataSource : this.state.declareInfo,
|
||||
intelCalcSalaryStatus: calcStatus && calcSalaryStatus
|
||||
});
|
||||
|
|
@ -269,11 +271,11 @@ class Index extends Component {
|
|||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/detail/export?${convertToUrlString(payload)}`, "_blank");
|
||||
};
|
||||
handleTaxDescPerSlide = (params) => {
|
||||
const { callback, ...module } = params;
|
||||
const { callback, ...extra } = params;
|
||||
const { taxDecPersonSlide, selectedKey } = this.state;
|
||||
const [__, taxDeclarationId] = selectedKey.split("%%");
|
||||
this.setState({
|
||||
taxDecPersonSlide: { ...taxDecPersonSlide, ...module, taxDeclarationId }
|
||||
taxDecPersonSlide: { ...taxDecPersonSlide, ...extra, taxDeclarationId }
|
||||
}, () => callback && this.getDetailList());
|
||||
};
|
||||
exportGetDeclareTaxResultFeedback = () => {
|
||||
|
|
@ -401,7 +403,7 @@ class Index extends Component {
|
|||
<div className="declareDetail-layout-content">
|
||||
<WeaTab
|
||||
datas={tabs} keyParam="viewcondition" selectedKey={selectedKey} showAddBtn buttons={btns}
|
||||
type="editable-inline" onEdit={this.handleTabEdit}
|
||||
type="editable-inline" onEdit={this.handleTabEdit} leftStyle={{ width: "calc(100% - 450px)" }}
|
||||
onChange={(v) => this.setState({ selectedKey: v }, () => this.getDetailList())}
|
||||
/>
|
||||
{/*个税申报表-新增编辑框*/}
|
||||
|
|
@ -415,7 +417,7 @@ class Index extends Component {
|
|||
/>
|
||||
{/*个税申报表-新增tab弹框*/}
|
||||
<TabEditDialog visible={editTabVisible}
|
||||
onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init())}/>
|
||||
onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
|
||||
</div>
|
||||
<div className="declareDetail-layout-table-content">
|
||||
<Spin spinning={loading.query}>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ export class DeclareStore {
|
|||
@action
|
||||
initDeclareForm = () => this.declareForm = new WeaForm();
|
||||
@action
|
||||
initTaxDecForm = () => this.taxDecForm = new WeaForm();
|
||||
@action
|
||||
initTabDecForm = () => this.tabDecForm = new WeaForm();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue