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
dc78c1b6
Commit
dc78c1b6
authored
May 12, 2017
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发运单收货状态可保存数据
parent
70926883
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
31 deletions
+95
-31
project.pbxproj
XFFruit.xcodeproj/project.pbxproj
+2
-2
PurchaseDetailViewController.m
...llers/Purchase/Controllers/PurchaseDetailViewController.m
+46
-20
TransportDetailViewController.m
...ers/Transport/Controllers/TransportDetailViewController.m
+47
-9
No files found.
XFFruit.xcodeproj/project.pbxproj
View file @
dc78c1b6
...
...
@@ -4432,7 +4432,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.xffruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
""
;
PROVISIONING_PROFILE
=
"
e2cec26c-3666-4512-9b9a-cdb4cd9da56d
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
name
=
Debug
;
...
...
@@ -4457,7 +4457,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.xffruit
;
PRODUCT_NAME
=
XFFruit
;
PROVISIONING_PROFILE
=
""
;
PROVISIONING_PROFILE
=
"
e2cec26c-3666-4512-9b9a-cdb4cd9da56d
"
;
USER_HEADER_SEARCH_PATHS
=
"${SRCROOT}/**"
;
};
name
=
Release
;
...
...
XFFruit/ViewControllers/Purchase/Controllers/PurchaseDetailViewController.m
View file @
dc78c1b6
...
...
@@ -29,7 +29,6 @@ typedef enum : NSUInteger {
SureTag
,
//确定
SaveTag
,
//收货状态:保存
ReceiveTag
,
//收货状态:收货
AbortTag
//收货状态:作废
}
BtnTag
;
@interface
PurchaseDetailViewController
()
<
UIAlertViewDelegate
>
...
...
@@ -243,7 +242,7 @@ typedef enum : NSUInteger {
}
}
else
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_WAITE_RECIEVE
]){
if
([
IBTCommon
checkIsPermission
:
RECEIVE_ACTION_RECEIVE
])
{
[
self
createBtnWithArr
:@[
@"
作废
"
,
@"收货"
]];
[
self
createBtnWithArr
:@[
@"
保存
"
,
@"收货"
]];
}
else
{
[
self
hiddenTwoBtn
];
}
...
...
@@ -331,10 +330,9 @@ typedef enum : NSUInteger {
break
;
case
SaveTag
:
{
// if ([self checkReceive]) {
// self.state = RECEIVE_STATE_SAVE;
// [self getDataFromServer:RECEIVE_STATE_SAVE msg:@"正在保存..."];
// }
if
([
self
checkReceive
])
{
[
self
httpSave
];
}
}
break
;
case
ReceiveTag
:{
...
...
@@ -344,15 +342,6 @@ typedef enum : NSUInteger {
alertView
.
tag
=
ReceiveTag
;
[
alertView
show
];
}
}
break
;
case
AbortTag
:
{
// CLog(@"作废");
// UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"请确认作废" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确认", nil];
// alertView.delegate = self;
// alertView.tag = AbortTag;
// [alertView show];
}
break
;
default
:
...
...
@@ -551,7 +540,8 @@ typedef enum : NSUInteger {
[
p
setValuesForKeysWithDictionary
:
billDict
];
billProbuct
.
purchasePdt
=
p
;
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_WAITE_RECIEVE
])
{
//待收货并且已收货数小于1的时候才可以显示默认值
if
([
self
.
bill
.
state
isEqualToString
:
PURCHASE_STATE_WAITE_RECIEVE
]
&&
billProbuct
.
rctQty
.
floatValue
<
1
)
{
if
(
self
.
isCenter
)
{
[
billProbuct
z_setRctQty
:
p
.
qty
.
floatValue
];
...
...
@@ -631,10 +621,6 @@ typedef enum : NSUInteger {
if
(
buttonIndex
==
1
)
{
[
self
dealByAction
:
PURCHASE_ACTION_APPROVE
];
}
}
else
if
(
alertView
.
tag
==
AbortTag
)
{
if
(
buttonIndex
==
1
)
{
[
self
dealByAction
:
TRANSFER_STATE_ABORTED
];
//作废
}
}
else
if
(
alertView
.
tag
==
ReceiveTag
){
if
(
buttonIndex
==
1
)
{
// //提交
...
...
@@ -701,6 +687,46 @@ typedef enum : NSUInteger {
[
self
PushViewController
:
nvc
animated
:
YES
];
}
-
(
void
)
httpSave
{
//保存
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
PopViewControllerAnimated
:
YES
];
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
}
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
NSMutableDictionary
*
param
=
[
self
.
bill
dictForCommit
].
mutableCopy
;
NSMutableArray
*
arrProduct
=
[
NSMutableArray
array
];
for
(
TransferPdtDetail
*
pdt
in
_pvc
.
productArr
)
{
PurchaseBillProduct
*
pPdt
=
[
pdt
changeToPurchasePdt
];
NSDictionary
*
dict
=
[
pPdt
dictForCommit
];
[
arrProduct
addObject
:
dict
];
}
[
param
setObject
:
arrProduct
forKey
:
@"products"
];
[
param
setObject
:
self
.
bill
.
accountDetails
forKey
:
@"accountDetails"
];
[
IBTLoadingView
showProgressLabel
:
@"保存..."
];
[[
ICRHTTPController
sharedController
]
savePurchaseWithData
:
param
success
:
succ
failure
:
fail
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
XFFruit/ViewControllers/Transport/Controllers/TransportDetailViewController.m
View file @
dc78c1b6
...
...
@@ -27,6 +27,7 @@ typedef enum : NSUInteger {
EndTag
,
SubmitTag
,
ReceiveTag
,
//收货状态:收货
SaveTag
}
BtnTag
;
@interface
TransportDetailViewController
()
...
...
@@ -290,15 +291,10 @@ typedef enum : NSUInteger {
[
alertView
show
];
}
break
;
case
ReceiveTag
:
case
SaveTag
:
{
if
([
self
checkReceive
])
{
UIAlertView
*
alertView
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"温馨提示"
message
:
@"收货后不能重复收货,请确认是否要收货?"
delegate
:
self
cancelButtonTitle
:
@"取消"
otherButtonTitles
:
@"确认"
,
nil
];
alertView
.
delegate
=
self
;
alertView
.
tag
=
ReceiveTag
;
[
alertView
show
];
}
[
self
httpSave
];
}
break
;
default
:
...
...
@@ -351,6 +347,8 @@ typedef enum : NSUInteger {
btnTag
=
SubmitTag
;
}
else
if
([
arr
[
i
]
isEqualToString
:
@"收货"
]){
btnTag
=
ReceiveTag
;
}
else
if
([
arr
[
i
]
isEqualToString
:
@"保存"
]){
btnTag
=
SaveTag
;
}
CGRect
btnFrame
=
CGRectMake
(
LeftMargin
+
(
LeftMargin
+
btnWidth
)
*
i
,
ScreenSize
.
height
-
64
-
BottomHeight
+
5
,
btnWidth
,
40
);
UIButton
*
perBtn
=
[
IBTCustomButtom
creatButtonWithFrame
:
btnFrame
target
:
self
sel
:
@selector
(
btnClick
:
)
tag
:
btnTag
image
:
nil
title
:
arr
[
i
]
titleColor
:
[
UIColor
whiteColor
]
isCorner
:
YES
corner
:
5
bgColor
:
GXF_COMMIT_COLOR
];
...
...
@@ -405,7 +403,7 @@ typedef enum : NSUInteger {
}
}
else
if
([
self
.
transport
.
state
isEqualToString
:
TRANSPORT_STATE_UNRECEIVED
]
&&
!
self
.
isWms
){
[
self
createBtnWithArr
:@[
@"收货"
]];
[
self
createBtnWithArr
:@[
@"
保存"
,
@"
收货"
]];
}
else
{
[
self
hiddenAllBtn
];
...
...
@@ -628,6 +626,46 @@ typedef enum : NSUInteger {
}];
}
-
(
void
)
httpSave
{
NSMutableDictionary
*
param
=
[
self
.
transport
dictForCommit
].
mutableCopy
;
NSMutableArray
*
arrProduct
=
[
NSMutableArray
array
];
for
(
TransferPdtDetail
*
pdt
in
_pvc
.
productArr
)
{
TransportPdtDetail
*
pPdt
=
[
pdt
changeToTransportPdt
];
NSDictionary
*
dict
=
[
pPdt
dictForCommit
];
[
arrProduct
addObject
:
dict
];
}
[
param
setObject
:
arrProduct
forKey
:
@"pdtDetails"
];
[
param
setObject
:
self
.
transport
.
accountDetails
forKey
:
@"accountDetails"
];
//保存
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
PopViewControllerAnimated
:
YES
];
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
}
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
[[
ICRHTTPController
sharedController
]
saveTransportWithData
:
param
success
:
succ
failure
:
fail
];
}
-
(
BOOL
)
checkReceive
{
for
(
NSString
*
isEdit
in
_pvc
.
defaultState
)
{
if
([
isEdit
isEqualToString
:
@"NO"
])
{
...
...
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