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
5073603b
Commit
5073603b
authored
Feb 08, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订配收,增加确认选项
parent
41ec2a23
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
284 additions
and
233 deletions
+284
-233
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
SeeObtainViewController.m
total/GTOApp/Business/SeeObtainViewController.m
+59
-54
SeeRequestViewController.m
total/GTOApp/Business/SeeRequestViewController.m
+52
-49
BaseViewController.h
total/GTOApp/UserUtil/BaseViewController.h
+9
-0
BaseViewController.m
total/GTOApp/UserUtil/BaseViewController.m
+22
-0
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+4
-4
No files found.
total/GTOApp/Business/NewObtainViewController.m
View file @
5073603b
...
...
@@ -1107,7 +1107,8 @@
-
(
void
)
commitRecevieOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
saveReceiveOrder
:
^
(
NSString
*
uuidString
)
{
[
self
showAlertViewController
:
@"确定提交该收油单吗?"
withCompleted
:
^
{
[
weakSelf
saveReceiveOrder
:
^
(
NSString
*
uuidString
)
{
RsOperateInfo
*
user
=
[[
RsOperateInfo
alloc
]
init
];
user
.
operName
=
[
ICRUserUtil
sharedInstance
].
f_user_name
;
...
...
@@ -1137,6 +1138,7 @@
}];
}
isPushDetails
:
NO
];
}];
}
...
...
total/GTOApp/Business/NewOrderViewController.m
View file @
5073603b
...
...
@@ -454,6 +454,7 @@
-
(
void
)
saveOrderRequest
:
(
NSDictionary
*
)
dict
orderDetails
:
(
OrderBill
*
)
order
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
showAlertViewController
:
@"确定提交该订油单吗?"
withCompleted
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"正在提交..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
RsOperateInfo
*
commit
=
[[
RsOperateInfo
alloc
]
init
];
...
...
@@ -482,6 +483,7 @@
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}
#pragma mark - 订油量输入
...
...
total/GTOApp/Business/NewRequestViewController.m
View file @
5073603b
...
...
@@ -621,7 +621,9 @@
-
(
void
)
commitOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
saveOrderBill
:
NO
returnSaveSateBlock
:
^
(
NSDictionary
*
dict
,
DepotRequestBill
*
orderbBill
)
{
[
self
showAlertViewController
:
@"确定提交该建仓申请单吗?"
withCompleted
:
^
{
[
weakSelf
saveOrderBill
:
NO
returnSaveSateBlock
:
^
(
NSDictionary
*
dict
,
DepotRequestBill
*
orderbBill
)
{
[
IBTLoadingView
showProgressLabel
:
@"提交中..."
];
RsOperateInfo
*
submitOrder
=
[[
RsOperateInfo
alloc
]
init
];
...
...
@@ -652,6 +654,7 @@
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
total/GTOApp/Business/OrderDetailsViewController.m
View file @
5073603b
...
...
@@ -460,6 +460,7 @@
-
(
void
)
saveOrderRequest
:
(
NSDictionary
*
)
dict
orderDetails
:
(
OrderBill
*
)
order
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
showAlertViewController
:
@"确定提交该订油单吗?"
withCompleted
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"正在提交..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
RsOperateInfo
*
commit
=
[[
RsOperateInfo
alloc
]
init
];
...
...
@@ -482,7 +483,9 @@
[
IBTLoadingView
hideHUDWithText
:
@"提交失败"
];
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}
#pragma mark - 订油量输入
-
(
void
)
textFieldEndEditing
:
(
UITextField
*
)
textField
{
...
...
@@ -511,7 +514,8 @@
-
(
void
)
deleteOrderBill
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
self
showAlertViewController
:
@"确定删除该订油单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
...
...
@@ -521,7 +525,7 @@
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
,
s
elf
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/orderBill/remove/%@"
,
HTTP_REST_API_BASE_URL
,
weakS
elf
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
...
...
@@ -542,6 +546,7 @@
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
#pragma mark -做废订油单
...
...
total/GTOApp/Business/SeeObtainViewController.m
View file @
5073603b
...
...
@@ -1027,7 +1027,8 @@
-
(
void
)
commitRecevieOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
saveReceiveOrder
:
^
(
NSString
*
uuidString
)
{
[
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
;
...
...
@@ -1042,7 +1043,7 @@
SeeObtainViewController
*
orderBill
=
[
weakSelf
.
storyboard
instantiateViewControllerWithIdentifier
:
@"SeeObtainViewController"
];
orderBill
.
orderUUIDString
=
uuidString
;
orderBill
.
isReturnRootVC
=
YES
;
orderBill
.
storeDict
=
s
elf
.
storeDict
;
//油站
orderBill
.
storeDict
=
weakS
elf
.
storeDict
;
//油站
[
weakSelf
PushViewController
:
orderBill
animated
:
YES
];
});
...
...
@@ -1056,6 +1057,8 @@
}];
}
isPushDetails
:
NO
];
}];
}
#pragma mark -保存收油单成功
...
...
@@ -1138,7 +1141,8 @@
-
(
void
)
deleteOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
self
showAlertViewController
:
@"确定删除该收油单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
ICRUserUtil
*
user
=
[
ICRUserUtil
sharedInstance
];
//操作人信息
...
...
@@ -1148,7 +1152,7 @@
info
.
operName
=
user
.
f_user_name
;
info
.
enterprise
=
user
.
f_enterprise_uuid
;
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/remove/%@"
,
HTTP_REST_API_BASE_URL
,
s
elf
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/receiveBill/remove/%@"
,
HTTP_REST_API_BASE_URL
,
weakS
elf
.
orderDetails
.
uuid
]
withRequestType
:
ZERO
withParameter
:
[
info
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
...
...
@@ -1169,6 +1173,7 @@
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
total/GTOApp/Business/SeeRequestViewController.m
View file @
5073603b
...
...
@@ -228,7 +228,8 @@
-
(
void
)
cancelOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"作废"
returnBlock
:
^
{
[
self
showAlertViewController
:
@"确定作废该建仓申请单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"作废"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"作废中..."
];
//操作人
RsOperateInfo
*
infomation
=
[[
RsOperateInfo
alloc
]
init
];
...
...
@@ -237,7 +238,7 @@
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
,
s
elf
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/cancel/%@"
,
HTTP_REST_API_BASE_URL
,
weakS
elf
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"作废成功"
];
...
...
@@ -256,13 +257,15 @@
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
#pragma mark -删除建仓单
-
(
void
)
deleteOrder
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
self
showAlertViewController
:
@"确定删除该建仓申请单吗?"
withCompleted
:
^
{
[
weakSelf
userSureDeleteOrCancelOperation
:
@"删除"
returnBlock
:
^
{
[
IBTLoadingView
showProgressLabel
:
@"删除中..."
];
//操作人
RsOperateInfo
*
infomation
=
[[
RsOperateInfo
alloc
]
init
];
...
...
@@ -271,7 +274,7 @@
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
,
s
elf
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/depotRequest/remove/%@"
,
HTTP_REST_API_BASE_URL
,
weakS
elf
.
orderUUID
]
withRequestType
:
ZERO
withParameter
:
[
infomation
toDictionary
]
withSuccess
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
IBTLoadingView
hideHUDWithText
:
@"删除成功"
];
...
...
@@ -290,7 +293,7 @@
[
IBTLoadingView
showTextOnly
:
failed
.
localizedDescription
];
}];
}];
}];
}
...
...
total/GTOApp/UserUtil/BaseViewController.h
View file @
5073603b
...
...
@@ -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 @
5073603b
...
...
@@ -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/Macro/GTOAppMacro.h
View file @
5073603b
...
...
@@ -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