custom/钱智
This commit is contained in:
parent
72adc68307
commit
e45b4bbb40
|
|
@ -314,4 +314,12 @@ export const getAfterTaxAccountingProgress = (id) => {
|
|||
// 批量计算薪资-钱智
|
||||
export const batAccounting = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/batAccounting", params);
|
||||
};
|
||||
//批量在线算税-钱智
|
||||
export const batCalcTax = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/batCalcTax", params);
|
||||
};
|
||||
//批量获取算税结果-钱智
|
||||
export const batCalcTaxFeedback = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/batCalcTaxFeedback", params);
|
||||
};
|
||||
|
|
@ -15,7 +15,15 @@ import CalculateTablelist from "./components/calculateTablelist";
|
|||
import CalculateDialog from "./components/calculateDialog";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { backCalculate, batAccounting, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
||||
import {
|
||||
backCalculate,
|
||||
batAccounting,
|
||||
batCalcTax,
|
||||
batCalcTaxFeedback,
|
||||
deleteSalaryacct,
|
||||
fileSalaryAcct,
|
||||
reAccounting
|
||||
} from "../../apis/calculate";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { queryConditions } from "./config";
|
||||
import { postFetch } from "../../util/request";
|
||||
|
|
@ -41,7 +49,7 @@ class Calculate extends Component {
|
|||
}, isRefresh: false, logDialogVisible: false, conditions: [],
|
||||
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||
calcDaialog: { visible: false, title: "" }, showAdvance: false, selectedRowKeys: [],
|
||||
loading: false
|
||||
loading: { acct: false, tax: false, feedback: false }
|
||||
};
|
||||
this.timer = null;
|
||||
this.handleDebounce = null;
|
||||
|
|
@ -73,21 +81,51 @@ class Calculate extends Component {
|
|||
title: getLabel(538780, "核算")
|
||||
}
|
||||
})}>{getLabel(538780, "核算")}</Button>,
|
||||
<Button type="ghost" loading={loading} disabled={_.isEmpty(selectedRowKeys)}
|
||||
<Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>,
|
||||
<Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatCalcTax}>{getLabel(111, "批量在线算税")}</Button>,
|
||||
<Button type="ghost" loading={loading.feedback} disabled={_.isEmpty(selectedRowKeys)}
|
||||
onClick={this.handleBatCalcTaxFeedback}>{getLabel(111, "批量获取算税结果")}</Button>,
|
||||
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||
onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
queryParams: { ...queryParams, ...v }
|
||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||
];
|
||||
return !admin ? calculateOpts.slice(2) : calculateOpts;
|
||||
return !admin ? calculateOpts.slice(4) : calculateOpts;
|
||||
};
|
||||
handleBatCalcTax = () => {
|
||||
const { selectedRowKeys: salaryAcctRecordIds, isRefresh, loading } = this.state;
|
||||
this.setState({ loading: { ...loading, tax: true } });
|
||||
batCalcTax({ salaryAcctRecordIds }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...loading, tax: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ isRefresh: !isRefresh });
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
handleBatCalcTaxFeedback = () => {
|
||||
const { selectedRowKeys: salaryAcctRecordIds, isRefresh, loading } = this.state;
|
||||
this.setState({ loading: { ...loading, feedback: true } });
|
||||
batCalcTaxFeedback({ salaryAcctRecordIds }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...loading, feedback: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ isRefresh: !isRefresh });
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
handleBatAccounting = () => {
|
||||
const { selectedRowKeys: salaryAcctRecordIds, isRefresh } = this.state;
|
||||
this.setState({ loading: true });
|
||||
const { selectedRowKeys: salaryAcctRecordIds, isRefresh, loading } = this.state;
|
||||
this.setState({ loading: { ...loading, acct: true } });
|
||||
batAccounting({ salaryAcctRecordIds }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
this.setState({ loading: { ...loading, acct: false } });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.setState({ isRefresh: !isRefresh });
|
||||
|
|
|
|||
Loading…
Reference in New Issue