index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. <template>
  2. <view :style="colorStyle">
  3. <view class='order-details'>
  4. <view v-if="orderInfo && orderInfo.invoice" class='header bg-color acea-row row-middle'>
  5. <view class='iconfont icon-fapiao1'></view>
  6. <view class='data'>
  7. <view class='state'>{{orderInfo.invoice.is_invoice ? $t(`已开票`) : $t(`未开票`)}}</view>
  8. <view>{{orderInfo.invoice.add_time}}</view>
  9. </view>
  10. </view>
  11. <view v-if="orderInfo && orderInfo.invoice" class="wrapper">
  12. <view class="item acea-row row-between-wrapper">
  13. <view>{{$t(`发票类型`)}}</view>
  14. <view class="conter">{{orderInfo.invoice.type === 1 ? $t(`增值税电子普通发票`) : $t(`增值税电子专用发票`)}}</view>
  15. </view>
  16. <view class="item acea-row row-between-wrapper">
  17. <view>{{$t(`发票抬头`)}}</view>
  18. <view class="conter">{{orderInfo.invoice.name}}</view>
  19. </view>
  20. <view v-if="orderInfo.invoice.duty_number" class="item acea-row row-between-wrapper">
  21. <view>{{$t(`税号`)}}</view>
  22. <view class="conter">{{orderInfo.invoice.duty_number}}</view>
  23. </view>
  24. <view class="item acea-row row-between-wrapper">
  25. <view>{{$t(`手机号`)}}</view>
  26. <view class="conter">{{orderInfo.invoice.drawer_phone}}</view>
  27. </view>
  28. <view class="item acea-row row-between-wrapper">
  29. <view>{{$t(`邮箱`)}}</view>
  30. <view class="conter">{{orderInfo.invoice.email}}</view>
  31. </view>
  32. <template v-if="orderInfo.invoice.type === 2">
  33. <view class="item acea-row row-between-wrapper">
  34. <view>{{$t(`开户银行`)}}</view>
  35. <view class="conter">{{orderInfo.invoice.bank}}</view>
  36. </view>
  37. <view class="item acea-row row-between-wrapper">
  38. <view>{{$t(`银行账号`)}}</view>
  39. <view class="conter">{{orderInfo.invoice.card_number}}</view>
  40. </view>
  41. <view class="item acea-row row-between-wrapper">
  42. <view>{{$t(`企业地址`)}}</view>
  43. <view class="conter">{{orderInfo.invoice.address}}</view>
  44. </view>
  45. <view class="item acea-row row-between-wrapper">
  46. <view>{{$t(`企业电话`)}}</view>
  47. <view class="conter">{{orderInfo.invoice.tell}}</view>
  48. </view>
  49. </template>
  50. <view class="item acea-row row-between-wrapper" v-if='orderInfo.invoice.invoice_number'>
  51. <view>{{$t(`发票编号`)}}</view>
  52. <view class="conter">{{orderInfo.invoice.invoice_number}}</view>
  53. </view>
  54. <view class="item acea-row row-between-wrapper" v-if='orderInfo.invoice.remark'>
  55. <view>{{$t(`发票备注`)}}</view>
  56. <view class="conter">{{orderInfo.invoice.remark}}</view>
  57. </view>
  58. </view>
  59. <orderGoods :evaluate='evaluate' :orderId="order_id" :cartInfo="cartInfo" :jump="true" :paid="orderInfo.paid" :oid="orderInfo.id" :isShow="false" :statusType="status.type"></orderGoods>
  60. <view class='wrapper'>
  61. <view class='item acea-row row-between'>
  62. <view>{{$t(`订单编号`)}}:</view>
  63. <view class='conter acea-row row-middle row-right'>{{orderInfo.order_id}}
  64. <!-- #ifndef H5 -->
  65. <text class='copy' @tap='copy'>{{$t(`复制`)}}</text>
  66. <!-- #endif -->
  67. <!-- #ifdef H5 -->
  68. <text class='copy copy-data' :data-clipboard-text="orderInfo.order_id">{{$t(`复制`)}}</text>
  69. <!-- #endif -->
  70. </view>
  71. </view>
  72. <view class='item acea-row row-between'>
  73. <view>{{$t(`下单时间`)}}:</view>
  74. <view class='conter'>{{(orderInfo.add_time_y || '') +' '+(orderInfo.add_time_h || 0)}}</view>
  75. </view>
  76. <view class='item acea-row row-between'>
  77. <view>{{$t(`支付状态`)}}:</view>
  78. <view class='conter' v-if="orderInfo.paid">{{$t(`已支付`)}}</view>
  79. <view class='conter' v-else>{{$t(`未支付`)}}</view>
  80. </view>
  81. <view class='item acea-row row-between'>
  82. <view>{{$t(`支付方式`)}}:</view>
  83. <view class='conter'>{{orderInfo._status._payType}}</view>
  84. </view>
  85. <view class='item acea-row row-between' v-if="orderInfo.mark">
  86. <view>{{$t(`买家留言`)}}:</view>
  87. <view class='conter'>{{orderInfo.mark}}</view>
  88. </view>
  89. <view class='item acea-row row-between' v-if="orderInfo.fictitious_content">
  90. <view>{{$t(`备注`)}}:</view>
  91. <view class='conter'>{{orderInfo.fictitious_content}}</view>
  92. </view>
  93. </view>
  94. <!-- 退款订单详情 -->
  95. <view class='wrapper' v-if="isGoodsReturn">
  96. <view class='item acea-row row-between'>
  97. <view>{{$t(`收货人`)}}:</view>
  98. <view class='conter'>{{orderInfo.real_name}}</view>
  99. </view>
  100. <view class='item acea-row row-between'>
  101. <view>{{$t(`联系电话`)}}:</view>
  102. <view class='conter'>{{orderInfo.user_phone}}</view>
  103. </view>
  104. <view class='item acea-row row-between'>
  105. <view>{{$t(`收货地址`)}}:</view>
  106. <view class='conter'>{{orderInfo.user_address}}</view>
  107. </view>
  108. </view>
  109. <view v-if="orderInfo.status!=0">
  110. <view class='wrapper' v-if='orderInfo.delivery_type=="express"'>
  111. <view class='item acea-row row-between'>
  112. <view>{{$t(`配送方式`)}}:</view>
  113. <view class='conter'>{{$t(`发货`)}}</view>
  114. </view>
  115. <view class='item acea-row row-between'>
  116. <view>{{$t(`快递公司`)}}:</view>
  117. <view class='conter'>{{orderInfo.delivery_name || ''}}</view>
  118. </view>
  119. <view class='item acea-row row-between'>
  120. <view>{{$t(`快递号`)}}:</view>
  121. <view class='conter'>{{orderInfo.delivery_id || ''}}</view>
  122. </view>
  123. </view>
  124. <view class='wrapper' v-else-if='orderInfo.delivery_type=="send"'>
  125. <view class='item acea-row row-between'>
  126. <view>{{$t(`配送方式`)}}:</view>
  127. <view class='conter'>{{$t(`送货`)}}</view>
  128. </view>
  129. <view class='item acea-row row-between'>
  130. <view>{{$t(`配送人姓名`)}}:</view>
  131. <view class='conter'>{{orderInfo.delivery_name || ''}}</view>
  132. </view>
  133. <view class='item acea-row row-between'>
  134. <view>{{$t(`联系电话`)}}:</view>
  135. <view class='conter acea-row row-middle row-right'>{{orderInfo.delivery_id || ''}}<text class='copy' @tap='goTel'>{{$t(`dial`)}}</text></view>
  136. </view>
  137. </view>
  138. <view class='wrapper' v-else-if='orderInfo.delivery_type=="fictitious"'>
  139. <view class='item acea-row row-between'>
  140. <view>{{$t(`虚拟发货`)}}:</view>
  141. <view class='conter'>{{$t(`已发货,请注意查收`)}}</view>
  142. </view>
  143. </view>
  144. </view>
  145. <view class='wrapper'>
  146. <view class='item acea-row row-between'>
  147. <view>{{$t(`支付金额`)}}:</view>
  148. <view class='conter'>{{$t(`¥`)}}{{orderInfo.pay_price}}</view>
  149. </view>
  150. <!-- <view class='item acea-row row-between' v-if='orderInfo.coupon_id'>
  151. <view>{{$t(`优惠券抵扣`)}}:</view>
  152. <view class='conter'>-{{$t(`¥`)}}{{orderInfo.coupon_price}}</view>
  153. </view>
  154. <view class='item acea-row row-between' v-if="orderInfo.use_integral > 0">
  155. <view>{{$t(`积分抵扣`)}}:</view>
  156. <view class='conter'>-{{$t(`¥`)}}{{orderInfo.deduction_price}}</view>
  157. </view>
  158. <view class='item acea-row row-between' v-if="orderInfo.pay_postage > 0">
  159. <view>{{$t(`运费`)}}:</view>
  160. <view class='conter'>{{$t(`¥`)}}{{orderInfo.pay_postage}}</view>
  161. </view> -->
  162. </view>
  163. </view>
  164. <!-- #ifndef MP -->
  165. <home></home>
  166. <!-- #endif -->
  167. </view>
  168. </template>
  169. <style scoped lang="scss">
  170. .goodCall {
  171. color: #e93323;
  172. text-align: center;
  173. width: 100%;
  174. height: 86rpx;
  175. padding: 0 30rpx;
  176. border-bottom: 1rpx solid #eee;
  177. font-size: 30rpx;
  178. line-height: 86rpx;
  179. background: #fff;
  180. .icon-kefu {
  181. font-size: 36rpx;
  182. margin-right: 15rpx;
  183. }
  184. /* #ifdef MP */
  185. button {
  186. display: flex;
  187. align-items: center;
  188. justify-content: center;
  189. height: 86rpx;
  190. font-size: 30rpx;
  191. color: #e93323;
  192. }
  193. /* #endif */
  194. }
  195. .order-details .header {
  196. padding: 0 30rpx;
  197. height: 150rpx;
  198. }
  199. .order-details .header.on {
  200. background-color: #666 !important;
  201. }
  202. .order-details .header .iconfont {
  203. font-size: 70rpx;
  204. color: #fff;
  205. }
  206. .order-details .header .data {
  207. color: rgba(255, 255, 255, 0.8);
  208. font-size: 24rpx;
  209. margin-left: 27rpx;
  210. }
  211. .order-details .header .data.on {
  212. margin-left: 0;
  213. }
  214. .order-details .header .data .state {
  215. font-size: 30rpx;
  216. font-weight: bold;
  217. color: #fff;
  218. margin-bottom: 7rpx;
  219. }
  220. .order-details .header .data .time {
  221. margin-left: 20rpx;
  222. }
  223. .order-details .nav {
  224. background-color: #fff;
  225. font-size: 26rpx;
  226. color: #282828;
  227. padding: 25rpx 0;
  228. }
  229. .order-details .nav .navCon {
  230. padding: 0 40rpx;
  231. }
  232. .order-details .nav .on {
  233. color: #e93323;
  234. }
  235. .order-details .nav .progress {
  236. padding: 0 65rpx;
  237. margin-top: 10rpx;
  238. }
  239. .order-details .nav .progress .line {
  240. width: 100rpx;
  241. height: 2rpx;
  242. background-color: #939390;
  243. }
  244. .order-details .nav .progress .iconfont {
  245. font-size: 25rpx;
  246. color: #939390;
  247. margin-top: -2rpx;
  248. }
  249. .order-details .address {
  250. font-size: 26rpx;
  251. color: #868686;
  252. background-color: #fff;
  253. margin-top: 13rpx;
  254. padding: 35rpx 30rpx;
  255. }
  256. .order-details .address .name {
  257. font-size: 30rpx;
  258. color: #282828;
  259. margin-bottom: 15rpx;
  260. }
  261. .order-details .address .name .phone {
  262. margin-left: 40rpx;
  263. }
  264. .order-details .line {
  265. width: 100%;
  266. height: 3rpx;
  267. }
  268. .order-details .line image {
  269. width: 100%;
  270. height: 100%;
  271. display: block;
  272. }
  273. .order-details .wrapper {
  274. background-color: #fff;
  275. margin-top: 12rpx;
  276. padding: 30rpx;
  277. }
  278. .order-details .wrapper .item {
  279. font-size: 28rpx;
  280. color: #282828;
  281. }
  282. .order-details .wrapper .item~.item {
  283. margin-top: 20rpx;
  284. }
  285. .order-details .wrapper .item .conter {
  286. color: #868686;
  287. width: 460rpx;
  288. text-align: right;
  289. }
  290. .order-details .wrapper .item .conter .copy {
  291. font-size: 20rpx;
  292. color: #333;
  293. border-radius: 3rpx;
  294. border: 1rpx solid #666;
  295. padding: 3rpx 15rpx;
  296. margin-left: 24rpx;
  297. }
  298. .order-details .wrapper .actualPay {
  299. border-top: 1rpx solid #eee;
  300. margin-top: 30rpx;
  301. padding-top: 30rpx;
  302. }
  303. .order-details .wrapper .actualPay .money {
  304. font-weight: bold;
  305. font-size: 30rpx;
  306. }
  307. .order-details .footer {
  308. width: 100%;
  309. height: 100rpx;
  310. position: fixed;
  311. bottom: 0;
  312. left: 0;
  313. background-color: #fff;
  314. padding: 0 30rpx;
  315. box-sizing: border-box;
  316. }
  317. .order-details .footer .bnt {
  318. width: 176rpx;
  319. height: 60rpx;
  320. text-align: center;
  321. line-height: 60rpx;
  322. border-radius: 50rpx;
  323. color: #fff;
  324. font-size: 27rpx;
  325. }
  326. .order-details .footer .bnt.cancel {
  327. color: #aaa;
  328. border: 1rpx solid #ddd;
  329. }
  330. .order-details .footer .bnt~.bnt {
  331. margin-left: 18rpx;
  332. }
  333. .order-details .writeOff {
  334. background-color: #fff;
  335. margin-top: 13rpx;
  336. padding-bottom: 30rpx;
  337. }
  338. .order-details .writeOff .title {
  339. font-size: 30rpx;
  340. color: #282828;
  341. height: 87rpx;
  342. border-bottom: 1px solid #f0f0f0;
  343. padding: 0 30rpx;
  344. line-height: 87rpx;
  345. }
  346. .order-details .writeOff .grayBg {
  347. background-color: #f2f5f7;
  348. width: 590rpx;
  349. height: 384rpx;
  350. border-radius: 20rpx 20rpx 0 0;
  351. margin: 50rpx auto 0 auto;
  352. padding-top: 55rpx;
  353. position: relative;
  354. }
  355. .order-details .writeOff .grayBg .written {
  356. position: absolute;
  357. top: 0;
  358. right: 0;
  359. width: 60rpx;
  360. height: 60rpx;
  361. }
  362. .order-details .writeOff .grayBg .written image {
  363. width: 100%;
  364. height: 100%;
  365. }
  366. .order-details .writeOff .grayBg .pictrue {
  367. width: 290rpx;
  368. height: 290rpx;
  369. margin: 0 auto;
  370. }
  371. .order-details .writeOff .grayBg .pictrue image {
  372. width: 100%;
  373. height: 100%;
  374. display: block;
  375. }
  376. .order-details .writeOff .gear {
  377. width: 590rpx;
  378. height: 30rpx;
  379. margin: 0 auto;
  380. }
  381. .order-details .writeOff .gear image {
  382. width: 100%;
  383. height: 100%;
  384. display: block;
  385. }
  386. .order-details .writeOff .num {
  387. background-color: #f0c34c;
  388. width: 590rpx;
  389. height: 84rpx;
  390. color: #282828;
  391. font-size: 48rpx;
  392. margin: 0 auto;
  393. border-radius: 0 0 20rpx 20rpx;
  394. text-align: center;
  395. padding-top: 4rpx;
  396. }
  397. .order-details .writeOff .rules {
  398. margin: 46rpx 30rpx 0 30rpx;
  399. border-top: 1px solid #f0f0f0;
  400. padding-top: 10rpx;
  401. }
  402. .order-details .writeOff .rules .item {
  403. margin-top: 20rpx;
  404. }
  405. .order-details .writeOff .rules .item .rulesTitle {
  406. font-size: 28rpx;
  407. color: #282828;
  408. }
  409. .order-details .writeOff .rules .item .rulesTitle .iconfont {
  410. font-size: 30rpx;
  411. color: #333;
  412. margin-right: 8rpx;
  413. margin-top: 5rpx;
  414. }
  415. .order-details .writeOff .rules .item .info {
  416. font-size: 28rpx;
  417. color: #999;
  418. margin-top: 7rpx;
  419. }
  420. .order-details .writeOff .rules .item .info .time {
  421. margin-left: 20rpx;
  422. }
  423. .order-details .map {
  424. height: 86rpx;
  425. font-size: 30rpx;
  426. color: #282828;
  427. line-height: 86rpx;
  428. border-bottom: 1px solid #f0f0f0;
  429. margin-top: 13rpx;
  430. background-color: #fff;
  431. padding: 0 30rpx;
  432. }
  433. .order-details .map .place {
  434. font-size: 26rpx;
  435. width: 176rpx;
  436. height: 50rpx;
  437. border-radius: 25rpx;
  438. line-height: 50rpx;
  439. text-align: center;
  440. }
  441. .order-details .map .place .iconfont {
  442. font-size: 27rpx;
  443. height: 27rpx;
  444. line-height: 27rpx;
  445. margin: 2rpx 3rpx 0 0;
  446. }
  447. .order-details .address .name .iconfont {
  448. font-size: 34rpx;
  449. margin-left: 10rpx;
  450. }
  451. .refund {
  452. padding: 0 30rpx 30rpx;
  453. margin-top: 24rpx;
  454. background-color: #fff;
  455. .title {
  456. display: flex;
  457. align-items: center;
  458. font-size: 30rpx;
  459. color: #333;
  460. height: 86rpx;
  461. border-bottom: 1px solid #f5f5f5;
  462. image {
  463. width: 32rpx;
  464. height: 32rpx;
  465. margin-right: 10rpx;
  466. }
  467. }
  468. .con {
  469. padding-top: 25rpx;
  470. font-size: 28rpx;
  471. color: #868686;
  472. }
  473. }
  474. </style>
  475. <script>
  476. import {
  477. orderInvoiceDetail,
  478. orderAgain,
  479. orderTake,
  480. orderDel,
  481. orderCancel
  482. } from '@/api/order.js';
  483. import {
  484. openOrderRefundSubscribe
  485. } from '@/utils/SubscribeMessage.js';
  486. import home from '@/components/home';
  487. import payment from '@/components/payment';
  488. import orderGoods from "@/components/orderGoods";
  489. import ClipboardJS from "@/plugin/clipboard/clipboard.js";
  490. import {
  491. toLogin
  492. } from '@/libs/login.js';
  493. import {
  494. mapGetters
  495. } from "vuex";
  496. // #ifdef MP
  497. import authorize from '@/components/Authorize';
  498. // #endif
  499. import colors from "@/mixins/color";
  500. export default {
  501. components: {
  502. payment,
  503. home,
  504. orderGoods,
  505. // #ifdef MP
  506. authorize
  507. // #endif
  508. },
  509. mixins: [colors],
  510. data() {
  511. return {
  512. order_id: '',
  513. evaluate: 0,
  514. cartInfo: [], //购物车产品
  515. orderInfo: {
  516. system_store: {},
  517. _status: {}
  518. }, //订单详情
  519. system_store: {},
  520. isGoodsReturn: false, //是否为退款订单
  521. status: {}, //订单底部按钮状态
  522. isClose: false,
  523. pay_close: false,
  524. pay_order_id: '',
  525. totalPrice: '0',
  526. isAuto: false, //没有授权的不会自动授权
  527. isShowAuth: false //是否隐藏授权
  528. };
  529. },
  530. computed: mapGetters(['isLogin']),
  531. onLoad: function(options) {
  532. if (options.order_id) {
  533. this.$set(this, 'order_id', options.order_id);
  534. }
  535. },
  536. onShow() {
  537. if (this.isLogin) {
  538. this.getOrderInfo();
  539. } else {
  540. toLogin();
  541. }
  542. },
  543. onHide: function() {
  544. this.isClose = true;
  545. },
  546. onReady: function() {
  547. // #ifdef H5
  548. this.$nextTick(function() {
  549. const clipboard = new ClipboardJS(".copy-data");
  550. clipboard.on("success", () => {
  551. this.$util.Tips({
  552. title: this.$t(`复制成功`)
  553. });
  554. });
  555. });
  556. // #endif
  557. },
  558. methods: {
  559. goGoodCall() {
  560. let self = this
  561. uni.navigateTo({
  562. url: `/pages/extension/customer_list/chat?orderId=${self.order_id}`
  563. })
  564. },
  565. openSubcribe: function(e) {
  566. let page = e;
  567. uni.showLoading({
  568. title: this.$t(`正在加载中`),
  569. })
  570. openOrderRefundSubscribe().then(res => {
  571. uni.hideLoading();
  572. uni.navigateTo({
  573. url: page,
  574. });
  575. }).catch(() => {
  576. uni.hideLoading();
  577. });
  578. },
  579. /**
  580. * 事件回调
  581. *
  582. */
  583. onChangeFun: function(e) {
  584. let opt = e;
  585. let action = opt.action || null;
  586. let value = opt.value != undefined ? opt.value : null;
  587. (action && this[action]) && this[action](value);
  588. },
  589. /**
  590. * 拨打电话
  591. */
  592. makePhone: function() {
  593. uni.makePhoneCall({
  594. phoneNumber: this.system_store.phone
  595. })
  596. },
  597. /**
  598. * 打开地图
  599. *
  600. */
  601. showMaoLocation: function() {
  602. if (!this.system_store.latitude || !this.system_store.longitude) return this.$util.Tips({
  603. title: this.$t(`缺少经纬度信息无法查看地图!`)
  604. });
  605. uni.openLocation({
  606. latitude: parseFloat(this.system_store.latitude),
  607. longitude: parseFloat(this.system_store.longitude),
  608. scale: 8,
  609. name: this.system_store.name,
  610. address: this.system_store.address + this.system_store.detailed_address,
  611. success: function() {
  612. },
  613. });
  614. },
  615. /**
  616. * 登录授权回调
  617. *
  618. */
  619. onLoadFun: function() {
  620. this.getOrderInfo();
  621. },
  622. /**
  623. * 获取订单详细信息
  624. *
  625. */
  626. getOrderInfo: function() {
  627. let that = this;
  628. uni.showLoading({
  629. title: that.$t(`正在加载中`)
  630. });
  631. orderInvoiceDetail(this.order_id).then(res => {
  632. let _type = res.data._status._type;
  633. uni.hideLoading();
  634. that.$set(that, 'orderInfo', res.data);
  635. that.$set(that, 'cartInfo', res.data.cartInfo);
  636. that.$set(that, 'evaluate', _type == 3 ? 3 : 0);
  637. that.$set(that, 'system_store', res.data.system_store);
  638. if (this.orderInfo.refund_status != 0) {
  639. this.isGoodsReturn = true;
  640. }
  641. that.getOrderStatus();
  642. }).catch(err => {
  643. uni.hideLoading();
  644. that.$util.Tips({
  645. title: err
  646. });
  647. });
  648. },
  649. /**
  650. *
  651. * 剪切订单号
  652. */
  653. // #ifndef H5
  654. copy: function() {
  655. let that = this;
  656. uni.setClipboardData({
  657. data: this.orderInfo.order_id
  658. });
  659. },
  660. // #endif
  661. /**
  662. * 打电话
  663. */
  664. goTel: function() {
  665. uni.makePhoneCall({
  666. phoneNumber: this.orderInfo.delivery_id
  667. })
  668. },
  669. /**
  670. * 设置底部按钮
  671. *
  672. */
  673. getOrderStatus: function() {
  674. let orderInfo = this.orderInfo || {},
  675. _status = orderInfo._status || {
  676. _type: 0
  677. },
  678. status = {};
  679. let type = parseInt(_status._type),
  680. delivery_type = orderInfo.delivery_type,
  681. seckill_id = orderInfo.seckill_id ? parseInt(orderInfo.seckill_id) : 0,
  682. bargain_id = orderInfo.bargain_id ? parseInt(orderInfo.bargain_id) : 0,
  683. combination_id = orderInfo.combination_id ? parseInt(orderInfo.combination_id) : 0;
  684. status = {
  685. type: type == 9 ? -9 : type,
  686. class_status: 0
  687. };
  688. if (type == 1 && combination_id > 0) status.class_status = 1; //查看拼团
  689. if (type == 2 && delivery_type == 'express') status.class_status = 2; //查看物流
  690. if (type == 2) status.class_status = 3; //确认收货
  691. if (type == 4 || type == 0) status.class_status = 4; //删除订单
  692. if (!seckill_id && !bargain_id && !combination_id && (type == 3 || type == 4)) status.class_status = 5; //再次购买
  693. this.$set(this, 'status', status);
  694. },
  695. /**
  696. * 去拼团详情
  697. *
  698. */
  699. goJoinPink: function() {
  700. uni.navigateTo({
  701. url: '/pages/activity/goods_combination_status/index?id=' + this.orderInfo.pink_id,
  702. });
  703. },
  704. /**
  705. * 再此购买
  706. *
  707. */
  708. goOrderConfirm: function() {
  709. let that = this;
  710. orderAgain(that.orderInfo.order_id).then(res => {
  711. return uni.navigateTo({
  712. url: '/pages/goods/order_confirm/index?new=1&cartId=' + res.data.cateId
  713. });
  714. });
  715. },
  716. confirmOrder: function() {
  717. let that = this;
  718. uni.showModal({
  719. title: this.$t(`确认收货`),
  720. content: this.$t(`为保障权益,请收到货确认无误后,再确认收货`),
  721. success: function(res) {
  722. if (res.confirm) {
  723. orderTake(that.order_id).then(res => {
  724. return that.$util.Tips({
  725. title: that.$t(`操作成功`),
  726. icon: 'success'
  727. }, function() {
  728. that.getOrderInfo();
  729. });
  730. }).catch(err => {
  731. return that.$util.Tips({
  732. title: err
  733. });
  734. })
  735. }
  736. }
  737. })
  738. },
  739. /**
  740. *
  741. * 删除订单
  742. */
  743. delOrder: function() {
  744. let that = this;
  745. orderDel(this.order_id).then(res => {
  746. return that.$util.Tips({
  747. title: that.$t(`删除成功`),
  748. icon: 'success'
  749. }, {
  750. tab: 3,
  751. url: 1
  752. });
  753. }).catch(err => {
  754. return that.$util.Tips({
  755. title: err
  756. });
  757. });
  758. },
  759. cancelOrder() {
  760. let self = this
  761. uni.showModal({
  762. title: that.$t(`提示`),
  763. content: that.$t(`确认取消该订单`),
  764. success: function(res) {
  765. if (res.confirm) {
  766. orderCancel(self.orderInfo.order_id)
  767. .then((data) => {
  768. self.$util.Tips({
  769. title: data.msg
  770. }, {
  771. tab: 3
  772. })
  773. })
  774. .catch(() => {
  775. self.getDetail();
  776. });
  777. } else if (res.cancel) {
  778. }
  779. }
  780. });
  781. },
  782. }
  783. }
  784. </script>
  785. <style>
  786. .qs-btn {
  787. width: auto;
  788. height: 60rpx;
  789. text-align: center;
  790. line-height: 60rpx;
  791. border-radius: 50rpx;
  792. color: #fff;
  793. font-size: 27rpx;
  794. padding: 0 3%;
  795. color: #aaa;
  796. border: 1px solid #ddd;
  797. margin-right: 20rpx;
  798. }
  799. .acea-row {
  800. flex-wrap: nowrap;
  801. }
  802. .wrapper .item .conter {
  803. width: 396rpx;
  804. }
  805. </style>