Files
hht-lnsh-new/src/config/getData2.js

67 lines
1.7 KiB
JavaScript
Raw Normal View History

2023-04-17 09:09:34 +08:00
import {post} from '@config/http.js'
// 手持登录
export const loginApi = (user, password) => post('api/pda/login', {
username: user,
password: password
})
2023-04-17 17:20:53 +08:00
2023-04-17 09:09:34 +08:00
// 手持登陆查询菜单权限
export const authority = (id) => post('api/pda/authority', {
accountId: id
})
2023-04-17 17:20:53 +08:00
// 查询区域
// export const pdaRegion = (func) => post('api/pda/region', {
// func: func
// })
export const pdaRegion = (func) => {
let res = {
code: '1',
result: [{region_code: '1', region_name: 'aa'}, {region_code: '2', region_name: 'bb'}, {region_code: '3', region_name: 'cc'}]
}
return res
}
// 根据区域查询点位
// export const pdaPoint = (func, code) => post('api/pda/point', {
// func: func,
// region_code: code
// })
export const pdaPoint = (func, code) => {
let res = {
code: '1',
result: [{point_code: '1', point_name: 'aa'}, {point_code: '2', point_name: 'bb'}, {point_code: '3', point_name: 'cc'}]
}
return res
}
// 查询设备
// export const pdaDevice = (func) => post('api/pda/device', {
// func: func
// })
export const pdaDevice = (func) => {
let res = {
code: '1',
result: [{device_code: '1', device_name: 'aa'}, {device_code: '2', device_name: 'bb'}, {device_code: '3', device_name: 'cc'}]
}
return res
}
// 不合格品上报
export const pdaReport = (code, qty) => post('api/pda/report', {
device_code: code,
unqualified_qty: qty
2023-04-17 09:09:34 +08:00
})
2023-04-17 17:20:53 +08:00
// 送料
export const sendMaterial = (code, vcode, qty, weight, is) => post('api/pda/sendMaterial', {
2023-04-17 09:09:34 +08:00
point_code: code,
vehicle_code: vcode,
2023-04-17 17:20:53 +08:00
qty: qty,
weight: weight,
is_full: is
2023-04-17 09:09:34 +08:00
})
2023-04-17 17:20:53 +08:00
// 叫料
export const callMaterial = (code) => post('api/pda/callMaterial', {
point_code: code
2023-04-17 09:09:34 +08:00
})