orderList_body.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <title>订单内容</title>
  8. <link rel="stylesheet" type="text/css" href="./css/api.css" />
  9. <link rel="stylesheet" type="text/css" href="./css/style1.css" />
  10. <script type="text/javascript" src="./js/auto-size.js"></script>
  11. <style>
  12. ul {
  13. -webkit-margin-before: 1em;
  14. -webkit-margin-after: 1em;
  15. -webkit-margin-start: 0px;
  16. -webkit-margin-end: 0px;
  17. -webkit-padding-start: 0px;
  18. }
  19. p {
  20. display: block;
  21. -webkit-margin-before: 0em;
  22. -webkit-margin-after: 0em;
  23. -webkit-margin-start: 0px;
  24. -webkit-margin-end: 0px;
  25. }
  26. li {
  27. list-style-type: none;
  28. }
  29. .empty {
  30. width: 96%;
  31. height: auto;
  32. /*background: rgba(255, 255, 255, 1);*/
  33. box-shadow: 0px 6px 24px 0px rgba(0, 0, 0, 0.1);
  34. border-radius: 20px;
  35. margin: 0 auto;
  36. margin-top: .2rem;
  37. }
  38. .empty>div:nth-child(1) {
  39. width: 92%;
  40. margin: 0 auto;
  41. padding-top: .5rem;
  42. }
  43. .empty>div:nth-child(1)>div:nth-child(1) {
  44. width: .2rem;
  45. height: .8rem;
  46. background: rgba(246, 207, 25, 1);
  47. float: left;
  48. margin-left: -.41rem;
  49. }
  50. .empty>div:nth-child(1)>div:nth-child(2) {
  51. font-size: .42rem
  52. }
  53. .empty>div:nth-child(1)>div:nth-child(3) {
  54. float: right;
  55. width: 2.6rem;
  56. height: .8rem;
  57. background: rgba(246, 207, 25, 1);
  58. border-radius: 20px 0px 0px 20px;
  59. margin-top: -.7rem;
  60. margin-right: -.41rem;
  61. text-align: center;
  62. line-height: .8rem;
  63. ;
  64. color: #fff;
  65. }
  66. .empty>div:nth-child(2) {
  67. width: 92%;
  68. margin: 0 auto;
  69. padding-top: .2rem;
  70. border-top: .02rem solid #E7E8EA;
  71. margin-top: .6rem;
  72. }
  73. .empty>div:nth-child(2)>p {
  74. font-size: .48rem;
  75. margin-bottom: .2rem;
  76. }
  77. .empty>div:nth-child(2)>ul>li {
  78. font-size: .42rem;
  79. }
  80. .empty>div:nth-child(2)>ul>li:nth-child(1) {
  81. float: left;
  82. }
  83. .empty>div:nth-child(2)>ul>li:nth-child(2) {
  84. float: right;
  85. }
  86. .empty>div:nth-child(2)>ul>li:nth-child(3) {
  87. padding-top: 1rem;
  88. }
  89. .empty>div:nth-child(3) {
  90. width: 92%;
  91. margin: 0 auto;
  92. margin-top: .2rem;
  93. border-top: .02rem solid #E7E8EA;
  94. padding-top: .4rem;
  95. }
  96. .empty>div:nth-child(3) {
  97. display: flex;
  98. justify-content: space-between;
  99. padding-bottom: .2rem;
  100. }
  101. .empty>div:nth-child(3)>div:nth-child(1) {
  102. line-height: .9rem;
  103. color: #616266;
  104. }
  105. .empty>div:nth-child(3)>div:nth-child(2) {
  106. font-size: .56rem;
  107. color: #303133;
  108. }
  109. .auditBtn {
  110. display: flex;
  111. margin-bottom: .1rem;
  112. }
  113. .auditBtn div:nth-child(1) {
  114. background-color: #999;
  115. color: #FFFFFF;
  116. font-size: .4rem;
  117. padding: .2rem .3rem;
  118. border-radius: .2rem;
  119. }
  120. .auditBtn div:nth-child(2) {
  121. background-color: #0096df;
  122. color: #FFFFFF;
  123. font-size: .4rem;
  124. padding: .2rem .3rem;
  125. border-radius: .2rem;
  126. margin-left: .2rem;
  127. }
  128. </style>
  129. </head>
  130. <body>
  131. <div id="mescroll" style="position : fixed;height : 100%;overflow-y:scroll;width:98%" >
  132. <!-- <div id="mescroll"> -->
  133. <div class="empty" v-for="(order,index) in list" v-on:click="lookOrderInfo(order.id)">
  134. <div>
  135. <div></div>
  136. <div>
  137. <samp>订单:</samp><samp>{{ order.orderNum }}</samp>
  138. </div>
  139. <div>
  140. <span>{{ order.agentAuditStatus | judgeStatus(order.status) }}</span><img src="" alt="">
  141. </div>
  142. </div>
  143. <div>
  144. <p>
  145. {{ order.shopName }}
  146. </p>
  147. <ul>
  148. <li>
  149. 联系电话:<span>{{ order.bizStoreBasicInfoDto.storePhone }}</span>
  150. </li>
  151. <li>
  152. 条数:<span>{{ order.amount }}</span>条
  153. </li>
  154. <li>
  155. 提交时间:<span>{{ order.createTime }}</span>
  156. </li>
  157. </ul>
  158. </div>
  159. <div>
  160. <!-- <div>
  161. <p>
  162. 等待中:<span>暂无数据</span>
  163. </p>
  164. </div> -->
  165. <div class="auditBtn" v-show="order.status == 0">
  166. <div v-on:click.stop="handleOrder(0,order.id,index)">拒绝</div>
  167. <div v-on:click.stop="handleOrder(1,order.id,index)">同意</div>
  168. </div>
  169. </div>
  170. </div>
  171. <div v-show="list.length == 0" style="text-align:center">
  172. <img src="./image/nodata.png" style="margin:2rem auto;width:100%;height :100%" />
  173. </div>
  174. <!-- </div> -->
  175. </div>
  176. </body>
  177. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  178. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  179. <script type="text/javascript" src="../script/vue.js"></script>
  180. <script type="text/javascript" src="../script/api.js"></script>
  181. <script type="text/javascript" src="../script/httpRequest.js"></script>
  182. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  183. <script type="text/javascript">
  184. apiready = function() {
  185. new Vue({
  186. el: '#mescroll',
  187. data: {
  188. list: [],
  189. kunnr: '',
  190. current: 1,
  191. size: 10, // 订单状态 0,新创建,1已接单,2,驳回,3完成 经销商审核 0 待审核 1 同意 2 拒绝
  192. frist : 1,
  193. },
  194. filters: {
  195. judgeStatus: function(auditStatus, status) {
  196. return ["待接单", "已接单", "已驳回", "已完成"][status];
  197. }
  198. },
  199. mounted: function() {
  200. this.init();
  201. },
  202. methods: {
  203. init: function() {
  204. var _this = this;
  205. this.kunnr = $api.getStorage('kunnr');
  206. this.getOrderList();
  207. this.addEvent('refushiew',function(){
  208. _this.getOrderList();
  209. })
  210. },
  211. configs : function(){
  212. var _this = this;
  213. this.frist = 2;
  214. this.configDownAndPull("mescroll", function(mescroll) {
  215. _this.current = 1;
  216. _this.getOrderList(mescroll);
  217. }, function(mescroll) {
  218. if (_this.current < _this.totalPages) {
  219. _this.current = _this.current + 1;
  220. _this.getOrderList(mescroll, 1);
  221. } else {
  222. mescroll.endSuccess(_this.size, false);
  223. }
  224. })
  225. },
  226. getOrderList: function(mescroll) {
  227. var params = {
  228. agentCode: this.kunnr,
  229. current : this.current,
  230. size : this.size,
  231. url: 'json',
  232. type: 'body'
  233. },
  234. _this = this;
  235. console.log(JSON.stringify(params));
  236. this.$post('getStoreOrderListUrl', params, function(ret) {
  237. if (ret.code == 0 || ret.code == '0') {
  238. _this.totalPages = ret.data.pages;
  239. _this.list = _this.current == 1 ? ret.data.records : _this.list.concat(ret.data.records);
  240. if (mescroll) {
  241. mescroll.endSuccess(_this.size, true);
  242. }
  243. if(_this.frist == 1){
  244. _this.$nextTick(function(){
  245. _this.configs();
  246. })
  247. }
  248. }
  249. });
  250. },
  251. // 处理订单操作handerOrderUrl
  252. handleOrder: function(type, id, index) {
  253. var data = {
  254. "id": id.toString(),
  255. "agentAuditStatus": type == 0 ? '2' : '1',
  256. "type": "body",
  257. "url": "json"
  258. },
  259. _this = this;
  260. this.$post('handerOrderUrl', data, function(ret) {
  261. if (ret.code == 0 || ret.code == '0') {
  262. api.toast({
  263. msg: ret.msg
  264. });
  265. setTimeout(function() {
  266. _this.$set(_this.list[index], "status", (type == 0 ? '2' : '1'));
  267. }, 200);
  268. }
  269. });
  270. },
  271. // 查看订单详情
  272. lookOrderInfo: function(orderId) {
  273. this.goWin('orderInfo_win', 'orderInfo_win.html', {
  274. id: orderId
  275. });
  276. }
  277. }
  278. })
  279. }
  280. </script>
  281. </html>