11-wms/src/api/packing-manage/PackingList.js

187 lines
3.9 KiB
JavaScript

/*
* @Author: gtz
* @Date: 2022-03-31 11:34:42
* @LastEditors: lb
* @LastEditTime: 2022-04-29 10:02:54
* @Description: file content
* @FilePath: \mt-bus-fe\src\api\packing-manage\PackingList.js
*/
import request from '@/utils/request'
/**
* 新增包装清单
* @param {object} data
* @param {string} data.shelfCode
* @param {string} data.externalCode
* @param {string} data.equShelfId
* @param {string} data.startTime
* @param {string} data.endTime
* @param {number} data.quantity
*/
export function add(data) {
return request({
url: '/order/packaging-log/add',
method: 'post',
data
})
}
/**
* 修改包装清单
* @param {object} data
* @param {string} data.shelfCode
* @param {string} data.externalCode
* @param {string} data.equShelfId
* @param {string} data.startTime
* @param {string} data.endTime
* @param {number} data.quantity
*/
export function update(data) {
return request({
url: '/order/packaging-log/update',
method: 'post',
data
})
}
/**
* 获取分页包装清单
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.startTime]
* @param {string} [data.endTime]
* @param {number} [data.id] 包装箱ID
* @param {number} [data.shelfId] 货架ID
* @param {number} [data.workOrderId] 工单ID
* @param {string} [data.orderCode] 订单号
*/
export function list(data) {
return request({
url: '/order/packaging-log/page',
method: 'post',
data
})
}
/**
* 获取包装清单详情
* @param {object} data
* @param {number} id
*/
export function getInfo(data) {
return request({
url: '/order/packaging-log/get',
method: 'post',
data
})
}
/**
* 打印状态
* @param {number} id
*/
export function updatePrint(id) {
return request({
url: '/order/packaging-log/print',
method: 'post',
data: { id }
})
}
/**
* 获取包装清单检查详情
* @param {number} id
*/
export function getCheckInfo(id) {
return request({
url: '/order/packaging-log/getCheck',
method: 'post',
data: { id }
})
}
/**
* 删除详细记录
* @returns
*/
export function removeDetail(id) {
return request({
url: '/quality/delivery-inspection/deleteDet',
method: 'post',
data: { id }
})
}
/**
* 获取分页货架列表
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.name]
* @param {number} [data.enabled]
*/
export function getShelfList(data) {
return request({
url: '/basic/shelf/page',
method: 'post',
data
})
}
/**
* 获取分页工单
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.id]
* @param {string} [data.name]
* @param {string} [data.code]
* @param {number} [data.enabled]
* @param {number} [data.status]
* @param {string} [data.startTime]
* @param {string} [data.endTime]
* @param {number} [data.orderId]
* @param {string} [data.orderName]
*/
export function getOrderList(data) {
return request({
url: '/order/work-order/page',
method: 'post',
data
})
}
/**
* 导出包装清单(文件)
* @param {object} data
* @param {number} data.current
* @param {number} data.size
* @param {number} [data.enabled]
* @param {string} [data.startTime]
* @param {string} [data.endTime]
* @param {number} [data.id] 包装箱ID
* @param {number} [data.shelfId] 货架ID
* @param {number} [data.workOrderId] 工单ID
* @param {string} [data.workOrderNo] 工单编码
*/
export function exportFile(data) {
return request({
url: '/order/packaging-log/export',
method: 'post',
data,
responseType: 'blob',
timeout: 60000
})
}
// 获取等级 数据字典
export function getGradeDatedict(data) {
return request({
url: '/basic/platform-dict/selectPlatformDictDataListByPage',
method: 'post',
data: { ...data, dictTypeId: '1522430769887698945' }
})
}