96 lines
4.5 KiB
JavaScript
96 lines
4.5 KiB
JavaScript
import {post} 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, nqty, rqty) => post('api/produceshiftorder/saveReport', {
|
|
workorder_id: id,
|
|
report_qty: qty,
|
|
nok_qty: nqty,
|
|
repare_qty: rqty
|
|
})
|
|
|
|
// 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, nok, repare) => post('api/produceshiftorder/updateReport', {
|
|
macoperate_id: id,
|
|
report_qty: report,
|
|
nok_qty: nok,
|
|
repare_qty: repare
|
|
})
|
|
|
|
// 删除报工记录
|
|
export const deleteReport = (id) => post('api/produceshiftorder/deleteReport', {
|
|
macoperate_id: id
|
|
})
|