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

Merge branch 'DEV_20150805_001' of http://121.42.32.57/root/xffruit into DEV_20150805_001

Conflicts:
	XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
parents d841c414 4d6dcb24
......@@ -14,6 +14,7 @@
0414FF191B94959700C7B00E /* PurchaseNoticeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF121B94959700C7B00E /* PurchaseNoticeCell.m */; };
0414FF1A1B94959700C7B00E /* SelectCompanyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF141B94959700C7B00E /* SelectCompanyViewController.m */; };
0414FF1B1B94959700C7B00E /* ShopDetaileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF161B94959700C7B00E /* ShopDetaileViewController.m */; };
04B4A3871B9CAAD700D88D68 /* ShopDetail.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B4A3861B9CAAD700D88D68 /* ShopDetail.m */; };
04F6E70A1B9B08A500550849 /* PurchaseNoticeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F6E7091B9B08A500550849 /* PurchaseNoticeViewController.m */; };
300DD94A1B184B450080EE12 /* ICRPatrolPlan.m in Sources */ = {isa = PBXBuildFile; fileRef = 300DD9491B184B450080EE12 /* ICRPatrolPlan.m */; };
300DD94B1B184B450080EE12 /* ICRPatrolPlan.m in Sources */ = {isa = PBXBuildFile; fileRef = 300DD9491B184B450080EE12 /* ICRPatrolPlan.m */; };
......@@ -446,6 +447,8 @@
0414FF141B94959700C7B00E /* SelectCompanyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SelectCompanyViewController.m; sourceTree = "<group>"; };
0414FF151B94959700C7B00E /* ShopDetaileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopDetaileViewController.h; sourceTree = "<group>"; };
0414FF161B94959700C7B00E /* ShopDetaileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopDetaileViewController.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>"; };
04F6E7081B9B08A500550849 /* PurchaseNoticeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseNoticeViewController.h; sourceTree = "<group>"; };
04F6E7091B9B08A500550849 /* PurchaseNoticeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNoticeViewController.m; sourceTree = "<group>"; };
1B0B22845F5CD40B5CF655F2 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
......@@ -1004,6 +1007,8 @@
0414FF0F1B94959700C7B00E /* Models */ = {
isa = PBXGroup;
children = (
04B4A3851B9CAAD700D88D68 /* ShopDetail.h */,
04B4A3861B9CAAD700D88D68 /* ShopDetail.m */,
);
path = Models;
sourceTree = "<group>";
......@@ -2432,6 +2437,7 @@
C10C909B1AE56E8700B911CD /* JTOptionsEntity.m in Sources */,
C11A34621B24485100079129 /* ICRStoreResult.m in Sources */,
35CF33841B954F35001211EF /* GXFTableViewCell.m in Sources */,
04B4A3871B9CAAD700D88D68 /* ShopDetail.m in Sources */,
7217E9E91B72364300FE5C1D /* SurveyResult.m in Sources */,
C10214DB1AD90A3F0024637E /* ICRFunctionBaseView.m in Sources */,
35B448DF1B9B0A73001209E2 /* ProductBillCell.m in Sources */,
......@@ -2439,11 +2445,8 @@
FE4F17251B72FAAB00924DED /* ChosePersonViewController.m in Sources */,
30D7495F1ACE8F4400C63BA1 /* ICRConfigurationViewController.m in Sources */,
FE2FCC821B745E1A00BBC6FB /* SurveyDetailViewController.m in Sources */,
0414FF171B94959700C7B00E /* NewPurchaseNoticeViewController.m in Sources */,
35CF33901B95AF1B001211EF /* GXFBaseSearchViewController.m in Sources */,
FE2FCC8B1B74A9EE00BBC6FB /* SurveyResultCell.m in Sources */,
C182E40E1AD4CE0B009BB9DB /* IBTModel.m in Sources */,
C1FE50411AE0240300C18080 /* IBTAVAudioPlayWrapper.m in Sources */,
......@@ -2453,11 +2456,8 @@
C142D2BE1AC3A155000109A7 /* UIView+FindUIViewController.m in Sources */,
35C3C0BF1AE95F1D0035AC8A /* UIImage+Rotate.m in Sources */,
7281A0C51B89BF1C0052B1AC /* ChooseVendorViewController.m in Sources */,
04F6E70A1B9B08A500550849 /* PurchaseNoticeViewController.m in Sources */,
35CF337E1B953FFF001211EF /* GXFProcessProduct.m in Sources */,
C11A344D1B1BE27200079129 /* ICRPatrolAllStoreViewController.m in Sources */,
C10214DD1AD90A3F0024637E /* ICRFunctionEntity.m in Sources */,
FE4678AA1B8D60F900B5EDA3 /* ChooseTypeViewController.m in Sources */,
......@@ -2951,9 +2951,7 @@
"$(PROJECT_DIR)",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Debug;
......@@ -2974,9 +2972,7 @@
"$(PROJECT_DIR)",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Release;
......
......@@ -16,6 +16,7 @@
#import "Survey.h"
#import "PurchaseNoticeCell.h"
#import "ShopDetaileViewController.h"
#import "ShopDetail.h"
#define LeftMargin 15
#define LeftWidth 40
#define RightWidth 30
......@@ -40,6 +41,7 @@ typedef enum : NSUInteger {
{
UITableView *_tableView;
NSMutableArray *_dataArr;
NSMutableArray *_shopeArr;
UITextField *_titleField;
UILabel *_productLabel;
UILabel *_startDateLabel;
......@@ -81,6 +83,7 @@ typedef enum : NSUInteger {
{
selectCellAry=[[NSMutableArray alloc]initWithCapacity:1000];
_dataArr=[[NSMutableArray alloc]initWithObjects:@"标题:",@"采购员:",@"备注:", nil];
_shopeArr=[[NSMutableArray alloc]initWithObjects: nil];
self.view.backgroundColor = XXFBgColor;
_tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, LeftMargin,ScreenSize.width, ScreenSize.height/3-LeftMargin)) style:(UITableViewStylePlain)];
......@@ -100,6 +103,7 @@ typedef enum : NSUInteger {
UIView *footView2=[[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)];
footView2.backgroundColor=[UIColor clearColor];
NSArray *ary=[NSArray arrayWithObjects:@"商品",@"价格",@"包装规格",@"包装数量", nil];
// NSArray *ary=[NSArray arrayWithObjects: nil];
CGFloat gipWidth = (ScreenSize.width-(((RightWidth+70)+(LeftWidth+35))+(35+70)))/3;
for (int i=0; i< ary.count;i++ ) {
......@@ -177,7 +181,7 @@ typedef enum : NSUInteger {
return _dataArr.count;
}else if ([tableView isEqual:mingXiTableView])
{
return _dataArr.count;
return _shopeArr.count;
}
return 1;
}
......@@ -207,9 +211,11 @@ typedef enum : NSUInteger {
Cell = [[PurchaseNoticeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
Cell.selectionStyle = UITableViewCellSelectionStyleNone;
// Cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;向左箭头
[self showShopDetail:Cell indexPath:indexPath];
}
if (Cell.isSelected==YES) {
Cell.arrowView.image = [UIImage imageNamed:@"arrowdown"];
Cell.backgroundColor=XXFBgColor;
......@@ -372,9 +378,31 @@ typedef enum : NSUInteger {
-(void)addShopeDetailed
{
ShopDetaileViewController *svc = [[ShopDetaileViewController alloc] init];
// 回调
svc.choseShopDetail = ^(ShopDetail *shopDetail){
[_shopeArr addObject:shopDetail];
[mingXiTableView reloadData];
};
svc.title = [IBTCommon localizableString:@"AddShopDetail"];
[self PushViewController:svc animated:YES];
}
-(void)showShopDetail:(PurchaseNoticeCell*)Cell indexPath:(NSIndexPath *)indexPath
{
ShopDetail *shopDetail=[_shopeArr objectAtIndex:indexPath.row];
Cell.SpLabel.text=shopDetail.merchandise;//商品
Cell.DjLabel.text=shopDetail.packageUnitPrice;//包装单价
Cell.BzggLabel.text=shopDetail.packageSpecification;//包装规格
Cell.BzslLabel.text=shopDetail.packageQuantity;//包装数量
Cell.packageSpecification.text=shopDetail.packageSpecification;//包装规格
Cell.foundationQuantity.text=shopDetail.foundationQuantity;//基础数量
Cell.packageUnitPrice.text=shopDetail.packageUnitPrice;//包装单价
Cell.remark.text=shopDetail.remark;//备注
Cell.packageQuantity.text=shopDetail.packageQuantity;//包装数量
Cell.foundationUnitPrice.text=shopDetail.foundationUnitPrice;//基础单价
Cell.totalMoney.text=shopDetail.totalMoney;//总金额
}
//编辑
- (void)didtoucher
......
//
// ShopDetail.h
// XFFruit
//
// Created by mac on 15/9/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface ShopDetail : IBTModel
@property (nonatomic,strong)NSString *merchandise;//商品
@property (nonatomic,strong)NSString *packageSpecification;//包装规格
@property (nonatomic,strong)NSString *packageQuantity;//包装数量
@property (nonatomic,strong)NSString *packageUnit;//包装单位
@property (nonatomic,strong)NSString *foundationQuantity;//基础数量
@property (nonatomic,strong)NSString *foundationUnitPrice;//基础单价
@property (nonatomic,strong)NSString *packageUnitPrice;//包装单价
@property (nonatomic,strong)NSString *totalMoney;//总金额
@property (nonatomic,strong)NSString *remark;//备注
@end
//
// ShopDetail.m
// XFFruit
//
// Created by mac on 15/9/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ShopDetail.h"
@implementation ShopDetail
+ (NSDictionary *)specialKeysAndReplaceKeys {
return @{ @"pID" : [[self class] PrimaryKey], };
}
+ (NSString *)PrimaryKey {
return @"uuid";
}
@end
......@@ -19,6 +19,21 @@
@property (nonatomic,strong)UIView *subSview;
@property (nonatomic, assign) BOOL isSelected;
@property (nonatomic,strong)UIButton *button;
@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;
- (void)setTitleStr:(NSString *)str;
......
......@@ -21,11 +21,24 @@
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.packageUnitPrice,self.remark,nil];
self.shopDetailAry2=[NSArray arrayWithObjects: self.packageQuantity, self.foundationUnitPrice ,self.totalMoney,nil];
}
- (void)bulidLayout
{
CGFloat gipWidth = (ScreenSize.width-4*TableWidth-(LeftMargin+20)-RightWidth)/3;
......@@ -61,33 +74,54 @@
self.BzslLabel.textColor = HexColor(@"666666");
self.BzslLabel.font = FontSize(TitleSize);
self.SpLabel.text=@"1 西瓜";
self.DjLabel.text=@"0.8";
self.BzggLabel.text=@"1*12";
self.BzslLabel.text=@"100框";
// self.SpLabel.text=@"1 西瓜";
// self.DjLabel.text=@"0.8";
// self.BzggLabel.text=@"1*12";
// self.BzslLabel.text=@"100框";
self.subSview=[[UIView alloc]initWithFrame:CGRectMake(0, 50, ScreenSize.width, TableHeight*3)];
NSArray*array=[NSArray arrayWithObjects:@"包装规格",@"基础数量" ,@"包装单价",@"备注",nil];
NSArray*array1=[NSArray arrayWithObjects:@"包装数量",@"基础单价" ,@"总金额",nil];
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*(10+10), 100, 10);
lable.frame=CGRectMake(LeftWidth, i*(10+10), (ScreenSize.width-2*LeftMargin)/4, 10);
// }
lable.text=[array objectAtIndex:i];
lable.text=[array objectAtIndex:i];
lable.font=FontSize(TitleSize-2);
[lable setTextColor:HexColor(@"444444")];
[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);
}else{
shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width-LeftMargin, lable.frame.origin.y,(ScreenSize.width-2*LeftMargin)/4, 10);
}
shopeLable.font=FontSize(TitleSize-2);
[shopeLable setTextColor:HexColor(@"444444")];
// shopeLable.backgroundColor=[UIColor redColor];
[self.subSview addSubview:shopeLable];
}
for (int i=0; i<array1.count; i++) {
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(ScreenSize.width/2, i*(10+10), 60, 10)];
lable.text=[array objectAtIndex:i];
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(ScreenSize.width/2, i*(10+10), (ScreenSize.width-2*LeftMargin)/4, 10)];
lable.text=[array1 objectAtIndex:i];
lable.font=FontSize(TitleSize-2);
[lable setTextColor:HexColor(@"444444")];
[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.font=FontSize(TitleSize-2);
[shopeLable setTextColor:HexColor(@"444444")];
// shopeLable.backgroundColor=[UIColor redColor];
[self.subSview addSubview:shopeLable];
}
self.subSview.hidden=YES;
......
......@@ -364,9 +364,8 @@ typedef enum : NSUInteger {
if(indexPath.row == 0){
ChooseProductViewController *cvc = [ChooseProductViewController new];
cvc.choseBaseInfo = ^(NSArray *products){
cvc.choseProduct = ^(Product *product){
Product *product = products[0];
_productLabel.text = [NSString stringWithFormat:@"%@[%@]",product.name,product.code];
merchandise.text=[NSString stringWithFormat:@"%@[%@]",product.name,product.code];
_productLabel.textColor = HexColor(@"444444");
......
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