|
@@ -1,6 +1,6 @@
|
|
|
import React, { Component } from 'react';
|
|
|
import Taro from '@tarojs/taro';
|
|
|
-import { View ,Picker} from '@tarojs/components'
|
|
|
+import { View ,Picker,ScrollView} from '@tarojs/components'
|
|
|
import { getPublicReleaseList } from '../../utils/servers/servers';
|
|
|
import {
|
|
|
AtSearchBar,
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
AtTabsPane,
|
|
|
AtList,
|
|
|
AtListItem,
|
|
|
+ AtIcon
|
|
|
} from 'taro-ui';
|
|
|
import {clockState} from '../../utils/tools/config';
|
|
|
|
|
@@ -18,6 +19,7 @@ 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 './myList';
|
|
|
import MessageNoticebar from "../../components/common/messageNoticebar";
|
|
@@ -210,9 +212,22 @@ class Examine extends Component {
|
|
|
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'>
|
|
|
+ <View className='indexPage' >
|
|
|
<MessageNoticebar/>
|
|
|
<View className='searchContent'>
|
|
|
<View className='searchTop'>
|
|
@@ -220,7 +235,9 @@ class Examine extends Component {
|
|
|
showActionButton
|
|
|
placeholder='请输入企业名称'
|
|
|
value={this.state.current === 0 ? this.state.searchValue : this.state.searchValue1}
|
|
|
- actionName='更多筛选'
|
|
|
+ onActionClick={()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ }}
|
|
|
onChange={(value)=>{
|
|
|
if(this.state.current === 0){
|
|
|
this.setState({
|
|
@@ -232,17 +249,6 @@ class Examine extends Component {
|
|
|
})
|
|
|
}
|
|
|
}}
|
|
|
- onActionClick={()=>{
|
|
|
- this.setState({
|
|
|
- openSearch:!this.state.openSearch
|
|
|
- })
|
|
|
- }}
|
|
|
- onConfirm={()=>{
|
|
|
- this.setState({
|
|
|
- openSearch:false
|
|
|
- })
|
|
|
- this.getPublicReleaseList();
|
|
|
- }}
|
|
|
onClear={()=>{
|
|
|
if(this.state.current === 0){
|
|
|
this.setState({
|
|
@@ -256,165 +262,233 @@ class Examine extends Component {
|
|
|
}}
|
|
|
/>
|
|
|
</View>
|
|
|
- <View className='searchBottom' style={{display:this.state.openSearch ? 'block' : 'none'}}>
|
|
|
- <View className='searchBottomBack' onClick={()=>{
|
|
|
- this.setState({
|
|
|
- openSearch:false
|
|
|
- })
|
|
|
- }}/>
|
|
|
- <View className='searchItem'>
|
|
|
- <Picker mode='date' onChange={(e)=>{
|
|
|
- if(this.state.current === 0){
|
|
|
- this.setState({
|
|
|
- rangeStartVal:e.detail.value,
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.setState({
|
|
|
- rangeStartVal1:e.detail.value,
|
|
|
- })
|
|
|
- }
|
|
|
- }}>
|
|
|
- <AtList>
|
|
|
+ <ScrollView className={this.state.openSearch ? 'searchBottomLOL' : ''} scrollX style={{width:'100%'}}>
|
|
|
+ <View className='searchBottom'>
|
|
|
+ <View className='searchItem' style={{paddingLeft:'5px'}}>
|
|
|
+ <Picker value={this.state.current === 0 ? this.state.starts.id : this.state.starts1.id} range={clockState} rangeKey='title' mode='selector' onChange={(e)=>{
|
|
|
+ if(this.state.current === 0){
|
|
|
+ this.setState({
|
|
|
+ starts:clockState[e.detail.value],
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.setState({
|
|
|
+ starts1:clockState[e.detail.value],
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
{
|
|
|
- this.state.current === 0 ?
|
|
|
- <AtListItem
|
|
|
- title='开始时间'
|
|
|
- hasBorder={false}
|
|
|
- extraText={this.state.rangeStartVal ? this.state.rangeStartVal : '请选择开始时间'}/> :
|
|
|
- <AtListItem
|
|
|
- title='开始时间'
|
|
|
- hasBorder={false}
|
|
|
- extraText={this.state.rangeStartVal1 ? this.state.rangeStartVal1 : '请选择开始时间'}/>
|
|
|
+ (this.state.current === 0 && !this.state.starts.title) || (this.state.current === 1 && !this.state.starts1.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.starts1.title}
|
|
|
+ </View>
|
|
|
+ <View className='iconContent'/>
|
|
|
+ </View>
|
|
|
}
|
|
|
- </AtList>
|
|
|
- </Picker>
|
|
|
- </View>
|
|
|
- <View className='searchItem'>
|
|
|
- <Picker mode='date' onChange={(e)=>{
|
|
|
- if(this.state.current === 0){
|
|
|
- this.setState({
|
|
|
- rangeEndVal:e.detail.value,
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.setState({
|
|
|
- rangeEndVal1:e.detail.value,
|
|
|
- })
|
|
|
+ </Picker>
|
|
|
+ {
|
|
|
+ (this.state.current === 0 && this.state.starts.title) || (this.state.current === 1 && this.state.starts1.title) ?
|
|
|
+ <View className='searchSelectContent'>
|
|
|
+ <View className='selectIcon' onClick={(e)=>{
|
|
|
+ e.stopPropagation();
|
|
|
+ if(this.state.current === 0){
|
|
|
+ this.setState({
|
|
|
+ starts:{}
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.setState({
|
|
|
+ starts1:{}
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
+ <AtIcon value='close-circle' size='10' color='#FFFFFF' />
|
|
|
+ </View>
|
|
|
+ </View> : null
|
|
|
}
|
|
|
- }}>
|
|
|
- <AtList>
|
|
|
+ </View>
|
|
|
+ <View className='searchItem'>
|
|
|
+ <Picker value={this.state.current === 0 ? this.state.clockInStarts : this.state.clockInStarts1} range={[
|
|
|
+ '未打卡',
|
|
|
+ '已打卡'
|
|
|
+ ]} mode='selector' onChange={(e)=>{
|
|
|
+ if(this.state.current === 0){
|
|
|
+ this.setState({
|
|
|
+ clockInStarts:String(e.detail.value)
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.setState({
|
|
|
+ clockInStarts1:String(e.detail.value)
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
{
|
|
|
- this.state.current === 0 ?
|
|
|
- <AtListItem
|
|
|
- title='结束时间'
|
|
|
- hasBorder={false}
|
|
|
- extraText={this.state.rangeEndVal ? this.state.rangeEndVal : '请选择结束时间' }
|
|
|
- /> :
|
|
|
- <AtListItem
|
|
|
- title='结束时间'
|
|
|
- hasBorder={false}
|
|
|
- extraText={this.state.rangeEndVal1 ? this.state.rangeEndVal1 : '请选择结束时间' }
|
|
|
- />
|
|
|
+ (this.state.current === 0 && !this.state.clockInStarts) || (this.state.current === 1 && !this.state.clockInStarts1) ?
|
|
|
+ <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.clockInStarts === '1' ? '已打卡' :
|
|
|
+ this.state.clockInStarts === '0' ? '未打卡' :''
|
|
|
+ ): this.state.clockInStarts1 === '1' ? '已打卡' :
|
|
|
+ this.state.clockInStarts1 === '0' ? '未打卡' :''}
|
|
|
+ </View>
|
|
|
+ <View className='iconContent'/>
|
|
|
+ </View>
|
|
|
}
|
|
|
- </AtList>
|
|
|
- </Picker>
|
|
|
- </View>
|
|
|
- <View className='searchItem'>
|
|
|
- <Picker value={this.state.current === 0 ? this.state.starts.id : this.state.starts1.id} range={clockState} rangeKey='title' mode='selector' onChange={(e)=>{
|
|
|
- if(this.state.current === 0){
|
|
|
- this.setState({
|
|
|
- starts:clockState[e.detail.value],
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.setState({
|
|
|
- starts1:clockState[e.detail.value],
|
|
|
- })
|
|
|
+ </Picker>
|
|
|
+ {
|
|
|
+ (this.state.current === 0 && this.state.clockInStarts) || (this.state.current === 1 && this.state.clockInStarts1) ?
|
|
|
+ <View className='searchSelectContent'>
|
|
|
+ <View className='selectIcon' onClick={(e)=>{
|
|
|
+ e.stopPropagation();
|
|
|
+ if(this.state.current === 0){
|
|
|
+ this.setState({
|
|
|
+ clockInStarts: '',
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.setState({
|
|
|
+ clockInStarts1:'',
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
+ <AtIcon value='close-circle' size='10' color='#FFFFFF' />
|
|
|
+ </View>
|
|
|
+ </View> : null
|
|
|
}
|
|
|
- }}>
|
|
|
- <AtList>
|
|
|
+ </View>
|
|
|
+ <View className='searchItem'>
|
|
|
+ <Picker mode='date' onChange={(e)=>{
|
|
|
+ if(this.state.current === 0){
|
|
|
+ this.setState({
|
|
|
+ rangeStartVal:e.detail.value,
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.setState({
|
|
|
+ rangeStartVal1:e.detail.value,
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
{
|
|
|
- this.state.current === 0 ?
|
|
|
- <AtListItem
|
|
|
- title='审核状态'
|
|
|
- hasBorder={false}
|
|
|
- extraText={this.state.starts.title ? this.state.starts.title : '请选择审核状态'}/> :
|
|
|
- <AtListItem
|
|
|
- title='审核状态'
|
|
|
- hasBorder={false}
|
|
|
- extraText={this.state.starts1.title ? this.state.starts1.title : '请选择审核状态'}/>
|
|
|
+ (this.state.current === 0 && !this.state.rangeStartVal) || (this.state.current === 1 && !this.state.rangeStartVal1) ?
|
|
|
+ <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.rangeStartVal1}
|
|
|
+ </View>
|
|
|
+ <View className='iconContent'/>
|
|
|
+ </View>
|
|
|
}
|
|
|
- </AtList>
|
|
|
- </Picker>
|
|
|
- </View>
|
|
|
- <View className='searchItem'>
|
|
|
- <Picker value={this.state.current === 0 ? this.state.clockInStarts : this.state.clockInStarts1} range={[
|
|
|
- '未打卡',
|
|
|
- '已打卡'
|
|
|
- ]} mode='selector' onChange={(e)=>{
|
|
|
- if(this.state.current === 0){
|
|
|
- this.setState({
|
|
|
- clockInStarts:String(e.detail.value)
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.setState({
|
|
|
- clockInStarts1:String(e.detail.value)
|
|
|
- })
|
|
|
+ </Picker>
|
|
|
+ {
|
|
|
+ (this.state.current === 0 && this.state.rangeStartVal) || (this.state.current === 1 && this.state.rangeStartVal1) ?
|
|
|
+ <View className='searchSelectContent'>
|
|
|
+ <View className='selectIcon' onClick={(e)=>{
|
|
|
+ e.stopPropagation();
|
|
|
+ if(this.state.current === 0){
|
|
|
+ this.setState({
|
|
|
+ rangeStartVal:''
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.setState({
|
|
|
+ rangeStartVal1:''
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
+ <AtIcon value='close-circle' size='10' color='#FFFFFF' />
|
|
|
+ </View>
|
|
|
+ </View> : null
|
|
|
}
|
|
|
- }}>
|
|
|
- <AtList>
|
|
|
+ </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{
|
|
|
+ this.setState({
|
|
|
+ rangeEndVal1:e.detail.value,
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
{
|
|
|
- this.state.current === 0 ?
|
|
|
- <AtListItem
|
|
|
- title='打卡状态'
|
|
|
- hasBorder={false}
|
|
|
- extraText={
|
|
|
- this.state.clockInStarts === '1' ? '已打卡' :
|
|
|
- this.state.clockInStarts === '0' ? '未打卡' :'请选择打卡状态'
|
|
|
- }/>:
|
|
|
- <AtListItem
|
|
|
- title='打卡状态'
|
|
|
- hasBorder={false}
|
|
|
- extraText={
|
|
|
- this.state.clockInStarts1 === '1' ? '已打卡' :
|
|
|
- this.state.clockInStarts1 === '0' ? '未打卡' :'请选择打卡状态'
|
|
|
- }/>
|
|
|
+ (this.state.current === 0 && !this.state.rangeEndVal) || (this.state.current === 1 && !this.state.rangeEndVal1) ?
|
|
|
+ <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.rangeEndVal1}
|
|
|
+ </View>
|
|
|
+ <View className='iconContent'/>
|
|
|
+ </View>
|
|
|
}
|
|
|
- </AtList>
|
|
|
- </Picker>
|
|
|
- </View>
|
|
|
- <View className='searchOperation'>
|
|
|
- <View className='reset' onClick={()=>{
|
|
|
- if(this.state.current === 0){
|
|
|
- this.setState({
|
|
|
- rangeStartVal:'',
|
|
|
- rangeEndVal:'',
|
|
|
- starts:{},
|
|
|
- clockInStarts:'',
|
|
|
- openSearch:false,
|
|
|
- searchValue:''
|
|
|
- },()=>{
|
|
|
- this.getPublicReleaseList();
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.setState({
|
|
|
- rangeStartVal1:'',
|
|
|
- rangeEndVal1:'',
|
|
|
- starts1:{},
|
|
|
- clockInStarts1:'',
|
|
|
- openSearch:false,
|
|
|
- searchValue1:''
|
|
|
- },()=>{
|
|
|
- this.getPublicReleaseList();
|
|
|
- })
|
|
|
+ </Picker>
|
|
|
+ {
|
|
|
+ (this.state.current === 0 && this.state.rangeEndVal) || (this.state.current === 1 && this.state.rangeEndVal1) ?
|
|
|
+ <View className='searchSelectContent'>
|
|
|
+ <View className='selectIcon' onClick={(e)=>{
|
|
|
+ e.stopPropagation();
|
|
|
+ if(this.state.current === 0){
|
|
|
+ this.setState({
|
|
|
+ rangeEndVal:''
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.setState({
|
|
|
+ rangeEndVal1:''
|
|
|
+ },()=>{
|
|
|
+ this.getPublicReleaseList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }}>
|
|
|
+ <AtIcon value='close-circle' size='10' color='#FFFFFF' />
|
|
|
+ </View>
|
|
|
+ </View> : null
|
|
|
}
|
|
|
- }}>重置</View>
|
|
|
- <View className='search' onClick={()=>{
|
|
|
- this.setState({
|
|
|
- openSearch:false
|
|
|
- })
|
|
|
- this.getPublicReleaseList();
|
|
|
- }}>搜索</View>
|
|
|
+ </View>
|
|
|
</View>
|
|
|
- </View>
|
|
|
+ </ScrollView>
|
|
|
</View>
|
|
|
<AtTabs current={this.state.current || 0} tabList={[{ title: '我的' }, { title: '审核' }]} onClick={(current)=>{
|
|
|
this.setState({
|