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
a8d95938
Commit
a8d95938
authored
Jul 18, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售录入对账单附件查看、
parent
e3151944
Show whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
1416 additions
and
138 deletions
+1416
-138
project.pbxproj
vanke.xcodeproj/project.pbxproj
+58
-0
CalculateHelper.h
vanke/3rd/CalculateHelper.h
+41
-0
CalculateHelper.m
vanke/3rd/CalculateHelper.m
+81
-0
NSDate+FormatterAdditions.h
vanke/3rd/General/Categories/NSDate+FormatterAdditions.h
+2
-1
NSDate+FormatterAdditions.m
vanke/3rd/General/Categories/NSDate+FormatterAdditions.m
+48
-0
ICRHTTPController.h
vanke/3rd/HTTPController/ICRHTTPController.h
+1
-1
ICRHTTPController.m
vanke/3rd/HTTPController/ICRHTTPController.m
+1
-0
OtherHeaders.h
vanke/OtherHeaders.h
+7
-0
Compass.h
vanke/view_iPhone/templates/report/Model/Compass.h
+29
-0
ReportBoardsViewController.m
...view_iPhone/templates/report/ReportBoardsViewController.m
+14
-3
ReportViewController.h
vanke/view_iPhone/templates/report/ReportViewController.h
+1
-0
ReportViewController.m
vanke/view_iPhone/templates/report/ReportViewController.m
+50
-91
CustomSegView.h
vanke/view_iPhone/templates/report/Views/CustomSegView.h
+1
-0
CustomSegView.m
vanke/view_iPhone/templates/report/Views/CustomSegView.m
+8
-6
RSaleView.m
vanke/view_iPhone/templates/report/Views/RSaleView.m
+23
-11
SaleHeaderView.m
vanke/view_iPhone/templates/report/Views/SaleHeaderView.m
+2
-2
SaleViewCell.m
vanke/view_iPhone/templates/report/Views/SaleViewCell.m
+8
-3
GalleryViewController.h
...e/templates/salesInput/Controller/GalleryViewController.h
+16
-0
GalleryViewController.m
...e/templates/salesInput/Controller/GalleryViewController.m
+71
-0
HistoryViewController.m
...e/templates/salesInput/Controller/HistoryViewController.m
+26
-5
SaleInputPicCollectionViewController.h
...esInput/Controller/SaleInputPicCollectionViewController.h
+15
-0
SaleInputPicCollectionViewController.m
...esInput/Controller/SaleInputPicCollectionViewController.m
+132
-0
SalesInPut.storyboard
...one/templates/salesInput/Controller/SalesInPut.storyboard
+123
-0
SalesInputViewController.m
...emplates/salesInput/Controller/SalesInputViewController.m
+1
-1
AttachmentModel.h
.../view_iPhone/templates/salesInput/Model/AttachmentModel.h
+19
-0
AttachmentModel.m
.../view_iPhone/templates/salesInput/Model/AttachmentModel.m
+16
-0
GalleryCollectionViewCell.h
...one/templates/salesInput/View/GalleryCollectionViewCell.h
+17
-0
GalleryCollectionViewCell.m
...one/templates/salesInput/View/GalleryCollectionViewCell.m
+37
-0
SaleInputPicCollectionViewCell.h
...emplates/salesInput/View/SaleInputPicCollectionViewCell.h
+14
-0
SaleInputPicCollectionViewCell.m
...emplates/salesInput/View/SaleInputPicCollectionViewCell.m
+21
-0
SaleInputPictureTableViewCell.m
...templates/salesInput/View/SaleInputPictureTableViewCell.m
+3
-4
SingleScrollView.h
.../view_iPhone/templates/salesInput/View/SingleScrollView.h
+15
-0
SingleScrollView.m
.../view_iPhone/templates/salesInput/View/SingleScrollView.m
+89
-0
Items.h
vanke/view_iPhone/templates/statements/Models/Items.h
+27
-0
Items.m
vanke/view_iPhone/templates/statements/Models/Items.m
+144
-0
StatementModel.h
.../view_iPhone/templates/statements/Models/StatementModel.h
+29
-0
StatementModel.m
.../view_iPhone/templates/statements/Models/StatementModel.m
+181
-0
Statement.storyboard
vanke/view_iPhone/templates/statements/Statement.storyboard
+2
-1
StatementViewController.m
...ates/statements/ViewControllers/StatementViewController.m
+33
-7
StatementTableViewCell.h
...Phone/templates/statements/Views/StatementTableViewCell.h
+2
-2
StatementTableViewCell.m
...Phone/templates/statements/Views/StatementTableViewCell.m
+8
-0
No files found.
vanke.xcodeproj/project.pbxproj
View file @
a8d95938
...
...
@@ -48,6 +48,16 @@
19994DB91D34F9A40089A129
/* CustomSegView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19994DB81D34F9A40089A129
/* CustomSegView.m */
;
};
19994DBC1D34FFB70089A129
/* FinishTimeView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19994DBB1D34FFB70089A129
/* FinishTimeView.m */
;
};
19994DBF1D3500030089A129
/* QueryOrder.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19994DBE1D3500030089A129
/* QueryOrder.m */
;
};
19B34CBE1D3A124E0060E272
/* CalculateHelper.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CBD1D3A124E0060E272
/* CalculateHelper.m */
;
};
19B34CC31D3B343D0060E272
/* SalesInPut.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CC21D3B343D0060E272
/* SalesInPut.storyboard */
;
};
19B34CC61D3B35BB0060E272
/* SaleInputPicCollectionViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CC51D3B35BB0060E272
/* SaleInputPicCollectionViewController.m */
;
};
19B34CC91D3B36840060E272
/* SaleInputPicCollectionViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CC81D3B36840060E272
/* SaleInputPicCollectionViewCell.m */
;
};
19B34CCC1D3C7C9E0060E272
/* AttachmentModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CCB1D3C7C9E0060E272
/* AttachmentModel.m */
;
};
19B34CD21D3C832B0060E272
/* GalleryCollectionViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CD11D3C832B0060E272
/* GalleryCollectionViewCell.m */
;
};
19B34CD51D3C83D20060E272
/* SingleScrollView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CD41D3C83D20060E272
/* SingleScrollView.m */
;
};
19B34CD81D3C8AF80060E272
/* GalleryViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CD71D3C8AF80060E272
/* GalleryViewController.m */
;
};
19B34CDD1D3CA93B0060E272
/* Items.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CDA1D3CA93B0060E272
/* Items.m */
;
};
19B34CDE1D3CA93B0060E272
/* StatementModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19B34CDC1D3CA93B0060E272
/* StatementModel.m */
;
};
19D76A881D265A1B006245D6
/* TZAssetCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19D76A761D265A1B006245D6
/* TZAssetCell.m */
;
};
19D76A891D265A1B006245D6
/* TZAssetModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19D76A781D265A1B006245D6
/* TZAssetModel.m */
;
};
19D76A8A1D265A1B006245D6
/* TZImageManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
19D76A7A1D265A1B006245D6
/* TZImageManager.m */
;
};
...
...
@@ -838,6 +848,25 @@
19994DBB1D34FFB70089A129
/* FinishTimeView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FinishTimeView.m
;
sourceTree
=
"<group>"
;
};
19994DBD1D3500030089A129
/* QueryOrder.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
QueryOrder.h
;
sourceTree
=
"<group>"
;
};
19994DBE1D3500030089A129
/* QueryOrder.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
QueryOrder.m
;
sourceTree
=
"<group>"
;
};
19B34CBC1D3A124E0060E272
/* CalculateHelper.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CalculateHelper.h
;
sourceTree
=
"<group>"
;
};
19B34CBD1D3A124E0060E272
/* CalculateHelper.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
CalculateHelper.m
;
sourceTree
=
"<group>"
;
};
19B34CC21D3B343D0060E272
/* SalesInPut.storyboard */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.storyboard
;
path
=
SalesInPut.storyboard
;
sourceTree
=
"<group>"
;
};
19B34CC41D3B35BB0060E272
/* SaleInputPicCollectionViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SaleInputPicCollectionViewController.h
;
sourceTree
=
"<group>"
;
};
19B34CC51D3B35BB0060E272
/* SaleInputPicCollectionViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SaleInputPicCollectionViewController.m
;
sourceTree
=
"<group>"
;
};
19B34CC71D3B36840060E272
/* SaleInputPicCollectionViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SaleInputPicCollectionViewCell.h
;
sourceTree
=
"<group>"
;
};
19B34CC81D3B36840060E272
/* SaleInputPicCollectionViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SaleInputPicCollectionViewCell.m
;
sourceTree
=
"<group>"
;
};
19B34CCA1D3C7C9E0060E272
/* AttachmentModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AttachmentModel.h
;
sourceTree
=
"<group>"
;
};
19B34CCB1D3C7C9E0060E272
/* AttachmentModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AttachmentModel.m
;
sourceTree
=
"<group>"
;
};
19B34CD01D3C832B0060E272
/* GalleryCollectionViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GalleryCollectionViewCell.h
;
sourceTree
=
"<group>"
;
};
19B34CD11D3C832B0060E272
/* GalleryCollectionViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GalleryCollectionViewCell.m
;
sourceTree
=
"<group>"
;
};
19B34CD31D3C83D20060E272
/* SingleScrollView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SingleScrollView.h
;
sourceTree
=
"<group>"
;
};
19B34CD41D3C83D20060E272
/* SingleScrollView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SingleScrollView.m
;
sourceTree
=
"<group>"
;
};
19B34CD61D3C8AF80060E272
/* GalleryViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GalleryViewController.h
;
sourceTree
=
"<group>"
;
};
19B34CD71D3C8AF80060E272
/* GalleryViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GalleryViewController.m
;
sourceTree
=
"<group>"
;
};
19B34CD91D3CA93B0060E272
/* Items.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Items.h
;
sourceTree
=
"<group>"
;
};
19B34CDA1D3CA93B0060E272
/* Items.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
Items.m
;
sourceTree
=
"<group>"
;
};
19B34CDB1D3CA93B0060E272
/* StatementModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
StatementModel.h
;
sourceTree
=
"<group>"
;
};
19B34CDC1D3CA93B0060E272
/* StatementModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
StatementModel.m
;
sourceTree
=
"<group>"
;
};
19D76A751D265A1B006245D6
/* TZAssetCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TZAssetCell.h
;
sourceTree
=
"<group>"
;
};
19D76A761D265A1B006245D6
/* TZAssetCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
TZAssetCell.m
;
sourceTree
=
"<group>"
;
};
19D76A771D265A1B006245D6
/* TZAssetModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
TZAssetModel.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2121,6 +2150,11 @@
19D76A9A1D266780006245D6
/* SalesInputViewController.m */
,
1912FCF21CCF1493004CF976
/* ChooseProjectTableViewController.h */
,
1912FCF31CCF1493004CF976
/* ChooseProjectTableViewController.m */
,
19B34CC21D3B343D0060E272
/* SalesInPut.storyboard */
,
19B34CC41D3B35BB0060E272
/* SaleInputPicCollectionViewController.h */
,
19B34CC51D3B35BB0060E272
/* SaleInputPicCollectionViewController.m */
,
19B34CD61D3C8AF80060E272
/* GalleryViewController.h */
,
19B34CD71D3C8AF80060E272
/* GalleryViewController.m */
,
);
path
=
Controller
;
sourceTree
=
"<group>"
;
...
...
@@ -2130,6 +2164,8 @@
children
=
(
1912FCE11CCDECF8004CF976
/* PaymentTypeModel.h */
,
1912FCE21CCDECF8004CF976
/* PaymentTypeModel.m */
,
19B34CCA1D3C7C9E0060E272
/* AttachmentModel.h */
,
19B34CCB1D3C7C9E0060E272
/* AttachmentModel.m */
,
);
path
=
Model
;
sourceTree
=
"<group>"
;
...
...
@@ -2158,6 +2194,12 @@
1912FCE61CCDF20F004CF976
/* SalesInputCommitView.h */
,
1912FCE71CCDF20F004CF976
/* SalesInputCommitView.m */
,
1912FCE41CCDF1F6004CF976
/* SalesInputCommitView.xib */
,
19B34CC71D3B36840060E272
/* SaleInputPicCollectionViewCell.h */
,
19B34CC81D3B36840060E272
/* SaleInputPicCollectionViewCell.m */
,
19B34CD01D3C832B0060E272
/* GalleryCollectionViewCell.h */
,
19B34CD11D3C832B0060E272
/* GalleryCollectionViewCell.m */
,
19B34CD31D3C83D20060E272
/* SingleScrollView.h */
,
19B34CD41D3C83D20060E272
/* SingleScrollView.m */
,
);
path
=
View
;
sourceTree
=
"<group>"
;
...
...
@@ -2177,6 +2219,10 @@
19605F7C1D37597300C20590
/* Models */
=
{
isa
=
PBXGroup
;
children
=
(
19B34CD91D3CA93B0060E272
/* Items.h */
,
19B34CDA1D3CA93B0060E272
/* Items.m */
,
19B34CDB1D3CA93B0060E272
/* StatementModel.h */
,
19B34CDC1D3CA93B0060E272
/* StatementModel.m */
,
19605F7D1D37597300C20590
/* StatementListParamModel.h */
,
19605F7E1D37597300C20590
/* StatementListParamModel.m */
,
);
...
...
@@ -2285,6 +2331,8 @@
children
=
(
19605F931D375A4200C20590
/* BaseViewController.h */
,
19605F941D375A4200C20590
/* BaseViewController.m */
,
19B34CBC1D3A124E0060E272
/* CalculateHelper.h */
,
19B34CBD1D3A124E0060E272
/* CalculateHelper.m */
,
19D76AA31D266910006245D6
/* CALayer+Addtions.h */
,
19D76AA41D266910006245D6
/* CALayer+Addtions.m */
,
19D76A741D265A1B006245D6
/* TZImagePickerController */
,
...
...
@@ -4673,6 +4721,7 @@
C19BBC291BBE894D00831290
/* user_icon.png in Resources */
,
C11786631C0B416D00DB7E4B
/* bill_default_image@3x.png in Resources */
,
C17ABD531BFCD92200908573
/* VankeStatementDetailMonthCell_iPhone.xml in Resources */
,
19B34CC31D3B343D0060E272
/* SalesInPut.storyboard in Resources */
,
C10F18611BF8ED5D0065F18C
/* VankeStatementMonthCell_iPhone.xml in Resources */
,
C1DED3321BCEC4B40049BB2D
/* business@2x.png in Resources */
,
C14D6F871BB8268800210172
/* right_icon.png in Resources */
,
...
...
@@ -4923,6 +4972,7 @@
C1D598C11BB44B2000D297FE
/* UIView+SwipeGesture.m in Sources */
,
C1D598671BB44B2000D297FE
/* UIView+UINavigationController.m in Sources */
,
C1D598471BB44B2000D297FE
/* Bee_MessageController.mm in Sources */
,
19B34CD21D3C832B0060E272
/* GalleryCollectionViewCell.m in Sources */
,
C1D598731BB44B2000D297FE
/* BeeUIStyle+Property.m in Sources */
,
C19BBC2E1BBE8B5800831290
/* VankeFloorDetailBoard_iPhone.m in Sources */
,
C1D598531BB44B2000D297FE
/* Bee_ViewPackage.mm in Sources */
,
...
...
@@ -5062,8 +5112,10 @@
C1D599911BB44B2100D297FE
/* zip.c in Sources */
,
C1D599551BB44B2100D297FE
/* Bee_HTTPClient.m in Sources */
,
C1D5995A1BB44B2100D297FE
/* NSObject+BeeHTTPRequest.m in Sources */
,
19B34CDE1D3CA93B0060E272
/* StatementModel.m in Sources */
,
C1D598A71BB44B2000D297FE
/* Bee_UINavigationBar.m in Sources */
,
C10F161E1BF77CA00065F18C
/* ICRModifyPwdViewController.m in Sources */
,
19B34CBE1D3A124E0060E272
/* CalculateHelper.m in Sources */
,
C1CF9F3C1BEF30850033C35E
/* VankeNoticeListAPI.m in Sources */
,
C1D5995E1BB44B2100D297FE
/* Bee_HTTPRequest2.m in Sources */
,
C1D5990E1BB44B2000D297FE
/* Bee_UITemplateParser.m in Sources */
,
...
...
@@ -5131,12 +5183,16 @@
C1D598551BB44B2000D297FE
/* Bee_UIMetrics.m in Sources */
,
1912FCE81CCDF20F004CF976
/* SalesInputCommitView.m in Sources */
,
C1D598E31BB44B2000D297FE
/* UIScrollView+BeeUILayout.m in Sources */
,
19B34CC91D3B36840060E272
/* SaleInputPicCollectionViewCell.m in Sources */
,
C1D5987D1BB44B2000D297FE
/* UIView+BeeUIStyle.m in Sources */
,
19B34CD81D3C8AF80060E272
/* GalleryViewController.m in Sources */
,
C1F790AB1C07600E001AEBBB
/* VankeStatementConfirmModel.m in Sources */
,
C1D5988A1BB44B2000D297FE
/* Bee_UIAnimationStyling.m in Sources */
,
C1D599571BB44B2100D297FE
/* Bee_HTTPConfig.m in Sources */
,
C1D599501BB44B2100D297FE
/* Bee_Language.m in Sources */
,
19B34CC61D3B35BB0060E272
/* SaleInputPicCollectionViewController.m in Sources */
,
19000E861CC6215000DF8D71
/* ChooseShopViewController.m in Sources */
,
19B34CDD1D3CA93B0060E272
/* Items.m in Sources */
,
C1D5993E1BB44B2100D297FE
/* NSArray+BeeExtension.mm in Sources */
,
C10F18331BF7ACA80065F18C
/* IBTRefreshTableView.m in Sources */
,
C10F18421BF7ACA80065F18C
/* IBTTableViewCell.m in Sources */
,
...
...
@@ -5297,6 +5353,7 @@
C1D599411BB44B2100D297FE
/* NSDate+BeeExtension.mm in Sources */
,
C1D5998F1BB44B2100D297FE
/* mztools.c in Sources */
,
C1D598F81BB44B2000D297FE
/* BeeUIQuery+Offset.m in Sources */
,
19B34CCC1D3C7C9E0060E272
/* AttachmentModel.m in Sources */
,
C1D5986E1BB44B2000D297FE
/* UIViewController+UINavigationController.m in Sources */
,
1912FCE31CCDECF8004CF976
/* PaymentTypeModel.m in Sources */
,
19D76A8C1D265A1B006245D6
/* TZImagePickerController.m in Sources */
,
...
...
@@ -5383,6 +5440,7 @@
C17ABD521BFCD92200908573
/* VankeStatementDetailMonthCell_iPhone.m in Sources */
,
C10F18281BF7ACA80065F18C
/* ICRAttachmentView.m in Sources */
,
19994DB61D34F9490089A129
/* ReportViewController.m in Sources */
,
19B34CD51D3C83D20060E272
/* SingleScrollView.m in Sources */
,
C1D5992B1BB44B2100D297FE
/* Bee_Database.mm in Sources */
,
C1D599021BB44B2000D297FE
/* UIViewController+Transition.m in Sources */
,
C1D598AE1BB44B2000D297FE
/* Bee_UISegmentedControl.m in Sources */
,
...
...
vanke/3rd/CalculateHelper.h
0 → 100644
View file @
a8d95938
//
// CalculateHelper.h
// XFFruit
//
// Created by Z on 16/7/14.
// Copyright © 2016年 Xummer. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef
NS_ENUM
(
NSInteger
,
CalculateType
)
{
CalculateTypeAdd
=
0
,
//加
CalculateTypeSub
,
//减
CalculateTypeMul
,
//乘
CalculateTypeDiv
//除
};
@interface
CalculateHelper
:
NSObject
/*
NSRoundPlain, // Round up on a tie //貌似取整
NSRoundDown, // Always down == truncate //只舍不入
NSRoundUp, // Always up // 只入不舍
NSRoundBankers // on a tie round so last digit is even 貌似四舍五入
*/
/**
* 计算
*
* @param num1 第一个数字
* @param num2 第二个数字
* @param type 计算类型(加减乘除)
* @param roundingType 四舍五入类型
* @param coutLenth 小数点后面保留几位
*
* @return 结算结果
*/
+
(
NSDecimalNumber
*
)
calculateNum1
:(
id
)
num1
num2
:(
id
)
num2
type
:(
CalculateType
)
type
roundingType
:(
NSRoundingMode
)
roundingType
cutLenth
:(
NSInteger
)
coutLenth
;
/** 一百倍 */
+
(
NSDecimalNumber
*
)
oneHundredTimes
:(
id
)
num
;
@end
vanke/3rd/CalculateHelper.m
0 → 100644
View file @
a8d95938
//
// CalculateHelper.m
// XFFruit
//
// Created by Z on 16/7/14.
// Copyright © 2016年 Xummer. All rights reserved.
//
#import "CalculateHelper.h"
@implementation
CalculateHelper
+
(
NSDecimalNumber
*
)
calculateNum1
:(
id
)
num1
num2
:(
id
)
num2
type
:(
CalculateType
)
type
roundingType
:(
NSRoundingMode
)
roundingType
cutLenth
:(
NSInteger
)
coutLenth
{
NSDecimalNumberHandler
*
roundUp
=
[
NSDecimalNumberHandler
decimalNumberHandlerWithRoundingMode
:
roundingType
scale
:
coutLenth
raiseOnExactness:
NO
raiseOnOverflow:
NO
raiseOnUnderflow:
NO
raiseOnDivideByZero:
YES
];
NSDecimalNumber
*
decimalNum1
=
[
self
changeType
:
num1
];
NSDecimalNumber
*
decimalNum2
=
[
self
changeType
:
num2
];
if
(
decimalNum1
==
nil
||
decimalNum2
==
nil
)
{
return
nil
;
}
NSDecimalNumber
*
decimalResult
;
NSString
*
result
;
switch
(
type
)
{
case
CalculateTypeAdd
:
{
decimalResult
=
[
decimalNum1
decimalNumberByAdding
:
decimalNum2
withBehavior
:
roundUp
];
result
=
[
decimalResult
stringValue
];
break
;
}
case
CalculateTypeSub
:
{
decimalResult
=
[
decimalNum1
decimalNumberBySubtracting
:
decimalNum2
withBehavior
:
roundUp
];
result
=
[
decimalResult
stringValue
];
break
;
}
case
CalculateTypeMul
:
{
decimalResult
=
[
decimalNum1
decimalNumberByMultiplyingBy
:
decimalNum2
withBehavior
:
roundUp
];
result
=
[
decimalResult
stringValue
];
break
;
}
case
CalculateTypeDiv
:
{
decimalResult
=
[
decimalNum1
decimalNumberByDividingBy
:
decimalNum2
withBehavior
:
roundUp
];
result
=
[
decimalResult
stringValue
];
break
;
}
}
return
decimalResult
;
}
+
(
NSDecimalNumber
*
)
changeType
:(
id
)
num1
{
NSDecimalNumber
*
decimalNum1
;
if
([
num1
isKindOfClass
:[
NSDecimalNumber
class
]])
{
decimalNum1
=
num1
;
}
else
if
([
num1
isKindOfClass
:[
NSString
class
]]){
decimalNum1
=
[
NSDecimalNumber
decimalNumberWithString
:
num1
];
}
else
if
([
num1
isKindOfClass
:[
NSNumber
class
]]){
decimalNum1
=
[
NSDecimalNumber
decimalNumberWithDecimal
:[
num1
decimalValue
]];
}
else
{
return
nil
;
}
return
decimalNum1
;
}
+
(
NSDecimalNumber
*
)
oneHundredTimes
:(
id
)
num
{
return
[
self
calculateNum1
:
num
num2
:
@100
type
:
CalculateTypeMul
roundingType
:
NSRoundBankers
cutLenth
:
10
];
}
@end
vanke/3rd/General/Categories/NSDate+FormatterAdditions.h
View file @
a8d95938
...
...
@@ -114,7 +114,8 @@
@see timeInWordsIncludingSeconds:
*/
+
(
NSString
*
)
timeInWordsFromTimeInterval
:(
NSTimeInterval
)
intervalInSeconds
includingSeconds
:(
BOOL
)
includeSeconds
;
/** 该日期是该年的第几周 */
-
(
NSInteger
)
getWeekOfYear
;
@end
@interface
NSDate
(
DateFormatterAdditions
)
...
...
vanke/3rd/General/Categories/NSDate+FormatterAdditions.m
View file @
a8d95938
...
...
@@ -360,6 +360,54 @@
return
[[
self
class
]
timeInWordsFromTimeInterval
:
fabs
([
self
timeIntervalSinceNow
])
includingSeconds
:
includeSeconds
];
}
/** 该日期是该年的第几周 */
-
(
NSInteger
)
getWeekOfYear
{
NSInteger
i
;
NSInteger
year
=
[
self
getYear
];
NSDate
*
date
=
[
self
endOfWeek
];
for
(
i
=
1
;[[
date
dateAfterDay
:
-
7
*
i
]
getYear
]
==
year
;
i
++
)
{
}
return
i
;
}
//获取年
-
(
NSUInteger
)
getYear
{
NSCalendar
*
calendar
=
[
NSCalendar
currentCalendar
];
NSDateComponents
*
dayComponents
=
[
calendar
components
:(
NSYearCalendarUnit
)
fromDate
:
self
];
return
[
dayComponents
year
];
}
//返回当前周的周末
-
(
NSDate
*
)
endOfWeek
{
NSCalendar
*
calendar
=
[
NSCalendar
currentCalendar
];
// Get the weekday component of the current date
NSDateComponents
*
weekdayComponents
=
[
calendar
components
:
NSWeekdayCalendarUnit
fromDate
:
self
];
NSDateComponents
*
componentsToAdd
=
[[
NSDateComponents
alloc
]
init
];
// to get the end of week for a particular date, add (7 - weekday) days
[
componentsToAdd
setDay
:(
7
-
[
weekdayComponents
weekday
])];
NSDate
*
endOfWeek
=
[
calendar
dateByAddingComponents
:
componentsToAdd
toDate
:
self
options
:
0
];
// [componentsToAdd release];
return
endOfWeek
;
}
//返回day天后的日期(若day为负数,则为|day|天前的日期)
-
(
NSDate
*
)
dateAfterDay
:
(
NSInteger
)
day
{
NSCalendar
*
calendar
=
[
NSCalendar
currentCalendar
];
// Get the weekday component of the current date
// NSDateComponents *weekdayComponents = [calendar components:NSWeekdayCalendarUnit fromDate:self];
NSDateComponents
*
componentsToAdd
=
[[
NSDateComponents
alloc
]
init
];
// to get the end of week for a particular date, add (7 - weekday) days
[
componentsToAdd
setDay
:
day
];
NSDate
*
dateAfterDay
=
[
calendar
dateByAddingComponents
:
componentsToAdd
toDate
:
self
options
:
0
];
return
dateAfterDay
;
}
@end
@implementation
NSDate
(
DateFormatterAdditions
)
...
...
vanke/3rd/HTTPController/ICRHTTPController.h
View file @
a8d95938
...
...
@@ -13,7 +13,7 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
kAttachmentBoard
=
0
,
kAttachmentAnswer
,
kAttachmentTask
,
kAttachmentSaleInput
,
// Insert enum here
kAttachmentTypeCount
,
};
...
...
vanke/3rd/HTTPController/ICRHTTPController.m
View file @
a8d95938
...
...
@@ -124,6 +124,7 @@ static NSString * const ICRHTTPInterface[] = {
static
NSString
*
const
ICRAttachmentTypeValue
[]
=
{
[
kAttachmentBoard
]
=
@"board"
,
[
kAttachmentAnswer
]
=
@"answer"
,
[
kAttachmentSaleInput
]
=
@"salesInput"
,
[
kAttachmentTask
]
=
@"task"
,
};
...
...
vanke/OtherHeaders.h
View file @
a8d95938
...
...
@@ -15,9 +15,11 @@
#import "IBTCustomButtom.h"
#import "VankeCommonModel.h"
#import "ICRHTTPController.h"
#import "VankeConfig.h"
#define KNOTIFICATION_GetNextDetailData @"KNOTIFICATION_GetNextDetailData"
#define KNOTIFICATION_GoReportDetail @"KNOTIFICATION_GoReportDetail"
#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self
#define HexColor(colorStr) [UIColor colorWithHexString:colorStr]
#define GXF_NAVIGAYION_COLOR HexColor(@"7ebf74")
...
...
@@ -29,6 +31,8 @@
#define GXF_LINE_COLOR HexColor(@"e5e5e5")
#define GXF_DETAIL_COLOR HexColor(@"888888")
#define GXF_LEFTSIX_COLOR HexColor(@"666666")
#define kMainBlueColor [UIColor colorWithRed:0.278 green:0.561 blue:0.945 alpha:1.000]
//报表统一颜色
#define ReportColor GXF_NAVIGAYION_COLOR
#define ReportContentColor HexColor(@"f4422e")
...
...
@@ -67,6 +71,9 @@
#define GXF_SIXTEENTEH_SIZE FontSize(16)
#define GXF_SEVENTEENTH_SIZE FontSize(17)
//查看报表
#define REPORT_TYPE_FLOOR @"floor" //楼层销售
#define REPORT_TYPE_BIZ @"biz" //业态销售
/*
* Clog
*/
...
...
vanke/view_iPhone/templates/report/Model/Compass.h
View file @
a8d95938
...
...
@@ -9,6 +9,8 @@
#import "IBTModel.h"
@interface
Compass
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
dataScopeType
;
// 统计时间类型 否 String 100 day(日),week(周),month(月)
@property
(
nonatomic
,
strong
)
NSString
*
dataScope
;
...
...
@@ -75,4 +77,31 @@
//毛利率同比增减率 是 Double
@property
(
nonatomic
,
assign
)
BOOL
expand
;
//该节点是否处于展开状态
@property
(
nonatomic
,
assign
)
BOOL
isLeaf
;
@property
(
nonatomic
,
copy
)
NSString
*
create_time
;
/** 坪效 */
@property
(
nonatomic
,
strong
)
NSNumber
*
groundEffect
;
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
lastModify_operName
;
@property
(
nonatomic
,
strong
)
NSNumber
*
version
;
@property
(
nonatomic
,
copy
)
NSString
*
dateScopeType
;
/** 销售同比历史数值 */
@property
(
nonatomic
,
strong
)
NSNumber
*
salesYoY
;
@property
(
nonatomic
,
copy
)
NSString
*
create_operName
;
@property
(
nonatomic
,
copy
)
NSString
*
create_id
;
@property
(
nonatomic
,
copy
)
NSString
*
lastModify_time
;
/** 销售环比历史数值 */
@property
(
nonatomic
,
strong
)
NSNumber
*
salesChain
;
@property
(
nonatomic
,
copy
)
NSString
*
enterprise
;
@property
(
nonatomic
,
copy
)
NSString
*
lastModify_id
;
@end
vanke/view_iPhone/templates/report/ReportBoardsViewController.m
View file @
a8d95938
...
...
@@ -10,6 +10,7 @@
#import "ReportBoardTableViewCell.h"
#import "ReportViewController.h"
static
NSString
*
const
cellId
=
@"cellId"
;
@interface
ReportBoardsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSArray
*
arrTitles
;
...
...
@@ -59,18 +60,28 @@ ON_DID_APPEAR( signal )
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
ReportViewController
*
reportVC
=
[[
ReportViewController
alloc
]
init
];
reportVC
.
hidesBottomBarWhenPushed
=
YES
;
switch
(
indexPath
.
row
)
{
case
0
:
{
ReportViewController
*
reportVC
=
[[
ReportViewController
alloc
]
init
];
reportVC
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
reportVC
animated
:
YES
];
reportVC
.
title
=
@"楼层销售报表"
;
reportVC
.
reportType
=
REPORT_TYPE_FLOOR
;
}
break
;
case
1
:
{
reportVC
.
title
=
@"业态销售报表"
;
reportVC
.
reportType
=
REPORT_TYPE_BIZ
;
}
break
;
default
:
break
;
}
[
self
.
navigationController
pushViewController
:
reportVC
animated
:
YES
];
}
#pragma mark - tableView dataSource
...
...
vanke/view_iPhone/templates/report/ReportViewController.h
View file @
a8d95938
...
...
@@ -9,5 +9,6 @@
#import "ICRBaseViewController.h"
@interface
ReportViewController
:
ICRBaseViewController
@property
(
nonatomic
,
copy
)
NSString
*
reportType
;
@end
vanke/view_iPhone/templates/report/ReportViewController.m
View file @
a8d95938
...
...
@@ -15,13 +15,12 @@
#import "FinishTimeView.h"
//#import "SearchReportViewController.h"
#import "QueryOrder.h"
#import "CalculateHelper.h"
//#import "ReportDetailViewController.h"
@interface
ReportViewController
()
<
UIScrollViewDelegate
,
CustomSegViewDelegate
,
FinishTimeViewDelegate
>
{
SaleViewController
*
svc
;
// PassengerViewController *pvc;
// PassgerPriceViewController *ppvc;
// GrossRateViewController *gvc;
NSInteger
_currentView
;
NSInteger
_oldView
;
CGRect
_currentRect
;
...
...
@@ -54,11 +53,9 @@
ON_CREATE_VIEWS
(
signal
)
{
self
.
navigationBarShown
=
YES
;
self
.
navigationBarTitle
=
@"我"
;
self
.
navigationBarLeft
=
nil
;
//添加通知
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getNextDetailData:) name:KNOTIFICATION_GetNextDetailData object:nil];
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(goReoprtDetail:) name:KNOTIFICATION_GoReportDetail object:nil];
UIColor
*
color
=
[
UIColor
colorWithR
:
63
g
:
134
b
:
244
a
:
1
];
if
(
IOS7_OR_LATER
)
{
self
.
navigationController
.
navigationBar
.
barTintColor
=
color
;
...
...
@@ -95,11 +92,12 @@ ON_CREATE_VIEWS( signal )
self
.
totalArr
=
[
NSMutableArray
array
];
self
.
selectArr
=
[
NSMutableArray
array
];
[
self
bulidLayout
];
UIBarButtonItem
*
searchItem
=
[[
UIBarButtonItem
alloc
]
initWith
Image
:[
UIImage
imageNamed
:
@"search"
]
style
:
UIBarButtonItemStylePlain
target
:
self
action
:
@selector
(
searchClick
)];
UIBarButtonItem
*
searchItem
=
[[
UIBarButtonItem
alloc
]
initWith
Title
:
@"切换日期"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
customSegTwoClick
:
)];
self
.
navigationItem
.
rightBarButtonItem
=
searchItem
;
self
.
dayType
=
@"day"
;
self
.
scopeType
=
[
IBTCommon
stringFromDateWithFormat
:[
NSDate
date
]
format
:
@"yyyy-MM-dd"
];
[
self
getDataFromServer
];
#else
CGRect
rect
=
CGRectMake
(
0
,
200
,
self
.
view
.
width
,
30
);
...
...
@@ -123,35 +121,18 @@ ON_CREATE_VIEWS( signal )
}
-
(
void
)
getWeekbydayFromServer
{
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
//赋值
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
self
.
scopeType
=
data
[
@"data"
];
[
self
getDataFromServer
];
}
else
{
[
IBTLoadingView
hideHUDWithText
:
message
];
[
IBTLoadingView
showTips
:
data
];
}
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
// [IBTLoadingView showProgressLabel:@"正在加载..."];
NSDate
*
date
;
if
(
!
_selectDay
)
{
self
.
selectDay
=
[[
NSDate
date
]
localYMDString
];
}
date
=
[
IBTCommon
dateFromStringWithFormat
:
_selectDay
format
:
@"yyyy-MM-dd"
];
// [[ICRHTTPController sharedController] getWeekbydayWithStringDate:[date localYMDString] success:succ failure:fail];
NSInteger
week
=
[
date
getWeekOfYear
];
NSString
*
year
=
[
date
yearString
];
self
.
scopeType
=
[
NSString
stringWithFormat
:
@"%@-%ld"
,
year
,
(
long
)
week
];
[
self
getDataFromServer
];
}
#pragma mark - 获取上部数据
...
...
@@ -166,7 +147,6 @@ ON_CREATE_VIEWS( signal )
[
orderArr
addObject
:[
order
dictForCommit
]];
}
LoginResponseData
*
loginInfo
=
[[
VankeCommonModel
sharedInstance
]
getLoginInfo
];
NSArray
*
arr
=
[[
VankeCommonModel
sharedInstance
]
getAuthOrgs
];
NSMutableArray
*
arrAuthordCode
=
[
NSMutableArray
array
];
for
(
AuthorizedOrg
*
org
in
arr
)
{
...
...
@@ -184,15 +164,15 @@ ON_CREATE_VIEWS( signal )
};
NSString
*
json
=
[
dict
JSONString
];
NSDictionary
*
testParams
=
@{
@"dataType"
:
@"biz"
,
@"dataScopeType"
:
@"day"
,
@"dataScope"
:
@"2016-7-15"
,
@"orgCodes"
:
@"22,33"
,
NSDictionary
*
testParams
=
@{
@"dataType"
:
self
.
reportType
,
@"dataScopeType"
:
self
.
dayType
,
@"dataScope"
:
self
.
scopeType
,
@"orgCodes"
:
authorCodes
,
@"upperOrgCode"
:
[
NSNull
null
],
@"queryOrders"
:
@[@{
@"field"
:
@"salesInfo.orgCode"
,
@"direction"
:
@"asc"
}],
@"pageNumber"
:
@0
,
@"pageSize"
:
@
2
0
};
@"pageSize"
:
@
10
0
};
[[
ICRHTTPController
sharedController
]
postUrl
:
@"salesdata/query"
params
:
testParams
success
:^
(
id
data
)
{
CLog
(
@"%@"
,
data
);
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
...
...
@@ -219,13 +199,30 @@ ON_CREATE_VIEWS( signal )
if
(
success
==
1
)
{
NSDictionary
*
compassDict
=
data
[
@"data"
][
@"salesData"
];
NSArray
*
arr
=
compassDict
[
@"records"
];
if
(
arr
.
count
>
0
)
{
// if (arr.count > 0) {
// for (NSDictionary *comDict in arr) {
// Compass *com = [[Compass alloc]init];
// [com setValuesForKeysWithDictionary:comDict];
// self.compass = com;
// }
// }
Compass
*
com
=
nil
;
for
(
NSDictionary
*
comDict
in
arr
)
{
Compass
*
com
=
[[
Compass
alloc
]
init
];
if
(
!
com
)
{
com
=
[[
Compass
alloc
]
init
];
[
com
setValuesForKeysWithDictionary
:
comDict
];
self
.
compass
=
com
;
}
else
{
Compass
*
obj
=
[[
Compass
alloc
]
init
];
[
obj
setValuesForKeysWithDictionary
:
comDict
];
com
.
sales
=
[
CalculateHelper
calculateNum1
:
com
.
sales
num2
:
obj
.
sales
type
:
CalculateTypeAdd
roundingType
:
NSRoundBankers
cutLenth
:
2
];
com
.
salesChain
=
[
CalculateHelper
calculateNum1
:
com
.
salesChain
num2
:
obj
.
salesChain
type
:
CalculateTypeAdd
roundingType
:
NSRoundBankers
cutLenth
:
2
];
com
.
salesYoY
=
[
CalculateHelper
calculateNum1
:
com
.
salesYoY
num2
:
obj
.
salesYoY
type
:
CalculateTypeAdd
roundingType
:
NSRoundBankers
cutLenth
:
2
];
}
}
self
.
compass
=
com
;
[
self
setValueInScrollView
];
}
else
{
[
IBTLoadingView
showTips
:
message
];
...
...
@@ -244,40 +241,6 @@ ON_CREATE_VIEWS( signal )
//获取底部详情数据
-
(
void
)
getBottomData
:
(
NSIndexPath
*
)
indexPath
{
__weak
typeof
(
self
)
weakSelf
=
self
;
// void(^succ)(id) = ^(id data) {
// __strong __typeof(weakSelf)strongSelf = weakSelf;
// //赋值
// [IBTLoadingView hideHUDWithText:nil];
// [strongSelf downLoadData:data indexPath:indexPath];
// };
// void(^fail)(id) = ^(id data) {
// [IBTLoadingView hideHUDWithText:nil];
// [IBTLoadingView showTips:data];
// };
// LoginResponseData *loginInfo = [[VankeCommonModel sharedInstance] getLoginInfo];
// if (!self.orgScope) {
// self.orgScope = loginInfo.org_uuid;
// }
// NSMutableArray *orderArr =[NSMutableArray array];
// if (orderArr.count == 0) {
// QueryOrder *order = [QueryOrder new];
// order.field = @"orgCode";
// order.direction = @"desc";
// [orderArr addObject:[order dictForCommit]];
// }
// if (indexPath) {
//// [IBTLoadingView showProgressLabel:@"正在加载..."];
// }
// NSDictionary *dict = @{
// @"dataScopeType":self.dayType,
// @"dataScope":self.scopeType,
// @"orgUuid":self.orgScope,
// @"fetchScope":@"childs",
// @"queryOrders":orderArr,
// @"pageNumber":@0,
// @"pageSize":@100
// };
// CLog(@"%@", dict);
NSArray
*
arr
=
[[
VankeCommonModel
sharedInstance
]
getAuthOrgs
];
NSMutableArray
*
arrAuthordCode
=
[
NSMutableArray
array
];
...
...
@@ -285,15 +248,16 @@ ON_CREATE_VIEWS( signal )
[
arrAuthordCode
addObject
:
org
.
code
];
}
NSString
*
authorCodes
=
[
arrAuthordCode
componentsJoinedByString
:
@","
];
NSDictionary
*
testParams
=
@{
@"dataType"
:
@"biz"
,
@"dataScopeType"
:
@"day"
,
@"dataScope"
:
@"2016-7-15"
,
@"orgCodes"
:
self
.
orgScope
?
[
NSNull
null
]
:
@"HSCQ"
,
NSDictionary
*
testParams
=
@{
@"dataType"
:
self
.
reportType
,
@"dataScopeType"
:
self
.
dayType
,
@"dataScope"
:
self
.
scopeType
,
@"orgCodes"
:
self
.
orgScope
?
[
NSNull
null
]
:
@"HSCQ
,NTJY
"
,
@"upperOrgCode"
:
self
.
orgScope
?
self
.
orgScope
:
[
NSNull
null
],
@"queryOrders"
:
@[@{
@"field"
:
@"salesInfo.orgCode"
,
@"direction"
:
@"asc"
}],
@"pageNumber"
:
@0
,
@"pageSize"
:
@20
};
@"pageSize"
:
@100
};
CLog
(
@"%@"
,
testParams
.
JSONString
);
[[
ICRHTTPController
sharedController
]
postUrl
:
@"salesdata/query"
params
:
testParams
success
:^
(
id
data
)
{
CLog
(
@"%@"
,
data
);
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
...
...
@@ -305,8 +269,6 @@ ON_CREATE_VIEWS( signal )
[
IBTLoadingView
showTips
:
data
];
}];
// [[ICRHTTPController sharedController] queryHomepageWith:dict success:succ failure:fail];
}
-
(
void
)
downLoadData
:
(
id
)
data
indexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
@@ -413,7 +375,7 @@ ON_CREATE_VIEWS( signal )
// gvc.view.frame = rect;
// [self.scrollView addSubview:gvc.view];
self
.
scrollView
.
contentSize
=
CGSizeMake
(
self
.
scrollView
.
width
*
4
,
self
.
scrollView
.
height
);
self
.
scrollView
.
contentSize
=
CGSizeMake
(
self
.
scrollView
.
width
,
self
.
scrollView
.
height
);
}
#pragma mark - segViewDelegate
...
...
@@ -437,13 +399,9 @@ ON_CREATE_VIEWS( signal )
if
([
title
isEqualToString
:
SaleDay
])
{
dayType
=
@"day"
;
self
.
scopeType
=
_selectDay
;
//[IBTCommon stringFromDateWithFormat:[NSDate date] format:@"yyyy-MM-dd"];
// }else if ([title isEqualToString:SaleWeek]) {
// dayType = @"week";
// self.scopeType = [IBTCommon getWeekFromDateWithDate:date];
self
.
scopeType
=
_selectDay
;
}
else
if
([
title
isEqualToString
:
SaleMonth
])
{
dayType
=
@"month"
;
// date = [IBTCommon dateFromStringWithFormat:strDate format:@"yyyy-MM" ];
self
.
scopeType
=
[
IBTCommon
stringFromDateWithFormat
:
date
format
:
@"yyyy-MM"
];
}
else
{
return
;
...
...
@@ -457,12 +415,13 @@ ON_CREATE_VIEWS( signal )
}
-
(
void
)
customSegTwoClick
:
(
NSString
*
)
title
{
//选择历史查看
if
([
t
itle
isEqualToString
:
SaleDay
])
{
if
([
self
.
segView
.
currentT
itle
isEqualToString
:
SaleDay
])
{
[
self
startDatePickView
:
SaleEnDay
];
}
else
if
([
t
itle
isEqualToString
:
SaleWeek
])
{
}
else
if
([
self
.
segView
.
currentT
itle
isEqualToString
:
SaleWeek
])
{
[
self
startDatePickView
:
SaleEnWeek
];
}
else
if
([
t
itle
isEqualToString
:
SaleMonth
])
{
}
else
if
([
self
.
segView
.
currentT
itle
isEqualToString
:
SaleMonth
])
{
[
self
startDatePickView
:
SaleEnMonth
];
}
}
...
...
vanke/view_iPhone/templates/report/Views/CustomSegView.h
View file @
a8d95938
...
...
@@ -20,6 +20,7 @@
@interface
CustomSegView
:
UIView
@property
(
nonatomic
,
weak
)
id
<
CustomSegViewDelegate
>
delegate
;
@property
(
nonatomic
,
copy
)
NSString
*
currentTitle
;
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
withArr
:(
NSArray
*
)
arr
;
...
...
vanke/view_iPhone/templates/report/Views/CustomSegView.m
View file @
a8d95938
...
...
@@ -32,31 +32,32 @@
-
(
void
)
bulidLayout
{
_bgView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
bounds
];
_bgView
.
layer
.
borderWidth
=
1
;
_bgView
.
layer
.
borderColor
=
Report
Color
.
CGColor
;
_bgView
.
layer
.
borderColor
=
kMainBlue
Color
.
CGColor
;
_bgView
.
layer
.
cornerRadius
=
5
;
_bgView
.
layer
.
masksToBounds
=
YES
;
[
self
addSubview
:
_bgView
];
_bgView
.
clipsToBounds
=
YES
;
_currentBtnTag
=
0
;
self
.
currentTitle
=
self
.
segArr
[
0
];
CLog
(
@"%f"
,
_bgView
.
width
);
CGFloat
width
=
_bgView
.
width
/
self
.
segArr
.
count
;
for
(
NSInteger
i
=
0
;
i
<
self
.
segArr
.
count
;
i
++
)
{
IBTCustomButtom
*
segBtn
=
[
IBTCustomButtom
buttonWithType
:
UIButtonTypeCustom
];
segBtn
.
frame
=
CGRectMake
(
width
*
i
,
0
,
width
,
_bgView
.
height
);
segBtn
.
titleLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
[
segBtn
setTitleColor
:
Report
Color
forState
:
UIControlStateNormal
];
[
segBtn
setTitleColor
:
kMainBlue
Color
forState
:
UIControlStateNormal
];
segBtn
.
tag
=
BeginBtnTag
+
i
;
[
segBtn
setTitle
:
self
.
segArr
[
i
]
forState
:
UIControlStateNormal
];
[
segBtn
addTarget
:
self
action
:
@selector
(
segClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_bgView
addSubview
:
segBtn
];
if
(
i
==
0
)
{
segBtn
.
backgroundColor
=
Report
Color
;
segBtn
.
backgroundColor
=
kMainBlue
Color
;
[
segBtn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
_currentBtnTag
=
i
+
BeginBtnTag
;
}
if
(
i
<
self
.
segArr
.
count
-
1
)
{
[
segBtn
addRightBorderWithWidth
:
1
color
:
Report
Color
];
[
segBtn
addRightBorderWithWidth
:
1
color
:
kMainBlue
Color
];
}
}
}
...
...
@@ -66,13 +67,14 @@
IBTCustomButtom
*
beforeBtn
=
(
IBTCustomButtom
*
)[
_bgView
viewWithTag
:
_currentBtnTag
];
if
([
beforeBtn
isKindOfClass
:[
UIButton
class
]]
&&
beforeBtn
)
{
beforeBtn
.
backgroundColor
=
RGBA
(
1
,
1
,
1
,
0
);
[
beforeBtn
setTitleColor
:
Report
Color
forState
:
UIControlStateNormal
];
[
beforeBtn
setTitleColor
:
kMainBlue
Color
forState
:
UIControlStateNormal
];
}
btn
.
backgroundColor
=
Report
Color
;
btn
.
backgroundColor
=
kMainBlue
Color
;
[
btn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
_currentBtnTag
=
btn
.
tag
;
if
([
self
.
delegate
respondsToSelector
:
@selector
(
customSegOneClick
:)])
{
[
self
.
delegate
customSegOneClick
:
btn
.
titleLabel
.
text
];
self
.
currentTitle
=
btn
.
titleLabel
.
text
;
}
}
else
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
customSegTwoClick
:)])
{
...
...
vanke/view_iPhone/templates/report/Views/RSaleView.m
View file @
a8d95938
...
...
@@ -7,6 +7,7 @@
//
#import "RSaleView.h"
#import "CalculateHelper.h"
//#import "SMPageControl.h"
#define LeftWidth 50
#define ImageSize 20
...
...
@@ -168,32 +169,43 @@
//销售额
self
.
centerLabel
.
text
=
compass
.
sales
?[
IBTCommon
countNumAndChangeformat
:[
IBTCommon
stringDisposeWithFloat
:[
compass
.
sales
floatValue
]]]:
@"---"
;
//销售环比变化率
if
([
compass
.
salesChainSign
isEqualToString
:
ReportChainSignPlus
])
{
//销售环比变化率 比上周
NSDecimalNumber
*
saleDifference
=
[
CalculateHelper
calculateNum1
:
compass
.
sales
num2
:
compass
.
salesChain
type
:
CalculateTypeSub
roundingType
:
NSRoundBankers
cutLenth
:
4
];
NSDecimalNumber
*
decimalSaleRate
=
[
CalculateHelper
calculateNum1
:
saleDifference
num2
:
compass
.
salesChain
type
:
CalculateTypeDiv
roundingType
:
NSRoundBankers
cutLenth
:
4
];
decimalSaleRate
=
[
CalculateHelper
oneHundredTimes
:
decimalSaleRate
];
NSString
*
salesChainRateStr
=
decimalSaleRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
[
decimalSaleRate
stringValue
]]:
@"---"
;
if
(
!
[
salesChainRateStr
hasPrefix
:
@"-"
]
&&
!
[
salesChainRateStr
isEqualToString
:
@"0"
]
&&
!
[
salesChainRateStr
hasPrefix
:
@"--"
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
}
else
if
([
compass
.
salesChainSign
isEqualToString
:
ReportChainSignMinus
]){
}
else
if
([
salesChainRateStr
hasPrefix
:
@"-"
]
&&
!
[
salesChainRateStr
isEqualToString
:
@"0"
]
&&
!
[
salesChainRateStr
hasPrefix
:
@"--"
]){
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateNormal
];
}
NSString
*
salesChainRateStr
=
compass
.
salesChainRate
?[
NSString
stringWithFormat
:
@"%@%%"
,[
IBTCommon
stringDisposeWithFloat
:[
compass
.
salesChainRate
floatValue
]]]:
@"---"
;
[
self
.
lastWeekLabel
setTitle
:
salesChainRateStr
forState
:
UIControlStateNormal
];
//销售同比变化率
if
([
compass
.
salesYoYSign
isEqualToString
:
ReportChainSignPlus
])
{
//销售同比变化率 比上年
NSDecimalNumber
*
decimalSalesYoYDifference
=
[
CalculateHelper
calculateNum1
:
compass
.
sales
num2
:
compass
.
salesYoY
type
:
CalculateTypeSub
roundingType
:
NSRoundBankers
cutLenth
:
4
];
NSDecimalNumber
*
decimalSalesYoY
=
[
CalculateHelper
calculateNum1
:
decimalSalesYoYDifference
num2
:
compass
.
salesYoY
type
:
CalculateTypeDiv
roundingType
:
NSRoundBankers
cutLenth
:
4
];
decimalSalesYoY
=
[
CalculateHelper
oneHundredTimes
:
decimalSalesYoY
];
NSString
*
salesYoStr
=
decimalSalesYoY
?[
NSString
stringWithFormat
:
@"%@%%"
,[
decimalSalesYoY
stringValue
]]:
@"---"
;
if
(
!
[
salesYoStr
hasPrefix
:
@"-"
]
&&
!
[
salesYoStr
isEqualToString
:
@"0"
]
&&
!
[
salesYoStr
hasPrefix
:
@"--"
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastYearLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
}
else
if
([
compass
.
salesYoYSign
isEqualToString
:
ReportChainSignMinus
]){
}
else
if
([
salesYoStr
hasPrefix
:
@"-"
]
&&
!
[
salesYoStr
isEqualToString
:
@"0"
]
&&
!
[
salesYoStr
hasPrefix
:
@"--"
]){
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateNormal
];
}
NSString
*
salesYoStr
=
compass
.
salesYoYRate
?[
NSString
stringWithFormat
:
@"%@%%"
,[
IBTCommon
stringDisposeWithFloat
:[
compass
.
salesYoYRate
floatValue
]]]:
@"---"
;
[
self
.
lastYearLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//销售目标达成率
NSString
*
salesTargetStr
=
compass
.
salesTargetRate
?[
NSString
stringWithFormat
:
@"%@%%"
,[
IBTCommon
stringDisposeWithFloat
:[
compass
.
salesTargetRate
floatValue
]]]:
@"---"
;
self
.
rateLabel
.
text
=
salesTargetStr
;
//单店日均销售
NSString
*
dailysalesPerStr
=
compass
.
dailysalesPerStore
?[
NSString
stringWithFormat
:
@"%@"
,[
IBTCommon
stringDisposeWithFloat
:[
compass
.
dailysalesPerStore
floatValue
]]]:
@"---"
;
self
.
averageLabel
.
text
=
dailysalesPerStr
;
//
//单店日均销售
//
NSString *dailysalesPerStr = compass.dailysalesPerStore?[NSString stringWithFormat:@"%@",[IBTCommon stringDisposeWithFloat:[compass.dailysalesPerStore floatValue]]]:@"---";
//
self.averageLabel.text = dailysalesPerStr;
}
...
...
vanke/view_iPhone/templates/report/Views/SaleHeaderView.m
View file @
a8d95938
...
...
@@ -49,14 +49,14 @@
//右侧共几家 jv
rect
=
CGRectMake
(
10
,
0
,
9
0
,
Sale_Header_Height
);
rect
=
CGRectMake
(
10
,
0
,
11
0
,
Sale_Header_Height
);
UILabel
*
searLabel
=
[
IBTCommon
labelWithTitle
:
@"共280家"
frame
:
rect
textFont
:
self
.
textFont
];
searLabel
.
textColor
=
ReportTitleColor
;
[
self
.
contentView
addSubview
:
searLabel
];
searLabel
.
alpha
=
0
;
self
.
totalLabel
=
searLabel
;
CGFloat
width
=
(
SCREEN_WIDTH
-
searLabel
.
right
-
15
)
/
4
;
CGFloat
width
=
(
SCREEN_WIDTH
-
searLabel
.
right
-
4
)
/
4
;
rect
=
CGRectMake
(
searLabel
.
right
,
0
,
width
,
Sale_Header_Height
);
UILabel
*
xsBtn
=
[
IBTCommon
labelWithTitle
:
@"销售额"
frame
:
rect
textFont
:
self
.
textFont
];
...
...
vanke/view_iPhone/templates/report/Views/SaleViewCell.m
View file @
a8d95938
...
...
@@ -9,7 +9,7 @@
#import "SaleViewCell.h"
#define Sale_Cell_Height 50
#define Left_Width
95
#define Left_Width
120
#define Left_margin 5
@interface
SaleViewCell
()
{
...
...
@@ -68,7 +68,7 @@
self
.
dqLabel
=
[
IBTCommon
labelWithTitle
:
@"0101"
frame
:
rect
textFont
:
self
.
textFont
];
[
self
.
contentView
addSubview
:
self
.
dqLabel
];
CGFloat
width
=
(
SCREEN_WIDTH
-
self
.
dqLabel
.
right
-
15
)
/
4
;
CGFloat
width
=
(
SCREEN_WIDTH
-
self
.
dqLabel
.
right
-
4
)
/
4
;
rect
=
CGRectMake
(
self
.
dqLabel
.
right
,
0
,
width
,
Sale_Cell_Height
);
self
.
saleLabel
=
[
IBTCommon
labelWithTitle
:
@"56,080"
frame
:
rect
textFont
:
self
.
textFont
];
...
...
@@ -138,9 +138,14 @@
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,[
IBTCommon
stringDisposeWithFloat
:[
sale
.
salesChainRate
floatValue
]]];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//坪效
NSString
*
salesTargetRateStr
=
[
NSString
stringWithFormat
:
@"%@"
,[
IBTCommon
stringDisposeWithFloat
:[
sale
.
salesTargetRate
floatValue
]]];
NSString
*
salesTargetRateStr
=
[
NSString
stringWithFormat
:
@"%@"
,[
IBTCommon
stringDisposeWithFloat
:[
sale
.
groundEffect
floatValue
]]];
self
.
rateLabel
.
text
=
salesTargetRateStr
;
//日均销售
self
.
dailySaleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
[
sale
.
dailysalesPerStore
stringValue
]];
[
self
setColorAndFont
:
sale
.
level
];
}
-
(
void
)
setColorAndFont
:
(
NSInteger
)
level
{
if
(
level
==
99
)
{
...
...
vanke/view_iPhone/templates/salesInput/Controller/GalleryViewController.h
0 → 100644
View file @
a8d95938
//
// GalleryViewController.h
// vanke
//
// Created by Z on 16/7/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
GalleryViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrData
;
@property
(
nonatomic
,
assign
)
NSInteger
page
;
@end
vanke/view_iPhone/templates/salesInput/Controller/GalleryViewController.m
0 → 100644
View file @
a8d95938
//
// GalleryViewController.m
// vanke
//
// Created by Z on 16/7/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "GalleryViewController.h"
#import "GalleryCollectionViewCell.h"
#import "AttachmentModel.h"
@interface
GalleryViewController
()
<
UIScrollViewDelegate
>
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionView
*
collectionView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionViewFlowLayout
*
flowLayout
;
@end
@implementation
GalleryViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
flowLayout
.
itemSize
=
CGSizeMake
(
SCREEN_WIDTH
,
SCREEN_HEIGHT
);
self
.
flowLayout
.
minimumLineSpacing
=
0
;
self
.
flowLayout
.
minimumInteritemSpacing
=
0
;
self
.
flowLayout
.
scrollDirection
=
UICollectionViewScrollDirectionHorizontal
;
// Do any additional setup after loading the view.
}
-
(
void
)
viewDidLayoutSubviews
{
[
self
.
collectionView
scrollToItemAtIndexPath
:[
NSIndexPath
indexPathForRow
:
self
.
page
inSection
:
0
]
atScrollPosition
:
UICollectionViewScrollPositionCenteredHorizontally
animated
:
NO
];
}
#pragma mark <UICollectionViewDataSource>
-
(
NSInteger
)
numberOfSectionsInCollectionView
:
(
UICollectionView
*
)
collectionView
{
return
1
;
}
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
return
self
.
arrData
.
count
;
}
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
GalleryCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"GalleryCollectionViewCell"
forIndexPath
:
indexPath
];
AttachmentModel
*
model
=
self
.
arrData
[
indexPath
.
row
];
[
cell
setUpCellWithModel
:
model
];
// Configure the cell
self
.
title
=
[
NSString
stringWithFormat
:
@"(%ld/%.0lu)"
,
indexPath
.
row
+
1
,
(
unsigned
long
)
self
.
arrData
.
count
];
return
cell
;
}
-
(
void
)
scrollViewDidEndDecelerating
:
(
UIScrollView
*
)
scrollView
{
self
.
title
=
[
NSString
stringWithFormat
:
@"(%.0f/%.0lu)"
,
scrollView
.
contentOffset
.
x
/
SCREEN_WIDTH
+
1
,
(
unsigned
long
)
self
.
arrData
.
count
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
vanke/view_iPhone/templates/salesInput/Controller/HistoryViewController.m
View file @
a8d95938
...
...
@@ -12,7 +12,7 @@
#import "VankeConfig.h"
#import "ICRAppMacro.h"
#import "ChooseShopViewController.h"
#import "SaleInputPicCollectionViewController.h"
#define klineCount 19 //列数
#define kListWidth 100 //一个表格的宽度
...
...
@@ -24,6 +24,8 @@
@property
(
nonatomic
,
strong
)
NSArray
*
bottomTitles
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@property
(
nonatomic
,
strong
)
HistoryTopView
*
topView
;
@property
(
nonatomic
,
strong
)
NSArray
*
arrRecords
;
@end
@implementation
HistoryViewController
...
...
@@ -88,7 +90,10 @@
label
.
text
=
array
[
i
][
j
];
[
self
.
scrollView
insertSubview
:
label
atIndex
:
0
];
//防止前面的别挡住
label
.
backgroundColor
=
[
UIColor
colorWithRed
:
1
.
000
green
:
0
.
976
blue
:
0
.
953
alpha
:
1
.
000
];
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tap
:
)];
label
.
userInteractionEnabled
=
YES
;
[
label
addGestureRecognizer
:
tap
];
label
.
tag
=
j
-
1
;
if
(
i
==
0
)
{
label
.
tag
=
3000
+
j
;
}
else
if
(
i
==
1
){
//金额
...
...
@@ -135,6 +140,22 @@
}
}
-
(
void
)
tap
:
(
UITapGestureRecognizer
*
)
tap
{
CLog
(
@"%d"
,
tap
.
view
.
tag
);
UIStoryboard
*
storyBoard
=
[
UIStoryboard
storyboardWithName
:
@"SalesInPut"
bundle
:
nil
];
SaleInputPicCollectionViewController
*
picVC
=
[
storyBoard
instantiateViewControllerWithIdentifier
:
@"SaleInputPicCollectionViewController"
];
NSInteger
row
;
if
(
tap
.
view
.
tag
>
2999
)
{
row
=
tap
.
view
.
tag
-
3001
;
}
else
{
row
=
tap
.
view
.
tag
;
}
picVC
.
attachmentUuid
=
self
.
arrRecords
[
row
][
@"attachmentUuid"
];
[
self
.
navigationController
pushViewController
:
picVC
animated
:
YES
];
}
-
(
void
)
scrollViewDidScroll
:
(
UIScrollView
*
)
scrollView
{
...
...
@@ -253,18 +274,18 @@
@"endDateEquals"
:
self
.
topView
.
endDate
.
text
,
@"pageNumber"
:
@0
,
@"pageSize"
:
@0
};
CLog
(
@"》》%@"
,
params
.
JSONString
);
ICRHTTPController
*
httpCtrl
=
[
ICRHTTPController
sharedController
];
[
httpCtrl
getUrl
:
@"salesinput/query"
params
:
params
success
:^
(
id
data
)
{
NSDictionary
*
dic
=
data
;
CLog
(
@"》》%@"
,
dic
.
JSONString
);
NSMutableArray
*
arrData
=
[
NSMutableArray
array
];
NSMutableArray
*
arrDate
=
[
NSMutableArray
array
];
//日期
[
arrDate
addObject
:
@"日期"
];
NSMutableArray
*
arrAmount
=
[
NSMutableArray
array
];
//金额
[
arrAmount
addObject
:
@"金额(元)"
];
weakSelf
.
arrRecords
=
dic
[
@"data"
][
@"records"
];
NSMutableArray
*
payment
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
obj
in
dic
[
@"data"
][
@"records"
])
{
[
arrDate
addObject
:
obj
[
@"salesDate"
]];
...
...
vanke/view_iPhone/templates/salesInput/Controller/SaleInputPicCollectionViewController.h
0 → 100644
View file @
a8d95938
//
// SaleInputPicCollectionViewController.h
// vanke
//
// Created by Z on 16/7/17.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SaleInputPicCollectionViewController
:
UICollectionViewController
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArr
;
@property
(
nonatomic
,
copy
)
NSString
*
attachmentUuid
;
@end
vanke/view_iPhone/templates/salesInput/Controller/SaleInputPicCollectionViewController.m
0 → 100644
View file @
a8d95938
//
// SaleInputPicCollectionViewController.m
// vanke
//
// Created by Z on 16/7/17.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "SaleInputPicCollectionViewController.h"
#import "SaleInputPicCollectionViewCell.h"
#import "ICRHTTPController.h"
#import "AttachmentModel.h"
#import "GalleryViewController.h"
@interface
SaleInputPicCollectionViewController
()
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionViewFlowLayout
*
flowLayout
;
@end
@implementation
SaleInputPicCollectionViewController
static
NSString
*
const
reuseIdentifier
=
@"saleInputCollection"
;
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
flowLayout
.
itemSize
=
CGSizeMake
((
SCREEN_WIDTH
-
20
)
/
3
,
110
.
0
/
375
*
SCREEN_WIDTH
);
self
.
flowLayout
.
minimumLineSpacing
=
5
;
self
.
flowLayout
.
minimumInteritemSpacing
=
5
;
[
self
setUpData
];
}
-
(
void
)
setUpData
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"attachment/get_urls?entity_type=salesInput&entity_uuid=%@"
,
self
.
attachmentUuid
];
__weak
typeof
(
self
)
weakSelf
=
self
;
[[
ICRHTTPController
sharedController
]
getUrl
:
url
params
:
nil
success
:^
(
id
data
)
{
NSDictionary
*
dic
=
data
;
CLog
(
@"%@"
,
dic
.
JSONString
);
for
(
NSDictionary
*
dict
in
data
[
@"data"
])
{
AttachmentModel
*
model
=
[[
AttachmentModel
alloc
]
init
];
[
model
setValuesForKeysWithDictionary
:
dict
];
[
weakSelf
.
dataArr
addObject
:
model
];
}
[
weakSelf
.
collectionView
reloadData
];
}
failure
:^
(
id
data
)
{
}];
}
-
(
NSMutableArray
*
)
dataArr
{
if
(
!
_dataArr
)
{
_dataArr
=
[
NSMutableArray
array
];
}
return
_dataArr
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
#pragma mark <UICollectionViewDataSource>
-
(
NSInteger
)
numberOfSectionsInCollectionView
:
(
UICollectionView
*
)
collectionView
{
return
1
;
}
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
return
self
.
dataArr
.
count
;
}
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
SaleInputPicCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
reuseIdentifier
forIndexPath
:
indexPath
];
[
cell
setCellWith
:
self
.
dataArr
index
:
indexPath
];
// Configure the cell
return
cell
;
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UIStoryboard
*
storyBoard
=
[
UIStoryboard
storyboardWithName
:
@"SalesInPut"
bundle
:
nil
];
GalleryViewController
*
seePicVC
=
[
storyBoard
instantiateViewControllerWithIdentifier
:
@"GalleryViewController"
];
seePicVC
.
arrData
=
self
.
dataArr
;
seePicVC
.
page
=
indexPath
.
row
;
[
self
.
navigationController
pushViewController
:
seePicVC
animated
:
YES
];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
#pragma mark <UICollectionViewDelegate>
/*
// Uncomment this method to specify if the specified item should be highlighted during tracking
- (BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
*/
/*
// Uncomment this method to specify if the specified item should be selected
- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
*/
/*
// Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}
- (BOOL)collectionView:(UICollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
return NO;
}
- (void)collectionView:(UICollectionView *)collectionView performAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
}
*/
@end
vanke/view_iPhone/templates/salesInput/Controller/SalesInPut.storyboard
0 → 100644
View file @
a8d95938
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"9532"
systemVersion=
"15D21"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"9530"
/>
</dependencies>
<scenes>
<!--Sale Input Pic Collection View Controller-->
<scene
sceneID=
"GpQ-3A-pd9"
>
<objects>
<collectionViewController
storyboardIdentifier=
"SaleInputPicCollectionViewController"
id=
"qgb-tB-Hvh"
customClass=
"SaleInputPicCollectionViewController"
sceneMemberID=
"viewController"
>
<collectionView
key=
"view"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
dataMode=
"prototypes"
id=
"jdx-se-vyN"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.91719922220000005"
green=
"0.95656324439999996"
blue=
"1"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<collectionViewFlowLayout
key=
"collectionViewLayout"
minimumLineSpacing=
"10"
minimumInteritemSpacing=
"10"
id=
"Trd-2Q-pij"
>
<size
key=
"itemSize"
width=
"152"
height=
"111"
/>
<size
key=
"headerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<size
key=
"footerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<inset
key=
"sectionInset"
minX=
"5"
minY=
"5"
maxX=
"5"
maxY=
"0.0"
/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
reuseIdentifier=
"saleInputCollection"
id=
"UND-xE-2uC"
customClass=
"SaleInputPicCollectionViewCell"
>
<rect
key=
"frame"
x=
"5"
y=
"5"
width=
"152"
height=
"111"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<view
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"152"
height=
"111"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
restorationIdentifier=
"saleInputCollection"
image=
"SystemImage.png"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"joQ-K1-fla"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"152"
height=
"111"
/>
</imageView>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
</view>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<constraints>
<constraint
firstAttribute=
"bottom"
secondItem=
"joQ-K1-fla"
secondAttribute=
"bottom"
id=
"6vL-nq-IUF"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"joQ-K1-fla"
secondAttribute=
"trailing"
id=
"JEP-Mb-Shp"
/>
<constraint
firstItem=
"joQ-K1-fla"
firstAttribute=
"top"
secondItem=
"UND-xE-2uC"
secondAttribute=
"top"
id=
"Yj2-mQ-lzV"
/>
<constraint
firstItem=
"joQ-K1-fla"
firstAttribute=
"leading"
secondItem=
"UND-xE-2uC"
secondAttribute=
"leading"
id=
"l0h-b2-jWd"
/>
</constraints>
<connections>
<outlet
property=
"img"
destination=
"joQ-K1-fla"
id=
"j2w-VW-mdl"
/>
</connections>
</collectionViewCell>
</cells>
<connections>
<outlet
property=
"dataSource"
destination=
"qgb-tB-Hvh"
id=
"MyT-rg-xAs"
/>
<outlet
property=
"delegate"
destination=
"qgb-tB-Hvh"
id=
"juT-tP-zPK"
/>
</connections>
</collectionView>
<simulatedScreenMetrics
key=
"simulatedDestinationMetrics"
type=
"retina47"
/>
<connections>
<outlet
property=
"flowLayout"
destination=
"Trd-2Q-pij"
id=
"IKg-Yk-ly7"
/>
</connections>
</collectionViewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"DKF-sh-ypk"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"380.5"
y=
"396.5"
/>
</scene>
<!--Gallery View Controller-->
<scene
sceneID=
"4Z6-OH-B65"
>
<objects>
<viewController
storyboardIdentifier=
"GalleryViewController"
id=
"rm8-V5-EVg"
customClass=
"GalleryViewController"
sceneMemberID=
"viewController"
>
<layoutGuides>
<viewControllerLayoutGuide
type=
"top"
id=
"wy5-p4-xhZ"
/>
<viewControllerLayoutGuide
type=
"bottom"
id=
"Cv9-Ln-GQj"
/>
</layoutGuides>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"QTh-Hz-iWo"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<collectionView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
pagingEnabled=
"YES"
dataMode=
"prototypes"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"iLv-2C-69d"
>
<rect
key=
"frame"
x=
"0.0"
y=
"20"
width=
"375"
height=
"647"
/>
<color
key=
"backgroundColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<collectionViewFlowLayout
key=
"collectionViewLayout"
scrollDirection=
"horizontal"
minimumLineSpacing=
"10"
minimumInteritemSpacing=
"10"
id=
"SWI-Tr-Zbj"
>
<size
key=
"itemSize"
width=
"50"
height=
"50"
/>
<size
key=
"headerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<size
key=
"footerReferenceSize"
width=
"0.0"
height=
"0.0"
/>
<inset
key=
"sectionInset"
minX=
"0.0"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
reuseIdentifier=
"GalleryCollectionViewCell"
id=
"EF1-aZ-uFT"
customClass=
"GalleryCollectionViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"50"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<view
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"50"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
</view>
<color
key=
"backgroundColor"
red=
"0.90196079019999997"
green=
"0.90196079019999997"
blue=
"0.90196079019999997"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</collectionViewCell>
</cells>
<connections>
<outlet
property=
"dataSource"
destination=
"rm8-V5-EVg"
id=
"t5k-BY-d6D"
/>
<outlet
property=
"delegate"
destination=
"rm8-V5-EVg"
id=
"kjj-Aq-8GX"
/>
</connections>
</collectionView>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"iLv-2C-69d"
firstAttribute=
"top"
secondItem=
"wy5-p4-xhZ"
secondAttribute=
"bottom"
id=
"YpL-Cd-Fl9"
/>
<constraint
firstItem=
"Cv9-Ln-GQj"
firstAttribute=
"top"
secondItem=
"iLv-2C-69d"
secondAttribute=
"bottom"
id=
"dQW-QU-F7P"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"iLv-2C-69d"
secondAttribute=
"trailing"
id=
"nSl-LU-rGK"
/>
<constraint
firstItem=
"iLv-2C-69d"
firstAttribute=
"leading"
secondItem=
"QTh-Hz-iWo"
secondAttribute=
"leading"
id=
"zeu-xo-BjU"
/>
</constraints>
</view>
<simulatedScreenMetrics
key=
"simulatedDestinationMetrics"
type=
"retina47"
/>
<connections>
<outlet
property=
"collectionView"
destination=
"iLv-2C-69d"
id=
"kKU-TP-rG3"
/>
<outlet
property=
"flowLayout"
destination=
"SWI-Tr-Zbj"
id=
"L7J-Ha-Zks"
/>
</connections>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"KoZ-kH-FlJ"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"921.5"
y=
"461.5"
/>
</scene>
</scenes>
<resources>
<image
name=
"SystemImage.png"
width=
"320"
height=
"147"
/>
</resources>
</document>
vanke/view_iPhone/templates/salesInput/Controller/SalesInputViewController.m
View file @
a8d95938
...
...
@@ -426,7 +426,7 @@ ON_WILL_APPEAR( signal )
-
(
void
)
httpPostAttachments
{
ICRHTTPController
*
httpCtrl
=
[
ICRHTTPController
sharedController
];
NSString
*
string
=
[
NSString
stringWithFormat
:
@"attachment/upload_by_file?entity_type=%@&entity_uuid=%@"
,
@"salesInput"
,
@"860576037625827160708160529115460847"
];
NSString
*
string
=
[
NSString
stringWithFormat
:
@"attachment/upload_by_file?entity_type=%@&entity_uuid=%@"
,
@"salesInput"
,
self
.
shop
.
uuid
];
WS
(
weakSelf
);
[
self
.
arrPics
removeLastObject
];
[
httpCtrl
POST
:
string
pictures
:
self
.
arrPics
param
:
nil
complete
:^
(
id
responseObject
,
NSError
*
error
)
{
...
...
vanke/view_iPhone/templates/salesInput/Model/AttachmentModel.h
0 → 100644
View file @
a8d95938
//
// AttachmentModel.h
// vanke
//
// Created by Z on 16/7/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
AttachmentModel
:
NSObject
@property
(
nonatomic
,
copy
)
NSString
*
fileUrl
;
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
fileName
;
@end
vanke/view_iPhone/templates/salesInput/Model/AttachmentModel.m
0 → 100644
View file @
a8d95938
//
// AttachmentModel.m
// vanke
//
// Created by Z on 16/7/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "AttachmentModel.h"
@implementation
AttachmentModel
-
(
void
)
setValue
:(
id
)
value
forUndefinedKey
:(
NSString
*
)
key
{
}
@end
vanke/view_iPhone/templates/salesInput/View/GalleryCollectionViewCell.h
0 → 100644
View file @
a8d95938
//
// GalleryCollectionViewCell.h
// CapitalChamberlain
//
// Created by 张杰 on 15/12/3.
// Copyright © 2015年 SunShine. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SingleScrollView.h"
#import "AttachmentModel.h"
@interface
GalleryCollectionViewCell
:
UICollectionViewCell
@property
(
nonatomic
,
strong
)
UIImageView
*
imgView
;
-
(
void
)
setUpCellWithModel
:(
AttachmentModel
*
)
model
;
-
(
void
)
cellWithImgName
:(
NSString
*
)
imgUrl
;
@end
vanke/view_iPhone/templates/salesInput/View/GalleryCollectionViewCell.m
0 → 100644
View file @
a8d95938
//
// GalleryCollectionViewCell.m
// CapitalChamberlain
//
// Created by 张杰 on 15/12/3.
// Copyright © 2015年 SunShine. All rights reserved.
//
#import "GalleryCollectionViewCell.h"
@interface
GalleryCollectionViewCell
()
@property
(
nonatomic
,
strong
)
SingleScrollView
*
imageScrollView
;
@end
@implementation
GalleryCollectionViewCell
-
(
void
)
awakeFromNib
{
CLog
(
@"%f"
,
self
.
width
);
self
.
imageScrollView
=
[[
SingleScrollView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
SCREEN_WIDTH
,
SCREEN_HEIGHT
)];
self
.
backgroundColor
=
[
UIColor
blackColor
];
[
self
.
contentView
addSubview
:
self
.
imageScrollView
];
}
-
(
void
)
setUpCellWithModel
:
(
AttachmentModel
*
)
model
{
NSString
*
imageUrl
;
if
(
model
.
fileUrl
.
length
<
3
)
{
imageUrl
=
@"inspect_result_noupload"
;
}
else
{
imageUrl
=
[
NSString
stringWithFormat
:
@"%@%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
model
.
fileUrl
];
}
[
self
cellWithImgName
:
imageUrl
];
}
-
(
void
)
cellWithImgName
:
(
NSString
*
)
imgUrl
{
[
self
.
imageScrollView
setImage
:
imgUrl
placeHolder
:[
UIImage
imageNamed
:
@"no_picture"
]];
}
@end
vanke/view_iPhone/templates/salesInput/View/SaleInputPicCollectionViewCell.h
0 → 100644
View file @
a8d95938
//
// SaleInputPicCollectionViewCell.h
// vanke
//
// Created by Z on 16/7/17.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AttachmentModel.h"
@interface
SaleInputPicCollectionViewCell
:
UICollectionViewCell
-
(
void
)
setCellWith
:(
NSArray
*
)
array
index
:(
NSIndexPath
*
)
indexPath
;
@end
vanke/view_iPhone/templates/salesInput/View/SaleInputPicCollectionViewCell.m
0 → 100644
View file @
a8d95938
//
// SaleInputPicCollectionViewCell.m
// vanke
//
// Created by Z on 16/7/17.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "SaleInputPicCollectionViewCell.h"
#import "UIImageView+AFNetworking.h"
#import "VankeConfig.h"
@interface
SaleInputPicCollectionViewCell
()
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
img
;
@end
@implementation
SaleInputPicCollectionViewCell
-
(
void
)
setCellWith
:(
NSArray
*
)
array
index
:(
NSIndexPath
*
)
indexPath
{
AttachmentModel
*
model
=
array
[
indexPath
.
row
];
[
self
.
img
setImageWithURL
:[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
VANKE_SERVER_MEDIA_BASE_URL
,
model
.
fileUrl
]]
placeholderImage
:[
UIImage
imageNamed
:
@"floor-def"
]];
}
@end
vanke/view_iPhone/templates/salesInput/View/SaleInputPictureTableViewCell.m
View file @
a8d95938
...
...
@@ -29,15 +29,14 @@
[
self
.
btnRight
setImage
:
arrPic
[
indexPath
.
row
*
2
+
1
]
forState
:
UIControlStateNormal
];
self
.
btnRight
.
tag
=
indexPath
.
row
*
2
+
1
;
self
.
btnRight
.
hidden
=
NO
;
}
[
self
.
btnLeft
addTarget
:
self
action
:
@selector
(
action
See
Pic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
btnRight
addTarget
:
self
action
:
@selector
(
action
See
Pic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
btnLeft
addTarget
:
self
action
:
@selector
(
actionPic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
btnRight
addTarget
:
self
action
:
@selector
(
actionPic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
-
(
void
)
action
See
Pic
:
(
UIButton
*
)
btn
{
-
(
void
)
actionPic
:
(
UIButton
*
)
btn
{
// CLog(@"%ld", btn.tag);
if
(
btn
.
tag
==
self
.
arrPictures
.
count
-
1
)
{
self
.
addPicBlock
(
0
);
...
...
vanke/view_iPhone/templates/salesInput/View/SingleScrollView.h
0 → 100755
View file @
a8d95938
//
// SingleScrollView.h
// PhotoWallDemo
//
// Created by LZXuan on 14-8-18.
// Copyright (c) 2014年 LZXuan. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SingleScrollView
:
UIScrollView
//
-
(
SingleScrollView
*
)
initWithFrame
:(
CGRect
)
frame
image
:(
NSString
*
)
image
;
-
(
void
)
setImage
:(
NSString
*
)
image
placeHolder
:(
UIImage
*
)
placeHolder
;
@end
vanke/view_iPhone/templates/salesInput/View/SingleScrollView.m
0 → 100755
View file @
a8d95938
//
// SingleScrollView.m
// PhotoWallDemo
//
// Created by LZXuan on 14-8-18.
// Copyright (c) 2014年 LZXuan. All rights reserved.
//
#import "SingleScrollView.h"
#import "UIImageView+WebCache.h"
#define SW 1
@interface
SingleScrollView
()
<
UIScrollViewDelegate
>
@end
@implementation
SingleScrollView
{
UIImageView
*
_imageView
;
}
-
(
id
)
initWithFrame
:
(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
setUpViews
];
}
return
self
;
}
-
(
SingleScrollView
*
)
initWithFrame
:
(
CGRect
)
frame
image
:
(
NSString
*
)
image
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
setUpViews
];
[
self
setImage
:
image
placeHolder
:
nil
];
}
return
self
;
}
-
(
void
)
setUpViews
{
self
.
delegate
=
self
;
self
.
showsHorizontalScrollIndicator
=
NO
;
self
.
showsVerticalScrollIndicator
=
NO
;
//设置最大放大倍数
self
.
minimumZoomScale
=
1
.
0
;
self
.
maximumZoomScale
=
2
.
0
;
//粘贴一张图片
_imageView
=
[[
UIImageView
alloc
]
init
];
_imageView
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
-
10
*
2
,
self
.
frame
.
size
.
height
);
_imageView
.
center
=
CGPointMake
(
self
.
frame
.
size
.
width
/
2
,
self
.
frame
.
size
.
height
/
2
);
_imageView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
UITapGestureRecognizer
*
doubleTapGesture
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
handleDoubleTap
:
)];
[
doubleTapGesture
setNumberOfTapsRequired
:
2
];
[
_imageView
addGestureRecognizer
:
doubleTapGesture
];
_imageView
.
userInteractionEnabled
=
YES
;
[
self
addSubview
:
_imageView
];
}
-
(
void
)
setImage
:
(
NSString
*
)
image
placeHolder
:
(
UIImage
*
)
placeHolder
{
//每次重新设置图片的时候设置缩放比例(场景是在做相册的时候)
self
.
zoomScale
=
1
.
0
;
if
([
image
hasPrefix
:
@"http://"
])
{
NSURL
*
url
=
[
NSURL
URLWithString
:
image
];
[
_imageView
sd_setImageWithURL
:
url
placeholderImage
:
placeHolder
];
}
else
{
_imageView
.
image
=
[
UIImage
imageNamed
:
image
];
}
}
//双击定点缩放
-
(
void
)
handleDoubleTap
:
(
UIGestureRecognizer
*
)
gesture
{
CGFloat
zoomScale
=
self
.
zoomScale
;
zoomScale
=
(
zoomScale
==
1
.
0
)
?
2
.
0
:
1
.
0
;
CGRect
zoomRect
=
[
self
zoomRectForScale
:
zoomScale
withCenter
:[
gesture
locationInView
:
gesture
.
view
]];
[
self
zoomToRect
:
zoomRect
animated
:
YES
];
}
-
(
CGRect
)
zoomRectForScale
:
(
float
)
scale
withCenter
:
(
CGPoint
)
center
{
CGRect
zoomRect
;
zoomRect
.
size
.
height
=
self
.
frame
.
size
.
height
/
scale
;
zoomRect
.
size
.
width
=
self
.
frame
.
size
.
width
/
scale
;
zoomRect
.
origin
.
x
=
center
.
x
-
(
zoomRect
.
size
.
width
/
2
.
0
);
zoomRect
.
origin
.
y
=
center
.
y
-
(
zoomRect
.
size
.
height
/
2
.
0
);
return
zoomRect
;
}
-
(
UIView
*
)
viewForZoomingInScrollView
:
(
UIScrollView
*
)
scrollView
{
return
_imageView
;
}
@end
vanke/view_iPhone/templates/statements/Models/Items.h
0 → 100644
View file @
a8d95938
//
// Items.h
//
// Created by 杰 张 on 16/7/18
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
Items
:
NSObject
<
NSCoding
,
NSCopying
>
@property
(
nonatomic
,
assign
)
double
amount
;
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
@property
(
nonatomic
,
assign
)
double
endDate
;
@property
(
nonatomic
,
assign
)
double
unpaid
;
@property
(
nonatomic
,
strong
)
NSString
*
subject
;
@property
(
nonatomic
,
assign
)
double
beginDate
;
@property
(
nonatomic
,
assign
)
double
direction
;
@property
(
nonatomic
,
assign
)
double
paid
;
+
(
instancetype
)
modelObjectWithDictionary
:(
NSDictionary
*
)
dict
;
-
(
instancetype
)
initWithDictionary
:(
NSDictionary
*
)
dict
;
-
(
NSDictionary
*
)
dictionaryRepresentation
;
@end
vanke/view_iPhone/templates/statements/Models/Items.m
0 → 100644
View file @
a8d95938
//
// Items.m
//
// Created by 杰 张 on 16/7/18
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "Items.h"
NSString
*
const
kItemsAmount
=
@"amount"
;
NSString
*
const
kItemsRemark
=
@"remark"
;
NSString
*
const
kItemsEndDate
=
@"endDate"
;
NSString
*
const
kItemsUnpaid
=
@"unpaid"
;
NSString
*
const
kItemsSubject
=
@"subject"
;
NSString
*
const
kItemsBeginDate
=
@"beginDate"
;
NSString
*
const
kItemsDirection
=
@"direction"
;
NSString
*
const
kItemsPaid
=
@"paid"
;
@interface
Items
()
-
(
id
)
objectOrNilForKey
:
(
id
)
aKey
fromDictionary
:
(
NSDictionary
*
)
dict
;
@end
@implementation
Items
@synthesize
amount
=
_amount
;
@synthesize
remark
=
_remark
;
@synthesize
endDate
=
_endDate
;
@synthesize
unpaid
=
_unpaid
;
@synthesize
subject
=
_subject
;
@synthesize
beginDate
=
_beginDate
;
@synthesize
direction
=
_direction
;
@synthesize
paid
=
_paid
;
+
(
instancetype
)
modelObjectWithDictionary
:(
NSDictionary
*
)
dict
{
return
[[
self
alloc
]
initWithDictionary
:
dict
];
}
-
(
instancetype
)
initWithDictionary
:(
NSDictionary
*
)
dict
{
self
=
[
super
init
];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if
(
self
&&
[
dict
isKindOfClass
:[
NSDictionary
class
]])
{
self
.
amount
=
[[
self
objectOrNilForKey
:
kItemsAmount
fromDictionary
:
dict
]
doubleValue
];
self
.
remark
=
[
self
objectOrNilForKey
:
kItemsRemark
fromDictionary
:
dict
];
self
.
endDate
=
[[
self
objectOrNilForKey
:
kItemsEndDate
fromDictionary
:
dict
]
doubleValue
];
self
.
unpaid
=
[[
self
objectOrNilForKey
:
kItemsUnpaid
fromDictionary
:
dict
]
doubleValue
];
self
.
subject
=
[
self
objectOrNilForKey
:
kItemsSubject
fromDictionary
:
dict
];
self
.
beginDate
=
[[
self
objectOrNilForKey
:
kItemsBeginDate
fromDictionary
:
dict
]
doubleValue
];
self
.
direction
=
[[
self
objectOrNilForKey
:
kItemsDirection
fromDictionary
:
dict
]
doubleValue
];
self
.
paid
=
[[
self
objectOrNilForKey
:
kItemsPaid
fromDictionary
:
dict
]
doubleValue
];
}
return
self
;
}
-
(
NSDictionary
*
)
dictionaryRepresentation
{
NSMutableDictionary
*
mutableDict
=
[
NSMutableDictionary
dictionary
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
amount
]
forKey
:
kItemsAmount
];
[
mutableDict
setValue
:
self
.
remark
forKey
:
kItemsRemark
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
endDate
]
forKey
:
kItemsEndDate
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
unpaid
]
forKey
:
kItemsUnpaid
];
[
mutableDict
setValue
:
self
.
subject
forKey
:
kItemsSubject
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
beginDate
]
forKey
:
kItemsBeginDate
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
direction
]
forKey
:
kItemsDirection
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
paid
]
forKey
:
kItemsPaid
];
return
[
NSDictionary
dictionaryWithDictionary
:
mutableDict
];
}
-
(
NSString
*
)
description
{
return
[
NSString
stringWithFormat
:
@"%@"
,
[
self
dictionaryRepresentation
]];
}
#pragma mark - Helper Method
-
(
id
)
objectOrNilForKey
:
(
id
)
aKey
fromDictionary
:
(
NSDictionary
*
)
dict
{
id
object
=
[
dict
objectForKey
:
aKey
];
return
[
object
isEqual
:[
NSNull
null
]]
?
nil
:
object
;
}
#pragma mark - NSCoding Methods
-
(
id
)
initWithCoder
:
(
NSCoder
*
)
aDecoder
{
self
=
[
super
init
];
self
.
amount
=
[
aDecoder
decodeDoubleForKey
:
kItemsAmount
];
self
.
remark
=
[
aDecoder
decodeObjectForKey
:
kItemsRemark
];
self
.
endDate
=
[
aDecoder
decodeDoubleForKey
:
kItemsEndDate
];
self
.
unpaid
=
[
aDecoder
decodeDoubleForKey
:
kItemsUnpaid
];
self
.
subject
=
[
aDecoder
decodeObjectForKey
:
kItemsSubject
];
self
.
beginDate
=
[
aDecoder
decodeDoubleForKey
:
kItemsBeginDate
];
self
.
direction
=
[
aDecoder
decodeDoubleForKey
:
kItemsDirection
];
self
.
paid
=
[
aDecoder
decodeDoubleForKey
:
kItemsPaid
];
return
self
;
}
-
(
void
)
encodeWithCoder
:
(
NSCoder
*
)
aCoder
{
[
aCoder
encodeDouble
:
_amount
forKey
:
kItemsAmount
];
[
aCoder
encodeObject
:
_remark
forKey
:
kItemsRemark
];
[
aCoder
encodeDouble
:
_endDate
forKey
:
kItemsEndDate
];
[
aCoder
encodeDouble
:
_unpaid
forKey
:
kItemsUnpaid
];
[
aCoder
encodeObject
:
_subject
forKey
:
kItemsSubject
];
[
aCoder
encodeDouble
:
_beginDate
forKey
:
kItemsBeginDate
];
[
aCoder
encodeDouble
:
_direction
forKey
:
kItemsDirection
];
[
aCoder
encodeDouble
:
_paid
forKey
:
kItemsPaid
];
}
-
(
id
)
copyWithZone
:
(
NSZone
*
)
zone
{
Items
*
copy
=
[[
Items
alloc
]
init
];
if
(
copy
)
{
copy
.
amount
=
self
.
amount
;
copy
.
remark
=
[
self
.
remark
copyWithZone
:
zone
];
copy
.
endDate
=
self
.
endDate
;
copy
.
unpaid
=
self
.
unpaid
;
copy
.
subject
=
[
self
.
subject
copyWithZone
:
zone
];
copy
.
beginDate
=
self
.
beginDate
;
copy
.
direction
=
self
.
direction
;
copy
.
paid
=
self
.
paid
;
}
return
copy
;
}
@end
vanke/view_iPhone/templates/statements/Models/StatementModel.h
0 → 100644
View file @
a8d95938
//
// StatementModel.h
//
// Created by 杰 张 on 16/7/18
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
StatementModel
:
NSObject
<
NSCoding
,
NSCopying
>
@property
(
nonatomic
,
assign
)
double
amount
;
@property
(
nonatomic
,
strong
)
NSString
*
settle
;
@property
(
nonatomic
,
assign
)
double
unpaid
;
@property
(
nonatomic
,
strong
)
NSString
*
picture
;
@property
(
nonatomic
,
strong
)
NSString
*
contract
;
@property
(
nonatomic
,
strong
)
NSString
*
shopName
;
@property
(
nonatomic
,
strong
)
NSString
*
shopCode
;
@property
(
nonatomic
,
assign
)
double
paid
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
NSArray
*
items
;
+
(
instancetype
)
modelObjectWithDictionary
:(
NSDictionary
*
)
dict
;
-
(
instancetype
)
initWithDictionary
:(
NSDictionary
*
)
dict
;
-
(
NSDictionary
*
)
dictionaryRepresentation
;
@end
vanke/view_iPhone/templates/statements/Models/StatementModel.m
0 → 100644
View file @
a8d95938
//
// StatementModel.m
//
// Created by 杰 张 on 16/7/18
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "StatementModel.h"
#import "Items.h"
NSString
*
const
kStatementModelAmount
=
@"amount"
;
NSString
*
const
kStatementModelSettle
=
@"settle"
;
NSString
*
const
kStatementModelUnpaid
=
@"unpaid"
;
NSString
*
const
kStatementModelPicture
=
@"picture"
;
NSString
*
const
kStatementModelContract
=
@"contract"
;
NSString
*
const
kStatementModelShopName
=
@"shopName"
;
NSString
*
const
kStatementModelShopCode
=
@"shopCode"
;
NSString
*
const
kStatementModelPaid
=
@"paid"
;
NSString
*
const
kStatementModelState
=
@"state"
;
NSString
*
const
kStatementModelItems
=
@"items"
;
@interface
StatementModel
()
-
(
id
)
objectOrNilForKey
:
(
id
)
aKey
fromDictionary
:
(
NSDictionary
*
)
dict
;
@end
@implementation
StatementModel
@synthesize
amount
=
_amount
;
@synthesize
settle
=
_settle
;
@synthesize
unpaid
=
_unpaid
;
@synthesize
picture
=
_picture
;
@synthesize
contract
=
_contract
;
@synthesize
shopName
=
_shopName
;
@synthesize
shopCode
=
_shopCode
;
@synthesize
paid
=
_paid
;
@synthesize
state
=
_state
;
@synthesize
items
=
_items
;
+
(
instancetype
)
modelObjectWithDictionary
:(
NSDictionary
*
)
dict
{
return
[[
self
alloc
]
initWithDictionary
:
dict
];
}
-
(
instancetype
)
initWithDictionary
:(
NSDictionary
*
)
dict
{
self
=
[
super
init
];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if
(
self
&&
[
dict
isKindOfClass
:[
NSDictionary
class
]])
{
self
.
amount
=
[[
self
objectOrNilForKey
:
kStatementModelAmount
fromDictionary
:
dict
]
doubleValue
];
self
.
settle
=
[
self
objectOrNilForKey
:
kStatementModelSettle
fromDictionary
:
dict
];
self
.
unpaid
=
[[
self
objectOrNilForKey
:
kStatementModelUnpaid
fromDictionary
:
dict
]
doubleValue
];
self
.
picture
=
[
self
objectOrNilForKey
:
kStatementModelPicture
fromDictionary
:
dict
];
self
.
contract
=
[
self
objectOrNilForKey
:
kStatementModelContract
fromDictionary
:
dict
];
self
.
shopName
=
[
self
objectOrNilForKey
:
kStatementModelShopName
fromDictionary
:
dict
];
self
.
shopCode
=
[
self
objectOrNilForKey
:
kStatementModelShopCode
fromDictionary
:
dict
];
self
.
paid
=
[[
self
objectOrNilForKey
:
kStatementModelPaid
fromDictionary
:
dict
]
doubleValue
];
self
.
state
=
[
self
objectOrNilForKey
:
kStatementModelState
fromDictionary
:
dict
];
NSObject
*
receivedItems
=
[
dict
objectForKey
:
kStatementModelItems
];
NSMutableArray
*
parsedItems
=
[
NSMutableArray
array
];
if
([
receivedItems
isKindOfClass
:[
NSArray
class
]])
{
for
(
NSDictionary
*
item
in
(
NSArray
*
)
receivedItems
)
{
if
([
item
isKindOfClass
:[
NSDictionary
class
]])
{
[
parsedItems
addObject
:[
Items
modelObjectWithDictionary
:
item
]];
}
}
}
else
if
([
receivedItems
isKindOfClass
:[
NSDictionary
class
]])
{
[
parsedItems
addObject
:[
Items
modelObjectWithDictionary
:(
NSDictionary
*
)
receivedItems
]];
}
self
.
items
=
[
NSArray
arrayWithArray
:
parsedItems
];
}
return
self
;
}
-
(
NSDictionary
*
)
dictionaryRepresentation
{
NSMutableDictionary
*
mutableDict
=
[
NSMutableDictionary
dictionary
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
amount
]
forKey
:
kStatementModelAmount
];
[
mutableDict
setValue
:
self
.
settle
forKey
:
kStatementModelSettle
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
unpaid
]
forKey
:
kStatementModelUnpaid
];
[
mutableDict
setValue
:
self
.
picture
forKey
:
kStatementModelPicture
];
[
mutableDict
setValue
:
self
.
contract
forKey
:
kStatementModelContract
];
[
mutableDict
setValue
:
self
.
shopName
forKey
:
kStatementModelShopName
];
[
mutableDict
setValue
:
self
.
shopCode
forKey
:
kStatementModelShopCode
];
[
mutableDict
setValue
:[
NSNumber
numberWithDouble
:
self
.
paid
]
forKey
:
kStatementModelPaid
];
[
mutableDict
setValue
:
self
.
state
forKey
:
kStatementModelState
];
NSMutableArray
*
tempArrayForItems
=
[
NSMutableArray
array
];
for
(
NSObject
*
subArrayObject
in
self
.
items
)
{
if
([
subArrayObject
respondsToSelector
:
@selector
(
dictionaryRepresentation
)])
{
// This class is a model object
[
tempArrayForItems
addObject
:[
subArrayObject
performSelector
:
@selector
(
dictionaryRepresentation
)]];
}
else
{
// Generic object
[
tempArrayForItems
addObject
:
subArrayObject
];
}
}
[
mutableDict
setValue
:[
NSArray
arrayWithArray
:
tempArrayForItems
]
forKey
:
kStatementModelItems
];
return
[
NSDictionary
dictionaryWithDictionary
:
mutableDict
];
}
-
(
NSString
*
)
description
{
return
[
NSString
stringWithFormat
:
@"%@"
,
[
self
dictionaryRepresentation
]];
}
#pragma mark - Helper Method
-
(
id
)
objectOrNilForKey
:
(
id
)
aKey
fromDictionary
:
(
NSDictionary
*
)
dict
{
id
object
=
[
dict
objectForKey
:
aKey
];
return
[
object
isEqual
:[
NSNull
null
]]
?
nil
:
object
;
}
#pragma mark - NSCoding Methods
-
(
id
)
initWithCoder
:
(
NSCoder
*
)
aDecoder
{
self
=
[
super
init
];
self
.
amount
=
[
aDecoder
decodeDoubleForKey
:
kStatementModelAmount
];
self
.
settle
=
[
aDecoder
decodeObjectForKey
:
kStatementModelSettle
];
self
.
unpaid
=
[
aDecoder
decodeDoubleForKey
:
kStatementModelUnpaid
];
self
.
picture
=
[
aDecoder
decodeObjectForKey
:
kStatementModelPicture
];
self
.
contract
=
[
aDecoder
decodeObjectForKey
:
kStatementModelContract
];
self
.
shopName
=
[
aDecoder
decodeObjectForKey
:
kStatementModelShopName
];
self
.
shopCode
=
[
aDecoder
decodeObjectForKey
:
kStatementModelShopCode
];
self
.
paid
=
[
aDecoder
decodeDoubleForKey
:
kStatementModelPaid
];
self
.
state
=
[
aDecoder
decodeObjectForKey
:
kStatementModelState
];
self
.
items
=
[
aDecoder
decodeObjectForKey
:
kStatementModelItems
];
return
self
;
}
-
(
void
)
encodeWithCoder
:
(
NSCoder
*
)
aCoder
{
[
aCoder
encodeDouble
:
_amount
forKey
:
kStatementModelAmount
];
[
aCoder
encodeObject
:
_settle
forKey
:
kStatementModelSettle
];
[
aCoder
encodeDouble
:
_unpaid
forKey
:
kStatementModelUnpaid
];
[
aCoder
encodeObject
:
_picture
forKey
:
kStatementModelPicture
];
[
aCoder
encodeObject
:
_contract
forKey
:
kStatementModelContract
];
[
aCoder
encodeObject
:
_shopName
forKey
:
kStatementModelShopName
];
[
aCoder
encodeObject
:
_shopCode
forKey
:
kStatementModelShopCode
];
[
aCoder
encodeDouble
:
_paid
forKey
:
kStatementModelPaid
];
[
aCoder
encodeObject
:
_state
forKey
:
kStatementModelState
];
[
aCoder
encodeObject
:
_items
forKey
:
kStatementModelItems
];
}
-
(
id
)
copyWithZone
:
(
NSZone
*
)
zone
{
StatementModel
*
copy
=
[[
StatementModel
alloc
]
init
];
if
(
copy
)
{
copy
.
amount
=
self
.
amount
;
copy
.
settle
=
[
self
.
settle
copyWithZone
:
zone
];
copy
.
unpaid
=
self
.
unpaid
;
copy
.
picture
=
[
self
.
picture
copyWithZone
:
zone
];
copy
.
contract
=
[
self
.
contract
copyWithZone
:
zone
];
copy
.
shopName
=
[
self
.
shopName
copyWithZone
:
zone
];
copy
.
shopCode
=
[
self
.
shopCode
copyWithZone
:
zone
];
copy
.
paid
=
self
.
paid
;
copy
.
state
=
[
self
.
state
copyWithZone
:
zone
];
copy
.
items
=
[
self
.
items
copyWithZone
:
zone
];
}
return
copy
;
}
@end
vanke/view_iPhone/templates/statements/Statement.storyboard
View file @
a8d95938
...
...
@@ -446,7 +446,7 @@
<connections>
<outlet
property=
"imgShop"
destination=
"Gmk-Kr-RRS"
id=
"vDH-1a-sNj"
/>
<outlet
property=
"labelPaidIn"
destination=
"ZxP-vP-jg0"
id=
"8ud-Fi-tUp"
/>
<outlet
property=
"labelShouldPay"
destination=
"
tYe-gT-7Ke"
id=
"SuL-Ln-JUC
"
/>
<outlet
property=
"labelShouldPay"
destination=
"
om4-cp-cn3"
id=
"jHf-qU-nui
"
/>
<outlet
property=
"labelTitle"
destination=
"eoV-ug-BwJ"
id=
"PbZ-u0-Zr3"
/>
<outlet
property=
"labelUnPaid"
destination=
"bZD-Rx-SkM"
id=
"2UC-TE-oi7"
/>
</connections>
...
...
@@ -485,6 +485,7 @@
<outlet
property=
"labelTotalUnPaid"
destination=
"xYD-uh-jS6"
id=
"gZY-Mu-IrG"
/>
<outlet
property=
"labelYear"
destination=
"v9Q-me-Myt"
id=
"IxQ-on-B9S"
/>
<outlet
property=
"searchBar"
destination=
"GLM-IL-sNq"
id=
"dmh-ye-uCU"
/>
<outlet
property=
"tableView"
destination=
"nAN-KY-uuU"
id=
"YZW-rn-ch7"
/>
<outlet
property=
"textFieldSelectDate"
destination=
"zvp-Uj-Jhu"
id=
"mss-5d-day"
/>
</connections>
</viewController>
...
...
vanke/view_iPhone/templates/statements/ViewControllers/StatementViewController.m
View file @
a8d95938
...
...
@@ -11,7 +11,11 @@
#import "NSDate+FormatterAdditions.h"
#import "SRMonthPicker.h"
#import "StatementListParamModel.h"
#import "StatementModel.h"
#import "VankeAppBoard_iPhone.h"
@interface
StatementViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
SRMonthPickerDelegate
,
UISearchBarDelegate
>
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
tableView
;
/** 共?家商铺 */
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
labelTotalShop
;
/** 应缴合计 */
...
...
@@ -40,13 +44,14 @@
/** 网络请求参数 */
@property
(
nonatomic
,
strong
)
StatementListParamModel
*
paramModel
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrData
;
@end
@implementation
StatementViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[[
VankeAppBoard_iPhone
sharedInstance
]
hideMenu
];
[
self
setDefaults
];
[
self
setUpDatePicker
];
self
.
paramModel
=
[[
StatementListParamModel
alloc
]
init
];
...
...
@@ -60,13 +65,14 @@
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
// self.navigationController.navigationBar.barTintColor = kMainPurpleColor;
}
-
(
void
)
setDefaults
{
NSDate
*
currentDate
=
[
NSDate
date
];
self
.
startDate
=
currentDate
.
yearMonthString
;
self
.
endDate
=
currentDate
.
yearMonthString
;
self
.
endDate
=
[
currentDate
stringWithFormatter
:
@"%Y%m"
]
;
self
.
labelYear
.
text
=
currentDate
.
yearString
;
self
.
labelMonth
.
text
=
currentDate
.
monthString
;
self
.
labelFinishYear
.
text
=
currentDate
.
yearString
;
...
...
@@ -123,20 +129,33 @@
/** 网络请求 */
-
(
void
)
setUpData
{
// NSString *url = [NSString stringWithFormat:@"statement/query/%@~%@?authorizedOrgIn=%@&pageNumber=%@&pageSize=%@", @"2016-06", self.endDate, self.org.uuid, @0, @999];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"statement/query/%@~%@?authorizedOrgIn=%@&pageNumber=%@&pageSize=%@"
,
@"201509"
,
self
.
endDate
,
self
.
org
.
code
,
@0
,
@999
];
WS
(
weakSelf
);
[[
ICRHTTPController
sharedController
]
getUrl
:
url
params
:
nil
success
:^
(
id
data
)
{
NSDictionary
*
dict
=
data
;
CLog
(
@"%@"
,
dict
.
JSONString
);
NSInteger
count
=
dict
[
@"paging"
][
@"recordCount"
];
weakSelf
.
labelTotalShop
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,(
long
)
count
];
for
(
NSDictionary
*
dic
in
data
[
@"data"
][
@"records"
])
{
[
self
.
arrData
addObject
:[
StatementModel
modelObjectWithDictionary
:
dic
]];
}
[
self
.
tableView
reloadData
];
}
failure
:^
(
id
data
)
{
}];
// [[HTTPCilent shareCilent] GET:url parameters:nil complete:^(id responseObject, NSError *error) {
// error;
// }];
}
#pragma mark - tableView DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
10
;
return
self
.
arrData
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
StatementTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"StatementCell"
forIndexPath
:
indexPath
];
[
cell
setUpCellWithArray
:
self
.
arrData
index
:
indexPath
];
return
cell
;
}
...
...
@@ -148,6 +167,13 @@
[
self
PushToStoryBoardVCWithIdentifier
:
@"StatementDetailViewController"
isHideTabbar
:
YES
animate
:
YES
];
}
-
(
NSMutableArray
*
)
arrData
{
if
(
!
_arrData
)
{
_arrData
=
[
NSMutableArray
array
];
}
return
_arrData
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
vanke/view_iPhone/templates/statements/Views/StatementTableViewCell.h
View file @
a8d95938
...
...
@@ -7,7 +7,7 @@
//
#import <UIKit/UIKit.h>
#import "StatementModel.h"
@interface
StatementTableViewCell
:
UITableViewCell
-
(
void
)
setUpCellWithArray
:(
NSArray
*
)
array
index
:(
NSIndexPath
*
)
indexPath
;
@end
vanke/view_iPhone/templates/statements/Views/StatementTableViewCell.m
View file @
a8d95938
...
...
@@ -25,6 +25,14 @@
// Initialization code
}
-
(
void
)
setUpCellWithArray
:
(
NSArray
*
)
array
index
:
(
NSIndexPath
*
)
indexPath
{
StatementModel
*
model
=
array
[
indexPath
.
row
];
self
.
labelTitle
.
text
=
model
.
shopName
;
self
.
labelShouldPay
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,
model
.
amount
];
self
.
labelPaidIn
.
text
=
[
NSString
stringWithFormat
:
@"[已缴]%.2f"
,
model
.
paid
];
self
.
labelUnPaid
.
text
=
[
NSString
stringWithFormat
:
@"[未缴]%.2f"
,
model
.
unpaid
];
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
...
...
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