Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
张杰
xffruit
Commits
a8825459
Commit
a8825459
authored
Aug 24, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购单
parent
8956cf5d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
39 deletions
+33
-39
ProductViewController.m
...wControllers/Purchase/Controllers/ProductViewController.m
+30
-31
ProductCell.m
XFFruit/ViewControllers/Purchase/Views/ProductCell.m
+2
-1
NewSurveyViewController.m
...wControllers/Survey/controllers/NewSurveyViewController.m
+1
-7
No files found.
XFFruit/ViewControllers/Purchase/Controllers/ProductViewController.m
View file @
a8825459
...
...
@@ -15,8 +15,7 @@
@interface
ProductViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
FooterCellDelegate
>
{
CGRect
_tableFrame
;
NSInteger
_currentRow
;
BOOL
isFirst
;
NSMutableArray
*
_selectRowArr
;
//记录当前选中的cell
}
@end
...
...
@@ -26,14 +25,18 @@
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
XXFBgColor
;
[
super
viewDidLoad
];
isFirst
=
YES
;
[
self
initData
];
[
self
createView
];
}
-
(
void
)
initData
{
_selectRowArr
=
[[
NSMutableArray
alloc
]
init
];
if
(
!
self
.
productArr
)
{
self
.
productArr
=
[
NSMutableArray
array
];
}
[
self
.
productArr
addObject
:
@"ffff"
];
[
self
.
productArr
addObject
:
@"fffff"
];
[
self
createView
];
}
-
(
void
)
setViewFrame
:
(
CGRect
)
viewFrame
{
_tableFrame
=
viewFrame
;
}
...
...
@@ -80,35 +83,35 @@
cell
.
editBtn
.
hidden
=
YES
;
}
}
if
(
indexPath
.
row
!=
_currentRow
)
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
CGRect
Linefrmame
=
cell
.
lineLabel
.
frame
;
Linefrmame
.
origin
.
y
=
TableHeight
-
1
;
cell
.
lineLabel
.
frame
=
Linefrmame
;
CGRect
showfrmame
=
cell
.
showView
.
frame
;
showfrmame
.
size
.
height
=
0
;
cell
.
showView
.
frame
=
showfrmame
;
cell
.
showView
.
hidden
=
YES
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
}
else
if
(
indexPath
.
row
==
_currentRow
&&
!
isFirst
)
{
if
([
self
isHaveIndexPath
:
indexPath
])
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowdown"
];
CGRect
Linefrmame
=
cell
.
lineLabel
.
frame
;
Linefrmame
.
origin
.
y
=
200
-
1
;
cell
.
lineLabel
.
frame
=
Linefrmame
;
CGRect
showfrmame
=
cell
.
showView
.
frame
;
showfrmame
.
size
.
height
=
150
;
cell
.
showView
.
frame
=
showfrmame
;
cell
.
showView
.
hidden
=
NO
;
cell
.
backgroundColor
=
XXFBgColor
;
}
else
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
CGRect
Linefrmame
=
cell
.
lineLabel
.
frame
;
Linefrmame
.
origin
.
y
=
TableHeight
-
1
;
cell
.
lineLabel
.
frame
=
Linefrmame
;
CGRect
showfrmame
=
cell
.
showView
.
frame
;
showfrmame
.
size
.
height
=
0
;
cell
.
showView
.
frame
=
showfrmame
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
}
return
cell
;
}
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
for
(
NSIndexPath
*
path
in
_selectRowArr
)
{
if
(
path
.
row
==
indexPath
.
row
)
{
return
YES
;
}
}
return
NO
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ProductCell
*
cell
=
(
ProductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
...
...
@@ -119,29 +122,25 @@
Linefrmame
.
origin
.
y
=
200
-
1
;
showfrmame
.
size
.
height
=
150
;
cell
.
showView
.
hidden
=
NO
;
isFirst
=
NO
;
// cell.showView.hidden = NO;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_selectRowArr
addObject
:
indexPath
];
}
else
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
isFirst
=
YES
;
Linefrmame
.
origin
.
y
=
TableHeight
-
1
;
showfrmame
.
size
.
height
=
0
;
cell
.
showView
.
hidden
=
YES
;
//
cell.showView.hidden = YES;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_selectRowArr
removeObject
:
indexPath
];
}
cell
.
lineLabel
.
frame
=
Linefrmame
;
cell
.
showView
.
frame
=
showfrmame
;
_currentRow
=
indexPath
.
row
;
[
self
.
tableView
reloadData
];
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
_currentRow
&&
!
isFirst
)
{
if
(
[
self
isHaveIndexPath
:
indexPath
]
)
{
return
200
;
}
return
TableHeight
;
...
...
XFFruit/ViewControllers/Purchase/Views/ProductCell.m
View file @
a8825459
...
...
@@ -74,7 +74,8 @@
self
.
showView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TableHeight
,
ScreenSize
.
width
,
0
)];
self
.
showView
.
hidden
=
YES
;
// self.showView.hidden = YES;
self
.
showView
.
clipsToBounds
=
YES
;
self
.
showTitleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showTitleLabel
.
textAlignment
=
NSTextAlignmentLeft
;
...
...
XFFruit/ViewControllers/Survey/controllers/NewSurveyViewController.m
View file @
a8825459
...
...
@@ -354,7 +354,7 @@ typedef enum : NSUInteger {
ChosePersonViewController
*
cvc
=
[
ChosePersonViewController
new
];
cvc
.
chosePerson
=
^
(
NSArray
*
users
){
NSString
*
textStr
=
@""
;
if
(
self
.
users
.
count
>
0
)
{
if
(
self
.
users
.
count
>
0
)
{
[
self
.
users
removeAllObjects
];
}
for
(
SurveyUser
*
user
in
users
)
{
...
...
@@ -428,12 +428,6 @@ typedef enum : NSUInteger {
_startTimeView
=
nil
;
}];
}
#pragma mark delegate
-
(
BOOL
)
growingTextViewShouldReturn
:
(
HPGrowingTextView
*
)
growingTextView
{
[
_noteTextView
resignFirstResponder
];
...
...
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