Commit 3241f8a1 authored by 曹云霄's avatar 曹云霄

修改项说明:修复未选中当前客户时,促销查询错误

parent ab139e43
...@@ -202,6 +202,7 @@ ...@@ -202,6 +202,7 @@
OrderdetailsViewController *orderdetails = [storyboard instantiateViewControllerWithIdentifier:@"orderdetails"]; OrderdetailsViewController *orderdetails = [storyboard instantiateViewControllerWithIdentifier:@"orderdetails"];
TOOrderEntity *model = (TOOrderEntity *)[[self.datasArray objectAtIndex_opple:indexPath.row] order]; TOOrderEntity *model = (TOOrderEntity *)[[self.datasArray objectAtIndex_opple:indexPath.row] order];
orderdetails.orderCode = model.orderNumber; orderdetails.orderCode = model.orderNumber;
orderdetails.consumerID = model.consumerId;
if ([model.orderState isEqualToString:@"006"] || [model.orderState isEqualToString:@"002"] || [model.orderState isEqualToString:@"003"]) { if ([model.orderState isEqualToString:@"006"] || [model.orderState isEqualToString:@"002"] || [model.orderState isEqualToString:@"003"]) {
orderdetails.isShowPrintButton = YES; orderdetails.isShowPrintButton = YES;
orderdetails.isShowPayButton = NO; orderdetails.isShowPayButton = NO;
......
...@@ -143,7 +143,6 @@ ...@@ -143,7 +143,6 @@
RsLotteryResponse *drawRecord = [[RsLotteryResponse alloc]initWithDictionary:returnValue[@"data"] error:nil]; RsLotteryResponse *drawRecord = [[RsLotteryResponse alloc]initWithDictionary:returnValue[@"data"] error:nil];
[weakSelf.datasArray addObjectsFromArray:drawRecord.list]; [weakSelf.datasArray addObjectsFromArray:drawRecord.list];
weakSelf.totalPage = [returnValue[@"data"][@"totalpages"] integerValue]; weakSelf.totalPage = [returnValue[@"data"][@"totalpages"] integerValue];
NSLog(@"%ld",weakSelf.datasArray.count);
[weakSelf.drawDetailsTableView reloadData]; [weakSelf.drawDetailsTableView reloadData];
}else { }else {
[weakSelf SHOWPrompttext:returnValue[@"message"]]; [weakSelf SHOWPrompttext:returnValue[@"message"]];
...@@ -185,7 +184,7 @@ ...@@ -185,7 +184,7 @@
} }
UsedDrawTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UsedDrawTableViewCell" forIndexPath:indexPath]; UsedDrawTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UsedDrawTableViewCell" forIndexPath:indexPath];
cell.orderNumber.text = drawEntity.draw.orderNumber; cell.orderNumber.text = drawEntity.draw.orderNumber;
cell.drawTimeLabel.text = drawEntity.draw.createDate; cell.drawTimeLabel.text = drawEntity.draw.drawDate;
cell.trophyLabel.text = drawEntity.draw.awardDescription; cell.trophyLabel.text = drawEntity.draw.awardDescription;
if (self.drawValue == 0) { if (self.drawValue == 0) {
cell.drawTimeLabel.hidden = YES; cell.drawTimeLabel.hidden = YES;
......
...@@ -66,6 +66,11 @@ ...@@ -66,6 +66,11 @@
*/ */
@property (nonatomic,assign) BOOL isUserInteractionEnabled; @property (nonatomic,assign) BOOL isUserInteractionEnabled;
/**
消费者ID
*/
@property (nonatomic,copy) NSString *consumerID;
......
...@@ -288,14 +288,14 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -288,14 +288,14 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}]; }];
} }
/// 查询客户订单抽奖状态 /// 查询客户订单抽奖状态
static RsAwardDraw *resultModel = nil; __block RsAwardDraw *resultModel = nil;
dispatch_group_enter(group); dispatch_group_enter(group);
RsLotteryRequest *queryDrawState = [[RsLotteryRequest alloc]init]; RsLotteryRequest *queryDrawState = [[RsLotteryRequest alloc]init];
/// 判断订单是否支付 /// 判断订单是否支付
if (!self.isShowPayButton) { if (!self.isShowPayButton) {
queryDrawState.orderNumberEquals = self.orderCode; queryDrawState.orderNumberEquals = self.orderCode;
} }
queryDrawState.winnerIdEquals = [Customermanager manager].model.fid; queryDrawState.winnerIdEquals = self.consumerID?self.consumerID:[Customermanager manager].model.fid;
queryDrawState.stateEquals = self.isShowPayButton?ACCOMPLISHED:USED; queryDrawState.stateEquals = self.isShowPayButton?ACCOMPLISHED:USED;
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = ZERO; page.page = ZERO;
...@@ -306,17 +306,13 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -306,17 +306,13 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
NSDictionary *dict = [returnValue[@"data"][@"list"] firstObject]; NSDictionary *dict = [returnValue[@"data"][@"list"] firstObject];
resultModel = [[RsAwardDraw alloc]initWithDictionary:dict error:nil]; resultModel = [[RsAwardDraw alloc]initWithDictionary:dict error:nil];
}else {
resultModel = nil;
} }
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
resultModel = nil;
dispatch_group_leave(group); dispatch_group_leave(group);
[weakSelf RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
[weakSelf ErrorMBProgressView:NETWORK]; [weakSelf ErrorMBProgressView:NETWORK];
} WithFailureBlock:^(NSError *error) { } WithFailureBlock:^(NSError *error) {
resultModel = nil;
dispatch_group_leave(group); dispatch_group_leave(group);
[weakSelf RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
[weakSelf ErrorMBProgressView:error.localizedDescription]; [weakSelf ErrorMBProgressView:error.localizedDescription];
...@@ -543,8 +539,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -543,8 +539,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
weakSelf.isShowHeaderView = YES; weakSelf.isShowHeaderView = YES;
[weakSelf CreateTableviewHeaderView]; [weakSelf CreateTableviewHeaderView];
weakSelf.orderDetailsTableview.tableFooterView = nil; weakSelf.orderDetailsTableview.tableFooterView = nil;
static BOOL isJDEcard = NO;//促销中是否有京东E卡; __block BOOL isJDEcard = NO;//促销中是否有京东E卡;
static BOOL isGuideDraw = NO;//促销中是否有导购抽奖机会 __block BOOL isGuideDraw = NO;//促销中是否有导购抽奖机会
/// 刷新数据成功 /// 刷新数据成功
[weakSelf getOrderDetailsData:^{ [weakSelf getOrderDetailsData:^{
/// 先判断促销中有无E卡,有则认为发放成功 /// 先判断促销中有无E卡,有则认为发放成功
...@@ -568,9 +564,6 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -568,9 +564,6 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}else if (!isJDEcard && isGuideDraw) { }else if (!isJDEcard && isGuideDraw) {
[weakSelf rebateApplySuccess:@"抽奖机会已放到你的账户"]; [weakSelf rebateApplySuccess:@"抽奖机会已放到你的账户"];
} }
/// 初始化判断
isGuideDraw = NO;
isJDEcard = NO;
}]; }];
}]; }];
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundleName</key> <key>CFBundleName</key>
<string>欧立方</string> <string>欧立方</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.2.1</string> <string>1.2.2</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict> <dict>
......
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