list.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <view>
  3. <view v-if="datalist.length>0">
  4. <!-- 预约 -->
  5. <block v-if="type==1">
  6. <view class="ylist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
  7. <view class="ytop">
  8. <image :src="topbg" class="ytbg"></image>
  9. <view class="ytime flexc"><view class="flex0">预约时间:</view>
  10. <view class="lh18">{{ite.visitDate}} {{typeFn(ite.visitTime)}}</view>
  11. <view class="ytype" v-if="ite.reservatType==1">团体</view>
  12. <view class="ytype" v-if="ite.reservatType==2">散客</view>
  13. </view>
  14. <view class="ytip">
  15. <block v-if="ite.visitStatus==1&&ite.reservatType==2">
  16. <image :src="dbg"></image>
  17. <view >待参观</view>
  18. </block>
  19. <block v-if="ite.visitStatus==1&&ite.reservatType==1&&ite.visitType==3">
  20. <image :src="dbg"></image>
  21. <view>待参观</view>
  22. </block>
  23. <block v-if="ite.visitStatus==1&&ite.reservatType==1&&ite.visitType!=3">
  24. <view class="tsbtn co1" v-if="ite.visitType==1">待审核</view>
  25. <view class="tsbtn co3" v-if="ite.visitType==2">已拒绝</view>
  26. </block>
  27. <block v-if="ite.visitStatus==2">
  28. <image :src="ybg"></image>
  29. <view>已参观</view>
  30. </block>
  31. </view>
  32. </view>
  33. <view class="ybox">
  34. <view class="yblist w50" v-if="ite.reservatType==1"><text>单位名称:</text>{{ite.visitUnitName||''}}</view>
  35. <view class="yblist w50"><text>参观人数:</text>{{ite.visitNum||''}}人</view>
  36. <view class="yblist w50"><text>联系人:</text>{{ite.visitName||''}}</view>
  37. <view class="yblist w50"><text>联系电话:</text>{{ite.visitPhone||''}}</view>
  38. <view class="yblist">
  39. <view class="line"></view>
  40. </view>
  41. <view class="yblist w50"><text>是否接待:</text>{{ite.isReception=='Y'?'是':'否'||''}}</view>
  42. <view class="yblist w50" v-if="ite.isReception=='Y'"><text>接待人:</text>{{ite.receptionName||''}}</view>
  43. <view class="yblist w50" v-if="ite.isReception=='Y'"><text>接待电话:</text>{{ite.receptionPhone||''}}</view>
  44. </view>
  45. </view>
  46. </block>
  47. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  48. </view>
  49. <block v-else>
  50. <no-data></no-data>
  51. </block>
  52. </view>
  53. </template>
  54. <script>
  55. import noData from "@/components/nodata/nodata.vue"
  56. export default {
  57. props:{
  58. datalist: {
  59. type: Array,
  60. default () {
  61. return []
  62. }
  63. },
  64. wtdt:{
  65. type: String,
  66. default () {
  67. return ''
  68. }
  69. },
  70. type:{
  71. type: [String,Number],
  72. default () {
  73. return ''
  74. }
  75. },
  76. },
  77. components:{
  78. noData
  79. },
  80. data(){
  81. return{
  82. topbg:require("@/static/images/order/staffs/topbg.png"),
  83. dbg:require("@/static/images/order/staffs/dbg.png"),
  84. dsbg:require("@/static/images/order/staffs/dsbg.png"),
  85. ybg:require("@/static/images/order/staffs/ybg.png"),
  86. }
  87. },
  88. onLoad: function() {
  89. },
  90. methods:{
  91. getDetail(e){
  92. this.$emit('getDetail',e)
  93. },
  94. typeFn(data){
  95. if(data){
  96. var newArr=[]
  97. var astr=data.split('-')
  98. astr.forEach(ite=>{
  99. var a=ite.substring(0,5);
  100. newArr.push(a)
  101. })
  102. return newArr.join('-')
  103. }else{
  104. return ''
  105. }
  106. },
  107. },
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. // 预约
  112. .ylist{background: #FFFFFF;box-shadow: 0px 2rpx 4rpx 0px rgba(205,205,205,0.8);border-radius: 14rpx;margin-bottom: 20rpx;
  113. .ytop{position: relative;
  114. .ytbg{width: 100%;height: 76rpx;}
  115. .ytime{padding: 4rpx 100rpx 4rpx 36rpx;font-size: 28rpx;font-weight: bold;box-sizing: border-box;
  116. color: #161616;position: absolute;left: 0;right: 0;bottom: 0;top: 0;
  117. .ytype{min-width: 56rpx;padding: 0 12rpx;flex:0 0 auto;
  118. height: 40rpx;color: #FE5A0E;font-size: 18rpx;text-align: center;box-sizing: border-box;line-height: 36rpx;
  119. background: #FFFFFF;
  120. border: 2rpx solid #FE5A0E;
  121. border-radius: 20rpx;margin-left: 16rpx;}
  122. }
  123. .ytip{width: 88rpx;height: 66rpx;position: absolute;right: 0;top:0;
  124. image{width: 100%;height: 100%;}
  125. view{font-size: 24rpx;font-weight: 500;
  126. color: #FFFFFF;text-align: center;margin-top: 10rpx;position: absolute;left: 0;top: 0;bottom: 0;right: 0;}
  127. .tsbtn{min-width: 90rpx;height: 36rpx;border-radius: 4rpx;box-sizing: border-box;font-size: 24rpx;line-height: 36rpx;margin-top: 20rpx;
  128. &.co1{background: #FFEDDF;color: #E19301;}
  129. &.co2{background: #D3F7E5;color: #24D725;}
  130. &.co3{background: #FDE2E3;color: #EC1134;}
  131. }
  132. }
  133. }
  134. .ybox{
  135. padding: 22rpx 32rpx;display: flex;flex-wrap: wrap;
  136. .yblist{display: flex;font-size: 30rpx;font-weight: 400;color: #161616;width: 100%;line-height: 40rpx;padding: 4rpx 0;
  137. text{font-weight: normal;color: #aaa;flex: 0 0 auto;}
  138. }
  139. .line{width: 56rpx;
  140. height: 2rpx;
  141. background: #CDCDCD;margin: 32rpx auto 24rpx;}
  142. }
  143. }
  144. </style>