分拣管理

This commit is contained in:
2022-09-20 14:28:43 +08:00
parent 35c6e796cc
commit 4cbac935b6
4 changed files with 508 additions and 42 deletions

View File

@@ -1,49 +1,166 @@
import {post} from '@config/http.js'
// import store from '../vuex/store'
/** 设备状态修改 */
/**
* 分拣管理
*/
// 1.1查询所有区域信息
export const handArea = (type) => post('api/andxy2/hand/area', {
// 1.查询分拣工单及明细(定时查询)
// export const sortingOrder = (reg) => post('api/hand/sortingOrder', {})
export const sortingOrder = () => {
let res = {
result: [
{
alloy: '',
is_labeling: '1',
type: 'order',
order_status: '06',
material_uuid: 'cf50d49e01424b2fb37d10ddfeae70f1',
material_spec: '22.23',
children: [
{
labeling_template: '15',
color_type: '6',
lettering_message: '77',
type: 'orderDetail',
order_code: '1',
order_status: '00',
cust_code: 'A00001',
lettering_icon: '1',
strap_number: '99',
parent_order_code: '10000037',
qty: '11',
is_flag: '0',
lettering_message2: '88',
cust_name: 'A00001',
parent_order_id: '907694f7e2de49bc943a8575ab5b3395',
order_id: '57fbc012c50d4398b91142086d5445b6',
cust_id: '092f1d84fddb417a914c8aa20d5bca81'
}
],
material_name: '直管14',
wall_thickness: '0.20',
is_coating: '1',
jackup_num: '5',
length: '4000.00',
end_time: '',
outer_diameter: '22.23',
order_code: '10000037',
start_time: '',
temper: '',
feeding_mouth: '3',
is_strapping: '1',
qty: '11',
is_flag: '1',
is_risking: '1',
order_id: '907694f7e2de49bc943a8575ab5b3395',
is_lettering: '1',
material_code: 'A10014'
},
{
alloy: '',
is_labeling: '1',
type: 'order',
order_status: '01',
material_uuid: 'cf50d49e01424b2fb37d10ddfeae70f1',
material_spec: '22.23',
children: [
{
labeling_template: '15',
color_type: '7',
lettering_message: '',
type: 'orderDetail',
order_code: '2',
order_status: '05',
cust_code: 'A00001',
lettering_icon: '2',
strap_number: '3',
parent_order_code: '10000038',
qty: '5555',
is_flag: '0',
lettering_message2: '33',
cust_name: 'A00001',
parent_order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
order_id: '1333a8a35df64432bb0e314d9636d2db',
cust_id: '092f1d84fddb417a914c8aa20d5bca81'
},
{
labeling_template: '14',
color_type: '7',
lettering_message: '',
type: 'orderDetail',
order_code: '1',
order_status: '04',
cust_code: 'A00002',
lettering_icon: '1',
strap_number: '1',
parent_order_code: '10000038',
qty: '5555',
is_flag: '0',
lettering_message2: '1',
cust_name: 'A00002',
parent_order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
order_id: '250354651d614a6dbc445e4089ce0e72',
cust_id: '4b80d1c012e44027ad09b9f33ca7af0d'
},
{
labeling_template: '15',
color_type: '6',
lettering_message: '55',
type: 'orderDetail',
order_code: '3',
order_status: '05',
cust_code: 'A00002',
lettering_icon: '2',
strap_number: '55',
parent_order_code: '10000038',
qty: '5555',
is_flag: '0',
lettering_message2: '5',
cust_name: 'A00002',
parent_order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
order_id: 'e7356f2f443f499e8807bac8cfb3ddce',
cust_id: '4b80d1c012e44027ad09b9f33ca7af0d'
}
],
material_name: '直管14',
wall_thickness: '0.20',
is_coating: '1',
jackup_num: '5',
length: '4000.00',
end_time: '',
outer_diameter: '22.23',
order_code: '10000038',
start_time: '',
temper: '',
feeding_mouth: '3',
is_strapping: '1',
qty: '5555',
is_flag: '1',
is_risking: '1',
order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
is_lettering: '1',
material_code: 'A10014'
}
],
code: '1',
desc: '查询成功'
}
return res
}
// 2.下发刻字、贴标
export const sendMessage = (type, uuid, ouuid) => post('api/hand/sendMessage', {
type: type,
orderDetail_uuid: uuid,
order_uuid: ouuid
})
// 3.下发设备信号
export const deviceOperation = (type) => post('api/hand/deviceOperation', {
type: type
})
// export const handArea = () => {
// let res = {
// code: '1',
// desc: '',
// result: [{region_id: '1', region_name: 'a'}]
// }
// return res
// }
// 1.2根据区域查询设备编号及状态
export const handPoint = (reg) => post('api/andxy2/hand/point', {
region: reg
})
// 1.3修改设备状态
export const handDeviceStatus = (code, type, no, mtype, quantity, remark) => post('api/andxy2/hand/deviceStatus', {
device_code: code,
// 4.工单操作
export const orderOperation = (type, uuid, ouuid) => post('api/hand/orderOperation', {
type: type,
status: no,
material_type: mtype,
quantity: quantity,
remark: remark
})
// 1.4查询物料
export const handMatrial = () => post('api/andxy2/hand/matrial', {})
/** 普通任务 */
// 1.1创建任务
export const handTask = (scode, ncode) => post('api/andxy2/hand/task2', {
start_devicecode: scode,
next_devicecode: ncode
})
/** 特殊任务 */
export const spehandTask = (scode, ncode) => post('api/andxy2/hand/task', {
start_devicecode: scode,
next_devicecode: ncode
orderDetail_uuid: uuid,
order_uuid: ouuid
})