logisticsPort.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. define([ 'ngResource' ], function() {
  2. angular.module('logisticsPortService', [ 'ngResource' ]).factory('LogisticsPort', ['$resource', function($resource) {
  3. return $resource('trade/logisticsPort', {}, {
  4. // 邮政新增订单接口3.2
  5. EMSNewOrderMailNo : {
  6. url : 'trade/logisticsPort/newOrderMailNo',
  7. method : 'POST'
  8. },
  9. queryLogistics: {
  10. url : 'trade/logisticsPort/queryLogistics',
  11. method : 'POST'
  12. },
  13. cancelOrder: {
  14. url : 'trade/logisticsPort/cancelOrder',
  15. method : 'POST'
  16. },
  17. getMailNo: {
  18. url : 'trade/logisticsPort/getMailNo',
  19. method : 'POST'
  20. }
  21. });
  22. }]).factory('KdnLogistics', ['$resource', function($resource){
  23. return $resource('trade/kdnLogistics', {}, {
  24. kdnQuery : {
  25. url : 'kdn/logistics/query',
  26. method : 'GET'
  27. },
  28. kdnQueryCompany : {
  29. url : 'kdn/logistics/findCompany/:companyName',
  30. method : 'GET'
  31. },
  32. kdnBooking : {
  33. url : 'kdn/logistics/booking',
  34. method : 'POST'
  35. },
  36. getCompanyName : {
  37. url : 'kdn/logistics/companyName',
  38. method : 'GET',
  39. isArray: true
  40. },
  41. getKdnAndSeller : {
  42. url : 'kdn/logistics/kdnAndSeller',
  43. method : 'GET'
  44. },
  45. findKdnPage : {
  46. url : 'kdn/logistics/page',
  47. method : 'GET'
  48. },
  49. saveSellerLogistics : {
  50. url : 'kdn/logistics/seller/save',
  51. method : 'POST'
  52. },
  53. kdnEOrder: {
  54. url : 'kdn/logistics/eorder',
  55. method : 'POST'
  56. },
  57. kdnLogisticsList: {
  58. url : 'kdn/logistics/list',
  59. method : 'GET'
  60. }
  61. });
  62. }]).factory('Distributor',['$resource', function($resource){
  63. return $resource('trade/distributor', {}, {
  64. saveDistributor : {
  65. url: 'trade/distributor/save',
  66. method: 'POST',
  67. isArray : true
  68. },
  69. deleteOne : {
  70. url: 'trade/distributor/delete/:id',
  71. method: 'PUT'
  72. },
  73. findAllSelected : {
  74. url: 'trade/distributor/selected',
  75. method: 'GET',
  76. isArray : true
  77. }
  78. });
  79. }]).factory('DistributionRule', ['$resource', function ($resource) {
  80. return $resource('trade/distributionRule', {}, {
  81. saveRule : {
  82. url: 'trade/distributionRule/save',
  83. method: 'POST'
  84. },
  85. deleteOne : {
  86. url: 'trade/distributionRule/delete/:id',
  87. method: 'PUT'
  88. },
  89. findAllRule : {
  90. url: 'trade/distributionRule/page',
  91. method: 'GET'
  92. },
  93. findAllRuleName : {
  94. url: 'trade/distributionRule/ruleName',
  95. method: 'GET',
  96. isArray : true
  97. },
  98. findCountOfRule : {
  99. url: 'trade/distributionRule/count',
  100. method: 'GET'
  101. }
  102. })
  103. }]);
  104. });