操作屏接口
This commit is contained in:
@@ -1,186 +1,110 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
// 设备工序列表
|
||||
export function regionList() {
|
||||
return request({
|
||||
url: 'api/produceTask/add',
|
||||
url: 'api/fab/regionList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// export function regionList() {
|
||||
// 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 new Promise((resolve, reject) => {
|
||||
// resolve(res)
|
||||
// })
|
||||
// }
|
||||
|
||||
// 根据工序获取设备点位信息
|
||||
export function regionPoints(code) {
|
||||
return request({
|
||||
url: 'api/fab/regionPoints?regionCode=' + code,
|
||||
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 regionOrder(code) {
|
||||
return request({
|
||||
url: 'api/fab/regionOrder?regionCode=' + code,
|
||||
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 getMaterListByOrder(code, order) {
|
||||
return request({
|
||||
url: 'api/fab/getMaterListByOrder?regionCode=' + code + '&?order=' + order,
|
||||
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 callMater(data) {
|
||||
return request({
|
||||
url: 'api/fab/callMater',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
// 呼叫空料框
|
||||
export function callEmp(data) {
|
||||
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'
|
||||
})
|
||||
}
|
||||
|
||||
export function getProduceStatus() {
|
||||
return request({
|
||||
url: 'api/produceTask/getProduceStatus',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function importExcel(id) {
|
||||
return request({
|
||||
url: 'api/produceTask/importExcel/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function queryTask(device_code) {
|
||||
debugger
|
||||
return request({
|
||||
url: 'api/produceTask/queryTask/' + device_code,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function querAllTask() {
|
||||
return request({
|
||||
url: 'api/produceTask/querAllTask',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
export function materialBack(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/materialBack',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function emptyVehicleBack(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/emptyVehicleBack',
|
||||
url: 'api/fab/callEmp',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryIdDevice(id) {
|
||||
// 工序下料
|
||||
export function sendMater(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/' + id,
|
||||
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',
|
||||
url: 'api/fab/sendMater',
|
||||
method: 'post',
|
||||
data: data
|
||||
data
|
||||
})
|
||||
}
|
||||
export function queryIvtByPscn(data) {
|
||||
return request({
|
||||
url: 'api/produceTask/queryIvtByPscn',
|
||||
method: 'post',
|
||||
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 {
|
||||
add, edit, del, getDevice, getMaterial,
|
||||
getProduceStatus, importExcel, queryTask, querAllTask,
|
||||
callMaterial, finish, queryIdDevice, popSeek, queryOne, saveOrder, forceFinish, materialBack, queryIvtByPscn, emptyVehicleBack
|
||||
regionList, regionPoints, regionOrder, getMaterListByOrder, callMater, callEmp, sendMater
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user