import request from '@/utils/dsRequest'
import { exportExcelNew } from '@/utils/filedown'
import { dsOutExcel } from '@/utils/filedown'
export function AddPurchaseDelivery(data) {
  return request({
    url: '/PurchaseDelivery/AddPurchaseDelivery',
    method: 'post',
    data
  })
}

export function QueryPurchaseDelivery(data) {
  return request({
    url: '/PurchaseDelivery/QueryPurchaseDelivery',
    method: 'post',
    data
  })
}

export function getTemplate() {
  return exportExcelNew('http://120.24.149.148:9501/api/PurchaseDelivery/GetTemplate', null, 'get')
}

export function inputData(url) {
  return request({
    url: '/PurchaseDelivery/Input',
    method: 'post',
    data: { fileUrl: url }
  })
}

export function _exportData(data) {
  dsOutExcel('/PurchaseDelivery/ExportPurchaseDelivery', data, 'post')
}