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

转运单bug修复

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