|
@@ -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>
|
|
|
)
|