dev01 2 anni fa
parent
commit
04d415f0d2

+ 12 - 5
src/app.config.js

@@ -6,6 +6,7 @@ export default {
     'pages/egressDetails/index',//公出详情
     'pages/login/index',//登录
     'pages/applyDepart/index',//申请公出
+    'pages/mybusiness/index',//我的
   ],
   tabBar: {
     list: [
@@ -16,16 +17,22 @@ export default {
         text: '打卡'
       },
       {
+        iconPath: './image/egressUnSelect.png',
+        selectedIconPath: './image/egressSelect.png',
+        pagePath: 'pages/applyDepart/index',
+        text: '申请公出'
+      },
+      {
         iconPath: './image/examineUnSelect.png',
         selectedIconPath: './image/examineSelect.png',
         pagePath: 'pages/examine/index',
         text: '审核'
       },
       {
-        iconPath: './image/egressUnSelect.png',
-        selectedIconPath: './image/egressSelect.png',
-        pagePath: 'pages/applyDepart/index',
-        text: '申请公出'
+        iconPath: './image/my.png',
+        selectedIconPath: './image/myselect.png',
+        pagePath: 'pages/mybusiness/index',
+        text: '我的'
       }],
     'color': '#515151',
     'selectedColor': '#56abe4',
@@ -38,7 +45,7 @@ export default {
     navigationBarTitleText: 'WeChat',
     navigationBarTextStyle: 'black'
   },
-  requiredBackgroundModes:['location'],
+  requiredBackgroundModes: ['location'],
   plugins: {
     chooseLocation: {
       version: "1.0.8",

+ 10 - 2
src/components/common/userquery/index.jsx

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import { View, Button } from "@tarojs/components";
+import { View, Button, Text } from "@tarojs/components";
 import { AtModal, AtModalContent, AtSearchBar, AtList, AtListItem } from "taro-ui";
 import { getadminByName } from "../../../utils/servers/servers";
 import { isOneself } from "../../../utils/tools"
@@ -67,9 +67,13 @@ class UserQuery extends Component {
   render() {
     const { coorderList, cList } = this.props
     return (
-      <AtModal isOpened={this.props.isOpened} onClose={this.props.onDesc}>
+      <AtModal
+        isOpened={this.props.isOpened}
+        onClose={this.props.onDesc}
+      >
         <AtModalContent>
           <AtSearchBar
+            placeholder="请输入协单人姓名"
             showActionButton
             value={this.state.value}
             onChange={this.onChange}
@@ -114,6 +118,10 @@ class UserQuery extends Component {
               )
             }
           </AtList>
+          <View
+            style={{ color: "red", margin: "20px auto 0", textAlign: "center" }}
+            onClick={this.props.onDesc}
+          >点击关闭弹窗</View>
         </AtModalContent>
       </AtModal>
     );

BIN
src/image/egressSelect.png


BIN
src/image/egressUnSelect.png


BIN
src/image/examineSelect.png


BIN
src/image/examineUnSelect.png


BIN
src/image/my.png


BIN
src/image/myselect.png


+ 1 - 1
src/pages/egressDetails/index.jsx

@@ -449,7 +449,7 @@ class EgressDetails extends Component {
             {
               dtails.assistAidName != null && dtails.assistAidName != "" &&
               <View className="item">
-                <View className="title" style={{ color: "red" }}>技术协单</View>
+                <View className="title" style={{ color: "red" }}>技术协单(技术协单,将统计相关的公出成本等)</View>
                 <View className="value">{dtails.assistAidName.replace(/,/g, " ")}</View>
               </View>
             }

+ 102 - 676
src/pages/examine/index.jsx

@@ -30,7 +30,13 @@ class Examine extends Component {
   constructor(props) {
     super(props);
     this.state = {
+      typeList: [
+        { title: '审核', type: 1 },
+        { title: '查看公出', type: 2 },
+        { title: '查看协单', type: 3 }],
       current: 0,
+      isPickerRender: false,
+      validDates: '',
 
       list: [],
       pageNo: 1,
@@ -41,60 +47,16 @@ class Examine extends Component {
       rangeStartVal: '',
       rangeEndMinuteVal: '',
       rangeStartMinuteVal: '',
-
-      examinelist: [],
-      examinePageNo: 1,
-      examineListState: 'LOADING',
-      starts1: {},
-      clockInStarts1: '',
-      rangeEndVal1: '',
-      rangeStartVal1: '',
-      rangeEndMinuteVal1: '',
-      rangeStartMinuteVal1: '',
-
-      seeList: [],
-      seePageNo: 1,
-      seeListState: 'LOADING',
-      starts2: {},
-      clockInStarts2: '',
-      rangeEndVal2: '',
-      rangeStartVal2: '',
-      rangeEndMinuteVal2: '',
-      rangeStartMinuteVal2: '',
-
-      coList: [],
-      coPageNo: 1,
-      coListState: 'LOADING',
-      starts3: {},
-      clockInStarts3: '',
-      rangeEndVal3: '',
-      rangeStartVal3: '',
-      rangeEndMinuteVal3: '',
-      rangeStartMinuteVal3: '',
-
-      isPickerRender: false,
-      validDates: ''
     }
     this.getPublicReleaseList = this.getPublicReleaseList.bind(this);
     this.getMyList = this.getMyList.bind(this);
-    this.getExamineList = this.getExamineList.bind(this);
-    this.getSeeList = this.getSeeList.bind(this);
     this.onSetPickerTime = this.onSetPickerTime.bind(this);
     this.onPickerHide = this.onPickerHide.bind(this)
   }
 
   componentDidShow() {
     Taro.eventCenter.on('listOperation', (data) => {
-      if (data.type === 1 && (!isNaN(parseInt(data.index)))) {
-        let arr = this.state.examinelist.concat([]);
-        arr[data.index] = {
-          ...arr[data.index],
-          ...data
-        }
-        this.setState({
-          examinelist: arr
-        })
-      } else if (data.type === 0 && (!isNaN(parseInt(data.index)))) {
+      if (!isNaN(parseInt(data.index))) {
         let arr = this.state.list.concat([]);
         arr[data.index] = {
           ...arr[data.index],
@@ -103,24 +65,6 @@ class Examine extends Component {
         this.setState({
           list: arr
         })
-      } else if (data.type === 2 && (!isNaN(parseInt(data.index)))) {
-        let arr = this.state.seeList.concat([]);
-        arr[data.index] = {
-          ...arr[data.index],
-          ...data
-        }
-        this.setState({
-          seeList: arr
-        })
-      } else if (data.type === 3 && (!isNaN(parseInt(data.index)))) {
-        let arr = this.state.coList.concat([]);
-        arr[data.index] = {
-          ...arr[data.index],
-          ...data
-        }
-        this.setState({
-          coList: arr
-        })
       }
     })
   }
@@ -151,65 +95,33 @@ class Examine extends Component {
 
   async onSetPickerTime(val) {
     let data = val.detail;
-    if (this.state.current === 0) {
-      await this.setState({
-        rangeStartMinuteVal: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
-        rangeEndMinuteVal: dayjs(data.selectEndTime).format("YYYY-MM-DD")
-      })
-      await this.getMyList(1);
-    } else if (this.state.current === 1) {
-      await this.setState({
-        rangeStartMinuteVal1: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
-        rangeEndMinuteVal1: dayjs(data.selectEndTime).format("YYYY-MM-DD")
-      })
-      await this.getExamineList(1);
-    } else if (this.state.current === 2) {
-      await this.setState({
-        rangeStartMinuteVal2: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
-        rangeEndMinuteVal2: dayjs(data.selectEndTime).format("YYYY-MM-DD")
-      })
-      await this.getSeeList(1);
-    } else if (this.state.current === 3) {
-      await this.setState({
-        rangeStartMinuteVal3: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
-        rangeEndMinuteVal3: dayjs(data.selectEndTime).format("YYYY-MM-DD")
-      })
-      await this.getSeeList(1);
-    }
+    await this.setState({
+      rangeStartMinuteVal: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
+      rangeEndMinuteVal: dayjs(data.selectEndTime).format("YYYY-MM-DD")
+    })
+    await this.getMyList(1);
   }
 
   async onTabTap() {
     await this.getMyList(1);
-    await this.getExamineList(1);
-    await this.getSeeList(1);
-    await this.grtCoOrder(1);
   }
 
   async getPublicReleaseList(lv) {
-    if (this.state.current === 0) {
-      await this.getMyList(lv ? this.state.pageNo + 1 : 1);
-      Taro.stopPullDownRefresh();
-    } else if (this.state.current === 1) {
-      await this.getExamineList(lv ? this.state.examinePageNo + 1 : 1);
-      Taro.stopPullDownRefresh();
-    } else if (this.state.current === 2) {
-      await this.getSeeList(lv ? this.state.seePageNo + 1 : 1);
-      Taro.stopPullDownRefresh();
-    } else if (this.state.current === 3) {
-      await this.grtCoOrder(lv ? this.state.coPageNo + 1 : 1);
-      Taro.stopPullDownRefresh();
-    }
+    await this.getMyList(lv ? this.state.pageNo + 1 : 1);
+    Taro.stopPullDownRefresh();
   }
 
   async getMyList(pageNo) {
+    const { current } = this.state
     this.setState({
       listState: 'LOADING'
     })
     let data = {
       pageNo: pageNo,
       pageSize: 10,
-      type: '0',
-
+      type: current === 0
+        ? "1" : current === 1
+          ? "2" : current === 2 && "3",
       releaseStarts: this.state.rangeStartMinuteVal || undefined,
       releaseEnds: this.state.rangeEndMinuteVal || undefined,
       status: isNaN(parseInt(this.state.starts.id)) ? undefined : String(this.state.starts.id),
@@ -252,159 +164,6 @@ class Examine extends Component {
     Taro.stopPullDownRefresh();
   }
 
-  async getExamineList(pageNo) {
-    this.setState({
-      examineListState: 'LOADING'
-    })
-    let data = {
-      pageNo: pageNo,
-      pageSize: 10,
-      type: '1',
-
-      releaseStarts: this.state.rangeStartMinuteVal1 || null,
-      releaseEnds: this.state.rangeEndMinuteVal1 || null,
-      status: isNaN(parseInt(this.state.starts1.id)) ? undefined : String(this.state.starts1.id),
-      clockIn: this.state.clockInStarts1 || null,
-      userName: this.state.searchValue1 || undefined,
-    }
-    for (let i in data) {
-      if (!data[i]) {
-        delete data[i]
-      }
-    }
-    let msg = await getPublicReleaseList(data);
-    if (msg.error.length === 0) {
-      if (msg.data.totalCount === 0) {
-        this.setState({
-          examineListState: 'NO_DATA'
-        })
-      } else if (msg.data.totalCount === this.state.examinelist.length && pageNo !== 1) {
-        Taro.showToast({ title: '没有更多数据了', icon: 'none' });
-        this.setState({
-          examineListState: 'NO_MORE_DATA'
-        })
-      } else {
-        if (msg.data.totalCount === (pageNo === 1 ? msg.data.list : this.state.examinelist.concat(msg.data.list)).length) {
-          this.setState({
-            examineListState: 'NO_MORE_DATA'
-          })
-        }
-      }
-      this.setState({
-        examinelist: pageNo === 1 ? msg.data.list : this.state.examinelist.concat(msg.data.list),
-        examinePageNo: msg.data.pageNo
-      })
-    } else {
-      Taro.showToast({ title: msg.error[0].message, icon: 'none' });
-      this.setState({
-        examineListState: msg.error[0].field === '403' ? 'NO_DATA' : 'RELOAD'
-      })
-    }
-    Taro.stopPullDownRefresh();
-  }
-  // 查看
-  async getSeeList(pageNo) {
-    this.setState({
-      seeListState: 'LOADING',
-    })
-    let data = {
-      pageNo: pageNo,
-      pageSize: 10,
-      type: '2',
-
-      releaseStarts: this.state.rangeStartMinuteVal2 || null,
-      releaseEnds: this.state.rangeEndMinuteVal2 || null,
-      status: isNaN(parseInt(this.state.starts2.id)) ? undefined : String(this.state.starts2.id),
-      clockIn: this.state.clockInStarts2 || null,
-      userName: this.state.searchValue2 || undefined,
-    }
-    for (let i in data) {
-      if (!data[i]) {
-        delete data[i]
-      }
-    }
-    let msg = await getPublicReleaseList(data);
-    if (msg.error.length === 0) {
-      if (msg.data.totalCount === 0) {
-        this.setState({
-          seeListState: 'NO_DATA'
-        })
-      } else if (msg.data.totalCount === this.state.seeList.length && pageNo !== 1) {
-        Taro.showToast({ title: '没有更多数据了', icon: 'none' });
-        this.setState({
-          seeListState: 'NO_MORE_DATA'
-        })
-      } else {
-        if (msg.data.totalCount === (pageNo === 1 ? msg.data.list : this.state.seeList.concat(msg.data.list)).length) {
-          this.setState({
-            seeListState: 'NO_MORE_DATA'
-          })
-        }
-      }
-      this.setState({
-        seeList: pageNo === 1 ? msg.data.list : this.state.seeList.concat(msg.data.list),
-        seePageNo: msg.data.pageNo
-      })
-    } else {
-      Taro.showToast({ title: msg.error[0].message, icon: 'none' });
-      this.setState({
-        seeListState: msg.error[0].field === '403' ? 'NO_DATA' : 'RELOAD'
-      })
-    }
-    Taro.stopPullDownRefresh();
-  }
-
-  async grtCoOrder(pageNo) {
-    this.setState({
-      coListState: 'LOADING',
-    })
-    let data = {
-      pageNo: pageNo,
-      pageSize: 10,
-      type: '3',
-
-      releaseStarts: this.state.rangeStartMinuteVal3 || null,
-      releaseEnds: this.state.rangeEndMinuteVal3 || null,
-      status: isNaN(parseInt(this.state.starts3.id)) ? undefined : String(this.state.starts3.id),
-      clockIn: this.state.clockInStarts3 || null,
-      userName: this.state.searchValue3 || undefined,
-    }
-    for (let i in data) {
-      if (!data[i]) {
-        delete data[i]
-      }
-    }
-    let msg = await getPublicReleaseList(data);
-    if (msg.error.length === 0) {
-      if (msg.data.totalCount === 0) {
-        this.setState({
-          coListState: 'NO_DATA'
-        })
-      } else if (msg.data.totalCount === this.state.coList.length && pageNo !== 1) {
-        Taro.showToast({ title: '没有更多数据了', icon: 'none' });
-        this.setState({
-          coListState: 'NO_MORE_DATA'
-        })
-      } else {
-        if (msg.data.totalCount === (pageNo === 1 ? msg.data.list : this.state.coList.concat(msg.data.list)).length) {
-          this.setState({
-            coListState: 'NO_MORE_DATA'
-          })
-        }
-      }
-      this.setState({
-        coList: pageNo === 1 ? msg.data.list : this.state.coList.concat(msg.data.list),
-        coPageNo: msg.data.pageNo
-      })
-    } else {
-      Taro.showToast({ title: msg.error[0].message, icon: 'none' });
-      this.setState({
-        coListState: msg.error[0].field === '403' ? 'NO_DATA' : 'RELOAD'
-      })
-    }
-    Taro.stopPullDownRefresh();
-  }
-
   onPageScroll(event) {
     let touchMove = event.scrollTop;
     if (touchMove >= 37) {
@@ -427,47 +186,19 @@ class Examine extends Component {
             <AtSearchBar
               showActionButton
               placeholder='请输入企业名称'
-              value={this.state.current === 0 ? this.state.searchValue : this.state.current === 1 ? this.state.searchValue1 : this.state.searchValue2}
+              value={this.state.searchValue}
               onActionClick={() => {
                 this.getPublicReleaseList();
               }}
               onChange={(value) => {
-                if (this.state.current === 0) {
-                  this.setState({
-                    searchValue: value
-                  })
-                } else if (this.state.current === 1) {
-                  this.setState({
-                    searchValue1: value
-                  })
-                } else if (this.state.current === 2) {
-                  this.setState({
-                    searchValue2: value
-                  })
-                } else if (this.state.current === 3) {
-                  this.setState({
-                    searchValue3: value
-                  })
-                }
+                this.setState({
+                  searchValue: value
+                })
               }}
               onClear={() => {
-                if (this.state.current === 0) {
-                  this.setState({
-                    searchValue: ''
-                  })
-                } else if (this.state.current === 1) {
-                  this.setState({
-                    searchValue1: ''
-                  })
-                } else if (this.state.current === 2) {
-                  this.setState({
-                    searchValue2: ''
-                  })
-                } else if (this.state.current === 3) {
-                  this.setState({
-                    searchValue3: ''
-                  })
-                }
+                this.setState({
+                  searchValue: ''
+                })
               }}
             />
           </View>
@@ -475,137 +206,60 @@ class Examine extends Component {
             <View className='searchBottom'>
               <View className='searchItem' style={{ paddingLeft: '5px' }}>
                 <Picker
-                  value={this.state.current === 0
-                    ? this.state.starts.id : this.state.current === 1
-                      ? this.state.starts1.id : this.state.current === 2
-                        ? this.state.starts2.id : this.state.current === 3 && this.state.starts3.id}
-                  range={clockState} rangeKey='title' mode='selector' onChange={(e) => {
-                    if (this.state.current === 0) {
-                      this.setState({
-                        starts: clockState[e.detail.value],
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    } else if (this.state.current === 1) {
-                      this.setState({
-                        starts1: clockState[e.detail.value],
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    } else if (this.state.current === 2) {
-                      this.setState({
-                        starts2: clockState[e.detail.value],
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    } else if (this.state.current === 3) {
-                      this.setState({
-                        starts3: clockState[e.detail.value],
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    }
+                  value={this.state.starts.id}
+                  range={clockState} rangeKey='title' mode='selector'
+                  onChange={(e) => {
+                    this.setState({
+                      starts: clockState[e.detail.value],
+                    }, () => {
+                      this.getPublicReleaseList();
+                    })
                   }}>
                   {
-                    (this.state.current === 0 && !this.state.starts.title) ||
-                      (this.state.current === 1 && !this.state.starts1.title) ||
-                      (this.state.current === 2 && !this.state.starts2.title) ||
-                      (this.state.current === 3 && !this.state.starts3.title) ?
+                    !this.state.starts.title ?
                       <View className='shortValuecontent'>
                         <View className='selectTitle'>审核状态</View>
                         <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
                       </View> :
                       <View className='shortValuecontent'>
                         <View className='selectValue'>
-                          {this.state.current === 0
-                            ? this.state.starts.title : this.state.current === 1
-                              ? this.state.starts1.title : this.state.current === 2
-                                ? this.state.starts2.title : this.state.current === 3 && this.state.starts3.title}
+                          {this.state.starts.title}
                         </View>
                         <View className='iconContent' />
                       </View>
                   }
                 </Picker>
                 {
-                  (this.state.current === 0 && this.state.starts.title) ||
-                    (this.state.current === 1 && this.state.starts1.title) ||
-                    (this.state.current === 2 && this.state.starts2.title) ||
-                    (this.state.current === 3 && this.state.starts3.title) ?
-                    <View className='searchSelectContent'>
-                      <View className='selectIcon' onClick={(e) => {
+                  this.state.starts.title &&
+                  <View className='searchSelectContent'>
+                    <View className='selectIcon'
+                      onClick={(e) => {
                         e.stopPropagation();
-                        if (this.state.current === 0) {
-                          this.setState({
-                            starts: {}
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 1) {
-                          this.setState({
-                            starts1: {}
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 2) {
-                          this.setState({
-                            starts2: {}
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 3) {
-                          this.setState({
-                            starts3: {}
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        }
+                        this.setState({
+                          starts: {}
+                        }, () => {
+                          this.getPublicReleaseList();
+                        })
                       }}>
-                        <AtIcon value='close-circle' size='10' color='#FFFFFF' />
-                      </View>
-                    </View> : null
+                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
+                    </View>
+                  </View>
                 }
               </View>
               <View className='searchItem' >
                 <Picker
-                  value={this.state.current === 0
-                    ? this.state.clockInStarts : this.state.current === 1
-                      ? this.state.clockInStarts1 : this.state.current === 2
-                        ? this.state.clockInStarts2 : this.state.current === 3 && this.state.clockInStarts3}
-                  range={[
-                    '未打卡',
-                    '已打卡'
-                  ]} mode='selector' onChange={(e) => {
-                    if (this.state.current === 0) {
-                      this.setState({
-                        clockInStarts: String(e.detail.value)
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    } else if (this.state.current === 1) {
-                      this.setState({
-                        clockInStarts1: String(e.detail.value)
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    } else if (this.state.current === 2) {
-                      this.setState({
-                        clockInStarts2: String(e.detail.value)
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    } else if (this.state.current === 3) {
-                      this.setState({
-                        clockInStarts3: String(e.detail.value)
-                      }, () => {
-                        this.getPublicReleaseList();
-                      })
-                    }
+                  value={this.state.clockInStarts}
+                  range={['未打卡', '已打卡']}
+                  mode='selector'
+                  onChange={(e) => {
+                    this.setState({
+                      clockInStarts: String(e.detail.value)
+                    }, () => {
+                      this.getPublicReleaseList();
+                    })
                   }}>
                   {
-                    (this.state.current === 0 && !this.state.clockInStarts) ||
-                      (this.state.current === 1 && !this.state.clockInStarts1) ||
-                      (this.state.current === 2 && !this.state.clockInStarts2) ||
-                      (this.state.current === 3 && !this.state.clockInStarts3) ?
+                    !this.state.clockInStarts ?
                       <View className='shortValuecontent'>
                         <View className='selectTitle'>打卡状态</View>
                         <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
@@ -613,23 +267,9 @@ class Examine extends Component {
                       <View className='shortValuecontent'>
                         <View className='selectValue'>
                           {
-                            this.state.current === 0
-                              ? (
-                                this.state.clockInStarts === '1' ? '已打卡' :
-                                  this.state.clockInStarts === '0' ? '未打卡' : ''
-                              ) :
-                              this.state.current === 1
-                                ? (
-                                  this.state.clockInStarts1 === '1' ? '已打卡' :
-                                    this.state.clockInStarts1 === '0' ? '未打卡' : ''
-                                ) :
-                                this.state.current === 2
-                                  ? (
-                                    this.state.clockInStarts2 === '1' ? '已打卡' :
-                                      this.state.clockInStarts3 === '0' ? '未打卡' : ''
-                                  ) :
-                                  this.state.clockInStarts3 === '1' ? '已打卡' :
-                                    this.state.clockInStarts4 === '0' ? '未打卡' : ''
+                            this.state.clockInStarts === '1'
+                              ? '已打卡' : this.state.clockInStarts === '0'
+                                ? '未打卡' : ''
                           }
                         </View>
                         <View className='iconContent' />
@@ -637,39 +277,17 @@ class Examine extends Component {
                   }
                 </Picker>
                 {
-                  (this.state.current === 0 && this.state.clockInStarts) ||
-                    (this.state.current === 1 && this.state.clockInStarts1) ||
-                    (this.state.current === 2 && this.state.clockInStarts2) ||
-                    (this.state.current === 3 && this.state.clockInStarts3) ?
+                  this.state.clockInStarts ?
                     <View className='searchSelectContent'>
-                      <View className='selectIcon' onClick={(e) => {
-                        e.stopPropagation();
-                        if (this.state.current === 0) {
+                      <View className='selectIcon'
+                        onClick={(e) => {
+                          e.stopPropagation();
                           this.setState({
                             clockInStarts: '',
                           }, () => {
                             this.getPublicReleaseList();
                           })
-                        } else if (this.state.current === 1) {
-                          this.setState({
-                            clockInStarts1: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 2) {
-                          this.setState({
-                            clockInStarts2: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 3) {
-                          this.setState({
-                            clockInStarts3: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        }
-                      }}>
+                        }}>
                         <AtIcon value='close-circle' size='10' color='#FFFFFF' />
                       </View>
                     </View> : null
@@ -684,66 +302,35 @@ class Examine extends Component {
               }}>
                 <View>
                   {
-                    (this.state.current === 0 && !this.state.rangeStartMinuteVal) ||
-                      (this.state.current === 1 && !this.state.rangeStartMinuteVal1) ||
-                      (this.state.current === 2 && !this.state.rangeStartMinuteVal2) ||
-                      (this.state.current === 3 && !this.state.rangeStartMinuteVal3) ?
+                    !this.state.rangeStartMinuteVal ?
                       <View className='valuecontent' style={{ width: '200px' }}>
                         <View className='selectTitle' style={{ paddingLeft: '50px' }}>开始及结束时间</View>
                         <View className='iconContent' style={{ paddingLeft: '20px' }}><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
                       </View> :
                       <View className='valuecontent' style={{ width: '200px' }}>
                         <View className='selectValue' >
-                          {this.state.current === 0
-                            ? this.state.rangeStartMinuteVal + "~" + this.state.rangeEndMinuteVal : this.state.current === 1
-                              ? this.state.rangeStartMinuteVal1 + "~" + this.state.rangeEndMinuteVal1 : this.state.current === 2
-                                ? this.state.rangeStartMinuteVal2 + "~" + this.state.rangeEndMinuteVal2 : this.state.rangeStartMinuteVal3 + "~" + this.state.rangeEndMinuteVal3}
+                          {this.state.rangeStartMinuteVal + "~" + this.state.rangeEndMinuteVal}
                         </View>
                         <View className='iconContent' />
                       </View>
                   }
                 </View>
                 {
-                  (this.state.current === 0 && this.state.rangeStartMinuteVal) ||
-                    (this.state.current === 1 && this.state.rangeStartMinuteVal1) ||
-                    (this.state.current === 2 && this.state.rangeStartMinuteVal2) ||
-                    (this.state.current === 3 && this.state.rangeStartMinuteVal3) ?
-                    <View className='searchSelectContent'>
-                      <View className='selectIcon' onClick={(e) => {
+                  this.state.rangeStartMinuteVal &&
+                  <View className='searchSelectContent'>
+                    <View className='selectIcon'
+                      onClick={(e) => {
                         e.stopPropagation();
-                        if (this.state.current === 0) {
-                          this.setState({
-                            rangeStartMinuteVal: '',
-                            rangeEndMinuteVal: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 1) {
-                          this.setState({
-                            rangeStartMinuteVal1: '',
-                            rangeEndMinuteVal1: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 2) {
-                          this.setState({
-                            rangeStartMinuteVal2: '',
-                            rangeEndMinuteVal2: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if (this.state.current === 3) {
-                          this.setState({
-                            rangeStartMinuteVal3: '',
-                            rangeEndMinuteVal3: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        }
+                        this.setState({
+                          rangeStartMinuteVal: '',
+                          rangeEndMinuteVal: '',
+                        }, () => {
+                          this.getPublicReleaseList();
+                        })
                       }}>
-                        <AtIcon value='close-circle' size='10' color='#FFFFFF' />
-                      </View>
-                    </View> : null
+                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
+                    </View>
+                  </View>
                 }
               </View>
               <timePicker
@@ -751,8 +338,6 @@ class Examine extends Component {
                   endDate: true,
                   column: "minute",
                   dateLimit: false,
-                  // initStartTime: "2019-01-01 12:32:44", //默认开始时间
-                  // initEndTime: "2019-12-01 12:32:44",   //默认结束时间
                   limitStartTime: dayjs().subtract(3, 'year').format('YYYY-MM-DD '),
                   limitEndTime: dayjs().add(3, 'year').format('YYYY-MM-DD ')
                 }}
@@ -776,198 +361,39 @@ class Examine extends Component {
                   this.onSetPickerTime(v)
                 }}>
               </timePicker>
-              {/* <View className='searchItem'>
-                <Picker mode='date' onChange={(e) => {
-                  if (this.state.current === 0) {
-                    this.setState({
-                      rangeStartVal: e.detail.value,
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  } else if(this.state.current === 1) {
-                    this.setState({
-                      rangeStartVal1: e.detail.value,
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  } else if(this.state.current === 2) {
-                    this.setState({
-                      rangeStartVal2: e.detail.value,
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  }
-                }}>
-                  {
-                    (this.state.current === 0 && !this.state.rangeStartVal) || (this.state.current === 1 && !this.state.rangeStartVal1) || 
-                    (this.state.current === 2 && !this.state.rangeStartVal2) ?
-                      <View className='valuecontent'>
-                        <View className='selectTitle'>开始时间</View>
-                        <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
-                      </View> :
-                      <View className='valuecontent'>
-                        <View className='selectValue'>
-                          {this.state.current === 0 ? this.state.rangeStartVal : this.state.current === 1 ? this.state.rangeStartVal1 : this.state.rangeStartVal2}
-                        </View>
-                        <View className='iconContent' />
-                      </View>
-                  }
-                </Picker>
-                {
-                  (this.state.current === 0 && this.state.rangeStartVal) || (this.state.current === 1 && this.state.rangeStartVal1) 
-                  || (this.state.current === 2 && this.state.rangeStartVal2) ?
-                    <View className='searchSelectContent'>
-                      <View className='selectIcon' onClick={(e) => {
-                        e.stopPropagation();
-                        if (this.state.current === 0) {
-                          this.setState({
-                            rangeStartVal: ''
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if(this.state.current === 1) {
-                          this.setState({
-                            rangeStartVal1: ''
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if(this.state.current === 2) {
-                          this.setState({
-                            rangeStartVal2: ''
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        }
-                      }}>
-                        <AtIcon value='close-circle' size='10' color='#FFFFFF' />
-                      </View>
-                    </View> : null
-                }
-              </View> */}
-              {/* <View className='searchItem' style={{ marginRight: '5px' }}>
-                <Picker mode='date' onChange={(e) => {
-                  if (this.state.current === 0) {
-                    this.setState({
-                      rangeEndVal: e.detail.value,
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  } else if(this.state.current === 1){
-                    this.setState({
-                      rangeEndVal1: e.detail.value,
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  } else if(this.state.current === 2) {
-                    this.setState({
-                      rangeEndVal2: e.detail.value,
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  }
-                }}>
-                  {
-                    (this.state.current === 0 && !this.state.rangeEndVal) || (this.state.current === 1 && !this.state.rangeEndVal1) || (this.state.current === 2 && !this.state.rangeEndVal2) ?
-                      <View className='valuecontent'>
-                        <View className='selectTitle'>结束时间</View>
-                        <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
-                      </View> :
-                      <View className='valuecontent'>
-                        <View className='selectValue'>
-                          {this.state.current === 0 ? this.state.rangeEndVal :  this.state.current === 1 ? this.state.rangeEndVal1 : this.state.rangeEndVal2}
-                        </View>
-                        <View className='iconContent' />
-                      </View>
-                  }
-                </Picker>
-                {
-                  (this.state.current === 0 && this.state.rangeEndVal) || (this.state.current === 1 && this.state.rangeEndVal1) || (this.state.current === 2 && this.state.rangeEndVal2) ?
-                    <View className='searchSelectContent'>
-                      <View className='selectIcon' onClick={(e) => {
-                        e.stopPropagation();
-                        if (this.state.current === 0) {
-                          this.setState({
-                            rangeEndVal: ''
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        } else if(this.state.current === 1) {
-                          this.setState({
-                            rangeEndVal1: ''
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        }else if(this.state.current === 2) {
-                          this.setState({
-                            rangeEndVal2: ''
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        }
-                      }}>
-                        <AtIcon value='close-circle' size='10' color='#FFFFFF' />
-                      </View>
-                    </View> : null
-                }
-              </View> */}
             </View>
           </ScrollView>
         </View>
         <AtTabs
           current={this.state.current || 0}
-          tabList={[{ title: '我的' }, { title: '审核' }, { title: '查看' }, { title: '协单' }]}
+          tabList={this.state.typeList}
           onClick={(current) => {
             this.setState({
+              pageNo: 1,
               current,
             }, () => {
-              if ((current === 0 && this.state.pageNo === 1) ||
-                (current === 1 && this.state.examinePageNo === 1) ||
-                (current === 2 && this.state.seePageNo === 1) ||
-                (current === 3 && this.state.coPageNo === 1)) {
-                this.getPublicReleaseList();
-              }
+              this.getPublicReleaseList();
             })
           }}>
-          <AtTabsPane current={this.state.current} index={0} >
-            <MyList
-              type={0}
-              seeView={this.state.current}
-              list={this.state.list}
-              listState={this.state.listState}
-              onRefresh={() => {
-                this.getPublicReleaseList(true);
-              }} />
-          </AtTabsPane>
-          <AtTabsPane current={this.state.current} index={1}>
-            <MyList
-              type={1}
-              seeView={this.state.current}
-              list={this.state.examinelist}
-              listState={this.state.examineListState}
-              onRefresh={() => {
-                this.getPublicReleaseList(true);
-              }} />
-          </AtTabsPane>
-          <AtTabsPane current={this.state.current} index={2}>
-            <MyList
-              type={2}
-              seeView={this.state.current}
-              list={this.state.seeList}
-              listState={this.state.seeListState}
-              onRefresh={() => {
-                this.getPublicReleaseList(true);
-              }} />
-          </AtTabsPane>
-          <AtTabsPane current={this.state.current} index={3}>
-            <MyList
-              type={3}
-              seeView={this.state.current}
-              list={this.state.coList}
-              listState={this.state.coListState}
-              onRefresh={() => {
-                this.getPublicReleaseList(true);
-              }} />
-          </AtTabsPane>
+          {
+            this.state.typeList?.map((item, index) =>
+              <AtTabsPane
+                key={item.type}
+                current={this.state.current}
+                index={index}
+              >
+                <MyList
+                  type={item.type}
+                  typelist={this.state.typeList}
+                  seeView={this.state.current}
+                  list={this.state.list}
+                  listState={this.state.listState}
+                  onRefresh={() => {
+                    this.getPublicReleaseList(true);
+                  }} />
+              </AtTabsPane>
+            )
+          }
         </AtTabs>
       </View>
     )

+ 3 - 13
src/pages/examine/myList.jsx

@@ -21,7 +21,7 @@ class MyList extends Component {
       <View className="indexPage">
         <View className="list">
           {this.props.list.length === 0 && this.props.listState === "LOADING"
-            ? [0, 1, 2, 3].map((v) => (
+            ? this.props.typelist?.map((v) => (
               <Skeleton key={v} title row={3} avatarShape="square" loading />
             ))
             : null}
@@ -31,17 +31,7 @@ class MyList extends Component {
               className="item"
               onClick={() => {
                 Taro.navigateTo({
-                  url:
-                    "/pages/egressDetails/index?id=" +
-                    v.id +
-                    "&index=" +
-                    k +
-                    "&status=" +
-                    seeView,
-                  // success: function (res) {
-                  //   // 通过eventChannel向被打开页面传送数据
-                  //   res.eventChannel.emit('seeView', { data:seeView })
-                  // }
+                  url: "/pages/egressDetails/index?id=" + v.id + "&index=" + k + "&status=" + seeView,
                 });
               }}
             >
@@ -68,7 +58,7 @@ class MyList extends Component {
                 </View>
                 <View className="releaseStarts">
                   开始时间:{v.releaseStarts}
-                  {(this.props.type === 0 || this.props.type === 3) && v.status !== 3 ? (
+                  {this.props.type === 0 && v.status !== 3 ? (
                     <View
                       className="punchClock"
                       onClick={(e) => {

+ 6 - 0
src/pages/mybusiness/index.config.js

@@ -0,0 +1,6 @@
+export default {
+  navigationBarTitleText: '我的',
+  usingComponents: {
+    timePicker: '../../components/common/timePicker/timePicker'
+  }
+}

+ 400 - 0
src/pages/mybusiness/index.jsx

@@ -0,0 +1,400 @@
+import React, { Component } from 'react';
+import Taro from '@tarojs/taro';
+import { View, Picker, ScrollView } from '@tarojs/components'
+import { getPublicReleaseList } from '../../utils/servers/servers';
+import dayjs from 'dayjs';
+import {
+  AtSearchBar,
+  AtTabs,
+  AtTabsPane,
+  AtList,
+  AtListItem,
+  AtIcon
+} from 'taro-ui';
+import { clockState } from '../../utils/tools/config';
+
+import './index.less';
+
+import 'taro-ui/dist/style/components/tabs.scss';
+import "taro-ui/dist/style/components/flex.scss";
+import "taro-ui/dist/style/components/action-sheet.scss";
+import "taro-ui/dist/style/components/icon.scss";
+import "taro-ui/dist/style/components/list.scss";
+import "taro-ui/dist/style/components/icon.scss";
+
+import MyList from '../examine/myList';
+import MessageNoticebar from "../../components/common/messageNoticebar";
+
+class Examine extends Component {
+
+  constructor(props) {
+    super(props);
+    this.state = {
+      typeList: [
+        { title: '我的公出' },
+        { title: '我的协单' }],
+      current: 0,
+      isPickerRender: false,
+      validDates: '',
+
+      list: [],
+      pageNo: 1,
+      listState: 'LOADING',
+      starts: {},
+      clockInStarts: '',
+      rangeEndVal: '',
+      rangeStartVal: '',
+      rangeEndMinuteVal: '',
+      rangeStartMinuteVal: '',
+    }
+    this.getPublicReleaseList = this.getPublicReleaseList.bind(this);
+    this.getMyList = this.getMyList.bind(this);
+    this.onSetPickerTime = this.onSetPickerTime.bind(this);
+    this.onPickerHide = this.onPickerHide.bind(this)
+  }
+
+  componentDidShow() {
+    Taro.eventCenter.on('listOperation', (data) => {
+      if (!isNaN(parseInt(data.index))) {
+        let arr = this.state.list.concat([]);
+        arr[data.index] = {
+          ...arr[data.index],
+          ...data
+        }
+        this.setState({
+          list: arr
+        })
+      }
+    })
+  }
+
+  async componentDidMount() {
+    await this.getPublicReleaseList();
+  }
+
+  onPullDownRefresh() {
+    this.getPublicReleaseList();
+  }
+
+  onReachBottom() {
+    this.getPublicReleaseList(true);
+  }
+
+  onTabItemTap(obj) {
+    if (obj.index === 1) {
+      this.onTabTap();
+    }
+  }
+
+  onPickerHide() {
+    this.setState({
+      isPickerRender: false,
+    });
+  }
+
+  async onSetPickerTime(val) {
+    let data = val.detail;
+    await this.setState({
+      rangeStartMinuteVal: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
+      rangeEndMinuteVal: dayjs(data.selectEndTime).format("YYYY-MM-DD")
+    })
+    await this.getMyList(1);
+  }
+
+  async onTabTap() {
+    await this.getMyList(1);
+  }
+
+  async getPublicReleaseList(lv) {
+    await this.getMyList(lv ? this.state.pageNo + 1 : 1);
+    Taro.stopPullDownRefresh();
+  }
+
+  async getMyList(pageNo) {
+    this.setState({
+      listState: 'LOADING'
+    })
+    let data = {
+      pageNo: pageNo,
+      pageSize: 10,
+      type: '0',
+      assist: this.state.current === 0 ? 0 : 2,
+      releaseStarts: this.state.rangeStartMinuteVal || undefined,
+      releaseEnds: this.state.rangeEndMinuteVal || undefined,
+      status: isNaN(parseInt(this.state.starts.id)) ? undefined : String(this.state.starts.id),
+      clockIn: this.state.clockInStarts || undefined,
+      userName: this.state.searchValue || undefined,
+    }
+    for (let i in data) {
+      if (!data[i]) {
+        delete data[i]
+      }
+    }
+    let msg = await getPublicReleaseList(data);
+    if (msg.error.length === 0) {
+      if (msg.data.totalCount === 0) {
+        this.setState({
+          listState: 'NO_DATA'
+        })
+      } else if (msg.data.totalCount === this.state.list.length && pageNo !== 1) {
+        Taro.showToast({ title: '没有更多数据了', icon: 'none' });
+        this.setState({
+          listState: 'NO_MORE_DATA'
+        })
+      } else {
+        if (msg.data.totalCount === (pageNo === 1 ? msg.data.list : this.state.list.concat(msg.data.list)).length) {
+          this.setState({
+            listState: 'NO_MORE_DATA'
+          })
+        }
+      }
+      this.setState({
+        list: pageNo === 1 ? msg.data.list : this.state.list.concat(msg.data.list),
+        pageNo: msg.data.pageNo
+      })
+    } else {
+      Taro.showToast({ title: msg.error[0].message, icon: 'none' });
+      this.setState({
+        listState: msg.error[0].field === '403' ? 'NO_DATA' : 'RELOAD'
+      })
+    }
+    Taro.stopPullDownRefresh();
+  }
+
+  onPageScroll(event) {
+    let touchMove = event.scrollTop;
+    if (touchMove >= 37) {
+      this.setState({
+        openSearch: true
+      })
+    } else {
+      this.setState({
+        openSearch: false
+      })
+    }
+  }
+
+  render() {
+    return (
+      <View className='indexPage' >
+        <MessageNoticebar />
+        <View className='searchContent'>
+          <View className='searchTop'>
+            <AtSearchBar
+              showActionButton
+              placeholder='请输入企业名称'
+              value={this.state.searchValue}
+              onActionClick={() => {
+                this.getPublicReleaseList();
+              }}
+              onChange={(value) => {
+                this.setState({
+                  searchValue: value
+                })
+              }}
+              onClear={() => {
+                this.setState({
+                  searchValue: ''
+                })
+              }}
+            />
+          </View>
+          <ScrollView className={this.state.openSearch ? 'searchBottomLOL' : ''} scrollX style={{ width: '100%' }}>
+            <View className='searchBottom'>
+              <View className='searchItem' style={{ paddingLeft: '5px' }}>
+                <Picker
+                  value={this.state.starts.id}
+                  range={clockState} rangeKey='title' mode='selector'
+                  onChange={(e) => {
+                    this.setState({
+                      starts: clockState[e.detail.value],
+                    }, () => {
+                      this.getPublicReleaseList();
+                    })
+                  }}>
+                  {
+                    !this.state.starts.title ?
+                      <View className='shortValuecontent'>
+                        <View className='selectTitle'>审核状态</View>
+                        <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
+                      </View> :
+                      <View className='shortValuecontent'>
+                        <View className='selectValue'>
+                          {this.state.starts.title}
+                        </View>
+                        <View className='iconContent' />
+                      </View>
+                  }
+                </Picker>
+                {
+                  this.state.starts.title &&
+                  <View className='searchSelectContent'>
+                    <View className='selectIcon'
+                      onClick={(e) => {
+                        e.stopPropagation();
+                        this.setState({
+                          starts: {}
+                        }, () => {
+                          this.getPublicReleaseList();
+                        })
+                      }}>
+                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
+                    </View>
+                  </View>
+                }
+              </View>
+              <View className='searchItem' >
+                <Picker
+                  value={this.state.clockInStarts}
+                  range={['未打卡', '已打卡']}
+                  mode='selector'
+                  onChange={(e) => {
+                    this.setState({
+                      clockInStarts: String(e.detail.value)
+                    }, () => {
+                      this.getPublicReleaseList();
+                    })
+                  }}>
+                  {
+                    !this.state.clockInStarts ?
+                      <View className='shortValuecontent'>
+                        <View className='selectTitle'>打卡状态</View>
+                        <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
+                      </View> :
+                      <View className='shortValuecontent'>
+                        <View className='selectValue'>
+                          {
+                            this.state.clockInStarts === '1'
+                              ? '已打卡' : this.state.clockInStarts === '0'
+                                ? '未打卡' : ''
+                          }
+                        </View>
+                        <View className='iconContent' />
+                      </View>
+                  }
+                </Picker>
+                {
+                  this.state.clockInStarts ?
+                    <View className='searchSelectContent'>
+                      <View className='selectIcon'
+                        onClick={(e) => {
+                          e.stopPropagation();
+                          this.setState({
+                            clockInStarts: '',
+                          }, () => {
+                            this.getPublicReleaseList();
+                          })
+                        }}>
+                        <AtIcon value='close-circle' size='10' color='#FFFFFF' />
+                      </View>
+                    </View> : null
+                }
+              </View>
+              {/*  */}
+              {/* 多选时间框 */}
+              <View className='searchItem' onClick={() => {
+                this.setState({
+                  isPickerRender: true
+                })
+              }}>
+                <View>
+                  {
+                    !this.state.rangeStartMinuteVal ?
+                      <View className='valuecontent' style={{ width: '200px' }}>
+                        <View className='selectTitle' style={{ paddingLeft: '50px' }}>开始及结束时间</View>
+                        <View className='iconContent' style={{ paddingLeft: '20px' }}><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
+                      </View> :
+                      <View className='valuecontent' style={{ width: '200px' }}>
+                        <View className='selectValue' >
+                          {this.state.rangeStartMinuteVal + "~" + this.state.rangeEndMinuteVal}
+                        </View>
+                        <View className='iconContent' />
+                      </View>
+                  }
+                </View>
+                {
+                  this.state.rangeStartMinuteVal &&
+                  <View className='searchSelectContent'>
+                    <View className='selectIcon'
+                      onClick={(e) => {
+                        e.stopPropagation();
+                        this.setState({
+                          rangeStartMinuteVal: '',
+                          rangeEndMinuteVal: '',
+                        }, () => {
+                          this.getPublicReleaseList();
+                        })
+                      }}>
+                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
+                    </View>
+                  </View>
+                }
+              </View>
+              <timePicker
+                config={{
+                  endDate: true,
+                  column: "minute",
+                  dateLimit: false,
+                  limitStartTime: dayjs().subtract(3, 'year').format('YYYY-MM-DD '),
+                  limitEndTime: dayjs().add(3, 'year').format('YYYY-MM-DD ')
+                }}
+                isPartition
+                pickerShow={this.state.isPickerRender}
+                onconditionaljudgment={(v) => {
+                  // let a = dayjs(dayjs(v.detail.endTime).second(0).format('YYYY-MM-DD'));
+                  // let b = dayjs(dayjs().second(0).format('YYYY-MM-DD'))
+                  // if(a.isBefore(b)){
+                  //   Taro.showToast({
+                  //     title:'结束时间不能小于当前时间',
+                  //     icon:'none'
+                  //   })
+                  //   v.detail.setLv(false);
+                  // }
+                }}
+                onhidepicker={() => {
+                  this.onPickerHide()
+                }}
+                onsetpickertime={(v) => {
+                  this.onSetPickerTime(v)
+                }}>
+              </timePicker>
+            </View>
+          </ScrollView>
+        </View>
+        <AtTabs
+          current={this.state.current || 0}
+          tabList={this.state.typeList}
+          onClick={(current) => {
+            this.setState({
+              pageNo: 1,
+              current,
+            }, () => {
+              this.getPublicReleaseList();
+            })
+          }}>
+          {
+            this.state.typeList?.map((item, index) =>
+              <AtTabsPane
+                key={item.title}
+                current={this.state.current}
+                index={index}
+              >
+                <MyList
+                  type={0}
+                  typelist={this.state.typeList}
+                  seeView={this.state.current}
+                  list={this.state.list}
+                  listState={this.state.listState}
+                  onRefresh={() => {
+                    this.getPublicReleaseList(true);
+                  }} />
+              </AtTabsPane>
+            )
+          }
+        </AtTabs>
+      </View>
+    )
+  }
+}
+
+export default Examine

+ 254 - 0
src/pages/mybusiness/index.less

@@ -0,0 +1,254 @@
+.indexPage{
+  position: relative;
+  z-index: 1;
+  background: #F5F5F5;
+  min-height: calc(100vh - 52px);
+  .item-content__info-title{
+    font-size: 28px;
+    color: #9BA0AA;
+  }
+  .item-extra__info{
+    font-size: 28px;
+    color: #9BA0AA;
+  }
+  .at-list__item::after{
+    border-bottom: 0;
+  }
+  .at-list::after{
+    border-top: 0;
+  }
+  .indexPage .at-list::after{
+    border: 0;
+  }
+  .searchContent{
+    position: relative;
+    background: white;
+    .searchTop{
+      z-index: 1000;
+    }
+    .searchBottom{
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      background: #FFFFFF;
+      border-bottom-left-radius: 10px;
+      border-bottom-right-radius: 10px;
+      padding: 10px 0 10px 0;
+      .searchBottomBack{
+        position: fixed;
+        z-index: -1;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        top: 100px;
+        background: rgba(0,0,0,.7);
+      }
+      .searchItem{
+          position: relative;
+          font-size: 25px;
+          color: #FFFFFF;
+        .shortValuecontent{
+          position: relative;
+          display: flex;
+          align-items: center;
+          width: 155px;
+          background: #6190E8;
+          border-radius: 100px;
+          padding: 10px 0;
+          margin-right: 5px;
+          .selectValue{
+            width: 110px;
+            padding-left: 15px;
+            white-space: nowrap;
+          }
+          .selectTitle{
+            padding-left: 15px;
+            white-space: nowrap;
+            width: 110px;
+          }
+          .iconContent{
+            width: 45px;
+            padding-right: 20px;
+            text-align: right;
+          }
+        }
+        .valuecontent{
+          position: relative;
+          display: flex;
+          align-items: center;
+          width: 190px;
+          background: #6190E8;
+          border-radius: 100px;
+          padding: 10px 0;
+          margin-right: 5px;
+          .selectValue{
+            padding-left: 15px;
+            width: 145px;
+            white-space: nowrap;
+          }
+          .selectTitle{
+            padding-left: 15px;
+            white-space: nowrap;
+            width: 145px;
+          }
+          .iconContent{
+            width: 45px;
+            padding-right: 20px;
+            text-align: right;
+          }
+        }
+        .searchSelectContent{
+          position: absolute;
+          right: 0;
+          top: 0;
+          bottom: 0;
+          z-index: 1;
+          width: 45px;
+          padding-right: 20px;
+          text-align: right;
+          display: flex;
+          justify-content: flex-end;
+          align-items: center;
+          padding-bottom: 3px;
+        }
+        .closeIcon{
+          background: #F00;
+          width: 60px;
+          height: 46px;
+          display: flex;
+          padding-left: 20px;
+          align-items: center;
+        }
+      }
+    }
+    .searchBottomLOL{
+      position: fixed;
+      z-index: 1000;
+      top:0;
+      left: 0;
+      right: 0;
+      box-shadow: 0px 6px 27px 16px #8e8d8d;
+      background: #FFFFFF;
+    }
+  }
+  .list{
+    padding: 20px 23px 52px 23px;
+    .item{
+      border-radius: 6px;
+      padding: 31px;
+      background: #FFFFFF;
+      display: flex;
+      flex-flow: row nowrap;
+      margin-bottom: 17px;
+      position: relative;
+      overflow: hidden;
+      .revoke{
+        position: absolute;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        background: rgba(0,0,0,.7);
+        z-index: 999;
+        display: flex;
+        flex-flow: row nowrap;
+        align-items: center;
+        justify-content: center;
+        .revokeImg{
+          width: 250px;
+          height: 250px;
+        }
+      }
+      .infor{
+        width: 100%;
+        position: relative;
+        .title{
+          display: flex;
+          flex-flow: row nowrap;
+          justify-content: space-between;
+          align-items: center;
+          padding-bottom: 20px;
+          .aname{
+            flex: 1;
+            padding-right: 20px;
+            font-weight: bolder;
+            display: flex;
+            flex-direction: row;
+            align-items: center;
+            .aIcon{
+              background: #1E90FF;
+              color: white;
+              padding: 5px 8px;
+              border-radius: 4px;
+              margin-left: 10px;
+              font-size: 25px;
+            }
+          }
+          .createTimes{
+            font-size: 20px;
+            color: #999999;
+            white-space: nowrap;
+          }
+        }
+        .userName{
+          font-size: 25px;
+          color: #999999;
+          padding-bottom: 15px;
+        }
+        .releaseStarts{
+          font-size: 25px;
+          color: #999999;
+          padding-bottom: 15px;
+          display: flex;
+          flex-flow: row nowrap;
+          align-items: center;
+          justify-content: space-between;
+          position: relative;
+          .punchClock{
+            position: absolute;
+            border-bottom-left-radius: 100px;
+            border-top-left-radius: 100px;
+            padding: 20px 30px;
+            background: #f1662f;
+            color: white;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            right: -31px;
+            top: -10px;
+          }
+        }
+        .releaseEnds{
+          font-size: 25px;
+          color: #999999;
+          display: flex;
+          flex-flow: row nowrap;
+          align-items: center;
+          justify-content: space-between;
+          padding-bottom: 25px;
+        }
+        .coOder{
+          font-size: 25px;
+          color: #6eb173;
+          padding-bottom: 25px;
+        }
+        .bottomContent{
+          display: flex;
+          flex-flow: row nowrap;
+          justify-content: space-between;
+          align-items: center;
+          .status{
+            font-size: 28px;
+          }
+          .clockIn{
+            font-size: 28px;
+          }
+        }
+      }
+    }
+  }
+  .skeleton {
+    border-radius: 11px;
+    margin-bottom: 20px;
+  }
+}

+ 13 - 90
src/pages/punchClock/punchClocks.jsx

@@ -12,7 +12,7 @@ import ImagePicker from '../../components/common/imagePicker';
 
 import { add, minus, asyncAdd } from '../../actions/counter'
 
-import { getPublicReleaseList, publicReleaseClockIn } from '../../utils/servers/servers';
+import { getPublicReleaseList, publicReleaseClockIn, getPunchClockInfo } from '../../utils/servers/servers';
 
 import './index.less'
 
@@ -229,91 +229,23 @@ class PunchClocks extends Component {
     this.setState({
       loading: true
     })
-    // 获取最近的打卡信息
-    getPublicReleaseList({
-      type: 0,
-      clockTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
-    }).then(v => {
+    getPunchClockInfo().then(v => {
       if (v.error.length === 0) {
-        if (v.data.list.length === 0) {
-          // 如果没有数据,则选择 -我的列表- 的打卡信息
-          getPublicReleaseList({
-            type: 0,
-          }).then(value => {
-            if (value.error.length === 0) {
-              if (value.data.list.length === 0) {
-                // 如果 -我的列表- 也没数据,则选择 -协单列表- 的打卡信息
-                getPublicReleaseList({
-                  type: 3,
-                }).then(ve => {
-                  if (ve.error.length === 0) {
-                    if (ve.data.list.length === 0) {
-                      this.setState({
-                        dtails: {},
-                        loading: false
-                      })
-                    } else {
-                      this.setState({
-                        dtails: ve.data.list[0],
-                        addressLatitude: ve.data.list[0].latitude,
-                        addressLongitude: ve.data.list[0].longitude,
-                      }, () => {
-                        fn();
-                      })
-                    }
-                  } else {
-                    this.setState({
-                      loading: false
-                    })
-                    Taro.showToast({
-                      title: ve.error[0].message,
-                      icon: 'none'
-                    })
-                  }
-                }).catch(() => {
-                  this.setState({
-                    loading: false
-                  })
-                  Taro.showToast({
-                    title: '系统错误,请稍后再试',
-                    icon: 'none'
-                  })
-                })
-              } else {
-                this.setState({
-                  dtails: value.data.list[0],
-                  addressLatitude: value.data.list[0].latitude,
-                  addressLongitude: value.data.list[0].longitude,
-                }, () => {
-                  fn();
-                })
-              }
-            } else {
-              this.setState({
-                loading: false
-              })
-              Taro.showToast({
-                title: v.error[0].message,
-                icon: 'none'
-              })
-            }
-          }).catch(() => {
-            this.setState({
-              loading: false
-            })
-            Taro.showToast({
-              title: '系统错误,请稍后再试',
-              icon: 'none'
-            })
-          })
-        } else {
+        this.setState({
+          loading: false
+        })
+        if (v.data) {
           this.setState({
-            dtails: v.data.list[0],
-            addressLatitude: v.data.list[0].latitude,
-            addressLongitude: v.data.list[0].longitude,
+            dtails: v.data,
+            addressLatitude: v.data.latitude,
+            addressLongitude: v.data.longitude,
           }, () => {
             fn();
           })
+        } else {
+          this.setState({
+            dtails: {},
+          })
         }
       } else {
         this.setState({
@@ -324,15 +256,6 @@ class PunchClocks extends Component {
           icon: 'none'
         })
       }
-    }).catch((err) => {
-      // console.log(err)
-      this.setState({
-        loading: false
-      })
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
     })
   }
 

+ 4 - 0
src/utils/servers/servers.js

@@ -52,6 +52,10 @@ export const addPublicRelease = (postData = {}) => {
 export const setOpenId = (postData = {}) => {
   return HTTPREQUEST.post('/api/admin/setOpenId', postData)
 }
+//获取最近打卡信息
+export const getPunchClockInfo = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/release/getMyNewPublic', postData)
+}
 
 export const getPublicReleaseList = (postData = {}) => {
   return HTTPREQUEST.get('/api/admin/release/listPublicRelease', postData)