import request from '@/assets/js/utils/request'
import { createURL } from '@/assets/js/utils/index'

/**
 * =================================采购计划api==================================================
 */
// 采购计划明细列表
export function listPurchasePlanDetailPages(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/listPurchasePlanDetailPages',
    method: 'post',
    data
  })
}
// 查看采购计划
export function queryPurchasePlanDetailInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/queryPurchasePlanDetailInfo?planDetailId=' + data,
    method: 'post'
  })
}
// 获取采购计划所有字典信息
export function queryPurchasePlanInitInfo() {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/queryPurchasePlanInitInfo',
    method: 'post'
  })
}
// C类自行采购生成采购单
export function generatePurchaseOrder(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/generatePurchaseOrder',
    method: 'post',
    data
  })
}
// 查询选择当前用户采购计划明细列表
export function listMyPurchasePlanDetailPages(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/listMyPurchasePlanDetailPages',
    method: 'post',
    data
  })
}
// C类自行采购追加项目物资信息
export function appendPurchaseOrderSubjectMatter(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/appendPurchaseOrderSubjectMatter',
    method: 'post',
    data
  })
}
// 【角色通用】关闭采购计划详情
export function closePurchasePlanDetail(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/closePurchasePlanDetail',
    method: 'post',
    data
  })
}
// 【角色通用】重新打开采购计划详情
export function openPurchasePlanDetail(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/openPurchasePlanDetail',
    method: 'post',
    data
  })
}
/* 采购计划编辑*/
// 采购计划列表
export function listPurchasePlanMainPages(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/listPurchasePlanMainPages',
    method: 'post',
    data
  })
}
// 录入，编辑，查看，采购计划 获取计划信息
export function queryPurchasePlanMainInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/queryPurchasePlanMainInfo',
    method: 'post',
    data
  })
}
// 录入采购计划 获取计划明细列表
export function listPurchasePlanMainDetailPages(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/listPurchasePlanMainDetailPages',
    method: 'post',
    data
  })
}
// 根据物料编码ID查询物料信息
export function getTBMaterialStoreInfoByItemIds(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/getTBMaterialStoreInfoByItemIds',
    method: 'post',
    data
  })
}
// 采购平台录入行项目信息
export function savePurchasePlanDetailInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/savePurchasePlanDetailInfo',
    method: 'post',
    data
  })
}
// 【适用角色：集团外的采购员】平台录入采购计划
export function savePurchasePlanMainInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/savePurchasePlanMainInfo',
    method: 'post',
    data
  })
}

// 【适用角色：集团外的采购员】获取采购计划详情信息,无ID时自动生成编号
export function queryMainPurchasePlanDetailInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/queryMainPurchasePlanDetailInfo',
    method: 'post',
    data
  })
}
// 删除采购计划和采购计划详情数据
export function deletePurchasePlanMain(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/deletePurchasePlanMain',
    method: 'get',
    params
  })
}
// 框架计划编制列表删除接口
export function deletePurchasePlanFramePack(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/deletePurchasePlanFramePack',
    method: 'get',
    params
  })
}
// 【适用角色：集团外的采购员】平台录入采购计划详情 删除
export function deletePurchasePlanDetail(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/deletePurchasePlanDetail',
    method: 'get',
    params
  })
}
// 【适用角色：集团外的采购员】计划详情模板下载
export function downloadTemplate() {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/downloadTemplate',
    method: 'get',
    responseType: 'blob'
  })
}
// 采购计划明细列表
export function listPurchasePlanDetailAllPages(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/listPurchasePlanDetailAllPages',
    method: 'post',
    data
  })
}
// 物料采购方式选择物资编码
export function ListTBMaterialStoreInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/ListTBMaterialStoreInfo',
    method: 'post',
    data
  })
}
// 采购计划编辑选择物资编码
export function getTBMaterialStoreInfoByItemId(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/getTBMaterialStoreInfoByItemId',
    method: 'get',
    params
  })
}
// 采购计划变价导入模板
export const importPlanDetailInfoList = '/bidprocurement/procurement-purchasplan/purchasePlanMain/importPlanDetailInfoList'

