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
ffbc2672
Commit
ffbc2672
authored
Sep 01, 2015
by
n22
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
状态
parent
616b25d5
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
46 deletions
+82
-46
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+19
-0
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+7
-7
PurchaseBoltView.m
XFFruit/ViewControllers/Purchase/Views/PurchaseBoltView.m
+12
-12
PurchaseCell.m
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
+6
-6
BoltMaskView.m
XFFruit/ViewControllers/Survey/Views/BoltMaskView.m
+3
-3
SurveyListCell.m
XFFruit/ViewControllers/Survey/Views/SurveyListCell.m
+4
-4
ChooseProductViewController.m
...trollers/Survey/controllers/ChooseProductViewController.m
+25
-8
SurveyDetailViewController.m
...ntrollers/Survey/controllers/SurveyDetailViewController.m
+4
-4
SurveyViewController.m
...ViewControllers/Survey/controllers/SurveyViewController.m
+2
-2
No files found.
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
ffbc2672
...
...
@@ -111,4 +111,23 @@
//行情调研状态
//initial(未提交),submitted(已提交),insurvey(调研中),finished(已完成)
#define SURVEY_STATE_INITIAL @"initial"
#define SURVEY_STATE_SUBMITTED @"submitted"
#define SURVEY_STATE_INSURVEY @"insurvey"
#define SURVEY_STATE_FINISHED @"finished"
//采购单状态
#define PURCHASE_STATE_INITIAL @"initial"
#define PURCHASE_STATE_SUBMITTED @"submitted"
#define PURCHASE_STATE_REJECTED @"rejected"
#define PURCHASE_STATE_APPROVED @"approved"
#define PURCHASE_STATE_SHIPPING @"shipping"
#define PURCHASE_STATE_FINISHED @"finished"
#endif
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
ffbc2672
...
...
@@ -193,22 +193,22 @@ typedef enum : NSUInteger {
-
(
void
)
fetchtPurchaseDetail
{
self
.
billNumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
bill
.
billNumber
];
if
([
self
.
bill
.
state
isEqualToString
:
@"initial"
])
{
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_INITIAL
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
redColor
];
self
.
stateLabel
.
text
=
@"未提交"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
@"submitted"
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_SUBMITTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
text
=
@"已提交"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
@"rejected"
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已拒绝"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
@"approved"
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_APPROVED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已审批"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
@"shipping"
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_SHIPPING
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"发运中"
;
}
else
if
([
self
.
bill
.
state
isEqualToString
:
@"finished"
])
{
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
stateLabel
.
text
=
@"已完成"
;
}
...
...
@@ -216,7 +216,7 @@ typedef enum : NSUInteger {
self
.
createOperNameLabel
.
text
=
[
IBTCommon
checkString
:
self
.
bill
.
create_operName
];
self
.
checkNameLabel
.
text
=
[
IBTCommon
checkString
:
self
.
bill
.
vendor_name
];
self
.
vendorNameLabel
.
text
=
[
IBTCommon
checkString
:
self
.
bill
.
vendor_name
];
self
.
totalPriceLabel
.
text
=
[
IBTCommon
checkString
:
self
.
bill
.
total
];
self
.
totalPriceLabel
.
text
=
[
IBTCommon
checkString
:
[
self
.
bill
.
total
stringValue
]
];
self
.
noteLabel
.
text
=
[
IBTCommon
checkString
:
self
.
bill
.
remark
];
self
.
lastModifyNameLabel
.
text
=
@"最后修改人"
;
self
.
typeLabel
.
text
=
@"类型"
;
...
...
XFFruit/ViewControllers/Purchase/Views/PurchaseBoltView.m
View file @
ffbc2672
...
...
@@ -47,17 +47,17 @@
}
-
(
void
)
preferData
{
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
if
([
self
.
state
isEqualToString
:
@"initial"
])
{
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_INITIAL
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"submitted"
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_SUBMITTED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
1
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"rejected"
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
2
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"approved"
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_APPROVED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
3
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"shipping"
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_SHIPPING
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
4
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"finished"
])
{
}
else
if
([
self
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
5
inSection
:
0
];
}
_billView
.
hidden
=
YES
;
...
...
@@ -236,17 +236,17 @@
NSString
*
stateStr
=
@""
;
if
(
indexPath
.
row
==
0
)
{
stateStr
=
@"initial"
;
stateStr
=
PURCHASE_STATE_INITIAL
;
}
else
if
(
indexPath
.
row
==
1
){
stateStr
=
@"submitted"
;
stateStr
=
PURCHASE_STATE_SUBMITTED
;
}
else
if
(
indexPath
.
row
==
2
){
stateStr
=
@"rejected"
;
stateStr
=
PURCHASE_STATE_REJECTED
;
}
else
if
(
indexPath
.
row
==
3
){
stateStr
=
@"approved"
;
stateStr
=
PURCHASE_STATE_APPROVED
;
}
else
if
(
indexPath
.
row
==
4
){
stateStr
=
@"shipping"
;
stateStr
=
PURCHASE_STATE_SHIPPING
;
}
else
if
(
indexPath
.
row
==
5
){
stateStr
=
@"finished"
;
stateStr
=
PURCHASE_STATE_FINISHED
;
}
[
self
.
delegate
getBoltValueSelectRow
:
stateStr
];
}
...
...
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
View file @
ffbc2672
...
...
@@ -69,25 +69,25 @@
self
.
createOperNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"创建人:%@"
,
purchaseBill
.
create_operName
]
;
self
.
createTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"创建时间:%@"
,
purchaseBill
.
create_time
];
NSString
*
stateStr
=
@""
;
if
([
purchaseBill
.
state
isEqualToString
:
@"initial"
])
{
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_INITIAL
])
{
stateStr
=
@"未提交"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"initial"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseBill
.
state
isEqualToString
:
@"submitted"
])
{
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_SUBMITTED
])
{
stateStr
=
@"已提交"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseBill
.
state
isEqualToString
:
@"rejected"
])
{
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_REJECTED
])
{
stateStr
=
@"已拒绝"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseBill
.
state
isEqualToString
:
@"approved"
])
{
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_APPROVED
])
{
stateStr
=
@"已审批"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseBill
.
state
isEqualToString
:
@"shipping"
])
{
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_SHIPPING
])
{
stateStr
=
@"发运中"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseBill
.
state
isEqualToString
:
@"finished"
])
{
}
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
stateStr
=
@"已完成"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"finish"
]
forState
:
UIControlStateDisabled
];
}
...
...
XFFruit/ViewControllers/Survey/Views/BoltMaskView.m
View file @
ffbc2672
...
...
@@ -50,11 +50,11 @@
//initial(未提交),submitted(已提交),insurvey(调研中)
if
([
self
.
state
isEqualToString
:
@"none"
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"initial"
])
{
}
else
if
([
self
.
state
isEqualToString
:
SURVEY_STATE_INITIAL
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
1
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"submitted"
])
{
}
else
if
([
self
.
state
isEqualToString
:
SURVEY_STATE_SUBMITTED
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
2
inSection
:
0
];
}
else
if
([
self
.
state
isEqualToString
:
@"insurvey"
])
{
}
else
if
([
self
.
state
isEqualToString
:
SURVEY_STATE_INSURVEY
])
{
_currentIndexPath
=
[
NSIndexPath
indexPathForRow
:
3
inSection
:
0
];
}
_titleView
.
hidden
=
YES
;
...
...
XFFruit/ViewControllers/Survey/Views/SurveyListCell.m
View file @
ffbc2672
...
...
@@ -72,17 +72,17 @@
self
.
begindateLabel
.
text
=
[
NSString
stringWithFormat
:
@"开始时间:%@"
,[
survey
.
beginDate
substringToIndex
:
10
]];
self
.
enddateLabel
.
text
=
[
NSString
stringWithFormat
:
@"结束时间:%@"
,[
survey
.
endDate
substringToIndex
:
10
]];
NSString
*
stateStr
=
@""
;
if
([
survey
.
state
isEqualToString
:
@"initial"
])
{
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_INITIAL
])
{
stateStr
=
@"未提交"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"initial"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
survey
.
state
isEqualToString
:
@"submitted"
])
{
}
else
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_SUBMITTED
])
{
stateStr
=
@"已提交"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
survey
.
state
isEqualToString
:
@"insurvey"
])
{
}
else
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_INSURVEY
])
{
stateStr
=
@"调研中"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
survey
.
state
isEqualToString
:
@"finished"
])
{
}
else
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_FINISHED
])
{
stateStr
=
@"已完成"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"finish"
]
forState
:
UIControlStateDisabled
];
}
...
...
XFFruit/ViewControllers/Survey/controllers/ChooseProductViewController.m
View file @
ffbc2672
...
...
@@ -47,7 +47,9 @@
}
_isRefresh
=
YES
;
[
self
getData
];
CLog
(
@"%@"
,[
self
.
tableView
.
header
.
lastUpdatedTime
httpParameterString
]);
}];
}
-
(
void
)
getData
{
...
...
@@ -80,10 +82,16 @@
__weak
typeof
(
self
)
weakSelf
=
self
;
ICRDatabaseFetchResultsBlock
fetchResultsBlk
=
^
(
NSArray
*
fetchedObjects
)
{
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
NSLog
(
@"=====%@"
,
fetchedObjects
);
if
(
!
fetchedObjects
)
{
[[
NSUserDefaults
standardUserDefaults
]
setObject
:[
NSDate
date
]
forKey
:
self
.
tableView
.
header
.
lastUpdatedTimeKey
];
[[
NSUserDefaults
standardUserDefaults
]
synchronize
];
[
self
getData
];
}
else
{
[
strongSelf
.
dataArr
removeAllObjects
];
[
strongSelf
.
dataArr
addObject
:
self
.
tableView
.
header
.
lastUpdatedTime
];
[
strongSelf
.
dataArr
addObjectsFromArray
:
fetchedObjects
];
[
strongSelf
.
tableView
reloadData
];
[
self
deletePerson
];
}
};
ICRDataBaseController
*
dbCtrl
=
[
ICRDataBaseController
sharedController
];
...
...
@@ -181,16 +189,25 @@
}
}
if
(
self
.
dataArr
.
count
>
0
)
{
if
(
indexPath
.
row
==
0
)
{
NSString
*
dateStr
=
[
self
.
dataArr
[
indexPath
.
row
]
httpParameterString
];
cell
.
titleLabel
.
textColor
=
GXF_CONTENT_COLOR
;
[
cell
setTitleStr
:[
NSString
stringWithFormat
:
@"上次更新时间:%@"
,
dateStr
]];
}
else
{
Product
*
product
=
self
.
dataArr
[
indexPath
.
row
];
cell
.
titleLabel
.
textColor
=
GXF_LEFTSIX_COLOR
;
NSString
*
proStr
=
[
NSString
stringWithFormat
:
@"%@[%@]"
,
product
.
name
,
product
.
code
];
[
cell
setTitleStr
:
proStr
];
}
}
return
cell
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
row
==
0
)
{
return
;
}
if
(
self
.
isMoreChose
==
YES
)
{
MaskCell
*
cell
=
(
MaskCell
*
)[
tableView
cellForRowAtIndexPath
:
indexPath
];
cell
.
Commitbtn
.
hidden
=
NO
;
...
...
XFFruit/ViewControllers/Survey/controllers/SurveyDetailViewController.m
View file @
ffbc2672
...
...
@@ -103,16 +103,16 @@ typedef enum : NSUInteger {
-
(
void
)
fetchtSurveyDetail
{
self
.
billNumberLabel
.
text
=
[
IBTCommon
checkString
:
self
.
survey
.
billNumber
];
if
([
self
.
survey
.
state
isEqualToString
:
@"initial"
])
{
if
([
self
.
survey
.
state
isEqualToString
:
SURVEY_STATE_INITIAL
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
redColor
];
self
.
stateLabel
.
text
=
@"未提交"
;
}
else
if
([
self
.
survey
.
state
isEqualToString
:
@"submitted"
])
{
}
else
if
([
self
.
survey
.
state
isEqualToString
:
SURVEY_STATE_SUBMITTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
text
=
@"已提交"
;
}
else
if
([
self
.
survey
.
state
isEqualToString
:
@"insurvey"
])
{
}
else
if
([
self
.
survey
.
state
isEqualToString
:
SURVEY_STATE_INSURVEY
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"调研中"
;
}
else
if
([
self
.
survey
.
state
isEqualToString
:
@"finished"
])
{
}
else
if
([
self
.
survey
.
state
isEqualToString
:
SURVEY_STATE_FINISHED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
stateLabel
.
text
=
@"已完成"
;
}
...
...
XFFruit/ViewControllers/Survey/controllers/SurveyViewController.m
View file @
ffbc2672
...
...
@@ -419,13 +419,13 @@ typedef enum : NSUInteger {
if
(
self
.
dataArr
.
count
>
0
)
{
survey
=
self
.
dataArr
[
indexPath
.
row
];
}
if
([
survey
.
state
isEqualToString
:
@"initial"
])
{
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_INITIAL
])
{
NewSurveyViewController
*
nvc
=
[[
NewSurveyViewController
alloc
]
init
];
nvc
.
survey
=
survey
;
nvc
.
navTitle
=
@"修改行情调研单"
;
[
self
PushViewController
:
nvc
animated
:
YES
];
}
else
if
([
survey
.
state
isEqualToString
:
@"submitted"
]
||
[
survey
.
state
isEqualToString
:
@"insurvey"
]
||
[
survey
.
state
isEqualToString
:
@"finished"
]){
}
else
if
([
survey
.
state
isEqualToString
:
SURVEY_STATE_SUBMITTED
]
||
[
survey
.
state
isEqualToString
:
SURVEY_STATE_INSURVEY
]
||
[
survey
.
state
isEqualToString
:
SURVEY_STATE_FINISHED
]){
SurveyDetailViewController
*
svc
=
[
SurveyDetailViewController
new
];
svc
.
survey
=
survey
;
svc
.
surveyUuid
=
survey
.
uuid
;
...
...
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