Merge branch 'release/2.9.9.2312.02-个税' into custom-艾志工业-合并个税

This commit is contained in:
黎永顺 2024-01-03 14:55:00 +08:00
commit e0e93f7959
11 changed files with 56 additions and 29 deletions

View File

@ -31,7 +31,7 @@ class Index extends Component {
const payload = {
taxDeclareRecordId: getQueryString("taxDeclareRecordId"),
taxAgentId: getQueryString("taxAgentId"),
taxYearMonth: getQueryString("taxYearMonth"),
taxYearMonth: getQueryString("taxYearMonth") + "-01",
checkFeedback: 0
};
this.setState({ loading: true });

View File

@ -28,7 +28,7 @@ class Calculate extends Component {
name: "",
dateRange: [
moment(new Date()).startOf("year").format("YYYY-MM"),
moment(new Date()).startOf("month").format("YYYY-MM")
moment(new Date()).endOf("year").format("YYYY-MM")
]
}, isRefresh: false,
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },

View File

@ -40,8 +40,8 @@ class Index extends Component {
const { pageInfo } = this.state;
const { queryParams } = props;
const { dateRange, ...extra } = queryParams;
const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
const payload = { ...pageInfo, ...params };
this.setState({ loading: true });
getDeclareList(payload).then(({ status, data }) => {

View File

@ -26,7 +26,7 @@ class Calculate extends Component {
taxAgentName: "",
dateRange: [
moment(new Date()).startOf("year").format("YYYY-MM"),
moment(new Date()).startOf("month").format("YYYY-MM")
moment(new Date()).endOf("year").format("YYYY-MM")
]
}, isRefresh: false,
declareDaialog: { visible: false, title: "" }

View File

@ -82,7 +82,7 @@ class PaymentBtn extends Component {
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth
taxAgentId, taxYearMonth: taxYearMonth + "-01"
};
this.setState({
paymentDialog: {
@ -183,7 +183,8 @@ class PaymentBtn extends Component {
const { protocolNumber } = paymentForm.getFormParams();
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth, taxAmount, protocolNumber
taxYearMonth: taxYearMonth + "-01",
taxAgentId, taxAmount, protocolNumber
};
this.setState({
paymentDialog: {
@ -261,7 +262,7 @@ class PaymentBtn extends Component {
const { taxAgentId, taxCycle: taxYearMonth } = this.props.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth
taxAgentId, taxYearMonth: taxYearMonth + "-01"
};
taxPaymentVoucherCancel(payload).then(({ status, errormsg }) => {
if (status) {
@ -278,7 +279,7 @@ class PaymentBtn extends Component {
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth
taxAgentId, taxYearMonth: taxYearMonth + "-01"
};
this.setState({
paymentDialog: {

View File

@ -53,7 +53,7 @@ class PaymentFeedbackBtn extends Component {
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth
taxAgentId, taxYearMonth: taxYearMonth + "-01"
};
this.setState({
paymentDialog: {
@ -98,8 +98,9 @@ class PaymentFeedbackBtn extends Component {
taxPaymentVoucherPrintFeedback = () => {
const { taxCycle: taxYearMonth, taxAgentId } = this.props.declareInfo;
const payload = {
taxYearMonth: taxYearMonth + "-01",
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth, checkFeedback: 1
taxAgentId, checkFeedback: 1
};
this.setState({
paymentDialog: {

View File

@ -0,0 +1,27 @@
import { WeaLocaleProvider } from "ecCom";
import { Modal } from "antd";
const { getLabel } = WeaLocaleProvider;
export const confirmDialog = (type, callback) => {
let content = "";
switch (type) {
case "refresh":
content = getLabel(111, "刷新数据会重新从核算数据中取值,申报界面新增、编辑的数据会被全部覆盖,是否确认刷新?");
break;
case "correct":
content = getLabel(111, "更正申报,当申报成功后,发现有错报、漏报的情况,可使用更正申报,更正申报成功时,企业状态会变成未申报");
break;
case "cancel":
content = getLabel(111, "申报作废,只有申报成功,无需缴款/申报成功,未缴款的状态才能作废,当作废成功时,企业状态会变成未申报;当作废失败时,企业状态还是原来的未缴款或无需缴款的状态。");
break;
case "declare":
content = getLabel(111, "解除劳动合同一次性补偿金、全年一次性奖金所得,不能单独申报,需要同正常工资薪金一起申报;解除劳动合同一次性补偿金、稿酬所得,由于税务规则需要,解除劳动合同一次性补偿金、稿酬所得必须填写免税附表。是否确认申报?");
break;
default:
break;
}
return Modal.confirm({
title: getLabel(131329, "信息确认"), content,
onOk: callback
});
};

View File

@ -31,6 +31,7 @@ import { convertToUrlString, getQueryString } from "../../util/url";
import IncomeTaxDeclarationPersonnelSlide from "./components/incomeTaxDeclarationPersonnelSlide";
import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDialog";
import TabEditDialog from "./components/tabEditDialog";
import { confirmDialog } from "./confirm";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -232,7 +233,7 @@ class Index extends Component {
const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth
taxAgentId, taxYearMonth: taxYearMonth + "-01"
};
this.setState({ loading: { ...this.state.loading, refreshingPay: true } });
taxPaymentVoucherStatusSync(payload).then(({ status, errormsg }) => {
@ -249,7 +250,7 @@ class Index extends Component {
const { taxAgentId, taxCycle: taxYearMonth } = this.state.declareInfo;
const payload = {
taxDeclareRecordId: getQueryString("id"),
taxAgentId, taxYearMonth
taxAgentId, taxYearMonth: taxYearMonth + "-01"
};
this.setState({ loading: { ...this.state.loading, issuance: true } });
taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {
@ -282,13 +283,9 @@ class Index extends Component {
message.destroy();
message.loading(getLabel(111, "下载中..."), 0);
exportGetDeclareTaxResultFeedback({ id: getQueryString("id") })
.then(async ({ status, errormsg }) => {
.then(async () => {
message.destroy();
if (status) {
message.success(getLabel(111, "下载成功!"));
} else {
message.error(errormsg || getLabel(111, "下载失败!"));
}
message.success(getLabel(111, "下载成功!"));
}).catch(() => {
message.destroy();
message.error(getLabel(111, "下载失败!"));
@ -328,9 +325,9 @@ class Index extends Component {
const [__, taxDeclarationId] = selectedKey.split("%%");
let btns = [
<Button type="primary" onClick={this.export}>{getLabel(17416, "导出")}</Button>,
<Button type="ghost" onClick={() => this.handleOperateDeclare("declare")}
<Button type="ghost" onClick={() => confirmDialog("declare", () => this.handleOperateDeclare("declare"))}
loading={loading.declare}>{getLabel(111, "在线申报")}</Button>,
<Button type="ghost" onClick={() => this.handleOperateDeclare("refresh")}
<Button type="ghost" onClick={() => confirmDialog("refresh", () => this.handleOperateDeclare("refresh"))}
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>
];
//申报状态:作废中
@ -346,24 +343,24 @@ class Index extends Component {
//申报状态:已缴款
declareInfo.declareStatus === "DECLARE_SUCCESS_PAID" && (btns.splice(1, 2,
<Button type="ghost" loading={loading.correct}
onClick={() => this.handleOperateDeclare("correct")}>{getLabel(111, "更正申报")}</Button>));
onClick={() => confirmDialog("correct", () => 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>,
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct"))}>{getLabel(111, "更正申报")}</Button>,
<Button type="ghost"
loading={loading.cancel}
onClick={() => this.handleOperateDeclare("cancel")}>{getLabel(111, "作废申报")}</Button>
onClick={() => confirmDialog("cancel", () => 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>,
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct"))}>{getLabel(111, "更正申报")}</Button>,
<Button type="ghost"
loading={loading.cancel}
onClick={() => this.handleOperateDeclare("cancel")}>{getLabel(111, "作废申报")}</Button>,
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel"))}>{getLabel(111, "作废申报")}</Button>,
<Button type="ghost"
loading={loading.refreshingPay}
onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>

View File

@ -31,7 +31,7 @@ class Index extends Component {
const payload = {
taxDeclareRecordId: getQueryString("taxDeclareRecordId"),
taxAgentId: getQueryString("taxAgentId"),
taxYearMonth: getQueryString("taxYearMonth")
taxYearMonth: getQueryString("taxYearMonth") + "-01"
};
this.setState({ loading: true });
taxPaymentWithheldVoucherGet(payload).then(({ status, data, errormsg }) => {

View File

@ -18,7 +18,8 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
selectedKey: "1", salaryYearMonth: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")]
selectedKey: "1",
salaryYearMonth: [moment().startOf("year").format("YYYY-MM"), moment().endOf("year").format("YYYY-MM")]
};
}

View File

@ -29,7 +29,7 @@ class Index extends Component {
salarySobId: "", name: "",
dateRange: [
moment(new Date()).startOf("year").format("YYYY-MM"),
moment(new Date()).startOf("month").format("YYYY-MM")
moment(new Date()).endOf("year").format("YYYY-MM")
]
}
};