import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'

//首页统计
const getBuyAndSaleStatistics = (params)=>getAction("/erp/depotHead/getBuyAndSaleStatistics",params);
const buyOrSalePrice = (params)=>getAction("/erp/depotItem/buyOrSalePrice",params);
//租户管理
const checkTenant = (params)=>getAction("/erp/tenant/checkIsNameExist",params);
const editTenant = (params)=>putAction("/erp/tenant/update",params);
//角色管理
const addRole = (params)=>postAction("/erp/role/add",params);
const editRole = (params)=>putAction("/erp/role/update",params);
const checkRole = (params)=>getAction("/erp/role/checkIsNameExist",params);
const roleAllList = (params)=>getAction("/erp/role/allList",params);
//用户管理
const registerUser = (params)=>postAction("/erp/user/registerUser",params);
const addUser = (params)=>postAction("/erp/user/addUser",params);
const editUser = (params)=>putAction("/erp/user/updateUser",params);
const getUserList = (params)=>getAction("/erp/user/getUserList",params);
const queryPermissionsByUser = (params)=>postAction("/erp/function/findMenuByPNumber",params);
//机构管理
const queryOrganizationTreeList = (params)=>getAction("/erp/organization/getOrganizationTree",params);
const queryOrganizationById = (params)=>getAction("/erp/organization/findById",params);
const checkOrganization = (params)=>getAction("/erp/organization/checkIsNameExist",params);
//经手人管理
const addPerson = (params)=>postAction("/erp/person/add",params);
const editPerson = (params)=>putAction("/erp/person/update",params);
const checkPerson = (params)=>getAction("/erp/person/checkIsNameExist",params);
const getPersonByType = (params)=>getAction("/erp/person/getPersonByType",params);
const getPersonByNumType = (params)=>getAction("/erp/person/getPersonByNumType",params);
//账户管理
const addAccount = (params)=>postAction("/erp/account/add",params);
const editAccount = (params)=>putAction("/erp/account/update",params);
const checkAccount = (params)=>getAction("/erp/account/checkIsNameExist",params);
const getAccount = (params)=>getAction("/erp/account/getAccount",params);
//收支项目
const addInOutItem = (params)=>postAction("/erp/inOutItem/add",params);
const editInOutItem = (params)=>putAction("/erp/inOutItem/update",params);
const checkInOutItem = (params)=>getAction("/erp/inOutItem/checkIsNameExist",params);
const findInOutItemByParam = (params)=>getAction("/erp/inOutItem/findBySelect",params);
//仓库信息
const addDepot = (params)=>postAction("/erp/depot/add",params);
const editDepot = (params)=>putAction("/erp/depot/update",params);
const checkDepot = (params)=>getAction("/erp/depot/checkIsNameExist",params);
//商品属性
const editMaterialProperty = (params)=>putAction("/erp/materialProperty/update",params);
//商品类型
const queryMaterialCategoryTreeList = (params)=>getAction("/erp/materialCategory/getMaterialCategoryTree",params);
const queryMaterialCategoryById = (params)=>getAction("/erp/materialCategory/findById",params);
const checkMaterialCategory = (params)=>getAction("/erp/materialCategory/checkIsNameExist",params);
//商品管理
const addMaterial = (params)=>postAction("/erp/material/add",params);
const editMaterial = (params)=>putAction("/erp/material/update",params);
const checkMaterial = (params)=>getAction("/erp/material/checkIsExist",params);
const getMaterialBySelect = (params)=>getAction("/erp/material/findBySelect",params);
const getSerialMaterialBySelect = (params)=>getAction("/erp/material/getMaterialEnableSerialNumberList",params);
const getMaterialByBarCode = (params)=>getAction("/erp/material/getMaterialByBarCode",params);
const getMaxBarCode = (params)=>getAction("/erp/material/getMaxBarCode",params);
const checkMaterialBarCode = (params)=>getAction("/erp/materialsExtend/checkIsBarCodeExist",params);
//序列号
const addSerialNumber = (params)=>postAction("/erp/serialNumber/add",params);
const editSerialNumber = (params)=>putAction("/erp/serialNumber/update",params);
const checkSerialNumber = (params)=>getAction("/erp/serialNumber/checkIsNameExist",params);
const batAddSerialNumber = (params)=>postAction("/erp/serialNumber/batAddSerialNumber",params);
const getEnableSerialNumberList = (params)=>getAction("/erp/serialNumber/getEnableSerialNumberList",params);
//多属性
const addMaterialAttribute = (params)=>postAction("/erp/materialAttribute/add",params);
const editMaterialAttribute = (params)=>putAction("/erp/materialAttribute/update",params);
const checkMaterialAttribute = (params)=>getAction("/erp/materialAttribute/checkIsNameExist",params);
const getAllMaterialAttribute = (params)=>getAction("/erp/materialAttribute/getAll",params);
//功能管理
const addFunction = (params)=>postAction("/erp/function/add",params);
const editFunction = (params)=>putAction("/erp/function/update",params);
const checkFunction = (params)=>getAction("/erp/function/checkIsNameExist",params);
//系统配置
const addSystemConfig = (params)=>postAction("/erp/systemConfig/add",params);
const editSystemConfig = (params)=>putAction("/erp/systemConfig/update",params);
const checkSystemConfig = (params)=>getAction("/erp/systemConfig/checkIsNameExist",params);
const getCurrentSystemConfig = (params)=>getAction("/erp/systemConfig/getCurrentInfo",params);
const fileSizeLimit = (params)=>getAction("/erp/systemConfig/fileSizeLimit",params);
//平台参数
const addPlatformConfig = (params)=>postAction("/erp/platformConfig/add",params);
const editPlatformConfig = (params)=>putAction("/erp/platformConfig/update",params);
const getPlatformConfigByKey = (params)=>getAction("/erp/platformConfig/getPlatformConfigByKey",params);
//用户|角色|模块关系
const addUserBusiness = (params)=>postAction("/erp/userBusiness/add",params);
const editUserBusiness = (params)=>putAction("/erp/userBusiness/update",params);
const checkUserBusiness = (params)=>getAction("/erp/userBusiness/checkIsValueExist",params);
const updateBtnStrByRoleId = (params)=>postAction("/erp/userBusiness/updateBtnStr",params);
//计量单位
const addUnit = (params)=>postAction("/erp/unit/add",params);
const editUnit = (params)=>putAction("/erp/unit/update",params);
const checkUnit = (params)=>getAction("/erp/unit/checkIsNameExist",params);
//供应商|客户|会员
const addSupplier = (params)=>postAction("/erp/supplier/add",params);
const editSupplier = (params)=>putAction("/erp/supplier/update",params);
const checkSupplier = (params)=>getAction("/erp/supplier/checkIsNameAndTypeExist",params);
const findBySelectSup = (params)=>postAction("/erp/supplier/findBySelect_sup",params);
const findBySelectCus = (params)=>postAction("/erp/supplier/findBySelect_cus",params);
const findBySelectRetail = (params)=>postAction("/erp/supplier/findBySelect_retail",params);
const findBySelectOrgan = (params)=>postAction("/erp/supplier/findBySelect_organ",params);
//单据相关
const findBillDetailByNumber = (params)=>getAction("/erp/depotHead/getDetailByNumber",params);
const findStockByDepotAndBarCode = (params)=>getAction("/erp/depotItem/findStockByDepotAndBarCode",params);
const getBatchNumberList = (params)=>getAction("/erp/depotItem/getBatchNumberList",params);
const findFinancialDetailByNumber = (params)=>getAction("/erp/accountHead/getDetailByNumber",params);

