card.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view class="">
  3. <u-popup v-model="detailShow" mode="center" width="650" :closeable="true" border-radius="10">
  4. <view style="padding: 60rpx 5rpx 10rpx;">
  5. <u-cell-group >
  6. <u-cell-item :icon-style="iconStyle" :border-top="false" :arrow="false" icon="account-fill" title="访客姓名:" :value="detailData.guestName"></u-cell-item>
  7. <u-cell-item :icon-style="iconStyle" :arrow="false" icon="bookmark-fill" title="身份证号:" :value="detailData.guestIdcard"></u-cell-item>
  8. <u-cell-item :icon-style="iconStyle" :arrow="false" icon="phone-fill" title="手机号:" :value="detailData.guestTel"></u-cell-item>
  9. <u-cell-item :icon-style="iconStyle" :arrow="false" icon="map-fill" title="访问区域:" :value="detailData.guestPosition"></u-cell-item>
  10. <u-cell-item :icon-style="iconStyle" :arrow="false" icon="clock-fill" title="访问时间:" :value="detailData.guestTime"></u-cell-item>
  11. <u-cell-item :icon-style="iconStyle" :arrow="false" icon="plus-people-fill" title="接待人:" :value="detailData.userName"></u-cell-item>
  12. <u-cell-item :icon-style="iconStyle" :border-bottom="false" :arrow="false" icon="error-circle-fill" title="访问目的:" :value="detailData.guestReason"></u-cell-item>
  13. </u-cell-group>
  14. </view>
  15. </u-popup>
  16. <view @click="showDetail(item)" class="data" v-for="(item, index) in list" :key="index">
  17. <view class="top">
  18. <view class="left">
  19. <view class="title ">
  20. <text class="text-bold">访客姓名:</text>
  21. <text>{{item.guestName}}</text>
  22. </view>
  23. </view>
  24. <view class="right">
  25. <text class="" v-if="item.auditStatus==1">已通过</text>
  26. <text class="text-orange" v-if="item.auditStatus==0">待审核</text>
  27. <text class="text-red" v-if="item.auditStatus==2">未通过</text>
  28. </view>
  29. </view>
  30. <view class="item">
  31. <view class="left">
  32. <view style="padding: 20rpx 30rpx 0;">
  33. <view class="content">
  34. <text class="padding-right-10">访问区域:</text>
  35. <text >{{item.guestPosition}}</text>
  36. </view>
  37. <view class="content">
  38. <text class="padding-right-10">联系方式:</text>
  39. <text>{{item.guestTel}}</text>
  40. <image @click.stop="call(item.guestTel)" class="call" src="/static/call.png" ></image>
  41. </view>
  42. <view class="content">
  43. <text class="padding-right-10">来访目的:</text>
  44. <text style="line-height: 50rpx;">{{item.guestReason}}</text>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="bottom" >
  50. <!-- 待审核,显示取消工单 -->
  51. <view @click.stop="pass(item)" v-if="item.auditStatus==0" class="cu-btn sm round bg-blue margin-right-20" >
  52. 审核通过
  53. </view>
  54. <view @click.stop="fail(item)" v-if="item.auditStatus==0" class="cu-btn sm round bg-blue" >
  55. 审核不通过
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. export default {
  63. name: 'card',
  64. props:{
  65. list:{
  66. type:Array,
  67. default:()=>{
  68. []
  69. }
  70. }
  71. },
  72. data() {
  73. return {
  74. };
  75. },
  76. onLoad() {
  77. },
  78. methods:{
  79. call(phone){
  80. uni.makePhoneCall({
  81. phoneNumber:phone
  82. })
  83. },
  84. showDetail(item){
  85. this.$emit('showDetail',item)
  86. },
  87. pass(item){
  88. this.$emit('pass',item)
  89. },
  90. fail(item){
  91. this.$emit('fail',item)
  92. }
  93. }
  94. };
  95. </script>
  96. <style lang="scss">
  97. .bg-blue{
  98. background-color: #59a5f0;
  99. color: #FFFFFF;
  100. }
  101. .data {
  102. width: 710rpx;
  103. background-color: #ffffff;
  104. margin: 20rpx auto;
  105. border-radius: 6rpx;
  106. box-sizing: border-box;
  107. padding: 20rpx;
  108. font-size: 28rpx;
  109. .top {
  110. display: flex;
  111. justify-content: space-between;
  112. padding-bottom: 20rpx;
  113. border-bottom: 1rpx solid #EEEEEE;
  114. .left {
  115. display: flex;
  116. align-items: center;
  117. .title {
  118. margin: 0 10rpx;
  119. font-size: 30rpx;
  120. }
  121. }
  122. .right{
  123. margin-right: 10rpx;
  124. }
  125. }
  126. .item {
  127. margin: 5rpx 0 20rpx 0;
  128. .content {
  129. // border-bottom: 1rpx dashed #DDDDDD;
  130. padding: 20rpx 0 ;
  131. .call{
  132. width: 36rpx;
  133. height: 36rpx;
  134. margin-left: 40rpx;
  135. margin-top: 10rpx;
  136. }
  137. }
  138. }
  139. .bottom {
  140. display: flex;
  141. margin-top: 30rpx;
  142. justify-content: flex-end;
  143. align-items: center;
  144. }
  145. }
  146. </style>