Commit c8199aad authored by Sandy's avatar Sandy

发运单详情界面增加字段创建人、创建时间、审核人、审核时间、收货人、收货时间、有效期

parent 7cd4ec37
...@@ -60,13 +60,33 @@ typedef enum : NSUInteger { ...@@ -60,13 +60,33 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)UILabel *otherPriceLabel; @property (nonatomic,strong)UILabel *otherPriceLabel;
@property (nonatomic,strong)UILabel *totalPriceLabel; @property (nonatomic,strong)UILabel *totalPriceLabel;
@property (nonatomic,strong)UILabel *noteLabel; @property (nonatomic,strong)UILabel *noteLabel;
/**
* 创建时间
*/
@property (strong, nonatomic) UILabel *labelCreateTime; @property (strong, nonatomic) UILabel *labelCreateTime;
/**
* 审核人
*/
@property (strong, nonatomic) UILabel *labelInspector; @property (strong, nonatomic) UILabel *labelInspector;
/**
* 审核时间
*/
@property (strong, nonatomic) UILabel *labelInspectTime; @property (strong, nonatomic) UILabel *labelInspectTime;
/**
* 收货人
*/
@property (strong, nonatomic) UILabel *labelReciever; @property (strong, nonatomic) UILabel *labelReciever;
/**
* 收货时间
*/
@property (strong, nonatomic) UILabel *labelRecieveTime; @property (strong, nonatomic) UILabel *labelRecieveTime;
/**
* 有效期
*/
@property (strong, nonatomic) UILabel *labelExpiredDate; @property (strong, nonatomic) UILabel *labelExpiredDate;
/**
* 外部单据号
*/
@property (strong, nonatomic) UILabel *labelOutSideNum; @property (strong, nonatomic) UILabel *labelOutSideNum;
@property (nonatomic,assign)BOOL isNotShowEdit; @property (nonatomic,assign)BOOL isNotShowEdit;
//@property (nonatomic,strong)RejectView *rejectView; //@property (nonatomic,strong)RejectView *rejectView;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#import "FeeAcountDetail.h" #import "FeeAcountDetail.h"
#import "TransportViewController.h" #import "TransportViewController.h"
#import "ShopDetaileViewController.h" #import "ShopDetaileViewController.h"
#import "PurchaseBill.h"
typedef enum : NSUInteger { typedef enum : NSUInteger {
SaveTag = 7000, SaveTag = 7000,
CommitTag, CommitTag,
...@@ -36,6 +37,10 @@ typedef enum : NSUInteger { ...@@ -36,6 +37,10 @@ typedef enum : NSUInteger {
} }
@property (nonatomic,strong)NSString *state; @property (nonatomic,strong)NSString *state;
/**
* 用户选择的第一个商品的采购单
*/
@property (strong, nonatomic) PurchaseBill *firstBill;
@end @end
@implementation NewTransportViewController @implementation NewTransportViewController
...@@ -203,7 +208,6 @@ typedef enum : NSUInteger { ...@@ -203,7 +208,6 @@ typedef enum : NSUInteger {
for (FeeAcountDetail *fee in _bottomView.costVC.costArr) { for (FeeAcountDetail *fee in _bottomView.costVC.costArr) {
[costs addObject:[fee dictForCommit]]; [costs addObject:[fee dictForCommit]];
} }
// self.state = state;
NSDictionary *dict = @{@"uuid":uuidObject, NSDictionary *dict = @{@"uuid":uuidObject,
@"version":versionObject, @"version":versionObject,
...@@ -289,15 +293,37 @@ typedef enum : NSUInteger { ...@@ -289,15 +293,37 @@ typedef enum : NSUInteger {
return YES; return YES;
} }
- (void)setFirstBill:(PurchaseBill *)firstBill {
_firstBill = firstBill;
/**
* @property (nonatomic,strong)NSString *receiveWrh_uuid;//收货uuid
@property (nonatomic,strong)NSString *receiveWrh_code;//收货代码
@property (nonatomic,strong)NSString *receiveWrh_name;//收货姓名
*
*/
_sheetView.warehouseCode = firstBill.receiveWrh_code;
_sheetView.warehouseName = firstBill.receiveWrh_name;
_sheetView.warehouseUuid = firstBill.receiveWrh_uuid;
_sheetView.warehouseLabel.text = [NSString stringWithFormat:@"%@[%@]",_sheetView.warehouseName,_sheetView.warehouseCode];
_sheetView.warehouseLabel.textColor = GXF_CONTENT_COLOR;
}
- (void)choseTransportPurchase{ - (void)choseTransportPurchase{
__weak NewTransportViewController *weakSelf = self;
TransportPurchaseViewController *tpv = [TransportPurchaseViewController new]; TransportPurchaseViewController *tpv = [TransportPurchaseViewController new];
tpv.getProchaseProduct = ^(NSArray *products){ tpv.getProchaseProduct = ^(NSArray *products){
if (products.count > 0) { if (products.count > 0) {
[_bottomView reProduct:products]; [_bottomView reProduct:products];
} }
}; };
tpv.blockFirstWarehouse = ^(NSArray *bills){
if (bills.count > 0) {
weakSelf.firstBill = bills[0];
}
};
[self PushViewController:tpv animated:YES]; [self PushViewController:tpv animated:YES];
} }
- (void)addTransportCost:(NSNotification *)fination{ - (void)addTransportCost:(NSNotification *)fination{
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#import "BottomTransportView.h" #import "BottomTransportView.h"
#define BottomHeight 50 #define BottomHeight 50
#define LeftMargin 15 #define LeftMargin 15
#define LeftWidth 100 #define LeftWidth 130
#define LeftHeight 30 #define LeftHeight 30
#define TopMargin 15 #define TopMargin 15
typedef enum : NSUInteger { typedef enum : NSUInteger {
...@@ -56,6 +56,33 @@ typedef enum : NSUInteger { ...@@ -56,6 +56,33 @@ typedef enum : NSUInteger {
@property (nonatomic, strong) UILabel *leftLastModifierLabel; @property (nonatomic, strong) UILabel *leftLastModifierLabel;
@property (nonatomic,strong)UILabel *leftArriveDateLabel; @property (nonatomic,strong)UILabel *leftArriveDateLabel;
@property (nonatomic,strong)UILabel *leftNoteLabel; @property (nonatomic,strong)UILabel *leftNoteLabel;
/**
* 创建时间
*/
@property (strong, nonatomic) UILabel *labelCreateTime;
/**
* 审核人
*/
@property (strong, nonatomic) UILabel *labelInspector;
/**
* 审核时间
*/
@property (strong, nonatomic) UILabel *labelInspectTime;
/**
* 收货人
*/
@property (strong, nonatomic) UILabel *labelReciever;
/**
* 收货时间
*/
@property (strong, nonatomic) UILabel *labelRecieveTime;
/**
* 有效期
*/
@property (strong, nonatomic) UILabel *labelExpiredDate;
@property (strong, nonatomic) NSArray *leftArr;
@end @end
@implementation TransportDetailViewController @implementation TransportDetailViewController
...@@ -123,7 +150,12 @@ typedef enum : NSUInteger { ...@@ -123,7 +150,12 @@ typedef enum : NSUInteger {
self.carnumberLabel.text = [IBTCommon checkString:self.transport.carnumber]; self.carnumberLabel.text = [IBTCommon checkString:self.transport.carnumber];
self.carhoneLabel.text = [IBTCommon checkString:self.transport.carphone]; self.carhoneLabel.text = [IBTCommon checkString:self.transport.carphone];
self.noteLabel.text = [NSString stringWithFormat:@"%@",self.transport.note?self.transport.note:@"无"]; self.noteLabel.text = [NSString stringWithFormat:@"%@",self.transport.note?self.transport.note:@"无"];
self.createOperLabel.text = [NSString stringWithFormat:@"%@%@",[IBTCommon checkString:self.transport.create_operName],self.transport.create_time.length > 10 ? [self.transport.create_time substringToIndex:10] : self.transport.create_time]; self.createOperLabel.text = [IBTCommon checkString:self.transport.create_operName];
self.labelCreateTime.text = [IBTCommon checkString:self.transport.create_time];
self.labelCreateTime.text = [IBTCommon checkString:self.transport.create_time];
self.labelInspector.text = [IBTCommon checkString:self.transport.approv_operName];
self.labelInspectTime.text = [IBTCommon checkString:self.transport.approv_time];
self.labelExpiredDate.text = [IBTCommon checkString:self.transport.expiredDate];
self.lastModifierLabel.text = [IBTCommon checkString:self.transport.lastModify_operName]; self.lastModifierLabel.text = [IBTCommon checkString:self.transport.lastModify_operName];
self.arriveDateLabel.text = [NSString stringWithFormat:@"%@",self.transport.arriveDate?[[IBTCommon checkString:self.transport.arriveDate]substringToIndex:10]:@"无"]; self.arriveDateLabel.text = [NSString stringWithFormat:@"%@",self.transport.arriveDate?[[IBTCommon checkString:self.transport.arriveDate]substringToIndex:10]:@"无"];
[_transView refreshTranProduct:self.transport.pdtDetails]; [_transView refreshTranProduct:self.transport.pdtDetails];
...@@ -156,38 +188,7 @@ typedef enum : NSUInteger { ...@@ -156,38 +188,7 @@ typedef enum : NSUInteger {
if (purchaseHeight < LeftHeight) { if (purchaseHeight < LeftHeight) {
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;
self.leftCarhoneLabel.top = self.leftCarnumberLabel.bottom;
self.carhoneLabel.top = self.leftCarnumberLabel.bottom;
self.leftCreateOperLabel.top = self.leftCarhoneLabel.bottom;
self.createOperLabel.top = self.leftCarhoneLabel.bottom;
self.leftLastModifierLabel.top = self.leftCreateOperLabel.bottom;
self.lastModifierLabel.top = self.leftCreateOperLabel.bottom;
self.leftArriveDateLabel.top = self.leftLastModifierLabel.bottom;
self.arriveDateLabel.top = self.leftLastModifierLabel.bottom;
self.leftNoteLabel.top = self.leftArriveDateLabel.bottom;
self.noteLabel.top = self.leftArriveDateLabel.bottom;
CGFloat height = [self.noteLabel calculateHeight]; CGFloat height = [self.noteLabel calculateHeight];
if (height < LeftHeight) { if (height < LeftHeight) {
height = LeftHeight; height = LeftHeight;
...@@ -195,7 +196,7 @@ typedef enum : NSUInteger { ...@@ -195,7 +196,7 @@ typedef enum : NSUInteger {
self.noteLabel.height = height; self.noteLabel.height = height;
CGFloat totalHeight = height + LeftHeight*9 + purchaseHeight; CGFloat totalHeight = height - LeftHeight + LeftHeight*self.leftArr.count;
CGRect purchaseFrame = _transportView.frame; CGRect purchaseFrame = _transportView.frame;
purchaseFrame.size.height = totalHeight + LeftMargin; purchaseFrame.size.height = totalHeight + LeftMargin;
...@@ -341,17 +342,19 @@ typedef enum : NSUInteger { ...@@ -341,17 +342,19 @@ typedef enum : NSUInteger {
}else{ }else{
[self hiddenAllBtn]; [self hiddenAllBtn];
} }
NSArray *leftArr = @[@"单号:",@"采购单:",@"状态:",@"发货仓库:",@"收货仓库:",@"车辆:",@"司机电话:",@"创建:",@"最后修改人:", @"预计到货时间:",@"备注:"]; NSArray *leftArr = @[@"单号:",@"采购单:",@"状态:",@"发货仓库:",@"收货仓库:",@"车辆:",@"司机电话:",@"创建人:",@"创建时间:",@"审核人:",@"审核时间:",@"收货人:",@"收货时间:",@"有效期:",@"最后修改人:", @"预计到货时间:",@"备注:"];
self.leftArr = leftArr;
_transportView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*leftArr.count +LeftMargin)]; CGFloat height = LeftHeight * leftArr.count +LeftMargin;
_transportView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, height)];
_transportView.backgroundColor = [UIColor whiteColor]; _transportView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_transportView]; [_scrollView addSubview:_transportView];
for (NSInteger i = 0 ; i < leftArr.count; i++) { for (NSInteger i = 0 ; i < leftArr.count; i++) {
NSString *title = leftArr[i];
UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 10 + LeftHeight *i, LeftWidth, LeftHeight)]; UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 10 + LeftHeight *i, LeftWidth, LeftHeight)];
leftLabel.font = GXF_SEVENTEENTH_SIZE; leftLabel.font = GXF_SEVENTEENTH_SIZE;
leftLabel.text = leftArr[i]; leftLabel.text = title;
leftLabel.textColor = GXF_DETAIL_COLOR; leftLabel.textColor = GXF_DETAIL_COLOR;
[_transportView addSubview:leftLabel]; [_transportView addSubview:leftLabel];
...@@ -359,45 +362,104 @@ typedef enum : NSUInteger { ...@@ -359,45 +362,104 @@ typedef enum : NSUInteger {
rightLabel.font = GXF_SEVENTEENTH_SIZE; rightLabel.font = GXF_SEVENTEENTH_SIZE;
rightLabel.textColor = GXF_DETAIL_COLOR; rightLabel.textColor = GXF_DETAIL_COLOR;
if (i == 0) {
if ([title isEqualToString:@"单号:"]) {
self.billNumberLabel = rightLabel; self.billNumberLabel = rightLabel;
self.leftBillNumberLabel = leftLabel; self.leftBillNumberLabel = leftLabel;
}else if (i == 1) { }else if ([title isEqualToString:@"采购单:"]){
self.purchaseLabel = rightLabel; self.purchaseLabel = rightLabel;
self.purchaseLabel.numberOfLines = 0; self.purchaseLabel.numberOfLines = 0;
self.leftPurchaseLabel = leftLabel; self.leftPurchaseLabel = leftLabel;
}else if(i == 2){ }else if ([title isEqualToString:@"状态:"]){
self.stateLabel = rightLabel; self.stateLabel = rightLabel;
self.leftStateLabel = leftLabel; self.leftStateLabel = leftLabel;
}else if(i == 3){ }else if ([title isEqualToString:@"发货仓库:"]){
self.warehouseLabel = rightLabel; self.warehouseLabel = rightLabel;
self.leftWarehouseLabel = leftLabel; self.leftWarehouseLabel = leftLabel;
}else if(i == 4){ }else if ([title isEqualToString:@"收货仓库:"]){
self.rwarehouseLabel = rightLabel; self.rwarehouseLabel = rightLabel;
self.leftRwarehouseLabel = leftLabel; self.leftRwarehouseLabel = leftLabel;
}else if(i == 5){ }else if ([title isEqualToString:@"车辆:"]){
self.carnumberLabel = rightLabel; self.carnumberLabel = rightLabel;
self.leftCarnumberLabel = leftLabel; self.leftCarnumberLabel = leftLabel;
}else if(i == 6){ }else if ([title isEqualToString:@"司机电话:"]){
self.carhoneLabel = rightLabel; self.carhoneLabel = rightLabel;
self.leftCarhoneLabel = leftLabel; self.leftCarhoneLabel = leftLabel;
}else if(i == 7){ }else if ([title isEqualToString:@"创建人:"]){
self.createOperLabel = rightLabel; self.createOperLabel = rightLabel;
self.leftCreateOperLabel = leftLabel; self.leftCreateOperLabel = leftLabel;
}else if(i == 8){//最后修改人 }
else if ([title isEqualToString:@"最后修改人:"]){
self.lastModifierLabel = rightLabel; self.lastModifierLabel = rightLabel;
self.leftLastModifierLabel = leftLabel; self.leftLastModifierLabel = leftLabel;
}else if(i == 9){ }
leftLabel.width = LeftWidth + 10; else if ([title isEqualToString:@"预计到货时间:"]){
rightLabel.left = leftLabel.right; // leftLabel.width = LeftWidth + 10;
rightLabel.width = ScreenSize.width - leftLabel.width - LeftMargin; // rightLabel.left = leftLabel.right;
// rightLabel.width = ScreenSize.width - leftLabel.width - LeftMargin;
self.arriveDateLabel = rightLabel; self.arriveDateLabel = rightLabel;
self.leftArriveDateLabel = leftLabel; self.leftArriveDateLabel = leftLabel;
}else if(i == leftArr.count - 1){ }else if ([title isEqualToString:@"备注:"]){
rightLabel.numberOfLines = 0; rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel; self.noteLabel = rightLabel;
self.leftNoteLabel = leftLabel; self.leftNoteLabel = leftLabel;
}else if ([title isEqualToString:@"创建时间:"]){
self.labelCreateTime = rightLabel;
}else if ([title isEqualToString:@"审核人:"]){
self.labelInspector = rightLabel;
}else if ([title isEqualToString:@"审核时间:"]){
self.labelInspectTime = rightLabel;
}else if ([title isEqualToString:@"收货人:"]){
self.labelReciever = rightLabel;
}else if ([title isEqualToString:@"收货时间:"]){
self.labelRecieveTime = rightLabel;
}else if ([title isEqualToString:@"有效期:"]){
self.labelExpiredDate = rightLabel;
} }
// if (i == 0) {
// self.billNumberLabel = rightLabel;
// self.leftBillNumberLabel = leftLabel;
// }else if (i == 1) {
// self.purchaseLabel = rightLabel;
// self.purchaseLabel.numberOfLines = 0;
// self.leftPurchaseLabel = leftLabel;
// }else if(i == 2){
// self.stateLabel = rightLabel;
// self.leftStateLabel = leftLabel;
// }else if(i == 3){
// self.warehouseLabel = rightLabel;
// self.leftWarehouseLabel = leftLabel;
// }else if(i == 4){
// self.rwarehouseLabel = rightLabel;
// self.leftRwarehouseLabel = leftLabel;
// }else if(i == 5){
// self.carnumberLabel = rightLabel;
// self.leftCarnumberLabel = leftLabel;
// }else if(i == 6){
// self.carhoneLabel = rightLabel;
// self.leftCarhoneLabel = leftLabel;
// }else if(i == 7){
// self.createOperLabel = rightLabel;
// self.leftCreateOperLabel = leftLabel;
// }else if(i == 8){//最后修改人
// self.lastModifierLabel = rightLabel;
// self.leftLastModifierLabel = leftLabel;
// }else if(i == 9){
// leftLabel.width = LeftWidth + 10;
// rightLabel.left = leftLabel.right;
// rightLabel.width = ScreenSize.width - leftLabel.width - LeftMargin;
// self.arriveDateLabel = rightLabel;
// self.leftArriveDateLabel = leftLabel;
// }else if(i == leftArr.count - 1){
// rightLabel.numberOfLines = 0;
// self.noteLabel = rightLabel;
// self.leftNoteLabel = leftLabel;
// }
[_transportView addSubview:rightLabel]; [_transportView addSubview:rightLabel];
} }
[self createBottomView]; [self createBottomView];
......
...@@ -13,4 +13,5 @@ typedef void(^GetPurchaseProduct)(NSArray *products); ...@@ -13,4 +13,5 @@ typedef void(^GetPurchaseProduct)(NSArray *products);
@interface TransportPurchaseViewController : ICRBaseViewController @interface TransportPurchaseViewController : ICRBaseViewController
@property (nonatomic,copy)GetPurchaseProduct getProchaseProduct; @property (nonatomic,copy)GetPurchaseProduct getProchaseProduct;
@property (nonatomic,copy)GetPurchaseProduct blockFirstWarehouse;
@end @end
...@@ -293,6 +293,14 @@ NSInteger purchaseStockCheckNumber = 0; ...@@ -293,6 +293,14 @@ NSInteger purchaseStockCheckNumber = 0;
[arr addObject:detail]; [arr addObject:detail];
} }
weakSelf.getProchaseProduct(arr); weakSelf.getProchaseProduct(arr);
for (PurchaseBill *bill in self.dataArr) {
if ([array containsObject:bill.billNumber]) {
if (weakSelf.blockFirstWarehouse) {
weakSelf.blockFirstWarehouse(@[bill]);
}
break;
}
}
} }
}]; }];
......
...@@ -35,6 +35,23 @@ ...@@ -35,6 +35,23 @@
@property (nonatomic,strong)NSArray *pdtDetails;//商品 @property (nonatomic,strong)NSArray *pdtDetails;//商品
@property (nonatomic,strong)NSArray *accountDetails;//费用 @property (nonatomic,strong)NSArray *accountDetails;//费用
@property (nonatomic, strong) NSString *approv_time;//审核时间
@property (nonatomic, strong) NSString *approv_id;//审核人id
@property (nonatomic, strong) NSString *approv_operName;//审核人
/*
receive_time
收货时间
receive_id
收货人代码
receive_operName
收货人名称
expiredDate
到效日期
*/
@property (strong, nonatomic) NSString *receive_time;
@property (strong, nonatomic) NSString *receive_id;
@property (strong, nonatomic) NSString *receive_operName;
@property (strong, nonatomic) NSString *expiredDate;
@end @end
...@@ -124,6 +124,9 @@ ...@@ -124,6 +124,9 @@
}else if(indexPath.row == 2){ }else if(indexPath.row == 2){
contentLabel.text = @"选择类型"; contentLabel.text = @"选择类型";
self.typeLabel = contentLabel; self.typeLabel = contentLabel;
self.typeLabel.text = @"普通";
self.typeLabel.textColor = GXF_CONTENT_COLOR;
self.type = GXF_Normal;
}else if(indexPath.row == 5){ }else if(indexPath.row == 5){
contentLabel.text = @"选择预计到货时间"; contentLabel.text = @"选择预计到货时间";
......
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