diff --git a/src/config/getData.js b/src/config/getData.js index 3a2f4aa..e442a32 100644 --- a/src/config/getData.js +++ b/src/config/getData.js @@ -1,549 +1,36 @@ -import {post, get} from '@config/http.js' +import {post} from '@config/http.js' -/** 手持登陆 */ -export const handLogin = (user, password) => post('mobile/auth/login', { - username: user, - password: password +// 1.1查询所有设备 +export const queryAllPoints = () => post('api/pda/queryAllPoints', {}) +// 1.2查询物料类型 +export const queryMaterials = () => post('api/pda/queryMaterials', { + material_type: 'material_type' }) - -// 1.首页-查询人员所属的设备信息 -export const getDevice = () => post('api/produceshiftorder/getDeviceList', { +// 1.3 确认下料 +export const callTask = (material, scode, ncode) => post('api/pda/callTask', { + material: material, + start_device_code: scode, + next_device_code: ncode }) - -// 2.工单管理 -export const getTable = (code, val, d1, d2) => post('api/produceshiftorder/getOrderList', { +// 1.4 放货确认/卸货确认 +export const putAction = (code, option) => post('api/pda/putAction', { device_code: code, - key_value: val, - realproducestart_date: d1, - realproduceend_date: d2 + option: option }) -// export const getTable = (code, val, d1, d2) => { -// let res = {'totalElements': 2, 'content': [{'material_weight': 0.000000, 'down_id': '1', 'down_time': '2023-05-26 10:32:16.706', 'plan_qty': 111, 'is_needmove': true, 'report_qty': 0, 'create_type': '1', 'confirm_id': '20', 'realproducestart_date': '2023-05-26 10:37:00', 'down_name': '管理员', 'material_spec': '清洗S15', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '1', 'is_error': false, 'material_name': '直接\\CG\\清洗S15\\EKTC00003', 'realproduceend_date': '2023-05-26 11:07:20', 'workorder_status': '5', 'dq_real_qty': 0, 'workprocedure_id': '1535144356586065920', 'workorder_id': '1661923147433250817', 'create_time': '2023-05-26 10:32:10', 'workorder_code': '230526007', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '镗孔', 'order_status_name': '完成', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TK_11', 'order_type_scode': '10', 'material_id': '1528687484865744896', 'planproduceend_date': '2023-05-26 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023-05-26 07:30:00', 'is_canupdate_update': true, 'material_code': '24007845L', 'create_name': '管理员'}, {'material_weight': 1.000000, 'down_id': '1', 'down_time': '2023-05-26 14:06:24.182', 'plan_qty': 1234, 'is_needmove': true, 'report_qty': 0, 'create_type': '1', 'confirm_id': '20', 'realproducestart_date': '2023-05-26 14:11:28', 'down_name': '管理员', 'material_spec': '清洗S15', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '1', 'is_error': false, 'material_name': '直接\\CG\\清洗S15\\EKTC00003', 'realproduceend_date': '2023-05-26 14:52:54', 'workorder_status': '5', 'dq_real_qty': 0, 'workprocedure_id': '1535144356586065920', 'workorder_id': '1661976821887012864', 'create_time': '2023-05-26 14:05:27', 'workorder_code': '230526010', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '镗孔', 'order_status_name': '完成', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TK_11', 'order_type_scode': '10', 'material_id': '1528687484865744896', 'planproduceend_date': '2023-05-26 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023-05-26 07:30:00', 'is_canupdate_update': true, 'material_code': '24007845L', 'create_name': '管理员'}], 'code': 200, 'msg': '查询成功'} - -// return res -// } - -// 3.设备开工 -export const openStart = (id, code) => post('api/produceshiftorder/openStart', { - workorder_id: id, - device_code: code -}) - -// 4.设备报工 -export const saveReport = (id, qty) => post('api/produceshiftorder/saveReport', { - workorder_id: id, - report_qty: qty -}) - -// 5.设备完工 -export const tofinish = (row) => post('api/produceshiftorder/finish', { - row: row -}) - -// 设备下拉列表 -export const deviceList = (search) => post('api/device/list', { - search: search -}) -// export const deviceList = (search) => { -// let res = { -// 'totalElements': 4, -// 'content': [ -// { -// 'device_name': 'A1_旋压下料_80_1', -// 'device_code': 'A1_XY_80_1' -// }, -// { -// 'device_name': 'A1_旋压下料_80_2', -// 'device_code': 'A1_XY_80_2' -// }, -// { -// 'device_name': 'A1_旋压下料_80_3', -// 'device_code': 'A1_XY_80_3' -// }, -// { -// 'device_name': 'A1_旋压下料_80_4', -// 'device_code': 'A1_XY_80_4' -// } -// ], -// 'code': 200, -// 'msg': '查询成功' -// } -// return res -// } - -// 报工查询 -export const reportQuery = (st, et, code, wcode) => post('api/produceWorkorder/reportQuery', { - start_time: st, - end_time: et, - device_code: code, - workorder_code: wcode -}) - -// 修改报工数量 -export const updateReport = (id, report) => post('api/produceshiftorder/updateReport', { - macoperate_id: id, - report_qty: report -}) - -// 删除报工记录 -export const deleteReport = (id) => post('api/produceshiftorder/deleteReport', { - macoperate_id: id -}) - -// 工单作业列表 -// 2.工单管理 -export const getOrderList2 = (code, val, d1, d2) => post('api/produceshiftorder/getOrderList2', { - device_code: code, - key_value: val, - realproducestart_date: d1, - realproduceend_date: d2 -}) -// export const getOrderList2 = (code, val, d1, d2) => { -// let res = {'totalElements': 8, 'content': [{'material_weight': 25.509000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4000, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 09:40:32', 'down_name': '管理员', 'material_spec': 'L22-TW', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L22-TW\\ESNA0100037', 'workorder_status': '3', 'dq_real_qty': 1462, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608983307325440', 'create_time': '2023_06_08 08:52:00', 'workorder_code': '230608994', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_22_10', 'order_type_scode': '10', 'material_id': '1528690921384841216', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24018346S', 'create_name': '导入订单'}, {'material_weight': 25.509000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4000, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 09:41:30', 'down_name': '管理员', 'material_spec': 'L22-TW', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L22-TW\\ESNA0100037', 'workorder_status': '3', 'dq_real_qty': 1079, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608981923205120', 'create_time': '2023_06_08 08:52:00', 'workorder_code': '230608988', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_22_9', 'order_type_scode': '10', 'material_id': '1528690921384841216', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24018346S', 'create_name': '导入订单'}, {'material_weight': 12.300000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4500, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 09:42:52', 'down_name': '管理员', 'material_spec': 'L15-BZ', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L15-BZ\\ESNB0100014TH', 'workorder_status': '3', 'dq_real_qty': 881, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608965116628992', 'create_time': '2023_06_08 08:51:56', 'workorder_code': '230608880', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_15_14', 'order_type_scode': '10', 'material_id': '1528706525558870016', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24026313S', 'create_name': '导入订单'}, {'material_weight': 12.300000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4500, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 09:42:55', 'down_name': '管理员', 'material_spec': 'L15-BZ', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L15-BZ\\ESNB0100014TH', 'workorder_status': '3', 'dq_real_qty': 1266, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608964407791616', 'create_time': '2023_06_08 08:51:55', 'workorder_code': '230608874', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_15_13', 'order_type_scode': '10', 'material_id': '1528706525558870016', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24026313S', 'create_name': '导入订单'}, {'material_weight': 7.799000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4500, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 09:42:58', 'down_name': '管理员', 'material_spec': 'L15-JJ', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L15-JJ\\ESNF0100007TH', 'workorder_status': '3', 'dq_real_qty': 1701, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608962956562432', 'create_time': '2023_06_08 08:51:55', 'workorder_code': '230608868', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_15_12', 'order_type_scode': '10', 'material_id': '1528707500101210112', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24026110S', 'create_name': '导入订单'}, {'material_weight': 9.595000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4500, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 10:00:18', 'down_name': '管理员', 'material_spec': 'L15-TW', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L15-TW\\ESNA0100036TH', 'workorder_status': '3', 'dq_real_qty': 1686, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608962138673152', 'create_time': '2023_06_08 08:51:55', 'workorder_code': '230608862', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_15_10', 'order_type_scode': '10', 'material_id': '1528697804778770432', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24026217S', 'create_name': '导入订单'}, {'material_weight': 25.509000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4000, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 10:00:37', 'down_name': '管理员', 'material_spec': 'L22-TW', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L22-TW\\ESNA0100037', 'workorder_status': '3', 'dq_real_qty': 0, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608984464953344', 'create_time': '2023_06_08 08:52:00', 'workorder_code': '2306081000', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_22_11', 'order_type_scode': '10', 'material_id': '1528690921384841216', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24018346S', 'create_name': '导入订单'}, {'material_weight': 25.509000, 'down_id': '1', 'down_time': '2023_06_08 08:52:47.022', 'plan_qty': 4000, 'is_needmove': true, 'report_qty': 0, 'create_type': '2', 'confirm_id': '20', 'realproducestart_date': '2023-06-08 10:00:41', 'down_name': '管理员', 'material_spec': 'L22-TW', 'create_id': '1', 'real_qty': 0, 'current_produce_person_id': '32', 'is_error': false, 'material_name': '90度等径承口弯头\\L22-TW\\ESNA0100037', 'workorder_status': '3', 'dq_real_qty': 23, 'workprocedure_id': '1535144427977314304', 'workorder_id': '1666608985345757184', 'create_time': '2023_06_08 08:52:00', 'workorder_code': '230608004', 'nok_qty': 0, 'product_area': 'A1', 'is_delete': false, 'workprocedure_name': '推弯一体机', 'shift_type_scode': '1', 'repare_qty': 0, 'device_code': 'A1_TW_22_12', 'order_type_scode': '10', 'material_id': '1528690921384841216', 'planproduceend_date': '2023_06_08 18:30:00', 'person_real_qty': 0, 'planproducestart_date': '2023_06_08 07:30:00', 'is_canupdate_update': true, 'material_code': '24018346S', 'create_name': '导入订单'}, {workprocedure_id: '1', 'real_qty': 0, 'plan_qty': 4500}, {workprocedure_id: '2', 'real_qty': 0, 'plan_qty': 4500}, {workprocedure_id: '3', 'real_qty': 0, 'plan_qty': 4500}, {workprocedure_id: '4', 'real_qty': 0, 'plan_qty': 4500}], 'code': 200, 'msg': '查询成功'} - -// return res -// } - -// 残次品报工 -export const unqualReport = (id, nqty, rqty) => post('api/produceshiftorder/unqualReport', { - workorder_id: id, - nok_qty: nqty, - repare_qty: rqty -}) - -// 状态查询 -export const orderStatus = () => get('api/produceshiftorder/orderStatus', '') - -/** - * 半成品入库 - */ - -// 1.1仓库下拉框 -export const getBcpStor = () => post('api/pda/bcp/in/getBcpStor', {}) -// 1.2单据类型下拉框 -export const getBillType = () => post('api/pda/bcp/in/getBillType', {}) -// 1.3物料选择页面 -export const getMaterial = (code, page, size) => post('api/pda/bcp/in/getMaterial', { - material_code: code, - page: page, - size: size -}) -// export const getMaterial = (code) => { -// let res = { -// data: [{material_code: '1', material_name: 'a', material_spec: '001', class_code: '1', net_weight: '100', unit_name: 'g'}] -// } -// return res -// } -// 1.4入库点下拉框 -export const getPoint = () => post('api/pda/bcp/in/getPoint', {}) -// 1.5呼叫空载具(按钮) -export const callVehicle = (point) => post('api/pda/bcp/in/callVehicle', { - point: point -}) -// 1.6确认入库(按钮) -export const createIn = (from) => post('api/pda/bcp/in/createIn', { - from: from -}) - -/** - * 半成品入库管理查询 - */ -// 2.1半成品入库查询 -export const getAll = (id, btime, etime, code, scode, type) => post('api/pda/bcp/in/getAll', { - stor_id: id, - begin_time: btime, - end_time: etime, - material_code: code, - storagevehicle_code: scode, - bill_type: type -}) -// 2.2强制确认(按钮) -export const bcpInConfirm = (row) => post('api/pda/bcp/in/confirm', { - row: row -}) - -/** - * 半成品出库 - */ -// 1.1仓库下拉框 -export const outgetBcpStor = () => post('api/pda/bcp/out/getBcpStor', {}) -// 1.2单据类型下拉框 -export const outgetBillType = () => post('api/pda/bcp/out/getBillType', {}) -// export const outgetBillType = () => { -// let res = { -// data: [{value: '1', label: 'a'}, {value: '2', label: 'b'}] -// } -// return res -// } -// 1.3物料选择页面 -export const outgetMaterial = (code, scode, is, page, size) => post('api/pda/bcp/out/getMaterial', { - material_code: code, - struct_code: scode, - is_material: is, - page: page, - size: size -}) -// 1.4出库点下拉框 -export const outgetPoint = () => post('api/pda/bcp/out/getPoint', {}) -// 1.5确认入库(按钮) -export const outcreateIn = (from) => post('api/pda/bcp/out/createIn', { - from: from -}) - -/** - * 半成品出库查询 - */ -// 2.1半成品出库查询 -export const outgetAll = (id, btime, etime, code, scode, type) => post('api/pda/bcp/out/getAll', { - stor_id: id, - begin_time: btime, - end_time: etime, - material_code: code, - storagevehicle_code: scode, - bill_type: type -}) -// export const outgetAll = (id, btime, etime, code, scode, type) => { -// let res = { -// data: [{bill_code: '001', bill_status: '99', bill_type: '1'}, {bill_code: '002', bill_status: '99', bill_type: '2'}] -// } -// return res -// } -// 2.2强制确认(按钮) -export const bcpOutConfirm = (row) => post('api/pda/bcp/out/confirm', { - row: row -}) - -/** - * 半成品盘点 - */ -// 1.1仓库下拉框 -export const checkGetBcpStor = () => post('api/pda/bcp/check/getBcpStor', {}) -// 1.3货位物料查询 -export const checkGetMaterialIvt = (code, scode) => post('api/pda/bcp/check/getMaterialIvt', { - material_code: code, - struct_code: scode -}) -// 1.5生成盘点单(按钮) -export const checkCreate = (from) => post('api/pda/bcp/check/create', { - from: from -}) -// 2.1半成品盘点查询 -export const checkGetDtlAll = (id, btime, etime, code, scode, stcode) => post('api/pda/bcp/check/getDtlAll', { - stor_id: id, - begin_time: btime, - end_time: etime, - material_code: code, - storagevehicle_code: scode, - struct_code: stcode -}) -// 2.2盘点位下拉框 -export const checkGetPoint = () => post('api/pda/bcp/check/getPoint', {}) -// 2.3下发(按钮) -export const checkSendTask = (row, code) => post('api/pda/bcp/check/sendTask', { - row: row, - point_code: code -}) -// 2.4盘点确认(按钮) -export const checkConfirm = (row) => post('api/pda/bcp/check/confirm', { - row: row -}) -// 2.5实盘为准(按钮) -export const checkConfirmOffer = (row) => post('api/pda/bcp/check/confirmOffer', { - row: row -}) -// 2.6财务为准(按钮) -export const checkConfirmFinance = (row) => post('api/pda/bcp/check/confirmFinance', { - row: row -}) - -/** - * 半成品拼盘 - */ -// 1.1仓库下拉框 -export const bcpShutGetBcpStor = () => post('api/pda/bcp/shut/getBcpStor', {}) -// 1.2单据类型下拉框 -export const bcpShutGetBillType = () => post('api/pda/bcp/shut/getBillType', {}) -// 1.3半成品拼盘页面 -export const bcpShutGetdtl = (id, btime, etime, code, scode, stcode) => post('api/pda/bcp/shut/getdtl', { - stor_id: id, - begin_time: btime, - end_time: etime, - material_code: code, - bill_type: scode, - storagevehicle_id_in: stcode -}) -// 1.4拼盘完成(按钮) -export const bcpShutConfirm = (row) => post('api/pda/bcp/shut/confirm', { - row: row -}) - -/** - * 人工倒料 - */ -// 1.1设备列表 -export const pourDeviceList = () => post('api/device/list', {}) -// 1.2车间列表 -export const pourDictList = (code) => post('api/dict/dictDetailByCode', { - code: code -}) -// 1人工倒料 -export const pourdeviceinstorQty = (qty, code) => post('api/pda/deviceinstorQty', { - qty: qty, - device_code: code -}) - -/** - * 刻字上料 - */ -// 设备列表 -export const letterDeviceList = (id) => post('api/device/list', { - workprocedure_id: id -}) -// 补空框 -export const letterCallVechile = (id) => post('api/pda/callVechile', { - device_code: id -}) - -/** - * 清洗上料 - */ -// 1.1车间列表 -export const dictAll = () => post('api/dict/all', {}) -// export const dictAll = () => { -// let res = { -// code: 200, -// content: [{value: '1', label: '1'}, {value: '2', label: '2'}] -// } -// return res -// } -// 1.1规格列表 -export const washSpecList = () => post('api/pda/wash/specList', {}) -// 1.2查询列表 -export const washQuery = (area, id) => post('api/pda/wash/query', { - product_area: area, - material_id: id -}) -// 1.3确认上料 -export const washSubmitWash = (arr) => post('api/pda/wash/submitWash', arr) - -/** - * 清洗下料 - */ -// 1.1查询列表 -export const washWashTasks = (area) => post('api/pda/wash/washTasks', { - product_area: area -}) -// export const washWashTasks = (area) => { -// let res = { -// code: 200, -// content: [{task_id: '1', sep_on: '1'}, {task_id: '2', sep_on: '2', net_weight: '1.3444'}] -// } -// return res -// } -// 1.2获取信息 -export const washWashVechileInfo = (area) => post('api/pda/wash/washVechileInfo', { - product_area: area -}) -// 1.2确认下料 -export const washWashFinish = (obj) => post('api/pda/wash/washFinish', obj) -// 1.3强制完成 -export const washWashTaskFinish = (id) => post('api/pda/wash/washTaskFinish', { +// 1.5 查询所有就绪或者执行中任务id +export const queryTaskIds = () => post('api/pda/queryTaskIds', {}) +// 1.6 取消操作 +export const pdaCancel = (id) => post('api/pda/cancel', { task_id: id }) -// 1.4强制下料 -export const washWashQzFinish = (id, wegiht, code) => post('api/pda/wash/washQzFinish', { - task_id: id, - wegiht: wegiht, - vechile_code: code -}) -// 1.5呼叫空框 -export const bcpInCallVehicle = (point) => post('api/pda/bcp/in/callVehicle', { - point: point -}) - -/** - * 刻字工序 - */ -// 1.1刻字上料物料列表 -export const bypda = (page, size) => post('api/bcp/bypda', { - page: page, - size: size, - stor_id: '15286279952695336962' -}) -// export const bypda = (page, size) => { -// let res = { -// code: 200, -// content: [{struct_code: '1', canuse_qty: '200'}] -// } -// return res -// } -// 空框送回 -export const kzsendVechile = () => post('api/pda/kz/sendVechile', {}) -// 1.2刻字机选择 -export const kzDeviceList = () => post('api/produceWorkorder', { - product_area: 'A1', - order_status: '1', - workprocedure_code: 'A1_KZ' -}) -// export const kzDeviceList = () => { -// let res = { -// code: 200, -// content: [{workorder_code: '1', device_code: '1'}, {workorder_code: '11', device_code: '11'}] -// } -// return res -// } -// 1.3确认上料 -export const kzSubmitkz = (arr) => post('api/pda/kz/submitkz', arr) -// 1.1任务列表 -export const KzTasks = (area) => post('api/pda/kz/kzTasks', { - product_area: area -}) -// export const KzTasks = () => { -// let res = { -// 'totalElements': 1, -// 'content': [ -// { -// 'task_name': '刻字机上料', -// 'table_fk_id': '1686261414550966273', -// 'is_auto_issue': false, -// 'task_id': '1686543508917325824', -// 'remark': '{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}{"A1_KZ_03":"12222.000"}', -// 'task_step': 2, -// 'handle_class': 'org.nl.wms.scheduler_manage.service.extendtask.Engrave.EngraveTranSportTask', -// 'update_time': 1690938813000, -// 'material_spec': 'CCL15-PX-BZ', -// 'create_id': '1', -// 'create_mode': '2', -// 'is_send': true, -// 'task_status': '5', -// 'create_time': '2023-08-02 09:04:42.0', -// 'task_group_id': '1686543508917325824', -// 'qtyArr': '{"A1_KZ_03":"12222.000"}', -// 'task_code': '13810', -// 'agv_system_type': '1', -// 'priority': '1', -// 'sort_seq': 1, -// 'product_area': 'A1', -// 'is_delete': false, -// 'material_qty': 12222.000, -// 'point_code3': 'A1_KZ_03', -// 'point_code1': 'A1_KZ_SL', -// 'material_id': '1684134835121164288', -// 'task_type': '24', -// 'vehicle_qty': 1, -// 'create_name': 'acs', -// 'material_code': '24026175S' -// } -// ], -// 'code': 200, -// 'msg': '查询成功' -// } -// return res -// } -// 1.2强制完成取消 -export const operation = (id, method) => post('api/task/operation', { - task_id: id, - method_name: method -}) -// 重新下发 -export const kzresend = (id) => post('api/pda/kz/resend', { +// 1.7 强制完成操作 +export const forceFinish = (id) => post('api/pda/forceFinish', { task_id: id }) - -/** - * 批量入库 - */ -// 1.2仓库列表 -export const finishproductStor = () => post('api/pda/finishproduct/stor', {}) -// export const finishproductStor = () => { -// let res = { -// code: 200, -// content: [{stor_code: '1', stor_name: '1'}, {stor_code: '11', stor_name: '11'}] -// } -// return res -// } -// 1.1批量入库列表 -export const finishproductBucket = (code, stor, sale) => post('api/pda/finishproduct/bucket', { - storagevehicle_code: code, - stor_code: stor, - sale_code: sale -}) -// export const finishproductBucket = () => { -// let res = { -// code: 200, -// content: [{sqe_on: '1', storagevehicle_code: '1'}, {sqe_on: '11', storagevehicle_code: '11'}] -// } -// return res -// } -// 1.2确认入库 -export const finishproductBatchin = (arr) => post('api/pda/finishproduct/batchin', arr) -// 1.1托盘明细 -export const finishproductBucket2 = (code, stor) => post('api/pda/finishproduct/bucket', { - storagevehicle_code: code, - stor_code: stor -}) -// export const finishproductBucket2 = () => { -// let res = { -// code: 200, -// content: [{sqe_on: '1', storagevehicle_code: '1'}, {sqe_on: '11', storagevehicle_code: '11'}] -// } -// return res -// } - -/** - * 维修单管理 - */ -// 1.1实施维修单 -export const devicerepairmstByuser = (page, size) => post('api/devicerepairmst/byuser', { - page: page, - size: size -}) -// export const devicerepairmstByuser = (page, size) => { -// let res = { -// content: [{repair_id: '3dffdff1', repair_code: '1', device_code: 'dfdfdf', invstatus: '01'}] -// } -// return res -// } -// 1.2维修单明细 -export const devicerepairmstGetDtl = (id) => post('api/devicerepairmst/getDtl', { - repair_id: id -}) - -/** - * 保养单管理 - */ -// 1.1保养 -export const devicemaintenancemstByuser = (page, size) => post('api/devicemaintenancemst/byuser', { - page: page, - size: size -}) -// 1.2保养明细 -export const devicemaintenancemstGetDtl = (id) => post('api/devicemaintenancemst/getDtl', { - maint_id: id -}) - -/** - * 点检单管理 - */ -// 1.1点检 -export const devicesportcheckmstByuser = (page, size) => post('api/devicesportcheckmst/byuser', { - page: page, - size: size -}) -// 1.2点检单明细 -export const devicesportcheckmstGetDtl = (id) => post('api/devicesportcheckmst/getDtl', { - maint_id: id -}) - -/** - * 润滑单管理 - */ -// 1.润滑单管理 -export const devicelubricatemstByuser = (page, size) => post('api/devicelubricatemst/byuser', { - page: page, - size: size -}) -// 1.2点检单明细 -export const devicelubricatemstGetDtl = (id) => post('api/devicelubricatemst/getDtl', { - maint_id: id +// 1.8查询所有区域 +export const queryAreas = () => post('api/pda/queryAreas', {}) +// 1.9 通道释放/通道管控 +export const areaControl = (code, option) => post('api/pda/areaControl', { + region_code: code, + option: option }) diff --git a/src/config/http.js b/src/config/http.js index 06ae22a..a81da03 100644 --- a/src/config/http.js +++ b/src/config/http.js @@ -2,7 +2,7 @@ import axios from 'axios' import store from '../vuex/store' import router from '@/router' -axios.defaults.timeout = 50000 +axios.defaults.timeout = 5000 axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8' axios.interceptors.request.use( @@ -37,7 +37,6 @@ axios.interceptors.response.use( case 400: break case 401: - store.dispatch('delUserInfo') router.push('/login') break } diff --git a/src/config/mork.js b/src/config/mork.js new file mode 100644 index 0000000..fadd3e4 --- /dev/null +++ b/src/config/mork.js @@ -0,0 +1,67 @@ +// 1.1查询所有设备 +export const queryAllPoints = () => { + let res = { + data: [{device_code: '10001', device_name: '车号1'}], + message: 'ok' + } + return res +} +// 1.2查询物料类型 +export const queryMaterials = () => { + let res = { + data: [{value: '1', label: '类型一'}], + message: 'ok' + } + return res +} +// 1.3 确认下料 +export const callTask = (material, scode, ncode) => { + let res = { + message: 'ok' + } + return res +} +// 1.4 放货确认/卸货确认 +export const putAction = (code, option) => { + let res = { + message: 'ok' + } + return res +} +// 1.5 查询所有就绪或者执行中任务id +export const queryTaskIds = () => { + let res = { + data: [{task_id: '1'}], + message: 'ok' + } + return res +} +// 1.6 取消操作 +export const pdaCancel = (id) => { + let res = { + message: 'ok' + } + return res +} +// 1.7 强制完成操作 +export const forceFinish = (id) => { + let res = { + message: 'ok' + } + return res +} +// 1.8查询所有区域 +export const queryAreas = () => { + let res = { + data: [{region_code: '1', region_name: 'A区', is_charge: '0', has_agv: '0'}, {region_code: '2', region_name: 'B区', is_charge: '0', has_agv: '0'}, {region_code: '3', region_name: 'C区', is_charge: '0', has_agv: '0'}, {region_code: '4', region_name: 'D区', is_charge: '0', has_agv: '0'}, {region_code: '5', region_name: 'E区', is_charge: '0', has_agv: '0'}], + message: 'ok' + } + return res +} +// 1.9 通道释放/通道管控 +export const areaControl = (code, option) => { + let res = { + message: 'ok' + } + return res +} diff --git a/src/images/area_bg.jpg b/src/images/area_bg.jpg new file mode 100644 index 0000000..c637044 Binary files /dev/null and b/src/images/area_bg.jpg differ diff --git a/src/images/area_bg.png b/src/images/area_bg.png index 664c68b..4dc3fdb 100644 Binary files a/src/images/area_bg.png and b/src/images/area_bg.png differ diff --git a/src/images/arrow.png b/src/images/arrow.png new file mode 100644 index 0000000..6f2b640 Binary files /dev/null and b/src/images/arrow.png differ diff --git a/src/images/bg.jpg b/src/images/bg.jpg new file mode 100644 index 0000000..e7aa85b Binary files /dev/null and b/src/images/bg.jpg differ diff --git a/src/images/header_bg.png b/src/images/header_bg.png new file mode 100644 index 0000000..8c42cf1 Binary files /dev/null and b/src/images/header_bg.png differ diff --git a/src/images/item_2_bg.png b/src/images/item_2_bg.png new file mode 100644 index 0000000..c027b21 Binary files /dev/null and b/src/images/item_2_bg.png differ diff --git a/src/images/item_bg.png b/src/images/item_bg.png new file mode 100644 index 0000000..81b5cdf Binary files /dev/null and b/src/images/item_bg.png differ diff --git a/src/images/item_bg_1.png b/src/images/item_bg_1.png new file mode 100644 index 0000000..8c4542a Binary files /dev/null and b/src/images/item_bg_1.png differ diff --git a/src/images/oval-white.svg b/src/images/oval-white.svg deleted file mode 100644 index 004a356..0000000 --- a/src/images/oval-white.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/images/title_bg.png b/src/images/title_bg.png new file mode 100644 index 0000000..6796ac9 Binary files /dev/null and b/src/images/title_bg.png differ diff --git a/src/pages/canvas.vue b/src/pages/canvas.vue index 2f25014..c8a8bdc 100644 --- a/src/pages/canvas.vue +++ b/src/pages/canvas.vue @@ -1,7 +1,6 @@ @@ -10,77 +9,15 @@ import Easing from '@config/Easing.js' export default { data () { return { - keyPoints: [{x: 160, y: 200}, {x: 60, y: 200}, {x: 60, y: 400}, {x: 160, y: 400}] + keyPoints: [{x: 112, y: 183}, {x: 112, y: 425}, {x: 43, y: 427}, {x: 112, y: 425}] } }, mounted () { - setTimeout(() => { - this.handleCanvasLine() - }, 5000) setTimeout(() => { this.handleCanvasCar() - }, 5900) + }, 3000) }, methods: { - handleCanvasLine () { - const canvas = document.querySelector('#lineCanvas') - const ctx = canvas.getContext('2d') - let img = new Image() - img.src = require('../images/che.png') - // 设置线条样式 - ctx.lineWidth = 1 - ctx.lineJoin = 'round' - ctx.lineCap = 'round' - let prevX = this.keyPoints[0].x - let prevY = this.keyPoints[0].y - let nextX - let nextY - // 第一帧执行的时间 - let startTime - // 期望动画持续的时间 - const duration = 900 - // 动画被切分成若干段,每一段所占总进度的比例 - const partProportion = 1 / (this.keyPoints.length - 1) - // 缓存绘制第n段线段的n值,为了在进行下一段绘制前把这一段线段的末尾补齐 - let lineIndexCache = 1 - // 动画帧绘制方法currentTime是requestAnimation执行回调方法step时会传入的一个执行时的时间(由performance.now()获得). - const step = (currentTime) => { - // 第一帧绘制时记录下开始的时间 - !startTime && (startTime = currentTime) - // 已经过去的时间(ms) - const timeElapsed = currentTime - startTime - // 动画执行的进度 {0,1} - let progress = Math.min(timeElapsed / duration, 1) - // 加入二次方缓动函数 - progress = Easing.Quadratic.In(progress) - // 描述当前所绘制的是第几段线段 - const lineIndex = Math.min(Math.floor(progress / partProportion) + 1, this.keyPoints.length - 1) - // 当前线段的进度 {0,1} - const partProgress = (progress - (lineIndex - 1) * partProportion) / partProportion - // 绘制方法 - const draw = () => { - ctx.strokeStyle = `rgba(${81 + 175 * Math.abs(1 - progress * 2)}, ${160 - 160 * Math.abs(progress * 2 - 1)}, ${255},${1})` - ctx.beginPath() - ctx.moveTo(prevX, prevY) - // 当绘制下一段线段前,把上一段末尾缺失的部分补齐 - if (lineIndex !== lineIndexCache) { - ctx.lineTo(this.keyPoints[lineIndex - 1].x, this.keyPoints[lineIndex - 1].y) - lineIndexCache = lineIndex - } - prevX = nextX = ~~(this.keyPoints[lineIndex - 1].x + ((this.keyPoints[lineIndex]).x - this.keyPoints[lineIndex - 1].x) * partProgress) - prevY = nextY = ~~(this.keyPoints[lineIndex - 1].y + ((this.keyPoints[lineIndex]).y - this.keyPoints[lineIndex - 1].y) * partProgress) - ctx.lineTo(nextX, nextY) - ctx.stroke() - } - draw() - if (progress < 1) { - requestAnimationFrame(step) - } else { - console.log('动画执行完毕') - } - } - requestAnimationFrame(step) - }, handleCanvasCar () { const canvas = document.querySelector('#carCanvas') const ctx = canvas.getContext('2d') @@ -91,7 +28,7 @@ export default { // 第一帧执行的时间 let startTime // 期望动画持续的时间 - const duration = 2000 + const duration = 1000 // 动画被切分成若干段,每一段所占总进度的比例 const partProportion = 1 / (this.keyPoints.length - 1) // 缓存绘制第n段线段的n值,为了在进行下一段绘制前把这一段线段的末尾补齐 @@ -135,6 +72,7 @@ export default { position relative width 100% height 100% + background center / 100% auto url('~@/images/area_bg.png') no-repeat #lineCanvas position absolute left 0 diff --git a/src/pages/canvas_back.vue b/src/pages/canvas_back.vue new file mode 100644 index 0000000..c9150fe --- /dev/null +++ b/src/pages/canvas_back.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/src/pages/index.vue b/src/pages/index.vue index 86a0478..bbce86b 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -1,30 +1,61 @@