Commit 7a5beac0 authored by 管鹏飞's avatar 管鹏飞

no message

parent 2bf26c46
...@@ -212,6 +212,7 @@ ...@@ -212,6 +212,7 @@
72F9D48B1BA8582100795A00 /* NoticeBoltView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D48A1BA8582100795A00 /* NoticeBoltView.m */; }; 72F9D48B1BA8582100795A00 /* NoticeBoltView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D48A1BA8582100795A00 /* NoticeBoltView.m */; };
871F9F047CDDAC523E4358DC /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86D33EC280C440156ED1B976 /* libPods.a */; }; 871F9F047CDDAC523E4358DC /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86D33EC280C440156ED1B976 /* libPods.a */; };
ABFA26061C87D38800274481 /* JavenImages.m in Sources */ = {isa = PBXBuildFile; fileRef = ABFA26051C87D38800274481 /* JavenImages.m */; }; ABFA26061C87D38800274481 /* JavenImages.m in Sources */ = {isa = PBXBuildFile; fileRef = ABFA26051C87D38800274481 /* JavenImages.m */; };
ABFA260C1C8832DF00274481 /* MarketSurveyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ABFA260B1C8832DF00274481 /* MarketSurveyViewController.m */; };
C10214CD1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; }; C10214CD1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; };
C10214CE1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; }; C10214CE1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; };
C10214D21AD904F30024637E /* ICRPatrolPlanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214D11AD904F30024637E /* ICRPatrolPlanViewController.m */; }; C10214D21AD904F30024637E /* ICRPatrolPlanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214D11AD904F30024637E /* ICRPatrolPlanViewController.m */; };
...@@ -874,6 +875,8 @@ ...@@ -874,6 +875,8 @@
86D33EC280C440156ED1B976 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 86D33EC280C440156ED1B976 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
ABFA26041C87D38800274481 /* JavenImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenImages.h; sourceTree = "<group>"; }; ABFA26041C87D38800274481 /* JavenImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenImages.h; sourceTree = "<group>"; };
ABFA26051C87D38800274481 /* JavenImages.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenImages.m; sourceTree = "<group>"; }; ABFA26051C87D38800274481 /* JavenImages.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenImages.m; sourceTree = "<group>"; };
ABFA260A1C8832DF00274481 /* MarketSurveyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarketSurveyViewController.h; sourceTree = "<group>"; };
ABFA260B1C8832DF00274481 /* MarketSurveyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MarketSurveyViewController.m; sourceTree = "<group>"; };
C10214CB1AD8FE200024637E /* ICRStoreDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRStoreDetailViewController.h; sourceTree = "<group>"; }; C10214CB1AD8FE200024637E /* ICRStoreDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRStoreDetailViewController.h; sourceTree = "<group>"; };
C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRStoreDetailViewController.m; sourceTree = "<group>"; }; C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRStoreDetailViewController.m; sourceTree = "<group>"; };
C10214D01AD904F30024637E /* ICRPatrolPlanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRPatrolPlanViewController.h; sourceTree = "<group>"; }; C10214D01AD904F30024637E /* ICRPatrolPlanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRPatrolPlanViewController.h; sourceTree = "<group>"; };
...@@ -1442,6 +1445,8 @@ ...@@ -1442,6 +1445,8 @@
359788641C868EB8009205AA /* XFPhoto.m */, 359788641C868EB8009205AA /* XFPhoto.m */,
ABFA26041C87D38800274481 /* JavenImages.h */, ABFA26041C87D38800274481 /* JavenImages.h */,
ABFA26051C87D38800274481 /* JavenImages.m */, ABFA26051C87D38800274481 /* JavenImages.m */,
ABFA260A1C8832DF00274481 /* MarketSurveyViewController.h */,
ABFA260B1C8832DF00274481 /* MarketSurveyViewController.m */,
); );
path = FeedBack; path = FeedBack;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3072,6 +3077,7 @@ ...@@ -3072,6 +3077,7 @@
C15918491AC062460013B391 /* IBTObject.m in Sources */, C15918491AC062460013B391 /* IBTObject.m in Sources */,
35CF339B1B96E41F001211EF /* GXFVendorViewController.m in Sources */, 35CF339B1B96E41F001211EF /* GXFVendorViewController.m in Sources */,
72B3C0CA1B9D3C7300025D81 /* TransportPurductCell.m in Sources */, 72B3C0CA1B9D3C7300025D81 /* TransportPurductCell.m in Sources */,
ABFA260C1C8832DF00274481 /* MarketSurveyViewController.m in Sources */,
C142D2B01AC3A155000109A7 /* UIColor+Helper.m in Sources */, C142D2B01AC3A155000109A7 /* UIColor+Helper.m in Sources */,
72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */, 72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */,
C142D2AC1AC3A155000109A7 /* NSNull+OVNatural.m in Sources */, C142D2AC1AC3A155000109A7 /* NSNull+OVNatural.m in Sources */,
......
//
// MarketSurveyViewController.h
// XFFruit
//
// Created by Jonathan on 16/3/3.
// Copyright © 2016年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface MarketSurveyViewController : ICRBaseViewController
@end
This diff is collapsed.
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
@property (nonatomic,strong)Survey *survey; @property (nonatomic,strong)Survey *survey;
@property (nonatomic,strong)NSString *surveyUuid; @property (nonatomic,strong)NSString *surveyUuid;
@property (nonatomic, strong) NSArray *imgsFile; @property (nonatomic, strong) NSArray *imgsFile;
@property (nonatomic, strong) Survey *aSurvey;
- (instancetype)initWithImgName:(NSString *)imgName; - (instancetype)initWithImgName:(NSString *)imgName;
@end @end
...@@ -352,11 +352,15 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){ ...@@ -352,11 +352,15 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
} }
} }
#pragma mark btn action #pragma mark btn action
- (void)photosDisplay { - (void)photosDisplay {
HGPhWViewController *ghphVC = [[HGPhWViewController alloc]init]; HGPhWViewController *ghphVC = [[HGPhWViewController alloc]init];
[self PushViewController:ghphVC animated:YES]; [self PushViewController:ghphVC animated:YES];
} }
#pragma mark - ZYQAssetPickerController Delegate #pragma mark - ZYQAssetPickerController Delegate
-(void)assetPickerController:(ZYQAssetPickerController *)picker didFinishPickingAssets:(NSArray *)assets{ -(void)assetPickerController:(ZYQAssetPickerController *)picker didFinishPickingAssets:(NSArray *)assets{
...@@ -374,8 +378,6 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){ ...@@ -374,8 +378,6 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
[[JavenImages shareInstance] insertImages:self.imgesMuArr]; [[JavenImages shareInstance] insertImages:self.imgesMuArr];
// [[HGPhWViewController shareInstance] addPhotosWithArrayImgs:_imgesMuArr];
[self pushToHGphVC]; [self pushToHGphVC];
...@@ -392,6 +394,7 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){ ...@@ -392,6 +394,7 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
.size.width = BOTTOM_BTN_WIDTH, .size.width = BOTTOM_BTN_WIDTH,
.size.height = BTN_HEIGHT .size.height = BTN_HEIGHT
}; };
[btnBack addTarget:self [btnBack addTarget:self
action:@selector(commitFeedback) action:@selector(commitFeedback)
forControlEvents:UIControlEventTouchUpInside]; forControlEvents:UIControlEventTouchUpInside];
...@@ -412,11 +415,18 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){ ...@@ -412,11 +415,18 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
#pragma mark - 接口调用:3.1 新增行情反馈 #pragma mark - 接口调用:3.1 新增行情反馈
- (void)saveSurveyResult{ - (void)saveSurveyResult{
void(^succ)(id) = ^(id data) {
[IBTLoadingView showProgressLabel:@"正在加载..."];
NSDictionary *paramDict = @{@"result":[self getSurveyResult],@"attachments":[self getAttachmentArray]};
[[ICRHTTPController sharedController] surveySaveResultWithDict:paramDict surveyUuid:_surveyUuid success:^(id succ) {
[IBTLoadingView hideHUDWithText:nil]; [IBTLoadingView hideHUDWithText:nil];
if (data) {
NSInteger success = [data[@"success"] integerValue]; if (succ) {
NSString *message = data[@"message"] ; NSInteger success = [succ[@"success"] integerValue];
NSString *message = succ[@"message"] ;
if (success == 1) { if (success == 1) {
// [self backSurvey]; // [self backSurvey];
}else{ }else{
...@@ -425,26 +435,26 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){ ...@@ -425,26 +435,26 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
}else{ }else{
[IBTLoadingView showTips:@"返回异常"]; [IBTLoadingView showTips:@"返回异常"];
} }
};
void(^fail)(id) = ^(id data) { } failure:^(id fail) {
[IBTLoadingView hideHUDWithText:nil]; [IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTips:data]; [IBTLoadingView showTips:fail];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
NSDictionary *paramDict = @{@"result":[self getSurveyResult],@"attachments":[self getAttachmentArray]}; }];
[[ICRHTTPController sharedController]surveySaveResultWithDict:paramDict surveyUuid:_surveyUuid success:succ failure:fail];
} }
- (NSArray *)getAttachmentArray { - (NSArray *)getAttachmentArray {
NSMutableArray *attachArr = [NSMutableArray array]; NSMutableArray *attachArr = [NSMutableArray array];
NSMutableArray *resultMuArr = [NSMutableArray array]; NSMutableArray *resultMuArr = [NSMutableArray array];
NSMutableArray *arrImgsData = [[XFDB sharedInstance]fetchAllPhotosDataFromLocal]; //NSMutableArray *arrImgsData = [[XFDB sharedInstance]fetchAllPhotosDataFromLocal];
if (arrImgsData.count == 0) { if ([JavenImages shareInstance].imageArr.count == 0) {
// return attachArr; // return attachArr;
} else { } else {
for (int count = 0; count < arrImgsData.count; count ++) { for (int count = 0; count < [JavenImages shareInstance].imageArr.count; count ++) {
NSData *data = arrImgsData[count]; UIImage *image = [JavenImages shareInstance].imageArr[count];
NSData *data = UIImageJPEGRepresentation(image, 1);
NSString *fileName = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]; NSString *fileName = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
NSMutableDictionary *phontoMuDict = [NSMutableDictionary dictionaryWithObjects:@[@"",data ] forKeys:@[@"fileName",@"content"]]; NSMutableDictionary *phontoMuDict = [NSMutableDictionary dictionaryWithObjects:@[@"",data ] forKeys:@[@"fileName",@"content"]];
[attachArr addObject:phontoMuDict]; [attachArr addObject:phontoMuDict];
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#import "GXFListProcessViewController.h" #import "GXFListProcessViewController.h"
#import "GXFFunctionDB.h" #import "GXFFunctionDB.h"
#import "WriteFeedbackViewController.h" #import "WriteFeedbackViewController.h"
#import "MarketSurveyViewController.h"
#define ICRFUNCTION_IMG_TOP_PADDING (25) #define ICRFUNCTION_IMG_TOP_PADDING (25)
#define ICRFUNCTION_IMG_WIDTH (65) #define ICRFUNCTION_IMG_WIDTH (65)
#define ICRFUNCTION_LABEL_HEIGHT (15) #define ICRFUNCTION_LABEL_HEIGHT (15)
...@@ -233,7 +234,7 @@ static NSString *collectionCellID = @"collectionCell"; ...@@ -233,7 +234,7 @@ static NSString *collectionCellID = @"collectionCell";
[self PushViewController:svc animated:YES]; [self PushViewController:svc animated:YES];
} }
break; break;
case kFunctionSeeSurvey://查看行情 case kFunctionSeeSurvey://查看行情调研
{ {
SurveyViewController *svc = [[SurveyViewController alloc] init]; SurveyViewController *svc = [[SurveyViewController alloc] init];
svc.title = [IBTCommon localizableString:@"Survey"]; svc.title = [IBTCommon localizableString:@"Survey"];
...@@ -244,10 +245,12 @@ static NSString *collectionCellID = @"collectionCell"; ...@@ -244,10 +245,12 @@ static NSString *collectionCellID = @"collectionCell";
case kFunctionFeedBackSurvey: //填写行情反馈3 case kFunctionFeedBackSurvey: //填写行情反馈3
{ {
WriteFeedbackViewController *svc = [[WriteFeedbackViewController alloc] init]; MarketSurveyViewController *marketSurveyVC = [[MarketSurveyViewController alloc] init];
// svc.title = [IBTCommon localizableString:@"Survey"]; marketSurveyVC.title = @"调研中";
// svc.navigationItem.hidesBackButton = YES;
[self PushViewController:svc animated:YES]; //WriteFeedbackViewController *svc = [[WriteFeedbackViewController alloc] init];
[self PushViewController:marketSurveyVC animated:YES];
} }
break; break;
case kFunctionNewPurchaseNotice://新建采购通知单 case kFunctionNewPurchaseNotice://新建采购通知单
......
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