orderInfo_body.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
  12. <link rel="stylesheet" type="text/css" href="css/iconfont.css">
  13. <link rel="stylesheet" type="text/css" href="css/main.css" />
  14. <script src="js/vue.js"></script>
  15. <script src="js/vant-ui.js"></script>
  16. <script src="js/main.js"></script>
  17. <title></title>
  18. </head>
  19. <style>
  20. .dingdangenzong .dingdanSearch {
  21. top : 0.5rem
  22. }
  23. .dingdangenzong {
  24. padding-top : 1.6rem;
  25. }
  26. .auditBtn {
  27. display: flex;
  28. display: -webkit-flex;
  29. position: fixed;
  30. width: 100%;
  31. height: 1rem;
  32. bottom: 0;
  33. left: 0;
  34. }
  35. .auditBtn div {
  36. flex: 1;
  37. font-size: 0.3rem;
  38. text-align: center;
  39. line-height: 1rem;
  40. color: #fff;
  41. }
  42. </style>
  43. <body>
  44. <div id="app">
  45. <div class="pageView dingdanxiangqing">
  46. <ul>
  47. <li class="flex col" v-for="order in orderInfo">
  48. <!-- <div class="chuxiao"></div> -->
  49. <div class="title flex jlr a-center">{{ order.maktx }}</div>
  50. <div class="center flex a-center">
  51. <p>{{ order.brand }}</p>
  52. <p>{{ order.spec }}</p>
  53. <p>{{ order.pattern }}</p>
  54. </div>
  55. <div class="bottom flex a-center j-end">
  56. 共 {{ order.qty }} 条
  57. </div>
  58. </li>
  59. </ul>
  60. <div class="auditBtn" v-if="orderInfo[0].status == 0">
  61. <div style="background-color:#999" v-on:click.stop="handleOrder(0)">拒绝</div>
  62. <div style="background-color:#0096df" v-on:click.stop="handleOrder(1)">同意</div>
  63. </div>
  64. </div>
  65. </div>
  66. </body>
  67. <script type="text/javascript" src="../script/api.js"></script>
  68. <script type="text/javascript" src="../script/httpRequest.js"></script>
  69. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  70. <script type="text/javascript">
  71. apiready = function(){
  72. var id = api.pageParam.id;
  73. new Vue({
  74. el: '#app',
  75. data: {
  76. list:[],
  77. id : id,
  78. userId : '',
  79. orderInfo : [
  80. {status:1}
  81. ],
  82. },
  83. methods : {
  84. /**
  85. * 配置页面
  86. */
  87. init : function(){
  88. this.userId = $api.getStorage('loginid');
  89. this.getOrderInfo();
  90. },
  91. /**
  92. * 获取订单详情
  93. */
  94. getOrderInfo : function(){
  95. var data = {
  96. "orderId": this.id,
  97. "url" : "json",
  98. "type" : "body"
  99. },_this = this,url = "getOrderInfoU";
  100. this.$post(url,data,function(ret){
  101. if(ret.code == 0 || ret.code == '0'){
  102. _this.orderInfo = ret.data;
  103. }
  104. })
  105. },
  106. // 处理订单操作handerOrderUrl
  107. handleOrder: function(type) {
  108. var data = {
  109. "id": this.id,
  110. "agentAuditStatus": type == 0 ? '2' : '1',
  111. "type": "body",
  112. "url": "json"
  113. },
  114. _this = this;
  115. this.$post('handerOrderUrl', data, function(ret) {
  116. if (ret.code == 0 || ret.code == '0') {
  117. api.toast({
  118. msg: ret.msg
  119. });
  120. setTimeout(function() {
  121. _this.sendEvent('refushiew');
  122. _this.getOrderInfo();
  123. }, 200);
  124. }
  125. });
  126. },
  127. },
  128. mounted : function(){
  129. this.init();
  130. }
  131. })
  132. }
  133. </script>
  134. </html>