task#11265,按钮加防重复点击,已审核和待审核tab切不一致进行更改

This commit is contained in:
2024-02-23 14:24:11 +08:00
parent 80751ca40e
commit 1399d002e4
3 changed files with 101 additions and 61 deletions

View File

@ -20,7 +20,7 @@
</div> </div>
<van-pull-refresh class="refresh" v-model="isLoading" @refresh="onRefresh" v-show="!show"> <van-pull-refresh class="refresh" v-model="isLoading" @refresh="onRefresh" v-show="!show">
<div class="listWrap"> <div class="listWrap">
<div class="listItem" v-for="(item,index) in pageList" :key="index" @click="goPageDetail(item.id)"> <div class="listItem" v-for="(item,index) in pageList" :key="index" @click="noMultipleClicks(goPageDetail,item.id)">
<div class="line1"> <div class="line1">
<div><span>案件编号:</span><span>{{ item.userOrderCode }}</span></div> <div><span>案件编号:</span><span>{{ item.userOrderCode }}</span></div>
<div class="right"> <div class="right">
@ -50,7 +50,7 @@ export default {
mixins: [myMixins], mixins: [myMixins],
data(){ data(){
return{ return{
tabArr: [{name: '待审核', status: 1,num:0}, {name: '审核通过', status: 2,num:0},{name: '审核不通过', status: 2,num:0},], tabArr: [ {name: '审核通过', status: 2,num:0},{name: '审核不通过', status: 2,num:0},],
activeIndex: 0, activeIndex: 0,
pageList:[], pageList:[],
pageNum:1, pageNum:1,
@ -58,6 +58,8 @@ export default {
id:'',//批次id id:'',//批次id
isLoading:"", isLoading:"",
isShowBackBtn:true, isShowBackBtn:true,
type:'',//用于判断是已审核还是待审核,已审核只有两个tab切
noClick:true
} }
}, },
computed:{ computed:{
@ -76,8 +78,14 @@ export default {
}else{ }else{
this.isShowBackBtn=true this.isShowBackBtn=true
} }
// console.log("===",urlParams.get('status'))
this.id = urlParams.get('id') || this.$route.params.id || this.$route.params.batchCode; this.id = urlParams.get('id') || this.$route.params.id || this.$route.params.batchCode;
this.activeIndex=this.$route.params?.activeIndex || 0 this.activeIndex=this.$route.params?.activeIndex || 0
this.type=this.$route.params?.type
console.log(urlParams.get('status') && urlParams.get('status') == 1)
if (this.type==1 || (urlParams.get('status') && urlParams.get('status') == 1)) {
this.tabArr.unshift({name: '待审核', status: 1,num:0},);
}
await this.batchOrderCount(); await this.batchOrderCount();
await this.getList() await this.getList()
}, },
@ -103,7 +111,7 @@ export default {
pageNum:this.pageNum, pageNum:this.pageNum,
pageSize:this.pageSize, pageSize:this.pageSize,
batchCode:this.id, batchCode:this.id,
type: this.activeIndex+1 type:this.tabArr.length==3 ? this.activeIndex+1 : this.activeIndex+2
}) })
this.pageList=res.data this.pageList=res.data
}, },

View File

