the_fuel_filling.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view>
  3. <view class="content">
  4. <view class="content1-top">
  5. <view class="top2">
  6. <view class="left">
  7. <view @click='tabcarchange(1)' class='line' :class='searchType==1?"active":""'>未完成</view>
  8. <view @click='tabcarchange(3)' class='line' :class='searchType==3?"active":""'>已完成</view>
  9. </view>
  10. <view class="right uni-button">
  11. <button style="line-height: 28px;" class="right-contrent1" @click="trackAddition">添加</button>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view v-for="(item,index) in fuelFilling" :key="index" @click="getInfo(item)">
  17. <view class="good-list">
  18. <view style="padding: 0 35rpx 20rpx 35rpx;position: relative;">
  19. <view class="flex align-center">
  20. <view class="item1">
  21. <view class="ssx">{{$helper.getProvinceAbbreviation(item.originProvince)}}</view>
  22. <view class="level2-title" style="font-size: 14px;">{{$helper.filterUrban(item.originCity)}}
  23. {{$helper.filterArea(item.originArea)}}
  24. </view>
  25. </view>
  26. <image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
  27. </image>
  28. <view class="item3">
  29. <view class="ssx">{{$helper.getProvinceAbbreviation(item.destinationProvince)}}</view>
  30. <view class="level2-title">{{$helper.filterUrban(item.destinationCity)}}
  31. {{$helper.filterArea(item.destinationArea)}}
  32. </view>
  33. </view>
  34. </view>
  35. <view class="flex flex-space-between yf-style">
  36. <view class="left">
  37. <view class="flex">
  38. <view style="padding: 10px 0px 5px 20px;">车牌号 : {{item.carNo}}</view>
  39. <view class="wenzi audit1" v-if="item.travelStatus == '已开始'">已开始</view>
  40. <view class="wenzi audit2" v-if="item.travelStatus == '已结束'">已结束</view>
  41. <view class="wenzi audit3" v-if="item.travelStatus == '已报销'">已报销</view>
  42. </view>
  43. <view class="u-flex-wrap flex row ">
  44. <view style="width: 125px;padding: 10px 0px 5px 20px;">总油耗 : {{item.tfc}}L</view>
  45. <view style="width: 100px;padding-top: 10px;">总价 : {{item.totalCost}}元</view>
  46. <view style="padding: 13px 0px 5px 24px;">{{item.createDate.split(" ")[0]}}</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. searchType: 1,
  60. pageSize: 10,
  61. currentPage: 1,
  62. fuelFilling: [{
  63. destinationProvince: "",
  64. destinationCity: "",
  65. destinationArea: "",
  66. carNo: "",
  67. originProvince: "",
  68. originCity: "",
  69. originArea: "",
  70. createDate: "",
  71. travelStatus: "",
  72. totalCost: "",
  73. tfc: ""
  74. }],
  75. }
  76. },
  77. onShow() {
  78. this.getList()
  79. },
  80. methods: {
  81. tabcarchange(searchType) {
  82. this.searchType = searchType
  83. this.pageSize = 10
  84. this.getList()
  85. },
  86. trackAddition() {
  87. uni.navigateTo({
  88. url: '/pages/fuelfilling/track_addition'
  89. })
  90. },
  91. getList() {
  92. this.$api.doRequest('get', '/fuelFillingInfo/selectFilling', {
  93. pageSize: this.pageSize,
  94. currentPage: this.currentPage,
  95. // pcFlag: 0,
  96. searchType: this.searchType,
  97. compId: uni.getStorageSync('pcUserInfo').compId,
  98. commonId: uni.getStorageSync('pcUserInfo').userId,
  99. }).then(res => {
  100. if (res.data.code == 200) {
  101. this.fuelFilling = res.data.data.records
  102. }
  103. })
  104. },
  105. getInfo(item) {
  106. if (item.travelStatus == '已报销') {
  107. return
  108. } else {
  109. uni.navigateTo({
  110. url: '/pages/fuelfilling/track_addition?id=' + item.id
  111. })
  112. }
  113. },
  114. }
  115. }
  116. </script>
  117. <style lang="scss" scoped>
  118. .content {
  119. padding-bottom: 50rpx;
  120. }
  121. .tag {
  122. background: #F5F6F9;
  123. padding: 5px;
  124. color: #333333;
  125. display: inline-flex;
  126. font-size: 22rpx;
  127. border-radius: 3px;
  128. margin: 3px;
  129. }
  130. .introduce-section .title {
  131. justify-content: space-between;
  132. align-items: flex-start;
  133. }
  134. .introduce-section .title text {
  135. font-size: 28rpx;
  136. }
  137. .introduce-section .title .title-tip {
  138. flex: 1;
  139. font-size: 28rpx;
  140. color: #FE6430;
  141. font-weight: 500;
  142. height: 50px;
  143. line-height: 50px;
  144. border-bottom: 1px solid #EEEEEE;
  145. }
  146. .introduce-section .title .title-tip-a {
  147. flex: 1;
  148. font-size: 15px;
  149. color: #AFB3BF;
  150. font-weight: 500;
  151. height: 50px;
  152. line-height: 50px;
  153. border-bottom: 1px solid #EEEEEE;
  154. }
  155. .line {
  156. display: inline-block;
  157. padding: 5px;
  158. position: relative;
  159. font-size: 17px;
  160. }
  161. .line.active {
  162. font-size: 19px;
  163. font-weight: 900;
  164. }
  165. .line.active:after {
  166. content: '';
  167. display: block;
  168. position: absolute;
  169. width: 18px;
  170. left: 50%;
  171. transform: translateX(-50%);
  172. bottom: 0;
  173. border-bottom: 3px solid #22C572;
  174. }
  175. /deep/.u-action-active {
  176. margin-right: 6px;
  177. }
  178. .content1-top {
  179. background: white;
  180. padding: 10px 16px 0 10px;
  181. border-radius: 0 0 15px 15px;
  182. padding-bottom: 10px;
  183. }
  184. .top2 {
  185. display: flex;
  186. align-items: center;
  187. justify-content: space-between;
  188. .right.uni-button {
  189. display: flex;
  190. align-items: center;
  191. font-weight: normal;
  192. .right-contrent1 {
  193. background: #22C572;
  194. height: 25px;
  195. font-size: 14px;
  196. color: #fff;
  197. }
  198. }
  199. }
  200. .good-list {
  201. background-color: white;
  202. margin: -10px 10px 20px 10px;
  203. padding: 20px 0px 8px 0px;
  204. border-radius: 30rpx;
  205. box-shadow: 0px 5rpx 20rpx #E3E3E3;
  206. .item1,
  207. .item3 {
  208. // width: 40%;
  209. display: flex;
  210. .text {
  211. text-overflow: ellipsis;
  212. overflow: hidden;
  213. white-space: nowrap;
  214. }
  215. }
  216. .item1 .text {
  217. text-align: left;
  218. }
  219. .item3 .text {
  220. text-align: right;
  221. }
  222. }
  223. .xf-iamge {
  224. width: 74rpx;
  225. height: 43rpx;
  226. position: absolute;
  227. top: -20rpx;
  228. right: 0;
  229. }
  230. .level2-title {
  231. font-size: 28rpx;
  232. }
  233. .jt-icon {
  234. position: relative;
  235. top: 6rpx;
  236. width: 60rpx;
  237. margin: 0 20rpx;
  238. }
  239. .ssx {
  240. width: 20px;
  241. height: 20px;
  242. background: linear-gradient(180deg, #C8D7E5 0%, #AFC1D6 100%);
  243. font-size: 13px;
  244. font-family: PingFangSC-Medium, PingFang SC;
  245. font-weight: 500;
  246. color: #FFFFFF;
  247. border-radius: 50%;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. margin-right: 5px;
  252. }
  253. .level2-title {
  254. font-weight: 700;
  255. color: #000000;
  256. }
  257. .wenzi {
  258. text-align: right;
  259. border-radius: 10rpx;
  260. // margin-right: 30rpx;
  261. height: 10rpx;
  262. padding: 10px 0px 5px 128px;
  263. }
  264. .audit1 {
  265. color: #22C572;
  266. }
  267. .audit2 {
  268. color: #22C572;
  269. }
  270. .audit3 {
  271. color: #AFB3BF;
  272. }
  273. </style>