mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 14:36:44 +08:00
切换tab,通过,未通过时,需要重置右上角的按钮状态--全部展开
This commit is contained in:
@@ -37,13 +37,11 @@
|
||||
>{{ item.approvalDate }}</div>
|
||||
<div class="bg-white pv15 pr15 pl10 mt15">
|
||||
<van-collapse v-model="activeNames">
|
||||
<!-- <van-checkbox-group v-model="item.checkboxResult" :ref="'checkboxGroup'+index"> -->
|
||||
<van-collapse-item :name="item01.id" v-for="(item01, index01) in item.claimApprovalSearchLst" :key="index01">
|
||||
<template #title>
|
||||
<span @click.stop="checkBoxSwitch(item01.id,item01.isChecked)">
|
||||
<span class="w30 h30 inline-b" @click.stop="checkBoxSwitch(item01.id,item01.isChecked)">
|
||||
<i :class="item01.isChecked=='0'?'checked':'nochecked'"></i>
|
||||
</span>
|
||||
<!-- <van-checkbox :name="item01.id" v-if="active == 'notApproved'" label-disabled @click.stop="checkBoxClick"></van-checkbox> -->
|
||||
<span class="ml5 mr10 fwb">{{index01+1}}.{{item01.insuredName}}</span>
|
||||
<span class="mr10 fwb">{{item01.caseEndDate}}</span>
|
||||
<span class="mr10 fwb">{{item01.getMoney}}元</span>
|
||||
@@ -75,7 +73,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
<!-- </van-checkbox-group> -->
|
||||
</van-collapse>
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,64 +245,6 @@ export default {
|
||||
that.$forceUpdate()
|
||||
console.log(this.claimApprovalIds,'claimApprovalIds')
|
||||
},
|
||||
checkBoxClick(){
|
||||
// ev.stopPropagation();
|
||||
let that = this
|
||||
this.claimApprovalIds= []
|
||||
//非全选状态时,更新claimApprovalIds数组
|
||||
this.claimApprovalList.forEach(function(item) {
|
||||
that.claimApprovalIds = that.claimApprovalIds.concat(item.checkboxResult)
|
||||
})
|
||||
that.$forceUpdate()
|
||||
if(that.claimApprovalIds.length){
|
||||
that.getTotalMoneyFunc()
|
||||
}
|
||||
//审批弹框点击取消之后,操作checkbox或全选时,统计通过、拒绝按钮数量
|
||||
// 按钮状态 0通过 1拒绝
|
||||
if(this.btnStatus == 0){
|
||||
this.refuseNum = 0
|
||||
this.passNum = this.claimApprovalIds.length
|
||||
}else if(this.btnStatus == 1){
|
||||
this.refuseNum = this.claimApprovalIds.length
|
||||
this.passNum = 0
|
||||
}
|
||||
console.log(this.claimApprovalIds,'claimApprovalIds')
|
||||
},
|
||||
//全选
|
||||
checkAllFunc() {
|
||||
let that = this
|
||||
if(that.claimApprovalIds.length != that.total){
|
||||
this.claimApprovalIds= []
|
||||
this.claimApprovalList.forEach(function(item) {
|
||||
item.checkboxResult = []
|
||||
let arr = []
|
||||
item.claimApprovalSearchLst.forEach(function(item01) {
|
||||
arr.push(item01.id)
|
||||
that.claimApprovalIds.push(item01.id)
|
||||
})
|
||||
item.checkboxResult = arr
|
||||
})
|
||||
that.getTotalMoneyFunc()
|
||||
}else{ //取消全选
|
||||
this.claimApprovalIds= []
|
||||
this.claimApprovalList.forEach(function(item) {
|
||||
item.checkboxResult = []
|
||||
let arr = []
|
||||
item.checkboxResult = arr
|
||||
})
|
||||
that.totalMoney = 0
|
||||
}
|
||||
//审批弹框点击取消之后,操作checkbox或全选时,统计通过、拒绝按钮数量
|
||||
// 按钮状态 0通过 1拒绝
|
||||
if(this.btnStatus == 0){
|
||||
this.refuseNum = 0
|
||||
this.passNum = this.claimApprovalIds.length
|
||||
}else if(this.btnStatus == 1){
|
||||
this.refuseNum = this.claimApprovalIds.length
|
||||
this.passNum = 0
|
||||
}
|
||||
that.$forceUpdate()
|
||||
},
|
||||
//通过按钮
|
||||
passHandle(){
|
||||
if(this.claimApprovalIds.length){
|
||||
@@ -342,6 +281,9 @@ export default {
|
||||
claimApproval({claimApprovalIds:this.claimApprovalIds,approvalResult:approvalResult}).then(res => {
|
||||
if (res.result == '0') {
|
||||
that.getList()
|
||||
} else if(res.result == '2') { //当前数据正在审批中,请稍后再试--刷新数据
|
||||
that.getList()
|
||||
this.$toast(res.resultMessage)
|
||||
}else{
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
@@ -350,8 +292,13 @@ export default {
|
||||
},
|
||||
//审批记录--切换1已通过,0未通过按钮状态
|
||||
approvalRecordSwitch(plainStatus){
|
||||
let that = this
|
||||
this.getList(plainStatus)
|
||||
this.plainStatus = plainStatus
|
||||
//切换tab时,需要重置右上角的按钮状态--全部展开
|
||||
that.activeNames = []
|
||||
that.isOpen = 0 //右上角按钮状态 0 全部收起 1 全部展开
|
||||
that.checkBtn() // 初始化显示按钮
|
||||
},
|
||||
//初始化列表
|
||||
async getList(plainStatus) {
|
||||
@@ -415,6 +362,7 @@ export default {
|
||||
})
|
||||
},
|
||||
tabChange(name) {
|
||||
let that = this
|
||||
this.currentPage = 1
|
||||
this.active = name
|
||||
this.claimApprovalList = []
|
||||
@@ -425,6 +373,10 @@ export default {
|
||||
}else{
|
||||
this.getList()
|
||||
}
|
||||
//切换tab时,需要重置右上角的按钮状态--全部展开
|
||||
that.activeNames = []
|
||||
that.isOpen = 0 //右上角按钮状态 0 全部收起 1 全部展开
|
||||
that.checkBtn() // 初始化显示按钮
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user