/* 集采计划审核*/
// 采购计划审核列表
export function getPurchasePlanAuditList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAudit/getPurchasePlanAuditList',
    method: 'post',
    data
  })
}
// 采购计划审核通过
export function purchasePlanAuditByLeader(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAudit/purchasePlanAuditByLeader',
    method: 'get',
    params
  })
}
/* 框架计划*/
// 框架计划列表
export function getPurchasePlanFramePackList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/getPurchasePlanFramePackList',
    method: 'post',
    data
  })
}
// 框架计划行项目列表
export function getPurchasePlanFrameDetailsList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/getPurchasePlanFrameDetailsList',
    method: 'post',
    data
  })
}
// 获取采购单编号
export function getTenderNoByMethod(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/getTenderNoByMethod',
    method: 'get',
    params
  })
}
// 框架计划确定【打包】
export function purchasePlanDetailsPackFrame(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/purchasePlanDetailsPack',
    method: 'post',
    data
  })
}
// 框架计划采购单页面
export function purchasePlanFramePackPage(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/purchasePlanFramePackPage',
    method: 'get',
    params
  })
}
// 查询邀请供应商
export function queryProcurementPackFrameSupplierList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/queryProcurementPackInvitatinSupplierList',
    method: 'get',
    params
  })
}
// 保存邀请供应商
export function saveProcurementFrameSupplierList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/saveProcurementPackInvitatinSupplierList',
    method: 'post',
    data
  })
}
// 移除邀请供应商
export function removeProcurementPackInvitatinSupplierList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/removeProcurementPackInvitatinSupplierList',
    method: 'post',
    data
  })
}
// 框架计划行项目【导入】
export const importFramePackDetailInfoList = '/bidprocurement/procurement-purchasplan/purchasePlanFramePack/importFramePackDetailInfoList'

/* 集采计划打包*/

// 集采计划打包列表
export function getPurchasePlanDetailsPackList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailsPackList',
    method: 'post',
    data
  })
}
// 查询集采计划打包【业务部退回计划】
export function getPurchasePlanDetailsBusinessReturnPlanList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailsBusinessReturnPlanList',
    method: 'post',
    data
  })
}
// 查询集采计划打包【待打包】【业务部退回计划】列表
export function getPurchasePlanDetailsWaitPackList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailsWaitPackList',
    method: 'post',
    data
  })
}
// 集采计划打包初始化弹框
export function purchasePlanDetailsPackPage(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/purchasePlanDetailsPackPage',
    method: 'post',
    data
  })
}
// 集采计划打包弹框确定保存
export function purchasePlanDetailsPack(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/purchasePlanDetailsPack',
    method: 'post',
    data
  })
}
// 集采计划已打包
export function getPurchasePlanDetailPackedList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailPackedList',
    method: 'post',
    data
  })
}
// 集采计划打包导出
export function downProcurementPlanDetailPackList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/downProcurementPlanDetailPackList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 集采计划打包--预打包的重新打包
export function purchasePlanDetailsReadyRepack(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/purchasePlanDetailsReadyRepack',
    method: 'post',
    data
  })
}
// 集采计划打包导入
export const importPlanDetailWaitPackInfoList = '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/importPlanDetailWaitPackInfoList'

// 采购计划打包-采购方式变更
export function purchasePlanDetailsWaitPackAudit(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/purchasePlanDetailsWaitPackAudit',
    method: 'post',
    data
  })
}
// 采购计划打包-采购方式变更初始化数据
export function modifyProtPurchaseTenderMethodPage(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/modifyProtPurchaseTenderMethodPage',
    method: 'post',
    data
  })
}

// 查询邀请供应商
export function queryProcurementPackInvitatinSupplierList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/queryProcurementPackInvitatinSupplierList',
    method: 'get',
    params
  })
}
// 保存邀请供应商
export function saveProcurementPackInvitatinSupplierList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/saveProcurementPackInvitatinSupplierList',
    method: 'post',
    data
  })
}
// 移除邀请供应商
export function removeProcurementFrameSupplierList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/removeProcurementPackInvitatinSupplierList',
    method: 'post',
    data
  })
}
// 集采计划记录待审核下撤回已打包计划
export function rebackPurchasePlanPack(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/rebackPurchasePlanPack',
    method: 'get',
    params
  })
}
// 保存打包行项目
export function saveProcurementPackedDetailList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/saveProcurementPackedDetailList',
    method: 'post',
    data
  })
}
// 移除打包行项目
export function removeProcurementPackedDetailList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/removeProcurementPackedDetailList',
    method: 'post',
    data
  })
}
// 保存移除行项目之后查看行项目数据
export function getPurchasePlanPackDetailsList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanPackDetailsList',
    method: 'get',
    params
  })
}
// 弹框关闭移除行项目数据
export function deleteProcurementPackedDetailList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/deleteProcurementPackedDetailList',
    method: 'get',
    params
  })
}
//
/* ====================== 退回计划管理=======================*/
// 退回计划管理【已退回】列表
export function getPlanPurchaseReturnDetailsList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseReturnDetail/getPlanPurchaseReturnDetailsList',
    method: 'post',
    data
  })
}
// 退回计划管理【重新上报】
export function purchasePlanDetailsRestartReport(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseReturnDetail/purchasePlanDetailsRestartReport',
    method: 'post',
    data
  })
}
/* 采购计划查询*/

