Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
total
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
张杰
total
Commits
5f4366b6
Commit
5f4366b6
authored
Feb 08, 2017
by
Sandy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.oschina.net/gomore/total
parents
ee7d5b24
5073603b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
327 additions
and
239 deletions
+327
-239
NewObtainViewController.m
total/GTOApp/Business/NewObtainViewController.m
+29
-27
NewOrderViewController.m
total/GTOApp/Business/NewOrderViewController.m
+28
-26
NewRequestViewController.m
total/GTOApp/Business/NewRequestViewController.m
+29
-26
OrderDetailsViewController.m
total/GTOApp/Business/OrderDetailsViewController.m
+52
-47
SeeDistributionViewController.m
total/GTOApp/Business/SeeDistributionViewController.m
+5
-0
SeeObtainViewController.m
total/GTOApp/Business/SeeObtainViewController.m
+61
-56
SeeOrderViewController.m
total/GTOApp/Business/SeeOrderViewController.m
+2
-2
SeeRequestViewController.m
total/GTOApp/Business/SeeRequestViewController.m
+52
-49
SelectOrderViewController.m
total/GTOApp/Business/SelectOrderViewController.m
+30
-2
BaseViewController.h
total/GTOApp/UserUtil/BaseViewController.h
+9
-0
BaseViewController.m
total/GTOApp/UserUtil/BaseViewController.m
+22
-0
GTOCommonTools.m
total/GTOApp/UserUtil/GTOCommonTools.m
+4
-0
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+4
-4
No files found.
total/GTOApp/Business/NewObtainViewController.m
View file @
5f4366b6
...
...
@@ -1107,36 +1107,38 @@
-
(
void
)
commitRecevieOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
saveReceiveOrder
:
^
(
NSString
*
uuidString
)
{
RsOperateInfo
*
user
=
[[
RsOperateInfo
alloc
]
init
];
user
.
operName
=
[
ICRUserUtil
sharedInstance
].
f_user_name
;
user
.
operId
=
[
ICRUserUtil
sharedInstance
].
f_user_uuid
;
user
.
enterprise
=
[
ICRUserUtil
sharedInstance
].
f_enterprise_uuid
;
user
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
IBTLoadingView
showProgressLabel
:
@"提交中..."
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
uuidString
]
withRequestType
:
ZERO
withParameter
:
[
user
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
self
showAlertViewController
:
@"确定提交该收油单吗?"
withCompleted
:
^
{
[
weakSelf
saveReceiveOrder
:
^
(
NSString
*
uuidString
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
SeeObtainViewController
*
orderBill
=
[
weakSelf
.
storyboard
instantiateViewControllerWithIdentifier
:
@"SeeObtainViewController"
];
orderBill
.
orderUUIDString
=
uuidString
;
orderBill
.
isReturnRootVC
=
YES
;
orderBill
.
storeDict
=
weakSelf
.
recordSelectGasStation
;
[
weakSelf
PushViewController
:
orderBill
animated
:
YES
];
});
RsOperateInfo
*
user
=
[[
RsOperateInfo
alloc
]
init
];
user
.
operName
=
[
ICRUserUtil
sharedInstance
].
f_user_name
;
user
.
operId
=
[
ICRUserUtil
sharedInstance
].
f_user_uuid
;
user
.
enterprise
=
[
ICRUserUtil
sharedInstance
].
f_enterprise_uuid
;
user
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
IBTLoadingView
showProgressLabel
:
@"提交中..."
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
uuidString
]
withRequestType
:
ZERO
withParameter
:
[
user
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
}
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
SeeObtainViewController
*
orderBill
=
[
weakSelf
.
storyboard
instantiateViewControllerWithIdentifier
:
@"SeeObtainViewController"
];
orderBill
.
orderUUIDString
=
uuidString
;
orderBill
.
isReturnRootVC
=
YES
;
orderBill
.
storeDict
=
weakSelf
.
recordSelectGasStation
;
[
weakSelf
PushViewController
:
orderBill
animated
:
YES
];
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}
isPushDetails
:
NO
];
}
isPushDetails
:
NO
];
}];
}
...
...
total/GTOApp/Business/NewOrderViewController.m
View file @
5f4366b6
...
...
@@ -454,33 +454,35 @@
-
(
void
)
saveOrderRequest
:
(
NSDictionary
*
)
dict
orderDetails
:
(
OrderBill
*
)
order
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
IBTLoadingView
showProgressLabel
:
@"正在提交..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
RsOperateInfo
*
commit
=
[[
RsOperateInfo
alloc
]
init
];
commit
.
operId
=
user
.
f_user_uuid
;
commit
.
operName
=
user
.
f_user_name
;
commit
.
time
=
[
GTOCommonTools
GetCurrenttime
];
commit
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/orderBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
dict
[
@"uuid"
]]
withRequestType
:
ZERO
withParameter
:
[
commit
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
OrderDetailsViewController
*
orderDetail
=
[
self
.
storyboard
instantiateViewControllerWithIdentifier
:
@"OrderDetailsViewController"
];
orderDetail
.
orderUUIDString
=
dict
[
@"uuid"
];
orderDetail
.
boolValue
=
YES
;
orderDetail
.
title
=
@"订油单详情"
;
[
weakSelf
PushViewController
:
orderDetail
animated
:
YES
];
});
[
self
showAlertViewController
:
@"确定提交该订油单吗?"
withCompleted
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"正在提交..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
RsOperateInfo
*
commit
=
[[
RsOperateInfo
alloc
]
init
];
commit
.
operId
=
user
.
f_user_uuid
;
commit
.
operName
=
user
.
f_user_name
;
commit
.
time
=
[
GTOCommonTools
GetCurrenttime
];
commit
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/orderBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
dict
[
@"uuid"
]]
withRequestType
:
ZERO
withParameter
:
[
commit
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
gotoOrderDetail
:
dict
[
@"uuid"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
OrderDetailsViewController
*
orderDetail
=
[
self
.
storyboard
instantiateViewControllerWithIdentifier
:
@"OrderDetailsViewController"
];
orderDetail
.
orderUUIDString
=
dict
[
@"uuid"
];
orderDetail
.
boolValue
=
YES
;
orderDetail
.
title
=
@"订油单详情"
;
[
weakSelf
PushViewController
:
orderDetail
animated
:
YES
];
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
gotoOrderDetail
:
dict
[
@"uuid"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}
...
...
total/GTOApp/Business/NewRequestViewController.m
View file @
5f4366b6
...
...
@@ -621,35 +621,38 @@
-
(
void
)
commitOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
s
aveOrderBill
:
NO
returnSaveSateBlock
:
^
(
NSDictionary
*
dict
,
DepotRequestBill
*
orderbBill
)
{
[
self
s
howAlertViewController
:
@"确定提交该建仓申请单吗?"
withCompleted
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"提交中..."
];
RsOperateInfo
*
submitOrder
=
[[
RsOperateInfo
alloc
]
init
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
submitOrder
.
operId
=
user
.
f_user_uuid
;
submitOrder
.
operName
=
user
.
f_user_name
;
submitOrder
.
time
=
[
GTOCommonTools
GetCurrenttime
];
submitOrder
.
enterprise
=
user
.
f_enterprise_uuid
;
NSLog
(
@"%@"
,[
submitOrder
toDictionary
]);
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/submit/%@"
,
HTTP_REST_API_BASE_URL
,
dict
[
@"uuid"
]]
withRequestType
:
ZERO
withParameter
:
[
submitOrder
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
weakSelf
saveOrderBill
:
NO
returnSaveSateBlock
:
^
(
NSDictionary
*
dict
,
DepotRequestBill
*
orderbBill
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
SeeRequestViewController
*
details
=
[
weakSelf
.
storyboard
instantiateViewControllerWithIdentifier
:
@"SeeRequestViewController"
]
;
details
.
orderUUID
=
dict
[
@"uuid"
]
;
details
.
title
=
@"查看建仓单详情"
;
details
.
boolValue
=
YES
;
[
weakSelf
PushViewController
:
details
animated
:
YES
]
;
});
[
IBTLoadingView
showProgressLabel
:
@"提交中..."
];
RsOperateInfo
*
submitOrder
=
[[
RsOperateInfo
alloc
]
init
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
submitOrder
.
operId
=
user
.
f_user_uuid
;
submitOrder
.
operName
=
user
.
f_user_name
;
submitOrder
.
time
=
[
GTOCommonTools
GetCurrenttime
]
;
submitOrder
.
enterprise
=
user
.
f_enterprise_uuid
;
NSLog
(
@"%@"
,[
submitOrder
toDictionary
])
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/submit/%@"
,
HTTP_REST_API_BASE_URL
,
dict
[
@"uuid"
]]
withRequestType
:
ZERO
withParameter
:
[
submitOrder
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
saveOrderSuccess
:
dict
[
@"uuid"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
SeeRequestViewController
*
details
=
[
weakSelf
.
storyboard
instantiateViewControllerWithIdentifier
:
@"SeeRequestViewController"
];
details
.
orderUUID
=
dict
[
@"uuid"
];
details
.
title
=
@"查看建仓单详情"
;
details
.
boolValue
=
YES
;
[
weakSelf
PushViewController
:
details
animated
:
YES
];
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
saveOrderSuccess
:
dict
[
@"uuid"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
total/GTOApp/Business/OrderDetailsViewController.m
View file @
5f4366b6
...
...
@@ -460,29 +460,32 @@
-
(
void
)
saveOrderRequest
:
(
NSDictionary
*
)
dict
orderDetails
:
(
OrderBill
*
)
order
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
IBTLoadingView
showProgressLabel
:
@"正在提交..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
RsOperateInfo
*
commit
=
[[
RsOperateInfo
alloc
]
init
];
commit
.
operId
=
user
.
f_user_uuid
;
commit
.
operName
=
user
.
f_user_name
;
commit
.
time
=
[
GTOCommonTools
GetCurrenttime
];
commit
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/orderBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
dict
[
@"uuid"
]]
withRequestType
:
ZERO
withParameter
:
[
commit
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
[
weakSelf
gotoOrderDetail
:
dict
[
@"uuid"
]];
[
self
showAlertViewController
:
@"确定提交该订油单吗?"
withCompleted
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"正在提交..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
RsOperateInfo
*
commit
=
[[
RsOperateInfo
alloc
]
init
];
commit
.
operId
=
user
.
f_user_uuid
;
commit
.
operName
=
user
.
f_user_name
;
commit
.
time
=
[
GTOCommonTools
GetCurrenttime
];
commit
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/orderBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
dict
[
@"uuid"
]]
withRequestType
:
ZERO
withParameter
:
[
commit
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
gotoOrderDetail
:
dict
[
@"uuid"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
[
weakSelf
gotoOrderDetail
:
dict
[
@"uuid"
]];
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
gotoOrderDetail
:
dict
[
@"uuid"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}
#pragma mark - 订油量输入
-
(
void
)
textFieldEndEditing
:
(
UITextField
*
)
textField
{
...
...
@@ -511,35 +514,37 @@
-
(
void
)
deleteOrderBill
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
//操作人信息
RsOperateInfo
*
info
=
[[
RsOperateInfo
alloc
]
init
];
info
.
operId
=
user
.
f_user_uuid
;
info
.
time
=
[
GTOCommonTools
GetCurrenttime
];
info
.
operName
=
user
.
f_user_name
;
info
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/orderBill/remove/%@"
,
HTTP_REST_API_BASE_URL
,
self
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
self
showAlertViewController
:
@"确定删除该订油单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
weakSelf
.
boolValue
)
{
[
weakSelf
PopToRootViewControllerAnimated
:
YES
];
}
else
{
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
YES
];
[
weakSelf
PopViewControllerAnimated
:
YES
];
}
});
}
else
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
//操作人信息
RsOperateInfo
*
info
=
[[
RsOperateInfo
alloc
]
init
];
info
.
operId
=
user
.
f_user_uuid
;
info
.
time
=
[
GTOCommonTools
GetCurrenttime
];
info
.
operName
=
user
.
f_user_name
;
info
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/orderBill/remove/%@"
,
HTTP_REST_API_BASE_URL
,
weakSelf
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
weakSelf
.
boolValue
)
{
[
weakSelf
PopToRootViewControllerAnimated
:
YES
];
}
else
{
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
YES
];
[
weakSelf
PopViewControllerAnimated
:
YES
];
}
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
@"删除失败"
];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"删除失败"
];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"删除失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
total/GTOApp/Business/SeeDistributionViewController.m
View file @
5f4366b6
...
...
@@ -80,6 +80,11 @@
UIView
*
loadHeaderView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
220
)];
[
loadHeaderView
addSubview
:
headerView
];
headerView
.
model
=
self
.
orderBill
;
//区分配送单
if
([
self
.
title
isEqualToString
:
@"配油单明细"
]
&&
[
self
.
orderBill
.
state
isEqualToString
:
GTO_REPAIR_STATE_INITIAL
])
{
headerView
.
orderStateLabe
.
text
=
@"已作废"
;
headerView
.
orderStateLabe
.
textColor
=
RGBA
(
124
,
135
,
136
,
1
);
}
self
.
distributionTableView
.
tableHeaderView
=
loadHeaderView
;
}
...
...
total/GTOApp/Business/SeeObtainViewController.m
View file @
5f4366b6
...
...
@@ -244,7 +244,7 @@
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
weakSelf
.
orderDetails
=
[[
ReceiveBill
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
//保存收油单状态
if
([
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"submit"
]
||
[
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"canceled"
]
||
[
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"accomplished"
])
{
if
([
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"submit"
]
||
[
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"canceled"
]
||
[
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"accomplished"
]
|
[
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"delete"
]
|
[
weakSelf
.
orderDetails
.
state
isEqualToString
:
@"cancel"
]
)
{
weakSelf
.
orderStateBoolValue
=
YES
;
}
//加入数据源
...
...
@@ -337,7 +337,7 @@
self
.
seeObtainTableView
.
tableHeaderView
=
view
;
//保存、提交
__weak
typeof
(
self
)
weakSelf
=
self
;
if
(
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"canceled"
]
&&
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"accomplished"
]
&&
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"submit"
])
{
if
(
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"canceled"
]
&&
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"accomplished"
]
&&
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"submit"
]
&&
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"delete"
]
&&
!
[
self
.
orderDetails
.
state
isEqualToString
:
@"cancel"
]
)
{
SaveCommitView
*
commitView
=
[
SaveCommitView
initializeTwo
];
commitView
.
frame
=
CGRectMake
(
0
,
ScreenSize
.
height
-
164
,
ScreenSize
.
width
,
100
);
...
...
@@ -1027,35 +1027,38 @@
-
(
void
)
commitRecevieOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
saveReceiveOrder
:
^
(
NSString
*
uuidString
)
{
RsOperateInfo
*
user
=
[[
RsOperateInfo
alloc
]
init
];
user
.
operName
=
[
ICRUserUtil
sharedInstance
].
f_user_name
;
user
.
operId
=
[
ICRUserUtil
sharedInstance
].
f_user_uuid
;
user
.
enterprise
=
[
ICRUserUtil
sharedInstance
].
f_enterprise_uuid
;
user
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
IBTLoadingView
showProgressLabel
:
@"提交中..."
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
uuidString
]
withRequestType
:
ZERO
withParameter
:
[
user
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
SeeObtainViewController
*
orderBill
=
[
weakSelf
.
storyboard
instantiateViewControllerWithIdentifier
:
@"SeeObtainViewController"
];
orderBill
.
orderUUIDString
=
uuidString
;
orderBill
.
isReturnRootVC
=
YES
;
orderBill
.
storeDict
=
self
.
storeDict
;
//油站
[
weakSelf
PushViewController
:
orderBill
animated
:
YES
];
});
[
self
showAlertViewController
:
@"确定提交该收油单吗?"
withCompleted
:
^
{
[
weakSelf
saveReceiveOrder
:
^
(
NSString
*
uuidString
)
{
RsOperateInfo
*
user
=
[[
RsOperateInfo
alloc
]
init
];
user
.
operName
=
[
ICRUserUtil
sharedInstance
].
f_user_name
;
user
.
operId
=
[
ICRUserUtil
sharedInstance
].
f_user_uuid
;
user
.
enterprise
=
[
ICRUserUtil
sharedInstance
].
f_enterprise_uuid
;
user
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
IBTLoadingView
showProgressLabel
:
@"提交中..."
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/submit/%@"
,
HTTP_REST_API_BASE_URL
,
uuidString
]
withRequestType
:
ZERO
withParameter
:
[
user
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"提交成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
SeeObtainViewController
*
orderBill
=
[
weakSelf
.
storyboard
instantiateViewControllerWithIdentifier
:
@"SeeObtainViewController"
];
orderBill
.
orderUUIDString
=
uuidString
;
orderBill
.
isReturnRootVC
=
YES
;
orderBill
.
storeDict
=
weakSelf
.
storeDict
;
//油站
[
weakSelf
PushViewController
:
orderBill
animated
:
YES
];
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
saveOrderSuccess
:
uuidString
];
}
}
else
{
[
IBTLoadingView
hideHUDWithText
:
returnValue
[
@"message"
]];
[
weakSelf
saveOrderSuccess
:
uuidString
];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}
isPushDetails
:
NO
];
}
isPushDetails
:
NO
];
}];
}
#pragma mark -保存收油单成功
...
...
@@ -1138,35 +1141,37 @@
-
(
void
)
deleteOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
//操作人信息
RsOperateInfo
*
info
=
[[
RsOperateInfo
alloc
]
init
];
info
.
operId
=
user
.
f_user_uuid
;
info
.
time
=
[
GTOCommonTools
GetCurrenttime
];
info
.
operName
=
user
.
f_user_name
;
info
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/remove/%@"
,
HTTP_REST_API_BASE_URL
,
self
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
self
showAlertViewController
:
@"确定删除该收油单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
//操作人信息
RsOperateInfo
*
info
=
[[
RsOperateInfo
alloc
]
init
];
info
.
operId
=
user
.
f_user_uuid
;
info
.
time
=
[
GTOCommonTools
GetCurrenttime
];
info
.
operName
=
user
.
f_user_name
;
info
.
enterprise
=
user
.
f_enterprise_uuid
;
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
weakSelf
.
orderStateBoolValue
)
{
[
weakSelf
PopToRootViewControllerAnimated
:
YES
];
}
else
{
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
YES
];
[
weakSelf
PopViewControllerAnimated
:
YES
];
}
});
}
else
{
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/remove/%@"
,
HTTP_REST_API_BASE_URL
,
weakSelf
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
weakSelf
.
orderStateBoolValue
)
{
[
weakSelf
PopToRootViewControllerAnimated
:
YES
];
}
else
{
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
YES
];
[
weakSelf
PopViewControllerAnimated
:
YES
];
}
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
@"删除失败"
];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"删除失败"
];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
@"删除失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
total/GTOApp/Business/SeeOrderViewController.m
View file @
5f4366b6
...
...
@@ -560,7 +560,7 @@ typedef enum : NSUInteger {
[
self
hiddenBoltMaskView
:
YES
];
}
if
([
state
isEqualToString
:
@"none"
])
{
state
=
nil
;
state
=
@"desc"
;
}
NSMutableArray
*
array
=
[
NSMutableArray
arrayWithArray
:[
self
.
queryOrder
toDictionary
][
@"orders"
]];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
...
...
@@ -624,7 +624,7 @@ typedef enum : NSUInteger {
array
[
2
]
=
[
NSDictionary
dictionary
];
}
else
{
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
[
dict
setValue
:
@"billNumber
Equals
"
forKey
:
@"operation"
];
[
dict
setValue
:
@"billNumber
Like
"
forKey
:
@"operation"
];
[
dict
setValue
:@[
billNumber
]
forKey
:
@"parameters"
];
array
[
2
]
=
dict
;
self
.
queryOrder
.
conditions
=
(
NSArray
<
QueryCondition
>
*
)
array
;
...
...
total/GTOApp/Business/SeeRequestViewController.m
View file @
5f4366b6
...
...
@@ -228,32 +228,34 @@
-
(
void
)
cancelOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"作废"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"作废中..."
];
//操作人
RsOperateInfo
*
infomation
=
[[
RsOperateInfo
alloc
]
init
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
infomation
.
operId
=
user
.
f_user_uuid
;
infomation
.
operName
=
user
.
f_user_name
;
infomation
.
enterprise
=
user
.
f_enterprise_uuid
;
infomation
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/cancel/%@"
,
HTTP_REST_API_BASE_URL
,
self
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"作废成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
weakSelf
.
boolValue
?[
weakSelf
PopToRootViewControllerAnimated
:
YES
]:[
weakSelf
PopViewControllerAnimated
:
YES
];
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
NO
];
});
[
self
showAlertViewController
:
@"确定作废该建仓申请单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"作废"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"作废中..."
];
//操作人
RsOperateInfo
*
infomation
=
[[
RsOperateInfo
alloc
]
init
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
infomation
.
operId
=
user
.
f_user_uuid
;
infomation
.
operName
=
user
.
f_user_name
;
infomation
.
enterprise
=
user
.
f_enterprise_uuid
;
infomation
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/cancel/%@"
,
HTTP_REST_API_BASE_URL
,
weakSelf
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"作废成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
weakSelf
.
boolValue
?[
weakSelf
PopToRootViewControllerAnimated
:
YES
]:[
weakSelf
PopViewControllerAnimated
:
YES
];
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
NO
];
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
returnValue
[
@"message"
]];
}
}
else
{
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
returnValue
[
@"message"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
@@ -262,35 +264,36 @@
-
(
void
)
deleteOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
//操作人
RsOperateInfo
*
infomation
=
[[
RsOperateInfo
alloc
]
init
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
infomation
.
operId
=
user
.
f_user_uuid
;
infomation
.
operName
=
user
.
f_user_name
;
infomation
.
enterprise
=
user
.
f_enterprise_uuid
;
infomation
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/remove/%@"
,
HTTP_REST_API_BASE_URL
,
self
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
weakSelf
.
boolValue
?[
weakSelf
PopToRootViewControllerAnimated
:
YES
]:[
weakSelf
PopViewControllerAnimated
:
YES
];
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
YES
];
});
[
self
showAlertViewController
:
@"确定删除该建仓申请单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
//操作人
RsOperateInfo
*
infomation
=
[[
RsOperateInfo
alloc
]
init
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
infomation
.
operId
=
user
.
f_user_uuid
;
infomation
.
operName
=
user
.
f_user_name
;
infomation
.
enterprise
=
user
.
f_enterprise_uuid
;
infomation
.
time
=
[
GTOCommonTools
GetCurrenttime
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/remove/%@"
,
HTTP_REST_API_BASE_URL
,
weakSelf
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
}
else
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
weakSelf
.
boolValue
?[
weakSelf
PopToRootViewControllerAnimated
:
YES
]:[
weakSelf
PopViewControllerAnimated
:
YES
];
[
weakSelf
returnUUIDsingAfterDeleteOrCancel
:
YES
];
});
}
else
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
returnValue
[
@"message"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
returnValue
[
@"message"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
total/GTOApp/Business/SelectOrderViewController.m
View file @
5f4366b6
...
...
@@ -198,9 +198,16 @@
-
(
void
)
sureButtonClickAction
:
(
UIBarButtonItem
*
)
button
{
if
(
self
.
completeSelectBlock
)
{
if
([
self
.
recordSelectState
containsObject
:
@"1"
])
{
self
.
completeSelectBlock
(
self
.
orderResultArray
[[
self
.
recordSelectState
indexOfObject
:
@"1"
]]);
NSDictionary
*
dict
=
self
.
orderResultArray
[[
self
.
recordSelectState
indexOfObject
:
@"1"
]];
WS
(
weakSelf
);
[
self
judgeOrderIsEmploy
:
dict
[
@"billnumber"
]
resultBlock
:
^
(
BOOL
boolValue
)
{
if
(
boolValue
)
{
weakSelf
.
completeSelectBlock
(
dict
);
}
else
{
[
weakSelf
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
}];
}
else
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
...
...
@@ -224,6 +231,27 @@
button
.
selected
=
!
boolValue
;
}
#pragma mark -判断配油单是否被使用
-
(
void
)
judgeOrderIsEmploy
:
(
NSString
*
)
pickingBillNumber
resultBlock
:
(
void
(
^
)(
BOOL
boolValue
))
block
{
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/getByPickingBillNumberAndState/%@"
,
HTTP_REST_API_BASE_URL
,
pickingBillNumber
]
withRequestType
:
ONE
withParameter
:
nil
withSuccess
:^
(
id
returnValue
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
block
(
YES
);
}
else
{
[
IBTLoadingView
showTextOnly
:
returnValue
[
@"message"
]];
}
}
withFailed
:^
(
NSError
*
failed
)
{
[
GTOCommonTools
cancelMJRefreshState
:
self
.
selectOrderTableView
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}
#pragma mark -友好界面
-
(
UIImage
*
)
imageForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
{
...
...
total/GTOApp/UserUtil/BaseViewController.h
View file @
5f4366b6
...
...
@@ -10,4 +10,13 @@
@interface
BaseViewController
:
UIViewController
/**
* UIAlertView
*
* @param message 提示信息
* @param completed 完成回调
*/
-
(
void
)
showAlertViewController
:(
NSString
*
)
message
withCompleted
:(
void
(
^
)())
completed
;
@end
total/GTOApp/UserUtil/BaseViewController.m
View file @
5f4366b6
...
...
@@ -45,6 +45,28 @@
}
}
#pragma mark -UIAlertView
-
(
void
)
showAlertViewController
:
(
NSString
*
)
message
withCompleted
:
(
void
(
^
)())
completed
{
UIAlertController
*
alertVc
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
message
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertVc
addAction
:[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
nil
]];
[
alertVc
addAction
:[
UIAlertAction
actionWithTitle
:
@"确认"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
if
(
completed
)
{
completed
();
}
}]];
[
self
presentViewController
:
alertVc
animated
:
YES
completion
:
nil
];
}
#pragma mark -设置共用属性
-
(
void
)
uiConfigAction
{
...
...
total/GTOApp/UserUtil/GTOCommonTools.m
View file @
5f4366b6
...
...
@@ -282,6 +282,10 @@
return
@"已配送"
;
}
else
if
([
stateString
isEqualToString
:
@"effectived"
])
{
//已生效
return
@"已生效"
;
}
else
if
([
stateString
isEqualToString
:
@"delete"
])
{
//已删除
return
@"已删除"
;
}
else
if
([
stateString
isEqualToString
:
@"cancel"
])
{
//已作废
return
@"已作废"
;
}
return
nil
;
}
...
...
total/Macro/GTOAppMacro.h
View file @
5f4366b6
...
...
@@ -84,12 +84,12 @@
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//测试环境
//
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
//
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//开发环境
#define HTTP_LOCAL_BASE_URL @"http://139.196.195.30:8093"
#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
//
#define HTTP_LOCAL_BASE_URL @"http://139.196.195.30:8093"
//
#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
...
...
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