import request from '@/utils/request'

// 查询待办列表
export function delegateList(query) {
  return request({
    url: '/activiti/todoItem/delegateList',
    method: 'get',
    params: query
  })
}
// 转办
export function delegateTodoItem(data) {
  return request({
    url: '/activiti/todoItem/delegateTodoItem',
    method: 'post',
    params: data
  })
}
// 查询物料签收任务中心详细
export function getTask(query) {
  return request({
    url: '/guide/taskuser/gettaskbyid',
    method: 'get',
    params: query
  })
}

// 新增物料签收任务中心
export function addTask(data) {
  console.log(data);
  return request({
    url: '/guide/taskuser/addtaskmetar',
    method: 'post',
    data: data
  })
}

// 修改物料签收任务中心
export function updateTask(data) {
  return request({
    url: '/guide/taskuser/updatemater',
    method: 'post',
    data: data
  })
}

// 删除物料签收任务中心
export function delTask(id) {
  return request({
    url: '/guide/taskuser/' + id,
    method: 'delete'
  })
}
// 删除暂存中的门店
export function delSign(ids) {
  return request({
    url: '/guide/sign/' + ids,
    method: 'delete'
  })
}
// 导出物料签收任务中心
export function exportTask(query) {
  return request({
    url: '/guide/taskuser/export',
    method: 'get',
    params: query
  })
}
// 查询门店列表
export function listStore(query) {
  return request({
    url: '/guide/sign/selectshop',
    method: 'get',
    params: query
  })
}

// 作废门店接口
export function addtaskcancel(query) {
  return request({
    url: '/guide/taskuser/cancel',
    method: 'get',
    params: query
  })
}
// 恢复门店接口
export function returnStore(query) {
  return request({
    url: '/guide/taskuser/huifu',
    method: 'get',
    params: query
  })
}
// 发货接口
export function sendmater(query) {
  return request({
    url: '/guide/taskuser/sendmater',
    method: 'get',
    params: query
  })
}
// 整单作废
export function voidmater(query) {
  return request({
    url: '/guide/taskuser/voidmater',
    method: 'get',
    params: query
  })
}
export function importSigntemp(data) {
  return request({
    url: '/guide/taskuser/importTrackNum',
    method: 'post',
    params: data
  })
}
export function importSignUser(data) {
  return request({
    url: '/guide/taskuser/importSignUser',
    method: 'post',
    params: data
  })
}
export function importTemplate() {
  return request({
    url: '/guide/taskuser/importDeptTemplate',
    method: 'get'
  })
}
//新增发布任务，获取组织列表
export function selectOrganization(data) {
  return request({
    url: '/guide/taskuser/selectOrganization',
    method: 'get',
    params: data
  })
}
//新增发布任务，批量作废
export function plcancel(data) {
  return request({
    url: '/guide/taskuser/plcancel?ids='+data,
    method: 'get'
  })
}
//新增发布任务，批量恢复
export function plhuifu(data) {
  return request({
    url: '/guide/taskuser/plhuifu?ids='+data,
    method: 'get'
  })
}
//通过员工编号获取 员工姓名
export function getNameByCode(data) {
  return request({
    url: '/guide/taskuser/getNameByCode?code='+data,
    method: 'get'
  })
}
