the_fuel_filling.vue 7.1 KB

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