下拉框

This commit is contained in:
2023-04-17 17:20:53 +08:00
parent 804afc3d27
commit d875f978a7
19 changed files with 684 additions and 1656 deletions

View File

@@ -1,71 +1,28 @@
import {post, post2} from '@config/http.js'
import {post2} from '@config/http.js'
// import store from '../vuex/store'
// 指令管理
// 1.1 查询未完成指令
export const queryInstraction = (keyword, scode, ncode) => post2('api/ash/hand/insts', {
export const queryInstraction = (keyword, scode, ncode) => post2('api/hand/insts', {
keyword: keyword,
start_devicecode: scode,
next_devicecode: ncode
})
// 1.2 指令操作
export const instOperation = (uuid, type) => post2('api/ash/hand/inst', {
export const instOperation = (uuid, type) => post2('api/hand/inst', {
inst_uuid: uuid,
type: type
})
// 任务管理
// 1.1 查询未完成指令
export const queryTask = (keyword, scode, ncode) => post2('api/ash/hand/tasks', {
export const queryTask = (keyword, scode, ncode) => post2('api/hand/tasks', {
keyword: keyword,
start_devicecode: scode,
next_devicecode: ncode
})
// 1.2 指令操作
export const taskOperation = (uuid, type) => post2('api/ash/hand/taskoperation', {
export const taskOperation = (uuid, type) => post2('api/hand/taskoperation', {
inst_uuid: uuid,
type: type
})
// 送料
// 1.1查询工序设备点位
export const sendMaterialqueryDevice = () => post('api/pda/sendMaterial/queryDevice', {})
// 1.2压制叫料确定
export const sendMaterialconfirm = (wid, did, pid, pcode, qty, vcode, isfull) => post('api/pda/sendMaterial/confirm', {
workprocedure_id: wid,
device_id: did,
point_id: pid,
point_code: pcode,
qty: qty,
vehicle_code: vcode,
is_full: isfull
})
// 压制叫料
// 1.1查询点位
export const callMaterialqueryPoint = () => post('api/pda/callMaterial/queryPoint', {})
// 1.2压制叫料确定
export const callMaterialconfirm = (pid, pcode, pname, isfull, id, code, mname) => post('api/pda/callMaterial/confirm', {
point_id: pid,
point_code: pcode,
point_name: pname,
is_full: isfull,
material_id: id,
material_code: code,
material_name: mname
})
// 送空托盘
// 1.1查询区域
export const sendEmptyqueryArea = () => post('api/pda/sendEmpty/queryArea', {})
// 1.2根据区域查询点位
export const sendEmptyqueryPointByArea = (acode) => post('api/pda/sendEmpty/queryPointByArea', {
area_code: acode
})
// 1.3 送空托盘确定
export const sendEmptyconfirm = (pid, pcode, pname, vcode) => post('api/pda/sendEmpty/confirm', {
point_id: pid,
point_code: pcode,
point_name: pname,
vehicle_code: vcode
})

View File

@@ -5,76 +5,62 @@ export const loginApi = (user, password) => post('api/pda/login', {
username: user,
password: password
})
// 手持登陆查询菜单权限
export const authority = (id) => post('api/pda/authority', {
accountId: id
})
// 修改密码
export const updatePass = (Rfold, Rfnew) => post('api/pda/updatePass', {
RfoldPass: Rfold,
RfnewPass: Rfnew
// 查询区域
// 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
})
/** 呼叫空托盘 */
// 1.1查询区域
export const queryArea = () => post('api/pda/callEmpty/queryArea', {})
// 1.2根据区域查询点位
export const queryPointByArea = (code) => post('api/pda/callEmpty/queryPointByArea', {
area_code: code
})
// 1.3 呼叫空托盘确定
export const callEmptyConfirm = (id, code, pname, acode) => post('api/pda/callEmpty/confirm', {
point_id: id,
point_code: code,
point_name: pname,
area_code: acode
})
/** 托盘点位绑定 */
// 1.1查询区域
export const queryArea1 = () => post('api/pda/sendEmpty/queryArea', {})
// 1.2根据区域查询点位
export const queryPointByArea1 = (code) => post('api/pda/sendEmpty/queryPointByArea', {
area_code: code
})
// 1.2托盘点位绑定确认
export const bindingConfirm = (code, vcode, status, is) => post('api/pda/binding/confirm', {
// 送料
export const sendMaterial = (code, vcode, qty, weight, is) => post('api/pda/sendMaterial', {
point_code: code,
vehicle_code: vcode,
point_status: status,
is_lock: is
qty: qty,
weight: weight,
is_full: is
})
/** 盘点管理 */
// 1.1查询物料
export const queryMaterial = (page, size) => post('api/pda/check/queryMaterial', {
page: page,
size: size
})
// 1.2查询盘点单据
export const queryIvt = (suuid, tuuid, page, size) => post('api/pda/check/queryIvt', {
sect_uuid: suuid,
struct_uuid: tuuid,
page: page,
size: size
})
// 1.3盘点确定
export const checkConfirm = (arr) => post('api/pda/check/confirm', {
JSONarray: arr
})
// 1.4查询库区
export const querySectCode = () => post('api/pda/check/querySectCode', {})
// 1.5查询仓位
export const queryStructCode = (uuid) => post('api/pda/check/queryStructCode', {
sect_uuid: uuid
})
/** 液压机出库 */
// 1.1查询点位
export const queryPoint = () => post('api/pda/pressure/queryPoint', {})
// 1.5查询仓位
export const pressureConfirm = (id, code, pname) => post('api/pda/pressure/confirm', {
point_id: id,
point_code: code,
point_name: pname
// 叫料
export const callMaterial = (code) => post('api/pda/callMaterial', {
point_code: code
})

View File

@@ -55,11 +55,7 @@ export const post = (sevmethod, params) => {
.then(response => {
resolve(response.data)
}, error => {
if (error.message === null) {
Dialog('null')
} else {
Dialog(error.message)
}
Dialog(error.message)
reject(error.message)
})
.catch((error) => {

View File

@@ -1,46 +0,0 @@
import axios from 'axios'
import { Dialog } from './mUtils.js'
import store from '../vuex/store'
axios.defaults.timeout = 50000
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
axios.interceptors.request.use(
config => {
if (config.method === 'post') {
if (!config.data.flag) {
config.data = config.data
} else {
config.data = config.data.formData
}
}
return config
},
error => {
Dialog('错误的传参')
return Promise.reject(error)
}
)
axios.interceptors.response.use(
response => {
return Promise.resolve(response)
},
error => {
return Promise.reject(error)
}
)
export const post = (sevmethod, params) => {
return new Promise((resolve, reject) => {
axios.post(`${store.getters.acsUrl}/` + sevmethod, params)
.then(response => {
resolve(response.data)
}, error => {
reject(error.message)
})
.catch((error) => {
reject(error)
})
})
}