|
|
@@ -9,6 +9,7 @@
|
|
|
#import "CreateOrderViewController.h"
|
|
|
#import "iSalesNetwork.h"
|
|
|
#import "MainViewController.h"
|
|
|
+#import "Singleton.h"
|
|
|
#define SUBMIT_CONFIRM 123
|
|
|
#define KEEP_TAIL 456
|
|
|
#define CLOSE_ACTION 567
|
|
|
@@ -135,10 +136,33 @@
|
|
|
}
|
|
|
- (void)onCommitOrderClick:(id)sender {
|
|
|
// get customer info
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
|
+ if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
|
|
|
+
|
|
|
+ // 检查价格类型
|
|
|
+ // 提货价才能提交订单
|
|
|
+ NSInteger priceType = [Singleton sharedInstance].npd_shop_price_type;
|
|
|
+ if (priceType != 0) {
|
|
|
+
|
|
|
+ UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"Please Check Your Price Type,Sure It's Delivery Price" preferredStyle:UIAlertControllerStyleAlert];
|
|
|
+
|
|
|
+ UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
+
|
|
|
+ [alertVC dismissViewControllerAnimated:YES completion:nil];
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+ [alertVC addAction:cancelAction];
|
|
|
+
|
|
|
+ [self presentViewController:alertVC animated:YES completion:nil];
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
NSString* msg;
|
|
|
if(appDelegate.offline_mode)
|
|
|
{
|