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
e96650b5
Commit
e96650b5
authored
Aug 31, 2015
by
zhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
50948233
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
187 additions
and
53 deletions
+187
-53
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+12
-6
NewPurchaseNoticeViewController.m
...chaseNotice/Controllers/NewPurchaseNoticeViewController.m
+30
-11
PurchaseNoticeCell.m
...ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.m
+12
-7
SelectCompanyViewController.h
...ollers/PurchaseNotice/Views/SelectCompanyViewController.h
+13
-0
SelectCompanyViewController.m
...ollers/PurchaseNotice/Views/SelectCompanyViewController.m
+85
-0
ShopDetaileViewController.h
...trollers/PurchaseNotice/Views/ShopDetaileViewController.h
+0
-0
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+35
-29
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
e96650b5
...
...
@@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
04040E001B6FE75800326D12
/* ICRPerson.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04040DFF1B6FE75800326D12
/* ICRPerson.m */
;
};
0406BFD91B7C97E700DD65A7
/* BusinessViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0406BFD81B7C97E700DD65A7
/* BusinessViewController.m */
;
};
0414FF061B94401000C7B00E
/* SelectCompanyViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0414FF051B94401000C7B00E
/* SelectCompanyViewController.m */
;
};
0414FF091B94404300C7B00E
/* ShopDetaileViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0414FF081B94404300C7B00E
/* ShopDetaileViewController.m */
;
};
04703FAC1B8EA50400C72846
/* NewPurchaseNoticeViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04703FA91B8EA50400C72846
/* NewPurchaseNoticeViewController.m */
;
};
04703FAD1B8EA50400C72846
/* SeePurchaseNoticeViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04703FAB1B8EA50400C72846
/* SeePurchaseNoticeViewController.m */
;
};
04703FB01B8EA54000C72846
/* PurchaseNoticeCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04703FAF1B8EA54000C72846
/* PurchaseNoticeCell.m */
;
};
...
...
@@ -360,7 +362,6 @@
C1FE50571AE3587F00C18080
/* ICRAttachmentUnit.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C1FE50551AE3587F00C18080
/* ICRAttachmentUnit.m */
;
};
FE0C9B091B7C543D00335B39
/* User.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE0C9B081B7C543D00335B39
/* User.m */
;
};
FE17F6791B85847D0078CE96
/* QueryOrder.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE17F6781B85847D0078CE96
/* QueryOrder.m */
;
};
FE17F6861B85CA5B0078CE96
/* ShopDetaileViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE17F6821B85CA5B0078CE96
/* ShopDetaileViewController.m */
;
};
FE2FCC7F1B74511000BBC6FB
/* ChooseProductViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE2FCC7E1B74511000BBC6FB
/* ChooseProductViewController.m */
;
};
FE2FCC821B745E1A00BBC6FB
/* SurveyDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE2FCC811B745E1A00BBC6FB
/* SurveyDetailViewController.m */
;
};
FE2FCC881B7492C500BBC6FB
/* ResultDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
FE2FCC871B7492C500BBC6FB
/* ResultDetailViewController.m */
;
};
...
...
@@ -394,6 +395,10 @@
04040DFF1B6FE75800326D12
/* ICRPerson.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ICRPerson.m
;
sourceTree
=
"<group>"
;
};
0406BFD71B7C97E700DD65A7
/* BusinessViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
BusinessViewController.h
;
path
=
../ViewControllers/Business/BusinessViewController.h
;
sourceTree
=
"<group>"
;
};
0406BFD81B7C97E700DD65A7
/* BusinessViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
BusinessViewController.m
;
path
=
../ViewControllers/Business/BusinessViewController.m
;
sourceTree
=
"<group>"
;
};
0414FF041B94401000C7B00E
/* SelectCompanyViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SelectCompanyViewController.h
;
sourceTree
=
"<group>"
;
};
0414FF051B94401000C7B00E
/* SelectCompanyViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SelectCompanyViewController.m
;
sourceTree
=
"<group>"
;
};
0414FF071B94404300C7B00E
/* ShopDetaileViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ShopDetaileViewController.h
;
sourceTree
=
"<group>"
;
};
0414FF081B94404300C7B00E
/* ShopDetaileViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ShopDetaileViewController.m
;
sourceTree
=
"<group>"
;
};
04703FA81B8EA50400C72846
/* NewPurchaseNoticeViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NewPurchaseNoticeViewController.h
;
sourceTree
=
"<group>"
;
};
04703FA91B8EA50400C72846
/* NewPurchaseNoticeViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NewPurchaseNoticeViewController.m
;
sourceTree
=
"<group>"
;
};
04703FAA1B8EA50400C72846
/* SeePurchaseNoticeViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SeePurchaseNoticeViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -791,8 +796,6 @@
FE0C9B081B7C543D00335B39
/* User.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
User.m
;
path
=
../Views/User.m
;
sourceTree
=
"<group>"
;
};
FE17F6771B85847D0078CE96
/* QueryOrder.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
QueryOrder.h
;
sourceTree
=
"<group>"
;
};
FE17F6781B85847D0078CE96
/* QueryOrder.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
QueryOrder.m
;
sourceTree
=
"<group>"
;
};
FE17F6811B85CA5B0078CE96
/* ShopDetaileViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ShopDetaileViewController.h
;
sourceTree
=
"<group>"
;
};
FE17F6821B85CA5B0078CE96
/* ShopDetaileViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ShopDetaileViewController.m
;
sourceTree
=
"<group>"
;
};
FE2FCC7D1B74511000BBC6FB
/* ChooseProductViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ChooseProductViewController.h
;
sourceTree
=
"<group>"
;
};
FE2FCC7E1B74511000BBC6FB
/* ChooseProductViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChooseProductViewController.m
;
sourceTree
=
"<group>"
;
};
FE2FCC801B745E1A00BBC6FB
/* SurveyDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SurveyDetailViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -884,6 +887,10 @@
children
=
(
04703FAE1B8EA54000C72846
/* PurchaseNoticeCell.h */
,
04703FAF1B8EA54000C72846
/* PurchaseNoticeCell.m */
,
0414FF071B94404300C7B00E
/* ShopDetaileViewController.h */
,
0414FF081B94404300C7B00E
/* ShopDetaileViewController.m */
,
0414FF041B94401000C7B00E
/* SelectCompanyViewController.h */
,
0414FF051B94401000C7B00E
/* SelectCompanyViewController.m */
,
);
path
=
Views
;
sourceTree
=
"<group>"
;
...
...
@@ -1949,8 +1956,6 @@
04703FA51B8EA49100C72846
/* Controllers */
,
04703FA61B8EA49100C72846
/* Models */
,
04703FA71B8EA49100C72846
/* Views */
,
FE17F6811B85CA5B0078CE96
/* ShopDetaileViewController.h */
,
FE17F6821B85CA5B0078CE96
/* ShopDetaileViewController.m */
,
);
path
=
PurchaseNotice
;
sourceTree
=
"<group>"
;
...
...
@@ -2176,6 +2181,7 @@
30DB9F971AD7DEC00085FA5C
/* IBTUISearchBar.m in Sources */
,
7217E9E61B72364300FE5C1D
/* SurveyViewController.m in Sources */
,
C10214E41AD9141E0024637E
/* ICRAnnouncementViewController.m in Sources */
,
0414FF061B94401000C7B00E
/* SelectCompanyViewController.m in Sources */
,
C1D017281AD8F46700CD9CB8
/* IBTScrollLoadMoreView.m in Sources */
,
C18AEA841AC8D2EA00A1DB7B
/* IBTUIButton.m in Sources */
,
C1FE50521AE024FA00C18080
/* UIAlertView+Blocks.m in Sources */
,
...
...
@@ -2208,6 +2214,7 @@
C10214DF1AD90A3F0024637E
/* ICRFunctionItemControl.m in Sources */
,
C15918431AC062460013B391
/* IBTTableViewUserInfo.m in Sources */
,
30D702461ADE3862008DC0BF
/* ICRAnnouncementDetailHeadView.m in Sources */
,
0414FF091B94404300C7B00E
/* ShopDetaileViewController.m in Sources */
,
C17E50D91B09830200C15359
/* ICRPostAttachment.m in Sources */
,
C18AEA911AC9B88F00A1DB7B
/* ICRUIAppearance.m in Sources */
,
C142D2B61AC3A155000109A7
/* UILabel+SizeCalculate.m in Sources */
,
...
...
@@ -2229,7 +2236,6 @@
35C3C0B91AE9567B0035AC8A
/* ICRNavigationViewController.mm in Sources */
,
C123A8FB1B2561E1003C0C36
/* JTPopOverWindow.m in Sources */
,
72F56CB21B76EC200077F0C9
/* SurveyUser.m in Sources */
,
FE17F6861B85CA5B0078CE96
/* ShopDetaileViewController.m in Sources */
,
C142D2B41AC3A155000109A7
/* UIImage+Helper.m in Sources */
,
C18AEA9E1AD2F48200A1DB7B
/* ICRStore.m in Sources */
,
C15295BB1B244C8E00DF60D1
/* ICRQScoreViewController.m in Sources */
,
...
...
XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.m
View file @
e96650b5
...
...
@@ -17,6 +17,9 @@
#import "PurchaseNoticeCell.h"
#import "ShopDetaileViewController.h"
#define LeftMargin 15
#define LeftWidth 40
#define RightWidth 30
#define SpaceMargin 1
#define BtnHeight 44
#define TableHeight 46
#define CornerRadius 5
...
...
@@ -28,6 +31,7 @@
#define FootOfsetHeight 140
#define BottomViewHeight 60
typedef
enum
:
NSUInteger
{
SaveTag
=
8000
,
CommitTag
,
...
...
@@ -45,10 +49,6 @@ typedef enum : NSUInteger {
NSIndexPath
*
selectedCellIndexPath
;
NSMutableArray
*
selectCellAry
;
BOOL
_isClickStart
;
UITableView
*
mingXiTableView
;
...
...
@@ -83,14 +83,14 @@ typedef enum : NSUInteger {
_dataArr
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"标题:"
,
@"采购员:"
,
@"备注:"
,
nil
];
self
.
view
.
backgroundColor
=
XXFBgColor
;
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
LeftMargin
,
ScreenSize
.
width
,
ScreenSize
.
height
/
2
-
FootOfsetHeight
-
LeftMargin
))
style
:(
UITableViewStylePlain
)];
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
LeftMargin
,
ScreenSize
.
width
,
ScreenSize
.
height
/
3
-
LeftMargin
))
style
:(
UITableViewStylePlain
)];
_tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
_tableView
.
tag
=
1001
;
_tableView
.
bounces
=
NO
;
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
mingXiTableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
2
*
LeftMargin
+
_tableView
.
frame
.
size
.
height
,
ScreenSize
.
width
,
ScreenSize
.
height
-
_tableView
.
height
-
TableHeight
-
LeftMargin
)];
mingXiTableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
2
*
LeftMargin
+
_tableView
.
frame
.
size
.
height
,
ScreenSize
.
width
,
ScreenSize
.
height
-
_tableView
.
height
-
ScreenSize
.
height
/
5
)];
mingXiTableView
.
backgroundColor
=
[
UIColor
whiteColor
];
mingXiTableView
.
tag
=
1002
;
mingXiTableView
.
bounces
=
NO
;
...
...
@@ -99,15 +99,34 @@ typedef enum : NSUInteger {
UIView
*
footView2
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
TableHeight
)];
footView2
.
backgroundColor
=
[
UIColor
clearColor
];
UILabel
*
lable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
TableHeight
)];
lable
.
text
=
@" 商品 价格 包装规格 包装数量"
;
NSArray
*
ary
=
[
NSArray
arrayWithObjects
:
@"商品"
,
@"价格"
,
@"包装规格"
,
@"包装数量"
,
nil
];
CGFloat
gipWidth
=
(
ScreenSize
.
width
-
(((
RightWidth
+
70
)
+
(
LeftWidth
+
35
))
+
(
35
+
70
)))
/
3
;
for
(
int
i
=
0
;
i
<
ary
.
count
;
i
++
)
{
UILabel
*
lable
=
[[
UILabel
alloc
]
init
];
if
(
i
==
0
)
{
lable
.
frame
=
CGRectMake
(
LeftWidth
,
0
,
35
,
TableHeight
);
}
if
(
i
==
1
)
{
lable
.
frame
=
CGRectMake
(
LeftWidth
+
35
+
gipWidth
,
0
,
35
,
TableHeight
);
}
if
(
i
==
2
)
{
lable
.
frame
=
CGRectMake
(
LeftWidth
+
35
+
gipWidth
+
35
+
gipWidth
,
0
,
70
,
TableHeight
);
}
if
(
i
==
3
)
{
lable
.
frame
=
CGRectMake
(
ScreenSize
.
width
-
RightWidth
-
70
,
0
,
70
,
TableHeight
);
}
// UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(LeftWidth + (SpaceMargin + headWidth)*i,0, headWidth, 50)];
lable
.
text
=
[
ary
objectAtIndex
:
i
];
lable
.
textColor
=
HexColor
(
@"444444"
);
[
footView2
addSubview
:
lable
];
}
UIView
*
footView3
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
TableHeight
)];
footView3
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
addDetailedButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
addDetailedButton
setFrame
:
CGRectMake
(
90
,
0
,
200
,
TableHeight
)];
[
self
.
addDetailedButton
setFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
TableHeight
)];
[
self
.
addDetailedButton
setTitle
:
@"+ 点击添加商品明细"
forState
:
UIControlStateNormal
];
[
self
.
addDetailedButton
addTarget
:
self
action
:
@selector
(
addShopeDetailed
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
addDetailedButton
setTitleColor
:
HexColor
(
@"444444"
)
forState
:
UIControlStateNormal
];
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeCell.m
View file @
e96650b5
...
...
@@ -11,6 +11,8 @@
#define LeftMargin 15
#define TableHeight 46
#define TableWidth 60
#define LeftWidth 40
#define RightWidth 30
@implementation
PurchaseNoticeCell
...
...
@@ -18,7 +20,6 @@
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
self
.
isSelected
=
NO
;
[
self
bulidLayout
];
}
...
...
@@ -27,6 +28,7 @@
-
(
void
)
bulidLayout
{
CGFloat
gipWidth
=
(
ScreenSize
.
width
-
4
*
TableWidth
-
(
LeftMargin
+
20
)
-
RightWidth
)
/
3
;
self
.
HeardLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
*
2
,
1
))];
self
.
HeardLabel
.
backgroundColor
=
HexColor
(
@"e5e5e5"
);
self
.
HeardLabel
.
font
=
FontSize
(
TitleSize
);
...
...
@@ -44,17 +46,17 @@
self
.
SpLabel
.
textColor
=
HexColor
(
@"666666"
);
self
.
SpLabel
.
font
=
FontSize
(
TitleSize
);
self
.
DjLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
+
80
,
0
,
TableWidth
,
TableHeight
))];
self
.
DjLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
+
20
+
self
.
SpLabel
.
size
.
width
+
gipWidth
,
0
,
TableWidth
,
TableHeight
))];
self
.
DjLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
DjLabel
.
textColor
=
HexColor
(
@"666666"
);
self
.
DjLabel
.
font
=
FontSize
(
TitleSize
);
self
.
BzggLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
+
150
,
0
,
TableWidth
,
TableHeight
)];
self
.
BzggLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
self
.
DjLabel
.
frame
.
origin
.
x
+
self
.
DjLabel
.
size
.
width
+
gipWidth
,
0
,
TableWidth
,
TableHeight
)];
self
.
BzggLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
BzggLabel
.
textColor
=
HexColor
(
@"666666"
);
self
.
BzggLabel
.
font
=
FontSize
(
TitleSize
);
self
.
BzslLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
+
240
,
0
,
TableWidth
,
TableHeight
)];
self
.
BzslLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
self
.
BzggLabel
.
frame
.
origin
.
x
+
self
.
BzggLabel
.
size
.
width
+
gipWidth
,
0
,
TableWidth
,
TableHeight
)];
self
.
BzslLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
BzslLabel
.
textColor
=
HexColor
(
@"666666"
);
self
.
BzslLabel
.
font
=
FontSize
(
TitleSize
);
...
...
@@ -71,14 +73,17 @@
NSArray
*
array1
=
[
NSArray
arrayWithObjects
:
@"包装数量"
,
@"基础单价"
,
@"总金额"
,
nil
];
for
(
int
i
=
0
;
i
<
array
.
count
;
i
++
)
{
UILabel
*
lable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
TableWidth
-
10
,
i
*
(
10
+
10
),
100
,
10
)];
UILabel
*
lable
=
[[
UILabel
alloc
]
init
];
// if (i==0) {
lable
.
frame
=
CGRectMake
(
LeftWidth
,
i
*
(
10
+
10
),
100
,
10
);
// }
lable
.
text
=
[
array
objectAtIndex
:
i
];
lable
.
font
=
FontSize
(
TitleSize
-
2
);
[
lable
setTextColor
:
HexColor
(
@"444444"
)];
[
self
.
subSview
addSubview
:
lable
];
}
for
(
int
i
=
0
;
i
<
array1
.
count
;
i
++
)
{
UILabel
*
lable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
TableWidth
+
150
,
i
*
(
10
+
10
),
10
0
,
10
)];
UILabel
*
lable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
ScreenSize
.
width
/
2
,
i
*
(
10
+
10
),
6
0
,
10
)];
lable
.
text
=
[
array
objectAtIndex
:
i
];
lable
.
font
=
FontSize
(
TitleSize
-
2
);
[
lable
setTextColor
:
HexColor
(
@"444444"
)];
...
...
@@ -87,7 +92,7 @@
self
.
subSview
.
hidden
=
YES
;
self
.
button
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
button
setFrame
:
CGRectMake
(
31
0
,
0
,
50
,
50
)];
[
self
.
button
setFrame
:
CGRectMake
(
ScreenSize
.
width
-
5
0
,
0
,
50
,
50
)];
[
self
.
button
setImage
:[
UIImage
imageNamed
:
@"edit"
]
forState
:
UIControlStateNormal
];
[
self
.
contentView
addSubview
:
self
.
button
];
[
self
.
contentView
addSubview
:
self
.
subSview
];
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/SelectCompanyViewController.h
0 → 100644
View file @
e96650b5
//
// SelectCompanyViewController.h
// XFFruit
//
// Created by mac on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
@interface
SelectCompanyViewController
:
ICRBaseViewController
@end
XFFruit/ViewControllers/PurchaseNotice/Views/SelectCompanyViewController.m
0 → 100644
View file @
e96650b5
//
// SelectCompanyViewController.m
// XFFruit
//
// Created by mac on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SelectCompanyViewController.h"
@interface
SelectCompanyViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
>
{
}
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArr
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@end
@implementation
SelectCompanyViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
self
initData
];
[
self
initView
];
// Do any additional setup after loading the view.
}
-
(
void
)
initData
{
self
.
dataArr
=
[
NSMutableArray
arrayWithObjects
:
@"筐"
,
@"斤"
,
nil
];
}
-
(
void
)
initView
{
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
)
style
:(
UITableViewStylePlain
)];
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
self
.
dataArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"cellID"
;
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
UITableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
if
(
indexPath
.
row
>
0
&&
indexPath
.
row
<
_dataArr
.
count
)
{
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
textLabel
.
text
=
self
.
dataArr
[
indexPath
.
row
];
}
}
return
cell
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
40
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#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
XFFruit/ViewControllers/PurchaseNotice/ShopDetaileViewController.h
→
XFFruit/ViewControllers/PurchaseNotice/
Views/
ShopDetaileViewController.h
View file @
e96650b5
File moved
XFFruit/ViewControllers/PurchaseNotice/ShopDetaileViewController.m
→
XFFruit/ViewControllers/PurchaseNotice/
Views/
ShopDetaileViewController.m
View file @
e96650b5
...
...
@@ -12,6 +12,7 @@
#import "StartTimeView.h"
#import "ChosePersonViewController.h"
#import "ChooseProductViewController.h"
#import "SelectCompanyViewController.h"
#import "SurveyUser.h"
#import "Survey.h"
#import "Product.h"
...
...
@@ -371,35 +372,36 @@ typedef enum : NSUInteger {
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
2
||
indexPath
.
row
==
3
)
{
[
self
keyboardHidden
];
if
(
indexPath
.
row
==
2
)
{
_isClickStart
=
YES
;
}
else
{
_isClickStart
=
NO
;
}
[
self
startDatePickView
];
}
else
if
(
indexPath
.
row
==
4
){
ChosePersonViewController
*
cvc
=
[
ChosePersonViewController
new
];
cvc
.
chosePerson
=
^
(
NSArray
*
users
){
NSString
*
textStr
=
@""
;
if
(
self
.
users
.
count
<=
0
)
{
[
self
.
users
removeAllObjects
];
}
for
(
SurveyUser
*
user
in
users
)
{
if
(
textStr
.
length
==
0
)
{
textStr
=
[
textStr
stringByAppendingFormat
:
@"%@"
,
user
.
userName
];
}
else
{
textStr
=
[
textStr
stringByAppendingFormat
:
@"、%@"
,
user
.
userName
];
}
[
self
.
users
addObject
:[
user
dictForCommit
]];
}
_personLabel
.
text
=
textStr
;
_personLabel
.
textColor
=
HexColor
(
@"444444"
);
};
cvc
.
isMoreChose
=
YES
;
[
self
PushViewController
:
cvc
animated
:
YES
];
}
else
if
(
indexPath
.
row
==
1
){
// if (indexPath.row == 2 || indexPath.row == 3) {
// [self keyboardHidden];
// if (indexPath.row == 2) {
// _isClickStart = YES;
// }else{
// _isClickStart = NO;
// }
// [self startDatePickView];
// }else if(indexPath.row == 4){
// ChosePersonViewController *cvc = [ChosePersonViewController new];
// cvc.chosePerson = ^(NSArray *users){
// NSString *textStr = @"";
// if (self.users.count <=0) {
// [self.users removeAllObjects];
// }
// for (SurveyUser *user in users) {
// if (textStr.length == 0) {
// textStr = [textStr stringByAppendingFormat:@"%@",user.userName];
// }else {
// textStr = [textStr stringByAppendingFormat:@"、%@",user.userName];
// }
// [self.users addObject:[user dictForCommit]];
// }
// _personLabel.text = textStr;
// _personLabel.textColor = HexColor(@"444444");
// };
// cvc.isMoreChose = YES;
// [self PushViewController:cvc animated:YES];
// }else
if
(
indexPath
.
row
==
0
){
ChooseProductViewController
*
cvc
=
[
ChooseProductViewController
new
];
cvc
.
choseProduct
=
^
(
Product
*
product
){
_productLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,
product
.
name
,
product
.
code
];
...
...
@@ -410,6 +412,10 @@ typedef enum : NSUInteger {
};
cvc
.
isMoreChose
=
NO
;
[
self
PushViewController
:
cvc
animated
:
YES
];
}
else
if
(
indexPath
.
row
==
3
)
{
SelectCompanyViewController
*
vc
=
[
SelectCompanyViewController
new
];
[
self
PushViewController
:
vc
animated
:
YES
];
}
}
...
...
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