dachexuancx.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="contentColumnC">
  3. <view class="contentColumnC popViewctv">
  4. <view class="contentInRowS sizeSpace">
  5. <view class="contentColumnC" @click="luxianSelect(0)">
  6. <text class="xianluti" :style="xianluIndex==0?'background-color:#E86E48;':''">推荐线路</text>
  7. <text class="timeText">{{XChengObj.estimatedDuration}}</text>
  8. <text class="luchengText">{{XChengObj.distance}}Km</text>
  9. </view>
  10. <!-- <view class="contentColumnC" @click="luxianSelect(1)">
  11. <text class="xianluti" :style="xianluIndex==1?'background-color:#E86E48;':''">线路2</text>
  12. <text class="timeText">16分钟</text>
  13. <text class="luchengText">6.5Km</text>
  14. </view>
  15. <view class="contentColumnC" @click="luxianSelect(2)">
  16. <text class="xianluti" :style="xianluIndex==2?'background-color:#E86E48;':''">线路3</text>
  17. <text class="timeText">16分钟</text>
  18. <text class="luchengText">6.5Km</text>
  19. </view> -->
  20. </view>
  21. <view class="sizeSpace" style="margin-top: 26rpx;">
  22. <text class="textfontB5" >选择车型</text>
  23. </view>
  24. <view class="contentColumn">
  25. <view class="lineBackColor" @click="chexingSle(0)">
  26. <view class="contentInRowS sizeSpace" style="align-items: center;padding-top: 8rpx;padding-bottom: 16rpx;">
  27. <view class="contentInRowL" style="align-items: center;">
  28. <image style="width: 100rpx;height: 50rpx;" src="/static/images/dache/dachetb.png" mode="scaleToFill"></image>
  29. <text class="ztextfontB3" style="margin-left: 10rpx;">特惠快车</text>
  30. </view>
  31. <view class="contentInRowR" style="align-items: center;width: 300rpx;">
  32. <view class="contentInRowR" style="align-items:center;margin-right: 20rpx;">
  33. <text class="textfontS3">预估</text>
  34. <text class="ztextfontB1">{{XChengObj.amount}}</text>
  35. <text class="textfontS3">元</text>
  36. </view>
  37. <uni-icons v-if="selchexList[0]==1" custom-prefix="custom-icon" color="#FFFFFF" type="checkbox" size="30"></uni-icons>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="lineBackColor" @click="chexingSle(1)">
  42. <view class="contentInRowS sizeSpace" style="align-items: center;padding-top: 16rpx;padding-bottom: 16rpx;">
  43. <view class="contentInRowL" style="align-items: center;">
  44. <image style="width: 100rpx;height: 50rpx;" src="/static/images/dache/dachetb.png" mode="scaleToFill"></image>
  45. <text class="ztextfontB3" style="margin-left: 10rpx;">特惠快车</text>
  46. </view>
  47. <view class="contentInRowR" style="align-items: center;width: 300rpx;">
  48. <view class="contentInRowR" style="align-items:center;margin-right: 20rpx;">
  49. <text class="textfontS3">预估</text>
  50. <text class="ztextfontB1">{{XChengObj.amount}}</text>
  51. <text class="textfontS3">元</text>
  52. </view>
  53. <uni-icons v-if="selchexList[1]==1" custom-prefix="custom-icon" color="#FFFFFF" type="checkbox" size="30"></uni-icons>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="lineBackColor" @click="chexingSle(2)">
  58. <view class="contentInRowS sizeSpace" style="align-items: center;padding-top: 16rpx;padding-bottom: 16rpx;">
  59. <view class="contentInRowL" style="align-items: center;">
  60. <image style="width: 100rpx;height: 50rpx;" src="/static/images/dache/dachetb.png" mode="scaleToFill"></image>
  61. <text class="ztextfontB3" style="margin-left: 10rpx;">特惠快车</text>
  62. </view>
  63. <view class="contentInRowR" style="align-items: center;width: 300rpx;">
  64. <view class="contentInRowR" style="align-items:center;margin-right: 20rpx;">
  65. <text class="textfontS3">预估</text>
  66. <text class="ztextfontB1">{{XChengObj.amount}}</text>
  67. <text class="textfontS3">元</text>
  68. </view>
  69. <uni-icons v-if="selchexList[2]==1" custom-prefix="custom-icon" color="#FFFFFF" type="checkbox" size="30"></uni-icons>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="contentInRowS sizeSpace bottomView">
  75. <view v-if="selSum==0" class="contentInRowL" style="align-items: center;color: white;width: 400rpx;">
  76. <text class="textfontS3" style="padding-left: 20rpx;color: white;">至少选择一种车型</text>
  77. </view>
  78. <view v-if="selSum>0" class="contentInRowL" style="align-items: center;color: white;width: 400rpx;">
  79. <text class="textfontS3" style="padding-left: 20rpx;color: white;">已选{{selSum}}种车型 | 预估</text>
  80. <text class="textfontS3" style="color: white;">{{XChengObj.amount}}</text>
  81. <text class="textfontS3" style="color: white;">元</text>
  82. </view>
  83. <text class="hujiaoBt ztextfontB4" @click="querenhj">确认呼叫</text>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. export default {
  90. name:"dachexuancx",
  91. props: {
  92. XChengObj:''
  93. },
  94. data() {
  95. return {
  96. xianluIndex:0,
  97. chexIndex:0,
  98. selchexList:[1,0,0],
  99. selSum:1,
  100. obj:'',
  101. };
  102. },
  103. methods:{
  104. setxcObj(obj){
  105. console.log('setxcObj------',obj)
  106. },
  107. luxianSelect(index){
  108. this.xianluIndex=index;
  109. },
  110. chexingSle(index){
  111. if(this.selchexList[index]==1){
  112. this.selchexList[index]=0;
  113. }
  114. else{
  115. this.selchexList[index]=1;
  116. }
  117. this.obj=this.XChengObj;
  118. this.obj.taxiType='0';
  119. this.getShuliang();
  120. },
  121. getShuliang(){
  122. var index = 0;
  123. for(var i=0;i<this.selchexList.length;i++){
  124. if(this.selchexList[i]!=0){
  125. index=index+1;
  126. }
  127. }
  128. this.selSum=index;
  129. },
  130. querenhj(){
  131. if(this.obj==''){
  132. this.obj=this.XChengObj;
  133. }
  134. this.$emit('EQuerenhj',this.obj);
  135. },
  136. }
  137. }
  138. </script>
  139. <style>
  140. .popViewctv{
  141. width: 700rpx;
  142. border-radius: 20rpx 20rpx 0rpx 0rpx;
  143. background-color:white
  144. }
  145. .sizeSpace{
  146. width: 660rpx;
  147. }
  148. .xianluti{
  149. font-size: 34rpx;
  150. padding-left: 20rpx;
  151. padding-right: 20rpx;
  152. line-height: 50rpx;
  153. background-color: darkgray;
  154. color: black;
  155. border-radius: 0 0 20rpx 20rpx;
  156. }
  157. .timeText{
  158. font-size: 36rpx;
  159. color: black;
  160. }
  161. .luchengText{
  162. font-size: 28rpx;
  163. color: darkgray;
  164. }
  165. .lineBackColor{
  166. margin-top: 20rpx;
  167. align-items: center;
  168. background: linear-gradient(to right, #FFFFFF, #E86E48);
  169. }
  170. .bottomView{
  171. margin-top: 30rpx;
  172. background-color: #1a1a1a;
  173. height: 80rpx;
  174. border-radius: 40rpx;
  175. }
  176. .hujiaoBt{
  177. background-color: #E86E48;
  178. line-height: 80rpx;
  179. border-radius: 40rpx;
  180. padding-left: 60rpx;
  181. padding-right: 60rpx;
  182. text-align: center;
  183. color: white;
  184. }
  185. </style>