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

价格类型选择页面增加保存按钮。
优化修改价格也的文本框控制输入(使用正则表达式)。
iSalesNetwork增加方法,实现提交所选价格类型。

Pen Li пре 9 година
родитељ
комит
8ab668269e

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


+ 2 - 0
RedAnt ERP Mobile/common/data_provider/iSalesNetwork.h

@@ -127,4 +127,6 @@
 
 //+(NSString *)flattenHTML:(NSString *)html trimWhiteSpace:(BOOL)trim;
 
++ (NSDictionary *)set_npd_shop_price_type:(NSInteger) priceType;
+
 @end

+ 15 - 0
RedAnt ERP Mobile/common/data_provider/iSalesNetwork.m

@@ -9,6 +9,7 @@
 #import "iSalesNetwork.h"
 #import "RAUtils.h"
 #import "OLDataProvider.h"
+#import "Singleton.h"
 
 @implementation iSalesNetwork
 
@@ -3555,6 +3556,8 @@ repeat:
         
         [appDelegate set_main_button_panel];
         
+        //-
+        [Singleton sharedInstance].npd_shop_price_type = [[objheader valueForKey:@"price_type"] integerValue];
         
         //        DebugLog(@"sessionid=%@ ",appDelegate.sessionid);
         //        if ([[objheader valueForKey:@"update"] boolValue]==false)
@@ -3636,4 +3639,16 @@ repeat:
 //    
 //    return trim ? [url stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] : url;
 //}
+
++ (NSDictionary *)set_npd_shop_price_type:(NSInteger)priceType {
+    
+//    NSString *url = @"http://192.168.0.126:8080/site/isales/setSeePriceType.htm";
+    
+    NSData *data = [iSalesNetwork get_json:URL_SET_PRICE_TYPE parameters:@{@"price_type" : [NSString stringWithFormat:@"%d",priceType]}.mutableCopy];
+    
+    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
+    
+    return dic;
+}
+
 @end

+ 6 - 0
RedAnt ERP Mobile/iSales-NPD.xcodeproj/project.pbxproj

@@ -8,6 +8,7 @@
 
 /* Begin PBXBuildFile section */
 		4207D2841D8247CB001B4A67 /* NotificationNameCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4207D2831D8247CB001B4A67 /* NotificationNameCenter.m */; };
+		4219B7EA1DADC48D0092B4DE /* Singleton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4219B7E91DADC48D0092B4DE /* Singleton.m */; };
 		421C55021D81586D00CFA3B1 /* JKTimerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 421C55011D81586D00CFA3B1 /* JKTimerManager.m */; };
 		423A4ADC1D503A53005ECE4A /* createContact.json in Resources */ = {isa = PBXBuildFile; fileRef = 423A4ADB1D503A53005ECE4A /* createContact.json */; };
 		423B49EF1DAC8071004181C2 /* CUL.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 423B49EE1DAC8071004181C2 /* CUL.storyboard */; };
@@ -214,6 +215,8 @@
 /* Begin PBXFileReference section */
 		4207D2821D8247CB001B4A67 /* NotificationNameCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationNameCenter.h; sourceTree = "<group>"; };
 		4207D2831D8247CB001B4A67 /* NotificationNameCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotificationNameCenter.m; sourceTree = "<group>"; };
+		4219B7E81DADC48D0092B4DE /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Singleton.h; sourceTree = "<group>"; };
+		4219B7E91DADC48D0092B4DE /* Singleton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Singleton.m; sourceTree = "<group>"; };
 		421C55001D81586D00CFA3B1 /* JKTimerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JKTimerManager.h; sourceTree = "<group>"; };
 		421C55011D81586D00CFA3B1 /* JKTimerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JKTimerManager.m; sourceTree = "<group>"; };
 		423A4ADB1D503A53005ECE4A /* createContact.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = createContact.json; sourceTree = "<group>"; };
@@ -747,6 +750,8 @@
 				423B49F01DAC8CE0004181C2 /* Price Setting */,
 				713F76B81929F4A7006A7305 /* AppDelegate.h */,
 				713F76B91929F4A7006A7305 /* AppDelegate.m */,
+				4219B7E81DADC48D0092B4DE /* Singleton.h */,
+				4219B7E91DADC48D0092B4DE /* Singleton.m */,
 				7162A5E71C5899F700AB630E /* MainViewController.h */,
 				7162A5E81C5899F700AB630E /* MainViewController.m */,
 				423B49EE1DAC8071004181C2 /* CUL.storyboard */,
@@ -1484,6 +1489,7 @@
 				71DF745B1C575E7900F2789C /* CommonEditorCellAction.m in Sources */,
 				7162A5411C58719D00AB630E /* RATreeNode.m in Sources */,
 				7162A5251C58706C00AB630E /* CategoryCellSmall.m in Sources */,
+				4219B7EA1DADC48D0092B4DE /* Singleton.m in Sources */,
 				712C40B91C731126000E6831 /* ItemNotesViewController.m in Sources */,
 				7162A5AD1C58735900AB630E /* TearSheetParamViewController.m in Sources */,
 				7141DD611C5747CE00F7DF59 /* NSData+Base64.m in Sources */,

+ 18 - 2
RedAnt ERP Mobile/iSales-NPD/CUL.storyboard

@@ -63,8 +63,22 @@
                                     <action selector="priceTypeButtonClick:" destination="hVu-Cy-75z" eventType="touchUpInside" id="YI6-Mf-nVM"/>
                                 </connections>
                             </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jgD-F7-uVA">
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="30" id="TgR-mG-zQN"/>
+                                    <constraint firstAttribute="width" constant="102" id="ZiN-f8-Qwu"/>
+                                </constraints>
+                                <state key="normal" image="btn_save"/>
+                                <connections>
+                                    <action selector="saveButtonClick:" destination="hVu-Cy-75z" eventType="touchUpInside" id="4AQ-ZI-hjR"/>
+                                </connections>
+                            </button>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                        <constraints>
+                            <constraint firstItem="3KL-Lc-pQE" firstAttribute="top" secondItem="jgD-F7-uVA" secondAttribute="bottom" constant="30" id="4nf-5N-Y7R"/>
+                            <constraint firstAttribute="trailing" secondItem="jgD-F7-uVA" secondAttribute="trailing" constant="30" id="HoK-ZL-XOc"/>
+                        </constraints>
                     </view>
                     <connections>
                         <outlet property="priceTypeButton" destination="jtK-Ru-fSW" id="jkm-Cl-oLP"/>
@@ -183,6 +197,7 @@
                                 </constraints>
                                 <state key="normal" image="check_0_24"/>
                                 <state key="selected" image="check_1_24"/>
+                                <state key="highlighted" image="check_0_24"/>
                                 <connections>
                                     <action selector="floatCheckButtonClick:" destination="UzA-yv-6er" eventType="touchUpInside" id="Dxm-cx-sod"/>
                                 </connections>
@@ -199,6 +214,7 @@
                                 </constraints>
                                 <state key="normal" image="check_0_24"/>
                                 <state key="selected" image="check_1_24"/>
+                                <state key="highlighted" image="check_0_24"/>
                                 <connections>
                                     <action selector="percentageCheckButtonClick:" destination="UzA-yv-6er" eventType="touchUpInside" id="tzh-hL-hYy"/>
                                 </connections>
@@ -208,7 +224,7 @@
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="-9999999999" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Y7Q-PG-43Q">
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Y7Q-PG-43Q">
                                 <constraints>
                                     <constraint firstAttribute="width" constant="150" id="ePr-Wf-OYY"/>
                                 </constraints>
@@ -219,7 +235,7 @@
                                     <outlet property="delegate" destination="UzA-yv-6er" id="bca-MD-vcV"/>
                                 </connections>
                             </textField>
-                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="10000%" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="7fx-7w-auD">
+                            <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="7fx-7w-auD">
                                 <constraints>
                                     <constraint firstAttribute="width" constant="150" id="svm-Em-IwF"/>
                                 </constraints>

+ 2 - 0
RedAnt ERP Mobile/iSales-NPD/CategoryPriceCell.h

@@ -10,4 +10,6 @@
 
 @interface CategoryPriceCell : UITableViewCell
 
+@property (nonatomic,strong) NSDictionary *categoryPrice;
+
 @end

+ 7 - 0
RedAnt ERP Mobile/iSales-NPD/CategoryPriceCell.m

@@ -29,4 +29,11 @@
     // Configure the view for the selected state
 }
 
+- (void)setCategoryPrice:(NSDictionary *)categoryPrice {
+    _categoryPrice = categoryPrice;
+    
+    self.categoryLabel.text = @"LIVING";
+    self.priceLabel.text = [NSString stringWithFormat:@"base price:1000 + $50.11"];
+}
+
 @end

+ 2 - 0
RedAnt ERP Mobile/iSales-NPD/CategoryPriceViewController.h

@@ -7,6 +7,8 @@
 //
 
 #import <UIKit/UIKit.h>
+#import "SetCategoryPriceController.h"
+
 
 @interface CategoryPriceViewController : UIViewController
 

+ 1 - 2
RedAnt ERP Mobile/iSales-NPD/CategoryPriceViewController.m

@@ -9,7 +9,6 @@
 #import "CategoryPriceViewController.h"
 #import "const.h"
 #import "CategoryPriceCell.h"
-#import "SetCategoryPriceController.h"
 
 @interface CategoryPriceViewController ()<UITableViewDelegate,UITableViewDataSource>
 
@@ -64,7 +63,7 @@
     
     CategoryPriceCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CategoryPriceCell"];
     
-    
+    cell.categoryPrice = nil;
     
     return cell;
 }

+ 28 - 16
RedAnt ERP Mobile/iSales-NPD/PriceSettingViewController.m

@@ -11,6 +11,7 @@
 #import "EnumSelectViewController.h"
 #import "CategoryPriceViewController.h"
 #import "iSalesNetwork.h"
+#import "Singleton.h"
 
 
 
@@ -28,6 +29,8 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     
+    self.priceType = [Singleton sharedInstance].npd_shop_price_type;
+    
     [self configAppearance];
     
 }
@@ -40,6 +43,8 @@
 #pragma mark - Customer Inint
 
 - (void)configAppearance {
+    
+    
     [self changePriceType:self.priceType];
     self.showButton.selected = self.showPrice;
     
@@ -53,18 +58,18 @@
 
 - (void)changePriceType:(NSInteger)type {
     
-    NSString *title = @"提货价";
+    NSString *title = ab_lager;
     switch (type) {
         case 0: {
-            title = @"提货价";
+            title = ab_lager;
         }
             break;
         case 1: {
-            title = @"统一价";
+            title = flat_price;
         }
             break;
         case 2: {
-            title = @"计算价";
+            title = given_price;
         }
             break;
             
@@ -130,9 +135,9 @@
     
     enumvc.cadedate = @{
                         @"count" : @"3",
-                        @"val_0" : @{@"value" : @"提货价",@"value_code" : @"0",@"check" : [self checkPriceType:0]},
-                        @"val_1" : @{@"value" : @"统一价",@"value_code" : @"1",@"check" : [self checkPriceType:1]},
-                        @"val_2" : @{@"value" : @"计算价",@"value_code" : @"2",@"check" : [self checkPriceType:2]}
+                        @"val_0" : @{@"value" : ab_lager,@"value_code" : @"0",@"check" : [self checkPriceType:0]},
+                        @"val_1" : @{@"value" : flat_price,@"value_code" : @"1",@"check" : [self checkPriceType:1]},
+                        @"val_2" : @{@"value" : given_price,@"value_code" : @"2",@"check" : [self checkPriceType:2]}
                         }.mutableCopy;
     enumvc.title = @"";
     
@@ -148,15 +153,7 @@
             __strong typeof(weakSelf) strongSelf = weakSelf;
             
             [strongSelf changePriceType:[strongSelf checkedCadedate:value]];
-            
-            NSString *url = @"http://192.168.0.126:8080/site/isales/setSeePriceType.htm";
-            
-            NSData *data = [iSalesNetwork get_json:url parameters:@{@"price_type" : [NSString stringWithFormat:@"%d",strongSelf.priceType]}.mutableCopy];
-            
-            NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
-            
-            NSLog(@"%@",dic);
-            
+
         }
         
     };
@@ -164,5 +161,20 @@
     [self.navigationController pushViewController:enumvc animated:true];
 }
 
+- (IBAction)saveButtonClick:(UIButton *)sender {
+    
+    NSDictionary *dic = [iSalesNetwork set_npd_shop_price_type:self.priceType];
+    
+    // 成功
+    if ([[dic objectForKey:@"result"] integerValue] == 2) {
+        
+        [Singleton sharedInstance].npd_shop_price_type = self.priceType;
+    
+    } else { // 失败
+        
+        DebugLog(@"set price type failure");
+    }
+    
+}
 
 @end

+ 8 - 0
RedAnt ERP Mobile/iSales-NPD/SetCategoryPriceController.h

@@ -8,8 +8,16 @@
 
 #import <UIKit/UIKit.h>
 
+#define ab_lager @"提货价"
+#define flat_price @"统一价"
+#define given_price @"计算价"
+
+typedef void (^setCategoryPriceReturnBlock) (NSDictionary *categoryPrice);
+
 @interface SetCategoryPriceController : UIViewController
 
+@property (nonatomic,strong) NSMutableDictionary *categoryPrice;
 
+@property (nonatomic,copy) setCategoryPriceReturnBlock returnBlock;
 
 @end

+ 67 - 67
RedAnt ERP Mobile/iSales-NPD/SetCategoryPriceController.m

@@ -62,14 +62,14 @@
 
 - (void)changePriceType:(NSInteger)type {
     
-    NSString *title = @"提货价";
+    NSString *title = ab_lager;
     switch (type) {
         case 0: {
-            title = @"提货价";
+            title = ab_lager;
         }
             break;
         case 1: {
-            title = @"统一价";
+            title = flat_price;
         }
             break;
             
@@ -115,8 +115,8 @@
     
     enumvc.cadedate = @{
                         @"count" : @"2",
-                        @"val_0" : @{@"value" : @"提货价",@"value_code" : @"0",@"check" : [self checkPriceType:0]},
-                        @"val_1" : @{@"value" : @"统一价",@"value_code" : @"1",@"check" : [self checkPriceType:1]}
+                        @"val_0" : @{@"value" : ab_lager,@"value_code" : @"0",@"check" : [self checkPriceType:0]},
+                        @"val_1" : @{@"value" : flat_price,@"value_code" : @"1",@"check" : [self checkPriceType:1]}
                         }.mutableCopy;
     enumvc.title = @"";
     
@@ -164,6 +164,12 @@
     
 }
 - (IBAction)saveButtonClick:(UIButton *)sender {
+    
+    // 向服务器提交数据
+    
+    // 将数据返回
+    if (self.returnBlock)
+        self.returnBlock(self.categoryPrice);
 }
 
 #pragma mark - text field delegate
@@ -175,74 +181,68 @@
     if (newText.length == 0)
         return YES;
 
-    // 第一个字符不能为小数点
-    if ([newText isEqualToString:@"."])
-        return NO;
-    if ([newText componentsSeparatedByString:@"."].count > 2) {
-        return NO;
-    } // 不能有多个小数点
-    
-    // 只能第一个字符为减号
-    if (newText.length > 1 && [string isEqualToString:@"-"]) {
-        return NO;
-    }
-
-    // 校验正数
-    NSCharacterSet *cs;
-    cs = [[NSCharacterSet characterSetWithCharactersInString:NUMBERS]invertedSet];
-    NSString *filtered = [[string componentsSeparatedByCharactersInSet:cs]componentsJoinedByString:@""];
-    BOOL canChange = [string isEqualToString:filtered];
+//    // 第一个字符不能为小数点
+//    if ([newText isEqualToString:@"."])
+//        return NO;
+//    if ([newText componentsSeparatedByString:@"."].count > 2) {
+//        return NO;
+//    } // 不能有多个小数点
+//    
+//    // 只能第一个字符为减号
+//    if (newText.length > 1 && [string isEqualToString:@"-"]) {
+//        return NO;
+//    }
+//    // 不能为 0123
+//    if (newText.length > 1 && [newText hasPrefix:@"0"] && [newText characterAtIndex:1] != '.') {
+//        return NO;
+//    }
+//    // 不能为 -0123
+//    if (newText.length > 2 && [newText hasPrefix:@"-0"] && [newText characterAtIndex:2] != '.') {
+//        return NO;
+//    }
+//
+//    // 校验正数
+//    NSCharacterSet *cs;
+//    cs = [[NSCharacterSet characterSetWithCharactersInString:NUMBERS]invertedSet];
+//    NSString *filtered = [[string componentsSeparatedByCharactersInSet:cs]componentsJoinedByString:@""];
+//    BOOL canChange = [string isEqualToString:filtered];
+//    
+//    if ([textField isEqual:self.floatTextField]) {
+//
+//        // 校验负数
+//        NSCharacterSet *negative_cs;
+//        
+//        negative_cs = [[NSCharacterSet characterSetWithCharactersInString:NEGATIVE_NUMBERS]invertedSet];
+//        NSString *negative_filtered = [[string componentsSeparatedByCharactersInSet:negative_cs]componentsJoinedByString:@""];
+//        
+//        BOOL negative_canChange = [string isEqualToString:negative_filtered];
+//        
+//        // 只能第一个字符为减号
+//        if ([string isEqualToString:@"-"]) {
+//            
+//            if (newText.length == 1 && [string isEqualToString:@"-"]) {
+//                negative_canChange = YES && negative_canChange;
+//            } else {
+//                negative_canChange = NO;
+//            }
+//        }
+//
+//        
+//        return canChange || negative_canChange;
+//    } else {
+//        return canChange;
+//    }
     
-    if ([textField isEqual:self.floatTextField]) {
-
-        // 校验负数
-        NSCharacterSet *negative_cs;
-        
-        negative_cs = [[NSCharacterSet characterSetWithCharactersInString:NEGATIVE_NUMBERS]invertedSet];
-        NSString *negative_filtered = [[string componentsSeparatedByCharactersInSet:negative_cs]componentsJoinedByString:@""];
-        
-        BOOL negative_canChange = [string isEqualToString:negative_filtered];
-        
-        // 只能第一个字符为减号
-        if ([string isEqualToString:@"-"]) {
-            
-            if (newText.length == 1 && [string isEqualToString:@"-"]) {
-                negative_canChange = YES && negative_canChange;
-            } else {
-                negative_canChange = NO;
-            }
-        }
 
-        
-        return canChange || negative_canChange;
-    } else {
-        return canChange;
-    }
-    
-    
     // 正则表达式
-    BOOL plus = YES; // 正数
-    NSString *plus_match = @"^[0-9]+(\\.[0-9]+){0,1}$";
-    NSPredicate *plus_predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",plus_match];
-    
-    plus = [plus_predicate evaluateWithObject:newText];
-    
-    BOOL negative = YES; // 负数
-    NSString *negative_match = @"^-([0-9]+(\\.[0-9]+){0,1})$";
-    NSPredicate *negative_predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",negative_match];
-    negative = [negative_predicate evaluateWithObject:newText];
+    NSString *match = @"-[1-9]+(\\.[0-9]*)?|-0\\.[0-9]+|[1-9]+(\\.[0-9]*)?|0\\.[0-9]{0,}|0{1,1}|-{1,1}|-0{1,1}|-0\\.{1,1}";
     
-    BOOL zerobegin = NO; // 01231
-    NSString *zerobegin_match = @"^0[1-9]+(\\.[0-9]+){0,1}$";
-    NSPredicate *zerobegin_predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",zerobegin_match];
+    if ([textField isEqual:self.percentageTextField])
+        match = @"[1-9]+(\\.[0-9]*)?|0(\\.[0-9]*)?";
     
-    zerobegin = [zerobegin_predicate evaluateWithObject:newText];
-    
-    if (zerobegin) {
-        return NO;
-    }
+    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",match];
     
-    return plus || negative;
+        return [predicate evaluateWithObject:newText];
 }
 
 @end

+ 17 - 0
RedAnt ERP Mobile/iSales-NPD/Singleton.h

@@ -0,0 +1,17 @@
+//
+//  Singleton.h
+//  iSales-NPD
+//
+//  Created by Jack on 2016/10/12.
+//  Copyright © 2016年 United Software Applications, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface Singleton : NSObject
+
+@property (nonatomic,assign) NSInteger npd_shop_price_type;
+
++ (instancetype)sharedInstance;
+
+@end

+ 22 - 0
RedAnt ERP Mobile/iSales-NPD/Singleton.m

@@ -0,0 +1,22 @@
+//
+//  Singleton.m
+//  iSales-NPD
+//
+//  Created by Jack on 2016/10/12.
+//  Copyright © 2016年 United Software Applications, Inc. All rights reserved.
+//
+
+#import "Singleton.h"
+
+@implementation Singleton
+
++ (instancetype)sharedInstance {
+    static Singleton *singleton = nil;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        singleton = [[Singleton alloc] init];
+    });
+    return singleton;
+}
+
+@end

+ 5 - 0
RedAnt ERP Mobile/iSales-NPD/config.h

@@ -138,6 +138,9 @@
 
 
 #define  URL_GET_RESULT  @"http://192.168.0.126:8080/site/offline/getResultBySerial.htm"
+
+#define URL_SET_PRICE_TYPE @"http://192.168.0.126:8080/site/isales/setSeePriceType.htm"
+
 #else
 
 
@@ -247,6 +250,8 @@
 #define  URL_SEARCHADDALL  @"https://www.newpacificdirect.com/isales/searchAddAllTo.htm"
 #define  URL_ITEMSEARCHADDALL @"https://www.newpacificdirect.com/isales/itemSearchAddAllTo.htm"
 
+#define URL_SET_PRICE_TYPE @"https://www.newpacificdirect.com/isales/setSeePriceType.htm"
+
 #endif
 
 #endif