|
@@ -35,6 +35,9 @@ class ShoppingCartListTableViewCell: UITableViewCell {
|
|
if productMdl?.stock == 0 {
|
|
if productMdl?.stock == 0 {
|
|
self.resetDisableWithTitle("已售罄")
|
|
self.resetDisableWithTitle("已售罄")
|
|
}
|
|
}
|
|
|
|
+ if productMdl?.upStatus != 0 && productMdl?.stock != 0 {
|
|
|
|
+ self.resetEnabledCell()
|
|
|
|
+ }
|
|
|
|
|
|
// 选中状态
|
|
// 选中状态
|
|
let selStatus = productMdl?.isSelect == 1 ? true : false
|
|
let selStatus = productMdl?.isSelect == 1 ? true : false
|
|
@@ -176,6 +179,16 @@ class ShoppingCartListTableViewCell: UITableViewCell {
|
|
selectedButton.isHidden = true
|
|
selectedButton.isHidden = true
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private func resetEnabledCell() {
|
|
|
|
+ deliveryTime.isHidden = false
|
|
|
|
+ plusButton.isHidden = false
|
|
|
|
+ numberLabel.isHidden = false
|
|
|
|
+ reduceButton.isHidden = false
|
|
|
|
+
|
|
|
|
+ disableLabel.isHidden = true
|
|
|
|
+ selectedButton.isHidden = false
|
|
|
|
+ }
|
|
|
|
+
|
|
private lazy var selectedButton: UIButton = {
|
|
private lazy var selectedButton: UIButton = {
|
|
let selectedButton = UIButton(type: UIButton.ButtonType.custom)
|
|
let selectedButton = UIButton(type: UIButton.ButtonType.custom)
|
|
selectedButton.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
|
|
selectedButton.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
|