deptTarget.js 2.57 KB
Newer Older
huyf's avatar
huyf committed
1 2 3 4 5 6 7 8 9 10 11
import request from '@/utils/request'

// 创建部门业绩目标设置
export function createDeptTarget(data) {
  return request({
    url: '/sale/dept-target/create',
    method: 'post',
    data: data
  })
}

huyf's avatar
huyf committed
12
// 我的部门业绩
huyf's avatar
huyf committed
13 14 15 16 17 18 19
export function myDeptAchievementByPage(data) {
  return request({
    url: '/sale/dept-target/myDeptAchievementByPage',
    method: 'post',
    data: data
  })
}
huyf's avatar
huyf committed
20
// 我的业绩
huyufeng's avatar
huyufeng committed
21 22 23 24 25 26 27 28
export function myAchievementByPage(data) {
  return request({
    url: '/sale/dept-target/myAchievementByPage',
    method: 'post',
    data: data
  })
}

huyf's avatar
huyf committed
29 30 31 32 33 34 35 36 37
// 全部业绩
export function allAchievementByPage(data) {
  return request({
    url: '/sale/dept-target/allAchievementByPage',
    method: 'post',
    data: data
  })
}

huyf's avatar
huyf committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
// 更新部门业绩目标设置
export function updateDeptTarget(data) {
  return request({
    url: '/sale/dept-target/update',
    method: 'put',
    data: data
  })
}

// 删除部门业绩目标设置
export function deleteDeptTarget(id) {
  return request({
    url: '/sale/dept-target/delete?id=' + id,
    method: 'delete'
  })
}

export function getCreateInitData() {
  return request({
    url: '/sale/dept-target/getCreateInitData',
    method: 'get'
  })
}

// 获得部门业绩目标设置
export function getDeptTarget(id) {
  return request({
    url: '/sale/dept-target/get?id=' + id,
    method: 'get'
  })
}

// 获得部门业绩目标设置分页
export function getDeptTargetPage(query) {
  return request({
huyf's avatar
huyf committed
73
    url: '/sale/dept-target/statistics/page',
huyf's avatar
huyf committed
74 75 76 77 78
    method: 'get',
    params: query
  })
}

huyf's avatar
huyf committed
79 80 81 82 83 84 85 86 87
// 获得我的部门及以下业绩目标设置分页
export function getMyDeptTargetPage(query) {
  return request({
    url: '/sale/dept-target/deptStatistics/page',
    method: 'get',
    params: query
  })
}

huyf's avatar
huyf committed
88 89 90 91 92 93 94 95 96
// 获得个人目标进度分页
export function getPersonTargetPage(query) {
  return request({
    url: '/sale/dept-target/personal/page',
    method: 'get',
    params: query
  })
}

huyf's avatar
huyf committed
97 98 99 100 101 102 103 104 105
// 导出部门业绩目标设置 Excel
export function exportDeptTargetExcel(query) {
  return request({
    url: '/sale/dept-target/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
huyf's avatar
huyf committed
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125

// 导出部门业绩目标设置 Excel
export function exportDetailExcel(query) {
  return request({
    url: '/sale/dept-target/exportDetailExcel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 导出部门业绩目标设置 Excel
export function exportStatisticsExcel(query) {
  return request({
    url: '/sale/dept-target/exportStatisticsExcel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}