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
d2673e07
Commit
d2673e07
authored
Sep 14, 2015
by
zhu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DEV_20150805_001' of
http://121.42.32.57/root/xffruit
into DEV_20150805_001
parents
d0a4b325
3cc25fac
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
485 additions
and
229 deletions
+485
-229
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+14
-2
Contents.json
XFFruit/Images.xcassets/Survey/add.imageset/Contents.json
+22
-0
add.png
XFFruit/Images.xcassets/Survey/add.imageset/add.png
+0
-0
add@2x.png
XFFruit/Images.xcassets/Survey/add.imageset/add@2x.png
+0
-0
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+3
-3
BusinessViewController.m
XFFruit/ViewControllers/Business/BusinessViewController.m
+0
-1
GXFPopCell.h
XFFruit/ViewControllers/ChooseViewController/GXFPopCell.h
+17
-0
GXFPopCell.m
XFFruit/ViewControllers/ChooseViewController/GXFPopCell.m
+48
-0
GXFPopView.h
XFFruit/ViewControllers/ChooseViewController/GXFPopView.h
+14
-0
GXFPopView.m
XFFruit/ViewControllers/ChooseViewController/GXFPopView.m
+87
-0
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+8
-0
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+5
-5
PurchaseViewController.m
...Controllers/Purchase/Controllers/PurchaseViewController.m
+42
-36
PurchaseBoltView.h
XFFruit/ViewControllers/Purchase/Views/PurchaseBoltView.h
+5
-3
PurchaseBoltView.m
XFFruit/ViewControllers/Purchase/Views/PurchaseBoltView.m
+77
-65
PurchaseCell.m
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
+1
-1
TopPurchaseView.m
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.m
+1
-1
SurveyListCell.m
XFFruit/ViewControllers/Survey/Views/SurveyListCell.m
+2
-2
NewSurveyViewController.m
...wControllers/Survey/controllers/NewSurveyViewController.m
+0
-15
NewCostViewController.m
...Controllers/Transport/Controllers/NewCostViewController.m
+1
-2
TransportDetailViewController.m
...ers/Transport/Controllers/TransportDetailViewController.m
+21
-6
TransportPurchaseViewController.m
...s/Transport/Controllers/TransportPurchaseViewController.m
+2
-1
TransportViewController.m
...ntrollers/Transport/Controllers/TransportViewController.m
+15
-23
TransportBoltView.m
XFFruit/ViewControllers/Transport/Views/TransportBoltView.m
+35
-45
TransportPurchaseCell.h
...t/ViewControllers/Transport/Views/TransportPurchaseCell.h
+1
-0
TransportPurchaseCell.m
...t/ViewControllers/Transport/Views/TransportPurchaseCell.m
+64
-18
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
d2673e07
...
@@ -120,6 +120,8 @@
...
@@ -120,6 +120,8 @@
7281A0BF1B8980E60052B1AC
/* PurchaseBill.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7281A0BE1B8980E60052B1AC
/* PurchaseBill.m */
;
};
7281A0BF1B8980E60052B1AC
/* PurchaseBill.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7281A0BE1B8980E60052B1AC
/* PurchaseBill.m */
;
};
7281A0C21B898A040052B1AC
/* PurchaseDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7281A0C11B898A040052B1AC
/* PurchaseDetailViewController.m */
;
};
7281A0C21B898A040052B1AC
/* PurchaseDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7281A0C11B898A040052B1AC
/* PurchaseDetailViewController.m */
;
};
7281A0C81B89BFE60052B1AC
/* Vendor.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7281A0C71B89BFE60052B1AC
/* Vendor.m */
;
};
7281A0C81B89BFE60052B1AC
/* Vendor.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7281A0C71B89BFE60052B1AC
/* Vendor.m */
;
};
72873CEB1BA27BA6007B3387
/* GXFPopView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72873CEA1BA27BA6007B3387
/* GXFPopView.m */
;
};
72873CEE1BA280DD007B3387
/* GXFPopCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72873CED1BA280DD007B3387
/* GXFPopCell.m */
;
};
72B3C0C11B9D3C7300025D81
/* CostViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0AC1B9D3C7300025D81
/* CostViewController.m */
;
};
72B3C0C11B9D3C7300025D81
/* CostViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0AC1B9D3C7300025D81
/* CostViewController.m */
;
};
72B3C0C21B9D3C7300025D81
/* NewCostViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0AE1B9D3C7300025D81
/* NewCostViewController.m */
;
};
72B3C0C21B9D3C7300025D81
/* NewCostViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0AE1B9D3C7300025D81
/* NewCostViewController.m */
;
};
72B3C0C31B9D3C7300025D81
/* NewTransportViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0B01B9D3C7300025D81
/* NewTransportViewController.m */
;
};
72B3C0C31B9D3C7300025D81
/* NewTransportViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72B3C0B01B9D3C7300025D81
/* NewTransportViewController.m */
;
};
...
@@ -632,6 +634,10 @@
...
@@ -632,6 +634,10 @@
7281A0C11B898A040052B1AC
/* PurchaseDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseDetailViewController.m
;
sourceTree
=
"<group>"
;
};
7281A0C11B898A040052B1AC
/* PurchaseDetailViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseDetailViewController.m
;
sourceTree
=
"<group>"
;
};
7281A0C61B89BFE60052B1AC
/* Vendor.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Vendor.h
;
sourceTree
=
"<group>"
;
};
7281A0C61B89BFE60052B1AC
/* Vendor.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Vendor.h
;
sourceTree
=
"<group>"
;
};
7281A0C71B89BFE60052B1AC
/* Vendor.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
Vendor.m
;
sourceTree
=
"<group>"
;
};
7281A0C71B89BFE60052B1AC
/* Vendor.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
Vendor.m
;
sourceTree
=
"<group>"
;
};
72873CE91BA27BA6007B3387
/* GXFPopView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GXFPopView.h
;
sourceTree
=
"<group>"
;
};
72873CEA1BA27BA6007B3387
/* GXFPopView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GXFPopView.m
;
sourceTree
=
"<group>"
;
};
72873CEC1BA280DD007B3387
/* GXFPopCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GXFPopCell.h
;
sourceTree
=
"<group>"
;
};
72873CED1BA280DD007B3387
/* GXFPopCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GXFPopCell.m
;
sourceTree
=
"<group>"
;
};
72B3C0AB1B9D3C7300025D81
/* CostViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CostViewController.h
;
sourceTree
=
"<group>"
;
};
72B3C0AB1B9D3C7300025D81
/* CostViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CostViewController.h
;
sourceTree
=
"<group>"
;
};
72B3C0AC1B9D3C7300025D81
/* CostViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
CostViewController.m
;
sourceTree
=
"<group>"
;
};
72B3C0AC1B9D3C7300025D81
/* CostViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
CostViewController.m
;
sourceTree
=
"<group>"
;
};
72B3C0AD1B9D3C7300025D81
/* NewCostViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NewCostViewController.h
;
sourceTree
=
"<group>"
;
};
72B3C0AD1B9D3C7300025D81
/* NewCostViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NewCostViewController.h
;
sourceTree
=
"<group>"
;
};
...
@@ -1311,6 +1317,10 @@
...
@@ -1311,6 +1317,10 @@
7241716E1B9D30660094DF55
/* ChosePersonViewController.m */
,
7241716E1B9D30660094DF55
/* ChosePersonViewController.m */
,
724171741B9D30DE0094DF55
/* ChooseCostViewController.h */
,
724171741B9D30DE0094DF55
/* ChooseCostViewController.h */
,
724171751B9D30DE0094DF55
/* ChooseCostViewController.m */
,
724171751B9D30DE0094DF55
/* ChooseCostViewController.m */
,
72873CE91BA27BA6007B3387
/* GXFPopView.h */
,
72873CEA1BA27BA6007B3387
/* GXFPopView.m */
,
72873CEC1BA280DD007B3387
/* GXFPopCell.h */
,
72873CED1BA280DD007B3387
/* GXFPopCell.m */
,
);
);
path
=
ChooseViewController
;
path
=
ChooseViewController
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2517,6 +2527,7 @@
...
@@ -2517,6 +2527,7 @@
04B4A3871B9CAAD700D88D68
/* ShopDetail.m in Sources */
,
04B4A3871B9CAAD700D88D68
/* ShopDetail.m in Sources */
,
7217E9E91B72364300FE5C1D
/* SurveyResult.m in Sources */
,
7217E9E91B72364300FE5C1D
/* SurveyResult.m in Sources */
,
C10214DB1AD90A3F0024637E
/* ICRFunctionBaseView.m in Sources */
,
C10214DB1AD90A3F0024637E
/* ICRFunctionBaseView.m in Sources */
,
72873CEE1BA280DD007B3387
/* GXFPopCell.m in Sources */
,
35B448DF1B9B0A73001209E2
/* ProductBillCell.m in Sources */
,
35B448DF1B9B0A73001209E2
/* ProductBillCell.m in Sources */
,
30D7495F1ACE8F4400C63BA1
/* ICRConfigurationViewController.m in Sources */
,
30D7495F1ACE8F4400C63BA1
/* ICRConfigurationViewController.m in Sources */
,
724171721B9D30660094DF55
/* ChooseWarehouseViewController.m in Sources */
,
724171721B9D30660094DF55
/* ChooseWarehouseViewController.m in Sources */
,
...
@@ -2595,6 +2606,7 @@
...
@@ -2595,6 +2606,7 @@
C1C564431AD66C6E006A1050
/* ICRTaskEditViewController.m in Sources */
,
C1C564431AD66C6E006A1050
/* ICRTaskEditViewController.m in Sources */
,
C142D2AA1AC3A155000109A7
/* NSDate+FormatterAdditions.m in Sources */
,
C142D2AA1AC3A155000109A7
/* NSDate+FormatterAdditions.m in Sources */
,
C1B307A31ADD199600657F11
/* ICRTaskResultContentView.m in Sources */
,
C1B307A31ADD199600657F11
/* ICRTaskResultContentView.m in Sources */
,
72873CEB1BA27BA6007B3387
/* GXFPopView.m in Sources */
,
30DB9F971AD7DEC00085FA5C
/* IBTUISearchBar.m in Sources */
,
30DB9F971AD7DEC00085FA5C
/* IBTUISearchBar.m in Sources */
,
7217E9E61B72364300FE5C1D
/* SurveyViewController.m in Sources */
,
7217E9E61B72364300FE5C1D
/* SurveyViewController.m in Sources */
,
C10214E41AD9141E0024637E
/* ICRAnnouncementViewController.m in Sources */
,
C10214E41AD9141E0024637E
/* ICRAnnouncementViewController.m in Sources */
,
...
@@ -3042,7 +3054,7 @@
...
@@ -3042,7 +3054,7 @@
"$(PROJECT_DIR)"
,
"$(PROJECT_DIR)"
,
);
);
PRODUCT_NAME
=
XFFruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
cfc700e3-f78e-4893-a7fd-62daba6a0c6c
"
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
name
=
Debug
;
name
=
Debug
;
...
@@ -3063,7 +3075,7 @@
...
@@ -3063,7 +3075,7 @@
"$(PROJECT_DIR)"
,
"$(PROJECT_DIR)"
,
);
);
PRODUCT_NAME
=
XFFruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
"
cfc700e3-f78e-4893-a7fd-62daba6a0c6c
"
;
PROVISIONING_PROFILE
=
"
a12432a9-50b3-4cef-bae7-dcb35f965ce4
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
};
name
=
Release
;
name
=
Release
;
...
...
XFFruit/Images.xcassets/Survey/add.imageset/Contents.json
0 → 100644
View file @
d2673e07
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
,
"filename"
:
"add.png"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
,
"filename"
:
"add@2x.png"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
XFFruit/Images.xcassets/Survey/add.imageset/add.png
0 → 100644
View file @
d2673e07
1.31 KB
XFFruit/Images.xcassets/Survey/add.imageset/add@2x.png
0 → 100644
View file @
d2673e07
1.78 KB
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
d2673e07
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
#define GXF_LINE_COLOR HexColor(@"e5e5e5")
#define GXF_LINE_COLOR HexColor(@"e5e5e5")
#define GXF_DETAIL_COLOR HexColor(@"888888")
#define GXF_DETAIL_COLOR HexColor(@"888888")
#define GXF_LEFTSIX_COLOR HexColor(@"666666")
#define GXF_LEFTSIX_COLOR HexColor(@"666666")
#define GXF_PopView_COLOR RGBA(24,164,219,1)
#define GXF_THREETEENTH_SIZE FontSize(13)
#define GXF_THREETEENTH_SIZE FontSize(13)
#define GXF_FOURTEENTH_SIZE FontSize(14)
#define GXF_FOURTEENTH_SIZE FontSize(14)
...
@@ -133,8 +133,8 @@
...
@@ -133,8 +133,8 @@
#define PURCHASE_STATE_INITIAL @"initial" //未提交
#define PURCHASE_STATE_INITIAL @"initial" //未提交
#define PURCHASE_STATE_SUBMITTED @"submitted"//已提交 未审批
#define PURCHASE_STATE_SUBMITTED @"submitted"//已提交 未审批
#define PURCHASE_STATE_REJECTED @"rejected" //已拒绝
#define PURCHASE_STATE_REJECTED @"rejected" //已拒绝
#define PURCHASE_STATE_APPROVED @"approved" //已审批 发运中
//
#define PURCHASE_STATE_APPROVED @"approved" //已审批 发运中
#define PURCHASE_STATE_SHIPPING @"shipping" //发运中
#define PURCHASE_STATE_SHIPPING @"shipping" //
已审批
发运中
#define PURCHASE_STATE_FINISHED @"finished" //已完成
#define PURCHASE_STATE_FINISHED @"finished" //已完成
#define PURCHASE_STATE_ABORTED @"aborted" //已作废
#define PURCHASE_STATE_ABORTED @"aborted" //已作废
...
...
XFFruit/ViewControllers/Business/BusinessViewController.m
View file @
d2673e07
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#import "TransportViewController.h"
#import "TransportViewController.h"
#import"PurchaseNoticeViewController.h"
#import"PurchaseNoticeViewController.h"
#import "GXFFunctionDB.h"
#import "GXFFunctionDB.h"
#import "GXFNewProcessViewController.h"
#import "GXFNewProcessViewController.h"
#import "GXFListProcessViewController.h"
#import "GXFListProcessViewController.h"
...
...
XFFruit/ViewControllers/ChooseViewController/GXFPopCell.h
0 → 100644
View file @
d2673e07
//
// GXFPopCell.h
// XFFruit
//
// Created by 陈俊俊 on 15/9/11.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
GXFPopCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIImageView
*
addImageView
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
-
(
void
)
setTitleStr
:(
NSString
*
)
title
;
@end
XFFruit/ViewControllers/ChooseViewController/GXFPopCell.m
0 → 100644
View file @
d2673e07
//
// GXFPopCell.m
// XFFruit
//
// Created by 陈俊俊 on 15/9/11.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "GXFPopCell.h"
#define GXFPopCell_Width ScreenSize.width - 20*2
@implementation
GXFPopCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
bulidLayout
];
}
return
self
;
}
-
(
void
)
bulidLayout
{
self
.
addImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
10
,
15
,
15
,
15
)];
self
.
addImageView
.
image
=
[
UIImage
imageNamed
:
@"add"
];
self
.
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
CGRectGetMaxX
(
self
.
addImageView
.
frame
)
+
10
,
0
,
100
,
44
))];
self
.
titleLabel
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
titleLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
self
.
titleLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
lineLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
44
-
1
,
GXFPopCell_Width
,
1
))];
self
.
lineLabel
.
backgroundColor
=
GXF_LINE_COLOR
;
[
self
.
contentView
addSubview
:
self
.
addImageView
];
[
self
.
contentView
addSubview
:
self
.
titleLabel
];
[
self
.
contentView
addSubview
:
self
.
lineLabel
];
}
-
(
void
)
setTitleStr
:
(
NSString
*
)
title
{
self
.
titleLabel
.
text
=
title
;
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
XFFruit/ViewControllers/ChooseViewController/GXFPopView.h
0 → 100644
View file @
d2673e07
//
// GXFPopView.h
// XFFruit
//
// Created by 陈俊俊 on 15/9/11.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
GXFPopView
:
UIView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
withArr
:(
NSArray
*
)
titleArr
;
@end
XFFruit/ViewControllers/ChooseViewController/GXFPopView.m
0 → 100644
View file @
d2673e07
//
// GXFPopView.m
// XFFruit
//
// Created by 陈俊俊 on 15/9/11.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "GXFPopView.h"
#import "GXFPopCell.h"
#define GXFPOpView_LeftMargin 20
#define GXFPOpView_ContentHeight 200
#define GXFPOpView_TopHeight 44
@interface
GXFPopView
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArr
;
@end
@implementation
GXFPopView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
withArr
:(
NSArray
*
)
titleArr
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
self
.
titleArr
=
titleArr
;
[
self
bulidLayout
];
}
return
self
;
}
-
(
void
)
bulidLayout
{
self
.
backgroundColor
=
RGBA
(
0
,
0
,
0
,
0
.
5
);
UIView
*
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
GXFPOpView_LeftMargin
,
(
ScreenSize
.
height
-
GXFPOpView_ContentHeight
)
/
2
,
ScreenSize
.
width
-
GXFPOpView_LeftMargin
*
2
,
GXFPOpView_ContentHeight
)];
bgView
.
backgroundColor
=
XXFBgColor
;
bgView
.
layer
.
cornerRadius
=
4
;
bgView
.
layer
.
masksToBounds
=
YES
;
[
self
addSubview
:
bgView
];
UILabel
*
titlelabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
,
0
,
CGRectGetWidth
(
bgView
.
frame
)
-
20
,
GXFPOpView_TopHeight
-
1
)];
titlelabel
.
text
=
@"选择添加项目"
;
titlelabel
.
textColor
=
GXF_PopView_COLOR
;
[
bgView
addSubview
:
titlelabel
];
UILabel
*
lineLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
GXFPOpView_TopHeight
-
1
,
CGRectGetWidth
(
bgView
.
frame
),
1
)];
lineLabel
.
backgroundColor
=
GXF_PopView_COLOR
;
[
bgView
addSubview
:
lineLabel
];
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
GXFPOpView_TopHeight
,
CGRectGetWidth
(
bgView
.
frame
),
GXFPOpView_ContentHeight
-
GXFPOpView_TopHeight
*
2
)
style
:
UITableViewStylePlain
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
bgView
addSubview
:
self
.
tableView
];
UIButton
*
btn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
btn
.
frame
=
CGRectMake
(
0
,
CGRectGetHeight
(
bgView
.
frame
)
-
GXFPOpView_TopHeight
,
CGRectGetWidth
(
bgView
.
frame
),
GXFPOpView_TopHeight
);
[
btn
setTitle
:
@"返回"
forState
:
UIControlStateNormal
];
[
btn
setTitleColor
:
GXF_CONTENT_COLOR
forState
:
UIControlStateNormal
];
[
bgView
addSubview
:
btn
];
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
self
.
titleArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"SurveyID"
;
GXFPopCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
GXFPopCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
if
(
self
.
titleArr
.
count
>
0
)
{
NSString
*
titleStr
=
self
.
titleArr
[
indexPath
.
row
];
[
cell
setTitleStr
:
titleStr
];
}
return
cell
;
}
@end
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
d2673e07
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#import "PurchaseViewController.h"
#import "PurchaseViewController.h"
#import "ShopDetaileViewController.h"
#import "ShopDetaileViewController.h"
#import "PurchaseBillProduct.h"
#import "PurchaseBillProduct.h"
#import "GXFPopView.h"
#define TopHeight 328
#define TopHeight 328
#define BottomHeight 300
#define BottomHeight 300
#define SpaceHeight 20
#define SpaceHeight 20
...
@@ -33,6 +34,7 @@ typedef enum : NSUInteger {
...
@@ -33,6 +34,7 @@ typedef enum : NSUInteger {
NSNumber
*
versionObject
;
NSNumber
*
versionObject
;
}
}
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
GXFPopView
*
popView
;
@end
@end
...
@@ -149,6 +151,12 @@ typedef enum : NSUInteger {
...
@@ -149,6 +151,12 @@ 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
];
...
...
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
d2673e07
...
@@ -129,7 +129,7 @@ typedef enum : NSUInteger {
...
@@ -129,7 +129,7 @@ typedef enum : NSUInteger {
}
else
{
}
else
{
[
self
hiddenTwoBtn
];
[
self
hiddenTwoBtn
];
}
}
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_
APPROVED
]){
//状态是发运中即已审批
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_
SHIPPING
]){
//状态是发运中即已审批
if
([
self
checkIsPermission
:
PURCHASE_PERMISSIONS_VENDORAPPROVE
]){
//供应商审批权
if
([
self
checkIsPermission
:
PURCHASE_PERMISSIONS_VENDORAPPROVE
]){
//供应商审批权
//显示确认按钮
//显示确认按钮
_firstBtn
.
hidden
=
YES
;
_firstBtn
.
hidden
=
YES
;
...
@@ -354,16 +354,16 @@ typedef enum : NSUInteger {
...
@@ -354,16 +354,16 @@ typedef enum : NSUInteger {
self
.
stateLabel
.
text
=
@"未提交"
;
self
.
stateLabel
.
text
=
@"未提交"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_SUBMITTED
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_SUBMITTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
text
=
@"已
提交
"
;
self
.
stateLabel
.
text
=
@"已
审批
"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已拒绝"
;
self
.
stateLabel
.
text
=
@"已拒绝"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_APPROVED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已审批"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_SHIPPING
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_SHIPPING
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"发运中"
;
self
.
stateLabel
.
text
=
@"发运中"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_ACTION_ABORT
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已作废"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
stateLabel
.
text
=
@"已完成"
;
self
.
stateLabel
.
text
=
@"已完成"
;
...
...
XFFruit/ViewControllers/Purchase/Controllers/PurchaseViewController.m
View file @
d2673e07
...
@@ -43,7 +43,9 @@ typedef enum : NSUInteger {
...
@@ -43,7 +43,9 @@ typedef enum : NSUInteger {
}
}
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArr
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSString
*
noticeLike
;
@property
(
nonatomic
,
strong
)
NSString
*
titleLike
;
@property
(
nonatomic
,
strong
)
NSString
*
vendorLike
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
NSString
*
billLike
;
@property
(
nonatomic
,
strong
)
NSString
*
billLike
;
@property
(
nonatomic
,
strong
)
NSString
*
orderDirection
;
//asc(升序),desc(降序)
@property
(
nonatomic
,
strong
)
NSString
*
orderDirection
;
//asc(升序),desc(降序)
...
@@ -134,15 +136,13 @@ typedef enum : NSUInteger {
...
@@ -134,15 +136,13 @@ typedef enum : NSUInteger {
[
orderArr
addObject
:[
order
dictForCommit
]];
[
orderArr
addObject
:[
order
dictForCommit
]];
}
}
}
}
id
noticeObject
=
[
NSNull
null
];
id
titleObject
=
[
NSNull
null
];
if
(
self
.
noticeLike
.
length
>
0
)
{
if
(
self
.
titleLike
.
length
>
0
)
{
noticeObject
=
self
.
noticeLike
;
titleObject
=
self
.
titleLike
;
if
(
self
.
orderDirection
.
length
>
0
&&
!
[
self
.
orderDirection
isEqualToString
:
@"none"
])
{
}
QueryOrder
*
order
=
[
QueryOrder
new
];
id
vendorObject
=
[
NSNull
null
];
order
.
field
=
@"noticeNumber"
;
if
(
self
.
vendorLike
.
length
>
0
)
{
order
.
direction
=
self
.
orderDirection
;
vendorObject
=
self
.
vendorLike
;
[
orderArr
addObject
:[
order
dictForCommit
]];
}
}
}
if
(
orderArr
.
count
==
0
)
{
if
(
orderArr
.
count
==
0
)
{
QueryOrder
*
order
=
[
QueryOrder
new
];
QueryOrder
*
order
=
[
QueryOrder
new
];
...
@@ -154,9 +154,8 @@ typedef enum : NSUInteger {
...
@@ -154,9 +154,8 @@ typedef enum : NSUInteger {
NSDictionary
*
dict
=
@{
NSDictionary
*
dict
=
@{
@"billNumberLike"
:
billObject
,
@"billNumberLike"
:
billObject
,
@"state"
:
stateObject
,
@"state"
:
stateObject
,
// @"noticeNumberLike":noticeObject,
@"titleLike"
:
titleObject
,
@"titleLike"
:
[
NSNull
null
],
@"vendorUuid"
:
vendorObject
,
@"vendorUuid"
:
[
NSNull
null
],
@"queryOrders"
:
orderArr
,
@"queryOrders"
:
orderArr
,
@"userUuid"
:
userUtil
.
userId
,
@"userUuid"
:
userUtil
.
userId
,
@"pageNumber"
:
@
(
_currentPage
),
@"pageNumber"
:
@
(
_currentPage
),
...
@@ -289,12 +288,12 @@ typedef enum : NSUInteger {
...
@@ -289,12 +288,12 @@ typedef enum : NSUInteger {
}
else
{
}
else
{
[
btn
setImage
:[
UIImage
imageNamed
:
@"selected-filter_with_text"
]
forState
:
UIControlStateNormal
];
[
btn
setImage
:[
UIImage
imageNamed
:
@"selected-filter_with_text"
]
forState
:
UIControlStateNormal
];
if
(
_boltView
==
nil
)
{
if
(
_boltView
==
nil
)
{
_boltView
=
[[
PurchaseBoltView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
-
105
,
ScreenSize
.
width
,
274
)
state
:
self
.
state
billNumber
:
self
.
billLike
noticeNumber
:
self
.
notice
Like
];
_boltView
=
[[
PurchaseBoltView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
-
105
,
ScreenSize
.
width
,
274
)
state
:
self
.
state
billNumber
:
self
.
billLike
titleStr
:
self
.
titleLike
vendorNumber
:
self
.
vendor
Like
];
_boltView
.
backgroundColor
=
XXFBgColor
;
_boltView
.
backgroundColor
=
XXFBgColor
;
_boltView
.
delegate
=
self
;
_boltView
.
delegate
=
self
;
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
_boltView
.
dataArr
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"未提交"
,
@"
已提交"
,
@"已拒绝"
,
@"已审批"
,
@"发运中
"
,
@"已完成"
,
nil
];
_boltView
.
dataArr
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"未提交"
,
@"
未审批"
,
@"已拒绝"
,
@"发运中"
,
@"已作废
"
,
@"已完成"
,
nil
];
[
_maskView
addSubview
:
_boltView
];
[
_maskView
addSubview
:
_boltView
];
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
CGRect
sortFrame
=
_boltView
.
frame
;
CGRect
sortFrame
=
_boltView
.
frame
;
...
@@ -356,7 +355,7 @@ typedef enum : NSUInteger {
...
@@ -356,7 +355,7 @@ typedef enum : NSUInteger {
}
}
}
}
-
(
void
)
checkBoltBtnColor
{
-
(
void
)
checkBoltBtnColor
{
if
(
self
.
state
.
length
>
0
||
self
.
notic
eLike
.
length
>
0
||
self
.
billLike
.
length
>
0
)
{
if
(
self
.
state
.
length
>
0
||
self
.
titl
eLike
.
length
>
0
||
self
.
billLike
.
length
>
0
)
{
[
_boltBtn
setImage
:[
UIImage
imageNamed
:
@"selected-filter_with_text"
]
forState
:
UIControlStateNormal
];
[
_boltBtn
setImage
:[
UIImage
imageNamed
:
@"selected-filter_with_text"
]
forState
:
UIControlStateNormal
];
}
else
{
}
else
{
[
_boltBtn
setImage
:[
UIImage
imageNamed
:
@"black_filter_with_text"
]
forState
:
UIControlStateNormal
];
[
_boltBtn
setImage
:[
UIImage
imageNamed
:
@"black_filter_with_text"
]
forState
:
UIControlStateNormal
];
...
@@ -366,22 +365,22 @@ typedef enum : NSUInteger {
...
@@ -366,22 +365,22 @@ typedef enum : NSUInteger {
#pragma mark - 确定
#pragma mark - 确定
-
(
void
)
sureClick
{
-
(
void
)
sureClick
{
if
(
self
.
state
.
length
>
0
||
self
.
billLike
.
length
>
0
||
self
.
noticeLike
.
length
>
0
||
self
.
orderDirection
.
length
>
0
)
{
[
_boltView
.
titleFiled
resignFirstResponder
];
[
_boltView
.
noticeFiled
resignFirstResponder
];
[
_boltView
.
billFiled
resignFirstResponder
];
[
_boltView
.
billFiled
resignFirstResponder
];
[
_boltView
.
vendorFiled
resignFirstResponder
];
_currentPage
=
0
;
_currentPage
=
0
;
//请求
[
self
getData
];
//请求
//还原数据
[
self
getData
];
if
(
_sortView
)
{
[
self
hiddenSortMaskView
:
YES
];
//还原数据
}
if
(
_sortView
)
{
if
(
_boltView
)
{
[
self
hiddenSortMaskView
:
YES
];
[
self
hiddenBoltMaskView
:
YES
];
}
}
if
(
_boltView
)
{
[
self
hiddenBoltMaskView
:
YES
];
}
}
}
}
#pragma mark - sortDelegate
#pragma mark - sortDelegate
...
@@ -400,21 +399,28 @@ typedef enum : NSUInteger {
...
@@ -400,21 +399,28 @@ typedef enum : NSUInteger {
self
.
billLike
=
billLike
;
self
.
billLike
=
billLike
;
CLog
(
@"%@"
,
billLike
);
CLog
(
@"%@"
,
billLike
);
}
}
-
(
void
)
getnoticeLike
:
(
NSString
*
)
noticeLike
{
-
(
void
)
gettitleLike
:
(
NSString
*
)
titleLike
{
self
.
noticeLike
=
noticeLike
;
self
.
titleLike
=
titleLike
;
CLog
(
@"%@"
,
noticeLike
);
CLog
(
@"%@"
,
titleLike
);
}
-
(
void
)
getvendorLike
:
(
NSString
*
)
vendorLike
{
self
.
vendorLike
=
vendorLike
;
CLog
(
@"%@"
,
vendorLike
);
}
}
-
(
void
)
clearBoltInformation
{
-
(
void
)
clearBoltInformation
{
//清空所有条件
//清空所有条件
if
(
self
.
billLike
.
length
>
0
)
{
if
(
self
.
billLike
.
length
>
0
)
{
self
.
billLike
=
@""
;
self
.
billLike
=
@""
;
}
}
if
(
self
.
notic
eLike
.
length
>
0
)
{
if
(
self
.
titl
eLike
.
length
>
0
)
{
self
.
notic
eLike
=
@""
;
self
.
titl
eLike
=
@""
;
}
}
if
(
self
.
state
.
length
>
0
)
{
if
(
self
.
state
.
length
>
0
)
{
self
.
state
=
@""
;
self
.
state
=
@""
;
}
}
if
(
self
.
vendorLike
.
length
>
0
)
{
self
.
vendorLike
=
@""
;
}
}
}
#pragma mark - 协议方法
#pragma mark - 协议方法
...
...
XFFruit/ViewControllers/Purchase/Views/PurchaseBoltView.h
View file @
d2673e07
...
@@ -11,7 +11,9 @@
...
@@ -11,7 +11,9 @@
@protocol
PurchaseViewDelegate
<
NSObject
>
@protocol
PurchaseViewDelegate
<
NSObject
>
-
(
void
)
getBoltValueSelectRow
:
(
NSString
*
)
state
;
-
(
void
)
getBoltValueSelectRow
:
(
NSString
*
)
state
;
-
(
void
)
getbillLike
:(
NSString
*
)
billLike
;
-
(
void
)
getbillLike
:(
NSString
*
)
billLike
;
-
(
void
)
getnoticeLike
:(
NSString
*
)
noticeLike
;
-
(
void
)
gettitleLike
:(
NSString
*
)
titleLike
;
-
(
void
)
getvendorLike
:(
NSString
*
)
vendorLike
;
-
(
void
)
clearBoltInformation
;
-
(
void
)
clearBoltInformation
;
@end
@end
...
@@ -21,8 +23,8 @@
...
@@ -21,8 +23,8 @@
@property
(
nonatomic
,
weak
)
id
<
PurchaseViewDelegate
>
delegate
;
@property
(
nonatomic
,
weak
)
id
<
PurchaseViewDelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UITextField
*
billFiled
;
//采购单号类似于
@property
(
nonatomic
,
strong
)
UITextField
*
billFiled
;
//采购单号类似于
@property
(
nonatomic
,
strong
)
UITextField
*
notic
eFiled
;
//通知单号类似于
@property
(
nonatomic
,
strong
)
UITextField
*
titl
eFiled
;
//通知单号类似于
@property
(
nonatomic
,
strong
)
UITextField
*
vendorFiled
;
//供应商uuid类似于
@property
(
nonatomic
,
strong
)
UITextField
*
vendorFiled
;
//供应商uuid类似于
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
state
:(
NSString
*
)
state
billNumber
:(
NSString
*
)
billNumber
noticeNumber
:(
NSString
*
)
notice
Number
;
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
state
:(
NSString
*
)
state
billNumber
:(
NSString
*
)
billNumber
titleStr
:(
NSString
*
)
titleStr
vendorNumber
:(
NSString
*
)
vendor
Number
;
@end
@end
XFFruit/ViewControllers/Purchase/Views/PurchaseBoltView.m
View file @
d2673e07
...
@@ -18,26 +18,24 @@
...
@@ -18,26 +18,24 @@
UIView
*
_leftView
;
UIView
*
_leftView
;
UIButton
*
_currentBtn
;
UIButton
*
_currentBtn
;
NSIndexPath
*
_currentIndexPath
;
NSIndexPath
*
_currentIndexPath
;
UIView
*
_billView
;
UIView
*
_noticeView
;
NSString
*
_state
;
NSString
*
_billNumber
;
NSString
*
_title
;
UIButton
*
_clearBtn
;
UIButton
*
_clearBtn
;
}
}
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
NSString
*
noticeNumber
;
@property
(
nonatomic
,
strong
)
NSString
*
titleStr
;
@property
(
nonatomic
,
strong
)
NSString
*
vendorNumber
;
@property
(
nonatomic
,
strong
)
NSString
*
billNumber
;
@property
(
nonatomic
,
strong
)
NSString
*
billNumber
;
@end
@end
@implementation
PurchaseBoltView
@implementation
PurchaseBoltView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
state
:(
NSString
*
)
state
billNumber
:(
NSString
*
)
billNumber
noticeNumber
:(
NSString
*
)
notice
Number
{
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
state
:(
NSString
*
)
state
billNumber
:(
NSString
*
)
billNumber
titleStr
:(
NSString
*
)
titleStr
vendorNumber
:(
NSString
*
)
vendor
Number
{
self
=
[
super
initWithFrame
:
frame
];
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
if
(
self
)
{
self
.
billNumber
=
billNumber
;
self
.
billNumber
=
billNumber
;
self
.
noticeNumber
=
noticeNumber
;
self
.
titleStr
=
titleStr
;
self
.
vendorNumber
=
vendorNumber
;
self
.
state
=
state
;
self
.
state
=
state
;
[
self
createView
];
[
self
createView
];
[
self
createRightView
];
[
self
createRightView
];
...
@@ -53,20 +51,24 @@
...
@@ -53,20 +51,24 @@
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
1
inSection
:
0
];
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
1
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
2
inSection
:
0
];
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
2
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_APPROVED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
3
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_SHIPPING
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_SHIPPING
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
3
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_ABORTED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
4
inSection
:
0
];
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
4
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
5
inSection
:
0
];
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
5
inSection
:
0
];
}
}
_billView
.
hidden
=
YES
;
self
.
billFiled
.
hidden
=
YES
;
if
(
self
.
billNumber
.
length
>
0
){
if
(
self
.
billNumber
.
length
>
0
){
self
.
billFiled
.
text
=
self
.
billNumber
;
self
.
billFiled
.
text
=
self
.
billNumber
;
}
}
_noticeView
.
hidden
=
YES
;
self
.
titleFiled
.
hidden
=
YES
;
if
(
self
.
noticeNumber
.
length
>
0
)
{
if
(
self
.
titleStr
.
length
>
0
)
{
self
.
noticeFiled
.
text
=
self
.
noticeNumber
;
self
.
titleFiled
.
text
=
self
.
titleStr
;
}
self
.
vendorFiled
.
hidden
=
YES
;
if
(
self
.
vendorNumber
.
length
>
0
)
{
self
.
vendorFiled
.
text
=
self
.
vendorNumber
;
}
}
}
}
...
@@ -75,7 +77,7 @@
...
@@ -75,7 +77,7 @@
{
{
_leftView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
_leftView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
[
self
addSubview
:
_leftView
];
[
self
addSubview
:
_leftView
];
NSArray
*
arr
=
@[
@"按状态"
,
@"采购单号"
,
@"
通知单号
"
];
NSArray
*
arr
=
@[
@"按状态"
,
@"采购单号"
,
@"
标题"
,
@"供应商Uuid
"
];
for
(
NSInteger
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
for
(
NSInteger
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
button
.
frame
=
CGRectMake
(
0
,
LeftHeight
*
i
,
LeftMargin
,
LeftHeight
);
button
.
frame
=
CGRectMake
(
0
,
LeftHeight
*
i
,
LeftMargin
,
LeftHeight
);
...
@@ -100,43 +102,34 @@
...
@@ -100,43 +102,34 @@
[
self
addSubview
:
_clearBtn
];
[
self
addSubview
:
_clearBtn
];
}
}
-
(
void
)
createRightView
{
-
(
void
)
createRightView
{
NSArray
*
arr
=
@[
@"输入类似采购单号"
,
@"输入类似标题"
,
@"输入类似供应商Uuid"
];
UIView
*
contentView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
contentView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
addSubview
:
contentView
];
UILabel
*
contentLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
,
20
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
20
)];
contentLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
contentLabel
.
text
=
@"类似于:"
;
[
contentView
addSubview
:
contentLabel
];
_billView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
for
(
NSInteger
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
_billView
.
backgroundColor
=
[
UIColor
whiteColor
];
UITextField
*
contentField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
10
,
CGRectGetMaxY
(
contentLabel
.
frame
)
+
10
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
30
)];
[
self
addSubview
:
_billView
];
contentField
.
textAlignment
=
NSTextAlignmentLeft
;
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
,
20
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
20
)];
contentField
.
textColor
=
GXF_CONTENT_COLOR
;
titleLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
contentField
.
borderStyle
=
UITextBorderStyleRoundedRect
;
titleLabel
.
text
=
@"类似于:"
;
contentField
.
font
=
GXF_FIFTEENTEN_SIZE
;
[
_billView
addSubview
:
titleLabel
];
contentField
.
placeholder
=
arr
[
i
];
self
.
billFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
10
,
CGRectGetMaxY
(
titleLabel
.
frame
)
+
10
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
30
)];
self
.
billFiled
.
textAlignment
=
NSTextAlignmentLeft
;
contentField
.
returnKeyType
=
UIReturnKeyDone
;
self
.
billFiled
.
textColor
=
GXF_CONTENT_COLOR
;
contentField
.
delegate
=
self
;
self
.
billFiled
.
placeholder
=
@"输入类似采购单号"
;
[
contentView
addSubview
:
contentField
];
self
.
billFiled
.
borderStyle
=
UITextBorderStyleRoundedRect
;
if
(
i
==
0
)
{
self
.
billFiled
.
font
=
GXF_FIFTEENTEN_SIZE
;
_billFiled
=
contentField
;
self
.
billFiled
.
returnKeyType
=
UIReturnKeyDone
;
}
else
if
(
i
==
1
){
self
.
billFiled
.
delegate
=
self
;
_titleFiled
=
contentField
;
[
_billView
addSubview
:
self
.
billFiled
];
}
else
if
(
i
==
2
){
_vendorFiled
=
contentField
;
}
_noticeView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
}
_noticeView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
addSubview
:
_noticeView
];
UILabel
*
billLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
,
20
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
20
)];
billLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
billLabel
.
text
=
@"类似于:"
;
[
_noticeView
addSubview
:
billLabel
];
self
.
noticeFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
10
,
CGRectGetMaxY
(
billLabel
.
frame
)
+
10
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
30
)];
self
.
noticeFiled
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
noticeFiled
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
noticeFiled
.
placeholder
=
@"输入类似采购通知单号"
;
self
.
noticeFiled
.
borderStyle
=
UITextBorderStyleRoundedRect
;
self
.
noticeFiled
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
noticeFiled
.
returnKeyType
=
UIReturnKeyDone
;
self
.
noticeFiled
.
delegate
=
self
;
[
_noticeView
addSubview
:
self
.
noticeFiled
];
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)
style
:(
UITableViewStylePlain
)];
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)
style
:(
UITableViewStylePlain
)];
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
delegate
=
self
;
...
@@ -155,22 +148,33 @@
...
@@ -155,22 +148,33 @@
case
1001
:
//状态
case
1001
:
//状态
{
{
self
.
tableView
.
hidden
=
NO
;
self
.
tableView
.
hidden
=
NO
;
_billView
.
hidden
=
YES
;
_billFiled
.
hidden
=
YES
;
_noticeView
.
hidden
=
YES
;
_titleFiled
.
hidden
=
YES
;
_vendorFiled
.
hidden
=
YES
;
}
}
break
;
break
;
case
1002
:
//条件二
case
1002
:
//条件二
{
{
self
.
tableView
.
hidden
=
YES
;
self
.
tableView
.
hidden
=
YES
;
_billView
.
hidden
=
NO
;
_billFiled
.
hidden
=
NO
;
_noticeView
.
hidden
=
YES
;
_titleFiled
.
hidden
=
YES
;
_vendorFiled
.
hidden
=
YES
;
}
}
break
;
break
;
case
1003
:
//条件三
case
1003
:
//条件三
{
{
self
.
tableView
.
hidden
=
YES
;
self
.
tableView
.
hidden
=
YES
;
_billView
.
hidden
=
YES
;
_billFiled
.
hidden
=
YES
;
_noticeView
.
hidden
=
NO
;
_titleFiled
.
hidden
=
NO
;
_vendorFiled
.
hidden
=
YES
;
}
break
;
case
1004
:
//条件四
{
self
.
tableView
.
hidden
=
YES
;
_billFiled
.
hidden
=
YES
;
_titleFiled
.
hidden
=
YES
;
_vendorFiled
.
hidden
=
NO
;
}
}
break
;
break
;
default
:
default
:
...
@@ -182,8 +186,11 @@
...
@@ -182,8 +186,11 @@
if
(
_billFiled
.
text
.
length
>
0
)
{
if
(
_billFiled
.
text
.
length
>
0
)
{
_billFiled
.
text
=
@""
;
_billFiled
.
text
=
@""
;
}
}
if
(
_noticeFiled
.
text
.
length
>
0
)
{
if
(
_titleFiled
.
text
.
length
>
0
)
{
_noticeFiled
.
text
=
@""
;
_titleFiled
.
text
=
@""
;
}
if
(
_vendorFiled
.
text
.
length
>
0
)
{
_vendorFiled
.
text
=
@""
;
}
}
if
(
_currentIndexPath
)
{
if
(
_currentIndexPath
)
{
_currentIndexPath
=
nil
;
_currentIndexPath
=
nil
;
...
@@ -242,9 +249,9 @@
...
@@ -242,9 +249,9 @@
}
else
if
(
indexPath
.
row
==
2
){
}
else
if
(
indexPath
.
row
==
2
){
stateStr
=
PURCHASE_STATE_REJECTED
;
stateStr
=
PURCHASE_STATE_REJECTED
;
}
else
if
(
indexPath
.
row
==
3
){
}
else
if
(
indexPath
.
row
==
3
){
stateStr
=
PURCHASE_STATE_APPROVED
;
}
else
if
(
indexPath
.
row
==
4
){
stateStr
=
PURCHASE_STATE_SHIPPING
;
stateStr
=
PURCHASE_STATE_SHIPPING
;
}
else
if
(
indexPath
.
row
==
4
){
stateStr
=
PURCHASE_STATE_ABORTED
;
}
else
if
(
indexPath
.
row
==
5
){
}
else
if
(
indexPath
.
row
==
5
){
stateStr
=
PURCHASE_STATE_FINISHED
;
stateStr
=
PURCHASE_STATE_FINISHED
;
}
}
...
@@ -264,7 +271,8 @@
...
@@ -264,7 +271,8 @@
}
}
-
(
void
)
keyBoardHidden
{
-
(
void
)
keyBoardHidden
{
[
self
.
billFiled
resignFirstResponder
];
[
self
.
billFiled
resignFirstResponder
];
[
self
.
noticeFiled
resignFirstResponder
];
[
self
.
titleFiled
resignFirstResponder
];
[
self
.
vendorFiled
resignFirstResponder
];
}
}
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
{
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
{
...
@@ -272,9 +280,13 @@
...
@@ -272,9 +280,13 @@
if
(
self
.
billFiled
.
text
.
length
>
0
)
{
if
(
self
.
billFiled
.
text
.
length
>
0
)
{
[
self
.
delegate
getbillLike
:
self
.
billFiled
.
text
];
[
self
.
delegate
getbillLike
:
self
.
billFiled
.
text
];
}
}
}
else
if
(
textField
==
self
.
noticeFiled
){
}
else
if
(
textField
==
self
.
titleFiled
){
if
(
self
.
noticeFiled
.
text
.
length
>
0
)
{
if
(
self
.
titleFiled
.
text
.
length
>
0
)
{
[
self
.
delegate
getnoticeLike
:
self
.
noticeFiled
.
text
];
[
self
.
delegate
gettitleLike
:
self
.
titleFiled
.
text
];
}
}
else
if
(
textField
==
self
.
vendorFiled
){
if
(
self
.
vendorFiled
.
text
.
length
>
0
)
{
[
self
.
delegate
getvendorLike
:
self
.
vendorFiled
.
text
];
}
}
}
}
}
}
...
...
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
View file @
d2673e07
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
stateStr
=
@"已拒绝"
;
stateStr
=
@"已拒绝"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"initial"
]
forState
:
UIControlStateDisabled
];
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"initial"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_
APPROVED
])
{
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_
SHIPPING
])
{
stateStr
=
@"发运中"
;
stateStr
=
@"发运中"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
...
...
XFFruit/ViewControllers/Purchase/Views/TopPurchaseView.m
View file @
d2673e07
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
textField
.
textAlignment
=
NSTextAlignmentRight
;
textField
.
textAlignment
=
NSTextAlignmentRight
;
textField
.
textColor
=
GXF_CONTENT_COLOR
;
textField
.
textColor
=
GXF_CONTENT_COLOR
;
textField
.
font
=
GXF_FIFTEENTEN_SIZE
;
textField
.
font
=
GXF_FIFTEENTEN_SIZE
;
textField
.
keyboardType
=
UIKeyboardType
NumbersAndPunctuation
;
textField
.
keyboardType
=
UIKeyboardType
DecimalPad
;
textField
.
returnKeyType
=
UIReturnKeyDone
;
textField
.
returnKeyType
=
UIReturnKeyDone
;
textField
.
delegate
=
self
;
textField
.
delegate
=
self
;
[
cell
.
contentView
addSubview
:
textField
];
[
cell
.
contentView
addSubview
:
textField
];
...
...
XFFruit/ViewControllers/Survey/Views/SurveyListCell.m
View file @
d2673e07
...
@@ -69,8 +69,8 @@
...
@@ -69,8 +69,8 @@
self
.
titleLabel
.
text
=
survey
.
title
;
self
.
titleLabel
.
text
=
survey
.
title
;
self
.
billnumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"单号:%@"
,
survey
.
billNumber
];
self
.
billnumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"单号:%@"
,
survey
.
billNumber
];
self
.
productnameLabel
.
text
=
[
NSString
stringWithFormat
:
@"商品:%@[%@]"
,
survey
.
productName
,
survey
.
productCode
];
self
.
productnameLabel
.
text
=
[
NSString
stringWithFormat
:
@"商品:%@[%@]"
,
survey
.
productName
,
survey
.
productCode
];
self
.
begindateLabel
.
text
=
[
NSString
stringWithFormat
:
@"开始时间:%@"
,
[
survey
.
beginDate
substringToIndex
:
10
]
];
self
.
begindateLabel
.
text
=
[
NSString
stringWithFormat
:
@"开始时间:%@"
,
survey
.
beginDate
.
length
>
10
?
[
survey
.
beginDate
substringToIndex
:
10
]
:
survey
.
beginDate
];
self
.
enddateLabel
.
text
=
[
NSString
stringWithFormat
:
@"结束时间:%@"
,
[
survey
.
endDate
substringToIndex
:
10
]
];
self
.
enddateLabel
.
text
=
[
NSString
stringWithFormat
:
@"结束时间:%@"
,
survey
.
endDate
.
length
>
10
?
[
survey
.
endDate
substringToIndex
:
10
]
:
survey
.
endDate
];
NSString
*
stateStr
=
@""
;
NSString
*
stateStr
=
@""
;
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_INITIAL
])
{
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_INITIAL
])
{
stateStr
=
@"未提交"
;
stateStr
=
@"未提交"
;
...
...
XFFruit/ViewControllers/Survey/controllers/NewSurveyViewController.m
View file @
d2673e07
...
@@ -477,27 +477,12 @@ typedef enum : NSUInteger {
...
@@ -477,27 +477,12 @@ typedef enum : NSUInteger {
#pragma mark delegate
#pragma mark delegate
-
(
BOOL
)
growingTextViewShouldReturn
:
(
HPGrowingTextView
*
)
growingTextView
{
-
(
BOOL
)
growingTextViewShouldReturn
:
(
HPGrowingTextView
*
)
growingTextView
{
[
_noteTextView
resignFirstResponder
];
[
_noteTextView
resignFirstResponder
];
[
self
setTableFrame
:
LeftMargin
];
return
YES
;
return
YES
;
}
}
-
(
void
)
growingTextViewDidBeginEditing
:
(
HPGrowingTextView
*
)
growingTextView
{
CGFloat
offset
=
ScreenSize
.
height
-
TotalHeight
-
KeyboardHeight
;
if
(
offset
<
0
)
{
//上移
[
self
setTableFrame
:
LeftMargin
+
offset
];
}
}
-
(
void
)
setTableFrame
:
(
CGFloat
)
tabelH
{
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
CGRect
tableFrame
=
_tableView
.
frame
;
tableFrame
.
origin
.
y
=
tabelH
;
_tableView
.
frame
=
tableFrame
;
}];
}
-
(
void
)
keyboardHidden
{
-
(
void
)
keyboardHidden
{
[
_titleField
resignFirstResponder
];
[
_titleField
resignFirstResponder
];
[
_noteTextView
resignFirstResponder
];
[
_noteTextView
resignFirstResponder
];
[
self
setTableFrame
:
LeftMargin
];
}
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
...
...
XFFruit/ViewControllers/Transport/Controllers/NewCostViewController.m
View file @
d2673e07
...
@@ -204,12 +204,11 @@ typedef enum : NSUInteger {
...
@@ -204,12 +204,11 @@ typedef enum : NSUInteger {
textField
.
textColor
=
GXF_CONTENT_COLOR
;
textField
.
textColor
=
GXF_CONTENT_COLOR
;
textField
.
font
=
GXF_FIFTEENTEN_SIZE
;
textField
.
font
=
GXF_FIFTEENTEN_SIZE
;
textField
.
returnKeyType
=
UIReturnKeyDone
;
textField
.
returnKeyType
=
UIReturnKeyDone
;
textField
.
keyboardType
=
UIKeyboardType
NumbersAndPunctuation
;
textField
.
keyboardType
=
UIKeyboardType
DecimalPad
;
textField
.
delegate
=
self
;
textField
.
delegate
=
self
;
[
cell
.
contentView
addSubview
:
textField
];
[
cell
.
contentView
addSubview
:
textField
];
if
(
indexPath
.
row
==
1
)
{
if
(
indexPath
.
row
==
1
)
{
textField
.
placeholder
=
@"输入应付金额"
;
textField
.
placeholder
=
@"输入应付金额"
;
_actualmoneyField
=
textField
;
_actualmoneyField
=
textField
;
}
else
if
(
indexPath
.
row
==
2
){
}
else
if
(
indexPath
.
row
==
2
){
textField
.
placeholder
=
@"输入已付金额"
;
textField
.
placeholder
=
@"输入已付金额"
;
...
...
XFFruit/ViewControllers/Transport/Controllers/TransportDetailViewController.m
View file @
d2673e07
...
@@ -86,7 +86,6 @@ typedef enum : NSUInteger {
...
@@ -86,7 +86,6 @@ typedef enum : NSUInteger {
-
(
void
)
fetchtTransportDetail
{
-
(
void
)
fetchtTransportDetail
{
self
.
billNumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
billnumber
];
self
.
billNumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
billnumber
];
// self.purchaseLabel.text =
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
=
@"未发货"
;
...
@@ -97,20 +96,36 @@ typedef enum : NSUInteger {
...
@@ -97,20 +96,36 @@ typedef enum : NSUInteger {
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已作废"
;
self
.
stateLabel
.
text
=
@"已作废"
;
}
}
// self.noticeNumberLabel.text = (self.bill.noticeNumber.length == 0) ? @"无":(self.bill.noticeNumber)
;
self
.
purchaseLabel
.
text
=
[
self
getPurchaseWith
:
self
.
transport
.
pdtDetails
]
;
self
.
warehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
warehouseName
];
self
.
warehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
warehouseName
];
self
.
rwarehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
rwarehouseName
];
self
.
rwarehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
rwarehouseName
];
self
.
carnumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
carnumber
];
self
.
carnumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
carnumber
];
self
.
carhoneLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
carphone
];
self
.
carhoneLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
carphone
];
self
.
noteLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
note
];
self
.
noteLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transport
.
note
];
self
.
createOperLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
IBTCommon
checkString
:
self
.
transport
.
create_operName
],
self
.
transport
.
create_time
];
self
.
createOperLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,[
IBTCommon
checkString
:
self
.
transport
.
create_operName
],
self
.
transport
.
create_time
.
length
>
10
?
[
self
.
transport
.
create_time
substringToIndex
:
10
]
:
self
.
transport
.
create_time
];
[
_transView
refreshTranProduct
:
self
.
transport
.
pdtDetails
];
[
_transView
refreshTranProduct
:
self
.
transport
.
pdtDetails
];
[
_transView
refreshCost
:
self
.
transport
.
accountDetails
];
[
_transView
refreshCost
:
self
.
transport
.
accountDetails
];
[
self
setNoteHeight
];
[
self
setNoteHeight
];
}
}
-
(
NSString
*
)
getPurchaseWith
:
(
NSArray
*
)
purchases
{
NSString
*
purchseNumber
=
@""
;
NSInteger
count
=
0
;
for
(
NSDictionary
*
billDict
in
purchases
)
{
if
(
!
[
billDict
[
@"purchasebillnumber"
]
isEqual
:[
NSNull
null
]])
{
count
++
;
if
(
purchseNumber
.
length
==
0
)
{
purchseNumber
=
[
purchseNumber
stringByAppendingFormat
:
@"%@"
,
billDict
[
@"purchasebillnumber"
]];
}
else
{
purchseNumber
=
[
purchseNumber
stringByAppendingFormat
:
@",%@"
,
billDict
[
@"purchasebillnumber"
]];
}
}
}
if
(
count
==
0
)
{
purchseNumber
=
@"无"
;
}
return
purchseNumber
;
}
-
(
void
)
setNoteHeight
-
(
void
)
setNoteHeight
{
{
CGFloat
height
=
[
self
.
noteLabel
calculateHeight
];
CGFloat
height
=
[
self
.
noteLabel
calculateHeight
];
...
...
XFFruit/ViewControllers/Transport/Controllers/TransportPurchaseViewController.m
View file @
d2673e07
...
@@ -167,7 +167,7 @@
...
@@ -167,7 +167,7 @@
[
arr
addObject
:
billProduct
];
[
arr
addObject
:
billProduct
];
[
arr
addObject
:
billProduct
];
[
arr
addObject
:
billProduct
];
bill
.
products
=
arr
;
bill
.
products
=
arr
;
cell
.
bill
=
bill
;
[
cell
setPurchaseBill
:
bill
selectArr
:
self
.
indexArr
]
;
}
}
return
cell
;
return
cell
;
}
}
...
@@ -185,6 +185,7 @@
...
@@ -185,6 +185,7 @@
-
(
void
)
getSelectPurchaseProduct
:
(
NSNotification
*
)
fination
{
-
(
void
)
getSelectPurchaseProduct
:
(
NSNotification
*
)
fination
{
NSDictionary
*
dict
=
fination
.
userInfo
;
NSDictionary
*
dict
=
fination
.
userInfo
;
TransportPdtDetail
*
billProduct
=
dict
[
@"selectArr"
];
TransportPdtDetail
*
billProduct
=
dict
[
@"selectArr"
];
NSString
*
state
=
dict
[
@"state"
];
NSString
*
state
=
dict
[
@"state"
];
if
([
state
isEqualToString
:
@"add"
])
{
if
([
state
isEqualToString
:
@"add"
])
{
[
self
.
indexArr
addObject
:
billProduct
];
[
self
.
indexArr
addObject
:
billProduct
];
...
...
XFFruit/ViewControllers/Transport/Controllers/TransportViewController.m
View file @
d2673e07
...
@@ -89,12 +89,6 @@ typedef enum : NSUInteger {
...
@@ -89,12 +89,6 @@ typedef enum : NSUInteger {
id
userObject
=
[
NSNull
null
];
id
userObject
=
[
NSNull
null
];
if
(
self
.
userLike
.
length
>
0
)
{
if
(
self
.
userLike
.
length
>
0
)
{
userObject
=
self
.
userLike
;
userObject
=
self
.
userLike
;
if
(
self
.
orderDirection
.
length
>
0
&&
!
[
self
.
orderDirection
isEqualToString
:
@"none"
])
{
QueryOrder
*
order
=
[
QueryOrder
new
];
order
.
field
=
@"uuid"
;
order
.
direction
=
self
.
orderDirection
;
[
orderArr
addObject
:[
order
dictForCommit
]];
}
}
}
id
stateObject
=
[
NSNull
null
];
id
stateObject
=
[
NSNull
null
];
if
(
self
.
state
.
length
>
0
&&
!
[
self
.
state
isEqualToString
:
@"none"
])
{
if
(
self
.
state
.
length
>
0
&&
!
[
self
.
state
isEqualToString
:
@"none"
])
{
...
@@ -125,10 +119,9 @@ typedef enum : NSUInteger {
...
@@ -125,10 +119,9 @@ typedef enum : NSUInteger {
}
}
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSDictionary
*
dict
=
@{
NSDictionary
*
dict
=
@{
// @"userEquals":userObject,
@"state"
:
stateObject
,
@"state"
:
stateObject
,
@"billNumberLike"
:
billObject
,
@"billNumberLike"
:
billObject
,
@"creator"
:
[
NSNull
null
]
,
@"creator"
:
userObject
,
@"queryOrders"
:
orderArr
,
@"queryOrders"
:
orderArr
,
@"userCode"
:
userUtil
.
userCode
,
@"userCode"
:
userUtil
.
userCode
,
@"pageNumber"
:
@
(
_currentPage
),
@"pageNumber"
:
@
(
_currentPage
),
...
@@ -338,22 +331,21 @@ typedef enum : NSUInteger {
...
@@ -338,22 +331,21 @@ typedef enum : NSUInteger {
#pragma mark - 确定
#pragma mark - 确定
-
(
void
)
sureClick
{
-
(
void
)
sureClick
{
if
(
self
.
state
.
length
>
0
||
self
.
userLike
.
length
>
0
||
self
.
billLike
.
length
>
0
||
self
.
orderDirection
.
length
>
0
)
{
[
_boltView
.
userFiled
resignFirstResponder
];
[
_boltView
.
billFiled
resignFirstResponder
];
_currentPage
=
0
;
//请求
[
self
getData
];
//还原数据
if
(
_sortView
)
{
[
self
hiddenSortMaskView
:
YES
];
}
if
(
_boltView
)
{
[
self
hiddenBoltMaskView
:
YES
];
}
}
[
_boltView
.
userFiled
resignFirstResponder
];
[
_boltView
.
billFiled
resignFirstResponder
];
_currentPage
=
0
;
//请求
[
self
getData
];
//还原数据
if
(
_sortView
)
{
[
self
hiddenSortMaskView
:
YES
];
}
if
(
_boltView
)
{
[
self
hiddenBoltMaskView
:
YES
];
}
}
}
#pragma mark - sortDelegate
#pragma mark - sortDelegate
...
...
XFFruit/ViewControllers/Transport/Views/TransportBoltView.m
View file @
d2673e07
...
@@ -19,8 +19,6 @@
...
@@ -19,8 +19,6 @@
UIView
*
_leftView
;
UIView
*
_leftView
;
UIButton
*
_currentBtn
;
UIButton
*
_currentBtn
;
NSIndexPath
*
_currentIndexPath
;
NSIndexPath
*
_currentIndexPath
;
UIView
*
_userView
;
UIView
*
_billView
;
NSString
*
_state
;
NSString
*
_state
;
NSString
*
_billNumber
;
NSString
*
_billNumber
;
NSString
*
_title
;
NSString
*
_title
;
...
@@ -56,11 +54,11 @@
...
@@ -56,11 +54,11 @@
}
else
if
([
self
.
state
isEqualToString
:
TRANSPORT_STATE_ABORTED
])
{
}
else
if
([
self
.
state
isEqualToString
:
TRANSPORT_STATE_ABORTED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
3
inSection
:
0
];
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
3
inSection
:
0
];
}
}
_userView
.
hidden
=
YES
;
self
.
userFiled
.
hidden
=
YES
;
if
(
self
.
userNumber
.
length
>
0
){
if
(
self
.
userNumber
.
length
>
0
){
self
.
userFiled
.
text
=
self
.
userNumber
;
self
.
userFiled
.
text
=
self
.
userNumber
;
}
}
_billView
.
hidden
=
YES
;
self
.
billFiled
.
hidden
=
YES
;
if
(
self
.
billNumber
.
length
>
0
)
{
if
(
self
.
billNumber
.
length
>
0
)
{
self
.
billFiled
.
text
=
self
.
billNumber
;
self
.
billFiled
.
text
=
self
.
billNumber
;
}
}
...
@@ -71,7 +69,7 @@
...
@@ -71,7 +69,7 @@
{
{
_leftView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
_leftView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
[
self
addSubview
:
_leftView
];
[
self
addSubview
:
_leftView
];
NSArray
*
arr
=
@[
@"按状态"
,
@"
用户
代码"
,
@"调研单号"
];
NSArray
*
arr
=
@[
@"按状态"
,
@"
创建人
代码"
,
@"调研单号"
];
for
(
NSInteger
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
for
(
NSInteger
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
button
.
frame
=
CGRectMake
(
0
,
LeftHeight
*
i
,
LeftMargin
,
LeftHeight
);
button
.
frame
=
CGRectMake
(
0
,
LeftHeight
*
i
,
LeftMargin
,
LeftHeight
);
...
@@ -97,42 +95,34 @@
...
@@ -97,42 +95,34 @@
}
}
-
(
void
)
createRightView
{
-
(
void
)
createRightView
{
_userView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
_userView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
addSubview
:
_userView
];
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
,
20
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
20
)];
titleLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
titleLabel
.
text
=
@"类似于:"
;
[
_userView
addSubview
:
titleLabel
];
self
.
userFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
10
,
CGRectGetMaxY
(
titleLabel
.
frame
)
+
10
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
30
)];
self
.
userFiled
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
userFiled
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
userFiled
.
placeholder
=
@"输入类似登陆用户代码"
;
self
.
userFiled
.
borderStyle
=
UITextBorderStyleRoundedRect
;
self
.
userFiled
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
userFiled
.
returnKeyType
=
UIReturnKeyDone
;
self
.
userFiled
.
delegate
=
self
;
[
_userView
addSubview
:
self
.
userFiled
];
NSArray
*
arr
=
@[
@"输入类似创建人代码"
,
@"输入类似调研单号"
];
UIView
*
contentView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
contentView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
addSubview
:
contentView
];
UILabel
*
contentLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
,
20
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
20
)];
contentLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
contentLabel
.
text
=
@"类似于:"
;
[
contentView
addSubview
:
contentLabel
];
_billView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)];
for
(
NSInteger
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
_billView
.
backgroundColor
=
[
UIColor
whiteColor
];
UITextField
*
contentField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
10
,
CGRectGetMaxY
(
contentLabel
.
frame
)
+
10
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
30
)
];
[
self
addSubview
:
_billView
]
;
contentField
.
textAlignment
=
NSTextAlignmentLeft
;
UILabel
*
billLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
,
20
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
20
)]
;
contentField
.
textColor
=
GXF_CONTENT_COLOR
;
billLabel
.
font
=
GXF_FIFTEENTEN_SIZE
;
contentField
.
borderStyle
=
UITextBorderStyleRoundedRect
;
billLabel
.
text
=
@"类似于:"
;
contentField
.
font
=
GXF_FIFTEENTEN_SIZE
;
[
_billView
addSubview
:
billLabel
];
contentField
.
placeholder
=
arr
[
i
];
self
.
billFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
10
,
CGRectGetMaxY
(
billLabel
.
frame
)
+
10
,
(
ScreenSize
.
width
-
LeftMargin
-
10
*
2
),
30
)]
;
contentField
.
returnKeyType
=
UIReturnKeyDone
;
self
.
billFiled
.
textAlignment
=
NSTextAlignmentLeft
;
contentField
.
delegate
=
self
;
self
.
billFiled
.
textColor
=
GXF_CONTENT_COLOR
;
[
contentView
addSubview
:
contentField
]
;
self
.
billFiled
.
placeholder
=
@"输入类似调研单号"
;
if
(
i
==
0
)
{
self
.
billFiled
.
borderStyle
=
UITextBorderStyleRoundedRect
;
self
.
userFiled
=
contentField
;
self
.
billFiled
.
font
=
GXF_FIFTEENTEN_SIZE
;
}
else
if
(
i
==
1
){
self
.
billFiled
.
returnKeyType
=
UIReturnKeyDone
;
self
.
billFiled
=
contentField
;
self
.
billFiled
.
delegate
=
self
;
}
[
_billView
addSubview
:
self
.
billFiled
];
}
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)
style
:(
UITableViewStylePlain
)];
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
ScreenSize
.
width
-
LeftMargin
,
self
.
frame
.
size
.
height
-
BottomHeight
)
style
:(
UITableViewStylePlain
)];
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
delegate
=
self
;
...
@@ -151,22 +141,22 @@
...
@@ -151,22 +141,22 @@
case
1001
:
//状态
case
1001
:
//状态
{
{
self
.
tableView
.
hidden
=
NO
;
self
.
tableView
.
hidden
=
NO
;
_userView
.
hidden
=
YES
;
self
.
userFiled
.
hidden
=
YES
;
_billView
.
hidden
=
YES
;
self
.
billFiled
.
hidden
=
YES
;
}
}
break
;
break
;
case
1002
:
//条件二
case
1002
:
//条件二
{
{
self
.
tableView
.
hidden
=
YES
;
self
.
tableView
.
hidden
=
YES
;
_userView
.
hidden
=
NO
;
self
.
userFiled
.
hidden
=
NO
;
_billView
.
hidden
=
YES
;
self
.
billFiled
.
hidden
=
YES
;
}
}
break
;
break
;
case
1003
:
//条件三
case
1003
:
//条件三
{
{
self
.
tableView
.
hidden
=
YES
;
self
.
tableView
.
hidden
=
YES
;
_userView
.
hidden
=
YES
;
self
.
userFiled
.
hidden
=
YES
;
_billView
.
hidden
=
NO
;
self
.
billFiled
.
hidden
=
NO
;
}
}
break
;
break
;
default
:
default
:
...
...
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.h
View file @
d2673e07
...
@@ -21,5 +21,6 @@
...
@@ -21,5 +21,6 @@
@property
(
nonatomic
,
strong
)
NSMutableArray
*
indexArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
indexArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectArr
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectArr
;
-
(
void
)
setPurchaseBill
:(
PurchaseBill
*
)
bill
selectArr
:(
NSMutableArray
*
)
selectArr
;
@end
@end
XFFruit/ViewControllers/Transport/Views/TransportPurchaseCell.m
View file @
d2673e07
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
#import "TransportPurchaseCell.h"
#import "TransportPurchaseCell.h"
#import "TransportPurductCell.h"
#import "TransportPurductCell.h"
#import "HeaderCell.h"
#import "HeaderCell.h"
#define TableHeight 44
#define ShowHeight 110
@implementation
TransportPurchaseCell
@implementation
TransportPurchaseCell
...
@@ -50,10 +54,10 @@
...
@@ -50,10 +54,10 @@
}
}
-
(
void
)
set
Bill
:
(
PurchaseBill
*
)
bill
{
-
(
void
)
set
PurchaseBill
:
(
PurchaseBill
*
)
bill
selectArr
:
(
NSMutableArray
*
)
selectArr
{
self
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"
[采购单:%@]
"
,
bill
.
billNumber
];
self
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"
采购单:%@
"
,
bill
.
billNumber
];
self
.
secondArr
=
[
NSMutableArray
array
];
self
.
secondArr
=
[
NSMutableArray
array
];
self
.
selectArr
=
[
NSMutableArray
array
]
;
self
.
selectArr
=
selectArr
;
[
self
.
secondArr
addObjectsFromArray
:
bill
.
products
];
[
self
.
secondArr
addObjectsFromArray
:
bill
.
products
];
// for (NSDictionary *billDict in bill.products) {
// for (NSDictionary *billDict in bill.products) {
// PurchaseBillProduct *billProcuct = [PurchaseBillProduct new];
// PurchaseBillProduct *billProcuct = [PurchaseBillProduct new];
...
@@ -74,9 +78,7 @@
...
@@ -74,9 +78,7 @@
self
.
secondTable
.
tableHeaderView
=
headCell
;
self
.
secondTable
.
tableHeaderView
=
headCell
;
//重要
//重要
[
self
.
secondTable
reloadData
];
[
self
.
secondTable
reloadData
];
}
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
{
return
1
;
return
1
;
...
@@ -97,24 +99,68 @@
...
@@ -97,24 +99,68 @@
}
}
TransportPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
TransportPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
[
cell
setPdtDetail
:
billProduct
row
:
indexPath
.
row
];
[
cell
setPdtDetail
:
billProduct
row
:
indexPath
.
row
];
if
([
self
isHaveIndexPath
:
indexPath
])
{
cell
.
editBtn
.
hidden
=
NO
;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
// CGRect Linefrmame = cell.lineLabel.frame;
// Linefrmame.origin.y = ShowHeight + TableHeight -1;
// cell.lineLabel.frame = Linefrmame;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = ShowHeight;
// cell.showView.frame = showfrmame;
// cell.backgroundColor = XXFBgColor;
}
else
{
cell
.
editBtn
.
hidden
=
YES
;
// 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];
}
//
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
return
cell
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
([
self
isHaveIndexPath
:
indexPath
])
{
return
ShowHeight
+
TableHeight
;
}
return
TableHeight
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
TransportPurductCell
*
cell
=
(
TransportPurductCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
// TransportPurductCell *cell = (TransportPurductCell *)[tableView cellForRowAtIndexPath:indexPath];
TransportPdtDetail
*
billProduct
=
self
.
secondArr
[
indexPath
.
row
];
// TransportPdtDetail * billProduct = self.secondArr[indexPath.row];
if
(
!
[
self
isHaveIndexPath
:
indexPath
])
{
// CGRect Linefrmame = cell.lineLabel.frame;
cell
.
editBtn
.
hidden
=
NO
;
// CGRect showfrmame = cell.showView.frame;
[
self
.
selectArr
addObject
:
indexPath
];
// if (![self isHaveIndexPath:indexPath]) {
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_getSelectPurchaseProduct
object
:
nil
userInfo
:
@{
@"selectArr"
:
billProduct
,
@"state"
:
@"add"
}];
// cell.editBtn.hidden = NO;
}
else
{
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
[
self
.
selectArr
removeObject
:
indexPath
];
// Linefrmame.origin.y = ShowHeight + TableHeight - 1;
cell
.
editBtn
.
hidden
=
YES
;
// showfrmame.size.height = ShowHeight;
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
KNOTIFICATION_getSelectPurchaseProduct
object
:
nil
userInfo
:
@{
@"selectArr"
:
billProduct
,
@"state"
:
@"remove"
}];
// cell.backgroundColor = [UIColor whiteColor];
}
// [self.selectArr addObject:billProduct];
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"add"}];
;
// }else{
// [self.selectArr removeObject:billProduct];
// cell.editBtn.hidden = YES;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowright"];
// Linefrmame.origin.y = TableHeight -1;
// showfrmame.size.height = 0;
// cell.backgroundColor = [UIColor whiteColor];
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"remove"}];
// }
//
// cell.lineLabel.frame = Linefrmame;
// cell.showView.frame = showfrmame;
// [self.secondTable reloadData];
}
}
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
BOOL
)
isHaveIndexPath
:
(
NSIndexPath
*
)
indexPath
{
for
(
NSIndexPath
*
path
in
self
.
selectArr
)
{
for
(
NSIndexPath
*
path
in
self
.
selectArr
)
{
...
...
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