<!-- 入厂审核 -->
|
<template>
|
<view class="incom_index">
|
<view class="incom_index_search">
|
<u-search
|
:showAction="true"
|
shape="square"
|
actionText="搜索"
|
placeholder="请输入姓名"
|
v-model="realName"
|
clearabled
|
:actionStyle="actionStyle"
|
bgColor="#FFFFFF"
|
borderColor="#1976FF"
|
@custom="searchPlatUserApplyList()">
|
</u-search>
|
</view>
|
<scroll-view
|
scroll-y="true"
|
class="incom_index_scroll"
|
:scroll-top="scrollTop"
|
refresher-enabled="true"
|
refresher-background="#EAEAEA"
|
:refresher-triggered="triggered"
|
@refresherrefresh="refresherrefresh"
|
@scrolltolower="scrolltoLower">
|
<view
|
v-for="item in platUserList"
|
:key="item.userId"
|
class="scroll_item">
|
<view class="scroll_item_content">
|
<text class="name_font">{{item.realName}}</text>
|
<text>{{item.sex === 1 ? '女' : '男'}}</text>
|
<view class="navigat_font">
|
<u-text
|
suffixIcon="arrow-right"
|
iconStyle="font-size: 18px"
|
size="18px"
|
@click="navigetTo(item)"
|
:color="[null, 1].includes(item.applyFlag) ? '#1976FF' : item.applyFlag === 0 ? '#F76F01' : '#FD494B'"
|
:text="[null, 1].includes(item.applyFlag) ? '已通过' : item.applyFlag === 0 ? '待审核' : '未通过'">
|
</u-text>
|
</view>
|
</view>
|
<view class="scroll_item_content">
|
<text>{{item.posName}}</text>
|
<text>{{item.createTime}}</text>
|
</view>
|
</view>
|
<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
|
</scroll-view>
|
</view>
|
</template>
|
|
<script>
|
import { throttle } from '../../plugins/public.js';
|
export default {
|
data() {
|
return {
|
realName: '',
|
pageNum: 1,
|
pageSize: 10,
|
loadPage: 0,
|
scrollTop: 0,
|
triggered: true,
|
status: 'loading',
|
iconType: 'flower',
|
loadText: {
|
loading: '努力加载中',
|
nomore: '没有更多数据了'
|
},
|
actionStyle: {
|
'margin-left': '0',
|
'width': '60px',
|
'height': '32px',
|
'line-height' : '32px',
|
'border': '1px solid #1976FF',
|
'border-left': 'none',
|
'color': '#FFFFFF',
|
'background': '#1976FF',
|
'border-radius': '0 4px 4px 0'
|
},
|
platUserList: []
|
}
|
},
|
onShow() {
|
this.searchPlatUserApplyList();
|
},
|
methods: {
|
// 获取入厂审核信息列表
|
async getPlatUserApplyList() {
|
const { data } = await this.$api.reboSystem.getPlatUserApplyList({
|
realName: this.realName,
|
pageNum: this.pageNum,
|
pageSize: this.pageSize
|
});
|
return data;
|
},
|
// 查询入厂审核列表
|
searchPlatUserApplyList() {
|
this.triggered = true;
|
this.platUserList = [];
|
this.getPlatUserApplyList().then(data => {
|
this.platUserList = data.list;
|
this.loadPage = data.pages;
|
this.triggered = false;
|
this.status = 'nomore';
|
}).catch(() => {
|
this.triggered = false;
|
this.status = 'nomore';
|
uni.$u.toast('没有更数据了');
|
})
|
},
|
//自定义下拉刷新
|
refresherrefresh: throttle(function() {
|
this.status = 'loading';
|
this.pageNum = 1;
|
this.searchPlatUserApplyList();
|
uni.$u.toast('刷新成功');
|
}, 500),
|
//触底刷新
|
scrolltoLower: throttle(function() {
|
this.status = 'loading';
|
if(this.pageNum >= this.loadPage) {
|
setTimeout(() => {
|
this.status = 'nomore'
|
uni.$u.toast('没有更多数据了');
|
},1000)
|
return
|
} else {
|
this.pageNum += 1;
|
this.getPlatUserApplyList().then((data) => {
|
this.loadPage = data.pages;
|
this.platUserList.push(...data.list);
|
this.status = 'nomore';
|
})
|
}
|
}, 1500),
|
// 跳转
|
navigetTo(item) {
|
uni.navigateTo({
|
url: './detail?userId=' + item.userId
|
})
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.incom_index {
|
height: 100vh;
|
background: #EBEBEB;
|
|
.incom_index_search {
|
padding: 20px;
|
background: #FFFFFF;
|
}
|
|
.incom_index_scroll {
|
height: 90%;
|
|
.scroll_item {
|
padding: 10px 0;
|
margin: 10px 0;
|
background: #FFFFFF;
|
|
&:first-child {
|
margin-top: 0;
|
}
|
|
.scroll_item_content {
|
position: relative;
|
display: flex;
|
padding: 6px 20px;
|
|
.name_font {
|
margin-right: 30px;
|
color: #1976FF;
|
}
|
|
.navigat_font {
|
position: absolute;
|
right: 18px;
|
}
|
|
&:first-child {
|
color: #343434;
|
font-size: 18px;
|
}
|
|
&:last-child {
|
justify-content: space-between;
|
color: #999999;
|
}
|
}
|
}
|
}
|
}
|
|
::v-deep .u-search__content {
|
border-radius: 4px 0 0 4px !important;
|
}
|
</style>
|