//
|
// InvoiceHistoryViewController.swift
|
// OKProject
|
//
|
// Created by 无故事王国 on 2022/6/10.
|
// Copyright © 2022 yangwang. All rights reserved.
|
//
|
|
import UIKit
|
|
class InvoiceHistoryViewController: YYTableViewController {
|
|
let viewModel = InvoiceHistoryViewModel()
|
|
override func viewDidLoad() {
|
super.viewDidLoad()
|
title = "开票历史"
|
|
tableView.delegate = self
|
tableView.dataSource = self
|
tableView.register(UINib(nibName: "InvoiceCheckTCell", bundle: nil), forCellReuseIdentifier: "_InvoiceCheckTCell")
|
tableView.separatorStyle = .none
|
viewModel.configure(tableView: tableView)
|
tableView.beginRefreshing()
|
}
|
}
|
|
extension InvoiceHistoryViewController:UITableViewDelegate{
|
|
}
|
|
extension InvoiceHistoryViewController:UITableViewDataSource{
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
return viewModel.dataSource.value.count
|
}
|
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
let model = viewModel.dataSource.value[indexPath.row]
|
let cell = tableView.dequeueReusableCell(withIdentifier: "_InvoiceCheckTCell") as! InvoiceCheckTCell
|
cell.setInvoiceHistoryModel(model)
|
return cell
|
}
|
|
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
return 82
|
}
|
}
|