数据采集接口联调
This commit is contained in:
parent
d4ecfb3a1e
commit
8a964d7e40
|
|
@ -117,3 +117,7 @@ export const deleteSelectAddUpSituation = (params) => {
|
||||||
export const deleteAllAddUpSituation = (params) => {
|
export const deleteAllAddUpSituation = (params) => {
|
||||||
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params);
|
return postFetch('/api/bs/hrmsalary/addUpSituation/deleteAllAddUpSituation', params);
|
||||||
}
|
}
|
||||||
|
//查看信息
|
||||||
|
export const getAddUpSituation = (params) => {
|
||||||
|
return postFetch('/api/bs/hrmsalary/addUpSituation/getAddUpSituation', params);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class AddItems extends Component {
|
||||||
taxAgentName: "",
|
taxAgentName: "",
|
||||||
employeeId: "",
|
employeeId: "",
|
||||||
employeeName: "",
|
employeeName: "",
|
||||||
personArea: "",
|
personArea: "ORGANIZATION",
|
||||||
username: "",
|
username: "",
|
||||||
idcard: ""
|
idcard: ""
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +94,7 @@ class AddItems extends Component {
|
||||||
{
|
{
|
||||||
com: PickDate({
|
com: PickDate({
|
||||||
label: "税款所属期",
|
label: "税款所属期",
|
||||||
viewAttr: 3,
|
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||||
labelCol: { span: 6 },
|
labelCol: { span: 6 },
|
||||||
wrapperCol: { span: 18 },
|
wrapperCol: { span: 18 },
|
||||||
format: "YYYY-MM",
|
format: "YYYY-MM",
|
||||||
|
|
@ -107,7 +107,7 @@ class AddItems extends Component {
|
||||||
{
|
{
|
||||||
com: Select({
|
com: Select({
|
||||||
label: "个税扣缴义务人",
|
label: "个税扣缴义务人",
|
||||||
viewAttr: 3,
|
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||||
options: taxAgentOption,
|
options: taxAgentOption,
|
||||||
value: baseInfo.taxAgentId,
|
value: baseInfo.taxAgentId,
|
||||||
onChange: (data) => {
|
onChange: (data) => {
|
||||||
|
|
@ -118,7 +118,7 @@ class AddItems extends Component {
|
||||||
{
|
{
|
||||||
com: Select({
|
com: Select({
|
||||||
label: "人员范围",
|
label: "人员范围",
|
||||||
viewAttr: 3,
|
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||||
options: [
|
options: [
|
||||||
{ key: "ORGANIZATION", showname: "内部人员" }
|
{ key: "ORGANIZATION", showname: "内部人员" }
|
||||||
// { key: "EXT_EMPLOYEE", showname: "非系统人员" }
|
// { key: "EXT_EMPLOYEE", showname: "非系统人员" }
|
||||||
|
|
@ -133,7 +133,9 @@ class AddItems extends Component {
|
||||||
const insider = [{
|
const insider = [{
|
||||||
com: Browser({
|
com: Browser({
|
||||||
label: "人员",
|
label: "人员",
|
||||||
viewAttr: 3,
|
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||||
|
value: baseInfo.employeeId,
|
||||||
|
valueSpan: baseInfo.employeeName,
|
||||||
onChange: ({ids, names}) => {
|
onChange: ({ids, names}) => {
|
||||||
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,8 +159,8 @@ export default class Attendance extends React.Component {
|
||||||
handleFinish() {
|
handleFinish() {
|
||||||
this.setState({ modalVisiable: false });
|
this.setState({ modalVisiable: false });
|
||||||
const { attendanceStore: { getAttendanceList, step } } = this.props;
|
const { attendanceStore: { getAttendanceList, step } } = this.props;
|
||||||
if (step == 2) {
|
if (step === 2) {
|
||||||
this.getAttendanceList({ ...this.pageInfo });
|
getAttendanceList({ ...this.pageInfo });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.searchConditionWrapper {
|
.searchConditionWrapper {
|
||||||
width: 600px;
|
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ export const columns = [
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export const modalColumns = [
|
export const modalColumns = [
|
||||||
{
|
{
|
||||||
title: "姓名",
|
title: "姓名",
|
||||||
|
|
@ -285,9 +284,64 @@ export const dataCollectCondition = [
|
||||||
labelcol: 8,
|
labelcol: 8,
|
||||||
value: "",
|
value: "",
|
||||||
viewAttr: 2
|
viewAttr: 2
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
title: "数据采集",
|
title: "数据采集",
|
||||||
defaultshow: true
|
defaultshow: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const taxOptions = [
|
||||||
|
{
|
||||||
|
key: "",
|
||||||
|
showname: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "01",
|
||||||
|
showname: "一月",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "02",
|
||||||
|
showname: "二月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "03",
|
||||||
|
showname: "三月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "04",
|
||||||
|
showname: "四月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "05",
|
||||||
|
showname: "五月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "06",
|
||||||
|
showname: "六月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "07",
|
||||||
|
showname: "七月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "08",
|
||||||
|
showname: "八月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "09",
|
||||||
|
showname: "九月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "10",
|
||||||
|
showname: "十月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "11",
|
||||||
|
showname: "十一月"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "12",
|
||||||
|
showname: "十二月"
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { toJS } from "mobx";
|
import { toJS } from "mobx";
|
||||||
import { Button, Col, Dropdown, Menu, message, Modal, Row, Popover } from "antd";
|
import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd";
|
||||||
import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
|
import { WeaDatePicker, WeaHelpfulTip, WeaRightMenu, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTop } from "ecCom";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
import { getSearchs, renderLoading } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||||
import ImportModal from "../../../components/importModal";
|
import ImportModal from "../../../components/importModal";
|
||||||
import { dataCollectCondition, modalColumns } from "./columns";
|
import { dataCollectCondition, modalColumns, taxOptions } from "./columns";
|
||||||
import { optionAddAll } from "../../../util/options";
|
import { optionAddAll } from "../../../util/options";
|
||||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||||
import EditSlideContent from "./editSlideContent";
|
import EditSlideContent from "./editSlideContent";
|
||||||
|
|
@ -14,7 +14,6 @@ import AddItems from "../addItems";
|
||||||
import * as API from "../../../apis/cumSituation";
|
import * as API from "../../../apis/cumSituation";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
|
||||||
@inject("cumSituationStore", "taxAgentStore")
|
@inject("cumSituationStore", "taxAgentStore")
|
||||||
@observer
|
@observer
|
||||||
export default class CumSituation extends React.Component {
|
export default class CumSituation extends React.Component {
|
||||||
|
|
@ -23,14 +22,14 @@ export default class CumSituation extends React.Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
saveLoading: false,
|
saveLoading: false,
|
||||||
addVisible: false,
|
addVisible: false,
|
||||||
editId: "",
|
editId: {},
|
||||||
value: "",
|
value: "",
|
||||||
selectedKey: [],
|
selectedKey: [],
|
||||||
slideSelectedKey: [], //详情表格的选中项
|
slideSelectedKey: [], //详情表格的选中项
|
||||||
visiable: false,
|
visiable: false,
|
||||||
inited: false,
|
inited: false,
|
||||||
monthValue: moment(new Date()).format("YYYY"),
|
monthValue: moment(new Date()).format("YYYY"),
|
||||||
taxYearMonth: moment(new Date()).format("YYYY-MM"),
|
taxYearMonth: moment(new Date()).month() + 1 > 10 ? (moment(new Date()).month() + 1) + "" : "0" + (moment(new Date()).month() + 1),
|
||||||
taxAgentId: "All",
|
taxAgentId: "All",
|
||||||
modalParam: {
|
modalParam: {
|
||||||
taxYearMonth: ""
|
taxYearMonth: ""
|
||||||
|
|
@ -45,7 +44,11 @@ export default class CumSituation extends React.Component {
|
||||||
taxAgentStore: { fetchTaxAgentOption }
|
taxAgentStore: { fetchTaxAgentOption }
|
||||||
} = this.props;
|
} = this.props;
|
||||||
addForm.initFormFields(dataCollectCondition);
|
addForm.initFormFields(dataCollectCondition);
|
||||||
doInit({ year: this.state.monthValue, taxAgentId: "" });
|
doInit({
|
||||||
|
year: this.state.monthValue,
|
||||||
|
taxAgentId: "",
|
||||||
|
taxYearMonth: this.state.monthValue + "-" + this.state.taxYearMonth
|
||||||
|
});
|
||||||
fetchTaxAgentOption().then(() => {
|
fetchTaxAgentOption().then(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
inited: true
|
inited: true
|
||||||
|
|
@ -54,7 +57,7 @@ export default class CumSituation extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getSearchsAdQuick() {
|
getSearchsAdQuick() {
|
||||||
const { monthValue, taxAgentId } = this.state;
|
const { monthValue, taxAgentId, taxYearMonth } = this.state;
|
||||||
const {
|
const {
|
||||||
taxAgentStore: { taxAgentOption },
|
taxAgentStore: { taxAgentOption },
|
||||||
cumSituationStore: { form, getTableDatas }
|
cumSituationStore: { form, getTableDatas }
|
||||||
|
|
@ -67,22 +70,21 @@ export default class CumSituation extends React.Component {
|
||||||
value={monthValue}
|
value={monthValue}
|
||||||
format="YYYY"
|
format="YYYY"
|
||||||
width={200}
|
width={200}
|
||||||
onChange={v => {
|
onChange={c => {
|
||||||
this.setState({ monthValue: v });
|
this.setState({ monthValue: c, taxYearMonth: "01" });
|
||||||
let params = {};
|
let params = {};
|
||||||
if (taxAgentId == "All") {
|
if (taxAgentId == "All") {
|
||||||
params.taxAgentId = "";
|
params.taxAgentId = "";
|
||||||
} else {
|
} else {
|
||||||
params.taxAgentId = taxAgentId;
|
params.taxAgentId = taxAgentId;
|
||||||
}
|
}
|
||||||
if (v != null && v != "") {
|
if (c != null && c !== "") {
|
||||||
params.year = v;
|
params.year = c;
|
||||||
}
|
}
|
||||||
getTableDatas(params);
|
getTableDatas({ ...params, taxYearMonth: c + "-" + taxYearMonth });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="helperWrapper">
|
<div className="helperWrapper">
|
||||||
<WeaHelpfulTip
|
<WeaHelpfulTip
|
||||||
title="<div>提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额</div>"
|
title="<div>提示:默认显示本年截至上次所有员工的累计收入及各项累计扣除额、已预扣税额,与本月应发和各项应扣除项一起计算出本月应缴纳税额</div>"
|
||||||
|
|
@ -91,6 +93,27 @@ export default class CumSituation extends React.Component {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="searchConditionItem" style={{ marginRight: 10 }}>
|
||||||
|
<span className="conditionFormLabel">税款所属期:</span>
|
||||||
|
<WeaSelect
|
||||||
|
style={{ width: 80 }}
|
||||||
|
options={taxOptions}
|
||||||
|
value={taxYearMonth}
|
||||||
|
onChange={v => {
|
||||||
|
this.setState({ taxYearMonth: v });
|
||||||
|
let params = {};
|
||||||
|
if (taxAgentId == "All") {
|
||||||
|
params.taxAgentId = "";
|
||||||
|
} else {
|
||||||
|
params.taxAgentId = taxAgentId;
|
||||||
|
}
|
||||||
|
if (v != null && v != "") {
|
||||||
|
params.taxYearMonth = monthValue + "-" + v;
|
||||||
|
}
|
||||||
|
getTableDatas({ ...params, year: monthValue });
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="searchConditionItem">
|
<div className="searchConditionItem">
|
||||||
<span className="conditionFormLabel">个税扣缴义务人:</span>
|
<span className="conditionFormLabel">个税扣缴义务人:</span>
|
||||||
{this.state.inited &&
|
{this.state.inited &&
|
||||||
|
|
@ -101,15 +124,15 @@ export default class CumSituation extends React.Component {
|
||||||
value={taxAgentId}
|
value={taxAgentId}
|
||||||
onChange={v => {
|
onChange={v => {
|
||||||
let params = {};
|
let params = {};
|
||||||
if (v == "All") {
|
if (v === "All") {
|
||||||
params.taxAgentId = "";
|
params.taxAgentId = "";
|
||||||
} else {
|
} else {
|
||||||
params.taxAgentId = v;
|
params.taxAgentId = v;
|
||||||
}
|
}
|
||||||
if (monthValue != null && monthValue != "") {
|
if (monthValue != null && monthValue !== "") {
|
||||||
params.year = monthValue;
|
params.year = monthValue;
|
||||||
}
|
}
|
||||||
getTableDatas(params);
|
getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth });
|
||||||
this.setState({ taxAgentId: v });
|
this.setState({ taxAgentId: v });
|
||||||
}}
|
}}
|
||||||
/>}
|
/>}
|
||||||
|
|
@ -227,7 +250,7 @@ export default class CumSituation extends React.Component {
|
||||||
// 搜索
|
// 搜索
|
||||||
handleSearch = () => {
|
handleSearch = () => {
|
||||||
const { cumSituationStore: { getTableDatas } } = this.props;
|
const { cumSituationStore: { getTableDatas } } = this.props;
|
||||||
const { monthValue, taxAgentId } = this.state;
|
const { monthValue, taxAgentId, taxYearMonth } = this.state;
|
||||||
let params = {};
|
let params = {};
|
||||||
if (monthValue != null && monthValue !== "") {
|
if (monthValue != null && monthValue !== "") {
|
||||||
params.year = monthValue;
|
params.year = monthValue;
|
||||||
|
|
@ -235,25 +258,40 @@ export default class CumSituation extends React.Component {
|
||||||
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
||||||
params.taxAgentId = taxAgentId;
|
params.taxAgentId = taxAgentId;
|
||||||
}
|
}
|
||||||
getTableDatas(params);
|
getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth });
|
||||||
};
|
};
|
||||||
//新功能
|
//新功能
|
||||||
createAddUpSituation= (payload)=>{
|
handleCreateUpSituation = (payload) => {
|
||||||
|
const { editId } = this.state;
|
||||||
this.setState({ saveLoading: true });
|
this.setState({ saveLoading: true });
|
||||||
|
if (!_.isEmpty(editId)) {
|
||||||
|
API.editAddUpSituation({ ...payload, id: editId.id }).then(({ status }) => {
|
||||||
|
this.setState({ saveLoading: false });
|
||||||
|
if (status) {
|
||||||
|
message.success("编辑成功");
|
||||||
|
this.setState({
|
||||||
|
addVisible: false,
|
||||||
|
editId: {}
|
||||||
|
}, () => {
|
||||||
|
const { cumSituationStore: { addForm } } = this.props;
|
||||||
|
this.handleSearch();
|
||||||
|
addForm.resetForm();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message.error("编辑失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
API.createAddUpSituation(payload).then(({ status }) => {
|
API.createAddUpSituation(payload).then(({ status }) => {
|
||||||
this.setState({ saveLoading: false });
|
this.setState({ saveLoading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("新增成功");
|
message.success("新增成功");
|
||||||
this.setState({
|
this.setState({
|
||||||
addVisible: false,
|
addVisible: false,
|
||||||
editId: ""
|
editId: {}
|
||||||
}, () => {
|
}, () => {
|
||||||
const { cumSituationStore: { doSearch, addForm } } = this.props;
|
const { cumSituationStore: { addForm } } = this.props;
|
||||||
const { monthValue, taxAgentId } = this.state;
|
this.handleSearch();
|
||||||
doSearch({
|
|
||||||
declareMonth: [monthValue],
|
|
||||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
|
||||||
});
|
|
||||||
addForm.resetForm();
|
addForm.resetForm();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -261,17 +299,22 @@ export default class CumSituation extends React.Component {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
};
|
||||||
handleOperate = ({ key }, row) => {
|
handleOperate = ({ key }, row) => {
|
||||||
const { monthValue: declareMonth, taxAgentId } = this.state;
|
const { monthValue: declareMonth, taxYearMonth } = this.state;
|
||||||
const { cumSituationStore: { doSearch } } = this.props;
|
|
||||||
if (key === "edit") {
|
if (key === "edit") {
|
||||||
this.setState({
|
this.setState({
|
||||||
addVisible: true,
|
addVisible: true
|
||||||
editId: row.id
|
}, () => {
|
||||||
|
API.getAddUpSituation({ id: row.id }).then(({ status, data }) => {
|
||||||
|
if (status) {
|
||||||
|
this.setState({ editId: data });
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else if (key === "delete") {
|
} else if (key === "delete") {
|
||||||
const payload = {
|
const payload = {
|
||||||
declareMonth,
|
taxYearMonth: declareMonth + "-" + taxYearMonth,
|
||||||
ids: [row.id]
|
ids: [row.id]
|
||||||
};
|
};
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
|
|
@ -281,10 +324,7 @@ export default class CumSituation extends React.Component {
|
||||||
API.deleteSelectAddUpSituation(payload).then(({ status }) => {
|
API.deleteSelectAddUpSituation(payload).then(({ status }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
doSearch({
|
this.handleSearch();
|
||||||
declareMonth: [declareMonth],
|
|
||||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
message.error("删除失败");
|
message.error("删除失败");
|
||||||
}
|
}
|
||||||
|
|
@ -294,14 +334,13 @@ export default class CumSituation extends React.Component {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
deleteSelectAddUpSituation = () => {
|
deleteSelectAddUpSituation = () => {
|
||||||
const { monthValue: declareMonth, taxAgentId, selectedKey } = this.state;
|
const { monthValue: declareMonth, selectedKey, taxYearMonth } = this.state;
|
||||||
const { cumSituationStore: { doSearch } } = this.props;
|
|
||||||
if (selectedKey.length === 0) {
|
if (selectedKey.length === 0) {
|
||||||
message.warning("未选择条目");
|
message.warning("未选择条目");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const payload = {
|
const payload = {
|
||||||
declareMonth,
|
taxYearMonth: declareMonth + "-" + taxYearMonth,
|
||||||
ids: selectedKey
|
ids: selectedKey
|
||||||
};
|
};
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
|
|
@ -311,10 +350,7 @@ export default class CumSituation extends React.Component {
|
||||||
API.deleteSelectAddUpSituation(payload).then(({ status }) => {
|
API.deleteSelectAddUpSituation(payload).then(({ status }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
doSearch({
|
this.handleSearch();
|
||||||
declareMonth: [declareMonth],
|
|
||||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
message.error("删除失败");
|
message.error("删除失败");
|
||||||
}
|
}
|
||||||
|
|
@ -326,11 +362,9 @@ export default class CumSituation extends React.Component {
|
||||||
|
|
||||||
};
|
};
|
||||||
deleteAllAddUpSituation = () => {
|
deleteAllAddUpSituation = () => {
|
||||||
const { monthValue: declareMonth, taxAgentId } = this.state;
|
const { monthValue: declareMonth, taxYearMonth } = this.state;
|
||||||
const { cumSituationStore: { doSearch } } = this.props;
|
|
||||||
const payload = {
|
const payload = {
|
||||||
declareMonth,
|
taxYearMonth: declareMonth + "-" + taxYearMonth
|
||||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
|
||||||
};
|
};
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "信息确认",
|
title: "信息确认",
|
||||||
|
|
@ -339,10 +373,7 @@ export default class CumSituation extends React.Component {
|
||||||
API.deleteAllAddUpSituation(payload).then(({ status }) => {
|
API.deleteAllAddUpSituation(payload).then(({ status }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
doSearch({
|
this.handleSearch();
|
||||||
declareMonth: [declareMonth],
|
|
||||||
taxAgentId: taxAgentId === "All" ? "" : taxAgentId
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
message.error("删除失败");
|
message.error("删除失败");
|
||||||
}
|
}
|
||||||
|
|
@ -353,7 +384,7 @@ export default class CumSituation extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { cumSituationStore, taxAgentStore } = this.props;
|
const { cumSituationStore, taxAgentStore } = this.props;
|
||||||
const { slideSelectedKey, addVisible, editId, saveLoading, taxYearMonth } = this.state;
|
const { slideSelectedKey, addVisible, editId, saveLoading } = this.state;
|
||||||
const {
|
const {
|
||||||
loading,
|
loading,
|
||||||
dataSource,
|
dataSource,
|
||||||
|
|
@ -406,7 +437,7 @@ export default class CumSituation extends React.Component {
|
||||||
};
|
};
|
||||||
const adBtn = [
|
const adBtn = [
|
||||||
// 高级搜索内部按钮
|
// 高级搜索内部按钮
|
||||||
<Button type="primary" onClick={doSearch}>
|
<Button type="primary" onClick={() => this.handleSearch()}>
|
||||||
搜索
|
搜索
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button type="ghost" onClick={() => form.resetForm()}>
|
<Button type="ghost" onClick={() => form.resetForm()}>
|
||||||
|
|
@ -486,7 +517,7 @@ export default class CumSituation extends React.Component {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
addVisible: true
|
addVisible: true
|
||||||
});
|
}, () => addForm.resetForm());
|
||||||
}}>
|
}}>
|
||||||
新建
|
新建
|
||||||
</Button>,
|
</Button>,
|
||||||
|
|
@ -694,11 +725,11 @@ export default class CumSituation extends React.Component {
|
||||||
title={
|
title={
|
||||||
<SlideModalTitle
|
<SlideModalTitle
|
||||||
loading={saveLoading}
|
loading={saveLoading}
|
||||||
subtitle={addVisible ? (editId ? "编辑" : "新建") : "往期累计情况(工资、薪金)记录"}
|
subtitle={addVisible ? (!_.isEmpty(editId) ? "编辑" : "新建") : "往期累计情况(工资、薪金)记录"}
|
||||||
onSave={() => {
|
onSave={() => {
|
||||||
const { baseInfo } = this.addItemRef.state;
|
const { baseInfo } = this.addItemRef.state;
|
||||||
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v));
|
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !_.isEmpty(v));
|
||||||
if (!bool) {
|
if (!bool && _.isEmpty(editId)) {
|
||||||
Modal.warning({
|
Modal.warning({
|
||||||
title: "信息确认",
|
title: "信息确认",
|
||||||
content: "必要信息不完整,红色*为必填项!"
|
content: "必要信息不完整,红色*为必填项!"
|
||||||
|
|
@ -710,7 +741,7 @@ export default class CumSituation extends React.Component {
|
||||||
..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]),
|
..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]),
|
||||||
...addForm.getFormParams()
|
...addForm.getFormParams()
|
||||||
};
|
};
|
||||||
this.createAddUpSituation(payload);
|
this.handleCreateUpSituation(payload);
|
||||||
}}
|
}}
|
||||||
editable={!!addVisible}
|
editable={!!addVisible}
|
||||||
showOperateBtn={showOperateBtn}
|
showOperateBtn={showOperateBtn}
|
||||||
|
|
@ -724,6 +755,7 @@ export default class CumSituation extends React.Component {
|
||||||
taxAgentOption={taxAgentOption}
|
taxAgentOption={taxAgentOption}
|
||||||
form={addForm}
|
form={addForm}
|
||||||
isCum
|
isCum
|
||||||
|
editId={!_.isEmpty(editId) ? { ...editId, declareMonth: editId.taxYearMonth } : editId}
|
||||||
condition={dataCollectCondition}/> :
|
condition={dataCollectCondition}/> :
|
||||||
<EditSlideContent
|
<EditSlideContent
|
||||||
slideSelectedKey={slideSelectedKey}
|
slideSelectedKey={slideSelectedKey}
|
||||||
|
|
@ -735,7 +767,7 @@ export default class CumSituation extends React.Component {
|
||||||
setSlideVisiable(false);
|
setSlideVisiable(false);
|
||||||
this.setState({
|
this.setState({
|
||||||
addVisible: false,
|
addVisible: false,
|
||||||
editId: ""
|
editId: {}
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
showMask={true}
|
showMask={true}
|
||||||
|
|
@ -743,7 +775,7 @@ export default class CumSituation extends React.Component {
|
||||||
setSlideVisiable(false);
|
setSlideVisiable(false);
|
||||||
this.setState({
|
this.setState({
|
||||||
addVisible: false,
|
addVisible: false,
|
||||||
editId: ""
|
editId: {}
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>}
|
/>}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
.tipWrapper{
|
.tipWrapper{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin: 0 25px;
|
margin: 0 25px 20px 25px;
|
||||||
border: 1px solid #e5e5e5;
|
border: 1px solid #e5e5e5;
|
||||||
.title{
|
.title{
|
||||||
border-bottom: 1px solid #e5e5e5;
|
border-bottom: 1px solid #e5e5e5;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import EditSlideContent from "./editSlideContent";
|
||||||
import { optionAddAll } from "../../../util/options";
|
import { optionAddAll } from "../../../util/options";
|
||||||
import * as API from "../../../apis/otherDeduct";
|
import * as API from "../../../apis/otherDeduct";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
import { getData } from "../../../apis/otherDeduct";
|
|
||||||
|
|
||||||
|
|
||||||
@inject("otherDeductStore", "taxAgentStore")
|
@inject("otherDeductStore", "taxAgentStore")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue