import request from '@/utils/request'
  export function saveDegs(data) {return request({url: '/dmBom/saveDegs', method: 'post', data})}
export function uploadPDF(data) {
  return request({
    url: '/dmBom/uploadPDF',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: data
  })
}
export function getList(data) {return request({url: '/dmCbxxp/getList', method: 'post', data})}
export function del(data) {return request({url: '/dmCbxxp/del', method: 'post', data})}
export function edit(data) {return request({url: '/dmCbxxp/edit', method: 'post', data})}
export function add(data) {return request({url: '/dmCbxxp/add', method: 'post', data})}


export function getCzplBase(data) {return request({url: '/dmCzplpNew/getCzplBase', method: 'post', data})}
export function czPlDel(data) {return request({url: '/dmCzplpNew/czPlDel', method: 'post', data})}
export function wgetCzplBase(data) {return request({url: '/dmCzplpNew/getCzplBase', method: 'post', data})}
export function czPlupdate(data) {return request({url: '/dmCzplpNew/czPlupdate', method: 'post', data})}
export function getCzplList(data) {return request({url: '/dmCzplpNew/getCzplList', method: 'post', data})}
export function uploadPl(data) {
  const param = new FormData()
  param.append('file', data.file)
  param.append('czbh', data.czbh)
  param.append('isupload', data.isupload)
  return request({
    url: '/dmCzplpNew/uploadPl',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}

export function uploadBom(data) {
  const param = new FormData()
  param.append('file', data.file)

  return request({
    url: '/bom/uploadBom',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: data
  })
}

export function getListBom(data) {return request({url: '/dmBom/getListBom', method: 'post', data})}
export function getListBomRealy(data) {return request({url: '/dmBom/getListBomRealy', method: 'post', data})}
export function getListBomRealy1(data) {return request({url: '/dmBom/getListBomRealy1', method: 'post', data})}
export function addListBom(data) {return request({url: '/dmBom/addListBom', method: 'post', data})}
export function saveListBom(data) {return request({url: '/dmBom/saveListBom', method: 'post', data})}
export function copyListBom(data) {return request({url: '/dmBom/copyListBom', method: 'post', data})}


export function getBcLQlList(data) {return request({url: '/dmBclqmxp/getBcLQlList', method: 'post', data})}
export function getBcTJlList(data) {return request({url: '/dmBchxylp/getBcTJlList', method: 'post', data})}
export function getTLTList(data) {return request({url: '/dmBchxmxp/getTLTList', method: 'post', data})}
export function getLJQDList(data) {return request({url: '/dmWlqd/getLJQDList', method: 'post', data})}

export function getYdjhzzList(data) {
  return request({
    url: "/ydjhzz/getList",
    method: "post",
    params:{ch:data.dcch,...data},
  });
}

export function getYqbList(data) {
  return request({
    url: "/ydjhzz/getYqbList",
    method: "post",
    params:{ch:data.dcch,...data},
  });
}

export function dbs(data) {
  return request({
    url: "/ydjhzz/dbs",
    method: "post",
    params:{ch:data.dcch,...data},
  });
}

export function getRjhList(yf) {
  return request({
    url: "/rjhgz/getRjhList",
    method: "post",
    params:{yf},
  });
}
