haoxuan
2023-09-21 e267aaa1629571bf8fc6cdcf80152c5558342425
src/api/overview/overview.js
New file
@@ -0,0 +1,81 @@
import request from "@/common/untils/request.js"
import axios from "axios"
// 查询业务类型列表
export const getOperationType = async (data) => {
  return await axios.get(`/api-wms/v1/operationType/operationType`, {
    params: data
  })
}
// 添加业务类型
export function addOperationType(data) {
  return request({
    url: "/api-wms/v1/operationType/operationType",
    method: "post",
    data
  })
}
// 删除业务类型
export function deleteOperationType(id) {
  return request({
    url: `/api-wms/v1/operationType/operationType/${id}`,
    method: "delete",
    id
  })
}
// 编辑业务类型
export function updateOperationType(data) {
  return request({
    url: `/api-wms/v1/operationType/operationType/${data.id}`,
    method: "put",
    data
  })
}
// 查询入库/出库列表
export const getOperation = async (data) => {
  return await axios.get(`/api-wms/v1/operation/operation`, {
    params: data
  })
}
// 添加入库/出库
export function addOperation(data) {
  return request({
    url: "/api-wms/v1/operation/operation",
    method: "post",
    data
  })
}
// 删除入库/出库
export function deleteOperation(id) {
  return request({
    url: `/api-wms/v1/operation/operation/${id}`,
    method: "delete",
    id
  })
}
// 编辑入库/出库
export function updateOperation(data) {
  return request({
    url: `/api-wms/v1/operation/operation/${data.id}`,
    method: "put",
    data
  })
}
// 验证 更改记录状态
export function updateStatus(id) {
  return request({
    url: `/api-wms/v1/operation/finish/${id}`,
    method: "put",
    id
  })
}
// 获取位置列表
export function getLocationList(data) {
  return request({
    url: "/api-wms/v1/location/getLocationList",
    method: "post",
    data
  })
}