storageAcceptanceInspect.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import request from "@/utils/request"
  2. export const getList = (query) => {
  3. return request.get({
  4. url: '/client/c/grainReserveInspection/page',
  5. data: query,
  6. })
  7. }
  8. export const add = (data) => {
  9. return request.post({
  10. url: '/client/c/grainReserveInspection/add',
  11. data: data,
  12. })
  13. }
  14. export const update = (data) => {
  15. return request.post({
  16. url: '/client/c/grainReserveInspection/edit',
  17. data: data,
  18. })
  19. }
  20. export const remove = (id) => {
  21. const data = [{id}]
  22. return request.post({
  23. url: '/client/c/grainReserveInspection/delete',
  24. data: data,
  25. })
  26. }
  27. export const getDetail = (id) => {
  28. const query = {id}
  29. return request.get({
  30. url: '/client/c/grainReserveInspection/detail',
  31. data: query,
  32. })
  33. }
  34. export const getOrgInfoOnly = () => {
  35. return request.get({
  36. url: '/client/c/grainReserveInspection/getOrgInfoOnly',
  37. })
  38. }
  39. export const getStorehouseOrWarehouse = (orgId, storeHouseId) => {
  40. const query = {}
  41. if(storeHouseId) {
  42. query.orgId = orgId
  43. query.storeHouseId = storeHouseId
  44. }
  45. return request.get({
  46. url: `/client/c/grainReserveInspection/getStorehouseOrWarehouse/${orgId}`,
  47. data: query
  48. })
  49. }
  50. export const getCd = (orgId, houseId, wareId) => {
  51. return request.get({
  52. url: `/client/c/grainReserveInspection/getCd/${orgId}/${houseId}/${wareId}`,
  53. })
  54. }