Explorar o código

Recant mobile

集成 raimage,完成search 和 predef search
Ray Zhang %!s(int64=8) %!d(string=hai) anos
pai
achega
6e71a6e0d6

+ 184 - 30
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.pbxproj

@@ -7,8 +7,7 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		4221EF931FA813030026E1EC /* RARootModeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EF921FA813030026E1EC /* RARootModeCell.m */; };
-		4221EF961FA814400026E1EC /* RARootNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EF951FA814400026E1EC /* RARootNavigationController.m */; };
+		4221EF931FA813030026E1EC /* RAModeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EF921FA813030026E1EC /* RAModeCell.m */; };
 		4221EF9A1FA81D070026E1EC /* RAPredefQueryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EF991FA81D070026E1EC /* RAPredefQueryViewController.m */; };
 		4221EF9D1FA81D5B0026E1EC /* RAQueryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EF9C1FA81D5B0026E1EC /* RAQueryViewController.m */; };
 		4221EF9F1FA81E150026E1EC /* RAPredefQuery.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4221EF9E1FA81E150026E1EC /* RAPredefQuery.storyboard */; };
@@ -36,7 +35,31 @@
 		42DFAE791F9B2CBD009AFCCC /* Phone_Signature_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE781F9B2CBD009AFCCC /* Phone_Signature_Cell.xib */; };
 		42DFAE7B1F9B2CE6009AFCCC /* Phone_Switch_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE7A1F9B2CE6009AFCCC /* Phone_Switch_Cell.xib */; };
 		42DFAE7D1F9B2D02009AFCCC /* Phone_TextView_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE7C1F9B2D02009AFCCC /* Phone_TextView_Cell.xib */; };
-		42F2EB3E1FA80EDC00BC6468 /* RAModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42F2EB3D1FA80EDC00BC6468 /* RAModel.m */; };
+		7102C13B1FCC0FF70062A67A /* ImageUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 7102C1391FCC0FF60062A67A /* ImageUtils.m */; };
+		7102C13E1FCD46C10062A67A /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7102C13C1FCD46C00062A67A /* RootViewController.m */; };
+		7102C1411FCD46DE0062A67A /* RootModeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7102C1401FCD46DE0062A67A /* RootModeCell.m */; };
+		7102C1461FCD51FF0062A67A /* RAImage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7102C1431FCD486F0062A67A /* RAImage.storyboard */; };
+		7167802D1FCC087E00FE2784 /* BasicModeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7167802B1FCC087E00FE2784 /* BasicModeViewController.m */; };
+		7167802F1FCC095000FE2784 /* Mode.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7167802E1FCC095000FE2784 /* Mode.storyboard */; };
+		716780321FCC095D00FE2784 /* TakePhotoPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780311FCC095D00FE2784 /* TakePhotoPreviewController.m */; };
+		716780351FCC096B00FE2784 /* PopModeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780331FCC096B00FE2784 /* PopModeViewController.m */; };
+		716780381FCC097B00FE2784 /* ModelModeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780371FCC097B00FE2784 /* ModelModeViewController.m */; };
+		7167803B1FCC098600FE2784 /* ManufacturerListController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7167803A1FCC098600FE2784 /* ManufacturerListController.m */; };
+		7167803E1FCC099200FE2784 /* ManufacturerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7167803D1FCC099200FE2784 /* ManufacturerCell.m */; };
+		716780411FCC0A2900FE2784 /* cam_scan.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 716780401FCC0A2900FE2784 /* cam_scan.storyboard */; };
+		7167804C1FCC0B0000FE2784 /* MenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780421FCC0AFF00FE2784 /* MenuViewController.m */; };
+		7167804D1FCC0B0000FE2784 /* RAMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780431FCC0AFF00FE2784 /* RAMenu.m */; };
+		7167804E1FCC0B0000FE2784 /* SCShapeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780461FCC0AFF00FE2784 /* SCShapeView.m */; };
+		7167804F1FCC0B0000FE2784 /* ScannerControllerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780491FCC0AFF00FE2784 /* ScannerControllerView.m */; };
+		716780501FCC0B0000FE2784 /* ScannerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7167804A1FCC0AFF00FE2784 /* ScannerViewController.m */; };
+		716780531FCC0C4F00FE2784 /* UIImage+fixOrientation.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780521FCC0C4E00FE2784 /* UIImage+fixOrientation.m */; };
+		716780561FCC0C6D00FE2784 /* UIView+Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780541FCC0C6D00FE2784 /* UIView+Toast.m */; };
+		7167805C1FCC0D0900FE2784 /* RAUploadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780581FCC0D0800FE2784 /* RAUploadManager.m */; };
+		7167805D1FCC0D0900FE2784 /* RAUploadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7167805A1FCC0D0800FE2784 /* RAUploadOperation.m */; };
+		716780631FCC0D3700FE2784 /* Upload.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7167805E1FCC0D3700FE2784 /* Upload.storyboard */; };
+		716780641FCC0D3700FE2784 /* UploadSettingController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7167805F1FCC0D3700FE2784 /* UploadSettingController.m */; };
+		716780651FCC0D3700FE2784 /* UploadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780611FCC0D3700FE2784 /* UploadViewController.m */; };
+		716780681FCC0D4400FE2784 /* UploadCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 716780661FCC0D4400FE2784 /* UploadCell.m */; };
 		7197D4041FB438B60063EFBB /* demo_row.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 7197D4031FB4388F0063EFBB /* demo_row.pdf */; };
 		7197D4081FB57E270063EFBB /* SearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7197D4071FB57E270063EFBB /* SearchViewController.m */; };
 		7197D40A1FB58E530063EFBB /* search_ui.json in Resources */ = {isa = PBXBuildFile; fileRef = 7197D4091FB58E530063EFBB /* search_ui.json */; };
@@ -52,7 +75,7 @@
 		71E9F6C81F8C5CCB0052C78E /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 71E9F6C61F8C5CCA0052C78E /* NetworkUtils.m */; };
 		71F3A9A21F5F8E22001036C8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9A11F5F8E22001036C8 /* main.m */; };
 		71F3A9A51F5F8E22001036C8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9A41F5F8E22001036C8 /* AppDelegate.m */; };
-		71F3A9A81F5F8E22001036C8 /* RARootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9A71F5F8E22001036C8 /* RARootViewController.m */; };
+		71F3A9A81F5F8E22001036C8 /* RAModeListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3A9A71F5F8E22001036C8 /* RAModeListViewController.m */; };
 		71F3A9AB1F5F8E22001036C8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71F3A9A91F5F8E22001036C8 /* Main.storyboard */; };
 		71F3A9AD1F5F8E22001036C8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 71F3A9AC1F5F8E22001036C8 /* Assets.xcassets */; };
 		71F3A9B01F5F8E22001036C8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71F3A9AE1F5F8E22001036C8 /* LaunchScreen.storyboard */; };
@@ -129,10 +152,8 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
-		4221EF911FA813030026E1EC /* RARootModeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RARootModeCell.h; sourceTree = "<group>"; };
-		4221EF921FA813030026E1EC /* RARootModeCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RARootModeCell.m; sourceTree = "<group>"; };
-		4221EF941FA814400026E1EC /* RARootNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RARootNavigationController.h; sourceTree = "<group>"; };
-		4221EF951FA814400026E1EC /* RARootNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RARootNavigationController.m; sourceTree = "<group>"; };
+		4221EF911FA813030026E1EC /* RAModeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAModeCell.h; sourceTree = "<group>"; };
+		4221EF921FA813030026E1EC /* RAModeCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAModeCell.m; sourceTree = "<group>"; };
 		4221EF981FA81D070026E1EC /* RAPredefQueryViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPredefQueryViewController.h; sourceTree = "<group>"; };
 		4221EF991FA81D070026E1EC /* RAPredefQueryViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAPredefQueryViewController.m; sourceTree = "<group>"; };
 		4221EF9B1FA81D5B0026E1EC /* RAQueryViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAQueryViewController.h; sourceTree = "<group>"; };
@@ -170,8 +191,52 @@
 		42DFAE781F9B2CBD009AFCCC /* Phone_Signature_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Signature_Cell.xib; sourceTree = "<group>"; };
 		42DFAE7A1F9B2CE6009AFCCC /* Phone_Switch_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Switch_Cell.xib; sourceTree = "<group>"; };
 		42DFAE7C1F9B2D02009AFCCC /* Phone_TextView_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_TextView_Cell.xib; sourceTree = "<group>"; };
-		42F2EB3C1FA80EDC00BC6468 /* RAModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAModel.h; sourceTree = "<group>"; };
-		42F2EB3D1FA80EDC00BC6468 /* RAModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAModel.m; sourceTree = "<group>"; };
+		7102C1391FCC0FF60062A67A /* ImageUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImageUtils.m; path = "../../RedAnt ERP Mobile/common/ImageUtils.m"; sourceTree = "<group>"; };
+		7102C13A1FCC0FF60062A67A /* ImageUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ImageUtils.h; path = "../../RedAnt ERP Mobile/common/ImageUtils.h"; sourceTree = "<group>"; };
+		7102C13C1FCD46C00062A67A /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RootViewController.m; path = "../../RA Image/RA Image/RootViewController.m"; sourceTree = "<group>"; };
+		7102C13D1FCD46C00062A67A /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = "../../RA Image/RA Image/RootViewController.h"; sourceTree = "<group>"; };
+		7102C13F1FCD46DE0062A67A /* RootModeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootModeCell.h; path = "../../RA Image/RA Image/RootModeCell.h"; sourceTree = "<group>"; };
+		7102C1401FCD46DE0062A67A /* RootModeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RootModeCell.m; path = "../../RA Image/RA Image/RootModeCell.m"; sourceTree = "<group>"; };
+		7102C1441FCD486F0062A67A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "../../RA Image/RA Image/Base.lproj/RAImage.storyboard"; sourceTree = "<group>"; };
+		7167802B1FCC087E00FE2784 /* BasicModeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BasicModeViewController.m; path = "../../RA Image/RA Image/BasicModeViewController.m"; sourceTree = "<group>"; };
+		7167802C1FCC087E00FE2784 /* BasicModeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BasicModeViewController.h; path = "../../RA Image/RA Image/BasicModeViewController.h"; sourceTree = "<group>"; };
+		7167802E1FCC095000FE2784 /* Mode.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Mode.storyboard; path = "../../RA Image/RA Image/Mode.storyboard"; sourceTree = "<group>"; };
+		716780301FCC095D00FE2784 /* TakePhotoPreviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TakePhotoPreviewController.h; path = "../../RA Image/RA Image/TakePhotoPreviewController.h"; sourceTree = "<group>"; };
+		716780311FCC095D00FE2784 /* TakePhotoPreviewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TakePhotoPreviewController.m; path = "../../RA Image/RA Image/TakePhotoPreviewController.m"; sourceTree = "<group>"; };
+		716780331FCC096B00FE2784 /* PopModeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PopModeViewController.m; path = "../../RA Image/RA Image/PopModeViewController.m"; sourceTree = "<group>"; };
+		716780341FCC096B00FE2784 /* PopModeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PopModeViewController.h; path = "../../RA Image/RA Image/PopModeViewController.h"; sourceTree = "<group>"; };
+		716780361FCC097B00FE2784 /* ModelModeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModelModeViewController.h; path = "../../RA Image/RA Image/ModelModeViewController.h"; sourceTree = "<group>"; };
+		716780371FCC097B00FE2784 /* ModelModeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ModelModeViewController.m; path = "../../RA Image/RA Image/ModelModeViewController.m"; sourceTree = "<group>"; };
+		716780391FCC098600FE2784 /* ManufacturerListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ManufacturerListController.h; path = "../../RA Image/RA Image/ManufacturerListController.h"; sourceTree = "<group>"; };
+		7167803A1FCC098600FE2784 /* ManufacturerListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ManufacturerListController.m; path = "../../RA Image/RA Image/ManufacturerListController.m"; sourceTree = "<group>"; };
+		7167803C1FCC099200FE2784 /* ManufacturerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ManufacturerCell.h; path = "../../RA Image/RA Image/ManufacturerCell.h"; sourceTree = "<group>"; };
+		7167803D1FCC099200FE2784 /* ManufacturerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ManufacturerCell.m; path = "../../RA Image/RA Image/ManufacturerCell.m"; sourceTree = "<group>"; };
+		716780401FCC0A2900FE2784 /* cam_scan.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = cam_scan.storyboard; path = ../../common/cam_scan.storyboard; sourceTree = "<group>"; };
+		716780421FCC0AFF00FE2784 /* MenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MenuViewController.m; path = ../../common/MenuViewController.m; sourceTree = "<group>"; };
+		716780431FCC0AFF00FE2784 /* RAMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAMenu.m; path = ../../common/RAMenu.m; sourceTree = "<group>"; };
+		716780441FCC0AFF00FE2784 /* RAMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAMenu.h; path = ../../common/RAMenu.h; sourceTree = "<group>"; };
+		716780451FCC0AFF00FE2784 /* ScannerControllerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScannerControllerView.h; path = ../../common/ScannerControllerView.h; sourceTree = "<group>"; };
+		716780461FCC0AFF00FE2784 /* SCShapeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SCShapeView.m; path = ../../common/SCShapeView.m; sourceTree = "<group>"; };
+		716780471FCC0AFF00FE2784 /* MenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MenuViewController.h; path = ../../common/MenuViewController.h; sourceTree = "<group>"; };
+		716780481FCC0AFF00FE2784 /* SCShapeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SCShapeView.h; path = ../../common/SCShapeView.h; sourceTree = "<group>"; };
+		716780491FCC0AFF00FE2784 /* ScannerControllerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScannerControllerView.m; path = ../../common/ScannerControllerView.m; sourceTree = "<group>"; };
+		7167804A1FCC0AFF00FE2784 /* ScannerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ScannerViewController.m; path = ../../common/ScannerViewController.m; sourceTree = "<group>"; };
+		7167804B1FCC0AFF00FE2784 /* ScannerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScannerViewController.h; path = ../../common/ScannerViewController.h; sourceTree = "<group>"; };
+		716780511FCC0C4E00FE2784 /* UIImage+fixOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImage+fixOrientation.h"; path = "../../common/UIImage+fixOrientation.h"; sourceTree = "<group>"; };
+		716780521FCC0C4E00FE2784 /* UIImage+fixOrientation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIImage+fixOrientation.m"; path = "../../common/UIImage+fixOrientation.m"; sourceTree = "<group>"; };
+		716780541FCC0C6D00FE2784 /* UIView+Toast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIView+Toast.m"; path = "../../common/customUI/UIView+Toast.m"; sourceTree = "<group>"; };
+		716780551FCC0C6D00FE2784 /* UIView+Toast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+Toast.h"; path = "../../common/customUI/UIView+Toast.h"; sourceTree = "<group>"; };
+		716780581FCC0D0800FE2784 /* RAUploadManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAUploadManager.m; path = ../../common/upload/RAUploadManager.m; sourceTree = "<group>"; };
+		716780591FCC0D0800FE2784 /* RAUploadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAUploadManager.h; path = ../../common/upload/RAUploadManager.h; sourceTree = "<group>"; };
+		7167805A1FCC0D0800FE2784 /* RAUploadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RAUploadOperation.m; path = ../../common/upload/RAUploadOperation.m; sourceTree = "<group>"; };
+		7167805B1FCC0D0800FE2784 /* RAUploadOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAUploadOperation.h; path = ../../common/upload/RAUploadOperation.h; sourceTree = "<group>"; };
+		7167805E1FCC0D3700FE2784 /* Upload.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Upload.storyboard; path = "../../../RA Image/RA Image/Upload.storyboard"; sourceTree = "<group>"; };
+		7167805F1FCC0D3700FE2784 /* UploadSettingController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UploadSettingController.m; path = "../../../RA Image/RA Image/UploadSettingController.m"; sourceTree = "<group>"; };
+		716780601FCC0D3700FE2784 /* UploadSettingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UploadSettingController.h; path = "../../../RA Image/RA Image/UploadSettingController.h"; sourceTree = "<group>"; };
+		716780611FCC0D3700FE2784 /* UploadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UploadViewController.m; path = "../../../RA Image/RA Image/UploadViewController.m"; sourceTree = "<group>"; };
+		716780621FCC0D3700FE2784 /* UploadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UploadViewController.h; path = "../../../RA Image/RA Image/UploadViewController.h"; sourceTree = "<group>"; };
+		716780661FCC0D4400FE2784 /* UploadCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UploadCell.m; path = "../../../RA Image/RA Image/UploadCell.m"; sourceTree = "<group>"; };
+		716780671FCC0D4400FE2784 /* UploadCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UploadCell.h; path = "../../../RA Image/RA Image/UploadCell.h"; sourceTree = "<group>"; };
 		7197D4031FB4388F0063EFBB /* demo_row.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = demo_row.pdf; sourceTree = "<group>"; };
 		7197D4061FB57E270063EFBB /* SearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchViewController.h; sourceTree = "<group>"; };
 		7197D4071FB57E270063EFBB /* SearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchViewController.m; sourceTree = "<group>"; };
@@ -198,8 +263,8 @@
 		71F3A9A11F5F8E22001036C8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		71F3A9A31F5F8E22001036C8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		71F3A9A41F5F8E22001036C8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
-		71F3A9A61F5F8E22001036C8 /* RARootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RARootViewController.h; sourceTree = "<group>"; };
-		71F3A9A71F5F8E22001036C8 /* RARootViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RARootViewController.m; sourceTree = "<group>"; };
+		71F3A9A61F5F8E22001036C8 /* RAModeListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAModeListViewController.h; sourceTree = "<group>"; };
+		71F3A9A71F5F8E22001036C8 /* RAModeListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAModeListViewController.m; sourceTree = "<group>"; };
 		71F3A9AA1F5F8E22001036C8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		71F3A9AC1F5F8E22001036C8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		71F3A9AF1F5F8E22001036C8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -527,26 +592,47 @@
 			name = TextViewCell;
 			sourceTree = "<group>";
 		};
-		42F2EB3A1FA80E3F00BC6468 /* RootViewController */ = {
+		42F2EB3A1FA80E3F00BC6468 /* ModeList */ = {
 			isa = PBXGroup;
 			children = (
-				71F3A9A61F5F8E22001036C8 /* RARootViewController.h */,
-				71F3A9A71F5F8E22001036C8 /* RARootViewController.m */,
-				4221EF911FA813030026E1EC /* RARootModeCell.h */,
-				4221EF921FA813030026E1EC /* RARootModeCell.m */,
-				4221EF941FA814400026E1EC /* RARootNavigationController.h */,
-				4221EF951FA814400026E1EC /* RARootNavigationController.m */,
+				71F3A9A61F5F8E22001036C8 /* RAModeListViewController.h */,
+				71F3A9A71F5F8E22001036C8 /* RAModeListViewController.m */,
+				4221EF911FA813030026E1EC /* RAModeCell.h */,
+				4221EF921FA813030026E1EC /* RAModeCell.m */,
 			);
-			name = RootViewController;
+			name = ModeList;
 			sourceTree = "<group>";
 		};
-		42F2EB3B1FA80EB300BC6468 /* Model */ = {
+		7167803F1FCC0A0C00FE2784 /* cam scan */ = {
 			isa = PBXGroup;
 			children = (
-				42F2EB3C1FA80EDC00BC6468 /* RAModel.h */,
-				42F2EB3D1FA80EDC00BC6468 /* RAModel.m */,
+				716780471FCC0AFF00FE2784 /* MenuViewController.h */,
+				716780421FCC0AFF00FE2784 /* MenuViewController.m */,
+				716780441FCC0AFF00FE2784 /* RAMenu.h */,
+				716780431FCC0AFF00FE2784 /* RAMenu.m */,
+				716780451FCC0AFF00FE2784 /* ScannerControllerView.h */,
+				716780491FCC0AFF00FE2784 /* ScannerControllerView.m */,
+				7167804B1FCC0AFF00FE2784 /* ScannerViewController.h */,
+				7167804A1FCC0AFF00FE2784 /* ScannerViewController.m */,
+				716780481FCC0AFF00FE2784 /* SCShapeView.h */,
+				716780461FCC0AFF00FE2784 /* SCShapeView.m */,
+				716780401FCC0A2900FE2784 /* cam_scan.storyboard */,
 			);
-			name = Model;
+			name = "cam scan";
+			sourceTree = "<group>";
+		};
+		716780571FCC0CD300FE2784 /* upload */ = {
+			isa = PBXGroup;
+			children = (
+				7167805E1FCC0D3700FE2784 /* Upload.storyboard */,
+				716780601FCC0D3700FE2784 /* UploadSettingController.h */,
+				7167805F1FCC0D3700FE2784 /* UploadSettingController.m */,
+				716780621FCC0D3700FE2784 /* UploadViewController.h */,
+				716780611FCC0D3700FE2784 /* UploadViewController.m */,
+				716780671FCC0D4400FE2784 /* UploadCell.h */,
+				716780661FCC0D4400FE2784 /* UploadCell.m */,
+			);
+			path = upload;
 			sourceTree = "<group>";
 		};
 		7197D4051FB57DD00063EFBB /* search */ = {
@@ -577,6 +663,31 @@
 			path = detail;
 			sourceTree = "<group>";
 		};
+		71A2ACC71FCBEF2500F398DA /* RA IMAGE */ = {
+			isa = PBXGroup;
+			children = (
+				7102C1431FCD486F0062A67A /* RAImage.storyboard */,
+				7102C13F1FCD46DE0062A67A /* RootModeCell.h */,
+				7102C1401FCD46DE0062A67A /* RootModeCell.m */,
+				7102C13D1FCD46C00062A67A /* RootViewController.h */,
+				7102C13C1FCD46C00062A67A /* RootViewController.m */,
+				7167802E1FCC095000FE2784 /* Mode.storyboard */,
+				7167802C1FCC087E00FE2784 /* BasicModeViewController.h */,
+				7167802B1FCC087E00FE2784 /* BasicModeViewController.m */,
+				716780301FCC095D00FE2784 /* TakePhotoPreviewController.h */,
+				716780311FCC095D00FE2784 /* TakePhotoPreviewController.m */,
+				716780341FCC096B00FE2784 /* PopModeViewController.h */,
+				716780331FCC096B00FE2784 /* PopModeViewController.m */,
+				716780361FCC097B00FE2784 /* ModelModeViewController.h */,
+				716780371FCC097B00FE2784 /* ModelModeViewController.m */,
+				716780391FCC098600FE2784 /* ManufacturerListController.h */,
+				7167803A1FCC098600FE2784 /* ManufacturerListController.m */,
+				7167803C1FCC099200FE2784 /* ManufacturerCell.h */,
+				7167803D1FCC099200FE2784 /* ManufacturerCell.m */,
+			);
+			name = "RA IMAGE";
+			sourceTree = "<group>";
+		};
 		71CB70B21FA1CCBC009FDCB7 /* fake data */ = {
 			isa = PBXGroup;
 			children = (
@@ -630,12 +741,14 @@
 				71F3A9E11F5FA531001036C8 /* JLKeyboardListener.h */,
 				71F3A9E21F5FA531001036C8 /* JLKeyboardListener.m */,
 				4221EF971FA81CBB0026E1EC /* Mode */,
-				42F2EB3A1FA80E3F00BC6468 /* RootViewController */,
+				7167803F1FCC0A0C00FE2784 /* cam scan */,
+				71A2ACC71FCBEF2500F398DA /* RA IMAGE */,
+				42F2EB3A1FA80E3F00BC6468 /* ModeList */,
 				71F3A9BF1F5FA109001036C8 /* login */,
 				71CB70B21FA1CCBC009FDCB7 /* fake data */,
 				71F3A9BA1F5F8E89001036C8 /* result */,
+				716780571FCC0CD300FE2784 /* upload */,
 				7197D4051FB57DD00063EFBB /* search */,
-				42F2EB3B1FA80EB300BC6468 /* Model */,
 				7197D40B1FBBE0EF0063EFBB /* detail */,
 				4221EFA51FA853660026E1EC /* Refresh */,
 				71F3A9A31F5F8E22001036C8 /* AppDelegate.h */,
@@ -699,6 +812,10 @@
 				71F3A9DB1F5FA458001036C8 /* RANetworkTaskDelegate.m */,
 				71F3AA7B1F62617D001036C8 /* NetworkUtils+Contact.h */,
 				71F3AA7C1F62617D001036C8 /* NetworkUtils+Contact.m */,
+				716780591FCC0D0800FE2784 /* RAUploadManager.h */,
+				716780581FCC0D0800FE2784 /* RAUploadManager.m */,
+				7167805B1FCC0D0800FE2784 /* RAUploadOperation.h */,
+				7167805A1FCC0D0800FE2784 /* RAUploadOperation.m */,
 			);
 			name = network;
 			sourceTree = "<group>";
@@ -716,6 +833,12 @@
 				71F3AA851F626E14001036C8 /* RAConvertor.m */,
 				71F3AA871F62732A001036C8 /* FileCache.h */,
 				71F3AA881F62732A001036C8 /* FileCache.m */,
+				716780511FCC0C4E00FE2784 /* UIImage+fixOrientation.h */,
+				716780521FCC0C4E00FE2784 /* UIImage+fixOrientation.m */,
+				716780551FCC0C6D00FE2784 /* UIView+Toast.h */,
+				716780541FCC0C6D00FE2784 /* UIView+Toast.m */,
+				7102C13A1FCC0FF60062A67A /* ImageUtils.h */,
+				7102C1391FCC0FF60062A67A /* ImageUtils.m */,
 			);
 			name = utils;
 			sourceTree = "<group>";
@@ -921,11 +1044,13 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				7102C1461FCD51FF0062A67A /* RAImage.storyboard in Resources */,
 				42973AD81FBAB9C300A3C164 /* EnumSelectAndSort.storyboard in Resources */,
 				42DBCB131FBEC0E1005574E0 /* Phone_Web_Cell.xib in Resources */,
 				7197D4041FB438B60063EFBB /* demo_row.pdf in Resources */,
 				71FF60371FA96F4F00C5523A /* download_query.xls in Resources */,
 				7197D41A1FBC1BE80063EFBB /* Detail.storyboard in Resources */,
+				716780631FCC0D3700FE2784 /* Upload.storyboard in Resources */,
 				71FF60321FA871DD00C5523A /* data.json in Resources */,
 				7197D41C1FBD1CD60063EFBB /* kv.json in Resources */,
 				7197D40A1FB58E530063EFBB /* search_ui.json in Resources */,
@@ -933,6 +1058,7 @@
 				42DFAE6B1F9B2B73009AFCCC /* Phone_Action_Cell.xib in Resources */,
 				71CB70B41FA1CCDB009FDCB7 /* server.json in Resources */,
 				42DFAE791F9B2CBD009AFCCC /* Phone_Signature_Cell.xib in Resources */,
+				716780411FCC0A2900FE2784 /* cam_scan.storyboard in Resources */,
 				71F3A9B01F5F8E22001036C8 /* LaunchScreen.storyboard in Resources */,
 				42DFAE711F9B2C36009AFCCC /* Phone_Image_Cell.xib in Resources */,
 				42973AD61FBA8F4A00A3C164 /* Phone_Range_Cell.xib in Resources */,
@@ -956,6 +1082,7 @@
 				7197D4211FBEADCB0063EFBB /* orderdetail.json in Resources */,
 				71F3AA361F612369001036C8 /* CommonEditor.storyboard in Resources */,
 				71FF602F1FA8449C00C5523A /* predef_query.json in Resources */,
+				7167802F1FCC095000FE2784 /* Mode.storyboard in Resources */,
 				71F3AA081F5FDDFE001036C8 /* LICENSE in Resources */,
 				4221EFB81FA879470026E1EC /* Result.storyboard in Resources */,
 			);
@@ -968,23 +1095,33 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				7167803B1FCC098600FE2784 /* ManufacturerListController.m in Sources */,
 				4221EFB61FA859B80026E1EC /* JLRefreshFooter.m in Sources */,
 				4221EFB21FA8599A0026E1EC /* JLRefreshHeader.m in Sources */,
 				4221EFB31FA8599A0026E1EC /* JLRefreshBasis.m in Sources */,
 				4221EFB41FA8599A0026E1EC /* UIScrollView+JLRefresh.m in Sources */,
+				716780641FCC0D3700FE2784 /* UploadSettingController.m in Sources */,
 				4221EFB51FA8599A0026E1EC /* UIView+JLExtension.m in Sources */,
 				71F3AA3E1F612369001036C8 /* CommonEditorCellSignature.m in Sources */,
+				7102C13E1FCD46C10062A67A /* RootViewController.m in Sources */,
 				71F3AA441F612369001036C8 /* EnumSelectViewController.m in Sources */,
+				7167805D1FCC0D0900FE2784 /* RAUploadOperation.m in Sources */,
 				71F3A9E31F5FA531001036C8 /* JLKeyboardListener.m in Sources */,
-				71F3A9A81F5F8E22001036C8 /* RARootViewController.m in Sources */,
+				71F3A9A81F5F8E22001036C8 /* RAModeListViewController.m in Sources */,
+				716780681FCC0D4400FE2784 /* UploadCell.m in Sources */,
 				7197D40E1FBBE1260063EFBB /* KVViewController.m in Sources */,
 				71F3AA921F627700001036C8 /* DefaultTableHeaderView.m in Sources */,
 				71F3AA5F1F624AD4001036C8 /* StrikethroughLabel.m in Sources */,
+				716780321FCC095D00FE2784 /* TakePhotoPreviewController.m in Sources */,
 				42973AD71FBA8F4A00A3C164 /* CommonEditorRangeCell.m in Sources */,
+				7102C13B1FCC0FF70062A67A /* ImageUtils.m in Sources */,
+				7102C1411FCD46DE0062A67A /* RootModeCell.m in Sources */,
 				71F3A9EE1F5FA557001036C8 /* mztools.c in Sources */,
+				716780381FCC097B00FE2784 /* ModelModeViewController.m in Sources */,
 				71F3AA861F626E14001036C8 /* RAConvertor.m in Sources */,
 				71F3A9F01F5FA557001036C8 /* zip.c in Sources */,
 				71F3AA7D1F62617D001036C8 /* NetworkUtils+Contact.m in Sources */,
+				716780351FCC096B00FE2784 /* PopModeViewController.m in Sources */,
 				71F3AA3B1F612369001036C8 /* CommonEditorCellLabel.m in Sources */,
 				71F3AA891F62732A001036C8 /* FileCache.m in Sources */,
 				71F3AA651F624B2F001036C8 /* BundleModelViewController.m in Sources */,
@@ -1001,25 +1138,32 @@
 				71FF60251FA7209F00C5523A /* EnumSelectAndSortViewController.m in Sources */,
 				71F3AA0A1F5FDDFE001036C8 /* NSData+CommonCrypto.m in Sources */,
 				71F3AA0B1F5FDDFE001036C8 /* NSString+Base64.m in Sources */,
+				7167804E1FCC0B0000FE2784 /* SCShapeView.m in Sources */,
 				71F3AA111F611FC4001036C8 /* testViewController.m in Sources */,
 				71F3AA431F612369001036C8 /* EnumSelectorCell.m in Sources */,
 				71F3AA3F1F612369001036C8 /* CommonEditorCellSwitch.m in Sources */,
-				4221EF931FA813030026E1EC /* RARootModeCell.m in Sources */,
+				4221EF931FA813030026E1EC /* RAModeCell.m in Sources */,
+				716780501FCC0B0000FE2784 /* ScannerViewController.m in Sources */,
 				71F3A9E01F5FA484001036C8 /* RAUtils.m in Sources */,
 				71F3AA401F612369001036C8 /* CommonEditorCellTextView.m in Sources */,
+				7167804D1FCC0B0000FE2784 /* RAMenu.m in Sources */,
 				71F3AA4A1F612415001036C8 /* RTLabel.m in Sources */,
 				71F3AA3C1F612369001036C8 /* CommonEditorCellMAction.m in Sources */,
 				71F3AA501F6124C4001036C8 /* ImageUploadViewController.m in Sources */,
+				7167803E1FCC099200FE2784 /* ManufacturerCell.m in Sources */,
 				71F3AA451F612369001036C8 /* MonthPickerViewController.m in Sources */,
-				4221EF961FA814400026E1EC /* RARootNavigationController.m in Sources */,
 				71F3A9A21F5F8E22001036C8 /* main.m in Sources */,
 				71F3AA951F6277DE001036C8 /* DefaultAppearance.m in Sources */,
 				71F3A9CD1F5FA11F001036C8 /* LoginViewController.m in Sources */,
 				71E9F6C81F8C5CCB0052C78E /* NetworkUtils.m in Sources */,
+				7167805C1FCC0D0900FE2784 /* RAUploadManager.m in Sources */,
 				71F3A9D01F5FA277001036C8 /* BasicViewController.m in Sources */,
+				7167802D1FCC087E00FE2784 /* BasicModeViewController.m in Sources */,
 				7197D4121FBBE1490063EFBB /* ModelDetailViewController.m in Sources */,
 				71F3AA531F6125ED001036C8 /* ImageViewController.m in Sources */,
 				71F3AA411F612369001036C8 /* CommonEditorViewController.m in Sources */,
+				716780561FCC0C6D00FE2784 /* UIView+Toast.m in Sources */,
+				716780531FCC0C4F00FE2784 /* UIImage+fixOrientation.m in Sources */,
 				71F3A9ED1F5FA557001036C8 /* ioapi.c in Sources */,
 				71F3AA391F612369001036C8 /* CommonEditorCellEnum.m in Sources */,
 				71F3AA3A1F612369001036C8 /* CommonEditorCellImg.m in Sources */,
@@ -1028,23 +1172,25 @@
 				7197D4181FBC10710063EFBB /* DetailKVCell.m in Sources */,
 				71F3AA831F6263B2001036C8 /* MainViewController.m in Sources */,
 				7197D41F1FBD2EA60063EFBB /* LineView.m in Sources */,
+				716780651FCC0D3700FE2784 /* UploadViewController.m in Sources */,
 				7197D4151FBBE1610063EFBB /* OrderDetailViewController.m in Sources */,
 				71F3A9CB1F5FA11F001036C8 /* LoginSwitchCell.m in Sources */,
 				71F3AA801F626309001036C8 /* CustomIOSAlertView.m in Sources */,
 				71F3AA5C1F624A88001036C8 /* SignatureViewController.m in Sources */,
+				7167804C1FCC0B0000FE2784 /* MenuViewController.m in Sources */,
 				71F3A9F91F5FA688001036C8 /* Reachability.m in Sources */,
 				42D8CD5C1FC662E7005BEA15 /* CommonEditorTableContainerView.m in Sources */,
 				71F3AA461F612369001036C8 /* SRMonthPicker.m in Sources */,
 				71F3AA421F612369001036C8 /* DatePickerViewController.m in Sources */,
 				71F3A9D91F5FA3B9001036C8 /* RANetwork.m in Sources */,
 				71F3AA091F5FDDFE001036C8 /* NSData+Base64.m in Sources */,
-				42F2EB3E1FA80EDC00BC6468 /* RAModel.m in Sources */,
 				4221EF9D1FA81D5B0026E1EC /* RAQueryViewController.m in Sources */,
 				71F3A9DC1F5FA458001036C8 /* RANetworkTaskDelegate.m in Sources */,
 				71F3AA3D1F612369001036C8 /* CommonEditorCellModel.m in Sources */,
 				71F3AA681F624E19001036C8 /* JKTimerManager.m in Sources */,
 				71FF60291FA7236200C5523A /* EnumModel.m in Sources */,
 				71F3A9F31F5FA56E001036C8 /* ZipArchive.mm in Sources */,
+				7167804F1FCC0B0000FE2784 /* ScannerControllerView.m in Sources */,
 				71F3A9BD1F5F8EAE001036C8 /* FullyShowViewController.m in Sources */,
 				42973ADC1FBABB7F00A3C164 /* EnumSelectAndSortCell.m in Sources */,
 				42DBCB111FBEC0B7005574E0 /* CommonEditorWebCell.m in Sources */,
@@ -1055,6 +1201,14 @@
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXVariantGroup section */
+		7102C1431FCD486F0062A67A /* RAImage.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				7102C1441FCD486F0062A67A /* Base */,
+			);
+			name = RAImage.storyboard;
+			sourceTree = "<group>";
+		};
 		71F3A9A91F5F8E22001036C8 /* Main.storyboard */ = {
 			isa = PBXVariantGroup;
 			children = (

+ 13 - 1
RedAnt Mobile/RedAnt Mobile/AppDelegate.h

@@ -7,6 +7,7 @@
 //
 
 #import <UIKit/UIKit.h>
+#import "RAUploadManager.h"
 
 @interface AppDelegate : UIResponder <UIApplicationDelegate>
 
@@ -23,7 +24,18 @@
 @property bool bEnable_Cache;//图片缓存
 @property (nonatomic,strong) NSMutableDictionary *urgencyDic;///<程序闪退需要保存的数据
 
-- (void)showNormalRootVCWithModeList:(NSArray *)modeList;
+//- (void)showNormalRootVCWithModeList:(NSArray *)modeList;
 
+@property (strong, nonatomic)  RAUploadManager *uploadManager;
+@property (nonatomic,assign) BOOL compressFile;
+@property (nonatomic,copy) NSString *address;
+
+
+@property (nonatomic,assign) BOOL shouldAutoShowModeVC;
+@property (nonatomic,copy) NSString *companyName;
+@property (nonatomic,copy) UIImage *companyIcon;
+
+
+@property (nonatomic,strong) NSArray *modeList;
 @end
 

+ 13 - 13
RedAnt Mobile/RedAnt Mobile/AppDelegate.m

@@ -7,8 +7,8 @@
 //
 
 #import "AppDelegate.h"
-#import "RARootNavigationController.h"
-#import "RARootViewController.h"
+//#import "RARootNavigationController.h"
+//#import "RARootViewController.h"
 #import "DefaultAppearance.h"
 
 @interface AppDelegate ()
@@ -58,17 +58,17 @@
     // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
 }
 
-#pragma mark - Public
-
-- (void)showNormalRootVCWithModeList:(NSArray *)modeList {
-    
-    RARootViewController *rootVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"RARootViewController"];
-    rootVC.title = @"RedAnt Mobile";
-    [rootVC setModeList:modeList];
-    
-    RARootNavigationController *nav = [[RARootNavigationController alloc] initWithRootViewController:rootVC];
-    [self.window setRootViewController:nav];
-}
+//#pragma mark - Public
+//
+//- (void)showNormalRootVCWithModeList:(NSArray *)modeList {
+//
+//    RARootViewController *rootVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"RARootViewController"];
+//    rootVC.title = @"RedAnt Mobile";
+//    [rootVC setModeList:modeList];
+//
+//    RARootNavigationController *nav = [[RARootNavigationController alloc] initWithRootViewController:rootVC];
+//    [self.window setRootViewController:nav];
+//}
 
 
 @end

+ 26 - 9
RedAnt Mobile/RedAnt Mobile/Base.lproj/Main.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Oh6-Jk-fWH">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="J5i-KQ-nTf">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -10,10 +10,10 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
-        <!--Root View Controller-->
+        <!--Mode List View Controller-->
         <scene sceneID="tne-QT-ifu">
             <objects>
-                <viewController storyboardIdentifier="RARootViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="BYZ-38-t0r" customClass="RARootViewController" sceneMemberID="viewController">
+                <viewController storyboardIdentifier="RARootViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="BYZ-38-t0r" customClass="RAModeListViewController" sceneMemberID="viewController">
                     <layoutGuides>
                         <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
                         <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
@@ -26,7 +26,7 @@
                                 <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="mode_cell" rowHeight="40" id="dIs-Xr-nJO" customClass="RARootModeCell">
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="mode_cell" rowHeight="40" id="dIs-Xr-nJO" customClass="RAModeCell">
                                         <rect key="frame" x="0.0" y="28" width="375" height="40"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="dIs-Xr-nJO" id="0xv-T2-kkQ">
@@ -73,7 +73,7 @@
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="34" y="21"/>
+            <point key="canvasLocation" x="30" y="-851"/>
         </scene>
         <!--Login View Controller-->
         <scene sceneID="GQN-dS-T2m">
