Blame view

src/components/fee/feeDetailCar.vue 3.26 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
f80ea09a   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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    <div>
      <div class="margin-top">
        <el-table :data="feeDetailCarInfo.cars" style="width: 100%">
          <el-table-column prop="carNum" :label="$t('feeDetailCar.licensePlate')" align="center"></el-table-column>
          <el-table-column :label="$t('feeDetailCar.licenseType')" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.leaseType == 'T'">{{$t('feeDetailCar.temporaryCar')}}</span>
              <span v-else>{{scope.row.leaseTypeName}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="carTypeName" :label="$t('feeDetailCar.carType')" align="center"></el-table-column>
          <el-table-column prop="carColor" :label="$t('feeDetailCar.color')" align="center"></el-table-column>
          <el-table-column :label="$t('feeDetailCar.owner')" align="center">
            <template slot-scope="scope">{{scope.row.ownerName}}({{scope.row.link}})</template>
          </el-table-column>
          <el-table-column :label="$t('feeDetailCar.parkingSpace')" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.areaNum && scope.row.state == '1001'">
                {{scope.row.areaNum}}{{$t('feeDetailCar.parkingLot')}}{{scope.row.num}}{{$t('feeDetailCar.parkingSpace')}}
              </span>
              <span v-else>{{$t('feeDetailCar.spaceReleased')}}</span>
            </template>
          </el-table-column>
          <el-table-column :label="$t('feeDetailCar.validityPeriod')" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.leaseType == 'H'">
                {{scope.row.startTime}}<br>~{{scope.row.endTime}}
              </span>
              <span v-else>-</span>
            </template>
          </el-table-column>
        </el-table>
  
        <el-row class="margin-top">
          <el-col :span="12"></el-col>
          <el-col :span="12">
            <el-pagination
              @current-change="handleCurrentChange"
              :current-page="pagination.currentPage"
              :page-size="pagination.pageSize"
              layout="total, prev, pager, next"
              :total="pagination.total">
            </el-pagination>
          </el-col>
        </el-row>
      </div>
    </div>
  </template>
  
  <script>
  import { queryOwnerCars } from '@/api/fee/feeDetailCarApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'FeeDetailCar',
    data() {
      return {
        feeDetailCarInfo: {
          cars: [],
          memberId: ''
        },
        pagination: {
          currentPage: 1,
          pageSize: 10,
          total: 0
        }
      }
    },
    methods: {
      open(params) {
        this.feeDetailCarInfo.memberId = params.payerObjId
        this._loadFeeDetailCarData()
      },
      _loadFeeDetailCarData() {
        const params = {
          communityId: getCommunityId(),
          memberId: this.feeDetailCarInfo.memberId,
          page: this.pagination.currentPage,
          row: this.pagination.pageSize
        }
  
        queryOwnerCars(params).then(res => {
          this.feeDetailCarInfo.cars = res.data
f9f29297   wuxw   v1.9 分页 record 传给...
85
          this.pagination.total = res.total
f80ea09a   wuxw   加入费用详情
86
87
88
89
90
91
92
93
94
95
96
        }).catch(error => {
          console.error('Failed to load car details:', error)
        })
      },
      handleCurrentChange(val) {
        this.pagination.currentPage = val
        this._loadFeeDetailCarData()
      }
    }
  }
  </script>