import axios from "@/utils/request";

export function devicePlanDetailItemPage(query) {
  return axios(
    {
      url: "/udi/device/plan/detail/item/page",
      method: "POST",
      data: query
    }
  )
}

export function devicePlanDetailItemAdd(query) {
  return axios(
    {
      url: "/udi/device/plan/detail/item/add",
      method: "POST",
      data: query
    }
  )
}

export function devicePlanDetailItemBatchAdd(query) {
  return axios(
    {
      url: "/udi/device/plan/detail/item/batch/add",
      method: "POST",
      data: query
    }
  )
}


export function devicePlanDetailItemDel(planId, productId, itemCode) {
  return axios(
    {
      url: `/udi/device/plan/detail/item/delByProduct/${planId}/${productId}/${itemCode}`,
      method: "DELETE"
    }
  )
}

export function devicePlanDetailItemByDeviceCodeDel(planId, deviceCode, itemCode) {
  return axios(
    {
      url: `/udi/device/plan/detail/item/delByDevice/${planId}/${deviceCode}/${itemCode}`,
      method: "DELETE"
    }
  )
}



