refundRecord.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. <template>
  2. <view class="container">
  3. <view class="search-user flex-y-center ">
  4. <view class="search-content flex-y-center">
  5. <icon type="search" size="18" />
  6. <input confirm-type="search" v-model="seTval" @confirm="confirm" @input="getSearch" class="flex-grow-1"
  7. type="text" placeholder-style="font-size:26rpx" placeholder="请输入订单编号" />
  8. <view class="flex-center" style="margin-left: 10rpx;" @click.stop="onDel" v-if="seTval">
  9. <icon type="clear" size="18" />
  10. </view>
  11. </view>
  12. <view class="search-btn" @click="search">
  13. 搜索
  14. </view>
  15. </view>
  16. <view class="box-pack-between headerScreen flex-y-center ">
  17. <view class="flex-y-center flex-grow-1 ft26 header-text">
  18. <view style="width: 50%;" class="flex-grow-1 flex-center " data-text="1" :class="act_index==1?'act':''"
  19. @click="onTopBtnTap(1)">
  20. <view class="text-1" style="width: auto; max-width: 300rpx;">
  21. {{level_text}}
  22. </view>
  23. <view class="d3"></view>
  24. </view>
  25. <view style="width: 50%;" class="flex-grow-1 flex-center text-1" data-text="2"
  26. :class="act_index==2?'act':''" @click="onTopBtnTap(2)">
  27. <view class="text-1" style="width: auto; max-width: 300rpx;">
  28. {{type_text}}
  29. </view>
  30. <view class="d3"></view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="header-hg200"></view>
  35. <uni-popup-top ref="popup" type="top" :top="top" :maskClass="maskClass">
  36. <view class="showpay">
  37. <block v-if='act_index==1'>
  38. <view class="box-li" :class="store_id==0?'active':''" @click="Onlevel(0,'全部')" data-text='全部'>全部
  39. </view>
  40. <scroll-view scroll-y="true" style="height: 400rpx;">
  41. <view class="box-li" v-for="(item,index) of tableTypeList" :key='index'
  42. :class="item.id==store_id?'active':''" @click="Onlevel(item.id,item.title)">
  43. {{item.title}}
  44. </view>
  45. </scroll-view>
  46. </block>
  47. <block v-if='act_index==2'>
  48. <view class="box-li" :class="status==0?'active':''" @click="onStatus(0,'全部')" data-text='全部'>全部
  49. </view>
  50. <view class="box-li" :class="status==1?'active':''" @click="onStatus(1,'微信')" data-text='微信'>微信
  51. </view>
  52. <view class="box-li" :class="status==2?'active':''" @click="onStatus(2,'支付宝')" data-text='支付宝'>支付宝
  53. </view>
  54. </block>
  55. </view>
  56. </uni-popup-top>
  57. <no-none v-if='list.length<=0'></no-none>
  58. <view class="list" v-else>
  59. <view class="item" style="border: none;" v-for="(item,index) in list" :key="index">
  60. <view class="box-pack-between">
  61. <view class="name box-pack-between flex-grow-1">
  62. <text>{{item.order_no}}</text>
  63. <view class="flex-center ft28" style="padding-right: 20rpx;color: #247EFF;">
  64. {{item.pay_type==1?'微信':item.pay_type==2?'支付宝':'银联二维码'}}
  65. </view>
  66. </view>
  67. </view>
  68. <view class="content">
  69. <view class="flex flex-y-center">
  70. <view class="cell flex flex-y-center">
  71. <view class="title">支付金额:</view>
  72. <view class="desc">{{item.pay_price}}</view>
  73. </view>
  74. </view>
  75. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  76. <view class="cell flex flex-y-center " style="width:100%">
  77. <view class="title">退款金额:</view>
  78. <view class="desc">{{item.refund_price}}</view>
  79. </view>
  80. </view>
  81. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  82. <view class="cell flex flex-y-center " style="width:100%">
  83. <view class="title">所属门店:</view>
  84. <view class="desc">{{item.title}}</view>
  85. </view>
  86. </view>
  87. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  88. <view class="cell flex flex-y-center " style="width:100%">
  89. <view class="title">退款时间:</view>
  90. <view class="desc">{{item.pay_time}}</view>
  91. </view>
  92. </view>
  93. <view class="flex flex-y-center" style="margin-top: 16rpx;">
  94. <view class="cell flex flex-y-center " style="width:100%">
  95. <view class="title"> 下单时间:</view>
  96. <view class="desc">{{item.pay_time}}</view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. </template>
  104. <script>
  105. import uniPopupTop from '@/components/zx-uni-popup/uni-popup-top.vue'
  106. export default {
  107. components: {
  108. uniPopupTop
  109. },
  110. data() {
  111. return {
  112. act_index: 1,
  113. type_text: '支付方式',
  114. level_text: '门店',
  115. store_id: "",
  116. admin_id: '',
  117. list: [],
  118. page: 1,
  119. is_bottom: false,
  120. keywords: "",
  121. status: 0,
  122. type: 2,
  123. tableTypeList: [],
  124. top: "200rpx",
  125. maskClass: {
  126. 'position': 'fixed',
  127. 'bottom': 0,
  128. 'top': "100rpx",
  129. 'left': 0,
  130. 'right': 0,
  131. 'backgroundColor': 'rgba(0, 0, 0, 0.4)'
  132. },
  133. }
  134. },
  135. onLoad(e) {
  136. this.type = e.type || 2;
  137. this.store_id = uni.getStorageSync("store_id");
  138. this.admin_id = uni.getStorageSync("admin_id");
  139. this.shop_store_index();
  140. },
  141. onShow() {
  142. this.getData(1)
  143. },
  144. onReachBottom() {
  145. if (!this.is_bottom) {
  146. this.getData(this.page + 1)
  147. }
  148. },
  149. methods: {
  150. shop_store_index() {
  151. let storeinfo = uni.getStorageSync("storeinfo");
  152. this.request({
  153. url: 'Smdcshop/shop_store_index',
  154. data: {
  155. admin_id: this.admin_id,
  156. }
  157. }).then(res => {
  158. if (res.code == 200) {
  159. if (res.data.length > 0) {
  160. this.tableTypeList = res.data;
  161. } else {
  162. this.tableTypeList = [{
  163. title: storeinfo.title,
  164. id: storeinfo.id,
  165. }];
  166. }
  167. }
  168. })
  169. },
  170. onStatus(e, text) {
  171. this.status = e;
  172. this.type_text = text;
  173. this.list = [];
  174. this.getData(1);
  175. this.$refs.popup.close();
  176. },
  177. Onlevel(e, text) {
  178. this.store_id = e;
  179. this.level_text = text;
  180. this.list = [];
  181. this.getData(1);
  182. this.$refs.popup.close();
  183. },
  184. getSearch(e) {
  185. if (!e.detail.value) {
  186. this.page = 1;
  187. this.list = [];
  188. this.keywords = "";
  189. this.getData(1);
  190. }
  191. this.keywords = e.detail.value;
  192. },
  193. onDel() {
  194. this.seTval = '';
  195. this.page = 1;
  196. this.list = [];
  197. this.keywords = "";
  198. this.getData(1);
  199. },
  200. confirm(e) {
  201. this.page = 1;
  202. this.list = [];
  203. this.keywords = e.detail.value;
  204. this.getData(1);
  205. },
  206. search(e) {
  207. this.page = 1;
  208. this.list = [];
  209. this.getData(1);
  210. },
  211. onTopBtnTap(e) {
  212. this.act_index = e;
  213. this.$refs.popup.open();
  214. },
  215. getData(page) {
  216. if (page == 1) {
  217. this.list = []
  218. this.page = 1
  219. this.is_bottom = false
  220. }
  221. this.request({
  222. url: 'Smdcshop/refundLog',
  223. data: {
  224. page,
  225. limit: 10,
  226. pay_type: this.status,
  227. keywords: this.keywords,
  228. admin_id: this.admin_id,
  229. store_id: this.store_id
  230. }
  231. }).then(res => {
  232. if (res.code == 200 && res.data.length) {
  233. this.list = this.list.concat(res.data)
  234. this.page = page
  235. } else {
  236. this.is_bottom = true
  237. }
  238. })
  239. }
  240. }
  241. }
  242. </script>
  243. <style>
  244. @import url("../static/css/common.css");
  245. page {
  246. background-color: #F4F5F7;
  247. }
  248. .list {
  249. padding: 10rpx 25rpx;
  250. }
  251. .list .item {
  252. border-radius: 8rpx;
  253. overflow: hidden;
  254. padding-left: 30rpx;
  255. border-left: 8rpx solid #247EFF;
  256. background-color: #fff;
  257. margin-bottom: 30rpx;
  258. }
  259. .list .item .name {
  260. height: 80rpx;
  261. border-bottom: 1rpx solid #f5f5f5;
  262. font-size: 30rpx;
  263. line-height: 80rpx;
  264. font-weight: bold;
  265. }
  266. .list .item .content {
  267. padding: 20rpx 0 24rpx;
  268. }
  269. .list .item .content .cell {
  270. /* flex: none; */
  271. /* width: 50%; */
  272. box-sizing: border-box;
  273. padding-right: 30rpx;
  274. font-size: 26rpx;
  275. line-height: 37rpx;
  276. color: #666;
  277. }
  278. .list .item .content .cell .title {
  279. color: #99A0AD;
  280. }
  281. .headerScreen {
  282. height: 100rpx;
  283. position: fixed;
  284. top: 100rpx;
  285. width: 100%;
  286. z-index: 999;
  287. background: #fff;
  288. border-bottom: 1rpx solid #F1F1F1;
  289. }
  290. .header-hg200 {
  291. height: 210rpx;
  292. }
  293. .header-text {
  294. text-align: center;
  295. }
  296. .d3 {
  297. width: 0;
  298. height: 0;
  299. border-width: 12rpx;
  300. border-style: solid;
  301. border-color: #000 transparent transparent transparent;
  302. margin-top: 14rpx;
  303. margin-left: 6rpx;
  304. }
  305. .showpay {
  306. width: 100%;
  307. z-index: 10;
  308. background: #FFFFFF;
  309. }
  310. .search-user {
  311. z-index: 999;
  312. position: fixed;
  313. left: 0;
  314. width: 100%;
  315. height: 100rpx;
  316. background: #FFFFFF;
  317. padding-left: 15rpx;
  318. margin: 0;
  319. }
  320. .search-user .search-content {
  321. width: 83%;
  322. height: 70rpx;
  323. background: #F1F1F1;
  324. border-radius: 100rpx;
  325. padding: 0 20rpx;
  326. }
  327. .search-user .search-content icon {
  328. margin-right: 10rpx;
  329. }
  330. .search-user .search-btn {
  331. margin-left: 20rpx;
  332. font-size: 28rpx;
  333. }
  334. .box-li {
  335. background-color: #fff;
  336. text-align: center;
  337. border-bottom: 1rpx solid #f1f1f1;
  338. height: 80rpx;
  339. line-height: 80rpx;
  340. font-size: 26rpx;
  341. }
  342. page .active {
  343. color: #007AFF;
  344. }
  345. </style>