Browse Source

Squashed commit of the following:
修改上月26到这月25
commit 42dbc6fc6e7bba681bb90aabe4c4e53aa41f2e9e
Author: Renxy <18510891294@163.com>
Date: Mon Nov 27 14:53:24 2023 +0800

修改上报所有工时时间为上个月26到这个月25

commit 15dd115773fa496a30cebc9bcee9d5e0b9fcb90b
Author: Renxy <18510891294@163.com>
Date: Thu Oct 26 10:21:18 2023 +0800

修改项目成员flow_id

Renxy 1 year ago
parent
commit
a400c75507
1 changed files with 16 additions and 13 deletions
  1. 16 13
      src/pages/PurchaseAdmin/PurchaseList/WorkingHours/index.js

+ 16 - 13
src/pages/PurchaseAdmin/PurchaseList/WorkingHours/index.js

@@ -264,11 +264,11 @@ function List(props) {
   const onChangeDate = value => {
   const onChangeDate = value => {
     let time = value.format('YYYY-MM-DD');
     let time = value.format('YYYY-MM-DD');
     if (current.date.format('YYYY-MM') != value.format('YYYY-MM')) {
     if (current.date.format('YYYY-MM') != value.format('YYYY-MM')) {
-      const s_date = value.format('YYYY-MM') + '-01';
-      const e_date = moment(s_date)
-        .add('month', 1)
-        .add('days', -1)
-        .format('YYYY-MM-DD');
+      const e_date = value.format('YYYY-MM') + '-25';
+      const s_date =
+        moment(e_date)
+          .add('month', -1)
+          .format('YYYY-MM') + '-26';
       dispatch({
       dispatch({
         type: 'workload/queryWorkHours',
         type: 'workload/queryWorkHours',
         payload: {
         payload: {
@@ -310,11 +310,16 @@ function List(props) {
     dispatch({
     dispatch({
       type: 'workload/queryWorkType',
       type: 'workload/queryWorkType',
       callback: () => {
       callback: () => {
-        const s_date = current.date.format('YYYY-MM') + '-01';
-        const e_date = moment(s_date)
-          .add('month', 1)
-          .add('days', -1)
-          .format('YYYY-MM-DD');
+        // const s_date = current.date.format('YYYY-MM') + '-01';
+        // const e_date = moment(s_date)
+        //   .add('month', 1)
+        //   .add('days', -1)
+        //   .format('YYYY-MM-DD');
+        const e_date = current.date.format('YYYY-MM') + '-25';
+        const s_date =
+          moment(e_date)
+            .add('month', -1)
+            .format('YYYY-MM') + '-26';
         dispatch({
         dispatch({
           type: 'workload/queryWorkHours',
           type: 'workload/queryWorkHours',
           payload: {
           payload: {
@@ -349,14 +354,12 @@ function List(props) {
     };
     };
   }, [currentUser.ID]);
   }, [currentUser.ID]);
 
 
-  // useEffect(() => {
-  //   onChangeDate(current.date);
-  // }, [dataList]);
   useEffect(() => {
   useEffect(() => {
     dispatch({
     dispatch({
       type: 'workload/fetchDepV2',
       type: 'workload/fetchDepV2',
     });
     });
   }, []);
   }, []);
+
   return (
   return (
     <div>
     <div>
       <Spin spinning={loading}>
       <Spin spinning={loading}>