221环境测试出的bug修复
This commit is contained in:
parent
2cbcb414fb
commit
172af786ed
|
|
@ -3,7 +3,7 @@ import { inject, observer } from "mobx-react";
|
|||
import { Button, Col, DatePicker, Dropdown, Menu, message, Modal, Row, Switch } from "antd";
|
||||
import { WeaDatePicker, WeaInputSearch, WeaNewScroll, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import moment from "moment";
|
||||
import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import { renderNoright } from "../../../util";
|
||||
import CustomTab from "../../../components/customTab";
|
||||
import { columns } from "./columns";
|
||||
import ImportModal from "../../../components/importModal";
|
||||
|
|
|
|||
|
|
@ -47,28 +47,33 @@ export default class RefereAttendFormModal extends React.Component {
|
|||
this.setState({ request: result });
|
||||
}
|
||||
|
||||
|
||||
// 同步点击回调
|
||||
handleSync() {
|
||||
const { attendanceStore: { syncAttendanceRefer, checkOperation } } = this.props;
|
||||
if (!this.validate()) {
|
||||
return;
|
||||
}
|
||||
const { salarySobId, salaryYearMonth: salaryYearMonthStr } = this.state.request;
|
||||
const payload = {
|
||||
salaryYearMonthStr,
|
||||
salarySobId
|
||||
};
|
||||
checkOperation(payload).then(({ status, data, errorMsg }) => {
|
||||
if (status && data) {
|
||||
syncAttendanceRefer(this.state.request).then(() => {
|
||||
this.props.onCancel();
|
||||
handleSync = () => {
|
||||
if (!this.handleAsync) {
|
||||
this.handleAsync = _.debounce(() => {
|
||||
const { attendanceStore: { syncAttendanceRefer, checkOperation } } = this.props;
|
||||
if (!this.validate()) {
|
||||
return;
|
||||
}
|
||||
const { salarySobId, salaryYearMonth: salaryYearMonthStr } = this.state.request;
|
||||
const payload = {
|
||||
salaryYearMonthStr,
|
||||
salarySobId
|
||||
};
|
||||
checkOperation(payload).then(({ status, data, errorMsg }) => {
|
||||
if (status && data) {
|
||||
syncAttendanceRefer(this.state.request).then(() => {
|
||||
this.props.onCancel();
|
||||
});
|
||||
} else {
|
||||
message.warning("已经核算过不可操作");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
message.warning("已经核算过不可操作");
|
||||
}
|
||||
});
|
||||
}
|
||||
this.handleAsync = null;
|
||||
}, 500);
|
||||
}
|
||||
this.handleAsync();
|
||||
};
|
||||
|
||||
// 校验数据
|
||||
validate() {
|
||||
|
|
@ -99,9 +104,7 @@ export default class RefereAttendFormModal extends React.Component {
|
|||
style={{ width: 600 }}
|
||||
title="引用考勤数据"
|
||||
buttons={[
|
||||
<Button type="primary" onClick={() => {
|
||||
this.handleSync();
|
||||
}}>同步</Button>,
|
||||
<Button type="primary" onClick={this.handleSync}>同步</Button>,
|
||||
<Button type="default" onClick={() => {
|
||||
this.handleHeaderSet();
|
||||
}}>表头设置</Button>
|
||||
|
|
|
|||
|
|
@ -364,7 +364,8 @@ class Index extends Component {
|
|||
col={innerWidth < 900 ? 1 : 2}/>;
|
||||
};
|
||||
screenChange = ({ key, value }) => {
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ current: 1 }));
|
||||
const { cumDeductStore: { form } } = this.props;
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ ...form.getFormParams(), current: 1 }));
|
||||
};
|
||||
handleAdSearch = () => {
|
||||
const { cumDeductStore: { form } } = this.props;
|
||||
|
|
@ -516,6 +517,7 @@ class Index extends Component {
|
|||
showOperateBtn={showOperateBtn}
|
||||
onTableOperate={this.handleTableOperate}
|
||||
onViewDetails={(record) => this.handleAddData("累计专项附加扣除记录", record)}
|
||||
form={form}
|
||||
/>
|
||||
</Layout>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -368,7 +368,8 @@ class Index extends Component {
|
|||
col={innerWidth < 900 ? 1 : 3}/>;
|
||||
};
|
||||
screenChange = ({ key, value }) => {
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ current: 1 }));
|
||||
const { cumSituationStore: { form } } = this.props;
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ ...form.getFormParams(), current: 1 }));
|
||||
};
|
||||
handleAdSearch = () => {
|
||||
const { cumSituationStore: { form } } = this.props;
|
||||
|
|
@ -524,6 +525,7 @@ class Index extends Component {
|
|||
showOperateBtn={showOperateBtn}
|
||||
onTableOperate={this.handleTableOperate}
|
||||
onViewDetails={(record) => this.handleAddData("往期累计情况(工资、薪金)记录", record)}
|
||||
form={form}
|
||||
/>
|
||||
</Layout>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class DataTables extends Component {
|
|||
|
||||
render() {
|
||||
const { columns, dataSource, loading, selectedRowKeys, pageInfo } = this.state;
|
||||
const { showOperateBtn, onTableOperate, onViewDetails, isSpecial = false } = this.props;
|
||||
const { showOperateBtn, onTableOperate, onViewDetails, isSpecial = false, form } = this.props;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
|
||||
|
|
@ -71,14 +71,14 @@ class DataTables extends Component {
|
|||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => {
|
||||
this.getTableDate();
|
||||
this.getTableDate({ ...form.getFormParams() });
|
||||
});
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => {
|
||||
this.getTableDate();
|
||||
this.getTableDate({ ...form.getFormParams() });
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import {
|
|||
deleteAllData,
|
||||
deleteSelectData,
|
||||
editData,
|
||||
extendToLastMonth, getData,
|
||||
extendToLastMonth,
|
||||
getData,
|
||||
getOtherDeductSaCondition,
|
||||
importOtherDeductionParam,
|
||||
importOtherDeductionPreview
|
||||
|
|
@ -24,7 +25,6 @@ import Layout from "../layout";
|
|||
import moment from "moment";
|
||||
import ImportFormCom from "../cumDeduct/components/importFormCom";
|
||||
import { DataCollectionDatePicker, DataCollectionSelect } from "../cumDeduct";
|
||||
import { getAddUpDeduction } from "../../../apis/cumDeduct";
|
||||
import { dataCollectCondition } from "./columns";
|
||||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
|
|
@ -367,7 +367,8 @@ class Index extends Component {
|
|||
col={innerWidth < 900 ? 1 : 2}/>;
|
||||
};
|
||||
screenChange = ({ key, value }) => {
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ current: 1 }));
|
||||
const { otherDeductStore: { form } } = this.props;
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ ...form.getFormParams(), current: 1 }));
|
||||
};
|
||||
handleCloseSlide = () => {
|
||||
const { slidePayload } = this.state;
|
||||
|
|
@ -522,6 +523,7 @@ class Index extends Component {
|
|||
showOperateBtn={showOperateBtn}
|
||||
onTableOperate={this.handleTableOperate}
|
||||
onViewDetails={(record) => this.handleAddData("其他免税扣除记录", record)}
|
||||
form={form}
|
||||
/>
|
||||
</Layout>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -251,7 +251,8 @@ class Index extends Component {
|
|||
return <WeaSearchGroup className="screenWrapper" showGroup needTigger={false} items={items} col={2}/>;
|
||||
};
|
||||
screenChange = ({ key, value }) => {
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ current: 1 }));
|
||||
const { specialAddStore: { advanceForm } } = this.props;
|
||||
this.setState({ [key]: value }, () => this.tableRef.getTableDate({ ...advanceForm.getFormParams(), current: 1 }));
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
@ -433,6 +434,7 @@ class Index extends Component {
|
|||
showOperateBtn={showOperateBtn}
|
||||
onTableOperate={this.handleTableOperate}
|
||||
onViewDetails={(record) => this.handleAddData("专项附加扣除记录", record)}
|
||||
form={advanceForm}
|
||||
/>
|
||||
</Layout>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class Index extends Component {
|
|||
})
|
||||
}
|
||||
],
|
||||
enctryItems: [
|
||||
enctryItems: queryAppsetting.data.showEncryptOperationButton === "true" ? [
|
||||
{
|
||||
com: CheckBox({
|
||||
label: "加密设置",
|
||||
|
|
@ -85,7 +85,7 @@ class Index extends Component {
|
|||
onChange: (data) => this.handleChane({ type: "加密设置", selected: data })
|
||||
})
|
||||
}
|
||||
],
|
||||
] : [],
|
||||
declareItems: [
|
||||
{
|
||||
com: CheckBox({
|
||||
|
|
@ -303,14 +303,17 @@ class Index extends Component {
|
|||
loading={loading.employee}>保存</Button>
|
||||
</div>
|
||||
} showGroup center items={importItems}/>
|
||||
<WeaSearchGroup
|
||||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>加密规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("ENCRYTION")}
|
||||
loading={loading.encry}>保存</Button>
|
||||
</div>
|
||||
} showGroup center items={enctryItems}/>
|
||||
{
|
||||
!_.isEmpty(enctryItems) &&
|
||||
<WeaSearchGroup
|
||||
title={
|
||||
<div className="titleWrapper">
|
||||
<span>加密规则</span>
|
||||
<Button type="primary" onClick={() => this.handleSave("ENCRYTION")}
|
||||
loading={loading.encry}>保存</Button>
|
||||
</div>
|
||||
} showGroup center items={enctryItems}/>
|
||||
}
|
||||
<WeaSearchGroup
|
||||
title={
|
||||
<div className="titleWrapper">
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ export default class SalaryItem extends React.Component {
|
|||
this.setState({ editable: isedit, isAdd: false });
|
||||
getItemForm(record.id).then(() => {
|
||||
setEditSlideVisible(true);
|
||||
}).catch(({ errormsg }) => {
|
||||
message.error(errormsg || "");
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,19 +24,19 @@ export default class BaseForm extends React.Component {
|
|||
{ com: Input("合同到期日期", dimissionDate) }
|
||||
];
|
||||
const taxagentItems = [
|
||||
{ com: Input("个税扣缴义务人", paymentOrganizationName, 6, 18) }
|
||||
{ com: Input("个税扣缴义务人", paymentOrganizationName) }
|
||||
];
|
||||
return (
|
||||
<div className="socialFormWrapper">
|
||||
<WeaSearchGroup title="基本信息" items={baseItems} col={3} showGroup/>
|
||||
<WeaSearchGroup title="基本信息" items={baseItems} col={1} showGroup/>
|
||||
<WeaSearchGroup title="个税扣缴义务人" items={taxagentItems} col={1} showGroup/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
const Input = (label, value, labelColSpan = 12, wrapperColSpan = 12) => {
|
||||
const Input = (label, value) => {
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: labelColSpan }} wrapperCol={{ span: wrapperColSpan }}>
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInput value={value} viewAttr={1}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ export class SalaryItemStore {
|
|||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
reject();
|
||||
reject(res);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue