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

修改项说明:

parent 7ab7c0bb
...@@ -80,6 +80,11 @@ ...@@ -80,6 +80,11 @@
UIView *loadHeaderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 220)]; UIView *loadHeaderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 220)];
[loadHeaderView addSubview:headerView]; [loadHeaderView addSubview:headerView];
headerView.model = self.orderBill; headerView.model = self.orderBill;
//区分配送单
if ([self.title isEqualToString:@"配油单明细"] && [self.orderBill.state isEqualToString:GTO_REPAIR_STATE_INITIAL]) {
headerView.orderStateLabe.text = @"已作废";
headerView.orderStateLabe.textColor = RGBA(124, 135, 136, 1);
}
self.distributionTableView.tableHeaderView = loadHeaderView; self.distributionTableView.tableHeaderView = loadHeaderView;
} }
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
if ([returnValue[@"success"] isEqualToNumber:@1]) { if ([returnValue[@"success"] isEqualToNumber:@1]) {
weakSelf.orderDetails = [[ReceiveBill alloc]initWithDictionary:returnValue[@"data"] error:nil]; weakSelf.orderDetails = [[ReceiveBill alloc]initWithDictionary:returnValue[@"data"] error:nil];
//保存收油单状态 //保存收油单状态
if ([weakSelf.orderDetails.state isEqualToString:@"submit"] || [weakSelf.orderDetails.state isEqualToString:@"canceled"] || [weakSelf.orderDetails.state isEqualToString:@"accomplished"]) { if ([weakSelf.orderDetails.state isEqualToString:@"submit"] || [weakSelf.orderDetails.state isEqualToString:@"canceled"] || [weakSelf.orderDetails.state isEqualToString:@"accomplished"] | [weakSelf.orderDetails.state isEqualToString:@"delete"] | [weakSelf.orderDetails.state isEqualToString:@"cancel"]) {
weakSelf.orderStateBoolValue = YES; weakSelf.orderStateBoolValue = YES;
} }
//加入数据源 //加入数据源
...@@ -337,7 +337,7 @@ ...@@ -337,7 +337,7 @@
self.seeObtainTableView.tableHeaderView = view; self.seeObtainTableView.tableHeaderView = view;
//保存、提交 //保存、提交
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
if (![self.orderDetails.state isEqualToString:@"canceled"] && ![self.orderDetails.state isEqualToString:@"accomplished"] && ![self.orderDetails.state isEqualToString:@"submit"]) { if (![self.orderDetails.state isEqualToString:@"canceled"] && ![self.orderDetails.state isEqualToString:@"accomplished"] && ![self.orderDetails.state isEqualToString:@"submit"] && ![self.orderDetails.state isEqualToString:@"delete"] && ![self.orderDetails.state isEqualToString:@"cancel"]) {
SaveCommitView *commitView = [SaveCommitView initializeTwo]; SaveCommitView *commitView = [SaveCommitView initializeTwo];
commitView.frame = CGRectMake(0,ScreenSize.height-164, ScreenSize.width,100); commitView.frame = CGRectMake(0,ScreenSize.height-164, ScreenSize.width,100);
......
...@@ -560,7 +560,7 @@ typedef enum : NSUInteger { ...@@ -560,7 +560,7 @@ typedef enum : NSUInteger {
[self hiddenBoltMaskView:YES]; [self hiddenBoltMaskView:YES];
} }
if ([state isEqualToString:@"none"]) { if ([state isEqualToString:@"none"]) {
state = nil; state = @"desc";
} }
NSMutableArray *array = [NSMutableArray arrayWithArray:[self.queryOrder toDictionary][@"orders"]]; NSMutableArray *array = [NSMutableArray arrayWithArray:[self.queryOrder toDictionary][@"orders"]];
NSMutableDictionary *dict = [NSMutableDictionary dictionary]; NSMutableDictionary *dict = [NSMutableDictionary dictionary];
...@@ -624,7 +624,7 @@ typedef enum : NSUInteger { ...@@ -624,7 +624,7 @@ typedef enum : NSUInteger {
array[2] = [NSDictionary dictionary]; array[2] = [NSDictionary dictionary];
}else { }else {
NSMutableDictionary *dict = [NSMutableDictionary dictionary]; NSMutableDictionary *dict = [NSMutableDictionary dictionary];
[dict setValue:@"billNumberEquals" forKey:@"operation"]; [dict setValue:@"billNumberLike" forKey:@"operation"];
[dict setValue:@[billNumber] forKey:@"parameters"]; [dict setValue:@[billNumber] forKey:@"parameters"];
array[2] = dict; array[2] = dict;
self.queryOrder.conditions = (NSArray<QueryCondition> *)array; self.queryOrder.conditions = (NSArray<QueryCondition> *)array;
......
...@@ -198,9 +198,16 @@ ...@@ -198,9 +198,16 @@
- (void)sureButtonClickAction:(UIBarButtonItem *)button - (void)sureButtonClickAction:(UIBarButtonItem *)button
{ {
if (self.completeSelectBlock) { if (self.completeSelectBlock) {
if ([self.recordSelectState containsObject:@"1"]) { if ([self.recordSelectState containsObject:@"1"]) {
self.completeSelectBlock(self.orderResultArray[[self.recordSelectState indexOfObject:@"1"]]); NSDictionary *dict = self.orderResultArray[[self.recordSelectState indexOfObject:@"1"]];
WS(weakSelf);
[self judgeOrderIsEmploy:dict[@"billnumber"] resultBlock:^(BOOL boolValue) {
if (boolValue) {
weakSelf.completeSelectBlock(dict);
}else{
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}
}];
} else { } else {
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
} }
...@@ -224,6 +231,27 @@ ...@@ -224,6 +231,27 @@
button.selected = !boolValue; button.selected = !boolValue;
} }
#pragma mark -判断配油单是否被使用
- (void)judgeOrderIsEmploy:(NSString *)pickingBillNumber resultBlock:(void(^)(BOOL boolValue))block
{
[IBTLoadingView showProgressLabel:@"正在加载..."];
[HttpRequestManager requestNetworkwithURL:[NSString stringWithFormat:@"%@/receiveBill/getByPickingBillNumberAndState/%@",HTTP_REST_API_BASE_URL,pickingBillNumber] withRequestType:ONE withParameter:nil withSuccess:^(id returnValue) {
[IBTLoadingView hideHUDWithText:nil];
if ([returnValue[@"success"] isEqualToNumber:@1]) {
block(YES);
} else {
[IBTLoadingView showTextOnly:returnValue[@"message"]];
}
} withFailed:^(NSError *failed) {
[GTOCommonTools cancelMJRefreshState:self.selectOrderTableView];
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTextOnly:failed.localizedDescription];
}];
}
#pragma mark -友好界面 #pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{ {
......
...@@ -282,6 +282,10 @@ ...@@ -282,6 +282,10 @@
return @"已配送"; return @"已配送";
} else if ([stateString isEqualToString:@"effectived"]) {//已生效 } else if ([stateString isEqualToString:@"effectived"]) {//已生效
return @"已生效"; return @"已生效";
}else if ([stateString isEqualToString:@"delete"]) {//已删除
return @"已删除";
} else if ([stateString isEqualToString:@"cancel"]) {//已作废
return @"已作废";
} }
return nil; return nil;
} }
......
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