car-manager-card.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <view class="">
  3. <u-popup v-model="detailShow" mode="center" width="670" :closeable="true" border-radius="10">
  4. <view style="padding: 70rpx 5rpx 40rpx;">
  5. <u-cell-group >
  6. <u-cell-item :icon-style="iconStyle" :border-top="false" :arrow="false" icon="eye-fill" title="车牌号码:" :value="detailData.number"></u-cell-item>
  7. <u-cell-item :key="index" v-for="(item,index) in carTypeList" v-if="item.value==detailData.type" :value="item.label" :icon-style="iconStyle" :arrow="false" icon="car-fill" title="车辆类型:" ></u-cell-item>
  8. <u-cell-item :key="index" v-for="(item,index) in carPropertiesList" v-if="item.value==detailData.properties" :value="item.label" :icon-style="iconStyle" :arrow="false" icon="error-circle-fill" title="车辆性质:" ></u-cell-item>
  9. <u-cell-item :key="index" v-for="(item,index) in fuelCategoryList" v-if="item.value==detailData.fuelCategory" :value="item.label" :icon-style="iconStyle" :border-bottom="false" :arrow="false" icon="grid-fill" title="燃油类别:" ></u-cell-item>
  10. <u-cell-item v-if="detailData.auditOpinion" :value-style="valueStyle" :value="detailData.auditOpinion" :icon-style="iconStyle" :arrow="false" icon="question-circle-fill" title="审核意见:" ></u-cell-item>
  11. </u-cell-group>
  12. <view class="detail-img">
  13. <view @click.stop="$util.preview(detailData.vehicleDrivingLicense1)">
  14. <text>行驶证【正面】</text>
  15. <image :src="detailData.vehicleDrivingLicense1" mode=""></image>
  16. </view>
  17. <view @click.stop="$util.preview(detailData.vehicleDrivingLicense2)">
  18. <text>行驶证【反面】</text>
  19. <image :src="detailData.vehicleDrivingLicense2" mode=""></image>
  20. </view>
  21. </view>
  22. </view>
  23. </u-popup>
  24. <view @click="detailData=item;detailShow=true" class="card" v-for="(item,index) in list" :key="index">
  25. <view class="top" >
  26. <text class="number">车牌号:{{item.number}}</text>
  27. <text style="color: #008f69;" class="margin-top-10" v-if="item.auditStatus==1">已通过</text>
  28. <text style="color: #ea7500;" class="margin-top-10" v-if="item.auditStatus==0">待审核</text>
  29. <text style="color: #da0000;" class="margin-top-10" v-if="item.auditStatus==-1">未通过</text>
  30. </view>
  31. <view class="center">
  32. <view class="flex">
  33. <view @click.stop="$util.preview(item.carImg)" class="flex justify-center align-center">
  34. <image :src="item.carImg" mode=""></image>
  35. </view>
  36. <view class="content">
  37. <text class="padding-bottom-10">车主姓名:{{item.personName}}</text>
  38. <view class="padding-bottom-10">
  39. <text class="">车主电话:{{item.personPhone}}</text>
  40. <text @click.stop="$util.call(item.personPhone)" class="text-base" style="text-decoration: underline; padding-left: 20rpx;">拨打</text>
  41. </view>
  42. <view class="padding-bottom-10" v-if="item1.value==item.type" v-for="(item1,index) in carTypeList" :key="index">
  43. 车辆类型:{{item1.label}}
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="bottom" v-if="item.auditStatus==0">
  49. <view @click.stop="pass(item)" style="font-size: 22rpx;" class="cu-btn sm round line-blue margin-right-20" >
  50. 审核通过
  51. </view>
  52. <view @click.stop="fail(item)" style="font-size: 22rpx;" class="cu-btn sm round bg-base " >
  53. 审核不通过
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. props:{
  62. list:{
  63. type:Array
  64. }
  65. },
  66. data() {
  67. return {
  68. iconStyle:{
  69. color:'#5064eb'
  70. },
  71. valueStyle:{
  72. color:'#da0000'
  73. },
  74. //详情
  75. detailShow:false,
  76. detailData:{},
  77. //字典
  78. carTypeList:[],
  79. carPropertiesList:[],
  80. fuelCategoryList:[],
  81. }
  82. },
  83. created() {
  84. this.getDict()
  85. },
  86. methods: {
  87. preview(item){
  88. let url= this.$global.imgBaseUrl+item.carImg
  89. this.$util.preview(url)
  90. },
  91. pass(item){
  92. this.$emit('pass',item)
  93. },
  94. fail(item){
  95. this.$emit('fail',item)
  96. },
  97. getDict(){
  98. let dict=this.$cache.get('dict')
  99. if (dict) {
  100. //缓存中有字典值
  101. this.carTypeList=dict.carTypeList
  102. this.carPropertiesList=dict.carPropertiesList
  103. this.fuelCategoryList=dict.fuelCategoryList
  104. return
  105. }
  106. //车辆类型
  107. this.$api.dict({code:'car_type'}).then(res=>{
  108. res.data.forEach((item)=>{
  109. let tmp={
  110. value:item.dictKey,
  111. label:item.dictValue
  112. }
  113. this.carTypeList.push(tmp)
  114. })
  115. })
  116. //车辆性质
  117. this.$api.dict({code:'car_properties'}).then(res=>{
  118. res.data.forEach((item)=>{
  119. let tmp={
  120. value:item.dictKey,
  121. label:item.dictValue
  122. }
  123. this.carPropertiesList.push(tmp)
  124. })
  125. })
  126. //燃油类别
  127. this.$api.dict({code:'fuel_category'}).then(res=>{
  128. res.data.forEach((item)=>{
  129. let tmp={
  130. value:item.dictKey,
  131. label:item.dictValue
  132. }
  133. this.fuelCategoryList.push(tmp)
  134. })
  135. })
  136. },
  137. }
  138. }
  139. </script>
  140. <style lang="scss" scoped>
  141. .detail-img{
  142. display: flex;
  143. justify-content: space-around;
  144. text-align: center;
  145. color: #707175;
  146. view{
  147. display: flex;
  148. flex-direction: column;
  149. width: 48%;
  150. height: 300rpx;
  151. text{
  152. padding: 10rpx 0;
  153. }
  154. }
  155. }
  156. .card{
  157. background-color: #FFFFFF;
  158. margin: 20rpx;
  159. padding: 0 40rpx;
  160. border-radius: 20rpx;
  161. display: flex;
  162. flex-direction: column;
  163. image{
  164. width: 120rpx;
  165. height: 120rpx;
  166. }
  167. .top{
  168. display: flex;
  169. justify-content: space-between;
  170. padding: 20rpx 0 20rpx 0rpx;
  171. border-bottom: 1rpx dashed #e5e5e5;
  172. .number{
  173. font-size: 34rpx;
  174. }
  175. .audit{
  176. font-size: 30rpx;
  177. }
  178. }
  179. .center{
  180. padding: 40rpx 0;
  181. display: flex;
  182. justify-content: space-between;
  183. .content{
  184. padding-left: 30rpx;
  185. display: flex;
  186. flex-direction: column;
  187. font-size: 30rpx;
  188. text{
  189. padding-bottom: 10rpx;
  190. }
  191. }
  192. .record{
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. color: #545454;
  197. }
  198. }
  199. .bottom{
  200. display: flex;
  201. justify-content: flex-end;
  202. padding: 20rpx 0;
  203. }
  204. }
  205. </style>