产品-个税对接
This commit is contained in:
parent
2c8ce14def
commit
d41687c3fb
|
|
@ -122,5 +122,10 @@ export const hasIconInTax = (params) => {
|
|||
};
|
||||
//获取报税信息表单
|
||||
export const taxReturnGetForm = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxReturn/getForm", "GET", params);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/taxReturn/getForm", "GET", params);
|
||||
};
|
||||
|
||||
//个税信息-保存并验证报税信息
|
||||
export const saveAndCheck = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxAgent/taxReturn/saveAndCheck", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message } from "antd";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions";
|
||||
|
|
@ -122,7 +122,24 @@ class TaxAgentSlide extends Component {
|
|||
});
|
||||
};
|
||||
handleSaveAndVerify = () => {
|
||||
console.log(this.taxInfoRef);
|
||||
const { taxAgentId } = this.state;
|
||||
const { fieldForm, fieldItem } = this.taxInfoRef.state;
|
||||
const { city: cityVal, ...extra } = fieldForm;
|
||||
const boolean = _.every(_.filter(fieldItem, item => item.viewAttr === 3), it => fieldForm[it.key]);
|
||||
if (!boolean) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const [nation, province, city] = cityVal ? cityVal.split("-") : [];
|
||||
// requestType: 1:保存并验证 2:保存
|
||||
const payload = {
|
||||
...extra, nation, province, city,
|
||||
taxAgentId, requestType: 1
|
||||
};
|
||||
console.log(_.omitBy(payload, val => _.isNil(val)));
|
||||
};
|
||||
renderChildren = () => {
|
||||
const { current, taxAgentId } = this.state;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,18 @@ class TaxDeclarationInfo extends Component {
|
|||
|
||||
taxReturnGetForm = () => {
|
||||
const { taxAgentId } = this.props;
|
||||
taxReturnGetForm({ taxAgentId }).then((status, data) => {
|
||||
console.log(data);
|
||||
taxReturnGetForm({ taxAgentId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { fieldForm } = this.state;
|
||||
this.setState({
|
||||
fieldForm: {
|
||||
...fieldForm,
|
||||
..._.reduce(_.keys(fieldForm), (pre, cur) => {
|
||||
return { ...pre, [cur]: data[cur] };
|
||||
}, {})
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChangeValue = (key, value) => {
|
||||
|
|
@ -88,7 +98,14 @@ class TaxDeclarationInfo extends Component {
|
|||
{
|
||||
type === "SELECT" &&
|
||||
<WeaBrowser value={fieldForm[key]} type={58} viewAttr={viewAttr}
|
||||
onChange={(v) => this.handleChangeValue(key, v)}/>
|
||||
onChange={(__, ___, datas) => {
|
||||
if (!_.isEmpty(datas)) {
|
||||
this.handleChangeValue(key, `1-${datas[0].pid}-${datas[0].id}`);
|
||||
} else {
|
||||
this.handleChangeValue(key, "");
|
||||
}
|
||||
}}
|
||||
/>
|
||||
}
|
||||
{
|
||||
type === "RADIO" &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue