card.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view>
  3. <view @click="detail(item.id)" class="card" v-for="(item,index) in list" :key="index">
  4. <view class="top">
  5. <view class="title center">
  6. <image :src="item.cover" mode=""></image>
  7. <text>{{item.name}}</text>
  8. </view>
  9. <view class="detail">
  10. <view class="">
  11. <text>查看详情</text>
  12. <text class="cuIcon-right margin-left-10"></text>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="content">
  17. <view class="">
  18. <text class="label">申请人:</text>
  19. <text class="value">{{item.personName}}</text>
  20. </view>
  21. <view class="padding-top-20">
  22. <text class="label">时间:</text>
  23. <text class="value">{{item.createTime}}</text>
  24. </view>
  25. </view>
  26. <view class="bottom" v-if="item.auditStatus==0">
  27. <view @click.stop="pass(item)" class="cu-btn round pass-btn sm"
  28. style="width: 140rpx;height: 50rpx;font-size: 28rpx;">
  29. 通过
  30. </view>
  31. <view @click.stop="fail(item)" class="cu-btn round refuse-btn sm"
  32. style="width: 140rpx;margin-left: 30rpx;height: 50rpx;font-size: 28rpx;">
  33. 拒绝
  34. </view>
  35. </view>
  36. <view class="icon" v-else>
  37. <image style="width: 96rpx" mode="widthFix" v-if="item.auditStatus.includes('WAITING')" src="../../../static/icon/await.png"></image>
  38. <image style="width: 96rpx" mode="widthFix" v-if="item.auditStatus=='PASS'" src="../../../static/icon/pass.png"></image>
  39. <image style="width: 96rpx" mode="widthFix" v-if="item.auditStatus=='FAIL'" src="../../../static/icon/refuse.png"></image>
  40. <image style="width: 96rpx" mode="widthFix" v-if="item.auditStatus=='STOP'" src="../../../static/icon/stop.png"></image>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. props: {
  48. list: Array
  49. },
  50. data() {
  51. return {
  52. }
  53. },
  54. methods: {
  55. pass(item) {
  56. this.$emit('pass', item)
  57. },
  58. fail(item) {
  59. this.$emit('fail', item)
  60. },
  61. detail(id){
  62. uni.navigateTo({
  63. url:"/pages/shopAudit/detail/detail?id="+id,
  64. fail: (err) => {
  65. console.log(err);
  66. }
  67. })
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .pass-btn {
  74. background-color: #EF9944;
  75. color: #FFFFFF;
  76. }
  77. .refuse-btn {
  78. background-color: #FFFFFF;
  79. color: #EF9944;
  80. border: 1rpx solid #EF9944;
  81. }
  82. .card {
  83. border-radius: 30rpx;
  84. background-color: #FFFFFF;
  85. display: flex;
  86. flex-direction: column;
  87. padding: 30rpx 36rpx;
  88. margin: 20rpx 0;
  89. position: relative;
  90. .top {
  91. display: flex;
  92. justify-content: space-between;
  93. .title {
  94. color: #252525;
  95. display: flex;
  96. font-size: 34rpx;
  97. font-weight: 800;
  98. image {
  99. margin-right: 10rpx;
  100. width: 40rpx;
  101. height: 40rpx;
  102. border-radius: 50%;
  103. }
  104. }
  105. .detail {
  106. display: flex;
  107. flex-direction: column;
  108. justify-content: flex-end;
  109. color: #999999;
  110. font-size: 26rpx;
  111. }
  112. }
  113. .content {
  114. margin: 30rpx 20rpx 20rpx;
  115. .label {
  116. font-size: 28rpx;
  117. color: #999999;
  118. }
  119. .value {
  120. color: #252525;
  121. }
  122. }
  123. .bottom {
  124. display: flex;
  125. justify-content: flex-end;
  126. }
  127. .icon{
  128. position: absolute;
  129. bottom: 20rpx;
  130. right: 40rpx;
  131. image{
  132. width: 96rpx;
  133. height: 84rpx;
  134. }
  135. }
  136. }
  137. </style>