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

// 创建仓库
export function createWarehouse(data) {
  return request({
    url: '/ecw/warehouse/create',
    method: 'post',
    data: data
  })
}

huyf's avatar
huyf committed
12 13 14 15 16 17 18 19 20 21
//创建提单模板
export function createTemplate(data) {
  console.log(data);
  return request({
    url: '/ecw/lading-template/create',
    method: 'post',
    data: data
  })
}

wanglianghe's avatar
wanglianghe committed
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 54 55
// 更新仓库
export function updateWarehouse(data) {
  return request({
    url: '/ecw/warehouse/update',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function deleteWarehouse(id) {
  return request({
    url: '/ecw/warehouse/delete?id=' + id,
    method: 'delete'
  })
}

// 获得仓库
export function getWarehouse(id) {
  return request({
    url: '/ecw/warehouse/get?id=' + id,
    method: 'get'
  })
}

// 获得仓库分页
export function getWarehousePage(query) {
  return request({
    url: '/ecw/warehouse/page',
    method: 'get',
    params: query
  })
}

wanglianghe's avatar
wanglianghe committed
56 57 58 59 60 61 62 63 64
// 获得仓库列表
export function getWarehouseList(query) {
  return request({
    url: '/ecw/warehouse/list',
    method: 'get',
    params: query
  })
}

wanglianghe's avatar
wanglianghe committed
65 66 67 68 69 70 71 72 73
// 导出仓库 Excel
export function exportWarehouseExcel(query) {
  return request({
    url: '/ecw/warehouse/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
74

wanglianghe's avatar
wanglianghe committed
75
/**所有线路列表 */
76 77 78 79 80 81 82 83
export function routerList(data) {
  return request({
    url: '/ecw/warehouse/routerList',
    method: 'post',
    data: data
  })
}

wanglianghe's avatar
wanglianghe committed
84
/**修改线路开通状态 */
85 86 87 88 89 90 91 92
export function changeRouteStatus(data) {
  return request({
    url: '/ecw/warehouse/changeRouteStatus',
    method: 'post',
    data: data
  })
}

huyf's avatar
huyf committed
93 94 95 96 97 98 99 100
export function getLadingTemplate(data) {
  console.log(data);
  return request({
    url: '/ecw/lading-template/getByLineId?lineId='+data,
    method: 'get'
  })
}

wanglianghe's avatar
wanglianghe committed
101
/**查看已开通线路列表 */
102
export function openedRouterList(data = {}) {
wanglianghe's avatar
wanglianghe committed
103 104 105 106 107 108 109
  return request({
    url: '/ecw/warehouse/openedRouterList',
    method: 'post',
    data: data
  })
}

wanglianghe's avatar
wanglianghe committed
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
/**仓库绑定部门 */
export function deptBind(data) {
  return request({
    url: '/ecw/warehouse/deptBind',
    method: 'post',
    data: data
  })
}

/**获取已绑定的部门列表 */
export function deptList(data) {
  return request({
    url: '/ecw/warehouse/deptList',
    method: 'post',
    data: data
  })
}

wanglianghe's avatar
wanglianghe committed
128 129 130 131 132 133 134 135
/** 修改其他服务 */
export function serviceConfig(data) {
  return request({
    url: '/ecw/warehouse/serviceConfig',
    method: 'post',
    data: data
  })
}
wanglianghe's avatar
wanglianghe committed
136

137