import axios from '@/libs/api.request'

// 申购详情分页
export const GetApplyPurchasePageList = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPageList',
    data,
    method: 'post'
  })
}

// 申购详新增
export const ApplyPurchaseAdd = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/Add',
    data,
    method: 'post'
  })
}

// 采购合同详情分页
export const GetPurContractPageList = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPurContractPageList',
    data,
    method: 'post'
  })
}

// 合同付款详情分页
export const GetContractPayPageList = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractPayPageList',
    data,
    method: 'post'
  })
}

// 新增申购单
export const AddApplyPurchase = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/Add',
    data,
    method: 'post'
  })
}

// 获取申购审批流程
export const GetApplyPurchaseFlows = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetApplyPurchaseFlows',
    data,
    method: 'post'
  })
}

// 获取采购合同入库记录
export const GetPurchaseInStockRecord = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPurchaseInStockRecord',
    data,
    method: 'post'
  })
}

// 获取合同/票据
export const GetContractBills = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractBills',
    data,
    method: 'post'
  })
}

// 上传合同/票据
export const UploadContractBills = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/UploadContractBills',
    data,
    method: 'post'
  })
}

//  获取转账付款凭证列表
export const GetPaymentVouchers = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPaymentVouchers',
    data,
    method: 'post'
  })
}

//  获取采购合同决策辅助
export const GetPurContractPolicy = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPurContractPolicy',
    data,
    method: 'post'
  })
}

//  获取付款申请决策辅助
export const GetContractPayPolicy = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractPayPolicy',
    data,
    method: 'post'
  })
}

//  流程审批 同意/驳回
export const ApprovalBillFlow = (data = {}) => {
  return axios.request({
    url: '/api/ApprovalFlow/ApprovalBillFlow',
    data,
    method: 'post'
  })
}

//  采购合同提交
export const PurcherUpdate = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/PurcherUpdate',
    data,
    method: 'post'
  })
}

//  获取付款合同供应商分类列表
export const GetContractSupplier = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractSupplier',
    data,
    method: 'post'
  })
}

//  获取付款账单
export const GetPaymentBill = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPaymentBill',
    data,
    method: 'post'
  })
}

//  获取付款账单详情
export const GetPaymentBillDetail = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPaymentBillDetail',
    data,
    method: 'post'
  })
}

//  获取付款申请（待办事项审批）
export const GetApplyPurchasePay = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetApplyPurchasePay',
    data,
    method: 'post'
  })
}

//  到货通知
export const PurContractArrivalNotice = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/PurContractArrivalNotice',
    data,
    method: 'post'
  })
}

// 获取代付运费记录
export const GetPurExpressFee = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPurExpressFee',
    data,
    method: 'post'
  })
}

// 新增代付运费记录
export const AddPurchaseExpressFee = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/AddPurchaseExpressFee',
    data,
    method: 'post'
  })
}

// 上传转账付款凭证
export const SavePaymentVoucher = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/SavePaymentVoucher',
    data,
    method: 'post'
  })
}

// 特批付款数据
export const AddApplyPurchasePay = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/AddApplyPurchasePay',
    data,
    method: 'post'
  })
}

// 采购发起付款/报销
export const SavePayContractBill = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/SavePayContractBills',
    data,
    method: 'post'
  })
}

// 获取质检短少记录
export const GetQuantityCheckLake = (data = {}) => {
  return axios.request({
    url: '/api/StockQuantityCheck/GetQuantityCheckLake',
    data,
    method: 'post'
  })
}

// 获取质检记录
export const GetStockCheckList = (data = {}) => {
  return axios.request({
    url: '/api/StockQuantityCheck/GetStockCheckList',
    data,
    method: 'post'
  })
}

// 获取申购明细
export const ApplyPurchaseGetPageDetailList = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPageDetailList',
    data,
    method: 'post'
  })
}

// 合同付款统计
export const GetContractPayTotal = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractPayTotal',
    data,
    method: 'post'
  })
}

// 合同付款汇总（按工艺）
export const GetContractPayTechSum = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractPayTechSum',
    data,
    method: 'post'
  })
}

// 采购合同合计（按照工艺类型）
export const GetPurContractTotal = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPurContractTotal',
    data,
    method: 'post'
  })
}

// 完成入库记录
export const FinishStockIn = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/FinishStockIn',
    data,
    method: 'post'
  })
}

// 获取付款单打印数据
export const GetContractPrintData = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractPrintData',
    data,
    method: 'post'
  })
}

// 获取合同付款统计
export const GetContractPayBillTotal = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractPayBillTotal',
    data,
    method: 'post'
  })
}

// 获取付款单列表
export const GetPurContractPayBill = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPurContractPayBill',
    data,
    method: 'post'
  })
}

// 付款详情汇总（按工艺）
export const GetContractPayBillTechSum = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractPayBillTechSum',
    data,
    method: 'post'
  })
}

// 获取质检单
export const GetContractQtyCheckBill = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetContractQtyCheckBill',
    data,
    method: 'post'
  })
}

// 获取合同相关联的付款单
export const GetApplyPayBill = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetApplyPayBill',
    data,
    method: 'post'
  })
}

// 新增合同删除审批单
export const AddPurchaseContractDel = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/AddPurchaseContractDel',
    data,
    method: 'post'
  })
}

// 获取合同删除审批单
export const GetPurchaseContractDel = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetPurchaseContractDel',
    data,
    method: 'post'
  })
}

// 获取历史付款记录（供应商汇总）
export const GetHistoryPaymentSum = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetHistoryPaymentSum',
    data,
    method: 'post'
  })
}

// 历史付款记录
export const GetHistoryPaymentRecord = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetHistoryPaymentRecord',
    data,
    method: 'post'
  })
}

// 获取历史付款物料
export const GetHistoryPaymentMaterial = (data = {}) => {
  return axios.request({
    url: '/api/ApplyPurchase/GetHistoryPaymentMaterial',
    data,
    method: 'post'
  })
}


// 获取历史付款物料
export const selectDetails = (data = {}) => {
  return axios.request({
    url: '/api/vo/selectDetails',
    data,
    method: 'post'
  })
}