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

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

parent 1d5d0e08
......@@ -86,38 +86,11 @@
#pragma mark - 切换ContentController
- (IBAction)paymentsButtonAndWithdrawalButtonClick:(UIButton *)sender {
switch (sender.tag) {
case 100:
{
self.beenUseButton.selected = NO;
self.isUsedButton.selected = NO;
self.examinationButton.selected = NO;
for (id object in self.view.subviews) {
if ([object isKindOfClass:[UIButton class]]) {
UIButton *button = (UIButton *)object;
button.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;
[self setupInstructionsViewOrigin:sender];
......
......@@ -68,21 +68,11 @@
#pragma mark - 切换ContentController
- (IBAction)paymentsButtonAndWithdrawalButtonClick:(UIButton *)sender {
switch (sender.tag) {
case 100:
{
self.usedDrawButton.selected = NO;
for (id object in self.view.subviews) {
if ([object isKindOfClass:[UIButton class]]) {
UIButton *button = (UIButton *)object;
button.selected = NO;
}
break;
case 101:
{
self.notDrawButton.selected = NO;
}
break;
default:
break;
}
sender.selected = YES;
[self setupInstructionsViewOrigin:sender];
......
......@@ -13,10 +13,12 @@
返回控制器类型
- PaymentDetails: 收支明细
- OppleReward: opple奖励
- Withdrawal: 提现进度
*/
typedef NS_ENUM(NSInteger,CONTROLLERTYPE){
PaymentDetails=0,
OppleReward,
Withdrawal
};
......
......@@ -42,6 +42,11 @@
*/
@property (weak, nonatomic) IBOutlet UIButton *withdrawalButton;
/**
欧普奖励
*/
@property (weak, nonatomic) IBOutlet UIButton *oppleRewardButton;
@end
......@@ -69,7 +74,7 @@
{
PaymentsViewController *payments = self.childViewControllers[0];
payments.view.frame = CGRectMake(0, 0, self.controllerBackView.width, self.controllerBackView.height);
WithdrawalViewController *withdrawal = self.childViewControllers[1];
withdrawal.view.frame = CGRectMake(0, 0, self.controllerBackView.width, self.controllerBackView.height);
}
......@@ -77,21 +82,11 @@
#pragma mark - 收支明细、提现进度
- (IBAction)paymentDetailsOrwithdrawalButtonClickAction:(UIButton *)sender {
NSInteger number = sender.tag-100;
switch (number) {
case PaymentDetails:
{
self.withdrawalButton.selected = NO;
}
break;
case Withdrawal:
{
self.paymentDetailsButton.selected = NO;
for (id object in self.view.subviews) {
if ([object isKindOfClass:[UIButton class]]) {
UIButton *button = (UIButton *)object;
button.selected = NO;
}
break;
default:
break;
}
sender.selected = YES;
[self setupInstructionsViewOrigin:sender];
......
......@@ -22,8 +22,10 @@
@property (nonatomic,copy) NSString *applyUUID;
@end
@implementation RebateDetailsViewController
- (void)viewDidLoad {
......@@ -41,7 +43,7 @@
if ([self.inputRebateTextField.text floatValue] > self.rebateAmount) {
[XBLoadingView showHUDViewWithText:@"当前账户余额不足"];return;
}
if ([self.inputRebateTextField.text floatValue] <= 10) {
if ([self.inputRebateTextField.text floatValue] <= 10 && [self.billType isEqualToString:redPackage]) {
[XBLoadingView showHUDViewWithText:@"提现金额不能小于10"];return;
}
if ([self includeChinese:self.inputRebateTextField.text]) {
......
......@@ -99,10 +99,6 @@
@end
//欧普奖励
NSString *const commission = @"commission";
//红包
NSString *const redPackage = @"redPackage";
@implementation RebateViewController
......@@ -258,7 +254,7 @@ NSString *const redPackage = @"redPackage";
- (void)haveBindingBankCARDS
{
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];
[alertView addAction:[UIAlertAction actionWithTitle:@"解除绑定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self removeBindingBankCARDS];
......
......@@ -15,6 +15,11 @@
*/
@property (weak, nonatomic) IBOutlet UILabel *progressLabel;
/**
进度title
*/
@property (weak, nonatomic) IBOutlet UILabel *progressTitleLabel;
/**
* 时间
*/
......@@ -25,5 +30,9 @@
*/
@property (weak, nonatomic) IBOutlet UILabel *amountLabel;
/**
数据源
*/
@property (nonatomic,strong) TOApplyBillEntity *entity;
@end
......@@ -15,10 +15,14 @@
[super awakeFromNib];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
- (void)setEntity:(TOApplyBillEntity *)entity
{
_entity = entity;
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
......@@ -31,10 +31,6 @@
*/
@property (weak, nonatomic) IBOutlet UILabel *applyCompleteLabel;
/**
* 到账时间
*/
@property (weak, nonatomic) IBOutlet UILabel *appleCompleteTimeLabel;
/**
* 金额
......
......@@ -30,11 +30,10 @@
#pragma mark - 填充数据
- (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.appleCompleteTimeLabel.hidden = !boolValue;
self.appleCompleteTimeLabel.textColor = [BaseViewController setupLabelColor:self.model.billStates][@"color"];
self.appleCompleteTimeLabel.text = [BaseViewController setupLabelColor:self.model.billStates][@"text"];
self.applyCompleteLabel.textColor = [BaseViewController setupLabelColor:self.model.billStates][@"color"];
self.applyCompleteLabel.text = [BaseViewController setupLabelColor:self.model.billStates][@"text"];
self.submitApplyTimeLabel.text = self.model.createDate;
self.orderTimeLabel.text = self.model.createDate;
self.orderBillNumberLabel.text = self.model.billNumber;
......
......@@ -130,10 +130,7 @@
{
WithdrawalTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WithdrawalTableViewCell" forIndexPath:indexPath];
TOApplyBillEntity *entity = self.resultArray[indexPath.row];
cell.amountLabel.text = [NSString stringWithFormat:@"%.2f",[entity.applyMoney floatValue]];
cell.createTimeLabel.text = entity.createDate;
cell.progressLabel.textColor = [[self class] setupLabelColor:entity.billStates][@"color"];
cell.progressLabel.text = [[self class] setupLabelColor:entity.billStates][@"text"];
cell.entity = entity;
return cell;
}
......
This diff is collapsed.
......@@ -229,10 +229,17 @@
}else if ([text isEqualToString:@"reject"]) {
color = [UIColor redColor];
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};
}
#pragma mark - 获取当前时间之前或者之后的时间(之前传入负数)
+ (NSString *)getTimeby:(NSInteger)day
{
......
......@@ -600,3 +600,12 @@ extern NSString *const INSPECTIONTHROUGH;
*/
extern NSString *const RECRUITTHROUGH;
/**
* 返利
*/
extern NSString *const commission;
/**
* 红包
*/
extern NSString *const redPackage;
......@@ -598,3 +598,19 @@ NSString *const INSPECTIONTHROUGH = @"6";
* 闯关通过
*/
NSString *const RECRUITTHROUGH = @"7";
/**
* 返利
*/
NSString *const commission = @"commission";
/**
* 红包
*/
NSString *const redPackage = @"redPackage";
......@@ -288,6 +288,4 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
#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