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
524340cc
Commit
524340cc
authored
Dec 14, 2015
by
AvatarC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看转运单和收获单:系统处理失败
parent
d8e5be81
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
15 deletions
+52
-15
ICRAppMacro.h
XFFruit/Macro/ICRAppMacro.h
+2
-2
NewReceiveViewController.m
...trollers/Receiving/Controllers/NewReceiveViewController.m
+16
-0
TransferDetailViewController.m
...llers/Transfer/Controllers/TransferDetailViewController.m
+34
-13
No files found.
XFFruit/Macro/ICRAppMacro.h
View file @
524340cc
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
//********阿里云内部测试环境********
//********阿里云内部测试环境********
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
//
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
//********现场测试环境********
//********现场测试环境********
//
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//********现场正式环境*********
//********现场正式环境*********
...
...
XFFruit/ViewControllers/Receiving/Controllers/NewReceiveViewController.m
View file @
524340cc
...
@@ -120,7 +120,15 @@ typedef enum : NSUInteger {
...
@@ -120,7 +120,15 @@ typedef enum : NSUInteger {
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_ABORTED
])
{
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_ABORTED
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"已作废"
;
self
.
stateLabel
.
text
=
@"已作废"
;
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_PROCESS
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
greenColor
];
self
.
stateLabel
.
text
=
@"提交系统处理"
;
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_PROCESSFAIL
])
{
self
.
stateLabel
.
textColor
=
[
UIColor
grayColor
];
self
.
stateLabel
.
text
=
@"系统处理失败"
;
}
}
self
.
purchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"转运单%@"
,
self
.
transfer
.
billnumber
];
self
.
purchaseLabel
.
text
=
[
NSString
stringWithFormat
:
@"转运单%@"
,
self
.
transfer
.
billnumber
];
self
.
warehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseName
];
self
.
warehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseName
];
self
.
rwarehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseName
];
self
.
rwarehouseLabel
.
text
=
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseName
];
...
@@ -187,6 +195,7 @@ typedef enum : NSUInteger {
...
@@ -187,6 +195,7 @@ typedef enum : NSUInteger {
_scrollView
.
backgroundColor
=
XXFBgColor
;
_scrollView
.
backgroundColor
=
XXFBgColor
;
[
self
.
view
addSubview
:
_scrollView
];
[
self
.
view
addSubview
:
_scrollView
];
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_UNRECEIVED
])
{
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_UNRECEIVED
])
{
if
([
IBTCommon
checkIsPermission
:
RECEIVE_ACTION_RECEIVE
])
{
if
([
IBTCommon
checkIsPermission
:
RECEIVE_ACTION_RECEIVE
])
{
[
self
createBtnWithArr
:@[
@"保存"
,
@"收货"
]];
[
self
createBtnWithArr
:@[
@"保存"
,
@"收货"
]];
...
@@ -199,6 +208,13 @@ typedef enum : NSUInteger {
...
@@ -199,6 +208,13 @@ typedef enum : NSUInteger {
}
else
{
}
else
{
[
self
hiddenBottom
];
[
self
hiddenBottom
];
}
}
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_PROCESSFAIL
])
{
if
([
IBTCommon
checkIsPermission
:
RECEIVE_ACTION_RECEIVE
])
{
[
self
createBtnWithArr
:@[
@"作废"
,
@"收货"
]];
}
else
{
[
self
hiddenBottom
];
}
}
}
NSArray
*
leftArr
=
@[
@"单号:"
,
@"来源单据:"
,
@"状态:"
,
@"发货仓库:"
,
@"收货仓库:"
,
@"车辆:"
,
@"司机电话:"
,
@"创建:"
,
@"备注"
];
NSArray
*
leftArr
=
@[
@"单号:"
,
@"来源单据:"
,
@"状态:"
,
@"发货仓库:"
,
@"收货仓库:"
,
@"车辆:"
,
@"司机电话:"
,
@"创建:"
,
@"备注"
];
...
...
XFFruit/ViewControllers/Transfer/Controllers/TransferDetailViewController.m
View file @
524340cc
...
@@ -155,7 +155,7 @@ typedef enum : NSUInteger {
...
@@ -155,7 +155,7 @@ typedef enum : NSUInteger {
btnTag
=
EndTag
;
btnTag
=
EndTag
;
}
else
if
([
arr
[
i
]
isEqualToString
:
@"作废"
])
{
}
else
if
([
arr
[
i
]
isEqualToString
:
@"作废"
])
{
btnTag
=
AbortTag
;
btnTag
=
AbortTag
;
}
else
if
([
arr
[
i
]
isEqualToString
:
@"
提交
"
])
{
}
else
if
([
arr
[
i
]
isEqualToString
:
@"
收货
"
])
{
btnTag
=
SubmitTag
;
btnTag
=
SubmitTag
;
}
}
CGRect
btnFrame
=
CGRectMake
(
LeftMargin
+
(
LeftMargin
+
btnWidth
)
*
i
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
btnWidth
,
40
);
CGRect
btnFrame
=
CGRectMake
(
LeftMargin
+
(
LeftMargin
+
btnWidth
)
*
i
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
btnWidth
,
40
);
...
@@ -173,7 +173,7 @@ typedef enum : NSUInteger {
...
@@ -173,7 +173,7 @@ typedef enum : NSUInteger {
_scrollView
.
showsVerticalScrollIndicator
=
NO
;
_scrollView
.
showsVerticalScrollIndicator
=
NO
;
_scrollView
.
backgroundColor
=
XXFBgColor
;
_scrollView
.
backgroundColor
=
XXFBgColor
;
[
self
.
view
addSubview
:
_scrollView
];
[
self
.
view
addSubview
:
_scrollView
];
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_RECEIVED
]
||
[
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_UNRECEIVED
])
{
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_RECEIVED
]
||
[
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_UNRECEIVED
])
{
//已收货 //待收货
if
([
IBTCommon
checkIsPermission
:
TRANSFER_ACTION_ABORT
])
{
if
([
IBTCommon
checkIsPermission
:
TRANSFER_ACTION_ABORT
])
{
[
self
createBtnWithArr
:@[
@"作废"
]];
[
self
createBtnWithArr
:@[
@"作废"
]];
}
else
{
}
else
{
...
@@ -181,11 +181,12 @@ typedef enum : NSUInteger {
...
@@ -181,11 +181,12 @@ typedef enum : NSUInteger {
}
}
#warning 测试
#warning 测试
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_PROCESSFAIL
]){
}
else
if
([
self
.
transfer
.
state
isEqualToString
:
TRANSFER_STATE_PROCESSFAIL
]){
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
//系统处理失败
if
([
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_ABORT
])
{
if
([
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_ABORT
])
{
[
arr
addObject
:
@"作废"
];
[
arr
addObject
:
@"作废"
];
}
if
([
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_NEW
])
{
}
if
([
IBTCommon
checkIsPermission
:
TRANSPORT_ACTION_NEW
])
{
[
arr
addObject
:
@"提交"
];
//[arr addObject:@"提交"];
[
arr
addObject
:
@"收货"
];
}
}
if
(
arr
.
count
==
0
)
{
if
(
arr
.
count
==
0
)
{
[
self
hiddenBottomView
];
[
self
hiddenBottomView
];
...
@@ -280,8 +281,8 @@ typedef enum : NSUInteger {
...
@@ -280,8 +281,8 @@ typedef enum : NSUInteger {
break
;
break
;
case
SubmitTag
:
case
SubmitTag
:
{
{
CLog
(
@"
提交
"
);
CLog
(
@"
收货
"
);
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"温馨提示"
message
:
@"请确认
提交
"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确认"
,
nil
];
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"温馨提示"
message
:
@"请确认
收货
"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确认"
,
nil
];
alertView
.
delegate
=
self
;
alertView
.
delegate
=
self
;
alertView
.
tag
=
SubmitTag
;
alertView
.
tag
=
SubmitTag
;
[
alertView
show
];
[
alertView
show
];
...
@@ -304,8 +305,8 @@ typedef enum : NSUInteger {
...
@@ -304,8 +305,8 @@ typedef enum : NSUInteger {
[
self
dealByAction
:
TRANSFER_STATE_RECEIVED
];
//结束
[
self
dealByAction
:
TRANSFER_STATE_RECEIVED
];
//结束
}
}
}
else
if
(
alertView
.
tag
==
SubmitTag
){
}
else
if
(
alertView
.
tag
==
SubmitTag
){
if
(
buttonIndex
==
1
)
{
//
提交
if
(
buttonIndex
==
1
)
{
//
收货
[
self
getDataFromServer
:
TRANSFER_STATE_PROCESSFAIL
msg
:
@"正在
提交
..."
];
[
self
getDataFromServer
:
TRANSFER_STATE_PROCESSFAIL
msg
:
@"正在
收货
..."
];
}
}
}
}
}
}
...
@@ -358,12 +359,34 @@ typedef enum : NSUInteger {
...
@@ -358,12 +359,34 @@ typedef enum : NSUInteger {
[
IBTLoadingView
showTips
:
data
];
[
IBTLoadingView
showTips
:
data
];
};
};
// NSDictionary *dict = @{@"uuid":self.transfer.uuid,
// @"version":self.transfer.version,
// @"billnumber":self.transfer.billnumber,
// @"enterprise":[ICRUserUtil sharedInstance].orgId,
// @"state":TRANSFER_STATE_UNRECEIVED,
// @"warehouseUuid":[IBTCommon checkString:self.transfer.warehouseUuid],
// @"warehouseCode":[IBTCommon checkString:self.transfer.warehouseCode],
// @"warehouseName":[IBTCommon checkString:self.transfer.warehouseName],
// @"rwarehouseUuid":[IBTCommon checkString:self.transfer.rwarehouseUuid],
// @"rwarehouseCode":[IBTCommon checkString:self.transfer.rwarehouseCode],
// @"rwarehouseName":[IBTCommon checkString:self.transfer.rwarehouseName],
// @"carnumber":[IBTCommon checkString:self.transfer.carnumber],
// @"type":[IBTCommon checkString:self.transfer.type],
// @"carphone":[IBTCommon checkString:self.transfer.carphone],
// @"arriveDate":[IBTCommon checkString:self.transfer.arriveDate],
// @"note":[IBTCommon checkString:self.transfer.note],
// @"pdtDetails":self.transfer.pdtDetails,
// @"accountDetails":self.transfer.accountDetails
// };
// [IBTLoadingView showProgressLabel:msg];
// [[ICRHTTPController sharedController] saveTransferWithData:dict success:succ failure:fail];
NSDictionary
*
dict
=
@{
@"uuid"
:
self
.
transfer
.
uuid
,
NSDictionary
*
dict
=
@{
@"uuid"
:
self
.
transfer
.
uuid
,
@"version"
:
self
.
transfer
.
version
,
@"version"
:
self
.
transfer
.
version
,
@"billnumber"
:
self
.
transfer
.
billnumber
,
@"billnumber"
:
self
.
transfer
.
billnumber
,
@"enterprise"
:
[
ICRUserUtil
sharedInstance
].
orgId
,
@"enterprise"
:
[
ICRUserUtil
sharedInstance
].
orgId
,
@"state"
:
TRANSFER_STATE_UNRECEIVED
,
@"state"
:
self
.
transfer
.
state
,
@"warehouseUuid"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseUuid
],
@"warehouseUuid"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseUuid
],
@"warehouseCode"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseCode
],
@"warehouseCode"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseCode
],
@"warehouseName"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseName
],
@"warehouseName"
:
[
IBTCommon
checkString
:
self
.
transfer
.
warehouseName
],
@"rwarehouseUuid"
:
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseUuid
],
@"rwarehouseUuid"
:
[
IBTCommon
checkString
:
self
.
transfer
.
rwarehouseUuid
],
...
@@ -372,13 +395,11 @@ typedef enum : NSUInteger {
...
@@ -372,13 +395,11 @@ typedef enum : NSUInteger {
@"carnumber"
:
[
IBTCommon
checkString
:
self
.
transfer
.
carnumber
],
@"carnumber"
:
[
IBTCommon
checkString
:
self
.
transfer
.
carnumber
],
@"type"
:
[
IBTCommon
checkString
:
self
.
transfer
.
type
],
@"type"
:
[
IBTCommon
checkString
:
self
.
transfer
.
type
],
@"carphone"
:
[
IBTCommon
checkString
:
self
.
transfer
.
carphone
],
@"carphone"
:
[
IBTCommon
checkString
:
self
.
transfer
.
carphone
],
@"arriveDate"
:
[
IBTCommon
checkString
:
self
.
transfer
.
arriveDate
],
@"note"
:
[
IBTCommon
checkString
:
self
.
transfer
.
note
],
@"note"
:
[
IBTCommon
checkString
:
self
.
transfer
.
note
],
@"pdtDetails"
:
self
.
transfer
.
pdtDetails
,
@"pdtDetails"
:
self
.
transfer
.
pdtDetails
,
@"accountDetails"
:
self
.
transfer
.
accountDetails
};
};
[
IBTLoadingView
showProgressLabel
:
msg
];
[
IBTLoadingView
showProgressLabel
:
msg
];
[[
ICRHTTPController
sharedController
]
save
Transfer
WithData
:
dict
success
:
succ
failure
:
fail
];
[[
ICRHTTPController
sharedController
]
save
ReceiptAndReceive
WithData
:
dict
success
:
succ
failure
:
fail
];
}
}
...
...
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