TransferDetailViewController.m 20.4 KB
Newer Older
陈俊俊's avatar
陈俊俊 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//
//  TransferDetailViewController.m
//  XFFruit
//
//  Created by 陈俊俊 on 15/9/28.
//  Copyright (c) 2015年 Xummer. All rights reserved.
// 转运单详情

#import "TransferDetailViewController.h"
#import "BottomTransferView.h"

#define BottomHeight                                50
#define LeftMargin                                  15
#define LeftWidth                                   100
#define LeftHeight                                  30
#define TopMargin                                   15
typedef enum : NSUInteger {
    AbortTag = 20000,
19 20
    EndTag,
    SubmitTag
陈俊俊's avatar
陈俊俊 committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
    
} BtnTag;
@interface TransferDetailViewController (){
    UIScrollView *_scrollView;
    UIView *_transportView;
    UIView *_bottomView;
    UIButton *_firstBtn;
    UIButton *_secondBtn;
    BottomTransferView *_transView;
}
@property (nonatomic,strong)UILabel *billNumberLabel;
@property (nonatomic,strong)UILabel *purchaseLabel;
@property (nonatomic,strong)UILabel *stateLabel;
@property (nonatomic,strong)UILabel *warehouseLabel;
@property (nonatomic,strong)UILabel *rwarehouseLabel;
@property (nonatomic,strong)UILabel *carnumberLabel;
@property (nonatomic,strong)UILabel *carhoneLabel;
@property (nonatomic,strong)UILabel *createOperLabel;
陈俊俊's avatar
陈俊俊 committed
39
@property (nonatomic,strong)UILabel *arriveDateLabel;
陈俊俊's avatar
陈俊俊 committed
40
@property (nonatomic,strong)UILabel *noteLabel;
41 42 43 44 45 46 47 48 49 50 51

@property (nonatomic,strong)UILabel *leftBillNumberLabel;
@property (nonatomic,strong)UILabel *leftPurchaseLabel;
@property (nonatomic,strong)UILabel *leftStateLabel;
@property (nonatomic,strong)UILabel *leftWarehouseLabel;
@property (nonatomic,strong)UILabel *leftRwarehouseLabel;
@property (nonatomic,strong)UILabel *leftCarnumberLabel;
@property (nonatomic,strong)UILabel *leftCarhoneLabel;
@property (nonatomic,strong)UILabel *leftCreateOperLabel;
@property (nonatomic,strong)UILabel *leftArriveDateLabel;
@property (nonatomic,strong)UILabel *leftNoteLabel;
陈俊俊's avatar
陈俊俊 committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
@end

@implementation TransferDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self bulifLayout];
    [self getDataFromServer];
}
- (void)getDataFromServer{
    __weak typeof(self)weakSelf = self;
    void(^succ)(id) = ^(id data) {
        [IBTLoadingView hideHUDWithText:nil];
        __strong __typeof(weakSelf)strongSelf = weakSelf;
        if (data) {
            NSInteger success = [data[@"success"] integerValue];
            NSString *message  = data[@"message"] ;
            if (success == 1) {
                NSDictionary *dictData = data[@"data"];
                
                Transfer *transfer = [[Transfer alloc]init];
                [transfer setValuesForKeysWithDictionary:dictData];
                self.transfer = transfer;
                [strongSelf fetchtTransportDetail];
            }else{
                [IBTLoadingView showTips:message];
            }
        }else{
            [IBTLoadingView showTips:@"     无记录     "];
        }
    };
    void(^fail)(id) = ^(id data) {
        [IBTLoadingView hideHUDWithText:nil];
        [IBTLoadingView showTips:data];
    };
    [IBTLoadingView showProgressLabel:@"正在加载..."];
    [[ICRHTTPController sharedController] getTransferResultWithTransferUuid:self.transfer.uuid success:succ failure:fail];
}
- (void)fetchtTransportDetail{
    self.billNumberLabel.text = [IBTCommon checkString:self.transfer.billnumber];
    if ([self.transfer.state isEqualToString:TRANSFER_STATE_UNRECEIVED]) {
        self.stateLabel.textColor = [UIColor redColor];
        self.stateLabel.text = @"待收货";
    }else if ([self.transfer.state isEqualToString:TRANSFER_STATE_RECEIVED]) {
        self.stateLabel.textColor = [UIColor greenColor];
        self.stateLabel.text = @"已收货";
    }else if ([self.transfer.state isEqualToString:TRANSFER_STATE_ABORTED]) {
        self.stateLabel.textColor = [UIColor grayColor];
        self.stateLabel.text = @"已作废";
101
    }else if ([self.transfer.state isEqualToString:TRANSFER_STATE_PROCESS]) {
陈俊俊's avatar
陈俊俊 committed
102
        self.stateLabel.textColor = [UIColor greenColor];
103 104 105 106
        self.stateLabel.text = @"提交系统处理";
    }else if ([self.transfer.state isEqualToString:TRANSFER_STATE_PROCESSFAIL]) {
        self.stateLabel.textColor = [UIColor blackColor];
        self.stateLabel.text = @"系统处理失败";
陈俊俊's avatar
陈俊俊 committed
107 108 109 110 111 112 113 114
    }
    self.purchaseLabel.text = [self getPurchaseWith:self.transfer.pdtDetails];
    self.warehouseLabel.text = [IBTCommon checkString:self.transfer.warehouseName];
    self.rwarehouseLabel.text = [IBTCommon checkString:self.transfer.rwarehouseName];
    self.carnumberLabel.text = [IBTCommon checkString:self.transfer.carnumber];
    self.carhoneLabel.text = [IBTCommon checkString:self.transfer.carphone];
    self.noteLabel.text = [NSString stringWithFormat:@"%@",self.transfer.note?self.transfer.note:@"无"];
    self.createOperLabel.text = [NSString stringWithFormat:@"%@%@",[IBTCommon checkString:self.transfer.create_operName],self.transfer.create_time.length > 10 ? [self.transfer.create_time substringToIndex:10] : self.transfer.create_time];
陈俊俊's avatar
陈俊俊 committed
115
     self.arriveDateLabel.text = [NSString stringWithFormat:@"%@",self.transfer.arriveDate?[[IBTCommon checkString:self.transfer.arriveDate]substringToIndex:10]:@"无"];
陈俊俊's avatar
陈俊俊 committed
116 117 118 119 120 121
    [_transView refreshTranProduct:self.transfer.pdtDetails];
    [_transView refreshCost:self.transfer.accountDetails];
    [self setNoteHeight];
}
- (void)setNoteHeight
{
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
    CGFloat purchaseHeight = [self.purchaseLabel calculateHeight];
    if (purchaseHeight < LeftHeight) {
        purchaseHeight = LeftHeight;
    }
    self.purchaseLabel.height = purchaseHeight;
    
    self.leftStateLabel.top = self.purchaseLabel.bottom;
    self.stateLabel.top = self.purchaseLabel.bottom;
    
    self.leftWarehouseLabel.top = self.leftStateLabel.bottom;
    self.warehouseLabel.top = self.leftStateLabel.bottom;
    
    self.leftRwarehouseLabel.top = self.leftWarehouseLabel.bottom;
    self.rwarehouseLabel.top = self.leftWarehouseLabel.bottom;
    
    
    self.leftCarnumberLabel.top = self.leftRwarehouseLabel.bottom;
    self.carnumberLabel.top = self.leftRwarehouseLabel.bottom;
陈俊俊's avatar
陈俊俊 committed
140
    
141 142
    self.leftCarhoneLabel.top = self.leftCarnumberLabel.bottom;
    self.carhoneLabel.top = self.leftCarnumberLabel.bottom;
陈俊俊's avatar
陈俊俊 committed
143
    
144 145
    self.leftCreateOperLabel.top = self.leftCarhoneLabel.bottom;
    self.createOperLabel.top = self.leftCarhoneLabel.bottom;
146
    
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
    self.leftArriveDateLabel.top = self.leftCreateOperLabel.bottom;
    self.arriveDateLabel.top = self.leftCreateOperLabel.bottom;
    
    self.leftNoteLabel.top = self.leftArriveDateLabel.bottom;
    self.noteLabel.top = self.leftArriveDateLabel.bottom;
    
    CGFloat height =  [self.noteLabel calculateHeight];
    if (height < LeftHeight) {
        height = LeftHeight;
    }
    
    self.noteLabel.height = height;
    
    CGFloat totalHeight = height + LeftHeight*8 + purchaseHeight;

162 163 164 165 166 167 168 169
    CGRect purchaseFrame = _transportView.frame;
    purchaseFrame.size.height = totalHeight + LeftMargin;
    _transportView.frame = purchaseFrame;


    CGRect bottomFrame = _bottomView.frame;
    bottomFrame.origin.y = CGRectGetMaxY(_transportView.frame) + TopMargin;
    _bottomView.frame = bottomFrame;
陈俊俊's avatar
陈俊俊 committed
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
    
    _scrollView.contentSize = CGSizeMake(ScreenSize.width, totalHeight + CGRectGetHeight(_bottomView.frame) + TopMargin*2);
}
- (NSString *)getPurchaseWith:(NSArray *)purchases{
    NSString *purchseNumber = @"";
    
    NSInteger count = 0;
    for (NSDictionary *billDict in purchases) {
        if (![billDict[@"sourcebillnumber"] isEqual:[NSNull null]]) {
            count ++;
            if (purchseNumber.length == 0) {
                purchseNumber = [purchseNumber stringByAppendingFormat:@"%@",billDict[@"sourcebillnumber"]];
            }else{
                purchseNumber = [purchseNumber stringByAppendingFormat:@",%@" ,billDict[@"sourcebillnumber"]];
            }
        }
    }
    if (count == 0) {
        purchseNumber = @"无";
    }
    return purchseNumber;
}

