Commit 52cb0498 authored by Sandy's avatar Sandy

查看收获单增加筛选条件

parent 811d4a17
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.2.33</string> <string>1.2.37</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.2.33</string> <string>1.2.37</string>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
<dict> <dict>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "HeaderCell.h" #import "HeaderCell.h"
#define LeftMargin 13 #define LeftMargin 13
#define LeftWidth 45 #define LeftWidth 30
#define RightWidth 30 #define RightWidth 30
#define SpaceMargin 1 #define SpaceMargin 1
#import "ICRCheckBox.h" #import "ICRCheckBox.h"
...@@ -82,13 +82,13 @@ ...@@ -82,13 +82,13 @@
} }
- (void)uiAddCheckBox { - (void)uiAddCheckBox {
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(ScreenSize.width - 30, 0, 30, self.frame.size.height)]; // UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(ScreenSize.width - 30, 0, 30, self.frame.size.height)];
label.text = @"全选"; // label.text = @"全选";
label.font = [UIFont systemFontOfSize:13]; // label.font = [UIFont systemFontOfSize:13];
[self addSubview:label]; // [self addSubview:label];
ICRCheckBox *addBtn = [[ICRCheckBox alloc] initWithFrame:CGRectMake(ScreenSize.width - LeftWidth - SpaceMargin - 15, 0, LeftWidth, self.frame.size.height)]; ICRCheckBox *addBtn = [[ICRCheckBox alloc] initWithFrame:CGRectMake(ScreenSize.width - LeftWidth - SpaceMargin, 0, LeftWidth, self.frame.size.height)];
self.checkBox = addBtn; self.checkBox = addBtn;
addBtn.m_eBGType = kCheckBoxBGGray; addBtn.m_eBGType = kCheckBoxBGGray;
addBtn.blockCheckBox = self.blockCheckBox; addBtn.blockCheckBox = self.blockCheckBox;
......
...@@ -318,12 +318,12 @@ typedef enum : NSUInteger { ...@@ -318,12 +318,12 @@ typedef enum : NSUInteger {
return NO; return NO;
} }
double max = self.shopDetail.receivedQty.doubleValue - self.shopDetail.shippedQty.doubleValue; // double max = self.shopDetail.receivedQty.doubleValue - self.shopDetail.shippedQty.doubleValue;
if (packageQuantity.text.doubleValue > max && self.shopDetail.receivedQty != nil && self.shopDetail.shippedQty != nil){ // if (packageQuantity.text.doubleValue > max && self.shopDetail.receivedQty != nil && self.shopDetail.shippedQty != nil){
NSString *info = [NSString stringWithFormat:@"包装数量不得大于可运包装数[%.0f]", max]; // NSString *info = [NSString stringWithFormat:@"包装数量不得大于可运包装数[%.0f]", max];
ShowMessage(info); // ShowMessage(info);
return NO; // return NO;
} // }
if (self.packageUintStr.length == 0) { if (self.packageUintStr.length == 0) {
ShowMessage(@"包装单位不能为空"); ShowMessage(@"包装单位不能为空");
return NO; return NO;
......
...@@ -44,6 +44,8 @@ typedef enum : NSUInteger { ...@@ -44,6 +44,8 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)UITableView *tableView; @property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSString *state; @property (nonatomic,strong)NSString *state;
@property (nonatomic,strong)NSString *orderDirection;//asc(升序),desc(降序) @property (nonatomic,strong)NSString *orderDirection;//asc(升序),desc(降序)
@property (nonatomic,strong)NSString *billNumber;
@property (nonatomic,strong)NSString *productLike;
@end @end
@implementation ReceiveViewController @implementation ReceiveViewController
...@@ -105,6 +107,8 @@ typedef enum : NSUInteger { ...@@ -105,6 +107,8 @@ typedef enum : NSUInteger {
@"state":stateObject, @"state":stateObject,
@"queryOrders":orderArr, @"queryOrders":orderArr,
@"userUuid":userUtil.userId, @"userUuid":userUtil.userId,
@"billNumberLike": self.billNumber.length > 0 ? self.billNumber : [NSNull null],
@"productLike":self.productLike.length > 0 ? self.productLike : [NSNull null],
@"pageNumber":@(_currentPage), @"pageNumber":@(_currentPage),
@"pageSize":@(20)}; @"pageSize":@(20)};
[[ICRHTTPController sharedController] queryTransferWithData:dict success:succ failure:fail]; [[ICRHTTPController sharedController] queryTransferWithData:dict success:succ failure:fail];
...@@ -249,7 +253,7 @@ typedef enum : NSUInteger { ...@@ -249,7 +253,7 @@ typedef enum : NSUInteger {
}else{ }else{
[btn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal]; [btn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
if (_boltView == nil) { if (_boltView == nil) {
_boltView = [[ReceiveBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state]; _boltView = [[ReceiveBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state billNumber:self.billNumber goodLike:self.productLike];
_boltView.backgroundColor = XXFBgColor; _boltView.backgroundColor = XXFBgColor;
_boltView.delegate = self; _boltView.delegate = self;
...@@ -316,7 +320,7 @@ typedef enum : NSUInteger { ...@@ -316,7 +320,7 @@ typedef enum : NSUInteger {
} }
} }
- (void)checkBoltBtnColor{ - (void)checkBoltBtnColor{
if (self.state.length > 0) { if (self.state.length > 0 || self.billNumber.length > 0 || self.productLike.length > 0) {
[_boltBtn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal]; [_boltBtn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
}else{ }else{
[_boltBtn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal]; [_boltBtn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal];
...@@ -352,11 +356,27 @@ typedef enum : NSUInteger { ...@@ -352,11 +356,27 @@ typedef enum : NSUInteger {
CLog(@"%@",state); CLog(@"%@",state);
} }
- (void)getBillNumberEqual:(NSString *)billNumber {
self.billNumber = billNumber;
}
- (void)getGoodLike:(NSString *)goodLike {
self.productLike = goodLike;
}
- (void)clearBoltInformation{ - (void)clearBoltInformation{
if (self.state.length > 0) { if (self.state.length > 0) {
self.state = @""; self.state = @"";
} }
if (self.billNumber.length > 0) {
self.billNumber = @"";
}
if (self.productLike.length > 0) {
self.productLike = @"";
}
} }
#pragma mark - 隐藏maskView #pragma mark - 隐藏maskView
- (void)hiddenMaskView{ - (void)hiddenMaskView{
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
@protocol ReceiveBoltViewDelegate <NSObject> @protocol ReceiveBoltViewDelegate <NSObject>
- (void)getBoltValueSelectRow:(NSString *)state; - (void)getBoltValueSelectRow:(NSString *)state;
- (void)getBillNumberEqual:(NSString *)billNumber;
- (void)getGoodLike:(NSString *)goodLike;
- (void)clearBoltInformation; - (void)clearBoltInformation;
@end @end
...@@ -19,5 +22,8 @@ ...@@ -19,5 +22,8 @@
@property (nonatomic,strong)NSMutableArray *dataArr; @property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,weak)id <ReceiveBoltViewDelegate>delegate; @property (nonatomic,weak)id <ReceiveBoltViewDelegate>delegate;
- (instancetype)initWithFrame:(CGRect)frame state:(NSString *)state; @property (nonatomic,strong)UITextField *billFiled;//单号等于
@property (nonatomic,strong)UITextField *goodFiled;//商品类似于
- (instancetype)initWithFrame:(CGRect)frame state:(NSString *)state billNumber:(NSString *)billNumber goodLike:(NSString *)goodLike;
@end @end
...@@ -25,14 +25,17 @@ ...@@ -25,14 +25,17 @@
UIButton *_clearBtn; UIButton *_clearBtn;
} }
@property (nonatomic,strong)NSString *state; @property (nonatomic,strong)NSString *state;
@property (nonatomic,strong)NSString *billNumber;
@property (nonatomic,strong)NSString *goodLike;
@end @end
@implementation ReceiveBoltView @implementation ReceiveBoltView
- (instancetype)initWithFrame:(CGRect)frame state:(NSString *)state{ - (instancetype)initWithFrame:(CGRect)frame state:(NSString *)state billNumber:(NSString *)billNumber goodLike:(NSString *)goodLike{
self = [super initWithFrame:frame]; self = [super initWithFrame:frame];
if (self) { if (self) {
self.billNumber = billNumber;
self.goodLike = goodLike;
self.state = state; self.state = state;
[self createView]; [self createView];
[self createRightView]; [self createRightView];
...@@ -53,7 +56,14 @@ ...@@ -53,7 +56,14 @@
} }
self.billFiled.hidden = YES;
if(self.billNumber.length > 0){
self.billFiled.text = self.billNumber;
}
self.goodFiled.hidden = YES;
if (self.goodLike.length > 0) {
self.goodFiled.text = self.goodLike;
}
} }
#pragma mark - 创建视图 #pragma mark - 创建视图
...@@ -61,7 +71,7 @@ ...@@ -61,7 +71,7 @@
{ {
_leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)]; _leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)];
[self addSubview:_leftView]; [self addSubview:_leftView];
NSArray *arr = @[@"按状态"]; NSArray *arr = @[@"按状态",@"单号等于",@"商品类似于"];
for (NSInteger i = 0; i<arr.count; i++) { for (NSInteger i = 0; i<arr.count; i++) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight); button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight);
...@@ -86,6 +96,33 @@ ...@@ -86,6 +96,33 @@
[self addSubview:_clearBtn]; [self addSubview:_clearBtn];
} }
- (void)createRightView{ - (void)createRightView{
NSArray *arr = @[@"输入单号",@"输入类似商品"];
UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)];
contentView.backgroundColor = [UIColor whiteColor];
[self addSubview:contentView];
UILabel *contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)];
contentLabel.font = GXF_FIFTEENTEN_SIZE;
contentLabel.text = @"类似于:";
[contentView addSubview:contentLabel];
for (NSInteger i = 0; i < arr.count; i ++) {
UITextField *contentField = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(contentLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)];
contentField.textAlignment = NSTextAlignmentLeft;
contentField.textColor = GXF_CONTENT_COLOR;
contentField.borderStyle = UITextBorderStyleRoundedRect;
contentField.font = GXF_FIFTEENTEN_SIZE;
contentField.placeholder = arr[i];
contentField.returnKeyType = UIReturnKeyDone;
contentField.delegate = self;
[contentView addSubview:contentField];
if (i == 0) {
self.billFiled = contentField;
}else if(i == 1){
self.goodFiled = contentField;
}
}
self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight) style:(UITableViewStylePlain)]; self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight) style:(UITableViewStylePlain)];
self.tableView.backgroundColor = [UIColor whiteColor]; self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.delegate = self; self.tableView.delegate = self;
...@@ -99,9 +136,36 @@ ...@@ -99,9 +136,36 @@
_currentBtn.enabled = YES; _currentBtn.enabled = YES;
btn.enabled = NO; btn.enabled = NO;
_currentBtn = btn; _currentBtn = btn;
// [self keyBoardHidden];
switch (btn.tag) {
case 1001://状态
{
self.tableView.hidden = NO;
self.billFiled.hidden = YES;
self.goodFiled.hidden = YES;
}
break;
case 1002://条件二
{
self.tableView.hidden = YES;
self.billFiled.hidden = NO;
self.goodFiled.hidden = YES;
}
break;
case 1003://条件二
{
self.tableView.hidden = YES;
self.billFiled.hidden = YES;
self.goodFiled.hidden = NO;
}
break;
}
} }
- (void)clearBolt{ - (void)clearBolt{
_billFiled.text = @"";
_goodFiled.text = @"";
if (_currentIndexPath) { if (_currentIndexPath) {
_currentIndexPath = nil; _currentIndexPath = nil;
[self.tableView reloadData]; [self.tableView reloadData];
...@@ -164,6 +228,18 @@ ...@@ -164,6 +228,18 @@
[self.delegate getBoltValueSelectRow:stateStr]; [self.delegate getBoltValueSelectRow:stateStr];
} }
- (void)textFieldDidEndEditing:(UITextField *)textField{
if (textField == self.billFiled) {
// if (self.userFiled.text.length > 0) {
[self.delegate getBillNumberEqual:self.billFiled.text];
// }
}else if(textField == self.goodFiled){
// if (self.billFiled.text.length > 0) {
[self.delegate getGoodLike:self.goodFiled.text];
// }
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight; return TableHeight;
} }
......
...@@ -227,6 +227,7 @@ typedef enum : NSUInteger { ...@@ -227,6 +227,7 @@ typedef enum : NSUInteger {
[pdtCopy setValuesForKeysWithDictionary:pdtDetail.dictForCommit]; [pdtCopy setValuesForKeysWithDictionary:pdtDetail.dictForCommit];
pdtCopy.receivedQty = nil; pdtCopy.receivedQty = nil;
pdtCopy.shippedQty = nil; pdtCopy.shippedQty = nil;
pdtCopy.shippedFlag = nil;
[billProducts addObject:[pdtCopy dictForCommit]]; [billProducts addObject:[pdtCopy dictForCommit]];
} }
NSMutableArray *costs = [NSMutableArray array]; NSMutableArray *costs = [NSMutableArray array];
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
@property (nonatomic,strong)UILabel *countLabel; @property (nonatomic,strong)UILabel *countLabel;
@property (nonatomic, strong) UILabel *transferedCount; @property (nonatomic, strong) UILabel *transferedCount;
@property (nonatomic,strong)UILabel *lineLabel; @property (nonatomic,strong)UILabel *lineLabel;
@property (strong, nonatomic) UILabel *showBasePrice;
@property (nonatomic,strong)UIView *showView; @property (nonatomic,strong)UIView *showView;
@property (nonatomic,strong)UILabel *showNameLabel; @property (nonatomic,strong)UILabel *showNameLabel;
......
...@@ -104,6 +104,12 @@ ...@@ -104,6 +104,12 @@
self.showPurchaseLabel.text = @"来源类型:"; self.showPurchaseLabel.text = @"来源类型:";
self.showPurchaseLabel.font = GXF_THREETEENTH_SIZE; self.showPurchaseLabel.font = GXF_THREETEENTH_SIZE;
self.showBasePrice = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.showStandLabel.frame), CGRectGetMaxY(self.showTotalLabel.frame), ShowWidth+ 100, ShowHeight))];
self.showBasePrice.textAlignment = NSTextAlignmentLeft;
self.showBasePrice.textColor = GXF_PLACEHOLDER_COLOR;
self.showBasePrice.text = @"来源类型:";
self.showBasePrice.font = GXF_THREETEENTH_SIZE;
self.showSourceNumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showPurchaseLabel.frame), ShowWidth+ 100, ShowHeight))]; self.showSourceNumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showPurchaseLabel.frame), ShowWidth+ 100, ShowHeight))];
self.showSourceNumberLabel.textAlignment = NSTextAlignmentLeft; self.showSourceNumberLabel.textAlignment = NSTextAlignmentLeft;
...@@ -133,6 +139,7 @@ ...@@ -133,6 +139,7 @@
[self.showView addSubview:self.showPriceLabel]; [self.showView addSubview:self.showPriceLabel];
[self.showView addSubview:self.showPurchaseLabel]; [self.showView addSubview:self.showPurchaseLabel];
[self.showView addSubview:self.showSourceNumberLabel]; [self.showView addSubview:self.showSourceNumberLabel];
[self.showView addSubview:self.showBasePrice];
[self.showView addSubview:self.showTotalLabel]; [self.showView addSubview:self.showTotalLabel];
...@@ -145,12 +152,13 @@ ...@@ -145,12 +152,13 @@
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName; self.titleLabel.text = pdtDetail.productName;
self.priceLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.qty]; self.priceLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.qty];
self.countLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.receivedQty ? pdtDetail.receivedQty : @"0"]; self.countLabel.text = [NSString stringWithFormat:@"%@",@"0"];
//已转运 //已转运
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode]; self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit];
self.showBasePrice.text = [NSString stringWithFormat:@"基础单价:%@元", pdtDetail.price];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]];
NSString *sourceT = @""; NSString *sourceT = @"";
if ([pdtDetail.sourcetype isEqualToString:@"none"]) { if ([pdtDetail.sourcetype isEqualToString:@"none"]) {
......
...@@ -411,7 +411,7 @@ typedef enum : NSUInteger { ...@@ -411,7 +411,7 @@ typedef enum : NSUInteger {
}else{ }else{
[self createBtnWithArr:arr]; [self createBtnWithArr:arr];
} }
}else if ([self.transport.state isEqualToString:TRANSPORT_STATE_UNRECEIVED] && !self.isWms){ }else if ([self.transport.state isEqualToString:TRANSPORT_STATE_UNRECEIVED] && !self.isWms && [IBTCommon checkIsPermission:RECEIVE_ACTION_RECEIVE]){
[self createBtnWithArr:@[@"保存",@"收货"]]; [self createBtnWithArr:@[@"保存",@"收货"]];
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
@property (nonatomic,strong)UILabel *recievedQtyLabel; @property (nonatomic,strong)UILabel *recievedQtyLabel;
@property (nonatomic,strong)UILabel *shippedQtyLabel; @property (nonatomic,strong)UILabel *shippedQtyLabel;
@property (nonatomic,strong)UILabel *lineLabel; @property (nonatomic,strong)UILabel *lineLabel;
@property (strong, nonatomic) UILabel *showBasePrice;
@property (nonatomic,strong)UIView *showView; @property (nonatomic,strong)UIView *showView;
@property (nonatomic,strong)UILabel *showNameLabel; @property (nonatomic,strong)UILabel *showNameLabel;
@property (nonatomic,strong)UILabel *showStandLabel; @property (nonatomic,strong)UILabel *showStandLabel;
......
...@@ -94,7 +94,13 @@ ...@@ -94,7 +94,13 @@
self.showBaseCountLabel.text = @"基础数量:300"; self.showBaseCountLabel.text = @"基础数量:300";
self.showBaseCountLabel.font = GXF_THREETEENTH_SIZE; self.showBaseCountLabel.font = GXF_THREETEENTH_SIZE;
self.showPriceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showStandLabel.frame), ShowWidth, ShowHeight))]; self.showBasePrice = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showStandLabel.frame), ShowWidth, ShowHeight))];
self.showBasePrice.textAlignment = NSTextAlignmentLeft;
self.showBasePrice.textColor = GXF_PLACEHOLDER_COLOR;
self.showBasePrice.text = @"基础单价:300";
self.showBasePrice.font = GXF_THREETEENTH_SIZE;
self.showPriceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showBaseCountLabel.frame), CGRectGetMaxY(self.showBasePrice.frame), ShowWidth, ShowHeight))];
self.showPriceLabel.textAlignment = NSTextAlignmentLeft; self.showPriceLabel.textAlignment = NSTextAlignmentLeft;
self.showPriceLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showPriceLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showPriceLabel.text = @"包装单价:11元"; self.showPriceLabel.text = @"包装单价:11元";
...@@ -102,13 +108,13 @@ ...@@ -102,13 +108,13 @@
self.showTotalLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showBaseCountLabel.frame), ShowWidth, ShowHeight))]; self.showTotalLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.showStandLabel.frame), CGRectGetMaxY(self.showBaseCountLabel.frame), ShowWidth, ShowHeight))];
self.showTotalLabel.textAlignment = NSTextAlignmentLeft; self.showTotalLabel.textAlignment = NSTextAlignmentLeft;
self.showTotalLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showTotalLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showTotalLabel.text = @"总金额:100"; self.showTotalLabel.text = @"总金额:100";
self.showTotalLabel.font = GXF_THREETEENTH_SIZE; self.showTotalLabel.font = GXF_THREETEENTH_SIZE;
self.showNoteLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showBaseCountLabel.frame), ShowWidth, ShowHeight))]; self.showNoteLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showTotalLabel.frame), ShowWidth, ShowHeight))];
self.showNoteLabel.textAlignment = NSTextAlignmentLeft; self.showNoteLabel.textAlignment = NSTextAlignmentLeft;
self.showNoteLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showNoteLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showNoteLabel.text = @"备注:1000"; self.showNoteLabel.text = @"备注:1000";
...@@ -129,7 +135,7 @@ ...@@ -129,7 +135,7 @@
// self.showShippedBaseQty.font = GXF_THREETEENTH_SIZE; // self.showShippedBaseQty.font = GXF_THREETEENTH_SIZE;
self.showPurchaseLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showNoteLabel.frame), ShowWidth+ 100, ShowHeight))]; self.showPurchaseLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showPriceLabel.frame), ShowWidth+ 100, ShowHeight))];
self.showPurchaseLabel.textAlignment = NSTextAlignmentLeft; self.showPurchaseLabel.textAlignment = NSTextAlignmentLeft;
self.showPurchaseLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showPurchaseLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showPurchaseLabel.text = @"采购单号:1000"; self.showPurchaseLabel.text = @"采购单号:1000";
...@@ -165,6 +171,7 @@ ...@@ -165,6 +171,7 @@
[self.showView addSubview:self.showTotalLabel]; [self.showView addSubview:self.showTotalLabel];
[self.showView addSubview:self.showShippedBaseQty]; [self.showView addSubview:self.showShippedBaseQty];
[self.showView addSubview:self.showShippedQty]; [self.showView addSubview:self.showShippedQty];
[self.showView addSubview:self.showBasePrice];
[self.showView addSubview:self.showTotalLabel]; [self.showView addSubview:self.showTotalLabel];
...@@ -183,7 +190,9 @@ ...@@ -183,7 +190,9 @@
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseQty]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",pdtDetail.baseQty,
pdtDetail.unit];
self.showBasePrice.text = [NSString stringWithFormat:@"基础单价:%@元", pdtDetail.price];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]];
self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"]; self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]];
......
...@@ -34,18 +34,18 @@ ...@@ -34,18 +34,18 @@
- (void)bulidLayout - (void)bulidLayout
{ {
CGFloat headWidth = (ScreenSize.width - LeftWidth*2 - SpaceMargin* (4 -1))/4; CGFloat headWidth = (ScreenSize.width - 30*2)/4;
self.smallImageView = [[UIImageView alloc]initWithFrame:CGRectMake(LeftMargin, (TableHeight - SmallSize)/2 , SmallSize, SmallSize)]; self.smallImageView = [[UIImageView alloc]initWithFrame:CGRectMake(LeftMargin, (TableHeight - SmallSize)/2 , SmallSize, SmallSize)];
self.smallImageView.image = [UIImage imageNamed:@"arrowright"]; self.smallImageView.image = [UIImage imageNamed:@"arrowright"];
self.smallImageView.contentMode = UIViewContentModeScaleAspectFit; self.smallImageView.contentMode = UIViewContentModeScaleAspectFit;
self.seqLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.smallImageView.frame), 0, SmallWidth, TableHeight))]; self.seqLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.smallImageView.frame), 0, 10, TableHeight))];
self.seqLabel.textColor = GXF_CONTENT_COLOR; self.seqLabel.textColor = GXF_CONTENT_COLOR;
self.seqLabel.text = @"13"; self.seqLabel.text = @"13";
self.seqLabel.font = GXF_SIXTEENTEH_SIZE; self.seqLabel.font = GXF_SIXTEENTEH_SIZE;
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftWidth, 0, headWidth, TableHeight))]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(30, 0, headWidth, TableHeight))];
self.titleLabel.textAlignment = NSTextAlignmentCenter; self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.textColor = GXF_CONTENT_COLOR; self.titleLabel.textColor = GXF_CONTENT_COLOR;
self.titleLabel.text = @"苹果桃子"; self.titleLabel.text = @"苹果桃子";
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName; self.titleLabel.text = pdtDetail.productName;
self.qpcLabel.text = [NSString stringWithFormat:@"%.1f",[pdtDetail.qpc floatValue]]; self.qpcLabel.text = [NSString stringWithFormat:@"%.1f",[pdtDetail.qpc floatValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.shippedQty]; self.countLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.receivedQty];
NSInteger validShioCount = pdtDetail.receivedQty.integerValue - pdtDetail.shippedQty.integerValue; NSInteger validShioCount = pdtDetail.receivedQty.integerValue - pdtDetail.shippedQty.integerValue;
self.shippedQtyLabel.text = [NSString stringWithFormat:@"%lu", validShioCount]; self.shippedQtyLabel.text = [NSString stringWithFormat:@"%lu", validShioCount];
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode]; self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
......
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