order_detail.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <template>
  2. <view class="order-datail pb100" v-if="!loadding">
  3. <!--购物列表-->
  4. <view class="shops group bg-white">
  5. <view class="group-hd border-b-e">
  6. <view class="left"><text class="min-name">商品</text></view>
  7. </view>
  8. <view class="list">
  9. <view class="gift-package-main">
  10. <view class="p-0-30">
  11. <view class="integral" v-if="detail.point!=0">
  12. <view class="title">
  13. 积分礼包
  14. </view>
  15. <view class="integral_btom d-s-c">
  16. <image src="/static/gift.png" mode="widthFix"></image>
  17. <view class="info">
  18. <view class="num">
  19. {{parseFloat(detail.point)}}积分
  20. </view>
  21. <view>无门槛 全品类</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="p-0-30" v-if="detail.coupon_ids!=''">
  27. <view class="cuopon-title">
  28. 优惠券礼包
  29. </view>
  30. <view class="cuopon-group borbox" v-if="detail.coupon_list!=''">
  31. <view class="body">
  32. <view class="item" v-for="(item,index) in detail.coupon_list" :key="index">
  33. <view class="cuopon_item">
  34. <view><image class="cuopon_img" src="../../../static/youhuiquan2.png" mode=""></image></view>
  35. <view class="d-s-c">
  36. <view class="d-s-c item_cuopon">
  37. <view class="price">
  38. <view class="">
  39. <text class="f22">¥</text><text class="f34">{{parseFloat(item.reduce_price)}}</text>
  40. </view>
  41. <view class="f22">优惠券</view>
  42. </view>
  43. <view class="des">
  44. <view class="des_t">{{item.name}}</view>
  45. <view class="des_b" v-if="item.expire_type==20">有效期至{{item.end_time.text}}</view>
  46. <view class="des_b" v-if="item.expire_type==10">领取后{{item.expire_day}}天内有效</view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="cuopon_num"><text class="f12">x</text>{{item.coupon_num}}</view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="p-0-30" v-if="detail.product_list[0]">
  57. <view class="cuopon-group">
  58. <view class="title f30">
  59. <view>商品礼包</view>
  60. </view>
  61. <view class="body">
  62. <view class="item mb30 borbox bg-white" v-for="(item,index) in detail.product_list" :key="index" @click="choosePro(item.product_id)">
  63. <view class="d-s-c">
  64. <view>
  65. <image class="product_img" :src="item.image[0].file_path" mode="aspectFill"></image>
  66. </view>
  67. <view class="pro">
  68. <view class="pro_t">{{item.product_name}}</view>
  69. <view class="pro_c">{{item.product_sku.product_attr}}</view>
  70. <view class="pro_b"><text class="f18">¥</text>{{item.product_price}}</view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <!--订单信息-->
  81. <view class="group bg-white f28">
  82. <view class="p-20-0">
  83. <text class="gray9">订单编号:</text>
  84. <text>{{ detail.order_no }}</text>
  85. </view>
  86. <view class="p-20-0">
  87. <text class="gray9">下单时间:</text>
  88. <text>{{ detail.create_time }}</text>
  89. </view>
  90. <view class="p-20-0">
  91. <text class="gray9">支付方式:</text>
  92. <text>{{ detail.pay_type.text }}</text>
  93. </view>
  94. <view class="p-20-0">
  95. <text class="gray9">配送方式:</text>
  96. <text v-if="detail.delivery_type==10">快递配送</text>
  97. <text v-if="detail.delivery_type==20">自提上门</text>
  98. </view>
  99. </view>
  100. <view class="group bg-white f28">
  101. <view class="p-20-0 d-b-c">
  102. <text class="gray9">订单金额</text>
  103. <text>¥ {{ detail.order_price }}</text>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import Popup from '@/components/uni-popup.vue';
  110. import { pay } from '@/common/pay.js';
  111. export default {
  112. data() {
  113. return {
  114. /*是否加载完成*/
  115. loadding: true,
  116. indicatorDots: true,
  117. autoplay: true,
  118. interval: 2000,
  119. duration: 500,
  120. /*是否显示支付类别弹窗*/
  121. isPayPopup: false,
  122. /*订单id*/
  123. order_id: 0,
  124. /*订单详情*/
  125. detail: {
  126. point:'',
  127. product_list:[],
  128. pay_price:'',
  129. coupon_list:[],
  130. order_status: [],
  131. address: {
  132. region: []
  133. },
  134. product: [],
  135. pay_type: [],
  136. delivery_type: [],
  137. pay_status: []
  138. },
  139. extractStore: {},
  140. /*是否显示拼团*/
  141. is_fightgroup: false
  142. };
  143. },
  144. components: {
  145. Popup
  146. },
  147. onLoad(e) {
  148. this.order_no = e.order_no;
  149. },
  150. mounted() {
  151. uni.showLoading({
  152. title: '加载中'
  153. });
  154. /*获取订单详情*/
  155. this.getData();
  156. },
  157. methods: {
  158. /*获取数据*/
  159. getData() {
  160. let self = this;
  161. let order_no = self.order_no;
  162. self._get(
  163. 'plus.package.Order/orderDetail',
  164. {
  165. order_no: order_no
  166. },
  167. function(res) {
  168. self.detail = res.data.detail;
  169. self.extractStore = res.data.detail.extract;
  170. self.loadding = false;
  171. console.log(self.detail)
  172. uni.hideLoading();
  173. }
  174. );
  175. },
  176. /*显示支付方式*/
  177. hidePopupFunc() {
  178. this.isPayPopup = false;
  179. },
  180. /*查看物流*/
  181. gotoExpress(order_id) {
  182. this.gotoPage('/pages/order/express/express?order_id=' + order_id);
  183. },
  184. }
  185. };
  186. </script>
  187. <style scoped>
  188. .order-express {
  189. background: #ffffff;
  190. }
  191. .order-express .icon-box .iconfont {
  192. font-size: 50rpx;
  193. }
  194. .order-datail {
  195. padding-bottom: 90 rpx;
  196. }
  197. .order-datail .fight-users {
  198. margin: 0 auto;
  199. }
  200. .order-datail .fight-users .user-box {
  201. width: 80rpx;
  202. height: 80rpx;
  203. margin: 10rpx;
  204. border-radius: 50%;
  205. border: 1px dashed #cccccc;
  206. }
  207. .order-datail .fight-users {
  208. padding: 30rpx;
  209. }
  210. .order-datail .fight-users .user-box image {
  211. width: 80rpx;
  212. height: 80rpx;
  213. border-radius: 50%;
  214. }
  215. .order-datail .fight-users .user-box .leader {
  216. position: absolute;
  217. top: -20rpx;
  218. left: 50%;
  219. margin-left: -30rpx;
  220. width: 60rpx;
  221. height: 30rpx;
  222. line-height: 30rpx;
  223. text-align: center;
  224. color: #ffffff;
  225. border-radius: 30rpx;
  226. border: 1px solid #ffffff;
  227. background: red;
  228. }
  229. .order-datail .fight-users .user-box.user-who {
  230. font-size: 50rpx;
  231. color: #999999;
  232. }
  233. .state-cont .countdown-datetime{
  234. margin-top: 16rpx;
  235. }
  236. .state-cont .countdown-datetime text{
  237. padding: 4rpx 8rpx;
  238. border-radius: 4rpx;
  239. background: rgba(0,0,0,.4);
  240. }
  241. .gift-package-main .integral {
  242. background-color: #ffffff66;
  243. padding-bottom: 60rpx;
  244. border-radius: 15rpx;
  245. }
  246. .gift-package-main .integral .title{
  247. color: #919191;
  248. font-size: 35rpx;
  249. margin-bottom: 20rpx;
  250. }
  251. .gift-package-main .integral_btom {
  252. border: 1rpx solid #cacaca;
  253. height: 193rpx;
  254. background-color: #ffffff;
  255. margin-top: 20rpx;
  256. border-radius: 15rpx;
  257. }
  258. .gift-package-main .integral .info {
  259. margin-left: 30rpx;
  260. width: 300rpx;
  261. color: #f0510e;
  262. }
  263. .gift-package-main .integral image {
  264. width: 135rpx;
  265. height: 135rpx;
  266. margin-left: 40rpx;
  267. }
  268. .gift-package-main .integral .num {
  269. font-size: 50rpx;
  270. }
  271. .gift-package-main .btns {
  272. margin-top: 92rpx;
  273. margin-bottom: 120rpx;
  274. float: right;
  275. }
  276. .gift-package-main .order_price{
  277. text-align: right;
  278. color: #fd0000;
  279. font-size: 30rpx;
  280. margin-bottom: 68rpx;
  281. }
  282. .gift-package-main .btns button {
  283. width: 266rpx;
  284. height: 54rpx;
  285. background-color: #ee1413;
  286. color: #FFFFFF;
  287. text-align: center;
  288. line-height: 54rpx;
  289. border-radius: 15rpx;
  290. }
  291. .rule{
  292. overflow: hidden;
  293. position: absolute;
  294. right: 0;
  295. top: 480rpx;
  296. z-index: 100;
  297. }
  298. .rule_btn{
  299. margin-top: 27rpx;
  300. width: 183rpx;
  301. height: 62rpx;
  302. line-height: 62rpx;
  303. text-align: center;
  304. background-color: #e83514;
  305. border: 1rpx solid #ffffff;
  306. border-top-left-radius: 32rpx;
  307. border-bottom-left-radius: 32rpx;
  308. color: #ffffff;
  309. font-size: 26rpx;
  310. }
  311. .add{
  312. font-size: 73rpx;
  313. font-weight: 900;
  314. text-align: center;
  315. color: #FFFFFF;
  316. }
  317. .cuopon_num{
  318. display: inline-block;
  319. width: 40rpx;
  320. height: 40rpx;
  321. border: 1rpx solid #939393;
  322. margin-left: 150rpx;
  323. text-align: center;
  324. line-height: 40rpx;
  325. font-size: 18rpx;
  326. border-radius: 10rpx;
  327. position: absolute;
  328. top: 40px;
  329. right: 15px;
  330. color: #000000;
  331. }
  332. .product_img{
  333. width: 140rpx;
  334. height: 140rpx;
  335. }
  336. .pro{
  337. margin-left: 12rpx;
  338. text-align: left;
  339. }
  340. .pro_t{
  341. font-size: 24rpx;
  342. color: #000000;
  343. margin-bottom: 15rpx;
  344. }
  345. .pro_c{
  346. font-size: 20rpx;
  347. color: #686868;
  348. }
  349. .pro_b{
  350. font-size: 28rpx;
  351. color: #fd0000;
  352. margin-left: 252rpx;
  353. }
  354. .f18{
  355. font-size: 18rpx;
  356. }
  357. .pro_choose{
  358. width: 33rpx;
  359. height: 33rpx;
  360. position: absolute;
  361. right: 10rpx;
  362. top: 6rpx;
  363. }
  364. .borbox{
  365. border: 1rpx solid #cacaca;
  366. }
  367. .cuopon-group {
  368. color: #ffffff;
  369. text-align: center;
  370. font-size: 30rpx;
  371. background-color: #ffffff30;
  372. border-radius: 15rpx;
  373. padding: 35rpx 0;
  374. }
  375. .cuopon-title{
  376. color: #919191;
  377. font-size: 35rpx;
  378. margin-bottom: 20rpx;
  379. }
  380. .cuopon-group .title{
  381. color: #919191;
  382. font-size: 35rpx;
  383. margin-bottom: 20rpx;
  384. }
  385. .cuopon-group .body {
  386. }
  387. .cuopon_item{
  388. position: relative;
  389. }
  390. .item_cuopon{
  391. z-index: 50;
  392. }
  393. .cuopon-group .body .item {
  394. padding: 20rpx;
  395. display: flex;
  396. flex-direction: column;
  397. border-radius: 20rpx;
  398. position: relative;
  399. }
  400. .cuopon_img{
  401. width: 493rpx;
  402. height: 123rpx;
  403. position: absolute;
  404. top: 0;
  405. left: 0;
  406. }
  407. .cuopon-group .body .item .price {
  408. z-index: 50;
  409. font-size:18rpx;
  410. margin-left: 26rpx;
  411. }
  412. .cuopon-group .body .item .des {
  413. color: #000000;
  414. z-index: 50;
  415. padding: 26rpx 0;
  416. font-size: 24rpx;
  417. text-align: left;
  418. margin-left: 50rpx;
  419. }
  420. </style>