OrderDetail.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <!-- OrderDetailBody.vue -->
  2. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  3. <member-base :show="false"><view class="div">
  4. <view class="div common-header-wrap">
  5. <view :style="'height:'+navHeight+'px'"></view>
  6. <view class="common-header-holder"></view>
  7. <view class="common-header-fixed">
  8. <title-header />
  9. <uni-nav-bar title="兑换详情" class="common-header" left-icon="back" @clickLeft="goBack()">
  10. </uni-nav-bar>
  11. </view>
  12. </view>
  13. <view
  14. class="div order-body"
  15. v-if="order_info"
  16. >
  17. <view class="div order_state">
  18. <text class="i iconfont" v-if="order_info.point_orderstate == '40'">&#xe61b;</text>
  19. <text class="i iconfont" v-else>&#xe61a;</text>
  20. <text class="span">{{order_info.point_orderstatetext}}</text>
  21. </view>
  22. <view class="div address">
  23. <view class="div">
  24. <text class="span">{{ orderaddress_info.pointoa_truename }}</text>
  25. <text class="span mobile">{{ orderaddress_info.pointoa_mobphone }}</text>
  26. </view>
  27. <view class="p" style="-webkit-box-orient: vertical; -webkit-line-clamp: 2;">
  28. {{ orderaddress_info.pointoa_areainfo }}{{ orderaddress_info.pointoa_address }}
  29. </view>
  30. </view>
  31. <view
  32. class="div containers"
  33. v-for="item in prod_list"
  34. v-bind:key="item.pointog_goodsid"
  35. @click="goDetail(item.pointog_goodsid)"
  36. >
  37. <image mode="aspectFit"
  38. class="img photo"
  39. v-bind:src="item.pointog_goodsimage"
  40. />
  41. <view class="div right-wrapper">
  42. <label class="title">{{ item.pointog_goodsname }}</label>
  43. <view class="div desc-wrapper">
  44. <label class="price"
  45. >{{ item.pointog_goodspoints }}积分</label
  46. >
  47. <label class="count">x{{ item.pointog_goodsnum }}</label>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="div detail">
  52. <view class="div number">
  53. <label
  54. >订单编号:{{ order_info.point_ordersn }}
  55. </label>
  56. <view class="p">
  57. 下单时间:{{order_info.point_addtime}}
  58. </view>
  59. </view>
  60. </view>
  61. <view
  62. class="div desc section-header section-footer"
  63. >
  64. <label class="amount"
  65. >实付款 : <text class="span"> {{ order_info.point_allpoint }}积分</text>
  66. </label>
  67. </view>
  68. </view>
  69. </view></member-base>
  70. </template>
  71. <script>
  72. import {getFontSize} from '@/util/common'
  73. import { urlencode } from '@/util/common'
  74. import TitleHeader from '../../TitleHeader'
  75. import MemberBase from '../MemberBase'
  76. import { getOrderInfo } from '../../../api/memberPointsorder'
  77. export default {
  78. name:'MemberOrderDetail',
  79. mounted(){
  80. // #ifdef MP-WEIXIN
  81. this.navHeight = uni.getMenuButtonBoundingClientRect().top
  82. // #endif
  83. },
  84. computed:{
  85. fontSize(){
  86. return getFontSize()
  87. },
  88. },
  89. data(){
  90. return {
  91. navHeight: 0,
  92. order_info: {},
  93. orderaddress_info:{},
  94. prod_list:{},
  95. }
  96. },
  97. components:{
  98. TitleHeader,
  99. MemberBase,
  100. },
  101. onLoad: function (option) {
  102. if (option.point_orderid) {
  103. getOrderInfo(option.point_orderid).then(res => {
  104. this.order_info = res.result.order_info
  105. this.orderaddress_info = res.result.orderaddress_info
  106. this.prod_list=res.result.prod_list
  107. }).catch(function (error) {
  108. uni.showToast({icon:'none',title: error.message})
  109. })
  110. }
  111. },
  112. methods:{
  113. goDetail(id){
  114. uni.navigateTo({url:'/pages/home/pointsgoods/Detail'+'?'+urlencode({ 'pgoods_id': id } )})
  115. },
  116. goBack(){uni.navigateBack({delta:1})},
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .common-header-wrap .common-header{box-shadow: unset}
  122. .order-body {
  123. overflow: auto;
  124. height: 100%;
  125. position: absolute;
  126. width: 100%;
  127. .desc{
  128. .container {
  129. display: flex;
  130. flex-direction: row;
  131. justify-content: flex-start;
  132. align-items: center;
  133. background-color: #fff;
  134. }
  135. .title {
  136. width:5rem;
  137. font-size:$subFontSize;
  138. color: #333;
  139. margin-left:0.6rem;
  140. }
  141. .subtitle {
  142. flex: 1;
  143. margin-left:1rem;
  144. margin-right:0.6rem;
  145. color: $primaryColor;
  146. font-size:$subFontSize;
  147. text-align: right;
  148. }
  149. }
  150. }
  151. .order_state {
  152. background:$primaryColor;
  153. height:3.5rem;
  154. display: flex;
  155. justify-content: flex-start;
  156. align-items: center;
  157. .i {
  158. color:#fff;
  159. font-size:1.2rem;
  160. padding: 0 0.5rem;
  161. }
  162. .span {
  163. font-size:$h2;
  164. color: #fff;
  165. }
  166. }
  167. .containers {
  168. display: flex;
  169. flex-direction: row;
  170. justify-content: flex-start;
  171. align-items: stretch;
  172. background-color: #fff;
  173. border-bottom: 1px solid #e8eaed;
  174. }
  175. .photo {
  176. width:4rem;
  177. height:4rem;
  178. margin:0.75rem 0.5rem 0.75rem 0.75rem;
  179. border: 1px solid #e8eaed;
  180. flex-basis:4rem;
  181. flex-shrink: 0;
  182. }
  183. .right-wrapper {
  184. display: flex;
  185. flex-direction: column;
  186. justify-content: flex-start;
  187. align-items: stretch;
  188. padding: 0 0.75rem 0 0;
  189. width: 100%;
  190. overflow: hidden;
  191. }
  192. .title {
  193. margin-top:0.75rem;
  194. color: #333;
  195. font-size:$subFontSize;
  196. overflow: hidden;
  197. text-overflow: ellipsis;
  198. white-space: nowrap;
  199. }
  200. .property {
  201. font-size:$fontSize;
  202. color: #7c7f88;
  203. padding-top:0.5rem;
  204. }
  205. .count {
  206. margin-top:0.2rem;
  207. color: #7c7f88;
  208. font-size:$fontSize;
  209. margin-right:0.5rem;
  210. }
  211. .desc-wrapper {
  212. height:1rem;
  213. display: flex;
  214. flex-direction: row;
  215. justify-content: space-between;
  216. align-items: center;
  217. padding-top:1rem;
  218. }
  219. .price {
  220. color: $primaryColor;
  221. font-size:$h2;
  222. margin-left: 0;
  223. }
  224. .count {
  225. color: #7c7f88;
  226. font-size:$h2;
  227. margin-right:0.5rem;
  228. }
  229. .address {
  230. height:4.3rem;
  231. background-color: #fff;
  232. margin-bottom:0.5rem;
  233. .div {
  234. padding:0.5rem 0.5rem 0;
  235. }
  236. .img {
  237. height:0.8rem;
  238. }
  239. .span {
  240. color: #333;
  241. font-size:$h2;
  242. &.mobile {
  243. padding-left:1rem;
  244. }
  245. }
  246. .p {
  247. margin: 0.25rem 0.9rem 0.5rem 0.5rem;
  248. font-size:$subFontSize;
  249. color: #7c7f88;
  250. overflow: hidden;
  251. text-overflow: ellipsis;
  252. display: -webkit-box;
  253. -webkit-box-orient: vertical;
  254. -webkit-line-clamp: 2;
  255. }
  256. }
  257. .contact {
  258. display: flex;
  259. justify-content: flex-end;
  260. align-items: center;
  261. height:2.3rem;
  262. background-color: #fff;
  263. margin-top:0.4rem;
  264. border-bottom: 1px solid #e8eaed;
  265. padding: 0 0.65rem;
  266. .span {
  267. font-size:$fontSize;
  268. color: #333;
  269. padding-right:0.3rem;
  270. }
  271. .img {
  272. width:0.6rem;
  273. height:0.65rem;
  274. }
  275. }
  276. .detail {
  277. display: flex;
  278. flex-direction: column;
  279. font-size:$subFontSize;
  280. color: #7c7f88;
  281. background-color: #fff;
  282. margin:0.4rem 0;
  283. box-sizing: border-box;
  284. .number {
  285. padding:0.7rem 0.8rem;
  286. border-bottom: 1px solid #e8eaed;
  287. .p {
  288. padding-top:0.3rem;
  289. font-size:$subFontSize;
  290. }
  291. .button {
  292. color: #7c7f88;
  293. height:1rem;
  294. background-color: #fff;
  295. border: 1px solid #7c7f88;
  296. width:2.7rem;
  297. height:1rem;
  298. border-radius:0.1rem;
  299. font-size:$subFontSize;
  300. display:flex;align-items:center;justify-content:center;
  301. }
  302. }
  303. .pay {
  304. border-bottom: 1px solid #e8eaed;
  305. padding:0.7rem 0.8rem;
  306. }
  307. .givetime {
  308. padding:0.7rem 0.8rem;
  309. font-size:$subFontSize;
  310. }
  311. input {
  312. background-color: #fff;
  313. border: 1px solid #7c7f88;
  314. }
  315. }
  316. .desc {
  317. background-color: #fff;
  318. display: flex;
  319. flex-direction: column;
  320. justify-content: flex-start;
  321. align-items: stretch;
  322. box-sizing: border-box;
  323. margin-bottom:4rem;
  324. .desc-item {
  325. flex: 1;
  326. margin-top:0.5rem;
  327. }
  328. .amount {
  329. display: flex;
  330. justify-content: flex-end;
  331. font-size:$subFontSize;
  332. color: #333;
  333. padding-right:0.75rem;
  334. height:2.2rem;
  335. line-height:2.2rem;
  336. .span {
  337. font-size:$h2;
  338. color: $primaryColor;
  339. }
  340. }
  341. }
  342. .ship {
  343. margin-bottom: 0;
  344. }
  345. </style>