rechargeRecord.vue 10 KB

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