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
f605bbb8
Commit
f605bbb8
authored
9 years ago
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节修改
parent
3759e611
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
106 additions
and
37 deletions
+106
-37
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+6
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+43
-1
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+0
-2
FollowUpRecordViewController.m
...PurchaseNotice/Controllers/FollowUpRecordViewController.m
+3
-2
SeePurchaseNoticeViewController.m
...chaseNotice/Controllers/SeePurchaseNoticeViewController.m
+8
-6
NotuceRecordCell.h
...t/ViewControllers/PurchaseNotice/Views/NotuceRecordCell.h
+1
-1
NotuceRecordCell.m
...t/ViewControllers/PurchaseNotice/Views/NotuceRecordCell.m
+24
-8
ResultDetailViewController.m
...ntrollers/Survey/controllers/ResultDetailViewController.m
+20
-16
SurveyResult.h
XFFruit/ViewControllers/Survey/models/SurveyResult.h
+1
-1
No files found.
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
f605bbb8
...
...
@@ -209,6 +209,12 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
-
(
void
)
getResultsWithUuid
:(
NSString
*
)
uuid
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//7.下载附件
-
(
void
)
downLoadAttachmentWithUuid
:(
NSString
*
)
uuid
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//1.下载商品信息
-
(
void
)
getProductWithPage_number
:(
NSUInteger
)
page_number
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
f605bbb8
...
...
@@ -76,6 +76,9 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
//行情反馈图片
XFFHttp_ResultChart
,
XFFHttp_GetResults
,
//附件下载
XFFHttp_Attachment
,
//供应商
XFFHttp_GetVendor
,
//仓库
...
...
@@ -168,6 +171,8 @@ static NSString * const ICRHTTPInterface[] = {
//行情反馈生成图片
[
XFFHttp_ResultChart
]
=
@"survey/resultchart"
,
[
XFFHttp_GetResults
]
=
@"survey/get_results"
,
[
XFFHttp_Attachment
]
=
@"attachment/download"
,
//供应商
[
XFFHttp_GetVendor
]
=
@"data/vendor/download"
,
//仓库
...
...
@@ -1670,7 +1675,7 @@ acceptTypeJson:YES
fail
(
error
);
}
};
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_GetResults
]
stringByAppendingFormat
:
@"/%@"
,
@"5a7417014f27d2e1014f2b3be580003f"
];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_GetResults
]
stringByAppendingFormat
:
@"/%@"
,
uuid
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
GET
:
encodeUrlStr
parameters
:
nil
...
...
@@ -1680,6 +1685,43 @@ acceptTypeJson:YES
failure
:
failure
];
}
//附件下载
-
(
void
)
downLoadAttachmentWithUuid
:
(
NSString
*
)
uuid
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
uuid
)
{
if
(
fail
)
{
fail
(
[[
self
class
]
ErrorWithMsg
:
ERROR_PARAMETER
code
:
0
]
);
}
return
;
}
void
(
^
success
)(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
=
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
CLog
(
@"%@"
,
responseObject
);
if
(
succ
)
{
succ
(
responseObject
);
}
};
void
(
^
failure
)(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
=
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
CLog
(
@"%@"
,
error
);
if
(
fail
)
{
fail
(
error
);
}
};
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_Attachment
]
stringByAppendingFormat
:
@"/%@"
,
uuid
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
POST
:
encodeUrlStr
parameters
:
nil
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
//供应商
-
(
void
)
getVendorWithPage_number
:
(
NSUInteger
)
page_number
page_size
:
(
NSUInteger
)
page_size
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
f605bbb8
...
...
@@ -444,8 +444,6 @@ typedef enum : NSUInteger {
}
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/FollowUpRecordViewController.m
View file @
f605bbb8
...
...
@@ -59,7 +59,7 @@
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
//5a7417014fdfc13a014fe5b890d8000e
[[
ICRHTTPController
sharedController
]
getPurchaseNoticeRecodWithData
:
self
.
purchaseNotice
.
purchaserU
uid
success
:
succ
failure
:
fail
];
[[
ICRHTTPController
sharedController
]
getPurchaseNoticeRecodWithData
:
self
.
purchaseNotice
.
u
uid
success
:
succ
failure
:
fail
];
}
#pragma mark - 协议方法
...
...
@@ -81,7 +81,8 @@
}
if
(
self
.
dataArr
.
count
>
0
)
{
NoticeRecord
*
recode
=
self
.
dataArr
[
indexPath
.
row
];
notuceRecordCell
.
noticeRecode
=
recode
;
// notuceRecordCell.noticeRecode = recode;
[
notuceRecordCell
setNoticeRecode
:
recode
withNumber
:
self
.
purchaseNotice
.
billnumber
];
}
return
notuceRecordCell
;
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m
View file @
f605bbb8
...
...
@@ -162,12 +162,14 @@ typedef enum : NSUInteger {
_endBtn
.
frame
=
CGRectMake
(
LeftMargin
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
ScreenSize
.
width
-
LeftMargin
*
2
,
40
);
_endBtn
.
tag
=
AcceptTag
;
[
_endBtn
setTitle
:
@"接受任务"
forState
:
UIControlStateNormal
];
}
else
if
([
self
checkIsPermission
:
NOTICE_PERMISSIONS_CREATEBILL
])
{
_rejectBtn
.
hidden
=
YES
;
_endBtn
.
frame
=
CGRectMake
(
LeftMargin
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
ScreenSize
.
width
-
LeftMargin
*
2
,
40
);
_endBtn
.
tag
=
NewTag
;
[
_endBtn
setTitle
:
@"新建采购单"
forState
:
UIControlStateNormal
];
}
else
{
}
// else if ([self checkIsPermission:NOTICE_PERMISSIONS_CREATEBILL]) {
// _rejectBtn.hidden = YES;
// _endBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
// _endBtn.tag = NewTag;
// [_endBtn setTitle:@"新建采购单" forState:UIControlStateNormal];
// }
else
{
[
self
hiddenBottomBtn
];
}
}
else
if
([
self
.
purchaseNotice
.
state
isEqualToString
:
PURCHASENOTICE_STATE_PURCHASEING
]){
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/NotuceRecordCell.h
View file @
f605bbb8
...
...
@@ -18,6 +18,6 @@
@property
(
nonatomic
,
strong
)
UILabel
*
remarkLable
;
//日志描述信息
@property
(
nonatomic
,
strong
)
NoticeRecord
*
noticeRecode
;
-
(
void
)
setNoticeRecode
:(
NoticeRecord
*
)
noticeRecode
withNumber
:(
NSString
*
)
number
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/NotuceRecordCell.m
View file @
f605bbb8
...
...
@@ -34,24 +34,25 @@
self
.
createdLable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
LeftMargin
,
0
,
bgView
.
width
-
100
,
30
)];
//业务时间
self
.
createdLable
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
createdLable
.
textColor
=
GXF_CELL_COLOR
;
self
.
createdLable
.
text
=
@"2015-04-05 09:05:05"
;
self
.
creatorLable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
self
.
createdLable
.
right
,
0
,
bgView
.
width
-
self
.
createdLable
.
width
-
LeftMargin
*
2
,
30
)];
//业务人
self
.
creatorLable
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
creatorLable
.
textAlignment
=
NSTextAlignmentRight
;
self
.
creatorLable
.
text
=
@"张三"
;
self
.
creatorLable
.
text
Color
=
GXF_CELL_COLOR
;
self
.
traceIdLable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
self
.
createdLable
.
x
,
self
.
createdLable
.
bottom
,
bgView
.
width
-
LeftMargin
*
2
,
20
)];
//采购通知单uuid
self
.
traceIdLable
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
traceIdLable
.
text
=
@"采购通知单号:1358959008854"
;
self
.
traceIdLable
.
text
Color
=
GXF_CELL_COLOR
;
self
.
typeLable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
self
.
createdLable
.
x
,
self
.
traceIdLable
.
bottom
,
bgView
.
width
-
LeftMargin
*
2
,
20
)];
//业务类型
self
.
typeLable
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
typeLable
.
text
=
@"类型:接受任务"
;
self
.
typeLable
.
text
Color
=
GXF_CELL_COLOR
;
self
.
remarkLable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
self
.
createdLable
.
x
,
self
.
typeLable
.
bottom
,
bgView
.
width
-
LeftMargin
*
2
,
20
)];
//日志描述信息
self
.
remarkLable
.
font
=
GXF_FIFTEENTEN_SIZE
;
self
.
remarkLable
.
text
=
@"描述:fdsafdsaggjgoirjohgjfdl"
;
self
.
remarkLable
.
text
Color
=
GXF_CELL_COLOR
;
[
bgView
addSubview
:
self
.
createdLable
];
[
bgView
addSubview
:
self
.
creatorLable
];
...
...
@@ -61,14 +62,29 @@
[
bgView
addSubview
:
self
.
uuidLable
];
}
-
(
void
)
setNoticeRecode
:
(
NoticeRecord
*
)
noticeRecode
{
-
(
void
)
setNoticeRecode
:
(
NoticeRecord
*
)
noticeRecode
withNumber
:
(
NSString
*
)
number
{
self
.
creatorLable
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
noticeRecode
.
creator
];
self
.
createdLable
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
noticeRecode
.
created
];
self
.
traceIdLable
.
text
=
[
NSString
stringWithFormat
:
@"采购通知单号:%@"
,
noticeRecode
.
traceId
];
self
.
typeLable
.
text
=
[
NSString
stringWithFormat
:
@"类型:%@"
,
noticeRecode
.
type
];
self
.
remarkLable
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
noticeRecode
.
remark
];
self
.
traceIdLable
.
text
=
[
NSString
stringWithFormat
:
@"单号:%@"
,
number
];
NSMutableAttributedString
*
attributeStr1
=
[
IBTCommon
setTextViewFontOfString
:
@"类型:"
paragraphStyle
:
0
fontSize
:
15
color
:
GXF_CELL_COLOR
];
NSString
*
str
=
@""
;
if
([
noticeRecode
.
type
isEqualToString
:
@"noticeAccepted"
])
{
str
=
@"接受任务"
;
}
else
if
([
noticeRecode
.
type
isEqualToString
:
@"billCreated"
]){
str
=
@"新建采购单"
;
}
[
attributeStr1
appendAttributedString
:[
IBTCommon
setTextViewFontOfString
:
str
paragraphStyle
:
0
fontSize
:
15
color
:
[
UIColor
redColor
]]];
self
.
typeLable
.
attributedText
=
attributeStr1
;
self
.
remarkLable
.
text
=
[
NSString
stringWithFormat
:
@"备注:%@"
,
noticeRecode
.
remark
];
self
.
remarkLable
.
numberOfLines
=
0
;
CGFloat
height
=
[
self
.
remarkLable
calculateHeight
];
if
(
height
>
20
)
{
self
.
remarkLable
.
height
=
height
;
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/controllers/ResultDetailViewController.m
View file @
f605bbb8
...
...
@@ -46,18 +46,6 @@
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[[
ICRHTTPController
sharedController
]
getResultsWithUuid
:
self
.
surveyUuid
success
:
succ
failure
:
fail
];
for
(
NSInteger
i
=
0
;
i
<
4
;
i
++
)
{
SurveyResult
*
survey
=
[[
SurveyResult
alloc
]
init
];
survey
.
unit
=
@"南汇8424西瓜调研情况"
;
survey
.
place
=
@"150605000001"
;
survey
.
price
=
@"南汇842[100213]"
;
survey
.
capacity
=
@"22222222222"
;
survey
.
quality
=
@"费卡接口"
;
survey
.
userName
=
@"张三"
;
survey
.
feedbackTime
=
@"2015-04-05 12:04:06"
;
[
_dataArr
addObject
:
survey
];
}
}
-
(
void
)
fetchtSurveyResultList
:
(
id
)
data
{
...
...
@@ -73,10 +61,9 @@
NSDictionary
*
resultDict
=
surveyDict
[
@"result"
];
SurveyResult
*
surveyResult
=
[[
SurveyResult
alloc
]
init
];
[
surveyResult
setValuesForKeysWithDictionary
:
resultDict
];
// for (NSS in <#collection#>) {
// <#statements#>
// }
surveyResult
.
attachmnets
=
surveyDict
[
@"attachments"
];
[
_dataArr
addObject
:
surveyResult
];
// [self getDownLoadAttachement:surveyResult];
}
[
_tableView
reloadData
];
}
else
{
...
...
@@ -86,7 +73,24 @@
[
IBTLoadingView
showTips
:
@" 无记录 "
];
}
}
//- (void)getDownLoadAttachement:(SurveyResult *)surveyResult{
// NSArray *att = surveyResult.attachmnets;
// NSString *str = @"";
// if (att.count > 0) {
// str = att[0];
// }
// __weak typeof(self)weakSelf = self;
// void(^succ)(id) = ^(id data) {
// __strong __typeof(weakSelf)strongSelf = weakSelf;
// if (data) {
// NSLog(@"%@",data);
// }
// };
// void(^fail)(id) = ^(id data) {
// [IBTLoadingView showTips:data];
// };
// [[ICRHTTPController sharedController] downLoadAttachmentWithUuid:str success:succ failure:fail];
//}
-
(
void
)
createTableView
{
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
-
64
))
style
:(
UITableViewStylePlain
)];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Survey/models/SurveyResult.h
View file @
f605bbb8
...
...
@@ -20,5 +20,5 @@
@property
(
nonatomic
,
strong
)
NSString
*
quality
;
//质量情况
@property
(
nonatomic
,
strong
)
NSString
*
feedbackTime
;
//反馈时间
@property
(
nonatomic
,
strong
)
NSArray
*
attachmnets
;
//附件列表
@property
(
nonatomic
,
strong
)
NSData
*
imageData
;
@end
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment