蔡玲玲
3 months ago
3 changed files with 118 additions and 7 deletions
@ -0,0 +1,112 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 1.用户登录
|
|||
export function authLogin() { |
|||
const res = { username: 'aaa' } |
|||
return new Promise((resolve, reject) => { |
|||
resolve(res) |
|||
}) |
|||
} |
|||
|
|||
// 2.选择登录设备
|
|||
export function getUserOrDevice() { |
|||
const res = { |
|||
content: [ |
|||
{ point_code: '111-02', point_name: 'TP5000冲床加工' }, |
|||
{ point_code: '111 03', point_name: '警平' } |
|||
] |
|||
} |
|||
return new Promise((resolve, reject) => { |
|||
resolve(res) |
|||
}) |
|||
} |
|||
|
|||
// 3.登录跳转
|
|||
export function deviceInLogin() { |
|||
const res = { device_name: 'TP5000冲床加工', device_code: '111-02', region_points: [{ name: 'OUT1', type: '1', device_code: '1234' }, { name: 'OUT2', type: '1', device_code: '1234' }, { name: 'OUT3', type: '1', device_code: '1234' }, { name: 'OUT4', type: '1', device_code: '1234' }, { name: 'N1', type: '0', device_code: '1234' }, { name: 'N2', type: '0', device_code: '1234' }] } |
|||
return new Promise((resolve, reject) => { |
|||
resolve(res) |
|||
}) |
|||
} |
|||
|
|||
// 4.根据工序查询订单
|
|||
export function regionOrder(code) { |
|||
const res = { |
|||
content: [{ vehicle_code: '123', order_code: '800034202869', region_code: '111-07', material_id: 'A7E0019008760_00', material_type: 'S39_SA01', custom: 'BBC支撑板后上', material_qty: '120', plan_date: '2024/8/11' }] |
|||
} |
|||
return new Promise((resolve, reject) => { |
|||
resolve(res) |
|||
}) |
|||
} |
|||
|
|||
// 5.查询载具物料信息
|
|||
export function fabMaterial() { |
|||
const res = { |
|||
content: [ |
|||
{ order_code: '111-02', material_qty: '' } |
|||
] |
|||
} |
|||
return new Promise((resolve, reject) => { |
|||
resolve(res) |
|||
}) |
|||
} |
|||
|
|||
// 6.呼叫库存物料
|
|||
export function callMater(data) { |
|||
return request({ |
|||
url: 'api/fab/callMater', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 7.呼叫空料框
|
|||
export function callEmp(data) { |
|||
return request({ |
|||
url: 'api/fab/callEmp', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 8.查询订单号
|
|||
export function fabOrders() { |
|||
const res = { |
|||
content: [ |
|||
{ order_code: '111-02', material_qty: '' } |
|||
] |
|||
} |
|||
return new Promise((resolve, reject) => { |
|||
resolve(res) |
|||
}) |
|||
} |
|||
|
|||
// 9.工序下料
|
|||
export function sendMater(data) { |
|||
return request({ |
|||
url: 'api/fab/sendMater', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 10.叫料点回库
|
|||
export function sendVehicle(data) { |
|||
return request({ |
|||
url: 'api/fab/sendVehicle', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
// 11.用户登出
|
|||
export function loginOut() { |
|||
const res = {} |
|||
return new Promise((resolve, reject) => { |
|||
resolve(res) |
|||
}) |
|||
} |
|||
|
|||
export default { |
|||
authLogin, getUserOrDevice, deviceInLogin, regionOrder, fabMaterial, callMater, callEmp, fabOrders, sendMater, sendVehicle, loginOut |
|||
} |
Loading…
Reference in new issue