XingchengList.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view>
  3. <customNav :shownav="true" :title="$t('dache.xingchengjl')" titledetl=""></customNav>
  4. <view class="toptalbarCtv" :style="{top: statusBarHeight+'rpx'}">
  5. <view class="toptalbar">
  6. <view v-for="(item,index) in tableList">
  7. <view :class="index==toptableindex?'tableLabzh textfontB4 tableselect':'tableLabzh textfontS1'">
  8. <text @click="tableselct(item.value,index)">{{item.text}}</text>
  9. </view>
  10. </view>
  11. </view>
  12. </view>
  13. <view style="margin-top: 140rpx;">
  14. <view class="" v-for="(item,index) in orderList">
  15. <view class="contentColumn itemCTv">
  16. <view class="contentInRowS listItemTop">
  17. <text v-if="item.taxiType=='0'" class="ztextfontB2">快车</text>
  18. <text v-if="item.taxiType!='0'" class="ztextfontB2">顺风车</text>
  19. <text v-if="item.state!=3" class="textfontB4" style="color: darkgray;">{{getOrderSate(item.state)}}</text>
  20. <text v-if="item.state==3" class="textfontB4" style="color:#E86E48;">{{getOrderSate(item.state)}}</text>
  21. </view>
  22. <view class="contentInRowS marginSizesp">
  23. <text class="textfontB4" style="color: darkgray;">下单时间:{{item.orderTime}}</text>
  24. <text class="textfontB4">¥{{item.amount}}元</text>
  25. </view>
  26. <view class="contentInRowL marginSizesp">
  27. <text class="textfontB4" style="color: darkgray;">出发地点:{{item.boardingAddress}}</text>
  28. </view>
  29. <view class="contentInRowL marginSizesp">
  30. <text class="textfontB4" style="color: darkgray;">目的地:{{item.downAddress}}</text>
  31. </view>
  32. <view class="contentInRowR marginSizesp">
  33. <text v-if="item.state>5" class="actBTzl">再来一单</text>
  34. <text v-if="item.state==3" class="actBTzhifu">{{$t('order.quzhifu')}}</text>
  35. </view>
  36. </view>
  37. <!-- <view class="contentColumn itemCTv">
  38. <view class="contentInRowS listItemTop">
  39. <text class="ztextfontB2">快车</text>
  40. <text class="textfontB4" style="color:#E86E48;">{{$t('order.daifukuan')}}</text>
  41. </view>
  42. <view class="contentInRowS marginSizesp">
  43. <text class="textfontB4" style="color: darkgray;">下单时间</text>
  44. <text class="textfontB4">¥14.20</text>
  45. </view>
  46. <view class="contentInRowL marginSizesp">
  47. <text class="textfontB4" style="color: darkgray;">出发地点</text>
  48. </view>
  49. <view class="contentInRowL marginSizesp">
  50. <text class="textfontB4" style="color: darkgray;">目的地</text>
  51. </view>
  52. <view class="contentInRowR marginSizesp">
  53. <text class="actBTzhifu">{{$t('order.quzhifu')}}</text>
  54. </view>
  55. </view> -->
  56. </view>
  57. </view>
  58. <view style="height: 40rpx;"></view>
  59. </view>
  60. </template>
  61. <script>
  62. import api from "@/pages/api/api.js"
  63. export default {
  64. data() {
  65. return {
  66. statusBarHeight:0,
  67. tableList:[],
  68. toptableindex:0,
  69. page:1,
  70. orderList:[]
  71. }
  72. },
  73. onLoad() {
  74. var systemInfo = uni.getSystemInfoSync();
  75. this.statusBarHeight=systemInfo.statusBarHeight*2+84;
  76. },
  77. onShow() {
  78. this.tableList=[
  79. { value: -1, text: this.$t('order.quanbudd') },
  80. { value: 0, text: this.$t('order.daifukuan') },
  81. { value: 5, text: this.$t('order.yiwancheng')},
  82. ];
  83. this.getOrderlist();
  84. },
  85. methods: {
  86. tableselct(value,index){
  87. this.toptableindex = index;
  88. },
  89. getOrderSate(state){
  90. switch(state){
  91. case "0":
  92. return '待司机接单';
  93. break;
  94. case "1":
  95. return '司机已接单';
  96. break;
  97. case "2":
  98. return '乘客已上车';
  99. break;
  100. case "3":
  101. return '待支付';
  102. break;
  103. case "4":
  104. return '已支付';
  105. break;
  106. case "5":
  107. return '用户投诉';
  108. break;
  109. case "6":
  110. return '订单取消';
  111. break;
  112. case "7":
  113. return '修改取消';
  114. break;
  115. }
  116. return '';
  117. },
  118. getOrderlist(){
  119. api('getUsTxorder',{
  120. page:this.page,
  121. size:20,
  122. state:'',
  123. type:0
  124. },res=>{
  125. console.log('getUsTxorder-------',res)
  126. if(res.data.code==200){
  127. this.orderList= res.data.data;
  128. }
  129. else{
  130. uni.showToast({
  131. title:'获取列表失败',//that.i18n('api.wangluoshibai'),
  132. icon: 'none',
  133. duration: 2500
  134. })
  135. }
  136. },failc=>{
  137. //console.log('getTaxiPrices----',failc)
  138. uni.showToast({
  139. title:'网络错误',//that.i18n('api.wangluoshibai'),
  140. icon: 'none',
  141. duration: 2500
  142. })
  143. })
  144. },
  145. },
  146. }
  147. </script>
  148. <style lang="scss">
  149. page{
  150. background-color: #F4F4F4;
  151. }
  152. .toptalbarCtv{
  153. position: fixed;
  154. background-color: #F4F4F4;
  155. left: 0;
  156. right: 0;
  157. top: 0;
  158. z-index: 999;
  159. }
  160. .tableLabzh{
  161. text-align: center;
  162. margin-left: 14rpx;
  163. margin-right: 14rpx;
  164. color: darkgray;
  165. }
  166. .tableselect{
  167. border-bottom-width: 6rpx;
  168. border-bottom-style:solid;
  169. border-bottom-color:#00A6FF;
  170. color: #00A6FF;
  171. }
  172. .toptalbar{
  173. display: flex;
  174. flex-direction: row;
  175. justify-content:space-between;
  176. align-items: center;
  177. background-color:#F4F4F4;
  178. padding-top: 20rpx;
  179. height: 80rpx;
  180. width: 90%;
  181. margin-left: 5%;
  182. }
  183. .itemCTv{
  184. width: 90%;
  185. margin-left: 5%;
  186. margin-top: 30rpx;
  187. background-color: white;
  188. border-radius: 20rpx;
  189. }
  190. .listItemTop{
  191. margin-left: 16rpx;
  192. margin-right: 16rpx;
  193. height: 80rpx;
  194. align-items: center;
  195. border: solid lavender;
  196. border-width: 0px 0px 1rpx 0px;
  197. }
  198. .marginSizesp{
  199. margin-left: 16rpx;
  200. margin-right: 16rpx;
  201. }
  202. .actBTzl{
  203. font-size: 30rpx;
  204. line-height: 48rpx;
  205. padding-left: 20rpx;
  206. padding-right: 20rpx;
  207. border-radius: 24rpx;
  208. color: #E86E48;
  209. border: 1rpx solid #E86E48;
  210. background-color: white;
  211. margin-bottom: 16rpx;
  212. margin-right: 16rpx;
  213. }
  214. .actBTzhifu{
  215. font-size: 30rpx;
  216. line-height: 48rpx;
  217. padding-left: 20rpx;
  218. padding-right: 20rpx;
  219. border-radius: 24rpx;
  220. color: white;
  221. background-color: #E86E48;
  222. margin-bottom: 16rpx;
  223. margin-right: 16rpx;
  224. }
  225. </style>