Commit c9ac86ec authored by 曹云霄's avatar 曹云霄

修改项说明:优化进度详情状态显示

parent 1d5d0e08
...@@ -86,38 +86,11 @@ ...@@ -86,38 +86,11 @@
#pragma mark - 切换ContentController #pragma mark - 切换ContentController
- (IBAction)paymentsButtonAndWithdrawalButtonClick:(UIButton *)sender { - (IBAction)paymentsButtonAndWithdrawalButtonClick:(UIButton *)sender {
switch (sender.tag) { for (id object in self.view.subviews) {
case 100: if ([object isKindOfClass:[UIButton class]]) {
{ UIButton *button = (UIButton *)object;
self.beenUseButton.selected = NO; button.selected = NO;
self.isUsedButton.selected = NO;
self.examinationButton.selected = NO;
} }
break;
case 101:
{
self.dontUseButton.selected = NO;
self.isUsedButton.selected = NO;
self.beenUseButton.selected = NO;
}
break;
case 102:
{
self.dontUseButton.selected = NO;
self.isUsedButton.selected = NO;
self.examinationButton.selected = NO;
}
break;
case 103:
{
self.dontUseButton.selected = NO;
self.beenUseButton.selected = NO;
self.examinationButton.selected = NO;
}
break;
default:
break;
} }
sender.selected = YES; sender.selected = YES;
[self setupInstructionsViewOrigin:sender]; [self setupInstructionsViewOrigin:sender];
......
...@@ -68,21 +68,11 @@ ...@@ -68,21 +68,11 @@
#pragma mark - 切换ContentController #pragma mark - 切换ContentController
- (IBAction)paymentsButtonAndWithdrawalButtonClick:(UIButton *)sender { - (IBAction)paymentsButtonAndWithdrawalButtonClick:(UIButton *)sender {
switch (sender.tag) { for (id object in self.view.subviews) {
case 100: if ([object isKindOfClass:[UIButton class]]) {
{ UIButton *button = (UIButton *)object;
self.usedDrawButton.selected = NO; button.selected = NO;
}
break;
case 101:
{
self.notDrawButton.selected = NO;
} }
break;
default:
break;
} }
sender.selected = YES; sender.selected = YES;
[self setupInstructionsViewOrigin:sender]; [self setupInstructionsViewOrigin:sender];
......
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
返回控制器类型 返回控制器类型
- PaymentDetails: 收支明细 - PaymentDetails: 收支明细
- OppleReward: opple奖励
- Withdrawal: 提现进度 - Withdrawal: 提现进度
*/ */
typedef NS_ENUM(NSInteger,CONTROLLERTYPE){ typedef NS_ENUM(NSInteger,CONTROLLERTYPE){
PaymentDetails=0, PaymentDetails=0,
OppleReward,
Withdrawal Withdrawal
}; };
......
...@@ -42,6 +42,11 @@ ...@@ -42,6 +42,11 @@
*/ */
@property (weak, nonatomic) IBOutlet UIButton *withdrawalButton; @property (weak, nonatomic) IBOutlet UIButton *withdrawalButton;
/**
欧普奖励
*/
@property (weak, nonatomic) IBOutlet UIButton *oppleRewardButton;
@end @end
...@@ -77,21 +82,11 @@ ...@@ -77,21 +82,11 @@
#pragma mark - 收支明细、提现进度 #pragma mark - 收支明细、提现进度
- (IBAction)paymentDetailsOrwithdrawalButtonClickAction:(UIButton *)sender { - (IBAction)paymentDetailsOrwithdrawalButtonClickAction:(UIButton *)sender {
NSInteger number = sender.tag-100; for (id object in self.view.subviews) {
switch (number) { if ([object isKindOfClass:[UIButton class]]) {
case PaymentDetails: UIButton *button = (UIButton *)object;
{ button.selected = NO;
self.withdrawalButton.selected = NO;
} }
break;
case Withdrawal:
{
self.paymentDetailsButton.selected = NO;
}
break;
default:
break;
} }
sender.selected = YES; sender.selected = YES;
[self setupInstructionsViewOrigin:sender]; [self setupInstructionsViewOrigin:sender];
......
...@@ -22,8 +22,10 @@ ...@@ -22,8 +22,10 @@
@property (nonatomic,copy) NSString *applyUUID; @property (nonatomic,copy) NSString *applyUUID;
@end @end
@implementation RebateDetailsViewController @implementation RebateDetailsViewController
- (void)viewDidLoad { - (void)viewDidLoad {
...@@ -41,7 +43,7 @@ ...@@ -41,7 +43,7 @@
if ([self.inputRebateTextField.text floatValue] > self.rebateAmount) { if ([self.inputRebateTextField.text floatValue] > self.rebateAmount) {
[XBLoadingView showHUDViewWithText:@"当前账户余额不足"];return; [XBLoadingView showHUDViewWithText:@"当前账户余额不足"];return;
} }
if ([self.inputRebateTextField.text floatValue] <= 10) { if ([self.inputRebateTextField.text floatValue] <= 10 && [self.billType isEqualToString:redPackage]) {
[XBLoadingView showHUDViewWithText:@"提现金额不能小于10"];return; [XBLoadingView showHUDViewWithText:@"提现金额不能小于10"];return;
} }
if ([self includeChinese:self.inputRebateTextField.text]) { if ([self includeChinese:self.inputRebateTextField.text]) {
......
...@@ -99,10 +99,6 @@ ...@@ -99,10 +99,6 @@
@end @end
//欧普奖励
NSString *const commission = @"commission";
//红包
NSString *const redPackage = @"redPackage";
@implementation RebateViewController @implementation RebateViewController
...@@ -258,7 +254,7 @@ NSString *const redPackage = @"redPackage"; ...@@ -258,7 +254,7 @@ NSString *const redPackage = @"redPackage";
- (void)haveBindingBankCARDS - (void)haveBindingBankCARDS
{ {
TOBankCardEntity *entity = self.resultEntity.bankCards[0]; TOBankCardEntity *entity = self.resultEntity.bankCards[0];
NSString *bankCard = [NSString stringWithFormat:@"您已绑定提现账户\n%@(**** %@)",entity.bankCardType,[entity.bankAccount substringWithRange:NSMakeRange(entity.bankAccount.length-4, 4)]]; NSString *bankCard = [NSString stringWithFormat:@"您已绑定提现账户\n%@\n%@****%@",entity.bankCardType,[entity.bankAccount substringWithRange:NSMakeRange(0, 4)],[entity.bankAccount substringWithRange:NSMakeRange(entity.bankAccount.length-4, 4)]];
UIAlertController *alertView = [UIAlertController alertControllerWithTitle:nil message:bankCard preferredStyle:UIAlertControllerStyleAlert]; UIAlertController *alertView = [UIAlertController alertControllerWithTitle:nil message:bankCard preferredStyle:UIAlertControllerStyleAlert];
[alertView addAction:[UIAlertAction actionWithTitle:@"解除绑定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { [alertView addAction:[UIAlertAction actionWithTitle:@"解除绑定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self removeBindingBankCARDS]; [self removeBindingBankCARDS];
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
*/ */
@property (weak, nonatomic) IBOutlet UILabel *progressLabel; @property (weak, nonatomic) IBOutlet UILabel *progressLabel;
/**
进度title
*/
@property (weak, nonatomic) IBOutlet UILabel *progressTitleLabel;
/** /**
* 时间 * 时间
*/ */
...@@ -25,5 +30,9 @@ ...@@ -25,5 +30,9 @@
*/ */
@property (weak, nonatomic) IBOutlet UILabel *amountLabel; @property (weak, nonatomic) IBOutlet UILabel *amountLabel;
/**
数据源
*/
@property (nonatomic,strong) TOApplyBillEntity *entity;
@end @end
...@@ -15,10 +15,14 @@ ...@@ -15,10 +15,14 @@
[super awakeFromNib]; [super awakeFromNib];
} }
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - (void)setEntity:(TOApplyBillEntity *)entity
[super setSelected:selected animated:animated]; {
_entity = entity;
// Configure the view for the selected state self.amountLabel.text = [NSString stringWithFormat:@"%.2f",[entity.applyMoney floatValue]];
self.createTimeLabel.text = entity.createDate;
self.progressLabel.textColor = [BaseViewController setupLabelColor:entity.billStates][@"color"];
self.progressLabel.text = [BaseViewController setupLabelColor:entity.billStates][@"text"];
self.progressTitleLabel.text = [BaseViewController setupLabelColor:entity.billType][@"text"];
} }
@end @end
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
*/ */
@property (weak, nonatomic) IBOutlet UILabel *applyCompleteLabel; @property (weak, nonatomic) IBOutlet UILabel *applyCompleteLabel;
/**
* 到账时间
*/
@property (weak, nonatomic) IBOutlet UILabel *appleCompleteTimeLabel;
/** /**
* 金额 * 金额
......
...@@ -30,11 +30,10 @@ ...@@ -30,11 +30,10 @@
#pragma mark - 填充数据 #pragma mark - 填充数据
- (void)fillDataAction - (void)fillDataAction
{ {
BOOL boolValue = [self.model.billStates isEqualToString:@"到账成功"]; BOOL boolValue = [self.model.billStates isEqualToString:@"accomplished"] || [self.model.billStates isEqualToString:@"reject"];
self.progressImageView.image = boolValue?TCImage(@"finish"):TCImage(@"progress"); self.progressImageView.image = boolValue?TCImage(@"finish"):TCImage(@"progress");
self.appleCompleteTimeLabel.hidden = !boolValue; self.applyCompleteLabel.textColor = [BaseViewController setupLabelColor:self.model.billStates][@"color"];
self.appleCompleteTimeLabel.textColor = [BaseViewController setupLabelColor:self.model.billStates][@"color"]; self.applyCompleteLabel.text = [BaseViewController setupLabelColor:self.model.billStates][@"text"];
self.appleCompleteTimeLabel.text = [BaseViewController setupLabelColor:self.model.billStates][@"text"];
self.submitApplyTimeLabel.text = self.model.createDate; self.submitApplyTimeLabel.text = self.model.createDate;
self.orderTimeLabel.text = self.model.createDate; self.orderTimeLabel.text = self.model.createDate;
self.orderBillNumberLabel.text = self.model.billNumber; self.orderBillNumberLabel.text = self.model.billNumber;
......
...@@ -130,10 +130,7 @@ ...@@ -130,10 +130,7 @@
{ {
WithdrawalTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WithdrawalTableViewCell" forIndexPath:indexPath]; WithdrawalTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WithdrawalTableViewCell" forIndexPath:indexPath];
TOApplyBillEntity *entity = self.resultArray[indexPath.row]; TOApplyBillEntity *entity = self.resultArray[indexPath.row];
cell.amountLabel.text = [NSString stringWithFormat:@"%.2f",[entity.applyMoney floatValue]]; cell.entity = entity;
cell.createTimeLabel.text = entity.createDate;
cell.progressLabel.textColor = [[self class] setupLabelColor:entity.billStates][@"color"];
cell.progressLabel.text = [[self class] setupLabelColor:entity.billStates][@"text"];
return cell; return cell;
} }
......
This diff is collapsed.
...@@ -229,10 +229,17 @@ ...@@ -229,10 +229,17 @@
}else if ([text isEqualToString:@"reject"]) { }else if ([text isEqualToString:@"reject"]) {
color = [UIColor redColor]; color = [UIColor redColor];
string = @"驳回"; string = @"驳回";
}else if ([text isEqualToString:@"commission"]) {
color = [UIColor blackColor];
string = @"【产品返利】进度:";
}else if ([text isEqualToString:@"redPackage"]) {
color = [UIColor blackColor];
string = @"【欧普奖励】进度:";
} }
return @{@"text":string?string:text,@"color":color}; return @{@"text":string?string:text,@"color":color};
} }
#pragma mark - 获取当前时间之前或者之后的时间(之前传入负数) #pragma mark - 获取当前时间之前或者之后的时间(之前传入负数)
+ (NSString *)getTimeby:(NSInteger)day + (NSString *)getTimeby:(NSInteger)day
{ {
......
...@@ -600,3 +600,12 @@ extern NSString *const INSPECTIONTHROUGH; ...@@ -600,3 +600,12 @@ extern NSString *const INSPECTIONTHROUGH;
*/ */
extern NSString *const RECRUITTHROUGH; extern NSString *const RECRUITTHROUGH;
/**
* 返利
*/
extern NSString *const commission;
/**
* 红包
*/
extern NSString *const redPackage;
...@@ -598,3 +598,19 @@ NSString *const INSPECTIONTHROUGH = @"6"; ...@@ -598,3 +598,19 @@ NSString *const INSPECTIONTHROUGH = @"6";
* 闯关通过 * 闯关通过
*/ */
NSString *const RECRUITTHROUGH = @"7"; NSString *const RECRUITTHROUGH = @"7";
/**
* 返利
*/
NSString *const commission = @"commission";
/**
* 红包
*/
NSString *const redPackage = @"redPackage";
...@@ -288,6 +288,4 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) { ...@@ -288,6 +288,4 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
#endif /* PrefixHeader_pch */ #endif /* PrefixHeader_pch */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment