import request from '@/utils/request'

// 查询物料签收列表
export function listSign(query) {
  return request({
    url: '/guide/sign/list',
    method: 'get',
    params: query
  })
}

// 查询物料签收详细
export function getSign(id) {
  return request({
    url: '/guide/sign/' + id,
    method: 'get'
  })
}

// 新增物料签收
export function addSign(data) {
  console.log(data)
  return request({
    url: '/guide/sign',
    method: 'post',
    data: data
  })
}

// 修改物料签收
export function updateSign(data) {
  return request({
    url: '/guide/sign',
    method: 'put',
    data: data
  })
}

// 删除物料签收
export function delSign(id) {
  return request({
    url: '/guide/sign/' + id,
    method: 'delete'
  })
}
// 作废物料签收
export function cancel(data) {
  return request({
    url: '/guide/sign/cancel',
    method: 'post',
    params: data
  })
}
// 导出物料签收
export function exportSign(query) {
  return request({
    url: '/guide/sign/export',
    method: 'get',
    params: query
  })
}
// 导出物料签收
export function importProduct(query) {
  return request({
    url: '/guide/sign/importSign',
    method: 'post',
    params: query
  })
}
// 查询门店列表
export function listStore(query) {
  return request({
    url: '/guide/sign/selectshop',
    method: 'get',
    params: query
  })
}

// 添加物料签收
export function addissuerStore(query) {
  return request({
    url: '/guide/sign/addissuer',
    method: 'post',
    params: query
  })
}
// 修改物料签收
export function updateissuerStore(query) {
  return request({
    url: '/guide/sign/updateissuer',
    method: 'post',
    params: query
  })
}

// 物料签收详情
export function issuerStoreDetail(query) {
  return request({
    url: '/guide/sign/findbyid',
    method: 'post',
    params: query
  })
}
  export function importTemplate() {
  return request({
    url: '/guide/sign/importTemplate',
    method: 'get'
  })
}
