diff --git a/pc4mobx/hrmSalary/apis/declare.js b/pc4mobx/hrmSalary/apis/declare.js index 8a0e3e08..314cf1cc 100644 --- a/pc4mobx/hrmSalary/apis/declare.js +++ b/pc4mobx/hrmSalary/apis/declare.js @@ -218,4 +218,19 @@ export const taxPaymentWithheldVoucherGet = (params) => { return postFetch("/api/bs/hrmsalary/taxPayment/withheldVoucher/get", params); }; +//个税申报表申报数据-作废缴款凭证 +export const taxPaymentVoucherCancel = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/voucher/cancel", params); +}; + +//个税申报表申报数据-缴款凭证打印 +export const taxPaymentVoucherPrint = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/voucher/print", params); +}; + +//个税申报表申报数据-缴款凭证打印反馈 +export const taxPaymentVoucherPrintFeedback = (params) => { + return postFetch("/api/bs/hrmsalary/taxPayment/voucher/print/feedback", params); +}; + diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index 2da05983..cb13a5ee 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -23,6 +23,7 @@ import Declare from "./pages/declare"; import DeclareDetail from "./pages/declareDetail"; import Employeedeclare from "./pages/employeedeclare"; import EnterprisePayCertificationDetail from "./pages/enterprisePayCertificationDetail"; +import BankVoucherDetail from "./pages/bankVoucherDetail"; import EmployeedeclareDetail from "./pages/employeedeclareDetail"; import TaxRate from "./pages/taxRate"; import TaxAgents from "./pages/taxAgent"; @@ -163,6 +164,8 @@ const Routes = ( + { + const payload = { + taxDeclareRecordId: getQueryString("taxDeclareRecordId"), + taxAgentId: getQueryString("taxAgentId"), + taxYearMonth: getQueryString("taxYearMonth"), + checkFeedback: 0 + }; + this.setState({ loading: true }); + taxPaymentVoucherPrintFeedback(payload).then(({ status, data, errormsg }) => { + this.setState({ loading: false }); + if (status) { + this.setState({ bankVoucherDetail: data }); + } else { + message.error(errormsg || ""); + } + }).catch(() => this.setState({ loading: false })); + }; + print = () => { + printDom({ + hideDomId: "header_print_btn" + }); + }; + + render() { + const { loading, bankVoucherDetail } = this.state; + if (loading) { + return
+ +
; + } + return ( +
+
+
+ +
+
+
+
{getLabel(111, "银行端查询缴税凭证")}
+
+
+
{getLabel(111, "银行端查询缴税凭证号:")}
+
{bankVoucherDetail.voucherNo || ""}
+
+
{bankVoucherDetail.firstPrintDate}
+
+ +
+
+
+
{getLabel(111, "纳税人识别码")}
+
{bankVoucherDetail.taxCode || ""}
+
+
+
{getLabel(111, "税务机关代码")}
+
{bankVoucherDetail.taxAuthoritiesNo || ""}
+
+
+ +
+
+
{getLabel(111, "纳税人名称")}
+
{bankVoucherDetail.taxAgentName || ""}
+
+
+
{getLabel(111, "税务机关名称")}
+
{bankVoucherDetail.taxAuthoritiesName}
+
+
+ +
+
+
{getLabel(111, "付款人名称")}
+
{}
+
+
+
{getLabel(111, "开户银行名称")}
+
{}
+
+
+ +
+
+
{getLabel(111, "付款人账号")}
+
{}
+
+
+
{getLabel(111, "税款限缴日期")}
+
{bankVoucherDetail.deadline || ""}
+
+
+ +
+
+
{getLabel(111, "征收顶目名称")}
+
{getLabel(111, "征收品目名称")}
+
{getLabel(111, "应繳税额")}
+
+
+ { + !_.isEmpty(bankVoucherDetail.details) ? bankVoucherDetail.details.map((row, index) => ( +
+
{row.paymentCode}
+
{row.paymentItem}
+
{row.payAmount}
+
+ )) : null + } +
+
+
{getLabel(111, "金额合计(小写):")} {bankVoucherDetail.lowerFormatAmount}
+
{getLabel(111, "金额合计(大写):")} {bankVoucherDetail.upperFormatAmount}
+ +
+
+
{getLabel(111, "付款人 (签章)")}
+
{getLabel(111, "经办人 (签章)")}
+
+
+
{getLabel(111, "银行记账员")}
+
{getLabel(111, "(签章)")}
+
+
+
{getLabel(111, "备注:")}
+
{bankVoucherDetail.remark}
+
+
+
+
+
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.less b/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.less new file mode 100644 index 00000000..3dc296ac --- /dev/null +++ b/pc4mobx/hrmSalary/pages/bankVoucherDetail/index.less @@ -0,0 +1,30 @@ +.loading-layout { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.printBankLayout { + width: 100%; + height: 100%; + overflow-y: auto; + + .print-bank-voucher-container { + font-size: 14px; + + #header_print_btn { + display: flex; + padding: calc(16 * 1px) calc(32 * 1px) 0; + justify-content: flex-end; + } + + .content { + padding: calc(32 * 1px) 0 calc(16 * 1px); + display: flex; + justify-content: center; + align-items: center; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/declareResultDialog.js b/pc4mobx/hrmSalary/pages/declareDetail/components/declareResultDialog.js index 5970b68b..a462a426 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/declareResultDialog.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/declareResultDialog.js @@ -12,7 +12,7 @@ import { taxdeclarationEmployeeList4NotDeclare, taxdeclarationEmployeeList4NoValue } from "../../../apis/declare"; -import { getQueryString } from "../../../util/url"; +import { convertToUrlString, getQueryString } from "../../../util/url"; const { getLabel } = WeaLocaleProvider; const APIFox = { @@ -59,6 +59,25 @@ class DeclareResultDialog extends Component { } }).catch(() => this.setState({ loading: false })); }; + errorExport = () => { + let exportUrl = ""; + const { selectedKey, keyword } = this.state; + const payload = { + taxDeclareRecordId: getQueryString("id"), keyword + }; + if (selectedKey === "list4NotDeclare") { + exportUrl = "/api/bs/hrmsalary/taxdeclaration/employee/export4NotDeclare"; + } else if (selectedKey === "list4NoValue") { + exportUrl = "/api/bs/hrmsalary/taxdeclaration/employee/export4NoValue"; + } + window.open(`${window.ecologyContentPath || ""}${exportUrl}?${convertToUrlString(payload)}`, "_blank"); + }; + failExport = () => { + const payload = { + taxDeclareRecordId: getQueryString("id") + }; + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/employee/export4Fail?${convertToUrlString(payload)}`, "_blank"); + }; render() { const { type } = this.props; @@ -91,13 +110,13 @@ class DeclareResultDialog extends Component { {this.props.title} - + ) : {getLabel(17416, "导出")} + ]} onChange={key => this.setState({ selectedKey: key }, () => this.queryList())} /> diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js index 552d07e2..428344c8 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentBtn.js @@ -13,7 +13,9 @@ import { taxPaymentAgreemenPay, taxPaymentgetAgreement, taxPaymentgetAgreementFeedback, - taxPaymentTaxAmount + taxPaymentTaxAmount, + taxPaymentVoucherCancel, + taxPaymentVoucherPrint } from "../../../apis/declare"; import { getQueryString } from "../../../util/url"; import { paymentBankConditions, paymentTripartiteConditions } from "./constants"; @@ -221,6 +223,99 @@ class PaymentBtn extends Component { } }); }; + handleMenuChange = ({ key }) => { + if (key === "bank_voucher_payment") { + taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") }) + .then(({ status, data, errormsg }) => { + if (status) { + const { paymentDialog } = this.state; + this.setState({ + paymentDialog: { + ...paymentDialog, visible: true, title: getLabel(111, "应缴纳"), + buttons: [ + + ], + conditions: _.map(paymentTripartiteConditions, item => { + return { + ...item, + items: _.map(item.items, it => { + const key = it["domkey"][0]; + return { + ...it, + value: data[key] + }; + }) + }; + }) + } + }); + } else { + message.error(errormsg); + } + }); + } else if (key === "destory_voucher") { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "确定作废缴款凭证吗?作废后可重新获取。"), + onOk: () => { + const { taxAgentId, taxCycle: taxYearMonth } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + taxPaymentVoucherCancel(payload).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "作废缴款凭证成功!")); + } else { + message.error(errormsg || getLabel(111, "作废失败!")); + } + }); + } + }); + } + }; + taxPaymentVoucherPrint = () => { + const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth + }; + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + taxPaymentVoucherPrint(payload).then(({ status, errormsg }) => { + if (status) { + message.success(getLabel(111, "处理中,请稍后点击缴款反馈!")); + this.handleCancel(); + } else { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + message.error(errormsg || getLabel(111, "缴款反馈失败!")); + } + }).catch(() => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + }); + }; handleCancel = () => { const { paymentDialog } = this.state; this.setState({ @@ -238,7 +333,7 @@ class PaymentBtn extends Component { + {getLabel(111, "银行端凭证缴款")} {getLabel(111, "作废缴款凭证")} diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js index e35f7400..7a9809bd 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/paymentFeedbackBtn.js @@ -11,8 +11,8 @@ import { inject, observer } from "mobx-react"; import PaymentDialog from "./paymentDialog"; import PaymentFeedBackDetail from "./paymentFeedBackDetail"; import { paymentFeedbackConditions } from "./constants"; -import { getQueryString } from "../../../util/url"; -import { taxPaymentAgreementPayFeedback } from "../../../apis/declare"; +import { convertToUrlString, getQueryString } from "../../../util/url"; +import { taxPaymentAgreementPayFeedback, taxPaymentVoucherPrintFeedback } from "../../../apis/declare"; const { getLabel } = WeaLocaleProvider; @@ -42,6 +42,7 @@ class PaymentFeedbackBtn extends Component { // 三方缴款 弹窗,打印新开页面 this.taxPaymentAgreementPayFeedback(); } else { + this.taxPaymentVoucherPrintFeedback(); } } else { f.showErrors(); @@ -94,6 +95,46 @@ class PaymentFeedbackBtn extends Component { }); }); }; + taxPaymentVoucherPrintFeedback = () => { + const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo; + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxAgentId, taxYearMonth, checkFeedback: 1 + }; + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + taxPaymentVoucherPrintFeedback(payload).then(({ status, data, errormsg }) => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + if (status) { + this.handleCancel(); + window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/bankVoucherDetail?${convertToUrlString(payload)}`); + } else { + message.error(errormsg || getLabel(111, "缴款反馈失败!")); + } + }).catch(() => { + this.setState({ + paymentDialog: { + ...this.state.paymentDialog, + buttons: [ + + ] + } + }); + }); + }; handlePaymentFeedback = () => { const { paymentDialog } = this.state; this.setState({ diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js index 9c8b0ccc..28f482f5 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -212,20 +212,23 @@ class Index extends Component { } }).catch(() => this.setState({ loading: { ...this.state.loading, issuance: false } })); }; + export = () => { + const [incomeCategory, taxDeclarationId] = this.state.selectedKey.split("%%"); + const payload = { + taxDeclareRecordId: getQueryString("id"), + taxDeclarationId: taxDeclarationId.toString(), + incomeCategory + }; + window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/detail/export?${convertToUrlString(payload)}`, "_blank"); + }; render() { const { - tabs, - selectedKey, - columns, - pageInfo, - dataSource, - loading, - declareInfo, - intelCalcSalaryStatus + tabs, selectedKey, columns, pageInfo, + dataSource, loading, declareInfo, intelCalcSalaryStatus } = this.state; let btns = [ - , + , ,