Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
万
万科
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
张杰
万科
Commits
7cd30a83
Commit
7cd30a83
authored
Jun 22, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改界面问题
parent
ff09757f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
120 additions
and
66 deletions
+120
-66
project.pbxproj
vanke.xcodeproj/project.pbxproj
+3
-2
ScrollMultipleWebView.m
vanke/3rd/ScrollMultipleWebView.m
+62
-20
Info.plist
vanke/Info.plist
+2
-2
VankeConfig.h
vanke/VankeConfig.h
+4
-4
VankeFloorDetailWebViewController.m
...view_iPhone/templates/VankeFloorDetailWebViewController.m
+36
-21
VankeFloorDetailWebViewController.xib
...ew_iPhone/templates/VankeFloorDetailWebViewController.xib
+1
-0
VankeFloorListBoardCell_iPhone.xml
...e/templates/floor-list/VankeFloorListBoardCell_iPhone.xml
+6
-5
VankeFloorListBoard_iPhone.m
..._iPhone/templates/floor-list/VankeFloorListBoard_iPhone.m
+1
-0
VankeMainBoard_iPhone.m
vanke/view_iPhone/templates/main/VankeMainBoard_iPhone.m
+4
-0
VankeMainBoard_iPhone.xml
vanke/view_iPhone/templates/main/VankeMainBoard_iPhone.xml
+1
-1
ChooseShopViewController.m
...emplates/salesInput/Controller/ChooseShopViewController.m
+0
-11
No files found.
vanke.xcodeproj/project.pbxproj
View file @
7cd30a83
...
...
@@ -1995,13 +1995,14 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
19000E731CC6215000DF8D71
/* salesInput */
=
{
19000E731CC6215000DF8D71
/* salesInput
(销售录入)
*/
=
{
isa
=
PBXGroup
;
children
=
(
19000E741CC6215000DF8D71
/* Controller */
,
19000E7B1CC6215000DF8D71
/* Model */
,
19000E7C1CC6215000DF8D71
/* View */
,
);
name
=
"salesInput(销售录入)"
;
path
=
salesInput
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2843,7 +2844,7 @@
C1D58B3D1BB1BC9200D297FE
/* templates */
=
{
isa
=
PBXGroup
;
children
=
(
19000E731CC6215000DF8D71
/* salesInput */
,
19000E731CC6215000DF8D71
/* salesInput
(销售录入)
*/
,
C1A069FB1BE1046B0082006F
/* affairs */
,
C18A95231C01E7B100429BF7
/* announcement */
,
C19BBBDE1BBE85B300831290
/* common */
,
...
...
vanke/3rd/ScrollMultipleWebView.m
View file @
7cd30a83
...
...
@@ -8,7 +8,7 @@
#import "ScrollMultipleWebView.h"
#import <WebKit/WebKit.h>
#import "MBProgressHUD.h"
@interface
ScrollMultipleWebView
()
<
WKNavigationDelegate
,
UIScrollViewDelegate
>
@property
(
nonatomic
,
strong
)
NSArray
*
arrUrls
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrWebViews
;
...
...
@@ -16,6 +16,10 @@
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
dicFlag
;
@property
(
nonatomic
,
strong
)
NSURLRequest
*
currentReq
;
@property
(
nonatomic
,
strong
)
UIPageControl
*
pageCtrl
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
dicRecords
;
@property
(
nonatomic
,
assign
)
NSInteger
currentIndex
;
...
...
@@ -28,13 +32,14 @@
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
CGFloat
width
=
frame
.
size
.
width
;
CGFloat
height
=
frame
.
size
.
height
;
self
.
arrUrls
=
arrUrls
;
self
.
delegate
=
self
;
self
.
contentSize
=
CGSizeMake
(
arrUrls
.
count
*
frame
.
size
.
width
,
0
);
self
.
contentSize
=
CGSizeMake
(
arrUrls
.
count
*
width
,
0
);
self
.
pagingEnabled
=
YES
;
self
.
showsVerticalScrollIndicator
=
NO
;
CGFloat
width
=
frame
.
size
.
width
;
CGFloat
height
=
frame
.
size
.
height
;
self
.
showsHorizontalScrollIndicator
=
NO
;
for
(
int
i
=
0
;
i
<
arrUrls
.
count
;
i
++
)
{
NSString
*
jScript
;
...
...
@@ -50,14 +55,16 @@
WKWebViewConfiguration
*
wkWebConfig
=
[[
WKWebViewConfiguration
alloc
]
init
];
wkWebConfig
.
userContentController
=
wkUController
;
WKWebView
*
webView
=
[[
WKWebView
alloc
]
initWithFrame
:
CGRectMake
(
i
*
frame
.
size
.
width
,
0
,
frame
.
size
.
width
,
frame
.
size
.
height
)
configuration
:
wkWebConfig
]
;
WKWebView
*
webView
=
[[
WKWebView
alloc
]
initWithFrame
:
CGRectMake
(
i
*
width
,
0
,
width
,
height
)
configuration
:
wkWebConfig
];
webView
.
navigationDelegate
=
self
;
NSURLRequest
*
request
=
[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
arrUrls
[
i
]]];
[
self
.
arrReqs
addObject
:
request
];
[
self
.
arrWebViews
addObject
:
webView
];
if
(
i
==
0
){
[
self
.
dicRecords
setObject
:
@1
forKey
:
request
];
[
webView
loadRequest
:
request
];
self
.
currentIndex
=
i
;
self
.
currentReq
=
request
;
};
[
self
addSubview
:
webView
];
...
...
@@ -85,29 +92,59 @@
}
-
(
void
)
scrollViewDidEndDecelerating
:(
UIScrollView
*
)
scrollView
{
NSInteger
index
=
scrollView
.
contentOffset
.
x
/
SCREEN_WIDTH
;
self
.
pageCtrl
.
currentPage
=
index
;
NSURLRequest
*
req
=
[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
self
.
arrUrls
[
index
]]];
WKWebView
*
webView
=
self
.
arrWebViews
[
index
];
self
.
currentReq
=
req
;
[
webView
loadRequest
:
req
];
self
.
currentIndex
=
index
;
if
(
!
[[
self
.
dicRecords
objectForKey
:
req
]
isEqualToNumber
:
@1
])
{
WKWebView
*
webView
=
self
.
arrWebViews
[
index
];
[
self
changeWebView
:
webView
request
:
req
];
}
}
-
(
void
)
updateUrls
:(
NSArray
*
)
arrUrls
{
self
.
arrUrls
=
arrUrls
;
[
self
.
dicRecords
removeAllObjects
];
NSURLRequest
*
req
=
[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
arrUrls
[
self
.
currentIndex
]]];
WKWebView
*
webView
=
self
.
arrWebViews
[
self
.
currentIndex
];
for
(
int
i
=
0
;
i
<
arrUrls
.
count
;
i
++
)
{
NSURLRequest
*
req
=
self
.
arrReqs
[
i
];
if
([
req
isEqual
:
self
.
currentReq
])
{
WKWebView
*
web
=
self
.
arrWebViews
[
i
];
[
web
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
arrUrls
[
i
]]]];
}
}
[
self
changeWebView
:
webView
request
:
req
];
}
-
(
void
)
changeWebView
:(
WKWebView
*
)
webView
request
:(
NSURLRequest
*
)
req
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
webView
.
alpha
=
0
;
}
completion
:^
(
BOOL
finished
)
{
webView
.
hidden
=
YES
;
[
webView
loadRequest
:
req
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
2
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
webView
.
hidden
=
NO
;
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
webView
.
alpha
=
1
;
}];
});
[
self
.
dicRecords
setObject
:
@1
forKey
:
req
];
}];
}
#pragma mark - wkwebview delegate
-
(
void
)
webView
:(
WKWebView
*
)
webView
didStartProvisionalNavigation
:(
WKNavigation
*
)
navigation
{
[
MBProgressHUD
showHUDAddedTo
:
webView
animated
:
YES
];
}
-
(
void
)
webView
:(
WKWebView
*
)
webView
didFinishNavigation
:(
WKNavigation
*
)
navigation
{
[
MBProgressHUD
hideHUDForView
:
webView
animated
:
YES
];
}
#pragma mark - lazyloading
-
(
NSMutableArray
*
)
arrWebViews
{
if
(
!
_arrWebViews
)
{
_arrWebViews
=
[
NSMutableArray
array
];
...
...
@@ -127,10 +164,15 @@
}
return
_dicFlag
;
}
-
(
void
)
webView
:
(
WKWebView
*
)
webView
didFinishNavigation
:
(
WKNavigation
*
)
navigation
{
[
webView
sizeToFit
];
-
(
NSMutableDictionary
*
)
dicRecords
{
if
(
!
_dicRecords
)
{
_dicRecords
=
[
NSMutableDictionary
dictionary
];
}
return
_dicRecords
;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
...
...
vanke/Info.plist
View file @
7cd30a83
...
...
@@ -17,11 +17,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.
3.3
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.2.2
<
/string
>
<
string
>
0
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
...
...
vanke/VankeConfig.h
View file @
7cd30a83
...
...
@@ -22,16 +22,16 @@
#define VANKE_BAIDU_WEATHER_SERVER_URL @"http://api.map.baidu.com/telematics/v3/weather"
// 正式环境
//
#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest" //正式
#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest" //正式
// 测试环境
#define VANKE_SERVER_BASE_URL @"http://218.244.151.129:7580/wanke-server/rest"
//
#define VANKE_SERVER_BASE_URL @"http://218.244.151.129:7580/wanke-server/rest"
//#define VANKE_SERVER_BASE_URL @"http://139.196.39.77:8080/wanke-server/rest"
// 后台多媒体文件基准地址
//
#define VANKE_SERVER_MEDIA_BASE_URL @"http://140.206.62.178:8080" //正式
#define VANKE_SERVER_MEDIA_BASE_URL @"http://192.168.199.198:8080" //川哥环境
#define VANKE_SERVER_MEDIA_BASE_URL @"http://140.206.62.178:8080" //正式
//
#define VANKE_SERVER_MEDIA_BASE_URL @"http://192.168.199.198:8080" //川哥环境
//#define VANKE_SERVER_MEDIA_BASE_URL @"http://218.244.151.129:7580"
...
...
vanke/view_iPhone/templates/VankeFloorDetailWebViewController.m
View file @
7cd30a83
...
...
@@ -41,7 +41,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
title
=
self
.
floorValue
.
project
.
project
Name
;
self
.
title
=
self
.
floorValue
.
project
.
project
Classification
;
self
.
labelProjectName
.
text
=
self
.
floorValue
.
project
.
projectName
;
NSString
*
imgUrl
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
picture
];
[
self
.
imgViewTop
sd_setImageWithURL
:[
NSURL
URLWithString
:
imgUrl
]
placeholderImage
:[
UIImage
imageNamed
:
@"floor-def"
]];
...
...
@@ -49,18 +49,16 @@
btnRightBar
.
tintColor
=
[
UIColor
whiteColor
];
self
.
navigationItem
.
rightBarButtonItem
=
btnRightBar
;
[
self
setUpWebView
];
// Do any additional setup after loading the view from its nib.
}
/** 选择日期 */
-
(
void
)
actionSelectDate
{
UIAlertController
*
alertController
=
[
UIAlertController
alertControllerWithTitle
:
@"
\n\n\n\n\n\n\n\n\n\n\n
"
message
:
nil
preferredStyle
:
UIAlertControllerStyleActionSheet
];
UIDatePicker
*
picker
;
[
alertController
.
view
addSubview
:
self
.
datePicker
];
[
alertController
addAction
:({
UIAlertAction
*
action
=
[
UIAlertAction
actionWithTitle
:
@"确定"
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
action
)
{
...
...
@@ -69,12 +67,20 @@
NSString
*
dateStr
=
[
df
stringFromDate
:
self
.
datePicker
.
date
];
self
.
strSelectDate
=
dateStr
;
self
.
labelDate
.
text
=
dateStr
;
[
self
.
webView
updateUrls
:[
self
getUrlArr
]];
}];
action
;
})];
[
alertController
addAction
:({
UIAlertAction
*
action1
=
[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
nil
];
action1
;
})];
UIPopoverPresentationController
*
popoverController
=
alertController
.
popoverPresentationController
;
popoverController
.
sourceView
=
self
.
view
;
popoverController
.
sourceRect
=
[
self
.
view
bounds
];
...
...
@@ -82,14 +88,13 @@
}
-
(
UIDatePicker
*
)
datePicker
{
if
(
!
_datePicker
)
{
_datePicker
=
[[
UIDatePicker
alloc
]
init
];
_datePicker
.
datePickerMode
=
UIDatePickerModeDate
;
NSDate
*
yesterday
=
[[
NSDate
alloc
]
initWithTimeIntervalSinceNow
:
-
24
*
60
*
60
];
_datePicker
.
maximumDate
=
yesterday
;
_datePicker
.
locale
=
[
NSLocale
localeWithLocaleIdentifier
:
@"zh-Hans"
];
[
_datePicker
setDatePickerMode
:
UIDatePickerModeDate
];
}
if
(
!
_datePicker
)
{
_datePicker
=
[[
UIDatePicker
alloc
]
init
];
_datePicker
.
datePickerMode
=
UIDatePickerModeDate
;
_datePicker
.
maximumDate
=
[
NSDate
date
];
_datePicker
.
locale
=
[
NSLocale
localeWithLocaleIdentifier
:
@"zh-Hans"
];
[
_datePicker
setDatePickerMode
:
UIDatePickerModeDate
];
}
return
_datePicker
;
}
...
...
@@ -98,20 +103,30 @@
self
.
labelDate
.
text
=
self
.
strSelectDate
;
NSArray
*
urls
=
[
self
getUrlArr
];
self
.
webView
=
[[
ScrollMultipleWebView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
190
.
0
+
64
,
SCREEN_WIDTH
,
SCREEN_HEIGHT
-
(
190
+
64
))
webViewUrls
:
urls
];
[
self
.
view
addSubview
:
self
.
webView
];
self
.
webView
=
[[
ScrollMultipleWebView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
190
.
0
+
55
,
SCREEN_WIDTH
,
SCREEN_HEIGHT
-
(
190
+
55
))
webViewUrls
:
urls
];
[
self
.
view
insertSubview
:
self
.
webView
belowSubview
:
self
.
imgViewTop
];
[
self
.
webView
setPageControlBackgroundColor
:
nil
];
}
-
(
NSArray
*
)
getUrlArr
{
NSString
*
formatdischart
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatdischart.thor?projectid=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
];
NSString
*
passengersaleschart
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/passengersaleschart.thor?projectid=%@&passengerflowdate=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
];
NSString
*
flow
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatflowchart.thor?projectEquals=%@&salesDateEquals=%@&dimensionTypeEquals=flow"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
];
NSString
*
sale
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatflowchart.thor?projectEquals=%@&salesDateEquals=%@&dimensionTypeEquals=sale"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
];
return
@[
formatdischart
,
passengersaleschart
,
flow
,
sale
];
Enterpirse
*
ent
=
[[
VankeCommonModel
sharedInstance
]
currentEnt
];
//1客流销售
NSString
*
passengersaleschart
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/passengersaleschart.thor?projectid=%@&passengerflowdate=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
];
//2业态经营
NSString
*
formatdischart
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatdischart.thor?projectid=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
];
//3收缴率
NSString
*
url2
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatratechart.thor?projectid=%@&ratedate=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
];
//业态销售
NSString
*
sale
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatflowchart.thor?projectEquals=%@&salesDateEquals=%@&dimensionTypeEquals=sale&enterprise=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
,
ent
.
uuid
];
//楼层销售
NSString
*
flow
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatflowchart.thor?projectEquals=%@&salesDateEquals=%@&dimensionTypeEquals=flow&enterprise=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
,
ent
.
uuid
];
//客流分布
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@/wanke-web/chart/formatpaschart.thor?projectEquals=%@&passengerFlowDateEquals=%@&enterprise=%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
self
.
floorValue
.
project
.
projectId
,
self
.
strSelectDate
,
ent
.
uuid
];
CLog
(
@"%@"
,
@[
passengersaleschart
,
formatdischart
,
url2
,
sale
,
flow
,
url
]);
return
@[
passengersaleschart
,
formatdischart
,
url2
,
sale
,
flow
,
url
];
}
-
(
void
)
viewDidLayoutSubviews
{
...
...
vanke/view_iPhone/templates/VankeFloorDetailWebViewController.xib
View file @
7cd30a83
...
...
@@ -20,6 +20,7 @@
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"8hJ-MZ-YSk"
>
<rect
key=
"frame"
x=
"0.0"
y=
"64"
width=
"375"
height=
"190"
/>
<color
key=
"backgroundColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"190"
id=
"hcr-zq-dSd"
/>
</constraints>
...
...
vanke/view_iPhone/templates/floor-list/VankeFloorListBoardCell_iPhone.xml
View file @
7cd30a83
...
...
@@ -23,17 +23,18 @@
<label
class=
"unit floor-ctr"
>
元
</label>
</linear>
<linear
orientation=
"h"
class=
"row flow-wrapper"
>
<label
class=
"lbl"
>
客流:
</label>
<label
id=
"lblPassengerFlow"
class=
"value"
></label>
<label
class=
"unit"
>
人
</label>
</linear>
<linear
orientation=
"h"
class=
"row price-wrapper"
>
<label
class=
"lbl"
>
客单价:
</label>
<label
id=
"lblPrice"
class=
"value"
></label>
<label
class=
"unit"
>
元/人
</label>
</linear>
<linear
orientation=
"h"
class=
"row flow-wrapper"
>
<label
class=
"lbl"
>
昨日客流:
</label>
<label
id=
"lblPassengerFlow"
class=
"value"
></label>
<label
class=
"unit"
>
人
</label>
</linear>
</linear>
</linear>
...
...
vanke/view_iPhone/templates/floor-list/VankeFloorListBoard_iPhone.m
View file @
7cd30a83
...
...
@@ -186,6 +186,7 @@ ON_SIGNAL3( VankeFloorListBoardCell_iPhone, mask, signal )
// [self showDetailView:cellValue];
VankeFloorDetailWebViewController
*
detailWebVC
=
[[
VankeFloorDetailWebViewController
alloc
]
initWithNibName
:
@"VankeFloorDetailWebViewController"
bundle
:
nil
FloorValue
:
cellValue
date
:
_salesDate
];
[
self
.
navigationController
pushViewController
:
detailWebVC
animated
:
YES
];
}
...
...
vanke/view_iPhone/templates/main/VankeMainBoard_iPhone.m
View file @
7cd30a83
...
...
@@ -170,6 +170,10 @@ ON_SIGNAL3( VankeServiceSaleCell_iPhone, btnHistoryMask, signal ) {
}];
action
;
})];
[
alertController
addAction
:({
UIAlertAction
*
action1
=
[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
nil
];
action1
;
})];
UIPopoverPresentationController
*
popoverController
=
alertController
.
popoverPresentationController
;
popoverController
.
sourceView
=
self
.
view
;
popoverController
.
sourceRect
=
[
self
.
view
bounds
];
...
...
vanke/view_iPhone/templates/main/VankeMainBoard_iPhone.xml
View file @
7cd30a83
...
...
@@ -63,7 +63,7 @@
#serviceDashBoardView {
width: 100%;
height:
305px
;
height:
50%
;
padding: 5px 5px 0px 5px;
}
</style>
...
...
vanke/view_iPhone/templates/salesInput/Controller/ChooseShopViewController.m
View file @
7cd30a83
...
...
@@ -57,11 +57,9 @@
-
(
void
)
searchBar
:
(
UISearchBar
*
)
searchBar
textDidChange
:
(
NSString
*
)
searchText
{
self
.
searchText
=
searchText
;
NSPredicate
*
pred
=
[
NSPredicate
predicateWithFormat
:
@"name contains [cd] %@ OR code contains [cd] %@"
,
searchText
,
searchText
];
self
.
results
=
[
self
.
arrData
filteredArrayUsingPredicate
:
pred
];
[
self
.
tableView
reloadData
];
NSLog
(
@"df"
);
}
-
(
BOOL
)
searchBarShouldBeginEditing
:
(
UISearchBar
*
)
searchBar
{
...
...
@@ -72,29 +70,22 @@
-
(
void
)
searchBarSearchButtonClicked
:
(
UISearchBar
*
)
searchBar
{
[
self
searchShopName
:
self
.
searchText
];
[
self
.
view
endEditing
:
YES
];
}
-
(
void
)
searchShopName
:
(
NSString
*
)
name
{
NSDictionary
*
param
=
@{
@"codeOrNameLike"
:
name
,
@"projectIdEquals"
:
@""
};
ICRHTTPController
*
httpCtrl
=
[
ICRHTTPController
sharedController
];
[
httpCtrl
getUrl
:
@"rest/shop/"
params
:
param
success
:^
(
id
data
){
NSLog
(
@"d"
);
}
failure
:^
(
id
data
){
}];
}
-
(
void
)
setUpTableView
{
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
searchBar
.
bottom
,
SCREEN_WIDTH
,
SCREEN_HEIGHT
-
self
.
searchBar
.
bottom
-
64
)
style
:
UITableViewStylePlain
];
// self.tableView.backgroundColor = [UIColor greenColor];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
tableView
registerClass
:[
UITableViewCell
class
]
forCellReuseIdentifier
:
kCellId
];
...
...
@@ -106,10 +97,8 @@
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kCellId
forIndexPath
:
indexPath
];
VankeShopModel
*
shop
=
self
.
results
[
indexPath
.
row
];
cell
.
textLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@【%@】"
,
shop
.
name
,
shop
.
code
];
return
cell
;
}
...
...
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