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
7fbcb01a
Commit
7fbcb01a
authored
Dec 12, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分bug
parent
fff7b6b9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
483 additions
and
537 deletions
+483
-537
project.pbxproj
redstar.xcodeproj/project.pbxproj
+12
-12
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ta/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+0
-16
AnnoTableViewCell.h
...ses/Module/Announce/AnnounceList/Cell/AnnoTableViewCell.h
+1
-0
AnnoTableViewCell.m
...ses/Module/Announce/AnnounceList/Cell/AnnoTableViewCell.m
+31
-5
CommentView.m
redstar/Classes/Module/Comment/View/CommentView.m
+1
-1
CommentWithStarView.m
redstar/Classes/Module/Comment/View/CommentWithStarView.m
+1
-1
OnLineFooterView.m
.../Module/Function/OnLine/AddOnLine/View/OnLineFooterView.m
+2
-2
LookOnLineFootView.m
...unction/OnLine/LookOnLineDetail/View/LookOnLineFootView.m
+1
-1
InspectSortTableCell.m
...rdOfMouth/Inspect/InspectTask/Cell/InspectSortTableCell.m
+3
-0
InspectTaskDetailCell.h
...dOfMouth/Inspect/InspectTask/Cell/InspectTaskDetailCell.h
+10
-12
InspectTaskDetailCell.m
...dOfMouth/Inspect/InspectTask/Cell/InspectTaskDetailCell.m
+243
-208
InspectTitleTableViewCell.h
...outh/Inspect/InspectTask/Cell/InspectTitleTableViewCell.h
+12
-0
InspectTitleTableViewCell.m
...outh/Inspect/InspectTask/Cell/InspectTitleTableViewCell.m
+55
-0
InspectDetailHeaderView.h
...fMouth/Inspect/InspectTask/View/InspectDetailHeaderView.h
+0
-18
InspectDetailHeaderView.m
...fMouth/Inspect/InspectTask/View/InspectDetailHeaderView.m
+0
-182
InspectTaskViewController.m
...ct/InspectTask/ViewController/InspectTaskViewController.m
+111
-79
No files found.
redstar.xcodeproj/project.pbxproj
View file @
7fbcb01a
This diff is collapsed.
Click to expand it.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
7fbcb01a
No preview for this file type
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
7fbcb01a
...
...
@@ -13,21 +13,5 @@
stopOnStyle =
"0"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"redstar/Classes/Module/Function/OnLine/OnLineTaskComplete/Cell/OnLineCompleteDetailCell.m"
timestampString =
"471346560.745287"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"178"
endingLineNumber =
"178"
landmarkName =
"-taskDetailLabel"
landmarkType =
"5"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
redstar/Classes/Module/Announce/AnnounceList/Cell/AnnoTableViewCell.h
View file @
7fbcb01a
...
...
@@ -15,6 +15,7 @@
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
peopleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
dateLabel
;
@property
(
nonatomic
,
strong
)
AnnounceModel
*
announce
;
@property
(
nonatomic
,
copy
)
NSString
*
currentState
;
...
...
redstar/Classes/Module/Announce/AnnounceList/Cell/AnnoTableViewCell.m
View file @
7fbcb01a
...
...
@@ -20,9 +20,8 @@
self
.
titleLabel
.
attributedText
=
attrStr
;
//self.titleLabel.text = [NSString stringWithFormat:@"%@", announce.content];
self
.
peopleLabel
.
text
=
[
NSString
stringWithFormat
:
@"发布人:%@ 发布日期:%@"
,
announce
.
lastModify_operName
,
announce
.
lastModify_time
];
self
.
peopleLabel
.
text
=
[
NSString
stringWithFormat
:
@"发布人:%@"
,
announce
.
lastModify_operName
];
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"发布日期:%@"
,
announce
.
lastModify_time
];
if
([
self
.
currentState
isEqualToString
:
@"false"
])
{
if
(
announce
.
priority
==
0
)
{
self
.
stateLabel
.
text
=
@"低"
;
...
...
@@ -94,7 +93,7 @@
_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
[
self
.
contentView
addSubview
:
_titleLabel
];
NSLayoutConstraint
*
overDateTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
1
7
];
NSLayoutConstraint
*
overDateTop
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
7
];
[
self
.
contentView
addConstraint
:
overDateTop
];
NSLayoutConstraint
*
overDateLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
55
];
...
...
@@ -130,13 +129,40 @@
[
self
.
contentView
addConstraint
:
overDateRight
];
NSLayoutConstraint
*
overDateHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_peopleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
20
];
NSLayoutConstraint
*
overDateHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_peopleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
18
];
[
self
.
contentView
addConstraint
:
overDateHeight
];
}
return
_peopleLabel
;
}
-
(
UILabel
*
)
dateLabel
{
if
(
!
_dateLabel
)
{
_dateLabel
=
[[
UILabel
alloc
]
init
];
_dateLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_dateLabel
.
textColor
=
kLightGray
;
_dateLabel
.
font
=
[
UIFont
systemFontOfSize
:
13
.
0
];
[
self
.
contentView
addSubview
:
_dateLabel
];
NSLayoutConstraint
*
overDateTop
=
[
NSLayoutConstraint
constraintWithItem
:
_dateLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
peopleLabel
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
1
];
[
self
.
contentView
addConstraint
:
overDateTop
];
NSLayoutConstraint
*
overDateLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_dateLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
55
];
[
self
.
contentView
addConstraint
:
overDateLeft
];
NSLayoutConstraint
*
overDateRight
=
[
NSLayoutConstraint
constraintWithItem
:
_dateLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
overDateRight
];
NSLayoutConstraint
*
overDateHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_dateLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
18
];
[
self
.
contentView
addConstraint
:
overDateHeight
];
}
return
_dateLabel
;
}
-
(
UILabel
*
)
stateLabel
{
if
(
!
_stateLabel
)
{
...
...
redstar/Classes/Module/Comment/View/CommentView.m
View file @
7fbcb01a
...
...
@@ -48,7 +48,7 @@
self
.
contentTextView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
placeholderLabel2
.
text
=
@"请输入评论内容
...
"
;
self
.
placeholderLabel2
.
text
=
@"请输入评论内容
,不超过200字
"
;
[
self
.
sureBtn
setTitle
:
@"确定"
forState
:
UIControlStateNormal
];
...
...
redstar/Classes/Module/Comment/View/CommentWithStarView.m
View file @
7fbcb01a
...
...
@@ -43,7 +43,7 @@
self
.
contentTextView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
placeholderLabel2
.
text
=
@"请输入评论内容
...
"
;
self
.
placeholderLabel2
.
text
=
@"请输入评论内容
,不超过200字
"
;
[
self
.
sureBtn
setTitle
:
@"确定"
forState
:
UIControlStateNormal
];
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/View/OnLineFooterView.m
View file @
7fbcb01a
...
...
@@ -87,8 +87,8 @@
self
.
titleTextView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
contentTextView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
placeholderLabel1
.
text
=
@"请输入文字
...
"
;
self
.
placeholderLabel2
.
text
=
@"请输入文字
...
"
;
self
.
placeholderLabel1
.
text
=
@"请输入文字
,不超过500字
"
;
self
.
placeholderLabel2
.
text
=
@"请输入文字
,不超过500字
"
;
[
self
.
saveButton
setTitle
:
@"保存并下达"
forState
:
UIControlStateNormal
];
...
...
redstar/Classes/Module/Function/OnLine/LookOnLineDetail/View/LookOnLineFootView.m
View file @
7fbcb01a
...
...
@@ -31,7 +31,7 @@
self
.
backImageView1
.
image
=
resizingName
;
self
.
contentTextView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
placeholderLabel2
.
text
=
@"请输入文字
...
"
;
self
.
placeholderLabel2
.
text
=
@"请输入文字
,不超过500字
"
;
[
self
.
resultButton
setTitle
:
@"上报结果"
forState
:
UIControlStateNormal
];
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Cell/InspectSortTableCell.m
View file @
7fbcb01a
...
...
@@ -78,6 +78,9 @@
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
tableBottom
];
NSLayoutConstraint
*
tableHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
44
];
[
self
.
contentView
addConstraint
:
tableHeight
];
}
return
_titleLabel
;
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/
View/InspectDetailView
.h
→
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/
Cell/InspectTaskDetailCell
.h
View file @
7fbcb01a
//
// Inspect
DetailView
.h
// Inspect
TaskDetailCell
.h
// redstar
//
// Created by admin on 15/1
1
/12.
// Created by admin on 15/1
2
/12.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "
InspectListCel
l.h"
#import "
TaskDetailMode
l.h"
@interface
InspectTaskDetailCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@interface
InspectDetailView
:
UIView
@property
(
nonatomic
,
strong
)
UILabel
*
shopnameLabel
;
// 商店名称
@property
(
nonatomic
,
strong
)
UILabel
*
startDateLabel
;
// 起始时间
@property
(
nonatomic
,
strong
)
UILabel
*
overDateLabel
;
// 截止时间
@property
(
nonatomic
,
strong
)
UILabel
*
progressLabel
;
// 完成进度
@property
(
nonatomic
,
strong
)
UILabel
*
alreadyLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
allLabel
;
//@property (nonatomic, assign) ProgressState progressState;
@property
(
nonatomic
,
assign
)
CGFloat
multiplier
;
@property
(
nonatomic
,
strong
)
UIButton
*
unfoldBtn
;
@property
(
nonatomic
,
strong
)
UIImageView
*
arrowImageView
;
@property
(
nonatomic
,
strong
)
UILabel
*
dayLabel
;
// 剩余天数
@property
(
nonatomic
,
strong
)
UIImageView
*
alreadyView
;
@property
(
nonatomic
,
strong
)
UIView
*
allView
;
@property
(
nonatomic
,
strong
)
UILabel
*
introDetailLabel
;
@property
(
nonatomic
,
strong
)
TaskDetailModel
*
taskDetail
;
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/
View/InspectDetailView
.m
→
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/
Cell/InspectTaskDetailCell
.m
View file @
7fbcb01a
This diff is collapsed.
Click to expand it.
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Cell/InspectTitleTableViewCell.h
0 → 100644
View file @
7fbcb01a
//
// InspectTitleTableViewCell.h
// redstar
//
// Created by admin on 15/12/12.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
InspectTitleTableViewCell
:
UITableViewCell
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/Cell/InspectTitleTableViewCell.m
0 → 100644
View file @
7fbcb01a
//
// InspectTitleTableViewCell.m
// redstar
//
// Created by admin on 15/12/12.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectTitleTableViewCell.h"
@implementation
InspectTitleTableViewCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
self
.
contentView
.
backgroundColor
=
kSectionBackGroundColor
;
[
self
setup
];
}
return
self
;
}
#pragma mark - Private Methods
-
(
void
)
setup
{
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
init
];
titleLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
titleLabel
.
backgroundColor
=
[
UIColor
clearColor
];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
titleLabel
.
textColor
=
kLightBlack
;
titleLabel
.
text
=
@"分类项目"
;
[
self
.
contentView
addSubview
:
titleLabel
];
NSLayoutConstraint
*
titleLabelTop
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
titleLabelTop
];
NSLayoutConstraint
*
titleLabelLeft
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
.
contentView
addConstraint
:
titleLabelLeft
];
NSLayoutConstraint
*
titleLabelWidth
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:-
20
];
[
self
.
contentView
addConstraint
:
titleLabelWidth
];
NSLayoutConstraint
*
titleLabelHeight
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
40
];
[
self
.
contentView
addConstraint
:
titleLabelHeight
];
NSLayoutConstraint
*
titleLabelBottom
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
contentView
addConstraint
:
titleLabelBottom
];
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/View/InspectDetailHeaderView.h
deleted
100644 → 0
View file @
fff7b6b9
//
// InspectDetailHeaderView.h
// redstar
//
// Created by admin on 15/11/12.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "InspectDetailView.h"
#import "TaskDetailModel.h"
@interface
InspectDetailHeaderView
:
UIView
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
InspectDetailView
*
detailView
;
@property
(
nonatomic
,
strong
)
TaskDetailModel
*
taskDetail
;
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/View/InspectDetailHeaderView.m
deleted
100644 → 0
View file @
fff7b6b9
//
// InspectDetailHeaderView.m
// redstar
//
// Created by admin on 15/11/12.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "InspectDetailHeaderView.h"
@implementation
InspectDetailHeaderView
-
(
instancetype
)
init
{
self
=
[
super
init
];
if
(
self
)
{
[
self
setup
];
}
return
self
;
}
-
(
instancetype
)
initWithFrame
:
(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
setup
];
}
return
self
;
}
#pragma mark - Private Methods
-
(
void
)
setup
{
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
init
];
titleLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
titleLabel
.
textColor
=
kAnnounceTextColor
;
titleLabel
.
backgroundColor
=
kSectionBackGroundColor
;
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
[
self
addSubview
:
titleLabel
];
NSLayoutConstraint
*
titleLabelTop
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleLabelTop
];
NSLayoutConstraint
*
titleLabelLeft
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleLabelLeft
];
NSLayoutConstraint
*
titleLabelWidth
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleLabelWidth
];
NSLayoutConstraint
*
titleLabelHeight
=
[
NSLayoutConstraint
constraintWithItem
:
titleLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
45
];
[
self
addConstraint
:
titleLabelHeight
];
_titleLabel
=
titleLabel
;
self
.
detailView
.
backgroundColor
=
[
UIColor
whiteColor
];
UILabel
*
classifyLabel
=
[[
UILabel
alloc
]
init
];
classifyLabel
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
classifyLabel
.
textColor
=
kAnnounceTextColor
;
classifyLabel
.
backgroundColor
=
[
UIColor
clearColor
];
classifyLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
.
0
];
classifyLabel
.
text
=
@"分类项目"
;
[
self
addSubview
:
classifyLabel
];
NSLayoutConstraint
*
classifyTop
=
[
NSLayoutConstraint
constraintWithItem
:
classifyLabel
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
245
];
[
self
addConstraint
:
classifyTop
];
NSLayoutConstraint
*
classifyLeft
=
[
NSLayoutConstraint
constraintWithItem
:
classifyLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
20
];
[
self
addConstraint
:
classifyLeft
];
NSLayoutConstraint
*
classifyHeight
=
[
NSLayoutConstraint
constraintWithItem
:
classifyLabel
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
39
];
[
self
addConstraint
:
classifyHeight
];
}
-
(
void
)
setTaskDetail
:
(
TaskDetailModel
*
)
taskDetail
{
_taskDetail
=
taskDetail
;
self
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
name
];
self
.
detailView
.
shopnameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
store_name
];
self
.
detailView
.
startDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
beginDate
];
self
.
detailView
.
overDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
endDate
];
if
(
taskDetail
.
questionCount
==
0
||
taskDetail
.
reportCount
==
0
)
{
self
.
detailView
.
multiplier
=
0
;
}
else
{
self
.
detailView
.
multiplier
=
(
CGFloat
)
taskDetail
.
reportCount
/
taskDetail
.
questionCount
;
}
NSDateFormatter
*
dateFormatter
=
[[
NSDateFormatter
alloc
]
init
];
[
dateFormatter
setDateFormat
:
@"yyyy-MM-dd"
];
// 当前时间
NSDate
*
date
=
[
NSDate
date
];
NSString
*
strDate
=
[
dateFormatter
stringFromDate
:
date
];
NSDate
*
today
=
[
dateFormatter
dateFromString
:
strDate
];
NSLog
(
@"today = %@"
,
today
);
// endTime
NSDate
*
endTime
=
[
dateFormatter
dateFromString
:[
NSString
stringWithFormat
:
@"%@"
,
taskDetail
.
endDate
]];
NSLog
(
@"endTime = %@"
,
endTime
);
NSCalendar
*
cal
=
[
NSCalendar
currentCalendar
];
unsigned
int
unitFlags
=
NSYearCalendarUnit
|
NSMonthCalendarUnit
|
NSDayCalendarUnit
;
NSDateComponents
*
d
=
[
cal
components
:
unitFlags
fromDate
:
today
toDate
:
endTime
options
:
0
];
if
(
d
.
day
>
0
)
{
self
.
detailView
.
dayLabel
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
(
long
)
d
.
day
];
}
else
{
self
.
detailView
.
dayLabel
.
text
=
@"0"
;
}
if
([
taskDetail
.
state
isEqualToString
:
@"initial"
])
{
if
(
taskDetail
.
reportCount
==
0
||
taskDetail
.
questionCount
==
0
)
{
self
.
detailView
.
progressLabel
.
text
=
@"0%"
;
}
else
{
self
.
detailView
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"未处理 %.0f%%"
,
(
CGFloat
)
taskDetail
.
reportCount
/
taskDetail
.
questionCount
*
100
];
}
self
.
detailView
.
progressLabel
.
textColor
=
kProgressUnSettledColor
;
self
.
detailView
.
alreadyLabel
.
textColor
=
kProgressUnSettledColor
;
self
.
detailView
.
allLabel
.
textColor
=
kProgressUnSettledColor
;
}
else
if
([
taskDetail
.
state
isEqualToString
:
@"processing"
])
{
self
.
detailView
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"进行中 %.0f%%"
,
(
CGFloat
)
taskDetail
.
reportCount
/
taskDetail
.
questionCount
*
100
];
self
.
detailView
.
progressLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
alreadyLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
allLabel
.
textColor
=
kProgressDealWithColor
;
}
else
if
([
taskDetail
.
state
isEqualToString
:
@"reported"
])
{
self
.
detailView
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"已上报 %.0f%%"
,
(
CGFloat
)
taskDetail
.
reportCount
/
taskDetail
.
questionCount
*
100
];
self
.
detailView
.
progressLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
alreadyLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
allLabel
.
textColor
=
kProgressDealWithColor
;
}
else
if
([
taskDetail
.
state
isEqualToString
:
@"finished"
])
{
self
.
detailView
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"已评分 %.0f%%"
,
(
CGFloat
)
taskDetail
.
reportCount
/
taskDetail
.
questionCount
*
100
];
self
.
detailView
.
progressLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
alreadyLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
allLabel
.
textColor
=
kProgressDealWithColor
;
}
else
if
([
taskDetail
.
state
isEqualToString
:
@"published"
])
{
self
.
detailView
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"已发布 %.0f%%"
,
(
CGFloat
)
taskDetail
.
reportCount
/
taskDetail
.
questionCount
*
100
];
self
.
detailView
.
progressLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
alreadyLabel
.
textColor
=
kProgressDealWithColor
;
self
.
detailView
.
allLabel
.
textColor
=
kProgressDealWithColor
;
}
else
{
self
.
detailView
.
progressLabel
.
text
=
[
NSString
stringWithFormat
:
@"已过期 %.0f%%"
,
(
CGFloat
)
taskDetail
.
reportCount
/
taskDetail
.
questionCount
*
100
];
self
.
detailView
.
progressLabel
.
textColor
=
kProgressOverDueColor
;
self
.
detailView
.
alreadyLabel
.
textColor
=
kProgressOverDueColor
;
self
.
detailView
.
allLabel
.
textColor
=
kProgressOverDueColor
;
}
self
.
detailView
.
allView
.
backgroundColor
=
kProgressViewAllBackColor
;
self
.
detailView
.
alreadyView
.
backgroundColor
=
kProgressViewAlreadyBackColor
;
self
.
detailView
.
alreadyLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d"
,
taskDetail
.
reportCount
];
self
.
detailView
.
allLabel
.
text
=
[
NSString
stringWithFormat
:
@"/%d"
,
taskDetail
.
questionCount
];
}
-
(
InspectDetailView
*
)
detailView
{
if
(
!
_detailView
)
{
_detailView
=
[[
InspectDetailView
alloc
]
init
];
_detailView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
self
addSubview
:
_detailView
];
NSLayoutConstraint
*
titleLabelTop
=
[
NSLayoutConstraint
constraintWithItem
:
_detailView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
45
];
[
self
addConstraint
:
titleLabelTop
];
NSLayoutConstraint
*
titleLabelLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_detailView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleLabelLeft
];
NSLayoutConstraint
*
titleLabelWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_detailView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
addConstraint
:
titleLabelWidth
];
NSLayoutConstraint
*
titleLabelHeight
=
[
NSLayoutConstraint
constraintWithItem
:
_detailView
attribute
:
NSLayoutAttributeHeight
relatedBy
:
NSLayoutRelationEqual
toItem
:
nil
attribute
:
NSLayoutAttributeNotAnAttribute
multiplier
:
1
.
0
constant
:
200
];
[
self
addConstraint
:
titleLabelHeight
];
}
return
_detailView
;
}
@end
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectTask/ViewController/InspectTaskViewController.m
View file @
7fbcb01a
...
...
@@ -7,11 +7,8 @@
//
#import "InspectTaskViewController.h"
#import "InspectDetailView.h"
#import "InspectSortTableCell.h"
#import "InspectDetailHeaderView.h"
#import "TaskGroup.h"
#import "TaskModel.h"
#import "InspectHeaderView.h"
...
...
@@ -26,12 +23,17 @@
#define kTaskSortCell @"InspectTaskSortCell"
#import "InspectTaskDetailCell.h"
#define kTaskDetailCell @"inspectTaskDetailCell"
#import "InspectTitleTableViewCell.h"
#define kTAskTitleCell @"inspectTitleTaViewCell"
@interface
InspectTaskViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
InspectHeaderDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSArray
*
taskData
;
@property
(
nonatomic
,
strong
)
InspectDetailHeaderView
*
detailHeaderView
;
@property
(
nonatomic
,
assign
)
BOOL
isOpen
;
@property
(
nonatomic
,
strong
)
TaskDetailModel
*
taskDetail
;
@end
...
...
@@ -64,7 +66,6 @@
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"口碑巡检任务"
];
...
...
@@ -74,6 +75,7 @@
// 口碑巡检明细
[
self
requestRankingDetail
];
_isOpen
=
NO
;
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
requestCurrentList
)
...
...
@@ -101,13 +103,11 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@/%@"
,
kRedStarURL
,
kInspectDetailURL
,
self
.
uuid
,
self
.
store_uuid
];
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
__block
InspectTaskViewController
*
weakSelf
=
self
;
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getPraiseDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑巡检明细PraiseDetail = %@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
TaskDetailModel
*
taskDetail
=
[
TaskDetailModel
taskDetailModelWithDict
:
dataDict
];
weakSelf
.
detailHeaderView
.
taskDetail
=
taskDetail
;
_taskDetail
=
taskDetail
;
NSArray
*
dataArray
=
dataDict
[
@"categories"
];
...
...
@@ -138,14 +138,12 @@
NSLog
(
@"url = %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
__block
InspectTaskViewController
*
weakSelf
=
self
;
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
getPraiseDetailWithParameters
:
nil
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑巡检明细PraiseDetail = %@"
,
response
);
NSLog
(
@"error = %@"
,
error
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
TaskDetailModel
*
taskDetail
=
[
TaskDetailModel
taskDetailModelWithDict
:
dataDict
];
weakSelf
.
detailHeaderView
.
taskDetail
=
taskDetail
;
_taskDetail
=
taskDetail
;
NSArray
*
dataArray
=
dataDict
[
@"categories"
];
...
...
@@ -167,30 +165,69 @@
}];
}
-
(
void
)
unfoldCilck
:
(
UIButton
*
)
sender
{
_isOpen
=
!
_isOpen
;
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
[
self
.
tableView
reloadRowsAtIndexPaths
:[
NSArray
arrayWithObject
:
indexPath
]
withRowAnimation
:
UITableViewRowAnimationFade
];
}
#pragma mark - TableView Delegate/DataSource
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
_taskData
.
count
;
return
_taskData
.
count
+
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
TaskGroup
*
taskGroup
=
_taskData
[
section
];
if
(
section
==
0
)
{
return
2
;
}
else
{
TaskGroup
*
taskGroup
=
_taskData
[
section
-
1
];
NSInteger
count
=
taskGroup
.
isOpened
?
taskGroup
.
answers
.
count
:
0
;
return
count
;
}
}
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
row
==
0
)
{
InspectTaskDetailCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kTaskDetailCell
];
if
(
!
cell
)
{
cell
=
[[
InspectTaskDetailCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kTaskDetailCell
];
}
cell
.
taskDetail
=
_taskDetail
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
[
cell
.
unfoldBtn
addTarget
:
self
action
:
@selector
(
unfoldCilck
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
if
(
_isOpen
)
{
cell
.
introDetailLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_taskDetail
.
remark
];
}
else
{
cell
.
introDetailLabel
.
text
=
@""
;
}
return
cell
;
}
else
{
InspectTitleTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kTAskTitleCell
];
if
(
!
cell
)
{
cell
=
[[
InspectTitleTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kTAskTitleCell
];
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
}
else
{
InspectSortTableCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
kTaskSortCell
];
if
(
!
cell
)
{
cell
=
[[
InspectSortTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kTaskSortCell
];
}
TaskGroup
*
taskGroup
=
_taskData
[
indexPath
.
section
];
TaskGroup
*
taskGroup
=
_taskData
[
indexPath
.
section
-
1
];
TaskModel
*
task
=
taskGroup
.
answers
[
indexPath
.
row
];
cell
.
task
=
task
;
...
...
@@ -199,12 +236,17 @@
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
return
cell
;
}
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
TaskGroup
*
taskGroup
=
_taskData
[
indexPath
.
section
];
if
(
indexPath
.
section
==
0
)
{
return
;
}
else
{
TaskGroup
*
taskGroup
=
_taskData
[
indexPath
.
section
-
1
];
TaskModel
*
task
=
taskGroup
.
answers
[
indexPath
.
row
];
if
(
task
.
state
==
0
)
{
...
...
@@ -230,17 +272,16 @@
inspectVC
.
taskModel
=
task
;
[
self
.
navigationController
pushViewController
:
inspectVC
animated
:
YES
];
}
}
// cell的高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
44
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
if
(
section
==
0
)
{
return
0
;
}
else
{
return
50
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
...
...
@@ -251,10 +292,14 @@
// 自定义section
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
if
(
section
==
0
)
{
return
nil
;
}
else
{
InspectHeaderView
*
headView
=
[
InspectHeaderView
headViewWithTableView
:
tableView
];
headView
.
delegate
=
self
;
headView
.
taskGroup
=
_taskData
[
section
];
headView
.
taskGroup
=
_taskData
[
section
-
1
];
return
headView
;
}
}
-
(
void
)
clickHeadView
...
...
@@ -270,10 +315,15 @@
_tableView
.
showsVerticalScrollIndicator
=
NO
;
_tableView
.
showsHorizontalScrollIndicator
=
NO
;
[
_tableView
registerClass
:[
InspectSortTableCell
class
]
forCellReuseIdentifier
:
kTaskSortCell
];
_tableView
.
tableHeaderView
=
self
.
detailHeaderView
;
[
_tableView
registerClass
:[
InspectTaskDetailCell
class
]
forCellReuseIdentifier
:
kTaskDetailCell
];
[
_tableView
registerClass
:[
InspectTitleTableViewCell
class
]
forCellReuseIdentifier
:
kTAskTitleCell
];
_tableView
.
rowHeight
=
UITableViewAutomaticDimension
;
_tableView
.
estimatedRowHeight
=
150
.
0
;
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
-
35
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
...
...
@@ -288,22 +338,4 @@
return
_tableView
;
}
-
(
InspectDetailHeaderView
*
)
detailHeaderView
{
if
(
!
_detailHeaderView
)
{
_detailHeaderView
=
[[
InspectDetailHeaderView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
285
)];
}
return
_detailHeaderView
;
}
/*
#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
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