import request from "@/utils/request";

/**
 * 获取当前订单tags列表
 *
 * @param queryParams
 */
export function getOpCompent(queryPath: any) {
  return request({
    url: "/api/v1/process/opCompent/get" + `${queryPath}`,
    method: "get",
  });
}

/**
 * 通过生产ID获取生产过程详情
 *
 * @param id
 */
export function getProcessInfo(id: any) {
  return request({
    url: "/api/v1/process/info/processInfo/" + `${id}`,
    method: "get",
  });
}

// 获取当前工序未报工的流水号
export function getunProcessedList(processId: string) {
  return request({
    url: `/api/v1/process/info/queryCanReportSeq/${processId}`,
    method: "get",
  });
}

// 流程定义列表查询
export function queryFlowDataList(queryParams: object) {
  return request({
    url: "/api/v1/definition/list",
    method: "post",
    data: queryParams,
  });
}

// 下一节点人员 type 1 流程 2 任务
export function getNextUser(type: string, id: string) {
  return request({
    url: `/api/v1/flowTask/nextUsers/${type}/${id}`,
    method: "get",
  });
}
