index.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import request from '@/utils/request';
  2. // 查询待行区列表
  3. export function listDecoctRoute(query) {
  4. const {pageNum, pageSize, ...data} = query;
  5. return request({
  6. url: `/yfc-admin/web/waiting/pageList`,
  7. method: 'post',
  8. data,
  9. params: {pageNum, pageSize},
  10. });
  11. }
  12. export function editDecoctRoute(model) {
  13. if (typeof model.createTime === 'string') model.createTime = model.createTime.replace(' ', 'T');
  14. if (typeof model.updateTime === 'string') model.updateTime = model.updateTime.replace(' ', 'T');
  15. return request({
  16. url: model.id ? `/yfc-admin/web/waiting/update` : `/yfc-admin/web/waiting/add`,
  17. method: 'post',
  18. data: model,
  19. });
  20. }
  21. export function deleteDecoctRoute(model) {
  22. return request({
  23. url: `/yfc-admin/web/waiting/delete/${model.id}`,
  24. method: 'get',
  25. });
  26. }
  27. export function getDecoctRouteOptions() {
  28. return request({
  29. url: `/yfc-admin/web/waiting/list`,
  30. method: 'post',
  31. data: {},
  32. })
  33. }
  34. // 查询煎药区列表
  35. export function listDecoctStation(query) {
  36. const {pageNum, pageSize, ...data} = query;
  37. return request({
  38. url: `/yfc-admin/web/decoction/pageList`,
  39. method: 'post',
  40. data,
  41. params: {pageNum, pageSize},
  42. });
  43. }
  44. export function editDecoctStation(model) {
  45. if (typeof model.createTime === 'string') model.createTime = model.createTime.replace(' ', 'T');
  46. if (typeof model.updateTime === 'string') model.updateTime = model.updateTime.replace(' ', 'T');
  47. return request({
  48. url: model.id ? `/yfc-admin/web/decoction/update` : `/yfc-admin/web/decoction/add`,
  49. method: 'post',
  50. data: model,
  51. });
  52. }
  53. export function deleteDecoctStation(model) {
  54. return request({
  55. url: `/yfc-admin/web/decoction/delete/${model.id}`,
  56. method: 'get',
  57. });
  58. }
  59. export function getDecoctStationOptions() {
  60. return request({
  61. url: `/yfc-admin/web/decoction/list`,
  62. method: 'post',
  63. data: {},
  64. })
  65. }
  66. export function getDecoctOperatorList() {
  67. return request({
  68. url: `/system/user/decoctUserList`,
  69. method: 'get'
  70. })
  71. }
  72. // 查询绑桶记录列表
  73. export function listDecoctBucket(query) {
  74. const {pageNum, pageSize, ...data} = query;
  75. return request({
  76. url: `/yfc-admin/web/decoction/bindBarrelList`,
  77. method: 'post',
  78. data,
  79. params: {pageNum, pageSize},
  80. });
  81. }
  82. export function exportDecoctBucket(query) {
  83. const {pageNum, pageSize, ...data} = query;
  84. return request({
  85. url: `/yfc-admin/web/decoction/bindBarrelExcel`,
  86. method: 'post',
  87. data,
  88. responseType: 'blob',
  89. download: true,
  90. })
  91. }