|
@@ -56,6 +56,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
@IBOutlet weak var discountPriceLabel3: NSTextField! // 折扣
|
|
|
@IBOutlet weak var extendedButton1: NSButton!
|
|
|
|
|
|
+ @IBOutlet weak var couponView: NSView!
|
|
|
@IBOutlet weak var couponButton: NSButton!
|
|
|
@IBOutlet weak var couponBox: NSBox!
|
|
|
@IBOutlet weak var coupomTextField: NSTextField!
|
|
@@ -762,9 +763,6 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
paySumLabel1.stringValue = String(format: "%@ %@", abbreviation, String(format: "%.2f", paySum))
|
|
|
|
|
|
if self.discountScale == "" && self.discountAmount == "" {
|
|
|
- if lastPriceLabel1.stringValue != paySumLabel1.stringValue {
|
|
|
- couponButton.isHidden = true
|
|
|
- }
|
|
|
refreshApplyButton(isReveal: true)
|
|
|
} else {
|
|
|
refreshApplyButton(isReveal: false)
|
|
@@ -772,8 +770,10 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
|
|
|
|
|
|
if discount == 0 {
|
|
|
discountView.isHidden = true
|
|
|
+ couponView.isHidden = false
|
|
|
} else {
|
|
|
discountView.isHidden = false
|
|
|
+ couponView.isHidden = true
|
|
|
}
|
|
|
discountLayoutConstraint.constant = discountView.isHidden ? -CGRectGetHeight(discountView.bounds) : 8
|
|
|
}
|