陈俊俊's avatar
陈俊俊 committed
193 194 195 196 197 198 199 200
- (void)createBtnWithArr:(NSArray *)arr{
    CGFloat btnWidth = (ScreenSize.width - LeftMargin * (arr.count+1))/arr.count;
    for (NSInteger i = 0; i < arr.count; i++) {
        NSInteger btnTag = 0;
        if ([arr[i] isEqualToString:@"结束"]) {
            btnTag = EndTag;
        }else if ([arr[i] isEqualToString:@"作废"]) {
            btnTag = AbortTag;
201
        }else if ([arr[i] isEqualToString:@"收货"]) {
202
            btnTag = SubmitTag;
203 204
        } else {
        
陈俊俊's avatar
陈俊俊 committed
205 206 207 208 209 210 211 212 213
        }
        CGRect btnFrame = CGRectMake(LeftMargin + (LeftMargin + btnWidth)*i,  ScreenSize.height  - 64 - BottomHeight +5, btnWidth, 40);
        UIButton *perBtn = [IBTCustomButtom creatButtonWithFrame:btnFrame target:self sel:@selector(btnClick:) tag:btnTag image:nil title:arr[i] titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
        [self.view addSubview:perBtn];
    }
}



陈俊俊's avatar
陈俊俊 committed
214 215 216 217 218 219 220
#pragma mark - 视图初始化
- (void)bulifLayout{
    _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height - 64 - BottomHeight)];
    _scrollView.showsHorizontalScrollIndicator  = NO;
    _scrollView.showsVerticalScrollIndicator = NO;
    _scrollView.backgroundColor = XXFBgColor;
    [self.view addSubview:_scrollView];