//租户信息
const getAlltenantInfo = (params)=>getAction("/erp/tenant/listAllTenant",params);
export {
  getBuyAndSaleStatistics,
  buyOrSalePrice,
  checkTenant,
  editTenant,
  addRole,
  editRole,
  checkRole,
  roleAllList,
  registerUser,
  addUser,
  editUser,
  getUserList,
  queryPermissionsByUser,
  queryOrganizationTreeList,
  queryOrganizationById,
  checkOrganization,
  addPerson,
  editPerson,
  checkPerson,
  getPersonByType,
  getPersonByNumType,
  addAccount,
  editAccount,
  checkAccount,
  getAccount,
  addInOutItem,
  editInOutItem,
  checkInOutItem,
  findInOutItemByParam,
  addDepot,
  editDepot,
  checkDepot,
  editMaterialProperty,
  queryMaterialCategoryTreeList,
  queryMaterialCategoryById,
  checkMaterialCategory,
  addMaterial,
  editMaterial,
  checkMaterial,
  getMaterialBySelect,
  getSerialMaterialBySelect,
  getMaterialByBarCode,
  getMaxBarCode,
  checkMaterialBarCode,
  addSerialNumber,
  editSerialNumber,
  checkSerialNumber,
  batAddSerialNumber,
  getEnableSerialNumberList,
  addMaterialAttribute,
  editMaterialAttribute,
  checkMaterialAttribute,
  getAllMaterialAttribute,
  addFunction,
  editFunction,
  checkFunction,
  addSystemConfig,
  editSystemConfig,
  checkSystemConfig,
  getCurrentSystemConfig,
  fileSizeLimit,
  addPlatformConfig,
  editPlatformConfig,
  getPlatformConfigByKey,
  addUserBusiness,
  editUserBusiness,
  checkUserBusiness,
  updateBtnStrByRoleId,
  addUnit,
  editUnit,
  checkUnit,
  addSupplier,
  editSupplier,
  checkSupplier,
  findBySelectSup,
  findBySelectCus,
  findBySelectRetail,
  findBySelectOrgan,
  findBillDetailByNumber,
  findStockByDepotAndBarCode,
  getBatchNumberList,
  findFinancialDetailByNumber,
  getAlltenantInfo
}