@@ -88,7 +88,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RedAnt Mobile" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3rO-M6-J99">
-                                <rect key="frame" x="0.0" y="100" width="375" height="50"/>
+                                <rect key="frame" x="0.0" y="144" width="375" height="50"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="50" id="NhQ-AY-VlX"/>
                                 </constraints>
@@ -97,7 +97,7 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="50" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="enM-qf-Iwt">
-                                <rect key="frame" x="0.0" y="190" width="375" height="200"/>
+                                <rect key="frame" x="0.0" y="234" width="375" height="200"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="200" id="dvZ-nU-JS5"/>
@@ -184,7 +184,7 @@
                                 </connections>
                             </button>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NDF-jH-CA9">
-                                <rect key="frame" x="20" y="420" width="335" height="50"/>
+                                <rect key="frame" x="20" y="464" width="335" height="50"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="50" id="oHp-9V-FnQ"/>
@@ -206,7 +206,7 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sfr-OB-A5y">
-                                <rect key="frame" x="227" y="495" width="128" height="30"/>
+                                <rect key="frame" x="227" y="539" width="128" height="30"/>
                                 <state key="normal" title="Retrieve Password"/>
                             </button>
                         </subviews>
@@ -231,6 +231,7 @@
                             <constraint firstItem="3rO-M6-J99" firstAttribute="top" secondItem="3qW-uN-D4Q" secondAttribute="bottom" constant="80" id="y1k-fy-nvZ"/>
                         </constraints>
                     </view>
