diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog.js
index e6a6c7e2..7e0c76f4 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog.js
@@ -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, "获取成功!"));
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index b4da4981..0fb0136e 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -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 = [
,
,
,
@@ -417,6 +425,18 @@ class Index extends Component {
];
+ const incomeTaxBtns = [
+ ,
+
+ ];
+ 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={[
- ,
-
- ]}
>
this.tableRef = dom}
@@ -571,7 +580,7 @@ class Index extends Component {
this.setState({
- cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "" }
+ cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
})}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js
index ae006af6..7ebb597d 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js
@@ -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
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
index 0efccee6..e4975825 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
@@ -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 = [
,
,
,
@@ -366,6 +366,7 @@ class Index extends Component {
];
+ 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}
>
+ this.setState({
+ cumTaxPeriodDialog: { ...cumTaxPeriodDialog, visible: false, title: "", type: "" }
+ })}
+ />
this.tableRef = dom}
url="/api/bs/hrmsalary/addUpSituation/list"