3 changed files with 254 additions and 229 deletions
After Width: | Height: | Size: 22 KiB |
@ -1,186 +1,110 @@ |
|||||
import request from '@/utils/request' |
import request from '@/utils/request' |
||||
|
|
||||
export function add(data) { |
// 设备工序列表
|
||||
|
export function regionList() { |
||||
return request({ |
return request({ |
||||
url: 'api/produceTask/add', |
url: 'api/fab/regionList', |
||||
method: 'post', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function del(ids) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/', |
|
||||
method: 'delete', |
|
||||
data: ids |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function edit(data) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask', |
|
||||
method: 'put', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function getDevice() { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/getDevice', |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function getMaterial() { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/getMaterial', |
|
||||
method: 'get' |
method: 'get' |
||||
}) |
}) |
||||
} |
} |
||||
|
// export function regionList() {
|
||||
export function getProduceStatus() { |
// const res = [
|
||||
return request({ |
// { value: '111-02', label: 'TP5000冲床加工' },
|
||||
url: 'api/produceTask/getProduceStatus', |
// { value: '111 03', label: '警平' },
|
||||
|
// { value: '111-04', label: '激光切闻' },
|
||||
|
// { value: '111-05', label: '复合机' },
|
||||
|
// { value: '111-06', label: 'Amada 801冲床' },
|
||||
|
// { value: '111-07', label: 'TruBend 7038' },
|
||||
|
// { value: '111-08', label: 'TruBend 5170' },
|
||||
|
// { value: '111 09', label: 'TruBend Cell 7000' },
|
||||
|
// { value: '111-10', label: 'LAG Robot Bending Cell' },
|
||||
|
// { value: '111-12', label: '气保焊' },
|
||||
|
// { value: '111-13', label: '姆柱焊、点焊' },
|
||||
|
// { value: '111-14', label: '林肯焊接机器人' },
|
||||
|
// { value: '111-15', label: '铜冲机' },
|
||||
|
// { value: '111-16', label: '铜弯机' },
|
||||
|
// { value: '111-22', label: '钳床' },
|
||||
|
// { value: '111-23', label: '压铆机' },
|
||||
|
// { value: '111-24', label: '斯图加特焊接机器人' }
|
||||
|
// ]
|
||||
|
// return new Promise((resolve, reject) => {
|
||||
|
// resolve(res)
|
||||
|
// })
|
||||
|
// }
|
||||
|
|
||||
|
// 根据工序获取设备点位信息
|
||||
|
export function regionPoints(code) { |
||||
|
return request({ |
||||
|
url: 'api/fab/regionPoints?regionCode=' + code, |
||||
method: 'get' |
method: 'get' |
||||
}) |
}) |
||||
} |
} |
||||
|
// export function regionPoints(code) {
|
||||
|
// let res = {'OUT3': '1234', 'OUT2': '2234', 'N1': '123', 'N2': '223'}
|
||||
|
// return new Promise((resolve, reject) => {
|
||||
|
// resolve(res)
|
||||
|
// })
|
||||
|
// }
|
||||
|
|
||||
export function importExcel(id) { |
// 根据工序查询订单
|
||||
|
export function regionOrder(code) { |
||||
return request({ |
return request({ |
||||
url: 'api/produceTask/importExcel/' + id, |
url: 'api/fab/regionOrder?regionCode=' + code, |
||||
method: 'get' |
method: 'get' |
||||
}) |
}) |
||||
} |
} |
||||
|
// export function regionOrder(code) {
|
||||
|
// const res = {
|
||||
|
// content: [{ 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)
|
||||
|
// })
|
||||
|
// }
|
||||
|
|
||||
export function queryTask(device_code) { |
// 根据工单查询匹配库存
|
||||
debugger |
export function getMaterListByOrder(code, order) { |
||||
return request({ |
return request({ |
||||
url: 'api/produceTask/queryTask/' + device_code, |
url: 'api/fab/getMaterListByOrder?regionCode=' + code + '&?order=' + order, |
||||
method: 'get' |
method: 'get' |
||||
}) |
}) |
||||
} |
} |
||||
|
// export function getMaterListByOrder(code, order) {
|
||||
|
// let res = {
|
||||
|
// content: [{ point_code: 'XXS23023012334', region_code: '800034202869', point_type: '120', point_status: '2' }]
|
||||
|
// }
|
||||
|
// return new Promise((resolve, reject) => {
|
||||
|
// resolve(res)
|
||||
|
// })
|
||||
|
// }
|
||||
|
|
||||
export function querAllTask() { |
// 呼叫库存物料
|
||||
|
export function callMater(data) { |
||||
return request({ |
return request({ |
||||
url: 'api/produceTask/querAllTask', |
url: 'api/fab/callMater', |
||||
method: 'get' |
method: 'post', |
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function callMaterial(data) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/callMaterial', |
|
||||
method: 'put', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function finish(data) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/finish', |
|
||||
method: 'put', |
|
||||
data |
data |
||||
}) |
}) |
||||
} |
} |
||||
|
|
||||
export function materialBack(data) { |
// 呼叫空料框
|
||||
|
export function callEmp(data) { |
||||
return request({ |
return request({ |
||||
url: 'api/produceTask/materialBack', |
url: 'api/fab/callEmp', |
||||
method: 'put', |
|
||||
data |
|
||||
}) |
|
||||
} |
|
||||
export function emptyVehicleBack(data) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/emptyVehicleBack', |
|
||||
method: 'post', |
method: 'post', |
||||
data |
data |
||||
}) |
}) |
||||
} |
} |
||||
|
|
||||
export function queryIdDevice(id) { |
// 工序下料
|
||||
|
export function sendMater(data) { |
||||
return request({ |
return request({ |
||||
url: 'api/produceTask/' + id, |
url: 'api/fab/sendMater', |
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function popSeek(code) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/popSeek/' + code, |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function queryOne() { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/queryOne', |
|
||||
method: 'get' |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function saveOrder(data) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/saveOrder', |
|
||||
method: 'put', |
|
||||
data: data |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
export function forceFinish(data) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/forceFinish', |
|
||||
method: 'post', |
|
||||
data: data |
|
||||
}) |
|
||||
} |
|
||||
export function queryIvtByPscn(data) { |
|
||||
return request({ |
|
||||
url: 'api/produceTask/queryIvtByPscn', |
|
||||
method: 'post', |
method: 'post', |
||||
data: data |
data |
||||
}) |
}) |
||||
} |
} |
||||
|
|
||||
export const machine = () => { |
|
||||
const res = [ |
|
||||
{ value: '111-02', label: 'TP5000冲床加工' }, |
|
||||
{ value: '111 03', label: '警平' }, |
|
||||
{ value: '111-04', label: '激光切闻' }, |
|
||||
{ value: '111-05', label: '复合机' }, |
|
||||
{ value: '111-06', label: 'Amada 801冲床' }, |
|
||||
{ value: '111-07', label: 'TruBend 7038' }, |
|
||||
{ value: '111-08', label: 'TruBend 5170' }, |
|
||||
{ value: '111 09', label: 'TruBend Cell 7000' }, |
|
||||
{ value: '111-10', label: 'LAG Robot Bending Cell' }, |
|
||||
{ value: '111-12', label: '气保焊' }, |
|
||||
{ value: '111-13', label: '姆柱焊、点焊' }, |
|
||||
{ value: '111-14', label: '林肯焊接机器人' }, |
|
||||
{ value: '111-15', label: '铜冲机' }, |
|
||||
{ value: '111-16', label: '铜弯机' }, |
|
||||
{ value: '111-22', label: '钳床' }, |
|
||||
{ value: '111-23', label: '压铆机' }, |
|
||||
{ value: '111-24', label: '斯图加特焊接机器人' } |
|
||||
] |
|
||||
return res |
|
||||
} |
|
||||
|
|
||||
export const n1list = () => { |
|
||||
const res = [ |
|
||||
{ order: '800034202869', work_code: '111-07', material_code: 'A7E0019008760_00', material_type: 'S39_SA01', material_name: 'BBC支撑板后上', qty: '120', plan_date: '2024/8/11' } |
|
||||
] |
|
||||
return res |
|
||||
} |
|
||||
|
|
||||
export const n1list2 = () => { |
|
||||
const res = [ |
|
||||
{ vehicle_code: 'XXS23023012334', order: '800034202869', qty: '120', point_code: 'ZW01-03-02' } |
|
||||
] |
|
||||
return res |
|
||||
} |
|
||||
|
|
||||
export default { |
export default { |
||||
add, edit, del, getDevice, getMaterial, |
regionList, regionPoints, regionOrder, getMaterListByOrder, callMater, callEmp, sendMater |
||||
getProduceStatus, importExcel, queryTask, querAllTask, |
|
||||
callMaterial, finish, queryIdDevice, popSeek, queryOne, saveOrder, forceFinish, materialBack, queryIvtByPscn, emptyVehicleBack |
|
||||
} |
} |
||||
|
Loading…
Reference in new issue