Files
pad-njyf/src/config/getData1.js
2022-08-08 14:08:59 +08:00

279 lines
7.3 KiB
JavaScript

import {post} from '@config/http.js'
import store from '../vuex/store'
// 初始化
/** 1.2工序下拉框查询: */
export const workprocedureQuery = () => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'workprocedureQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {}
})
})
/** 1.3缓存线设备下拉框查询: */
export const deviceQuery = () => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'deviceQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {}
})
})
/** 1.4缓存线指令状态下拉框查询: */
export const instStatusQuery = () => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'instStatusQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {}
})
})
// 公共页面
// 1.1缓存线出箱异常-查询:
export const materialQuery = (val) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'materialQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
search_bar: val
}
})
})
// 空箱初始化
/** 1.1空箱初始化--出入空箱: */
export const inOutEmptyBox = (type, pickerId, val) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'inOutEmptyBox',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
inOut_type: type,
wcsdevice_code: pickerId,
vehicle_code: val
}
})
})
// 扫码异常
/** 1.1指令查询: */
export const inOutExceptionInstQuery = (type, pickerId, val) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'inOutExceptionInstQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
inOut_type: type,
wcsdevice_code: pickerId,
vehicle_code: val
}
})
})
/** 1.2确认: */
export const inOutExceptionInstConfirm = (type, pickerId, val, pkId) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'inOutExceptionInstConfirm',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
inOut_type: type,
wcsdevice_code: pickerId,
vehicle_code: val,
instruct_uuid: pkId
}
})
})
// 缓存线出箱异常
// 1.1缓存线出箱异常-查询:
export const cacheLineOutBoxExceptionQuery = (pickerId, val) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'cacheLineOutBoxExceptionQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: pickerId,
agv_no: val
}
})
})
// 1.2缓存线出箱异常-确认:
export const cacheLineOutBoxExceptionConfirm = (pickerId, pkId) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'cacheLineOutBoxExceptionConfirm',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: pickerId,
instruct_uuid: pkId
}
})
})
// agv出箱异常
// 1.1agv出箱异常-查询:
export const agvOutBoxExceptionQuery = (pickerId, val) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'agvOutBoxExceptionQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: pickerId,
vehicle_code: val
}
})
})
// 1.2agv出箱异常-确认:
export const agvOutBoxExceptionConfirm = (pickerId, val, pkId) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'agvOutBoxExceptionConfirm',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: pickerId,
vehicle_code: val,
instruct_uuid: pkId
}
})
})
// 1.3agv出箱异常-倒料:
export const pourMaterial = (pickerId, val, pkId) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'pourMaterial',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: pickerId,
vehicle_code: val,
instruct_uuid: pkId
}
})
})
// agv入箱异常
// 1.1agv入箱异常-查询:
export const agvInBoxExceptionQuery = (pickerId, val1) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'agvInBoxExceptionQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: pickerId,
vehicle_code: val1
}
})
})
// 1.2agv入箱异常-确认:
export const agvInBoxExceptionConfirm = (pickerId, val1, val2, pkId) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'agvInBoxExceptionConfirm',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: pickerId,
full_vehicle_code: val1,
empty_vehicle_code: val2,
instruct_uuid: pkId
}
})
})
// 缓存线盘点(满箱初始化盘点)
// 1.1缓存线料箱条码查询料箱信息:
export const cachelineMaterInfoQuery = (type, pickerId, vehicleCode) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'cachelineMaterInfoQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
type: type,
wcsdevice_code: pickerId,
vehicle_code: vehicleCode
}
})
})
// 1.2设为满框:
export const setfullBox = (wcsdeviceCode, vehicleCode, workprocedureUuid, materialUuid, qty, weight, layer, seat) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'setfullBox',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: wcsdeviceCode,
vehicle_code: vehicleCode,
workprocedure_uuid: workprocedureUuid,
material_uuid: materialUuid,
quantity: qty,
weight: weight,
layer_num: layer,
seat_order_num: seat
}
})
})
// 1.3设为空框:
export const setEmptyBox = (wcsdeviceCode, vehicleCode, layer, seat) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'setEmptyBox',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: wcsdeviceCode,
vehicle_code: vehicleCode,
layer_num: layer,
seat_order_num: seat
}
})
})
// 1.4设为空位:
export const setBlankPos = (wcsdeviceCode, vehicleCode, layer, seat) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'setBlankPos',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: wcsdeviceCode,
vehicle_code: vehicleCode,
layer_num: layer,
seat_order_num: seat
}
})
})
// 指令操作
// 1.1指令分页查询:
export const instPageQuery = (form) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'instPageQuery',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: form
})
})
// 1.2指令操作:
export const instOperation = (uuid, type) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'instOperation',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
instruct_uuid: uuid,
opt_type: type
}
})
})
// 缓存线异常处理
// 1.1缓存线异常处理:
export const cacheLineExcepOpt = (wcsdeviceCode, type) => post({
'_SRVNAME': 'service.cacheLine.handle',
'_SRVMETHOD': 'cacheLineExcepOpt',
'_DATA': JSON.stringify({
accountId: store.getters.accountId,
form: {
wcsdevice_code: wcsdeviceCode,
opt_type: type
}
})
})