| | |
| | | private val isCancel by lazy { |
| | | arguments?.getBoolean("isCancel",false)?:false |
| | | } |
| | | private val isCompany by lazy { |
| | | arguments?.getBoolean("isCompany",false)?:false |
| | | } |
| | | private var coupon = "" |
| | | |
| | | private val orderId by lazy { |
| | |
| | | // tv_origin_money.text = String.format(if (isCancel) "%.2f元" else "¥%.2f",money) |
| | | tv_origin_money.text = String.format("¥%.2f",money) |
| | | tv_money.text = String.format(if (isCancel) "%.2f元" else "¥%.2f",money) |
| | | if (isCompany){//企业公费 |
| | | rb_ali.gone() |
| | | line1.gone() |
| | | rb_wx.gone() |
| | | line2.gone() |
| | | rb_balance.text = "企业授信额度" |
| | | } |
| | | group_coupon.visibility = if (isCancel||isLogistics) { //取消支付没有优惠券,补差价没有优惠券 |
| | | View.GONE |
| | | } else { |
| | |
| | | } |
| | | tv_action.text = "立即支付%.2f元".format(payMoney) |
| | | |
| | | rb_balance.text = String.format("充值余额(%.2f可用)",balance) |
| | | rb_balance.text = String.format("${if (isCompany) "企业授信额度" else "充值余额"}(%.2f可用)",balance) |
| | | View.VISIBLE |
| | | } |
| | | // if (isLogistics){ //物流订单没有优惠券 |
| | |
| | | rb_offline.gone() |
| | | tv_action.setOnClickListener { |
| | | if (payWay == 3&&!isCancel&&balance<payMoney) |
| | | myToast("余额不足,请选择其他支付方式") |
| | | myToast(if (isCompany) "额度不足,请申请企业额度" else "余额不足,请选择其他支付方式") |
| | | else |
| | | callback?.onOk(payWay,if (coupon.isEmpty()) 0 else coupon.toInt(),discountType) |
| | | } |