Files
hht-doushan-uni/utils/getData2.js

98 lines
1.9 KiB
JavaScript
Raw Normal View History

2024-07-31 09:00:33 +08:00
import request from './request.js'
// 版本更新测试
export const pdaUpdate = () => request({
url:'api/pda/update'
})
// export const pdaUpdate = () => {
// let res = {
// versionName: '1.0.1',
// url: 'https://mp-e979e0eb-882b-42b3-a4a1-923ad08ea194.cdn.bspapp.com/cloudstorage/f72ec59f-7b25-487d-a034-fead1b6654c6.apk'
// }
// return res
// }
// 登录
export const handLogin = (user, password) => request({
url:'mobile/auth/login',
data: {
username: user,
password: password
}
})
/**
2024-08-01 12:21:21 +08:00
* 站点管理
2024-07-31 09:00:33 +08:00
*/
2024-08-01 12:21:21 +08:00
// 1.1查询所有区域信息
export const queryArea = () => request({
url:'api/hand/queryArea',
2024-07-31 09:00:33 +08:00
data: {}
})
2024-08-01 12:21:21 +08:00
// 1.2根据区域查询设备编号及状态
export const queryPointByArea = (code) => request({
url:'api/hand/queryPointByArea',
2024-07-31 09:00:33 +08:00
data: {
2024-08-01 12:21:21 +08:00
region_code: code
2024-07-31 09:00:33 +08:00
}
})
2024-08-01 12:21:21 +08:00
// 1.3创建任务(生成任务号为-开头)
export const callTask = (scode, ncode, type) => request({
url:'api/hand/callTask',
2024-07-31 09:00:33 +08:00
data: {
2024-08-01 12:21:21 +08:00
start_device_code: scode,
next_device_code: ncode,
task_type: type
2024-07-31 09:00:33 +08:00
}
})
/**
2024-08-01 12:21:21 +08:00
* 指令管理
2024-07-31 09:00:33 +08:00
*/
2024-08-01 12:21:21 +08:00
// 1.1 查询未完成指令(生成任务号为-开头)
export const handInsts = (key, scode, ncode) => request({
url:'api/hand/insts',
2024-07-31 09:00:33 +08:00
data: {
2024-08-01 12:21:21 +08:00
keyword: key,
start_devicecode: scode,
next_devicecode: ncode
2024-07-31 09:00:33 +08:00
}
})
2024-08-01 12:21:21 +08:00
// 1.2 指令操作
export const handInst = (type, id) => request({
url:'api/hand/inst',
2024-07-31 09:00:33 +08:00
data: {
2024-08-01 12:21:21 +08:00
type: type,
inst_uuid: id
2024-07-31 09:00:33 +08:00
}
})
/**
2024-08-01 12:21:21 +08:00
* 任务管理
2024-07-31 09:00:33 +08:00
*/
2024-08-01 12:21:21 +08:00
// 1.1 1.1 查询无指令的任务(任务号为-开头)
export const handTasks = (key, scode, ncode) => request({
url:'api/hand/tasks',
2024-07-31 09:00:33 +08:00
data: {
2024-08-01 12:21:21 +08:00
keyword: key,
start_devicecode: scode,
next_devicecode: ncode
2024-07-31 09:00:33 +08:00
}
})
2024-08-01 12:21:21 +08:00
// 1.2 任务操作
export const handTaskoperation = (type, id) => request({
url:'api/hand/taskoperation',
2024-07-31 09:00:33 +08:00
data: {
2024-08-01 12:21:21 +08:00
type: type,
task_uuid: id
2024-07-31 09:00:33 +08:00
}
})
2024-08-07 14:44:11 +08:00
2024-07-31 09:00:33 +08:00
/**
2024-08-07 14:44:11 +08:00
* 放货确认
2024-07-31 09:00:33 +08:00
*/
2024-08-07 14:44:11 +08:00
export const updateTask = (code1,code2,type) => request({
url:'api/wms/updateTask',
2024-07-31 09:00:33 +08:00
data: {
2024-08-07 14:44:11 +08:00
device_code: code1,
task_code: code2,
option: type
2024-07-31 09:00:33 +08:00
}
})