You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

358 lines
11 KiB

2 years ago
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content" style="padding-left:0">
2 years ago
2 years ago
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="请输入姓名"></el-input>
</div>
<div>
2 years ago
<el-select v-model="select.fee_status" placeholder="请选择状态" clearable>
<el-option v-for="item in fee_status_list" :key="item.id" :label="item.value" :value="item.id">
2 years ago
</el-option>
</el-select>
</div>
<div>
2 years ago
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
2 years ago
</div>
<div>
2 years ago
<el-button type="primary" size="small" @click="exportExcel"></el-button>
2 years ago
</div>
2 years ago
<div v-if="url_type=='pay'">
<el-popconfirm @confirm="updateAllFee" title="确定要批量核对吗?">
<el-button type="primary" size="small" slot="reference">批量核对</el-button>
2 years ago
</el-popconfirm>
2 years ago
</div>
2 years ago
<div v-if="url_type=='pay'">
<el-popconfirm @confirm="showSendMessage" title="确定要发送催缴通知吗?">
<el-button type="primary" size="small" slot="reference">催缴通知</el-button>
2 years ago
</el-popconfirm>
2 years ago
</div>
</div>
</div>
</lx-header>
</div>
</div>
2 years ago
<div>
<div class="txl">
<div>课程名称{{subjectObj.title}}</div>
<div>开课日期{{subjectObj.date}}</div>
2 years ago
<div>课程体系{{subjectObj.leibie}}</div>
2 years ago
</div>
<xy-table :list="list" :total="total" :showIndex="url_type==='pay'?false:true"
:showIndexFixed="url_type==='pay'?null:'left'" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item" @selection-change="selectionChange">
<template v-slot:status>
<el-table-column align='center' label="状态" width="120" header-align="center">
<template slot-scope="scope">
<div v-for="item in apply_status_list">
<el-tag :type="item.type" v-if="scope.row.status===item.id">{{item.value}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:fee_status>
<el-table-column align='center' label="缴费状态" width="120" header-align="center">
<template slot-scope="scope">
<div v-for="item in fee_status_list">
<el-tag :type="item.type" v-if="scope.row.fee_status===item.id">{{item.value}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:img>
2 years ago
<el-table-column align='center' label="缴费截图" width="100" header-align="center">
2 years ago
<template slot-scope="scope">
2 years ago
<template v-for="item in scope.row.fee_files">
<el-image style="width:'40px';height:'40px'" :src="item.url"
2 years ago
:preview-src-list="[item.url]"></el-image>
2 years ago
</template>
2 years ago
</template>
</el-table-column>
2 years ago
</template>
2 years ago
<template v-slot:btns>
2 years ago
<el-table-column v-if="url_type=='pay'" align='center' fixed="right" label="操作" width="80"
header-align="center">
<template slot-scope="scope">
2 years ago
<!-- v-if="scope.row.fee_status===3"-->
<el-button type="primary" size="small"
2 years ago
@click="showCheckPay(scope.row)">核对</el-button>
2 years ago
</template>
2 years ago
</el-table-column>
<div v-else></div>
2 years ago
</template>
</xy-table>
2 years ago
</div>
2 years ago
2 years ago
<checkPay ref="checkPay" @refresh="getList"></checkPay>
2 years ago
<sendMessage ref="sendMessage" @refresh="getList"></sendMessage>
2 years ago
</div>
</template>
<script>
2 years ago
import checkPay from './components/checkPay.vue';
import sendMessage from './components/sendMessage.vue';
import myMixins from "@/mixin/selectMixin.js";
import {
updateFeeStatus,
index as indexStudy
} from "@/api/apply/index"
2 years ago
2 years ago
import {
download
} from "@/utils/downloadRequest";
export default {
2 years ago
mixins: [myMixins],
2 years ago
components: {
2 years ago
checkPay,
2 years ago
sendMessage
},
data() {
2 years ago
return {
subjectObj: {},
url_type: 'pay',
2 years ago
select: {
2 years ago
fee_status: '',
name: '',
page: 1,
2 years ago
page_size: 10,
2 years ago
},
selectids: [],
showImg: false,
srcList: [],
2 years ago
list: [],
2 years ago
total: 0,
table_item: [{
2 years ago
prop: 'user.username',
label: '姓名',
align: 'center',
width: 120,
fixed: 'left'
}, {
prop: 'user.sex',
label: '性别',
align: 'center',
width: 120
}, {
prop: 'user.idcard',
label: '身份证号',
align: 'center',
width: 180
}, {
prop: 'user.mobile',
label: '联系方式',
align: 'center',
width: 120,
}, {
prop: 'user.birthday',
label: '出生日期',
align: 'center',
width: 120,
}, {
prop: 'user.email',
label: '邮箱',
align: 'center',
width: 120,
}, {
prop: 'user.company_name',
label: '公司名称',
2 years ago
align: 'left',
width: 240,
2 years ago
}, {
prop: 'user.company_position',
label: '职务',
align: 'center',
width: 120,
}, {
prop: 'score',
label: '评分',
align: 'center',
width: 120,
},
{
prop: 'created_at',
label: '报名时间',
align: 'center',
width: 180,
}, {
prop: 'status',
label: '审核状态',
align: 'center',
width: 180,
}, {
prop: 'fee_status',
label: '缴费状态',
align: 'center',
width: 180,
}, {
prop: 'img',
label: '缴费截图',
align: 'center',
width: 120
}
]
2 years ago
}
},
2 years ago
created() {
this.url_type = this.$route.query.type ? this.$route.query.type : 'pay'
this.subjectObj = this.$route.query
this.select.course_id = this.subjectObj.id
if (this.url_type == 'pay') {
2 years ago
this.table_item.unshift({
prop:'selection',
2 years ago
type: 'selection',
width: 50,
fixed: 'left'
})
}
2 years ago
this.getList()
2 years ago
},
2 years ago
methods: {
pageIndexChange(e) {
this.select.page = e
this.getList()
},
pageSizeChange(e) {
this.select.page_size = e
this.select.page = 1
this.getList()
},
async getList() {
const res = await indexStudy({
page: this.select.page,
page_size: this.select.page_size,
name: this.select.name,
filter: [{
key: 'fee_status',
op: 'eq',
value: this.select.fee_status
}, {
key: 'course_id',
op: 'eq',
value: this.select.course_id
}]
})
this.list = res.data
this.total = res.total
},
// 单个核对
showCheckPay(row) {
this.$refs.checkPay.row = row
this.$refs.checkPay.isShow = true
2 years ago
},
// 批量核对
2 years ago
selectionChange(row) {
if (row && row.length > 0) {
let arr = []
row.map(item => {
arr.push(item.id)
})
this.selectids = arr
} else {
this.selectids = []
2 years ago
}
2 years ago
},
updateAllFee(status) {
if (this.selectids.length < 1) {
this.$message.warning("请先选择要核对的学员")
return
}
let ids = this.selectids.join(',')
updateFeeStatus({
ids: ids,
fee_status: 1,
}).then(res => {
this.$Message.success('核对成功')
this.getList()
})
},
// 批量发信息
showSendMessage() {
if (this.selectids.length < 1) {
this.$message.warning("请先选择要提醒缴费的学员")
return
2 years ago
}
2 years ago
this.$refs.sendMessage.course_id = this.select.course_id
this.$refs.sendMessage.selectids = this.selectids
this.$refs.sendMessage.isShow = true
},
exportExcel() {
let _export = {}
2 years ago
this.table_item.map(item => {
console.log("item.prop",item.prop)
if (item.prop === 'status') {
2 years ago
_export['status_text'] = item.label
2 years ago
} else if (item.prop === 'fee_status') {
_export['fee_status_text'] = item.label
}else if (item.prop === 'img' || item.prop === 'selection') {
}else {
2 years ago
_export[item.prop] = item.label
}
})
2 years ago
console.log("_export",_export)
2 years ago
download(
'/api/admin/course-signs/index',
'get', {
name: this.select.name,
export_fields: _export,
filter: [{
key: 'course_id',
op: 'eq',
value: this.select.course_id
}, {
key: 'fee_status',
op: 'eq',
value: this.select.fee_status
}],
is_export: 1,
page: 1,
page_size: 999
},
`${this.subjectObj.title}缴费信息.xlsx`)
2 years ago
},
2 years ago
}
}
2 years ago
</script>
<style lang="scss" scoped>
.txl {
display: flex;
align-items: center;
margin-bottom: 10px;
2 years ago
font-size: 18px;
2 years ago
&>div {
2 years ago
margin-right: 15px;
2 years ago
2 years ago
}
}
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>