/*
 * @Date: 2022-10-17 09:09:15
 * @LastEditors: 陈禹琨 cyk910622@163.com
 * @LastEditTime: 2022-12-05 11:59:28
 * @FilePath: \upcloud-wms-henanyiyao-web\src\views\kzyWMS\bound\stocklock\LockRecheck\api.js
 * @Description: cyk
 */
import request from "@/utils/request";
import qs from "qs";
import { upcloud_base_gsp, upcloud_base_inventory } from "@/config/serviceSettings";

const api = {
  batchAdd: upcloud_base_gsp + "/gspUpkeepCheck/batchAdd",
  findPlan: upcloud_base_gsp + "/gspUpkeepCheck/findPlan",
  findByPlanId: upcloud_base_gsp + "/gspUpkeepCheck/findByPlanId",
  batchEdit: upcloud_base_gsp + "/gspUpkeepCheck/batchEdit",
  gspUpkeepCheckbatchAdd: upcloud_base_gsp + "/gspUpkeepCheck/batchAdd",
  batchCheck: upcloud_base_gsp + "/gspUpkeepCheck/batchCheck",
  printgetGSPUpkeepPrintData: upcloud_base_gsp + "/print/getGSPUpkeepPrintData",
  senToEis: upcloud_base_gsp + "/gspUpkeepCheck/sendTaskToEis",
};

export function batchCheck(parameter) {
  //   养护记录批量修改 POST
  return request({
    method: "post",
    url: upcloud_base_inventory + "/stock-lot/v1/inspect/check",
    data: parameter,
  });
}

export function gspUpkeepCheckbatchAdd(parameter) {
  //   养护记录批量修改 POST
  return request({
    method: "post",
    url: api.gspUpkeepCheckbatchAdd,
    data: parameter,
  });
}

export function batchEdit(parameter) {
  //   养护记录批量修改 POST
  return request({
    method: "post",
    url: api.batchEdit,
    data: parameter,
  });
}

export function batchAdd(parameter) {
  //   养护计划批量新增 POST
  return request({
    method: "post",
    url: api.batchAdd,
    data: parameter,
  });
}

// 养护记录菜单，弹框接口：查询养护计划

export function findPlan(parameter) {
  //   养护计划批量新增 POST
  return request({
    method: "get",
    url: api.findPlan,
    params: parameter,
  });
}

export function findByPlanId(parameter) {
  //   养护计划批量新增 POST
  return request({
    method: "get",
    url: api.findByPlanId,
    params: parameter,
  });
}

//养护打印 GET
export function printgetGSPUpkeepPrintData(parameter) {
  //   养护计划批量新增 POST
  return request({
    method: "get",
    url: api.printgetGSPUpkeepPrintData,
    params: parameter,
  });
}

// 普通养护录入-发送设备指令
export function sendToEis(parameter) {
  return request({
    method: "post",
    url: api.senToEis,
    data: parameter,
  });
}
