import { upcloud_base_wh,upcloud_base_chain,upcloud_base_wh_operate,upcloud_base_wh_control,upcloud_base_common,
  SERVICE_DATA_API_BASE ,upcloud_base_inventory, SERVICE_PLATFORM_POWER_BASE,upcloud_base_strategy } from "@/config/serviceSettings";

const API = {
  CargoOwnerLicenseList: {
    method: 'post',
    url: upcloud_base_chain + '/baseCargoOwnerMst/v1.0/pageList',
    params:{},
  },
  warehouse: { // 仓库查询
    method: 'get',
    url: upcloud_base_wh + '/warehouse/page',
    params:{},
  },
  wmsdcPage: { // 仓配中心查询
    method: 'get',
    url: upcloud_base_wh + '/wmsdc/page',
    params:{},
  },
  wmsWhBldgPage: { // 建筑物查询
    method: 'get',
    url: upcloud_base_wh + '/wmsWhBldg/v1/page',
    params:{},
  },
  wmsWhRoomMst: { // 库房查询
    method: 'get',
    url: upcloud_base_wh + '/baseWmsWarehouseRoomMst/page2',
    params:{},
  },
  wmsWhArea: { // 库区查询
    method: 'get',
    url: upcloud_base_wh + '/baseWmsWarehouseArea/page2',
    params:{},
  },

  locatorWHPage: { // 货位查询
    method: 'get',
    url: upcloud_base_wh + '/locator/page',
    params:{},
  },
  locatorPage: { // 货位限定
    method: 'get',
    url: upcloud_base_wh_control + '/item-locator/v1/locator-limit-inbound',
    params:{},
  },
  locatorPageLK: { // 立库移入货位
    method: 'get',
    url: upcloud_base_wh_control + '/item-locator/v1/locator-limit-lk-inbound',
    params:{},
  },
  locatorStocks: { // 货位库存
    method: 'get',
    url: upcloud_base_wh_operate + '/locator/stocks',
    params:{},
  },
  whItems: { // 仓商品总可用库存
    method: 'get',
    url: upcloud_base_wh_operate + '/wh/items',
    params:{},
  },
  commonUrl: { // 查询服务接口
    method: 'post',
    url: SERVICE_DATA_API_BASE + '/search/page',
  },
  batchPage: { // 批次号查询
    method: 'get',
    url: upcloud_base_inventory + '/batch-number/v1/page',
    params:{},
  },
  getstock: { // 获取可用库存
    method: 'get',
    url: upcloud_base_inventory + '/stock/v1/qty/avl',
    params: {
    },
  },
  getstoc1: { // 获取可用库存
    method: 'get',
    url: upcloud_base_inventory + '/stock/v1/qty/avl',
    params: {
      lkFlag:'Y'
    },
  },
  batchNum: { // 分页查询库存商品
    method: 'get',
    url: upcloud_base_inventory + '/batch-number/v1/item-page',
    params:{},
  },
  employeePage: { // 员工查询
    method: 'get',
    url: SERVICE_PLATFORM_POWER_BASE + '/employee/page',
    params:{},
  },
  departmentPage: { // 部门查询
    method: 'get',
    url: upcloud_base_chain + '/department/page',
    params:{},
  },
  ruleMoveList: { // 目标库别查询-通过源库别
    method: 'get',
    url: upcloud_base_strategy + '/rule/move/v1/list',
    params:{},
  },
  itemBatchInfiPage: { // 库存商品信息查询分页
    method: 'post',
    url: upcloud_base_inventory + '/batch-adjust/v1/item-batchinfo-page',
    params:{},
  },
  remoteUrlFun: (type) => {
    return {
        url: upcloud_base_common+`/dict/listbytype/?dicttypeCodes=${type}`,
        method: 'post'
    }
  },
  relationOwnerStockStatus: { // 库存状态查询
    method: 'post',
    url: upcloud_base_wh_control + '/relationOwnerStockStatus/list',
    params:{},
  },

}

export default API