@ -66,65 +66,83 @@
</div> </div>
</div> </div>
</div> </div>
<div class="aduit"> <template v-if="detailInfo.state.code == 1">
<div :class="{itemWrap : true,aduitResult: detailInfo.secondAudit}"> <div class="aduit">
<div> <div :class="{itemWrap : true,aduitResult: detailInfo.secondAudit}">
<span class="star">*</span> <div>
<span>{{detailInfo.secondAudit ? '二次审核结果' : '审核结果'}}</span> <span class="star">*</span>
<span>{{detailInfo.secondAudit ? '二次审核结果' : '审核结果'}}</span>
</div>
<div class="isJoin">
<van-radio-group v-model="states" @change="isUse" class="joinWrap">
<van-radio :name="2" style="margin-right: 26px" class="item">
通过
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
<template v-if="detailInfo.secondAudit">
<van-radio :name="4" class="item">报销失败
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
</template>
<template v-else>
<van-radio :name="3" class="item">
不通过
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
</template>
</van-radio-group>
</div>
</div> </div>
<div class="isJoin"> <div class="itemWrap" v-if="states == 3 || states == 4">
<van-radio-group v-model="states" @change="isUse" class="joinWrap"> <div>
<van-radio :name="2" style="margin-right: 26px" class="item"> <div>
通过 <span class="star">*</span>
<img <span>不通过原因</span>
slot="icon" </div>
slot-scope="props" </div>
:src="props.checked ? activeIcon : inactiveIcon" <select id="mySelect" class="mySelect" v-model="other">
> <option value="缺失凭证照片">缺失凭证照片</option>
</van-radio> <option value="申请金额与凭证不一致">申请金额与凭证不一致</option>
<template v-if="detailInfo.secondAudit"> <option value="非正常产生路桥费">非正常产生路桥费</option>
<van-radio :name="4" class="item">报销失败 <option value="其他">其他</option>
<img </select>
slot="icon" </div>
slot-scope="props" <div v-show="other == '其他'">
:src="props.checked ? activeIcon : inactiveIcon" <div>其他原因</div>
> <textarea v-model="otherReason" class="multipleTxt" placeholder="描述"></textarea>
</van-radio>
</template>
<template v-else>
<van-radio :name="3" class="item">
不通过
<img
slot="icon"
slot-scope="props"
:src="props.checked ? activeIcon : inactiveIcon"
>
</van-radio>
</template>
</van-radio-group>
</div> </div>
</div> </div>
<div class="itemWrap" v-if="states == 3 || states == 4"> </template>
<div> <template v-else>
<div> <div class="aduit" style="line-height: 20px">
<span class="star">*</span> <div class="itemWrap" >
<span>不通过原因</span> <div> {{ detailInfo.state.code == 4 ? '二次审核结果' : '审核结果'}}</div>
</div> <div class="gary">{{detailInfo.state.label}}
</div>
</div>
<div class="itemWrap" v-if="detailInfo.state.code == 3 || detailInfo.state.code == 4">
<div>不通过原因 </div>
<div class="gary">{{detailInfo.auditRemark.includes('/') ? detailInfo.auditRemark.substring(0,2) : detailInfo.auditRemark}}</div>
</div>
<div class="itemWrap" v-show="detailInfo.auditRemark.substring(0,2) == '其他'">
<div>其他原因</div>
<div class="gary" style="flex: 1;width: 75%;text-align: end">{{detailInfo.auditRemark}}</div>
</div> </div>
<select id="mySelect" class="mySelect" v-model="other">
<!-- <option value="" disabled selected hidden>请选择</option>-->
<option value="缺失凭证照片">缺失凭证照片</option>
<option value="申请金额与凭证不一致">申请金额与凭证不一致</option>
<option value="非正常产生路桥费">非正常产生路桥费</option>
<option value="其他">其他</option>
</select>
</div> </div>
<div v-show="other == '其他'"> </template>
<div>其他原因</div> <div v-if="detailInfo.state.code == 1" class="submitBtn" @click="noMultipleClicks(submitHandle)">提交</div>
<textarea v-model="otherReason" class="multipleTxt" placeholder="描述"></textarea>
</div>
</div>
<div class="submitBtn" @click="noMultipleClicks(submitHandle)">提交</div>
</div> </div>
</div> </div>
@ -160,7 +178,7 @@ export default {
}, },
created() { created() {
this.id = this.$route.params.id; this.id = this.$route.params.id;
// this.id=27 // this.id=29
this.activeIndex=this.$route.params.index; this.activeIndex=this.$route.params.index;
this.batchCode=this.$route.params.batchCode this.batchCode=this.$route.params.batchCode
console.log(" this.batchCode", this.batchCode,this.activeIndex) console.log(" this.batchCode", this.batchCode,this.activeIndex)
@ -276,7 +294,7 @@ export default {
return return
} }
if(this.other == '其他' && !this.otherReason){ if(this.other == '其他' && !this.otherReason){
this.$toast('审核不通过原因其他时审核原因必填') this.$toast('审核不通过原因其他时审核原因必填')
return return
} }
let res='' let res=''
@ -291,8 +309,9 @@ export default {
} }
if(res.code == 200){ if(res.code == 200){
this.$toast("提交成功") this.$toast("提交成功")
console.log("$$$$$$$$$",this.state)
setTimeout(()=>{ setTimeout(()=>{
this.goPrePage() // this.goPrePage()
},1500) },1500)
}else{ }else{
this.$toast(res.msg) this.$toast(res.msg)
@ -364,6 +383,14 @@ export default {
border-width: 6px 6px 0 6px; border-width: 6px 6px 0 6px;
border-color: #000 transparent transparent transparent; border-color: #000 transparent transparent transparent;
} }
//.mySelect {
// transform: scaleY(-1);
// transform-origin: center top;
//}
//
//option {
// transform: scaleY(-1);
//}
.navBar{ .navBar{
margin-bottom: 46px; margin-bottom: 46px;
} }
@ -488,6 +515,9 @@ export default {
.itemWrap{ .itemWrap{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.gary{
opacity: 0.5;
}
} }
.star{ .star{
color: #FF0808; color: #FF0808;

View File

@ -20,7 +20,7 @@
</div> </div>
<van-pull-refresh class="refresh" v-model="isLoading" @refresh="onRefresh" v-show="!show"> <van-pull-refresh class="refresh" v-model="isLoading" @refresh="onRefresh" v-show="!show">
<div class="listWrap"> <div class="listWrap">
<div class="listItem" v-for="(item,index) in pageList" :key="index" @click="goPageDetail(item.batchCode)"> <div class="listItem" v-for="(item,index) in pageList" :key="index" @click="noMultipleClicks(goPageDetail,item.batchCode)">
<div class="line1"> <div class="line1">
<div><span>审核批次:</span><span>{{item.batchCode}}</span></div> <div><span>审核批次:</span><span>{{item.batchCode}}</span></div>
<div class="viewBtn">查看</div> <div class="viewBtn">查看</div>
@ -54,6 +54,7 @@ export default {
pageNum:1, pageNum:1,
pageSize:10, pageSize:10,
isLoading:"", isLoading:"",
noClick:true
} }
}, },
async mounted() { async mounted() {
@ -106,6 +107,7 @@ export default {
name: 'caseAuditList', // 目标路由的名称 name: 'caseAuditList', // 目标路由的名称
params: { params: {
id: id, // 参数对象的属性 id: id, // 参数对象的属性
type: this.activeIndex+1
} }
}); });
}, },