credit_manage.js 2.58 KB
import request from '@/utils/request'
import { ContentTypeEnum } from '@/utils/httpEnum';


// 查询列表
export function queryApi(params) {
  return request({
    url: `/customerCredit/query`,
    method: 'get',
    params
  })
}

// 取消
export function cancelApi(id) {
  return request({
    url: `/customerCredit/cancel`,
    method: 'get',
    params: { id }
  })
}

// 根据ID查询详情数据
export function getDetailApi(id) {
  return request({
    url: `/customerCredit/getById`,
    method: 'get',
    params: { id }
  })
}

// 生成客户资信编号
export function generateCreditCode() {
  return request({
    url: `/customerCredit/generateCode`,
    method: 'get'
  })
}

// 根据ID查询客户资信详情(审核、审核详情)
export function getExamineById(id) {
  return request({
    url: `/customerCredit/getExamineById`,
    method: 'get',
    params: { id }
  })
}

// 新增保存
export function createApi(params) {
  return request({
    url: `/customerCredit/add`,
    method: 'post',
    data: params,
    contentType: ContentTypeEnum.JSON
  })
}


// 修改保存
export function updateApi(params) {
  return request({
    url: `/customerCredit/update`,
    method: 'put',
    data: params,
    contentType: ContentTypeEnum.JSON
  })
}

// 客户资信变更记录列表查询
export function getByIdCreditHistoryList(creditId) {
  return request({
    url: `/customerCreditHistory/customerCreditHistoryList`,
    method: 'get',
    params: {
        creditId,
    },
  })
}


// 客户资信审核变更记录列表查询
export function getByIdExamineCustomerCreditHistoryList(creditId) {
  return request({
    url: `/customerCreditHistory/examineCustomerCreditHistoryList`,
    method: 'get',
    params: {
        creditId,
    },
  })
}

// 客户资信变更详情查询
export function getCreditHistoryList(id) {
  return request({
    url: `/customerCreditHistory/getById`,
    method: 'get',
    params: {
        id,
    },
  })
}

// 删除
export function deleteById(id) {
  return request({
    url: '/customerCredit/deleteById?id=' + id,
    method: 'get',
    params: {
        id,
    },
  })
}

// 查询部门下所有用户
export function getAllUser() {
  return request({
    url: '/customerCredit/getAllUser',
    method: 'get',
  })
}

// 获取调查人
export function getDeptUser() {
  return request({
    url: '/customerCredit/getDeptUser',
    method: 'get',
  })
}

// 获取区域
// type: ALL  代表获取全部区域的值
export function getArea(type) {
  return request({
    url: '/system/dept/queryArea',
    method: 'get',
    params: {
      type,
    },
  })
}