Commit 51ad6a36 authored by Sandy's avatar Sandy

限制行情反馈价格输入框

parent 9c6ac187
......@@ -3571,8 +3571,8 @@
baseConfigurationReference = 7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fanfan Cui (7S27LB84E2)";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
COPYING_PRESERVES_HFS_DATA = NO;
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
......
......@@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.2</string>
<string>1.2.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.2</string>
<string>1.2.3</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
......
......@@ -23,14 +23,14 @@
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
//********阿里云内部测试环境********
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
//#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
//********现场测试环境********
//#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//********现场正式环境*********
// #define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
#define HTTP_REST_REPORT_BASE_URL @"http://122.224.171.126:7380"
// HTTP
......
......@@ -99,15 +99,15 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
failure:fail];
#ifdef DEBUG
self.surveyResult = [[SurveyResult alloc]init];
self.surveyResult.unit = @"南汇8424西瓜调研情况";
self.surveyResult.place = @"上海徐汇";
self.surveyResult.price = @"26";
self.surveyResult.capacity = @"250";
self.surveyResult.quality = @"优质";
self.surveyResult.userName = @"张三";
self.surveyResult.feedbackTime = @"2015-04-05 12:04:06";
self.surveyResult.reMark = @"今天工作人员效率很高";
// self.surveyResult = [[SurveyResult alloc]init];
// self.surveyResult.unit = @"南汇8424西瓜调研情况";
// self.surveyResult.place = @"上海徐汇iOS";
// self.surveyResult.price = @"26";
// self.surveyResult.capacity = @"250";
// self.surveyResult.quality = @"优质";
// self.surveyResult.userName = @"张三";
// self.surveyResult.feedbackTime = @"2015-04-05 12:04:06";
// self.surveyResult.reMark = @"今天工作人员效率很高";
#endif
......@@ -405,8 +405,13 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
}
- (void)commitFeedback {
[self saveSurveyResult];
NSString *priceStr = [self getTextFieldTextWithRow:kfeedbackCellPrice];
if ([self isPureFloat:priceStr] || [self isPureInt:priceStr]) {
[self saveSurveyResult];
}else{
[IBTLoadingView showTips:@"请输入正确的价格"];
}
}
- (void)didReceiveMemoryWarning {
......@@ -431,6 +436,7 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
NSString *message = succ[@"message"] ;
if (success == 1) {
// [self backSurvey];
[self.navigationController popToRootViewControllerAnimated:YES];
}else{
[IBTLoadingView showTips:message];
}
......@@ -470,10 +476,12 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
ICRUserUtil *userU = [ICRUserUtil sharedInstance];
NSString *priceStr = [self getTextFieldTextWithRow:kfeedbackCellPrice];
NSDictionary *dict = @{@"userUuid":userU.userId,
@"userCode":userU.userCode,
@"userName":userU.userName,
@"unit":@"",
// @"unit":@"",
@"price":priceStr,
@"place":[self getTextFieldTextWithRow:kfeedbackCellPlace ],
@"capacity":[self getTextFieldTextWithRow:kfeedbackCellCapacity],
......@@ -482,6 +490,22 @@ typedef NS_ENUM(NSUInteger, feedbackCellInfo){
return dict;
}
//1. 整形判断
- (BOOL)isPureInt:(NSString *)string{
NSScanner* scan = [NSScanner scannerWithString:string];
int val;
return [scan scanInt:&val] && [scan isAtEnd];
}
//2.浮点形判断:
- (BOOL)isPureFloat:(NSString *)string{
NSScanner* scan = [NSScanner scannerWithString:string];
float val;
return [scan scanFloat:&val] && [scan isAtEnd];
}
- (NSString *)getTextFieldTextWithRow: (NSInteger)cellRow {
NSString *textStr = [NSString string];
IBTTableViewCellInfo *cellInfo = [_tableViewInfo getCellAtSection:0 row:cellRow];
......
......@@ -9,6 +9,7 @@
#import "PurchaseDetailViewController.h"
#import "ProductBillViewController.h"
#import "PurchaseBillProduct.h"
#import "BottomPurchaseView.h"
//#import "RejectView.h"
#define BottomHeight 50
#define LeftMargin 15
......@@ -30,11 +31,12 @@ typedef enum : NSUInteger {
{
UIScrollView *_scrollView;
UIView *_purchaseView;
UIView *_bottomView;
ProductBillViewController *_pvc;
//UIView *_bottomView;
//ProductBillViewController *_pvc;
NSArray *_leftArr;
UIButton *_firstBtn;
UIButton *_secondBtn;
BottomPurchaseView *_aBottomView;
}
@property (nonatomic,strong)UILabel *billNumberLabel;
......@@ -78,6 +80,7 @@ typedef enum : NSUInteger {
PurchaseBill *bill = [[PurchaseBill alloc]init];
[bill setValuesForKeysWithDictionary:dictData];
self.bill = bill;
[_aBottomView refreshCost:dictData[@"accountDetails"]];
[strongSelf fetchtPurchaseDetail];
}else{
[IBTLoadingView showTips:message];
......@@ -289,16 +292,20 @@ typedef enum : NSUInteger {
}
- (void)createBottomView{
_bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + TopMargin, ScreenSize.width, 300)];
_bottomView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_bottomView];
// _bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + TopMargin, ScreenSize.width, 300)];
// _bottomView.backgroundColor = [UIColor whiteColor];
// [_scrollView addSubview:_bottomView];
//
// _pvc = [[ProductBillViewController alloc]init];
// [self addChildViewController:_pvc];
//
// _pvc.viewFrame = _bottomView.bounds;
// _pvc.isHiddenEdit = YES;
// [_bottomView addSubview:_pvc.view];
_pvc = [[ProductBillViewController alloc]init];
[self addChildViewController:_pvc];
_pvc.viewFrame = _bottomView.bounds;
_pvc.isHiddenEdit = YES;
[_bottomView addSubview:_pvc.view];
_aBottomView = [[BottomPurchaseView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + TopMargin, ScreenSize.width,300) withHidden:YES];
_aBottomView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_aBottomView];
}
- (void)createPurchaseView{
......@@ -397,8 +404,8 @@ typedef enum : NSUInteger {
[billProbuct setValuesForKeysWithDictionary:billDict];
[productArr addObject:billProbuct];
}
_pvc.productArr = productArr;
[_pvc.tableView reloadData];
_aBottomView.productVC.productArr = productArr;
[_aBottomView.productVC.tableView reloadData];
[self setNoteHeight];
}
......@@ -417,11 +424,11 @@ typedef enum : NSUInteger {
_purchaseView.frame = purchaseFrame;
CGRect bottomFrame = _bottomView.frame;
CGRect bottomFrame = _aBottomView.frame;
bottomFrame.origin.y = CGRectGetMaxY(_purchaseView.frame) + TopMargin;
_bottomView.frame = bottomFrame;
_aBottomView.frame = bottomFrame;
_scrollView.contentSize = CGSizeMake(ScreenSize.width, totalHeight + CGRectGetHeight(_bottomView.frame) + TopMargin*2);
_scrollView.contentSize = CGSizeMake(ScreenSize.width, totalHeight + CGRectGetHeight(_aBottomView.frame) + TopMargin*2);
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
......
......@@ -44,6 +44,7 @@
_imageView.frame = CGRectMake(0, 0, self.frame.size.width - 10*2, self.frame.size.height);
_imageView.center = CGPointMake(self.frame.size.width/2, self.frame.size.height/2);
if ([image hasPrefix:@"http://"]) {
NSURL *url = [NSURL URLWithString:image];
......
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