Files
aio-hl-new/src/config/getData2.js

91 lines
2.2 KiB
JavaScript
Raw Normal View History

2023-04-07 17:41:38 +08:00
import {post} from '@config/http.js'
/** 手持登陆 */
export const handLogin = (user, password) => post('mobile/auth/login', {
username: user,
password: password
})
// 1.首页-查询人员所属的设备信息
2023-04-07 18:28:08 +08:00
export const getDevice = () => post('api/produceshiftorder/getDeviceList', {
2023-04-07 17:41:38 +08:00
})
// 2.工单管理
2023-04-10 11:16:58 +08:00
export const getTable = (code, val, d1, d2) => post('api/produceshiftorder/getOrderList', {
2023-04-07 17:41:38 +08:00
device_code: code,
key_value: val,
2023-04-10 11:16:58 +08:00
realproducestart_date: d1,
realproduceend_date: d2
2023-04-07 17:41:38 +08:00
})
// 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', {
2023-04-07 17:41:38 +08:00
workorder_id: id,
report_qty: qty,
nok_qty: nqty,
repare_qty: rqty
2023-04-07 17:41:38 +08:00
})
// 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
})
2023-05-26 10:55:48 +08:00
// 修改报工数量
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
})