个税在线申报-个税申报表在线申报功能开发
This commit is contained in:
parent
f7c03082f4
commit
c4d0dbf296
|
|
@ -163,4 +163,59 @@ export const taxdeclarationDelete = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/delete", params);
|
return postFetch("/api/bs/hrmsalary/taxdeclaration/delete", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-获取在线申报反馈
|
||||||
|
export const taxdeclarationGetDeclareFeedback = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxdeclaration/getDeclareFeedback", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-更正申报
|
||||||
|
export const taxdeclaratioUpdateDeclare = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxdeclaration/updateDeclare", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-作废申报
|
||||||
|
export const taxdeclaratioUpdateCancel = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxdeclaration/cancel", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-获取作废反馈
|
||||||
|
export const taxdeclaratioGetCancelFeedback = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxdeclaration/getCancelFeedback", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-三方协议缴款反馈
|
||||||
|
export const taxPaymentAgreementPayFeedback = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxPayment/agreement/pay/feedback", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-应缴税额查询
|
||||||
|
export const taxPaymentTaxAmount = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxPayment/tax/amount", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-获取企业的三方信息
|
||||||
|
export const taxPaymentgetAgreement = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxPayment/getAgreement", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-获取企业的三方信息查询反馈
|
||||||
|
export const taxPaymentgetAgreementFeedback = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxPayment/getAgreementFeedback", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-同步缴款状态
|
||||||
|
export const taxPaymentVoucherStatusSync = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxPayment/voucher/status/sync", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-三方缴款,最终支付
|
||||||
|
export const taxPaymentAgreemenPay = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxPayment/agreement/pay", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//个税申报表申报数据-开具企业缴税完税证明
|
||||||
|
export const taxPaymentWithheldVoucherGet = (params) => {
|
||||||
|
return postFetch("/api/bs/hrmsalary/taxPayment/withheldVoucher/get", params);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import PayrollDetail from "./pages/payroll/payrollDetail";
|
||||||
import Declare from "./pages/declare";
|
import Declare from "./pages/declare";
|
||||||
import DeclareDetail from "./pages/declareDetail";
|
import DeclareDetail from "./pages/declareDetail";
|
||||||
import Employeedeclare from "./pages/employeedeclare";
|
import Employeedeclare from "./pages/employeedeclare";
|
||||||
|
import EnterprisePayCertificationDetail from "./pages/enterprisePayCertificationDetail";
|
||||||
import EmployeedeclareDetail from "./pages/employeedeclareDetail";
|
import EmployeedeclareDetail from "./pages/employeedeclareDetail";
|
||||||
import TaxRate from "./pages/taxRate";
|
import TaxRate from "./pages/taxRate";
|
||||||
import TaxAgents from "./pages/taxAgent";
|
import TaxAgents from "./pages/taxAgent";
|
||||||
|
|
@ -160,6 +161,8 @@ const Routes = (
|
||||||
<Route key="declare" path="declare" component={Declare}/>
|
<Route key="declare" path="declare" component={Declare}/>
|
||||||
<Route key="declareDetail" path="declareDetail" component={DeclareDetail}/>
|
<Route key="declareDetail" path="declareDetail" component={DeclareDetail}/>
|
||||||
<Route key="employeedeclare" path="employeedeclare" component={Employeedeclare}/>
|
<Route key="employeedeclare" path="employeedeclare" component={Employeedeclare}/>
|
||||||
|
<Route key="enterprisePayCertificationDetail" path="enterprisePayCertificationDetail"
|
||||||
|
component={EnterprisePayCertificationDetail}/>
|
||||||
<Route key="employeedeclareDetail" path="employeedeclareDetail" component={EmployeedeclareDetail}/>
|
<Route key="employeedeclareDetail" path="employeedeclareDetail" component={EmployeedeclareDetail}/>
|
||||||
<Route
|
<Route
|
||||||
key="generateDeclarationDetail"
|
key="generateDeclarationDetail"
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ export default class Declare extends React.Component {
|
||||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail?id=${record.id}`}
|
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/declareDetail?id=${record.id}`}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
>
|
||||||
查看
|
{getLabel(83110, "查看详情")}
|
||||||
</a>
|
</a>
|
||||||
{
|
{
|
||||||
showWithDrawBtn &&
|
showWithDrawBtn &&
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
export const paymentFeedbackConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["type"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "缴款方式",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
rules: "required",
|
||||||
|
viewAttr: 3,
|
||||||
|
detailtype: 3,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const paymentTripartiteConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["taxAgent"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "个税扣缴义务人",
|
||||||
|
lanId: 537996,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["amount"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "应缴金额",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "INPUT",
|
||||||
|
domkey: ["personNum"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "申报人数",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export const paymentBankConditions = [
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["protocolNumber"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "开户行",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
rules: "required",
|
||||||
|
viewAttr: 3,
|
||||||
|
options: []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
colSpan: 1,
|
||||||
|
conditionType: "SELECT",
|
||||||
|
domkey: ["count"],
|
||||||
|
fieldcol: 12,
|
||||||
|
label: "开户行号",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 6,
|
||||||
|
value: "",
|
||||||
|
viewAttr: 1,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
defaultshow: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,256 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 在线申报-缴款按钮
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/8/22
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||||
|
import PaymentDialog from "./paymentDialog";
|
||||||
|
import {
|
||||||
|
taxPaymentAgreemenPay,
|
||||||
|
taxPaymentgetAgreement,
|
||||||
|
taxPaymentgetAgreementFeedback,
|
||||||
|
taxPaymentTaxAmount
|
||||||
|
} from "../../../apis/declare";
|
||||||
|
import { getQueryString } from "../../../util/url";
|
||||||
|
import { paymentBankConditions, paymentTripartiteConditions } from "./constants";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("declareStore")
|
||||||
|
@observer
|
||||||
|
class PaymentBtn extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
paymentDialog: {
|
||||||
|
visible: false, title: "",
|
||||||
|
buttons: [], conditions: [],
|
||||||
|
taxAmount: ""
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.timer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleTripartiteContributions = () => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: getLabel(131329, "信息确认"),
|
||||||
|
content: <div>
|
||||||
|
<div style={{ textAlign: "center" }}>{getLabel(111, "确定要进行三方缴款吗?")}</div>
|
||||||
|
<div
|
||||||
|
style={{ textAlign: "center" }}>{getLabel(111, "若申请过银行缴款,点击确定,将自动作废银行缴款凭证。并进行三方缴款。 ")}</div>
|
||||||
|
</div>,
|
||||||
|
onOk: () => {
|
||||||
|
taxPaymentTaxAmount({ taxDeclareRecordId: getQueryString("id") })
|
||||||
|
.then(({ status, data, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
const { paymentDialog } = this.state;
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...paymentDialog, visible: true,
|
||||||
|
title: getLabel(111, "应缴纳"), taxAmount: data.amount,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" onClick={this.taxPaymentgetAgreement}>{getLabel(111, "确认缴款")}</Button>
|
||||||
|
],
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
taxPaymentgetAgreement = () => {
|
||||||
|
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||||
|
const payload = {
|
||||||
|
taxDeclareRecordId: getQueryString("id"),
|
||||||
|
taxAgentId, taxYearMonth
|
||||||
|
};
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" loading={true}>{getLabel(111, "确认缴款")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
taxPaymentgetAgreement(payload).then(({ status, data, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
this.handleCancel();
|
||||||
|
this.getBankAccountInfo({ ...payload, requestId: data });
|
||||||
|
} else {
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" onClick={() => this.taxPaymentgetAgreement()}
|
||||||
|
loading={false}>{getLabel(111, "确认缴款")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" onClick={() => this.taxPaymentgetAgreement()}
|
||||||
|
loading={false}>{getLabel(111, "确认缴款")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
getBankAccountInfo = (payload) => {
|
||||||
|
let loop = () => {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
this.timer = setTimeout(async () => {
|
||||||
|
let response = await taxPaymentgetAgreementFeedback(payload);
|
||||||
|
const { data, status, errormsg } = response;
|
||||||
|
if (status) {
|
||||||
|
const { finish, form } = data;
|
||||||
|
if (finish) {
|
||||||
|
const { feedbacks, bankForm } = form;
|
||||||
|
const { paymentDialog } = this.state;
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...paymentDialog, visible: true,
|
||||||
|
title: getLabel(111, "银行账号信息"),
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" onClick={this.taxPaymentAgreemenPay}>{getLabel(826, "确定")}</Button>
|
||||||
|
],
|
||||||
|
conditions: _.map(paymentBankConditions, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, it => {
|
||||||
|
const key = it["domkey"][0];
|
||||||
|
if (key === "protocolNumber") {
|
||||||
|
return {
|
||||||
|
...it,
|
||||||
|
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
|
||||||
|
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.yhhbmc }))
|
||||||
|
};
|
||||||
|
} else if (key === "count") {
|
||||||
|
return {
|
||||||
|
...it,
|
||||||
|
value: !_.isEmpty(bankForm) ? bankForm.bank : "",
|
||||||
|
options: _.map(feedbacks, o => ({ key: o.sfxyh, showname: o.khhhh }))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...it };
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
loop();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
message.warning(errormsg);
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
}
|
||||||
|
}, 800);
|
||||||
|
};
|
||||||
|
loop();
|
||||||
|
};
|
||||||
|
taxPaymentAgreemenPay = () => {
|
||||||
|
const { paymentDialog } = this.state;
|
||||||
|
const { taxAmount } = paymentDialog;
|
||||||
|
const { declareStore: { paymentForm } } = this.props;
|
||||||
|
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||||
|
paymentForm.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
const { protocolNumber } = paymentForm.getFormParams();
|
||||||
|
const payload = {
|
||||||
|
taxDeclareRecordId: getQueryString("id"),
|
||||||
|
taxAgentId, taxYearMonth, taxAmount, protocolNumber
|
||||||
|
};
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" loading={true}>{getLabel(826, "确定")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
taxPaymentAgreemenPay(payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" loading={false}
|
||||||
|
onClick={this.taxPaymentAgreemenPay}>{getLabel(826, "确定")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (status) {
|
||||||
|
message.success(getLabel(111, "缴款处理中,请稍后点击缴款反馈按钮获取缴款信息"));
|
||||||
|
this.handleCancel();
|
||||||
|
} else {
|
||||||
|
message.error(errormsg);
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" loading={false}
|
||||||
|
onClick={this.taxPaymentAgreemenPay}>{getLabel(826, "确定")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleCancel = () => {
|
||||||
|
const { paymentDialog } = this.state;
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...paymentDialog, visible: false,
|
||||||
|
title: "", buttons: [], conditions: []
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { paymentDialog } = this.state;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<Dropdown.Button
|
||||||
|
onClick={this.handleTripartiteContributions}
|
||||||
|
overlay={
|
||||||
|
<Menu>
|
||||||
|
<Menu.Item key="bank_voucher_payment">{getLabel(111, "银行端凭证缴款")}</Menu.Item>
|
||||||
|
<Menu.Item key="destory_voucher">{getLabel(111, "作废缴款凭证")}</Menu.Item>
|
||||||
|
</Menu>
|
||||||
|
}
|
||||||
|
type="ghost">{getLabel(111, "三方缴款")}</Dropdown.Button>
|
||||||
|
<PaymentDialog
|
||||||
|
{...paymentDialog}
|
||||||
|
onCancel={this.handleCancel}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PaymentBtn;
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 在线申报-缴款弹框
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/8/22
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { inject, observer } from "mobx-react";
|
||||||
|
import { WeaDialog } from "ecCom";
|
||||||
|
import { getSearchs } from "../../../util";
|
||||||
|
|
||||||
|
@inject("declareStore")
|
||||||
|
@observer
|
||||||
|
class PaymentDialog extends Component {
|
||||||
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
|
const { declareStore: { paymentForm, changePaymentForm }, conditions } = nextProps;
|
||||||
|
if (nextProps.visible !== this.props.visible && nextProps.visible && nextProps.conditions) {
|
||||||
|
paymentForm.initFormFields(conditions);
|
||||||
|
}
|
||||||
|
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||||
|
paymentForm.resetForm();
|
||||||
|
changePaymentForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange = (val) => {
|
||||||
|
const key = Object.keys(val)[0];
|
||||||
|
if (key === "protocolNumber") {
|
||||||
|
const { declareStore: { paymentForm } } = this.props;
|
||||||
|
paymentForm.updateFields({
|
||||||
|
count: val[key].value
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { conditions, declareStore: { paymentForm } } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props} className="paymentDialog" initLoadCss
|
||||||
|
style={{ width: 550 }}
|
||||||
|
>
|
||||||
|
<div className="paymentDialogContent">
|
||||||
|
{!_.isEmpty(conditions) && getSearchs(paymentForm, conditions, 1, false, this.handleChange)}
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PaymentDialog;
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 在线申报-三方缴款详情
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/8/22
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
class PaymentFeedBackDetail extends Component {
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { showData } = this.props;
|
||||||
|
return (
|
||||||
|
<WeaDialog
|
||||||
|
{...this.props} className="paymentDialog" initLoadCss
|
||||||
|
style={{ width: 550 }}
|
||||||
|
>
|
||||||
|
<div className="with-holding-pay-detail">
|
||||||
|
<div className="status">{getLabel(111, "缴款成功")}</div>
|
||||||
|
<div className="line">
|
||||||
|
<div className="label">{getLabel(111, "状态:")}</div>
|
||||||
|
<div className="value">{getLabel(111, "申报成功,已缴款")}</div>
|
||||||
|
</div>
|
||||||
|
<div className="line">
|
||||||
|
<div className="label">{getLabel(111, "实缴金额:")}</div>
|
||||||
|
<div
|
||||||
|
className="value">{showData.payAmount} {parseFloat(showData.otherAmount) > 0 ? `(含滞纳金等{${showData.otherAmount}元)` : ""} </div>
|
||||||
|
</div>
|
||||||
|
<div className="line">
|
||||||
|
<div className="label">{getLabel(111, "申报人数:")}</div>
|
||||||
|
<div className="value">{showData.personNum} </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</WeaDialog>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PaymentFeedBackDetail;
|
||||||
|
|
@ -0,0 +1,158 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 在线申报-缴款反馈按钮
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/8/22
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaLocaleProvider } from "ecCom";
|
||||||
|
import { Button, message } from "antd";
|
||||||
|
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";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
@inject("declareStore")
|
||||||
|
@observer
|
||||||
|
class PaymentFeedbackBtn extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
paymentDialog: {
|
||||||
|
visible: false, title: "",
|
||||||
|
buttons: [], conditions: null
|
||||||
|
},
|
||||||
|
paymentFeedbackDialog: {
|
||||||
|
visible: false, title: "", showData: {}
|
||||||
|
},
|
||||||
|
loading: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
getFeedback = () => {
|
||||||
|
const { declareStore: { paymentForm } } = this.props;
|
||||||
|
paymentForm.validateForm().then(f => {
|
||||||
|
const { type } = paymentForm.getFormParams();
|
||||||
|
if (f.isValid) {
|
||||||
|
if (type === "WITHHOLDING_PAY") {
|
||||||
|
// 三方缴款 弹窗,打印新开页面
|
||||||
|
this.taxPaymentAgreementPayFeedback();
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
taxPaymentAgreementPayFeedback = () => {
|
||||||
|
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
|
||||||
|
const payload = {
|
||||||
|
taxDeclareRecordId: getQueryString("id"),
|
||||||
|
taxAgentId, taxYearMonth
|
||||||
|
};
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" loading={true}>{getLabel(111, "获取反馈")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
taxPaymentAgreementPayFeedback(payload).then(({ status, data, errormsg }) => {
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" loading={false} onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (status) {
|
||||||
|
this.handleCancel();
|
||||||
|
this.setState({
|
||||||
|
paymentFeedbackDialog: {
|
||||||
|
...this.state.paymentFeedbackDialog,
|
||||||
|
visible: true, title: getLabel(111, "三方缴款详情"),
|
||||||
|
showData: data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || getLabel(111, "缴款反馈失败!"));
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...this.state.paymentDialog,
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" loading={false} onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handlePaymentFeedback = () => {
|
||||||
|
const { paymentDialog } = this.state;
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...paymentDialog, visible: true,
|
||||||
|
title: getLabel(111, "获取反馈"),
|
||||||
|
buttons: [
|
||||||
|
<Button type="primary" onClick={this.getFeedback}>{getLabel(111, "获取反馈")}</Button>
|
||||||
|
],
|
||||||
|
conditions: _.map(paymentFeedbackConditions, item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
items: _.map(item.items, it => {
|
||||||
|
return {
|
||||||
|
...it,
|
||||||
|
options: [
|
||||||
|
{ key: "WITHHOLDING_PAY", showname: getLabel(111, "三方缴款") },
|
||||||
|
{ key: "WITHHOLDING_VOUCHER", showname: getLabel(111, "缴款凭证打印") }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
handleCancel = () => {
|
||||||
|
const { paymentDialog } = this.state;
|
||||||
|
this.setState({
|
||||||
|
paymentDialog: {
|
||||||
|
...paymentDialog, visible: false,
|
||||||
|
title: "", buttons: [], conditions: null
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { paymentDialog, paymentFeedbackDialog } = this.state;
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<Button type="ghost" onClick={this.handlePaymentFeedback}>{getLabel(111, "缴款反馈")}</Button>
|
||||||
|
<PaymentDialog
|
||||||
|
{...paymentDialog}
|
||||||
|
onCancel={this.handleCancel}
|
||||||
|
/>
|
||||||
|
<PaymentFeedBackDetail
|
||||||
|
{...paymentFeedbackDialog}
|
||||||
|
onCancel={() => {
|
||||||
|
this.setState({
|
||||||
|
paymentFeedbackDialog: {
|
||||||
|
...paymentFeedbackDialog,
|
||||||
|
visible: false, title: "", showData: {}
|
||||||
|
}
|
||||||
|
}, () => this.props.updateDeclare());
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PaymentFeedbackBtn;
|
||||||
|
|
@ -47,6 +47,10 @@ class TaxDeclarationInfo extends Component {
|
||||||
return <div className="info-item">
|
return <div className="info-item">
|
||||||
<span className="label">{item["label"]}:</span>
|
<span className="label">{item["label"]}:</span>
|
||||||
<span className="value">{declareInfo[item["key"]]}</span>
|
<span className="value">{declareInfo[item["key"]]}</span>
|
||||||
|
{
|
||||||
|
item.key === "taxPaidAmount" &&
|
||||||
|
<span className="value">{getLabel(111, "元")}</span>
|
||||||
|
}
|
||||||
</div>;
|
</div>;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,25 +8,48 @@ import React, { Component } from "react";
|
||||||
import { WeaLocaleProvider, WeaTab, WeaTable } from "ecCom";
|
import { WeaLocaleProvider, WeaTab, WeaTable } from "ecCom";
|
||||||
import { Button, message } from "antd";
|
import { Button, message } from "antd";
|
||||||
import TaxDeclarationInfo from "./components/taxDeclarationInfo";
|
import TaxDeclarationInfo from "./components/taxDeclarationInfo";
|
||||||
|
import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalarySettings";
|
||||||
|
import PaymentBtn from "./components/paymentBtn";
|
||||||
|
import PaymentFeedbackBtn from "./components/paymentFeedbackBtn";
|
||||||
import {
|
import {
|
||||||
getDeclareInfo,
|
getDeclareInfo,
|
||||||
getDetailList,
|
getDetailList,
|
||||||
getTaxDeclarationTab,
|
getTaxDeclarationTab,
|
||||||
|
taxdeclaratioGetCancelFeedback,
|
||||||
taxdeclarationDeclare,
|
taxdeclarationDeclare,
|
||||||
|
taxdeclarationGetDeclareFeedback,
|
||||||
taxdeclarationGetRate,
|
taxdeclarationGetRate,
|
||||||
taxdeclarationRefreshData
|
taxdeclarationRefreshData,
|
||||||
|
taxdeclaratioUpdateCancel,
|
||||||
|
taxdeclaratioUpdateDeclare,
|
||||||
|
taxPaymentVoucherStatusSync,
|
||||||
|
taxPaymentWithheldVoucherGet
|
||||||
} from "../../apis/declare";
|
} from "../../apis/declare";
|
||||||
import { getQueryString } from "../../util/url";
|
import { convertToUrlString, getQueryString } from "../../util/url";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
const APIFox = {
|
||||||
|
refresh: taxdeclarationRefreshData, //刷新数据
|
||||||
|
declare: taxdeclarationDeclare, //在线申报
|
||||||
|
feedback: taxdeclarationGetDeclareFeedback,//申报反馈
|
||||||
|
correct: taxdeclaratioUpdateDeclare,//更正申报
|
||||||
|
cancel: taxdeclaratioUpdateCancel,//作废申报
|
||||||
|
cancelFeedback: taxdeclaratioGetCancelFeedback//作废反馈
|
||||||
|
};
|
||||||
|
|
||||||
class Index extends Component {
|
class Index extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
tabs: [], selectedKey: "", columns: [], dataSource: [],
|
tabs: [], selectedKey: "", columns: [], dataSource: [],
|
||||||
loading: { query: false, refresh: false, declare: false },
|
loading: {
|
||||||
|
query: false, refresh: false, declare: false, feedback: false,
|
||||||
|
correct: false, cancel: false, cancelFeedback: false, refreshingPay: false,
|
||||||
|
issuance: false
|
||||||
|
},
|
||||||
|
intelCalcSalaryStatus: false, //智能算薪 总开关是否开启
|
||||||
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 }
|
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 }
|
||||||
};
|
};
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
|
|
@ -37,16 +60,18 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
init = async () => {
|
init = async () => {
|
||||||
const [tabsResult, infoResult] = await Promise.all([this.getTaxDeclarationTab(), this.getDeclareInfo()]);
|
const [tabsResult, infoResult, calcResult] = await Promise.all([this.getTaxDeclarationTab(), this.getDeclareInfo(), this.apiflowBillingConfigStatus()]);
|
||||||
const { data: tabDataSource, status: tabStatus } = tabsResult;
|
const { data: tabDataSource, status: tabStatus } = tabsResult;
|
||||||
const { data: infoDataSource, status: infoStatus } = infoResult;
|
const { data: infoDataSource, status: infoStatus } = infoResult;
|
||||||
|
const { data: calcSalaryStatus, status: calcStatus } = calcResult;
|
||||||
this.setState({
|
this.setState({
|
||||||
tabs: tabStatus ? _.map(tabDataSource, it => ({
|
tabs: tabStatus ? _.map(tabDataSource, it => ({
|
||||||
viewcondition: `${it.incomeCategory}%%${it.taxDeclarationId}`,
|
viewcondition: `${it.incomeCategory}%%${it.taxDeclarationId}`,
|
||||||
title: it.tabName
|
title: it.tabName
|
||||||
})) : this.state.tabs,
|
})) : this.state.tabs,
|
||||||
selectedKey: tabStatus ? `${_.take(tabDataSource)[0].incomeCategory}%%${_.take(tabDataSource)[0].taxDeclarationId}` : this.state.selectedKey,
|
selectedKey: tabStatus ? `${_.take(tabDataSource)[0].incomeCategory}%%${_.take(tabDataSource)[0].taxDeclarationId}` : this.state.selectedKey,
|
||||||
declareInfo: infoStatus ? infoDataSource : this.state.declareInfo
|
declareInfo: infoStatus ? infoDataSource : this.state.declareInfo,
|
||||||
|
intelCalcSalaryStatus: calcStatus && calcSalaryStatus
|
||||||
});
|
});
|
||||||
this.getDetailList();
|
this.getDetailList();
|
||||||
};
|
};
|
||||||
|
|
@ -64,6 +89,9 @@ class Index extends Component {
|
||||||
getDeclareInfo = () => {
|
getDeclareInfo = () => {
|
||||||
return getDeclareInfo({ id: getQueryString("id") });
|
return getDeclareInfo({ id: getQueryString("id") });
|
||||||
};
|
};
|
||||||
|
apiflowBillingConfigStatus = () => {
|
||||||
|
return apiflowBillingConfigStatus();
|
||||||
|
};
|
||||||
taxdeclarationGetRate = (index) => {
|
taxdeclarationGetRate = (index) => {
|
||||||
return taxdeclarationGetRate({ index });
|
return taxdeclarationGetRate({ index });
|
||||||
};
|
};
|
||||||
|
|
@ -91,84 +119,116 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||||
};
|
};
|
||||||
taxdeclarationRefreshData = () => {
|
handleOperateDeclare = (type) => {
|
||||||
this.setState({ loading: { ...this.state.loading, refresh: true } });
|
const loadingTxt = {
|
||||||
taxdeclarationRefreshData({ taxDeclareRecordId: getQueryString("id") }).then(async ({ status, data, errormsg }) => {
|
refresh: getLabel(111, "刷新中..."), //刷新数据
|
||||||
this.setState({ loading: { ...this.state.loading, refresh: false } });
|
declare: getLabel(111, "申报中..."), //在线申报
|
||||||
if (status) {
|
feedback: getLabel(111, "反馈中..."),//申报反馈
|
||||||
message.destroy();
|
correct: getLabel(111, "更正申报中..."),//更正申报
|
||||||
message.loading(getLabel(111, "刷新中..."), 0);
|
cancel: getLabel(111, "作废申报中..."),//作废申报
|
||||||
this.timer = setInterval(async () => {
|
cancelFeedback: getLabel(111, "作废反馈中...")//作废反馈
|
||||||
const { status: resStatus, data: result } = await this.taxdeclarationGetRate(data);
|
}, successTxt = {
|
||||||
const { status: rateStatus, finish, msg } = result;
|
refresh: getLabel(111, "刷新数据成功!"), //刷新数据
|
||||||
if (resStatus && rateStatus) {
|
declare: getLabel(111, "在线申报成功!"), //在线申报
|
||||||
if (finish) {
|
feedback: getLabel(111, "申报反馈成功!"),//申报反馈
|
||||||
|
correct: getLabel(111, "更正申报成功!"),//更正申报
|
||||||
|
cancel: getLabel(111, "作废申报成功!"),//作废申报
|
||||||
|
cancelFeedback: getLabel(111, "作废反馈成功!")//作废反馈
|
||||||
|
}, failTxt = {
|
||||||
|
refresh: getLabel(111, "刷新数据失败!"), //刷新数据
|
||||||
|
declare: getLabel(111, "在线申报失败!"), //在线申报
|
||||||
|
feedback: getLabel(111, "申报反馈失败!"),//申报反馈
|
||||||
|
correct: getLabel(111, "更正申报失败!"),//更正申报
|
||||||
|
cancel: getLabel(111, "作废申报失败!"),//作废申报
|
||||||
|
cancelFeedback: getLabel(111, "作废反馈失败!")//作废反馈
|
||||||
|
};
|
||||||
|
this.setState({ loading: { ...this.state.loading, [type]: true } });
|
||||||
|
APIFox[type]({ taxDeclareRecordId: getQueryString("id") })
|
||||||
|
.then(async ({ status, data, errormsg }) => {
|
||||||
|
if (status) {
|
||||||
|
message.destroy();
|
||||||
|
message.loading(loadingTxt[type], 0);
|
||||||
|
this.timer = setInterval(async () => {
|
||||||
|
const { status: resStatus, data: result } = await this.taxdeclarationGetRate(data);
|
||||||
|
const { status: rateStatus, finish, msg } = result;
|
||||||
|
if (resStatus && rateStatus) {
|
||||||
|
if (finish) {
|
||||||
|
this.setState({ loading: { ...this.state.loading, [type]: false } });
|
||||||
|
clearInterval(this.timer);
|
||||||
|
message.destroy();
|
||||||
|
message.success(successTxt[type]);
|
||||||
|
const promise = type === "refresh" ? await this.init() : await this.declare();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.setState({ loading: { ...this.state.loading, [type]: false } });
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success(getLabel(111, "刷新数据成功!"));
|
message.warning(msg || failTxt[type]);
|
||||||
const promise = this.init();
|
const promise = type === "refresh" ? await this.init() : await this.declare();
|
||||||
}
|
}
|
||||||
} else {
|
}, 1000);
|
||||||
clearInterval(this.timer);
|
} else {
|
||||||
message.destroy();
|
this.setState({ loading: { ...this.state.loading, [type]: false } });
|
||||||
message.warning(msg || getLabel(111, "刷新数据失败!"));
|
clearInterval(this.timer);
|
||||||
const promise = this.init();
|
message.destroy();
|
||||||
}
|
message.warning(errormsg);
|
||||||
}, 1000);
|
}
|
||||||
} else {
|
}).catch(() => {
|
||||||
clearInterval(this.timer);
|
|
||||||
message.destroy();
|
|
||||||
message.warning(errormsg);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
message.destroy();
|
message.destroy();
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
this.setState({ loading: { ...this.state.loading, refresh: false } });
|
this.setState({ loading: { ...this.state.loading, [type]: false } });
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
taxdeclarationDeclare = () => {
|
taxPaymentVoucherStatusSync = () => {
|
||||||
this.setState({ loading: { ...this.state.loading, declare: true } });
|
const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo;
|
||||||
taxdeclarationDeclare({ taxDeclareRecordId: getQueryString("id") }).then(async ({ status, data, errormsg }) => {
|
const payload = {
|
||||||
this.setState({ loading: { ...this.state.loading, declare: false } });
|
taxDeclareRecordId: getQueryString("id"),
|
||||||
|
taxAgentId, taxYearMonth
|
||||||
|
};
|
||||||
|
this.setState({ loading: { ...this.state.loading, refreshingPay: true } });
|
||||||
|
taxPaymentVoucherStatusSync(payload).then(({ status, errormsg }) => {
|
||||||
|
this.setState({ loading: { ...this.state.loading, refreshingPay: false } });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.destroy();
|
message.success(getLabel(111, "刷新成功!"));
|
||||||
message.loading(getLabel(111, "申报中..."), 0);
|
const promise = this.declare();
|
||||||
this.timer = setInterval(async () => {
|
|
||||||
const { status: resStatus, data: result } = await this.taxdeclarationGetRate(data);
|
|
||||||
const { status: rateStatus, finish, msg } = result;
|
|
||||||
if (resStatus && rateStatus) {
|
|
||||||
if (finish) {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
message.destroy();
|
|
||||||
message.success(getLabel(111, "在线申报成功!"));
|
|
||||||
const promise = this.declare();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
message.destroy();
|
|
||||||
message.warning(msg || getLabel(111, "在线申报失败!"));
|
|
||||||
const promise = this.declare();
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
} else {
|
} else {
|
||||||
clearInterval(this.timer);
|
message.error(errormsg || getLabel(111, "刷新失败!"));
|
||||||
message.destroy();
|
|
||||||
message.warning(errormsg);
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => this.setState({ loading: { ...this.state.loading, refreshingPay: false } }));
|
||||||
message.destroy();
|
};
|
||||||
clearInterval(this.timer);
|
getEnterprisePayCertificate = () => {
|
||||||
this.setState({ loading: { ...this.state.loading, declare: false } });
|
const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo;
|
||||||
});
|
const payload = {
|
||||||
|
taxDeclareRecordId: getQueryString("id"),
|
||||||
|
taxAgentId, taxYearMonth
|
||||||
|
};
|
||||||
|
this.setState({ loading: { ...this.state.loading, issuance: true } });
|
||||||
|
taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {
|
||||||
|
this.setState({ loading: { ...this.state.loading, issuance: false } });
|
||||||
|
if (status && !_.isEmpty(data.vouchers)) {
|
||||||
|
window.open(`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/enterprisePayCertificationDetail?${convertToUrlString(payload)}`);
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || "");
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: { ...this.state.loading, issuance: false } }));
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { tabs, selectedKey, columns, pageInfo, dataSource, loading, declareInfo } = this.state;
|
const {
|
||||||
|
tabs,
|
||||||
|
selectedKey,
|
||||||
|
columns,
|
||||||
|
pageInfo,
|
||||||
|
dataSource,
|
||||||
|
loading,
|
||||||
|
declareInfo,
|
||||||
|
intelCalcSalaryStatus
|
||||||
|
} = this.state;
|
||||||
let btns = [
|
let btns = [
|
||||||
<Button type="primary">{getLabel(17416, "导出")}</Button>,
|
<Button type="primary">{getLabel(17416, "导出")}</Button>,
|
||||||
<Button type="ghost" onClick={this.taxdeclarationDeclare}
|
<Button type="ghost" onClick={() => this.handleOperateDeclare("declare")}
|
||||||
loading={loading.declare}>{getLabel(111, "在线申报")}</Button>,
|
loading={loading.declare}>{getLabel(111, "在线申报")}</Button>,
|
||||||
<Button type="ghost" onClick={this.taxdeclarationRefreshData}
|
<Button type="ghost" onClick={() => this.handleOperateDeclare("refresh")}
|
||||||
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>
|
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>
|
||||||
];
|
];
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
@ -188,8 +248,54 @@ class Index extends Component {
|
||||||
}, () => this.getDetailList());
|
}, () => this.getDetailList());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//申报状态:作废中
|
||||||
|
declareInfo.declareStatus === "DECLARE_CANCELLING" && (btns.splice(1, 2, <Button
|
||||||
|
type="ghost" loading={loading.cancelFeedback}
|
||||||
|
onClick={() => this.handleOperateDeclare("cancelFeedback")}>{getLabel(111, "作废反馈")}</Button>));
|
||||||
|
//申报状态:申报中
|
||||||
declareInfo.declareStatus === "DECLARING" && (btns.splice(1, 2, <Button
|
declareInfo.declareStatus === "DECLARING" && (btns.splice(1, 2, <Button
|
||||||
type="ghost">{getLabel(111, "申报反馈")}</Button>));
|
type="ghost" loading={loading.feedback}
|
||||||
|
onClick={() => this.handleOperateDeclare("feedback")}>{getLabel(111, "申报反馈")}</Button>));
|
||||||
|
//申报状态:缴款中
|
||||||
|
declareInfo.declareStatus === "DECLARE_SUCCESS_PAYING" && (btns.splice(1, 2));
|
||||||
|
//申报状态:已缴款
|
||||||
|
declareInfo.declareStatus === "DECLARE_SUCCESS_PAID" && (btns.splice(1, 2,
|
||||||
|
<Button type="ghost" loading={loading.correct}
|
||||||
|
onClick={() => this.handleOperateDeclare("correct")}>{getLabel(111, "更正申报")}</Button>));
|
||||||
|
//申报状态:申报成功,无需缴款
|
||||||
|
declareInfo.declareStatus === "DECLARE_SUCCESS_NO_PAY" &&
|
||||||
|
(btns.splice(1, 2,
|
||||||
|
<Button type="ghost" loading={loading.correct}
|
||||||
|
onClick={() => this.handleOperateDeclare("correct")}>{getLabel(111, "更正申报")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
loading={loading.cancel}
|
||||||
|
onClick={() => this.handleOperateDeclare("cancel")}>{getLabel(111, "作废申报")}</Button>
|
||||||
|
));
|
||||||
|
//申报状态:申报成功,未缴款
|
||||||
|
declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID" &&
|
||||||
|
(btns.splice(1, 2,
|
||||||
|
<Button type="ghost" loading={loading.correct}
|
||||||
|
onClick={() => this.handleOperateDeclare("correct")}>{getLabel(111, "更正申报")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
loading={loading.cancel}
|
||||||
|
onClick={() => this.handleOperateDeclare("cancel")}>{getLabel(111, "作废申报")}</Button>,
|
||||||
|
<Button type="ghost"
|
||||||
|
loading={loading.refreshingPay}
|
||||||
|
onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>
|
||||||
|
));
|
||||||
|
if (!intelCalcSalaryStatus) {
|
||||||
|
if (["NOT_DECLARE", "DECLARE_FAIL"].includes(declareInfo.declareStatus)) {
|
||||||
|
btns.splice(1, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (intelCalcSalaryStatus && (declareInfo.declareStatus === "DECLARE_SUCCESS_UNPAID")) {
|
||||||
|
btns.push(<PaymentBtn declareInfo={declareInfo}/>, <PaymentFeedbackBtn declareInfo={declareInfo}
|
||||||
|
updateDeclare={this.declare}/>);
|
||||||
|
}
|
||||||
|
if (intelCalcSalaryStatus && declareInfo.taxPaidAmount && parseFloat(declareInfo.taxPaidAmount) > 0) {
|
||||||
|
btns.push(<Button type="ghost" loading={loading.issuance}
|
||||||
|
onClick={this.getEnterprisePayCertificate}>{getLabel(111, "开具企业完税证明")}</Button>);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className="declareDetail-layout">
|
<div className="declareDetail-layout">
|
||||||
<TaxDeclarationInfo declareInfo={declareInfo}/>
|
<TaxDeclarationInfo declareInfo={declareInfo}/>
|
||||||
|
|
|
||||||
|
|
@ -113,3 +113,64 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.paymentDialog {
|
||||||
|
.ant-modal-title {
|
||||||
|
.text-elli {
|
||||||
|
color: #111;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.paymentDialogContent {
|
||||||
|
padding: 16px 25px;
|
||||||
|
background: #f6f6f6;
|
||||||
|
|
||||||
|
.wea-search-group {
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
padding: 0;
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
.ant-row, .ant-col-24 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-form-item {
|
||||||
|
padding: 5px 16px;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.with-holding-pay-detail {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 16px;
|
||||||
|
|
||||||
|
& > div {
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
height: 32px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #8ED36E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
display: flex;
|
||||||
|
height: 32px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
width: 30%;
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ class Index extends Component {
|
||||||
} else if (type === "turn") {
|
} else if (type === "turn") {
|
||||||
if (id === "PAGEINFO") {
|
if (id === "PAGEINFO") {
|
||||||
const { pageNum: current, size: pageSize } = params;
|
const { pageNum: current, size: pageSize } = params;
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } });
|
this.setState({ pageInfo: { ...this.state.pageInfo, current, pageSize } });
|
||||||
} else if (id === "EDIT") {
|
} else if (id === "EDIT") {
|
||||||
this.setState({
|
this.setState({
|
||||||
declareEditDialog: {
|
declareEditDialog: {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* Author: 黎永顺
|
||||||
|
* name: 在线申报-个税开具证明查看页面
|
||||||
|
* Description:
|
||||||
|
* Date: 2023/8/23
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { message } from "antd";
|
||||||
|
import { getQueryString } from "../../util/url";
|
||||||
|
import { taxPaymentWithheldVoucherGet } from "../../apis/declare";
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
loading: false,
|
||||||
|
dataSource: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.getEnterprisePayCertificate();
|
||||||
|
}
|
||||||
|
|
||||||
|
getEnterprisePayCertificate = () => {
|
||||||
|
const payload = {
|
||||||
|
taxDeclareRecordId: getQueryString("taxDeclareRecordId"),
|
||||||
|
taxAgentId: getQueryString("taxAgentId"),
|
||||||
|
taxYearMonth: getQueryString("taxYearMonth")
|
||||||
|
};
|
||||||
|
this.setState({ loading: true });
|
||||||
|
taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {
|
||||||
|
this.setState({ loading: false });
|
||||||
|
if (status && !_.isEmpty(data.vouchers)) {
|
||||||
|
this.setState({
|
||||||
|
dataSource: data.vouchers
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message.error(errormsg || "");
|
||||||
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { dataSource, loading } = this.state;
|
||||||
|
return (
|
||||||
|
<div style={{ width: "100%", height: "100%" }}>
|
||||||
|
{
|
||||||
|
!_.isEmpty(dataSource) &&
|
||||||
|
<iframe src={`data:application/pdf;base64,${dataSource[0].content}`}
|
||||||
|
style={{ border: 0, width: "100%", height: "100%" }}/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -7,6 +7,9 @@ import * as API from "../apis/declare"; // 引入API接口文件
|
||||||
const { TableStore } = WeaTableNew;
|
const { TableStore } = WeaTableNew;
|
||||||
|
|
||||||
export class DeclareStore {
|
export class DeclareStore {
|
||||||
|
@observable paymentForm = new WeaForm(); // declareDetail----在线申报-缴款Form
|
||||||
|
|
||||||
|
|
||||||
@observable tableStore = new TableStore(); // new table
|
@observable tableStore = new TableStore(); // new table
|
||||||
@observable form = new WeaForm(); // nrew 一个form
|
@observable form = new WeaForm(); // nrew 一个form
|
||||||
@observable condition = []; // 存储后台得到的form数据
|
@observable condition = []; // 存储后台得到的form数据
|
||||||
|
|
@ -26,6 +29,7 @@ export class DeclareStore {
|
||||||
@observable datailColumns = [];
|
@observable datailColumns = [];
|
||||||
@observable detailPageInfo = {};
|
@observable detailPageInfo = {};
|
||||||
|
|
||||||
|
@action changePaymentForm = () => this.paymentForm = new WeaForm();
|
||||||
@action setPageinfo = pageinfo => this.pageInfo = pageinfo;
|
@action setPageinfo = pageinfo => this.pageInfo = pageinfo;
|
||||||
// 初始化操作
|
// 初始化操作
|
||||||
@action
|
@action
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue