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

新增部门客户列表

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