import request from '@/utils/request'
// 查询新购任务列表
export function listPurchaseCheckInfo(query) {
  return request({
    url: '/material/purchaseCheckInfo/list',
    method: 'get',
    params: query,
  })
}
//新增新购任务
export function addPurchaseCheckInfo(data) {
  return request({
    url: '/material/purchaseCheckInfo',
    method: 'post',
    data: data,
  })
}
//编辑新购任务
export function updatePurchaseCheckInfo(data) {
  return request({
    url: '/material/purchaseCheckInfo',
    method: 'put',
    data: data,
  })
}
//任务 详情
export function getPurchaseCheckInfo(query) {
  return request({
    url: '/material/purchaseCheckInfo/getDetails',
    method: 'get',
    params: query,
  })
}
//消息通知
export function bmNoticeInfo(data) {
  return request({
    url: '/material/purchaseCheckInfo/bmNoticeInfo',
    method: 'post',
    data: data,
  })
}

// 新购验收--验收弹窗-确认验收
export function updatePurchaseCheckDetails(data) {
  return request({
    url: '/material/purchaseCheckDetails',
    method: 'put',
    data: data,
  })
}

// 新购验收-编号管理列表
export function listPurchaseMacodeInfo(query) {
  return request({
    url: '/material/purchaseMacode/list',
    method: 'get',
    params: query,
  })
}

export function getMacodeInfo(taskId) {
  return request({
    url: '/material/purchaseMacode/' + taskId,
    method: 'get',
  })
}
// 新购验收-编号管理-新增
export function addPurchaseMacode(data) {
  return request({
    url: '/material/purchaseMacode',
    method: 'post',
    data: data,
  })
}
// 修改
export function updateMacode(data) {
  return request({
    url: '/material/purchaseMacode',
    method: 'put',
    data: data,
  })
}

// 删除
export function delMacode(taskIds) {
  return request({
    url: '/material/purchaseMacode/' + taskIds,
    method: 'delete',
  })
}

//新购验收-编号管理-绑定弹窗详情列表
export function getMacodeList(query) {
  return request({
    url: '/material/purchaseMacode/list',
    method: 'get',
    params: query,
  })
}

//新购验收-编号管理-绑定弹窗详情列表
export function getMacodeDetailList(query) {
  return request({
    url: '/material/purchaseMacode/getInfo',
    method: 'get',
    params: query,
  })
}
//新购验收-编号管理-生成编码
export function makeEquipmentNumber(data) {
  return request({
    url: '/material/purchaseMacode/equipmentNumber',
    method: 'post',
    data: data,
  })
}
//新购验收-编号管理-保存
export function editPurchaseMacode(data) {
  return request({
    url: '/material/purchaseMacode',
    method: 'post',
    data: data,
  })
}

// 删除
export function delMacodeList(maCode) {
  return request({
    url: '/material/purchaseMacode/' + maCode,
    method: 'delete',
  })
}

//新购验收-验收-通知-常用人员
export function getNoticeUserList(query) {
  return request({
    url: '/system/person/list',
    method: 'get',
    params: query,
  })
}
//新购验收-验收-通知-所有人员
export function getAllNotificationList(query) {
  return request({
    url: '/system/person/notification',
    method: 'get',
    params: query,
  })
}
//新购验收-验收-通知-常用人员-添加
export function addNoticeUser(data) {
  return request({
    url: '/system/person',
    method: 'post',
    data: data,
  })
}
// 删除
export function delNoticeUser(id) {
  return request({
    url: '/system/person/' + id,
    method: 'delete',
  })
}

//新购验收-入库列表
export function getPutInList(query) {
  return request({
    url: '/material/purchaseCheckInfo/putInList',
    method: 'get',
    params: query,
  })
}
export function getPutinDetailsList(query) {
  return request({
    url: '/material/purchaseMacode/putinDetails',
    method: 'get',
    params: query,
  })
}

// 修改状态-审核
export function changePutinStatus(data) {
  return request({
    url: '/material/purchaseMacode/manageStatus',
    method: 'put',
    data: data,
  })
}

