hotfix/2.9.42309.01-个税

This commit is contained in:
黎永顺 2023-10-10 14:17:37 +08:00
parent f3e1e1e166
commit 71cdd6da50
7 changed files with 169 additions and 24 deletions

View File

@ -137,3 +137,7 @@ export const taxReturnGetForm = (params) => {
export const saveAndCheck = (params) => {
return postFetch("/api/bs/hrmsalary/taxAgent/taxReturn/saveAndCheck", params);
};
//个税信息-提交报税信息
export const registrationCheck = (params) => {
return postFetch("/api/bs/hrmsalary/taxAgent/taxReturn/registration/check", params);
};

View File

@ -82,7 +82,7 @@ export const fieldList = [
viewAttr: 1
},
{
key: "taxInforVerifiyStatus",
key: "checkStatus",
label: "报税信息验证状态",
lanId: 111,
type: "TEXT",
@ -110,7 +110,7 @@ export const taxFillCondition = [
domkey: ["taxRegistrationNumber"],
fieldcol: 14,
label: "登记序号",
lanId: 111,
lanId: 545138,
labelcol: 6,
value: "",
viewAttr: 1
@ -121,7 +121,7 @@ export const taxFillCondition = [
domkey: ["taxpayerStatus"],
fieldcol: 14,
label: "纳税人状态",
lanId: 111,
lanId: 545139,
labelcol: 6,
value: "",
viewAttr: 1
@ -132,7 +132,7 @@ export const taxFillCondition = [
domkey: ["legalPersonName"],
fieldcol: 14,
label: "法人姓名",
lanId: 111,
lanId: 545140,
labelcol: 6,
value: "",
viewAttr: 1
@ -143,7 +143,7 @@ export const taxFillCondition = [
domkey: ["mobile"],
fieldcol: 14,
label: "联系电话",
lanId: 111,
lanId: 545141,
labelcol: 6,
value: "",
viewAttr: 1
@ -154,7 +154,7 @@ export const taxFillCondition = [
domkey: ["businessAddress"],
fieldcol: 14,
label: "生产经营地址",
lanId: 111,
lanId: 545142,
labelcol: 6,
value: "",
viewAttr: 1
@ -165,7 +165,7 @@ export const taxFillCondition = [
domkey: ["industryName"],
fieldcol: 14,
label: "行业名称",
lanId: 111,
lanId: 545143,
labelcol: 6,
value: "",
viewAttr: 1
@ -176,7 +176,7 @@ export const taxFillCondition = [
domkey: ["taxAuthorities"],
fieldcol: 14,
label: "主管税务机关",
lanId: 111,
lanId: 545144,
labelcol: 6,
value: "",
viewAttr: 1
@ -187,7 +187,7 @@ export const taxFillCondition = [
domkey: ["taxBranch"],
fieldcol: 14,
label: "主管税务科所",
lanId: 111,
lanId: 545145,
labelcol: 6,
value: "",
viewAttr: 1
@ -207,3 +207,57 @@ export const taxFillCondition = [
defaultshow: true
}
];
export const taxFillColumns = [
{
dataIndex: "taxCode",
title: "税号",
titleId: "",
fixed: "left"
},
{
dataIndex: "taxAgentName",
title: "个税扣缴义务人",
titleId: "537996"
},
{
dataIndex: "taxRegistrationNumber",
title: "登记序号",
titleId: "545138"
},
{
dataIndex: "taxpayerStatus",
title: "纳税人状态",
titleId: "545139"
},
{
dataIndex: "taxAuthorities",
title: "主管税务机关",
titleId: "545144"
},
{
dataIndex: "taxBranch",
title: "主管税务科所",
titleId: "545145"
},
{
dataIndex: "businessAddress",
title: "生产经营地址",
titleId: "545142"
},
{
dataIndex: "industryName",
title: "行业名称",
titleId: "545143"
},
{
dataIndex: "legalPersonName",
title: "法人姓名",
titleId: "545140"
},
{
dataIndex: "mobile",
title: "联系电话",
titleId: "545141"
}
];

View File

@ -126,5 +126,10 @@
border-bottom: 1px solid #e5e5e5;
}
}
.wea-new-table {
background: #FFF;
}
}
}

View File

@ -15,6 +15,7 @@ import PersonalScope from "./personalScope";
import TaxDeclarationInfo from "./taxDeclarationInfo";
import TaxFilingInfoDialofg from "./taxFillingInfoDialog";
import * as API from "../../../apis/taxAgent";
import { registrationCheck } from "../../../apis/taxAgent";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -32,8 +33,8 @@ class TaxAgentSlide extends Component {
taxAgentId: "",
taxFilingInfoDialofg: {
visible: false, title: "",
isEdit: false, jumpAll: false,
taxAgentTaxReturnCheckFormDTO: {}
isEdit: false, jumpAll: false, loading: false,
taxAgentTaxReturnCheckFormDTO: null
}
};
this.taxInfoRef = null;
@ -164,7 +165,7 @@ class TaxAgentSlide extends Component {
taxFilingInfoDialofg: {
...taxFilingInfoDialofg, visible: true,
isEdit, jumpAll, title: fieldForm.name,
taxAgentTaxReturnCheckFormDTO: data.TaxAgentTaxReturnCheckFormDTO
taxAgentTaxReturnCheckFormDTO: data.TaxAgentTaxReturnCheckFormDTO || data.table.list
}
});
} else {
@ -232,6 +233,42 @@ class TaxAgentSlide extends Component {
this.setState({ current: Number(current) });
};
handleSubmit = (selectKey) => {
const { taxFilingInfoDialofg, taxAgentId } = this.state;
const { fieldForm } = this.taxInfoRef.state;
const { city: cityStr, cityVal = [], netPassword, realNamePassword, ...extra } = fieldForm;
const [nation, province, city] = cityStr ? cityStr.split("-") : [];
const { taxAgentTaxReturnCheckFormDTO } = taxFilingInfoDialofg;
this.setState({
taxFilingInfoDialofg: { ...taxFilingInfoDialofg, loading: true }
});
registrationCheck({
...extra, nation, province, city,
taxAgentId, password: netPassword || realNamePassword,
cityname: !_.isEmpty(cityVal) ? _.head(cityVal).name : "",
..._.find(taxAgentTaxReturnCheckFormDTO, it => it.index === selectKey)
}).then(({ status, data, errormsg }) => {
this.setState({
taxFilingInfoDialofg: { ...taxFilingInfoDialofg, loading: false }
});
if (status) {
message.success(getLabel(22619, "保存成功!"));
this.setState({
taxFilingInfoDialofg: {
...taxFilingInfoDialofg,
taxAgentTaxReturnCheckFormDTO: data.TaxAgentTaxReturnCheckFormDTO
}
});
} else {
message.error(errormsg || getLabel(22620, "保存失败!"));
}
}).catch(() => {
this.setState({
taxFilingInfoDialofg: { ...taxFilingInfoDialofg, loading: false }
});
});
};
render() {
const tabs = [
{ key: 0, title: getLabel(82751, "基础设置") },
@ -282,13 +319,14 @@ class TaxAgentSlide extends Component {
}
<TaxFilingInfoDialofg
{...taxFilingInfoDialofg}
onSubmit={this.handleSubmit}
onCancel={() => {
const { jumpAll } = taxFilingInfoDialofg;
this.setState({
current: jumpAll ? this.state.current + 1 : this.state.current,
taxFilingInfoDialofg: {
...taxFilingInfoDialofg, visible: false,
taxAgentTaxReturnCheckFormDTO: {}
taxAgentTaxReturnCheckFormDTO: null
}
}, () => jumpAll && this.props.onCancel(true));
}}

View File

@ -27,7 +27,7 @@ class TaxDeclarationInfo extends Component {
netPassword: null,
taxRegistrationNumber: "",
departmentCode: "",
taxInforVerifiyStatus: ""
checkStatus: ""
},
fieldItem: []
};
@ -55,6 +55,14 @@ class TaxDeclarationInfo extends Component {
...fieldForm,
..._.reduce(_.keys(fieldForm), (pre, cur) => {
if (cur !== "city") {
if (cur === "checkStatus") {
const checkStatusMap = {
"NOT_COMMIT": getLabel(111, "未验证"),
"SUCCESS": getLabel(111, "成功"),
"FAIL": getLabel(111, "失败")
};
return { ...pre, [cur]: checkStatusMap[data[cur]] };
}
return { ...pre, [cur]: data[cur] };
}
return {

View File

@ -6,9 +6,9 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaLocaleProvider } from "ecCom";
import { WeaDialog, WeaLocaleProvider, WeaTable } from "ecCom";
import { Button } from "antd";
import { taxFillCondition } from "./constants";
import { taxFillColumns, taxFillCondition } from "./constants";
import { getSearchs } from "../../../util";
const { getLabel } = WeaLocaleProvider;
@ -16,9 +16,17 @@ const { getLabel } = WeaLocaleProvider;
@inject("taxAgentStore")
@observer
class TaxFilingInfoDialofg extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowKeys: []
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible && !_.isEmpty(nextProps.taxAgentTaxReturnCheckFormDTO)) {
if (!_.isEmpty(nextProps.taxAgentTaxReturnCheckFormDTO) &&
Object.prototype.toString.call(nextProps.taxAgentTaxReturnCheckFormDTO) === "[object Object]"
) {
const { taxAgentTaxReturnCheckFormDTO, taxAgentStore: { taxfillInfoForm } } = nextProps;
taxfillInfoForm.initFormFields(taxFillCondition);
const fields = _.map(taxFillCondition[0].items, it => {
@ -30,20 +38,36 @@ class TaxFilingInfoDialofg extends Component {
});
});
}
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
const { taxAgentStore: { setTaxfillInfoForm } } = nextProps;
setTaxfillInfoForm();
}
}
render() {
const { taxAgentStore: { taxfillInfoForm } } = this.props;
const { selectedRowKeys } = this.state;
const { taxAgentStore: { taxfillInfoForm }, taxAgentTaxReturnCheckFormDTO, loading } = this.props;
const rowSelection = {
type: "radio",
selectedRowKeys,
onChange: selectedRowKeys => this.setState({ selectedRowKeys })
};
return (
<WeaDialog
{...this.props}
hasScroll className="taxfillingDialog" initLoadCss
buttons={[
<Button type="primary" onClick={this.props.onCancel}>{getLabel(111, "知道了")}</Button>
]}
buttons={
Object.prototype.toString.call(taxAgentTaxReturnCheckFormDTO) === "[object Object]" ?
[
<Button type="primary" onClick={this.props.onCancel}>{getLabel(545147, "知道了")}</Button>
] : [
<Button loading={loading} type="primary"
onClick={() => !_.isEmpty(selectedRowKeys) && this.props.onSubmit(selectedRowKeys[0])}>{getLabel(725, "提交")}</Button>
]
}
style={{
width: 850,
height: 606.6,
height: 480,
minHeight: 200,
minWidth: 380,
maxHeight: "50%",
@ -53,7 +77,19 @@ class TaxFilingInfoDialofg extends Component {
}}
>
<div className="taxfillingDialogContent">
{getSearchs(taxfillInfoForm, taxFillCondition, 1)}
{
Object.prototype.toString.call(taxAgentTaxReturnCheckFormDTO) === "[object Object]" ?
getSearchs(taxfillInfoForm, taxFillCondition, 1) :
<WeaTable
rowKey="index" dataSource={taxAgentTaxReturnCheckFormDTO}
columns={_.map(taxFillColumns, o => ({
dataIndex: o.dataIndex,
width: 200,
title: getLabel(o.titleId, o.title)
}))}
scroll={{ x: 1200 }} rowSelection={rowSelection}
/>
}
</div>
</WeaDialog>
);

View File

@ -10,7 +10,7 @@ const { TableStore } = WeaTableNew;
export class TaxAgentStore {
@observable salarytaxAgentForm = new WeaForm(); //新版个税扣缴义务人表单实体
@observable taxfillInfoForm = new WeaForm(); //报税信息查看form
@action setTaxfillInfoForm = () => this.taxfillInfoForm = new WeaForm(); //报税信息form初始化
@observable tableStore = new TableStore(); // new table