|
@@ -4,6 +4,7 @@
|
|
|
<div slot="footer">
|
|
|
<el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
|
|
|
<el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加客户</el-button>
|
|
|
+ <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出</el-button>
|
|
|
</div>
|
|
|
</base-form>
|
|
|
</header-collapse>
|
|
@@ -19,6 +20,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
searchData: [
|
|
|
+ { label: '登记时间', label2: '登记开始时间', label3: '登记结束时间', key: 'startEndTime', type: 'datePicker'},
|
|
|
{ label: '电话', key: 'phone' },
|
|
|
{ label: '姓名', key: 'name' },
|
|
|
{ label: '意向等级', key: 'purpose_level', type: 'select', options: this.$dictData.purpose_level},
|
|
@@ -31,6 +33,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ toExportExcel () {
|
|
|
+ const oldform = this.$refs.ruleForm.baseForm
|
|
|
+ const newForm = { ...oldform }
|
|
|
+ if (newForm.startEndTime) {
|
|
|
+ newForm.start_at = newForm.startEndTime[0]
|
|
|
+ newForm.end_at = newForm.startEndTime[1]
|
|
|
+ delete newForm.startEndTime
|
|
|
+ } else {
|
|
|
+ this.$msgw('请选择导出的时间范围')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const token = window.sessionStorage.getItem('fp_token')
|
|
|
+ window.open(`https://api.honglouplus.com/adm/customer/export?token=${encodeURIComponent(token)}&start_at=${newForm.start_at}&end_at=${newForm.end_at}`)
|
|
|
+ },
|
|
|
addHandle () {
|
|
|
this.parentData.isDtlShow = true
|
|
|
this.parentData.curObj = {}
|