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
6a162f7b
Commit
6a162f7b
authored
Sep 29, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售录入模块控制
parent
ea4b5f1e
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
702 additions
and
188 deletions
+702
-188
project.pbxproj
vanke.xcodeproj/project.pbxproj
+19
-5
IBTCommon.h
vanke/3rd/IBTUIKit/IBTCommon.h
+4
-0
IBTCommon.m
vanke/3rd/IBTUIKit/IBTCommon.m
+68
-34
IBTWebViewController.m
vanke/3rd/IBTWebViewController/IBTWebViewController.m
+37
-2
YRBorderView.h
vanke/3rd/YRBorderView/YRBorderView.h
+66
-0
YRBorderView.m
vanke/3rd/YRBorderView/YRBorderView.m
+287
-0
LaunchScreen.xib
vanke/Base.lproj/LaunchScreen.xib
+22
-12
Info.plist
vanke/Info.plist
+1
-1
Main.storyboard
vanke/Main.storyboard
+36
-46
VankeProjectSummaryAPI.h
vanke/controller/VankeProjectSummaryAPI.h
+8
-1
AnnouncementDetailViewController.m
...templates/announcement/AnnouncementDetailViewController.m
+8
-0
AnnouncementDetailTableViewCell.h
...ates/announcement/Views/AnnouncementDetailTableViewCell.h
+4
-3
AnnouncementDetailTableViewCell.m
...ates/announcement/Views/AnnouncementDetailTableViewCell.m
+23
-12
VankeServiceDashBoard_iPhone.m
...view_iPhone/templates/main/VankeServiceDashBoard_iPhone.m
+6
-3
HistoryViewController.m
...e/templates/salesInput/Controller/HistoryViewController.m
+18
-15
SalesInPut.storyboard
...one/templates/salesInput/Controller/SalesInPut.storyboard
+4
-4
SalesInputViewController.m
...emplates/salesInput/Controller/SalesInputViewController.m
+20
-10
SaleInputPictureTableViewCell.h
...templates/salesInput/View/SaleInputPictureTableViewCell.h
+1
-0
SalesInputTableViewCell.h
...Phone/templates/salesInput/View/SalesInputTableViewCell.h
+1
-0
SalesInputTableViewCell.m
...Phone/templates/salesInput/View/SalesInputTableViewCell.m
+60
-36
SalesInputTotalVIew.m
...ew_iPhone/templates/salesInput/View/SalesInputTotalVIew.m
+5
-0
Statement.storyboard
vanke/view_iPhone/templates/statements/Statement.storyboard
+4
-4
No files found.
vanke.xcodeproj/project.pbxproj
View file @
6a162f7b
...
...
@@ -101,6 +101,7 @@
8FBE1E181D6ACDA2002584E5
/* SalesInputAuditListModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8FBE1E141D6ACDA2002584E5
/* SalesInputAuditListModel.m */
;
};
8FBE1E191D6ACDA2002584E5
/* SalesInputLines.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8FBE1E171D6ACDA2002584E5
/* SalesInputLines.m */
;
};
8FBE1E1B1D6ADF28002584E5
/* audit.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8FBE1E1A1D6ADF28002584E5
/* audit.png */
;
};
8FC70DA81D7E8F55008DC9BC
/* YRBorderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8FC70DA71D7E8F55008DC9BC
/* YRBorderView.m */
;
};
A0D453625552DAC91D4EB4A7
/* libPods.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C5987243B74E897E93DEC7D3
/* libPods.a */
;
};
C10F161B1BF77CA00065F18C
/* ICRAboutViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C10F16121BF77CA00065F18C
/* ICRAboutViewController.m */
;
};
C10F161C1BF77CA00065F18C
/* ICRConfigurationViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C10F16141BF77CA00065F18C
/* ICRConfigurationViewController.m */
;
};
...
...
@@ -918,7 +919,7 @@
19D76A9E1D2667AB006245D6
/* SaleInputPictureTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
SaleInputPictureTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
19D76A9F1D2667AB006245D6
/* SaleInputPictureCellHeader.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
SaleInputPictureCellHeader.xib
;
sourceTree
=
"<group>"
;
};
19D76AA31D266910006245D6
/* CALayer+Addtions.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"CALayer+Addtions.h"
;
sourceTree
=
"<group>"
;
};
19D76AA41D266910006245D6
/* CALayer+Addtions.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"
CALayer+Addtions.m"
;
sourceTree
=
"<group>"
;
};
19D76AA41D266910006245D6
/* CALayer+Addtions.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
"CALayer+Addtions.m"
;
path
=
"3rd/
CALayer+Addtions.m"
;
sourceTree
=
"<group>"
;
};
710E0C5D8A5E02D32E5C6C2D
/* Pods.release.xcconfig */
=
{
isa
=
PBXFileReference
;
includeInIndex
=
1
;
lastKnownFileType
=
text.xcconfig
;
name
=
Pods.release.xcconfig
;
path
=
"Pods/Target Support Files/Pods/Pods.release.xcconfig"
;
sourceTree
=
"<group>"
;
};
8F0419EB1D6ABEF70062800C
/* SaleInputAuditViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SaleInputAuditViewController.h
;
sourceTree
=
"<group>"
;
};
8F0419EC1D6ABEF70062800C
/* SaleInputAuditViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SaleInputAuditViewController.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -966,6 +967,8 @@
8FBE1E161D6ACDA2002584E5
/* SalesInputLines.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SalesInputLines.h
;
sourceTree
=
"<group>"
;
};
8FBE1E171D6ACDA2002584E5
/* SalesInputLines.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SalesInputLines.m
;
sourceTree
=
"<group>"
;
};
8FBE1E1A1D6ADF28002584E5
/* audit.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
audit.png
;
sourceTree
=
"<group>"
;
};
8FC70DA61D7E8F55008DC9BC
/* YRBorderView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
YRBorderView.h
;
sourceTree
=
"<group>"
;
};
8FC70DA71D7E8F55008DC9BC
/* YRBorderView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
YRBorderView.m
;
sourceTree
=
"<group>"
;
};
C10F16111BF77CA00065F18C
/* ICRAboutViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
ICRAboutViewController.h
;
path
=
view_iPhone/templates/settings/ICRAboutViewController.h
;
sourceTree
=
"<group>"
;
};
C10F16121BF77CA00065F18C
/* ICRAboutViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
ICRAboutViewController.m
;
path
=
view_iPhone/templates/settings/ICRAboutViewController.m
;
sourceTree
=
"<group>"
;
};
C10F16131BF77CA00065F18C
/* ICRConfigurationViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
ICRConfigurationViewController.h
;
path
=
view_iPhone/templates/settings/ICRConfigurationViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2459,15 +2462,24 @@
path
=
TotalSupportField
;
sourceTree
=
"<group>"
;
};
8FC70DA51D7E8F55008DC9BC
/* YRBorderView */
=
{
isa
=
PBXGroup
;
children
=
(
8FC70DA61D7E8F55008DC9BC
/* YRBorderView.h */
,
8FC70DA71D7E8F55008DC9BC
/* YRBorderView.m */
,
);
path
=
YRBorderView
;
sourceTree
=
"<group>"
;
};
C10F17831BF7ACA80065F18C
/* 3rd */
=
{
isa
=
PBXGroup
;
children
=
(
8FC70DA51D7E8F55008DC9BC
/* YRBorderView */
,
19605F931D375A4200C20590
/* BaseViewController.h */
,
19605F941D375A4200C20590
/* BaseViewController.m */
,
19B34CBC1D3A124E0060E272
/* CalculateHelper.h */
,
19B34CBD1D3A124E0060E272
/* CalculateHelper.m */
,
19D76AA31D266910006245D6
/* CALayer+Addtions.h */
,
19D76AA41D266910006245D6
/* CALayer+Addtions.m */
,
19D76A741D265A1B006245D6
/* TZImagePickerController */
,
C18A95421C01F56200429BF7
/* DataBaseController */
,
C10F17841BF7ACA80065F18C
/* General */
,
...
...
@@ -3120,8 +3132,9 @@
C1D58B551BB1BC9200D297FE
/* Info.plist */
,
8F67FB4A1D7D4D5000808DF1
/* Main.storyboard */
,
19605F911D3759D100C20590
/* Statement.storyboard */
,
C1DED2B71BCEC3F70049BB2D
/* LaunchScreen.xib */
,
19B34CC21D3B343D0060E272
/* SalesInPut.storyboard */
,
C1DED2B71BCEC3F70049BB2D
/* LaunchScreen.xib */
,
19D76AA41D266910006245D6
/* CALayer+Addtions.m */
,
C1D58B501BB1BC9200D297FE
/* Images.xcassets */
,
C10F17831BF7ACA80065F18C
/* 3rd */
,
C1D58B3A1BB1BC9200D297FE
/* controller */
,
...
...
@@ -5400,6 +5413,7 @@
C1D599591BB44B2100D297FE
/* Bee_HTTPRequestQueue.m in Sources */
,
1912FCE01CCDE0C4004CF976
/* LoginShopsInstance.m in Sources */
,
C1D598961BB44B2000D297FE
/* UINavigationBar+BeeExtension.m in Sources */
,
8FC70DA81D7E8F55008DC9BC
/* YRBorderView.m in Sources */
,
C1F790AE1C076191001AEBBB
/* VankeStatementRejectModel.m in Sources */
,
C10F182F1BF7ACA80065F18C
/* ICRLoginContentView.m in Sources */
,
C1D5991C1BB44B2100D297FE
/* Bee_System.mm in Sources */
,
...
...
@@ -5767,7 +5781,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.vanke
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
da8de50e-62c2-4312-8dda-7c81fb04858d
"
;
PROVISIONING_PROFILE
=
""
;
TARGETED_DEVICE_FAMILY
=
1
;
VALID_ARCHS
=
"arm64 armv7 armv7s"
;
VERSIONING_SYSTEM
=
""
;
...
...
@@ -5828,7 +5842,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.vanke
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
da8de50e-62c2-4312-8dda-7c81fb04858d
"
;
PROVISIONING_PROFILE
=
""
;
TARGETED_DEVICE_FAMILY
=
1
;
VALID_ARCHS
=
"arm64 armv7 armv7s"
;
VERSIONING_SYSTEM
=
""
;
...
...
vanke/3rd/IBTUIKit/IBTCommon.h
View file @
6a162f7b
...
...
@@ -30,6 +30,10 @@
+
(
NSString
*
)
archivePathForTmpImages
;
+
(
NSString
*
)
archivePathForTmpAnnouncementAttachment
;
+
(
NSString
*
)
saveAnnouncementAttachment
:(
NSData
*
)
data
name
:(
NSString
*
)
name
;
+
(
IBTFileData
*
)
saveImageToLocal
:(
UIImage
*
)
imageToSave
;
...
...
vanke/3rd/IBTUIKit/IBTCommon.m
View file @
6a162f7b
...
...
@@ -96,40 +96,40 @@
}
+
(
NSString
*
)
archivePathForCurrentUser
{
// ICRUserUtil *userUtil = [ICRUserUti
l sharedInstance];
// NSString *userName = [userUtil userName]
;
//
if (!userName.length) return nil;
//
// NSString *orgCode = [userUtil orgCode]
;
//
if (!orgCode.length) {
//
return nil;
//
}
//
//
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
//
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory();
//
//
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
//
if (appName == nil) {
//
appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
//
//
if (appName == nil) appName = @"Cruiser";
//
}
//
//
NSString *result = [basePath stringByAppendingPathComponent:appName];
//
if (result != nil) {
//
result = [result stringByAppendingPathComponent:[NSString stringWithFormat:@"%@_%@", orgCode, userName]];
//
}
//
//
NSFileManager *fileManager = [NSFileManager defaultManager];
//
//
if (![fileManager fileExistsAtPath:result]) {
//
[fileManager createDirectoryAtPath:result
//
withIntermediateDirectories:YES
//
attributes:nil
//
error:nil];
//
}
//
//
return result;
VankeCommonModel
*
userUtil
=
[
VankeCommonMode
l
sharedInstance
];
NSString
*
userName
=
userUtil
.
currentUser
.
name
;
if
(
!
userName
.
length
)
return
nil
;
NSString
*
orgCode
=
userUtil
.
currentUser
.
code
;
if
(
!
orgCode
.
length
)
{
return
nil
;
}
NSArray
*
paths
=
NSSearchPathForDirectoriesInDomains
(
NSApplicationSupportDirectory
,
NSUserDomainMask
,
YES
);
NSString
*
basePath
=
([
paths
count
]
>
0
)
?
[
paths
objectAtIndex
:
0
]
:
NSTemporaryDirectory
();
NSString
*
appName
=
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleDisplayName"
];
if
(
appName
==
nil
)
{
appName
=
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"CFBundleName"
];
if
(
appName
==
nil
)
appName
=
@"Cruiser"
;
}
NSString
*
result
=
[
basePath
stringByAppendingPathComponent
:
appName
];
if
(
result
!=
nil
)
{
result
=
[
result
stringByAppendingPathComponent
:[
NSString
stringWithFormat
:
@"%@_%@"
,
orgCode
,
userName
]];
}
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
(
!
[
fileManager
fileExistsAtPath
:
result
])
{
[
fileManager
createDirectoryAtPath
:
result
withIntermediateDirectories
:
YES
attributes
:
nil
error
:
nil
];
}
return
result
;
return
@""
;
}
...
...
@@ -154,6 +154,40 @@
return
result
;
}
+
(
NSString
*
)
archivePathForTmpAnnouncementAttachment
{
NSString
*
archivePath
=
[[
self
class
]
archivePathForCurrentUser
];
if
(
!
archivePath
.
length
)
{
return
nil
;
}
NSString
*
dirName
=
@"AnnouncementAttachment"
;
NSString
*
result
=
[
archivePath
stringByAppendingPathComponent
:
dirName
];
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
(
!
[
fileManager
fileExistsAtPath
:
result
])
{
[
fileManager
createDirectoryAtPath
:
result
withIntermediateDirectories
:
YES
attributes
:
nil
error
:
nil
];
}
return
result
;
}
+
(
NSString
*
)
saveAnnouncementAttachment
:
(
NSData
*
)
data
name
:
(
NSString
*
)
name
{
NSString
*
path
=
[[
IBTCommon
archivePathForTmpAnnouncementAttachment
]
stringByAppendingPathComponent
:
name
];
NSFileManager
*
fileManager
=
[
NSFileManager
defaultManager
];
if
([
fileManager
fileExistsAtPath
:
path
])
{
return
path
;
}
if
([
data
writeToFile
:
path
atomically
:
YES
])
{
return
path
;
}
else
{
return
nil
;
}
}
+
(
IBTFileData
*
)
saveImageToLocal
:
(
UIImage
*
)
imageToSave
{
NSString
*
imgName
=
[
NSString
stringWithFormat
:
@"ICRIMG-%@.JPG"
,
[[
NSDate
date
]
YMDHMSFormatterString
]];
NSString
*
imgPath
=
[[
IBTCommon
archivePathForTmpImages
]
stringByAppendingPathComponent
:
imgName
];
...
...
vanke/3rd/IBTWebViewController/IBTWebViewController.m
View file @
6a162f7b
...
...
@@ -68,7 +68,6 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
IBT_BGCOLOR
;
if
([
self
respondsToSelector
:
@selector
(
setEdgesForExtendedLayout
:)])
{
...
...
@@ -80,7 +79,13 @@
[
self
initWebView
];
[
self
initProgressView
];
[
self
goToURL
:[
NSURL
URLWithString
:
self
.
m_initUrl
]];
if
([
self
.
m_initUrl
hasSuffix
:
@".txt"
])
{
[
self
goToLocalTextFileURL
:
self
.
m_initUrl
];
}
else
{
[
self
goToURL
:[
NSURL
URLWithString
:
self
.
m_initUrl
]];
}
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
...
...
@@ -313,10 +318,40 @@
[
self
.
m_webView
loadRequest
:[
NSURLRequest
requestWithURL
:
url
]];
}
else
{
// ERROR
}
}
-
(
void
)
goToLocalTextFileURL
:
(
NSString
*
)
url
{
NSString
*
fileName
=
[
url
lastPathComponent
];
NSData
*
data
=
[
NSData
dataWithContentsOfURL
:[
NSURL
URLWithString
:
url
]];
NSString
*
isUNICODE
=
[[
NSString
alloc
]
initWithData
:
data
encoding
:
NSUTF8StringEncoding
];
NSString
*
path
=
[
IBTCommon
saveAnnouncementAttachment
:
data
name
:
fileName
];
//还是ANSI编码
NSString
*
isANSI
=
[[
NSString
alloc
]
initWithData
:
data
encoding
:
-
2147482062
];
if
(
isUNICODE
)
{
NSString
*
retStr
=
[[
NSString
alloc
]
initWithCString
:[
isUNICODE
UTF8String
]
encoding
:
NSUTF8StringEncoding
];
NSData
*
data
=
[
retStr
dataUsingEncoding
:
NSUTF16StringEncoding
];
[
data
writeToFile
:
path
atomically
:
YES
];
}
else
if
(
isANSI
){
NSData
*
data
=
[
isANSI
dataUsingEncoding
:
NSUTF16StringEncoding
];
[
data
writeToFile
:
path
atomically
:
YES
];
}
[
self
goToURL
:[
NSURL
fileURLWithPath
:
path
]];
}
-
(
void
)
goForward
{
[
self
.
m_webView
goForward
];
}
...
...
vanke/3rd/YRBorderView/YRBorderView.h
0 → 100755
View file @
6a162f7b
/*
The MIT License (MIT)
Copyright (c) 2014 YueRuo,王晓宇
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#import <UIKit/UIKit.h>
@interface
YRBorderView
:
UIView
@property
(
assign
,
nonatomic
)
UIEdgeInsets
contentEdgeInsets
;
@property
(
assign
,
nonatomic
)
BOOL
needLineTop
;
@property
(
assign
,
nonatomic
)
BOOL
needLineLeft
;
@property
(
assign
,
nonatomic
)
BOOL
needLineBottom
;
@property
(
assign
,
nonatomic
)
BOOL
needLineRight
;
//line width
@property
(
assign
,
nonatomic
)
CGFloat
lineWidthTop
;
@property
(
assign
,
nonatomic
)
CGFloat
lineWidthLeft
;
@property
(
assign
,
nonatomic
)
CGFloat
lineWidthBottom
;
@property
(
assign
,
nonatomic
)
CGFloat
lineWidthRight
;
//line color
@property
(
retain
,
nonatomic
)
UIColor
*
lineColorTop
;
@property
(
retain
,
nonatomic
)
UIColor
*
lineColorLeft
;
@property
(
retain
,
nonatomic
)
UIColor
*
lineColorBottom
;
@property
(
retain
,
nonatomic
)
UIColor
*
lineColorRight
;
//corner radius
@property
(
assign
,
nonatomic
)
CGFloat
radiusTopLeft
;
@property
(
assign
,
nonatomic
)
CGFloat
radiusTopRight
;
@property
(
assign
,
nonatomic
)
CGFloat
radiusBottomLeft
;
@property
(
assign
,
nonatomic
)
CGFloat
radiusBottomRight
;
//线段样式,0是实线,否则为线段宽度
@property
(
assign
,
nonatomic
)
CGFloat
lineDashTop
;
@property
(
assign
,
nonatomic
)
CGFloat
lineDashLeft
;
@property
(
assign
,
nonatomic
)
CGFloat
lineDashRight
;
@property
(
assign
,
nonatomic
)
CGFloat
lineDashBottom
;
//内部填充颜色
@property
(
retain
,
nonatomic
)
UIColor
*
fillColor
;
//根据自身形状根据边线进行裁剪
@property
(
assign
,
nonatomic
)
BOOL
clipsToBoundsWithBorder
;
-
(
void
)
setNeedLineTop
:(
BOOL
)
needTop
left
:(
BOOL
)
needLeft
bottom
:(
BOOL
)
needBottom
right
:(
BOOL
)
needRight
;
-
(
void
)
setLineWidthTop
:(
CGFloat
)
widthTop
left
:(
CGFloat
)
widthLeft
bottom
:(
CGFloat
)
widthBottom
right
:(
CGFloat
)
widthRight
;
-
(
void
)
setLineColorTop
:(
UIColor
*
)
colorTop
left
:(
UIColor
*
)
colorLeft
bottom
:(
UIColor
*
)
colorBottom
right
:(
UIColor
*
)
colorRight
;
-
(
void
)
setRadiusTopLeft
:(
CGFloat
)
topLeft
topRight
:(
CGFloat
)
topRight
bottomLeft
:(
CGFloat
)
bottomLeft
bottomRight
:(
CGFloat
)
bottomRight
;
-
(
void
)
setLineDashTop
:(
CGFloat
)
top
left
:(
CGFloat
)
left
bottom
:(
CGFloat
)
bottom
right
:(
CGFloat
)
right
;
@end
vanke/3rd/YRBorderView/YRBorderView.m
0 → 100755
View file @
6a162f7b
/*
The MIT License (MIT)
Copyright (c) 2014 YueRuo,王晓宇
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#import "YRBorderView.h"
@interface
YRBorderView
()
@property
(
retain
,
nonatomic
)
UIBezierPath
*
pathForBorder
;
@property
(
assign
,
nonatomic
)
BOOL
needUpdatePathForBorder
;
@end
@implementation
YRBorderView
-
(
id
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
// Initialization code
_lineWidthTop
=
0
.
5
;
_lineWidthLeft
=
0
.
5
;
_lineWidthBottom
=
0
.
5
;
_lineWidthRight
=
0
.
5
;
_needLineTop
=
true
;
_needLineLeft
=
true
;
_needLineBottom
=
true
;
_needLineRight
=
true
;
_needUpdatePathForBorder
=
true
;
[
self
setUserInteractionEnabled
:
false
];
[
self
setBackgroundColor
:[
UIColor
clearColor
]];
}
return
self
;
}
-
(
void
)
dealloc
{
self
.
lineColorBottom
=
nil
;
self
.
lineColorLeft
=
nil
;
self
.
lineColorRight
=
nil
;
self
.
lineColorTop
=
nil
;
self
.
pathForBorder
=
nil
;
#if ! __has_feature(objc_arc)
[
super
dealloc
];
#endif
}
///*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
-
(
void
)
drawRect
:
(
CGRect
)
rect
{
// Drawing code
CGFloat
halfLineWidthTop
=
_lineWidthTop
/
2
;
CGFloat
halfLineWidthLeft
=
_lineWidthLeft
/
2
;
CGFloat
halfLineWidthBottom
=
_lineWidthBottom
/
2
;
CGFloat
halfLineWidthRight
=
_lineWidthRight
/
2
;
CGContextRef
context
=
UIGraphicsGetCurrentContext
();
CGContextClearRect
(
context
,
self
.
bounds
);
CGContextSetFillColorWithColor
(
context
,
self
.
backgroundColor
.
CGColor
);
CGContextFillRect
(
context
,
self
.
bounds
);
//填充背景
if
(
_fillColor
)
{
CGContextSetFillColorWithColor
(
context
,
_fillColor
.
CGColor
);
UIBezierPath
*
bezierPath
=
[
self
bezierPathForBorder
];
[
bezierPath
fill
];
}
CGFloat
startX
=
_contentEdgeInsets
.
left
;
CGFloat
startY
=
_contentEdgeInsets
.
top
;
CGFloat
endX
=
self
.
frame
.
size
.
width
-
_contentEdgeInsets
.
right
;
CGFloat
endY
=
self
.
frame
.
size
.
height
-
_contentEdgeInsets
.
bottom
;
//画线
if
(
_needLineTop
)
{
if
(
_lineDashTop
){
CGFloat
lengths
[]
=
{
_lineDashTop
};
CGContextSetLineDash
(
context
,
0
,
lengths
,
1
);
}
else
{
CGContextSetLineDash
(
context
,
0
,
0
,
0
);
}
CGContextSetLineWidth
(
context
,
_lineWidthTop
);
CGContextSetStrokeColorWithColor
(
context
,
(
_lineColorTop
?
_lineColorTop
:[
UIColor
blackColor
]).
CGColor
);
CGContextAddArc
(
context
,
endX
-
_radiusTopRight
,
startY
+
_radiusTopRight
,
_radiusTopRight
-
halfLineWidthTop
,
-
M_PI_4
+
(
_needLineRight
?
0
:
M_PI_4
),
-
M_PI_2
,
1
);
CGContextMoveToPoint
(
context
,
endX
-
_radiusTopRight
,
startY
+
halfLineWidthTop
);
CGContextAddLineToPoint
(
context
,
_radiusTopLeft
+
_contentEdgeInsets
.
left
,
halfLineWidthTop
+
_contentEdgeInsets
.
top
);
CGContextAddArc
(
context
,
startX
+
_radiusTopLeft
,
startY
+
_radiusTopLeft
,
_radiusTopLeft
-
halfLineWidthTop
,
-
M_PI_2
,
-
M_PI_2
-
M_PI_4
-
(
_needLineLeft
?
0
:
M_PI_4
),
1
);
CGContextStrokePath
(
context
);
}
if
(
_needLineLeft
)
{
if
(
_lineDashLeft
){
CGFloat
lengths
[]
=
{
_lineDashLeft
};
CGContextSetLineDash
(
context
,
0
,
lengths
,
1
);
}
else
{
CGContextSetLineDash
(
context
,
0
,
0
,
0
);
}
CGContextSetLineWidth
(
context
,
_lineWidthLeft
);
CGContextSetStrokeColorWithColor
(
context
,
(
_lineColorLeft
?
_lineColorLeft
:[
UIColor
blackColor
]).
CGColor
);
CGContextAddArc
(
context
,
startX
+
_radiusTopLeft
,
startY
+
_radiusTopLeft
,
_radiusTopLeft
-
halfLineWidthLeft
,
-
M_PI
,
-
M_PI_2
-
M_PI_4
+
(
_needLineTop
?
0
:
M_PI_4
),
0
);
CGContextMoveToPoint
(
context
,
startX
+
halfLineWidthLeft
,
startY
+
_radiusTopLeft
);
CGContextAddLineToPoint
(
context
,
startX
+
halfLineWidthLeft
,
endY
-
_radiusBottomLeft
);
CGContextAddArc
(
context
,
startX
+
_radiusBottomLeft
,
endY
-
_radiusBottomLeft
,
_radiusBottomLeft
-
halfLineWidthLeft
,
M_PI
,
M_PI
-
M_PI_4
-
(
_needLineBottom
?
0
:
M_PI_4
),
1
);
CGContextStrokePath
(
context
);
}
if
(
_needLineBottom
)
{
if
(
_lineDashBottom
){
CGFloat
lengths
[]
=
{
_lineDashBottom
};
CGContextSetLineDash
(
context
,
0
,
lengths
,
1
);
}
else
{
CGContextSetLineDash
(
context
,
0
,
0
,
0
);
}
CGContextSetLineWidth
(
context
,
_lineWidthBottom
);
CGContextSetStrokeColorWithColor
(
context
,
(
_lineColorBottom
?
_lineColorBottom
:[
UIColor
blackColor
]).
CGColor
);
CGContextAddArc
(
context
,
startX
+
_radiusBottomLeft
,
endY
-
_radiusBottomLeft
,
_radiusBottomLeft
-
halfLineWidthBottom
,
M_PI
-
M_PI_4
+
(
_needLineLeft
?
0
:
M_PI_4
),
M_PI_2
,
1
);
CGContextMoveToPoint
(
context
,
startX
+
_radiusBottomLeft
,
endY
-
halfLineWidthBottom
);
CGContextAddLineToPoint
(
context
,
endX
-
_radiusBottomRight
,
endY
-
halfLineWidthBottom
);
CGContextAddArc
(
context
,
endX
-
_radiusBottomRight
,
endY
-
_radiusBottomRight
,
_radiusBottomRight
-
halfLineWidthBottom
,
M_PI_2
,
M_PI_4
-
(
_needLineRight
?
0
:
M_PI_4
),
1
);
CGContextStrokePath
(
context
);
}
if
(
_needLineRight
)
{
if
(
_lineDashRight
){
CGFloat
lengths
[]
=
{
_lineDashRight
};
CGContextSetLineDash
(
context
,
0
,
lengths
,
1
);
}
else
{
CGContextSetLineDash
(
context
,
0
,
0
,
0
);
}
CGContextSetLineWidth
(
context
,
_lineWidthRight
);
CGContextSetStrokeColorWithColor
(
context
,
(
_lineColorRight
?
_lineColorRight
:[
UIColor
blackColor
]).
CGColor
);
CGContextAddArc
(
context
,
endX
-
_radiusBottomRight
,
endY
-
_radiusBottomRight
,
_radiusBottomRight
-
halfLineWidthRight
,
M_PI_4
+
(
_needLineBottom
?
0
:
M_PI_4
),
0
,
1
);
CGContextMoveToPoint
(
context
,
endX
-
halfLineWidthRight
,
endY
-
_radiusBottomRight
);
CGContextAddLineToPoint
(
context
,
endX
-
halfLineWidthRight
,
startY
+
_radiusTopRight
);
CGContextAddArc
(
context
,
endX
-
_radiusTopRight
,
startY
+
_radiusTopRight
,
_radiusTopRight
-
halfLineWidthRight
,
0
,
-
M_PI_4
-
(
_needLineTop
?
0
:
M_PI_4
),
1
);
CGContextStrokePath
(
context
);
}
CGContextStrokePath
(
context
);
}
//*/
-
(
UIBezierPath
*
)
bezierPathForBorder
{
if
(
self
.
needUpdatePathForBorder
||!
self
.
pathForBorder
)
{
CGFloat
startX
=
_contentEdgeInsets
.
left
;
CGFloat
startY
=
_contentEdgeInsets
.
top
;
CGFloat
endX
=
self
.
frame
.
size
.
width
-
_contentEdgeInsets
.
right
;
CGFloat
endY
=
self
.
frame
.
size
.
height
-
_contentEdgeInsets
.
bottom
;
UIBezierPath
*
bezierPath
=
[
UIBezierPath
bezierPath
];
[
bezierPath
moveToPoint
:
CGPointMake
(
endX
-
_radiusTopRight
,
startY
)];
[
bezierPath
addLineToPoint
:
CGPointMake
(
startX
+
_radiusTopLeft
,
startY
)];
[
bezierPath
addArcWithCenter
:
CGPointMake
(
startX
+
_radiusTopLeft
,
startY
+
_radiusTopLeft
)
radius
:
_radiusTopLeft
startAngle
:
M_PI
+
M_PI_2
endAngle
:
M_PI
clockwise
:
0
];
[
bezierPath
addLineToPoint
:
CGPointMake
(
startX
,
endY
-
_radiusBottomLeft
)];
[
bezierPath
addArcWithCenter
:
CGPointMake
(
startX
+
_radiusBottomLeft
,
endY
-
_radiusBottomLeft
)
radius
:
_radiusBottomLeft
startAngle
:
M_PI
endAngle
:
M_PI_2
clockwise
:
0
];
[
bezierPath
addLineToPoint
:
CGPointMake
(
endX
-
_radiusBottomRight
,
endY
)];
[
bezierPath
addArcWithCenter
:
CGPointMake
(
endX
-
_radiusBottomRight
,
endY
-
_radiusBottomRight
)
radius
:
_radiusBottomRight
startAngle
:
M_PI_2
endAngle
:
0
clockwise
:
0
];
[
bezierPath
addLineToPoint
:
CGPointMake
(
endX
,
startY
+
_radiusTopRight
)];
[
bezierPath
addArcWithCenter
:
CGPointMake
(
endX
-
_radiusTopRight
,
startY
+
_radiusTopRight
)
radius
:
_radiusTopRight
startAngle
:
0
endAngle
:-
M_PI_2
clockwise
:
0
];
self
.
pathForBorder
=
bezierPath
;
self
.
needUpdatePathForBorder
=
false
;
}
return
self
.
pathForBorder
;
}
-
(
void
)
willMoveToSuperview
:
(
UIView
*
)
newSuperview
{
if
([
self
clipsToBoundsWithBorder
])
{
UIBezierPath
*
bezierPath
=
[
self
bezierPathForBorder
];
CAShapeLayer
*
maskLayer
=
[
CAShapeLayer
new
];
maskLayer
.
frame
=
self
.
bounds
;
maskLayer
.
path
=
bezierPath
.
CGPath
;
self
.
layer
.
mask
=
maskLayer
;
}
}
-
(
void
)
setContentEdgeInsets
:
(
UIEdgeInsets
)
contentEdgeInsets
{
if
(
!
UIEdgeInsetsEqualToEdgeInsets
(
contentEdgeInsets
,
_contentEdgeInsets
))
{
_contentEdgeInsets
=
contentEdgeInsets
;
self
.
needUpdatePathForBorder
=
true
;
[
self
setNeedsDisplay
];
}
}
-
(
void
)
setFrame
:
(
CGRect
)
frame
{
if
(
!
CGRectEqualToRect
(
self
.
frame
,
frame
))
{
self
.
needUpdatePathForBorder
=
true
;
}
[
super
setFrame
:
frame
];
[
self
setNeedsDisplay
];
}
-
(
void
)
setNeedLineTop
:
(
BOOL
)
needTop
left
:
(
BOOL
)
needLeft
bottom
:
(
BOOL
)
needBottom
right
:
(
BOOL
)
needRight
{
self
.
needLineTop
=
needTop
;
self
.
needLineLeft
=
needLeft
;
self
.
needLineRight
=
needRight
;
self
.
needLineBottom
=
needBottom
;
}
-
(
void
)
setLineColorTop
:
(
UIColor
*
)
colorTop
left
:
(
UIColor
*
)
colorLeft
bottom
:
(
UIColor
*
)
colorBottom
right
:
(
UIColor
*
)
colorRight
{
self
.
lineColorTop
=
colorTop
;
self
.
lineColorLeft
=
colorLeft
;
self
.
lineColorBottom
=
colorBottom
;
self
.
lineColorRight
=
colorRight
;
}
-
(
void
)
setLineWidthTop
:
(
CGFloat
)
widthTop
left
:
(
CGFloat
)
widthLeft
bottom
:
(
CGFloat
)
widthBottom
right
:
(
CGFloat
)
widthRight
{
self
.
lineWidthTop
=
widthTop
;
self
.
lineWidthLeft
=
widthLeft
;
self
.
lineWidthBottom
=
widthBottom
;
self
.
lineWidthRight
=
widthRight
;
}
-
(
void
)
setRadiusTopLeft
:
(
CGFloat
)
topLeft
topRight
:
(
CGFloat
)
topRight
bottomLeft
:
(
CGFloat
)
bottomLeft
bottomRight
:
(
CGFloat
)
bottomRight
{
self
.
radiusTopLeft
=
topLeft
;
self
.
radiusTopRight
=
topRight
;
self
.
radiusBottomLeft
=
bottomLeft
;
self
.
radiusBottomRight
=
bottomRight
;
}
-
(
void
)
setLineDashTop
:
(
CGFloat
)
top
left
:
(
CGFloat
)
left
bottom
:
(
CGFloat
)
bottom
right
:
(
CGFloat
)
right
{
self
.
lineDashTop
=
top
;
self
.
lineDashLeft
=
left
;
self
.
lineDashBottom
=
bottom
;
self
.
lineDashRight
=
right
;
}
-
(
void
)
setRadiusBottomLeft
:
(
CGFloat
)
radiusBottomLeft
{
if
(
_radiusBottomLeft
!=
radiusBottomLeft
)
{
_radiusBottomLeft
=
radiusBottomLeft
;
self
.
needUpdatePathForBorder
=
true
;
}
}
-
(
void
)
setRadiusBottomRight
:
(
CGFloat
)
radiusBottomRight
{
if
(
_radiusBottomRight
!=
radiusBottomRight
)
{
_radiusBottomRight
=
radiusBottomRight
;
self
.
needUpdatePathForBorder
=
true
;
}
}
-
(
void
)
setRadiusTopLeft
:
(
CGFloat
)
radiusTopLeft
{
if
(
_radiusTopLeft
!=
radiusTopLeft
)
{
_radiusTopLeft
=
radiusTopLeft
;
self
.
needUpdatePathForBorder
=
true
;
}
}
-
(
void
)
setRadiusTopRight
:
(
CGFloat
)
radiusTopRight
{
if
(
_radiusTopRight
!=
radiusTopRight
)
{
_radiusTopRight
=
radiusTopRight
;
self
.
needUpdatePathForBorder
=
true
;
}
}
-
(
void
)
setLineWidthBottom
:
(
CGFloat
)
lineWidthBottom
{
if
(
_lineWidthBottom
!=
lineWidthBottom
)
{
_lineWidthBottom
=
lineWidthBottom
;
self
.
needUpdatePathForBorder
=
true
;
}
}
-
(
void
)
setLineWidthLeft
:
(
CGFloat
)
lineWidthLeft
{
if
(
_lineWidthLeft
!=
lineWidthLeft
)
{
_lineWidthLeft
=
lineWidthLeft
;
self
.
needUpdatePathForBorder
=
true
;
}
}
-
(
void
)
setLineWidthTop
:
(
CGFloat
)
lineWidthTop
{
if
(
_lineWidthTop
!=
lineWidthTop
)
{
_lineWidthTop
=
lineWidthTop
;
self
.
needUpdatePathForBorder
=
true
;
}
}
-
(
void
)
setLineWidthRight
:
(
CGFloat
)
lineWidthRight
{
if
(
_lineWidthRight
!=
lineWidthRight
)
{
_lineWidthRight
=
lineWidthRight
;
self
.
needUpdatePathForBorder
=
true
;
}
}
@end
vanke/Base.lproj/LaunchScreen.xib
View file @
6a162f7b
<?xml version="1.0" encoding="UTF-8"
standalone="no"
?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"
10117"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"
9531"
systemVersion=
"16A323
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"
10085
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"
9529
"
/>
<capability
name=
"Constraints to layout margins"
minToolsVersion=
"6.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"
480"
height=
"480
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"
375"
height=
"667
"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
fixedFrame=
"YES"
image=
"login_bg.png"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"T3n-rV-MUb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"
480"
height=
"480
"
/>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"login_bg.png"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"T3n-rV-MUb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"
375"
height=
"667
"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
misplaced=
"YES"
text=
"Copyright (c) 2015年 万科. "
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"D9f-bJ-RUy"
>
<rect
key=
"frame"
x=
"36"
y=
"438"
width=
"389"
height=
"28"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"500"
id=
"5gY-rb-pwj"
userLabel=
"width = 450"
/>
</constraints>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"Copyright (c) 2015年 万科. "
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"D9f-bJ-RUy"
>
<rect
key=
"frame"
x=
"82"
y=
"638.5"
width=
"211"
height=
"20.5"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"17"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"T3n-rV-MUb"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
id=
"58T-cB-ayr"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"T3n-rV-MUb"
secondAttribute=
"trailing"
id=
"DPq-Lu-PXb"
/>
<constraint
firstItem=
"D9f-bJ-RUy"
firstAttribute=
"centerX"
secondItem=
"T3n-rV-MUb"
secondAttribute=
"centerX"
id=
"PEe-PR-T6S"
/>
<constraint
firstItem=
"T3n-rV-MUb"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"T3a-72-I7u"
/>
<constraint
firstItem=
"D9f-bJ-RUy"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leadingMargin"
constant=
"30"
id=
"Tfn-9w-HrA"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"D9f-bJ-RUy"
secondAttribute=
"trailing"
constant=
"47"
id=
"h1b-qH-dll"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"T3n-rV-MUb"
secondAttribute=
"bottom"
id=
"vF8-0l-hUy"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"D9f-bJ-RUy"
secondAttribute=
"bottom"
constant=
"8"
id=
"vGm-mj-OK9"
/>
<constraint
firstAttribute=
"bottomMargin"
secondItem=
"D9f-bJ-RUy"
secondAttribute=
"bottom"
constant=
"6"
id=
"wfc-m4-EZw"
/>
</constraints>
<nil
key=
"simulatedStatusBarMetrics"
/>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<simulatedScreenMetrics
key=
"simulatedDestinationMetrics"
type=
"retina47"
/>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<exclude
reference=
"Tfn-9w-HrA"
/>
<exclude
reference=
"h1b-qH-dll"
/>
<exclude
reference=
"wfc-m4-EZw"
/>
</mask>
</variation>
<point
key=
"canvasLocation"
x=
"354"
y=
"186"
/>
</view>
</objects>
...
...
vanke/Info.plist
View file @
6a162f7b
...
...
@@ -17,7 +17,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.5.
2
<
/string
>
<
string
>
1.5.
7
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
...
...
vanke/Main.storyboard
View file @
6a162f7b
...
...
@@ -22,7 +22,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"20"
width=
"375"
height=
"647"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"GQF-ew-Vdi"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
232
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"
160
"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"AnnounceTitleBG"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"FF8-Nw-nDw"
>
<rect
key=
"frame"
x=
"30"
y=
"15"
width=
"315"
height=
"42"
/>
...
...
@@ -42,8 +42,8 @@
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
超级管理员时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方说的超级管理员时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方时代发生地方说的
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AJL-kM-nNg"
>
<rect
key=
"frame"
x=
"30"
y=
"134"
width=
"315"
height=
"
90
"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
公告内容
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AJL-kM-nNg"
>
<rect
key=
"frame"
x=
"30"
y=
"134"
width=
"315"
height=
"
18
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -109,13 +109,13 @@
</variation>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"附件:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"zMT-LR-Svj"
>
<rect
key=
"frame"
x=
"23"
y=
"
247
"
width=
"45"
height=
"18"
/>
<rect
key=
"frame"
x=
"23"
y=
"
175
"
width=
"45"
height=
"18"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
red=
"0.2784313725"
green=
"0.56078431370000004"
blue=
"0.94509803920000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"
default
"
rowHeight=
"58"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1wd-qk-vUd"
>
<rect
key=
"frame"
x=
"30"
y=
"2
79
"
width=
"315"
height=
"300"
/>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"
none
"
rowHeight=
"58"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1wd-qk-vUd"
>
<rect
key=
"frame"
x=
"30"
y=
"2
07
"
width=
"315"
height=
"300"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"300"
id=
"NoJ-QY-ySd"
/>
...
...
@@ -125,26 +125,35 @@
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"315"
height=
"58"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"kW7-2o-6PV"
id=
"jHD-Ec-Eub"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"315"
height=
"5
7.5
"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"315"
height=
"5
8
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"announcementDetailCell_top"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"8ly-pd-Dae"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"315"
height=
"57"
/>
</imageView>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"announcementDetailCell_center"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"A1T-nm-ggT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"315"
height=
"58"
/>
</imageView>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"announcementDetailCell_bottom"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"PW6-M9-Cgc"
>
<rect
key=
"frame"
x=
"0.0"
y=
"4"
width=
"315"
height=
"53"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
tag=
"1111"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"sdfsdfvnslrekjdf823kd82d.jpg"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"XiM-Gb-Z2i"
>
<rect
key=
"frame"
x=
"20"
y=
"25"
width=
"198"
height=
"17.5"
/>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"QRs-Ah-j1o"
customClass=
"YRBorderView"
>
<rect
key=
"frame"
x=
"8"
y=
"0.0"
width=
"299"
height=
"57.5"
/>
<subviews>
<view
contentMode=
"scaleToFill"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"NVi-s4-u7n"
userLabel=
"line"
>
<rect
key=
"frame"
x=
"8"
y=
"56.5"
width=
"283"
height=
"1"
/>
<color
key=
"backgroundColor"
red=
"0.93725490199999995"
green=
"0.93725490199999995"
blue=
"0.95686274510000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"1"
id=
"AMo-9j-sgM"
/>
</constraints>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"trailing"
secondItem=
"NVi-s4-u7n"
secondAttribute=
"trailing"
constant=
"8"
id=
"MKu-Sh-SAm"
/>
<constraint
firstItem=
"NVi-s4-u7n"
firstAttribute=
"leading"
secondItem=
"QRs-Ah-j1o"
secondAttribute=
"leading"
constant=
"8"
id=
"UGi-85-MK8"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"NVi-s4-u7n"
secondAttribute=
"bottom"
id=
"cmp-kT-ruX"
/>
</constraints>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
tag=
"1111"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"sdfsdfvnslrekjdf823kd82dfsdfsdfsdfsdfd.jpg"
lineBreakMode=
"middleTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"XiM-Gb-Z2i"
>
<rect
key=
"frame"
x=
"20"
y=
"20"
width=
"226"
height=
"17.5"
/>
<fontDescription
key=
"fontDescription"
name=
"HelveticaNeue"
family=
"Helvetica Neue"
pointSize=
"15"
/>
<color
key=
"textColor"
red=
"0.2784313725"
green=
"0.56078431370000004"
blue=
"0.94509803920000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"tXH-qk-fvu"
>
<rect
key=
"frame"
x=
"247"
y=
"1
9
"
width=
"40"
height=
"30"
/>
<rect
key=
"frame"
x=
"247"
y=
"1
4
"
width=
"40"
height=
"30"
/>
<color
key=
"backgroundColor"
red=
"0.2784313725"
green=
"0.56078431370000004"
blue=
"0.94509803920000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"40"
id=
"r4g-IE-9Kv"
/>
...
...
@@ -163,44 +172,28 @@
</button>
</subviews>
<constraints>
<constraint
firstItem=
"8ly-pd-Dae"
firstAttribute=
"top"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"top"
id=
"4Hq-0e-IMH"
/>
<constraint
firstItem=
"tXH-qk-fvu"
firstAttribute=
"centerY"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"centerY"
id=
"4sG-p7-Ir1"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"8ly-pd-Dae"
secondAttribute=
"bottom"
id=
"6YA-lX-kcR"
/>
<constraint
firstItem=
"XiM-Gb-Z2i"
firstAttribute=
"leading"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"leading"
constant=
"20"
id=
"72P-0q-xPh"
/>
<constraint
firstItem=
"8ly-pd-Dae"
firstAttribute=
"leading"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"leading"
id=
"9hf-pE-hNq"
/>
<constraint
firstItem=
"A1T-nm-ggT"
firstAttribute=
"leading"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"leading"
id=
"DFw-kd-USE"
/>
<constraint
firstItem=
"PW6-M9-Cgc"
firstAttribute=
"leading"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"leading"
id=
"Ehv-JO-yCf"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"QRs-Ah-j1o"
secondAttribute=
"trailing"
constant=
"8"
id=
"7kL-9R-37p"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"tXH-qk-fvu"
secondAttribute=
"trailing"
constant=
"20"
id=
"I7f-S7-vq0"
/>
<constraint
firstItem=
"A1T-nm-ggT"
firstAttribute=
"top"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"top"
id=
"Owc-sh-ztS"
/>
<constraint
firstItem=
"8ly-pd-Dae"
firstAttribute=
"leading"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"leadingMargin"
id=
"Qou-43-M83"
/>
<constraint
firstItem=
"tXH-qk-fvu"
firstAttribute=
"leading"
secondItem=
"XiM-Gb-Z2i"
secondAttribute=
"trailing"
constant=
"1"
id=
"P7R-8s-ddU"
/>
<constraint
firstItem=
"tXH-qk-fvu"
firstAttribute=
"centerY"
secondItem=
"XiM-Gb-Z2i"
secondAttribute=
"centerY"
id=
"S56-Ep-eF3"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"PW6-M9-Cgc"
secondAttribute=
"trailing"
id=
"SWe-im-BXD"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"A1T-nm-ggT"
secondAttribute=
"trailing"
id=
"VWs-64-IyK"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"A1T-nm-ggT"
secondAttribute=
"bottom"
id=
"YXR-Qq-wax"
/>
<constraint
firstAttribute=
"trailingMargin"
secondItem=
"8ly-pd-Dae"
secondAttribute=
"trailing"
id=
"f3l-rt-MTh"
/>
<constraint
firstItem=
"PW6-M9-Cgc"
firstAttribute=
"top"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"top"
constant=
"4"
id=
"mn3-Ms-mxT"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"8ly-pd-Dae"
secondAttribute=
"bottom"
id=
"rdx-P7-Wld"
/>
<constraint
firstItem=
"XiM-Gb-Z2i"
firstAttribute=
"centerY"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"centerY"
constant=
"5"
id=
"rjo-ik-9Gz"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"PW6-M9-Cgc"
secondAttribute=
"bottom"
constant=
"0.5"
id=
"uvH-Kc-edB"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"8ly-pd-Dae"
secondAttribute=
"trailing"
id=
"wdW-qP-ufb"
/>
<constraint
firstItem=
"8ly-pd-Dae"
firstAttribute=
"top"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"topMargin"
id=
"xP3-Vw-bF9"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"QRs-Ah-j1o"
secondAttribute=
"bottom"
id=
"UJa-nu-LQX"
/>
<constraint
firstItem=
"QRs-Ah-j1o"
firstAttribute=
"leading"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"leading"
constant=
"8"
id=
"Uh3-HA-VHc"
/>
<constraint
firstItem=
"XiM-Gb-Z2i"
firstAttribute=
"centerY"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"centerY"
id=
"rjo-ik-9Gz"
/>
<constraint
firstItem=
"QRs-Ah-j1o"
firstAttribute=
"top"
secondItem=
"jHD-Ec-Eub"
secondAttribute=
"top"
id=
"wb1-DA-WHr"
/>
</constraints>
<variation
key=
"default"
>
<mask
key=
"constraints"
>
<exclude
reference=
"xP3-Vw-bF9"
/>
<exclude
reference=
"rdx-P7-Wld"
/>
<exclude
reference=
"f3l-rt-MTh"
/>
<exclude
reference=
"Qou-43-M83"
/>
<exclude
reference=
"4sG-p7-Ir1"
/>
</mask>
</variation>
</tableViewCellContentView>
<inset
key=
"separatorInset"
minX=
"15"
minY=
"0.0"
maxX=
"15"
maxY=
"0.0"
/>
<connections>
<outlet
property=
"bottomImage"
destination=
"PW6-M9-Cgc"
id=
"dOV-Bv-EUM"
/>
<outlet
property=
"centerImage"
destination=
"A1T-nm-ggT"
id=
"8RV-S2-AFe"
/>
<outlet
property=
"borderView"
destination=
"QRs-Ah-j1o"
id=
"Xkz-O1-BSe"
/>
<outlet
property=
"content"
destination=
"XiM-Gb-Z2i"
id=
"UHO-Cf-56S"
/>
<outlet
property=
"
topImage"
destination=
"8ly-pd-Dae"
id=
"JIY-c6-9UZ
"
/>
<outlet
property=
"
line"
destination=
"NVi-s4-u7n"
id=
"3QQ-v4-shb
"
/>
</connections>
</tableViewCell>
</prototypes>
...
...
@@ -248,8 +241,5 @@
</scenes>
<resources>
<image
name=
"AnnounceTitleBG"
width=
"280"
height=
"55"
/>
<image
name=
"announcementDetailCell_bottom"
width=
"352"
height=
"36"
/>
<image
name=
"announcementDetailCell_center"
width=
"352"
height=
"36"
/>
<image
name=
"announcementDetailCell_top"
width=
"352"
height=
"36"
/>
</resources>
</document>
vanke/controller/VankeProjectSummaryAPI.h
View file @
6a162f7b
...
...
@@ -64,7 +64,14 @@
@property
(
nonatomic
,
strong
)
NSNumber
*
paidStatement
;
@property
(
nonatomic
,
strong
)
NSNumber
*
totalStatement
;
/**
* 总金额
*/
@property
(
nonatomic
,
strong
)
NSNumber
*
rentalAmount
;
/**
* 总面积
*/
@property
(
nonatomic
,
strong
)
NSNumber
*
rentalArea
;
@end
...
...
vanke/view_iPhone/templates/announcement/AnnouncementDetailViewController.m
View file @
6a162f7b
...
...
@@ -11,6 +11,7 @@
#import "AnnouncementDetailTableViewCell.h"
#import "IBTWebViewController.h"
#import "VankeUtil.h"
#import "VankeAppBoard_iPhone.h"
@interface
AnnouncementDetailViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelPublisher
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelTime
;
...
...
@@ -26,11 +27,17 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
tableView
.
tableFooterView
=
[
UIView
new
];
self
.
title
=
@"公告详情"
;
// self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[
self
setUpData
];
// Do any additional setup after loading the view.
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[[
VankeAppBoard_iPhone
sharedInstance
]
hideMenu
];
}
-
(
void
)
setUpData
{
WS
(
weakSelf
);
NSString
*
url
=
[
NSString
stringWithFormat
:
@"affiche/get/%@"
,
self
.
announcement
.
uuid
];
...
...
@@ -91,6 +98,7 @@
WS
(
weakSelf
);
cell
.
openFile
=
^
{
IBTWebViewController
*
WVC
=
[[
IBTWebViewController
alloc
]
initWithURL
:
url
presentModal
:
NO
extraInfo
:
nil
];
WVC
.
title
=
@"附件详情"
;
[
weakSelf
.
navigationController
pushViewController
:
WVC
animated
:
YES
];
};
return
cell
;
...
...
vanke/view_iPhone/templates/announcement/Views/AnnouncementDetailTableViewCell.h
View file @
6a162f7b
...
...
@@ -7,15 +7,16 @@
//
#import <UIKit/UIKit.h>
#import "YRBorderView.h"
typedef
NS_ENUM
(
NSInteger
,
announcementDetailCellType
)
{
announcementDetailCellTypeTop
,
announcementDetailCellTypeCenter
,
announcementDetailCellTypeBottom
,
};
@interface
AnnouncementDetailTableViewCell
:
UITableViewCell
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
topImage
;
@property
(
weak
,
nonatomic
)
IBOutlet
UI
ImageView
*
centerImag
e
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
bottomImage
;
@property
(
weak
,
nonatomic
)
IBOutlet
UI
View
*
lin
e
;
@property
(
weak
,
nonatomic
)
IBOutlet
YRBorderView
*
borderView
;
@property
(
nonatomic
,
copy
)
NSString
*
contentText
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
content
;
@property
(
nonatomic
,
assign
)
announcementDetailCellType
type
;
...
...
vanke/view_iPhone/templates/announcement/Views/AnnouncementDetailTableViewCell.m
View file @
6a162f7b
...
...
@@ -8,12 +8,20 @@
#import "AnnouncementDetailTableViewCell.h"
#import "IBTWebViewController.h"
static
CGFloat
const
kBorderRadious
=
8
;
//圆角的弧度
static
CGFloat
const
kBorderLineWidth
=
1
;
//虚线的宽度
static
CGFloat
const
kBorderLineHeight
=
2
;
//虚线的每个点的高度
@implementation
AnnouncementDetailTableViewCell
-
(
void
)
awakeFromNib
{
// Initialization code
self
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
[
self
.
borderView
setLineColorTop
:[
UIColor
grayColor
]
left
:[
UIColor
grayColor
]
bottom
:
[
UIColor
grayColor
]
right
:
[
UIColor
grayColor
]];
//设置不同的颜色
[
self
.
borderView
setLineWidthTop
:
kBorderLineWidth
left
:
kBorderLineWidth
bottom
:
kBorderLineWidth
right
:
kBorderLineWidth
];
[
self
.
borderView
setLineDashRight
:
kBorderLineHeight
];
//右侧线条是虚线
[
self
.
borderView
setLineDashLeft
:
kBorderLineHeight
];
[
self
.
borderView
setLineDashTop
:
kBorderLineHeight
];
[
self
.
borderView
setLineDashBottom
:
kBorderLineHeight
];
}
-
(
IBAction
)
open
:
(
id
)
sender
{
...
...
@@ -34,29 +42,32 @@
_type
=
type
;
switch
(
type
)
{
case
announcementDetailCellTypeTop
:
{
self
.
topImage
.
hidden
=
NO
;
self
.
centerImage
.
hidden
=
YES
;
self
.
bottomImage
.
hidden
=
YES
;
[
self
.
borderView
setNeedLineTop
:
YES
left
:
YES
bottom
:
NO
right
:
YES
]
;
[
self
.
borderView
setRadiusTopLeft
:
kBorderRadious
topRight
:
kBorderRadious
bottomLeft
:
0
bottomRight
:
0
]
;
self
.
line
.
hidden
=
NO
;
break
;
}
case
announcementDetailCellTypeCenter
:
{
self
.
topImage
.
hidden
=
YES
;
self
.
centerImage
.
hidden
=
NO
;
self
.
bottomImage
.
hidden
=
YES
;
[
self
.
borderView
setNeedLineTop
:
NO
left
:
YES
bottom
:
NO
right
:
YES
]
;
[
self
.
borderView
setRadiusTopLeft
:
0
topRight
:
0
bottomLeft
:
0
bottomRight
:
0
]
;
self
.
line
.
hidden
=
NO
;
break
;
}
case
announcementDetailCellTypeBottom
:
{
self
.
topImage
.
hidden
=
YES
;
self
.
centerImage
.
hidden
=
YES
;
self
.
bottomImage
.
hidden
=
NO
;
[
self
.
borderView
setNeedLineTop
:
NO
left
:
YES
bottom
:
YES
right
:
YES
]
;
[
self
.
borderView
setRadiusTopLeft
:
0
topRight
:
0
bottomLeft
:
kBorderRadious
bottomRight
:
kBorderRadious
]
;
self
.
line
.
hidden
=
YES
;
break
;
}
}
}
-
(
void
)
setIsOnlyOne
:
(
BOOL
)
isOnlyOne
{
_isOnlyOne
=
isOnlyOne
;
_bottomImage
.
hidden
=
!
isOnlyOne
;
if
(
isOnlyOne
)
{
[
self
.
borderView
setNeedLineTop
:
YES
left
:
YES
bottom
:
YES
right
:
YES
];
[
self
.
borderView
setRadiusTopLeft
:
kBorderRadious
topRight
:
kBorderRadious
bottomLeft
:
kBorderRadious
bottomRight
:
kBorderRadious
];
self
.
line
.
hidden
=
YES
;
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
...
...
vanke/view_iPhone/templates/main/VankeServiceDashBoard_iPhone.m
View file @
6a162f7b
...
...
@@ -61,7 +61,8 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
self
.
salesInfo
.
imgRightBg
.
backgroundColor
=
[
UIColor
colorWithRed
:
237
/
255
.
0
green
:
27
/
255
.
0
blue
:
35
/
255
.
0
alpha
:
1
];
[
self
.
passenger
loadDefaults
:
@"people.png"
title
:
@"昨日客流"
bgColor
:
[
UIColor
colorWithRed
:
0
green
:
195
/
255
.
0
blue
:
230
/
255
.
0
alpha
:
1
]
unit
:
@"人"
defValue
:
[
NSNumber
numberWithInt
:
0
]];
[
self
.
traffic
loadDefaults
:
@"car.png"
title
:
@"车流"
bgColor
:
[
UIColor
colorWithRed
:
79
/
255
.
0
green
:
143
/
255
.
0
blue
:
248
/
255
.
0
alpha
:
1
]
unit
:
@"次"
defValue
:
[
NSNumber
numberWithInt
:
0
]];
[
self
.
energy
loadDefaults
:
@"energy.png"
title
:
@"坪效"
bgColor
:
[
UIColor
colorWithRed
:
149
/
255
.
0
green
:
200
/
255
.
0
blue
:
8
/
255
.
0
alpha
:
1
]
unit
:
@"元"
defValue
:
[
NSNumber
numberWithInt
:
0
]];
[
self
.
energy
loadDefaults
:
@"energy.png"
title
:
@"日坪效"
bgColor
:
[
UIColor
colorWithRed
:
149
/
255
.
0
green
:
200
/
255
.
0
blue
:
8
/
255
.
0
alpha
:
1
]
unit
:
@"元"
defValue
:
[
NSNumber
numberWithFloat
:
0
.
00
]];
[
self
.
complaint
loadDefaults
:
@"complaint.png"
title
:
@"收缴率"
bgColor
:
[
UIColor
colorWithRed
:
252
/
255
.
0
green
:
67
/
255
.
0
blue
:
62
/
255
.
0
alpha
:
1
]
unit
:
@" "
defValue
:
[
NSNumber
numberWithInt
:
0
]];
}
...
...
@@ -78,8 +79,10 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
if
(
nil
!=
summary
)
{
[
self
.
salesInfo
setData
:
summary
.
salesAmount
];
[
self
.
passenger
setData
:
summary
.
passengerFlowVolume
];
[
self
.
traffic
setData
:[
NSNumber
numberWithFloat
:
122
]];
[
self
.
energy
setData
:[
NSNumber
numberWithInt
:
789
]];
[
self
.
traffic
setData
:[
NSNumber
numberWithFloat
:
0
]];
//计算出坪效
NSDecimalNumber
*
energy
=
[
CalculateHelper
calculateNum1
:
summary
.
rentalAmount
num2
:
summary
.
rentalArea
type
:
CalculateTypeDiv
roundingType
:
NSRoundPlain
cutLenth
:
2
];
self
.
energy
.
lblAmount
.
text
=
[
CalculateHelper
getMoneyStringFrom
:
energy
];
NSString
*
rate
=
[
CalculateHelper
getPercent
:
summary
.
paidStatement
num
:
summary
.
totalStatement
];
self
.
complaint
.
lblAmount
.
text
=
rate
;
...
...
vanke/view_iPhone/templates/salesInput/Controller/HistoryViewController.m
View file @
6a162f7b
...
...
@@ -13,11 +13,11 @@
#import "ICRAppMacro.h"
#import "ChooseShopViewController.h"
#import "SaleInputPicCollectionViewController.h"
#import "CalculateHelper.h"
#define klineCount 19 //列数
#define kListWidth 100 //一个表格的宽度
#define kListHeight 40
#define kBottomHeight 5
5
//表格最底部的那行的宽度
#define kBottomHeight 5
0
//表格最底部的那行的宽度
@interface
HistoryViewController
()
<
UIScrollViewDelegate
>
@property
(
nonatomic
,
strong
)
UICollectionView
*
collectionView
;
@property
(
nonatomic
,
strong
)
NSArray
*
titles
;
...
...
@@ -139,9 +139,10 @@
//底部浮动的视图
UILabel
*
labelBottom
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kListWidth
*
i
,
self
.
scrollView
.
contentOffset
.
y
+
self
.
scrollView
.
height
-
kBottomHeight
,
kListWidth
,
kBottomHeight
)];
labelBottom
.
text
=
bottomArr
[
i
];
labelBottom
.
backgroundColor
=
[
UIColor
g
rayColor
];
labelBottom
.
font
=
[
UIFont
systemFontOfSize
:
26
];
labelBottom
.
backgroundColor
=
[
UIColor
lightG
rayColor
];
labelBottom
.
font
=
[
UIFont
systemFontOfSize
:
19
];
labelBottom
.
textAlignment
=
NSTextAlignmentCenter
;
labelBottom
.
numberOfLines
=
2
;
labelBottom
.
tag
=
2000
+
i
;
[
self
.
scrollView
addSubview
:
labelBottom
];
if
(
i
!=
0
)
{
...
...
@@ -175,9 +176,6 @@
picVC
.
title
=
self
.
arrRecords
[
row
][
@"salesDate"
];
picVC
.
attachmentUuid
=
self
.
arrRecords
[
row
][
@"attachmentUuid"
];
NSArray
*
attachments
=
self
.
arrRecords
[
row
][
@"attachments"
];
// if (attachments.count == 0) {
// picVC.attachmentUuid = nil;
// }
[
self
.
navigationController
pushViewController
:
picVC
animated
:
YES
];
}
...
...
@@ -318,8 +316,8 @@
NSMutableArray
*
payment
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
obj
in
dic
[
@"data"
][
@"records"
])
{
[
arrDate
addObject
:
obj
[
@"salesDate"
]];
[
arrAmount
addObject
:[
NSString
stringWithFormat
:
@"%.0f"
,
[
obj
[
@"amount"
]
floatValue
]]];
[
arrBills
addObject
:[
NSString
stringWithFormat
:
@"%.0f"
,
[
obj
[
@"transactions"
]
floatValue
]
]];
[
arrAmount
addObject
:[
CalculateHelper
getMoneyStringFrom
:
obj
[
@"amount"
]]];
[
arrBills
addObject
:[
CalculateHelper
getMoneyStringFrom
:
obj
[
@"transactions"
]
Lenth
:
0
isSeparate
:
NO
]];
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dic
in
obj
[
@"payments"
])
{
...
...
@@ -345,7 +343,7 @@
for
(
int
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
NSDictionary
*
dic
=
arr
[
i
];
NSMutableArray
*
apay
=
paytype
[
i
];
[
apay
addObject
:[
NSString
stringWithFormat
:
@"%.0f"
,
[
dic
[
@"amount"
]
floatValue
]]];
[
apay
addObject
:[
CalculateHelper
getMoneyStringFrom
:
dic
[
@"amount"
]]];
}
}
...
...
@@ -358,17 +356,22 @@
[
arrBottom
addObject
:
@"总计"
];
}
else
{
NS
Integer
count
=
0
;
NS
DecimalNumber
*
count
=
[
NSDecimalNumber
decimalNumberWithString
:
@"0"
]
;
for
(
int
j
=
0
;
j
<
[
arrData
[
i
]
count
];
j
++
)
{
if
(
j
!=
0
)
{
NSString
*
number
=
arrData
[
i
][
j
];
NSInteger
num
=
[
number
integerValue
];
count
=
count
+
num
;
count
=
[
CalculateHelper
calculateNum1
:
count
num2
:
number
type
:
CalculateTypeAdd
];
}
}
NSString
*
result
=
[
NSString
stringWithFormat
:
@"%ld"
,
(
long
)
count
];
[
arrBottom
addObject
:
result
];
NSString
*
result
;
if
(
i
==
1
)
{
result
=
[
CalculateHelper
getMoneyStringFrom
:
count
Lenth
:
0
isSeparate
:
NO
];
}
else
{
result
=
[
CalculateHelper
getMoneyStringFrom
:
count
Lenth
:
2
isSeparate
:
NO
];
}
[
arrBottom
addObject
:
result
];
}
}
...
...
vanke/view_iPhone/templates/salesInput/Controller/SalesInPut.storyboard
View file @
6a162f7b
<?xml version="1.0" encoding="UTF-8"
standalone="no"
?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"9531"
systemVersion=
"1
5E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"9531"
systemVersion=
"1
6A323
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"9529"
/>
...
...
@@ -149,8 +149,8 @@
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
录入
日期:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"F81-D8-CgE"
>
<rect
key=
"frame"
x=
"20"
y=
"81"
width=
"80"
height=
"
19.5
"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
销售
日期:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"F81-D8-CgE"
>
<rect
key=
"frame"
x=
"20"
y=
"81"
width=
"80"
height=
"
20
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"16"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
vanke/view_iPhone/templates/salesInput/Controller/SalesInputViewController.m
View file @
6a162f7b
...
...
@@ -96,7 +96,7 @@ static NSInteger const TOP_HEIGHT = 145;
self
.
topView
.
textfieldDate
.
enabled
=
NO
;
self
.
topView
.
textfieldDate
.
text
=
self
.
model
.
salesDate
;
self
.
totalView
.
textFieldBillCount
.
text
=
[
NSString
stringWithFormat
:
@"%.0f"
,
self
.
model
.
transactions
];
self
.
totalView
.
labelTotal
.
text
=
[
NSString
stringWithFormat
:
@"%.
0
f"
,
self
.
model
.
amount
];
self
.
totalView
.
labelTotal
.
text
=
[
NSString
stringWithFormat
:
@"%.
2
f"
,
self
.
model
.
amount
];
for
(
SalesInputLines
*
line
in
self
.
model
.
lines
)
{
PaymentTypeModel
*
payType
=
[[
PaymentTypeModel
alloc
]
init
];
payType
.
name
=
line
.
payment
;
...
...
@@ -104,10 +104,9 @@ static NSInteger const TOP_HEIGHT = 145;
}
if
(
self
.
isReadOnly
)
{
[
self
.
submitView
.
buttonCommit
setTitle
:
@"已审核"
forState
:
UIControlStateNormal
];
[
self
.
submitView
.
buttonCommit
setBackgroundColor
:[
UIColor
darkGrayColor
]];
self
.
submitView
.
buttonCommit
.
enabled
=
NO
;
[
self
.
submitView
.
buttonCommit
setTitle
:
@"返回"
forState
:
UIControlStateNormal
];
self
.
totalView
.
textFieldBillCount
.
userInteractionEnabled
=
NO
;
self
.
totalView
.
textFieldBillCount
.
textColor
=
[
UIColor
lightGrayColor
];
}
[
self
.
tableView
reloadData
];
...
...
@@ -199,7 +198,11 @@ ON_WILL_APPEAR( signal )
[
weakSelf
.
cellDataDic
setObject
:
dataArr
forKey
:
indexPath
];
[
weakSelf
countTotalMonney
];
};
cell
.
userInteractionEnabled
=
!
self
.
isReadOnly
;
if
(
self
.
isReadOnly
)
{
cell
.
userInteractionEnabled
=
NO
;
cell
.
textFieldAmount
.
textColor
=
[
UIColor
lightGrayColor
];
}
return
cell
;
}
else
{
...
...
@@ -388,7 +391,7 @@ ON_WILL_APPEAR( signal )
[
httpCtrl
getUrl
:
@"salesinput/query"
params
:
params
success
:^
(
id
data
)
{
if
([
data
[
@"data"
][
@"records"
]
count
]
>
0
)
{
NSNumber
*
amount
=
data
[
@"data"
][
@"records"
][
0
][
@"amount"
];
NSString
*
amountStr
=
[
NSString
stringWithFormat
:
@"%.0f"
,
[
amount
floatValue
]
];
NSString
*
amountStr
=
[
CalculateHelper
getMoneyStringFrom
:
amount
];
weakSelf
.
todayTotalAmount
=
amountStr
;
}
else
{
weakSelf
.
todayTotalAmount
=
@"0"
;
...
...
@@ -420,10 +423,10 @@ ON_WILL_APPEAR( signal )
NSArray
*
array
=
[
self
.
cellDataDic
objectForKey
:
obj
];
count
=
[
CalculateHelper
calculateNum1
:
count
num2
:
array
[
0
]
type
:
CalculateTypeAdd
roundingType
:
NSRoundPlain
cutLenth
:
2
];
}
self
.
totalView
.
labelTotal
.
text
=
[
count
stringValue
];
self
.
totalView
.
labelTotal
.
text
=
[
CalculateHelper
getMoneyStringFrom
:
count
];
self
.
topView
.
textFieldTotalAmount
.
text
=
[[
CalculateHelper
calculateNum1
:
count
num2
:
self
.
todayTotalAmount
type
:
CalculateTypeAdd
roundingType
:
NSRoundPlain
cutLenth
:
2
]
stringValue
];
NSDecimalNumber
*
result
=
[
CalculateHelper
calculateNum1
:
count
num2
:
self
.
todayTotalAmount
type
:
CalculateTypeAdd
roundingType
:
NSRoundPlain
cutLenth
:
2
];
self
.
topView
.
textFieldTotalAmount
.
text
=
[
CalculateHelper
getMoneyStringFrom
:
result
];
}
-
(
id
)
viewWithNibName
:
(
NSString
*
)
viewName
{
...
...
@@ -446,7 +449,7 @@ ON_WILL_APPEAR( signal )
case
SalesInputViewControllerTypeAudit
:
{
if
(
!
[
self
.
cellDataDic
objectForKey
:
indextPath
])
{
SalesInputLines
*
line
=
self
.
model
.
lines
[
indextPath
.
row
];
[
self
.
cellDataDic
setObject
:@[[
NSString
stringWithFormat
:
@"%.
0
f"
,
line
.
amount
]]
forKey
:
indextPath
];
[
self
.
cellDataDic
setObject
:@[[
NSString
stringWithFormat
:
@"%.
2
f"
,
line
.
amount
]]
forKey
:
indextPath
];
}
break
;
...
...
@@ -516,6 +519,7 @@ ON_WILL_APPEAR( signal )
}
-
(
void
)
submit
{
if
(
self
.
shop
==
nil
)
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"请选择商铺!"
delegate
:
nil
cancelButtonTitle
:
@"确定"
otherButtonTitles
:
nil
,
nil
];
...
...
@@ -591,6 +595,7 @@ ON_WILL_APPEAR( signal )
successHud
.
mode
=
MBProgressHUDModeText
;
if
([
data
[
@"message"
]
isEqualToString
:
@"ok"
])
{
successHud
.
labelText
=
@"提交成功!"
;
weakSelf
.
totalView
.
textFieldBillCount
.
text
=
0
;
weakSelf
.
arrPics
=
nil
;
[
weakSelf
.
selectedAssets
removeAllObjects
];
[
weakSelf
.
cellDataDic
removeAllObjects
];
...
...
@@ -654,6 +659,11 @@ ON_WILL_APPEAR( signal )
/** 审批通过 */
-
(
void
)
audit
{
//如果是只读的,那么就返回
if
(
self
.
isReadOnly
)
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
return
;
}
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
@"确认审核通过?"
message
:
nil
preferredStyle
:
UIAlertControllerStyleAlert
];
...
...
vanke/view_iPhone/templates/salesInput/View/SaleInputPictureTableViewCell.h
View file @
6a162f7b
...
...
@@ -14,6 +14,7 @@ typedef void (^actionBlock)(NSInteger);
@property
(
nonatomic
,
copy
)
actionBlock
addPicBlock
;
@property
(
nonatomic
,
copy
)
actionBlock
seePicBlock
;
@property
(
nonatomic
,
copy
)
actionBlock
deleteBolock
;
@property
(
nonatomic
,
assign
)
BOOL
isLast
;
-
(
void
)
setUpCellWithPictureArr
:(
NSMutableArray
*
)
arrPic
indexPath
:(
NSIndexPath
*
)
indexPath
;
...
...
vanke/view_iPhone/templates/salesInput/View/SalesInputTableViewCell.h
View file @
6a162f7b
...
...
@@ -12,6 +12,7 @@ typedef void (^myBlock)(NSArray *);
@property
(
nonatomic
,
copy
)
myBlock
updateCellData
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
paymentType
;
@property
(
weak
,
nonatomic
)
IBOutlet
UITextField
*
textFieldAmount
;
-
(
void
)
cellWithArray
:(
NSArray
*
)
array
;
...
...
vanke/view_iPhone/templates/salesInput/View/SalesInputTableViewCell.m
View file @
6a162f7b
...
...
@@ -8,8 +8,7 @@
#import "SalesInputTableViewCell.h"
@interface
SalesInputTableViewCell
()
<
UITextFieldDelegate
>
@property
(
weak
,
nonatomic
)
IBOutlet
UITextField
*
textFieldAmount
;
@interface
SalesInputTableViewCell
()
<
UITextFieldDelegate
>
@end
...
...
@@ -18,80 +17,105 @@
-
(
void
)
awakeFromNib
{
self
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
self
.
textFieldAmount
.
delegate
=
self
;
// self.txtfieldSum.delegate = self;
// Initialization code
// self.txtfieldSum.delegate = self;
// Initialization code
}
-
(
void
)
cellWithArray
:
(
NSArray
*
)
array
{
self
.
textFieldAmount
.
text
=
array
[
0
];
// self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0];
// self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0];
}
//结束编辑
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
{
NSLog
(
@"textField end editing"
);
if
([
textField
.
text
isEqualToString
:
@"."
]
||
[
textField
.
text
isEqualToString
:
@"-"
])
{
textField
.
text
=
@""
;
}
self
.
updateCellData
(@[
self
.
textFieldAmount
.
text
]);
}
-
(
BOOL
)
textField
:
(
UITextField
*
)
textField
shouldChangeCharactersInRange
:
(
NSRange
)
range
replacementString
:
(
NSString
*
)
string
{
NSArray
*
valideInput
=
@[
@"0"
,
@"1"
,
@"2"
,
@"3"
,
@"4"
,
@"5"
,
@"6"
,
@"7"
,
@"8"
,
@"9"
,
@"-"
,
@"
"
];
NSArray
*
valideInput
=
@[
@"0"
,
@"1"
,
@"2"
,
@"3"
,
@"4"
,
@"5"
,
@"6"
,
@"7"
,
@"8"
,
@"9"
,
@"-"
,
@""
,
@".
"
];
if
([
valideInput
containsObject
:
string
])
{
if
(
textField
.
text
.
length
>
0
&&
[
string
isEqualToString
:
@"-"
])
{
return
NO
;
}
NSMutableString
*
futureString
=
[
NSMutableString
stringWithString
:
textField
.
text
];
[
futureString
insertString
:
string
atIndex
:
range
.
location
];
NSMutableString
*
futureString
=
[
NSMutableString
stringWithString
:
textField
.
text
];
[
futureString
insertString
:
string
atIndex
:
range
.
location
];
if
([
futureString
hasPrefix
:
@"."
]
||
[
futureString
hasPrefix
:
@"00"
]
||
[
futureString
hasPrefix
:
@"-."
]
||
futureString
.
length
>
11
)
{
return
NO
;
}
NSInteger
flag
=
0
;
NSInteger
pointNum
=
0
;
//用于标记-的数量,只能有一个-
const
NSInteger
limited
=
20
;
//限制小数点后面的位数
for
(
int
i
=
(
int
)
futureString
.
length
-
1
;
i
>=
0
;
i
--
)
{
NSInteger
pointNum
=
0
;
//用于标记-的数量,只能有一个-
const
NSInteger
limited
=
20
;
//限制小数点后面的位数
for
(
int
i
=
(
int
)
futureString
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
([
futureString
characterAtIndex
:
i
]
==
'-'
)
{
pointNum
++
;
if
(
pointNum
==
2
)
{
return
NO
;
}
}
}
for
(
int
i
=
(
int
)
futureString
.
length
-
1
;
i
>=
0
;
i
--
)
{
for
(
int
i
=
(
int
)
futureString
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
([
futureString
characterAtIndex
:
i
]
==
'-'
)
{
if
(
flag
>
limited
)
{
return
NO
;
}
break
;
}
flag
++
;
}
NSInteger
flag1
=
0
;
NSInteger
pointNum1
=
0
;
//用于标记.的数量,只能有一个.
const
NSInteger
limited1
=
2
;
//限制小数点后面的位数
for
(
int
i
=
(
int
)
futureString
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
([
futureString
characterAtIndex
:
i
]
==
'.'
)
{
pointNum1
++
;
if
(
pointNum1
==
2
)
{
return
NO
;
}
}
}
for
(
int
i
=
(
int
)
futureString
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
([
futureString
characterAtIndex
:
i
]
==
'.'
)
{
if
(
flag1
>
limited1
)
{
return
NO
;
}
break
;
}
flag1
++
;
}
return
YES
;
}
else
{
}
else
{
return
NO
;
}
}
-
(
void
)
textFieldDidBeginEditing
:
(
UITextField
*
)
textField
{
-
(
void
)
textFieldDidBeginEditing
:
(
UITextField
*
)
textField
{
[
textField
selectAll
:
self
];
}
...
...
vanke/view_iPhone/templates/salesInput/View/SalesInputTotalVIew.m
View file @
6a162f7b
...
...
@@ -31,6 +31,11 @@
}
NSMutableString
*
futureString
=
[
NSMutableString
stringWithString
:
textField
.
text
];
[
futureString
insertString
:
string
atIndex
:
range
.
location
];
if
([
futureString
hasPrefix
:
@"0"
]
||
[
futureString
hasPrefix
:
@"-0"
]
||
futureString
.
length
>
6
)
{
return
NO
;
}
NSInteger
flag
=
0
;
NSInteger
pointNum
=
0
;
//用于标记-的数量,只能有一个-
const
NSInteger
limited
=
20
;
//限制小数点后面的位数
...
...
vanke/view_iPhone/templates/statements/Statement.storyboard
View file @
6a162f7b
<?xml version="1.0" encoding="UTF-8"
standalone="no"
?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"9531"
systemVersion=
"1
5E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"9531"
systemVersion=
"1
6A323
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"9529"
/>
...
...
@@ -548,7 +548,7 @@
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"RVD-1S-Uuk"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"-
664.5"
y=
"2672
.5"
/>
<point
key=
"canvasLocation"
x=
"-
227.5"
y=
"2908
.5"
/>
</scene>
<!--Statement Detail View Controller-->
<scene
sceneID=
"VuM-mH-kRs"
>
...
...
@@ -1078,7 +1078,7 @@
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"llf-hx-tX7"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"-7
25.5"
y=
"3453
.5"
/>
<point
key=
"canvasLocation"
x=
"-7
09.5"
y=
"3057
.5"
/>
</scene>
</scenes>
<resources>
...
...
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