warehouse.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import request from '@/utils/request'
  2. // 查询仓库列表
  3. export function listWarehouse(query) {
  4. return request({
  5. url: '/basicdata/warehouse/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询仓库详细
  11. export function getWarehouse(fId) {
  12. return request({
  13. url: '/basicdata/warehouse/' + fId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增仓库
  18. export function addWarehouse(data) {
  19. return request({
  20. url: '/basicdata/warehouse',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改仓库
  26. export function updateWarehouse(data) {
  27. return request({
  28. url: '/basicdata/warehouse',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 仓库状态修改
  34. export function changeWareStatus(fId, status) {
  35. const data = {
  36. fId,
  37. status
  38. }
  39. return request({
  40. url: '/basicdata/warehouse',
  41. method: 'put',
  42. data: data
  43. })
  44. }
  45. // 删除仓库
  46. export function delWarehouse(fId) {
  47. return request({
  48. url: '/basicdata/warehouse/' + fId,
  49. method: 'delete'
  50. })
  51. }
  52. // 导出仓库
  53. export function exportWarehouse(query) {
  54. return request({
  55. url: '/basicdata/warehouse/export',
  56. method: 'get',
  57. params: query
  58. })
  59. }