basic.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. import request from '@/utils/request'
  2. // 获取物料变更单列表
  3. export function getChangeList(params) {
  4. return request({
  5. url: `/material/change/list`,
  6. method: 'get',
  7. params: params
  8. })
  9. }
  10. // 物料变更单新增
  11. export function addChangeList(data) {
  12. return request({
  13. url: `/material/change/add`,
  14. method: 'post',
  15. data: data
  16. })
  17. }
  18. // 物料变更单修改
  19. export function editChangeList(data) {
  20. return request({
  21. url: `/material/change/edit`,
  22. method: 'post',
  23. data: data
  24. })
  25. }
  26. // 物料变更单修改
  27. export function deleteChangeList(data) {
  28. return request({
  29. url: `/material/change/del`,
  30. method: 'post',
  31. data: data
  32. })
  33. }
  34. // 获取物料变更单详情
  35. export function getChangeDetails(id) {
  36. return request({
  37. url: `/material/change/query/${id}`,
  38. method: 'get',
  39. })
  40. }
  41. // 获取物料列表信息
  42. export function getMaterialList(data) {
  43. return request({
  44. url: `/system/material/list?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  45. method: 'post',
  46. data: data
  47. })
  48. }
  49. // 获取物料基本信息详细信息
  50. export function getMaterialDetails(id) {
  51. return request({
  52. url: `/system/material/details/${id}`,
  53. method: 'get',
  54. })
  55. }
  56. // 获取生产厂家列表信息
  57. export function getProductFactory(data) {
  58. return request({
  59. url: `/system/archival/queryManufacturer?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
  60. method: 'post',
  61. data: data
  62. })
  63. }
  64. // 获取生产厂家列表信息
  65. export function getRecordList(params) {
  66. return request({
  67. url: `/material/record/list`,
  68. method: 'get',
  69. params: params
  70. })
  71. }
  72. // 模板下载
  73. export function changeDownload(data) {
  74. return request({
  75. url: `/material/change/download`,
  76. method: 'post',
  77. data: data
  78. })
  79. }
  80. // 导入
  81. export function changeImport(data) {
  82. return request({
  83. url: `/material/change/import`,
  84. method: 'post',
  85. data: data
  86. })
  87. }
  88. // 下载失败导入文件数据
  89. export function downloadFailData(data) {
  90. return request({
  91. url: `/material/change/downloadFailData`,
  92. method: 'post',
  93. data: data,
  94. responseType: 'blob',
  95. })
  96. }
  97. export function toOA(userName, fdId) {
  98. return request({
  99. url: `/oaflow/redirectToOa/${userName}/${fdId}`,
  100. method: 'get',
  101. })
  102. }
  103. // 行模板下载
  104. export function downloadInner(data) {
  105. return request({
  106. url: `/material/change/downloadInner`,
  107. method: 'post',
  108. data: data
  109. })
  110. }
  111. // 行模板下载
  112. export function importInner(data) {
  113. return request({
  114. url: `/material/change/importInner`,
  115. method: 'post',
  116. data: data
  117. })
  118. }