// 采购计划查询
export function getPurchasePlanDetailQryList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/getPurchasePlanDetailQryList',
    method: 'post',
    data
  })
}
// 计划查询待打包
export function getPurchasePlanDetailsWaitPackCustomList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailsWaitPackCustomList',
    method: 'post',
    data
  })
}
// 采购计划查询导出
export function downProcurementPlanQryList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/downProcurementPlanQryList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
/* 采购计划结果执行确认*/

// 采购计划结果执行确认列表
export function getPurchasePlanDetailResultAffirmList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAffirm/getPurchasePlanDetailResultAffirmList',
    method: 'post',
    data
  })
}
// 采购计划结果执行确认重新打包
export function purchasePlanDetailApplyPackOnResultAffirm(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAffirm/purchasePlanDetailApplyPackOnResultAffirm',
    method: 'post',
    data
  })
}
// 采购计划结果执行确认,确认执行结果弹框初始化接口
export function purchasePlanDetailResultAffirm(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAffirm/purchasePlanDetailResultAffirm',
    method: 'get',
    params
  })
}
// 结果执行确认列表导出
export function downProcurementPlanDetailResAffirmList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAffirm/downProcurementPlanDetailResAffirmList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
/* 物料采购方式维护 */

// 物料采购方式维护列表
export function getPlanPurchaseMaintenanceList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/getPlanPurchaseMaintenanceList',
    method: 'post',
    data
  })
}
// 查询采购方式维护变更记录列表
export function getPlanPurchaseMaintenanceAuditRecordList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/getPlanPurchaseMaintenanceAuditRecordList',
    method: 'post',
    data
  })
}
// 保存/修改物料采购方式维护信息
export function saveOrUpdatePlanPurchaseMaintenanceList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/saveOrUpdatePlanPurchaseMaintenanceList',
    method: 'post',
    data
  })
}

// 变更物料采购方式维护信息
export function alterPlanPurchaseMaintenanceInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/alterPlanPurchaseMaintenanceInfo',
    method: 'post',
    data
  })
}

// 物资信息
export function listTBMaterialStoreInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/ListTBMaterialStoreMaintenanceInfo',
    method: 'post',
    data
  })
}
// 物料维护 导出
export function downProcurementMaintenanceList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/downProcurementMaintenanceList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 查看物料采购方式维护
export function getProcurementMaintenanceInfo(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/getProcurementMaintenanceInfo',
    method: 'get',
    params
  })
}
// 物料维护导入
export const importProcurementMaintenanceTemplate = '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/importProcurementMaintenanceTemplate'
// 【适用角色：集团外的采购员】计划详情模板下载
export function downLoadProcurementMaintenanceTemplate(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/planPurchaseMaintenance/downLoadProcurementMaintenanceTemplate',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 计划处-查询所有物料信息列表
export function getAllMaterialList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/getAllMaterialList',
    method: 'post',
    data
  })
}
// 计划处所有物料列表导出
export function downProcurementMaintenanceAllList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/downProcurementMaintenanceAllList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
/* 结果执行管理*/

// 查询集采计划结果执行列表
export function getPurchasePlanResultExecuteList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/getPurchasePlanResultExecuteList',
    method: 'post',
    data
  })
}
// 查询集采计划结果执行变更/终止列表
export function getPurchasePlanResultExecuteAuditRecordList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/getPurchasePlanResultExecuteAuditRecordList',
    method: 'post',
    data
  })
}
// 结果执行管理 导出
export function downProcurementResultExecuteList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/downProcurementResultExecuteList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 选择框架计划确认
export function selectProtPlanPurchaseFrameDetails(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/selectProtPlanPurchaseFrameDetails',
    method: 'get',
    params
  })
}
// 删除采执行结果
export function delPurchaseResultExecuteInfo(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/delPurchaseResultExecuteInfo',
    method: 'get',
    params
  })
}

