import request from "@/utils/request";
import http from "@/utils/axios";

export const getMaterialUseStatiss = (data) => {
  return http({
    url: "/indexStatiss/materialUseStatiss",
    method: "post",
    data: data,
  });
};

export const materialOrgUseStatiss = (data) => {
  return http({
    url: "/indexStatiss/materialOrgUseStatiss",
    method: "post",
    data: data,
  });
};

export const getEqpStatiss = () => {
  return request({
    url: "/indexStatiss/eqpStatiss",
    method: "post",
  });
};

export const getMassStatiss = () => {
  return request({
    url: "/indexStatiss/massStatiss",
    method: "post",
  });
};

export const findForeMtrlList = () => {
  return request({
    url: "/indexStatiss/findForeMtrlList",
    method: "post",
  });
};

export const findForeMtrlPage = (query) => {
  return request({
    url: "/indexStatiss/findForeMtrlPage",
    method: "post",
    params: query,
  });
};

export const findMtrlPage = (query) => {
  return http({
    url: `/indexStatiss/findMtrlPage?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const findMassPage = (query) => {
  return request({
    url: "/indexStatiss/findMassPage",
    method: "post",
    params: query,
  });
};

export const faultPage = (query) => {
  return http({
    url: `/adsMatRationRecommendD/faultPage?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const faultMessagePage = (query) => {
  return http({
    url: `/adsMatRationRecommendD/faultMessagePage?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const materialDpage = (query) => {
  return http({
    url: `/adsMatCzEquipmentMaterialD/page?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const queryEquipmentTypeList = (query) => {
  return request({
    url: "/adsMatRationRecommendD/queryEquipmentTypeList",
    method: "post",
    params: query,
  });
};

// export const findCabinetRecipientsItemPage = (query) => {
//   return request({
//     url: `/indexStatiss/findCabinetRecipientsItemPage`,
//     method: "post",
//     params: query,
//   });
// };
export const findCabinetRecipientsItemPage = (query) => {
  return http({
    url: `/indexStatiss/findCabinetRecipientsItemPage?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const pageProject = (query) => {
  return http({
    url: `/adsHyxtMatMtrlForeD/pageProject?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const batchUpdate = (query) => {
  return http({
    url: "/adsHyxtMatMtrlForeD/batchUpdate",
    method: "post",
    data: query,
  });
};

export const recommendDpage = (query) => {
  return http({
    url: `/adsMatRationRecommendD/page?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const queryByIdItem = (query) => {
  return http({
    url: "/adsMatRationRecommendD/queryByIdItem",
    method: "post",
    data: query,
  });
};

export const updateById = (query) => {
  return http({
    url: "/adsMatRationRecommendD/updateById",
    method: "post",
    data: query,
  });
};

export const deleteById = (query) => {
  return http({
    url: "/adsMatRationRecommendD/deleteById",
    method: "post",
    data: query,
  });
};

export const saveStoreRation = (query) => {
  return http({
    url: "/adsMatRationRecommendD/saveStoreRation",
    method: "post",
    data: query,
  });
};

export const saveReplenishment = (query) => {
  return http({
    url: "/adsMatRationRecommendD/saveReplenishment",
    method: "post",
    data: query,
  });
};

export const replenishmentDpage = (query) => {
  return http({
    url: `/adsMatReplenishmentD/page?pageNo=${query.pageNo}&pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const replenishmentDdeleteById = (query) => {
  return http({
    url: "/adsMatReplenishmentD/deleteById",
    method: "post",
    data: query,
  });
};

export const replenishmentDqueryByIdItem = (query) => {
  return http({
    url: "/adsMatReplenishmentD/queryByIdItem",
    method: "post",
    data: query,
  });
};

export const replenishmentDupdateById = (query) => {
  return http({
    url: "/adsMatReplenishmentD/updateById",
    method: "post",
    data: query,
  });
};

export const matMtrlForeDpage = (query) => {
  return http({
    url: "/adsHyxtMatMtrlForeD/pageOrgRation",
    method: "post",
    data: query,
  });
};

// 选择物料
export const materialPage = (query) => {
  return http({
    url: "/adsMatCzEquipmentMaterialD/materialPage",
    method: "post",
    data: query,
  });
};

export const materialPageSave = (query) => {
  return http({
    url: "/adsMatCzEquipmentMaterialD/save",
    method: "post",
    data: query,
  });
};

export const materialPageUpdateById = (query) => {
  return http({
    url: "/adsMatCzEquipmentMaterialD/updateById",
    method: "post",
    data: query,
  });
};

export const materialPageDeleteById = (query) => {
  return http({
    url: "/adsMatCzEquipmentMaterialD/deleteById",
    method: "post",
    data: query,
  });
};

export const materialOrgUseInfoPage = (query) => {
  return http({
    url: `/indexStatiss/materialOrgUseInfoPage?pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const massOrgEqpStatiss = (query) => {
  return http({
    url: "/indexStatiss/massOrgEqpStatiss",
    method: "post",
    data: query,
  });
};

export const massOrgEqpInfoPage = (query) => {
  return http({
    url: `/indexStatiss/massOrgEqpInfoPage?pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const pageOrgRation = (query) => {
  return http({
    url: `/adsHyxtMatMtrlForeD/pageOrgRation?pageSize=${query.pageSize}&pageNum=${query.pageNum}`,
    method: "post",
    data: query,
  });
};

export const queryOrgMaterialInfo = (query) => {
  return http({
    url: "/adsHyxtMatMtrlForeD/queryOrgMaterialInfo",
    method: "post",
    data: query,
  });
};

export const updateQuotValue = (query) => {
  return http({
    url: "/adsMatCzOrgMaterialRationD/updateQuotValue",
    method: "post",
    data: query,
  });
};

export const queryMaterialRationInfo = (query) => {
  return http({
    url: "/adsMatCzOrgMaterialRationD/queryMaterialRationInfo",
    method: "post",
    data: query,
  });
};

export const findCabinetRecipientsItemCountPage = (query) => {
  return http({
    url: `/indexStatiss/findCabinetRecipientsItemCountPage?pageSize=${query.pageSize}&pageNo=${query.pageNo}`,
    method: "post",
    data: query,
  });
};

export const poiseList = (query) => {
  return http({
    url: "/adsHyxtMatMtrlForeD/poiseList",
    method: "post",
    data: query,
  });
};

export const adsCzxtReplenishmentPeriodDpage = (query) => {
  return http({
    url: `/adsCzxtReplenishmentPeriodD/page?pageSize=${query.pageSize}&pageNo=${query.pageNo}`,
    method: "post",
    data: query,
  });
};

export const adsCzxtReplenishmentPeriodDdeleted = (query) => {
  return http({
    url: "/adsCzxtReplenishmentPeriodD/deleted",
    method: "post",
    data: query,
  });
};

export const adsCzxtReplenishmentPeriodDsave = (query) => {
  return http({
    url: "/adsCzxtReplenishmentPeriodD/save",
    method: "post",
    data: query,
  });
};

export const adsCzxtReplenishmentPeriodDupdateById = (query) => {
  return http({
    url: "/adsCzxtReplenishmentPeriodD/updateById",
    method: "post",
    data: query,
  });
};

export const queryOrgInfo = (query) => {
  return http({
    url: "/indexStatiss/queryOrgInfo",
    method: "post",
    data: query,
  });
};

export const queryOrgMaterialCount = (query) => {
  return http({
    url: "/adsHyxtMatMtrlForeD/queryOrgMaterialCount",
    method: "post",
    data: query,
  });
};

export const savePoiseOrder = (query) => {
  return http({
    url: "/adsMatPoiseOrderD/savePoiseOrder",
    method: "post",
    data: query,
  });
};

export const adsMatPoiseOrderDpage = (query) => {
  return http({
    url: `/adsMatPoiseOrderD/page?pageSize=${query.pageSize}&pageNo=${query.pageNo}`,
    method: "post",
    data: query,
  });
};

export const adsMatPoiseOrderDqueryInfo = (query) => {
  return http({
    url: "/adsMatPoiseOrderD/queryInfo",
    method: "post",
    data: query,
  });
};

export const queryMaterialQuotaCount = (query) => {
  return http({
    url: "/adsHyxtMatMtrlForeD/queryMaterialQuotaCount",
    method: "post",
    data: query,
  });
};

export const queryOrgStockRevolveCount = (query) => {
  return http({
    url: "/indexStatiss/queryOrgStockRevolveCount",
    method: "post",
    data: query,
  });
};

export const queryOrgStockRevolveInfoPage = (query) => {
  return http({
    url: `/adsMatOrgStockRevolveInfoD/queryOrgStockRevolveInfoPage?pageSize=${query.pageSize}&pageNo=${query.pageNo}`,
    method: "post",
    data: query,
  });
};

export const queryEqpCount = (query) => {
  return http({
    url: "/indexStatiss/queryEqpCount",
    method: "post",
    data: query,
  });
};

export const adsMatReplenishmentDsaveReplenishment = (query) => {
  return http({
    url: "/adsMatReplenishmentD/saveReplenishment",
    method: "post",
    data: query,
  });
};

export const adsMatPoiseOrderDdeletedById = (query) => {
  return http({
    url: "/adsMatPoiseOrderD/deletedById",
    method: "post",
    data: query,
  });
};

export const adsHyxtMatMtrlForeDpageOrgRationCount = (query) => {
  return http({
    url: "/adsHyxtMatMtrlForeD/pageOrgRationCount",
    method: "post",
    data: query,
  });
};
