| | |
| | | |
| | | export const getLocGroup = async (row, bay, callback) => { |
| | | await request.post('/map/shelf/group', { |
| | | row: row, |
| | | bay: bay |
| | | rowNo: row, |
| | | bayNo: bay |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }).then((res) => { |
| | |
| | | }).catch((error) => { |
| | | notify.error(error.message); |
| | | console.error(error.message); |
| | | }) |
| | | } |
| | | |
| | | export const getCodeInfo = async (codeData, callback, errCallBack) => { |
| | | await request.post('/code/info', { |
| | | codeData, |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }).then((res) => { |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | callback(data); |
| | | } else { |
| | | notify?.error(msg); |
| | | if (errCallBack) { |
| | | errCallBack(); |
| | | } |
| | | } |
| | | }).catch((error) => { |
| | | notify?.error(error.message); |
| | | console.error(error.message); |
| | | if (errCallBack) { |
| | | errCallBack(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getCodeRouteList = async (codeData, callback, errCallBack) => { |
| | | await request.post('/code/route/list', { |
| | | codeData, |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }).then((res) => { |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | callback(Array.isArray(data) ? data : []); |
| | | } else { |
| | | notify?.error(msg); |
| | | if (errCallBack) { |
| | | errCallBack(); |
| | | } |
| | | } |
| | | }).catch((error) => { |
| | | notify?.error(error.message); |
| | | console.error(error.message); |
| | | if (errCallBack) { |
| | | errCallBack(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getCodeFuncStaList = async (codeData, callback, errCallBack) => { |
| | | await request.post('/code/funcSta/list', { |
| | | codeData, |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }).then((res) => { |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | callback(Array.isArray(data) ? data : []); |
| | | } else { |
| | | notify?.error(msg); |
| | | if (errCallBack) { |
| | | errCallBack(); |
| | | } |
| | | } |
| | | }).catch((error) => { |
| | | notify?.error(error.message); |
| | | console.error(error.message); |
| | | if (errCallBack) { |
| | | errCallBack(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | console.error(error.message); |
| | | } |
| | | return null; |
| | | } |
| | | } |