diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index 73eae942..1b76cb67 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -76,7 +76,7 @@ export default class Attendance extends React.Component { componentWillMount() { const { attendanceStore: { doInit, getLedgerList } } = this.props; - doInit(); + doInit(this.listSearch); getLedgerList().then(() => { this.setState({ inited: true @@ -192,7 +192,7 @@ export default class Attendance extends React.Component { ]).then(({ status, errormsg }) => { if (status) { message.success("删除成功"); - doInit({}); + doInit(this.listSearch); } else { message.error(errormsg || "删除失败"); } diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js index b92a62c5..79752acc 100644 --- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js +++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js @@ -14,9 +14,9 @@ export default class SalarySendList extends React.Component { this.pageInfo = { current: 1, pageSize: 10 }; } - componentWillMount() { + componentDidMount() { const { payrollStore: { getPayrollList } } = this.props; - getPayrollList(); + getPayrollList(this.searchParams); } // 发放回调 diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index 229c33d8..9b705f33 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -41,20 +41,10 @@ export default class Payroll extends React.Component { endDate: moment(new Date()).startOf("month").format("YYYY-MM") }; this.recordId = ""; - this.salaryYearMonth = []; + this.salaryYearMonth = [moment(new Date()).startOf("year").format("YYYY-MM"), moment(new Date()).startOf("month").format("YYYY-MM")]; this.listPageInfo = { current: 1, pageSize: 10 }; } - // 更新模板 - handleUpdateTemplate(record) { - this.setState({ - selectedKey: "1", - editSlideVisible: true, - templateCurrentId: record.templateId - - }); - } - // 工资单模板-新建表单变化监听 handleBaseInfoChange = (request) => { const { payrollStore: { setTemplateBaseData } } = this.props; diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js index 2b4e1691..61c86c7a 100644 --- a/pc4mobx/hrmSalary/stores/attendanceStore.js +++ b/pc4mobx/hrmSalary/stores/attendanceStore.js @@ -1,4 +1,4 @@ -import { observable, action, toJS } from "mobx"; +import { action, observable, toJS } from "mobx"; import { message } from "antd"; import { WeaForm, WeaTableNew } from "comsMobx"; @@ -125,10 +125,10 @@ export class AttendanceStore { // 初始化操作 @action - doInit = () => { + doInit = (params = {}) => { // this.getCondition(); // this.getTableDatas(); - this.getAttendanceList({}); + this.getAttendanceList(params); // this.getAttendanceFieldSettingList({sourceType:'IMPORT'}) }; @@ -196,7 +196,7 @@ export class AttendanceStore { @action saveAttendanceField = params => { - return new Promise((resolve,reject)=>{ + return new Promise((resolve, reject) => { API.saveAttendanceField(params).then(res => { if (res.status) { message.success("保存成功"); @@ -206,7 +206,7 @@ export class AttendanceStore { reject(); } }); - }) + }); }; @action