|
|
@@ -27,13 +27,22 @@
|
|
|
th{
|
|
|
background: #eee;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .checkList{
|
|
|
+ padding:0 10px;
|
|
|
+ label{
|
|
|
+ margin: 5px 0;
|
|
|
+ }
|
|
|
}
|
|
|
.table{
|
|
|
button{
|
|
|
padding:6px;
|
|
|
}
|
|
|
}
|
|
|
+ .el-table__fixed-right::before, .el-table__fixed::before{
|
|
|
+ background: none;
|
|
|
+ }
|
|
|
</style>
|
|
|
<template>
|
|
|
<section class="apply">
|
|
|
@@ -132,6 +141,19 @@
|
|
|
<el-button @click="download('exam')" size="small" type="warning" >导出考勤表与申报考试表</el-button>
|
|
|
<el-button @click="download('apply')" size="small" type="warning" >导出学员申报资料</el-button>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
+ <el-dropdown trigger="click">
|
|
|
+ <el-button type="primary" size="mini" plain icon="el-icon-finished">
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <!-- <el-dropdown-item>姓名</el-dropdown-item> -->
|
|
|
+ <div class="checkList">
|
|
|
+ <p v-for="(item,index) in itemList" :key='index'>
|
|
|
+ <el-checkbox v-model="item.checked" :label="item.name"></el-checkbox>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
<el-button @click="print" type="primary" size="mini" plain icon="el-icon-printer"></el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
@@ -144,48 +166,11 @@
|
|
|
type="selection" fixed="left"
|
|
|
width="40">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="name" width="100"
|
|
|
- label="姓名">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="phone"
|
|
|
- label="联系电话">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="order_status"
|
|
|
- label="状态">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag v-if='scope.row.order_status == -2' type="info">审核未通过</el-tag>
|
|
|
- <el-tag v-if='scope.row.order_status == -1' >待提交资料</el-tag>
|
|
|
- <el-tag v-if='scope.row.order_status == 0' type="warning">待审核</el-tag>
|
|
|
- <el-tag v-if='scope.row.order_status == 1' >已审核立即支付</el-tag>
|
|
|
- <el-tag v-if='scope.row.order_status == 2' type="warning">学习中</el-tag>
|
|
|
- <el-tag v-if='scope.row.order_status == 3' type="success">已培训</el-tag>
|
|
|
- <el-tag v-if='scope.row.order_status == 4' type="success">已完成</el-tag>
|
|
|
- <!-- -2:审核未通过,-1:待提交资料,0:待审核,1:已审核立即支付,2:学习中,3:已完成 -->
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="remark"
|
|
|
- label="管理员备注">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="subject_item0"
|
|
|
- label="报名类型">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="subject_item1"
|
|
|
- label="作业类别">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="subject_item2"
|
|
|
- label="准操项目">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="train_type"
|
|
|
- label="培训类型">
|
|
|
- </el-table-column>
|
|
|
+ <template v-for="(item,index) in itemList" >
|
|
|
+ <el-table-column :key='index' v-if='item.checked' :width='item.width'
|
|
|
+ :prop="item.value" :label="item.name">
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
<el-table-column
|
|
|
prop="zip" width="220" fixed="right"
|
|
|
label="操作">
|
|
|
@@ -231,6 +216,28 @@ export default {
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
+ checkList:[],
|
|
|
+ itemList:[
|
|
|
+ {name:'姓名', value:'name',checked:true},
|
|
|
+ {name:'联系电话', value:'phone',checked:true,width:'120px'},
|
|
|
+ {name:'状态', value:'order_status_1',checked:true},
|
|
|
+ {name:'管理员备注', value:'remark',checked:true,width:'150px'},
|
|
|
+ {name:'报名类型', value:'subject_item0',checked:true,width:'120px'},
|
|
|
+ {name:'作业类别', value:'subject_item1',checked:true},
|
|
|
+ {name:'准操项目', value:'subject_item2',checked:true},
|
|
|
+ {name:'培训类型', value:'train_type',checked:true},
|
|
|
+ {name:'考试时间', value:'exam_time',checked:true,width:'150px'},
|
|
|
+ {name:'ID', value:'id',checked:true},
|
|
|
+ {name:'支付状态', value:'pay_status_1',checked:true},
|
|
|
+ {name:'支付金额', value:'price',checked:true},
|
|
|
+ {name:'更新时间', value:'ctime',checked:true,width:'170px'},
|
|
|
+ {name:'发票类型', value:'bill_type_1',checked:true,width:'120px'},
|
|
|
+ {name:'领证方式', value:'receive_card',checked:true},
|
|
|
+ {name:'实名认证', value:'verify_1',checked:true},
|
|
|
+ {name:'报名时间', value:'signup_time',checked:true,width:'150px'},
|
|
|
+ {name:'培训时间', value:'train_time',checked:true,width:'150px'},
|
|
|
+ {name:'公司名称', value:'company',checked:true,width:'200px'},
|
|
|
+ ],
|
|
|
text:'批量设置培训时间',
|
|
|
date_type:1,
|
|
|
time:'',
|
|
|
@@ -249,12 +256,31 @@ export default {
|
|
|
gopage(){
|
|
|
this.form.page=this.$refs.pageButton.page
|
|
|
this.getData()
|
|
|
- },
|
|
|
+ },
|
|
|
getData(){
|
|
|
var parm=this.form;
|
|
|
this.loading=true;
|
|
|
if(this.order_status != '-3'){parm.order_status=this.order_status}
|
|
|
this.$api.getSignList(parm).then(res=>{
|
|
|
+ let data=res.data.data.list;
|
|
|
+ for(let i=0;i<data.length;i++){
|
|
|
+ let item=data[i],status='',pay_status='',verify='',bill_type='';
|
|
|
+ if(item.pay_status){pay_status='已支付'}else{pay_status='未支付'}
|
|
|
+ if(item.verify){verify='已认证'}else{verify='未认证'}
|
|
|
+ if(item.bill_type == 0)bill_type='不需要发票';
|
|
|
+ if(item.bill_type == 1)bill_type='个人发票';
|
|
|
+ if(item.bill_type == 2)bill_type='公司发票';
|
|
|
+ if(item.order_status == -2)status='审核未通过';
|
|
|
+ if(item.order_status == -1)status='待提交资料';
|
|
|
+ if(item.order_status == 0)status='待审核';
|
|
|
+ if(item.order_status == 1)status='已审核立即支付';
|
|
|
+ if(item.order_status == 2)status='学习中';
|
|
|
+ if(item.order_status == 3)status='已完成';
|
|
|
+ item.order_status_1=status
|
|
|
+ item.pay_status_1=pay_status
|
|
|
+ item.verify_1=verify
|
|
|
+ item.bill_type_1=bill_type
|
|
|
+ }
|
|
|
this.list=res.data.data.list
|
|
|
this.total=res.data.data.total
|
|
|
this.loading=false
|
|
|
@@ -365,38 +391,36 @@ export default {
|
|
|
},
|
|
|
print(){
|
|
|
var newwindow = window.open("","");
|
|
|
- var tr='';
|
|
|
+ var tr='',th='';
|
|
|
+ for(let i=0;i<this.itemList.length;i++){
|
|
|
+ let item=this.itemList[i];
|
|
|
+ th+=`
|
|
|
+ <td>${item.name}</td>
|
|
|
+ `
|
|
|
+ }
|
|
|
for(let i=0;i<this.list.length;i++){
|
|
|
let item=this.list[i];
|
|
|
- let status='';
|
|
|
- // -2:审核未通过,-1:待提交资料,0:待审核,1:已审核立即支付,2:学习中,3:已完成
|
|
|
- if(item.order_status == -2)status='审核未通过';
|
|
|
- if(item.order_status == -1)status='待提交资料';
|
|
|
- if(item.order_status == 0)status='待审核';
|
|
|
- if(item.order_status == 1)status='已审核立即支付';
|
|
|
- if(item.order_status == 2)status='学习中';
|
|
|
- if(item.order_status == 3)status='已完成';
|
|
|
- tr+=`
|
|
|
- <tr>
|
|
|
- <td>${item.name}</td><td>${item.phone}</td><td>${status}</td>
|
|
|
- <td>${item.remark}</td><td>${item.subject_item0}</td>
|
|
|
- <td>${item.subject_item1}</td><td>${item.subject_item2}</td><td>${item.train_type}</td>
|
|
|
- </tr>
|
|
|
- `
|
|
|
+ let tds=''
|
|
|
+ for(let j=0;j<this.itemList.length;j++){
|
|
|
+ let item_1=this.itemList[j];
|
|
|
+ tds+=`
|
|
|
+ <td>${item[item_1.value]||' '}</td>
|
|
|
+ `
|
|
|
+ }
|
|
|
+ tr+=`<tr>${tds}</tr>`
|
|
|
}
|
|
|
var table=`
|
|
|
<style>
|
|
|
- td{text-align:center;padding:10px 0;color:#666;}
|
|
|
-
|
|
|
+ td{text-align:center;padding:10px 0;color:#666;font-size:12px;}
|
|
|
</style>
|
|
|
<table style='border-collapse: collapse;border:none;border-color:#d9d9d9;padding:10px;' border='1' cellspacing='0' cellpadding='0' width='100%'>
|
|
|
<thead style="text-align:center;">
|
|
|
- <td>姓名</td><td>联系电话</td><td>状态</td><td>管理员备注</td><td>报名类型</td>
|
|
|
- <td>作业类别</td><td>准操类型</td><td>培训类型</td>
|
|
|
+ ${th}
|
|
|
</thead>
|
|
|
${tr}
|
|
|
</table>
|
|
|
`
|
|
|
+ console.log(table)
|
|
|
newwindow.document.write(table);
|
|
|
newwindow.window.print();
|
|
|
},
|