221
    if ([self.transfer.state isEqualToString:TRANSFER_STATE_RECEIVED] || [self.transfer.state isEqualToString:TRANSFER_STATE_UNRECEIVED]) {  //已收货 //待收货
222
        if ([IBTCommon checkIsPermission:TRANSFER_ACTION_ABORT] && !self.isWms) {
陈俊俊's avatar
陈俊俊 committed
223
            [self createBtnWithArr:@[@"作废"]];
陈俊俊's avatar
陈俊俊 committed
224 225 226
        }else{
            [self hiddenBottomView];
        }
227
    }else if ([self.transfer.state isEqualToString:TRANSFER_STATE_PROCESSFAIL]){
228 229 230 231 232 233 234 235 236 237 238 239
//        NSMutableArray *arr = [NSMutableArray array]; //系统处理失败
//        if ([IBTCommon checkIsPermission:TRANSPORT_ACTION_ABORT]) {
//            [arr addObject:@"作废"];
//        }if ([IBTCommon checkIsPermission:TRANSPORT_ACTION_NEW]) {
//            //[arr addObject:@"提交"];
//            [arr addObject:@"收货"];
//        }
//        if (arr.count == 0) {
//            [self hiddenBottomView];
//        }else{
//            [self createBtnWithArr:arr];
//        }
陈俊俊's avatar
陈俊俊 committed
240 241
    }else{
        [self hiddenBottomView];
陈俊俊's avatar
陈俊俊 committed
242
    }
陈俊俊's avatar
陈俊俊 committed
243
    NSArray *leftArr = @[@"单号:",@"来源单据:",@"状态:",@"发货仓库:",@"收货仓库:",@"车辆:",@"司机电话:",@"创建:",@"预计到货时间:",@"备注:"];
陈俊俊's avatar
陈俊俊 committed
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
    
    _transportView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*leftArr.count +LeftMargin)];
    _transportView.backgroundColor = [UIColor whiteColor];
    [_scrollView addSubview:_transportView];
    
    
    for (NSInteger i = 0 ; i < leftArr.count; i++) {
        UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 10 + LeftHeight *i, LeftWidth, LeftHeight)];
        leftLabel.font = GXF_SEVENTEENTH_SIZE;
        leftLabel.text = leftArr[i];
        leftLabel.textColor = GXF_DETAIL_COLOR;
        [_transportView addSubview:leftLabel];
        
        UILabel *rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(leftLabel.frame), 10 + LeftHeight *i, _transportView.frame.size.width - LeftMargin - LeftWidth, LeftHeight)];
        rightLabel.font = GXF_SEVENTEENTH_SIZE;
        rightLabel.textColor = GXF_DETAIL_COLOR;
        
        if (i == 0) {
            self.billNumberLabel = rightLabel;
263
            self.leftBillNumberLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
264 265
        }else if (i == 1) {
            self.purchaseLabel = rightLabel;
266 267
            self.purchaseLabel.numberOfLines = 0;
            self.leftPurchaseLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
268 269
        }else if(i == 2){
            self.stateLabel = rightLabel;
270
            self.leftStateLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
271 272
        }else if(i == 3){
            self.warehouseLabel = rightLabel;
273
            self.leftWarehouseLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
274 275
        }else if(i == 4){
            self.rwarehouseLabel = rightLabel;
276
            self.leftRwarehouseLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
277 278
        }else if(i == 5){
            self.carnumberLabel = rightLabel;
279
            self.leftCarnumberLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
280 281
        }else if(i == 6){
            self.carhoneLabel = rightLabel;
282
            self.leftCarhoneLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
283 284
        }else if(i == 7){
            self.createOperLabel = rightLabel;
285
            self.leftCreateOperLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
286 287 288 289 290
        }else if(i == 8){
            leftLabel.width = LeftWidth + 10;
            rightLabel.left = leftLabel.right;
            rightLabel.width = ScreenSize.width - leftLabel.width - LeftMargin;
            self.arriveDateLabel = rightLabel;
291
            self.leftArriveDateLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
292 293 294
        }else if(i == leftArr.count - 1){
            rightLabel.numberOfLines = 0;
            self.noteLabel = rightLabel;
295
            self.leftNoteLabel = leftLabel;
陈俊俊's avatar
陈俊俊 committed
296 297 298 299 300
        }
        [_transportView addSubview:rightLabel];
    }
    [self createBottomView];
}
陈俊俊's avatar
陈俊俊 committed
301 302 303 304 305
- (void)hiddenBottomView{
    CGRect scrollViewFrame = _scrollView.frame;
    scrollViewFrame.size.height = ScreenSize.height - 64;
    _scrollView.frame = scrollViewFrame;
}
陈俊俊's avatar
陈俊俊 committed
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
- (void)createBottomView{
    _bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_transportView.frame) + TopMargin, ScreenSize.width, 300)];
    _bottomView.backgroundColor = [UIColor whiteColor];
    
    [_scrollView addSubview:_bottomView];
    
    _transView = [[BottomTransferView alloc]initWithFrame:_bottomView.bounds withHidden:YES];
    [_bottomView addSubview:_transView];
}

