diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js index f6943db0..a9050aaf 100644 --- a/pc4mobx/hrmSalary/apis/declare.js +++ b/pc4mobx/hrmSalary/apis/declare.js @@ -1,5 +1,6 @@ import { WeaTools } from "ecCom"; import { postExportFetch, postFetch } from "../util/request"; +import { convertToUrlString } from "../util/url"; //个税申报表-个税申报表列表 export const getDeclareList = params => { @@ -230,7 +231,10 @@ export const taxdeclarationEdit = (params) => { }; //个税申报表申报数据-详情 export const getTaxdeclarationDetailInfo = (params) => { - return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/detailInfo", "GET", params); + return fetch(`/api/bs/hrmsalary/taxdeclaration/detailInfo?${convertToUrlString(params)}`, { + method: "GET", + mode: "cors" + }).then((res) => res.json()); }; //个税申报表申报数据-下载模板 export const taxdeclarationExportTemplate = params => { @@ -260,3 +264,7 @@ export const addTaxDeclaration = (params) => { export const deleteTaxDeclaration = (params) => { return postFetch("/api/bs/hrmsalary/taxdeclaration/deleteTaxDeclaration", params); }; +//个税申报表-删除申报表 +export const deleteInfo = (params) => { + return postFetch("/api/bs/hrmsalary/taxdeclaration/deleteInfo", params); +}; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js b/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js index 3bb752e4..96647f35 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js @@ -104,7 +104,7 @@ class IncomeTaxDeclarationPersonnelSlide extends Component { }); }; getTaxdeclarationDetailInfo = (id) => { - API.getTaxdeclarationDetailInfo({ id }).then(({ status, data }) => { + API.getTaxdeclarationDetailInfo({ id }).then(({ status, data, errormsg }) => { if (status) { const { conditions } = this.state; const { declareStore: { taxDecForm } } = this.props; @@ -118,6 +118,9 @@ class IncomeTaxDeclarationPersonnelSlide extends Component { }); }); }); + } else { + message.error(errormsg); + this.props.onClose(); } }); }; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js index 736ec8bf..b1afdca2 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -12,6 +12,7 @@ import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalar import PaymentBtn from "./components/paymentBtn"; import PaymentFeedbackBtn from "./components/paymentFeedbackBtn"; import { + deleteInfo, deleteTaxDeclaration, exportGetDeclareTaxResultFeedback, getDeclareInfo, @@ -124,7 +125,20 @@ class Index extends Component { title: getLabel(501169, "编辑") }); } else if (id === "DELETE") { - + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(543548, "确认删除吗?"), + onOk: () => { + deleteInfo({ id: params.id }).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(502230, "删除成功!")); + this.getDetailList(); + } else { + message.error(errormsg || getLabel(20462, "删除失败!")); + } + }); + } + }); } } };