// 工艺技术数据
import request from '@/utils/request'
// 制作图基础
export function dmMfgBase(data) { return request({ url: '/api/gj/dmMfg/base', method: 'post', data }) }
export function dmMfgGetList(data) { return request({ url: '/api/gj/dmMfg/getList', method: 'post', data }) }
export function getAllList(data) { return request({ url: '/api/gj/dmMfg/getAllList', method: 'post', data }) }
export function dmMfgDel(data) { return request({ url: '/api/gj/dmMfg/del', method: 'post', data }) }
export function getDfgAndDetail(data) { return request({ url: '/api/gj/dmMfg/getDfgAndDetail', method: 'post', data }) }

export function exportZztAndMp(data) {
  return request({
    url: '/api/gj/dmMfg/exportZztAndMp',
    method: 'post',
    responseType: 'blob',
    data
  })
}
// 上传制作图
export function upload1(data) {
  const param = new FormData()
  param.append('file', data.file)
  param.append('project', data.project)
  param.append('isupload', data.isupload)
  return request({
    url: '/api/gj/dmMfg/upload',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}

export function uploadTzd(data) {
  const param = new FormData()
  param.append('file', data.file)
  param.append('project', data.project)
  param.append('isupload', data.isupload)
  return request({
    url: '/api/gj/dmMfg/tzdUpload',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}

export function uploadOther(data) {
  const param = new FormData()
  param.append('file', data.file)
  param.append('project', data.project)
  param.append('isupload', data.isupload)
  return request({
    url: '/api/gj/dmMfg/otherUpload',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}

// 制作图明细
export function dmMfgDetailGetList(data) { return request({ url: '/api/gj/dmMfgDetail/getList', method: 'post', data }) }
export function getMfgJsList(data) { return request({ url: '/api/gj/dmMfgDetail/getMfgJsList', method: 'post', data }) }
// 工艺备注
export function updteGybz(data) { return request({ url: '/api/gj/dmMfgDetail/updteGybz', method: 'post', data }) }
// 编制流程卡树视图
export function vTreePh(data) { return request({ url: '/api/gj/vMfgTreePh/getTreeList', method: 'post', data }) }

// 流程卡编制
export function lckBz(data) { return request({ url: '/api/gj/dmMfgLck/lckBz', method: 'post', data }) }

// 流程卡查询
export function lckCx(data) { return request({ url: '/api/gj/dmMfgLck/lckCx', method: 'post', data }) }
export function lcktjsh(data) { return request({ url: '/api/gj/dmMfgLck/lcktjsh', method: 'post', data }) }
export function lckQxtj(data) { return request({ url: '/api/gj/dmMfgLck/lckQxtj', method: 'post', data }) }
export function lckGetBase(data) { return request({ url: '/api/gj/dmMfgLck/base', method: 'post', data }) }
export function lckFp(data) { return request({ url: '/api/gj/dmMfgLck/lckFp', method: 'post', data }) }


//流程卡 审批查询
export function lckSpCx(data) { return request({ url: '/api/gj/dmMfgLck/lckSpCx', method: 'post', data }) }
export function lckSp(data) { return request({ url: '/api/gj/dmMfgLck/lckSp', method: 'post', data }) }
export function getSpBase(data) { return request({ url: '/api/gj/dmMfgLck/getSpBase', method: 'post', data }) }




/// 制作图明细查询
export function getDwgNoTree(data) { return request({ url: '/api/gj/dmMfgCx/getProjectTree', method: 'post', data }) }
export function getDmMfgcxBase(data) { return request({ url: '/api/gj/dmMfgCx/getBase', method: 'post', data }) }
export function getMfgMxList(data) { return request({ url: '/api/gj/dmMfgCx/getMfgMxList', method: 'post', data }) }


//流程卡明细查询
export function getLckMxBase(data) { return request({ url: '/api/gj/dmMfgCx/getLckMxBase', method: 'post', data }) }
export function getLckMxList(data) { return request({ url: '/api/gj/dmMfgCx/getLckMxList', method: 'post', data }) }
export function getLckMxTree(data) { return request({ url: '/api/gj/dmMfgCx/getLckMxTree', method: 'post', data }) }

export function exportFldm(data) { return request({ url: '/api/gj/dmMfgCx/exportFldm', method: 'post',responseType: 'blob', data }) }


// 图纸登记
export function tzdjbase(data) { return request({ url: '/api/gj/dmDwgReg/tzdjbase', method: 'post', data }) }
export function saveDwgReg(data) { return request({ url: '/api/gj/dmDwgReg/saveDwgReg', method: 'post', data }) }
export function updateDwgReg(data) { return request({ url: '/api/gj/dmDwgReg/updateDwgReg', method: 'post', data }) }
export function delDwgReg(data) { return request({ url: '/api/gj/dmDwgReg/delDwgReg', method: 'post', data }) }
export function getDwgRegList(data) { return request({ url: '/api/gj/dmDwgReg/getDwgRegList', method: 'post', data }) }

// 图纸发放
export function dwgffCx(data) { return request({ url: '/api/gj/dmDwgReg/dwgffCx', method: 'post', data }) }
export function saveDwgRegLog(data) { return request({ url: '/api/gj/dmDwgReg/saveDwgRegLog', method: 'post', data }) }

//根据id 查询 图纸log
export function getDwglogList(data) { return request({ url: '/api/gj/dmDwgRegLog/getDwglogList', method: 'post', data }) }
export function delDwglog(data) { return request({ url: '/api/gj/dmDwgRegLog/delDwglog', method: 'post', data }) }
export function updateDwgLog(data) { return request({ url: '/api/gj/dmDwgRegLog/updateDwgLog', method: 'post', data }) }


// 开工测试
export function getKgcsTree(data) { return request({ url: '/api/gj/dmMfgCx/getKgcsTree', method: 'post', data }) }
export function findKgcsList(data) { return request({ url: '/api/gj/dmMfgCx/findKgcsList', method: 'post', data }) }
export function kgcs(data) { return request({ url: '/api/gj/dmMfgCx/kgcs', method: 'post', data }) }
export function saveKgcs(data) { return request({ url: '/api/gj/dmMfgCx/saveKgcs', method: 'post', data }) }

