Commit 846ad7e6 authored by admin's avatar admin

完善部分在线抽查

parent b8d1f808
......@@ -10,9 +10,7 @@
#define Url_h
// url
//#define kRedStarURL @"http://218.244.151.129:7580/"
// #define kRedStarURL @"http://218.244.151.129:7580/"
#define kRedStarURL @"http://219.235.234.225:7580/"
......
......@@ -89,7 +89,8 @@
_uuidArray = [NSMutableArray array];
for (TreeNodeModel *model in array) {
nameStr = [nameStr stringByAppendingString:[NSString stringWithFormat:@"%@,", model.name]];
[_uuidArray addObject:model.uuid];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:model.uuid , @"store_uuid", model.code , @"store_code", model.name , @"store_name", nil];
[_uuidArray addObject:dict];
}
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
_storeName = nameStr;
......@@ -104,7 +105,7 @@
NSDate *date = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"YYYY-MM-dd+hh:mm:ss"];
[dateFormatter setDateFormat:@"YYYY-MM-dd hh:mm:ss"];
NSString *dateString = [dateFormatter stringFromDate:date];
NSString *operId = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_code"];
......@@ -121,7 +122,7 @@
@"content":self.footView.contentTextView.text,
@"endDate":dateString,
@"state":@"initial",
// @"stores":_uuidArray
@"stores":_uuidArray
};
NSLog(@"发起抽查par = %@", parameters);
[httpClient saveSportCheckWithParameters:parameters completion:^(id response, NSError *error) {
......
......@@ -47,9 +47,14 @@
self.imageNameArray = [NSMutableArray array];
[self requestOnLineDetail];
_rowNumber = 1;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self requestOnLineDetail];
}
#pragma mark - Private Mothods
- (void)setNav
......
......@@ -61,7 +61,6 @@
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self requestSpotCheckList];
_page = 0;
}
......@@ -69,6 +68,8 @@
{
[super viewWillAppear:animated];
self.tabBarController.tabBar.hidden = YES;
[self requestSpotCheckList];
}
......@@ -176,12 +177,15 @@
[spot setValuesForKeysWithDictionary:dict];
[tempArray addObject:spot];
}
[_allSpotCheckList addObjectsFromArray:tempArray];
if (tempArray.count < 10) {
[self.tableView.footer noticeNoMoreData];
} else {
[self.tableView.footer endRefreshing];
}
[MBProgressHUD hideHUDForView:self.view animated:YES];
[self.tableView reloadData];
}];
}
......
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