/**
 * 新购到货管理页面 API
 */
import request from '@/utils/request'

/** 新购到货查询 */
export const queryPurchaseArrivalListApi = (data) => {
  return request.get('/task/purchase/arrival/list', {
    params: data
  })
}

/** 新购到货里层查询 */
export const queryPurchaseArrivalListInnerApi = (data) => {
  return request.get('/task/purchase/arrival/detailsList', {
    params: data
  })
}

/** 厂家查询 */
export const queryFactoryListApi = (data) => {
  return request.get('/base/maHouse/all', {
    params: data
  })
}

/** 类型规格查询 */
export const queryTypeListApi = (data) => {
  return request.get('/task/purchase/arrival/cascader', {
    params: data
  })
}

/** 根据value查询单位 */
export const queryMeterByVal = (data) => {
  return request.get(`/task/purchase/arrival/cascaderById`, {
    params: data
  })
}

/** 提交新增到货 */
export const submitArrivalApi = (data) => {
  return request.put('/task/purchase/arrival/commit', data)
}

/** 删除新增到货 */
export const delArrivalApi = (id) => {
  return request.delete(`/task/purchase/arrival/delete/${id}`)
}

/** 新购到货新增 */
export const addArrivalApi = (data) => {
  return request.post('/task/purchase/arrival/add', data)
}

/** 获取库管员列表 */
export const queryNoticePersonList = (data) => {
  return request.get(`/task/purchase/notice/getUserList`, {
    params: data
  })
}

/** 获取所有用户列表 */
export const queryAllPersonList = (data) => {
  return request.get(`/task/purchase/notice/getAllUser`, {
    params: data
  })
}

/** 发起验收 */
export const startReceiveApi = (data) => {
  return request.post(`/task/purchase/notice/startAccept`, data)
}


