|
@@ -11,6 +11,26 @@ function Finance(props) {
|
|
|
const { dispatch, loading, finance } = props;
|
|
|
const [form] = Form.useForm();
|
|
|
const [modalFilter, setModalFilter] = useState({});
|
|
|
+
|
|
|
+ var initDate;
|
|
|
+ if (moment().date() > 25) {
|
|
|
+ initDate = [
|
|
|
+ moment()
|
|
|
+ .subtract(1, 'month')
|
|
|
+ .set('date', 26),
|
|
|
+ moment().set('date', 25),
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ initDate = [
|
|
|
+ moment()
|
|
|
+ .subtract(2, 'month')
|
|
|
+ .set('date', 26),
|
|
|
+ moment()
|
|
|
+ .subtract(1, 'month')
|
|
|
+ .set('date', 25),
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
const columns = [
|
|
|
{ title: '资源名称', dataIndex: 'c_name' },
|
|
|
{ title: '资源编号', dataIndex: 'user_name' },
|
|
@@ -19,19 +39,19 @@ function Finance(props) {
|
|
|
{ title: '项目编号', dataIndex: 'project_code' },
|
|
|
{ title: '项目状态', dataIndex: 'project_status' },
|
|
|
{ title: '项目归属部门', dataIndex: 'project_dep_name' },
|
|
|
+ { title: '有效工时', dataIndex: 'workload' },
|
|
|
{ title: '工时类型', dataIndex: 'type_name' },
|
|
|
- { title: '保存未提交', dataIndex: 'un_audit_cnt' },
|
|
|
- { title: '提交未审批', dataIndex: 'pending_audit_cnt' },
|
|
|
- { title: '已拒绝', dataIndex: 'refuse_audit_cnt' },
|
|
|
- { title: '审批通过', dataIndex: 'pass_audit_cnt' },
|
|
|
];
|
|
|
+
|
|
|
const STATUS = [
|
|
|
{ value: 0, label: '售前' },
|
|
|
{ value: 1, label: '转执行' },
|
|
|
{ value: 2, label: '转运营' },
|
|
|
{ value: 3, label: '转质保' },
|
|
|
];
|
|
|
+
|
|
|
const filterRef = useRef({ pageSize: 20 });
|
|
|
+
|
|
|
const onChangePage = pagination => {
|
|
|
dispatch({
|
|
|
type: 'report/queryFinanceReport',
|
|
@@ -69,7 +89,7 @@ function Finance(props) {
|
|
|
const renderSearch = () => {
|
|
|
return (
|
|
|
<Form layout="inline" form={form}>
|
|
|
- <Form.Item label="时间" name="time" initialValue={[moment().startOf('years'), moment()]}>
|
|
|
+ <Form.Item label="时间" name="time" initialValue={initDate}>
|
|
|
<RangePicker placeholder="选择时间" allowClear={false} />
|
|
|
</Form.Item>
|
|
|
<Form.Item label="项目名称" name="project_name">
|