瀏覽代碼

HMLG Scan Order 1.33
modify UI


Contrast 1.99
Add sound effect for scan result

Ray Zhang 3 年之前
父節點
當前提交
95c5409099

+ 2 - 2
RedAnt ERP Mobile/HMLG Scan Order.xcodeproj/project.pbxproj

@@ -2520,7 +2520,7 @@
 				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 52604;
+				CURRENT_PROJECT_VERSION = 52630;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2569,7 +2569,7 @@
 				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 52604;
+				CURRENT_PROJECT_VERSION = 52630;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",

File diff suppressed because it is too large
+ 127 - 129
RedAnt ERP Mobile/HMLG Scan Order/SO.storyboard


+ 1 - 1
RedAnt ERP Mobile/HMLG Scan Order/ScanHistoryViewController.m

@@ -39,7 +39,7 @@
 
 }
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-    return 136.0f;
+    return 166.0f;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

+ 1 - 1
RedAnt ERP Mobile/HMLG Scan Order/ScanOrderModelListViewController.m

@@ -256,7 +256,7 @@
     return arr.count;
 }
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-    return 136.0f;
+    return 166.0f;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

+ 1 - 1
RedAnt ERP Mobile/HMLG Scan Order/ScanSearchViewController.m

@@ -187,7 +187,7 @@
     if(indexPath.row==self.modellist.count)
         return 44;
     else
-        return 136.0f;
+        return 166.0f;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

+ 12 - 1
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -5796,6 +5796,10 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 //}
 
 #pragma mark - Support scanner
+
+
+
+
 -(void) onDecodedData:(NSString*) value
 {
     
@@ -5804,8 +5808,10 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 //
 //#if defined(USE_BLE_SCANNER) || defined(USE_MFI_SCANNER)
     if(self.stop_response)
+    {
+        [RAUtils playSound:@"wrong" type:@"wav"];
         return;
-
+    }
 
 //#endif
     
@@ -5908,11 +5914,16 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
                 [ActiveViewController Notify:@"OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
                 [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_SCAN_RELOAD_DATA];
                 
+                [RAUtils playSound:@"softScanBeep" type:@"wav"];
+                
+                
             }
             else
             {
                 self.stop_response=true;
                 
+                [RAUtils playSound:@"wrong" type:@"wav"];
+                
                 [RAUtils message_alert:return_json[@"err_msg"] title:@"Add To Cart" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
         self.stop_response=false;
 

+ 2 - 26
RedAnt ERP Mobile/common/data_provider/RADataProvider.m

@@ -57,19 +57,7 @@
     AppDelegate *appDelegate = nil;
     
     appDelegate=(AppDelegate*)[[UIApplication sharedApplication] delegate];
-//    if(appDelegate.user!=nil)
-//        [params setValue:appDelegate.user forKey:@"user"];
-//    if(appDelegate.contact_id!=nil)
-//        [params setValue:appDelegate.contact_id forKey:@"contactId"];
-//    if(appDelegate.password!=nil)
-//        [params setValue:appDelegate.password forKey:@"password"];
-//    if(appDelegate.order_code!=nil)
-//        [params setValue:appDelegate.order_code forKey:@"orderCode"];
-    //    [params setValue:[NSString stringWithFormat:@"%d",price_template]  forKey:@"price_template"];
-    //    [params setValue:[NSString stringWithFormat:@"%d",customid]  forKey:@"custom_id"];
-    //    [params setValue:[NSString stringWithFormat:@"%@",category]  forKey:@"category"];
-    //    [params setValue:[NSString stringWithFormat:@"%d",sort_by]  forKey:@"sort_by"];
-    //    [params setValue:filter forKey:@"filter"];
+
     [params setValue:keywords forKey:@"keyword"];
     [params setValue:@"search" forKey:@"_method"];
     params[@"site_name"]=[self getSiteName];
@@ -78,19 +66,7 @@
  
 
     [self request_interface:URL_SEARCH parameters:params err_record_url:nil completionHandler:result retry:0];
-    //    if(appDelegate.offline_mode)
-    //    {
-    //        return [OLDataProvider offline_search:params];
-    //    }
-    //    if(![self IsNetworkAvailable])
-    //        return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
-    //
-    //    NSData* json=[self get_json:URL_SEARCH parameters:params];
-    //    if(json==nil)
-    //        return nil;
-    //    NSError *error=nil;
-    //    NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
-    //    return jsobj;
+
 }
 +(void)encrypt_scan_models
 {

+ 6 - 2
RedAnt ERP Mobile/iSales-CONTRAST.xcodeproj/project.pbxproj

@@ -7,6 +7,7 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		3C284E542971444300E5491B /* wrong.wav in Resources */ = {isa = PBXBuildFile; fileRef = 3C284E532971444300E5491B /* wrong.wav */; };
 		3C2F99B8237BE1790000808F /* PortfolioListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C2F99B6237BE1790000808F /* PortfolioListTableViewCell.m */; };
 		3C3300B729430F3E005CFE7C /* commonScanner.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3C3300B629430F3E005CFE7C /* commonScanner.storyboard */; };
 		3C3300BA29431141005CFE7C /* CommonScannerSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C3300B929431141005CFE7C /* CommonScannerSettingViewController.m */; };
@@ -305,6 +306,7 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+		3C284E532971444300E5491B /* wrong.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = wrong.wav; sourceTree = "<group>"; };
 		3C2F99B6237BE1790000808F /* PortfolioListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PortfolioListTableViewCell.m; path = common/Functions/portfolio/PortfolioListTableViewCell.m; sourceTree = SOURCE_ROOT; };
 		3C2F99B7237BE1790000808F /* PortfolioListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PortfolioListTableViewCell.h; path = common/Functions/portfolio/PortfolioListTableViewCell.h; sourceTree = SOURCE_ROOT; };
 		3C3300B629430F3E005CFE7C /* commonScanner.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = commonScanner.storyboard; sourceTree = "<group>"; };
@@ -1566,6 +1568,7 @@
 				7141DD381C5726B700F7DF59 /* ScanApiHelper.mm */,
 				7141DD391C5726B700F7DF59 /* ScanApiIncludes.h */,
 				7141DD3A1C5726B700F7DF59 /* softScanBeep.wav */,
+				3C284E532971444300E5491B /* wrong.wav */,
 				7141DD331C57269B00F7DF59 /* include */,
 			);
 			name = ScanAPI;
@@ -1970,6 +1973,7 @@
 				3C68316E2396094200AD5BD7 /* iPadCommonEditorCellAction.xib in Resources */,
 				7143E22E202FD3CD00451903 /* more_info.html in Resources */,
 				7162A5A11C58733400AB630E /* offline_status_filter_cadedate.json in Resources */,
+				3C284E542971444300E5491B /* wrong.wav in Resources */,
 				42B309791E45BA32007AFC62 /* status_filter_cadedate_po.json in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -2347,7 +2351,7 @@
 				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 230111;
+				CURRENT_PROJECT_VERSION = 230112;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -2397,7 +2401,7 @@
 				CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = NO;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				CURRENT_PROJECT_VERSION = 230111;
+				CURRENT_PROJECT_VERSION = 230112;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",

二進制
RedAnt ERP Mobile/iSales-CONTRAST/wrong.wav


+ 1 - 0
common/RAUtils.h

@@ -121,5 +121,6 @@ NS_ASSUME_NONNULL_BEGIN
 + (UIViewController *)getCurrentVCFrom:(UIViewController *)rootVC;
 + (UIViewController *)getCurrentVC;
 +(NSDictionary* )copyDict:(NSDictionary* ) source;
++(void) playSound:(NSString*) name type:(NSString*) type;
 @end
 NS_ASSUME_NONNULL_END

+ 22 - 1
common/RAUtils.m

@@ -17,7 +17,7 @@
 #import "AppDelegate.h"
 //#import "Singleton.h"
 #include <CommonCrypto/CommonDigest.h>
-
+#import <AudioToolbox/AudioToolbox.h>
 //#import "ZipArchive.h"
 
 #define FileHashDefaultChunkSizeForReadingData 1024*8
@@ -605,7 +605,28 @@
     return alertController;
 
 }
++(void) playSound:(NSString*) name type:(NSString*) type
+{
+ 
+     CFStringRef cfname = (__bridge CFStringRef)name;
+    CFStringRef cftype = (__bridge CFStringRef)type;
 
+
+    CFBundleRef mainBundle;
+    SystemSoundID soundFileObject;
+    mainBundle = CFBundleGetMainBundle ();
+    CFURLRef soundFileURLRef  = CFBundleCopyResourceURL (
+                                                         mainBundle,
+                                                         cfname,
+                                                         cftype,
+                                                         NULL
+                                                         );
+    AudioServicesCreateSystemSoundID (
+                                      soundFileURLRef,
+                                      &soundFileObject
+                                      );
+    AudioServicesPlaySystemSound(soundFileObject);
+}
 +(UIAlertController*) message_alert :(NSString*) msg title:(NSString*) title controller:(UIViewController*) vc
 {
     if(title==nil)

Some files were not shown because too many files changed in this diff