Commit 5f3dac71 authored by n22's avatar n22

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

Conflicts:
	XFFruit.xcodeproj/project.pbxproj
parents f4a79001 8f9cd6ed
......@@ -19,7 +19,20 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
kFunctionComeShopReg,
kFunctionLeaveShopReg,
kFunctionCreatTask,
kFunctionHandleTask
kFunctionHandleTask,
kFunctionNotice,
kFunctionNewSurvey,
kFunctionSeeSurvey,
kFunctionFeeBackSurvey,
kFunctionNewPurchaseNotice,
kFunctionSeePurchaseNotice,
kFunctionNewPurchase,
kFunctionSeePurchase,
kFunctionExaminePurchas,
kFunctionNewShipment,
kFunctionSeeShipment,
kFunctionNewProcessing,
};
@interface ICRFunctionItemControl : UIControl
......
......@@ -8,10 +8,23 @@
#import "BusinessViewController.h"
#import "ICRTaskListViewController.h"
#import "ICRPatrolPlanViewController.h"
#import "ICRStoreListViewController.h"
#import "ICRStoreDetailViewController.h"
#import "ICRAnnouncementViewController.h"
#import "NewSurveyViewController.h"
#import "SurveyViewController.h"
#import "AddWorkSheetViewController.h"
#import "ICRFunctionBaseView.h"
#import "ICRFunctionEntity.h"
#import "ICRFunctionBaseView.h"
#import "NewPurchaseNoticeViewController.h"
#import "SeePurchaseNoticeViewController.h"
@interface BusinessViewController ()<ICRFunctionBaseViewDelegate>
@end
......@@ -45,18 +58,30 @@
[IBTCommon localizableString:@"Survey7"],
[IBTCommon localizableString:@"Survey8"],[IBTCommon localizableString:@"Survey9"],
];
NSArray *functionTags = @[ @(kFunctionAnnouncement),
@(kFunctionTaskManagement),
@(kFunctionPatrolPlan),
@(kFunctionMyShop),
@(kFunctionNavigation),
@(kFunctionComeShopReg),
@(kFunctionAnnouncement),
@(kFunctionTaskManagement),
@(kFunctionPatrolPlan),
@(kFunctionMyShop),
@(kFunctionNavigation),
@(kFunctionComeShopReg)];
NSArray *functionTags = @[ @(kFunctionNotice),
//公告
@(kFunctionNewSurvey),
//新建行情调研
@(kFunctionSeeSurvey),
//查看行情调研
@(kFunctionFeeBackSurvey),
//填写行情反馈
@(kFunctionNewPurchaseNotice),
//新建采购通知
@(kFunctionSeePurchaseNotice),
//查看采购通知
@(kFunctionNewPurchase),
//新建采购单
@(kFunctionSeePurchase),
//查看采购单
@(kFunctionExaminePurchas),
//审核采购单
@(kFunctionNewShipment),
//新建发运单
@(kFunctionSeeShipment),
//查看发运单
@(kFunctionNewProcessing)];
//新建加工单
int i = 0;
for (NSString *functionName in fuctionNames) {
......@@ -80,13 +105,97 @@
[self.view addSubview:baseView];
}
#pragma mark - ICRFunctionBaseViewDelegate
- (void)ICRFunctionBaseView:(ICRFunctionItemControl *)imageView {
/*
kFunctionAnnouncement = 0,
kFunctionTaskManagement,
kFunctionPatrolPlan,
kFunctionMyShop,
*/
switch (imageView.tag) {
case kFunctionNotice://公告
{
ICRAnnouncementViewController *aVC = [[ICRAnnouncementViewController alloc] init];
[self PushViewController:aVC animated:YES];
}
break;
case kFunctionNewSurvey://新建行情
{
NewSurveyViewController *svc = [[NewSurveyViewController alloc] init];
svc.title = [IBTCommon localizableString:@"AddSurvey"];
[self PushViewController:svc animated:YES];
}
break;
case kFunctionSeeSurvey://查看行情
{
SurveyViewController *svc = [[SurveyViewController alloc] init];
svc.title = [IBTCommon localizableString:@"Survey"];
[self PushViewController:svc animated:YES];
}
break;
case kFunctionNewPurchaseNotice://新建采购通知单
{
NewPurchaseNoticeViewController *svc = [[NewPurchaseNoticeViewController alloc] init];
svc.title = [IBTCommon localizableString:@"Survey2"];
[self PushViewController:svc animated:YES];
}
break;
case kFunctionSeePurchaseNotice://查看采购通知单
{
SeePurchaseNoticeViewController *svc =
[[SeePurchaseNoticeViewController alloc] init];
svc.title = [IBTCommon localizableString:@"Survey3"];
[self PushViewController:svc animated:YES];
}
break;
case kFunctionTaskManagement://任务管理
{
ICRTaskListViewController *tVC = [[ICRTaskListViewController alloc] init];
[self PushViewController:tVC animated:YES];
}
break;
case kFunctionPatrolPlan://巡店计划
{
ICRPatrolPlanViewController *pVC = [[ICRPatrolPlanViewController alloc] initWithStore:nil isHomeShow:YES];
[self PushViewController:pVC animated:YES];
}
break;
case kFunctionMyShop://我的店铺
{
// ICRStoreListViewController *sVC = [[ICRStoreListViewController alloc] initWithBHaveToChooseOne:NO];
// sVC.title = [IBTCommon localizableString:@"MyStore"];
// sVC.m_delegate = self;
// [self PushViewController:sVC animated:YES];
AddWorkSheetViewController *sVC = [[AddWorkSheetViewController alloc] init];
[self PushViewController:sVC animated:YES];
}
break;
default:
return;
break;
}
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
-(void)initView
{
NSArray *butArray=[[NSArray alloc]initWithObjects:@"公告", @"新建行情调研",@"查看行情调研",@"填写行情反馈",@"新建采购通知",@"查看采购通知",@"新建采购单",@"查看采购单",@"审核采购单",@"新建发运单",@"查看发运单",@"新建加工单",nil];
for (int i=0; i<butArray.count; i++) {
UIButton *but=[UIButton buttonWithType:UIButtonTypeCustom];
but.frame=CGRectMake(15+i%3*(90+10),10+(i/3)*(100+10) , 90, 90) ;
// but.titleLabel.text=[NSString stringWithFormat:@"%@",[butArray objectAtIndex:i]];
// but.titleLabel.text=[NSString stringWithFormat:@"%@",[butArray objectAtIndex:i]];
NSString *str=[butArray objectAtIndex:i];
[but setTitle:str forState:UIControlStateNormal];
but.backgroundColor=[UIColor redColor];
......@@ -95,14 +204,5 @@
}
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// NewPurchaseNoticeViewController.h
// XFFruit
//
// Created by mac on 15/8/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface NewPurchaseNoticeViewController : ICRBaseViewController
@end
//
// PurchaseNoticeCell.h
// XFFruit
//
// Created by mac on 15/8/18.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PurchaseNoticeCell : UITableViewCell
@property (nonatomic,strong)UILabel *HeardLabel;
@property (nonatomic,strong)UILabel *FootLabel;
@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, assign) BOOL isSelected;
@property (nonatomic,strong)UIButton *button;
- (void)setTitleStr:(NSString *)str;
@end
//
// PurchaseNoticeCell.m
// XFFruit
//
// Created by mac on 15/8/18.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "PurchaseNoticeCell.h"
#define TitleSize 17
#define LeftMargin 15
#define TableHeight 46
#define TableWidth 60
@implementation PurchaseNoticeCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.isSelected=NO;
[self bulidLayout];
}
return self;
}
- (void)bulidLayout
{
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.HeardLabel.backgroundColor = HexColor(@"e5e5e5");
self.HeardLabel.font = FontSize(TitleSize);
self.SpLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20, 0, TableWidth, TableHeight))];
self.SpLabel.textAlignment= NSTextAlignmentLeft;
self.SpLabel.textColor = HexColor(@"666666");
self.SpLabel.font = FontSize(TitleSize);
self.DjLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+80, 0, TableWidth,TableHeight ))];
self.DjLabel.textAlignment= NSTextAlignmentLeft;
self.DjLabel.textColor = HexColor(@"666666");
self.DjLabel.font = FontSize(TitleSize);
self.BzggLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+150, 0, TableWidth, TableHeight)];
self.BzggLabel.textAlignment= NSTextAlignmentLeft;
self.BzggLabel.textColor = HexColor(@"666666");
self.BzggLabel.font = FontSize(TitleSize);
self.BzslLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+240, 0, TableWidth, TableHeight)];
self.BzslLabel.textAlignment= NSTextAlignmentLeft;
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.subSview=[[UIView alloc]initWithFrame:CGRectMake(0, 50, ScreenSize.width, TableHeight*3)];
NSArray*array=[NSArray arrayWithObjects:@"包装规格",@"基础数量" ,@"包装单价",@"备注",nil];
NSArray*array1=[NSArray arrayWithObjects:@"包装数量",@"基础单价" ,@"总金额",nil];
for (int i=0; i<array.count; i++) {
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(TableWidth-10, i*(10+10), 100, 10)];
lable.text=[array objectAtIndex:i];
lable.font=FontSize(TitleSize-2);
[lable setTextColor:HexColor(@"444444")];
[self.subSview addSubview:lable];
}
for (int i=0; i<array1.count; i++) {
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(TableWidth+150, i*(10+10), 100, 10)];
lable.text=[array objectAtIndex:i];
lable.font=FontSize(TitleSize-2);
[lable setTextColor:HexColor(@"444444")];
[self.subSview addSubview:lable];
}
self.subSview.hidden=YES;
self.button=[UIButton buttonWithType:UIButtonTypeCustom];
[self.button setFrame:CGRectMake(310, 0, 50, 50)];
[self.button setImage:[UIImage imageNamed:@"AttachHide"] forState:UIControlStateNormal];
// [self.button setTitle:@"编辑" forState:UIControlStateNormal];
// [self.button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[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.FootLabel];
}
- (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
//
// SeePurchaseNoticeViewController.h
// XFFruit
//
// Created by mac on 15/8/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface SeePurchaseNoticeViewController : ICRBaseViewController
@end
//
// SeePurchaseNoticeViewController.m
// XFFruit
//
// Created by mac on 15/8/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SeePurchaseNoticeViewController.h"
@interface SeePurchaseNoticeViewController ()
@end
@implementation SeePurchaseNoticeViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// ShopDetaileViewController.h
// XFFruit
//
// Created by mac on 15/8/19.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
#import "Survey.h"
@interface ShopDetaileViewController : ICRBaseViewController
@property (nonatomic,strong)Survey *survey;
@property (nonatomic,strong)NSString *navTitle;
@end
......@@ -50,6 +50,8 @@
"Survey7" = "新建发运单";
"Survey8" = "查看发运单";
"Survey9" = "新建加工单";
"EditorShopDetail" ="编辑商品明细";
"AddShopDetail" ="添加商品明细";
// Store
"Store" = "门店";
......
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