customer.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import {request} from '../utils/request'
  2. //新增客商
  3. export function addCustomer(data){
  4. return request({
  5. url: '/aggregate/platformcompany',
  6. method: 'post',
  7. data:data
  8. })
  9. }
  10. //编辑客商
  11. export function editCustomer(data){
  12. return request({
  13. url: '/aggregate/platformcompany',
  14. method: 'put',
  15. data:data
  16. })
  17. }
  18. //客商列表
  19. export function getCustomerList(data){
  20. return request({
  21. url: '/aggregate/platformcompany/page',
  22. method: 'get',
  23. data:data
  24. })
  25. }
  26. //id获取客商信息
  27. export function getCustomerById(id){
  28. return request({
  29. url: '/aggregate/platformcompany/'+id,
  30. method: 'get',
  31. // data:data
  32. })
  33. }
  34. //获取客商选项
  35. export function getCustomerOption(){
  36. return request({
  37. url: '/aggregate/platformcompany/options',
  38. method: 'get',
  39. // data:data
  40. })
  41. }
  42. //搜索客商选项
  43. export function getCustomerOptionById(id){
  44. return request({
  45. url: '/aggregate/platformcompany/options/'+id,
  46. method: 'get',
  47. // data:data
  48. })
  49. }
  50. //新增物料
  51. export function addMaterial(data){
  52. return request({
  53. url: '/aggregate/platformmaterial',
  54. method: 'post',
  55. data:data
  56. })
  57. }
  58. //编辑物料
  59. export function editMaterial(data){
  60. return request({
  61. url: '/aggregate/platformmaterial',
  62. method: 'put',
  63. data:data
  64. })
  65. }
  66. //物料列表
  67. export function getMaterialList(data){
  68. return request({
  69. url: '/aggregate/platformmaterial/page',
  70. method: 'get',
  71. data:data
  72. })
  73. }
  74. //id获取物料信息
  75. export function getMaterialById(id){
  76. return request({
  77. url: '/aggregate/platformmaterial/'+id,
  78. method: 'get',
  79. // data:data
  80. })
  81. }
  82. //获取物料选项
  83. export function getMaterialOption(){
  84. return request({
  85. url: '/aggregate/platformmaterial/options',
  86. method: 'get',
  87. // data:data
  88. })
  89. }
  90. //搜索物料选项
  91. export function getMaterialOptionById(id){
  92. return request({
  93. url: '/aggregate/platformmaterial/options'+id,
  94. method: 'get',
  95. // data:data
  96. })
  97. }