release/2.14.3.2406.01-个税
This commit is contained in:
parent
1935a552df
commit
037ab5b12f
|
|
@ -550,6 +550,17 @@ export const cumTaxPeriodCondition = [
|
|||
value: "",
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
},{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
multiple: true,
|
||||
fieldcol: 18,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { toJS } from "mobx";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { cumTaxPeriodCondition } from "../columns";
|
||||
|
|
@ -14,6 +15,7 @@ import { onlineRequest } from "../../../../apis/cumDeduct";
|
|||
import { onlineActualAddUpAdvanceTax } from "../../../../apis/cumSituation";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
const APIFox = {
|
||||
online: onlineRequest,
|
||||
advance: onlineActualAddUpAdvanceTax
|
||||
|
|
@ -25,13 +27,23 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false
|
||||
loading: false, conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { cumDeductStore: { cumTaxPeriodForm, changeCumTaxPeriodForm } } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
conditions: _.map(cumTaxPeriodCondition, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return { ...o, lable: getLabel(o.lanId, o.label), options: toJS(nextProps.taxAgentOption) };
|
||||
}
|
||||
return { ...o, lable: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
}))
|
||||
});
|
||||
cumTaxPeriodForm.initFormFields(cumTaxPeriodCondition);
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
|
|
@ -43,18 +55,19 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
save = () => {
|
||||
const { cumDeductStore: { cumTaxPeriodForm }, type } = this.props;
|
||||
cumTaxPeriodForm.validateForm().then(f => {
|
||||
const { declareMonth } = cumTaxPeriodForm.getFormParams();
|
||||
const { declareMonth, taxAgentIds } = cumTaxPeriodForm.getFormParams();
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01" }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
APIFox[type]({ declareMonth: declareMonth + "-01", taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [] })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "获取成功!"));
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
|
|
@ -62,17 +75,17 @@ class SalaryCumDeductChooseTaxPeriodDialog extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { loading } = this.state;
|
||||
const { loading, conditions } = this.state;
|
||||
const { cumDeductStore: { cumTaxPeriodForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog" initLoadCss
|
||||
{...this.props} className="paymentDialog mulSelectDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
buttons={[<Button type="primary" loading={loading} onClick={this.save}>{getLabel(33703, "确认")}</Button>]}
|
||||
bottomLeft={getLabel(111, "点击保存后,稍后请点击【获取结果下载】下载获取结果。获取的数据将覆盖列表原本数据(有则覆盖无则新增)。")}
|
||||
>
|
||||
<div className="paymentDialogContent">
|
||||
{getSearchs(cumTaxPeriodForm, cumTaxPeriodCondition, 1, false)}
|
||||
{getSearchs(cumTaxPeriodForm, conditions, 1, false)}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class Index extends Component {
|
|||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
cumTaxPeriodDialog: {
|
||||
visible: false, title: "", type: ""
|
||||
visible: false, title: "", type: "", taxAgentOption: []
|
||||
},
|
||||
feedbackLoading: false,
|
||||
incomeTaxStatus: false,
|
||||
|
|
@ -401,6 +401,7 @@ class Index extends Component {
|
|||
*/
|
||||
getTopBtns = () => {
|
||||
const { addAllLoading, cumTaxPeriodDialog, feedbackLoading, incomeTaxStatus } = this.state;
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const commonBtns = [
|
||||
<Button type="primary" onClick={this.handleOpenImport}>导入</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleAddData()}>新建</Button>,
|
||||
|
|
@ -421,7 +422,7 @@ class Index extends Component {
|
|||
const incomeTaxBtns = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
cumTaxPeriodDialog: {
|
||||
...cumTaxPeriodDialog,
|
||||
...cumTaxPeriodDialog, taxAgentOption,
|
||||
visible: true, type: "online",
|
||||
title: getLabel(542240, "税款所属期")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,6 +232,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.mulSelectDialog {
|
||||
.wea-form-item .wea-form-item-wrapper {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.incomeTaxDecPerSlideWrapper {
|
||||
.wea-slide-modal-content {
|
||||
background: #f6f6f6;
|
||||
|
|
|
|||
Loading…
Reference in New Issue