import { post, upload } from "@/request/axios.js";
import { ref } from "vue";
import { getLevelsByParentId } from "@/request/data_dictionary.js";

export const getAssignedType = (params) =>
  post("/dictionaries/getLevels", {   // 获取过户类型
    loading: false,
    ...params,
  });

export const layoutFnGetAssignedType = async () => {
  const resData = await getLevelsByParentId({
    parentId: "0000ad963949823e8c9501bab16001aa",
  });
  return ref(resData);
};

export const getAssignedWay = (params) =>
  post("/dictionaries/getLevels", {   // 获取过户方式
    loading: false,
    ...params,
  });

export const getAssignedVehicleType = (params) =>
  post("/dictionaries/getLevels", {   // 获取过户车辆类型
    loading: false,
    ...params,
  });
export const getAssignedVehicleModel = (params) =>
  post("/dictionaries/getAssignedVehicleModel", {   // 获取过户车辆车型
    loading: false,
    ...params,
  });

export const getAssignedVehicle = (params) =>
  post("/dictionaries/getAssignedVehicle", {    // 获取过户车辆
    loading: false,
    ...params,
  });

export const layoutFnGetScrapVehicleType = async () => {
  const resData = await getLevelsByParentId({
    parentId: "0000ad963949823e8c9501bab16001aa",
  });
  return ref(resData);
};
export const getAssignedList = (params) =>
  post("/assignedmanage/list", params); // 过户管理列表

export const setAssignedManageAdd = (params) =>
  upload("/assignedmanage/add", params); // 过户管理添加

export const setAssignedManageEdit = (params) =>
  upload("/assignedmanage/goEdit", params); // 过户管理修改

export const findByIdAssignedManageInfo = (params) =>
  post("/assignedmanage/goEdit", params); // 查看过户信息

export const setAssignedManageDelete = (params) =>
  post("/assignedmanage/delete", params); // 删除过户信息

export const getOperationVehicleList = (params) =>
  upload("/operatingvehicles/operationvehicleList", params);  // 获取所有车船税

export const getVehicleView = (params) =>
  upload("/operatingvehicles/operationvehicleList", params);  // 获取所有车船税

