Blame view

src/components/car/carDetailCarInout.vue 4.86 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
6d21390a   wuxw   开发车辆详情页面
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
    <div>
      <div class="margin-top">
        <el-table :data="carDetailCarInoutInfo.carIns" border style="width: 100%">
          <el-table-column :label="$t('carDetailCarInout.entryImage')" align="center">
            <template slot-scope="scope">
              <el-image style="width: 60px; height: 60px;" :src="scope.row.photoJpg || '/img/noPhoto.jpg'"
                :preview-src-list="[scope.row.photoJpg]" fit="cover" class="border-radius">
              </el-image>
            </template>
          </el-table-column>
          <el-table-column prop="inoutId" :label="$t('carDetailCarInout.inoutId')" align="center"></el-table-column>
          <el-table-column :label="$t('carDetailCarInout.carStatus')" align="center">
            <template slot-scope="scope">
              {{ scope.row.carInout === '3306' ? $t('carDetailCarInout.entry') :
                $t('carDetailCarInout.exit')}}({{ scope.row.stateName }})
            </template>
          </el-table-column>
          <el-table-column prop="carNum" :label="$t('carDetailCarInout.carNum')" align="center"></el-table-column>
          <el-table-column prop="paNum" :label="$t('carDetailCarInout.parkingLot')" align="center"></el-table-column>
          <el-table-column :label="$t('carDetailCarInout.billingRule')" align="center">
            <template slot-scope="scope">
              <el-link type="primary" @click="_viewTempFeeConfigInOutCar(scope.row.configId)">
                {{ scope.row.feeName }} <i class="el-icon-info"></i>
              </el-link>
            </template>
          </el-table-column>
          <el-table-column prop="carTypeName" :label="$t('carDetailCarInout.carType')" align="center"></el-table-column>
          <el-table-column prop="inTime" :label="$t('carDetailCarInout.entryTime')" align="center"></el-table-column>
          <el-table-column :label="$t('carDetailCarInout.exitTime')" align="center">
            <template slot-scope="scope">
              {{ scope.row.carInout !== '3307' ? '-' : scope.row.outTime }}
            </template>
          </el-table-column>
          <el-table-column :label="$t('carDetailCarInout.parkingTime')" align="center">
            <template slot-scope="scope">
              {{ scope.row.hours }}{{ $t('carDetailCarInout.hour') }}{{ scope.row.min }}{{ $t('carDetailCarInout.minute') }}
            </template>
          </el-table-column>
          <el-table-column :label="$t('carDetailCarInout.chargeAmount')" align="center">
            <template slot-scope="scope">
              {{ scope.row.carType !== 'T' ? '-' : scope.row.payCharge }}
            </template>
          </el-table-column>
          <el-table-column prop="remark" :label="$t('carDetailCarInout.remark')" align="center"></el-table-column>
        </el-table>
  
        <el-row>
          <el-col :span="16" :offset="8">
            <el-pagination @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize"
              layout="total, prev, pager, next, jumper" :total="total">
            </el-pagination>
          </el-col>
        </el-row>
      </div>
    </div>
  </template>
  
  <script>
  import { getCarInoutDetail } from '@/api/car/carDetailCarInoutApi'
1d33ddab   wuxw   开发完成车辆详情页面
61
  import { getCommunityId } from '@/api/community/communityApi'
6d21390a   wuxw   开发车辆详情页面
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
  
  export default {
    name: 'CarDetailCarInout',
    data() {
      return {
        carDetailCarInoutInfo: {
          carIns: [],
          carId: '',
          memberId: '',
          carNum: '',
          areaNum: ''
        },
        currentPage: 1,
        pageSize: 10,
        total: 0
      }
    },
    methods: {
1d33ddab   wuxw   开发完成车辆详情页面
80
81
82
83
84
85
86
      open(data) {
        this.carDetailCarInoutInfo.carId = data.carId
        this.carDetailCarInoutInfo.carNum = data.carNum
        this.carDetailCarInoutInfo.areaNum = data.areaNum
        this.carDetailCarInoutInfo.memberId = data.memberId
        this._loadCarDetailCarInoutData(this.currentPage, this.pageSize)
      },
6d21390a   wuxw   开发车辆详情页面
87
88
89
90
91
92
93
94
95
      switch(data) {
        this.carDetailCarInoutInfo.carId = data.carId
        this.carDetailCarInoutInfo.carNum = data.carNum
        this.carDetailCarInoutInfo.areaNum = data.areaNum
        this.carDetailCarInoutInfo.memberId = data.memberId
        this._loadCarDetailCarInoutData(this.currentPage, this.pageSize)
      },
      _loadCarDetailCarInoutData(page, row) {
        const params = {
1d33ddab   wuxw   开发完成车辆详情页面
96
          communityId: getCommunityId(),
6d21390a   wuxw   开发车辆详情页面
97
98
99
100
101
102
103
104
          carNum: this.carDetailCarInoutInfo.carNum,
          paNum: this.carDetailCarInoutInfo.areaNum,
          iotApiCode: 'listCarInoutDetailBmoImpl',
          page,
          row
        }
  
        getCarInoutDetail(params).then(response => {
1d33ddab   wuxw   开发完成车辆详情页面
105
106
          this.carDetailCarInoutInfo.carIns = response.data
          this.total = response.total
6d21390a   wuxw   开发车辆详情页面
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
        }).catch(error => {
          console.error('请求失败:', error)
        })
      },
      handleCurrentChange(val) {
        this.currentPage = val
        this._loadCarDetailCarInoutData(val, this.pageSize)
      },
      _viewTempFeeConfigInOutCar(configId) {
        // 查看计费规则详情
        console.log(configId)
      },
      _carInoutOpenFile(fileUrl) {
        // 打开文件预览
        window.open(fileUrl)
      }
    }
  }
  </script>