ExchangeOrderDetail.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. <template>
  2. <view style="height: 100%;" :class="['qn-page-' + theme]">
  3. <u-navbar v-if="navFixed" title="订单详情" title-color="#ffffff" back-icon-color="#ffffff" :border-bottom="false" :background="{ backgroundImage: primaryJb }"></u-navbar>
  4. <view class="box" v-if="order_detail.id">
  5. <view class="top-view" :style="{ background: primaryJb }">
  6. <uniStatusBar></uniStatusBar>
  7. <view class="nav-bar">
  8. <text @click="backPage" class="ibonfont ibonfanhui nv-back"></text>
  9. <text class="title-text">订单详情</text>
  10. </view>
  11. <view class="order-status-view clearfix">
  12. <view class="float_left">
  13. <view class="order-status-text">
  14. <text>{{
  15. order_detail.status === 4
  16. ? '待发货'
  17. : order_detail.status === 5
  18. ? '已完成'
  19. : order_detail.status === 6
  20. ? '已关闭'
  21. : ''
  22. }}</text>
  23. <view class="children-order-status">
  24. {{
  25. order_detail.status === 4
  26. ? '正在紧急备货中!'
  27. : order_detail.status === 5
  28. ? '本次交易已完成,祝您购物愉快'
  29. : order_detail.status === 6
  30. ? '本次交易已关闭'
  31. : ''
  32. }}
  33. </view>
  34. </view>
  35. </view>
  36. <view class="float_right">
  37. <text
  38. class="ibonfont order-icon"
  39. :class="[
  40. order_detail.status === 4
  41. ? 'ibondaifahuo1'
  42. : order_detail.status === 5
  43. ? 'ibonyiwancheng'
  44. : order_detail.status === 6
  45. ? 'ibonjiaoyiguanbix'
  46. : ''
  47. ]"
  48. ></text>
  49. </view>
  50. </view>
  51. </view>
  52. <!-- 收货地址 -->
  53. <view class="address-view model-box clearfix">
  54. <text class="ibonfont ibonicon-test ad-icon primary-bg"></text>
  55. <view>
  56. <text class="title">{{ address.name }} {{ address.mobile }}</text>
  57. <br />
  58. <text class="subtitle">地址:{{ address.area.provinceName }}{{ address.area.cityName }}{{ address.area.districtName }}{{ address.address }}</text>
  59. </view>
  60. </view>
  61. <!-- 商品信息 -->
  62. <view class="goods-view view-main">
  63. <view class="goods-li clearfix" @click="goPage(`/pagesTwo/goods/GoodsDetail?id=${it.id}`)">
  64. <image class="goods-img float_left" :src="order_detail.images[0]" mode="aspectFit"></image>
  65. <view class="float_right goods-right">
  66. <view class="goods-name ellipsis">{{ order_detail.integralGoodsName }}</view>
  67. <view class="goods-price clearfix">
  68. <view class="float_left">
  69. <text class="price primary-color">
  70. <text>{{ order_detail.integral }}股权</text>
  71. </text>
  72. </view>
  73. <view class="float_right">
  74. <u-icon name="close" size="18"></u-icon>
  75. <text class="goods-num">{{ order_detail.num }}</text>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="view-main order-info-view">
  82. <view class="order-info-tit">订单信息</view>
  83. <view class="order-info-cont">
  84. <view class="order-info-li">
  85. <view class="clearfix info-item">
  86. <text class="subtitle float_left">订单编号:</text>
  87. <text class="money-val float_right">{{ order_detail.no }}</text>
  88. </view>
  89. <view class="clearfix info-item">
  90. <text class="subtitle float_left">下单时间:</text>
  91. <text class="money-val float_right">{{order_detail.createTime}}</text>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="view-main order-info-view">
  97. <view class="order-price-view">
  98. <span>合计:</span>
  99. <span class="price primary-color">{{ order_detail.amount }}股权</span>
  100. </view>
  101. </view>
  102. <view class="view-main order-info-view" v-if="order_detail.remark">
  103. <view class="order-info-tit">买家留言</view>
  104. <view style="font-size: 26upx;">{{ order_detail.remark || '--' }}</view>
  105. </view>
  106. </view>
  107. </view>
  108. </template>
  109. <script>
  110. import uniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue';
  111. export default {
  112. components: {
  113. uniStatusBar
  114. },
  115. data() {
  116. return {
  117. navFixed: false,
  118. express_list: [],
  119. order_id: 0,
  120. price: '',
  121. selfRuleData: {},
  122. order_detail: {},
  123. no: '',
  124. // 再次购买的goodsData
  125. goodsData: [],
  126. address: {}
  127. };
  128. },
  129. async onLoad(options) {
  130. this.order_id = options.id;
  131. await this.getIntegralGoodsExchangeInfo();
  132. },
  133. onPageScroll(val) {
  134. this.navFixed = val.scrollTop > 5;
  135. },
  136. methods: {
  137. // 获取订单详情
  138. async getIntegralGoodsExchangeInfo() {
  139. await this.$u.api.getIntegralGoodsExchangeInfo(this.order_id).then(res => {
  140. this.order_detail = {
  141. ...res.data,
  142. createTime: this.$u.timeFormat(res.data.createTime,'yyyy-mm-dd hh:MM:ss')
  143. };
  144. if(Array.isArray(res.data.address)){
  145. this.address = res.data.address[0];
  146. }else{
  147. this.address = res.data.address;
  148. }
  149. this.price = this.order_detail.totalMoney;
  150. this.no = this.order_detail.no;
  151. });
  152. }
  153. }
  154. };
  155. </script>
  156. <style lang="scss">
  157. .top-view {
  158. background: linear-gradient(315deg, #fe4542, #ff7e44);
  159. .nav-bar {
  160. padding: 24upx 0;
  161. position: relative;
  162. .nv-back {
  163. position: absolute;
  164. top: 24upx;
  165. left: 24upx;
  166. font-size: 32upx;
  167. color: #ffffff;
  168. display: block;
  169. }
  170. .title-text {
  171. font-size: 32upx;
  172. color: #fff;
  173. display: inline-block;
  174. width: 100%;
  175. text-align: center;
  176. height: 40upx;
  177. }
  178. }
  179. .order-status-view {
  180. color: #fff;
  181. font-size: 36upx;
  182. padding: 40upx;
  183. .order-icon {
  184. margin-right: 10upx;
  185. font-size: 80upx;
  186. opacity: 0.9;
  187. }
  188. .children-order-status {
  189. font-size: 24upx;
  190. font-weight: 300;
  191. padding-top: 10upx;
  192. }
  193. }
  194. }
  195. .box {
  196. width: 100%;
  197. // overflow-y: scroll;
  198. padding-bottom: 140upx;
  199. // height: 100%;
  200. // margin-bottom: 130upx;
  201. background: #f5f9fc;
  202. .view-main {
  203. background: #fff;
  204. padding: 24upx;
  205. width: 706upx;
  206. margin: 20upx auto 0;
  207. border-radius: 10upx;
  208. }
  209. .goods-view {
  210. padding: 24upx 0;
  211. .shop-name {
  212. color: #333;
  213. font-weight: bold;
  214. font-size: 24upx;
  215. padding: 0 24upx 24upx;
  216. line-height: 30upx;
  217. .shop-logo {
  218. width: 30upx;
  219. height: 30upx;
  220. vertical-align: middle;
  221. margin-right: 10upx;
  222. }
  223. .order-status {
  224. color: $uni-color-primary;
  225. }
  226. }
  227. .goods-li:last-child {
  228. margin-bottom: 0;
  229. }
  230. .goods-li {
  231. padding: 30upx 20upx;
  232. margin-bottom: 20upx;
  233. .goods-img {
  234. width: 124upx;
  235. height: 124upx;
  236. border-radius: 10upx;
  237. }
  238. .goods-right {
  239. width: 520upx;
  240. margin-left: 20upx;
  241. .goods-name {
  242. color: #333;
  243. font-size: 28upx;
  244. }
  245. .goods-descrip {
  246. font-size: 22upx;
  247. color: #999;
  248. padding: 10upx 0;
  249. }
  250. .goods-price {
  251. .price {
  252. color: $price-color;
  253. font-size: 28upx;
  254. text {
  255. font-weight: bold;
  256. }
  257. }
  258. .sku {
  259. font-size: 22upx;
  260. color: #666;
  261. }
  262. .icon-jia {
  263. color: #666;
  264. font-size: 24upx;
  265. }
  266. .goods-num {
  267. font-size: 24upx;
  268. font-weight: bold;
  269. }
  270. }
  271. }
  272. }
  273. }
  274. }
  275. .model-box {
  276. width: 706upx;
  277. margin: 20upx auto 0;
  278. border-radius: 10upx;
  279. }
  280. .address-view {
  281. font-size: 32upx;
  282. position: relative;
  283. padding: 24upx;
  284. padding-left: 100upx;
  285. margin-bottom: 24rpx;
  286. background: #fff;
  287. .subtitle {
  288. font-size: 24upx;
  289. color: #6c6c6c;
  290. }
  291. .ad-icon {
  292. position: absolute;
  293. top: 50%;
  294. left: 24upx;
  295. font-size: 36upx;
  296. transform: translateY(-50%);
  297. display: block;
  298. width: 60upx;
  299. height: 60upx;
  300. line-height: 60upx;
  301. text-align: center;
  302. border-radius: 100%;
  303. color: #ffffff;
  304. background-color: #fe4543;
  305. }
  306. .ibonjinru-icon {
  307. position: absolute;
  308. top: 50%;
  309. right: 14upx;
  310. color: #999999;
  311. font-size: 28upx;
  312. transform: translateY(-50%);
  313. }
  314. }
  315. .express-view {
  316. .title {
  317. color: #2b85e4;
  318. }
  319. .ad-icon {
  320. font-size: 34rpx;
  321. background-color: #2b85e4;
  322. }
  323. }
  324. .order-info-view {
  325. // font-size: 24upx;
  326. color: #3c3c3c;
  327. .order-info-tit {
  328. font-size: 28upx;
  329. padding-bottom: 20upx;
  330. }
  331. .order-info-cont {
  332. font-size: 24upx;
  333. .info-item {
  334. line-height: 56upx;
  335. .subtitle {
  336. color: #666;
  337. }
  338. .money-val {
  339. font-size: 26upx;
  340. }
  341. }
  342. }
  343. .order-info-li {
  344. border-bottom: 1upx solid #f4f4f4;
  345. padding-bottom: 24upx;
  346. margin-bottom: 24upx;
  347. .info-item {
  348. line-height: 56upx;
  349. .subtitle {
  350. color: #666;
  351. }
  352. }
  353. &:last-child {
  354. margin-bottom: 0;
  355. border-bottom: 0 none;
  356. padding-bottom: 0;
  357. }
  358. }
  359. .order-price-view {
  360. text-align: right;
  361. font-size: 26upx;
  362. .price {
  363. color: $price-color;
  364. padding-left: 6upx;
  365. font-size: 32upx;
  366. font-weight: 600;
  367. }
  368. }
  369. }
  370. .botton-btn-view {
  371. background: #fff;
  372. position: fixed;
  373. left: 0;
  374. bottom: 0;
  375. width: 100%;
  376. padding: 20upx;
  377. font-size: 28upx;
  378. border-top: 1px solid #f4f4f4;
  379. text-align: right;
  380. .btnS {
  381. display: inline-block;
  382. min-width: 120upx;
  383. line-height: 50upx;
  384. padding: 0 20upx;
  385. color: #333;
  386. text-align: center;
  387. margin-right: 10upx;
  388. height: 50upx;
  389. font-size: 24upx;
  390. border-radius: 10upx;
  391. border: 1px solid #ccc;
  392. }
  393. .pay {
  394. border-color: $uni-color-primary;
  395. color: $uni-color-primary;
  396. }
  397. }
  398. .circleSty {
  399. display: inline-block;
  400. background-color: #9e9e9e;
  401. width: 20upx;
  402. height: 20upx;
  403. border-radius: 50%;
  404. margin-left: 20upx;
  405. }
  406. .subOrder {
  407. position: absolute;
  408. top: -10upx;
  409. left: 60upx;
  410. }
  411. </style>