|
@@ -49,11 +49,6 @@
|
|
<van-button @click="batchAgree(false)" :disabled="!isCanAgree || report.length == 0" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button>
|
|
<van-button @click="batchAgree(false)" :disabled="!isCanAgree || report.length == 0" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <van-pull-refresh v-model="downLoading" @refresh="onDownRefresh">
|
|
|
|
- <!-- 列表 -->
|
|
|
|
- <van-list v-model="upLoading" :finished="upFinished" :immediate-check="false" :offset="100" finished-text="没有更多了" @load="onLoadList">
|
|
|
|
-
|
|
|
|
<van-skeleton v-for="(item,index) in report" :key="index" title avatar :row="3" :loading="false">
|
|
<van-skeleton v-for="(item,index) in report" :key="index" title avatar :row="3" :loading="false">
|
|
<van-panel class="one_report">
|
|
<van-panel class="one_report">
|
|
<template #header>
|
|
<template #header>
|
|
@@ -157,11 +152,6 @@
|
|
</van-popup>
|
|
</van-popup>
|
|
</van-panel>
|
|
</van-panel>
|
|
</van-skeleton>
|
|
</van-skeleton>
|
|
-
|
|
|
|
- </van-list>
|
|
|
|
- </van-pull-refresh>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<van-popup v-model="denyReasonDialog" position="bottom" closeable >
|
|
<van-popup v-model="denyReasonDialog" position="bottom" closeable >
|
|
<van-cell>请输入原因</van-cell>
|
|
<van-cell>请输入原因</van-cell>
|
|
<van-field class="form_input"
|
|
<van-field class="form_input"
|
|
@@ -198,15 +188,6 @@
|
|
nowTime: this.format(new Date(new Date()),"yyyy-MM-dd"),
|
|
nowTime: this.format(new Date(new Date()),"yyyy-MM-dd"),
|
|
showPicker: false,
|
|
showPicker: false,
|
|
report: [],
|
|
report: [],
|
|
-
|
|
|
|
- // 懒加载
|
|
|
|
- total: 0, // 列表总数据长度
|
|
|
|
- pageIndex: 1, // 页码,每页数据固定为25
|
|
|
|
- upLoading: false, // 上拉加载
|
|
|
|
- upFinished: false, // 上拉加载完毕
|
|
|
|
- downLoading: false, // 下拉刷新
|
|
|
|
- listReLoading: false, // 是否重新加载列表数据
|
|
|
|
-
|
|
|
|
flg: false,
|
|
flg: false,
|
|
isCanAgree: false,
|
|
isCanAgree: false,
|
|
approveinData: null,
|
|
approveinData: null,
|
|
@@ -227,42 +208,17 @@
|
|
created() {
|
|
created() {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
- onDownRefresh() {
|
|
|
|
- this.pageIndex = 1
|
|
|
|
- this.listReLoading = true
|
|
|
|
- this.upLoading = true
|
|
|
|
- this.upFinished = false // 不写这句会导致你上拉到底过后在下拉刷新将不能触发下拉加载事件
|
|
|
|
- this.getReport()
|
|
|
|
- },
|
|
|
|
- onLoadList(){
|
|
|
|
- if(this.total <= this.report.length) {
|
|
|
|
- this.upFinished = true
|
|
|
|
- this.upLoading = false
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- this.pageIndex += 1
|
|
|
|
- this.listReLoading = false
|
|
|
|
- this.getReport()
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
selectDateClear(){
|
|
selectDateClear(){
|
|
this.selectDate = []
|
|
this.selectDate = []
|
|
this.selectDateValue = ''
|
|
this.selectDateValue = ''
|
|
-
|
|
|
|
- this.listReLoading = true
|
|
|
|
- this.onDownRefresh()
|
|
|
|
|
|
+ this.getReport()
|
|
},
|
|
},
|
|
selectUserClear(){
|
|
selectUserClear(){
|
|
this.userNameValue = ''
|
|
this.userNameValue = ''
|
|
this.userIdList = []
|
|
this.userIdList = []
|
|
this.userList.forEach(item => {delete item.isChecked})
|
|
this.userList.forEach(item => {delete item.isChecked})
|
|
this.showUserList = this.userList
|
|
this.showUserList = this.userList
|
|
-
|
|
|
|
- this.listReLoading = true
|
|
|
|
- this.onDownRefresh()
|
|
|
|
|
|
+ this.getReport()
|
|
},
|
|
},
|
|
selectUserClick(){
|
|
selectUserClick(){
|
|
this.selectUserShow = true
|
|
this.selectUserShow = true
|
|
@@ -274,9 +230,7 @@
|
|
this.selectShow = false;
|
|
this.selectShow = false;
|
|
this.selectDate = [this.getSelectDateStr(start),this.getSelectDateStr(end)]
|
|
this.selectDate = [this.getSelectDateStr(start),this.getSelectDateStr(end)]
|
|
this.selectDateValue = `${this.selectDate[0]} 至 ${this.selectDate[1]}`;
|
|
this.selectDateValue = `${this.selectDate[0]} 至 ${this.selectDate[1]}`;
|
|
-
|
|
|
|
- this.listReLoading = true
|
|
|
|
- this.onDownRefresh()
|
|
|
|
|
|
+ this.getReport()
|
|
},
|
|
},
|
|
getSelectDateStr(date){
|
|
getSelectDateStr(date){
|
|
return `${date.getFullYear()}-${(date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)}-${date.getDate() < 10 ? '0' + date.getDate() : date.getDate()}`;
|
|
return `${date.getFullYear()}-${(date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)}-${date.getDate() < 10 ? '0' + date.getDate() : date.getDate()}`;
|
|
@@ -299,12 +253,9 @@
|
|
this.userNameValue = this.userNameValue.substring(0, this.userNameValue.length-1);
|
|
this.userNameValue = this.userNameValue.substring(0, this.userNameValue.length-1);
|
|
this.userIdList = this.userIdList.substring(0, this.userIdList.length-1);
|
|
this.userIdList = this.userIdList.substring(0, this.userIdList.length-1);
|
|
}
|
|
}
|
|
- this.selectUserShow = false
|
|
|
|
-
|
|
|
|
- this.listReLoading = true
|
|
|
|
- this.onDownRefresh()
|
|
|
|
-
|
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
|
|
+ this.selectUserShow = false
|
|
|
|
+ this.getReport()
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
@@ -465,9 +416,7 @@
|
|
getReport() {
|
|
getReport() {
|
|
const toast = this.$toast.loading({
|
|
const toast = this.$toast.loading({
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
- duration: 0,
|
|
|
|
- pageIndex: this.pageIndex,
|
|
|
|
- pageSize: 25
|
|
|
|
|
|
+ duration: 0
|
|
});
|
|
});
|
|
let parameter = {
|
|
let parameter = {
|
|
state: 0
|
|
state: 0
|
|
@@ -483,36 +432,19 @@
|
|
.then(res => {
|
|
.then(res => {
|
|
if(res.code == "ok") {
|
|
if(res.code == "ok") {
|
|
this.$toast.clear();
|
|
this.$toast.clear();
|
|
- // this.total = res.data.total
|
|
|
|
- this.downLoading = false
|
|
|
|
- this.upLoading = false
|
|
|
|
-
|
|
|
|
- this.isAllChecked = false
|
|
|
|
- if(this.listReLoading){
|
|
|
|
- this.report = res.data;
|
|
|
|
- document.documentElement.scrollTop = 0
|
|
|
|
- for(let i in this.report){
|
|
|
|
- this.$set(this.report[i],'checked',false)
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- for(let i in res.data){
|
|
|
|
- this.report.push(res.data[i])
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ this.report = res.data;
|
|
// this.isAllChecked = this.report.length == 0 ? false : true
|
|
// this.isAllChecked = this.report.length == 0 ? false : true
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ if(this.report.length == 0){
|
|
|
|
+ this.isAllChecked = false
|
|
|
|
+ }
|
|
|
|
+ for(let i in this.report){
|
|
|
|
+ this.$set(this.report[i],'checked',false)
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.$toast.clear();
|
|
this.$toast.clear();
|
|
this.$toast.fail('获取失败:'+res.msg);
|
|
this.$toast.fail('获取失败:'+res.msg);
|
|
- this.downLoading = false
|
|
|
|
- this.upLoading = false
|
|
|
|
}
|
|
}
|
|
- }).catch(err=> {this.$toast.clear();
|
|
|
|
- this.downLoading = false
|
|
|
|
- this.upLoading = false});
|
|
|
|
|
|
+ }).catch(err=> {this.$toast.clear();});
|
|
},
|
|
},
|
|
|
|
|
|
approve(id, item) {
|
|
approve(id, item) {
|
|
@@ -616,6 +548,9 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
|
+.dateSelectCell{
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+}
|
|
.userCheckbox {
|
|
.userCheckbox {
|
|
padding: 10px;;
|
|
padding: 10px;;
|
|
}
|
|
}
|