import request from "@/utils/request";
//新增模版
export function addExcel(data: any) {
  return request({
    url: "/api/v1/excelForm/add",
    method: "post",
    data,
  });
}
//批量删除
export function delsExcel(data: any) {
  return request({
    url: "/api/v1/excelForm/add",
    method: "post",
    data,
  });
}
//删除
export function delExcel(data: any) {
  return request({
    url: "/api/v1/excelForm/del",
    method: "post",
    data,
  });
}
//获取表格信息
export function getInfo(materialCode: any) {
  return request({
    url: "/api/v1/excelForm/get/" + materialCode,
    method: "get",
  });
}
//更新
export function updateExcel(data: any) {
  return request({
    url: "/api/v1/excelForm/update",
    method: "post",
    data,
  });
}
//获取列表
export function getForm(data: any) {
  return request({
    url: "/api/v1/excelForm/page",
    method: "post",
    data,
  });
}
//新增工序绑定模版
export function add(data: any) {
  return request({
    url: "/api/v1/opExcelForm/add",
    method: "post",
    data,
  });
}
//删除工序绑定模版
export function deleteTemp(data: any) {
  return request({
    url: "/api/v1/opExcelForm/del",
    method: "post",
    data,
  });
}
//位置坐标列表获取
export function getSettingsData(data: any) {
  return request({
    url: "/api/v1/excelForm/settingPage",
    method: "post",
    data,
  });
}
//位置坐标列表新增
export function addSettingsData(data: any) {
  return request({
    url: "/api/v1/excelForm/addSetting",
    method: "post",
    data,
  });
}
//位置坐标列表删除
export function deleteSettingsData(data: any) {
  return request({
    url: "/api/v1/excelForm/removeSetting",
    method: "post",
    data,
  });
}
//生产履历修改EXcell数据（实际为新增）
export function setExcelData(data: any) {
  return request({
    url: "/api/v1/ProcessFormData/add",
    method: "post",
    data,
  });
}
// 生产随工单Exceldata获取
export function getProExcel(id: any) {
  return request({
    url: `/api/v1/ProcessFormData/getExcel/${id}`,
    method: "get",
  });
}

//生产随工单更新
export function updateProExcel(data: any) {
  return request({
    url: `/api/v1/ProcessFormData/updateExcel`,
    method: "post",
    data,
  });
}

// 工单检验单查询
export function getExcelDataByWorkOrderid(workOrderId: string, id: string) {
  return request({
    url: `/api/v1/ProcessFormData/queryInfo/${workOrderId}/${id}`,
    method: "get",
  });
}
