Commit cf9cc8ba authored by 陈俊俊's avatar 陈俊俊

转运单bug修复

parent dfa77cfd
...@@ -298,8 +298,6 @@ typedef enum : NSUInteger { ...@@ -298,8 +298,6 @@ typedef enum : NSUInteger {
if (products.count > 0) { if (products.count > 0) {
NSMutableArray *arr = [self coverTransferFromTransportProduct:products]; NSMutableArray *arr = [self coverTransferFromTransportProduct:products];
[_bottomView reProduct:arr]; [_bottomView reProduct:arr];
TransferPdtDetail *pdt = arr[0];
[self setPhoneAndCar:pdt.carnumber phone:pdt.carphone];
} }
}; };
[self PushViewController:tpv animated:YES]; [self PushViewController:tpv animated:YES];
...@@ -309,9 +307,16 @@ typedef enum : NSUInteger { ...@@ -309,9 +307,16 @@ typedef enum : NSUInteger {
ChooseTransferViewController *ctv = [ChooseTransferViewController new]; ChooseTransferViewController *ctv = [ChooseTransferViewController new];
ctv.chooseTransferProduct = ^(NSArray *products){ ctv.chooseTransferProduct = ^(NSArray *products){
if (products.count > 0) { if (products.count > 0) {
[_bottomView reProduct:products];
TransferPdtDetail *pdt = products[0]; TransferPdtDetail *pdt = products[0];
[self setPhoneAndCar:pdt.carnumber phone:pdt.carphone]; [self setPhoneAndCar:pdt.carnumber phone:pdt.carphone];
NSMutableArray *newProducts = [NSMutableArray array];
for (TransferPdtDetail *pdt in products) {
pdt.carphone = nil;
pdt.carnumber = nil;
[newProducts addObject:pdt];
}
[_bottomView reProduct:newProducts];
} }
}; };
[self PushViewController:ctv animated:YES]; [self PushViewController:ctv animated:YES];
...@@ -325,6 +330,7 @@ typedef enum : NSUInteger { ...@@ -325,6 +330,7 @@ typedef enum : NSUInteger {
if (_sheetView.phoneTextFiled.text.length < 1) { if (_sheetView.phoneTextFiled.text.length < 1) {
_sheetView.phoneTextFiled.text = carphone; _sheetView.phoneTextFiled.text = carphone;
} }
} }
...@@ -455,6 +461,7 @@ typedef enum : NSUInteger { ...@@ -455,6 +461,7 @@ typedef enum : NSUInteger {
} }
- (NSMutableArray *)coverTransferFromTransportProduct:(NSArray *)products{ - (NSMutableArray *)coverTransferFromTransportProduct:(NSArray *)products{
NSMutableArray *transferP = [NSMutableArray new]; NSMutableArray *transferP = [NSMutableArray new];
NSInteger index = 0;
for (TransportPdtDetail *pdt in products) { for (TransportPdtDetail *pdt in products) {
TransferPdtDetail *ferPdt = [TransferPdtDetail new]; TransferPdtDetail *ferPdt = [TransferPdtDetail new];
ferPdt.uuid = pdt.uuid; ferPdt.uuid = pdt.uuid;
...@@ -474,9 +481,11 @@ typedef enum : NSUInteger { ...@@ -474,9 +481,11 @@ typedef enum : NSUInteger {
ferPdt.baseUnit = pdt.baseUnit; ferPdt.baseUnit = pdt.baseUnit;
ferPdt.total = pdt.total; ferPdt.total = pdt.total;
ferPdt.note = pdt.note; ferPdt.note = pdt.note;
ferPdt.carphone = pdt.carphone; if (index == 0) {
ferPdt.carnumber = pdt.carnumber; [self setPhoneAndCar:pdt.carnumber phone:pdt.carphone];
}
[transferP addObject:ferPdt]; [transferP addObject:ferPdt];
index ++;
} }
return transferP; return transferP;
} }
......
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