Blame view

ant-design-vue-jeecg/src/api/api.js 12.2 KB
肖超群 authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"

//角色管理
const addRole = (params)=>postAction("/sys/role/add",params);
const editRole = (params)=>putAction("/sys/role/edit",params);
const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
const queryall = (params)=>getAction("/sys/role/queryall",params);

//用户管理
const addUser = (params)=>postAction("/sys/user/add",params);
const editUser = (params)=>putAction("/sys/user/edit",params);
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
const getUserList = (params)=>getAction("/sys/user/list",params);
const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params);
//验证用户是否存在
const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
//改变密码
const changePassword = (params)=>putAction("/sys/user/changePassword",params);

//权限管理
const addPermission= (params)=>postAction("/sys/permission/add",params);
const editPermission= (params)=>putAction("/sys/permission/edit",params);
const getPermissionList = (params)=>getAction("/sys/permission/list",params);
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)
const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionByToken");
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);

// 部门管理
const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
const queryDepartTreeSync = (params)=>getAction("/sys/sysDepart/queryDepartTreeSync",params);
const queryIdTree = (params)=>getAction("/sys/sysDepart/queryIdTree",params);
const queryParentName   = (params)=>getAction("/sys/sysDepart/queryParentName",params);
const searchByKeywords   = (params)=>getAction("/sys/sysDepart/searchBy",params);
const deleteByDepartId   = (params)=>deleteAction("/sys/sysDepart/delete",params);
李泰瑜 authored
47
48
肖超群 authored
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//二级部门管理
const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params);
const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params);
const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params);
const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/queryDeptRolePermission",params);
const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/saveDeptRolePermission",params);
const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);

//日志管理
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);

//数据字典
const addDict = (params)=>postAction("/sys/dict/add",params);
const editDict = (params)=>putAction("/sys/dict/edit",params);
const treeList = (params)=>getAction("/sys/dict/treeList",params);
const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);

//字典标签专用(通过code获取字典数组)
export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params);
//从缓存中获取字典配置
function getDictItemsFromCache(dictCode) {
  if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
    let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode];
    //console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems)
    return dictItems;
  }
}

//系统通告
const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params);
const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params);
//获取系统访问量
const getLoginfo = (params)=>getAction("/sys/loginfo",params);
const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);

// 根据部门主键查询用户信息
const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params);

// 重复校验
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
// 加载分类字典
const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params);
const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
//加载我的通告信息
const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
97
肖超群 authored
98
//根据用户编码,获取仓库信息
肖超群 authored
99
export const getWarehouseByUserCode = (params)=>postAction('/sys/getWarehouseByUserCode', params);
肖超群 authored
100
//获取库区列表
肖超群 authored
101
export const getZoneList = (params)=>getAction('/config/zone/getZoneList', params);
肖超群 authored
102
//获取容器类型列表
肖超群 authored
103
export const getContainerTypeList = (params)=>getAction('/config/containerType/getContainerTypeList', params);
肖超群 authored
104
//获取库位类型列表
105
export const getLocationTypeList = (params)=>getAction('/config/locationType/getLocationTypeList', params);
肖超群 authored
106
//获取库位类高度列表
107
export const getLocationHighList = (params)=>postAction('/config/locationHigh/getLocationHighList', params);
肖超群 authored
108
//获取货主列表
肖超群 authored
109
export const getCompanyList = (params)=>getAction('/config/company/getCompanyList', params);
肖超群 authored
110
//获取承运商列表
肖超群 authored
111
export const getCarrierList = (params)=>getAction('/config/carrier/getCarrierList', params);
肖超群 authored
112
//获取客户列表
肖超群 authored
113
export const getCustomerList = (params)=>getAction('/config/customer/getCustomerList', params);
肖超群 authored
114
//获取供应商列表
肖超群 authored
115
export const getSupplierList = (params)=>getAction('/config/supplier/getSupplierList', params);
肖超群 authored
116
//获取入库类型列表
肖超群 authored
117
export const getReceiptTypeList = (params)=>getAction('/config/receiptType/getReceiptTypeList', params);
肖超群 authored
118
//获取出库类型列表
肖超群 authored
119
export const getShipmentTypeList = (params)=>getAction('/config/shipmentType/getShipmentTypeList', params);
肖超群 authored
120
//根据物料编码查询物料信息
肖超群 authored
121
export const searchMaterialByCode = (params)=>postAction('/config/material/searchMaterialByCode', params);
肖超群 authored
122
//根据入库单头ID查询入库单详情
肖超群 authored
123
export const listReceiveByReceiptId = (params)=>postAction('/receipt/receiveHeader/listReceiveByReceiptId', params);
肖超群 authored
124
//创建入库任务
125
export const createReceiptTask = (params)=>postAction('/receipt/receiptContainerHeader/createReceiptTask', params);
肖超群 authored
126
//完成WMS任务
127
export const completeTaskByWMS = (params)=>postAction('/task/taskHeader/completeTaskByWMS', params);
肖超群 authored
128
//下发任务给WCS
肖超群 authored
129
export const execute = (params)=>postAction('/task/taskHeader/execute', params);
130
//取消任务
肖超群 authored
131
export const cancelTask = (params)=>postAction('/task/taskHeader/cancelTask?ids=' + params, params);
肖超群 authored
132
//自动配盘
133
export const autoCombination = (params)=>postAction('/shipment/shipmentCombination/autoCombination', params);
肖超群 authored
134
//创建出库任务
135
export const createShipmentTask = (params)=>postAction('/shipment/shipmentCombination/createShipmentTask', params);
肖超群 authored
136
137
138
139
//选择出库分拣口
export const selectSortingPort = (params)=>postAction('/shipment/shipmentCombination/selectSortingPort', params);
//选择入库分拣口
export const selectSupplePort = (params)=>postAction('/receipt/receiptContainerHeader/selectSupplePort', params);
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
//创建空托盘入库任务
export const createEmptyIn = (params)=>postAction('/task/taskHeader/createEmptyIn', params);
//创建空托盘出库任务
export const createEmptyOut = (params)=>postAction('/task/taskHeader/createEmptyOut', params);
//选择出库整出口
export const selectOutPort = (params)=>postAction('/task/taskHeader/selectOutPort', params);
//选择出库分拣口
export const selectPickPort = (params)=>postAction('/task/taskHeader/selectPickPort', params);
//创建移库任务
export const createTransferTask = (params)=>postAction('/task/taskHeader/createTransferTask', params);
//创建出库查看任务
export const createCheckOutTask = (params)=>postAction('/task/taskHeader/createCheckOutTask', params);
//选择站台
export const selectPort = (params)=>postAction('/task/taskHeader/selectPort', params);
//创建跨站任务
export const createOverStationTask = (params)=>postAction('/task/taskHeader/createOverStationTask', params);
//创建空托盘组入库任务
export const createManyEmptyIn = (params)=>postAction('/task/taskHeader/createManyEmptyIn', params);
//创建空托盘组出库任务
export const createManyEmptyOut = (params)=>postAction('/task/taskHeader/createManyEmptyOut', params);
160
161
162
163
164
165
//获取容器打印数据
export const getPrintContainer = (params)=>postAction('/config/container/getPrintContent?ids=' + params, params);
//获取库位打印数据
export const getPrintLocation = (params)=>postAction('/config/location/getPrintContent?ids=' + params, params);
//获取物料打印数据
export const getMaterialLocation = (params)=>postAction('/config/material/getPrintContent?ids=' + params, params);
肖超群 authored
166
167
//根据出库单头ID查询出库单详情
export const listShipmentByShipmentDetailId = (params)=>postAction('/shipment/shipmentCombination/listShipmentByShipmentDetailId', params);
肖超群 authored
168
//根据出库单详情选取库存
肖超群 authored
169
170
171
export const getInventoryFromShipmentDetail = (params)=>postAction('/shipment/shipmentCombination/getInventoryFromShipmentDetail', params);
//配盘
export const combination = (params)=>postAction('/shipment/shipmentCombination/combination', params);
172
173
174
175
//回传入库单
export const backErpReceipt = (params)=>postAction('/receipt/receiptHeader/backErpReceipt', params);
//回传出库单
export const backErpShipment = (params)=>postAction('/shipment/shipmentHeader/backErpShipment', params);
李泰瑜 authored
176
177
178
179
180
181
//首页取值
export const deliveringAmount = (params)=>postAction("/sys/home/deliveringAmount",params);
export const inventoryUtilization = (params)=>postAction("/sys/home/inventoryUtilization",params);
export const inventoryStatus = (params)=>postAction("/sys/home/inventoryStatus",params);
export const inventoryOverview = (params)=>postAction("/sys/home/inventoryOverview",params);
export const getCommonData = (params)=>postAction("/sys/home/getCommonData",params);
肖超群 authored
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
// 中转HTTP请求
export const transitRESTful = {
  get: (url, parameter) => getAction(getTransitURL(url), parameter),
  post: (url, parameter) => postAction(getTransitURL(url), parameter),
  put: (url, parameter) => putAction(getTransitURL(url), parameter),
  http: (url, parameter) => httpAction(getTransitURL(url), parameter),
}

export {
  // imgView,
  // doMian,
  addRole,
  editRole,
  checkRoleCode,
  addUser,
  editUser,
  queryUserRole,
  getUserList,
  queryall,
  frozenBatch,
  checkOnlyUser,
  changePassword,
  getPermissionList,
  addPermission,
  editPermission,
  queryTreeList,
  queryListAsync,
  queryRolePermission,
  saveRolePermission,
  queryPermissionsByUser,
  loadAllRoleIds,
  getPermissionRuleList,
  queryPermissionRule,
  queryDepartTreeList,
  queryDepartTreeSync,
  queryIdTree,
  queryParentName,
  searchByKeywords,
  deleteByDepartId,
  deleteLog,
  deleteLogList,
  addDict,
  editDict,
  treeList,
  addDictItem,
  editDictItem,
  doReleaseData,
  doReovkeData,
  getLoginfo,
  getVisitInfo,
  queryUserByDepId,
  duplicateCheck,
  queryTreeListForRole,
  getSystemMenuList,
  getSystemSubmenu,
  getSystemSubmenuBatch,
  loadCategoryData,
  checkRuleByCode,
  queryDepartPermission,
  saveDepartPermission,
  queryTreeListForDeptRole,
  queryDeptRolePermission,
  saveDeptRolePermission,
  queryMyDepartTreeList,
  getUserNoticeInfo,
  getDictItemsFromCache
}