feature/2.9.42309.01-个税-数据采集累计专项附加扣除个税在线获取
This commit is contained in:
parent
d330b0b40e
commit
b68578e82b
|
|
@ -11,8 +11,13 @@ import { Button, message } from "antd";
|
|||
import { getSearchs } from "../../../../util";
|
||||
import { cumTaxPeriodCondition } from "../columns";
|
||||
import { onlineRequest } from "../../../../apis/cumDeduct";
|
||||
import { onlineActualAddUpAdvanceTax } from "../../../../apis/cumSituation";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const APIFox = {
|
||||
online: onlineRequest,
|
||||
advance: onlineActualAddUpAdvanceTax
|
||||
};
|
||||
|
||||
@inject("cumDeductStore")
|
||||
@observer
|
||||
|
|
@ -36,12 +41,12 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
}
|
||||
|
||||
save = () => {
|
||||
const { cumDeductStore: { cumTaxPeriodForm } } = this.props;
|
||||
const { cumDeductStore: { cumTaxPeriodForm }, type } = this.props;
|
||||
cumTaxPeriodForm.validateForm().then(f => {
|
||||
const { declareMonth } = cumTaxPeriodForm.getFormParams();
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
onlineRequest({ declareMonth: declareMonth + "-01" }).then(({ status, errormsg }) => {
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01" }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import {
|
|||
importCumDeductPreview,
|
||||
onlineFeedback
|
||||
} from "../../../apis/cumDeduct";
|
||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
import DataTables from "../dataTables";
|
||||
import AddItems from "../addItems";
|
||||
import ImportFormCom from "./components/importFormCom";
|
||||
|
|
@ -68,9 +69,10 @@ class Index extends Component {
|
|||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: ""
|
||||
visible: false, title: "", type: ""
|
||||
},
|
||||
feedbackLoading: false
|
||||
feedbackLoading: false,
|
||||
incomeTaxStatus: false
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -79,8 +81,14 @@ class Index extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.getAdvanceCondition();
|
||||
this.apiflowBillingConfigStatus();
|
||||
}
|
||||
|
||||
apiflowBillingConfigStatus = () => {
|
||||
apiflowBillingConfigStatus().then(({ status, data }) => {
|
||||
this.setState({ incomeTaxStatus: status && data });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:一键累计
|
||||
|
|
@ -399,8 +407,8 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getTopBtns = () => {
|
||||
const { addAllLoading } = this.state;
|
||||
return [
|
||||
const { addAllLoading, cumTaxPeriodDialog, feedbackLoading, incomeTaxStatus } = this.state;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
<Button type="ghost" loading={addAllLoading} onClick={this.autoAddAll}>一键累计</Button>,
|
||||
|
|
@ -417,6 +425,18 @@ class Index extends Component {
|
|||
<Button type="ghost">更多</Button>
|
||||
</Dropdown>
|
||||
];
|
||||
const incomeTaxBtns = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
cumTaxPeriodDialog: {
|
||||
...cumTaxPeriodDialog,
|
||||
visible: true, type: "online",
|
||||
title: getLabel(542240, "税款所属期")
|
||||
}
|
||||
})}>{getLabel(111, "在线获取")}</Button>,
|
||||
<Button type="ghost" onClick={this.onlineFeedback}
|
||||
loading={feedbackLoading}>{getLabel(111, "查询在线获取结果")}</Button>
|
||||
];
|
||||
return incomeTaxStatus ? [...incomeTaxBtns, ...commonBtns] : commonBtns;
|
||||
};
|
||||
handleDataMenuClick = ({ key: keyFunc }) => this[keyFunc]();
|
||||
/*
|
||||
|
|
@ -533,7 +553,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType, cumTaxPeriodDialog, feedbackLoading
|
||||
importPayload, exportPayloadType, cumTaxPeriodDialog
|
||||
} = this.state;
|
||||
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
|
||||
return (
|
||||
|
|
@ -547,17 +567,6 @@ class Index extends Component {
|
|||
importPayload={importPayload} onImportFile={this.handleImportFile}
|
||||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
columns={modalColumns}
|
||||
tabBtns={[
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
cumTaxPeriodDialog: {
|
||||
...cumTaxPeriodDialog,
|
||||
visible: true,
|
||||
title: getLabel(542240, "税款所属期")
|
||||
}
|
||||
})}>{getLabel(111, "在线获取")}</Button>,
|
||||
<Button type="ghost" onClick={this.onlineFeedback}
|
||||
loading={feedbackLoading}>{getLabel(111, "查询在线获取结果")}</Button>
|
||||
]}
|
||||
>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
|
|
@ -571,7 +580,7 @@ class Index extends Component {
|
|||
<SalaryCumDeductChooseTaxPeriodDialog
|
||||
{...cumTaxPeriodDialog}
|
||||
onCancel={() => this.setState({
|
||||
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "" }
|
||||
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
|
||||
})}
|
||||
/>
|
||||
</Layout>
|
||||
|
|
|
|||
|
|
@ -108,66 +108,68 @@ export const dataCollectCondition = [
|
|||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpChildEducation"],
|
||||
fieldcol: 14,
|
||||
label: "累计子女教育",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpContinuingEducation"],
|
||||
fieldcol: 14,
|
||||
label: "累计继续教育",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpHousingLoanInterest"],
|
||||
fieldcol: 14,
|
||||
label: "累计住房贷款利息",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpHousingRent"],
|
||||
fieldcol: 14,
|
||||
label: "累计住房租金",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpSupportElderly"],
|
||||
fieldcol: 14,
|
||||
label: "累计赡养老人",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpIllnessMedical"],
|
||||
fieldcol: 14,
|
||||
label: "累计大病医疗",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
// domkey: ["addUpChildEducation"],
|
||||
// fieldcol: 14,
|
||||
// label: "累计子女教育",
|
||||
// labelcol: 8,
|
||||
// value: "",
|
||||
// precision: 2,
|
||||
// viewAttr: 2
|
||||
// },
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
// domkey: ["addUpContinuingEducation"],
|
||||
// fieldcol: 14,
|
||||
// label: "累计继续教育",
|
||||
// labelcol: 8,
|
||||
// value: "",
|
||||
// precision: 2,
|
||||
// viewAttr: 2
|
||||
// },
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
// domkey: ["addUpHousingLoanInterest"],
|
||||
// fieldcol: 14,
|
||||
// label: "累计住房贷款利息",
|
||||
// labelcol: 8,
|
||||
// value: "",
|
||||
// precision: 2,
|
||||
// viewAttr: 2
|
||||
// },
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
// domkey: ["addUpHousingRent"],
|
||||
// fieldcol: 14,
|
||||
// label: "累计住房租金",
|
||||
// labelcol: 8,
|
||||
// value: "",
|
||||
// precision: 2,
|
||||
// viewAttr: 2
|
||||
// },
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
// domkey: ["addUpSupportElderly"],
|
||||
// fieldcol: 14,
|
||||
// label: "累计赡养老人",
|
||||
// labelcol: 8,
|
||||
// value: "",
|
||||
// precision: 2,
|
||||
// viewAttr: 2
|
||||
// },
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
// domkey: ["addUpIllnessMedical"],
|
||||
// fieldcol: 14,
|
||||
// label: "累计大病医疗",
|
||||
// labelcol: 8,
|
||||
// value: "",
|
||||
// precision: 2,
|
||||
// viewAttr: 2
|
||||
// },
|
||||
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpEnterpriseAndOther"],
|
||||
|
|
@ -230,14 +232,47 @@ export const dataCollectCondition = [
|
|||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpInfantCare"],
|
||||
domkey: ["actualAddUpAdvanceTax"],
|
||||
fieldcol: 14,
|
||||
label: "累计婴幼儿照护",
|
||||
label: "实际累计已预扣预缴税额",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["taxAdjustment"],
|
||||
fieldcol: 14,
|
||||
label: "个税调差",
|
||||
helpfulTitle: "1、【个税调差】=【实际累计已预扣预缴税额】-【累计已预扣预缴税额】。\n" +
|
||||
"2、直接输入或导入【个税调差】值,则以输入/导入为准,公式失效。再次编辑减数或被减数,会再次按公式自动计算。",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["addUpTaxableIncome"],
|
||||
fieldcol: 14,
|
||||
label: "累计应纳税所得额",
|
||||
labelcol: 8,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
|
||||
// {
|
||||
// conditionType: "INPUTNUMBER",
|
||||
// domkey: ["addUpInfantCare"],
|
||||
// fieldcol: 14,
|
||||
// label: "累计婴幼儿照护",
|
||||
// labelcol: 8,
|
||||
// value: "",
|
||||
// precision: 2,
|
||||
// viewAttr: 2
|
||||
// }
|
||||
],
|
||||
title: "数据采集",
|
||||
defaultshow: true
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLoadingGlobal, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import {
|
||||
createAddUpSituation,
|
||||
|
|
@ -16,9 +16,9 @@ import {
|
|||
getAddUpSituation,
|
||||
getCumSituationSaCondition,
|
||||
importCumSituationParam,
|
||||
importCumSituationPreview,
|
||||
onlineActualAddUpAdvanceTax
|
||||
importCumSituationPreview
|
||||
} from "../../../apis/cumSituation";
|
||||
import { apiflowBillingConfigStatus } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import DataTables from "../dataTables";
|
||||
import Layout from "../layout";
|
||||
|
|
@ -30,6 +30,7 @@ import AddItems from "../addItems";
|
|||
import TableRecord from "../components/tableRecord";
|
||||
import { situationModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -64,7 +65,11 @@ class Index extends Component {
|
|||
},
|
||||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null
|
||||
advanceCondition: null,
|
||||
incomeTaxStatus: false,
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: "", type: ""
|
||||
}
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -73,8 +78,14 @@ class Index extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.getAdvanceCondition();
|
||||
this.apiflowBillingConfigStatus();
|
||||
}
|
||||
|
||||
apiflowBillingConfigStatus = () => {
|
||||
apiflowBillingConfigStatus().then(({ status, data }) => {
|
||||
this.setState({ incomeTaxStatus: status && data });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 高级搜素框-表单项
|
||||
|
|
@ -322,23 +333,12 @@ class Index extends Component {
|
|||
});
|
||||
};
|
||||
onlineActualAddUpAdvanceTax = () => {
|
||||
const { declareMonth, year } = this.state;
|
||||
const payload = {
|
||||
declareMonth: year + "-" + declareMonth + "-01"
|
||||
};
|
||||
WeaLoadingGlobal.start();
|
||||
onlineActualAddUpAdvanceTax(payload).then(({ status, errormsg }) => {
|
||||
WeaLoadingGlobal.end();
|
||||
WeaLoadingGlobal.destroy();
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.tableRef.getTableDate();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
this.setState({
|
||||
cumTaxPeriodDialog: {
|
||||
...this.state.cumTaxPeriodDialog,
|
||||
visible: true, type: "advance",
|
||||
title: getLabel(542240, "税款所属期")
|
||||
}
|
||||
}).catch(() => {
|
||||
WeaLoadingGlobal.end();
|
||||
WeaLoadingGlobal.destroy();
|
||||
});
|
||||
};
|
||||
/*
|
||||
|
|
@ -348,8 +348,8 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getTopBtns = () => {
|
||||
const { addAllLoading } = this.state;
|
||||
return [
|
||||
const { addAllLoading, incomeTaxStatus } = this.state;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
<Button type="ghost" onClick={this.handleOnlineAccess}>{getLabel(111, "在线获取")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
|
|
@ -366,6 +366,7 @@ class Index extends Component {
|
|||
<Button type="ghost">更多</Button>
|
||||
</Dropdown>
|
||||
];
|
||||
return incomeTaxStatus ? commonBtns : _.filter(commonBtns, (__, index) => index !== 1);
|
||||
};
|
||||
handleDataMenuClick = ({ key: keyFunc }) => this[keyFunc]();
|
||||
/*
|
||||
|
|
@ -554,7 +555,7 @@ class Index extends Component {
|
|||
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, year, exportPayloadType
|
||||
importPayload, year, exportPayloadType, cumTaxPeriodDialog
|
||||
} = this.state;
|
||||
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
|
||||
return (
|
||||
|
|
@ -570,6 +571,12 @@ class Index extends Component {
|
|||
onPreviewImport={this.handlePreviewImport} detailOptBtns={this.getDetailOptBtns()}
|
||||
columns={situationModalColumns}
|
||||
>
|
||||
<SalaryCumDeductChooseTaxPeriodDialog
|
||||
{...cumTaxPeriodDialog}
|
||||
onCancel={() => this.setState({
|
||||
cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
|
||||
})}
|
||||
/>
|
||||
<DataTables
|
||||
ref={dom => this.tableRef = dom}
|
||||
url="/api/bs/hrmsalary/addUpSituation/list"
|
||||
|
|
|
|||
Loading…
Reference in New Issue