import {post, get} from '@config/http.js' /** 手持登陆 */ export const handLogin = (user, password) => post('mobile/auth/login', { username: user, password: password }) // 1.首页-查询人员所属的设备信息 export const getDevice = () => post('api/produceshiftorder/getDeviceList', { }) // 2.工单管理 export const getTable = (code, val, d1, d2) => post('api/produceshiftorder/getOrderList', { device_code: code, key_value: val, realproducestart_date: d1, realproduceend_date: d2 }) // 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 = () => post('api/pda/bcp/in/callVehicle', {}) // 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'}] // } // return res // } // 1.2获取信息 export const washWashVechileInfo = (area) => post('api/pda/wash/washVechileInfo', { product_area: area }) // 1.2确认下料 export const washWashFinish = (id, wegiht, code) => post('api/pda/wash/washFinish', { task_id: id, wegiht: wegiht, vechile_code: code }) // 1.3强制完成 export const washWashTaskFinish = (id) => post('api/pda/wash/washTaskFinish', { 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 = () => post('api/pda/bcp/in/callVehicle', {}) /** * 刻字工序 */ // 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 // } // 1.2刻字机选择 export const kzDeviceList = () => post('api/device/list', { product_area: 'A1' }) // 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 = () => post('api/pda/kz/kzTasks', { product_area: 'A1' }) // export const KzTasks = () => { // let res = { // code: 200, // content: [{task_id: '1', device_code: '1'}, {task_id: '11', device_code: '11'}] // } // return res // } // 1.2强制完成取消 export const operation = (id, method) => post('api/task/operation', { task_id: id, method_name: method })