- (void)btnClick:(UIButton *)btn{
    CLog(@"%ld",(long)btn.tag);
    switch (btn.tag) {
        case AbortTag:
        {
            CLog(@"作废");
            UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"请确认作废" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认", nil];
            alertView.delegate = self;
            alertView.tag = AbortTag;
            [alertView show];
        }
            break;
        case EndTag:
        {
            CLog(@"结束");
            UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"请确认结束" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认", nil];
            alertView.delegate = self;
            alertView.tag = EndTag;
            [alertView show];
        }
            break;
337 338
        case SubmitTag:
        {
339 340
            CLog(@"收货");
            UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"请确认收货" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认", nil];
341 342 343 344 345
            alertView.delegate = self;
            alertView.tag = SubmitTag;
            [alertView show];
        }
            break;
陈俊俊's avatar
陈俊俊 committed
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
            
        default:
            break;
    }
}


- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
    if (alertView.tag == AbortTag) {
        if (buttonIndex == 1) {
            [self dealByAction:TRANSFER_STATE_ABORTED];//作废
        }
    }else if (alertView.tag == EndTag){
        if (buttonIndex == 1) {
            [self dealByAction:TRANSFER_STATE_RECEIVED];//结束
        }
362
    }else if (alertView.tag == SubmitTag){
363 364
        if (buttonIndex == 1) { //收货
            [self getDataFromServer:TRANSFER_STATE_PROCESSFAIL msg:@"正在收货..."];
365
        }
陈俊俊's avatar
陈俊俊 committed
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
    }
}
- (void)dealByAction:(NSString *)action{
    //保存
    void(^succ)(id) = ^(id data) {
        [IBTLoadingView hideHUDWithText:nil];
        if (data) {
            NSInteger success = [data[@"success"] integerValue];
            NSString *message = data[@"message"];
            if (success == 1) {
                [ICRUserUtil sharedInstance].needFresh = YES;
                [self PopViewControllerAnimated:YES];
            }else{
                [IBTLoadingView showTips:message];
            }
        }else{
            [IBTLoadingView showTips:@"操作异常"];
        }
    };
    void(^fail)(id) = ^(id data) {
        [IBTLoadingView hideHUDWithText:nil];
        [IBTLoadingView showTips:data];
    };
    [IBTLoadingView showProgressLabel:@"正在加载..."];
    if ([action isEqualToString:TRANSFER_STATE_ABORTED]) {
        [[ICRHTTPController sharedController] abortTransferWithTransferUuid:self.transfer.uuid version:self.transfer.version success:succ failure:fail];
    }else{
        [[ICRHTTPController sharedController] endTransferWithTransferUuid:self.transfer.uuid version:self.transfer.version success:succ failure:fail];
    }
}
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
#pragma mark - 提交数据
- (void)getDataFromServer:(NSString *)state msg:(NSString *)msg{
    //保存
    void(^succ)(id) = ^(id data) {
        [IBTLoadingView hideHUDWithText:nil];
        if (data) {
            NSInteger success = [data[@"success"] integerValue];
            NSString *message = data[@"message"];
            if (success == 1) {
                [ICRUserUtil sharedInstance].needFresh = YES;
                [self PopViewControllerAnimated:YES];
            }else{
                [IBTLoadingView showTips:message];
            }
        }
    };
    void(^fail)(id) = ^(id data) {
        [IBTLoadingView hideHUDWithText:nil];
        [IBTLoadingView showTips:data];
    };
    
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
//    NSDictionary *dict = @{@"uuid":self.transfer.uuid,
//                           @"version":self.transfer.version,
//                           @"billnumber":self.transfer.billnumber,
//                           @"enterprise":[ICRUserUtil sharedInstance].orgId,
//                           @"state":TRANSFER_STATE_UNRECEIVED,
//                           @"warehouseUuid":[IBTCommon checkString:self.transfer.warehouseUuid],
//                           @"warehouseCode":[IBTCommon checkString:self.transfer.warehouseCode],
//                           @"warehouseName":[IBTCommon checkString:self.transfer.warehouseName],
//                           @"rwarehouseUuid":[IBTCommon checkString:self.transfer.rwarehouseUuid],
//                           @"rwarehouseCode":[IBTCommon checkString:self.transfer.rwarehouseCode],
//                           @"rwarehouseName":[IBTCommon checkString:self.transfer.rwarehouseName],
//                           @"carnumber":[IBTCommon checkString:self.transfer.carnumber],
//                           @"type":[IBTCommon checkString:self.transfer.type],
//                           @"carphone":[IBTCommon checkString:self.transfer.carphone],
//                           @"arriveDate":[IBTCommon checkString:self.transfer.arriveDate],
//                           @"note":[IBTCommon checkString:self.transfer.note],
//                           @"pdtDetails":self.transfer.pdtDetails,
//                           @"accountDetails":self.transfer.accountDetails
//                           };
//    [IBTLoadingView showProgressLabel:msg];
//    [[ICRHTTPController sharedController] saveTransferWithData:dict success:succ failure:fail];
    
439 440 441 442
    NSDictionary *dict = @{@"uuid":self.transfer.uuid,
                           @"version":self.transfer.version,
                           @"billnumber":self.transfer.billnumber,
                           @"enterprise":[ICRUserUtil sharedInstance].orgId,
443 444
                           @"state":self.transfer.state,
                           @"warehouseUuid":[IBTCommon checkString:self.transfer. warehouseUuid],
445 446 447 448 449 450 451 452 453 454 455 456
                           @"warehouseCode":[IBTCommon checkString:self.transfer.warehouseCode],
                           @"warehouseName":[IBTCommon checkString:self.transfer.warehouseName],
                           @"rwarehouseUuid":[IBTCommon checkString:self.transfer.rwarehouseUuid],
                           @"rwarehouseCode":[IBTCommon checkString:self.transfer.rwarehouseCode],
                           @"rwarehouseName":[IBTCommon checkString:self.transfer.rwarehouseName],
                           @"carnumber":[IBTCommon checkString:self.transfer.carnumber],
                           @"type":[IBTCommon checkString:self.transfer.type],
                           @"carphone":[IBTCommon checkString:self.transfer.carphone],
                           @"note":[IBTCommon checkString:self.transfer.note],
                           @"pdtDetails":self.transfer.pdtDetails,
                           };
    [IBTLoadingView showProgressLabel:msg];
457
    [[ICRHTTPController sharedController] saveReceiptAndReceiveWithData:dict success:succ failure:fail];
458
}
陈俊俊's avatar
陈俊俊 committed
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end