diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
index e4c3512c..936e9c9f 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareTablelist/index.js
@@ -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 (
+ {text}
+ {
+ displayIcon &&
+
+ this.handleUpdateicon(record)}>
+
+
+
+ }
+
);
+ }
+ };
+ }
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) {
diff --git a/pc4mobx/hrmSalary/pages/declare/declare.js b/pc4mobx/hrmSalary/pages/declare/declare.js
index 0fa5dc90..e64e38d7 100644
--- a/pc4mobx/hrmSalary/pages/declare/declare.js
+++ b/pc4mobx/hrmSalary/pages/declare/declare.js
@@ -60,12 +60,13 @@ class Calculate extends Component {
render() {
const { queryParams, isRefresh, declareDaialog } = this.state;
+ const { taxAgentStore: { showOperateBtn } } = this.props;
return (
} iconBgcolor="#F14A2D"
buttons={this.renderCalculateOpts()} className="declare-main-layout"
>
-
+
this.setState({
declareDaialog: { ...declareDaialog, visible: false },
diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js
index 30b34e53..bf09f80f 100644
--- a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js
+++ b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js
@@ -63,11 +63,13 @@ class TaxDeclarationInfo extends Component {
{declareInfo[item["key"]]}
{
(item["key"] === "declareStatusDesc" && declareInfo["displayIcon"]) &&
-
-
-
-
-
+
+
+
+
+
}
{