checkdetails.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="">
  3. <!-- <u-navbar
  4. :title="title"
  5. :placeholder="true"
  6. @leftClick="leftClick"
  7. :autoBack="true"
  8. :safeAreaInsetTop="true"
  9. >
  10. </u-navbar> -->
  11. <view class="page-wrap">
  12. <view class="block goods u-flex u-col-top">
  13. <img class="img" :src="orderDetails.mainImg" alt="">
  14. <view class="text">
  15. <view class="title ellipsis-2">{{orderDetails.goodsName}}</view>
  16. <view class="bottom u-flex u-row-between">
  17. <view class="price">{{orderDetails.credit}}积分</view>
  18. <view class="quantity">共{{orderDetails.quantity}}件</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="block info">
  23. <view class="info-item u-flex">
  24. <view class="til">姓 名</view>
  25. <text>{{orderDetails.name}}</text>
  26. </view>
  27. <view class="info-item u-flex" v-if="orderDetails.checkTime">
  28. <text class="til">部 门</text>
  29. <text>{{orderDetails.dept}}</text>
  30. </view>
  31. <view class="info-item u-flex">
  32. <text class="til">核销时间</text>
  33. <text>{{orderDetails.checkTime}}</text>
  34. </view>
  35. <view class="info-item u-flex" v-if="orderDetails.checkName">
  36. <text class="til">核销人</text>
  37. <text>{{orderDetails.checkName}}</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. id:'',
  48. orderDetails:{},
  49. }
  50. },
  51. onLoad(page) {
  52. this.id = page.id;
  53. },
  54. onShow() {
  55. this.getOrderDetails(this.id);
  56. },
  57. computed:{
  58. // payType(){
  59. // return function(value){
  60. // let payTypeList = ['', '微信', '余额', '积分']
  61. // return '-' + payTypeList[value]
  62. // }
  63. // }
  64. },
  65. methods: {
  66. leftClick(){
  67. console.log('orderdetails leftClick');
  68. },
  69. getOrderDetails(id){
  70. this.$u.api.checkDetail({id:id}).then(res=>{
  71. this.orderDetails = res.data
  72. // console.log('orderDetails',JSON.parse(JSON.stringify(res.data)));
  73. }).catch(err=>{
  74. console.log('getOrderDetails',err);
  75. })
  76. },
  77. }
  78. }
  79. </script>
  80. <style>
  81. page{
  82. background: #F5F9FC;
  83. }
  84. </style>
  85. <style lang="scss" scoped>
  86. .block{
  87. background: #FFFFFF;
  88. border-radius: 24rpx;
  89. margin-bottom: 10rpx;
  90. padding: 30rpx;
  91. }
  92. .goods{
  93. .img{
  94. width: 180rpx;
  95. height: 180rpx;
  96. }
  97. .text{
  98. flex: 1;
  99. margin-left: 40rpx;
  100. .title{
  101. font-size: 30rpx;
  102. font-family: PingFangSC-Regular, PingFang SC;
  103. font-weight: 400;
  104. color: #333333;
  105. line-height: 42rpx;
  106. margin-bottom: 20rpx;
  107. min-height: 84rpx;
  108. }
  109. .bottom{
  110. font-size: 28rpx;
  111. font-family: PingFangSC-Regular, PingFang SC;
  112. font-weight: 400;
  113. color: #999999;
  114. line-height: 40rpx;
  115. .price{
  116. font-size: 32rpx;
  117. font-weight: 600;
  118. color: #FFB100;
  119. line-height: 44rpx;
  120. }
  121. }
  122. }
  123. }
  124. .info{
  125. .info-item{
  126. font-size: 30rpx;
  127. font-family: PingFangSC-Regular, PingFang SC;
  128. font-weight: 400;
  129. color: #333333;
  130. line-height: 42rpx;
  131. margin-bottom: 20rpx;
  132. .til{
  133. text-align: end;
  134. min-width: 122rpx;
  135. color: #999;
  136. margin-right: 40rpx;
  137. }
  138. }
  139. }
  140. .status{
  141. padding: 26rpx 0;
  142. background: #FFFFFF;
  143. border-radius: 24rpx;
  144. font-size: 34rpx;
  145. font-weight: 600;
  146. color: #009AEF;
  147. line-height: 48rpx;
  148. text-align: center;
  149. &.status1{
  150. color: #333;
  151. }
  152. &.status2{
  153. color: #999;
  154. }
  155. }
  156. </style>