backMoney_body.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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. .youhuijuan {
  21. padding-top: 0.86rem;
  22. }
  23. .scan {
  24. position: absolute;
  25. right: 0.2rem;
  26. top: 0.2rem;
  27. width: 0.5rem;
  28. height: 0.5rem;
  29. }
  30. </style>
  31. <body>
  32. <div id="app" v-cloak>
  33. <div class="pageView youhuijuan mescroll-touch-y mescroll" id="mescroll">
  34. <div class="title flex jlr a-center" style="top:0rem;z-index:22;padding-top : 0.2rem;padding-bottom:0.1rem;background-color:#fff">
  35. <div class="item flex a-center j-center" v-for="status in statuses" v-bind:class="chooseStatusData.code == status.code ? 'on' : ''" v-on:click="chooseStatus(status)">{{ status.name }}</div>
  36. </div>
  37. <ul>
  38. <div v-for="(item,index) in list" :key="index">
  39. <li class="flex a-center">
  40. <div class="youhuiLeft flex a-center j-center">
  41. <div class="flex a-end j-center">
  42. <em>¥</em>
  43. <h2>{{ item.amount }}</h2>
  44. </div>
  45. </div>
  46. <div class="youhuiInfos flex col">
  47. <img src="./image/scan.png" class="scan" v-on:click="createCode(item.couponCode)" />
  48. <div class="infos">
  49. <h2>{{ item.statusName }}</h2>
  50. <span>{{ item.couponCode }}</span>
  51. </div>
  52. <div class="bottom flex a-center jlr" @click="showInfo(index)">
  53. <span>详细信息</span>
  54. <div class="circle flex a-center j-center"><svg t="1589209216514" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4491" width="12" height="12"><path d="M511.700683 639.423111 191.917496 319.596945 319.830771 319.596945 511.700683 511.715521 703.570595 319.596945 831.48387 319.596945Z" p-id="4492" fill="#ffffff"></path></svg></div>
  55. </div>
  56. </div>
  57. </li>
  58. <div class="youhuiFooterss" v-if="item.state">
  59. <h4>金额:{{ item.amount }}</h4>
  60. <div class="item flex">
  61. <p>创建时间: {{ item.createTime }}</p>
  62. <p>审核时间: {{ item.auditStatus }}</p>
  63. </div>
  64. <div class="item flex">
  65. <p>使用时间:{{ item.useTime }}</p>
  66. <!-- <p>入库码: A93989895393</p> -->
  67. </div>
  68. </div>
  69. </div>
  70. <div v-show="list.length == 0" style="text-align:center">
  71. <img src="./image/noData.png" style="margin:2rem auto" />
  72. </div>
  73. <div v-show="list.length > 0 && hasOther" style="width:100%;padding : 0.5rem;text-align : center;font-size : 0.3rem">暂无更多数据</div>
  74. </ul>
  75. <van-popup v-model="show" style="width:80%;padding-bottom : 0.2rem;text-align:center;padding : 0.1rem">
  76. <div id="qrcode"></div>
  77. </van-popup>
  78. </div>
  79. </div>
  80. </body>
  81. <link rel="stylesheet" href="./mescroll/mescroll.min.css">
  82. <script type="text/javascript" src="./js/qrcode.min.js"></script>
  83. <script type="text/javascript" src="../script/aui-scroll.js"></script>
  84. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  85. <script type="text/javascript" src="../script/api.js"></script>
  86. <script type="text/javascript" src="../script/httpRequest.js"></script>
  87. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  88. <script type="text/javascript">
  89. apiready = function() {
  90. new Vue({
  91. el: '#app',
  92. data: {
  93. list: [],
  94. userId: '',
  95. page: 1,
  96. size: 10,
  97. frist: 1,
  98. show: false,
  99. qrcode: '',
  100. hasOther : false,
  101. statuses : [{
  102. name : '待审核',
  103. code : '0'
  104. },{
  105. name : '已审核',
  106. code : '4'
  107. },{
  108. name : '已过期',
  109. code : '3'
  110. }],
  111. chooseStatusData : {name : '待审核',code : '0'}
  112. },
  113. methods: {
  114. init: function() {
  115. this.userId = $api.getStorage('userid');
  116. this.getHxList();
  117. },
  118. configs: function() {
  119. var _this = this;
  120. this.frist = 2;
  121. this.configDownAndPull("mescroll", function(mescroll) {
  122. _this.current = 1;
  123. _this.mescroll = mescroll;
  124. _this.getHxList(mescroll);
  125. }, function(mescroll) {
  126. if (_this.current < _this.totalPages) {
  127. _this.current = _this.current + 1;
  128. _this.getHxList(mescroll, 1);
  129. } else {
  130. mescroll.endSuccess(_this.size, false);
  131. }
  132. })
  133. },
  134. addMore: function() {
  135. var _this = this;
  136. if (_this.current < _this.totalPages) {
  137. _this.current = _this.current + 1;
  138. _this.getHxList(_this.mescroll, 1);
  139. } else {
  140. _this.hasOther = true;
  141. }
  142. },
  143. /**
  144. * 获取门店核销码列表
  145. */
  146. getHxList: function(mescroll) {
  147. var url = "getHxListU",
  148. _this = this;
  149. var data = {
  150. storeId: this.userId,
  151. status : this.chooseStatusData.code,
  152. url: "json",
  153. type: 'body'
  154. }
  155. this.$post(url, data, function(ret) {
  156. if (ret.code == 0 || ret.code == '0') {
  157. _this.totalPages = ret.data.pages;
  158. _this.list = _this.page == 1 ? ret.data.records : _this.list.concat(ret.data.records);
  159. if (mescroll) {
  160. mescroll.endSuccess(_this.size, true);
  161. }
  162. if (_this.frist == 1) {
  163. _this.$nextTick(function() {
  164. _this.configs();
  165. })
  166. }
  167. }
  168. })
  169. },
  170. /**
  171. * 配置上拉加载下拉刷新
  172. */
  173. // configs: function() {
  174. // var _this = this;
  175. // this.frist = 2;
  176. // this.configDownAndPull("mescroll", function(mescroll) {
  177. // _this.hasOther = false;
  178. // _this.page = 1;
  179. // _this.getHxList(mescroll);
  180. // }, function(mescroll) {
  181. // if (_this.page < _this.totalPages) {
  182. // _this.page = _this.page + 1;
  183. // _this.getHxList(mescroll, 1);
  184. // } else {
  185. // mescroll.endSuccess(_this.size, false);
  186. // }
  187. // },false);
  188. // this.configBottomRefush(function(){
  189. // if (_this.page < _this.totalPages) {
  190. // _this.page = _this.page + 1;
  191. // _this.getHxList(mescroll, 1);
  192. // } else {
  193. // // mescroll.endSuccess(_this.size, false);
  194. // _this.hasOther = true;
  195. // }
  196. // })
  197. // },
  198. // 展示详细信息
  199. showInfo: function(index) {
  200. this.$set(this.list[index], "state", (this.list[index].state == true ? false : true));
  201. },
  202. // 生成二维码
  203. createCode: function(code) {
  204. this.show = true;
  205. var _this = this;
  206. if (this.qrcode != '') {
  207. document.getElementById("qrcode").innerHTML = "";
  208. }
  209. this.$nextTick(function() {
  210. _this.qrcode = new QRCode(document.getElementById("qrcode"), code);
  211. })
  212. },
  213. // 选择状态
  214. chooseStatus : function(status){
  215. this.chooseStatusData = status;
  216. this.getHxList();
  217. }
  218. },
  219. mounted: function() {
  220. this.init();
  221. }
  222. })
  223. }
  224. </script>
  225. </html>