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

新增部门客户列表

parent d222c314
...@@ -51,6 +51,16 @@ export function getCustomerPage(query) { ...@@ -51,6 +51,16 @@ export function getCustomerPage(query) {
params: query params: query
}) })
} }
/**
* 获得部门客户
* */
export function getCustomerDeptPage(query){
return request({
url:'/ecw/customer/deptPage',
method:'get',
params:query
})
}
// 获得客户下拉 // 获得客户下拉
export function getCustomerSelect(query) { export function getCustomerSelect(query) {
...@@ -350,3 +360,13 @@ export function testEnterToOpenSea(customerId) { ...@@ -350,3 +360,13 @@ export function testEnterToOpenSea(customerId) {
params: {customerId} params: {customerId}
}) })
} }
/**
* 获取常用提货网点
* */
export function getServiceNetwork(){
return request({
url:'/ecw/node/list',
method:'get',
})
}
...@@ -77,11 +77,11 @@ ...@@ -77,11 +77,11 @@
v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button> v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain size="mini" :loading="exportLoading" <el-button v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
v-hasPermi="['ecw:customer:transport']" >{{$t('设为空运客户')}}</el-button> v-hasPermi="['ecw:customer:transport']" >{{$t('设为空运客户')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain size="mini" :loading="exportLoading" <el-button v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button> v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -514,7 +514,7 @@ ...@@ -514,7 +514,7 @@
<script> <script>
import { import {
createCustomer, updateCustomer, deleteCustomer, getCustomer, createCustomer, updateCustomer, deleteCustomer, getCustomer,
getCustomerPage, exportCustomerExcel, testEnterToOpenSea getCustomerPage, exportCustomerExcel, testEnterToOpenSea, getCustomerDeptPage
} from "@/api/ecw/customer"; } from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {CommonStatusEnum} from '@/utils/constants' import {CommonStatusEnum} from '@/utils/constants'
...@@ -633,17 +633,26 @@ export default { ...@@ -633,17 +633,26 @@ export default {
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
console.log(this.$route.path,'path')
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime', false);
// 执行查询 // 执行查询
getCustomerPage(params).then(response => { switch (this.$route.path){
case '/customer/customer' :
getCustomerPage(params).then(this.setData);
break;
case '/customer/department-customers':
getCustomerDeptPage(params).then(this.setData);
}
},
setData(response){
console.log(response,'response') console.log(response,'response')
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
});
}, },
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
......
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