rechargeRecord.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. <template>
  2. <view class="container">
  3. <view class="box-pack-between recharge_pof flex-y-center ">
  4. <view class="flex-y-center flex-grow-1 ft26 header-text">
  5. <!-- <view class="flex-grow-1 flex-center" data-text="1" :class="act_index==1?'act':''"
  6. @click="onTopBtnTap(1)">
  7. 搜索
  8. <view class="d3"></view>
  9. </view>
  10. -->
  11. <view class="flex-grow-1 flex-center" data-text="3" :class="act_index==1?'act':''"
  12. @click="onTopBtnTap(1)">
  13. 支付方式 <view class="d3"></view>
  14. </view>
  15. <view class="flex-grow-1 flex-center" data-text="4" :class="act_index==2?'act':''"
  16. @click="onTopBtnTap(2)">
  17. 日期查找<view class="d3"></view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="header-hg100">
  22. </view>
  23. <view class="list">
  24. <view class="item" v-for="(item,index) in list" :key="index">
  25. <view class="top flex flex-y-center box-pack-between">
  26. <view class="pay-info flex flex-y-center">
  27. <image :src="item.type == 1?'../../static/images/wx.png':'../../static/images/ali.png'"
  28. class="pay-type-icon"></image>
  29. <view class="pay-status">{{item.type == 1?'微信':'支付宝'}}</view>
  30. </view>
  31. <view class="box-pack-between">
  32. <view class="cell flex flex-y-center">
  33. <view class="desc" style="color:#FEAF44">¥{{item.money}}</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="content" style="border-bottom: 1rpx solid #f1f1f1;">
  38. <view class="cell flex flex-y-center">
  39. <view class="title">订单号:</view>
  40. <view class="desc">
  41. {{item.out_trade_no}}
  42. </view>
  43. </view>
  44. <view class="cell flex flex-y-center">
  45. <view class="title">订单时间 :</view>
  46. <view class="desc">{{item.pay_time}}</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="no-more">
  51. ---没有更多了---
  52. </view>
  53. </view>
  54. <uni-popup-top ref="popup" type="top" :top="top" :maskClass="maskClass">
  55. <view class="showpay">
  56. <block v-if='act_index==1'>
  57. <view class="box-li" :class="pay_type==0?'active':''" @click="payType(0,'全部')" data-text='微信'>全部
  58. </view>
  59. <view class="box-li" :class="pay_type==1?'active':''" @click="payType(1,'微信')" data-text='微信'>微信
  60. </view>
  61. <view class="box-li" :class="pay_type==2?'active':''" @click="payType(2,'支付宝')" data-text='支付宝'>支付宝
  62. </view>
  63. <!-- <view class="box-li" :class="pay_type==3?'active':''" @click="payType(3,'余额支付')" data-text='余额支付'>
  64. 余额支付
  65. </view> -->
  66. </block>
  67. <block v-if='act_index==2'>
  68. <view class="model">
  69. <view class="flex-center model-date box-pack-between">
  70. <view class="model-item" :class="time_index==1?'act':''">
  71. <picker mode='date' :value="start" :start="startDate" :end="endDate"
  72. @change="bindDateChange1" data-index="1">
  73. <view class="flex-center">
  74. <text>{{start}}</text>
  75. </view>
  76. </picker>
  77. </view>
  78. <view class="model-item" :class="time_index==2?'act':''">
  79. <picker mode='date' :value="end" :start="startDate" :end="endDate"
  80. @change="bindDateChange2" data-index="1">
  81. <view class="flex-center">
  82. <text>{{end}}</text>
  83. </view>
  84. </picker>
  85. </view>
  86. </view>
  87. <view class="flex">
  88. <view class="model-btn-close model-btn flex-center" @click="clear">
  89. 清空
  90. </view>
  91. <view class="model-btn-success flex-center model-btn" @click="sure">
  92. 确定
  93. </view>
  94. </view>
  95. </view>
  96. </block>
  97. </view>
  98. </uni-popup-top>
  99. </view>
  100. </template>
  101. <script>
  102. import uniPopupTop from '@/components/zx-uni-popup/uni-popup-top.vue'
  103. export default {
  104. components: {
  105. uniPopupTop
  106. },
  107. data() {
  108. return {
  109. URL: getApp().globalData.URL,
  110. store_id: "",
  111. list: [],
  112. page: 1,
  113. is_bottom: false,
  114. act_index: 1,
  115. time_index: 0,
  116. time_index2: 0,
  117. start: "开始时间",
  118. end: "结束时间",
  119. top: "100rpx",
  120. maskClass: {
  121. 'position': 'fixed',
  122. 'bottom': 0,
  123. 'top': "100rpx",
  124. 'left': 0,
  125. 'right': 0,
  126. 'backgroundColor': 'rgba(0, 0, 0, 0.4)'
  127. },
  128. serch: "",
  129. order_xdtime: "",
  130. pay_type: "",
  131. }
  132. },
  133. onLoad(options) {
  134. this.store_id = uni.getStorageSync("store_id");
  135. this.getData(1);
  136. },
  137. onReachBottom() {
  138. if (!this.is_bottom) {
  139. this.getData(this.page + 1)
  140. }
  141. },
  142. methods: {
  143. // 键盘完成事件
  144. firmSeach(e) {
  145. this.serch = e.detail.value;
  146. this.getData(1);
  147. this.$refs.popup.close();
  148. },
  149. // 监听input
  150. putSeach(e) {
  151. this.serch = e.detail.value;
  152. if (!e.detail.value) {
  153. this.getData(1);
  154. }
  155. },
  156. // 搜索
  157. bindSeach(e) {
  158. this.getData(1);
  159. this.$refs.popup.close();
  160. },
  161. // 支付方式搜索
  162. payType(e) {
  163. this.pay_type = e;
  164. this.getData(1);
  165. this.$refs.popup.close();
  166. },
  167. bindDateChange1(e) {
  168. this.time_index = e.currentTarget.dataset.index;
  169. this.start = e.target.value;
  170. },
  171. bindDateChange2(e) {
  172. this.time_index2 = e.currentTarget.dataset.index;
  173. this.end = e.target.value;
  174. },
  175. sure(e) {
  176. this.getData(1);
  177. this.$refs.popup.close();
  178. },
  179. clear() {
  180. this.start = '开始时间';
  181. this.end = '结束时间';
  182. this.start_text = '日期查找';
  183. this.getData(1);
  184. this.$refs.popup.close();
  185. },
  186. onTopBtnTap(e) {
  187. this.act_index = e;
  188. this.$refs.popup.open();
  189. },
  190. getData(page) {
  191. if (page == 1) {
  192. this.list = []
  193. this.page = 1
  194. this.is_bottom = false
  195. }
  196. this.request({
  197. url: 'Smdcshop/chongzhi_log',
  198. data: {
  199. page,
  200. // serch:this.serch,
  201. // order_xdtime:this.start=='选择时间'?'':this.start,
  202. type: this.pay_type,
  203. limit: 10,
  204. admin_id: uni.getStorageSync("admin_id"),
  205. start_time: this.start == '开始时间' ? '' : this.start,
  206. end_time: this.end == '结束时间' ? '' : this.end,
  207. }
  208. }).then(res => {
  209. if (res.code == 200 && res.data.length) {
  210. this.list = this.list.concat(res.data)
  211. this.page = page
  212. } else {
  213. this.is_bottom = true
  214. }
  215. })
  216. }
  217. },
  218. }
  219. </script>
  220. <style lang="scss">
  221. .search-content {
  222. padding: 20rpx 0;
  223. background: #FFFFFF;
  224. font-size: 28rpx;
  225. .search {
  226. width: 80%;
  227. border: 1rpx solid #F1F1F1;
  228. margin-right: 15rpx;
  229. padding: 10rpx;
  230. border-radius: 4rpx;
  231. icon {
  232. margin-right: 15rpx;
  233. }
  234. }
  235. }
  236. .header-text .act {
  237. color: #FEAF44;
  238. }
  239. .header-text .act .d3 {
  240. border-color: #FEAF44 transparent transparent transparent;
  241. }
  242. .model {
  243. width: 100%;
  244. z-index: 10;
  245. background: #FFFFFF;
  246. padding-bottom: 20rpx;
  247. .model-date {
  248. width: 100%;
  249. padding: 20rpx 40rpx;
  250. border-bottom: 1rpx solid #F1F1F1;
  251. .model-item {
  252. width: 300rpx;
  253. text-align: center;
  254. font-size: 28rpx;
  255. color: #999;
  256. position: relative;
  257. padding: 10rpx 0;
  258. text-align: center;
  259. border-radius: 8rpx;
  260. border: 1rpx solid #999;
  261. }
  262. // .act {
  263. // color: #FFFFFF;
  264. // background: #FFBE2C;
  265. // border: 1rpx solid #FFBE2C;
  266. // }
  267. }
  268. .model-btn {
  269. border-radius: 8rpx;
  270. box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.20);
  271. margin: 0 auto;
  272. margin-top: 20rpx;
  273. text-align: center;
  274. width: 41%;
  275. height: 80rpx;
  276. border-radius: none;
  277. }
  278. .model-btn-close {
  279. border: 1rpx solid #F1F1F1;
  280. color: #000;
  281. }
  282. .model-btn-success {
  283. color: #FFFFFF;
  284. background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
  285. }
  286. }
  287. page {
  288. background-color: #F4F5F7;
  289. }
  290. .showpay .active {
  291. color:#FEAF44;
  292. }
  293. .recharge_pof {
  294. height: 100rpx;
  295. position: fixed;
  296. top: 0;
  297. width: 100%;
  298. z-index: 999;
  299. background: #fff;
  300. }
  301. .header-hg100 {
  302. height: 110rpx;
  303. }
  304. .list {
  305. padding: 0rpx 25rpx 0;
  306. }
  307. .list .item {
  308. background-color: #fff;
  309. border-radius: 8rpx;
  310. overflow: hidden;
  311. padding: 0 25rpx;
  312. margin-bottom: 30rpx;
  313. box-shadow: 0rpx 6rpx 10rpx 0rpx rgba(213, 213, 213, 0.04);
  314. }
  315. .list .item .top {
  316. padding: 20rpx 0;
  317. border-bottom: 1rpx solid #f5f5f5;
  318. }
  319. .list .item .top .pay-info {
  320. flex: none;
  321. }
  322. .list .item .top .pay-type-icon {
  323. display: block;
  324. width: 28rpx;
  325. height: 28rpx;
  326. flex: none;
  327. margin-right: 8rpx;
  328. border-radius: 100px;
  329. }
  330. .list .item .top .pay-status {
  331. font-size: 28rpx;
  332. color: #464646;
  333. }
  334. .list .item .content {
  335. padding: 20rpx 0;
  336. }
  337. .list .content .cell {
  338. margin-bottom: 16rpx;
  339. font-size: 26rpx;
  340. color: #99A0AD;
  341. }
  342. .list .content .cell:last-child {
  343. margin-bottom: 0;
  344. }
  345. .list .content .cell .title {
  346. color: #99A0AD;
  347. }
  348. .list .content .cell .desc {
  349. color: #666;
  350. }
  351. .header-text {
  352. text-align: center;
  353. }
  354. .box-li {
  355. background-color: #fff;
  356. text-align: center;
  357. border-bottom: 1rpx solid #f1f1f1;
  358. height: 80rpx;
  359. line-height: 80rpx;
  360. font-size: 26rpx;
  361. }
  362. .goods_list {
  363. font-size: 28rpx;
  364. }
  365. .goods_list-title {
  366. padding: 20rpx 0;
  367. }
  368. .goods_list-price {
  369. font-size: 26rpx;
  370. color: red;
  371. }
  372. .goods_list-num {
  373. font-size: 26rpx;
  374. }
  375. .d3 {
  376. width: 0;
  377. height: 0;
  378. border-width: 12rpx;
  379. border-style: solid;
  380. border-color: #000 transparent transparent transparent;
  381. margin-top: 14rpx;
  382. }
  383. .avatar-img {
  384. width: 80rpx;
  385. height: 80rpx;
  386. margin-right: 20rpx;
  387. border-radius: 100px;
  388. }
  389. .avatar-title {
  390. font-size: 26rpx;
  391. }
  392. </style>