diff --git a/XFFruit.xcodeproj/project.pbxproj b/XFFruit.xcodeproj/project.pbxproj index 085ac2210d37beb477dc1267e630bc328e2403ba..8217e4b0f0dfdd64785bae5c5669f81b78859a0a 100644 --- a/XFFruit.xcodeproj/project.pbxproj +++ b/XFFruit.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 0460F6711BA8B3FC004A073D /* FollowUpRecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0460F6701BA8B3FC004A073D /* FollowUpRecordViewController.m */; }; 0460F6741BA8B7A3004A073D /* NotuceRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0460F6731BA8B7A3004A073D /* NotuceRecordCell.m */; }; 0460F6771BA8BA30004A073D /* NoticeRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = 0460F6761BA8BA30004A073D /* NoticeRecord.m */; }; + 047C7E431BA9DF1800051DE7 /* NoticeDetailCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 047C7E421BA9DF1800051DE7 /* NoticeDetailCell.m */; }; 04B4A3871B9CAAD700D88D68 /* ShopDetail.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B4A3861B9CAAD700D88D68 /* ShopDetail.m */; }; 04E721E31BA755FD008F9158 /* ProductUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 04E721E21BA755FD008F9158 /* ProductUnit.m */; }; 04F6E70A1B9B08A500550849 /* PurchaseNoticeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F6E7091B9B08A500550849 /* PurchaseNoticeViewController.m */; }; @@ -475,6 +476,8 @@ 0460F6731BA8B7A3004A073D /* NotuceRecordCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotuceRecordCell.m; sourceTree = "<group>"; }; 0460F6751BA8BA30004A073D /* NoticeRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoticeRecord.h; sourceTree = "<group>"; }; 0460F6761BA8BA30004A073D /* NoticeRecord.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoticeRecord.m; sourceTree = "<group>"; }; + 047C7E411BA9DF1800051DE7 /* NoticeDetailCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoticeDetailCell.h; sourceTree = "<group>"; }; + 047C7E421BA9DF1800051DE7 /* NoticeDetailCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoticeDetailCell.m; sourceTree = "<group>"; }; 04B4A3851B9CAAD700D88D68 /* ShopDetail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopDetail.h; sourceTree = "<group>"; }; 04B4A3861B9CAAD700D88D68 /* ShopDetail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopDetail.m; sourceTree = "<group>"; }; 04E721E11BA755FD008F9158 /* ProductUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductUnit.h; sourceTree = "<group>"; }; @@ -1100,6 +1103,8 @@ children = ( 0414FF111B94959700C7B00E /* PurchaseNoticeCell.h */, 0414FF121B94959700C7B00E /* PurchaseNoticeCell.m */, + 047C7E411BA9DF1800051DE7 /* NoticeDetailCell.h */, + 047C7E421BA9DF1800051DE7 /* NoticeDetailCell.m */, 0460F6721BA8B7A3004A073D /* NotuceRecordCell.h */, 0460F6731BA8B7A3004A073D /* NotuceRecordCell.m */, 0414FF151B94959700C7B00E /* ShopDetaileViewController.h */, @@ -2671,6 +2676,7 @@ C12C24D11B0BA3C700E1FEBF /* ICRTaskHandleViewController.m in Sources */, 72B3C0CD1B9D3FDD00025D81 /* CostCell.m in Sources */, 35CF33781B953F07001211EF /* GXFProcessBill.m in Sources */, + 047C7E431BA9DF1800051DE7 /* NoticeDetailCell.m in Sources */, FE7155D91B7B328400595B0A /* Product.m in Sources */, FE4678B61B8D986900B5EDA3 /* PurchaseBoltView.m in Sources */, C159188A1AC4615D0013B391 /* ICRHTTPController.m in Sources */, @@ -3040,7 +3046,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4"; + PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; @@ -3078,7 +3084,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = NO; - PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4"; + PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; @@ -3102,7 +3108,7 @@ "$(PROJECT_DIR)", ); PRODUCT_NAME = XFFruit; - PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4"; + PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; }; name = Debug; @@ -3123,7 +3129,7 @@ "$(PROJECT_DIR)", ); PRODUCT_NAME = XFFruit; - PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4"; + PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; }; name = Release; @@ -3146,7 +3152,7 @@ INFOPLIST_FILE = XFFruitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = XFFruitTests; - PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4"; + PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; }; @@ -3166,7 +3172,7 @@ INFOPLIST_FILE = XFFruitTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = XFFruitTests; - PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4"; + PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit"; USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**"; }; diff --git a/XFFruit/ViewControllers/Home/Controllers/ICRHomeViewController.m b/XFFruit/ViewControllers/Home/Controllers/ICRHomeViewController.m index 7db6c91295f535b32979a3bd8278b9b6d8c2b95e..a08e4a66c65a140fed9454d8a41dc7a8e7e6cc31 100644 --- a/XFFruit/ViewControllers/Home/Controllers/ICRHomeViewController.m +++ b/XFFruit/ViewControllers/Home/Controllers/ICRHomeViewController.m @@ -24,6 +24,7 @@ #import "SeePurchaseNoticeViewController.h" #import "NewPurchaseViewController.h" #import "PurchaseViewController.h" +#import "PurchaseNoticeViewController.h" #import "GXFNewProcessViewController.h" @@ -254,8 +255,9 @@ static NSString *collectionCellID = @"collectionCell"; break; case kFunctionSeePurchaseNotice://查看采è´é€šçŸ¥å• { - SeePurchaseNoticeViewController *svc = - [[SeePurchaseNoticeViewController alloc] init]; + + PurchaseNoticeViewController *svc = + [[PurchaseNoticeViewController alloc] init]; svc.title = [IBTCommon localizableString:@"Survey3"]; [self PushViewController:svc animated:YES]; } diff --git a/XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.m b/XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.m index af7c86ec39ccb7b62d4c6485a23e963ead9684b3..085b733bee0f44a3f3875cbeba6d20162f688cc3 100644 --- a/XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.m +++ b/XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.m @@ -411,9 +411,11 @@ typedef enum : NSUInteger { { NoticeProduct *noticeProduct=[_shopeArr objectAtIndex:indexPath.row]; Cell.SpLabel.text=noticeProduct.productName;//å•†å“ - Cell.DjLabel.text=noticeProduct.packUnit;//包装å•ä»· + Cell.BzggLabel.text=[noticeProduct.qpc stringValue];//åŒ…è£…è§„æ ¼ + Cell.packageUnit.text=noticeProduct.packUnit;//包装å•ä½ Cell.BzslLabel.text=[noticeProduct.qpcQuantity stringValue];//åŒ…è£…æ•°é‡ + Cell.packageQuantity.text=[noticeProduct.qpcQuantity stringValue]; Cell.packageSpecification.text=[noticeProduct.qpc stringValue];//åŒ…è£…è§„æ ¼ Cell.foundationQuantity.text=[noticeProduct.quantity stringValue];//åŸºç¡€æ•°é‡ Cell.remark.text=noticeProduct.remark;//备注 diff --git a/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m b/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m index 1615e3552f6c8eb3f14cc649a7dc40987e21e4f0..dc44c1a3145e2fb9a6b00f81580a4082347b5334 100644 --- a/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m +++ b/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m @@ -9,8 +9,9 @@ #import "SeePurchaseNoticeViewController.h" #import "NewPurchaseViewController.h" #import "NoticeProduct.h" -#import "PurchaseNoticeCell.h" +#import "NoticeDetailCell.h" #import "SurveyCell.h" + #import "HPGrowingTextView.h" #import "NoticeProductViewController.h" #import "FollowUpRecordViewController.h" @@ -281,8 +282,8 @@ typedef enum : NSUInteger { mingXiTableView.dataSource=self; UIView *footView2=[[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)]; footView2.backgroundColor=[UIColor clearColor]; - NSArray *ary=[NSArray arrayWithObjects:@"商å“",@"åŒ…è£…è§„æ ¼",@"包装数é‡", nil]; - CGFloat gipWidth = (ScreenSize.width-leftWidth-RightWidth)/3; + NSArray *ary=[NSArray arrayWithObjects:@"商å“",@"åŒ…è£…è§„æ ¼",@"包装数é‡",@"å·²è´æ•°é‡", nil]; + CGFloat gipWidth = (ScreenSize.width-leftWidth-RightWidth)/4; for (int i=0; i< ary.count;i++ ) { UILabel *lable=[[UILabel alloc]init]; @@ -295,6 +296,10 @@ typedef enum : NSUInteger { if (i==2) { lable.frame=CGRectMake(leftWidth+2*gipWidth+2, 0, gipWidth,TableHeight); } + + if (i==3) { + lable.frame=CGRectMake(leftWidth+3*gipWidth+3, 0, gipWidth,TableHeight); + } lable.text=[ary objectAtIndex:i]; lable.textColor=GXF_PLACEHOLDER_COLOR; lable.font = GXF_FIFTEENTEN_SIZE; @@ -402,10 +407,10 @@ typedef enum : NSUInteger { { static NSString *CellID = @"CellID"; - PurchaseNoticeCell *Cell = [tableView dequeueReusableCellWithIdentifier:CellID]; + NoticeDetailCell *Cell = [tableView dequeueReusableCellWithIdentifier:CellID]; if (Cell == nil) { - Cell = [[PurchaseNoticeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID]; + Cell = [[NoticeDetailCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID]; Cell.isButtonhidden=YES; tableView.separatorStyle = UITableViewCellSeparatorStyleNone; Cell.selectionStyle = UITableViewCellSelectionStyleNone; @@ -449,7 +454,7 @@ typedef enum : NSUInteger { - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ if ([tableView isEqual:mingXiTableView]) { - PurchaseNoticeCell *Cell=(PurchaseNoticeCell*)[mingXiTableView cellForRowAtIndexPath:indexPath ]; + NoticeDetailCell *Cell=(NoticeDetailCell*)[mingXiTableView cellForRowAtIndexPath:indexPath ]; if (![self comperIndexpath:indexPath]) { Cell.isSelected=YES; Cell.subSview.hidden = NO; @@ -483,17 +488,23 @@ typedef enum : NSUInteger { nvc.purchaseNotice=self.purchaseNotice; [self PushViewController:nvc animated:YES]; } --(void)showShopDetail:(PurchaseNoticeCell*)Cell indexPath:(NSIndexPath *)indexPath +-(void)showShopDetail:(NoticeDetailCell*)Cell indexPath:(NSIndexPath *)indexPath { NoticeProduct *noticeProduct=[_shopeArr objectAtIndex:indexPath.row]; Cell.SpLabel.text=noticeProduct.productName;//å•†å“ - Cell.DjLabel.text=noticeProduct.packUnit;//包装å•ä»· + Cell.BzggLabel.text=[noticeProduct.qpc stringValue];//åŒ…è£…è§„æ ¼ Cell.BzslLabel.text=[noticeProduct.qpcQuantity stringValue];//åŒ…è£…æ•°é‡ Cell.packageSpecification.text=[noticeProduct.qpc stringValue];//åŒ…è£…è§„æ ¼ + Cell.YcgslLabel.text=[noticeProduct.purchasedQuantity stringValue];//å·²é‡‡è´æ•°é‡ + Cell.packageUnit.text=noticeProduct.packUnit;//包装å•ä½ + Cell.packageQuantity.text=[noticeProduct.qpcQuantity stringValue];//åŒ…è£…æ•°é‡ + Cell.YcgslLabel.text=[noticeProduct.purchasedQuantity stringValue];//å·²é‡‡è´æ•°é‡ Cell.foundationQuantity.text=[noticeProduct.quantity stringValue];//åŸºç¡€æ•°é‡ Cell.remark.text=noticeProduct.remark;//备注 - + if (Cell.YcgslLabel.text==nil) { + Cell.YcgslLabel.text=@"æš‚æ— ";//å·²é‡‡è´æ•°é‡ + } } //编辑 - (void)didtoucher:(UIButton*)button diff --git a/XFFruit/ViewControllers/PurchaseNotice/Views/NoticeDetailCell.h b/XFFruit/ViewControllers/PurchaseNotice/Views/NoticeDetailCell.h new file mode 100644 index 0000000000000000000000000000000000000000..30c3e74b010442fcb3dc5030923c6fd17080b645 --- /dev/null +++ b/XFFruit/ViewControllers/PurchaseNotice/Views/NoticeDetailCell.h @@ -0,0 +1,36 @@ +// +// NoticeDetailCell.h +// XFFruit +// +// Created by mac on 15/9/17. +// Copyright (c) 2015å¹´ Xummer. All rights reserved. +// + +#import <UIKit/UIKit.h> + +@interface NoticeDetailCell : UITableViewCell +@property (nonatomic,strong)UILabel *HeardLabel; +@property (nonatomic,strong)UILabel *FootLabel; +@property (nonatomic,strong)UIImageView *arrowView; +@property (nonatomic,strong)UILabel *SpLabel; +@property (nonatomic,strong)UILabel *DjLabel; +@property (nonatomic,strong)UILabel *BzggLabel; +@property (nonatomic,strong)UILabel *BzslLabel; +@property (nonatomic,strong)UIView *subSview; +@property (nonatomic,strong)UILabel *YcgslLabel; +@property (nonatomic, assign) BOOL isSelected; +@property (nonatomic,strong)UIButton *button; +@property (nonatomic,assign)BOOL isButtonhidden; +@property (nonatomic,strong)UILabel *packageSpecification;//åŒ…è£…è§„æ ¼ +@property (nonatomic,strong)UILabel *packageQuantity;//åŒ…è£…æ•°é‡ +@property (nonatomic,strong)UILabel *packageUnit;//包装å•ä½ +@property (nonatomic,strong)UILabel *foundationQuantity;//åŸºç¡€æ•°é‡ + +@property (nonatomic,strong)UILabel *foundationUnitPrice;//基础å•ä»· +@property (nonatomic,strong)UILabel *packageUnitPrice;//包装å•ä»· +@property (nonatomic,strong)UILabel *totalMoney;//æ€»é‡‘é¢ +@property (nonatomic,strong)UILabel *remark;//备注 +@property (nonatomic,strong)NSArray *shopDetailAry1; +@property (nonatomic,strong)NSArray *shopDetailAry2; + +@end diff --git a/XFFruit/ViewControllers/PurchaseNotice/Views/NoticeDetailCell.m b/XFFruit/ViewControllers/PurchaseNotice/Views/NoticeDetailCell.m new file mode 100644 index 0000000000000000000000000000000000000000..de4fbd6a6806d896de0a34d2a1b21df2595ea645 --- /dev/null +++ b/XFFruit/ViewControllers/PurchaseNotice/Views/NoticeDetailCell.m @@ -0,0 +1,164 @@ +// +// NoticeDetailCell.m +// XFFruit +// +// Created by mac on 15/9/17. +// Copyright (c) 2015å¹´ Xummer. All rights reserved. +// + +#import "NoticeDetailCell.h" +#define TitleSize 17 +#define LeftMargin 15 +#define TableHeight 46 +#define TableWidth 60 +#define LeftWidth 40 +#define RightWidth 20 +@implementation NoticeDetailCell + + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ + + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if (self) { + self.isSelected=NO; + [self initdata]; + [self bulidLayout]; + } + return self; +} +-(void)initdata +{ + self.packageSpecification=[[UILabel alloc]init];//åŒ…è£…è§„æ ¼ + self.packageQuantity=[[UILabel alloc]init];;//åŒ…è£…æ•°é‡ + self.packageUnit=[[UILabel alloc]init]; ;//包装å•ä½ + self.foundationQuantity=[[UILabel alloc]init];;//åŸºç¡€æ•°é‡ + self.foundationUnitPrice=[[UILabel alloc]init];;//基础å•ä»· + self.packageUnitPrice=[[UILabel alloc]init];;//包装å•ä»· + self.totalMoney=[[UILabel alloc]init];;//æ€»é‡‘é¢ + self.remark=[[UILabel alloc]init];;//备注 + self.shopDetailAry1=[NSArray arrayWithObjects: self.packageSpecification, self.foundationQuantity ,self.remark,nil]; + self.shopDetailAry2=[NSArray arrayWithObjects: self.packageQuantity, self.packageUnit ,nil]; +} +- (void)bulidLayout +{ + CGFloat gipWidth = (ScreenSize.width-(LeftMargin+20)-RightWidth-2)/4; + + self.HeardLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin * 2, 1))]; + self.HeardLabel.backgroundColor = HexColor(@"e5e5e5"); + self.HeardLabel.font = FontSize(TitleSize); + + self.FootLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.size.height-1, ScreenSize.width - LeftMargin * 2, 1))]; + self.FootLabel.backgroundColor = HexColor(@"e5e5e5"); + self.FootLabel.font = FontSize(TitleSize); + + self.arrowView=[[UIImageView alloc]initWithFrame:CGRectMake(LeftMargin, (TableHeight - 10)/2 , 10, 10)]; + self.arrowView.image = [UIImage imageNamed:@"arrowright"]; + self.arrowView.contentMode = UIViewContentModeScaleAspectFit; + + self.SpLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20, 0, gipWidth, TableHeight))]; + self.SpLabel.textAlignment= NSTextAlignmentLeft; + self.SpLabel.textColor = HexColor(@"666666"); + self.SpLabel.font = FontSize(TitleSize); + + // self.DjLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20+self.SpLabel.size.width+gipWidth , 0, TableWidth,TableHeight ))]; + // self.DjLabel.textAlignment= NSTextAlignmentLeft; + // self.DjLabel.textColor = HexColor(@"666666"); + // self.DjLabel.font = FontSize(TitleSize); + + self.BzggLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+20+gipWidth+1, 0, gipWidth, TableHeight)]; + self.BzggLabel.textAlignment= NSTextAlignmentLeft; + self.BzggLabel.textColor = HexColor(@"666666"); + self.BzggLabel.font = FontSize(TitleSize); + + self.BzslLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+20+2*gipWidth+2, 0, gipWidth, TableHeight)]; + self.BzslLabel.textAlignment= NSTextAlignmentLeft; + self.BzslLabel.textColor = HexColor(@"666666"); + self.BzslLabel.font = FontSize(TitleSize); + + + self.subSview=[[UIView alloc]initWithFrame:CGRectMake(0, TableHeight, self.contentView.width, TableHeight*2)]; + self.YcgslLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+20+3*gipWidth+3, 0, gipWidth, TableHeight)]; + + self.YcgslLabel.textAlignment= NSTextAlignmentLeft; + self.YcgslLabel.textColor = HexColor(@"666666"); + self.YcgslLabel.font = FontSize(TitleSize); + + + NSArray*array=[NSArray arrayWithObjects:@"åŒ…è£…è§„æ ¼:",@"基础数é‡:" ,@"备注:",nil]; + NSArray*array1=[NSArray arrayWithObjects:@"包装数é‡:",@"包装å•ä½:" ,nil]; + + + for (int i=0; i<array.count; i++) { + UILabel *lable=[[UILabel alloc]init]; + // if (i==0) { + lable.frame=CGRectMake(LeftWidth, i*TableHeight*2/4, (self.contentView.width-2*LeftMargin)/4, TableHeight*2/4); + // } + lable.text=[array objectAtIndex:i]; + lable.font=FontSize(TitleSize-2); + [lable setTextColor:GXF_PLACEHOLDER_COLOR]; + + [self.subSview addSubview:lable]; + UILabel*shopeLable= [self.shopDetailAry1 objectAtIndex:i]; + if (i==2) { + shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width, lable.frame.origin.y,(self.contentView.width-2*LeftMargin)/4*3, TableHeight*2/4); + }else{ + shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width, lable.frame.origin.y,(self.contentView.width-2*LeftMargin)/4, TableHeight*2/4); + } + + shopeLable.font=FontSize(TitleSize-2); + [shopeLable setTextColor:GXF_PLACEHOLDER_COLOR]; + // shopeLable.backgroundColor=[UIColor redColor]; + [self.subSview addSubview:shopeLable]; + } + for (int i=0; i<array1.count; i++) { + UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(LeftWidth+(self.contentView.width-2*LeftMargin)/2, i*TableHeight*2/4, (self.contentView.width-2*LeftMargin)/4, TableHeight*2/4)]; + + lable.text=[array1 objectAtIndex:i]; + lable.font=FontSize(TitleSize-2); + [lable setTextColor:GXF_PLACEHOLDER_COLOR]; + + [self.subSview addSubview:lable]; + UILabel*shopeLable= [self.shopDetailAry2 objectAtIndex:i]; + shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width, lable.frame.origin.y,(self.contentView.width-2*LeftMargin)/4, TableHeight*2/4); + shopeLable.font=FontSize(TitleSize-2); + [shopeLable setTextColor:GXF_PLACEHOLDER_COLOR]; + // shopeLable.backgroundColor=[UIColor redColor]; + [self.subSview addSubview:shopeLable]; + } + self.subSview.hidden=YES; + + self.button=[UIButton buttonWithType:UIButtonTypeCustom]; + [self.button setFrame:CGRectMake(ScreenSize.width-50, 0, 50, 50)]; + [self.button setImage:[UIImage imageNamed:@"edit"] forState:UIControlStateNormal]; + if (self.isButtonhidden) { + self.button.hidden=YES; + } + [self.contentView addSubview:self.button]; + [self.contentView addSubview:self.subSview]; + [self.contentView addSubview:self.SpLabel]; + [self.contentView addSubview:self.DjLabel]; + [self.contentView addSubview:self.BzslLabel]; + [self.contentView addSubview:self.BzggLabel]; + [self.contentView addSubview:self.HeardLabel]; + [self.contentView addSubview:self.arrowView]; + [self.contentView addSubview: self.YcgslLabel]; + +} +- (void)setTitleStr:(NSString *)str + +{ + + + +} +- (void)awakeFromNib { + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.m b/XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.m index b4a7f84fe16911cd6426e2a258a9f1ac585b3fca..093812ed3dbfdd3da8bcfcb30b0ec3f561e543a5 100644 --- a/XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.m +++ b/XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.m @@ -36,8 +36,8 @@ self.packageUnitPrice=[[UILabel alloc]init];;//包装å•ä»· self.totalMoney=[[UILabel alloc]init];;//æ€»é‡‘é¢ self.remark=[[UILabel alloc]init];;//备注 - self.shopDetailAry1=[NSArray arrayWithObjects: self.packageSpecification, self.foundationQuantity ,self.packageUnitPrice,self.remark,nil]; - self.shopDetailAry2=[NSArray arrayWithObjects: self.packageQuantity, self.foundationUnitPrice ,self.totalMoney,nil]; + self.shopDetailAry1=[NSArray arrayWithObjects: self.packageSpecification, self.foundationQuantity ,self.remark,nil]; + self.shopDetailAry2=[NSArray arrayWithObjects: self.packageQuantity, self.packageUnit ,nil]; } - (void)bulidLayout { @@ -54,7 +54,7 @@ self.arrowView.image = [UIImage imageNamed:@"arrowright"]; self.arrowView.contentMode = UIViewContentModeScaleAspectFit; - self.SpLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20, 0, TableWidth, TableHeight))]; + self.SpLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20, 0, gipWidth, TableHeight))]; self.SpLabel.textAlignment= NSTextAlignmentLeft; self.SpLabel.textColor = HexColor(@"666666"); self.SpLabel.font = FontSize(TitleSize); @@ -75,18 +75,18 @@ self.BzslLabel.font = FontSize(TitleSize); - self.subSview=[[UIView alloc]initWithFrame:CGRectMake(0, 50, ScreenSize.width, TableHeight*3)]; + self.subSview=[[UIView alloc]initWithFrame:CGRectMake(0, TableHeight, self.contentView.width, TableHeight*2)]; NSArray*array=[NSArray arrayWithObjects:@"åŒ…è£…è§„æ ¼:",@"基础数é‡:" ,@"备注:",nil]; - NSArray*array1=[NSArray arrayWithObjects:@"包装数é‡:",@"包装å•ä½" ,nil]; + NSArray*array1=[NSArray arrayWithObjects:@"包装数é‡:",@"包装å•ä½:" ,nil]; for (int i=0; i<array.count; i++) { UILabel *lable=[[UILabel alloc]init]; // if (i==0) { - lable.frame=CGRectMake(LeftWidth, i*(10+10), (ScreenSize.width-2*LeftMargin)/4, 10); + lable.frame=CGRectMake(LeftWidth, i*TableHeight*2/4, (self.contentView.width-2*LeftMargin)/4, TableHeight*2/4); // } lable.text=[array objectAtIndex:i]; lable.font=FontSize(TitleSize-2); @@ -94,10 +94,10 @@ [self.subSview addSubview:lable]; UILabel*shopeLable= [self.shopDetailAry1 objectAtIndex:i]; - if (i==3) { - shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width-LeftMargin, lable.frame.origin.y,(ScreenSize.width-2*LeftMargin)/4*3, 10); + if (i==2) { + shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width, lable.frame.origin.y,(self.contentView.width-2*LeftMargin)/4*3, TableHeight*2/4); }else{ - shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width-LeftMargin, lable.frame.origin.y,(ScreenSize.width-2*LeftMargin)/4, 10); + shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width, lable.frame.origin.y,(self.contentView.width-2*LeftMargin)/4, TableHeight*2/4); } shopeLable.font=FontSize(TitleSize-2); @@ -106,7 +106,7 @@ [self.subSview addSubview:shopeLable]; } for (int i=0; i<array1.count; i++) { - UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(ScreenSize.width/2, i*(10+10), (ScreenSize.width-2*LeftMargin)/4, 10)]; + UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(LeftWidth+(self.contentView.width-2*LeftMargin)/2, i*TableHeight*2/4, (self.contentView.width-2*LeftMargin)/4, TableHeight*2/4)]; lable.text=[array1 objectAtIndex:i]; lable.font=FontSize(TitleSize-2); @@ -114,7 +114,7 @@ [self.subSview addSubview:lable]; UILabel*shopeLable= [self.shopDetailAry2 objectAtIndex:i]; - shopeLable.frame=CGRectMake(lable.frame.origin.x-LeftMargin+lable.frame.size.width, lable.frame.origin.y,(ScreenSize.width-2*LeftMargin)/4, 10); + shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width, lable.frame.origin.y,(self.contentView.width-2*LeftMargin)/4, TableHeight*2/4); shopeLable.font=FontSize(TitleSize-2); [shopeLable setTextColor:GXF_PLACEHOLDER_COLOR]; // shopeLable.backgroundColor=[UIColor redColor];