// 采购项目列表
export function getPurchasePlanOpenBidPackList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/getPurchasePlanOpenBidPackList',
    method: 'post',
    data
  })
}

// 框架计划列表
export function getPurchasePlanOpenBidFrameDetailList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/getPurchasePlanOpenBidFrameDetailList',
    method: 'post',
    data
  })
}

// 框架计划列表已采购
export function listPurchasePlanFramePurchasePages(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanMain/listPurchasePlanFramePurchasePages',
    method: 'post',
    data
  })
}

// 录入结果执行，确定选择采购单
export function selectProtPlanPurchaseDetailsPack(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/selectProtPlanPurchaseDetailsPack',
    method: 'get',
    params
  })
}

// 终止结果执行
export function parsePurchaseResultExecuteInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/parsePurchaseResultExecuteInfo',
    method: 'post',
    data
  })
}
// 结果执行管理 保存提交
export function saveOrSubmitPurchaseResultExecute(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/saveOrSubmitPurchaseResultExecute',
    method: 'post',
    data
  })
}

// 结果执行管理 变更
export function changePurchaseResultExecuteInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/changePurchaseResultExecuteInfo',
    method: 'post',
    data
  })
}

// 修改行项目采购单价结果执行
export function updatePurchaseDetailAndResultExecute(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/updatePurchaseDetailAndResultExecute',
    method: 'post',
    data
  })
}
// 查询结果执行 查看/变更/编辑/新增
export function goPurchasePlanResultExecutePage(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/goPurchasePlanResultExecutePage',
    method: 'get',
    params
  })
}

/* 采购计划分配 */

// 采购计划分配列表
export function getPurchasePlanDetailAssignList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/getPurchasePlanDetailAssignList',
    method: 'post',
    data
  })
}

// 集采计划分配显示页面
export function purchasePlanDetailsAssignPage(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/purchasePlanDetailsAssignPage',
    method: 'post',
    data
  })
}

// 【集采计划分配页面】 分配人员/变更人员
export function purchasePlanDetailPackAssign(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/purchasePlanDetailPackAssign',
    method: 'post',
    data
  })
}

// 【集采计划分配页面】 确认分配
export function purchasePlanDetailsPackConfirmAssign(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/purchasePlanDetailsPackConfirmAssign',
    method: 'post',
    data
  })
}

// 【集采计划分配页面】 导出
export function downProcurementPlanDetailAssignList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/downProcurementPlanDetailAssignList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 【集采计划分配页面】 重新分配
export function purchasePlanDetailsPackRestartAssign(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/purchasePlanDetailsPackRestartAssign',
    method: 'post',
    data
  })
}
// 查询集采计划分配被退回页面列表
export function getPurchasePlanDetailAssignReturnList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/getPurchasePlanDetailAssignReturnList',
    method: 'post',
    data
  })
}
// 【集采计划待确认页面】 重新分配
export function purchasePlanDetailsWaitConfirmRestartAssign(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/purchasePlanDetailsWaitConfirmRestartAssign',
    method: 'post',
    data
  })
}
// 采购室主任【待分配、分配被退回】整包退回
export function returnBackToRtPlanMenuAtAssignList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailAssign/returnBackToRtPlanMenuAtAssignList',
    method: 'post',
    data
  })
}
/* ================工作流==================*/
// 集采计划已打包 --【查看】|【审核编辑】

export function getPurchasePlanDetailsPacked(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailsPacked',
    method: 'get',
    params
  })
}
// 采购方式代办查看
export function getPurchasePlanDetailsPackedByTodoList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailsPackedByTodoList',
    method: 'get',
    params
  })
}
// 集采计划审核页面【审核编辑】
export function purchasePlanDetailsAuditPage(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/purchasePlanDetailsAuditPage',
    method: 'get',
    params
  })
}
// 集采计划待办审核页面
export function getPurchasePlanDetailsAuditPage(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/getPurchasePlanDetailsAuditPage',
    method: 'get',
    params
  })
}
// 计划明细取消审核
export function purchasePlanDetailsCancelAudit(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/purchasePlanDetailsCancelAudit',
    method: 'get',
    params
  })
}
// 集采转自采/退回计划/采购方式变更/业务部退回计划 编辑提交
export function purchasePlanDetailsReSubmitAudit(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/purchasePlanDetailsReSubmitAudit',
    method: 'post',
    data
  })
}

