123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <template>
- <view class="container">
- <uni-navbar title="运输查看"></uni-navbar>
- <view class="box " style="overflow: hidden;">
- <!-- 按钮区域 -->
- <view class="button-box commonMt">
- <view :class="'car-box ' + (queryParams.auditState==='1'?'active':'')" @click="carbButtonClick">
- <image style="width: 28rpx;height: 28rpx;" src="../../static/images/record/state1.png"
- mode="widthFix"></image>
- <text>合规记录</text>
- </view>
- <view :class="'car-box ' + (queryParams.auditState==='-1'?'active':'')" @click="personbButtonClick">
- <image style="width: 28rpx;height: 28rpx;" src="../../static/images/record/state2.png"
- mode="widthFix"></image>
- <text>不合规记录</text>
- </view>
- </view>
- <view class="box2">
- <!-- 通过记录 -->
- <view class="commonMb">
- <view @click="goTo(item.id,item.auditState)" class="small-box commonBj " v-for="item in tongguoList"
- :key="item.id">
- <view class="small-box-top">
- <view class="small-box-top-left">
- <image style="width: 35rpx;height: 35rpx;margin-left: 11rpx;"
- src="../../static/images/record/right.png" mode="widthFix">
- </image>
- <text>{{ item.transportName }}</text>
- </view>
- <view v-if="item.auditState === 1" class="small-box-right">
- <text>合 规</text>
- </view>
- <view v-else class="small-box-right box-linear">
- <text>不合规</text>
- </view>
- </view>
- <view class="small-box-middle mt20">
- <view class="middle-left">
- <view class="circle-green circle-style">
- 起
- </view>
- <view class="small-box-middle-line-left">
- </view>
- <view class="circle-red circle-style">
- 终
- </view>
- </view>
- <view class="middle-middle">
- <view class="position-start">
- <view class="green bold size24 textStyle">{{item.startName}}</view>
- </view>
- <view class="position-end">
- <text class="red bold size24 textStyle ">{{item.endName}}</text>
- </view>
- </view>
- </view>
- <view class="small-box-date">
- <image style="width: 24rpx;height: 24rpx;margin-left: 10rpx;"
- src="../../static/images/transport/rili.png" mode="widthFix">
- </image>
- <text class="ml19 font-size-style">
- 时间: {{item.startTime+' — '+item.endTime}}
- </text>
- </view>
- <view class="small-box-bottom mt23">
- <view class="small-box-bottom-left">
- <image style="width: 25rpx;height: 25rpx;margin-left: 10rpx;"
- src="../../static/images/transport/time.png" mode="widthFix"></image>
- <text class="ml19 font-size-style">车牌号:{{item.carNumber}} </text>
- </view>
- <view class="small-box-bottom-left">
- <image style="width: 25rpx;height: 25rpx;" src="../../static/images/record/duoren.png"
- mode="widthFix">
- </image>
- <text class="mr15 ml19 font-size-style">车辆司机:{{item.driverName}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- selectHistoryData
- } from "@/api/company/record.js"
- export default {
- data() {
- return {
- queryParams: {
- userId: this.$store.state.user.userId,
- auditState: '1'
- },
- // 通过记录或者驳回记录0是通过,1是驳回
- isCarInfo: '-1',
- tongguoList: [],
- }
- },
- methods: {
- goTo(id, state) {
- this.$tab.navigateTo(`/pages/recordDetail/index?id=${id}&state=${state}`)
- },
- // 运输记录和驳回就的点击事件
- carbButtonClick() {
- this.queryParams.auditState = '1';
- this.getRecordList();
- },
- personbButtonClick() {
- this.queryParams.auditState = '-1';
- this.getRecordList();
- },
- // 获得记录列表
- async getRecordList() {
- const res = await selectHistoryData(this.queryParams)
- console.log('记录列表', res);
- this.tongguoList = res.rows
- this.tongguoList.forEach(item => {
- item.startTime = item.startTime.replace(/-/g, '/').slice(0, -3)
- item.endTime = item.endTime.replace(/-/g, '/').slice(0, -3)
- })
- }
- },
- onShow() {
- // this.queryParams.auditState= '1';
- this.getRecordList()
- }
- }
- </script>
- <style lang="scss" scoped>
- .active {
- background: linear-gradient(0deg, #F59A02 0%, #FFD334 100%) !important;
- box-shadow: 0px 2rpx 13rpx 0px rgba(27, 43, 95, 0.25) !important;
- }
- .button-box {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 24rpx;
- .car-box {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 330rpx;
- height: 66rpx;
- background: rgba(255, 255, 255, 0.6);
- border: 0;
- // box-shadow: 0px 0px 24rpx 6rpx rgba(109, 160, 251, 0.6);
- border-radius: 33rpx;
- uni-text {
- margin-left: 18rpx;
- font-size: 28rpx;
- font-weight: bold;
- color: #FFFFFF;
- }
- }
- }
- .small-box {
- padding: 22rpx;
- box-sizing: border-box;
- margin-bottom: 31rpx;
- .small-box-top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .small-box-top-left {
- display: flex;
- align-items: center;
- uni-text {
- font-size: 28rpx;
- font-weight: bold;
- color: #333333;
- margin-left: 18rpx;
- }
- }
- .small-box-right {
- text-align: center;
- width: 103rpx;
- height: 45rpx;
- border-radius: 15rpx;
- font-size: 26rpx;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 45rpx;
- background: linear-gradient(90deg, #3FC377 0%, #83D992 100%);
- }
- }
- .mt20 {
- margin-top: 20rpx;
- }
- .small-box-date {
- display: flex;
- align-items: center;
- margin-top: 24rpx;
- }
- .small-box-bottom {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .small-box-bottom-left {
- display: flex;
- align-items: center;
- }
- }
- }
- .font-size-style {
- font-size: 24rpx;
- font-weight: 400;
- color: #485B93;
- }
- .ml19 {
- margin-left: 10rpx;
- }
- .mt23 {
- margin-top: 23rpx;
- }
- .mr15 {
- margin-right: 15rpx;
- }
- .box-linear {
- background: linear-gradient(90deg, #FF2D04 0%, #FFA53E 100%) !important;
- }
- </style>
|