Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
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
张杰
红星美凯龙管理在线APP IOS
Commits
810ea6c9
Commit
810ea6c9
authored
Nov 23, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口完成
parent
1cc64c97
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
266 additions
and
162 deletions
+266
-162
project.pbxproj
redstar.xcodeproj/project.pbxproj
+0
-6
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
CheckPicViewController.m
redstar/Classes/Module/Check/CheckPicViewController.m
+1
-7
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+4
-4
InspectDetailView.h
.../WordOfMouth/Inspect/InspectTask/View/InspectDetailView.h
+1
-1
InspectDetailView.m
.../WordOfMouth/Inspect/InspectTask/View/InspectDetailView.m
+11
-7
InspectTaskViewController.m
...ct/InspectTask/ViewController/InspectTaskViewController.m
+2
-1
RankDetailTableCell.h
...WordOfMouth/Ranking/RankDetail/Cell/RankDetailTableCell.h
+3
-0
WorkModel.h
...Function/WordOfMouth/Ranking/RankDetail/Model/WorkModel.h
+0
-23
WorkModel.m
...Function/WordOfMouth/Ranking/RankDetail/Model/WorkModel.m
+0
-26
RankDetailHeaderView.h
...ordOfMouth/Ranking/RankDetail/View/RankDetailHeaderView.h
+3
-0
RankDetailHeaderView.m
...ordOfMouth/Ranking/RankDetail/View/RankDetailHeaderView.m
+19
-3
RankHeadView.h
...nction/WordOfMouth/Ranking/RankDetail/View/RankHeadView.h
+2
-2
RankHeadView.m
...nction/WordOfMouth/Ranking/RankDetail/View/RankHeadView.m
+10
-9
RankDetailViewController.h
...king/RankDetail/ViewController/RankDetailViewController.h
+2
-0
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+97
-42
RankingListCell.m
...on/WordOfMouth/Ranking/RankingList/Cell/RankingListCell.m
+4
-0
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+5
-1
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+102
-30
No files found.
redstar.xcodeproj/project.pbxproj
View file @
810ea6c9
...
@@ -56,7 +56,6 @@
...
@@ -56,7 +56,6 @@
84AD4F3A1BF4844600BFB37C
/* RankDetailHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F391BF4844600BFB37C
/* RankDetailHeaderView.m */
;
};
84AD4F3A1BF4844600BFB37C
/* RankDetailHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F391BF4844600BFB37C
/* RankDetailHeaderView.m */
;
};
84AD4F3D1BF4894D00BFB37C
/* RankDetailView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3C1BF4894D00BFB37C
/* RankDetailView.m */
;
};
84AD4F3D1BF4894D00BFB37C
/* RankDetailView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3C1BF4894D00BFB37C
/* RankDetailView.m */
;
};
84AD4F3F1BF498A900BFB37C
/* ranking.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
;
};
84AD4F3F1BF498A900BFB37C
/* ranking.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
;
};
84AD4F431BF4A66F00BFB37C
/* WorkModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F421BF4A66F00BFB37C
/* WorkModel.m */
;
};
84AD4F461BF4A9E800BFB37C
/* RankHeadView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
;
};
84AD4F461BF4A9E800BFB37C
/* RankHeadView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
;
};
84AD4F491BF4BC0600BFB37C
/* RankDetailTableCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F481BF4BC0600BFB37C
/* RankDetailTableCell.m */
;
};
84AD4F491BF4BC0600BFB37C
/* RankDetailTableCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84AD4F481BF4BC0600BFB37C
/* RankDetailTableCell.m */
;
};
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574A1BDB344900083584
/* UIBarButtonItem+Create.m */
;
};
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84C9574A1BDB344900083584
/* UIBarButtonItem+Create.m */
;
};
...
@@ -211,8 +210,6 @@
...
@@ -211,8 +210,6 @@
84AD4F3B1BF4894D00BFB37C
/* RankDetailView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailView.h
;
sourceTree
=
"<group>"
;
};
84AD4F3B1BF4894D00BFB37C
/* RankDetailView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailView.h
;
sourceTree
=
"<group>"
;
};
84AD4F3C1BF4894D00BFB37C
/* RankDetailView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankDetailView.m
;
sourceTree
=
"<group>"
;
};
84AD4F3C1BF4894D00BFB37C
/* RankDetailView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankDetailView.m
;
sourceTree
=
"<group>"
;
};
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
ranking.plist
;
sourceTree
=
"<group>"
;
};
84AD4F3E1BF498A900BFB37C
/* ranking.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
ranking.plist
;
sourceTree
=
"<group>"
;
};
84AD4F411BF4A66F00BFB37C
/* WorkModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
WorkModel.h
;
sourceTree
=
"<group>"
;
};
84AD4F421BF4A66F00BFB37C
/* WorkModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
WorkModel.m
;
sourceTree
=
"<group>"
;
};
84AD4F441BF4A9E800BFB37C
/* RankHeadView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankHeadView.h
;
sourceTree
=
"<group>"
;
};
84AD4F441BF4A9E800BFB37C
/* RankHeadView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankHeadView.h
;
sourceTree
=
"<group>"
;
};
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankHeadView.m
;
sourceTree
=
"<group>"
;
};
84AD4F451BF4A9E800BFB37C
/* RankHeadView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RankHeadView.m
;
sourceTree
=
"<group>"
;
};
84AD4F471BF4BC0600BFB37C
/* RankDetailTableCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailTableCell.h
;
sourceTree
=
"<group>"
;
};
84AD4F471BF4BC0600BFB37C
/* RankDetailTableCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RankDetailTableCell.h
;
sourceTree
=
"<group>"
;
};
...
@@ -1034,8 +1031,6 @@
...
@@ -1034,8 +1031,6 @@
84AD4F401BF49FC100BFB37C
/* Model */
=
{
84AD4F401BF49FC100BFB37C
/* Model */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
84AD4F411BF4A66F00BFB37C
/* WorkModel.h */
,
84AD4F421BF4A66F00BFB37C
/* WorkModel.m */
,
);
);
path
=
Model
;
path
=
Model
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -1570,7 +1565,6 @@
...
@@ -1570,7 +1565,6 @@
84D80EB51BF714BE00A10EA4
/* GroupItems.m in Sources */
,
84D80EB51BF714BE00A10EA4
/* GroupItems.m in Sources */
,
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
,
84C9574D1BDB344900083584
/* UIBarButtonItem+Create.m in Sources */
,
84AD4F3D1BF4894D00BFB37C
/* RankDetailView.m in Sources */
,
84AD4F3D1BF4894D00BFB37C
/* RankDetailView.m in Sources */
,
84AD4F431BF4A66F00BFB37C
/* WorkModel.m in Sources */
,
84ECCF1B1C0210F000EA4960
/* CommentModel.m in Sources */
,
84ECCF1B1C0210F000EA4960
/* CommentModel.m in Sources */
,
84E0ABCD1BFB082E001C8F45
/* TaskDetailModel.m in Sources */
,
84E0ABCD1BFB082E001C8F45
/* TaskDetailModel.m in Sources */
,
8490C4D31BF9DEF0006B6569
/* PictureTableCell.m in Sources */
,
8490C4D31BF9DEF0006B6569
/* PictureTableCell.m in Sources */
,
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
810ea6c9
No preview for this file type
redstar/Classes/Module/Check/CheckPicViewController.m
View file @
810ea6c9
...
@@ -20,16 +20,10 @@
...
@@ -20,16 +20,10 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
[
UIColor
redColor
];
self
.
takeImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
kScreenHeight
)];
self
.
takeImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
kScreenHeight
)];
_takeImageView
.
image
=
_checkImage
;
_takeImageView
.
image
=
_checkImage
;
[
self
.
view
addSubview
:
_takeImageView
];
[
self
.
view
addSubview
:
_takeImageView
];
// [self addGestureRecognizerToView:_takeImageView];
// [_takeImageView setUserInteractionEnabled:YES];
// [_takeImageView setMultipleTouchEnabled:YES];
// Do any additional setup after loading the view.
}
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
810ea6c9
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
@"endDateTo"
:
@""
,
@"endDateTo"
:
@""
,
@"nameLike"
:
@""
,
@"nameLike"
:
@""
,
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
}],
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
}],
@"pageNumber"
:
@
(
1
),
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
@
(
10
)
};
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
...
@@ -324,7 +324,7 @@
...
@@ -324,7 +324,7 @@
{
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSMutableDictionary
*
parameters
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
@""
,
@"userUuid"
,
@""
,
@"beginDateFrom"
,
@""
,
@"endDateTo"
,
@""
,
@"nameLike"
,@[],
@"queryOrders"
,
@
(
1
),
@"pageNumber"
,
@
(
10
),
@"pageSize"
,
nil
];
NSMutableDictionary
*
parameters
=
[
NSMutableDictionary
dictionaryWithObjectsAndKeys
:
@""
,
@"userUuid"
,
@""
,
@"beginDateFrom"
,
@""
,
@"endDateTo"
,
@""
,
@"nameLike"
,@[],
@"queryOrders"
,
@
(
0
),
@"pageNumber"
,
@
(
10
),
@"pageSize"
,
nil
];
if
(
_selectRow
==
0
)
{
if
(
_selectRow
==
0
)
{
...
@@ -441,7 +441,7 @@
...
@@ -441,7 +441,7 @@
@"endDateTo"
:
@""
,
@"endDateTo"
:
@""
,
@"nameLike"
:
@""
,
@"nameLike"
:
@""
,
@"queryOrders"
:
queryOrders
,
@"queryOrders"
:
queryOrders
,
@"pageNumber"
:
@
(
1
),
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
@
(
10
)
};
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
...
@@ -514,7 +514,7 @@
...
@@ -514,7 +514,7 @@
InspectTaskViewController
*
inspectTaskVC
=
[[
InspectTaskViewController
alloc
]
init
];
InspectTaskViewController
*
inspectTaskVC
=
[[
InspectTaskViewController
alloc
]
init
];
inspectTaskVC
.
uuid
=
taskList
.
uuid
;
inspectTaskVC
.
uuid
=
taskList
.
uuid
;
inspectTaskVC
.
store_uuid
=
taskList
.
store_uuid
;
inspectTaskVC
.
store_uuid
=
taskList
.
store_uuid
;
inspectTaskVC
.
multiplier
=
taskList
.
reportCount
/
taskList
.
questionCount
;
inspectTaskVC
.
multiplier
=
(
CGFloat
)
taskList
.
reportCount
/
taskList
.
questionCount
;
[
self
.
navigationController
pushViewController
:
inspectTaskVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
inspectTaskVC
animated
:
YES
];
}
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/View/InspectDetailView.h
View file @
810ea6c9
...
@@ -28,6 +28,6 @@
...
@@ -28,6 +28,6 @@
@property
(
nonatomic
,
strong
)
UILabel
*
dayLabel
;
// 剩余天数
@property
(
nonatomic
,
strong
)
UILabel
*
dayLabel
;
// 剩余天数
@property
(
nonatomic
,
strong
)
UIView
*
alreadyView
;
@property
(
nonatomic
,
strong
)
UI
Image
View
*
alreadyView
;
@property
(
nonatomic
,
strong
)
UIView
*
allView
;
@property
(
nonatomic
,
strong
)
UIView
*
allView
;
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/View/InspectDetailView.m
View file @
810ea6c9
...
@@ -75,8 +75,9 @@
...
@@ -75,8 +75,9 @@
self
.
alreadyLabel
.
textColor
=
kProgressUnSettledColor
;
self
.
alreadyLabel
.
textColor
=
kProgressUnSettledColor
;
self
.
allLabel
.
textColor
=
kProgressUnSettledColor
;
self
.
allLabel
.
textColor
=
kProgressUnSettledColor
;
self
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
self
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
self
.
alreadyView
.
backgroundColor
=
kProgressViewAlreadyBackColor
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
self
.
alreadyView
.
image
=
image
;
}
else
if
(
_progressState
==
ProgressStateDealWith
)
{
}
else
if
(
_progressState
==
ProgressStateDealWith
)
{
self
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"进行中 %f"
,
_multiplier
];
self
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"进行中 %f"
,
_multiplier
];
...
@@ -84,8 +85,9 @@
...
@@ -84,8 +85,9 @@
self
.
alreadyLabel
.
textColor
=
kProgressDealWithColor
;
self
.
alreadyLabel
.
textColor
=
kProgressDealWithColor
;
self
.
allLabel
.
textColor
=
kProgressDealWithColor
;
self
.
allLabel
.
textColor
=
kProgressDealWithColor
;
self
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
self
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
self
.
alreadyView
.
backgroundColor
=
kProgressViewAlreadyBackColor
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
self
.
alreadyView
.
image
=
image
;
}
else
{
}
else
{
self
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"已过期 %f"
,
_multiplier
];
self
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"已过期 %f"
,
_multiplier
];
...
@@ -93,7 +95,9 @@
...
@@ -93,7 +95,9 @@
self
.
alreadyLabel
.
textColor
=
kProgressOverDueColor
;
self
.
alreadyLabel
.
textColor
=
kProgressOverDueColor
;
self
.
allLabel
.
textColor
=
kProgressOverDueColor
;
self
.
allLabel
.
textColor
=
kProgressOverDueColor
;
self
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
self
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
self
.
alreadyView
.
backgroundColor
=
kProgressViewAlreadyBackColor
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
self
.
alreadyView
.
image
=
image
;
}
}
}
}
...
@@ -266,10 +270,10 @@
...
@@ -266,10 +270,10 @@
return
_allView
;
return
_allView
;
}
}
-
(
UIView
*
)
alreadyView
-
(
UI
Image
View
*
)
alreadyView
{
{
if
(
!
_alreadyView
)
{
if
(
!
_alreadyView
)
{
_alreadyView
=
[[
UIView
alloc
]
init
];
_alreadyView
=
[[
UI
Image
View
alloc
]
init
];
_alreadyView
.
layer
.
cornerRadius
=
3
;
_alreadyView
.
layer
.
cornerRadius
=
3
;
_alreadyView
.
layer
.
masksToBounds
=
YES
;
_alreadyView
.
layer
.
masksToBounds
=
YES
;
_alreadyView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_alreadyView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/ViewController/InspectTaskViewController.m
View file @
810ea6c9
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
{
{
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
self
.
tabBarController
.
tabBar
.
hidden
=
YES
;
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
}
}
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
}
}
#pragma mark - Private Methods
#pragma mark - Private Methods
// 返回上一页面
// 返回上一页面
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Cell/RankDetailTableCell.h
View file @
810ea6c9
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "TaskModel.h"
@interface
RankDetailTableCell
:
UITableViewCell
@interface
RankDetailTableCell
:
UITableViewCell
...
@@ -19,4 +20,6 @@
...
@@ -19,4 +20,6 @@
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@property
(
nonatomic
,
strong
)
TaskModel
*
task
;
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Model/WorkModel.h
deleted
100644 → 0
View file @
1cc64c97
//
// WorkModel.h
// redstar
//
// Created by admin on 15/11/12.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
WorkModel
:
NSObject
@property
(
nonatomic
,
strong
)
NSArray
*
Info
;
@property
(
nonatomic
,
strong
)
NSString
*
name
;
@property
(
nonatomic
,
strong
)
NSString
*
score
;
@property
(
nonatomic
,
strong
)
NSString
*
grade
;
@property
(
nonatomic
,
assign
,
getter
=
isOpened
)
BOOL
opened
;
+
(
instancetype
)
workModelWithDict
:(
NSDictionary
*
)
dict
;
-
(
instancetype
)
initWithDict
:(
NSDictionary
*
)
dict
;
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/Model/WorkModel.m
deleted
100644 → 0
View file @
1cc64c97
//
// WorkModel.m
// redstar
//
// Created by admin on 15/11/12.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "WorkModel.h"
@implementation
WorkModel
+
(
instancetype
)
workModelWithDict
:(
NSDictionary
*
)
dict
{
return
[[
self
alloc
]
initWithDict
:
dict
];
}
-
(
instancetype
)
initWithDict
:(
NSDictionary
*
)
dict
{
if
(
self
=
[
super
init
])
{
[
self
setValuesForKeysWithDictionary
:
dict
];
}
return
self
;
}
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/View/RankDetailHeaderView.h
View file @
810ea6c9
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "RankDetailView.h"
#import "RankDetailView.h"
#import "TaskDetailModel.h"
@interface
RankDetailHeaderView
:
UIView
@interface
RankDetailHeaderView
:
UIView
@property
(
nonatomic
,
strong
)
RankDetailView
*
rankDetailView
;
@property
(
nonatomic
,
strong
)
RankDetailView
*
rankDetailView
;
...
@@ -18,4 +19,6 @@
...
@@ -18,4 +19,6 @@
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
showAllBtn
;
// 展开全部
@property
(
nonatomic
,
strong
)
UIButton
*
showAllBtn
;
// 展开全部
@property
(
nonatomic
,
strong
)
TaskDetailModel
*
taskDetail
;
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/View/RankDetailHeaderView.m
View file @
810ea6c9
...
@@ -37,15 +37,31 @@
...
@@ -37,15 +37,31 @@
-
(
void
)
setup
{
-
(
void
)
setup
{
self
.
shopNameLabel
.
text
=
@"上海真北店"
;
[
self
.
historyBtn
setTitle
:
@"历史成绩"
forState
:
UIControlStateNormal
];
[
self
.
historyBtn
setTitle
:
@"历史成绩"
forState
:
UIControlStateNormal
];
self
.
arrowImageView1
.
image
=
[
UIImage
imageNamed
:
@"arrow_right"
];
self
.
arrowImageView1
.
image
=
[
UIImage
imageNamed
:
@"arrow_right"
];
self
.
rankDetailView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
rankDetailView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
titleLabel
.
text
=
@"口碑七大重点工作详情"
;
self
.
titleLabel
.
text
=
@"口碑七大重点工作详情"
;
[
self
.
showAllBtn
setTitle
:
@"历史成绩"
forState
:
UIControlStateNormal
];
[
self
.
showAllBtn
setTitle
:
@"展开"
forState
:
UIControlStateNormal
];
self
.
arrowImageView2
.
image
=
[
UIImage
imageNamed
:
@"arrow_right"
];}
self
.
arrowImageView2
.
image
=
[
UIImage
imageNamed
:
@"arrow_right"
];
}
-
(
void
)
setTaskDetail
:
(
TaskDetailModel
*
)
taskDetail
{
_taskDetail
=
taskDetail
;
self
.
shopNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
store_name
];
self
.
rankDetailView
.
addressLabel
.
text
=
@"上海市真北路1108号"
;
self
.
rankDetailView
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
name
];
self
.
rankDetailView
.
reportTimeLabel
.
text
=
@"上报时间"
;
self
.
rankDetailView
.
totalScoreLabel
.
text
=
@"总评分"
;
self
.
rankDetailView
.
totalGradeLabel
.
text
=
@"总排名"
;
self
.
rankDetailView
.
timeLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
beginDate
];
self
.
rankDetailView
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
score
];
}
-
(
UILabel
*
)
shopNameLabel
-
(
UILabel
*
)
shopNameLabel
{
{
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/View/RankHeadView.h
View file @
810ea6c9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
@class
WorkModel
;
@class
TaskGroup
;
@protocol
RankHeadViewDelegate
<
NSObject
>
@protocol
RankHeadViewDelegate
<
NSObject
>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
@end
@end
@interface
RankHeadView
:
UITableViewHeaderFooterView
@interface
RankHeadView
:
UITableViewHeaderFooterView
@property
(
nonatomic
,
strong
)
WorkModel
*
work
;
@property
(
nonatomic
,
strong
)
TaskGroup
*
taskGroup
;
@property
(
nonatomic
,
weak
)
id
<
RankHeadViewDelegate
>
delegate
;
@property
(
nonatomic
,
weak
)
id
<
RankHeadViewDelegate
>
delegate
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/View/RankHeadView.m
View file @
810ea6c9
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
//
//
#import "RankHeadView.h"
#import "RankHeadView.h"
#import "
WorkModel
.h"
#import "
TaskGroup
.h"
@interface
RankHeadView
()
@interface
RankHeadView
()
{
{
...
@@ -71,24 +71,25 @@
...
@@ -71,24 +71,25 @@
-
(
void
)
headBtnClick
-
(
void
)
headBtnClick
{
{
_
work
.
opened
=
!
_work
.
isOpened
;
_
taskGroup
.
opened
=
!
_taskGroup
.
isOpened
;
if
([
_delegate
respondsToSelector
:
@selector
(
clickRankHeadView
)])
{
if
([
_delegate
respondsToSelector
:
@selector
(
clickRankHeadView
)])
{
[
_delegate
clickRankHeadView
];
[
_delegate
clickRankHeadView
];
}
}
}
}
-
(
void
)
set
Work
:
(
WorkModel
*
)
work
-
(
void
)
set
TaskGroup
:
(
TaskGroup
*
)
taskGroup
{
{
_work
=
work
;
_taskGroup
=
taskGroup
;
[
_bgButton
setTitle
:
work
.
name
forState
:
UIControlStateNormal
];
NSString
*
scoreStr
=
[
NSString
stringWithFormat
:
@"%@ 分"
,
work
.
score
];
[
_bgButton
setTitle
:
taskGroup
.
category
forState
:
UIControlStateNormal
];
NSString
*
scoreStr
=
[
NSString
stringWithFormat
:
@"%@ 分"
,
taskGroup
.
score
];
NSMutableAttributedString
*
scoreAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
scoreStr
];
NSMutableAttributedString
*
scoreAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
scoreStr
];
[
scoreAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
19
.
0
f
]}
range
:
NSMakeRange
(
0
,
scoreAttr
.
length
-
1
)];
[
scoreAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kNavigationBarColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
19
.
0
f
]}
range
:
NSMakeRange
(
0
,
scoreAttr
.
length
-
1
)];
[
scoreAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailSmallTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
scoreAttr
.
length
-
1
,
1
)];
[
scoreAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kDetailSmallTitleColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
scoreAttr
.
length
-
1
,
1
)];
[
_scoreLabel
setAttributedText
:
scoreAttr
];
[
_scoreLabel
setAttributedText
:
scoreAttr
];
NSString
*
rankStr
=
[
NSString
stringWithFormat
:
@"第 %@ 名"
,
work
.
grade
];
NSString
*
rankStr
=
[
NSString
stringWithFormat
:
@"第 %@ 名"
,
taskGroup
.
ranking
];
NSMutableAttributedString
*
rankAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
rankStr
];
NSMutableAttributedString
*
rankAttr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
rankStr
];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kRankHeadTitleTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
1
)];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kRankHeadTitleTextColor
,
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
14
.
0
f
]}
range
:
NSMakeRange
(
0
,
1
)];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kGradeNumberTextColor
}
range
:
NSMakeRange
(
1
,
rankStr
.
length
-
2
)];
[
rankAttr
addAttributes
:@{
NSForegroundColorAttributeName
:
kGradeNumberTextColor
}
range
:
NSMakeRange
(
1
,
rankStr
.
length
-
2
)];
...
@@ -101,8 +102,8 @@
...
@@ -101,8 +102,8 @@
-
(
void
)
didMoveToSuperview
-
(
void
)
didMoveToSuperview
{
{
_arrowImageView
.
transform
=
_
work
.
isOpened
?
CGAffineTransformMakeRotation
(
M_PI
)
:
CGAffineTransformMakeRotation
(
0
);
_arrowImageView
.
transform
=
_
taskGroup
.
isOpened
?
CGAffineTransformMakeRotation
(
M_PI
)
:
CGAffineTransformMakeRotation
(
0
);
_lineView
.
hidden
=
_
work
.
isOpened
?
YES
:
NO
;
_lineView
.
hidden
=
_
taskGroup
.
isOpened
?
YES
:
NO
;
}
}
-
(
void
)
layoutSubviews
-
(
void
)
layoutSubviews
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.h
View file @
810ea6c9
...
@@ -10,5 +10,7 @@
...
@@ -10,5 +10,7 @@
@interface
RankDetailViewController
:
UIViewController
@interface
RankDetailViewController
:
UIViewController
@property
(
nonatomic
,
assign
)
NSInteger
indexRow
;
@property
(
nonatomic
,
assign
)
NSInteger
indexRow
;
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
store_uuid
;
@end
@end
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
810ea6c9
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/Cell/RankingListCell.m
View file @
810ea6c9
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
#import "RankingListCell.h"
#import "RankingListCell.h"
#import "RankListModel.h"
@implementation
RankingListCell
@implementation
RankingListCell
...
@@ -33,6 +34,9 @@
...
@@ -33,6 +34,9 @@
-
(
void
)
setRankList
:
(
RankListModel
*
)
rankList
-
(
void
)
setRankList
:
(
RankListModel
*
)
rankList
{
{
_rankList
=
rankList
;
_rankList
=
rankList
;
[
self
.
shopNameButton
setTitle
:[
NSString
stringWithFormat
:
@"%@"
,
rankList
.
store_name
]
forState
:
UIControlStateNormal
];
self
.
scoreLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
rankList
.
score
];
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
810ea6c9
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
NSDictionary
*
parameters
=
@{
@"beginDateFrom"
:
@""
,
NSDictionary
*
parameters
=
@{
@"beginDateFrom"
:
@""
,
@"endDateTo"
:
@""
,
@"endDateTo"
:
@""
,
@"queryOrders"
:
@[],
@"queryOrders"
:
@[],
@"pageNumber"
:
@
(
1
),
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
10
)
@"pageSize"
:
@
(
10
)
};
};
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
...
@@ -312,8 +312,12 @@
...
@@ -312,8 +312,12 @@
// cell的点击事件
// cell的点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
RankListModel
*
rankList
=
_allRankListArray
[
indexPath
.
row
];
RankDetailViewController
*
rankDetailVC
=
[[
RankDetailViewController
alloc
]
init
];
RankDetailViewController
*
rankDetailVC
=
[[
RankDetailViewController
alloc
]
init
];
rankDetailVC
.
indexRow
=
indexPath
.
row
;
rankDetailVC
.
indexRow
=
indexPath
.
row
;
rankDetailVC
.
uuid
=
rankList
.
uuid
;
rankDetailVC
.
store_uuid
=
rankList
.
store_uuid
;
[
self
.
navigationController
pushViewController
:
rankDetailVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
rankDetailVC
animated
:
YES
];
}
}
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
810ea6c9
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#import "RankingListCell.h"
#import "RankingListCell.h"
#define kHomeRankingListCell @"homeRankingListsCell"
#define kHomeRankingListCell @"homeRankingListsCell"
#import "RankDetailViewController.h"
#import "RankDetailViewController.h"
#import "RankListModel.h"
#import "QuestionListTableCell.h"
#import "QuestionListTableCell.h"
#define kHomeQuestionListTableCell @"homeQuestionListTableCell"
#define kHomeQuestionListTableCell @"homeQuestionListTableCell"
...
@@ -72,7 +73,8 @@
...
@@ -72,7 +73,8 @@
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
selectedIndexes
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
selectedIndexes
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allQuestionArray
;
// 问题与知识
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allQuestionArray
;
// 问题与知识
@property
(
nonatomic
,
strong
)
NSMutableArray
*
taskListDataArray
;
// 问题与知识
@property
(
nonatomic
,
strong
)
NSMutableArray
*
allRankListArray
;
@end
@end
@implementation
HomeViewController
@implementation
HomeViewController
...
@@ -111,6 +113,20 @@
...
@@ -111,6 +113,20 @@
// 初始化容器
// 初始化容器
self
.
selectedIndexes
=
[[
NSMutableDictionary
alloc
]
init
];
self
.
selectedIndexes
=
[[
NSMutableDictionary
alloc
]
init
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
self
.
allRankListArray
=
[
NSMutableArray
array
];
self
.
taskListDataArray
=
[
NSMutableArray
array
];
self
.
allQuestionArray
=
[
NSMutableArray
array
];
self
.
tableView
.
tableHeaderView
=
self
.
headView
;
//
[
self
requestRankingList
];
// 巡检列表
[
self
requestInspectList
];
// 问题与知识
// 问题与知识
[
self
requestQuestionList
];
[
self
requestQuestionList
];
...
@@ -129,10 +145,70 @@
...
@@ -129,10 +145,70 @@
}
}
#pragma mark - 请求
#pragma mark - 请求
-
(
void
)
requestRankingList
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"beginDateFrom"
:
@""
,
@"endDateTo"
:
@""
,
@"queryOrders"
:
@[],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
3
)
};
__block
HomeViewController
*
weakSelf
=
self
;
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑排名response = %@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
for
(
NSDictionary
*
ListDict
in
dataArray
)
{
RankListModel
*
rankList
=
[
RankListModel
rankListModelWithDict
:
ListDict
];
[
weakSelf
.
allRankListArray
addObject
:
rankList
];
}
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
-
(
void
)
requestInspectList
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"userUuid"
:
@""
,
@"beginDateFrom"
:
@""
,
@"endDateTo"
:
@""
,
@"nameLike"
:
@""
,
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
}],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
2
)
};
[
httpCilent
getInspectListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"巡检列表%@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
for
(
NSDictionary
*
dict
in
dataArray
)
{
TaskListModel
*
taskList
=
[[
TaskListModel
alloc
]
init
];
[
taskList
setValuesForKeysWithDictionary
:
dict
];
[
_taskListDataArray
addObject
:
taskList
];
}
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
-
(
void
)
requestQuestionList
-
(
void
)
requestQuestionList
{
{
// 初始化数组
// 初始化数组
self
.
allQuestionArray
=
[
NSMutableArray
array
];
// 请求地址
// 请求地址
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
urlStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
...
@@ -148,18 +224,18 @@
...
@@ -148,18 +224,18 @@
//
//
__block
HomeViewController
*
weakSelf
=
self
;
__block
HomeViewController
*
weakSelf
=
self
;
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
// 请求问题列表
// 请求问题列表
[
httpClient
getQuestionListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
httpClient
getQuestionListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSDictionary
*
recordsDict
=
(
NSDictionary
*
)
dataDict
[
@"records"
];
NSDictionary
*
recordsDict
=
(
NSDictionary
*
)
dataDict
[
@"records"
];
NSLog
(
@"问题与知识列表recods = %@"
,
response
);
NSLog
(
@"问题与知识列表recods = %@"
,
response
);
NSLog
(
@"error = %@"
,
error
);
for
(
NSDictionary
*
questionDict
in
recordsDict
)
{
for
(
NSDictionary
*
questionDict
in
recordsDict
)
{
QuestionModel
*
question
=
[[
QuestionModel
alloc
]
init
];
QuestionModel
*
question
=
[[
QuestionModel
alloc
]
init
];
[
question
setValuesForKeysWithDictionary
:
questionDict
];
[
question
setValuesForKeysWithDictionary
:
questionDict
];
[
weakSelf
.
allQuestionArray
addObject
:
question
];
[
weakSelf
.
allQuestionArray
addObject
:
question
];
}
}
[
self
.
tableView
reloadData
];
self
.
tableView
.
tableHeaderView
=
self
.
headView
;
self
.
tableView
.
tableHeaderView
=
self
.
headView
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}];
...
@@ -329,6 +405,7 @@
...
@@ -329,6 +405,7 @@
NSNumber
*
selectedIndex
=
[
NSNumber
numberWithBool
:
isSelected
];
NSNumber
*
selectedIndex
=
[
NSNumber
numberWithBool
:
isSelected
];
[
_selectedIndexes
setObject
:
selectedIndex
forKey
:
path
];
[
_selectedIndexes
setObject
:
selectedIndex
forKey
:
path
];
if
(
cell
.
isDrop
)
{
if
(
cell
.
isDrop
)
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
...
@@ -438,10 +515,14 @@
...
@@ -438,10 +515,14 @@
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
{
if
(
section
==
1
)
{
if
(
section
==
0
)
{
return
4
;
}
else
{
return
2
;
return
2
;
}
else
if
(
section
==
1
)
{
return
_allRankListArray
.
count
+
1
;
}
else
if
(
section
==
2
)
{
return
_allQuestionArray
.
count
;
}
else
{
return
_taskListDataArray
.
count
;
}
}
}
}
...
@@ -480,14 +561,13 @@
...
@@ -480,14 +561,13 @@
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
RankingListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeRankingListCell
];
cell
=
[[
RankingListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeRankingListCell
];
}
}
RankListModel
*
rankList
=
_allRankListArray
[
indexPath
.
row
-
1
];
cell
.
rankList
=
rankList
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
scoreState
=
ScoreStateHigh
;
cell
.
scoreState
=
ScoreStateHigh
;
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"medal_0%ld"
,
(
long
)(
indexPath
.
row
)];
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"medal_0%ld"
,
(
long
)(
indexPath
.
row
)];
cell
.
gradeImageView
.
image
=
[
UIImage
imageNamed
:
imageName
];
cell
.
gradeImageView
.
image
=
[
UIImage
imageNamed
:
imageName
];
// 添加点击事件
[
cell
.
shopNameButton
setTitle
:
@"上海真北店"
forState
:
UIControlStateNormal
];
cell
.
scoreLabel
.
text
=
@"98"
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
// 添加点击事件
[
cell
.
shopNameButton
addTarget
:
self
action
:
@selector
(
loadMoreInfo
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
shopNameButton
addTarget
:
self
action
:
@selector
(
loadMoreInfo
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
return
cell
;
return
cell
;
}
}
...
@@ -509,22 +589,13 @@
...
@@ -509,22 +589,13 @@
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
InspectListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeInspectListCell
];
cell
=
[[
InspectListCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeInspectListCell
];
}
}
TaskListModel
*
taskList
=
[[
TaskListModel
alloc
]
init
];
TaskListModel
*
taskList
=
_taskListDataArray
[
indexPath
.
row
];
taskList
.
reportCount
=
10
;
taskList
.
questionCount
=
13
;
cell
.
taskList
=
taskList
;
cell
.
taskList
=
taskList
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_test7Array
[
indexPath
.
row
]];
cell
.
startDate
.
text
=
[
NSString
stringWithFormat
:
@"起始时间:%@"
,
_test8Array
[
indexPath
.
row
]];
cell
.
overDate
.
text
=
[
NSString
stringWithFormat
:
@"截止时间:%@"
,
_test9Array
[
indexPath
.
row
]];
cell
.
alreadyLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_test5Array
[
indexPath
.
row
]];
cell
.
allLabel
.
text
=
[
NSString
stringWithFormat
:
@"/%@"
,
_test6Array
[
indexPath
.
row
]];
// CGFloat already = [_test5Array[indexPath.row] floatValue];
// CGFloat all = [_test6Array[indexPath.row] floatValue];
// cell.multiplier = already / all;
cell
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
cell
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
cell
.
alreadyView
.
backgroundColor
=
kProgressViewAlreadyBackColor
;
UIImage
*
image
=
[
UIImage
imageNamed
:
@"progress-bar"
];
image
=
[
image
resizableImageWithCapInsets
:
UIEdgeInsetsZero
resizingMode
:
UIImageResizingModeTile
];
cell
.
alreadyView
.
image
=
image
;
return
cell
;
return
cell
;
}
}
}
}
...
@@ -548,11 +619,12 @@
...
@@ -548,11 +619,12 @@
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
questionDetailVC
animated
:
YES
];
}
else
{
}
else
{
InspectListCell
*
cell
=
(
InspectListCell
*
)[
self
tableView
:
_tableView
cellForRowAtIndexPath
:
indexPath
];
InspectTaskViewController
*
inspectTaskVC
=
[[
InspectTaskViewController
alloc
]
init
];
InspectTaskViewController
*
inspectTaskVC
=
[[
InspectTaskViewController
alloc
]
init
];
inspectTaskVC
.
multiplier
=
cell
.
multiplier
;
TaskListModel
*
taskList
=
_taskListDataArray
[
indexPath
.
row
];
inspectTaskVC
.
alreadyNumber
=
cell
.
alreadyLabel
.
text
;
inspectTaskVC
.
uuid
=
taskList
.
uuid
;
inspectTaskVC
.
allNumber
=
cell
.
allLabel
.
text
;
inspectTaskVC
.
store_uuid
=
taskList
.
store_uuid
;
inspectTaskVC
.
multiplier
=
(
CGFloat
)
taskList
.
reportCount
/
taskList
.
questionCount
;
[
self
.
navigationController
pushViewController
:
inspectTaskVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
inspectTaskVC
animated
:
YES
];
}
}
...
@@ -568,7 +640,7 @@
...
@@ -568,7 +640,7 @@
return
40
;
return
40
;
}
else
{
}
else
{
if
([
self
cellIsSelected
:
indexPath
])
{
if
([
self
cellIsSelected
:
indexPath
])
{
return
108
;
return
108
;
}
}
return
50
;
return
50
;
}
}
...
...
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