Просмотр исходного кода

修复横屏模式下进入到Cart中再旋转屏幕后Header子视图挤压在一起
修改Notify Me提示信息,显示服务器返回的Err Msg

Pen Li 9 лет назад
Родитель
Сommit
8f2f4b7b7a

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 12
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,16 +2,4 @@
 <Bucket
 <Bucket
    type = "0"
    type = "0"
    version = "2.0">
    version = "2.0">
-   <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            scope = "0"
-            stopOnStyle = "0">
-         </BreakpointContent>
-      </BreakpointProxy>
-   </Breakpoints>
 </Bucket>
 </Bucket>

+ 8 - 7
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -1460,28 +1460,29 @@
     UILabel *solabel = [[UILabel alloc] initWithFrame:CGRectMake(130, 5.5, 90, 22)];
     UILabel *solabel = [[UILabel alloc] initWithFrame:CGRectMake(130, 5.5, 90, 22)];
     solabel.textColor=UIColorFromRGB(color);
     solabel.textColor=UIColorFromRGB(color);
     solabel.backgroundColor = [UIColor clearColor];
     solabel.backgroundColor = [UIColor clearColor];
+    solabel.autoresizingMask=UIViewAutoresizingFlexibleRightMargin;
     solabel.text=NSLocalizedString(@"Description", nil);
     solabel.text=NSLocalizedString(@"Description", nil);
     [solabel sizeToFit];
     [solabel sizeToFit];
     [myView addSubview:solabel];
     [myView addSubview:solabel];
-    
+    CGFloat x = tableView.bounds.size.width - (768 - 320);
     UILabel *contactlabel = [[UILabel alloc] initWithFrame:CGRectMake(320, 5.5, 90, 22)];
     UILabel *contactlabel = [[UILabel alloc] initWithFrame:CGRectMake(320, 5.5, 90, 22)];
     contactlabel.textColor=UIColorFromRGB(color);
     contactlabel.textColor=UIColorFromRGB(color);
-    contactlabel.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin;
+    contactlabel.autoresizingMask=UIViewAutoresizingFlexibleRightMargin;
     contactlabel.backgroundColor = [UIColor clearColor];
     contactlabel.backgroundColor = [UIColor clearColor];
     contactlabel.text=NSLocalizedString(@"Unit price", nil);
     contactlabel.text=NSLocalizedString(@"Unit price", nil);
     [contactlabel sizeToFit];
     [contactlabel sizeToFit];
     [myView addSubview:contactlabel];
     [myView addSubview:contactlabel];
     
     
-    
+    x = tableView.bounds.size.width - (768 - 470);
     UILabel *modellabel = [[UILabel alloc] initWithFrame:CGRectMake(470, 5.5, 90, 22)];
     UILabel *modellabel = [[UILabel alloc] initWithFrame:CGRectMake(470, 5.5, 90, 22)];
     modellabel.textColor=UIColorFromRGB(color);
     modellabel.textColor=UIColorFromRGB(color);
-     modellabel.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin;
+     modellabel.autoresizingMask=UIViewAutoresizingFlexibleRightMargin;
     modellabel.backgroundColor = [UIColor clearColor];
     modellabel.backgroundColor = [UIColor clearColor];
     modellabel.text=NSLocalizedString(@"Discount/QTY", nil);
     modellabel.text=NSLocalizedString(@"Discount/QTY", nil);
     [modellabel sizeToFit];
     [modellabel sizeToFit];
     [myView addSubview:modellabel];
     [myView addSubview:modellabel];
-    
-    UILabel *pricelabel = [[UILabel alloc] initWithFrame:CGRectMake(640, 5.5, 90, 22)];
+    x = tableView.bounds.size.width - (768 - 640);
+    UILabel *pricelabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 5.5, 90, 22)];
     pricelabel.textColor=UIColorFromRGB(color);
     pricelabel.textColor=UIColorFromRGB(color);
     pricelabel.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin;
     pricelabel.autoresizingMask=UIViewAutoresizingFlexibleLeftMargin;
     pricelabel.backgroundColor = [UIColor clearColor];
     pricelabel.backgroundColor = [UIColor clearColor];
@@ -2675,7 +2676,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 - (SortButton *)sortButton {
 - (SortButton *)sortButton {
     if (!_sortButton) {
     if (!_sortButton) {
         _sortButton = [SortButton sortButtonWithHeight:40];
         _sortButton = [SortButton sortButtonWithHeight:40];
-        
+        _sortButton.autoresizingMask=UIViewAutoresizingFlexibleRightMargin;
         [_sortButton addTarget:self action:@selector(cartSortButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
         [_sortButton addTarget:self action:@selector(cartSortButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
     }
     }
     return _sortButton;
     return _sortButton;

+ 11 - 2
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -995,7 +995,14 @@ self.isrefreshing=false;
 //                            
 //                            
 //                            if ([[dic valueForKey:@"result"] integerValue] != RESULT_TRUE) {
 //                            if ([[dic valueForKey:@"result"] integerValue] != RESULT_TRUE) {
 //                                
 //                                
-//                                UIAlertController *errorAlertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:[NSString stringWithFormat:@"The email send to %@ failed",emailAddr] preferredStyle:UIAlertControllerStyleAlert];
+//                                NSString *msg = [NSString stringWithFormat:@"The email send to %@ failed",emailAddr];
+//                                if ([[dic valueForKey:@"result"] integerValue] == 8) {
+//                                    if ([dic valueForKey:@"err_msg"]) {
+//                                        msg = [dic valueForKey:@"err_msg"];
+//                                    }
+//                                }
+//                                
+//                                UIAlertController *errorAlertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:msg preferredStyle:UIAlertControllerStyleAlert];
 //                                UIAlertAction *action = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
 //                                UIAlertAction *action = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
 //                                    
 //                                    
 //                                }];
 //                                }];
@@ -1020,10 +1027,12 @@ self.isrefreshing=false;
 //            cell.btnNotifyMe.layer.cornerRadius = 3.0f;
 //            cell.btnNotifyMe.layer.cornerRadius = 3.0f;
 //            cell.btnNotifyMe.layer.masksToBounds = YES;
 //            cell.btnNotifyMe.layer.masksToBounds = YES;
 //            NSString *qtyStr = [section_json valueForKey:@"Availability"];
 //            NSString *qtyStr = [section_json valueForKey:@"Availability"];
-//            if ([qtyStr isEqualToString:@"In Production"] || [qtyStr isEqualToString:@"0"] ) {
+//            if (!qtyStr || !qtyStr.length || [qtyStr isEqualToString:@"In Production"] || [qtyStr isEqualToString:@"0"] || [qtyStr isEqualToString:@"Sold Out"]) {
 //                cell.btnaddCart.enabled = NO;
 //                cell.btnaddCart.enabled = NO;
+//                cell.btnNotifyMe.enabled = YES;
 //            } else {
 //            } else {
 //                cell.btnNotifyMe.enabled = NO;
 //                cell.btnNotifyMe.enabled = NO;
+//                cell.btnaddCart.enabled = YES;
 //            }
 //            }
 //            
 //            
         } else {
         } else {

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/config.h

@@ -10,7 +10,7 @@
 #define RedAnt_ERP_Mobile_config_h
 #define RedAnt_ERP_Mobile_config_h
 #define BUILD_NPD
 #define BUILD_NPD
 
 
-//#define test_server
+#define test_server
 #define exception_switch 1
 #define exception_switch 1
 
 
 //#define ab_lager @"Delivery price"
 //#define ab_lager @"Delivery price"