1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // OrderDetailFootView.swift
- // ADHTuanCan
- //
- // Created by 敖德亨 on 2023/11/8.
- //
- import UIKit
- class OrderDetailFootView: UIView {
- @IBOutlet weak var countLab: UILabel!
-
- @IBOutlet weak var priceLab: UILabel!
-
- @IBOutlet weak var orderNumLab: UILabel!
-
- ///下单时间
- @IBOutlet weak var takeOrderTimeLab: UILabel!
-
- /// 结算方式
- @IBOutlet weak var paySetLab: UILabel!
-
- var dataModel : OrderOutDetailModel?
-
- /// hud 提示
- lazy var hud : MCHud! = {
- return MCHud()
- }()
-
- override func awakeFromNib() {
- super.awakeFromNib()
- }
-
- func configModel(model : OrderOutDetailModel){
- self.dataModel = model
- self.countLab.text = LanguagesUtil.createTextBy(Ctext: "共\(model.mealNum ?? "")件 合计s$", Etext: "There are \(model.mealNum ?? "") dishes,total s$")
- self.priceLab.text = "\(model.payAmount ?? "")"
- self.orderNumLab.text = "\(model.orderNo ?? "")"
- self.takeOrderTimeLab.text = "\(model.createTime ?? "")"
-
- ///结算方式,1全款,2定金
- if model.settleType === 1{
- self.paySetLab.text = LanguagesUtil.createTextBy(Ctext: "全款", Etext: "full payment")
- }else{
- self.paySetLab.text = LanguagesUtil.createTextBy(Ctext: "定金", Etext: "deposit")
- }
- }
- @IBAction func copyOrderNumAcTion(_ sender: UIButton) {
-
- let pastboard = UIPasteboard.general
- pastboard.string = "\(self.dataModel?.orderNo ?? "")"
- if !(pastboard.string.isEmptyStr){
- print("%@",pastboard.string!)
- self.hud.showSuccess(LanguagesUtil.createTextBy(Ctext: "复制成功", Etext: "copy success"))
- }
- }
-
-
- }
|