parent
0e60e1e1c8
commit
ba878070a5
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { message, Modal, Tag } from "antd";
|
||||
import { getDeclareList, taxdeclarationUpdateIcon, withDrawTaxDeclaration } from "../../../../apis/declare";
|
||||
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -31,8 +31,9 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
sysConfCodeRule = () => {
|
||||
const { showOperateBtn } = this.props;
|
||||
sysConfCodeRule({ code: "WITHDRAW_TAX_DECLARATION" }).then(({ status, data }) => {
|
||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
|
||||
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" && showOperateBtn });
|
||||
});
|
||||
};
|
||||
getDeclareList = (props) => {
|
||||
|
|
@ -50,7 +51,7 @@ class Index extends Component {
|
|||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
|
||||
columns: _.map(columns, o => {
|
||||
const { dataIndex } = o;
|
||||
const { dataIndex, displayIcon } = o;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "taxAgentName":
|
||||
|
|
@ -64,12 +65,41 @@ class Index extends Component {
|
|||
width = "10%";
|
||||
break;
|
||||
}
|
||||
if (dataIndex === "taxDeclareStatusDesc") {
|
||||
return {
|
||||
...o, width,
|
||||
render: (text, record) => {
|
||||
return (<div className="declare-status-box">
|
||||
{text}
|
||||
{
|
||||
displayIcon &&
|
||||
<span title={getLabel(545219, "该个税申报表对应的核算数据被重新核算")} className="icon-span">
|
||||
<Tag closable onClose={() => this.handleUpdateicon(record)}>
|
||||
<i className="icon-coms02-Warning-01"/>
|
||||
</Tag>
|
||||
</span>
|
||||
}
|
||||
</div>);
|
||||
}
|
||||
};
|
||||
}
|
||||
return { ...o, width };
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleUpdateicon = (record) => {
|
||||
const { id: taxDeclareRecordId } = record;
|
||||
taxdeclarationUpdateIcon({ taxDeclareRecordId }).then(({ status, errormsg }) => {
|
||||
this.getDeclareList(this.props);
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功!"));
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败!"));
|
||||
}
|
||||
});
|
||||
};
|
||||
taxdeclarationDelete = (taxDeclarationId) => {
|
||||
withDrawTaxDeclaration({ taxDeclarationId }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
|
|
|
|||
|
|
@ -60,12 +60,13 @@ class Calculate extends Component {
|
|||
|
||||
render() {
|
||||
const { queryParams, isRefresh, declareDaialog } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
return (
|
||||
<WeaTop title={getLabel(543353, "个税申报")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="declare-main-layout"
|
||||
>
|
||||
<div className="declare-body">
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh}/>
|
||||
<DeclareTablelist queryParams={queryParams} isRefresh={isRefresh} showOperateBtn={showOperateBtn}/>
|
||||
<DeclareDialog {...declareDaialog}
|
||||
onCancel={(bool) => this.setState({
|
||||
declareDaialog: { ...declareDaialog, visible: false },
|
||||
|
|
|
|||
|
|
@ -63,11 +63,13 @@ class TaxDeclarationInfo extends Component {
|
|||
{declareInfo[item["key"]]}
|
||||
{
|
||||
(item["key"] === "declareStatusDesc" && declareInfo["displayIcon"]) &&
|
||||
<span title={getLabel(111, "该个税申报表对应的核算数据被重新核算")} className="icon-span">
|
||||
<Tag closable onClose={this.handleUpdateicon}>
|
||||
<i className="icon-coms02-Warning-01"/>
|
||||
</Tag>
|
||||
</span>
|
||||
<span
|
||||
title={declareInfo["declareErrorMsg"] || getLabel(111, "该个税申报表对应的核算数据被重新核算")}
|
||||
className="icon-span">
|
||||
<Tag closable onClose={this.handleUpdateicon}>
|
||||
<i className="icon-coms02-Warning-01"/>
|
||||
</Tag>
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue