logs.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. <template>
  2. <block>
  3. <scroll-view class="scrollView" :scroll-x="true" style="width: 100%">
  4. <view class="navs">
  5. <text :class="'nav ' + (nowIndex == index ? 'bold' : '')" @tap="navChange" :data-index="index" :data-id="item.id" v-for="(item, index) in navs" :key="index">
  6. {{ item.name }}
  7. </text>
  8. <text class="borderLine" :style="'width: ' + (width + 'rpx') + ';left: ' + (45 + nowIndex * 150 + 'rpx')"></text>
  9. </view>
  10. </scroll-view>
  11. <view class="content" v-if="list.length > 0">
  12. <view
  13. class="lists"
  14. @tap="toPage"
  15. :data-order_id="item.id"
  16. data-url="/pages/operate/order_detail/order_detail"
  17. :data-index="index"
  18. v-for="(item, index) in list"
  19. :key="index"
  20. >
  21. <!-- <view class="iflexC">
  22. <text style="letter-spacing: 0px">订单编号: {{item.order_no}}</text>
  23. <text class="lists-time">下单时间: {{item.create_time}}</text>
  24. </view> -->
  25. <text class="lists-status" v-if="item.order_status == 0 && item.receive_type == 2">待发货</text>
  26. <text class="lists-status" v-if="item.order_status == 0 && item.receive_type == 1">待核销</text>
  27. <text class="lists-status" v-else-if="item.order_status == 1">审核通过</text>
  28. <text class="lists-status" v-else-if="item.order_status == 2">已退款</text>
  29. <text class="lists-status" v-else-if="item.order_status == 3">拒绝退款</text>
  30. <text class="lists-status" v-else-if="item.order_status == 4">已核销</text>
  31. <text class="lists-status" v-else-if="item.order_status == 5">已发货</text>
  32. <text class="lists-status" v-else-if="item.order_status == 6">已完成</text>
  33. <text class="lists-status" v-else-if="item.order_status == 7">退款待审</text>
  34. <view :class="'iflexC lists-content ' + (item.order_status == 6 ? 'borderNone' : '')">
  35. <image class="lists-img" :src="item.goods_pic" mode="aspectFill"></image>
  36. <text class="lists-title over_2">{{ item.goods_name }}</text>
  37. <!-- <view class="lists-num">
  38. <view class="lists-num1">数量: 1</view>
  39. <view class="goDetail" catchtap="goMovie" wx:if="{{item.order_status== 6&&item.is_film==1}}">查看电影票</view>
  40. <view class="goDetail" wx:else>查看详情</view>
  41. </view> -->
  42. <text class="lists-money">
  43. 价格:
  44. <text class="red" v-if="item.pay_money != '0.00'">¥{{ item.pay_money }}+</text>
  45. <text class="red">{{ item.integral }}</text>
  46. {{ unit }} {{ item.sku ? '(' + item.sku + ')' : '' }}
  47. </text>
  48. <text class="lists-time">下单时间:{{ item.create_time }}</text>
  49. </view>
  50. <!-- <view class="iflexC" style="border-bottom:1px solid #eee;" wx:if="{{item.deliver_no}}">
  51. <text class="lists-time1" style="padding-bottom:0">快递名称:{{item.send_comp}}</text>
  52. <text class="lists-time1">物流单号:{{item.deliver_no}} </text>
  53. </view> -->
  54. <view class="iflex l-btns" style="flex-direction: row-reverse">
  55. <button
  56. class="lists-btn btn2"
  57. @tap.stop.prevent="hexiao"
  58. :data-index="index"
  59. v-if="(item.order_status == 3 && item.receive_type == 1 && !item.is_film == 1) || (item.order_status == 0 && item.receive_type == 1 && !item.is_film == 1)"
  60. >
  61. 核销码
  62. </button>
  63. <button class="lists-btn btn2" @tap.stop.prevent="getMovie" :data-id="id" v-if="item.order_status == 0 && item.is_film == 1">点击领取</button>
  64. <!-- <button class="lists-btn btn2" catchtap="confirm" data-order_id="{{item.id}}" wx:if="{{item.order_status==4}}">确认已核销</button> -->
  65. <button class="lists-btn btn2" @tap.stop.prevent="confirm" :data-order_id="item.id" v-if="item.order_status == 5">确认收货</button>
  66. <button
  67. class="lists-btn btn1"
  68. @tap.stop.prevent="refundConfirm"
  69. :data-id="item.id"
  70. :data-area_code="item.ssq_code"
  71. data-type="99"
  72. v-if="item.order_status == 0"
  73. >
  74. 申请退款
  75. </button>
  76. <button
  77. class="lists-btn btn2"
  78. v-if="item.receive_type == 2 && item.order_status == 5"
  79. :data-phone="item.receiver_mobile"
  80. :data-no="item.deliver_no"
  81. @tap.stop.prevent="lookOrder"
  82. >
  83. 查看物流
  84. </button>
  85. </view>
  86. </view>
  87. </view>
  88. <view style="margin-top: 100rpx" v-if="!list.length && loaded">
  89. <msg status="1" icon="https://ms-oss.intelgice.com/yidu_tc/public/upload/12/8/c828dbb65be243c65117fa425e4937b6.png"></msg>
  90. </view>
  91. <!-- <msg status="2" v-if="list.length && loaded"></msg> -->
  92. <!-- 去掉跳转同城运营中心的tabbar -->
  93. <!-- <tabbar active='1'></tabbar> -->
  94. <!-- <view class="mask" v-if="flag">
  95. <view class="qrcode">
  96. <image mode="widthFix" :src="qr_img"></image>
  97. <view class="close" @tap="close">关闭</view>
  98. \
  99. </view>
  100. </view> -->
  101. </block>
  102. </template>
  103. <script>
  104. var app = getApp();
  105. export default {
  106. data() {
  107. return {
  108. list: [
  109. {
  110. create_time: "2022-03-26 15:45:59",
  111. deliver_no: "",
  112. goods_id: 1520,
  113. goods_name: "寒铁10件套美容工具IRON-0100 IRON-0100",
  114. goods_pic: "https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/2487/f04456f1d7360742a070f36b0901e0a7.png",
  115. id: 1182,
  116. integral: "0.00",
  117. is_deliver: 0,
  118. is_film: 0,
  119. order_no: "31038957705405027625933",
  120. order_status: 0,
  121. pay_money: "0.00",
  122. pay_time: "2022-03-26 15:45:59",
  123. receive_type: 2,
  124. receiver_mobile: "18779615160",
  125. send_comp: "",
  126. sku: "中号型",
  127. ssq_code: "360702",
  128. },
  129. {
  130. create_time: "2022-03-26 15:45:41",
  131. deliver_no: "",
  132. goods_id: 1520,
  133. goods_name: "寒铁10件套美容工具IRON-0100 IRON-0100",
  134. goods_pic: "https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/2487/f04456f1d7360742a070f36b0901e0a7.png",
  135. id: 1181,
  136. integral: "0.00",
  137. is_deliver: 0,
  138. is_film: 0,
  139. order_no: "31038957690909207348985",
  140. order_status: 0,
  141. pay_money: "0.00",
  142. pay_time: "2022-03-26 15:45:42",
  143. receive_type: 1,
  144. receiver_mobile: "18779615160",
  145. send_comp: "",
  146. sku: "中号型",
  147. ssq_code: "360702",
  148. }
  149. ],
  150. page: 1,
  151. loaded: false,
  152. nowIndex: 0,
  153. width: 60,
  154. navs: [
  155. {
  156. id: '4',
  157. name: '全部'
  158. },
  159. {
  160. id: 0,
  161. name: '待发货'
  162. },
  163. {
  164. id: 1,
  165. name: '待收货'
  166. },
  167. {
  168. id: '3',
  169. name: '已完成'
  170. }
  171. ],
  172. is_deliver: 4,
  173. unit: '积分',
  174. flag: false,
  175. qr_img: '',
  176. show: false,
  177. id: ''
  178. };
  179. },
  180. onLoad: function () {
  181. var that = this;
  182. // that.getlist();
  183. },
  184. onPullDownRefresh: function () {
  185. this.setData({
  186. list: [],
  187. page: 1,
  188. loaded: false
  189. });
  190. this.getlist();
  191. },
  192. onReachBottom: function () {
  193. this.loaded || this.getlist();
  194. },
  195. methods: {
  196. lookOrder(e) {
  197. var phone = e.currentTarget.dataset.phone;
  198. var no = e.currentTarget.dataset.no;
  199. uni.navigateTo({
  200. url: `/pages/other/logistics/logistics?phone=${phone}&no=${no}`
  201. });
  202. },
  203. refundConfirm(e) {
  204. let ta = this;
  205. a.jump('/yidu_tc/pages/order/order_refund/order_refund?area_code=' + a.pdata(e).area_code + '&id=' + a.pdata(e).id + '&type=' + a.pdata(e).type, 1); // wx.showToast({
  206. // title: '这是申请退款',
  207. // })
  208. // const that = this
  209. // const order_id = e.currentTarget.dataset.order_id
  210. // a.get('regionintegral/refund',
  211. // { uid: app.getCache('userinfo').uid, order_id: order_id },
  212. // function (res) {
  213. // const res1 = res ? JSON.parse(res.info) : ''
  214. // console.log(res1)
  215. // if (res1.code == 0) {
  216. // a.toast(res1.info, 'none')
  217. // setTimeout(function(){
  218. // that.initData()
  219. // that.getlist()
  220. // }, 1000)
  221. // }else{
  222. // a.toast(res1.info, 'none')
  223. // }
  224. // }
  225. // )
  226. },
  227. getMovie(e) {
  228. var id = e.currentTarget.dataset.id;
  229. uni.navigateTo({
  230. url: `/pages/movie/pages/receive/index?id=${id}&channel=integral`
  231. });
  232. },
  233. hexiao(e) {
  234. //点击核销弹出
  235. var index = e.currentTarget.dataset.index;
  236. var order_id = this.list[index].id;
  237. uni.navigateTo({
  238. url: '/pages/other/orderCode/orderCode?id=' + order_id + '&type=2'
  239. }); // var that = this;
  240. // wx.showLoading({
  241. // title: '加载中',
  242. // })
  243. // a.get('regionintegral/qrcode',
  244. // { uid: app.getCache('userinfo').uid, order_id: order_id},
  245. // function (res) {
  246. // if (res.code == 0) {
  247. // that.setData({
  248. // qr_img:res.info,
  249. // flag:true
  250. // })
  251. // wx.hideLoading({
  252. // complete: (res) => {},
  253. // })
  254. // }else{
  255. // a.toast(res.msg)
  256. // }
  257. // }
  258. // )
  259. },
  260. close() {
  261. this.setData({
  262. flag: false
  263. });
  264. },
  265. confirm(e) {
  266. // 确认收货
  267. const that = this;
  268. const order_id = e.currentTarget.dataset.order_id;
  269. a.get(
  270. 'regionintegral/confirm',
  271. {
  272. uid: app.globalData.getCache('userinfo').uid,
  273. order_id: order_id
  274. },
  275. function (res) {
  276. // const res1 = res ? JSON.parse(res.info) : ''
  277. console.log(res);
  278. if (res.code == 0) {
  279. a.toast(res.msg, 'none');
  280. setTimeout(function () {
  281. that.initData();
  282. that.getlist();
  283. }, 1000);
  284. } else {
  285. a.toast(res.msg, 'none');
  286. }
  287. }
  288. );
  289. },
  290. navChange(e) {
  291. if (this.nowIndex != e.currentTarget.dataset.index) {
  292. this.setData({
  293. nowIndex: e.currentTarget.dataset.index,
  294. is_deliver: e.currentTarget.dataset.id
  295. });
  296. this.initData();
  297. this.getlist();
  298. }
  299. },
  300. initData() {
  301. this.setData({
  302. page: 1,
  303. list: [],
  304. loaded: false
  305. });
  306. },
  307. getlist: function () {
  308. var that = this;
  309. var page = that.page; // Integral / exchangelog
  310. a.get(
  311. 'regionintegral/exchange',
  312. {
  313. page: page,
  314. uid: app.globalData.getCache('userinfo').uid,
  315. is_deliver: that.is_deliver
  316. },
  317. function (t) {
  318. uni.stopPullDownRefresh();
  319. if (t.code == 0) {
  320. if (t.info.length > 0) {
  321. // t.info[0].order_status = 6
  322. // t.info[0].is_film = 1
  323. that.setData({
  324. list: that.list.concat(t.info),
  325. page: page + 1,
  326. show: true
  327. });
  328. if (t.info.length < 10) {
  329. that.setData({
  330. loaded: true
  331. });
  332. }
  333. } else {
  334. that.setData({
  335. loaded: true
  336. });
  337. }
  338. } else {
  339. a.alert(t.msg);
  340. }
  341. },
  342. !that.show
  343. );
  344. },
  345. toPage(e) {
  346. let index = e.currentTarget.dataset.index;
  347. if (this.list[index].order_status == 6 && this.list[index].is_film == 1) {
  348. e.currentTarget.dataset.url = '/pages/movie/pages/myMovie/index';
  349. }
  350. app.globalData.toPage(e);
  351. }
  352. }
  353. };
  354. </script>
  355. <style>
  356. page {
  357. background: #f2f2f2;
  358. padding-bottom: 140rpx;
  359. }
  360. .scrollView {
  361. position: fixed;
  362. top: 0;
  363. left: 0;
  364. width: 100%;
  365. z-index: 100;
  366. }
  367. .navs {
  368. display: flex;
  369. width: 100%;
  370. position: relative;
  371. border-top: 1px solid #e4e4e4;
  372. background: white;
  373. }
  374. .lists-time1 {
  375. font-size: 24rpx;
  376. color: #666;
  377. padding: 10rpx 0 16rpx;
  378. }
  379. .navs .nav {
  380. flex: 1;
  381. flex-shrink: 0;
  382. text-align: center;
  383. padding: 26rpx 0;
  384. font-size: 28rpx;
  385. color: #333;
  386. }
  387. .borderNone {
  388. border-bottom: none !important;
  389. }
  390. .bold {
  391. font-weight: bold;
  392. color: #FB4C6F !important;
  393. }
  394. .borderLine {
  395. width: 60rpx;
  396. height: 4rpx;
  397. background: rgba(234, 63, 51, 1);
  398. opacity: 1;
  399. display: block;
  400. position: absolute;
  401. bottom: 0;
  402. transition: left 0.3s;
  403. opacity: 0;
  404. }
  405. .content {
  406. margin-top: 116rpx;
  407. }
  408. .lists {
  409. background: white;
  410. margin: 0 20rpx 20rpx;
  411. padding: 22rpx;
  412. border-radius: 15rpx;
  413. font-size: 28rpx;
  414. position: relative;
  415. }
  416. .lists-status {
  417. position: absolute;
  418. top: 22rpx;
  419. right: 22rpx;
  420. font-size: 26rpx;
  421. color: #8E8E8E;
  422. }
  423. .lists-content {
  424. padding: 0 0 0 156rpx;
  425. position: relative;
  426. min-height: 132rpx;
  427. }
  428. .lists-img {
  429. height: 132rpx;
  430. width: 132rpx;
  431. position: absolute;
  432. top: 0;
  433. left: 0;
  434. border-radius: 6rpx;
  435. }
  436. .lists-time {
  437. font-size: 22rpx;
  438. color: #666;
  439. }
  440. .lists-title {
  441. font-size: 32rpx;
  442. width: 410rpx;
  443. line-height: 1.2;
  444. }
  445. .lists-num {
  446. padding: 12rpx 0 24rpx;
  447. display: flex;
  448. align-items: center;
  449. justify-content: space-between;
  450. }
  451. .lists-num1 {
  452. color: #666;
  453. }
  454. .goDetail {
  455. width: 150rpx;
  456. height: 65rpx;
  457. color: #f62e2e;
  458. border: 1px solid #f62e2e;
  459. border-radius: 40rpx;
  460. font-size: 24rpx;
  461. display: flex;
  462. justify-content: center;
  463. align-items: center;
  464. }
  465. .lists-money {
  466. font-size: 26rpx;
  467. padding: 6rpx 0 26rpx;
  468. }
  469. .lists-btn,
  470. .btn1 {
  471. position: relative;
  472. z-index: 1;
  473. width: 140rpx;
  474. height: 50rpx;
  475. line-height: 50rpx;
  476. opacity: 1;
  477. border-radius: 24rpx;
  478. margin: 12rpx 0 0 14rpx;
  479. border: none;
  480. font-size: 24rpx;
  481. font-weight: 400;
  482. padding: 0;
  483. background: #FB4C6F;
  484. color: white;
  485. /* */
  486. overflow: inherit;
  487. }
  488. /* .lists-btn::before{
  489. position: absolute;
  490. content: '';
  491. height: 1rpx;
  492. width: 666rpx;
  493. background-color: RGBA(220, 220, 220, 0.6);
  494. display: block;
  495. top: -12rpx;
  496. z-index: 21;
  497. left: -360rpx;
  498. } */
  499. .l-btns {
  500. border-top: 1rpx solid RGBA(220, 220, 220, 0.6);
  501. margin-top: 18rpx;
  502. }
  503. .btn1 {
  504. line-height: 46rpx;
  505. border: 1rpx solid #999999;
  506. color: #333;
  507. background: white;
  508. }
  509. /* .btn1::after{
  510. border: none
  511. } */
  512. .integral {
  513. background: #fff;
  514. padding: 30rpx;
  515. box-sizing: border-box;
  516. width: 100%;
  517. font-family: 微软雅黑;
  518. margin: 0 auto 0;
  519. font-size: 30rpx;
  520. color: #333;
  521. border-bottom: 1rpx solid #e5e5e5;
  522. display: flex;
  523. flex-direction: row;
  524. justify-content: space-between;
  525. align-items: center;
  526. }
  527. .integral-left {
  528. display: flex;
  529. flex-direction: row;
  530. justify-content: flex-start;
  531. }
  532. .integral-left1 {
  533. display: flex;
  534. flex-direction: column;
  535. justify-content: center;
  536. }
  537. .integral-left image {
  538. width: 180rpx;
  539. height: 120rpx;
  540. margin-right: 30rpx;
  541. }
  542. .integral-left view:nth-child(1) {
  543. color: #333;
  544. }
  545. .integral-left view:nth-child(2) {
  546. margin-top: 5rpx;
  547. color: #999;
  548. font-size: 25rpx;
  549. }
  550. .integral-right {
  551. font-weight: bold;
  552. font-size: 40rpx;
  553. }
  554. .integral-right1 {
  555. font-weight: 100;
  556. font-size: 26rpx;
  557. margin-left: 5rpx;
  558. }
  559. .vice {
  560. color: #999;
  561. font-size: 25rpx;
  562. }
  563. .mask {
  564. width: 100%;
  565. height: 100vh;
  566. position: fixed;
  567. top: 0;
  568. left: 0;
  569. background: rgba(0, 0, 0, 0.5);
  570. z-index: 999;
  571. }
  572. .qrcode {
  573. width: 80%;
  574. height: auto;
  575. position: absolute;
  576. top: 50%;
  577. left: 50%;
  578. transform: translate(-50%, -50%);
  579. }
  580. .close {
  581. margin: 30rpx auto;
  582. width: 200rpx;
  583. height: 70rpx;
  584. background: #fff;
  585. border-radius: 20rpx;
  586. text-align: center;
  587. line-height: 70rpx;
  588. }
  589. .qrcode image {
  590. width: 100%;
  591. height: auto;
  592. border-radius: 10rpx;
  593. }
  594. .over_2{
  595. overflow: hidden;
  596. text-overflow: ellipsis;
  597. display: -webkit-box;
  598. -webkit-box-orient: vertical;
  599. -webkit-line-clamp: 2;
  600. }
  601. .iflex{display: flex;}
  602. .iflexC{display: flex;flex-direction: column}
  603. </style>