2022-06-23 16:20:49 +08:00
|
|
|
|
import React from "react";
|
|
|
|
|
|
import { Row, Col, Table, DatePicker } from "antd";
|
|
|
|
|
|
import { inject, observer } from "mobx-react";
|
|
|
|
|
|
import {
|
|
|
|
|
|
WeaInput,
|
|
|
|
|
|
WeaTextarea,
|
|
|
|
|
|
WeaSearchGroup,
|
|
|
|
|
|
WeaSelect,
|
|
|
|
|
|
WeaCheckbox,
|
|
|
|
|
|
WeaTable
|
|
|
|
|
|
} from "ecCom";
|
|
|
|
|
|
import { slideColumns, slideDataSource, columns } from "./columns";
|
|
|
|
|
|
import "./editSlideContent.less";
|
2022-03-15 11:06:56 +08:00
|
|
|
|
|
|
|
|
|
|
// import { WeaTableNew } from "comsMobx"
|
|
|
|
|
|
// const WeaTable = WeaTableNew.WeaTable;
|
2022-06-23 16:20:49 +08:00
|
|
|
|
import moment from "moment";
|
2022-03-15 11:06:56 +08:00
|
|
|
|
|
|
|
|
|
|
const { MonthPicker } = DatePicker;
|
|
|
|
|
|
|
|
|
|
|
|
let emptyItem = {
|
2022-06-23 16:20:49 +08:00
|
|
|
|
incomeLowerLimit: "0.00",
|
|
|
|
|
|
incomeUpperLimit: "0.00",
|
|
|
|
|
|
dutyFreeValue: "0.00",
|
|
|
|
|
|
dutyFreeRate: "0.00",
|
|
|
|
|
|
taxableIncomeLl: "0.00",
|
|
|
|
|
|
taxableIncomeUl: "0.00",
|
|
|
|
|
|
taxRate: "0.00",
|
|
|
|
|
|
taxDeduction: "0.00"
|
|
|
|
|
|
};
|
2022-03-15 11:06:56 +08:00
|
|
|
|
|
2022-06-23 16:20:49 +08:00
|
|
|
|
@inject("attendanceStore")
|
2022-03-15 11:06:56 +08:00
|
|
|
|
@observer
|
|
|
|
|
|
export default class EditSlideContent extends React.Component {
|
2022-06-23 16:20:49 +08:00
|
|
|
|
constructor(props) {
|
|
|
|
|
|
super(props);
|
|
|
|
|
|
}
|
2022-03-15 11:06:56 +08:00
|
|
|
|
|
2022-06-23 16:20:49 +08:00
|
|
|
|
componentWillMount() {
|
|
|
|
|
|
// 初始化渲染页面
|
|
|
|
|
|
const { attendanceStore: { viewAttendQuote } } = this.props;
|
|
|
|
|
|
viewAttendQuote({ attendQuoteId: this.props.id });
|
|
|
|
|
|
}
|
2022-03-15 11:06:56 +08:00
|
|
|
|
|
2022-06-23 16:20:49 +08:00
|
|
|
|
getColumns(columns) {
|
|
|
|
|
|
let result = [...columns];
|
|
|
|
|
|
return result.filter(item => item.hide == "false");
|
|
|
|
|
|
}
|
2022-03-15 11:06:56 +08:00
|
|
|
|
|
2022-06-23 16:20:49 +08:00
|
|
|
|
getScrollWidth() {
|
|
|
|
|
|
const { attendanceStore } = this.props;
|
|
|
|
|
|
const { attendQuoteDetailTableStore } = attendanceStore;
|
|
|
|
|
|
return (
|
|
|
|
|
|
this.getColumns(
|
|
|
|
|
|
attendQuoteDetailTableStore.columns
|
|
|
|
|
|
? attendQuoteDetailTableStore.columns
|
|
|
|
|
|
: []
|
|
|
|
|
|
).length * 150
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
2022-03-15 11:06:56 +08:00
|
|
|
|
|
2022-06-23 16:20:49 +08:00
|
|
|
|
render() {
|
|
|
|
|
|
const {
|
|
|
|
|
|
attendanceStore,
|
|
|
|
|
|
attendanceStore: { viewAttendQuote }
|
|
|
|
|
|
} = this.props;
|
|
|
|
|
|
const {
|
|
|
|
|
|
attendQuoteDetailPageInfo,
|
|
|
|
|
|
attendQuoteDetailTableStore
|
|
|
|
|
|
} = attendanceStore;
|
2022-04-26 10:42:08 +08:00
|
|
|
|
|
2022-06-23 16:20:49 +08:00
|
|
|
|
const pagination = {
|
|
|
|
|
|
total: attendQuoteDetailPageInfo.total,
|
|
|
|
|
|
showTotal: total => `共 ${total} 条`,
|
|
|
|
|
|
showSizeChanger: true,
|
|
|
|
|
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
|
|
|
|
onShowSizeChange: (current, pageSize) => {
|
|
|
|
|
|
viewAttendQuote({ attendQuoteId: this.props.id, current, pageSize });
|
|
|
|
|
|
},
|
|
|
|
|
|
onChange: current => {
|
|
|
|
|
|
viewAttendQuote({
|
|
|
|
|
|
attendQuoteId: this.props.id,
|
|
|
|
|
|
current,
|
|
|
|
|
|
pageSize: attendQuoteDetailPageInfo.pageSize
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
return (
|
|
|
|
|
|
<div className="attendSlide">
|
|
|
|
|
|
<div className="titleWrapper">
|
|
|
|
|
|
{this.props.salaryYearMonth != "" &&
|
|
|
|
|
|
<div className="slideLeftTitle">
|
|
|
|
|
|
考勤周期: {this.props.salaryYearMonth}
|
|
|
|
|
|
</div>}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<WeaTable
|
|
|
|
|
|
columns={this.getColumns(
|
|
|
|
|
|
attendQuoteDetailTableStore.columns
|
|
|
|
|
|
? attendQuoteDetailTableStore.columns
|
|
|
|
|
|
: []
|
|
|
|
|
|
)}
|
|
|
|
|
|
dataSource={
|
|
|
|
|
|
attendQuoteDetailPageInfo.list
|
|
|
|
|
|
? attendQuoteDetailPageInfo.list
|
|
|
|
|
|
: []
|
|
|
|
|
|
}
|
|
|
|
|
|
pagination={pagination}
|
|
|
|
|
|
scroll={{ x: this.getScrollWidth() }}
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|