.order.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "order_no",
  5. "!owner",
  6. "principal",
  7. "!client",
  8. "treaty",
  9. "item",
  10. "route",
  11. "rq_send_time",
  12. "send_time",
  13. "rq_arrive_time",
  14. "arrive_time",
  15. "pre_money",
  16. "goods",
  17. "split",
  18. "in_bill",
  19. "out_bill",
  20. "is_js",
  21. "goods_status",
  22. "status",
  23. "remark",
  24. ],
  25. },
  26. destroy: {
  27. params: ["!id"],
  28. service: "delete",
  29. },
  30. update: {
  31. params: ["!id"],
  32. requestBody: [
  33. "order_no",
  34. "!owner",
  35. "principal",
  36. "!client",
  37. "treaty",
  38. "item",
  39. "route",
  40. "rq_send_time",
  41. "send_time",
  42. "rq_arrive_time",
  43. "arrive_time",
  44. "pre_money",
  45. "goods",
  46. "split",
  47. "in_bill",
  48. "out_bill",
  49. "is_js",
  50. "goods_status",
  51. "status",
  52. "remark",
  53. ],
  54. },
  55. show: {
  56. parameters: {
  57. params: ["!id"],
  58. },
  59. service: "fetch",
  60. },
  61. index: {
  62. parameters: {
  63. query: {
  64. order_no: "%order_no%",
  65. owner: "owner",
  66. principal: "principal",
  67. client: "client",
  68. treaty: "treaty",
  69. item: "item",
  70. route: "route",
  71. goods_remark: "%goods.remark%",
  72. "rq_send_time@start": "rq_send_time@start",
  73. "rq_send_time@end": "rq_send_time@end",
  74. "rq_arrive_time@start": "rq_arrive_time@start",
  75. is_js: "is_js",
  76. status: "status",
  77. },
  78. },
  79. service: "query",
  80. options: {
  81. query: ["skip", "limit"],
  82. sort: ["meta.createdAt"],
  83. desc: true,
  84. count: true,
  85. },
  86. },
  87. clientCalculate: {
  88. parameters: {
  89. query: {
  90. order_no: "%order_no%",
  91. owner: "owner",
  92. principal: "principal",
  93. client: "client",
  94. treaty: "treaty",
  95. item: "item",
  96. route: "route",
  97. "rq_send_time@start": "rq_send_time@start",
  98. "rq_send_time@end": "rq_send_time@end",
  99. "rq_arrive_time@start": "rq_arrive_time@start",
  100. "date@start": "create_time@start",
  101. "date@end": "create_time@end",
  102. is_js: "is_js",
  103. status: "status",
  104. },
  105. },
  106. service: "clientCalculate",
  107. options: {
  108. query: ["skip", "limit"],
  109. sort: ["meta.createdAt"],
  110. desc: true,
  111. count: true,
  112. },
  113. },
  114. toTransport: {
  115. parameters: {
  116. query: {
  117. order_no: "%order_no%",
  118. owner: "owner",
  119. principal: "principal",
  120. client: "client",
  121. treaty: "treaty",
  122. item: "item",
  123. route: "route",
  124. "rq_send_time@start": "rq_send_time@start",
  125. "rq_send_time@end": "rq_send_time@end",
  126. "rq_arrive_time@start": "rq_arrive_time@start",
  127. is_js: "is_js",
  128. status: "status",
  129. },
  130. options: {
  131. "split.status": 0, // 只显含有未发货物的订单
  132. },
  133. },
  134. service: "query",
  135. options: {
  136. query: ["skip", "limit"],
  137. sort: ["meta.createdAt"],
  138. desc: true,
  139. count: true,
  140. },
  141. },
  142. };