+                    <navigationItem key="navigationItem" id="a0c-Yi-bOP"/>
                     <connections>
                         <outlet property="loginBtn" destination="NDF-jH-CA9" id="Cs8-Hz-ohe"/>
                         <outlet property="loginTable" destination="enM-qf-Iwt" id="VEl-Nr-pdt"/>
@@ -242,6 +243,22 @@
             </objects>
             <point key="canvasLocation" x="920.79999999999995" y="123.68815592203899"/>
         </scene>
+        <!--Navigation Controller-->
+        <scene sceneID="fRE-Iw-onS">
+            <objects>
+                <navigationController id="J5i-KQ-nTf" sceneMemberID="viewController">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="udy-CO-Jev">
+                        <rect key="frame" x="0.0" y="20" width="375" height="44"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </navigationBar>
+                    <connections>
+                        <segue destination="Oh6-Jk-fWH" kind="relationship" relationship="rootViewController" id="E6J-Nx-LVu"/>
+                    </connections>
+                </navigationController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="Vuc-SF-s9J" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="30" y="124"/>
+        </scene>
         <!--Server Setting-->
         <scene sceneID="BVj-Ht-sjd">
             <objects>

+ 4 - 2
RedAnt Mobile/RedAnt Mobile/LoginSettingViewController.m

@@ -120,7 +120,8 @@ if (password.length==0)
                     if (self.returnValue) {
                         self.returnValue(servername);
                     }
-                        [self dismissViewControllerAnimated:false completion:nil];
+//                        [self dismissViewControllerAnimated:false completion:nil];
+                    [self.navigationController popViewControllerAnimated:false];
                     break;
                 }
                 case RESULT_NO_RESPONSE:
@@ -181,7 +182,8 @@ if (password.length==0)
 
 - (void)OnBackClick:(UIBarButtonItem *)sender {
     
-    [self dismissViewControllerAnimated:false completion:nil];
+    [self.navigationController popViewControllerAnimated:false];
+   // [self dismissViewControllerAnimated:false completion:nil];
  /*   self.checkedAddress = nil;
     NSUInteger selectedIndex = 1;
     self.checkedAddress = self.internalTextField.text;

+ 53 - 7
RedAnt Mobile/RedAnt Mobile/LoginViewController.m

@@ -10,6 +10,7 @@
 #import "LoginTextFiledCell.h"
 #import "LoginSwitchCell.h"
 #import "LoginSettingViewController.h"
+#import "RAModeListViewController.h"
 
 static NSString *kRememberLogin = @"RememberLogin";
 static NSString *kLoginUserInfo = @"UserInfo";
@@ -49,7 +50,14 @@ static NSString *kLoginUserInfo = @"UserInfo";
     NSString* short_version =[infoDict objectForKey:@"CFBundleShortVersionString"];
     self.versionLabel.text = [NSString stringWithFormat:@"Ver: %@.%@",short_version,build];
 }
-
+-(void) viewWillAppear:(BOOL)animated
+{
+    [self.navigationController setNavigationBarHidden:true];
+}
+-(void)viewWillDisappear:(BOOL)animated
+{
+    [self.navigationController setNavigationBarHidden:false];
+}
 - (void)viewDidAppear:(BOOL)animated {
     [super viewDidAppear:animated];
     if (_autoShowSetting) {
@@ -227,7 +235,44 @@ static NSString *kLoginUserInfo = @"UserInfo";
                 if (result == RESULT_TRUE) {
                     NSArray *modeList = [loginDic objectForKey:@"mode_list"];
                     if (modeList != nil) {
-                        [appDelegate showNormalRootVCWithModeList:modeList];
+                        
+                            RAModeListViewController *rootVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"RARootViewController"];
+                            rootVC.title = @"RedAnt Mobile";
+                        rootVC.isroot = true;
+                        rootVC.modelist = modeList;
+//                        rootVC.onRBClick = ^(RAModeListViewController* bself){
+//                            
+//                            UIAlertView *alert = [RAUtils waiting_alert:@"Please wait..." title:@"Logout"];
+////                            __weak typeof(self) weakself = self;
+//                            dispatch_async(dispatch_get_main_queue(), ^{
+//                                
+//                                NSDictionary *logoutDic = [RANetwork logout];
+//                                int result = [[logoutDic objectForKey:@"result"] intValue];
+//                                dispatch_async(dispatch_get_main_queue(), ^{
+//                                    [alert dismissWithClickedButtonIndex:0 animated:YES];
+////                                    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+//                                    if (result == RESULT_TRUE) {
+//                                        
+//                                        [bself.navigationController popViewControllerAnimated:false];
+//                                        //                weakself.companyIcon = [UIImage imageNamed:@"AppIcon40x40"];
+//                                        //  [appDelegate logout];
+//                                    } else {
+//                                        __strong typeof(bself) strongself = bself;
+//                                        NSString *msg = [logoutDic objectForKey:@"err_msg"];
+//                                        [RAUtils message_alert:msg title:@"Warning" controller:strongself];
+//                                    }
+//                                });
+//                                
+//                                
+//                            });
+//                            ;
+//                        };
+//                        rootVC.onRBName = ^NSString *{
+//                            return @"Logout";
+//                        };
+//                            [rootVC setModeList:modeList];
+                        [self.navigationController pushViewController:rootVC animated:false];
+//                        [appDelegate showNormalRootVCWithModeList:modeList];
                     } else {
                         [RAUtils message_alert:@"Something error" title:@"Warning" controller:strongself];
                     }
@@ -238,8 +283,8 @@ static NSString *kLoginUserInfo = @"UserInfo";
                         [strongself setUserDefaultsValue:@{@"user" : strongself.user,@"pwd" : strongself.pwd} forKey:kLoginUserInfo];
                     }
 //                    appDelegate.bLogin = YES;
-//                    appDelegate.user = strongself.user;
-//                    appDelegate.password = strongself.pwd;
+                    appDelegate.user = strongself.user;
+                    appDelegate.password = strongself.pwd;
 //                    appDelegate.companyName = [loginDic objectForKey:@"company_name"];
 //                    [appDelegate loadCompanyIcon:[loginDic objectForKey:@"company_icon"]];
 //                    appDelegate.modeList = [loginDic objectForKey:@"modellist"];
@@ -265,9 +310,10 @@ static NSString *kLoginUserInfo = @"UserInfo";
             [strongself.loginTable reloadData];
         }
     };
-    UINavigationController *settingRootNav = [[UINavigationController alloc] initWithRootViewController:loginSettingVC];
-    [self presentViewController:settingRootNav animated:YES completion:nil];
-    
+//    UINavigationController *settingRootNav = [[UINavigationController alloc] initWithRootViewController:loginSettingVC];
+//    [self presentViewController:settingRootNav animated:YES completion:nil];
+
+    [self.navigationController pushViewController:loginSettingVC animated:false];
 }
 
 #pragma mark - TextField Delegate 

+ 324 - 2
RedAnt Mobile/RedAnt Mobile/RA Mobile.txt

@@ -27,12 +27,334 @@ down: result, mode_lsit
 
 
 require_query_ui 从服务器加载查询界面
-up:user,pwd,mode,
+up:user,pwd,query_id,
 down:query_editor(common editor),query_id;
 
 predef_query
 up:user,pwd, query_id;
 down:
+sample:
+
+{
+"result": 2,
+"section_count": 3,
+"title": "DEMO search",
+"section_0": {
+"count": 3,
+"title": "Analysis Condition",
+"item_0": {
+"aname": "Level",
+"name": "level",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "Summary",
+"check": 1,
+"value": "Detail"
+},
+"val_1": {
+"value_id": "Detail",
+"check": 0,
+"value": "Detail"
+}
+}
+},
+"item_1": {
+
+"aname": "Analysis By",
+"name": "analysis_by",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "Customer",
+"check": 1,
+"value": "Customer"
+},
+"val_1": {
+"value_id": "Sales",
+"check": 0,
+"value": "Sales"
+}
+}
+},
+"item_2": {
+
+"aname": "Order By",
+"name": "order_by",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "QTY",
+"check": 1,
+"value": "QTY"
+},
+"val_1": {
+"value_id": "Price",
+"check": 0,
+"value": "Price"
+}
+}
+}
+},
+"section_1": {
+"count": 1,
+"title": "Fields",
+"item_0": {
+"aname": "Fields",
+"name": "fields",
+"sort": true,
+"control": "enum",
+"single_select": "false",
+"cadedate": {
+"count": 9,
+"val_0": {
+"value_id": "location",
+"check": 1,
+"value": "Location"
+},
+"val_1": {
+"value_id": "customer",
+"check": 1,
+"value": "Customer"
+},
+"val_2": {
+"value_id": "customer_name",
+"check": 1,
+"value": "Customer Name"
+},
+"val_3": {
+"value_id": "order_discount",
+"check": 1,
+"value": "Order Discount"
+},
+"val_4": {
+"value_id": "sales_discount",
+"check": 1,
+"value": "Sales Discount"
+},
+"val_5": {
+"value_id": "field5",
+"check": 0,
+"value": "field5"
+},
+"val_6": {
+"value_id": "field6",
+"check": 0,
+"value": "field6"
+},
+"val_7": {
+"value_id": "field7",
+"check": 0,
+"value": "field7"
+},
+"val_8": {
+"value_id": "field8",
+"check": 0,
+"value": "field8"
+}
+}
+}
+},
+"section_2": {
+"count": 15,
+"title": "Query Condition",
+"item_0": {
+"aname": "Location",
+"name": "location",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "Location1",
+"check": 1,
+"value": "Location 1"
+},
+"val_1": {
+"value_id": "Location2",
+"check": 0,
+"value": "Location 2"
+}
+}
+},
+"item_1": {
+
+"aname": "Catalog status",
+"name": "catalog_status",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "status0",
+"check": 1,
+"value": "Status 0"
+},
+"val_1": {
+"value_id": "status1",
+"check": 0,
+"value": "Status 1"
+}
+}
+},
+"item_2": {
+"keyboard": "text",
+"aname": "Delivery Carrier",
+"name": "carrier",
+"control": "edit",
+"value": ""
+},
+"item_3": {
+
+"aname": "Contact Type",
+"name": "contact_type",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "type0",
+"check": 1,
+"value": "Type 0"
+},
+"val_1": {
+"value_id": "type1",
+"check": 0,
+"value": "Type 1"
+}
+}
+},
+"item_4": {
+"type": "date",
+"keyboard": "number",
+"aname": "Invoice Date Betwin",
+"name": "invoice_range",
+"control": "range",
+"min_value": "",
+"max_value": ""
+},
+"item_5": {
+"keyboard": "text",
+"aname": "Operator",
+"name": "operator",
+"control": "edit",
+"value": ""
+},
+"item_6": {
+"keyboard": "text",
+"aname": "Salesman",
+"name": "salesman",
+"control": "edit",
+"value": ""
+},
+"item_7": {
+"keyboard": "text",
+"aname": "Customer",
+"name": "customer",
+"control": "edit",
+"value": ""
+},
+"item_8": {
+"keyboard": "text",
+"aname": "Model",
+"name": "model",
+"control": "edit",
+"value": ""
+},
+"item_9": {
+
+"aname": "Catalog type",
+"name": "catalog_type",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "type0",
+"check": 1,
+"value": "Type 0"
+},
+"val_1": {
+"value_id": "type1",
+"check": 0,
+"value": "Type 1"
+}
+}
+},
+"item_10": {
+
+"aname": "Is AR",
+"name": "is_ar",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "yes",
+"check": 1,
+"value": "Yes"
+},
+"val_1": {
+"value_id": "no",
+"check": 0,
+"value": "No"
+}
+}
+},
+"item_11": {
+"keyboard": "text",
+"aname": "State",
+"name": "state",
+"control": "edit",
+"value": ""
+},
+"item_12": {
+
+"aname": "Invoide Post Status",
+"name": "ips",
+"control": "enum",
+"single_select": "true",
+"cadedate": {
+"count": 2,
+"val_0": {
+"value_id": "posted",
+"check": 1,
+"value": "Posted"
+},
+"val_1": {
+"value_id": "no",
+"check": 0,
+"value": "No"
+}
+}
+},
+"item_13": {
+"keyboard": "text",
+"aname": "Chanel",
+"name": "chanel",
+"control": "edit",
+"value": ""
+},
+"item_14": {
+"keyboard": "text",
+"aname": "Category",
+"name": "cagegory",
+"control": "edit",
+"value": ""
+}
+},
+"up_params": {
+"count": 2,
+"val_0": "zipcode",
+"val_1": "country"
+}
+}
 
 
 query 查询
@@ -40,7 +362,7 @@ up: user,pwd, criteria, offset, limit,query_id
 criteria:[
 {"key":"name", "value":"abc"}
 ]
-down:result, data, layout
+down:result, data, layout,menu,row_action
 sample:
 {
 "result": 2,

+ 18 - 0
RedAnt Mobile/RedAnt Mobile/RAModeCell.h

@@ -0,0 +1,18 @@
+//
+//  RAModeCell.h
+//  RedAnt Mobile
+//
+//  Created by Jack on 2017/10/31.
+//  Copyright © 2017年 Ray. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+//@class RAModel;
+@interface RAModeCell : UITableViewCell
+
+//@property (nonatomic,strong) RAModel *model;
+@property (nonatomic,strong) NSMutableDictionary *modeinfo;
+
+
+@end

+ 73 - 0
RedAnt Mobile/RedAnt Mobile/RAModeCell.m

@@ -0,0 +1,73 @@
+//
+//  RAModeCell.m
+//  RedAnt Mobile
+//
+//  Created by Jack on 2017/10/31.
+//  Copyright © 2017年 Ray. All rights reserved.
+//
+
+#import "RAModeCell.h"
+//#import "RAModel.h"
+
+@interface RAModeCell ()
+@property (weak, nonatomic) IBOutlet UILabel *modeNameLabel;
+
+@end
+
+@implementation RAModeCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+-(void)setModeinfo:(NSMutableDictionary *)modeinfo
+{
+    _modeinfo = modeinfo;
+//    self.modeNameLabel.text = modeinfo[@"name"];
+    [self setMode:modeinfo[@"name"] desc:modeinfo[@"description"]];
+}
+
+
+
+- (void)setMode:(NSString *)mode desc:(NSString *)desc {
+//    _mode = mode;
+//    _desc = desc;
+    //    _desc = @"dfhajkdhfkajhdklahdfalllllllalalalalaPKOSdididiididdi";
+    self.modeNameLabel.attributedText = nil;
+    self.modeNameLabel.text = nil;
+    if (desc == nil || desc.length == 0) {
+        self.modeNameLabel.text = mode;
+    } else if (mode == nil || mode.length == 0){
+        self.modeNameLabel.text = mode;
+    } else {
+        NSString *str = [NSString stringWithFormat:@"%@ -- %@",mode,desc];
+        NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:str];
+        NSRange redRange = NSMakeRange(mode.length + 1, str.length - (mode.length + 1));
+        NSRange normalRange = NSMakeRange(0, mode.length);
+        NSDictionary *redAttrs = @{
+                                   NSForegroundColorAttributeName : [UIColor redColor],
+                                   NSFontAttributeName : [UIFont systemFontOfSize:15.0f]
+                                   };
+        NSDictionary *normalAttrs = @{
+                                      NSForegroundColorAttributeName : [UIColor blackColor],
+                                      NSFontAttributeName : [UIFont systemFontOfSize:17.0f]
+                                      };
+        [attrStr addAttributes:redAttrs range:redRange];
+        [attrStr addAttributes:normalAttrs range:normalRange];
+        self.modeNameLabel.attributedText = attrStr;
+    }
+}
+//- (void)setModel:(RAModel *)model {
+//    _model = model;
+//
+//    self.modeNameLabel.text = model.name;
+//}
+
+@end

+ 20 - 0
RedAnt Mobile/RedAnt Mobile/RAModeListViewController.h

@@ -0,0 +1,20 @@
+//
+//  ViewController.h
+//  RedAnt Mobile
+//
+//  Created by Ray on 06/09/2017.
+//  Copyright © 2017 Ray. All rights reserved.
+//
+
+#import "BasicViewController.h"
+
+@interface RAModeListViewController : BasicViewController
+@property (strong,nonatomic) NSArray* modelist;
+@property (assign) BOOL isroot;
+//- (void)setModeList:(NSArray *)modeList;
+
+
+//@property (nonatomic , copy) NSString* (^onRBName)(void);
+//@property (nonatomic , copy) void (^onRBClick)(RAModeListViewController* bself);
+@end
+

+ 306 - 0
RedAnt Mobile/RedAnt Mobile/RAModeListViewController.m

@@ -0,0 +1,306 @@
+//
+//  ViewController.m
+//  RedAnt Mobile
+//
+//  Created by Ray on 06/09/2017.
+//  Copyright © 2017 Ray. All rights reserved.
+//
+
+#import "RAModeListViewController.h"
+#import "RAModeCell.h"
+//#import "RAModel.h"
+#import "RAPredefQueryViewController.h"
+#import "RAQueryViewController.h"
+#import "ResultViewController.h"
+#import "SearchViewController.h"
+#import "RANetwork.h"
+#import "BasicModeViewController.h"
+#import "ModelModeViewController.h"
+#import "PopModeViewController.h"
+#import "RootViewController.h"
+
+@interface RAModeListViewController () <UITableViewDelegate,UITableViewDataSource>
+
+@property (weak, nonatomic) IBOutlet UITableView *modeTableView;
+//@property (nonatomic,strong) NSMutableArray<RAModel *> *modeArray;
+
+@end
+
+@implementation RAModeListViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view, typically from a nib.
+    [self removeFirstResponderTap]; // 截断了Cell响应
+    self.automaticallyAdjustsScrollViewInsets = NO;
+    self.modeTableView.tableHeaderView = [UIView new];
+    self.modeTableView.tableFooterView = [UIView new];
+    
+    if(self.isroot)
+    {
+        [self.navigationItem setHidesBackButton:true];
+                self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStylePlain target:self action:@selector(logoutItemClick:)];
+    }
+    else
+    {
+        [self.navigationItem setHidesBackButton:false];
+    }
+    
+    
+//    if(self.onRBName)
+//    {
+//        NSString* rbname= self.onRBName();
+//            self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:rbname style:UIBarButtonItemStylePlain target:self action:@selector(RBItemClick:)];
+//
+//    }
+//        self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStylePlain target:self action:@selector(logoutItemClick:)];
+    
+}
+//- (void)RBItemClick:(UIBarButtonItem *)sender {
+//    if(self.onRBClick)
+//    {
+//        __weak typeof(self) weakself = self;
+//        self.onRBClick(weakself);
+//    }
+//}
+- (void)logoutItemClick:(UIBarButtonItem *)sender {
+    UIAlertView *alert = [RAUtils waiting_alert:@"Please wait..." title:@"Logout"];
+    __weak typeof(self) weakself = self;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        
+        NSDictionary *logoutDic = [RANetwork logout];
+        int result = [[logoutDic objectForKey:@"result"] intValue];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [alert dismissWithClickedButtonIndex:0 animated:YES];
+            AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+            if (result == RESULT_TRUE) {
+                
+                [weakself.navigationController popViewControllerAnimated:false];
+//                weakself.companyIcon = [UIImage imageNamed:@"AppIcon40x40"];
+              //  [appDelegate logout];
+            } else {
+                __strong typeof(weakself) strongself = weakself;
+                NSString *msg = [logoutDic objectForKey:@"err_msg"];
+                [RAUtils message_alert:msg title:@"Warning" controller:strongself];
+            }
+        });
+        
+        
+    });
+    
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+//#pragma mark - Lazy Load
+//
+//- (NSMutableArray<RAModel *> *)modeArray {
+//    if (!_modeArray) {
+//        _modeArray = [NSMutableArray array];
+//    }
+//    return _modeArray;
+//}
+
+
+//#pragma mark - Public
+//
+//- (void)setModeList:(NSArray *)modeList {
+//    
+//    for (int i = 0; i < modeList.count; i++) {
+//        
+//        NSDictionary *mode_dic = [modeList objectAtIndex:i];
+//        RAModel *model = [[RAModel alloc] init];
+//        [model setValuesForKeysWithDictionary:mode_dic];
+//        [self.modeArray addObject:model];
+//    }
+//}
+
+#pragma mark - TableView Delegate & DataSource
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.modelist.count;
+//    return self.modeArray.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    RAModeCell *cell = [tableView dequeueReusableCellWithIdentifier:@"mode_cell" forIndexPath:indexPath];
+//    RAModel *model = self.modelist[indexPath.row];//[self.modeArray objectAtIndex:indexPath.row];
+    
+    [cell setModeinfo:[self.modelist[indexPath.row] mutableCopy]];
+//    [cell setModel:model];
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 40.f;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    RAModeCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+//    RAModel *model = cell.model;
+    NSMutableDictionary* modeinfo= cell.modeinfo;
+    
+    if ([modeinfo[@"type"] isEqualToString:@"predef_query"]) {
+        [self processPredefQueryModel:modeinfo];
+        
+    } else if ([modeinfo[@"type"] isEqualToString:@"query"]) {
+        [self processQueryModel:modeinfo];
+        
+    } else if ([modeinfo[@"type"] isEqualToString:@"local_func"]) {
+        [self processLocalFunModel:modeinfo];
+        
+    } else if ([modeinfo[@"type"] isEqualToString:@"submode"]) {
+        [self processSubmodeModel:modeinfo];
+    }
+    
+}
+
+#pragma mark - Private
+
+- (void) processPredefQueryModel:(NSMutableDictionary *)modeinfo {
+//    RAPredefQueryViewController *preQueryVC = [[UIStoryboard storyboardWithName:@"RAPredefQuery" bundle:nil] instantiateInitialViewController];
+//    preQueryVC.query_id = [model.query_id integerValue];
+//    preQueryVC.title = model.name;
+    
+    ResultViewController *preQueryVC = [[UIStoryboard storyboardWithName:@"Result" bundle:nil] instantiateViewControllerWithIdentifier:@"ResultViewController"];
+    [preQueryVC setQueryParams: @{
+                                  @"query_id" : modeinfo[@"query_id"]
+                                  }];
+    
+    [self.navigationController pushViewController:preQueryVC animated:YES];
+}
+
+- (void) processQueryModel:(NSMutableDictionary *)modeinfo {
+    
+    
+    SearchViewController *queryVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"SearchViewController"];
+    
+    queryVC.params = [NSMutableDictionary new];
+    queryVC.params[@"query_id"]=modeinfo[@"query_id"];
+    queryVC.request_url = [RANetwork get_url:URL_QUERY_UI];
+    queryVC.url_type = URL_REMOTE;
+
+    //    BViewController *vc =[BViewController new];//[ self.storyboard instantiateViewControllerWithIdentifier:@"commonVC"];
+//
+//
+//
+//    [self presentViewController:vc animated:true completion:nil];
+//
+//
+//    RAQueryViewController *queryVC = [[UIStoryboard storyboardWithName:@"RAQuery" bundle:nil] instantiateInitialViewController];
+//    queryVC.url = model.url;
+//    queryVC.title = model.name;
+    [self.navigationController pushViewController:queryVC animated:YES];
+}
+
+- (void) processLocalFunModel:(NSMutableDictionary *)modeinfo {
+    
+    if ([modeinfo[@"module"] isEqualToString:@"tools_change_pwd"]) {
+        NSLog(@"change password");
+    }
+    else if ([modeinfo[@"module"] isEqualToString:@"raimage_mode"]) {
+        
+        
+       
+        AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+        appDelegate.modeList = modeinfo[@"ext_data"];
+        RootViewController *ramodelist = [[UIStoryboard storyboardWithName:@"RAImage" bundle:nil] instantiateViewControllerWithIdentifier:@"RootViewController"];
+        [self.navigationController pushViewController:ramodelist animated:false];
+        
+    }
+//    else if ([modeinfo[@"module"] isEqualToString:@"raimage_pop"]) {
+////        NSLog(@"change password");
+//
+//
+//        BOOL enable = [modeinfo[@"enable"] boolValue];
+//        if (enable) {
+//            NSString *name = modeinfo[@"name"];
+//            AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+////            appDelegate.shouldAutoShowModeVC = NO;
+//            [self setUserDefaultsValue:[NSString stringWithFormat:@"%@<&&>%@",appDelegate.user,name] forKey:@"lastChooseMode"];
+//            [self pushRAImageController:modeinfo];
+//        }
+//    }
+}
+- (void)pushRAImageController:(NSMutableDictionary *)modeinfo {
+    if (!modeinfo) {
+        return;
+    }
+//    NSIndexPath *indexPath = [self.modeTable indexPathForCell:cell];
+    NSDictionary *mode = modeinfo;//[self.modeList objectAtIndex:indexPath.row];
+    BasicModeViewController *modeVC = nil;
+    if ([mode[@"name"] isEqualToString:@"Model"]) {
+        ModelModeViewController *vc = (ModelModeViewController *)[self viewControllerInStoryboard:@"Mode" withId:@"ModelModeViewController"];
+        vc.manufacturerList = [mode objectForKey:@"manifacturer"];
+        modeVC = vc;
+    }else if ([mode[@"name"] isEqualToString:@"POP"]||[mode[@"name"] isEqualToString:@"Receiving"]||[mode[@"name"] isEqualToString:@"Returns"]) {
+        PopModeViewController *vc = [[UIStoryboard storyboardWithName:@"Mode" bundle:nil] instantiateViewControllerWithIdentifier:@"PopModeViewController"];
+        if (![mode[@"name"] isEqualToString:@"Receiving"]) {
+            vc.inputKeyboardType = UIKeyboardTypeNumberPad;
+        } else {
+            vc.inputKeyboardType = UIKeyboardTypeDefault;
+        }
+        modeVC = vc;
+    }
+    
+    if (modeVC) {
+        modeVC.barcodeTitle = mode[@"code_name"];
+        modeVC.name = mode[@"name"];
+        [self.navigationController pushViewController:modeVC animated:YES];
+    }
+    
+}
+
+- (void) processSubmodeModel:(NSMutableDictionary *)modeinfo {
+    RAModeListViewController *vc = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"RARootViewController"];
+    vc.title = modeinfo[@"name"];
+    vc.modelist =modeinfo[@"mode_list"];
+    
+//    
+//    if(modeinfo[@"menu"] !=nil)
+//    {
+//        
+//        vc.onRBClick = ^(RAModeListViewController* bself){
+//            
+//            //        UIAlertView *alert = [RAUtils waiting_alert:@"Please wait..." title:@"Logout"];
+//            //        //                            __weak typeof(self) weakself = self;
+//            //        dispatch_async(dispatch_get_main_queue(), ^{
+//            //
+//            //            NSDictionary *logoutDic = [RANetwork logout];
+//            //            int result = [[logoutDic objectForKey:@"result"] intValue];
+//            //            dispatch_async(dispatch_get_main_queue(), ^{
+//            //                [alert dismissWithClickedButtonIndex:0 animated:YES];
+//            //                //                                    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+//            //                if (result == RESULT_TRUE) {
+//            //
+//            //                    [bself.navigationController popViewControllerAnimated:false];
+//            //                    //                weakself.companyIcon = [UIImage imageNamed:@"AppIcon40x40"];
+//            //                    //  [appDelegate logout];
+//            //                } else {
+//            //                    __strong typeof(bself) strongself = bself;
+//            //                    NSString *msg = [logoutDic objectForKey:@"err_msg"];
+//            //                    [RAUtils message_alert:msg title:@"Warning" controller:strongself];
+//            //                }
+//            //            });
+//            //
+//            //
+//            //        });
+//            //        ;
+//        };
+//        vc.onRBName = ^NSString *{
+//            return modeinfo[@"menu"];
+//        };
+//    }
+    
+    
+    
+//    [vc setModeList:];
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+
+
+@end

+ 1 - 1
RedAnt Mobile/RedAnt Mobile/RAModel.h

@@ -16,5 +16,5 @@
 @property (nonatomic,copy) NSString *url;///<查询接口,通过本地设置查询条件和查询元组
 @property (nonatomic,copy) NSString *module;///<本地功能类型
 @property (nonatomic,strong) NSArray<NSDictionary *> *mode_list;///<模型列表
-
+@property (nonatomic,assign) BOOL enable;///<是否可用
 @end

+ 5 - 0
RedAnt Mobile/RedAnt Mobile/RANetwork.h

@@ -20,4 +20,9 @@
 +(NSDictionary*)require_query_ui:(NSString*) request_url params:(NSMutableDictionary*)params;
 +(NSString*)kv_detail : (NSMutableDictionary*) params;
 +(NSDictionary*)require_orderdetail:(NSString*) request_url params:(NSMutableDictionary*)params;
+
++(NSDictionary*)Verify : (NSMutableDictionary*) params;
++ (NSDictionary *)getModelManufacture:(NSString *)model;
+
++(NSString*) get_url:(NSString*) interface;
 @end

+ 58 - 5
RedAnt Mobile/RedAnt Mobile/RANetwork.m

@@ -11,6 +11,7 @@
 #import "AESCrypt.h"
 #import "RANetwork.h"
 #import "AppDelegate.h"
+#import "RAConvertor.h"
 @implementation RANetwork
 
 +(NSString*) get_url:(NSString*) interface
@@ -52,13 +53,20 @@
 
 +(NSDictionary*)query : (NSMutableDictionary*) params
 {
+    
+#ifdef FAKE_DATA
     NSString *Path =nil;
     Path=[[NSBundle mainBundle] pathForResource:@"predef_query.json" ofType:nil];
     
     NSData* data1 = [NSData dataWithContentsOfFile:Path];
     return [[NSJSONSerialization JSONObjectWithData:data1 options:NSJSONReadingMutableContainers error:nil] mutableCopy];
+#endif
     
     
+    params[ @"_action"]=@"ant_mobile";
+    params[ @"_operate"]=@"getResult";
+    
+   
     // params[@"_operate"]=@"valid_upload";
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
     
@@ -165,7 +173,7 @@
         
         NSString* base64str = jsobj[@"str"];
         NSString* decryptstr=[AESCrypt AES128Decrypt:base64str key:@"usai2010"];
-        jsobj=[[RAUtils string2dict:decryptstr] mutableCopy];
+        jsobj=[[RAConvertor string2dict:decryptstr] mutableCopy];
         return jsobj;
     }];
     
@@ -181,9 +189,9 @@
 {
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     if(appDelegate.user!=nil)
-        [params setValue:[AESCrypt AES128Encrypt:appDelegate.user key:@"usai"] forKey:@"user"];
+        [params setValue:[AESCrypt AES128Encrypt:appDelegate.user key:@"Usai2010"] forKey:@"user"];
     if(appDelegate.password!=nil)
-        [params setValue:[AESCrypt AES128Encrypt:appDelegate.password key:@"usai"] forKey:@"password"];
+        [params setValue:[AESCrypt AES128Encrypt:appDelegate.password key:@"Usai2010"] forKey:@"pwd"];
     
     
     
@@ -257,16 +265,29 @@
 }
 +(NSDictionary*)require_query_ui:(NSString*) request_url params:(NSMutableDictionary*)params
 {
-    
+#ifdef FAKE_DATA
     
     NSString *Path = [[NSBundle mainBundle] pathForResource:@"search_ui.json" ofType:nil];
     
     NSData* data1 = [NSData dataWithContentsOfFile:Path];
     return [[NSJSONSerialization JSONObjectWithData:data1 options:NSJSONReadingMutableContainers error:nil] mutableCopy];
+#endif
     
     
     
-    [self request_Editor:request_url params:params];
+    
+    params[ @"_action"]=@"ant_mobile";
+    params[ @"_operate"]=@"getCondition";
+    
+    
+    // params[@"_operate"]=@"valid_upload";
+//    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    
+//    NSData *data = [self get_json:[self get_url:URL_QUERY_UI] parameters:params file:nil];
+//    NSDictionary *resultDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
+//    return resultDic;
+    
+    return [self request_Editor:request_url params:params];
 }
 
 +(NSDictionary*)require_orderdetail:(NSString*) request_url params:(NSMutableDictionary*)params
@@ -445,4 +466,36 @@
     
     return @{@"result" : @"2"};
 }
+
++(NSDictionary*)Verify : (NSMutableDictionary*) params
+{
+    
+    
+    
+    // params[@"_operate"]=@"valid_upload";
+    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    
+    NSData *data = [self get_json:appDelegate.address parameters:params file:nil];
+    NSDictionary *resultDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
+    return resultDic;
+}
++ (NSDictionary *)getModelManufacture:(NSString *)model {
+    
+    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    
+    NSString* encryptu=[AESCrypt AES128Encrypt:appDelegate.user key:@"usai"];
+    NSString* encryptp=[AESCrypt AES128Encrypt:appDelegate.password key:@"usai"];
+    NSMutableDictionary *params = @{
+                                    @"user":encryptu,
+                                    @"password":encryptp,
+                                    @"_operate":@"handset_get_manufacturer",
+                                    @"barcode":model
+                                    }.mutableCopy;
+    
+    NSData *data = [self get_json:appDelegate.address parameters:params file:nil];
+    NSDictionary *resultDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
+    return resultDic;
+    
+}
+
 @end

+ 25 - 1
RedAnt Mobile/RedAnt Mobile/ResultViewController.m

@@ -253,9 +253,15 @@ static const int delta = 25;
     return [self.content_data[@"count"] intValue];
     
 }
+//- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+//{
+//    return 1;
+//}
 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
 {
     int height=[self.content_layout[@"header"][@"height"] intValue];
+    if(height==0)
+        height=44;
     return height;
 }
 - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
@@ -327,6 +333,8 @@ static const int delta = 25;
 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
 {
     int height=[self.content_layout[@"row"][@"height"] intValue];
+    if(height==0)
+        height=44;
     return height;
 }
 -(NSTextAlignment) get_TextHAlign:(NSString*)textHAlign
@@ -617,8 +625,12 @@ static const int delta = 25;
             }
             break;
         }
+        
+//        dic[@"criteria"] = self.params;
+        
         [dic setObject:@(self.offset) forKey:@"offset"];
         [dic setObject:@(delta) forKey:@"limit"];
+//        dic[@"criteria"] = [NSArray arrayWithObjects:@"aaa",@"bbb", nil];
         
         __weak typeof(self) weakSelf = self;
         dispatch_async(dispatch_get_global_queue(0, 0), ^{
@@ -631,7 +643,19 @@ static const int delta = 25;
                         strongSelf.content_layout = [contentDic objectForKey:@"layout"];
                         strongSelf.content_action = [contentDic objectForKey:@"row_action"];
                         strongSelf.content_menu = [[contentDic objectForKey:@"menu"] mutableCopy];
-                        strongSelf.content_data = [contentDic objectForKey:@"data"];
+                        
+                        if(strongSelf.content_data==nil)
+                            strongSelf.content_data = [NSMutableDictionary new];
+                        NSMutableDictionary* newdata = [[contentDic objectForKey:@"data"] mutableCopy];
+                        for(int dc = 0;dc<[newdata[@"count"] intValue];dc++)
+                        {
+                            NSMutableDictionary * newdata_item = newdata[[NSString stringWithFormat:@"item_%d",dc]];
+                            
+                            strongSelf.content_data[[NSString stringWithFormat:@"item_%d",[strongSelf.content_data[@"count"] intValue] ]] = newdata_item;
+                            strongSelf.content_data[@"count"] = @([strongSelf.content_data[@"count"] intValue]+1);
+                        }
+                        
+//                        strongSelf.content_data = [contentDic objectForKey:@"data"];
                         [strongSelf updateTableFrame];
                         [strongSelf.tableview reloadData];
                     } else {

+ 54 - 0
RedAnt Mobile/RedAnt Mobile/SearchViewController.m

@@ -8,6 +8,10 @@
 
 #import "SearchViewController.h"
 #import "RANetwork.h"
+#import "RAUtils.h"
+#import "ResultViewController.h"
+#import "RAConvertor.h"
+
 @interface SearchViewController ()
 
 @end
@@ -40,6 +44,56 @@
 
 - (void)searchItemClick:(UIBarButtonItem *)item {
     
+//    self.content_data_download[@"hidden_params"];
+    
+    
+    
+    
+    NSMutableDictionary* upparams = [self check_cancommit:false];
+
+    [upparams addEntriesFromDictionary:self.content_data_download[@"hidden_params"]];
+    
+    
+    NSArray* criteria = [RAConvertor Dict2KVArray:upparams trim:true];
+    
+    
+    NSMutableDictionary* result_params = [NSMutableDictionary new];
+    result_params[@"criteria"] = [RAConvertor dict2string:criteria];//criteria;
+    result_params[@"query_id"]=self.params[@"query_id"];
+    
+    ResultViewController *preQueryVC = [[UIStoryboard storyboardWithName:@"Result" bundle:nil] instantiateViewControllerWithIdentifier:@"ResultViewController"];
+    [preQueryVC setQueryParams: result_params];
+    
+    [self.navigationController pushViewController:preQueryVC animated:YES];
+    
+//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Searching"];
+//    __weak typeof(self) weakSelf = self;
+//    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+//        NSDictionary *contentDic = [RANetwork query:dic];
+//        NSInteger result = [[contentDic objectForKey:@"result"] integerValue];
+//        dispatch_async(dispatch_get_main_queue(), ^{
+//            if (weakSelf) {
+//                __strong typeof(weakSelf) strongSelf = weakSelf;
+//                if (result == RESULT_TRUE) {
+//                    strongSelf.content_layout = [contentDic objectForKey:@"layout"];
+//                    strongSelf.content_action = [contentDic objectForKey:@"row_action"];
+//                    strongSelf.content_menu = [[contentDic objectForKey:@"menu"] mutableCopy];
+//                    strongSelf.content_data = [contentDic objectForKey:@"data"];
+//                    [strongSelf updateTableFrame];
+//                    [strongSelf.tableview reloadData];
+//                } else {
+//                    [RAUtils message_alert:[contentDic objectForKey:@"err_msg"] title:@"Warning" controller:strongSelf];
+//                }
+//
+//                if (finish) {
+//                    finish((int)result,(int)[self resultItemCount]);
+//                }
+//
+//            }
+//
+//        });
+//    });
+    
 }
 
 - (void)saveItemClick:(UIBarButtonItem *)item {

+ 3 - 0
RedAnt Mobile/RedAnt Mobile/config.h

@@ -33,10 +33,13 @@
 
 //#define FAKE_DATA
 
+#define PROJ_RAMOBILE
+
 #ifdef test_server
 #define URL_CUSTOMER_ADV_SEARCH @""
 #define URL_LOGIN @"wm_postgresql/index.php"
 #define URL_QUERY @""
+#define URL_QUERY_UI @""
 #define  URL_REQUIRE_SERVER  @"http://192.168.0.155/wm_postgresql/ant_mobile_company_valid.php"
 #define URL_KV_DETAIL @""
 #define URL_ORDER_DETAIL @""

+ 1 - 1
RedAnt Mobile/RedAnt Mobile/const.h

@@ -46,7 +46,7 @@
 #define  ACTION_SAVE_DATA 0
 #define ACTION_FILL_SECTION 1
 
-
+#define RESULT_BARCODE_ERROR             -50
 
 
 #define RESULT_FALSE 0

+ 37 - 1
RedAnt Mobile/RedAnt Mobile/login.json

@@ -24,10 +24,46 @@
                   },
                   {
                   "name": "RA Image",
-                  "type": "submode",
+                  "type": "local_func",
+                  "module": "raimage_mode",
+                  "ext_data":[
+                              {
+                              "enable": 1,
+                              "name": "Model",
+                              "code_name": "Model",
+                              "manifacturer": [
+                                               "GARY & SONS",
+                                               "HCC",
+                                               "HUMBLE FURNITURE DEALER",
+                                               "HUSH TEST FUNITURE",
+                                               "NEW PACIFIC DIRECT",
+                                               "United Logistic Solutions, Inc."
+                                               ],
+                              "description": "scan Model#"
+                              },
+                              {
+                              "name": "POP",
+                              "code_name": "PIID",
+                              "enable": 1,
+                              "description": "scan PIID"
+                              },
+                              {
+                              "enable": 1,
+                              "name": "Returns",
+                              "code_name": "RMA#",
+                              "description": "scan RMA#"
+                              },
+                              {
+                              "enable": 0,
+                              "name": "Receiving",
+                              "code_name": "PO#",
+                              "description": "scan PO#"
+                              }
+                              ],
                   "mode_list": [
                                 {
                                 "name": "POP",
+                                "description":"test description",
                                 "type": "local_func",
                                 "module": "raimage_pop"
                                 },