import request from "@/utils/request";

//首页涉及相关api（获取未完成任务、扫码开工）
/**
 * 获取未完成任务
 *
 * @param data
 */
export function addAppointOut(data: any) {
  return request({
    url: "/api/v1/process/outsource/add",
    method: "post",
    data: data,
  });
}

// 工序信息
export function getProcessOpInfo(processId: string) {
  return request({
    url: `/api/v1/process/info/processOpInfo/${processId}`,
    method: "get",
  });
}

export function appointRecord(data: any) {
  return request({
    url: "/api/v1/process/outsource/page",
    method: "post",
    data: data,
  });
}

export function reveiveRecord(data: any[]) {
  return request({
    url: "/api/v1/process/outsource/receive",
    method: "post",
    data: data,
  });
}

// 	主键id
export function deleteRecordById(id: string) {
  return request({
    url: "/api/v1/process/outsource/del",
    method: "post",
    data: { id: id },
  });
}

// 新增印刷版信息
export function addPrintInfo(data: any) {
  return request({
    url: "/api/v1/printing/add",
    method: "post",
    data: data,
  });
}

// 印刷版分页查询
export function getPrintInfoPage(data: any) {
  return request({
    url: "/api/v1/printing/page",
    method: "post",
    data: data,
  });
}

// 删除印刷版信息
export function deletePrintInfo(id: string) {
  return request({
    url: "/api/v1/printing/del",
    method: "post",
    data: { id: id },
  });
}
