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
3759e611
Commit
3759e611
authored
Sep 27, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总体bug修复
parent
3195eeaa
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
186 additions
and
28 deletions
+186
-28
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+32
-0
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+9
-12
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+16
-2
NoticeProductViewController.m
...ollers/PurchaseNotice/Views/NoticeProductViewController.m
+0
-4
PurchaseNoticeListCell.m
...Controllers/PurchaseNotice/Views/PurchaseNoticeListCell.m
+1
-1
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+0
-4
CostViewController.m
...iewControllers/Transport/Controllers/CostViewController.m
+76
-0
TransportDetailViewController.m
...ers/Transport/Controllers/TransportDetailViewController.m
+2
-2
BottomTransportView.m
...uit/ViewControllers/Transport/Views/BottomTransportView.m
+0
-1
CostCell.h
XFFruit/ViewControllers/Transport/Views/CostCell.h
+9
-0
CostCell.m
XFFruit/ViewControllers/Transport/Views/CostCell.m
+40
-1
TransportCell.m
XFFruit/ViewControllers/Transport/Views/TransportCell.m
+1
-1
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
3759e611
...
@@ -1356,6 +1356,37 @@
...
@@ -1356,6 +1356,37 @@
path
=
ChooseViewController
;
path
=
ChooseViewController
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
72805CED1BB79D68009E1F82
/* Transfer */
=
{
isa
=
PBXGroup
;
children
=
(
72805CEE1BB79D68009E1F82
/* Controllers */
,
72805CEF1BB79D68009E1F82
/* Models */
,
72805CF01BB79D68009E1F82
/* Views */
,
);
path
=
Transfer
;
sourceTree
=
"<group>"
;
};
72805CEE1BB79D68009E1F82
/* Controllers */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
Controllers
;
sourceTree
=
"<group>"
;
};
72805CEF1BB79D68009E1F82
/* Models */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
Models
;
sourceTree
=
"<group>"
;
};
72805CF01BB79D68009E1F82
/* Views */
=
{
isa
=
PBXGroup
;
children
=
(
);
path
=
Views
;
sourceTree
=
"<group>"
;
};
7281A0A71B8974120052B1AC
/* Purchase */
=
{
7281A0A71B8974120052B1AC
/* Purchase */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -2124,6 +2155,7 @@
...
@@ -2124,6 +2155,7 @@
C1C6FEED1AB88A3400D4C41A
/* ViewControllers */
=
{
C1C6FEED1AB88A3400D4C41A
/* ViewControllers */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
72805CED1BB79D68009E1F82
/* Transfer */
,
72B3C0A91B9D3C7300025D81
/* Transport */
,
72B3C0A91B9D3C7300025D81
/* Transport */
,
724171641B9D30660094DF55
/* ChooseViewController */
,
724171641B9D30660094DF55
/* ChooseViewController */
,
35CF33911B95B419001211EF
/* GXFCommon */
,
35CF33911B95B419001211EF
/* GXFCommon */
,
...
...
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
3759e611
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
#import "NewPurchaseViewController.h"
#import "NewPurchaseViewController.h"
#import "SeePurchaseNoticeViewController.h"
#import "TopPurchaseView.h"
#import "TopPurchaseView.h"
#import "ProductBillViewController.h"
#import "ProductBillViewController.h"
#import "PurchaseBillProduct.h"
#import "PurchaseBillProduct.h"
...
@@ -165,11 +166,6 @@ typedef enum : NSUInteger {
...
@@ -165,11 +166,6 @@ typedef enum : NSUInteger {
_purchaseView
.
total
=
[
NSNumber
numberWithFloat
:
totalPrice
+
otherPrice
];
_purchaseView
.
total
=
[
NSNumber
numberWithFloat
:
totalPrice
+
otherPrice
];
}
}
-
(
void
)
addPurchaseProduct
:
(
NSNotification
*
)
fication
{
-
(
void
)
addPurchaseProduct
:
(
NSNotification
*
)
fication
{
// if (!self.popView) {
// NSArray *arr = @[@"添加商品明细",@"选择发运单"];
// self.popView = [[GXFPopView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height) withArr:arr];
// [AppWindow addSubview:self.popView];
// }
PurchaseBillProduct
*
billProduct
=
[[
fication
userInfo
]
objectForKey
:
@"purchaseBillProduct"
];
PurchaseBillProduct
*
billProduct
=
[[
fication
userInfo
]
objectForKey
:
@"purchaseBillProduct"
];
NSInteger
indexTag
=
[[[
fication
userInfo
]
objectForKey
:
@"indexTag"
]
integerValue
];
NSInteger
indexTag
=
[[[
fication
userInfo
]
objectForKey
:
@"indexTag"
]
integerValue
];
...
@@ -246,8 +242,13 @@ typedef enum : NSUInteger {
...
@@ -246,8 +242,13 @@ typedef enum : NSUInteger {
versionObject
=
versionN
;
versionObject
=
versionN
;
[
IBTLoadingView
showTips
:[
NSString
stringWithFormat
:
@"当前单据%@已保存成功"
,
billNumberS
]];
[
IBTLoadingView
showTips
:[
NSString
stringWithFormat
:
@"当前单据%@已保存成功"
,
billNumberS
]];
}
else
{
//提交成功
}
else
{
//提交成功
PurchaseViewController
*
svc
=
[
PurchaseViewController
new
];
if
(
self
.
purchaseNotice
)
{
[
self
PushViewController
:
svc
animated
:
YES
];
[
self
PopViewControllerAnimated
:
YES
];
}
else
{
PurchaseViewController
*
svc
=
[
PurchaseViewController
new
];
svc
.
title
=
@"查看采购单"
;
[
self
PushViewController
:
svc
animated
:
YES
];
}
}
}
}
else
{
}
else
{
[
IBTLoadingView
showTips
:
message
];
[
IBTLoadingView
showTips
:
message
];
...
@@ -320,14 +321,10 @@ typedef enum : NSUInteger {
...
@@ -320,14 +321,10 @@ typedef enum : NSUInteger {
ShowMessage
(
@"有数量等于0的商品明细,请编辑后保存"
);
ShowMessage
(
@"有数量等于0的商品明细,请编辑后保存"
);
return
NO
;
return
NO
;
}
}
if
([
billProduct
.
price
integerValue
]
<=
0
||
[
billProduct
.
basePrice
integer
Value
]
<=
0
)
{
if
([
billProduct
.
price
floatValue
]
<=
0
||
[
billProduct
.
basePrice
float
Value
]
<=
0
)
{
ShowMessage
(
@"有价格未填写的商品明细,请编辑后保存"
);
ShowMessage
(
@"有价格未填写的商品明细,请编辑后保存"
);
return
NO
;
return
NO
;
}
}
if
(
billProduct
.
remark
.
length
<=
0
)
{
ShowMessage
(
@"商品备注为空,请编辑后保存"
);
return
NO
;
}
}
}
return
YES
;
return
YES
;
...
...
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
3759e611
...
@@ -224,13 +224,19 @@ typedef enum : NSUInteger {
...
@@ -224,13 +224,19 @@ typedef enum : NSUInteger {
case
RejectTag
:
case
RejectTag
:
{
{
CLog
(
@"拒绝"
);
CLog
(
@"拒绝"
);
[
self
dealByAction
:
PURCHASE_ACTION_REJECT
];
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"温馨提示"
message
:
@"请确认拒绝"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确认"
,
nil
];
alertView
.
delegate
=
self
;
alertView
.
tag
=
RejectTag
;
[
alertView
show
];
}
}
break
;
break
;
case
PassTag
:
case
PassTag
:
{
{
CLog
(
@"审核通过"
);
CLog
(
@"审核通过"
);
[
self
dealByAction
:
PURCHASE_ACTION_APPROVE
];
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"温馨提示"
message
:
@"请确认通过"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确认"
,
nil
];
alertView
.
delegate
=
self
;
alertView
.
tag
=
PassTag
;
[
alertView
show
];
}
}
break
;
break
;
case
SureTag
:
case
SureTag
:
...
@@ -428,6 +434,14 @@ typedef enum : NSUInteger {
...
@@ -428,6 +434,14 @@ typedef enum : NSUInteger {
if
(
buttonIndex
==
1
)
{
if
(
buttonIndex
==
1
)
{
[
self
dealByAction
:
PURCHASE_ACTION_FINISH
];
//结束
[
self
dealByAction
:
PURCHASE_ACTION_FINISH
];
//结束
}
}
}
else
if
(
alertView
.
tag
==
RejectTag
){
if
(
buttonIndex
==
1
)
{
[
self
dealByAction
:
PURCHASE_ACTION_REJECT
];
}
}
else
if
(
alertView
.
tag
==
PassTag
){
if
(
buttonIndex
==
1
)
{
[
self
dealByAction
:
PURCHASE_ACTION_APPROVE
];
}
}
}
}
}
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/NoticeProductViewController.m
View file @
3759e611
...
@@ -155,10 +155,6 @@ typedef enum : NSUInteger {
...
@@ -155,10 +155,6 @@ typedef enum : NSUInteger {
ShowMessage
(
@"基础数量不能为空"
);
ShowMessage
(
@"基础数量不能为空"
);
return
NO
;
return
NO
;
}
}
if
(
_noteTextView
.
text
.
length
==
0
)
{
ShowMessage
(
@"备注不能为空"
);
return
NO
;
}
if
(
!
self
.
noticeProduct
)
{
if
(
!
self
.
noticeProduct
)
{
self
.
noticeProduct
=
[[
NoticeProduct
alloc
]
init
];
self
.
noticeProduct
=
[[
NoticeProduct
alloc
]
init
];
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeListCell.m
View file @
3759e611
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
stateStr
=
@"未接受"
;
stateStr
=
@"未接受"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASENOTICE_STATE_PURCHASEING
])
{
}
else
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASENOTICE_STATE_PURCHASEING
])
{
stateStr
=
@"
发运
中"
;
stateStr
=
@"
采购
中"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
}
else
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
stateStr
=
@"已完成"
;
stateStr
=
@"已完成"
;
...
...
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
3759e611
...
@@ -252,10 +252,6 @@ typedef enum : NSUInteger {
...
@@ -252,10 +252,6 @@ typedef enum : NSUInteger {
ShowMessage
(
@"总金额不能为空"
);
ShowMessage
(
@"总金额不能为空"
);
return
NO
;
return
NO
;
}
}
if
(
remark
.
text
.
length
==
0
)
{
ShowMessage
(
@"备注不能为空"
);
return
NO
;
}
if
([
packageQuantity
.
text
integerValue
]
<=
0
||
[
foundationQuantity
.
text
integerValue
]
<=
0
||
[
packageSpecification
.
text
integerValue
]
<=
0
)
{
if
([
packageQuantity
.
text
integerValue
]
<=
0
||
[
foundationQuantity
.
text
integerValue
]
<=
0
||
[
packageSpecification
.
text
integerValue
]
<=
0
)
{
ShowMessage
(
@"商品数量不能为0"
);
ShowMessage
(
@"商品数量不能为0"
);
...
...
XFFruit/ViewControllers/Transport/Controllers/CostViewController.m
View file @
3759e611
...
@@ -10,9 +10,15 @@
...
@@ -10,9 +10,15 @@
#import "HeaderCell.h"
#import "HeaderCell.h"
#import "FooterCell.h"
#import "FooterCell.h"
#import "CostCell.h"
#import "CostCell.h"
#define TableHeight 44
#define ShowHeight 80
@interface
CostViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
FooterCellDelegate
,
HeaderCellDelegate
>
@interface
CostViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
FooterCellDelegate
,
HeaderCellDelegate
>
{
{
CGRect
_tableFrame
;
CGRect
_tableFrame
;
NSMutableArray
*
_selectRowArr
;
//记录当前选中的cell
}
}
@end
@end
...
@@ -22,6 +28,7 @@
...
@@ -22,6 +28,7 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
self
.
view
.
backgroundColor
=
XXFBgColor
;
self
.
view
.
backgroundColor
=
XXFBgColor
;
[
super
viewDidLoad
];
[
super
viewDidLoad
];
_selectRowArr
=
[[
NSMutableArray
alloc
]
init
];
_costArr
=
[
NSMutableArray
array
];
_costArr
=
[
NSMutableArray
array
];
[
self
createView
];
[
self
createView
];
}
}
...
@@ -78,6 +85,35 @@
...
@@ -78,6 +85,35 @@
cell
.
editBtn
.
hidden
=
YES
;
cell
.
editBtn
.
hidden
=
YES
;
}
}
}
}
if
([
self
isHaveIndexPath
:
indexPath
])
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowdown"
];
// CGRect Linefrmame = cell.lineLabel.frame;
// Linefrmame.origin.y = ShowHeight + TableHeight -1;
// cell.lineLabel.frame = Linefrmame;
cell
.
lineLabel
.
top
=
ShowHeight
+
TableHeight
-
1
;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = ShowHeight;
// cell.showView.frame = showfrmame;
cell
.
showView
.
height
=
ShowHeight
;
cell
.
backgroundColor
=
XXFBgColor
;
}
else
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
// CGRect Linefrmame = cell.lineLabel.frame;
// Linefrmame.origin.y = TableHeight-1;
// cell.lineLabel.frame = Linefrmame;
cell
.
lineLabel
.
top
=
TableHeight
-
1
;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = 0;
// cell.showView.frame = showfrmame;
cell
.
showView
.
height
=
0
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
}
cell
.
editBtn
.
tag
=
indexPath
.
row
;
cell
.
editBtn
.
tag
=
indexPath
.
row
;
[
cell
.
editBtn
addTarget
:
self
action
:
@selector
(
editClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
cell
.
editBtn
addTarget
:
self
action
:
@selector
(
editClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
if
(
self
.
costArr
.
count
)
{
if
(
self
.
costArr
.
count
)
{
...
@@ -86,6 +122,46 @@
...
@@ -86,6 +122,46 @@
}
}
return
cell
;
return
cell
;
}
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
CostCell
*
cell
=
(
CostCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
CGRect
Linefrmame
=
cell
.
lineLabel
.
frame
;
CGRect
showfrmame
=
cell
.
showView
.
frame
;
if
(
Linefrmame
.
origin
.
y
==
TableHeight
-
1
)
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowdown"
];
Linefrmame
.
origin
.
y
=
ShowHeight
+
TableHeight
-
1
;
showfrmame
.
size
.
height
=
ShowHeight
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_selectRowArr
addObject
:
indexPath
];
}
else
{
cell
.
smallImageView
.
image
=
[
UIImage
imageNamed
:
@"arrowright"
];
Linefrmame
.
origin
.
y
=
TableHeight
-
1
;
showfrmame
.
size
.
height
=
0
;
cell
.
backgroundColor
=
[
UIColor
whiteColor
];
[
_selectRowArr
removeObject
:
indexPath
];
}
cell
.
lineLabel
.
frame
=
Linefrmame
;
cell
.
showView
.
frame
=
showfrmame
;
[
self
.
tableView
reloadData
];
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
([
self
isHaveIndexPath
:
indexPath
])
{
return
ShowHeight
+
TableHeight
;
}
return
TableHeight
;
}
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
for
(
NSIndexPath
*
path
in
_selectRowArr
)
{
if
(
path
.
row
==
indexPath
.
row
)
{
return
YES
;
}
}
return
NO
;
}
/*
/*
#pragma mark - Navigation
#pragma mark - Navigation
...
...
XFFruit/ViewControllers/Transport/Controllers/TransportDetailViewController.m
View file @
3759e611
...
@@ -88,10 +88,10 @@ typedef enum : NSUInteger {
...
@@ -88,10 +88,10 @@ typedef enum : NSUInteger {
self
.
billNumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
billnumber
];
self
.
billNumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
billnumber
];
if
([
self
.
transport
.
state
isEqualToString
:
TRANSPORT_STATE_UNRECEIVED
])
{
if
([
self
.
transport
.
state
isEqualToString
:
TRANSPORT_STATE_UNRECEIVED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
redColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
redColor
];
self
.
stateLabel
.
text
=
@"
未发
货"
;
self
.
stateLabel
.
text
=
@"
待收
货"
;
}
else
if
([
self
.
transport
.
state
isEqualToString
:
TRANSPORT_STATE_RECEIVED
])
{
}
else
if
([
self
.
transport
.
state
isEqualToString
:
TRANSPORT_STATE_RECEIVED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
text
=
@"已
发
货"
;
self
.
stateLabel
.
text
=
@"已
收
货"
;
}
else
if
([
self
.
transport
.
state
isEqualToString
:
TRANSPORT_STATE_ABORTED
])
{
}
else
if
([
self
.
transport
.
state
isEqualToString
:
TRANSPORT_STATE_ABORTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已作废"
;
self
.
stateLabel
.
text
=
@"已作废"
;
...
...
XFFruit/ViewControllers/Transport/Views/BottomTransportView.m
View file @
3759e611
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
_bottomSV
.
showsVerticalScrollIndicator
=
NO
;
_bottomSV
.
showsVerticalScrollIndicator
=
NO
;
_bottomSV
.
pagingEnabled
=
YES
;
_bottomSV
.
pagingEnabled
=
YES
;
_bottomSV
.
delegate
=
self
;
_bottomSV
.
delegate
=
self
;
_bottomSV
.
backgroundColor
=
[
UIColor
yellowColor
];
_bottomSV
.
contentSize
=
CGSizeMake
(
ScreenSize
.
width
*
arr
.
count
,
CGRectGetHeight
(
_bottomSV
.
frame
));
_bottomSV
.
contentSize
=
CGSizeMake
(
ScreenSize
.
width
*
arr
.
count
,
CGRectGetHeight
(
_bottomSV
.
frame
));
[
self
addSubview
:
_bottomSV
];
[
self
addSubview
:
_bottomSV
];
...
...
XFFruit/ViewControllers/Transport/Views/CostCell.h
View file @
3759e611
...
@@ -18,5 +18,14 @@
...
@@ -18,5 +18,14 @@
@property
(
nonatomic
,
strong
)
UILabel
*
leftLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
leftLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
@property
(
nonatomic
,
strong
)
UIView
*
showView
;
@property
(
nonatomic
,
strong
)
UILabel
*
showActualLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showPaidLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showLeftLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
showNote
;
-
(
void
)
setFeeCost
:(
FeeAcountDetail
*
)
fee
row
:(
NSInteger
)
row
;
-
(
void
)
setFeeCost
:(
FeeAcountDetail
*
)
fee
row
:(
NSInteger
)
row
;
@end
@end
XFFruit/ViewControllers/Transport/Views/CostCell.m
View file @
3759e611
...
@@ -14,6 +14,10 @@
...
@@ -14,6 +14,10 @@
#define SpaceMargin 1
#define SpaceMargin 1
#define LeftWidth 45
#define LeftWidth 45
#define RightWidth 30
#define RightWidth 30
#define ShowWidth 150
#define ShowHeight 20
@implementation
CostCell
@implementation
CostCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
...
@@ -61,6 +65,31 @@
...
@@ -61,6 +65,31 @@
self
.
leftLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
leftLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
leftLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
leftLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
showView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
TableHeight
,
ScreenSize
.
width
,
0
)];
self
.
showView
.
clipsToBounds
=
YES
;
self
.
showActualLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
seqLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showActualLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showActualLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showActualLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showPaidLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
showActualLabel
.
frame
),
0
,
ShowWidth
,
ShowHeight
))];
self
.
showPaidLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showPaidLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showPaidLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showLeftLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showActualLabel
.
frame
),
CGRectGetMaxY
(
self
.
showActualLabel
.
frame
),
ShowWidth
,
ShowHeight
))];
self
.
showLeftLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showLeftLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showLeftLabel
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showNote
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMinX
(
self
.
showLeftLabel
.
frame
),
CGRectGetMaxY
(
self
.
showLeftLabel
.
frame
),
ShowWidth
*
2
,
ShowHeight
))];
self
.
showNote
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
showNote
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
showNote
.
font
=
GXF_THREETEENTH_SIZE
;
self
.
showNote
.
numberOfLines
=
0
;
self
.
editBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
editBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
self
.
editBtn
setImage
:[
UIImage
imageNamed
:
@"edit"
]
forState
:
UIControlStateNormal
];
[
self
.
editBtn
setImage
:[
UIImage
imageNamed
:
@"edit"
]
forState
:
UIControlStateNormal
];
self
.
editBtn
.
frame
=
CGRectMake
(
ScreenSize
.
width
-
LeftWidth
,
0
,
LeftWidth
,
TableHeight
);
self
.
editBtn
.
frame
=
CGRectMake
(
ScreenSize
.
width
-
LeftWidth
,
0
,
LeftWidth
,
TableHeight
);
...
@@ -76,7 +105,12 @@
...
@@ -76,7 +105,12 @@
[
self
.
contentView
addSubview
:
self
.
paidLabel
];
[
self
.
contentView
addSubview
:
self
.
paidLabel
];
[
self
.
contentView
addSubview
:
self
.
leftLabel
];
[
self
.
contentView
addSubview
:
self
.
leftLabel
];
[
self
.
contentView
addSubview
:
self
.
lineLabel
];
[
self
.
contentView
addSubview
:
self
.
lineLabel
];
[
self
.
contentView
addSubview
:
self
.
showView
];
[
self
.
showView
addSubview
:
self
.
showActualLabel
];
[
self
.
showView
addSubview
:
self
.
showPaidLabel
];
[
self
.
showView
addSubview
:
self
.
showLeftLabel
];
[
self
.
showView
addSubview
:
self
.
showNote
];
}
}
-
(
void
)
setFeeCost
:
(
FeeAcountDetail
*
)
fee
row
:
(
NSInteger
)
row
-
(
void
)
setFeeCost
:
(
FeeAcountDetail
*
)
fee
row
:
(
NSInteger
)
row
...
@@ -86,6 +120,11 @@
...
@@ -86,6 +120,11 @@
self
.
actualLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@元"
,[
fee
.
actualmoney
stringValue
]];
self
.
actualLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@元"
,[
fee
.
actualmoney
stringValue
]];
self
.
paidLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@元"
,[
fee
.
paidmoney
stringValue
]];
self
.
paidLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@元"
,[
fee
.
paidmoney
stringValue
]];
self
.
leftLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@元"
,[
fee
.
leftmoney
stringValue
]];
self
.
leftLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@元"
,[
fee
.
leftmoney
stringValue
]];
self
.
showActualLabel
.
text
=
[
NSString
stringWithFormat
:
@"应付金额:%@元"
,[
fee
.
actualmoney
stringValue
]];
self
.
showPaidLabel
.
text
=
[
NSString
stringWithFormat
:
@"已付金额:%@元"
,[
fee
.
paidmoney
stringValue
]];
self
.
showLeftLabel
.
text
=
[
NSString
stringWithFormat
:
@"尾款:%@元"
,[
fee
.
leftmoney
stringValue
]];
self
.
showNote
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
fee
.
note
?
fee
.
note
:
@"无"
];
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
...
...
XFFruit/ViewControllers/Transport/Views/TransportCell.m
View file @
3759e611
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
stateStr
=
@"未提交"
;
stateStr
=
@"未提交"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"initial"
]
forState
:
UIControlStateDisabled
];
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"initial"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
transport
.
state
isEqualToString
:
TRANSPORT_STATE_UNRECEIVED
])
{
}
else
if
([
transport
.
state
isEqualToString
:
TRANSPORT_STATE_UNRECEIVED
])
{
stateStr
=
@"
未
收货"
;
stateStr
=
@"
待
收货"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
transport
.
state
isEqualToString
:
TRANSPORT_STATE_RECEIVED
])
{
}
else
if
([
transport
.
state
isEqualToString
:
TRANSPORT_STATE_RECEIVED
])
{
stateStr
=
@"已收货"
;
stateStr
=
@"已收货"
;
...
...
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