miaoshaOrder.vue 11 KB

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