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
11b26e92
Commit
11b26e92
authored
Jan 25, 2016
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善在线抽查权限
parent
e0627ecd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
159 additions
and
55 deletions
+159
-55
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
LookOnLineDetailViewController.m
...ineDetail/ViewController/LookOnLineDetailViewController.m
+48
-0
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+111
-55
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
11b26e92
No preview for this file type
redstar/Classes/Module/Function/OnLine/LookOnLineDetail/ViewController/LookOnLineDetailViewController.m
View file @
11b26e92
...
@@ -321,12 +321,18 @@
...
@@ -321,12 +321,18 @@
cell
.
photoButton2
.
tag
=
22011
;
cell
.
photoButton2
.
tag
=
22011
;
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
// UILongPressGestureRecognizer *longGR = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longClick:)];
// [cell.photoButton1 addGestureRecognizer:longGR];
// cell.contentView.backgroundColor = [UIColor orangeColor];
return
cell
;
return
cell
;
}
else
{
}
else
{
InspectAddCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kOnLineInspectAddCell
];
InspectAddCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kOnLineInspectAddCell
];
if
(
!
cell
)
{
if
(
!
cell
)
{
cell
=
[[
InspectAddCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineInspectAddCell
];
cell
=
[[
InspectAddCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kOnLineInspectAddCell
];
}
}
cell
.
photoButton
.
tag
=
22001
;
cell
.
photoButton
.
tag
=
22001
;
[
cell
.
photoButton
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
photoButton
addTarget
:
self
action
:
@selector
(
createImagePicker
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
...
@@ -347,6 +353,8 @@
...
@@ -347,6 +353,8 @@
cell
.
photoButton1
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
;
cell
.
photoButton1
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
;
[
cell
.
photoButton1
setImage
:
image00
forState
:
UIControlStateNormal
];
[
cell
.
photoButton1
setImage
:
image00
forState
:
UIControlStateNormal
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
NSString
*
imageName1
=
_imageNameArray
[(
indexPath
.
row
)
*
2
+
1
];
NSString
*
imageName1
=
_imageNameArray
[(
indexPath
.
row
)
*
2
+
1
];
NSString
*
fullPath1
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName1
];
NSString
*
fullPath1
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName1
];
...
@@ -355,6 +363,13 @@
...
@@ -355,6 +363,13 @@
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
showLookOnLinePic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
photoButton2
addTarget
:
self
action
:
@selector
(
showLookOnLinePic
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
cell
.
photoButton2
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
+
1
;
cell
.
photoButton2
.
tag
=
1118
+
(
indexPath
.
row
)
*
2
+
1
;
[
cell
.
photoButton2
setImage
:
image11
forState
:
UIControlStateNormal
];
[
cell
.
photoButton2
setImage
:
image11
forState
:
UIControlStateNormal
];
// UILongPressGestureRecognizer *longGR = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longClick:)];
//
// [cell.photoButton1 addGestureRecognizer:longGR];
// [cell.photoButton2 addGestureRecognizer:longGR];
return
cell
;
return
cell
;
}
}
...
@@ -362,6 +377,39 @@
...
@@ -362,6 +377,39 @@
}
}
-
(
void
)
longClick
:
(
UIGestureRecognizer
*
)
longGR
{
if
(
longGR
.
state
==
UIGestureRecognizerStateBegan
)
{
// 获取到点击的显示图片的按钮
UIButton
*
showButton
=
(
UIButton
*
)
longGR
.
view
;
// 创建长按删除的按钮
UIButton
*
deleteButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
deleteButton
.
tag
=
5521
+
(
showButton
.
tag
-
1118
);
deleteButton
.
backgroundColor
=
[
UIColor
redColor
];
deleteButton
.
bounds
=
CGRectMake
(
0
,
0
,
20
,
20
);
[
deleteButton
addTarget
:
self
action
:
@selector
(
deletePicture
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
deleteButton
.
frame
=
CGRectMake
(
showButton
.
frame
.
size
.
width
-
deleteButton
.
frame
.
size
.
width
,
0
,
deleteButton
.
frame
.
size
.
width
,
deleteButton
.
frame
.
size
.
height
);
[
showButton
addSubview
:
deleteButton
];
}
}
// 删除图片
-
(
void
)
deletePicture
:
(
UIButton
*
)
button
{
// 从存放所有Image的数组里移除当前点击的Image
[
self
.
imageNameArray
removeObjectAtIndex
:(
button
.
tag
-
5521
)];
if
((
_imageNameArray
.
count
+
1
)
%
2
==
0
)
{
_rowNumber
--
;
[
self
.
tableView
reloadData
];
}
else
{
[
self
.
tableView
reloadData
];
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
{
return
CGFLOAT_MIN
;
return
CGFLOAT_MIN
;
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
11b26e92
...
@@ -109,7 +109,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -109,7 +109,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
self
.
navigationItem
.
titleView
=
customLab
;
self
.
navigationItem
.
titleView
=
customLab
;
self
.
titleArray
=
[
NSMutableArray
array
];
self
.
titleArray
=
[
NSMutableArray
array
];
self
.
sectionArray
=
[
NSMutableArray
arrayWithObjects
:
@"口碑报告"
,
@"商场风采"
,
@"优秀案例"
,
@"巡店报告"
,
@"问题知识"
,
@"口碑巡检"
,
@"在线抽查"
,
@"查看抽查"
,
nil
];
self
.
sectionArray
=
[
NSMutableArray
arrayWithObjects
:
@"口碑报告"
,
@"商场风采"
,
@"优秀案例"
,
@"巡店报告"
,
@"问题知识"
,
@"口碑巡检"
,
@"在线抽查"
,
nil
];
// self.sectionArray = [NSMutableArray arrayWithObjects:@"口碑报告",@"商场风采",@"优秀案例",@"巡店报告", @"问题知识",@"口碑巡检",nil];
// self.sectionArray = [NSMutableArray arrayWithObjects:@"口碑报告",@"商场风采",@"优秀案例",@"巡店报告", @"问题知识",@"口碑巡检",nil];
self
.
allRankListArray
=
[
NSMutableArray
array
];
self
.
allRankListArray
=
[
NSMutableArray
array
];
...
@@ -147,10 +147,14 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -147,10 +147,14 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
if
([
permissions
containsObject
:
@"500301"
]
||
[
permissions
containsObject
:
@"500302"
])
{
if
([
permissions
containsObject
:
@"500301"
]
||
[
permissions
containsObject
:
@"500302"
])
{
[
self
.
titleArray
addObject
:
@"图说口碑"
];
[
self
.
titleArray
addObject
:
@"图说口碑"
];
}
else
{
[
_sectionArray
removeObject
:
@"图说口碑"
];
}
}
if
([
permissions
containsObject
:
@"500401"
]
||
[
permissions
containsObject
:
@"500402"
])
{
if
([
permissions
containsObject
:
@"500401"
]
||
[
permissions
containsObject
:
@"500402"
])
{
[
self
.
titleArray
addObject
:
@"口碑标准"
];
[
self
.
titleArray
addObject
:
@"口碑标准"
];
}
else
{
[
_sectionArray
removeObject
:
@"口碑标准"
];
}
}
if
([
permissions
containsObject
:
@"500501"
]
||
[
permissions
containsObject
:
@"500502"
])
{
if
([
permissions
containsObject
:
@"500501"
]
||
[
permissions
containsObject
:
@"500502"
])
{
...
@@ -167,15 +171,26 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -167,15 +171,26 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[
_sectionArray
removeObject
:
@"口碑巡检"
];
[
_sectionArray
removeObject
:
@"口碑巡检"
];
}
}
if
([
permissions
containsObject
:
@"500701"
])
{
if
([
permissions
containsObject
:
@"500701"
]
||
[
permissions
containsObject
:
@"500702"
]
)
{
[
self
.
titleArray
addObject
:
@"在线抽查"
];
[
self
.
titleArray
addObject
:
@"在线抽查"
];
[
self
requestSpotCheckList
];
if
([
permissions
containsObject
:
@"500701"
])
{
[
self
requestLookOnLineList
];
}
else
if
([
permissions
containsObject
:
@"500702"
]){
[
self
requestSpotCheckList
];
}
}
else
{
[
_sectionArray
removeObject
:
@"在线抽查"
];
}
}
if
([
permissions
containsObject
:
@"500702"
])
{
// if ([permissions containsObject:@"500702"]) {
[
self
.
titleArray
addObject
:
@"查看抽查"
];
// [self.titleArray addObject:@"在线抽查"];
[
self
requestLookOnLineList
];
//
}
// } else {
// [_sectionArray removeObjectAtIndex:7];
// }
[
self
setupTableView
];
[
self
setupTableView
];
...
@@ -617,6 +632,10 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -617,6 +632,10 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
if
(
_allSpotCheckList
.
count
==
0
)
{
if
(
_allSpotCheckList
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"在线抽查"
];
[
_sectionArray
removeObject
:
@"在线抽查"
];
}
else
{
if
(
!
[
_sectionArray
containsObject
:
@"在线抽查"
])
{
[
_sectionArray
addObject
:
@"在线抽查"
];
}
}
}
[
MBProgressHUD
hideAllHUDsForView
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
hideAllHUDsForView
:
self
.
view
animated
:
YES
];
}];
}];
...
@@ -648,7 +667,12 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -648,7 +667,12 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
_allLookOnLineList
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
_allLookOnLineList
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
if
(
_allLookOnLineList
.
count
==
0
)
{
if
(
_allLookOnLineList
.
count
==
0
)
{
[
_sectionArray
removeObject
:
@"查看抽查"
];
[
_sectionArray
removeObject
:
@"在线抽查"
];
}
else
{
if
(
!
[
_sectionArray
containsObject
:
@"在线抽查"
])
{
[
_sectionArray
addObject
:
@"在线抽查"
];
}
}
}
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
...
@@ -707,11 +731,19 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -707,11 +731,19 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
// 更多按钮点击事件
// 更多按钮点击事件
-
(
void
)
moreButtonClick
:
(
UIButton
*
)
sender
-
(
void
)
moreButtonClick
:
(
UIButton
*
)
sender
{
{
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSInteger
section
=
sender
.
tag
-
332892
;
NSInteger
section
=
sender
.
tag
-
332892
;
UINavigationController
*
nav
;
UINavigationController
*
nav
;
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
])
{
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
])
{
SpotCheckOnLineViewController
*
spotOnline
=
[[
SpotCheckOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
spotOnline
];
if
([
permissions
containsObject
:
@"500701"
])
{
SpotCheckOnLineViewController
*
spotOnline
=
[[
SpotCheckOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
spotOnline
];
}
else
if
([
permissions
containsObject
:
@"500702"
]){
LookOnLineViewController
*
lookOnLine
=
[[
LookOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
lookOnLine
];
}
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑巡检"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑巡检"
])
{
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
...
@@ -727,9 +759,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -727,9 +759,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑报告"
]){
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑报告"
]){
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"查看抽查"
]){
LookOnLineViewController
*
lookOnLine
=
[[
LookOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
lookOnLine
];
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"商场风采"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"商场风采"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
...
@@ -758,11 +787,21 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -758,11 +787,21 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
-
(
void
)
itemClick
:
(
HomeCellItem
*
)
sender
-
(
void
)
itemClick
:
(
HomeCellItem
*
)
sender
{
{
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
HomeCellItem
*
item
=
(
HomeCellItem
*
)
sender
;
HomeCellItem
*
item
=
(
HomeCellItem
*
)
sender
;
UINavigationController
*
nav
;
UINavigationController
*
nav
;
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"在线抽查"
])
{
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"在线抽查"
])
{
SpotCheckOnLineViewController
*
spotOnline
=
[[
SpotCheckOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
spotOnline
];
if
([
permissions
containsObject
:
@"500701"
])
{
SpotCheckOnLineViewController
*
spotOnline
=
[[
SpotCheckOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
spotOnline
];
}
else
if
([
permissions
containsObject
:
@"500702"
]){
LookOnLineViewController
*
lookOnLine
=
[[
LookOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
lookOnLine
];
}
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑巡检"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑巡检"
])
{
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
InspectListViewController
*
inspectListVC
=
[[
InspectListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
inspectListVC
];
...
@@ -778,9 +817,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -778,9 +817,6 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑报告"
]){
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"口碑报告"
]){
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
RankingListViewController
*
rankingListVC
=
[[
RankingListViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rankingListVC
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"查看抽查"
]){
LookOnLineViewController
*
lookOnLine
=
[[
LookOnLineViewController
alloc
]
init
];
nav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
lookOnLine
];
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"商场风采"
])
{
}
else
if
([
item
.
titleLabel
.
text
isEqualToString
:
@"商场风采"
])
{
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
PictureViewController
*
pic
=
[[
PictureViewController
alloc
]
init
];
pic
.
come
=
@"首页"
;
pic
.
come
=
@"首页"
;
...
@@ -806,6 +842,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -806,6 +842,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
{
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"商场风采"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"商场风采"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
...
@@ -813,7 +852,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -813,7 +852,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"优秀案例"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"优秀案例"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"巡店报告"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"巡店报告"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看
抽查"
];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线
抽查"];
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑巡检"
]
&&
section
==
s1
)
{
if
([
_sectionArray
[
section
]
isEqualToString
:
@"口碑巡检"
]
&&
section
==
s1
)
{
return
_taskListDataArray
.
count
;
return
_taskListDataArray
.
count
;
...
@@ -828,9 +867,13 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -828,9 +867,13 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"巡店报告"
]
&&
section
==
s6
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"巡店报告"
]
&&
section
==
s6
)
{
return
_allPatrolReportArray
.
count
;
return
_allPatrolReportArray
.
count
;
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
]
&&
section
==
s7
)
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"在线抽查"
]
&&
section
==
s7
)
{
return
_allSpotCheckList
.
count
;
if
([
permissions
containsObject
:
@"500701"
])
{
}
else
if
([
_sectionArray
[
section
]
isEqualToString
:
@"查看抽查"
]
&&
section
==
s8
)
{
return
_allSpotCheckList
.
count
;
return
_allLookOnLineList
.
count
;
}
else
if
([
permissions
containsObject
:
@"500702"
]){
return
_allLookOnLineList
.
count
;
}
else
{
return
0
;
}
}
else
{
}
else
{
return
0
;
return
0
;
}
}
...
@@ -840,6 +883,10 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -840,6 +883,10 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
// cell显示的内容
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"商场风采"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"商场风采"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
...
@@ -847,7 +894,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -847,7 +894,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"优秀案例"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"优秀案例"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"巡店报告"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"巡店报告"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看
抽查"
];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线
抽查"];
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
InspectListCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeInspectListCell
];
InspectListCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeInspectListCell
];
...
@@ -922,35 +969,36 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -922,35 +969,36 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
cell
.
pictureList
=
_allPatrolReportArray
[
indexPath
.
row
];
cell
.
pictureList
=
_allPatrolReportArray
[
indexPath
.
row
];
return
cell
;
return
cell
;
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
SpotCheckTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeSpotCehcekCell
];
if
(
!
cell
)
{
cell
=
[[
SpotCheckTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeSpotCehcekCell
];
}
cell
.
spotCheck
=
_allSpotCheckList
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
if
([
permissions
containsObject
:
@"500701"
])
{
SpotCheckTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeSpotCehcekCell
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"查看抽查"
]
&&
indexPath
.
section
==
s8
)
{
if
(
!
cell
)
{
LookOnLineTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeLookOnLineCell
];
cell
=
[[
SpotCheckTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeSpotCehcekCell
];
if
(
!
cell
)
{
}
cell
=
[[
LookOnLineTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeLookOnLineCell
];
cell
.
spotCheck
=
_allSpotCheckList
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
else
if
([
permissions
containsObject
:
@"500702"
]){
LookOnLineTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kHomeLookOnLineCell
];
if
(
!
cell
)
{
cell
=
[[
LookOnLineTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kHomeLookOnLineCell
];
}
cell
.
lookOnLine
=
_allLookOnLineList
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
else
{
return
nil
;
}
}
cell
.
lookOnLine
=
_allLookOnLineList
[
indexPath
.
row
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
else
{
}
else
{
return
nil
;
return
nil
;
}
}
}
}
// cell点击事件
// cell点击事件
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
NSArray
*
permissions
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"permissions"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s2
=
[
_sectionArray
indexOfObject
:
@"口碑报告"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"商场风采"
];
NSUInteger
s4
=
[
_sectionArray
indexOfObject
:
@"商场风采"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
NSUInteger
s3
=
[
_sectionArray
indexOfObject
:
@"问题知识"
];
...
@@ -958,7 +1006,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -958,7 +1006,7 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"优秀案例"
];
NSUInteger
s5
=
[
_sectionArray
indexOfObject
:
@"优秀案例"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"巡店报告"
];
NSUInteger
s6
=
[
_sectionArray
indexOfObject
:
@"巡店报告"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s7
=
[
_sectionArray
indexOfObject
:
@"在线抽查"
];
NSUInteger
s8
=
[
_sectionArray
indexOfObject
:
@"查看
抽查"
];
//NSUInteger s8 = [_sectionArray indexOfObject:@"在线
抽查"];
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"口碑巡检"
]
&&
indexPath
.
section
==
s1
)
{
InspectTaskViewController
*
inspectTaskVC
=
[[
InspectTaskViewController
alloc
]
init
];
InspectTaskViewController
*
inspectTaskVC
=
[[
InspectTaskViewController
alloc
]
init
];
TaskListModel
*
taskList
=
self
.
taskListDataArray
[
indexPath
.
row
];
TaskListModel
*
taskList
=
self
.
taskListDataArray
[
indexPath
.
row
];
...
@@ -1009,18 +1057,26 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -1009,18 +1057,26 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
self
.
hidesBottomBarWhenPushed
=
YES
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
[
self
.
navigationController
pushViewController
:
storyVC
animated
:
YES
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"在线抽查"
]
&&
indexPath
.
section
==
s7
)
{
SpotCheckModel
*
spot
=
_allSpotCheckList
[
indexPath
.
row
];
OnLineCompleteViewController
*
completeVC
=
[[
OnLineCompleteViewController
alloc
]
init
];
completeVC
.
uuid
=
spot
.
uuid
;
self
.
hidesBottomBarWhenPushed
=
YES
;
if
([
permissions
containsObject
:
@"500701"
])
{
[
self
.
navigationController
pushViewController
:
completeVC
animated
:
YES
];
SpotCheckModel
*
spot
=
_allSpotCheckList
[
indexPath
.
row
];
}
else
if
([
_sectionArray
[
indexPath
.
section
]
isEqualToString
:
@"查看抽查"
]
&&
indexPath
.
section
==
s8
)
{
OnLineCompleteViewController
*
completeVC
=
[[
OnLineCompleteViewController
alloc
]
init
];
LookOnLineModel
*
lookOnLine
=
_allLookOnLineList
[
indexPath
.
row
];
completeVC
.
uuid
=
spot
.
uuid
;
LookOnLineDetailViewController
*
lookDetailVC
=
[[
LookOnLineDetailViewController
alloc
]
init
];
self
.
hidesBottomBarWhenPushed
=
YES
;
lookDetailVC
.
lookOnLine
=
lookOnLine
;
[
self
.
navigationController
pushViewController
:
completeVC
animated
:
YES
];
self
.
hidesBottomBarWhenPushed
=
YES
;
}
else
if
([
permissions
containsObject
:
@"500702"
]){
[
self
.
navigationController
pushViewController
:
lookDetailVC
animated
:
YES
];
LookOnLineModel
*
lookOnLine
=
_allLookOnLineList
[
indexPath
.
row
];
}
else
{
LookOnLineDetailViewController
*
lookDetailVC
=
[[
LookOnLineDetailViewController
alloc
]
init
];
lookDetailVC
.
lookOnLine
=
lookOnLine
;
self
.
hidesBottomBarWhenPushed
=
YES
;
[
self
.
navigationController
pushViewController
:
lookDetailVC
animated
:
YES
];
}
else
{
return
;
}
}
else
{
return
;
return
;
}
}
}
}
...
...
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