Commit a8672bbb authored by 邓春圆's avatar 邓春圆

客户模块异步导出

parent 91f48a6c
......@@ -131,23 +131,23 @@ export function waiteConfirmExportExcel(query) {
* @param query
* @return {*}
*/
export function waitDistributionExportExcel(query) {
return request({
url: '/ecw/customer/wait-distribution-export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// export function waitDistributionExportExcel(query) {
// return request({
// url: '/ecw/customer/wait-distribution-export-excel',
// method: 'get',
// params: query,
// responseType: 'blob'
// })
// }
// 公海池客户列表导出
export function publicExportExcel(query) {
return request({
url: '/ecw/customer/public-export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// export function publicExportExcel(query) {
// return request({
// url: '/ecw/customer/public-export-excel',
// method: 'get',
// params: query,
// responseType: 'blob'
// })
// }
export function indirectCustomerExportExcel(query) {
return request({
url: '/ecw/indirect-customer/export-excel',
......@@ -434,3 +434,39 @@ export function getCustomerOperatelog(params){
params
})
}
//全部导出
export function customerExportExcel(){
return request({
url:'/ecw/customer/export-excel',
method:'get'
})
}
// 导出我的客户列表
//全部导出
export function mineExportExcel(){
return request({
url:'/ecw/customer/mine-export-excel',
method:'get'
})
}
// 导出我的待接收客户
export function waiteConfirEexportExcel(){
return request({
url:'/ecw/customer/waite-confirm-export-excel',
method:'get'
})
}
//公海池客户列表导出
export function publicExportExcel(){
return request({
url:'/ecw/customer/public-export-excel',
method:'get'
})
}
//待分配客户
export function waitDistributionExportExcel(){
return request({
url:'/ecw/customer/wait-distribution-export-excel',
method:'get'
})
}
......@@ -555,7 +555,7 @@ import CustomerFollowList from "@/components/CustomerFollowList"
import customerComplaints from "@/components/customerComplaints"
import {listServiceUser} from "@/api/system/user";
import { getCountryListAll } from '@/api/ecw/country'
import {getCreditPage} from "@/api/customer/credit";
import {customerExportExcel, getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue";
......@@ -782,20 +782,26 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有客户数据项?')).then(() => {
this.exportLoading = true;
return exportCustomerExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('客户信息')}.xls`);
/* console.log(response,'response')
this.$download.excel(response, `${this.$t('全部客户信息')}.xls`); */
this.exportLoading = false;
let func = null
let title = ''
switch (this.$route.path){
case '/customer/customer' :
func = customerExportExcel
title = '是否确认导出所有客户数据项?'
break;
case '/customer/department-customers':
// getCustomerDeptPage(params).then(this.setData);
break;
case '/customer/potential':
// getPotential(params).then(this.setData)
break;
}
// // 执行导出
this.$modal.confirm(this.$t(title)).then(() => {
func().then(r =>{
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
}).catch(() => {});
},
/** 搜索按钮操作 */
......
......@@ -360,7 +360,7 @@ import {
exportCustomerExcel,
getWaitForConfirmList,
confirm,
waiteConfirmExportExcel
waiteConfirmExportExcel, waiteConfirEexportExcel
} from "@/api/ecw/customer";
import { listServiceUser } from "@/api/system/user"
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
......@@ -615,17 +615,15 @@ export default {
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// let params = {...this.queryParams};
// params.pageNo = undefined;
// params.pageSize = undefined;
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出我的待接受客户数据项?')).then(() => {
this.exportLoading = true;
return waiteConfirmExportExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('我的待接收客户')}.xls`);
this.exportLoading = false;
waiteConfirEexportExcel().then(()=>{
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
}).catch(() => {});
},
......
......@@ -439,18 +439,10 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出待分配客户数据项?')).then(() => {
this.exportLoading = true;
return waitDistributionExportExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('待分配客户')}.xls`);
this.exportLoading = false;
this.$modal.confirm(this.$t('是否确认导出待分配客户数据项?')).then(response => {
waitDistributionExportExcel().then(()=>{
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
}).catch(() => {});
},
},
......
......@@ -154,7 +154,7 @@ import {
updateCustomer,
deleteCustomer,
getMyCustomerService,
mineExporteExcel
mineExporteExcel, mineExportExcel
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload'
......@@ -408,17 +408,17 @@ export default {
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
// let params = {...this.queryParams};
// params.pageNo = undefined;
// params.pageSize = undefined;
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// // 执行导出
this.$modal.confirm(this.$t('是否确认导出我的客户数据项?')).then(() => {
this.exportLoading = true;
return mineExporteExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('我的客户列表')}.xls`);
this.exportLoading = false;
mineExportExcel().then(
()=>{
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
}
)
}).catch(() => {});
},
followUp(row){
......
......@@ -412,18 +412,11 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出公海池客户数据项?')).then(() => {
this.exportLoading = true;
return publicExportExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('公海池客户')}.xls`);
this.exportLoading = false;
publicExportExcel().then(()=>{
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
})
}).catch(() => {});
},
//分配客服
......
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