Files
hht-nl-four-uni/utils/getData2.js

97 lines
2.1 KiB
JavaScript
Raw Normal View History

2023-10-12 09:22:42 +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:'api/hand/login',
data: {
username: user,
password: password
}
})
/**
2023-10-12 17:00:46 +08:00
* 点位管理
2023-10-12 09:22:42 +08:00
*/
2023-10-12 17:00:46 +08:00
// 1.1查询区域
2023-10-12 09:22:42 +08:00
export const queryArea = () => request({
2023-10-12 17:00:46 +08:00
url:'api/hand/region',
2023-10-12 09:22:42 +08:00
data: {}
})
// export const queryArea = () => {
// let res = {
2023-10-13 13:09:28 +08:00
// code: '1',
2023-10-12 17:00:46 +08:00
// result: [{value: '1', label: 'A1'}, {value: '2', label: 'A2'}]
2023-10-12 09:22:42 +08:00
// }
// return res
// }
2023-10-12 17:00:46 +08:00
// 1.2查询点位
2023-10-12 09:22:42 +08:00
export const queryPointByArea = (code) => request({
2023-10-12 17:00:46 +08:00
url:'api/hand/point',
2023-10-12 09:22:42 +08:00
data: {
2023-10-12 17:00:46 +08:00
region_code: code
2023-10-12 09:22:42 +08:00
}
})
// export const queryPointByArea = () => {
// let res = {
2023-10-13 13:09:28 +08:00
// code: '1',
// result: [{device_code: '1', device_name: 'JLDFJLLJ', status: '2', material_type: '1', qty: '10'}, {device_code: '2', device_name: 'JLDFJLLJ2', status: '0', material_type: '1', qty: '10'}]
2023-10-12 09:22:42 +08:00
// }
// return res
// }
2023-10-12 17:00:46 +08:00
// 1.3查询物料
export const handMaterial = () => request({
url:'api/hand/material',
data: {}
2023-10-12 09:22:42 +08:00
})
2023-10-12 17:00:46 +08:00
// export const handMaterial = () => {
// let res = {
// result: [{value: '1', label: 'a'}, {value: '2', label: 'b'}, {value: '3', label: 'abc'}]
// }
// return res
// }
// 1.4点位操作
2023-10-13 10:51:34 +08:00
export const handPointOpt = (code, type, mtype, qty) => request({
2023-10-12 17:00:46 +08:00
url:'api/hand/pointOpt',
2023-10-12 09:22:42 +08:00
data: {
2023-10-13 10:51:34 +08:00
device_code: code,
2023-10-12 17:00:46 +08:00
type: type,
material_type: mtype,
qty: qty
2023-10-12 09:22:42 +08:00
}
})
2023-12-21 09:34:35 +08:00
/**
* 呼叫管理
*/
// 查询区域
export const designatedRegion = () => request({
url:'api/hand/designatedRegion',
data: {}
})
// export const designatedRegion = () => {
// let res = {
// code: '1',
// result: [{value: '1', label: 'A1'}, {value: '2', label: 'A2'}]
// }
// return res
// }
// 创建任务(生成任务号为-开头)
export const handCallTask = (scode, ncode) => request({
url:'api/hand/callTask',
data: {
start_device_code: scode,
next_device_code: ncode
}
})