pintuanOrder.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. <template>
  2. <view class="container">
  3. <view class="bgf pof">
  4. <view class="flex-center search-content">
  5. <view class="search flex-y-center" style="margin-bottom: 0;">
  6. <icon type="search" size="16" />
  7. <input placeholder="请输入订单编号搜索" class="flex-grow-1" type="text" value="" @confirm="firmSeach"
  8. @input="putSeach" />
  9. </view>
  10. <text @click="bindSeach">搜索</text>
  11. </view>
  12. <view class="box-pack-between header-hg100 flex-y-center ">
  13. <view class="flex-y-center flex-grow-1 ft26 header-text">
  14. <view class="flex-grow-1 flex-center" data-text="1" :class="act_index==1?'act':''"
  15. @click="onTopBtnTap(1)">
  16. {{collage_id_text}}
  17. <view class="d3" :style="'border-color:'+act_index==1?'#007AFF':''"></view>
  18. </view>
  19. <view class="flex-grow-1 flex-center" data-text="1" :class="act_index==2?'act':''"
  20. @click="onTopBtnTap(2)">
  21. {{order_status_text}}
  22. <view class="d3" :style="'border-color:'+act_index==1?'#007AFF':''"></view>
  23. </view>
  24. <view class="flex-grow-1 flex-center" data-text="3" :class="act_index==3?'act':''"
  25. @click="onTopBtnTap(3)">
  26. {{is_refund_text}}
  27. <view class="d3"></view>
  28. </view>
  29. <view class="flex-grow-1 flex-center" data-text="4" :class="act_index==4?'act':''"
  30. @click="onTopBtnTap(4)">
  31. {{send_type_text}}
  32. <view class="d3"></view>
  33. </view>
  34. <view class="flex-grow-1 flex-center" data-text="5" :class="act_index==5?'act':''"
  35. @click="onTopBtnTap(5)">
  36. {{status_text}}
  37. <view class="d3"></view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="list">
  43. <navigator :url="`/saomaDiancan/order/pintuanOrderDetail?id=${item.id}`" class="item"
  44. v-for="(item,index) in list" :key="index">
  45. <view class="top flex flex-y-center box-pack-between">
  46. <view class="name text-1">{{item.order_no}}</view>
  47. </view>
  48. <view class="content" style="border-bottom: 1rpx solid #f1f1f1;">
  49. <view class="box-pack-between">
  50. <view class="cell flex flex-y-center">
  51. <view class="title">支付金额:</view>
  52. <view class="desc" style="color:red">¥{{item.pay_price}}</view>
  53. </view>
  54. <view class="pay-info flex flex-y-center">
  55. <image
  56. :src="item.pay_type == 1?'../../static/images/wx.png':item.pay_type == 2?'../../static/images/ali.png':'../static/images/yu.png'"
  57. class="pay-type-icon"></image>
  58. <view class="pay-status">{{['待支付','拼团中','拼团成功','拼团失败','已取消'][item.order_status-1]}}
  59. </view>
  60. </view>
  61. </view>
  62. <view class="cell flex flex-y-center">
  63. <view class="title">付款方式:</view>
  64. <view class="desc" style="color:red">
  65. {{['微信','支付宝','余额'][item.pay_type-1]}}
  66. </view>
  67. </view>
  68. <view class="cell flex flex-y-center">
  69. <view class="title">提货方式:</view>
  70. <view class="desc" style="color:red">
  71. {{item.send_types}}
  72. </view>
  73. </view>
  74. <view class="cell flex flex-y-center arr-r">
  75. <view class="title">订单时间 :</view>
  76. <view class="desc">{{item.create_time}}</view>
  77. </view>
  78. </view>
  79. </navigator>
  80. <view class="no-more" v-if="is_bottom">
  81. ---没有更多了---
  82. </view>
  83. </view>
  84. <uni-popup-top ref="popup" type="top" :top="top" :maskClass="maskClass">
  85. <view class="showpay">
  86. <block v-if='act_index==1'>
  87. <view class="box-li" :class="collage_id==''?'active':''" @click="onChangeStatus('collage_id','','活动')" data-type=''
  88. data-text='全部'>全部
  89. </view>
  90. <view class="box-li" :class="collage_id==item.id?'active':''" @click="onChangeStatus('collage_id',item.id,item.name)"
  91. :data-type="item.id" :data-text="item.name" v-for="(item,index) in hdList">{{item.name}}
  92. </view>
  93. </block>
  94. <block v-if='act_index==2'>
  95. <view class="box-li" :class="order_status==''?'active':''" @click="onChangeStatus('order_status','','订单状态')"
  96. data-type='' data-text='全部'>全部
  97. </view>
  98. <view class="box-li" :class="order_status==1?'active':''" @click="onChangeStatus('order_status',1,'待支付')"
  99. data-type='1' data-text='待支付'>待支付
  100. </view>
  101. <view class="box-li" :class="order_status==2?'active':''" @click="onChangeStatus('order_status',2,'拼团中')"
  102. data-type='2' data-text='拼团中'>拼团中
  103. </view>
  104. <view class="box-li" :class="order_status==3?'active':''" @click="onChangeStatus('order_status',3,'拼团成功')"
  105. data-type='3' data-text='拼团成功'>拼团成功
  106. </view>
  107. <view class="box-li" :class="order_status==4?'active':''" @click="onChangeStatus('order_status',4,'拼团失败')"
  108. data-type='4' data-text='拼团失败'>拼团失败
  109. </view>
  110. <view class="box-li" :class="order_status==5?'active':''" @click="onChangeStatus('order_status',5,'已取消')"
  111. data-type='5' data-text='已取消'>已取消
  112. </view>
  113. </block>
  114. <block v-if='act_index==3'>
  115. <view class="box-li" :class="is_refund==''?'active':''" @click="onChangeStatus('is_refund','','退款状态')" data-text='全部'>
  116. 全部
  117. </view>
  118. <view class="box-li" :class="is_refund==1?'active':''" @click="onChangeStatus('is_refund',1,'退款中')" data-text='退款中'>
  119. 退款中
  120. </view>
  121. <view class="box-li" :class="is_refund==2?'active':''" @click="onChangeStatus('is_refund',2,'退款成功')" data-text='退款成功'>
  122. 退款成功
  123. </view>
  124. <view class="box-li" :class="is_refund==3?'active':''" @click="onChangeStatus('is_refund',3,'退款失败')" data-text='退款失败'>
  125. 退款失败
  126. </view>
  127. </block>
  128. <block v-if='act_index==4'>
  129. <view class="box-li" :class="send_type==''?'active':''" @click="onChangeStatus('send_type','','提货方式')" data-text='全部'>
  130. 全部
  131. </view>
  132. <view class="box-li" :class="send_type==1?'active':''" @click="onChangeStatus('send_type',1,'外卖')" data-text='外卖'>外卖
  133. </view>
  134. <view class="box-li" :class="send_type==2?'active':''" @click="onChangeStatus('send_type',2,'自提')" data-text='自提'>自提
  135. </view>
  136. <view class="box-li" :class="send_type==3?'active':''" @click="onChangeStatus('send_type',3,'快递')" data-text='快递'>快递
  137. </view>
  138. </block>
  139. <block v-if='act_index==5'>
  140. <view class="box-li" :class="status==''?'active':''" @click="onChangeStatus('status','','配送状态')" data-text='全部'>
  141. 全部
  142. </view>
  143. <view class="box-li" :class="status==1?'active':''" @click="onChangeStatus('status',1,'待配送')" data-text='待配送'>
  144. 待配送
  145. </view>
  146. <view class="box-li" :class="status==2?'active':''" @click="onChangeStatus('status',2,'已收货')" data-text='已收货'>
  147. 已收货
  148. </view>
  149. <view class="box-li" :class="status==3?'active':''" @click="onChangeStatus('status',3,'已完成')" data-text='已完成'>
  150. 已完成
  151. </view>
  152. </block>
  153. </view>
  154. </uni-popup-top>
  155. </view>
  156. </template>
  157. <script>
  158. import uniPopupTop from '@/components/zx-uni-popup/uni-popup-top.vue'
  159. export default {
  160. components: {
  161. uniPopupTop
  162. },
  163. data() {
  164. return {
  165. hdList: [],
  166. collage_id: '',
  167. order_status: '',
  168. is_refund: '',
  169. send_type: '',
  170. status: '',
  171. URL: getApp().globalData.URL,
  172. admin_id: "",
  173. list: [],
  174. page: 1,
  175. is_bottom: false,
  176. act_index: 1,
  177. top: "200rpx",
  178. maskClass: {
  179. 'position': 'fixed',
  180. 'bottom': 0,
  181. 'top': "100rpx",
  182. 'left': 0,
  183. 'right': 0,
  184. 'backgroundColor': 'rgba(0, 0, 0, 0.4)'
  185. },
  186. collage_id_text: '活动',
  187. order_status_text: '订单状态',
  188. is_refund_text: '退款状态',
  189. send_type_text: '提货方式',
  190. status_text: '配送状态',
  191. }
  192. },
  193. onLoad(options) {
  194. this.admin_id = options.admin_id || uni.getStorageSync('admin_id');
  195. this.getHdList()
  196. this.getData(1);
  197. },
  198. onShow() {
  199. },
  200. onReachBottom() {
  201. if (!this.is_bottom) {
  202. this.getData(this.page + 1)
  203. }
  204. },
  205. methods: {
  206. //活动列表
  207. getHdList() {
  208. //
  209. this.request({
  210. url: 'smdcshop/collage_list',
  211. data: {
  212. admin_id: this.admin_id,
  213. }
  214. }).then(res => {
  215. this.hdList = res.data
  216. })
  217. },
  218. // 键盘完成事件
  219. firmSeach(e) {
  220. this.serch = e.detail.value;
  221. this.getData(1);
  222. this.$refs.popup.close();
  223. },
  224. // 监听input
  225. putSeach(e) {
  226. this.serch = e.detail.value;
  227. if (!e.detail.value) {
  228. this.getData(1);
  229. }
  230. },
  231. // 搜索
  232. bindSeach(e) {
  233. this.getData(1);
  234. this.$refs.popup.close();
  235. },
  236. onChangeStatus(field,val,text){
  237. this[field] = val;
  238. this[`${field}_text`] = text;
  239. this.getData(1);
  240. this.$refs.popup.close();
  241. },
  242. onTopBtnTap(e) {
  243. this.act_index = e;
  244. this.$refs.popup.open();
  245. },
  246. getData(page) {
  247. if (page == 1) {
  248. this.list = []
  249. this.page = 1
  250. this.is_bottom = false
  251. }
  252. this.request({
  253. url: 'smdcshop/collage_orderlist',
  254. data: {
  255. page,
  256. limit: 10,
  257. admin_id: this.admin || uni.getStorageSync('admin_id'),
  258. keywords: this.serch,
  259. collage_id: this.collage_id,
  260. order_status: this.order_status || '',
  261. is_refund: this.is_refund,
  262. send_type: this.send_type,
  263. status: this.status,
  264. }
  265. }).then(res => {
  266. if (res.code == 200 && res.data.length) {
  267. this.list = this.list.concat(res.data)
  268. this.page = page
  269. } else {
  270. this.is_bottom = true
  271. }
  272. })
  273. },
  274. },
  275. }
  276. </script>
  277. <style lang="scss">
  278. .store-name {
  279. max-width: 150rpx;
  280. text-overflow: ellipsis;
  281. white-space: nowrap;
  282. overflow: hidden;
  283. }
  284. .header-text .act {
  285. color: red;
  286. }
  287. .header-text .act .d3 {
  288. border-color: red transparent transparent transparent;
  289. }
  290. .pof {
  291. position: fixed;
  292. left: 0;
  293. z-index: 999;
  294. background: #fff;
  295. width: 100%;
  296. }
  297. .search-content {
  298. width: 100%;
  299. height: 100rpx;
  300. font-size: 28rpx;
  301. top: 0;
  302. .search {
  303. width: 80%;
  304. border: 1rpx solid #F1F1F1;
  305. margin-right: 15rpx;
  306. padding: 10rpx;
  307. border-radius: 50rpx;
  308. icon {
  309. margin-right: 15rpx;
  310. }
  311. }
  312. }
  313. .model {
  314. width: 100%;
  315. z-index: 10;
  316. background: #FFFFFF;
  317. padding-bottom: 20rpx;
  318. .model-date {
  319. width: 100%;
  320. padding: 20rpx 80rpx;
  321. border-bottom: 1rpx solid #F1F1F1;
  322. .model-item {
  323. width: 270rpx;
  324. text-align: center;
  325. font-size: 28rpx;
  326. color: #999;
  327. position: relative;
  328. padding: 10rpx 0;
  329. text-align: center;
  330. border-radius: 8rpx;
  331. border: 1rpx solid #999;
  332. }
  333. .act {
  334. // color: #FFFFFF;
  335. // background: #FFBE2C;
  336. // border: 1rpx solid #FFBE2C;
  337. }
  338. }
  339. .model-btn {
  340. border-radius: 8rpx;
  341. box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.20);
  342. margin: 0 auto;
  343. margin-top: 20rpx;
  344. text-align: center;
  345. width: 41%;
  346. height: 80rpx;
  347. border-radius: none;
  348. }
  349. .model-btn-close {
  350. border: 1rpx solid #F1F1F1;
  351. color: #000;
  352. }
  353. .model-btn-success {
  354. color: #FFFFFF;
  355. background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
  356. }
  357. }
  358. page {
  359. background-color: #F4F5F7;
  360. }
  361. .showpay .active {
  362. color: red
  363. }
  364. .header-hg100 {
  365. height: 100rpx;
  366. top: 100rpx;
  367. width: 100%;
  368. }
  369. .list {
  370. padding: 210rpx 25rpx 0;
  371. }
  372. .list .item {
  373. background-color: #fff;
  374. border-radius: 8rpx;
  375. overflow: hidden;
  376. padding: 0 25rpx;
  377. margin-bottom: 30rpx;
  378. box-shadow: 0rpx 6rpx 10rpx 0rpx rgba(213, 213, 213, 0.04);
  379. }
  380. .list .item .top {
  381. height: 80rpx;
  382. border-bottom: 1rpx solid #f5f5f5;
  383. }
  384. .list .item .top .pay-info {
  385. flex: none;
  386. }
  387. .pay-type-icon {
  388. display: block;
  389. width: 28rpx;
  390. height: 28rpx;
  391. flex: none;
  392. margin-right: 8rpx;
  393. }
  394. .pay-status {
  395. font-size: 28rpx;
  396. color: #464646;
  397. }
  398. .list .item .content {
  399. padding: 20rpx 0;
  400. }
  401. .list .content .cell {
  402. margin-bottom: 16rpx;
  403. font-size: 26rpx;
  404. color: #99A0AD;
  405. }
  406. .list .content .cell:last-child {
  407. margin-bottom: 0;
  408. }
  409. .list .content .cell .title {
  410. color: #99A0AD;
  411. }
  412. .list .content .cell .desc {
  413. color: #666;
  414. }
  415. .qc-btn {
  416. background-color: #3387FF;
  417. color: #fff;
  418. border-radius: 6rpx;
  419. height: 48rpx;
  420. line-height: 48rpx;
  421. padding: 0 20rpx;
  422. margin-left: 10rpx;
  423. }
  424. .header-text {
  425. text-align: center;
  426. }
  427. .box-li {
  428. background-color: #fff;
  429. text-align: center;
  430. border-bottom: 1rpx solid #f1f1f1;
  431. height: 80rpx;
  432. line-height: 80rpx;
  433. font-size: 26rpx;
  434. }
  435. .goods_list {
  436. font-size: 28rpx;
  437. }
  438. .goods_list-title {
  439. padding: 20rpx 0;
  440. }
  441. .goods_list-price {
  442. font-size: 26rpx;
  443. color: red;
  444. }
  445. .goods_list-num {
  446. font-size: 26rpx;
  447. }
  448. .d3 {
  449. width: 0;
  450. height: 0;
  451. border-width: 12rpx;
  452. border-style: solid;
  453. border-color: #000 transparent transparent transparent;
  454. margin-top: 14rpx;
  455. margin-left: 6rpx;
  456. }
  457. </style>