// 进行中采购单退回计划
export function returnBackToRtPlanMenu(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetail/ProtPlanPurchasePlanDetailClient/returnBackToRtPlanMenu',
    method: 'post',
    data
  })
}

// 审批打包行项目导出
export function downProcurementPlanDetailAuditPackedList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailsPack/downProcurementPlanDetailAuditPackedList',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
// 采购单确认成交供应商后，批量更新行项目、结果执行的成交供应商数据
export function updateExecuteSupplier(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanResultExecute/updatePurchaseDetailAndResultExecuteSupplier',
    method: 'post',
    data
  })
}
/* =======采购计划结果执行分配Assign--API接口===========*/
// 查询集采计划结果执行分配列表
export function getPurchasePlanDetailResultAssignList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAssign/getPurchasePlanDetailResultAssignList',
    method: 'post',
    data
  })
}
// 执行结果分配列表导出
export function downProcurementPlanDetailResAssignList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAssign/downProcurementPlanDetailResAssignList',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
// 结果执行分配,重新分配申请
export function purchasePlanDetailApplyOnResultAssign(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAssign/purchasePlanDetailApplyOnResultAssign',
    method: 'post',
    data
  })
}
// 集采计划执行结果分配
export function purchasePlanDetailResultAssign(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/purchasePlanDetailResultAssign/purchasePlanDetailResultAssign',
    method: 'post',
    data
  })
}

/* =======库存管理===========*/

// 库存管理列表
export function getAreaDepotMappedList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/areaDepotMapped/getAreaDepotMappedList',
    method: 'post',
    data
  })
}

// 库存管理录入、编辑
export function insertOrUpdateAreaDepotMapped(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/areaDepotMapped/insertOrUpdateAreaDepotMapped',
    method: 'post',
    data
  })
}

// 库存管理删除
export function delAreaDepotMappedList(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/areaDepotMapped/delAreaDepotMappedList',
    method: 'post',
    params
  })
}
/* ==============计划管控平台SAP信息接口===================*/

// Sap验收单信息列表
export function sapAcceptanceCertificateList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/PurchasePlanSapMsg/sapAcceptanceCertificateList',
    method: 'post',
    data
  })
}

// Sap验收单发票列表
export function sapAcceptanceCertificateInvoiceList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/PurchasePlanSapMsg/sapAcceptanceCertificateInvoiceList',
    method: 'post',
    data
  })
}

// Sap验收单结果信息列表
export function sapAcceptanceCertificateResultList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/PurchasePlanSapMsg/sapAcceptanceCertificateResultList',
    method: 'post',
    data
  })
}
// 物料库/集采目录查询下载参数
export function getMaterialParams(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/getMaterialParams' + createURL(data),
    method: 'post'
  })
}

// -----------------物料库api--------------------
// 删除物料信息
export function deleteProtPlanMaterialStoreById(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/deleteProtPlanMaterialStoreById',
    method: 'post',
    data
  })
}
// 物料信息导出模板
export function downloadProtPlanMaterialStoreInfoTemplate() {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/downloadProtPlanMaterialStoreInfoTemplate',
    method: 'post',
    responseType: 'blob'
  })
}
// 获取物资编码
export function getProtPlanMaterialStoreInfoPurchaseCode(params) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/getProtPlanMaterialStoreInfoPurchaseCode',
    method: 'get',
    params
  })
}
// 还原物料信息
export function changeUseStatusProtPlanMaterialStoreById(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/changeUseStatusProtPlanMaterialStoreById',
    method: 'post',
    data
  })
}
// 录入或是更新物料信息
export function saveOrUpdateProtPlanMaterialStoreInfo(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/saveOrUpdateProtPlanMaterialStoreInfo',
    method: 'post',
    data
  })
}
// 物料信息列表导出
export function exportExcelprotPlanMaterialStoreInfoList(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/exportExcelprotPlanMaterialStoreInfoList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 物料导入
export const importExcelProtPlanMaterialStoreInfo = '/bidprocurement/procurement-purchasplan/materialStorePlan/importExcelProtPlanMaterialStoreInfo'
// 物料分类新增/编辑
export function saveOrUpdatePurcatalogCategory(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/saveOrUpdatePurcatalogCategory',
    method: 'post',
    data
  })
}
// 物料分类删除
export function deletePurcatalogCategory(data) {
  return request({
    url: '/bidprocurement/procurement-purchasplan/materialStorePlan/deletePurcatalogCategory',
    method: 'post',
    data
  })
}
