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
50948233
Commit
50948233
authored
Aug 27, 2015
by
zhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
27f380e1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
126 additions
and
59 deletions
+126
-59
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+42
-18
NewPurchaseNoticeViewController.h
...chaseNotice/Controllers/NewPurchaseNoticeViewController.h
+0
-0
NewPurchaseNoticeViewController.m
...chaseNotice/Controllers/NewPurchaseNoticeViewController.m
+75
-36
SeePurchaseNoticeViewController.h
...chaseNotice/Controllers/SeePurchaseNoticeViewController.h
+0
-0
SeePurchaseNoticeViewController.m
...chaseNotice/Controllers/SeePurchaseNoticeViewController.m
+0
-0
PurchaseNoticeCell.h
...ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.h
+1
-0
PurchaseNoticeCell.m
...ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.m
+8
-5
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
50948233
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/NewPurchaseNoticeViewController.h
→
XFFruit/ViewControllers/PurchaseNotice/
Controllers/
NewPurchaseNoticeViewController.h
View file @
50948233
File moved
XFFruit/ViewControllers/PurchaseNotice/NewPurchaseNoticeViewController.m
→
XFFruit/ViewControllers/PurchaseNotice/
Controllers/
NewPurchaseNoticeViewController.m
View file @
50948233
...
...
@@ -16,10 +16,6 @@
#import "Survey.h"
#import "PurchaseNoticeCell.h"
#import "ShopDetaileViewController.h"
#define LeftMargin 15
#define BtnHeight 44
#define TableHeight 46
...
...
@@ -30,6 +26,12 @@
#define KeyboardHeight 258
#define DateViewHeight 300
#define FootOfsetHeight 140
#define BottomViewHeight 60
typedef
enum
:
NSUInteger
{
SaveTag
=
8000
,
CommitTag
,
}
BtnTag
;
@interface
NewPurchaseNoticeViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
UITextFieldDelegate
,
HPGrowingTextViewDelegate
>
{
UITableView
*
_tableView
;
...
...
@@ -41,6 +43,7 @@
UILabel
*
_personLabel
;
HPGrowingTextView
*
_noteTextView
;
NSIndexPath
*
selectedCellIndexPath
;
NSMutableArray
*
selectCellAry
;
BOOL
_isClickStart
;
...
...
@@ -76,6 +79,7 @@
}
-
(
void
)
setupSubviews
{
selectCellAry
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
1000
];
_dataArr
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"标题:"
,
@"采购员:"
,
@"备注:"
,
nil
];
self
.
view
.
backgroundColor
=
XXFBgColor
;
...
...
@@ -115,6 +119,15 @@
self
.
HeardLabel
.
font
=
FontSize
(
TitleSize
);
//HexColor(@"e5e5e5")
UIView
*
footView4
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
ScreenSize
.
height
-
BottomViewHeight
-
64
,
ScreenSize
.
width
,
BottomViewHeight
)];
UIButton
*
saveBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
15
,
8
,
(
ScreenSize
.
width
-
15
*
3
)
/
2
,
44
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
SaveTag
image
:
nil
title
:
@"保存"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
5
bgColor
:
HexColor
(
@"50bd62"
)];
[
footView4
addSubview
:
saveBtn
];
UIButton
*
commitBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
CGRectGetMaxX
(
saveBtn
.
frame
)
+
15
,
8
,
(
ScreenSize
.
width
-
15
*
3
)
/
2
,
44
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
CommitTag
image
:
nil
title
:
@"提交"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
5
bgColor
:
HexColor
(
@"f69100"
)];
[
footView4
addSubview
:
commitBtn
];
[
self
.
view
addSubview
:
footView4
];
[
footView3
addSubview
:
self
.
addDetailedButton
];
[
footView3
addSubview
:
self
.
HeardLabel
];
[
footView3
addSubview
:
self
.
FootLabel
];
...
...
@@ -125,6 +138,7 @@
mingXiTableView
.
tableHeaderView
=
footView2
;
[
self
.
view
addSubview
:
_tableView
];
[
self
.
view
addSubview
:
mingXiTableView
];
[
self
.
view
addSubview
:
footView4
];
}
...
...
@@ -177,17 +191,18 @@
// Cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;向左箭头
}
if
(
selectedCellIndexPath
!=
nil
&
[
selectedCellIndexPath
compare
:
indexPath
]
==
NSOrderedSame
){
if
(
Cell
.
isSelected
==
YES
)
{
Cell
.
arrowView
.
image
=
[
UIImage
imageNamed
:
@"arrowdown"
];
Cell
.
backgroundColor
=
XXFBgColor
;
Cell
.
subSview
.
hidden
=
NO
;
}
else
{
Cell
.
subSview
.
hidden
=
YES
;
Cell
.
arrowView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
]
;
Cell
.
backgroundColor
=
[
UIColor
whiteColor
];
Cell
.
subSview
.
hidden
=
YES
;
}
[
Cell
.
button
addTarget
:
self
action
:
@selector
(
didtoucher
)
forControlEvents
:
UIControlEventTouchUpInside
];
// [cell setTitleStr:_dataArr[indexPath.row]];
return
Cell
;
}
...
...
@@ -204,15 +219,14 @@
}
else
if
([
tableView
isEqual
:
mingXiTableView
])
{
if
(
selectedCellIndexPath
!=
nil
&
[
selectedCellIndexPath
compare
:
indexPath
]
==
NSOrderedSame
){
if
([
self
comperIndexpath
:
indexPath
])
{
return
TableHeight
*
3
;
}
else
{
return
TableHeight
;
}
return
TableHeight
;
}
return
TableHeight
;
}
...
...
@@ -252,11 +266,16 @@
}
else
if
([
tableView
isEqual
:
mingXiTableView
])
{
PurchaseNoticeCell
*
Cell
=
(
PurchaseNoticeCell
*
)[
mingXiTableView
cellForRowAtIndexPath
:
indexPath
];
if
(
Cell
.
isSelected
==
NO
)
{
Cell
.
isSelected
=
YES
;
[
selectCellAry
addObject
:
indexPath
];
}
else
{
Cell
.
isSelected
=
NO
;
[
selectCellAry
removeObject
:
indexPath
];
}
selectedCellIndexPath
=
indexPath
;
// [Cell setTitleStr:@"selected"];
// [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
[
mingXiTableView
reloadData
];
}
...
...
@@ -273,11 +292,7 @@
_titleField
.
returnKeyType
=
UIReturnKeyDone
;
_titleField
.
delegate
=
self
;
[
cell
.
contentView
addSubview
:
_titleField
];
// if (self.survey) {
// _titleField.text = [IBTCommon checkString:self.survey.title];
// self.titleStr = [IBTCommon checkString:self.survey.title];
// }
// }else
}
else
if
(
indexPath
.
row
==
_dataArr
.
count
-
1
){
_noteTextView
=
[[
HPGrowingTextView
alloc
]
initWithFrame
:
CGRectMake
(
100
+
LeftMargin
,
0
,
ScreenSize
.
width
-
100
-
LeftMargin
*
2
-
10
,
TableHeight
)];
_noteTextView
.
contentInset
=
UIEdgeInsetsMake
(
5
,
5
,
5
,
0
);
...
...
@@ -289,10 +304,6 @@
_noteTextView
.
returnKeyType
=
UIReturnKeyDone
;
_noteTextView
.
placeholder
=
@"输入备注内容"
;
[
cell
.
contentView
addSubview
:
_noteTextView
];
// if (self.survey) {
// _noteTextView.text = [IBTCommon checkString:self.survey.remark];
// self.remarkStr = [IBTCommon checkString:self.survey.remark];
// }
CGRect
lineFrame
=
cell
.
lineLabel
.
frame
;
lineFrame
.
origin
.
y
=
TableHeight
*
2
-
1
;
cell
.
lineLabel
.
frame
=
lineFrame
;
...
...
@@ -309,7 +320,15 @@
}
}
}
-
(
BOOL
)
comperIndexpath
:
(
NSIndexPath
*
)
indexPath
{
for
(
NSIndexPath
*
path
in
selectCellAry
)
{
if
(
path
.
row
==
indexPath
.
row
)
{
return
YES
;
}
}
return
NO
;
}
-
(
void
)
preferDataInPersonLabel
{
if
(
self
.
survey
)
{
if
(
self
.
survey
.
users
.
count
>
0
)
{
...
...
@@ -373,6 +392,26 @@
[
_noteTextView
resignFirstResponder
];
[
self
setTableFrame
:
LeftMargin
];
}
-
(
void
)
btnClick
:
(
UIButton
*
)
btn
{
switch
(
btn
.
tag
)
{
case
SaveTag
:
{
// if ([self checkSurvey]) {
// [self saveSurvey:@"initial" message:@"正在保存..."];
// }
}
break
;
case
CommitTag
:
{
// if ([self checkSurvey]) {
// [self saveSurvey:@"submitted" message:@"正在提交..."];
// }
}
break
;
default
:
break
;
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
XFFruit/ViewControllers/PurchaseNotice/SeePurchaseNoticeViewController.h
→
XFFruit/ViewControllers/PurchaseNotice/
Controllers/
SeePurchaseNoticeViewController.h
View file @
50948233
File moved
XFFruit/ViewControllers/PurchaseNotice/SeePurchaseNoticeViewController.m
→
XFFruit/ViewControllers/PurchaseNotice/
Controllers/
SeePurchaseNoticeViewController.m
View file @
50948233
File moved
XFFruit/ViewControllers/PurchaseNotice/PurchaseNoticeCell.h
→
XFFruit/ViewControllers/PurchaseNotice/
Views/
PurchaseNoticeCell.h
View file @
50948233
...
...
@@ -11,6 +11,7 @@
@interface
PurchaseNoticeCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
HeardLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
FootLabel
;
@property
(
nonatomic
,
strong
)
UIImageView
*
arrowView
;
@property
(
nonatomic
,
strong
)
UILabel
*
SpLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
DjLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
BzggLabel
;
...
...
XFFruit/ViewControllers/PurchaseNotice/PurchaseNoticeCell.m
→
XFFruit/ViewControllers/PurchaseNotice/
Views/
PurchaseNoticeCell.m
View file @
50948233
...
...
@@ -32,8 +32,12 @@
self
.
HeardLabel
.
font
=
FontSize
(
TitleSize
);
self
.
FootLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
self
.
size
.
height
-
1
,
ScreenSize
.
width
-
LeftMargin
*
2
,
1
))];
self
.
HeardLabel
.
backgroundColor
=
HexColor
(
@"e5e5e5"
);
self
.
HeardLabel
.
font
=
FontSize
(
TitleSize
);
self
.
FootLabel
.
backgroundColor
=
HexColor
(
@"e5e5e5"
);
self
.
FootLabel
.
font
=
FontSize
(
TitleSize
);
self
.
arrowView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
(
TableHeight
-
10
)
/
2
,
10
,
10
)];
self
.
arrowView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
self
.
arrowView
.
contentMode
=
UIViewContentModeScaleAspectFit
;
self
.
SpLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
+
20
,
0
,
TableWidth
,
TableHeight
))];
self
.
SpLabel
.
textAlignment
=
NSTextAlignmentLeft
;
...
...
@@ -84,9 +88,7 @@
self
.
button
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
button
setFrame
:
CGRectMake
(
310
,
0
,
50
,
50
)];
[
self
.
button
setImage
:[
UIImage
imageNamed
:
@"AttachHide"
]
forState
:
UIControlStateNormal
];
// [self.button setTitle:@"编辑" forState:UIControlStateNormal];
// [self.button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[
self
.
button
setImage
:[
UIImage
imageNamed
:
@"edit"
]
forState
:
UIControlStateNormal
];
[
self
.
contentView
addSubview
:
self
.
button
];
[
self
.
contentView
addSubview
:
self
.
subSview
];
[
self
.
contentView
addSubview
:
self
.
SpLabel
];
...
...
@@ -94,6 +96,7 @@
[
self
.
contentView
addSubview
:
self
.
BzslLabel
];
[
self
.
contentView
addSubview
:
self
.
BzggLabel
];
[
self
.
contentView
addSubview
:
self
.
HeardLabel
];
[
self
.
contentView
addSubview
:
self
.
arrowView
];
// [self.contentView addSubview:self.FootLabel];
}
-
(
void
)
setTitleStr
:
(
NSString
*
)
str
...
...
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