stock.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import {request} from '../utils/request'
  2. //备件大类树
  3. export function fetchTree(data) {
  4. return request({
  5. url: '/materialkind/tree',
  6. method: 'get',
  7. data:data,
  8. isAddress:true,
  9. })
  10. }
  11. //备件选择框接口
  12. export function getSpareOption(data,key) {
  13. return request({
  14. url: '/stock/material/optionsByFullCode/'+key,
  15. method: 'post',
  16. data:data,
  17. isAddress:true,
  18. })
  19. }
  20. //获取用户列表
  21. export function fetchList(data) {
  22. return request({
  23. url: '/user/page',
  24. method: 'get',
  25. data: data,
  26. isAddress:true,
  27. })
  28. }
  29. //获取部门列表
  30. export function depLtist(data) {
  31. return request({
  32. url: '/dept/list',
  33. method: 'get',
  34. data:data,
  35. isAddress:true,
  36. })
  37. }
  38. //库存查询列表
  39. export function materialLiveList(data) {
  40. return request({
  41. url: '/stock/material/live/page',
  42. method: 'get',
  43. data: data,
  44. isAddress:true,
  45. })
  46. }
  47. //通过存货id获取对应的库存动态
  48. export function getLiveRecordsByMaterialId(data) {
  49. return request({
  50. url: '/stock/material/live/getLiveRecordsByMaterialId',
  51. method: 'post',
  52. data: data,
  53. isAddress:true,
  54. })
  55. }
  56. //盘库保存接口
  57. export function saveInventory(data) {
  58. return request({
  59. url: '/stock/material/live/saveInventory',
  60. method: 'post',
  61. data: data,
  62. isAddress:true,
  63. })
  64. }