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

修改项说明:

parent c9ac86ec
......@@ -162,7 +162,7 @@
[headerRefresh beginRefreshing];
self.announcementTableView.mj_header = headerRefresh;
MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (++ weakSelf.afficheModel.page.page >= weakSelf.totalPage) {
if (++ weakSelf.afficheModel.page.page > weakSelf.totalPage) {
[weakSelf.announcementTableView.mj_footer endRefreshingWithNoMoreData];
}else{
[weakSelf getAnnouncementDatas:NO];
......
......@@ -25,7 +25,7 @@
#pragma mark - UI
- (void)setUpUIAction
{
self.mobileNumberLabel.text = [NSString stringWithFormat:@"请输入%@接收到的验证码",[self phoneNumberEncryption:[Shoppersmanager manager].Shoppers.employee.mobilePhone]];
self.mobileNumberLabel.text = [NSString stringWithFormat:@"请输入%@接收到的验证码",[self phoneNumberEncryption:self.bankEntity.phoneNumber]];
self.bankNameAndCardTypeLabel.text = self.bankType;
}
......@@ -35,7 +35,7 @@
WS(weakSelf);
[XBLoadingView showHUDViewWithDefault];
//发送验证码
NSString *urlString = [NSString stringWithFormat:SERVERREQUESTURL(SENDSMS),[Shoppersmanager manager].Shoppers.employee.mobilePhone,[Shoppersmanager manager].Shoppers.employee.userName];
NSString *urlString = [NSString stringWithFormat:SERVERREQUESTURL(SENDSMSBANK),self.bankEntity.phoneNumber,[Shoppersmanager manager].Shoppers.employee.userName];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:urlString WithRequestType:ONE WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
......@@ -13,6 +13,6 @@
/**
* 数据源
*/
@property (nonatomic,strong) TOCommissionHistEntity *model;
@property (nonatomic,strong) ApplyHist *model;
@end
......@@ -58,23 +58,12 @@
NSString *string = ([self.model.amount floatValue] > 0)?[NSString stringWithFormat:@"+%.2f",[self.model.amount floatValue]]:[NSString stringWithFormat:@"%.2f",[self.model.amount floatValue]];
self.amountLabel.text = string;
self.createTimeLabel.text = self.model.createDate;
self.serialNumberLabel.text = self.model.orderNumber;
self.amountTypeLabel.text = [self separatePaymentsAndWithfrawal:self.model.state];
self.currentAmountLabel.text = [self.model.afteramount stringValue];
self.serialNumberLabel.text = self.model.billNumber;
self.amountTypeLabel.text = [BaseViewController separatePaymentsAndWithfrawal:self.model.amount withType:self.model.type];
self.currentAmountLabel.text = [self.model.remainAmount stringValue];
}
#pragma mark - 区分提现还是返佣
- (NSString *)separatePaymentsAndWithfrawal:(NSString *)state
{
if ([state isEqualToString:@"0"]) {
return @"返佣";
}
if ([state isEqualToString:@"1"]) {
return @"提现";
}
return nil;
}
......
......@@ -82,7 +82,7 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.paymentsTableView.mj_header = headerRefresh;
MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (++ weakSelf.model.page.page >= weakSelf.totalPage) {
if (++ weakSelf.model.page.page > weakSelf.totalPage) {
[weakSelf.paymentsTableView.mj_footer endRefreshingWithNoMoreData];
}else
{
......@@ -110,7 +110,7 @@
}
RsCommissionResponse *result = [[RsCommissionResponse alloc]initWithDictionary:returnValue[@"data"] error:nil];
weakSelf.totalPage = result.totalpages;
for (TOCommissionHistEntity *entity in result.list) {
for (ApplyHist *entity in result.list) {
[weakSelf.resultArray addObject:entity];
}
[weakSelf.paymentsTableView reloadData];
......@@ -130,9 +130,9 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
PaymentsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"PaymentsTableViewCell" forIndexPath:indexPath];
TOCommissionHistEntity *entity = self.resultArray[indexPath.row];
ApplyHist *entity = self.resultArray[indexPath.row];
cell.createTimeLabel.text = entity.createDate;
cell.moneyTypeLabel.text = [self separatePaymentsAndWithfrawal:entity.state];
cell.moneyTypeLabel.text = [[self class] separatePaymentsAndWithfrawal:entity.amount withType:entity.type];
NSString *string = ([entity.amount floatValue] > 0)?[NSString stringWithFormat:@"+%.2f",[entity.amount floatValue]]:[NSString stringWithFormat:@"%.2f",[entity.amount floatValue]];
cell.amountLabel.text = string;
return cell;
......@@ -156,17 +156,6 @@
[self.navigationController pushViewController:paymentsDetailsVC animated:YES];
}
#pragma mark - 区分提现还是返佣
- (NSString *)separatePaymentsAndWithfrawal:(NSString *)state
{
if ([state isEqualToString:@"0"]) {
return @"返佣";
}
if ([state isEqualToString:@"1"]) {
return @"提现";
}
return nil;
}
#pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
......
......@@ -43,7 +43,7 @@
if ([self.inputRebateTextField.text floatValue] > self.rebateAmount) {
[XBLoadingView showHUDViewWithText:@"当前账户余额不足"];return;
}
if ([self.inputRebateTextField.text floatValue] <= 10 && [self.billType isEqualToString:redPackage]) {
if ([self.inputRebateTextField.text floatValue] < 10 && [self.billType isEqualToString:redPackage]) {
[XBLoadingView showHUDViewWithText:@"提现金额不能小于10"];return;
}
if ([self includeChinese:self.inputRebateTextField.text]) {
......
......@@ -22,7 +22,7 @@
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"];
self.progressTitleLabel.text = [NSString stringWithFormat:@"%@ 进度",[BaseViewController setupLabelColor:entity.billType][@"text"]];
}
@end
......@@ -82,7 +82,7 @@
self.withdrawalTableView.mj_header = headerRefresh;
MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (++ weakSelf.model.page.page >= weakSelf.totalPage) {
if (++ weakSelf.model.page.page > weakSelf.totalPage) {
[weakSelf.withdrawalTableView.mj_footer endRefreshingWithNoMoreData];
}else
{
......
......@@ -15,7 +15,7 @@
<key>CFBundleName</key>
<string>欧立方</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.0.2</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......
......@@ -131,6 +131,14 @@
*/
+ (NSDictionary *)setupLabelColor:(NSString *)text;
/**
收支明细
@param number 金额
@param type 类型
*/
+ (NSString *)separatePaymentsAndWithfrawal:(NSNumber *)number withType:(NSString *)type;
/**
考核题型转义
*/
......
......@@ -231,14 +231,24 @@
string = @"驳回";
}else if ([text isEqualToString:@"commission"]) {
color = [UIColor blackColor];
string = @"【产品返利】进度:";
string = @"【产品返利】";
}else if ([text isEqualToString:@"redPackage"]) {
color = [UIColor blackColor];
string = @"【欧普奖励】进度:";
string = @"【欧普奖励】";
}
return @{@"text":string?string:text,@"color":color};
text = [[self class] isBlankString:text]?@"未知状态":text;
return @{@"text":[[self class] isBlankString:string]?text:string,@"color":color};
}
#pragma mark - 区分提现还是返佣
+ (NSString *)separatePaymentsAndWithfrawal:(NSNumber *)number withType:(NSString *)type
{
CGFloat money = [number floatValue];
NSString *moneyType = [[self class] setupLabelColor:type][@"text"];
return [NSString stringWithFormat:@"%@%@",moneyType,(money>0)?@"返佣":@"提现"];
}
#pragma mark - 获取当前时间之前或者之后的时间(之前传入负数)
+ (NSString *)getTimeby:(NSInteger)day
......
......@@ -20,6 +20,11 @@ extern NSString *const LOGIN;
*/
extern NSString *const SENDSMS;
/**
* 绑定银行卡
*/
extern NSString *const SENDSMSBANK;
/**
* 重置密码
*/
......
......@@ -15,10 +15,14 @@
NSString *const LOGIN = @"/employee/login";
/**
* 发送验证码
* 修改密码发送验证码
*/
NSString *const SENDSMS = @"/system/sendSms?mobilephone=%@&username=%@";
/**
* 绑定银行卡
*/
NSString *const SENDSMSBANK = @"/system/bankCardBindSendSms?mobilephone=%@&username=%@";
/**
* 重置密码
*/
......
#import <UIKit/UIKit.h>
@interface UIView (BadgeValue)
/**
* @author Clarence
*
* 设置消息数,设置小于或等于0 、@"" 、nil 就隐藏
*/
@property (nonatomic,copy)NSString *fl_badgeValue;
@end
#import "UIView+BadgeValue.h"
#import <objc/runtime.h>
static char fl_badgeValue_static;
static CGFloat fl_badgeValue_height = 15;
@implementation UIView (BadgeValue)
- (void)setFl_badgeValue:(NSString *)fl_badgeValue{
objc_setAssociatedObject(self, &fl_badgeValue_static, fl_badgeValue, OBJC_ASSOCIATION_COPY_NONATOMIC);
if (fl_badgeValue == nil || [fl_badgeValue isEqualToString:@""] || ([self fl_isAllNumber:fl_badgeValue] && fl_badgeValue.integerValue <= 0)) {
[self fl_clearBadgeValue];
}
else{
// NSAssert([self fl_isAllNumber:fl_badgeValue], @"字符串内容必须是数字");
CGRect rect = [fl_badgeValue boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:[UIFont smallSystemFontSize]]} context:nil];
// 创建红点
UIButton *redBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, rect.size.width > fl_badgeValue_height ? rect.size.width + 6 : fl_badgeValue_height, fl_badgeValue_height)];
redBtn.center = CGPointMake(self.frame.size.width, 0);
redBtn.tag = 1008611;
redBtn.layer.cornerRadius = fl_badgeValue_height / 2;
redBtn.layer.masksToBounds = YES;
redBtn.titleLabel.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]];
redBtn.backgroundColor = [UIColor redColor];
[redBtn setTitle:fl_badgeValue forState:UIControlStateNormal];
[self addSubview:redBtn];
[self bringSubviewToFront:redBtn];
}
}
- (NSString *)fl_badgeValue{
NSString *badgeValue = objc_getAssociatedObject(self, &fl_badgeValue_static);
// 少于0 重置为0
if (badgeValue.integerValue < 0) {
return @"0";
}
else{
return badgeValue;
}
}
- (void)fl_clearBadgeValue{
for (UIView *view in self.subviews) {
if ([view isKindOfClass:[UIButton class]] && view.tag == 1008611) {
[view removeFromSuperview];
}
}
}
// 判断是否全是数字
- (BOOL)fl_isAllNumber:(NSString *)text{
unichar str;
for (NSInteger index = 0; index < text.length; index ++) {
str = [text characterAtIndex:index];
if (isdigit(str)) {
return YES;
}
}
return NO;
}
@end
......@@ -128,7 +128,7 @@ extern NSString * const GRADEMETHOD_MANUL;
@class ApplyHist;
@class ApplyRequest;
@class RsApplyBillRequest;
@class RsCommissionRequest;
......@@ -260,6 +260,7 @@ extern NSString * const GRADEMETHOD_MANUL;
@class ForumReplyResponse;
@protocol ApplyHist @end
@protocol ApplyRequest @end
@protocol ForumReplyResponse @end
@protocol ForumReplyCondition @end
......@@ -5208,6 +5209,61 @@ extern NSString * const GRADEMETHOD_MANUL;
@end /* interface TOForumReplyEntity */
/**
* 流水明细分页查询结果
@author nevermore
@since 0.1
*/
@interface RsCommissionResponse : PageRows
/**
* (no documentation provided)
* @see ApplyHist
*
*/
@property (nonatomic, strong) NSArray<ApplyHist> *list;
@end /* interface RsCommissionResponse */
/**
* @author cyy24
@since 0.1
*/
@interface ApplyHist : JSONModel
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *type;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *createDate;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, strong) NSNumber *amount;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *billNumber;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, strong) NSNumber *remainAmount;
@end /* interface ApplyHist */
/**
* @Title: Entity
......@@ -6042,23 +6098,6 @@ extern NSString * const GRADEMETHOD_MANUL;
/**
* 流水明细分页查询结果
@author nevermore
@since 0.1
*/
@interface RsCommissionResponse : PageRows
/**
* (no documentation provided)
* @see TOCommissionHistEntity
*
*/
@property (nonatomic, strong) NSArray<TOCommissionHistEntity> *list;
@end /* interface RsCommissionResponse */
/**
* 系统用户父类表
......
......@@ -2149,6 +2149,22 @@ NSString * const GRADEMETHOD_MANUL = @"manul";
}
@end
@implementation ApplyHist
@synthesize type;
@synthesize createDate;
@synthesize amount;
@synthesize billNumber;
@synthesize remainAmount;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation RsCommissionResponse
......
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