Commit 449e3ccd authored by 黄媛媛's avatar 黄媛媛

签证看板新增批量删除

parent 4cf5dd7a
......@@ -23,6 +23,8 @@
<div class="_vad_top clearfix">
<span class="_num PingFangSC">{{$t('visa.v_tuan')}}{{num}}</span>
<div class="fr">
<button @click="DeleteMore" class="normalBtn">批量删除</button>
<el-dropdown split-button type="primary" trigger="click" @command="bindVisa">
{{$t('visa.v_tvisa')}}
<el-dropdown-menu slot="dropdown" >
......@@ -33,7 +35,7 @@
<el-dropdown split-button type="primary" trigger="click" @command="bindVisa">
{{$t('visa.v_gvisa')}}
<el-dropdown-menu slot="dropdown" >
<el-dropdown-item v-for="item in VisaManagementList" :key='item.Id' v-if="item.IsOrderSigned==1" :command='{id:item.Id,type:1}'>{{item.Name}}</el-dropdown-item>
<el-dropdown-item v-for="(item,index) in VisaManagementList" :key='index+50000' v-if="item.IsOrderSigned==1" :command='{id:item.Id,type:1}'>{{item.Name}}</el-dropdown-item>
<el-dropdown-item v-if="LineID!=14" :command='{id:-1,type:1}'>{{$t('visaT.v_Othervisas')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -48,7 +50,7 @@
<th>{{$t('visa.v_visaType')}}</th>
<th>{{$t('visa.v_qianzhengst')}}</th>
<th>{{$t('admin.admin_czPerson')}}</th>
<th>{{$t('hotel.table_operat')}}</th>
<th> <input type="checkbox" @change="checkAll2" v-model="checkd2" >{{$t('hotel.table_operat')}}</th>
</tr>
<tr v-for="(item,index) in dataList">
<td width=150 class="text_left">
......@@ -97,6 +99,7 @@
</td>
<td>{{item.UpdateName}} <img class="_head_img" :src="item.UpdatePhoto" alt=""></td>
<td style="position:relative;width:200px">
<input v-if="item.VisaType==2 || item.SignStatus==2" type="checkbox" v-model="checkList2" :value="item.Id" @change="checkThis2">
<el-button @click="deletelist(item.Id)" type="danger" style="padding:5px" icon="el-icon-delete" circle></el-button>
<!-- <i @click="deletelist(item.Id)" class="iconfont icon-img_delete_small"></i> -->
<span v-if="LineID!=14">
......@@ -126,6 +129,11 @@ export default {
checkListAll:[],
loading:false,
checkd:false,
checkd2:false,
checkList2:[],
checkListAll2:[],
deleteStatus:false,
lastlen:false,
StatusList:[
{
Id:'-1',
......@@ -185,7 +193,8 @@ export default {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
}).then(() => {
this.deleteStatus=false;
this.deleteTshi(id)
}).catch(() => {
this.$message({
......@@ -197,8 +206,17 @@ export default {
deleteTshi(id){ // 删除操作
this.apipost('dmc_post_DelVisaPeople',{GuestId:id},res=>{
if(res.data.resultCode==1){
if(this.deleteStatus){
if(this.lastlen){
this.getData()
this.$message.success(res.data.message)
}
}else{
this.$message.success(res.data.message)
this.getData()
}
}else{
this.$message.error(res.data.message)
}
......@@ -229,6 +247,50 @@ export default {
}
},err=>{})
},
DeleteMore(){
let len=this.checkList2.length;
if(len==0){
this.Error("至少选择一条!");
return;
}
this.deleteStatus=true;
this.lastlen=false;
this.$confirm(this.$t('visaT.sfshanchubd'), this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
for(let i=0;i<this.checkList2.length;i++){
if(i+1==len){
this.lastlen=true;
}
this.deleteTshi(this.checkList2[i])
}
}).catch(() => {
this.$message({
type: 'info',
message: this.$t('tips.cancleDelete')
});
});
},
checkThis2(){ // 单选
if(this.checkList2.length==this.checkListAll2.length){
this.checkd2 = true
return
}
this.checkd2 = false
},
checkAll2(){ //全选
if(this.checkList2.length==this.checkListAll2.length){
this.checkList2=[]
return
}
this.checkList2 = this.checkListAll2
},
checkThis(){ // 单选
if(this.checkList.length==this.checkListAll.length){
this.checkd = true
......@@ -243,6 +305,7 @@ export default {
}
this.checkList = this.checkListAll
},
getVisaManagementList(){ // 获取签证管理
this.apipost('dmc_get_visa_GetVisaManagementList',{Status:0,BranchId:-1,SignStatus:0},res=>{
if(res.data.resultCode==1){
......@@ -259,6 +322,11 @@ export default {
// console.log("res",res);
if(res.data.resultCode==1){
this.dataList = res.data.data;
this.dataList.forEach(x=>{
if(x.VisaType==2 || x.SignStatus==2){
this.checkListAll2.push(x.Id)
}
})
if(this.LineID==14){
this.dataList.forEach(x=>{
if(x.ApplyStatus==-1){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment