customer.js 7.43 KB
Newer Older
1
import request from '@/utils/request'
2
import query from "@/views/ecw/customer/query";
3
import * as url from "url";
4 5 6 7 8 9 10 11 12

// 创建客户
export function createCustomer(data) {
  return request({
    url: '/ecw/customer/create',
    method: 'post',
    data: data
  })
}
dcy's avatar
dcy committed
13 14 15 16 17 18 19 20
//完善客户
export function fillupCustomeInfo(data){
  return request({
    url:'/ecw/customer/fillup-customer-info',
    method:'put',
    data
  })
}
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
// 更新客户
export function updateCustomer(data) {
  return request({
    url: '/ecw/customer/update',
    method: 'put',
    data: data
  })
}

// 删除客户
export function deleteCustomer(id) {
  return request({
    url: '/ecw/customer/delete?id=' + id,
    method: 'delete'
  })
}

// 获得客户
export function getCustomer(id) {
  return request({
    url: '/ecw/customer/get?id=' + id,
    method: 'get'
  })
}

// 获得客户分页
export function getCustomerPage(query) {
  return request({
    url: '/ecw/customer/page',
    method: 'get',
    params: query
  })
}
邓春圆's avatar
邓春圆 committed
54 55 56 57 58 59 60 61 62 63
/**
 * 获得部门客户
 * */
export function getCustomerDeptPage(query){
  return request({
    url:'/ecw/customer/deptPage',
    method:'get',
    params:query
  })
}
64

65
// 获得客户下拉
66 67 68 69 70 71 72 73
export function getCustomerSelect(query) {
  return request({
    url: '/ecw/customer/select',
    method: 'get',
    params: query
  })
}

74 75 76 77 78 79 80 81 82
// 根据客户id集合获得客户详情列表
export function getCustomerList(query) {
  return request({
    url: '/ecw/customer/list',
    method: 'get',
    params: query
  })
}

83
// 导出客户 Excel 全部
84 85 86 87 88 89 90 91
export function exportCustomerExcel(query) {
  return request({
    url: '/ecw/customer/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
// 我的客户导出
export function mineExporteExcel(query) {
  return request({
    url: '/ecw/customer/mine-export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
// 我的待接收客户列表导出
export function waiteConfirmExportExcel(query) {
  return request({
    url: '/ecw/customer/waite-confirm-export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
110

111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
/**
 *  // 待分配客户列表导出
 * @param query
 * @return {*}
 */
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 indirectCustomerExportExcel(query) {
  return request({
    url: '/ecw/indirect-customer/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
141
// 待接收客户列表
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
export function getWaitForConfirmList(query) {
  return request({
    url: '/ecw/customer/get-wait-for-confirm',
    method: 'get',
    params: query
  })
}

// 确认
export function confirm(data) {
  return request({
    url: '/ecw/customer/confirm',
    method: 'put',
    data: data
  })
}

// 待分配客户
export function getWaitForDistributionList(query) {
  return request({
    url: '/ecw/customer/get-wait-for-distribution',
    method: 'get',
    params: query
  })
}

dcy's avatar
dcy committed
168
// 移交
169 170 171 172
export function handOverCustomer(data) {
  return request({
    url: '/ecw/customer/handOver',
    method: 'put',
dcy's avatar
dcy committed
173 174
    data: data,
    })
175 176 177 178 179 180 181 182 183 184 185
}

// 公海池客户
export function getPublicList(query) {
  return request({
    url: '/ecw/customer/get-public',
    method: 'get',
    params: query
  })
}

dcy's avatar
dcy committed
186
//捞取
187
export function setFishing(query){
188
  return request({
189
    url:'/ecw/customer/catch-open-sea-customer',
dcy's avatar
dcy committed
190
    method:'put',
191 192 193 194
    params:query,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    }
195 196
  })
}
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
//待分配 客户列表
export function getCustomerToBeAssigned(query){
  return request(
    {
      url:'ecw/customer/get-wait-for-distribution',
      method: 'get',
      params: query

    }
  )
}
//我的客户列表
export function getMyCustomerService(query){
  return request({
    url:'/ecw/customer/get-mine',
    method:'get',
    params:query,
  })
}
216
//获取会员列表
217
export  function userMemberUserList(params){
218 219
  return request({
    url:'/member/user/member-user-list',
220 221 222 223 224 225 226 227 228
    method:'get',
    params
  })
}
export function memberUserList(params){
  return request({
    url:'/member/user/list',
    method:'get',
    params
229 230
  })
}
dcy's avatar
dcy committed
231 232 233 234 235 236 237 238
//查看某客户授权的品牌
export function getBrankByCustomer(data){
  return request({
    url:'/ecw/product-brank/getBrankByCustomer',
    method:'post',
    data,
  })
}
dcy's avatar
dcy committed
239 240 241
//
export function levelLogPage(params){
  return request({
dcy's avatar
dcy committed
242
    url:'/customer/detail/infoList/levelLogPage',
dcy's avatar
dcy committed
243 244 245 246 247 248 249
    method:'get',
    params
  })
}
//获取信用等级日志列表
export function customerCreditLogPage(params){
  return  request({
dcy's avatar
dcy committed
250 251 252 253 254 255 256 257
    url:'/customer/detail/infoList/creditLogPage',
    method:'get',
    params
  })
}
//客户详情订单分页
export function infoListOrderPage(params){
  return request({
dcy's avatar
dcy committed
258
    url:'/ecw/order/customer-order-page',
dcy's avatar
dcy committed
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274
    method:'get',
    params
  })
}
//客户详情 --- 报价
export  function infoListOfferPage(params){
  return request({
    url:'/customer/detail/infoList/offerPage',
    method:'get',
    params
  })
}
//客户数据
export function orderStatistics(params){
  return request({
    url:'/customer/detail/infoList/orderStatistics',
dcy's avatar
dcy committed
275 276 277 278
    method:'get',
    params
  })
}
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
//创建客户信用日志
export function creditLogCreate(data){
  return request({
    url:'/customer/credit-log/create',
    method:'post',
    data
  })
}
//获得客户统计
export function creditScoreStatistic(params){
  return request({
    url:'/customer/detail/infoList/creditScoreStatistic',
    method:'get',
    params
  })
}
//获取账单数据
export function infoListReceiptPage(params){
  return request({
    url:'/customer/detail/infoList/receiptPage',
    method:'get',
    params
  })
}

dragondean@qq.com's avatar
dragondean@qq.com committed
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
// 获取用户
export function getMember(id){
  return request({
    url: "/member/user/get",
    params: {id}
  })
}

// 获得客户路线
export function getCustomerLines(customerId){
  return request({
    url: '/ecw/customer-line/get-by-customer',
    params: {customerId}
  })
}

320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
// 获取客户延期调入公海池的审批详情
export function getDelayInfo(query) {
  return request({
    url: '/ecw/customer/delay/approval/info',
    method: 'get',
    params: query
  })
}

//客户延期调入公海池的审批申请
export function creatDelayApproval(data){
  return request({
    url:'/ecw/customer/delay/approval',
    method:'post',
    data
  })
}

// 取消客户延期调入公海池的审批申请
我在何方's avatar
我在何方 committed
339
export function cancelDelayApproval(query) {
340 341 342
  return request({
    url: '/ecw/customer/cancel/delay/approval',
    method: 'put',
我在何方's avatar
我在何方 committed
343
     params:query,
344 345
    })
}
dragondean@qq.com's avatar
dragondean@qq.com committed
346 347 348 349 350 351 352 353

// 获取客户审批详情
export function getApproval(id) {
  return request({
    url: '/ecw/customer-approval/get',
    method: 'get',
    params: {id}
  })
dcy's avatar
dcy committed
354
}
355 356 357 358 359 360 361 362
//调入公海池
export function testEnterToOpenSea(customerId) {
  return request({
    url: '/ecw/customer/test-enter-to-open-sea',
    method: 'get',
    params: {customerId}
  })
}
邓春圆's avatar
邓春圆 committed
363 364 365 366 367 368 369 370 371 372

/**
 * 获取常用提货网点
 * */
 export function getServiceNetwork(){
   return request({
     url:'/ecw/node/list',
     method:'get',
   })
}
373 374 375 376 377 378 379 380 381
//设置空运客户
export function changeCustomerAir(data){
   return request({
     url:'/ecw/customer/change-customer-air',
     method:'put',
     data

   })
}