账套删除
This commit is contained in:
parent
8bf8b58065
commit
08ce3de564
|
|
@ -59,6 +59,7 @@ export default class Attendance extends React.Component {
|
|||
fieldCurrent: 1
|
||||
}
|
||||
this.fieldSearch = {}
|
||||
this.listSearch = {}
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
|
@ -91,17 +92,23 @@ export default class Attendance extends React.Component {
|
|||
|
||||
// 字段列表分页
|
||||
handleFieldPageChange(value) {
|
||||
this.setState({fieldCurrent: value})
|
||||
const { attendanceStore: {getAttendanceFieldList} } = this.props;
|
||||
this.fieldSearch.current = value
|
||||
getAttendanceFieldList(this.fieldSearch)
|
||||
}
|
||||
|
||||
// 列表
|
||||
handleDataPageChange(value) {
|
||||
const { attendanceStore: { getAttendanceList }} = this.props;
|
||||
this.listSearch.current = value
|
||||
getAttendanceList(this.listSearch)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { attendanceStore } = this.props;
|
||||
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = attendanceStore;
|
||||
const { step, setStep, setSlideVisiable, slideVisiable, doBatchDelete, attendTableStore, fieldSettingAttendList, fieldSettingCustomList, setFieldSettingAttendList, setFieldSettingCustomList, searchFieldSettingList } = attendanceStore;
|
||||
const { getAttendanceFieldSettingList, saveAttendanceFieldSetting, fieldDataSource, fieldTableStore, fieldPageInfo} = attendanceStore
|
||||
const { getAttendanceFieldSettingList, saveAttendanceFieldSetting, fieldDataSource, fieldTableStore, fieldPageInfo, attendanceDataSource, attendanceColumns} = attendanceStore
|
||||
const selectedRowKeys = toJS(tableStore.selectedRowKeys) || []; // tableStore 右侧选中数组
|
||||
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
|
|
@ -167,20 +174,20 @@ export default class Attendance extends React.Component {
|
|||
this.setState({
|
||||
startDate: value
|
||||
})
|
||||
|
||||
getAttendanceList({
|
||||
this.listSearch = {
|
||||
salaryYearMonth: [value, this.state.endDate]
|
||||
})
|
||||
}
|
||||
getAttendanceList(this.listSearch)
|
||||
|
||||
}}
|
||||
onEndDateChange={(value) => {
|
||||
this.setState({
|
||||
endDate: value
|
||||
})
|
||||
getAttendanceList({
|
||||
this.listSearch = {
|
||||
salaryYearMonth: [this.state.startDate, value]
|
||||
})
|
||||
|
||||
}
|
||||
getAttendanceList(this.listSearch)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
|
@ -278,7 +285,8 @@ export default class Attendance extends React.Component {
|
|||
this.fieldSearch = {fieldName: this.state.fieldName}
|
||||
getAttendanceFieldList(this.fieldSearch)
|
||||
} else if(v == "0") {
|
||||
getAttendanceList({})
|
||||
this.listSearch = {}
|
||||
getAttendanceList(this.listSearch)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -414,6 +422,18 @@ export default class Attendance extends React.Component {
|
|||
// getColumns={this.getColumns}
|
||||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
/> */}
|
||||
|
||||
<WeaTable // table内部做了loading加载处理,页面就不需要再加了
|
||||
columns={attendanceColumns}
|
||||
dataSource={attendanceDataSource}
|
||||
// getColumns={this.getColumns}
|
||||
// onOperatesClick={this.onOperatesClick.bind(this)}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: attendancePageInfo.total,
|
||||
current: attendancePageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
:
|
||||
<div>
|
||||
|
|
@ -444,7 +464,7 @@ export default class Attendance extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handleFieldPageChange(value)},
|
||||
total: fieldPageInfo.total,
|
||||
current: this.state.fieldCurrent
|
||||
current: fieldPageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ export default class Ledger extends React.Component {
|
|||
case "3": // 关联人员
|
||||
this.handleItemClick(record, 1)
|
||||
case "4": // 删除
|
||||
({
|
||||
Modal.confirm({
|
||||
title: '信息确认',
|
||||
content: '确认删除',
|
||||
onOk:() => {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,11 @@ export class AttendanceStore {
|
|||
@observable fieldTableStore = new TableStore(); // new Table
|
||||
@observable fieldPageInfo = {};
|
||||
|
||||
// 考勤数据列表
|
||||
@observable attendanceDataSource = [];
|
||||
@observable attendancePageInfo = {};
|
||||
@observable attendanceColumns = [];
|
||||
|
||||
@action
|
||||
searchFieldSettingList = (value) => {
|
||||
if(value != "") {
|
||||
|
|
@ -225,7 +230,10 @@ export class AttendanceStore {
|
|||
this.loading = true;
|
||||
API.getAttendanceList(params).then(res => {
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.attendTableStore.getDatas(res.data.datas); // table 请求数据
|
||||
// this.attendTableStore.getDatas(res.data.datas); // table 请求数据
|
||||
this.attendanceDataSource = res.data.list;
|
||||
this.attendancePageInfo = res.data;
|
||||
this.attendanceColumns = res.data.columns
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue