Преглед изворни кода

Homer App
修改 categoryfilter
NPD Mobile
修改 appearance 实现逻辑,同时修复iOS11 下 table action button 字体颜色不对的问题

Ray Zhang пре 8 година
родитељ
комит
55f6e4370a

+ 0 - 50
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,54 +2,4 @@
 <Bucket
    type = "0"
    version = "2.0">
-   <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "../common/NetworkUtils.m"
-            timestampString = "532318176.398517"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "213"
-            endingLineNumber = "213"
-            landmarkName = "+get_json:parameters:file:err_recorder:result_handler:decrypt_handler:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "common/data_provider/RANetwork.m"
-            timestampString = "532318179.463627"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "493"
-            endingLineNumber = "493"
-            landmarkName = "+get_json:parameters:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "common/data_provider/RANetwork.m"
-            timestampString = "532318272.899638"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "490"
-            endingLineNumber = "490"
-            landmarkName = "+get_json:parameters:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-   </Breakpoints>
 </Bucket>

+ 214 - 183
RedAnt ERP Mobile/common/Functions/DefaultAppearance.m

@@ -7,20 +7,21 @@
 //
 
 #import "DefaultAppearance.h"
-#import "LoginViewController.h"
-#import "CategoryCellNPD.h"
-#import "CategoryHeaderView.h"
-#import "DefaultTableHeaderView.h"
-#import "CategoryCellSmall.H"
-#import "ModelItemCell.h"
-#import "PDFListTableViewCell.h"
-#import "ContactListTableViewCell.h"
-#import "CategoryCellNPD.h"
-#import "CommonEditorCellMAction.h"
-#import "DefaultImageButton.h"
-#import "OrderListTableViewCell.h"
-#import "CommonEditorCellModel.h"
-#import "BundleDetailButton.h"
+#import "const.h"
+//#import "LoginViewController.h"
+//#import "CategoryCellNPD.h"
+//#import "CategoryHeaderView.h"
+//#import "DefaultTableHeaderView.h"
+//#import "CategoryCellSmall.H"
+//#import "ModelItemCell.h"
+//#import "PDFListTableViewCell.h"
+//#import "ContactListTableViewCell.h"
+//#import "CategoryCellNPD.h"
+//#import "CommonEditorCellMAction.h"
+//#import "DefaultImageButton.h"
+//#import "OrderListTableViewCell.h"
+//#import "CommonEditorCellModel.h"
+//#import "BundleDetailButton.h"
 
 @implementation DefaultAppearance
 +(void)init_appearance
@@ -98,130 +99,151 @@
 +(id) get_appearance:(NSString*) control container:(NSDictionary*)container_json
 {
     // json 中添加 control 类型必须在此函数中添加对应代码
-    if([control isEqualToString:@"UIButton"])
-    {
-        if(container_json==nil)
-            return [UIButton appearance];
-        else
-        {
-             NSArray* arr_container = [self appearance_container:container_json];
-            return [UIButton appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
-    if([control isEqualToString:@"UISegmentedControl"])
-    {
-        if(container_json==nil)
-            return [UISegmentedControl appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [UISegmentedControl appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
     
-    else if([control isEqualToString:@"BundleDetailButton"])
-    {
-        if(container_json==nil)
-            return [BundleDetailButton appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [BundleDetailButton appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
     
-    else if([control isEqualToString:@"UISearchBar"])
-    {
-        if(container_json==nil)
-            return [UISearchBar appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [UISearchBar appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
-    else if([control isEqualToString:@"DefaultImageButton"])
-    {
-        if(container_json==nil)
-            return [DefaultImageButton appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [DefaultImageButton appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
+    Class class_control =NSClassFromString(control);
+    if(class_control==nil)
+        return nil;
     
-    else if([control isEqualToString:@"UIActivityIndicatorView"])
-        {
-            if(container_json==nil)
-                return [UIActivityIndicatorView appearance];
-            else
-            {
-                NSArray* arr_container = [self appearance_container:container_json];
-                return [UIActivityIndicatorView appearanceWhenContainedIn: arr_container[0], nil];
-            }
-        }
-    else if([control isEqualToString:@"CategoryCellNPD"])
-        {
-                if(container_json==nil)
-                    return [CategoryCellNPD appearance];
-                else
-                {
-                    NSArray* arr_container = [self appearance_container:container_json];
-                    return [CategoryCellNPD appearanceWhenContainedIn: arr_container[0], nil];
-                }
-        }
-    else if([control isEqualToString:@"UILabel"])
-    {
-        if(container_json==nil)
-            return [UILabel appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [UILabel appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
-    else if([control isEqualToString:@"DefaultTableHeaderView"])
+    if(container_json==nil)
+        return [class_control appearance];
+    else
     {
-        if(container_json==nil)
-            return [DefaultTableHeaderView appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [DefaultTableHeaderView appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
-    else if([control isEqualToString:@"CategoryCellSmall"])
-    {
-        if(container_json==nil)
-            return [CategoryCellSmall appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [CategoryCellSmall appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
-    else if([control isEqualToString:@"UIBarButtonItem"])
-    {
-        if(container_json==nil)
-            return [UIBarButtonItem appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [UIBarButtonItem appearanceWhenContainedIn: arr_container[0], nil];
-        }
-    }
-    else if([control isEqualToString:@"UINavigationBar"])
-    {
-        if(container_json==nil)
-            return [UINavigationBar appearance];
-        else
-        {
-            NSArray* arr_container = [self appearance_container:container_json];
-            return [UINavigationBar appearanceWhenContainedIn: arr_container[0], nil];
-        }
+        
+        NSArray* arr_container = [self appearance_container:container_json];
+        if(arr_container.count==0)
+            return nil;
+        return [class_control appearanceWhenContainedIn: arr_container[0], nil];
     }
-    return nil;
+    
+//
+//    
+//    
+//    if([control isEqualToString:@"UIButton"])
+//    {
+//        if(container_json==nil)
+//            return [UIButton appearance];
+//        else
+//        {
+//             NSArray* arr_container = [self appearance_container:container_json];
+//            
+//            return [UIButton appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    if([control isEqualToString:@"UISegmentedControl"])
+//    {
+//        if(container_json==nil)
+//            return [UISegmentedControl appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [UISegmentedControl appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    
+//    else if([control isEqualToString:@"BundleDetailButton"])
+//    {
+//        if(container_json==nil)
+//            return [BundleDetailButton appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [BundleDetailButton appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    
+//    else if([control isEqualToString:@"UISearchBar"])
+//    {
+//        if(container_json==nil)
+//            return [UISearchBar appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [UISearchBar appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    else if([control isEqualToString:@"DefaultImageButton"])
+//    {
+//        if(container_json==nil)
+//            return [DefaultImageButton appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [DefaultImageButton appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    
+//    else if([control isEqualToString:@"UIActivityIndicatorView"])
+//        {
+//            if(container_json==nil)
+//                return [UIActivityIndicatorView appearance];
+//            else
+//            {
+//                NSArray* arr_container = [self appearance_container:container_json];
+//                return [UIActivityIndicatorView appearanceWhenContainedIn: arr_container[0], nil];
+//            }
+//        }
+//    else if([control isEqualToString:@"CategoryCellNPD"])
+//        {
+//                if(container_json==nil)
+//                    return [CategoryCellNPD appearance];
+//                else
+//                {
+//                    NSArray* arr_container = [self appearance_container:container_json];
+//                    return [CategoryCellNPD appearanceWhenContainedIn: arr_container[0], nil];
+//                }
+//        }
+//    else if([control isEqualToString:@"UILabel"])
+//    {
+//        if(container_json==nil)
+//            return [UILabel appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [UILabel appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    else if([control isEqualToString:@"DefaultTableHeaderView"])
+//    {
+//        if(container_json==nil)
+//            return [DefaultTableHeaderView appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [DefaultTableHeaderView appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    else if([control isEqualToString:@"CategoryCellSmall"])
+//    {
+//        if(container_json==nil)
+//            return [CategoryCellSmall appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [CategoryCellSmall appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    else if([control isEqualToString:@"UIBarButtonItem"])
+//    {
+//        if(container_json==nil)
+//            return [UIBarButtonItem appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [UIBarButtonItem appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    else if([control isEqualToString:@"UINavigationBar"])
+//    {
+//        if(container_json==nil)
+//            return [UINavigationBar appearance];
+//        else
+//        {
+//            NSArray* arr_container = [self appearance_container:container_json];
+//            return [UINavigationBar appearanceWhenContainedIn: arr_container[0], nil];
+//        }
+//    }
+//    return nil;
 }
 +(void) set_appearance_item:(NSDictionary*) item_json
 {
@@ -324,56 +346,65 @@
     {
         NSString * item = [NSString stringWithFormat:@"item_%d",i];
         NSString* container = container_json[item];
-        if([container isEqualToString:@"CategoryHeaderView"])
-        {
-            [arr addObject:[CategoryHeaderView class]];
-        }
-        else if([container isEqualToString:@"CommonEditorCellModel"])
-        {
-            [arr addObject:[CommonEditorCellModel class]];
-        }
-        else if([container isEqualToString:@"OrderListTableViewCell"])
-        {
-            [arr addObject:[OrderListTableViewCell class]];
-        }
-        
-        else if([container isEqualToString:@"CommonEditorCellMAction"])
-        {
-            [arr addObject:[CommonEditorCellMAction class]];
-        }
-        
-        else if([container isEqualToString:@"DefaultTableHeaderView"])
-        {
-            [arr addObject:[DefaultTableHeaderView class]];
-        }
-        else if([container isEqualToString:@"UINavigationBar"])
-        {
-            [arr addObject:[UINavigationBar class]];
-        }
-        else if([container isEqualToString:@"UINavigationItem"])
-        {
-            [arr addObject:[UINavigationItem class]];
-        }
-        else if([container isEqualToString:@"ModelItemCell"])
-        {
-            [arr addObject:[ModelItemCell class]];
-        }
-        else if([container isEqualToString:@"PDFListTableViewCell"])
-        {
-            [arr addObject:[PDFListTableViewCell class]];
-        }
-        else if([container isEqualToString:@"UIToolbar"])
-        {
-            [arr addObject:[UIToolbar class]];
-        }
-        else if([container isEqualToString:@"ContactListTableViewCell"])
-        {
-            [arr addObject:[ContactListTableViewCell class]];
-        }
-        else if([container isEqualToString:@"CategoryCellNPD"])
-        {
-            [arr addObject:[CategoryCellNPD class]];
-        }
+        Class class_container =NSClassFromString(container);
+        if(class_container==nil)
+            continue;
+        [arr addObject:class_container];
+//        if([container isEqualToString:@"CategoryHeaderView"])
+//        {
+//            [arr addObject:[CategoryHeaderView class]];
+//        }
+//        else if([container isEqualToString:@"UITableView"])
+//        {
+////            NSClassFromString(@"UISwipeActionPullView")
+//            [arr addObject:NSClassFromString(@"UISwipeActionPullView")];
+//        }
+//        else if([container isEqualToString:@"CommonEditorCellModel"])
+//        {
+//            [arr addObject:[CommonEditorCellModel class]];
+//        }
+//        else if([container isEqualToString:@"OrderListTableViewCell"])
+//        {
+//            [arr addObject:[OrderListTableViewCell class]];
+//        }
+//
+//        else if([container isEqualToString:@"CommonEditorCellMAction"])
+//        {
+//            [arr addObject:[CommonEditorCellMAction class]];
+//        }
+//
+//        else if([container isEqualToString:@"DefaultTableHeaderView"])
+//        {
+//            [arr addObject:[DefaultTableHeaderView class]];
+//        }
+//        else if([container isEqualToString:@"UINavigationBar"])
+//        {
+//            [arr addObject:[UINavigationBar class]];
+//        }
+//        else if([container isEqualToString:@"UINavigationItem"])
+//        {
+//            [arr addObject:[UINavigationItem class]];
+//        }
+//        else if([container isEqualToString:@"ModelItemCell"])
+//        {
+//            [arr addObject:[ModelItemCell class]];
+//        }
+//        else if([container isEqualToString:@"PDFListTableViewCell"])
+//        {
+//            [arr addObject:[PDFListTableViewCell class]];
+//        }
+//        else if([container isEqualToString:@"UIToolbar"])
+//        {
+//            [arr addObject:[UIToolbar class]];
+//        }
+//        else if([container isEqualToString:@"ContactListTableViewCell"])
+//        {
+//            [arr addObject:[ContactListTableViewCell class]];
+//        }
+//        else if([container isEqualToString:@"CategoryCellNPD"])
+//        {
+//            [arr addObject:[CategoryCellNPD class]];
+//        }
         
         
     }

+ 2 - 2
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -1663,7 +1663,7 @@
         
     }
     
-    
+#ifndef BUILD_HOMER //homer 要求去掉cam scan 2017/12/20
 
     // if(appDelegate.user_type==USER_ROLE_EMPLOYEE)
     {
@@ -1672,7 +1672,7 @@
         [self.sideMenuItems addObject:map.copy];
         
     }
-    
+#endif
     if(appDelegate.user_type==USER_ROLE_EMPLOYEE)
     {
 //        [map setValue:@"Contact" forKey:@"title"];

+ 13 - 1
RedAnt ERP Mobile/common/Functions/category/CategorySearchFilterViewController.h

@@ -9,7 +9,8 @@
 #import <UIKit/UIKit.h>
 #import "EnumSelectViewController.h"
 #import "RATreeView.h"
-@interface CategorySearchFilterViewController : UIViewController<RATreeViewDelegate, RATreeViewDataSource>//<EnumSelectViewControllerDelegate>
+#import "config.h"
+@interface CategorySearchFilterViewController : UIViewController<RATreeViewDelegate, RATreeViewDataSource,UITextFieldDelegate>//<EnumSelectViewControllerDelegate>
 @property (strong, nonatomic) NSDictionary* alert_cadedate;
 @property (strong, nonatomic) NSDictionary* qty_cadedate;
 @property (strong, nonatomic) NSDictionary* availability_cadedate;
@@ -32,6 +33,12 @@
 @property (nonatomic , copy) void (^OkClick)(NSString *ids,NSString* modelname,NSString* modeldescrip,NSString* available,NSString* QTY,NSString* alert,NSString* price , NSString* bestseller);
 @property (nonatomic , copy) void (^ResetClick)(void);
 
+#ifdef BUILD_HOMER
+@property (strong, nonatomic) NSString* sprice_min;
+@property (strong, nonatomic) NSString* sprice_max;
+@property (strong, nonatomic) NSString* savail_min;
+@property (strong, nonatomic) NSString* savail_max;
+#endif
 @property (strong, nonatomic) NSString* modelname;
 @property (strong, nonatomic) NSString* modeldescrip;
 @property (strong, nonatomic) IBOutlet UITextField *textModelName;
@@ -46,5 +53,10 @@
 #pragma mark - mutiple selection
 
 @property (nonatomic,copy) NSString *ids;
+@property (weak, nonatomic) IBOutlet UITextField *availability_min;
+@property (weak, nonatomic) IBOutlet UITextField *availability_max;
+@property (weak, nonatomic) IBOutlet UITextField *price_min;
+@property (weak, nonatomic) IBOutlet UITextField *price_max;
+@property (weak, nonatomic) IBOutlet UILabel *price_dash;
 
 @end

+ 136 - 9
RedAnt ERP Mobile/common/Functions/category/CategorySearchFilterViewController.m

@@ -12,6 +12,9 @@
 #import "RAUtils.h"
 #import "RAConvertor.h"
 
+#define INTNUMBERS @"0123456789\n"
+#define NUMBERS @"0123456789.\n"
+
 
 @interface CategorySearchFilterViewController ()
 
@@ -25,18 +28,28 @@
     
     self.textModelDescription.text = self.modeldescrip;
     
+    self.price_min.delegate = self;
+    self.price_max.delegate = self;
+    self.availability_min.delegate=self;
+    self.availability_max.delegate=self;
+    
     UIApplication * app = [UIApplication sharedApplication];
     AppDelegate *appDelegate = (AppDelegate *)[app delegate];
     if(appDelegate.bLogin)
     {
         self.labelPrice.hidden=false;
         self.buttonPrice.hidden=false;
-        
+        self.price_max.hidden = false;
+        self.price_min.hidden = false;
+        self.price_dash.hidden = false;
     }
     else
     {
         self.labelPrice.hidden=true;
         self.buttonPrice.hidden=true;
+        self.price_max.hidden = true;
+        self.price_min.hidden = true;
+        self.price_dash.hidden = true;
     }
     
     
@@ -73,7 +86,7 @@
     
     
     {
-        
+        #ifndef BUILD_HOMER
         NSString* price =@"";
         int count = [[self.price_cadedate valueForKey:@"count"] intValue];
         for(int i=0;i<count;i++)
@@ -87,8 +100,21 @@
             }
         }
         if(price.length>0)
+        {
+
             [self.buttonPrice setTitle:price forState:UIControlStateNormal];
+
+
+
+        }
+        #else
         
+        self.price_max.text = self.sprice_max;
+        self.price_min.text = self.sprice_min;
+        self.availability_max.text = self.savail_max;
+        self.availability_min.text = self.savail_min;
+        
+#endif
     }
     
     {
@@ -253,14 +279,22 @@
     self.price_cadedate=[self.default_filter objectForKey:@"price"];
     self.bestseller_cadedate=[self.default_filter objectForKey:@"best_seller"];
     
-    
+#ifdef BUILD_HOMER
+    self.sprice_min=@"";
+    self.sprice_max=@"";
+    self.savail_min=@"";
+    self.savail_max=@"";
+
+#endif
     [self initUI];
 }
 - (IBAction)onCloseClick:(id)sender {
     [self dismissViewControllerAnimated:true completion:nil];
 }
 - (IBAction)onAvailabilityClick:(id)sender {
-    EnumSelectViewController* enumvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
+    
+    
+    EnumSelectViewController* enumvc =[ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];//[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
   //  enumvc.delegate = self;
     enumvc.max_select = 1;
     //enumvc.updatePosition = indexPath;
@@ -298,7 +332,7 @@
 }
 
 - (IBAction)onBestSellerClick:(id)sender {
-    EnumSelectViewController* enumvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
+    EnumSelectViewController* enumvc =[ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];//[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
     //   enumvc.delegate = self;
     enumvc.max_select = 1;
     //enumvc.updatePosition = indexPath;
@@ -336,7 +370,7 @@
 }
 
 - (IBAction)onQTYClick:(id)sender {
-    EnumSelectViewController* enumvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
+    EnumSelectViewController* enumvc =[ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];//[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
  //   enumvc.delegate = self;
     enumvc.max_select = 1;
     //enumvc.updatePosition = indexPath;
@@ -373,7 +407,7 @@
     [self.navigationController pushViewController:enumvc animated:true];
 }
 - (IBAction)onPriceClick:(id)sender {
-    EnumSelectViewController* enumvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
+    EnumSelectViewController* enumvc =[ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];//[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
     //   enumvc.delegate = self;
     enumvc.max_select = 1;
     //enumvc.updatePosition = indexPath;
@@ -417,7 +451,7 @@
     
     
     
-    EnumSelectViewController* enumvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
+    EnumSelectViewController* enumvc =[ [UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];//[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
  //   enumvc.delegate = self;
     enumvc.max_select = 1;
     //enumvc.updatePosition = indexPath;
@@ -470,14 +504,61 @@
     if(qty.length==0 || [qty isEqualToString:@"Click to select"])
         qty = nil;
     
+
+#ifndef  BUILD_HOMER
     NSString* price = [self.buttonPrice titleForState:UIControlStateNormal];
     if(price.length==0 || [price isEqualToString:@"Click to select"])
         price = nil;
+#else
+    NSString* minprice = self.price_min.text;
+    NSString* maxprice = self.price_max.text;
+    
+    if(minprice.length==0)
+        minprice=@"0.0";
+    if(maxprice.length==0)
+        maxprice = [NSString stringWithFormat:@"%f",DBL_MAX];
+    
+    if([minprice doubleValue]>[maxprice doubleValue])
+    {
+        NSString* tempprice=minprice;
+        minprice=maxprice;
+        maxprice=tempprice;
+        self.price_min.text=minprice;
+        self.price_max.text=maxprice;
+    }
+    NSString* price = nil;
+    if(minprice.length!=0||maxprice.length!=0)
+    {
+        price = [NSString stringWithFormat:@"%@-%@",minprice,maxprice];
+    }
+#endif
     
+#ifndef  BUILD_HOMER
     NSString* available = [self.buttonAvailability titleForState:UIControlStateNormal];
     if(available.length==0 || [available isEqualToString:@"Click to select"])
         available = nil;
-    
+#else
+    NSString* minavail = self.availability_min.text;
+    NSString* maxavail = self.availability_max.text;
+    if(minavail.length==0)
+        minavail=@"0";
+    if(maxavail.length==0)
+        maxavail = [NSString stringWithFormat:@"%d",INT_MAX];
+    
+    if([minavail intValue]>[maxavail intValue])
+    {
+        NSString* tempavail=minavail;
+        minavail=maxavail;
+        maxavail=tempavail;
+        self.availability_min.text=minavail;
+        self.availability_max.text=maxavail;
+    }
+    NSString* available = nil;
+    if(minavail.length!=0||maxavail.length!=0)
+    {
+        available = [NSString stringWithFormat:@"%@-%@",minavail,maxavail];
+    }
+#endif
     NSString* alert = [self.buttonAlert titleForState:UIControlStateNormal];
     if(alert.length==0 || [alert isEqualToString:@"Click to select"])
         alert = nil;
@@ -777,4 +858,50 @@
 }
 
 
+#pragma mark textField delegate
+-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
+    
+    DebugLog(@"textField shouldChangeCharactersInRange");
+    DebugLog(@"text:%@",textField.text);
+    
+    
+    
+
+    NSString* keyboard = @"";
+    UIKeyboardType kbtype=textField.keyboardType;
+    
+    if(kbtype==UIKeyboardTypeNumberPad)
+        keyboard=@"int";
+    if(kbtype==UIKeyboardTypeDecimalPad)
+        keyboard=@"number";
+
+    if(![keyboard isEqualToString:@"number"] && ![keyboard isEqualToString:@"int"])
+        return TRUE;
+    NSCharacterSet *cs;
+    if([keyboard isEqualToString:@"number"])
+    {
+        if([textField.text rangeOfString:@"."].location!=NSNotFound && [string isEqualToString:@"."])
+        {
+            //已经有小数点了,不允许再输入小数点
+            return false;
+        }
+        cs = [[NSCharacterSet characterSetWithCharactersInString:NUMBERS]invertedSet];
+    }
+    else
+        cs = [[NSCharacterSet characterSetWithCharactersInString:INTNUMBERS]invertedSet];
+    
+    NSString *filtered = [[string componentsSeparatedByCharactersInSet:cs]componentsJoinedByString:@""];
+    
+    BOOL canChange = [string isEqualToString:filtered];
+
+
+    return canChange;
+//    int lenth = [[item_json valueForKey:@"length"] intValue];
+//    if(lenth==0)
+//        return canChange;
+//    else
+//    {
+//        return canChange&& (lenth>textField.text.length ||[string isEqualToString:@""]);
+//    }
+}
 @end

+ 37 - 0
RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m

@@ -170,9 +170,43 @@
     NSMutableDictionary* menu =             [appDelegate.categoryMenu mutableCopy];
     
     
+#ifndef BUILD_HOMER
     
     CategorySearchFilterViewController * filterVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"CategorySearchFilterViewController"];
     
+
+
+    
+#else
+        CategorySearchFilterViewController *filterVC = [[UIStoryboard storyboardWithName:@"homerUI" bundle:nil] instantiateViewControllerWithIdentifier:@"CategorySearchFilterViewController"];
+    
+    
+    NSArray* arr=[RAUtils string2arr:self.p_price separator:@"-"];
+    if([arr[0] doubleValue]==0)
+        filterVC.sprice_min=@"";
+    else
+        filterVC.sprice_min = arr[0];
+    if([arr[1] isEqualToString:[NSString stringWithFormat:@"%f",DBL_MAX]])
+        filterVC.sprice_max=@"";
+    else
+        filterVC.sprice_max=arr[1];
+    
+    
+    
+    NSArray* arr1=[RAUtils string2arr:self.p_available separator:@"-"];
+    
+    if([arr1[0] intValue]==0)
+        filterVC.savail_min=@"";
+    else
+        filterVC.savail_min = arr1[0];
+    
+    
+    
+    if([arr1[1] isEqualToString:[NSString stringWithFormat:@"%d",INT_MAX]])
+        filterVC.savail_max=@"";
+    else
+        filterVC.savail_max=arr1[1];
+#endif
     filterVC.categoryid = self.categoryid;
     filterVC.default_filter = [[self.category_data objectForKey:@"filter"] mutableCopy];
 
@@ -237,6 +271,9 @@
         self.cagegoryLabel.text =self.categoryString;
         
         self.categoryid = ids;
+//#ifdef BUILD_HOMER
+//
+//#endif
 #endif
 
         self.modelname = modelname;

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

@@ -184,7 +184,7 @@ dispatch_async(dispatch_get_main_queue(), ^{
                         contents[[NSString stringWithFormat:@"item_%d",count]]=item;
                         count++;
                     }
-                    
+#ifndef BUILD_HOMER // homer 要求去掉qrcode 2017/12/20
                     NSString* qrpath = [ImageUtils generateQRCodeFile:model_name width:350 height:350];
 //                    UIImage* qrimg=[QRCodeGenerator qrImageForString:model_name imageSize:350];
                     if(qrpath!=nil)
@@ -194,6 +194,7 @@ dispatch_async(dispatch_get_main_queue(), ^{
                         contents[[NSString stringWithFormat:@"item_%d",count]]=item ;
                         count++;
                     }
+#endif
                 }
                 
 
@@ -1599,7 +1600,11 @@ self.isrefreshing=false;
         NSDictionary* contents_json = [section_json objectForKey:@"stack_contents"];
         cell.stack_contents = contents_json;
         int count = [[contents_json valueForKey:@"count"]intValue];
-        if(count<2)//1 for qrcode;
+        int hcount=2;
+#ifdef BUILD_HOMER
+        hcount=1; //homer 没有qrcode
+#endif
+        if(count<hcount)//1 for qrcode;
             cell.pageControl.hidden = true;
         else
             cell.pageControl.hidden = false;

+ 7 - 0
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchFilterViewController.h

@@ -39,4 +39,11 @@
 
 @property (strong, nonatomic) NSString* modelname;
 @property (strong, nonatomic) NSString* modeldescrip;
+@property (weak, nonatomic) IBOutlet UITextField *availability_min;
+
+@property (weak, nonatomic) IBOutlet UITextField *availability_max;
+@property (weak, nonatomic) IBOutlet UITextField *price_min;
+@property (weak, nonatomic) IBOutlet UITextField *price_max;
+
+
 @end

+ 1 - 0
RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.h

@@ -39,6 +39,7 @@
 @property (strong, nonatomic) IBOutlet UIToolbar *selectToolbar;
 
 @property (strong, nonatomic) IBOutlet UISwitch *switch_matchfull;
+@property (weak, nonatomic) IBOutlet UILabel *label_matchfull;
 
 @property (strong, nonatomic) IBOutlet UILabel *label_net_err;
 

+ 9 - 0
RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m

@@ -203,6 +203,15 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
+    
+    
+#ifdef BUILD_HOMER
+    self.switch_matchfull.hidden = true;
+    self.label_matchfull.hidden = true;
+#else
+    self.switch_matchfull.hidden = false;
+    self.label_matchfull.hidden = false;
+#endif
     self.mum.hidden = true;
     CGPoint center = self.mum.center;
     self.mum.frame = CGRectMake(0, 0, 100, 100);

+ 15 - 11
RedAnt ERP Mobile/iSales-HOMER.xcodeproj/project.pbxproj

@@ -196,8 +196,6 @@
 		716961B519594E1000B19FB4 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 716961B419594E1000B19FB4 /* libsqlite3.dylib */; };
 		716AF8E11D7AA0E0001188E0 /* SelectUploadOrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 716AF8E01D7AA0E0001188E0 /* SelectUploadOrderViewController.m */; };
 		716AF8E71D7AA398001188E0 /* SelectOrderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 716AF8E51D7AA398001188E0 /* SelectOrderTableViewCell.m */; };
-		7173FEAA1FF233E7005A9A82 /* CommonEditorAutoCompleteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7173FEA71FF233E6005A9A82 /* CommonEditorAutoCompleteView.m */; };
-		7173FEAB1FF233E7005A9A82 /* CommonEditorAutoCompleteView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7173FEA81FF233E6005A9A82 /* CommonEditorAutoCompleteView.xib */; };
 		7186C25D1C97A6EE00CB43F4 /* FunctionTestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7186C25C1C97A6EE00CB43F4 /* FunctionTestViewController.m */; };
 		718716251C433D8B00F25860 /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 718716241C433D8B00F25860 /* ExternalAccessory.framework */; };
 		718716271C433D9700F25860 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 718716261C433D9700F25860 /* AudioToolbox.framework */; };
@@ -285,6 +283,9 @@
 		71E3634A1F46963200CFAF19 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71E363481F46963100CFAF19 /* Main.storyboard */; };
 		71E9F6B61F8B46830052C78E /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E9F6B41F8B46820052C78E /* NetworkUtils.m */; };
 		71E9F6C51F8B58740052C78E /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E9F6C31F8B58740052C78E /* RANetworkTaskDelegate.m */; };
+		71EFCA081FF3733600F8D511 /* CommonEditorAutoCompleteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 71EFCA051FF3733600F8D511 /* CommonEditorAutoCompleteView.m */; };
+		71EFCA091FF3733600F8D511 /* CommonEditorAutoCompleteView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 71EFCA061FF3733600F8D511 /* CommonEditorAutoCompleteView.xib */; };
+		71EFCA0B1FF3735900F8D511 /* homerUI.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71EFCA0A1FF3735800F8D511 /* homerUI.storyboard */; };
 		71FFBBE91C60894900D91DC2 /* iSalesDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE61C60894900D91DC2 /* iSalesDB.m */; };
 		71FFBBEA1C60894900D91DC2 /* RANetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 71FFBBE81C60894900D91DC2 /* RANetwork.m */; };
 /* End PBXBuildFile section */
@@ -640,9 +641,6 @@
 		716AF8E01D7AA0E0001188E0 /* SelectUploadOrderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SelectUploadOrderViewController.m; path = common/Functions/offline/SelectUploadOrderViewController.m; sourceTree = SOURCE_ROOT; };
 		716AF8E51D7AA398001188E0 /* SelectOrderTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SelectOrderTableViewCell.m; path = common/Functions/offline/SelectOrderTableViewCell.m; sourceTree = SOURCE_ROOT; };
 		716AF8E61D7AA398001188E0 /* SelectOrderTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SelectOrderTableViewCell.h; path = common/Functions/offline/SelectOrderTableViewCell.h; sourceTree = SOURCE_ROOT; };
-		7173FEA71FF233E6005A9A82 /* CommonEditorAutoCompleteView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommonEditorAutoCompleteView.m; path = ../../../common/customUI/commoneditor/CommonEditorAutoCompleteView.m; sourceTree = "<group>"; };
-		7173FEA81FF233E6005A9A82 /* CommonEditorAutoCompleteView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CommonEditorAutoCompleteView.xib; path = ../../../common/customUI/commoneditor/CommonEditorAutoCompleteView.xib; sourceTree = "<group>"; };
-		7173FEA91FF233E7005A9A82 /* CommonEditorAutoCompleteView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommonEditorAutoCompleteView.h; path = ../../../common/customUI/commoneditor/CommonEditorAutoCompleteView.h; sourceTree = "<group>"; };
 		7186C25B1C97A6EE00CB43F4 /* FunctionTestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionTestViewController.h; path = common/Functions/sidemenu/FunctionTestViewController.h; sourceTree = SOURCE_ROOT; };
 		7186C25C1C97A6EE00CB43F4 /* FunctionTestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FunctionTestViewController.m; path = common/Functions/sidemenu/FunctionTestViewController.m; sourceTree = SOURCE_ROOT; };
 		718716221C433D5000F25860 /* libScanApiCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libScanApiCore.a; path = ../lib/libScanApiCore.a; sourceTree = "<group>"; };
@@ -797,6 +795,10 @@
 		71E9F6B51F8B46830052C78E /* NetworkUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = ../../common/NetworkUtils.h; sourceTree = "<group>"; };
 		71E9F6C31F8B58740052C78E /* RANetworkTaskDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RANetworkTaskDelegate.m; path = ../../common/upload/RANetworkTaskDelegate.m; sourceTree = "<group>"; };
 		71E9F6C41F8B58740052C78E /* RANetworkTaskDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RANetworkTaskDelegate.h; path = ../../common/upload/RANetworkTaskDelegate.h; sourceTree = "<group>"; };
+		71EFCA051FF3733600F8D511 /* CommonEditorAutoCompleteView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommonEditorAutoCompleteView.m; path = ../../common/customUI/commoneditor/CommonEditorAutoCompleteView.m; sourceTree = "<group>"; };
+		71EFCA061FF3733600F8D511 /* CommonEditorAutoCompleteView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CommonEditorAutoCompleteView.xib; path = ../../common/customUI/commoneditor/CommonEditorAutoCompleteView.xib; sourceTree = "<group>"; };
+		71EFCA071FF3733600F8D511 /* CommonEditorAutoCompleteView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommonEditorAutoCompleteView.h; path = ../../common/customUI/commoneditor/CommonEditorAutoCompleteView.h; sourceTree = "<group>"; };
+		71EFCA0A1FF3735800F8D511 /* homerUI.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = homerUI.storyboard; sourceTree = "<group>"; };
 		71FFBBE51C60894900D91DC2 /* iSalesDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iSalesDB.h; path = common/data_provider/iSalesDB.h; sourceTree = SOURCE_ROOT; };
 		71FFBBE61C60894900D91DC2 /* iSalesDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iSalesDB.m; path = common/data_provider/iSalesDB.m; sourceTree = SOURCE_ROOT; };
 		71FFBBE71C60894900D91DC2 /* RANetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RANetwork.h; path = common/data_provider/RANetwork.h; sourceTree = SOURCE_ROOT; };
@@ -1308,6 +1310,7 @@
 				71C1D8301F456A9100CEA1C9 /* CUL.storyboard */,
 				71C014D51F46958F00DEB153 /* OLM.storyboard */,
 				71E363481F46963100CFAF19 /* Main.storyboard */,
+				71EFCA0A1FF3735800F8D511 /* homerUI.storyboard */,
 				7162A5E41C58781000AB630E /* iSalesNavigationController.h */,
 				7162A5E51C58781000AB630E /* iSalesNavigationController.m */,
 				713F76C11929F4A7006A7305 /* Images.xcassets */,
@@ -1580,11 +1583,11 @@
 		7173FEA61FF233DD005A9A82 /* autocomplete */ = {
 			isa = PBXGroup;
 			children = (
-				7173FEA91FF233E7005A9A82 /* CommonEditorAutoCompleteView.h */,
-				7173FEA71FF233E6005A9A82 /* CommonEditorAutoCompleteView.m */,
-				7173FEA81FF233E6005A9A82 /* CommonEditorAutoCompleteView.xib */,
+				71EFCA071FF3733600F8D511 /* CommonEditorAutoCompleteView.h */,
+				71EFCA051FF3733600F8D511 /* CommonEditorAutoCompleteView.m */,
+				71EFCA061FF3733600F8D511 /* CommonEditorAutoCompleteView.xib */,
 			);
-			path = autocomplete;
+			name = autocomplete;
 			sourceTree = "<group>";
 		};
 		717AE10B1D1A5E99007DC5CA /* offline */ = {
@@ -2019,7 +2022,7 @@
 				71DF74951C57614C00F2789C /* PhotoBorder.png in Resources */,
 				7162A55F1C58724700AB630E /* customer_info_template.json in Resources */,
 				42D3A4A21EFA6D36007A54C1 /* PhotoList.storyboard in Resources */,
-				7173FEAB1FF233E7005A9A82 /* CommonEditorAutoCompleteView.xib in Resources */,
+				71EFCA091FF3733600F8D511 /* CommonEditorAutoCompleteView.xib in Resources */,
 				7141DD3D1C5726B700F7DF59 /* softScanBeep.wav in Resources */,
 				71C1D84B1F456C2200CEA1C9 /* so.json in Resources */,
 				71C1D83D1F456BE800CEA1C9 /* more_info.html in Resources */,
@@ -2029,6 +2032,7 @@
 				7111E5721C76C557004763B3 /* customer_info_template_edit.json in Resources */,
 				7161FEB61D61B24900157EE1 /* normalpayment.html in Resources */,
 				71DF74961C57614C00F2789C /* PhotoBorder@2x.png in Resources */,
+				71EFCA0B1FF3735900F8D511 /* homerUI.storyboard in Resources */,
 				71C1D83F1F456BE800CEA1C9 /* category.json in Resources */,
 				7165662E1EF3ACD900CB897F /* photostack_image.html in Resources */,
 				712AFEE51DBDAF0300254965 /* pdfcreator.xcassets in Resources */,
@@ -2197,7 +2201,7 @@
 				7162A5C41C5873BB00AB630E /* ItemSearchViewController.m in Sources */,
 				7162A5481C58719D00AB630E /* RATreeView+TableViewDataSource.m in Sources */,
 				42F1A9231F9DC40D000C0605 /* RAConvertor.m in Sources */,
-				7173FEAA1FF233E7005A9A82 /* CommonEditorAutoCompleteView.m in Sources */,
+				71EFCA081FF3733600F8D511 /* CommonEditorAutoCompleteView.m in Sources */,
 				42D3A4A31EFA6D36007A54C1 /* PhotoPreviewCell.m in Sources */,
 				7162A5DB1C5876E300AB630E /* CacheViewController.m in Sources */,
 				7162A5C21C5873BB00AB630E /* FilterCellValue.m in Sources */,

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

@@ -20,7 +20,7 @@
 #define MPACK
 
 # ifdef DEBUG
-//#define test_server
+#define test_server
 # endif
 
 #define exception_switch 1

+ 198 - 0
RedAnt ERP Mobile/iSales-HOMER/homerUI.storyboard

@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Category Filter-->
+        <scene sceneID="bY0-nf-Kkh">
+            <objects>
+                <viewController storyboardIdentifier="CategorySearchFilterViewController" title="Category Filter" useStoryboardIdentifierAsRestorationIdentifier="YES" id="wRa-AK-whu" customClass="CategorySearchFilterViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="fiI-b3-osc">
+                        <rect key="frame" x="0.0" y="0.0" width="540" height="680"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Availability:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="aVS-ax-Ajt">
+                                <rect key="frame" x="20" y="438" width="120" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="hso-9D-UxE">
+                                <rect key="frame" x="182" y="485" width="338" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Click to select">
+                                    <color key="titleColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="onQTYClick:" destination="wRa-AK-whu" eventType="touchUpInside" id="nL6-94-L2M"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="loW-WQ-wgk">
+                                <rect key="frame" x="182" y="528" width="338" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Click to select">
+                                    <color key="titleColor" red="0.59999999999999998" green="0.40000000000000002" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="onBestSellerClick:" destination="wRa-AK-whu" eventType="touchUpInside" id="vZw-45-wgR"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Sold by QTY:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Gph-Rq-5aT">
+                                <rect key="frame" x="20" y="489" width="120" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Best Seller:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="gdo-iq-hkz">
+                                <rect key="frame" x="20" y="532" width="120" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Price:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yUT-qI-n9n">
+                                <rect key="frame" x="20" y="585" width="120" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="kly-No-GTQ" customClass="DefaultImageButton">
+                                <rect key="frame" x="20" y="630" width="102" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Reset" backgroundImage="btn_reset">
+                                    <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                        <integer key="value" value="15"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                                <connections>
+                                    <action selector="onResetClick:" destination="wRa-AK-whu" eventType="touchUpInside" id="M3d-FS-LIk"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="FCI-69-dz2" customClass="DefaultImageButton">
+                                <rect key="frame" x="418" y="630" width="102" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="OK" backgroundImage="btn_ok">
+                                    <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                        <integer key="value" value="15"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
+                                <connections>
+                                    <action selector="onSearchClick:" destination="wRa-AK-whu" eventType="touchUpInside" id="QoX-0s-ByV"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Item Number:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fI5-tt-hRW">
+                                <rect key="frame" x="20" y="352" width="133" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Description:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="X4c-Ig-cbq">
+                                <rect key="frame" x="280" y="352" width="162" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" id="taE-67-OG3">
+                                <rect key="frame" x="20" y="381" width="240" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits"/>
+                            </textField>
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" id="L95-z1-Gdd">
+                                <rect key="frame" x="280" y="381" width="240" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits"/>
+                            </textField>
+                            <view contentMode="scaleToFill" id="7y4-0l-Vnq">
+                                <rect key="frame" x="10" y="5" width="500" height="320"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
+                            </view>
+                            <textField opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" id="vNN-tC-G1U">
+                                <rect key="frame" x="423" y="433" width="97" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
+                            </textField>
+                            <textField opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" id="BVs-eM-Jfu">
+                                <rect key="frame" x="280" y="433" width="97" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" keyboardType="numberPad"/>
+                            </textField>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Cef-Mi-A0m">
+                                <rect key="frame" x="396" y="437" width="8" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <textField opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" id="YI4-58-SNi">
+                                <rect key="frame" x="423" y="580" width="97" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" keyboardType="decimalPad"/>
+                            </textField>
+                            <textField opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" id="fDo-mK-lFX">
+                                <rect key="frame" x="280" y="580" width="97" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <nil key="textColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <textInputTraits key="textInputTraits" keyboardType="decimalPad"/>
+                            </textField>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8DL-k5-sQs">
+                                <rect key="frame" x="396" y="584" width="8" height="21"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+                    <size key="freeformSize" width="540" height="680"/>
+                    <connections>
+                        <outlet property="availability_max" destination="vNN-tC-G1U" id="UEw-sb-XbZ"/>
+                        <outlet property="availability_min" destination="BVs-eM-Jfu" id="U6E-3U-Ery"/>
+                        <outlet property="buttonBestSeller" destination="loW-WQ-wgk" id="gjk-Pe-fHR"/>
+                        <outlet property="buttonQTY" destination="hso-9D-UxE" id="HiW-7L-cE8"/>
+                        <outlet property="labelPrice" destination="yUT-qI-n9n" id="SbW-lu-UKa"/>
+                        <outlet property="price_dash" destination="8DL-k5-sQs" id="DfL-Vp-Ea0"/>
+                        <outlet property="price_max" destination="YI4-58-SNi" id="Q2l-2B-Lvi"/>
+                        <outlet property="price_min" destination="fDo-mK-lFX" id="qdv-Vz-Pe8"/>
+                        <outlet property="textModelDescription" destination="L95-z1-Gdd" id="mA5-4w-K1g"/>
+                        <outlet property="textModelName" destination="taE-67-OG3" id="Fjg-7o-gfE"/>
+                        <outlet property="treeContainer" destination="7y4-0l-Vnq" id="mnw-Pq-9jK"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="e6I-jI-3hK" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="5223" y="-442"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="btn_ok" width="102" height="30"/>
+        <image name="btn_reset" width="102" height="30"/>
+    </resources>
+</document>

+ 5 - 4
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -6545,6 +6545,7 @@ Email: redantsupport@united-us.net</string>
                         <outlet property="collectionview" destination="C2R-Ga-XX8" id="l8W-KX-CWa"/>
                         <outlet property="headerView" destination="p4a-vP-6BH" id="1SW-GA-ouA"/>
                         <outlet property="labelTotal" destination="gK2-JX-k9J" id="jor-7j-1lH"/>
+                        <outlet property="label_matchfull" destination="yFN-y2-Ir3" id="Zj2-zK-uOR"/>
                         <outlet property="label_net_err" destination="mi1-gm-Vf6" id="MRJ-mm-UL7"/>
                         <outlet property="mum" destination="eV7-jO-pTF" id="crA-Ra-mio"/>
                         <outlet property="searchBar" destination="gSN-FM-qOJ" id="jSU-lk-f2f"/>
@@ -6579,7 +6580,7 @@ Email: redantsupport@united-us.net</string>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="KVd-zF-Tl0"/>
                                     <barButtonItem style="plain" id="joL-Py-zMr">
                                         <searchBar key="customView" contentMode="redraw" searchBarStyle="minimal" placeholder="Name, Address, Phone etc" id="37s-Zo-qJG">
-                                            <rect key="frame" x="305" y="0.0" width="364" height="44"/>
+                                            <rect key="frame" x="297" y="0.0" width="364" height="44"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                             <textInputTraits key="textInputTraits"/>
                                             <connections>
@@ -9794,12 +9795,12 @@ Email: redantsupport@united-us.net</string>
         <image name="btn_search" width="102" height="30"/>
         <image name="btn_signin" width="102" height="30"/>
         <image name="camera" width="48" height="48"/>
-        <image name="cart_empty" width="72" height="72"/>
+        <image name="cart_empty" width="96" height="96"/>
         <image name="category" width="96" height="96"/>
         <image name="check_0_24" width="24" height="24"/>
         <image name="check_1_24" width="24" height="24"/>
         <image name="checkbox" width="16" height="16"/>
-        <image name="close" width="32" height="32"/>
+        <image name="close" width="40" height="40"/>
         <image name="contact" width="72" height="72"/>
         <image name="continue" width="131" height="30"/>
         <image name="filter" width="32" height="32"/>
@@ -9812,7 +9813,7 @@ Email: redantsupport@united-us.net</string>
         <image name="mark_wish_32" width="32" height="32"/>
         <image name="menu_open" width="36" height="36"/>
         <image name="more_color_larger" width="32" height="32"/>
-        <image name="newcustomer" width="32" height="32"/>
+        <image name="newcustomer" width="40" height="40"/>
         <image name="neworder" width="40" height="40"/>
         <image name="notifyMe" width="123" height="39"/>
         <image name="npd_logo" width="110" height="13"/>

+ 15 - 2
RedAnt ERP Mobile/iSales-NPD/default_appearance.json

@@ -203,8 +203,8 @@
         },
         "group_5": {
             "name": "cart",
-            "count": 1,
-            "item_0": {
+            "count": 2,
+            "item_1": {
                 "note": "cart bundle item detail 按钮",
                 "control": "BundleDetailButton",
                 "function": "setTitleColor.Normal",
@@ -214,7 +214,20 @@
                     "count": 1,
                     "item_0": "ModelItemCell"
                 }
+            },
+            "item_0": {
+                "note": "cart bundle item detail 按钮",
+                "control": "UIButton",
+                "function": "setTitleColor.Normal",
+                "value": "0xFFFFFF",
+                "info": "NPD BROWN",
+                "container": {
+                    "count": 1,
+                    "item_0": "UISwipeActionPullView"
+                }
             }
+            
+            
         }