index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  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 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.booking_count }}人</view>
  233. </view>
  234. <view class="fx-g1"></view>
  235. <view class="people fx-r fx-bc fx-ac">---</view>
  236. </view>
  237. <view class="status fx-r fx-bc fx-ac">
  238. <view class="people fx-r fx-bc fx-ac">
  239. <image src="/static/img/gz_yy.png"></image>
  240. <view class="label">被约小单数:</view>
  241. <view class="value">{{ item.booking_size_fresh }}人</view>
  242. </view>
  243. <view class="fx-g1"></view>
  244. <view class="people fx-r fx-bc fx-ac">
  245. <image src="/static/img/gz_dd.png"></image>
  246. <view class="label">被约大单数:</view>
  247. <view class="value">{{ item.booking_size - item.booking_size_fresh || "0" }}单</view>
  248. </view>
  249. </view>
  250. <view class="status fx-r fx-bc fx-ac">
  251. <view class="people fx-r fx-bc fx-ac">
  252. <image src="/static/img/gz_yy.png"></image>
  253. <view class="label">剩余小单量:</view>
  254. <view class="value">{{ item.residue_size_fresh }}人</view>
  255. </view>
  256. <view class="fx-g1"></view>
  257. <view class="people fx-r fx-bc fx-ac">
  258. <image src="/static/img/gz_dd.png"></image>
  259. <view class="label">剩余大单量:</view>
  260. <view class="value">{{ item.residue_size - item.residue_size_fresh || "0" }}单</view>
  261. </view>
  262. </view>
  263. <view class="status fx-r fx-bc fx-ac">
  264. <view class="people fx-r fx-bc fx-ac">
  265. <image src="/static/img/gz_yy.png"></image>
  266. <view class="label">总小单数:</view>
  267. <view class="value">{{ item.pro_count_fresh }}人</view>
  268. </view>
  269. <view class="fx-g1"></view>
  270. <view class="people fx-r fx-bc fx-ac">
  271. <image src="/static/img/gz_dd.png"></image>
  272. <view class="label">总大单数:</view>
  273. <view class="value">{{ item.pro_count - item.pro_count_fresh || "0" }}单</view>
  274. </view>
  275. </view>
  276. <view class="status gz-foot fx-r fx-bc fx-ac">
  277. <view class="people fx-r fx-bc fx-ac">
  278. <image src="/static/img/gz_yy.png"></image>
  279. <view class="label">抢光时间:</view>
  280. <view class="value">{{ item.over_time || "-:-:-" }}</view>
  281. </view>
  282. <view class="fx-g1"></view>
  283. <view class="right fx-r fx-bc" @tap="tapOpen" :data-url="'./booking?id=' + item.id">
  284. <view class="label">预约记录</view>
  285. <image src="/static/img/ic_next.png"></image>
  286. </view>
  287. </view>
  288. </view>
  289. </view>
  290. <view class="sbtn fx-r">
  291. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/order">
  292. <image src="/static/img/gz_order.png"></image>
  293. <view class="text">订单管理</view>
  294. </view>
  295. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/disassemble">
  296. <image src="/static/img/gz_cd.png"></image>
  297. <view class="text">拆分记录</view>
  298. </view>
  299. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/slimming">
  300. <image src="/static/img/gz_ss.png"></image>
  301. <view class="text">瘦身记录</view>
  302. </view>
  303. <view class="btn fx-bc fx-ac fx-h" hidden @tap="tapOpen" data-url="/pages/gz/recycle">
  304. <image src="/static/img/gz_hs.png"></image>
  305. <view class="text">回收记录</view>
  306. </view>
  307. <view class="btn fx-bc fx-ac fx-h" @tap="tapOpen" data-url="/pages/gz/user">
  308. <image src="/static/img/gz_hs.png"></image>
  309. <view class="text">馆内成员</view>
  310. </view>
  311. </view>
  312. </view>
  313. </view>
  314. </template>
  315. <script>
  316. import {mapState,mapMutations } from 'vuex';
  317. export default {
  318. computed: mapState(['user']),
  319. data() {
  320. return {
  321. statusBarHeight : 20,
  322. data : {
  323. total : {},
  324. auction : []
  325. }
  326. }
  327. },
  328. onLoad(options) {
  329. this.initView();
  330. },
  331. methods: {
  332. /**
  333. * 加载基础配置
  334. */
  335. initView:function(){
  336. uni.showLoading({ title: '获取数据中..' });
  337. var post = {};
  338. post.id = this.orderId;
  339. this
  340. .request
  341. .post("gzInit",post)
  342. .then(res => {
  343. uni.hideLoading();
  344. if(res.code == 200) {
  345. this.data = res.data;
  346. } else {
  347. this.utils.Tip(res.msg);
  348. }
  349. })
  350. .catch(res=>{
  351. uni.hideLoading();
  352. uni.showModal({title: '系统提示',content: '加载失败,返回在尝试',showCancel: false});
  353. });
  354. },
  355. /**
  356. * 打开Open
  357. * @param {Object} ev
  358. */
  359. tapOpen: function(ev) {
  360. let url = ev.currentTarget.dataset.url;
  361. this.utils.navigateTo(url);
  362. },
  363. }
  364. }
  365. </script>