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
a7578035
Commit
a7578035
authored
9 years ago
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购通知单
parent
9e53ce25
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
910 additions
and
526 deletions
+910
-526
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+24
-0
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+41
-9
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+11
-0
NewPurchaseViewController.m
...trollers/Purchase/Controllers/NewPurchaseViewController.m
+2
-0
PurchaseCell.m
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
+0
-5
NewPurchaseNoticeViewController.h
...chaseNotice/Controllers/NewPurchaseNoticeViewController.h
+2
-2
NewPurchaseNoticeViewController.m
...chaseNotice/Controllers/NewPurchaseNoticeViewController.m
+146
-148
PurchaseNoticeViewController.m
...PurchaseNotice/Controllers/PurchaseNoticeViewController.m
+42
-70
SeePurchaseNoticeViewController.h
...chaseNotice/Controllers/SeePurchaseNoticeViewController.h
+3
-3
SeePurchaseNoticeViewController.m
...chaseNotice/Controllers/SeePurchaseNoticeViewController.m
+124
-148
NoticeProduct.h
...uit/ViewControllers/PurchaseNotice/Models/NoticeProduct.h
+23
-0
NoticeProduct.m
...uit/ViewControllers/PurchaseNotice/Models/NoticeProduct.m
+13
-0
PurchaseNotice.h
...it/ViewControllers/PurchaseNotice/Models/PurchaseNotice.h
+29
-0
PurchaseNotice.m
...it/ViewControllers/PurchaseNotice/Models/PurchaseNotice.m
+13
-0
NoticeProductViewController.h
...ollers/PurchaseNotice/Views/NoticeProductViewController.h
+22
-0
NoticeProductViewController.m
...ollers/PurchaseNotice/Views/NoticeProductViewController.m
+295
-0
PurchaseNoticeListCell.h
...Controllers/PurchaseNotice/Views/PurchaseNoticeListCell.h
+21
-0
PurchaseNoticeListCell.m
...Controllers/PurchaseNotice/Views/PurchaseNoticeListCell.m
+96
-0
ShopDetaileViewController.m
...trollers/PurchaseNotice/Views/ShopDetaileViewController.m
+3
-110
NewCostViewController.m
...Controllers/Transport/Controllers/NewCostViewController.m
+0
-31
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
a7578035
...
...
@@ -145,6 +145,10 @@
72C803521B7B897B00990363
/* DataManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72C803511B7B897B00990363
/* DataManager.m */
;
};
72EDD86E1B96E11700964115
/* ChooseParentViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72EDD86D1B96E11700964115
/* ChooseParentViewController.m */
;
};
72F56CB21B76EC200077F0C9
/* SurveyUser.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F56CB11B76EC200077F0C9
/* SurveyUser.m */
;
};
72F9D47F1BA7E97200795A00
/* NoticeProduct.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F9D47E1BA7E97200795A00
/* NoticeProduct.m */
;
};
72F9D4821BA7EC9600795A00
/* NoticeProductViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F9D4811BA7EC9600795A00
/* NoticeProductViewController.m */
;
};
72F9D4851BA7FFC400795A00
/* PurchaseNotice.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F9D4841BA7FFC400795A00
/* PurchaseNotice.m */
;
};
72F9D4881BA8065500795A00
/* PurchaseNoticeListCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
72F9D4871BA8065500795A00
/* PurchaseNoticeListCell.m */
;
};
871F9F047CDDAC523E4358DC
/* libPods.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
86D33EC280C440156ED1B976
/* libPods.a */
;
};
C10214CD1AD8FE200024637E
/* ICRStoreDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C10214CC1AD8FE200024637E
/* ICRStoreDetailViewController.m */
;
};
C10214CE1AD8FE200024637E
/* ICRStoreDetailViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
C10214CC1AD8FE200024637E
/* ICRStoreDetailViewController.m */
;
};
...
...
@@ -685,6 +689,14 @@
72EDD86D1B96E11700964115
/* ChooseParentViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ChooseParentViewController.m
;
sourceTree
=
"<group>"
;
};
72F56CB01B76EC200077F0C9
/* SurveyUser.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SurveyUser.h
;
sourceTree
=
"<group>"
;
};
72F56CB11B76EC200077F0C9
/* SurveyUser.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SurveyUser.m
;
sourceTree
=
"<group>"
;
};
72F9D47D1BA7E97200795A00
/* NoticeProduct.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NoticeProduct.h
;
sourceTree
=
"<group>"
;
};
72F9D47E1BA7E97200795A00
/* NoticeProduct.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NoticeProduct.m
;
sourceTree
=
"<group>"
;
};
72F9D4801BA7EC9600795A00
/* NoticeProductViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
NoticeProductViewController.h
;
sourceTree
=
"<group>"
;
};
72F9D4811BA7EC9600795A00
/* NoticeProductViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
NoticeProductViewController.m
;
sourceTree
=
"<group>"
;
};
72F9D4831BA7FFC400795A00
/* PurchaseNotice.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PurchaseNotice.h
;
sourceTree
=
"<group>"
;
};
72F9D4841BA7FFC400795A00
/* PurchaseNotice.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseNotice.m
;
sourceTree
=
"<group>"
;
};
72F9D4861BA8065500795A00
/* PurchaseNoticeListCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PurchaseNoticeListCell.h
;
sourceTree
=
"<group>"
;
};
72F9D4871BA8065500795A00
/* PurchaseNoticeListCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PurchaseNoticeListCell.m
;
sourceTree
=
"<group>"
;
};
7DDFB1D460448C3B45118195
/* Pods.release.xcconfig */
=
{
isa
=
PBXFileReference
;
includeInIndex
=
1
;
lastKnownFileType
=
text.xcconfig
;
name
=
Pods.release.xcconfig
;
path
=
"Pods/Target Support Files/Pods/Pods.release.xcconfig"
;
sourceTree
=
"<group>"
;
};
86D33EC280C440156ED1B976
/* libPods.a */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
archive.ar
;
includeInIndex
=
0
;
path
=
libPods.a
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
C10214CB1AD8FE200024637E
/* ICRStoreDetailViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ICRStoreDetailViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1062,6 +1074,10 @@
04B4A3861B9CAAD700D88D68
/* ShopDetail.m */
,
04E721E11BA755FD008F9158
/* ProductUnit.h */
,
04E721E21BA755FD008F9158
/* ProductUnit.m */
,
72F9D47D1BA7E97200795A00
/* NoticeProduct.h */
,
72F9D47E1BA7E97200795A00
/* NoticeProduct.m */
,
72F9D4831BA7FFC400795A00
/* PurchaseNotice.h */
,
72F9D4841BA7FFC400795A00
/* PurchaseNotice.m */
,
);
path
=
Models
;
sourceTree
=
"<group>"
;
...
...
@@ -1077,6 +1093,10 @@
04E721DF1BA73CE2008F9158
/* ChooseProductUnitViewController.m */
,
0414FF151B94959700C7B00E
/* ShopDetaileViewController.h */
,
0414FF161B94959700C7B00E
/* ShopDetaileViewController.m */
,
72F9D4801BA7EC9600795A00
/* NoticeProductViewController.h */
,
72F9D4811BA7EC9600795A00
/* NoticeProductViewController.m */
,
72F9D4861BA8065500795A00
/* PurchaseNoticeListCell.h */
,
72F9D4871BA8065500795A00
/* PurchaseNoticeListCell.m */
,
);
path
=
Views
;
sourceTree
=
"<group>"
;
...
...
@@ -2587,6 +2607,7 @@
C11A34661B24487D00079129
/* ICRAnswer.m in Sources */
,
C1D017171AD8EF8100CD9CB8
/* IBTSegmentedControl.m in Sources */
,
C10C90901AE54FE300B911CD
/* IBTDatePickerViewController.m in Sources */
,
72F9D4881BA8065500795A00
/* PurchaseNoticeListCell.m in Sources */
,
0414FF1A1B94959700C7B00E
/* SelectCompanyViewController.m in Sources */
,
C1C5644B1AD66EB4006A1050
/* ICRTaskListViewController.m in Sources */
,
35CF33981B96BB02001211EF
/* GXFPaging.m in Sources */
,
...
...
@@ -2597,6 +2618,7 @@
C1FE50501AE024FA00C18080
/* UIActionSheet+Blocks.m in Sources */
,
C123A92B1B26EDDA003C0C36
/* ICRQuestionHelperView.m in Sources */
,
7281A0BF1B8980E60052B1AC
/* PurchaseBill.m in Sources */
,
72F9D4851BA7FFC400795A00
/* PurchaseNotice.m in Sources */
,
0414FF191B94959700C7B00E
/* PurchaseNoticeCell.m in Sources */
,
7217E9EB1B72364300FE5C1D
/* HPGrowingTextView.m in Sources */
,
724171761B9D30DE0094DF55
/* ChooseCostViewController.m in Sources */
,
...
...
@@ -2732,6 +2754,7 @@
C10C90A11AE5751D00B911CD
/* ICRPost.m in Sources */
,
0414FF1B1B94959700C7B00E
/* ShopDetaileViewController.m in Sources */
,
7217E9F21B72364300FE5C1D
/* StartTimeView.m in Sources */
,
72F9D47F1BA7E97200795A00
/* NoticeProduct.m in Sources */
,
C1FE50351AE020D400C18080
/* IBTAudioController.m in Sources */
,
7281A0C21B898A040052B1AC
/* PurchaseDetailViewController.m in Sources */
,
C14BE3061ADB84350049F1AA
/* IBTTextFieldCell.m in Sources */
,
...
...
@@ -2778,6 +2801,7 @@
C123A9291B26EDDA003C0C36
/* ICRQInputPopup.m in Sources */
,
30D702421ADE37D3008DC0BF
/* ICRAnnouncementDetailViewController.m in Sources */
,
FE17F6791B85847D0078CE96
/* QueryOrder.m in Sources */
,
72F9D4821BA7EC9600795A00
/* NoticeProductViewController.m in Sources */
,
C15039221ADE39190081A686
/* IBTUIControl.m in Sources */
,
C112BC4D1AD91CF800F75F58
/* ICRPatrolDetailViewController.m in Sources */
,
0414FF181B94959700C7B00E
/* SeePurchaseNoticeViewController.m in Sources */
,
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
a7578035
...
...
@@ -184,7 +184,7 @@ static NSString * const ICRHTTPInterface[] = {
//采购通知单
[
XFFHttp_savePurchaseNotice
]
=
@"purchase/notice/save"
,
[
XFFHttp_getPurchaseNoticeList
]
=
@"purchase/notice/query"
,
[
XFFHttp_getPurchaseNoticeDetailed
]
=
@"purchase/notice/get/
"
,
[
XFFHttp_getPurchaseNoticeDetailed
]
=
@"purchase/notice/get
"
,
[
XFFHttp_saveAndSubmitPurchaseNotice
]
=
@"purchase/notice/saveandsubmit"
,
[
XFFHttp_ComitPurchaseNotice
]
=
@"purchase/notice/submit/"
,
[
XFFHttp_acceptPurchaseNotice
]
=
@"purchase/notice/accept/"
,
...
...
@@ -2340,10 +2340,42 @@ acceptTypeJson:YES
}
//3·采购通知单明细(读)
-
(
void
)
getPurchaseNoticeDetailedWithPurchaseUuid
:
(
NSString
*
)
purchaseUuid
success
:
(
void
(
^
)(
id
))
succ
-
(
void
)
getPurchaseNoticeDetailedWithPurchaseUuid
:
(
NSString
*
)
purchaseUuid
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
purchaseUuid
)
{
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_getPurchaseNoticeDetailed
]
stringByAppendingFormat
:
@"/%@"
,
purchaseUuid
];
NSString
*
encodeUrlStr
=
[
urlStr
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
GET
:
encodeUrlStr
parameters
:
nil
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
//4·保存并提交采购通知单
-
(
void
)
saveAndSubmitPurchaseNoticeWithData
:
(
id
)
data
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
a7578035
...
...
@@ -179,6 +179,17 @@
#define TRANSPORT_STATE_RECEIVED @"received" //已收货
#define TRANSPORT_STATE_ABORTED @"aborted" //已废用
//采购通知单状态
//initial("未提交"), notAccepted("未接受"), purchasing("采购中"), finished("已完成")
#define PURCHASENOTICE_STATE_INITIAL @"initial"
#define PURCHASENOTICE_STATE_NOTACCEPTED @"notAccepted"
#define PURCHASENOTICE_STATE_PURCHASEING @"purchasing"
#define PURCHASENOTICE_STATE_FINISHED @"finished"
//采购通知单权限
#define NOTICE_PERMISSIONS_ACCEPTTASK @"500304"//接受任务
#define NOTICE_PERMISSIONS_CREATEBILL @"500305"//新建权
#define NOTICE_PERMISSIONS_FINISH @"500306"//结束
#endif
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Controllers/NewPurchaseViewController.m
View file @
a7578035
...
...
@@ -162,6 +162,7 @@ typedef enum : NSUInteger {
ShopDetaileViewController
*
svc
=
[[
ShopDetaileViewController
alloc
]
init
];
if
(
billProduct
)
{
svc
.
navTitle
=
@"编辑商品"
;
ShopDetail
*
shopDetail
=
[
self
coverShopDetail
:
billProduct
];
shopDetail
.
IsXiuGai
=
YES
;
svc
.
choseShopDetail
=
^
(
ShopDetail
*
Detail
){
...
...
@@ -177,6 +178,7 @@ typedef enum : NSUInteger {
svc
.
shopDetail
=
shopDetail
;
}
else
{
// 回调
svc
.
navTitle
=
@"添加商品"
;
svc
.
choseShopDetail
=
^
(
ShopDetail
*
shopDetail
){
PurchaseBillProduct
*
billProduct
=
[
self
coverPurchaseProduct
:
shopDetail
];
[
_pvc
.
productArr
addObject
:
billProduct
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Purchase/Views/PurchaseCell.m
View file @
a7578035
...
...
@@ -89,11 +89,6 @@
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
// else if ([purchaseBill.state isEqualToString:PURCHASE_STATE_SHIPPING]) {
// stateStr = @"发运中";
// [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
//
// }
else
if
([
purchaseBill
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
stateStr
=
@"已完成"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"finish"
]
forState
:
UIControlStateDisabled
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.h
View file @
a7578035
...
...
@@ -7,7 +7,7 @@
//
#import "ICRBaseViewController.h"
#import "PurchaseNotice.h"
@interface
NewPurchaseNoticeViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
PurchaseNotice
*
purchaseNotice
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/NewPurchaseNoticeViewController.m
View file @
a7578035
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/PurchaseNoticeViewController.m
View file @
a7578035
...
...
@@ -7,14 +7,14 @@
//
#import "PurchaseNoticeViewController.h"
#import "PurchaseCell.h"
#import "PurchaseBill.h"
#import "SeePurchaseNoticeViewController.h"
#import "NewPurchaseNoticeViewController.h"
#import "QueryOrder.h"
#import "SortMaskView.h"
#import "PurchaseBoltView.h"
#import "MJRefresh.h"
#import "PurchaseNoticeListCell.h"
#import "PurchaseNotice.h"
#define TopMargin 44
#define TableHeight 120
#define LeftMargin 20
...
...
@@ -56,39 +56,12 @@ typedef enum : NSUInteger {
[
self
createTableView
];
[
self
createRefresh
];
[
self
getData
];
// Do any additional setup after loading the view.
[
self
createBackBtn
];
}
-
(
void
)
initData
{
self
.
view
.
backgroundColor
=
XXFBgColor
;
self
.
dataArr
=
[
NSMutableArray
array
];
for
(
NSInteger
i
=
0
;
i
<
6
;
i
++
)
{
PurchaseBill
*
bill
=
[
PurchaseBill
new
];
bill
.
billNumber
=
@"222222222"
;
bill
.
noticeNumber
=
@"134594059654"
;
bill
.
create_operName
=
@"创建人"
;
bill
.
create_time
=
@"2013-03-04"
;
bill
.
vendor_name
=
@"供应商"
;
bill
.
total
=
[
NSNumber
numberWithFloat
:
22
];
bill
.
remark
=
@"备注"
;
bill
.
lastModify_operName
=
@"最后修改人"
;
bill
.
vendorConfirmTime
=
@"否"
;
if
(
i
==
0
)
{
bill
.
state
=
@"initial"
;
}
else
if
(
i
==
1
){
bill
.
state
=
@"submitted"
;
}
else
if
(
i
==
2
){
bill
.
state
=
@"rejected"
;
}
else
if
(
i
==
3
){
bill
.
state
=
@"approved"
;
}
else
if
(
i
==
4
){
bill
.
state
=
@"shipping"
;
}
else
if
(
i
==
5
){
bill
.
state
=
@"finished"
;
}
[
self
.
dataArr
addObject
:
bill
];
}
}
-
(
void
)
getData
{
[
ICRUserUtil
sharedInstance
].
needFresh
=
NO
;
...
...
@@ -149,31 +122,16 @@ typedef enum : NSUInteger {
[
orderArr
addObject
:[
order
dictForCommit
]];
}
// 网络请求
NSDictionary
*
dict
=
@{
@"billNumberLike"
:
billObject
,
@"state"
:
stateObject
,
@"noticeNumberLike"
:
noticeObject
,
@"titleLike"
:
[
NSNull
null
],
@"vendorUuid"
:
[
NSNull
null
],
@"queryOrders"
:
orderArr
,
@"userUuid"
:
userUtil
.
userId
,
@"title"
:
[
NSNull
null
],
@"orderField"
:
@"created"
,
@"orderDirection"
:
@"desc"
,
// @"queryOrders":orderArr,
@"pageNumber"
:
@
(
_currentPage
),
@"pageSize"
:
@
(
20
)};
[[
ICRHTTPController
sharedController
]
queryPurchaseWithData
:
dict
success
:
succ
failure
:
fail
];
// NSDictionary *dict = @{
// @"billNumberLike":billObject,
// @"state":stateObject,
// @"noticeNumberLike":noticeObject,
// @"titleLike":[NSNull null],
//// @"orderField":@"created",
//// @"orderDirection":@"desc",
// @"vendorUuid":[NSNull null],
// @"queryOrders":orderArr,
// @"userUuid":userUtil.userId,
// @"pageNumber":@(_currentPage),
// @"pageSize":@(20)};
// [[ICRHTTPController sharedController] queryPurchaseWithData:dict success:succ failure:fail];
[[
ICRHTTPController
sharedController
]
getPurchaseNoticeListWithData
:
dict
success
:
succ
failure
:
fail
];
}
//刷新列表
-
(
void
)
fetchtPuchaseList
:
(
id
)
data
{
...
...
@@ -182,13 +140,13 @@ typedef enum : NSUInteger {
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
if
(
_currentPage
==
0
)
{
//
if (self.dataArr.count > 0) {
//
[self.dataArr removeAllObjects];
//
}
if
(
self
.
dataArr
.
count
>
0
)
{
[
self
.
dataArr
removeAllObjects
];
}
}
NSArray
*
recodesArr
=
data
[
@"data"
][
@"records"
];
for
(
NSDictionary
*
purchaseBillDict
in
recodesArr
)
{
Purchase
Bill
*
purchaseBill
=
[[
PurchaseBill
alloc
]
init
];
Purchase
Notice
*
purchaseBill
=
[[
PurchaseNotice
alloc
]
init
];
[
purchaseBill
setValuesForKeysWithDictionary
:
purchaseBillDict
];
[
self
.
dataArr
addObject
:
purchaseBill
];
}
...
...
@@ -440,38 +398,52 @@ typedef enum : NSUInteger {
return
self
.
dataArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"
SurveyID
"
;
PurchaseCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
static
NSString
*
cellID
=
@"
PurchaseNoticeListCell
"
;
Purchase
NoticeList
Cell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
];
if
(
cell
==
nil
)
{
cell
=
[[
PurchaseCell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
cell
=
[[
Purchase
NoticeList
Cell
alloc
]
initWithStyle
:
UITableViewCellStyleDefault
reuseIdentifier
:
cellID
];
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
}
if
(
self
.
dataArr
.
count
>
0
)
{
Purchase
Bill
*
bill
=
self
.
dataArr
[
indexPath
.
row
];
[
cell
setPurchaseBill
:
bill
]
;
Purchase
Notice
*
bill
=
self
.
dataArr
[
indexPath
.
row
];
cell
.
purchaseNotice
=
bill
;
}
return
cell
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
_dataArr
.
count
>
0
)
{
PurchaseNotice
*
purchaseNotice
=
_dataArr
[
indexPath
.
row
];
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASENOTICE_STATE_INITIAL
])
{
NewPurchaseNoticeViewController
*
nvc
=
[
NewPurchaseNoticeViewController
new
];
nvc
.
purchaseNotice
=
purchaseNotice
;
nvc
.
title
=
@"修改采购单通知"
;
[
self
PushViewController
:
nvc
animated
:
YES
];
}
else
{
SeePurchaseNoticeViewController
*
pvc
=
[
SeePurchaseNoticeViewController
new
];
pvc
.
title
=
@"查看采购单"
;
pvc
.
bill
=
_dataArr
[
indexPath
.
row
];
if
(
indexPath
.
row
==
0
){
pvc
.
indexPerson
=
0
;
}
else
if
(
indexPath
.
row
==
1
){
pvc
.
indexPerson
=
1
;
}
else
if
(
indexPath
.
row
==
2
){
pvc
.
indexPerson
=
2
;
}
pvc
.
purchaseNotice
=
purchaseNotice
;
[
self
PushViewController
:
pvc
animated
:
YES
];
}
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
TableHeight
;
}
-
(
void
)
createBackBtn
{
UIButton
*
btn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
btn
setImage
:[
UIImage
imageNamed
:
@"back"
]
forState
:
UIControlStateNormal
];
btn
.
frame
=
CGRectMake
(
0
,
0
,
12
,
20
);
[
btn
addTarget
:
self
action
:
@selector
(
backRV
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIBarButtonItem
*
back
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
btn
];
self
.
navigationItem
.
leftBarButtonItem
=
back
;
}
-
(
void
)
backRV
{
[
self
PopToRootViewControllerAnimated
:
YES
];
}
-
(
void
)
didReceiveMemoryWarning
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.h
View file @
a7578035
...
...
@@ -7,10 +7,10 @@
//
#import "ICRBaseViewController.h"
#import "Purchase
Bill
.h"
#import "Purchase
Notice
.h"
@interface
SeePurchaseNoticeViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
Purchase
Bill
*
bill
;
//模拟三个人员
@property
(
nonatomic
,
strong
)
Purchase
Notice
*
purchaseNotice
;
@property
(
nonatomic
,
assign
)
NSInteger
indexPerson
;
//0.1.2
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m
View file @
a7578035
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Models/NoticeProduct.h
0 → 100644
View file @
a7578035
//
// NoticeProduct.h
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface
NoticeProduct
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
productUuid
;
//商品uuid
@property
(
nonatomic
,
strong
)
NSString
*
productCode
;
//商品代码
@property
(
nonatomic
,
strong
)
NSString
*
productName
;
//商品名称
@property
(
nonatomic
,
strong
)
NSNumber
*
qpc
;
//包装规格
@property
(
nonatomic
,
strong
)
NSString
*
packUnit
;
//包装单位
@property
(
nonatomic
,
strong
)
NSNumber
*
qpcQuantity
;
//包装数量
@property
(
nonatomic
,
strong
)
NSNumber
*
quantity
;
//基础数量
@property
(
nonatomic
,
strong
)
NSNumber
*
purchasedQuantity
;
//已采购数量
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
//备注
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Models/NoticeProduct.m
0 → 100644
View file @
a7578035
//
// NoticeProduct.m
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "NoticeProduct.h"
@implementation
NoticeProduct
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Models/PurchaseNotice.h
0 → 100644
View file @
a7578035
//
// PurchaseNotice.h
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface
PurchaseNotice
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
//唯一标识
@property
(
nonatomic
,
strong
)
NSString
*
create_time
;
//创建时间
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
//创建人代码
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
//创建人名称
@property
(
nonatomic
,
strong
)
NSString
*
lastModified_time
;
//最后修改时间
@property
(
nonatomic
,
strong
)
NSString
*
lastModified_id
;
//最后修改人代码
@property
(
nonatomic
,
strong
)
NSString
*
lastModified_operName
;
//最后修改人名称
@property
(
nonatomic
,
strong
)
NSString
*
billnumber
;
//采购单号
@property
(
nonatomic
,
strong
)
NSNumber
*
version
;
//版本号
@property
(
nonatomic
,
strong
)
NSString
*
title
;
//标题
@property
(
nonatomic
,
strong
)
NSString
*
state
;
//状态
@property
(
nonatomic
,
strong
)
NSString
*
purchaserUuid
;
//采购员ID
@property
(
nonatomic
,
strong
)
NSString
*
purchaserCode
;
//采购员代码
@property
(
nonatomic
,
strong
)
NSString
*
purchaserName
;
//采购员名称
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
//备注
@property
(
nonatomic
,
strong
)
NSArray
*
products
;
//商品
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Models/PurchaseNotice.m
0 → 100644
View file @
a7578035
//
// PurchaseNotice.m
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "PurchaseNotice.h"
@implementation
PurchaseNotice
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/NoticeProductViewController.h
0 → 100644
View file @
a7578035
//
// NoticeProductViewController.h
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
#import "NoticeProduct.h"
typedef
void
(
^
ChoseNoticeProduct
)(
NoticeProduct
*
noticeProduct
,
NSIndexPath
*
indexPath
);
typedef
void
(
^
DeleteNoticeProduct
)(
NoticeProduct
*
accountDetail
,
NSIndexPath
*
indexPath
);
@interface
NoticeProductViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
NoticeProduct
*
noticeProduct
;
@property
(
nonatomic
,
copy
)
ChoseNoticeProduct
choseNoticeProduct
;
@property
(
nonatomic
,
copy
)
DeleteNoticeProduct
deleteNoticeProduct
;
@property
(
nonatomic
,
strong
)
NSIndexPath
*
indexPath
;
@property
(
nonatomic
,
strong
)
NSString
*
navTitle
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/NoticeProductViewController.m
0 → 100644
View file @
a7578035
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeListCell.h
0 → 100644
View file @
a7578035
//
// PurchaseNoticeListCell.h
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PurchaseNotice.h"
@interface
PurchaseNoticeListCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
UILabel
*
billNumberLabel
;
//采购单号
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
//标题
@property
(
nonatomic
,
strong
)
UILabel
*
userLabel
;
//采购员
@property
(
nonatomic
,
strong
)
UILabel
*
createOperNameLabel
;
//创建人
@property
(
nonatomic
,
strong
)
UILabel
*
createTimeLabel
;
//创建时间
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
stateBtn
;
@property
(
nonatomic
,
strong
)
PurchaseNotice
*
purchaseNotice
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/PurchaseNoticeListCell.m
0 → 100644
View file @
a7578035
//
// PurchaseNoticeListCell.m
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "PurchaseNoticeListCell.h"
#define TitleSize 16
#define LeftMargin 90
#define TopMargin 10
#define TitleHeight 20
#define TableHeight 120
@implementation
PurchaseNoticeListCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
bulidLayout
];
}
return
self
;
}
-
(
void
)
bulidLayout
{
self
.
stateBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
stateBtn
.
frame
=
CGRectMake
(
TopMargin
*
2
,
TopMargin
,
LeftMargin
-
TopMargin
*
3
,
20
);
self
.
stateBtn
.
titleLabel
.
font
=
GXF_FOURTEENTH_SIZE
;
[
self
.
stateBtn
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
self
.
stateBtn
.
enabled
=
NO
;
self
.
billNumberLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
TopMargin
,
ScreenSize
.
width
-
LeftMargin
,
TitleHeight
))];
self
.
billNumberLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
billNumberLabel
.
font
=
GXF_SIXTEENTEH_SIZE
;
self
.
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
CGRectGetMaxY
(
self
.
billNumberLabel
.
frame
),
ScreenSize
.
width
-
LeftMargin
,
TitleHeight
))];
self
.
titleLabel
.
numberOfLines
=
0
;
self
.
titleLabel
.
textColor
=
GXF_CELL_COLOR
;
self
.
titleLabel
.
font
=
GXF_FOURTEENTH_SIZE
;
self
.
userLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
CGRectGetMaxY
(
self
.
titleLabel
.
frame
),
ScreenSize
.
width
-
LeftMargin
,
TitleHeight
))];
self
.
userLabel
.
textColor
=
GXF_CELL_COLOR
;
self
.
userLabel
.
font
=
GXF_FOURTEENTH_SIZE
;
self
.
createOperNameLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
CGRectGetMaxY
(
self
.
userLabel
.
frame
),
ScreenSize
.
width
-
LeftMargin
,
TitleHeight
))];
self
.
createOperNameLabel
.
textColor
=
GXF_CELL_COLOR
;
self
.
createOperNameLabel
.
font
=
GXF_FOURTEENTH_SIZE
;
self
.
createTimeLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
CGRectGetMaxY
(
self
.
createOperNameLabel
.
frame
),
ScreenSize
.
width
-
LeftMargin
,
TitleHeight
))];
self
.
createTimeLabel
.
textColor
=
GXF_CELL_COLOR
;
self
.
createTimeLabel
.
font
=
GXF_FOURTEENTH_SIZE
;
self
.
lineLabel
=
[[
UILabel
alloc
]
initWithFrame
:(
CGRectMake
(
LeftMargin
,
TableHeight
-
1
,
ScreenSize
.
width
-
LeftMargin
-
TopMargin
*
2
,
1
))];;
self
.
lineLabel
.
backgroundColor
=
GXF_LINE_COLOR
;
[
self
.
contentView
addSubview
:
self
.
stateBtn
];
[
self
.
contentView
addSubview
:
self
.
billNumberLabel
];
[
self
.
contentView
addSubview
:
self
.
titleLabel
];
[
self
.
contentView
addSubview
:
self
.
userLabel
];
[
self
.
contentView
addSubview
:
self
.
createOperNameLabel
];
[
self
.
contentView
addSubview
:
self
.
createTimeLabel
];
[
self
.
contentView
addSubview
:
self
.
lineLabel
];
}
-
(
void
)
setPurchaseNotice
:
(
PurchaseNotice
*
)
purchaseNotice
{
self
.
billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"单号:%@"
,
purchaseNotice
.
billnumber
];
self
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"标题:%@"
,
purchaseNotice
.
title
];
self
.
userLabel
.
text
=
[
NSString
stringWithFormat
:
@"采购员:%@"
,
purchaseNotice
.
purchaserName
]
;
self
.
createOperNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"创建人:%@"
,
purchaseNotice
.
create_operName
]
;
self
.
createTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"创建时间:%@"
,
purchaseNotice
.
create_time
];
NSString
*
stateStr
=
@""
;
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASENOTICE_STATE_INITIAL
])
{
stateStr
=
@"未提交"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"initial"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASENOTICE_STATE_NOTACCEPTED
])
{
stateStr
=
@"未接受"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASENOTICE_STATE_PURCHASEING
])
{
stateStr
=
@"采购中"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"insurvey"
]
forState
:
UIControlStateDisabled
];
}
else
if
([
purchaseNotice
.
state
isEqualToString
:
PURCHASE_STATE_FINISHED
])
{
stateStr
=
@"已完成"
;
[
self
.
stateBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"finish"
]
forState
:
UIControlStateDisabled
];
}
[
self
.
stateBtn
setTitle
:
stateStr
forState
:
UIControlStateNormal
];
}
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/PurchaseNotice/Views/ShopDetaileViewController.m
View file @
a7578035
...
...
@@ -29,7 +29,7 @@ typedef enum : NSUInteger {
SaveTag
=
2000
,
CommitTag
,
}
BtnTag
;
@interface
ShopDetaileViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
HPGrowingTextViewDelegate
,
UITextFieldDelegate
,
StartTimeViewDelegate
>
@interface
ShopDetaileViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
HPGrowingTextViewDelegate
,
UITextFieldDelegate
>
{
UITableView
*
_tableView
;
NSMutableArray
*
_dataArr
;
...
...
@@ -63,7 +63,6 @@ typedef enum : NSUInteger {
self
.
title
=
self
.
navTitle
;
[
self
initData
];
[
self
setupSubviews
];
// Do any additional setup after loading the view.
}
-
(
void
)
initData
{
merchandise
=
[[
UITextField
alloc
]
init
];
...
...
@@ -85,8 +84,6 @@ typedef enum : NSUInteger {
-
(
void
)
setupSubviews
{
// self.view.backgroundColor = XXFBgColor;
_tableView
=
[[
UITableView
alloc
]
initWithFrame
:(
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
-
64
-
LeftMargin
))
style
:(
UITableViewStylePlain
)];
_tableView
.
backgroundColor
=
[
UIColor
whiteColor
];
_tableView
.
bounces
=
NO
;
...
...
@@ -100,8 +97,6 @@ typedef enum : NSUInteger {
UIButton
*
commitBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
CGRectMake
(
saveBtn
.
frame
.
origin
.
x
+
saveBtn
.
frame
.
size
.
width
+
LeftMargin
,
10
,
(
ScreenSize
.
width
-
LeftMargin
*
3
)
/
2
,
BtnHeight
)
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
CommitTag
image
:
nil
title
:
@"保存"
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
CornerRadius
bgColor
:
GXF_COMMIT_COLOR
];
[
footView
addSubview
:
commitBtn
];
// [self.view addSubview:footView];
_tableView
.
tableFooterView
=
footView
;
[
self
.
view
addSubview
:
_tableView
];
...
...
@@ -129,10 +124,6 @@ typedef enum : NSUInteger {
_PackagingLable
.
textColor
=
GXF_CONTENT_COLOR
;
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
#pragma mark - 按钮点击事件
-
(
void
)
btnClick
:
(
UIButton
*
)
btn
{
switch
(
btn
.
tag
)
{
...
...
@@ -149,15 +140,10 @@ typedef enum : NSUInteger {
{
[
self
clearShopDetail
];
}
}
else
{
[
self
clearShopDetail
];
}
// if ([self checkSurvey]) {
// [self saveSurvey:@"initial" message:@"正在保存..."];
// }
}
break
;
case
CommitTag
:
...
...
@@ -167,7 +153,6 @@ typedef enum : NSUInteger {
shopDetail
.
IsDeleted
=
NO
;
self
.
choseShopDetail
(
shopDetail
);
//回调
[
self
PopViewControllerAnimated
:
YES
];
// [self saveSurvey:@"submitted" message:@"正在提交..."];
}
}
break
;
...
...
@@ -242,87 +227,6 @@ typedef enum : NSUInteger {
return
YES
;
}
#pragma mark - 保存
-
(
void
)
saveSurvey
:
(
NSString
*
)
state
message
:
(
NSString
*
)
msg
{
//保存
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
if
(
data
)
{
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
];
if
(
success
==
1
)
{
//成功
[
IBTLoadingView
showTips
:
@"操作成功"
];
[
self
clearAllInformation
];
if
(
self
.
survey
)
{
[
ICRUserUtil
sharedInstance
].
needFresh
=
YES
;
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
}
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
id
uuidObject
=
[
NSNull
null
];
if
(
self
.
survey
.
uuid
.
length
>
0
){
uuidObject
=
self
.
survey
.
uuid
;
}
id
billNumberObject
=
[
NSNull
null
];
if
(
self
.
survey
.
billNumber
>
0
)
{
billNumberObject
=
self
.
survey
.
billNumber
;
}
NSNumber
*
version
=
[
NSNumber
numberWithLong
:
0
];
if
(
self
.
survey
)
{
version
=
self
.
survey
.
version
;
}
NSDictionary
*
dict
=
@{
@"uuid"
:
uuidObject
,
@"version"
:
version
,
@"billnumber"
:
billNumberObject
,
@"title"
:
[
IBTCommon
checkString
:
self
.
titleStr
],
@"state"
:
state
,
@"productUuid"
:
[
IBTCommon
checkString
:
self
.
productUuidStr
],
@"productCode"
:
[
IBTCommon
checkString
:
self
.
productCodeStr
],
@"productName"
:
[
IBTCommon
checkString
:
self
.
productNameStr
],
@"beginDate"
:
[
IBTCommon
checkString
:
self
.
beginDateStr
],
@"endDate"
:
[
IBTCommon
checkString
:
self
.
endDateStr
],
@"remark"
:
[
IBTCommon
checkString
:
self
.
remarkStr
],
@"users"
:
self
.
users
};
[
IBTLoadingView
showProgressLabel
:
msg
];
[[
ICRHTTPController
sharedController
]
saveSurveyWithAuthenticode
:
dict
success
:
succ
failure
:
fail
];
}
-
(
void
)
clearAllInformation
{
_productLabel
.
text
=
@"请输入商品"
;
_productLabel
.
textColor
=
GXF_PLACEHOLDER_COLOR
;
// _startDateLabel.text = @"选择日期";
// _startDateLabel.textColor = GXF_PLACEHOLDER_COLOR;
// _endDateLabel.text = @"选择日期";
// _endDateLabel.textColor = GXF_PLACEHOLDER_COLOR;
// _personLabel.text = @"选择调研人员";
// _personLabel.textColor = GXF_PLACEHOLDER_COLOR;
_noteTextView
.
text
=
@""
;
//清空数据
self
.
titleStr
=
@""
;
self
.
productCodeStr
=
@""
;
self
.
productNameStr
=
@""
;
self
.
productUuidStr
=
@""
;
self
.
beginDateStr
=
@""
;
self
.
endDateStr
=
@""
;
[
self
.
users
removeAllObjects
];
self
.
remarkStr
=
@""
;
}
#pragma mark - 协议方法
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
...
...
@@ -363,12 +267,10 @@ typedef enum : NSUInteger {
if
(
indexPath
.
row
==
0
)
{
_productLabel
=
contentLabel
;
contentLabel
.
text
=
@"选择商品"
;
[
self
preferDataInProductLabel
];
}
else
if
(
indexPath
.
row
==
3
)
{
_PackagingLable
=
contentLabel
;
contentLabel
.
text
=
@"选择包装单位"
;
[
self
preferDataInProductLabel
];
}
}
else
...
...
@@ -465,15 +367,6 @@ typedef enum : NSUInteger {
}
}
-
(
void
)
preferDataInProductLabel
{
if
(
self
.
survey
)
{
_productLabel
.
text
=
[
IBTCommon
checkString
:
self
.
survey
.
productName
];
_productLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
productCodeStr
=
[
IBTCommon
checkString
:
self
.
survey
.
productCode
];
self
.
productNameStr
=
[
IBTCommon
checkString
:
self
.
survey
.
productName
];
self
.
productUuidStr
=
[
IBTCommon
checkString
:
self
.
survey
.
productUuid
];
}
}
#pragma mark delegate
-
(
BOOL
)
growingTextViewShouldReturn
:
(
HPGrowingTextView
*
)
growingTextView
{
[
_noteTextView
resignFirstResponder
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Transport/Controllers/NewCostViewController.m
View file @
a7578035
...
...
@@ -129,18 +129,6 @@ typedef enum : NSUInteger {
ShowMessage
(
@"尾款不能为空"
);
return
NO
;
}
if
(
!
[
RegexUtil
isValidateNmuberAndFloat
:
_actualmoneyField
.
text
])
{
ShowMessage
(
@"应付金额不合法"
);
return
NO
;
}
if
(
!
[
RegexUtil
isValidateNmuberAndFloat
:
_paidmoneyField
.
text
])
{
ShowMessage
(
@"已付金额额不合法"
);
return
NO
;
}
if
(
!
[
RegexUtil
isValidateNmuberAndFloat
:
_leftmoneyField
.
text
])
{
ShowMessage
(
@"尾款不合法"
);
return
NO
;
}
if
(
!
self
.
accountDetail
)
{
self
.
accountDetail
=
[[
FeeAcountDetail
alloc
]
init
];
}
...
...
@@ -232,8 +220,6 @@ typedef enum : NSUInteger {
_noteTextView
.
text
=
self
.
accountDetail
.
note
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
TableRowHeight
;
}
...
...
@@ -250,34 +236,17 @@ typedef enum : NSUInteger {
[
self
PushViewController
:
cvc
animated
:
YES
];
}
}
#pragma mark delegate
-
(
BOOL
)
growingTextViewShouldReturn
:
(
HPGrowingTextView
*
)
growingTextView
{
[
_noteTextView
resignFirstResponder
];
[
self
setTableFrame
:
LeftMargin
];
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
{
[
_actualmoneyField
resignFirstResponder
];
[
_paidmoneyField
resignFirstResponder
];
[
_leftmoneyField
resignFirstResponder
];
[
_noteTextView
resignFirstResponder
];
[
self
setTableFrame
:
LeftMargin
];
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
...
...
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