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
a4a53ec4
Commit
a4a53ec4
authored
9 years ago
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规格描述
parent
5cd4c129
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
207 additions
and
11 deletions
+207
-11
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+107
-3
IBTCommon.h
XFFruit/Utilities/IBTUIKit/IBTCommon.h
+3
-1
IBTCommon.m
XFFruit/Utilities/IBTUIKit/IBTCommon.m
+40
-0
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+6
-2
IBTCustomButtom.h
XFFruit/Utilities/IBTUIKit/IBTCustomButtom.h
+8
-0
IBTCustomButtom.m
XFFruit/Utilities/IBTUIKit/IBTCustomButtom.m
+34
-0
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+1
-2
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+1
-2
NewCostViewController.m
...Controllers/Transport/Controllers/NewCostViewController.m
+7
-1
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
a4a53ec4
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCommon.h
View file @
a4a53ec4
...
...
@@ -40,8 +40,10 @@
+
(
NSString
*
)
checkNull
:
(
id
)
data
;
+
(
BOOL
)
checkStringIsNilOrSpance
:
(
NSString
*
)
str
;
+
(
NSMutableAttributedString
*
)
setTextViewFontOfString
:(
NSString
*
)
string
paragraphStyle
:(
NSInteger
)
lineHeight
fontSize
:(
float
)
size
color
:(
UIColor
*
)
color
;
+
(
NSMutableAttributedString
*
)
setTextViewBoldFontOfString
:(
NSString
*
)
string
paragraphStyle
:(
NSInteger
)
lineHeight
fontSize
:(
float
)
size
color
:(
UIColor
*
)
color
;
+
(
NSString
*
)
trimmingCharacters
:(
NSString
*
)
str
;
+
(
int
)
compareDate
:(
NSString
*
)
oneDate
withDate
:(
NSString
*
)
twoDate
;
+
(
BOOL
)
checkIsPermission
:(
NSString
*
)
permission
;
+
(
UILabel
*
)
labelWithTitle
:(
NSString
*
)
title
frame
:(
CGRect
)
frame
textFont
:(
UIFont
*
)
titleFont
;
+
(
UIButton
*
)
buttonWithTitle
:(
NSString
*
)
title
Image
:(
UIImage
*
)
image
frame
:(
CGRect
)
frame
fontSize
:(
float
)
fontSize
fontColor
:(
UIColor
*
)
color
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCommon.m
View file @
a4a53ec4
...
...
@@ -224,6 +224,14 @@
return
attributeStr
;
}
+
(
NSMutableAttributedString
*
)
setTextViewBoldFontOfString
:
(
NSString
*
)
string
paragraphStyle
:
(
NSInteger
)
lineHeight
fontSize
:
(
float
)
size
color
:
(
UIColor
*
)
color
{
NSMutableParagraphStyle
*
paragraphStyle
=
[[
NSMutableParagraphStyle
alloc
]
init
];
paragraphStyle
.
lineSpacing
=
lineHeight
;
NSDictionary
*
attributes
=
@{
NSFontAttributeName
:
[
UIFont
boldSystemFontOfSize
:
size
],
NSForegroundColorAttributeName
:
color
,
NSParagraphStyleAttributeName
:
paragraphStyle
};
NSMutableAttributedString
*
attributeStr
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
string
attributes
:
attributes
];
return
attributeStr
;
}
+
(
NSString
*
)
trimmingCharacters
:
(
NSString
*
)
str
{
NSString
*
newStr
=
[
str
stringByTrimmingCharactersInSet
:[
NSCharacterSet
whitespaceCharacterSet
]];
return
newStr
;
...
...
@@ -258,4 +266,36 @@
return
NO
;
}
+
(
UILabel
*
)
labelWithTitle
:
(
NSString
*
)
title
frame
:
(
CGRect
)
frame
textFont
:
(
UIFont
*
)
titleFont
{
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
frame
];
titleLabel
.
backgroundColor
=
[
UIColor
clearColor
];
titleLabel
.
font
=
titleFont
;
titleLabel
.
textColor
=
[
UIColor
blackColor
];
titleLabel
.
numberOfLines
=
1
;
//设置文字过长时的显示格式,截去尾部...
titleLabel
.
lineBreakMode
=
NSLineBreakByTruncatingTail
;
titleLabel
.
text
=
title
;
return
titleLabel
;
}
+
(
UIButton
*
)
buttonWithTitle
:
(
NSString
*
)
title
Image
:
(
UIImage
*
)
image
frame
:
(
CGRect
)
frame
fontSize
:
(
float
)
fontSize
fontColor
:
(
UIColor
*
)
color
{
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
button
setTitle
:
title
forState
:
UIControlStateNormal
];
button
.
frame
=
frame
;
button
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
fontSize
];
button
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentCenter
;
button
.
contentVerticalAlignment
=
UIControlContentVerticalAlignmentCenter
;
[
button
setImage
:
image
forState
:
UIControlStateNormal
];
[
button
setTitleColor
:
color
forState
:
UIControlStateNormal
];
return
button
;
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
a4a53ec4
...
...
@@ -217,11 +217,15 @@
#define TRANSPORT_ACTION_FINISH @"500504" //结束权
#define TRANSPORT_ACTION_ABORT @"500505" //作废权
//选中的颜色
#define BASESELECT_COLOR RGBA(255, 127, 0, 1)
//销售
#define SaleDay @"日"
#define SaleWeek @"周"
#define SaleMonth @"月"
//选中的颜色
#define BASESELECT_COLOR RGBA(255, 127, 0, 1)
#endif
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCustomButtom.h
View file @
a4a53ec4
...
...
@@ -25,4 +25,12 @@
+
(
UIButton
*
)
creatButtonWithFrame
:(
CGRect
)
frame
target
:(
id
)
target
sel
:(
SEL
)
sel
tag
:(
NSInteger
)
tag
image
:(
NSString
*
)
name
title
:(
NSString
*
)
title
titleColor
:(
UIColor
*
)
titleCorlor
isCorner
:(
BOOL
)
isCornor
corner
:(
CGFloat
)
corner
bgColor
:(
UIColor
*
)
bgcolor
;
#pragma mark - border
-
(
void
)
addTopBorderWithHeight
:(
CGFloat
)
height
color
:(
UIColor
*
)
color
;
-
(
void
)
addBottomBorderWithHeight
:(
CGFloat
)
height
color
:(
UIColor
*
)
color
;
-
(
void
)
addLeftBorderWithWidth
:(
CGFloat
)
width
color
:(
UIColor
*
)
color
;
-
(
void
)
addRightBorderWithWidth
:(
CGFloat
)
width
color
:(
UIColor
*
)
color
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTCustomButtom.m
View file @
a4a53ec4
...
...
@@ -92,5 +92,39 @@
return
button
;
}
#pragma mark - border
-
(
void
)
addTopBorderWithHeight
:(
CGFloat
)
height
color
:(
UIColor
*
)
color
{
CALayer
*
layer
=
[
CALayer
layer
];
layer
.
frame
=
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
height
);
layer
.
backgroundColor
=
color
.
CGColor
;
[
self
.
layer
addSublayer
:
layer
];
}
-
(
void
)
addBottomBorderWithHeight
:(
CGFloat
)
height
color
:(
UIColor
*
)
color
{
CALayer
*
layer
=
[
CALayer
layer
];
layer
.
frame
=
CGRectMake
(
0
,
self
.
frame
.
size
.
height
-
height
,
self
.
frame
.
size
.
width
,
height
);
layer
.
backgroundColor
=
color
.
CGColor
;
[
self
.
layer
addSublayer
:
layer
];
}
-
(
void
)
addLeftBorderWithWidth
:(
CGFloat
)
width
color
:(
UIColor
*
)
color
{
CALayer
*
layer
=
[
CALayer
layer
];
layer
.
frame
=
CGRectMake
(
0
,
0
,
width
,
self
.
frame
.
size
.
height
);
layer
.
backgroundColor
=
color
.
CGColor
;
[
self
.
layer
addSublayer
:
layer
];
}
-
(
void
)
addRightBorderWithWidth
:(
CGFloat
)
width
color
:(
UIColor
*
)
color
{
CALayer
*
layer
=
[
CALayer
layer
];
layer
.
frame
=
CGRectMake
(
self
.
frame
.
size
.
width
-
width
,
0
,
width
,
self
.
frame
.
size
.
height
);
layer
.
backgroundColor
=
color
.
CGColor
;
[
self
.
layer
addSublayer
:
layer
];
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
a4a53ec4
...
...
@@ -396,8 +396,7 @@ typedef enum : NSUInteger {
billProduct
.
basePrice
=
[
NSNumber
numberWithFloat
:
0
];
billProduct
.
total
=
[
NSNumber
numberWithFloat
:
0
];
billProduct
.
remark
=
@""
;
#warning 包装规格说明是不是少了在NoticeProduct
billProduct
.
qpcStr
=
@"无"
;
billProduct
.
qpcStr
=
[
NSString
stringWithFormat
:
@"1*%@"
,
product
.
qpc
];
[
billArr
addObject
:
billProduct
];
}
return
billArr
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
a4a53ec4
...
...
@@ -221,7 +221,7 @@ typedef enum : NSUInteger {
self
.
shopDetail
.
merchandise
=
self
.
productNameStr
;
self
.
shopDetail
.
packageSpecification
=
packageSpecification
.
text
;
self
.
shopDetail
.
packageQpcStr
=
self
.
packageQpcStr
;
self
.
shopDetail
.
packageQpcStr
=
[
NSString
stringWithFormat
:
@"1*%@"
,
packageSpecification
.
text
]
;
self
.
shopDetail
.
packageQpcUnit
=
self
.
productMeasureUnit
;
self
.
shopDetail
.
packageUnit
=
self
.
packageUintStr
;
...
...
@@ -407,7 +407,6 @@ typedef enum : NSUInteger {
self
.
productNameStr
=
product
.
name
;
self
.
productUuidStr
=
product
.
uuid
;
self
.
productCodeStr
=
product
.
code
;
self
.
packageQpcStr
=
product
.
qpcStr
;
self
.
productMeasureUnit
=
product
.
measureUnit
;
if
(
self
.
selectProducts
.
count
>
0
)
{
[
self
.
selectProducts
removeAllObjects
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/NewCostViewController.m
View file @
a4a53ec4
...
...
@@ -33,7 +33,7 @@ typedef enum : NSUInteger {
UITextField
*
_leftmoneyField
;
HPGrowingTextView
*
_noteTextView
;
}
@property
(
nonatomic
,
strong
)
NSString
*
selectStr
;
@end
@implementation
NewCostViewController
...
...
@@ -233,6 +233,8 @@ typedef enum : NSUInteger {
_leftmoneyField
.
text
=
[
self
.
accountDetail
.
leftmoney
stringValue
];
_noteTextView
.
text
=
self
.
accountDetail
.
note
;
self
.
selectStr
=
self
.
accountDetail
.
accounttitle
;
}
-
(
void
)
textChange
:
(
UITextField
*
)
textField
{
if
(
_actualmoneyField
.
text
.
length
>
0
&&
_paidmoneyField
.
text
.
length
>
0
)
{
...
...
@@ -247,11 +249,15 @@ typedef enum : NSUInteger {
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
0
){
ChooseCostViewController
*
cvc
=
[
ChooseCostViewController
new
];
if
(
self
.
selectStr
.
length
>
0
)
{
cvc
.
selectStr
=
self
.
selectStr
;
}
cvc
.
choseBaseInfo
=
^
(
NSArray
*
costs
){
if
(
costs
.
count
>
0
)
{
Accounttitle
*
type
=
costs
[
0
];
_chooseCostLabel
.
text
=
type
.
name
;
_chooseCostLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
selectStr
=
type
.
name
;
}
};
[
self
PushViewController
:
cvc
animated
:
YES
];
...
...
This diff is collapsed.
Click to expand it.
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