import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { HppStoreVO, HppStoreForm, HppStoreQuery } from '@/api/wms/hppStore/types';

/**
 * 查询【请填写功能名称】列表
 * @param query
 * @returns {*}
 */

export const listHppStore = (query?: HppStoreQuery): AxiosPromise<HppStoreVO[]> => {
  return request({
    url: '/wms/hppStore/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询【请填写功能名称】详细
 * @param createBy
 */
export const getHppStore = (objId: string | number): AxiosPromise<HppStoreVO> => {
  return request({
    url: '/wms/hppStore/' + objId,
    method: 'get'
  });
};

/**
 * 新增【请填写功能名称】
 * @param data
 */
export const addHppStore = (data: HppStoreForm) => {
  return request({
    url: '/wms/hppStore',
    method: 'post',
    data: data
  });
};

/**
 * 修改【请填写功能名称】
 * @param data
 */
export const updateHppStore = (data: HppStoreForm) => {
  return request({
    url: '/wms/hppStore',
    method: 'put',
    data: data
  });
};

/**
 * 删除【请填写功能名称】
 * @param createBy
 */
export const delHppStore = (objId: string | number | Array<string | number>) => {
  return request({
    url: '/wms/hppStore/' + objId,
    method: 'delete'
  });
};


/**
 * 下拉框查询【请填写功能名称】列表
 * @param query
 * @returns {*}
 */
export function getWmsHppStoreList (query) {
    return request({
        url: '/wms/hppStore/getWmsHppStoreList',
        method: 'get',
        params: query
    });
};
