Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
xffruit
Commits
51ad6a36
Commit
51ad6a36
authored
Mar 12, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制行情反馈价格输入框
parent
9c6ac187
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
34 deletions
+66
-34
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+2
-2
Info.plist
XFFruit/Info.plist
+2
-2
ICRAppMacro.h
XFFruit/Macro/ICRAppMacro.h
+2
-2
WriteFeedbackViewController.m
...it/ViewControllers/FeedBack/WriteFeedbackViewController.m
+36
-12
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+23
-16
SingleScrollView.m
...ntrollers/Survey/Views/GrowingTextView/SingleScrollView.m
+1
-0
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
51ad6a36
...
...
@@ -3571,8 +3571,8 @@
baseConfigurationReference
=
7DDFB1D460448C3B45118195
/* Pods.release.xcconfig */
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper: Fanfan Cui (7S27LB84E2)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
COPYING_PRESERVES_HFS_DATA
=
NO
;
ENABLE_BITCODE
=
NO
;
GCC_PREFIX_HEADER
=
"XFFruit/XFFruit-Prefix.pch"
;
...
...
XFFruit/Info.plist
View file @
51ad6a36
...
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.
2
<
/string
>
<
string
>
1.2.
3
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.2.
2
<
/string
>
<
string
>
1.2.
3
<
/string
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
...
...
XFFruit/Macro/ICRAppMacro.h
View file @
51ad6a36
...
...
@@ -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
...
...
XFFruit/ViewControllers/FeedBack/WriteFeedbackViewController.m
View file @
51ad6a36
...
...
@@ -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
];
...
...
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
51ad6a36
...
...
@@ -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
=
_
b
ottomView
.
frame
;
CGRect
bottomFrame
=
_
aB
ottomView
.
frame
;
bottomFrame
.
origin
.
y
=
CGRectGetMaxY
(
_purchaseView
.
frame
)
+
TopMargin
;
_
b
ottomView
.
frame
=
bottomFrame
;
_
aB
ottomView
.
frame
=
bottomFrame
;
_scrollView
.
contentSize
=
CGSizeMake
(
ScreenSize
.
width
,
totalHeight
+
CGRectGetHeight
(
_
b
ottomView
.
frame
)
+
TopMargin
*
2
);
_scrollView
.
contentSize
=
CGSizeMake
(
ScreenSize
.
width
,
totalHeight
+
CGRectGetHeight
(
_
aB
ottomView
.
frame
)
+
TopMargin
*
2
);
}
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
...
...
XFFruit/ViewControllers/Survey/Views/GrowingTextView/SingleScrollView.m
View file @
51ad6a36
...
...
@@ -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
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment