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

细节修改

parent b6648fe0
This diff is collapsed.
......@@ -102,7 +102,6 @@ typedef enum : NSUInteger {
[self.view addSubview:_scrollView];
[self createBtn];
[self createBottomView];
[self createPurchaseView];
}
......@@ -361,7 +360,7 @@ typedef enum : NSUInteger {
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_SHIPPING]) {
self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"发运中";
}else if ([self.bill.state isEqualToString:PURCHASE_ACTION_ABORT]) {
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_ABORTED]) {
self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"已作废";
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_FINISHED]) {
......
......@@ -9,7 +9,7 @@
#import "FollowUpRecordViewController.h"
#import "NotuceRecordCell.h"
#import "NoticeRecord.h"
#define TableHeight 70
#define TableHeight 130
@interface FollowUpRecordViewController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate>
@end
......@@ -20,7 +20,6 @@
[super viewDidLoad];
[self bulidLayout];
[self getDataFromServer];
// Do any additional setup after loading the view.
}
- (void)bulidLayout{
self.productArr=[[NSMutableArray alloc]initWithObjects:@"",@"", nil];
......@@ -57,13 +56,11 @@
[IBTLoadingView showTips:data];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
[[ICRHTTPController sharedController] getPurchaseNoticeRecodWithData:self.purchaseNotice.billnumber success:succ failure:fail];
[[ICRHTTPController sharedController] getPurchaseNoticeRecodWithData:self.purchaseNotice.uuid success:succ failure:fail];
}
#pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......@@ -71,34 +68,18 @@
return self.productArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"NotuceRecordCell";
NotuceRecordCell*notuceRecordCell = [tableView dequeueReusableCellWithIdentifier:cellID];
static NSString *CellID = @"CellID";
NotuceRecordCell*Cell = [tableView dequeueReusableCellWithIdentifier:CellID];
if (Cell == nil) {
Cell = [[NotuceRecordCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
Cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
Cell.uuidLable.text=self.noticeRecord.uuid;//唯一标识
Cell.traceIdLable.text=[NSString stringWithFormat:@"采购通知单:%@",self.noticeRecord.traceId];//采购通知单
Cell.typeLable.text=self.noticeRecord.type;//业务类型
Cell.creatorLable.text=self.noticeRecord.creator;//业务人
Cell.createdLable.text=[[NSString alloc]initWithData:self.noticeRecord.created encoding:NSUTF8StringEncoding];//业务时间
Cell.remarkLable.text=self.noticeRecord.remark;//日志描述信息
return Cell;
if (notuceRecordCell == nil) {
notuceRecordCell = [[NotuceRecordCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
notuceRecordCell.selectionStyle = UITableViewCellSelectionStyleNone;
}
return notuceRecordCell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
......
......@@ -105,9 +105,9 @@ typedef enum : NSUInteger {
[orderArr addObject:[order dictForCommit]];
}
}
id noticeObject = [NSNull null];
id titleObject = [NSNull null];
if (self.titleLike.length > 0) {
noticeObject = self.titleLike;
titleObject = self.titleLike;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"titleLike";
......@@ -125,10 +125,8 @@ typedef enum : NSUInteger {
NSDictionary *dict = @{
@"billNumberLike":billObject,
@"state":stateObject,
@"title":[NSNull null],
@"orderField":@"created",
@"orderDirection":@"desc",
// @"queryOrders":orderArr,
@"title":titleObject,
@"queryOrders":orderArr,
@"pageNumber":@(_currentPage),
@"pageSize":@(20)};
[[ICRHTTPController sharedController] getPurchaseNoticeListWithData:dict success:succ failure:fail];
......@@ -415,13 +413,12 @@ typedef enum : NSUInteger {
[self PushViewController:nvc animated:YES];
}else{
SeePurchaseNoticeViewController *pvc = [SeePurchaseNoticeViewController new];
pvc.title = @"查看采购单";
pvc.title = @"查看采购单通知单";
pvc.purchaseNotice = purchaseNotice;
[self PushViewController:pvc animated:YES];
}
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
......
......@@ -140,8 +140,6 @@ typedef enum : NSUInteger {
[self createBtn];
[self createPurchaseView];
[self createMingXiTableView];//自定义
}
- (void)hiddenBottomBtn{
......@@ -271,18 +269,20 @@ typedef enum : NSUInteger {
}
- (void)createMingXiTableView
{
_bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + TopMargin, ScreenSize.width, 200)];
_bottomView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_bottomView];
_shopeArr=[[NSMutableArray alloc]initWithObjects: nil];
selectCellAry=[[NSMutableArray alloc]initWithCapacity:1000];
mingXiTableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 2*LeftMargin+_purchaseView.frame.size.height, ScreenSize.width, ScreenSize.height-_purchaseView.height-ScreenSize.height/5 )];
mingXiTableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, _bottomView.height)];
mingXiTableView.backgroundColor = [UIColor whiteColor];
mingXiTableView.tag=1002;
mingXiTableView.bounces=NO;
mingXiTableView.delegate=self;
mingXiTableView.dataSource=self;
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-leftWidth-RightWidth)/3;
for (int i=0; i< ary.count;i++ ) {
......@@ -296,8 +296,6 @@ typedef enum : NSUInteger {
if (i==2) {
lable.frame=CGRectMake(leftWidth+2*gipWidth+2, 0, gipWidth,TableHeight);
}
// UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(LeftWidth + (SpaceMargin + headWidth)*i,0, headWidth, 50)];
lable.text=[ary objectAtIndex:i];
lable.textColor=GXF_PLACEHOLDER_COLOR;
lable.font = GXF_FIFTEENTEN_SIZE;
......@@ -318,20 +316,13 @@ typedef enum : NSUInteger {
self.HeardLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, footView3.size.width-2*LeftMargin, 1))];
self.HeardLabel.backgroundColor = HexColor(@"e5e5e5");
self.HeardLabel.font = FontSize(TitleSize);
//HexColor(@"e5e5e5")
[footView3 addSubview:self.addDetailedButton];
[footView3 addSubview:self.HeardLabel];
[footView3 addSubview:self.FootLabel];
mingXiTableView.tableFooterView = footView3;
mingXiTableView.tableHeaderView=footView2;
[_scrollView addSubview:mingXiTableView];
[_bottomView addSubview:mingXiTableView];
}
- (void)createBottomView{
_bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + TopMargin, ScreenSize.width, 200)];
_bottomView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_bottomView];
}
- (void)createPurchaseView{
_leftArr = @[@"单号:",@"创建人:",@"标题:",@"状态:",@"采购员:",@"合计基础数量:",@"备注:"];
......@@ -361,12 +352,8 @@ typedef enum : NSUInteger {
}else if(i == 4){
self.userLabel = rightLabel;
}else if(i == 5){
CGRect leftFame = leftLabel.frame;
leftFame.size.width = 110;
leftLabel.frame = leftFame;
CGRect rightFrame = rightLabel.frame;
rightFrame.origin.x = CGRectGetMaxX(leftLabel.frame);
rightLabel.frame = rightFrame;
leftLabel.width = 110;
rightLabel.x = leftLabel.right;
self.countLabel = rightLabel;
}else if(i == _leftArr.count - 1){
rightLabel.numberOfLines = 0;
......@@ -507,13 +494,6 @@ typedef enum : NSUInteger {
FollowUpRecordViewController *nvc = [FollowUpRecordViewController new];
nvc.title = @"查看跟进记录";
nvc.purchaseNotice=self.purchaseNotice;
// nvc.choseNoticeProduct = ^(NoticeProduct *product,NSIndexPath *indexPath){
// if (product) {
// [_shopeArr addObject:product];
// [mingXiTableView reloadData];
// }
// };
[self PushViewController:nvc animated:YES];
}
-(void)showShopDetail:(PurchaseNoticeCell*)Cell indexPath:(NSIndexPath *)indexPath
......
......@@ -13,7 +13,7 @@
@property (nonatomic,strong)NSString *traceId;//采购通知单uuid
@property (nonatomic,strong)NSString *type;//业务类型
@property (nonatomic,strong)NSString *creator;//业务人
@property (nonatomic,strong)NSData *created;//业务时间
@property (nonatomic,strong)NSString *created;//业务时间
@property (nonatomic,strong)NSString *remark;//日志描述信息
@end
......@@ -7,7 +7,7 @@
//
#import "NotuceRecordCell.h"
#define LeftMargin 10
@implementation NotuceRecordCell
- (void)awakeFromNib {
......@@ -17,35 +17,53 @@
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self initdata];
[self bulidLayout];
}
return self;
}
-(void)initdata
{
self.uuidLable=[[UILabel alloc]init];//唯一标识
self.traceIdLable=[[UILabel alloc]init];//采购通知单uuid
self.typeLable=[[UILabel alloc]init];//业务类型
self.creatorLable=[[UILabel alloc]init];//业务人
self.createdLable=[[UILabel alloc]init];//业务时间
self.remarkLable=[[UILabel alloc]init];//日志描述信息
}
- (void)bulidLayout
{
self.createdLable.frame=CGRectMake(0, 0, self.frame.size.width-30-100, self.frame.size.height/5);
self.creatorLable.frame=CGRectMake(self.frame.size.width-30-70, 0, 70, self.frame.size.height/5);
self.traceIdLable.frame=CGRectMake(0, self.frame.size.height/5, self.frame.size.width, self.frame.size.height/5);
self.remarkLable.frame=CGRectMake(0, self.frame.size.height/5*2, self.frame.size.width, self.frame.size.height/5*3);
self.contentView.backgroundColor = XXFBgColor;
UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(20, 5, ScreenSize.width - 40, 130 -10)];
bgView.backgroundColor = [UIColor whiteColor];
bgView.layer.cornerRadius = 5;
bgView.layer.masksToBounds = YES;
[self.contentView addSubview:bgView];
self.createdLable = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 0, bgView.width - 100, 30)];//业务时间
self.createdLable.font = GXF_FIFTEENTEN_SIZE;
self.createdLable.text = @"2015-04-05 09:05:05";
self.creatorLable = [[UILabel alloc]initWithFrame:CGRectMake(self.createdLable.right, 0, bgView.width - self.createdLable.width - LeftMargin * 2, 30)];//业务人
self.creatorLable.font = GXF_FIFTEENTEN_SIZE;
self.creatorLable.textAlignment = NSTextAlignmentRight;
self.creatorLable.text = @"张三";
self.traceIdLable = [[UILabel alloc]initWithFrame:CGRectMake(self.createdLable.x, self.createdLable.bottom, bgView.width - LeftMargin*2, 20)];//采购通知单uuid
self.traceIdLable.font = GXF_FIFTEENTEN_SIZE;
self.traceIdLable.text = @"采购通知单号:1358959008854";
self.typeLable = [[UILabel alloc]initWithFrame:CGRectMake(self.createdLable.x, self.traceIdLable.bottom, bgView.width- LeftMargin*2, 20)];//业务类型
self.typeLable.font = GXF_FIFTEENTEN_SIZE;
self.typeLable.text = @"类型:接受任务";
self.remarkLable = [[UILabel alloc]initWithFrame:CGRectMake(self.createdLable.x, self.typeLable.bottom, bgView.width-LeftMargin*2, 20)];//日志描述信息
self.remarkLable.font = GXF_FIFTEENTEN_SIZE;
self.remarkLable.text = @"描述:fdsafdsaggjgoirjohgjfdl";
[bgView addSubview:self.createdLable];
[bgView addSubview:self.creatorLable];
[bgView addSubview:self.traceIdLable];
[bgView addSubview:self.remarkLable];
[bgView addSubview:self.typeLable];
[bgView addSubview:self.uuidLable];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -136,7 +136,6 @@
[self.contentView addSubview:self.BzggLabel];
[self.contentView addSubview:self.HeardLabel];
[self.contentView addSubview:self.arrowView];
// [self.contentView addSubview:self.FootLabel];
}
- (void)setTitleStr:(NSString *)str
......@@ -144,7 +143,7 @@
}
}
- (void)awakeFromNib {
// Initialization code
}
......
//
// SelectCompanyViewController.h
// XFFruit
//
// Created by mac on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
#import "MaskCell.h"
typedef void(^ChosePackaging)(NSString *Packaging);
@interface SelectCompanyViewController : ICRBaseViewController
@property (nonatomic,copy)ChosePackaging chosePackaging;
@end
//
// SelectCompanyViewController.m
// XFFruit
//
// Created by mac on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SelectCompanyViewController.h"
#define TableHeight 45
@interface SelectCompanyViewController ()<UITableViewDataSource,UITableViewDelegate>
{
}
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,strong)UITableView *tableView;
@end
@implementation SelectCompanyViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initData];
[self initView];
// Do any additional setup after loading the view.
}
-(void)initData
{
self.dataArr=[NSMutableArray arrayWithObjects:@"筐",@"斤",nil];
self.title = @"选择包装单位";
}
-(void)initView
{
self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0,ScreenSize.width, ScreenSize.height) style:(UITableViewStylePlain)];
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self.view addSubview:self.tableView];
}
#pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"MaskCell";
MaskCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[MaskCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID totalWidth:ScreenSize.width totalHeight:TableHeight];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.textAlignment = UITextAlignmentCenter;
cell.textLabel.text=self.dataArr[indexPath.row];
cell.Commitbtn.hidden = YES;
}
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 40;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *ChosePackaging = self.dataArr[indexPath.row];
//block 回调
self.chosePackaging(ChosePackaging);
[self PopViewControllerAnimated:YES];
}
- (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
......@@ -12,7 +12,6 @@
#import "StartTimeView.h"
#import "ChosePersonViewController.h"
#import "ChooseProductViewController.h"
#import "SelectCompanyViewController.h"
#import "ChooseProductUnitViewController.h"
#import "GXFSearchVendorViewController.h"
#import "GXFProductUnit.h"
......@@ -235,11 +234,7 @@ typedef enum : NSUInteger {
return _dataArr.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
// if (indexPath.row == 0){
// return TableHeight*2;
// }else{
return TableHeight;
// }
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"cellID";
......
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