Commit 3e5a97d7 authored by zhu's avatar zhu

no message

parent 97704d9f
......@@ -14,6 +14,9 @@
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 */; };
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 */; };
04B4A3871B9CAAD700D88D68 /* ShopDetail.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B4A3861B9CAAD700D88D68 /* ShopDetail.m */; };
04E721E01BA73CE2008F9158 /* ChooseProductUnitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04E721DF1BA73CE2008F9158 /* ChooseProductUnitViewController.m */; };
04E721E31BA755FD008F9158 /* ProductUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 04E721E21BA755FD008F9158 /* ProductUnit.m */; };
......@@ -469,6 +472,12 @@
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>"; };
0460F66F1BA8B3FC004A073D /* FollowUpRecordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FollowUpRecordViewController.h; sourceTree = "<group>"; };
0460F6701BA8B3FC004A073D /* FollowUpRecordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FollowUpRecordViewController.m; sourceTree = "<group>"; };
0460F6721BA8B7A3004A073D /* NotuceRecordCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotuceRecordCell.h; sourceTree = "<group>"; };
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>"; };
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>"; };
04E721DE1BA73CE2008F9158 /* ChooseProductUnitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseProductUnitViewController.h; sourceTree = "<group>"; };
......@@ -1066,6 +1075,8 @@
04F6E7091B9B08A500550849 /* PurchaseNoticeViewController.m */,
0414FF0D1B94959700C7B00E /* SeePurchaseNoticeViewController.h */,
0414FF0E1B94959700C7B00E /* SeePurchaseNoticeViewController.m */,
0460F66F1BA8B3FC004A073D /* FollowUpRecordViewController.h */,
0460F6701BA8B3FC004A073D /* FollowUpRecordViewController.m */,
);
path = Controllers;
sourceTree = "<group>";
......@@ -1081,6 +1092,8 @@
72F9D47E1BA7E97200795A00 /* NoticeProduct.m */,
72F9D4831BA7FFC400795A00 /* PurchaseNotice.h */,
72F9D4841BA7FFC400795A00 /* PurchaseNotice.m */,
0460F6751BA8BA30004A073D /* NoticeRecord.h */,
0460F6761BA8BA30004A073D /* NoticeRecord.m */,
);
path = Models;
sourceTree = "<group>";
......@@ -1090,6 +1103,8 @@
children = (
0414FF111B94959700C7B00E /* PurchaseNoticeCell.h */,
0414FF121B94959700C7B00E /* PurchaseNoticeCell.m */,
0460F6721BA8B7A3004A073D /* NotuceRecordCell.h */,
0460F6731BA8B7A3004A073D /* NotuceRecordCell.m */,
0414FF131B94959700C7B00E /* SelectCompanyViewController.h */,
0414FF141B94959700C7B00E /* SelectCompanyViewController.m */,
04E721DE1BA73CE2008F9158 /* ChooseProductUnitViewController.h */,
......@@ -2558,6 +2573,7 @@
7217E9E91B72364300FE5C1D /* SurveyResult.m in Sources */,
C10214DB1AD90A3F0024637E /* ICRFunctionBaseView.m in Sources */,
72873CEE1BA280DD007B3387 /* GXFPopCell.m in Sources */,
0460F6741BA8B7A3004A073D /* NotuceRecordCell.m in Sources */,
35B448DF1B9B0A73001209E2 /* ProductBillCell.m in Sources */,
30D7495F1ACE8F4400C63BA1 /* ICRConfigurationViewController.m in Sources */,
724171721B9D30660094DF55 /* ChooseWarehouseViewController.m in Sources */,
......@@ -2726,6 +2742,7 @@
C15295BB1B244C8E00DF60D1 /* ICRQScoreViewController.m in Sources */,
C123A9221B26ED85003C0C36 /* ICRQuestionManager.m in Sources */,
C15918801AC4362D0013B391 /* UIApplication+CheckFirstRun.m in Sources */,
0460F6711BA8B3FC004A073D /* FollowUpRecordViewController.m in Sources */,
C1F696091AB870B400F9F5DD /* main.m in Sources */,
30D9D8811AD3AC5A0086EEE7 /* ICRHelpAndFeedBackViewController.m in Sources */,
35CF33871B956CF7001211EF /* GXFBottomView.m in Sources */,
......@@ -2756,6 +2773,7 @@
FEA2F3091B8459DA00D64735 /* HeaderCell.m in Sources */,
C1E108611ADA8D3800620375 /* ICRAttachment.m in Sources */,
C159187C1AC435DF0013B391 /* IBTAdditionsObserver.m in Sources */,
0460F6771BA8BA30004A073D /* NoticeRecord.m in Sources */,
C18AEA8C1AC9855400A1DB7B /* IBTLoadingView.m in Sources */,
C10C90A11AE5751D00B911CD /* ICRPost.m in Sources */,
0414FF1B1B94959700C7B00E /* ShopDetaileViewController.m in Sources */,
......@@ -3028,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}/**";
......@@ -3066,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}/**";
......@@ -3090,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;
......@@ -3111,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;
......@@ -3134,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}/**";
};
......@@ -3154,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}/**";
};
......
......@@ -298,7 +298,7 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
version:(NSNumber *)version success:(void (^)(id))succ
failure:(void (^)(id))fail;
//8·获取采购通知单跟进记录
- (void)getPurchaseNoticeRecodWithData:(id)data
- (void)getPurchaseNoticeRecodWithData:(NSString *)purchaseUuid
success:(void (^)(id))succ
failure:(void (^)(id))fail;
......
......@@ -190,7 +190,7 @@ static NSString * const ICRHTTPInterface[] = {
[XFFHttp_acceptPurchaseNotice] = @"purchase/notice/accept",
[XFFHttp_finishPurchaseNotice] = @"purchase/notice/finish",
[XFFHttp_getPurchaseNoticeRecod] = @"purchase/trace/get/",
[XFFHttp_getPurchaseNoticeRecod] = @"purchase/trace/get",
//采购单
......@@ -2465,11 +2465,42 @@ acceptTypeJson:YES
}
//8·获取采购通知单跟进记录
- (void)getPurchaseNoticeRecodWithData:(id)data
- (void)getPurchaseNoticeRecodWithData:(NSString *)purchaseUuid
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
if (!purchaseUuid) {
if (fail) {
fail( [[self class] ErrorWithMsg:ERROR_PARAMETER code:0] );
}
return;
}
void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
CLog(@"%@", responseObject);
if (succ) {
succ( responseObject );
}
};
void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
CLog(@"%@", error);
if (fail) {
fail( error );
}
};
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_getPurchaseNoticeRecod] stringByAppendingFormat:@"/%@",purchaseUuid];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"%@",encodeUrlStr);
[self POST:encodeUrlStr
parameters:nil
needToken:NO
acceptTypeJson:YES
success:success
failure:failure];
}
- (void)getProductUnitWithPage_number:(NSUInteger)page_number
......
......@@ -16,4 +16,5 @@
@property (nonatomic,assign)CGRect viewFrame;
@property (nonatomic,assign)BOOL isHiddenEdit;
@property (nonatomic,strong)NSString *twoTitle;
@property (nonatomic,strong)NSString *productName;
@end
......@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import "PurchaseBillProduct.h"
@interface ProductBillCell : UITableViewCell
@property (nonatomic,strong)UIImageView *smallImageView;
@property (nonatomic,strong)UIButton *editBtn;
......@@ -32,5 +33,6 @@
@property (nonatomic,assign)BOOL isShowShipping;//是否发运
- (void)setBillProduct:(PurchaseBillProduct *)billProduct row:(NSInteger)row;
- (void)setNoticeProduct:(PurchaseBillProduct *)billProduct row:(NSInteger)row;
@end
......@@ -137,6 +137,7 @@
[self.contentView addSubview:self.lineLabel];
}
- (void)setBillProduct:(PurchaseBillProduct *)billProduct row:(NSInteger)row
{
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
......
//
// FollowUpRecordViewController.h
// XFFruit
//
// Created by mac on 15/9/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
#import "PurchaseNotice.h"
#import "NoticeRecord.h"
@interface FollowUpRecordViewController : ICRBaseViewController
@property (nonatomic,strong)NoticeRecord *noticeRecord;
@property (nonatomic,strong)PurchaseNotice *purchaseNotice;
@property (nonatomic,strong)NSMutableArray *productArr;
@property (nonatomic,strong)UITableView *tableView;
@end
//
// FollowUpRecordViewController.m
// XFFruit
//
// Created by mac on 15/9/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "FollowUpRecordViewController.h"
#import "NotuceRecordCell.h"
#import "NoticeRecord.h"
#define TableHeight 70
@interface FollowUpRecordViewController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate>
@end
@implementation FollowUpRecordViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self bulidLayout];
[self getDataFromServer];
// Do any additional setup after loading the view.
}
- (void)bulidLayout{
self.productArr=[[NSMutableArray alloc]initWithObjects:@"",@"", nil];
self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height) style:(UITableViewStylePlain)];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.view addSubview:self.tableView];
}
- (void)getDataFromServer{
// __weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
// __strong __typeof(weakSelf)strongSelf = weakSelf;
if (data) {
NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"] ;
if (success == 1) {
NSDictionary *dictData = data[@"data"];
NoticeRecord *noticeRecord = [[NoticeRecord alloc]init];
[noticeRecord setValuesForKeysWithDictionary:dictData];
self.noticeRecord = noticeRecord;
[self.tableView reloadData];
}else{
[IBTLoadingView showTips:message];
}
}else{
[IBTLoadingView showTips:@" 无记录 "];
}
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTips:data];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
[[ICRHTTPController sharedController] getPurchaseNoticeRecodWithData:self.purchaseNotice.billnumber success:succ failure:fail];
}
#pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.productArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
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;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
}
- (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
......@@ -8,6 +8,7 @@
#import "ICRBaseViewController.h"
#import "PurchaseNotice.h"
@interface NewPurchaseNoticeViewController : ICRBaseViewController
@property (nonatomic,strong)PurchaseNotice *purchaseNotice;
@end
......@@ -164,24 +164,22 @@ 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];
// NSArray *ary=[NSArray arrayWithObjects: nil];
CGFloat gipWidth = (ScreenSize.width-(((RightWidth+70)+(LeftWidth+35))+(35+70)))/3;
CGFloat gipWidth = (ScreenSize.width-LeftWidth-RightWidth)/3;
for (int i=0; i< ary.count;i++ ) {
UILabel *lable=[[UILabel alloc]init];
if (i==0) {
lable.frame=CGRectMake(LeftWidth, 0, 35,TableHeight);
lable.frame=CGRectMake(LeftWidth, 0, gipWidth,TableHeight);
}
if (i==1) {
lable.frame=CGRectMake(LeftWidth+35+gipWidth, 0, 35,TableHeight);
lable.frame=CGRectMake(LeftWidth+gipWidth+1, 0, gipWidth,TableHeight);
}
if (i==2) {
lable.frame=CGRectMake(LeftWidth+35+gipWidth+35+gipWidth, 0, 70,TableHeight);
}
if (i==3) {
lable.frame=CGRectMake(ScreenSize.width-RightWidth-70, 0, 70,TableHeight);
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;
......
......@@ -11,11 +11,20 @@
#import "PurchaseBillProduct.h"
#import "NewPurchaseViewController.h"
#import "NoticeProduct.h"
#import "PurchaseNoticeCell.h"
#import "SurveyCell.h"
#import "HPGrowingTextView.h"
#import "NoticeProductViewController.h"
#import "FollowUpRecordViewController.h"
#define BottomHeight 50
#define LeftMargin 15
#define LeftWidth 100
#define leftWidth 40
#define LeftHeight 30
#define TopMargin 15
#define TableHeight 46
#define RightWidth 30
#define TitleSize 15
typedef enum : NSUInteger {
EndTag = 3500,//结束
......@@ -24,7 +33,7 @@ typedef enum : NSUInteger {
} BtnTag;
@interface SeePurchaseNoticeViewController ()
@interface SeePurchaseNoticeViewController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate>
{
UIScrollView *_scrollView;
......@@ -34,6 +43,15 @@ typedef enum : NSUInteger {
NSArray *_leftArr;
UIButton *_endBtn;
UIButton *_rejectBtn;
UITableView *mingXiTableView;
NSMutableArray *_shopeArr;
NSIndexPath *selectedCellIndexPath;
UITextField *_titleField;
UILabel *_productLabel;
UILabel *_personLabel;
NSString *title;
HPGrowingTextView *_noteTextView;
NSMutableArray *selectCellAry;
}
@property (nonatomic,strong)UILabel *billNumberLabel;
@property (nonatomic,strong)UILabel *titleLabel;
......@@ -42,6 +60,9 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)UILabel *stateLabel;
@property (nonatomic,strong)UILabel *countLabel;
@property (nonatomic,strong)UILabel *noteLabel;
@property (nonatomic,strong)UILabel *HeardLabel;
@property (nonatomic,strong)UILabel *FootLabel;
@property (nonatomic,strong)UIButton *addDetailedButton;
@end
@implementation SeePurchaseNoticeViewController
......@@ -64,14 +85,8 @@ typedef enum : NSUInteger {
NSDictionary *dictData = data[@"data"];
PurchaseNotice *purchaseNotice = [[PurchaseNotice alloc]init];
[purchaseNotice setValuesForKeysWithDictionary:dictData];
NSMutableArray *productArr = [NSMutableArray new];
for (NSDictionary *productDict in dictData[@"products"]) {
NoticeProduct *noticeProduct = [NoticeProduct new];
[noticeProduct setValuesForKeysWithDictionary:productDict];
[productArr addObject:noticeProduct];
}
purchaseNotice.products = productArr;
strongSelf.purchaseNotice = purchaseNotice;
self.purchaseNotice = purchaseNotice;
[strongSelf fetchtNoticeDetail];
}else{
[IBTLoadingView showTips:message];
......@@ -106,8 +121,15 @@ typedef enum : NSUInteger {
self.countLabel.text = [NSString stringWithFormat:@"%@",@"222"];
self.noteLabel.text = [IBTCommon checkString:self.purchaseNotice.remark];
// [_transView refreshTranProduct:self.transport.pdtDetails];
// [_transView refreshCost:self.transport.accountDetails];
NSMutableArray *productArr = [NSMutableArray array];
for (NSDictionary *billDict in self.purchaseNotice.products) {
NoticeProduct *billProbuct = [NoticeProduct new];
[billProbuct setValuesForKeysWithDictionary:billDict];
[productArr addObject:billProbuct];
}
_shopeArr=productArr;
[mingXiTableView reloadData];
[self setNoteHeight];
}
......@@ -118,11 +140,12 @@ typedef enum : NSUInteger {
_scrollView.showsHorizontalScrollIndicator = NO;
_scrollView.showsVerticalScrollIndicator = NO;
_scrollView.backgroundColor = XXFBgColor;
[self.view addSubview:_scrollView];
[self createBtn];
// [self createBottomView];商品明细
[self createPurchaseView];
[self createBottomView];
[self createMingXiTableView];//自定义
}
......@@ -252,7 +275,63 @@ typedef enum : NSUInteger {
[[ICRHTTPController sharedController] finishPurchaseNoticeWithUuid:self.purchaseNotice.uuid version:self.purchaseNotice.version success:succ failure:fail];
}
}
- (void)createMingXiTableView
{
_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.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++ ) {
UILabel *lable=[[UILabel alloc]init];
if (i==0) {
lable.frame=CGRectMake(leftWidth, 0, gipWidth,TableHeight);
}
if (i==1) {
lable.frame=CGRectMake(leftWidth+gipWidth+1, 0, gipWidth,TableHeight);
}
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;
[footView2 addSubview:lable];
}
UIView *footView3 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)];
footView3.backgroundColor=[UIColor clearColor];
self.addDetailedButton=[UIButton buttonWithType: UIButtonTypeCustom];
[self.addDetailedButton setFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)];
[self.addDetailedButton setTitle:@">>查看跟进记录" forState:UIControlStateNormal];
self.addDetailedButton.titleLabel.font = GXF_FIFTEENTEN_SIZE;
[self.addDetailedButton addTarget:self action:@selector(addShopeDetailed) forControlEvents:UIControlEventTouchUpInside];
[self.addDetailedButton setTitleColor:GXF_PLACEHOLDER_COLOR forState:UIControlStateNormal];
self.FootLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, footView3.size.height-1, footView3.size.width-2*LeftMargin, 1))];
self.FootLabel.backgroundColor = HexColor(@"e5e5e5");
self.FootLabel.font = FontSize(TitleSize);
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;
[self.view addSubview:mingXiTableView];
}
- (void)createBottomView{
_bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + TopMargin, ScreenSize.width, 200)];
_bottomView.backgroundColor = [UIColor whiteColor];
......@@ -334,6 +413,163 @@ typedef enum : NSUInteger {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
if ([tableView isEqual:mingXiTableView])
{
return 1;
}
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if ([tableView isEqual:mingXiTableView])
{
return _shopeArr.count;
}
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if ([tableView isEqual:mingXiTableView])
{
static NSString *CellID = @"CellID";
PurchaseNoticeCell *Cell = [tableView dequeueReusableCellWithIdentifier:CellID];
if (Cell == nil) {
Cell = [[PurchaseNoticeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID];
Cell.isButtonhidden=YES;
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
Cell.selectionStyle = UITableViewCellSelectionStyleNone;
// Cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;向左箭头
// [self showShopDetail:Cell indexPath:indexPath];
}
[self showShopDetail:Cell indexPath:indexPath];
if (Cell.isSelected==YES) {
Cell.arrowView.image = [UIImage imageNamed:@"arrowdown"];
Cell.button.hidden=YES;
Cell.backgroundColor=XXFBgColor;
Cell.subSview.hidden=NO;
}else
{
Cell.arrowView.image = [UIImage imageNamed:@"arrowright"];
Cell.backgroundColor=[UIColor whiteColor];
Cell.subSview.hidden=YES;
}
Cell.button.hidden=YES;
Cell.button.tag=indexPath.row;
[Cell.button addTarget:self action:@selector(didtoucher:) forControlEvents:UIControlEventTouchUpInside];
return Cell;
}
return nil;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if ([tableView isEqual:mingXiTableView])
{
if ([self comperIndexpath:indexPath]) {
return TableHeight*3;
}else
{
return TableHeight;
}
}
return TableHeight;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if ([tableView isEqual:mingXiTableView])
{
PurchaseNoticeCell *Cell=(PurchaseNoticeCell*)[mingXiTableView cellForRowAtIndexPath:indexPath ];
if (Cell.isSelected==NO) {
Cell.isSelected=YES;
[selectCellAry addObject:indexPath];
}else{
Cell.isSelected=NO;
[selectCellAry removeObject:indexPath];
}
selectedCellIndexPath = indexPath;
[mingXiTableView reloadData];
}
}
-(BOOL)comperIndexpath:(NSIndexPath *)indexPath
{
for (NSIndexPath *path in selectCellAry) {
if (path.row == indexPath.row) {
return YES;
}
}
return NO;
}
//查看跟进记录
-(void)addShopeDetailed
{
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
{
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.foundationQuantity.text=[noticeProduct.quantity stringValue];//基础数量
Cell.remark.text=noticeProduct.remark;//备注
}
//编辑
- (void)didtoucher:(UIButton*)button
{
NoticeProductViewController *nvc = [NoticeProductViewController new];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:button.tag];
NoticeProduct *shopDetail=[_shopeArr objectAtIndex:button.tag];
if (indexPath) {
nvc.navTitle = @"编辑费用";
nvc.indexPath = indexPath;
nvc.noticeProduct = shopDetail;
}
nvc.choseNoticeProduct = ^(NoticeProduct *fee,NSIndexPath *indexPath){
if (fee) {
[_shopeArr replaceObjectAtIndex:indexPath.row withObject:fee];
[mingXiTableView reloadData];
}
};
nvc.deleteNoticeProduct = ^(NoticeProduct *fee,NSIndexPath *indexPath){
if (fee) {
[_shopeArr removeObjectAtIndex:indexPath.row];
[mingXiTableView reloadData];
}
};
[self PushViewController:nvc animated:YES];
}
/*
#pragma mark - Navigation
......
//
// NoticeRecord.h
// XFFruit
//
// Created by mac on 15/9/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface NoticeRecord : IBTModel
@property (nonatomic,strong)NSString *uuid;//唯一标识
@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 *remark;//日志描述信息
@end
//
// NoticeRecord.m
// XFFruit
//
// Created by mac on 15/9/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "NoticeRecord.h"
@implementation NoticeRecord
@end
//
// NotuceRecordCell.h
// XFFruit
//
// Created by mac on 15/9/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NotuceRecordCell : UITableViewCell
@property (nonatomic,strong)UILabel *uuidLable;//唯一标识
@property (nonatomic,strong)UILabel *traceIdLable;//采购通知单uuid
@property (nonatomic,strong)UILabel *typeLable;//业务类型
@property (nonatomic,strong)UILabel *creatorLable;//业务人
@property (nonatomic,strong)UILabel *createdLable;//业务时间
@property (nonatomic,strong)UILabel *remarkLable;//日志描述信息
@end
//
// NotuceRecordCell.m
// XFFruit
//
// Created by mac on 15/9/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "NotuceRecordCell.h"
@implementation NotuceRecordCell
- (void)awakeFromNib {
// Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
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);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -19,6 +19,7 @@
@property (nonatomic,strong)UIView *subSview;
@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;//包装单位
......
......@@ -41,7 +41,7 @@
}
- (void)bulidLayout
{
CGFloat gipWidth = (ScreenSize.width-4*TableWidth-(LeftMargin+20)-RightWidth)/3;
CGFloat gipWidth = (ScreenSize.width-(LeftMargin+20)-RightWidth-2)/3;
self.HeardLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin * 2, 1))];
self.HeardLabel.backgroundColor = HexColor(@"e5e5e5");
self.HeardLabel.font = FontSize(TitleSize);
......@@ -59,31 +59,28 @@
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.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(self.DjLabel.frame.origin.x+self.DjLabel.size.width+gipWidth, 0, TableWidth, TableHeight)];
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(self.BzggLabel.frame.origin.x+self.BzggLabel.size.width+gipWidth, 0, TableWidth, TableHeight)];
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.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++) {
......@@ -128,6 +125,9 @@
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];
......
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