index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <style lang="scss">
  2. .app-bg{
  3. position: absolute;
  4. image{width: 100vw;height: 61vw;}
  5. }
  6. .app-h{
  7. height: 61vw;
  8. }
  9. .app-body{
  10. position: relative;
  11. top: -30vw;
  12. padding: 0px 40rpx;
  13. }
  14. .app-top-inner {
  15. background: #FFFFFF;
  16. border-radius: 20px;
  17. .avatar{
  18. position: relative;
  19. top: -60rpx;
  20. .img{
  21. border: 2px solid #F9F9F9;border-radius: 50%;
  22. image{width: 140rpx;height: 140rpx;border-radius: 50%;margin-left: 1px;margin-top: 1px;}
  23. }
  24. .gz-tag{
  25. position: absolute;
  26. bottom: 16px;
  27. image{width: 48px;height: 15px;}
  28. }
  29. .nickname{
  30. font-weight: bold;
  31. font-size: 32rpx;
  32. color: #333333;
  33. }
  34. }
  35. .top-foot{
  36. width: 100%;
  37. margin-bottom: 30rpx;
  38. .item{
  39. width: calc(33% - 1px);
  40. display: flex;
  41. flex-direction: column;
  42. justify-content: center;
  43. align-items: center;
  44. .count{
  45. font-weight: bold;
  46. font-size: 36rpx;
  47. color: #333333;
  48. }
  49. .label{
  50. font-weight: 500;
  51. font-size: 24rpx;
  52. color: #787878;
  53. margin-top: 10rpx;
  54. }
  55. }
  56. .line{
  57. width: 1px;
  58. height: 42rpx;
  59. background: #999999;
  60. opacity: 0.38;
  61. }
  62. }
  63. }
  64. .pannel{
  65. background: #FFFFFF;
  66. border-radius: 20px;
  67. padding: 30rpx;
  68. margin-top: 10px;
  69. .top{
  70. margin-bottom: 20rpx;
  71. .logo{
  72. width: 100rpx;
  73. height: 100rpx;
  74. }
  75. .info{
  76. margin-left: 20rpx;
  77. width: calc(100% - 120rpx);
  78. .title{
  79. font-weight: bold;
  80. font-size: 34rpx;
  81. color: #081734;
  82. }
  83. .time{
  84. margin-top: 20rpx;
  85. image{width: 30rpx;height: 27rpx;}
  86. .label{
  87. font-weight: 500;
  88. font-size: 22rpx;
  89. color: #666666;
  90. margin-left: 10rpx;
  91. }
  92. .v{font-size: 22rpx;color: #333;}
  93. }
  94. }
  95. }
  96. .status{
  97. padding: 20rpx 0;
  98. .people{
  99. image{width: 24rpx;height: 22rpx;margin-right: 10rpx;}
  100. .label{color: #666666;font-size: 26rpx;}
  101. .value{font-size: 26rpx;color: #000;margin-left: 4px;}
  102. }
  103. border-bottom: 1px solid #f1f1f1;
  104. }
  105. .gz-foot{
  106. padding-top: 20rpx;
  107. .left{
  108. font-weight: 500;
  109. font-size: 28rpx;
  110. color: #303133;
  111. .count{
  112. font-weight: bold;
  113. font-size: 32rpx;
  114. color: #FF4C4C;
  115. }
  116. }
  117. .right{
  118. .label{
  119. font-weight: 500;
  120. font-size: 24rpx;
  121. color: #999999;
  122. }
  123. image{
  124. width: 20rpx;
  125. height:20rpx
  126. }
  127. }
  128. }
  129. }
  130. .sbtn{
  131. margin-top: 10px;
  132. .btn{
  133. width: calc(50% - 10rpx);
  134. margin-right: 10rpx;
  135. margin-left: 0;
  136. background: #FFFFFF;
  137. border-radius: 20rpx;
  138. margin-bottom: 20rpx;
  139. padding: 60rpx 0;
  140. &:nth-child(2n){
  141. margin-right: 0rpx;
  142. margin-left : 10rpx;
  143. }
  144. image{
  145. width: 70rpx;
  146. height: 70rpx;
  147. }
  148. .text{
  149. font-weight: 500;
  150. font-size: 30rpx;
  151. color: #4D4D4D;
  152. margin-top: 24rpx;
  153. }
  154. }
  155. }
  156. </style>
  157. <template>
  158. <view>
  159. <view class="app-bg">
  160. <image src="/static/img/detail_bg.png"></image>
  161. </view>
  162. <view class="app-h">
  163. <uni-nav-bar color="#fff" :border="false" statusBar backgroundColor="transparent" left-icon="left" @clickLeft="utils.navigateBack()" fixed title="馆长中心"></uni-nav-bar>
  164. </view>
  165. <view class="app-body">
  166. <view class="app-top-inner fx-h fx-bc">
  167. <view class="avatar fx-h fx-bc fx-ac">
  168. <view class="img">
  169. <image :src="user.avatar || '/static/img/user-avatar1.png'" mode="aspectFill"></image>
  170. </view>
  171. <view class="gz-tag">
  172. <image src="/static/img/gz_tip.png"></image>
  173. </view>
  174. <view class="nickname" style="margin-top: 3px;">{{ user.nickname || "" }}</view>
  175. </view>
  176. <view class="fx-g1"></view>
  177. <view class="top-foot fx-r fx-bc fx-ac">
  178. <view class="item">
  179. <view class="count">{{ data.total.xfMoney || '0.00' }}</view>
  180. <view class="label">月实耗卷</view>
  181. </view>
  182. </view>
  183. </view>
  184. <view class="pannel" v-for="item in data.auction">
  185. <view class="gzaction">
  186. <view class="top fx-r">
  187. <image class="logo" mode="aspectFill" src="/static/img/gz_logo.png"></image>
  188. <view class="info">
  189. <view class="title">{{ item.nickname || "" }}({{ item.next_day || "" }})</view>
  190. <view class="time fx-r" v-if="item.add_time > 0">
  191. <image src="/static/img/c-time.png"></image>
  192. <view class="label">预约时间:</view>
  193. <view class="v">{{ utils.date('H:i',item.add_time) }}~{{ utils.date('H:i',item.end_time) }}</view>
  194. </view>
  195. <view class="time fx-r" v-if="item.add_time > 0">
  196. <image src="/static/img/c-time.png"></image>
  197. <view class="label">入场时间:</view>
  198. <view class="v">{{ utils.date('H:i',item.radd_time) }}-{{ utils.date('H:i',item.rend_time) }}</view>
  199. </view>
  200. </view>
  201. </view>
  202. <view class="status fx-r fx-bc fx-ac">
  203. <view class="people fx-r fx-bc fx-ac">
  204. <image src="/static/img/gz_yy.png"></image>
  205. <view class="label">预约人数:</view>
  206. <view class="value">{{ item.booking_count }}人</view>
  207. </view>
  208. <view class="fx-g1"></view>
  209. <view class="people fx-r fx-bc fx-ac">
  210. <image src="/static/img/gz_dd.png"></image>
  211. <view class="label">被约单数:</view>
  212. <view class="value">{{ item.booking_size || "0" }}单</view>
  213. </view>
  214. </view>
  215. <view class="status fx-r fx-bc fx-ac">
  216. <view class="people fx-r fx-bc fx-ac">
  217. <image src="/static/img/gz_yy.png"></image>
  218. <view class="label">剩余单量:</view>
  219. <view class="value">{{ item.residue_size || "0" }}单</view>
  220. </view>
  221. <view class="fx-g1"></view>
  222. <view class="people fx-r fx-bc fx-ac">
  223. <image src="/static/img/gz_dd.png"></image>
  224. <view class="label">总单数量:</view>
  225. <view class="value">{{ item.pro_count || "0" }}单</view>
  226. </view>
  227. </view>
  228. <view class="status gz-foot fx-r fx-bc fx-ac">
  229. <view class="people fx-r fx-bc fx-ac">
  230. <image src="/static/img/gz_yy.png"></image>
  231. <view class="label">抢光时间:</view>
  232. <view class="value">{{ item.over_time || "-:-:-" }}</view>
  233. </view>
  234. <view class="fx-g1"></view>
  235. <view class="right fx-r fx-bc" @tap="tapOpen" :data-url="'./booking?id=' + item.id">
  236. <view class="label">预约记录</view>
  237. <image src="/static/img/ic_next.png"></image>
  238. </view>
  239. </view>
  240. </view>
  241. </view>
  242. <view class="sbtn fx-r">
  243. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/order">
  244. <image src="/static/img/gz_order.png"></image>
  245. <view class="text">订单管理</view>
  246. </view>
  247. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/disassemble">
  248. <image src="/static/img/gz_cd.png"></image>
  249. <view class="text">拆分记录</view>
  250. </view>
  251. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/slimming">
  252. <image src="/static/img/gz_ss.png"></image>
  253. <view class="text">瘦身记录</view>
  254. </view>
  255. <view class="btn fx-bc fx-ac fx-h" hidden @tap="tapOpen" data-url="/pages/gz/recycle">
  256. <image src="/static/img/gz_hs.png"></image>
  257. <view class="text">回收记录</view>
  258. </view>
  259. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/user">
  260. <image src="/static/img/gz_hs.png"></image>
  261. <view class="text">馆内成员</view>
  262. </view>
  263. </view>
  264. </view>
  265. </view>
  266. </template>
  267. <script>
  268. import {mapState,mapMutations } from 'vuex';
  269. export default {
  270. computed: mapState(['user']),
  271. data() {
  272. return {
  273. statusBarHeight : 20,
  274. data : {
  275. total : {},
  276. auction : []
  277. }
  278. }
  279. },
  280. onLoad(options) {
  281. this.initView();
  282. },
  283. methods: {
  284. /**
  285. * 加载基础配置
  286. */
  287. initView:function(){
  288. uni.showLoading({ title: '获取数据中..' });
  289. var post = {};
  290. post.id = this.orderId;
  291. this
  292. .request
  293. .post("gzInit",post)
  294. .then(res => {
  295. uni.hideLoading();
  296. if(res.code == 200) {
  297. this.data = res.data;
  298. } else {
  299. this.utils.Tip(res.msg);
  300. }
  301. })
  302. .catch(res=>{
  303. uni.hideLoading();
  304. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  305. });
  306. },
  307. /**
  308. * 打开Open
  309. * @param {Object} ev
  310. */
  311. tapOpen: function(ev) {
  312. let url = ev.currentTarget.dataset.url;
  313. this.utils.navigateTo(url);
  314. },
  315. }
  316. }
  317. </script>