import request from '@/utils/request'
//获取列表
export function getInfo(data) {
  return request({
    url: '/printbill/getPrintBillList',
    method: 'post',
    params: data
  })
}
//增加
// export function addInfo(data) {
//   return request({
//     url: '/printbill/newPrintBill',
//     method: 'post',
//     params: data
//   })
// }



//获取id详情
export function getInfoById(data) {
  return request({
    url: '/printbill/getPrintBillDetail',
    method: 'post',
    params: data
  })
}
//修改并提交施工单
export function submitPrintBill(data) {
  return request({
    url: '/printbill/submitPrintBill',
    method: 'post',
    data: data
  })
}
//修改并暂存施工单
export function updatePrintBill(data) {
  return request({
    url: '/printbill/updatePrintBill',
    method: 'post',
    data: data
  })
}

//新建保存施工单
export function newPrintBill(data) {
  return request({
    url: 'printbill/newPrintBill',
    method: 'post',
    data: data
  })
}


//获取施工单脚印
export function getPrintBillSteps(data){
  return request({
    url: '/printbill/getPrintBillSteps',
    method: 'post',
    params: data
  })
}

//施工单退回
export function backPrintBill(data) {
  return request({
    url: '/printbill/backPrintBill',
    method: 'post',
    params: data
  })
}

//施工单作废
export function voidPrintBill(data) {
  return request({
    url: '/printbill/voidPrintBill',
    method: 'post',
    params: data
  })
}
//从数据库重建指定年份施工单缓存
export function rebuildEsCacheYear(data) {
  return request({
    url: '/printbill/rebuildEsCacheYear',
    method: 'post',
    params: data
  })
}

//从数据库重建全部施工单缓存
export function rebuildEsCache(data) {
  return request({
    url: '/printbill/rebuildEsCache',
    method: 'post',
    params: data
  })
}
//获取纸张开数档案
//获取列表
export function queryPaperCutInfo(data) {
  return request({
    url: '/doc/queryPaperCutInfo',
    method: 'post',
    params: data
  })
}


//获取机型名称
export function getPrinterNameList(data) {
  return request({
    url: '/doc/getAllEnableMachineInfo',
    method: 'post',
    params: data
  })
}
//字典获取印刷色数
export function getDictTypeInfo(data) {
  return request({
    url: '/system/selectDictDataListMulti',
    method: 'post',
    params: data
  })
}

//获取分厂信息列表
export function getAllCompanyInfoList(data) {
  return request({
    url: '/doc/getAllCompanyInfoList',
    method: 'post',
    params: data
  })
}
//施工单批量打印
export function printBillDoPrint(data) {
  return request({
    url: '/printbill/printBillDoPrint',
    method: 'post',
    params: data
  })
}

//查看pdf列表
export function getOrderPDFFiles(data) {
  return request({
    url: '/order/v1/getOrderPDFFiles',
    method: 'post',
    params: data
  })
}
//重拼
export function printBillRebuildPlate(data) {
  return request({
    url: '/printbill/printBillRebuildPlate',
    method: 'post',
    params: data
  })
}
//获取用基础纸张档案和品牌获取纸张报价档案
export function getPaperQuoteInfoByBaseAndBrand(data) {
  return request({
    url: '/doc/getPaperQuoteInfoByBaseAndBrand',
    method: 'post',
    params: data
  })
}

//重拼
export function ifPermissionList(data) {
  return request({
    url: '/system/ifPermissionList',
    method: 'post',
    params: data
  })
}

// 查看版式获取版式信息
export function printBillViewPlateHint(data) {
  return request({
    url: '/printbill/printBillViewPlateHint',
    method: 'post',
    params: data
  })
}

// 强制修改施工单
export function forceUpdatePrintBill(data) {
  return request({
    url: '/printbill/forceUpdatePrintBill?updateModule=0',
    method: 'post',
    data: data
  })
}
//计算印工
export function quoteMachineTypePrintFee(data) {
  return request({
    url: '/doc/quoteMachineTypePrintFee',
    method: 'post',
    data: data
  })
}
//解锁
export function unlockExclusiveParts(data) {
  return request({
    url: '/printbill/unlockExclusiveParts',
    method: 'post',
    params: data
  })
}

//通过施工单id获取订单缩略图(用于施工单已生成的情况)
export function getPrintBillThumbs(data) {
  return request({
    url: '/printbill/getPrintBillThumbs',
    method: 'post',
    params: data
  })
}
//通过订单id批量获取缩略图(用于施工单专班组版)
export function getOrderThumbsByIds(data) {
  return request({
    url: '/printbill/getOrderThumbsByIds',
    method: 'post',
    params: data
  })
}
//获取物流订单列表
export function getOrderMaterialListForProOut(data) {
  return request({
    url: '/order/v1/getOrderMaterialListForProOut',
    method: 'post',
    params: data
  })
}

//物料订单预出库完成
export function mtOrderPreOutComplete(data) {
  return request({
    url: '/order/v1/mtOrderPreOutComplete',
    method: 'post',
    params: data
  })
}
//获取订单物料明细
export function getMtOrderItemListByOrderId(data) {
  return request({
    url: '/order/v1/getMtOrderItemListByOrderId',
    method: 'post',
    params: data
  })
}
//物料订单预出库请购
export function mtOrderPreOutPurchase(data) {
  return request({
    url: '/order/v1/mtOrderPreOutPurchase',
    method: 'post',
    data: data
  })
}