//新购工机具验收单
export function getAcceptanceForm(query) {
  return request({
    url: '/material/purchaseCheckInfo/getAcceptanceForm',
    method: 'get',
    params: query,
  })
}

//新购工机具入库单
export function warehousingEntry(query) {
  return request({
    url: '/material/purchaseMacode/warehousingEntry',
    method: 'get',
    params: query,
  })
}

// 配件所属上级树
export function getAccessoryTree(data) {
  return request({
    url: '/system/select/getAccessoryTree',
    method: 'post',
    data: data,
  })
}
// 查询新购配件列表
export function listPurchaseAccessory(query) {
  return request({
    url: '/material/purchaseAccessory/list',
    method: 'get',
    params: query,
  })
}
//新增新购配件任务
export function addPurchaseAccessory(data) {
  return request({
    url: '/material/purchaseAccessory',
    method: 'post',
    data: data,
  })
}
//配件任务 详情
export function getPurchaseAccessoryDetails(query) {
  return request({
    url: '/material/purchaseAccessory/getDetails',
    method: 'get',
    params: query,
  })
}
//编辑新购配件任务
export function updatePurchaseAccessory(data) {
  return request({
    url: '/material/purchaseAccessory/edit',
    method: 'post',
    data: data,
  })
}
//验收新购配件任务
export function checkPurchaseAccessory(data) {
  return request({
    url: '/material/purchaseAccessory/check',
    method: 'post',
    data: data,
  })
}

//删除新购配件任务
export function delPurchaseAccessory(taskIds) {
  return request({
    url: '/material/purchaseAccessory/' + taskIds,
    method: 'delete',
  })
}

//配件入库 列表
export function getPurchaseAccessoryPutInList(query) {
  return request({
    url: '/material/purchaseAccessory/putInList',
    method: 'get',
    params: query,
  })
}

//配件入库 配件类型下拉数据
export function getPartList(query) {
  return request({
    url: '/material/purchaseAccessory/getPartList',
    method: 'get',
    params: query,
  })
}
//配件入库 配件类型下拉数据
export function getAccessoryPutInDetailList(query) {
  return request({
    url: '/material/purchaseAccessory/putinDetails',
    method: 'get',
    params: query,
  })
}

//配件入库 审批操作
export function checkInputAccessory(data) {
  return request({
    url: '/material/purchaseAccessory/checkInput',
    method: 'post',
    data: data,
  })
}

//新购配件验收单
export function getAccessoryAcceptanceForm(query) {
  return request({
    url: '/material/purchaseAccessory/getAcceptanceForm',
    method: 'get',
    params: query,
  })
}

//新购配件入库单
export function accessoryWarehousingEntry(query) {
  return request({
    url: '/material/purchaseAccessory/warehousingEntry',
    method: 'get',
    params: query,
  })
}

// 删除
export function purchaseCheckInfoRemove(maCode) {
  return request({
    url: '/material/purchaseCheckInfo/' + maCode,
    method: 'delete',
  })
}
//新增计划管理
export function addPlanManagement(data) {
  return request({
    url: '/material/planManagement/addOrUpdate',
    method: 'post',
    data: data,
  })
}
//配件入库 配件类型下拉数据
export function getPlanList(query) {
  return request({
    url: '/material/planManagement/getList',
    method: 'get',
    params: query,
  })
}
//借调操作
export function addOrUpdateMange(data) {
  return request({
    url: '/material/planManagement/addOrUpdateMange',
    method: 'post',
    data: data,
  })
}
//计划借调列表
export function getManageList(query) {
  return request({
    url: '/material/planManagement/getManageList',
    method: 'get',
    params: query,
  })
}
//抱杆成套数据明细
export function getWholeSetDetails(query) {
  return request({
    url: '/material/purchaseCheckInfo/wholeSetDetails',
    method: 'get',
    params: query,
  })
}

// 查看绑定编码详情
export function getBindCodeDetails(query) {
  return request({
    url: '/material/purchaseMacode/details',
    method: 'get',
    params: query,
  })
}