teamDetails.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <template>
  2. <view class="center">
  3. <view class="box">
  4. <view class="title flex">
  5. <view class="flex">
  6. <view class="log"><image src="../../static/img/pgTip.png" mode="scaleToFill"></image></view>
  7. <view class="name">{{ item.name }}</view>
  8. <view class="lun">{{ item.lun }}</view>
  9. </view>
  10. <view v-if="item.status == 0" class="more text-gray">未开始</view>
  11. <view v-if="item.status >0" class="more text-success" >已开奖</view>
  12. </view>
  13. <view class="main">
  14. <view class="main-info rule">每轮限购1组,每组限购1份</view>
  15. <view class="main-info time">
  16. 开奖时间:
  17. <text>{{item.stopTime}}</text>
  18. </view>
  19. <view class="main-info new">该轮预约{{item.bingos+item.fails}}份,拼中{{item.bingos}}份,退回{{item.fails}}份</view>
  20. </view>
  21. </view>
  22. <view class="box">
  23. <view class="allTitle">
  24. <view class="title-left">第{{item.table_id}}组 预约份数/总份数:{{item.joins}}/{{item.join_number}}</view>
  25. <view class="title-right text-gray" v-if="item.status == 0">未开奖</view>
  26. <view class="title-right text-success" v-if="item.status == 1">已中奖</view>
  27. <view class="title-right text-danger" v-if="item.status == 2">未中奖</view>
  28. <view class="title-right text-warning" v-if="item.status == 3">未成团</view>
  29. </view>
  30. <view class="yu-main">
  31. <view class="img"><image src="../../static/img/bgTip2.png" mode="scaleToFill"></image></view>
  32. <view class="yu-info">
  33. <view class="info" v-if="item.status > 1">
  34. <view class="yu-font">回退本金</view>
  35. <view class="yu-num">{{item.cost+item.type}}</view>
  36. </view>
  37. <view class="info">
  38. <view class="yu-font">收益</view>
  39. <view class="yu-num">{{item.join_award+item.type}}</view>
  40. </view>
  41. <view class="info">
  42. <view class="yu-font">唯一凭证</view>
  43. </view>
  44. <view class="info">
  45. <view class="yu-num">{{item.order_id}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="boom">
  50. <view class="boom-font">当前组爆快</view>
  51. <!-- <view class="boom-num">
  52. LALA122002552000
  53. <br />
  54. LALA122002552000
  55. </view> -->
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. import { pinkLogDate } from '@/api/finance.js';
  62. export default {
  63. data() {
  64. return {
  65. id: '',
  66. item: {}
  67. };
  68. },
  69. onLoad(e) {
  70. this.id = e.id;
  71. this.getDate();
  72. },
  73. methods: {
  74. getDate() {
  75. pinkLogDate({}, this.id)
  76. .then(e => {
  77. const ls = e.data;
  78. const lun = ls.group_num > 0 ? ls.group_num + '轮' : '';
  79. const time = new Date(ls.pay_time * 1000);
  80. let sy = ls.join_award*ls.cost/100+'';
  81. const num = sy.split('.')[1]
  82. // 判断小数点是否超过8位数标
  83. if(num&&num.length>8){
  84. sy = (+sy).toFixed(8);
  85. }
  86. this.item = {
  87. name: ls.activity.name,
  88. lun,
  89. fen: 1,
  90. money: +ls.cost,
  91. type: ls.cost_money_type,
  92. time: time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate(),
  93. stopTime:'',
  94. image: ls.activity.background_image,
  95. id: ls.id,
  96. status: ls.status,
  97. bingos:ls.bingos,
  98. fails:ls.fails,
  99. table_id:ls.table_id,
  100. joins:ls.joins.length,
  101. join_number:ls.activity.join_number,
  102. cost:+ls.cost,
  103. join_award:+sy,
  104. order_id:ls.order_id
  105. };
  106. })
  107. .catch(e => {
  108. console.log(e);
  109. });
  110. }
  111. }
  112. };
  113. </script>
  114. <style lang="scss">
  115. .center,
  116. page {
  117. height: 100%;
  118. background: #f7fbfe;
  119. }
  120. .box {
  121. margin: 30rpx auto 0;
  122. width: 690rpx;
  123. background: #ffffff;
  124. box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
  125. border-radius: 20rpx;
  126. padding: 26rpx 36rpx 30rpx 30rpx;
  127. .title {
  128. .log {
  129. width: 48rpx;
  130. height: 46rpx;
  131. image {
  132. width: 100%;
  133. height: 100%;
  134. }
  135. }
  136. .name {
  137. padding-left: 12rpx;
  138. font-size: 34rpx;
  139. font-family: PingFang SC;
  140. font-weight: bold;
  141. color: #0f253a;
  142. }
  143. .lun {
  144. padding-left: 10rpx;
  145. font-size: 26rpx;
  146. font-family: PingFang SC;
  147. font-weight: 500;
  148. color: #6d7c88;
  149. }
  150. .more {
  151. padding-left: 140rpx;
  152. font-size: 28rpx;
  153. font-family: PingFang SC;
  154. font-weight: bold;
  155. color: #44969d;
  156. }
  157. }
  158. .main {
  159. margin-top: 26rpx;
  160. .main-info {
  161. padding-top: 16rpx;
  162. }
  163. .rule {
  164. font-size: 26rpx;
  165. font-family: PingFang SC;
  166. font-weight: 500;
  167. color: #0f253a;
  168. }
  169. .time {
  170. font-size: 26rpx;
  171. font-family: PingFang SC;
  172. font-weight: 500;
  173. color: #6d7c88;
  174. text {
  175. color: #0f253a;
  176. }
  177. }
  178. .new {
  179. font-size: 24rpx;
  180. font-family: PingFang SC;
  181. font-weight: 500;
  182. color: #ff4c4c;
  183. }
  184. }
  185. }
  186. .allTitle {
  187. display: flex;
  188. justify-content: space-between;
  189. align-items: center;
  190. .title-left {
  191. font-size: 34rpx;
  192. font-family: PingFang SC;
  193. font-weight: bold;
  194. color: #0f253a;
  195. }
  196. .title-right {
  197. font-size: 26rpx;
  198. font-family: PingFang SC;
  199. font-weight: 500;
  200. color: #6d7c88;
  201. }
  202. }
  203. .yu-main {
  204. margin-top: 40rpx;
  205. display: flex;
  206. justify-content: flex-start;
  207. align-items: center;
  208. .img {
  209. width: 180rpx;
  210. height: 155rpx;
  211. flex-shrink: 0;
  212. image {
  213. width: 100%;
  214. height: 100%;
  215. }
  216. }
  217. .yu-info {
  218. padding-top: 14rpx;
  219. margin-left: 20rpx;
  220. width: 100%;
  221. .info {
  222. display: flex;
  223. justify-content: space-between;
  224. .yu-font {
  225. flex-shrink: 0;
  226. font-size: 26rpx;
  227. font-family: PingFang SC;
  228. font-weight: 500;
  229. color: #6d7c88;
  230. }
  231. .yu-num {
  232. font-size: 26rpx;
  233. font-family: PingFang SC;
  234. font-weight: bold;
  235. color: #0f253a;
  236. }
  237. }
  238. }
  239. }
  240. .boom {
  241. padding-left: 14rpx;
  242. margin-top: 28rpx;
  243. display: flex;
  244. justify-content: space-between;
  245. .boom-font {
  246. font-size: 26rpx;
  247. font-family: PingFang SC;
  248. font-weight: 500;
  249. color: #6d7c88;
  250. }
  251. .boom-num {
  252. font-size: 26rpx;
  253. font-family: PingFang SC;
  254. font-weight: bold;
  255. color: #0f253a;
  256. }
  257. }
  258. </style>