Explorar el Código

161228

Add new network interface new_doc
add document list & search function
add barcode & document number in the pdf edit
Ray Zhang hace 9 años
padre
commit
94f772a4b5

+ 46 - 6
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj

@@ -7,7 +7,13 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		7115D4191E135BE300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 7115D4181E135BE300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf */; };
+		7115D41F1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json in Resources */ = {isa = PBXBuildFile; fileRef = 7115D41E1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json */; };
+		7115D4231E13B05300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 7115D4221E13B05300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf */; };
+		7115D4271E13B70C00EF4E4C /* DocumentListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7115D4261E13B70C00EF4E4C /* DocumentListViewController.m */; };
+		7115D42A1E14DE0A00EF4E4C /* DocListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7115D4291E14DE0A00EF4E4C /* DocListTableViewCell.m */; };
+		7115D4561E1606F700EF4E4C /* GEContractFilterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7115D4551E1606F700EF4E4C /* GEContractFilterViewController.m */; };
+		7115D4591E162BA800EF4E4C /* DatePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7115D4581E162BA800EF4E4C /* DatePickerViewController.m */; };
+		7115D45F1E16326C00EF4E4C /* CommonEditor.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7115D45E1E16326C00EF4E4C /* CommonEditor.storyboard */; };
 		7128C2401E124F4500FF635B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7128C23F1E124F4500FF635B /* main.m */; };
 		7128C24B1E124F4500FF635B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7128C24A1E124F4500FF635B /* Assets.xcassets */; };
 		7128C2591E124FAB00FF635B /* GEIC - Home Improvement Contract 2016.json in Resources */ = {isa = PBXBuildFile; fileRef = 7128C2551E124FAB00FF635B /* GEIC - Home Improvement Contract 2016.json */; };
@@ -79,7 +85,17 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
-		7115D4181E135BE300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "GEIC - Home Improvement Contract 2017.pdf"; sourceTree = "<group>"; };
+		7115D41E1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "GEIC - Home Improvement Contract 2017.json"; path = "Granite Expo eSign/GEIC - Home Improvement Contract 2017.json"; sourceTree = "<group>"; };
+		7115D4221E13B05300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = "GEIC - Home Improvement Contract 2017.pdf"; path = "Granite Expo eSign/GEIC - Home Improvement Contract 2017.pdf"; sourceTree = "<group>"; };
+		7115D4251E13B70C00EF4E4C /* DocumentListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocumentListViewController.h; path = ../../common/DocumentListViewController.h; sourceTree = "<group>"; };
+		7115D4261E13B70C00EF4E4C /* DocumentListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DocumentListViewController.m; path = ../../common/DocumentListViewController.m; sourceTree = "<group>"; };
+		7115D4281E14DE0A00EF4E4C /* DocListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocListTableViewCell.h; path = ../../common/DocListTableViewCell.h; sourceTree = "<group>"; };
+		7115D4291E14DE0A00EF4E4C /* DocListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DocListTableViewCell.m; path = ../../common/DocListTableViewCell.m; sourceTree = "<group>"; };
+		7115D4541E1606F700EF4E4C /* GEContractFilterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GEContractFilterViewController.h; sourceTree = "<group>"; };
+		7115D4551E1606F700EF4E4C /* GEContractFilterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GEContractFilterViewController.m; sourceTree = "<group>"; };
+		7115D4571E162BA800EF4E4C /* DatePickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DatePickerViewController.h; path = "../../../RedAnt ERP Mobile/common/CommonEditor/DatePickerViewController.h"; sourceTree = "<group>"; };
+		7115D4581E162BA800EF4E4C /* DatePickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DatePickerViewController.m; path = "../../../RedAnt ERP Mobile/common/CommonEditor/DatePickerViewController.m"; sourceTree = "<group>"; };
+		7115D45E1E16326C00EF4E4C /* CommonEditor.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = CommonEditor.storyboard; path = "../../../RedAnt ERP Mobile/common/CommonEditor/CommonEditor.storyboard"; sourceTree = "<group>"; };
 		7128C23B1E124F4500FF635B /* eSign.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = eSign.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		7128C23F1E124F4500FF635B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		7128C24A1E124F4500FF635B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -227,6 +243,15 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+		7115D4241E13B32800EF4E4C /* customerUI */ = {
+			isa = PBXGroup;
+			children = (
+				7128C2801E12501B00FF635B /* TouchImageView.h */,
+				7128C2811E12501B00FF635B /* TouchImageView.m */,
+			);
+			name = customerUI;
+			sourceTree = "<group>";
+		};
 		7128C2321E124F4500FF635B = {
 			isa = PBXGroup;
 			children = (
@@ -265,6 +290,15 @@
 				7128C33D1E12541800FF635B /* RootViewController.m */,
 				7128C33F1E12542000FF635B /* LoginViewController.h */,
 				7128C3401E12542000FF635B /* LoginViewController.m */,
+				7115D4541E1606F700EF4E4C /* GEContractFilterViewController.h */,
+				7115D4551E1606F700EF4E4C /* GEContractFilterViewController.m */,
+				7115D45E1E16326C00EF4E4C /* CommonEditor.storyboard */,
+				7115D4571E162BA800EF4E4C /* DatePickerViewController.h */,
+				7115D4581E162BA800EF4E4C /* DatePickerViewController.m */,
+				7115D4281E14DE0A00EF4E4C /* DocListTableViewCell.h */,
+				7115D4291E14DE0A00EF4E4C /* DocListTableViewCell.m */,
+				7115D4251E13B70C00EF4E4C /* DocumentListViewController.h */,
+				7115D4261E13B70C00EF4E4C /* DocumentListViewController.m */,
 				7128C23E1E124F4500FF635B /* Supporting Files */,
 			);
 			path = "Granite Expo eSign";
@@ -335,8 +369,6 @@
 			children = (
 				7128C2951E12503000FF635B /* preview */,
 				7128C2991E12504600FF635B /* pdfcreator */,
-				7128C2801E12501B00FF635B /* TouchImageView.h */,
-				7128C2811E12501B00FF635B /* TouchImageView.m */,
 				7128C3421E12545C00FF635B /* CheckSelectorViewController.h */,
 				7128C3431E12545C00FF635B /* CheckSelectorViewController.m */,
 				7128C3441E12545C00FF635B /* DocumentPageViewController.h */,
@@ -354,6 +386,7 @@
 		7128C2B91E1250F000FF635B /* utils */ = {
 			isa = PBXGroup;
 			children = (
+				7115D4241E13B32800EF4E4C /* customerUI */,
 				7128C3091E12514300FF635B /* UIKit+AFNetworking */,
 				7128C2EC1E12512F00FF635B /* AFNetworking */,
 				7128C2DD1E12511400FF635B /* aes */,
@@ -462,9 +495,10 @@
 		7128C3261E1251DE00FF635B /* pdf resource */ = {
 			isa = PBXGroup;
 			children = (
+				7115D41E1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json */,
+				7115D4221E13B05300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf */,
 				7128C2551E124FAB00FF635B /* GEIC - Home Improvement Contract 2016.json */,
 				7128C2561E124FAB00FF635B /* GEIC - Home Improvement Contract 2016.pdf */,
-				7115D4181E135BE300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf */,
 				7128C2571E124FAB00FF635B /* SUBCONTRACTORS REFERRAL LIST.json */,
 				7128C2581E124FAB00FF635B /* SUBCONTRACTORS REFERRAL LIST.pdf */,
 			);
@@ -538,12 +572,14 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				7115D41F1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json in Resources */,
 				7128C25C1E124FAB00FF635B /* SUBCONTRACTORS REFERRAL LIST.pdf in Resources */,
 				7128C25B1E124FAB00FF635B /* SUBCONTRACTORS REFERRAL LIST.json in Resources */,
 				7128C24B1E124F4500FF635B /* Assets.xcassets in Resources */,
 				7128C26F1E124FF200FF635B /* Main.storyboard in Resources */,
 				7128C2701E124FF200FF635B /* LaunchScreen.storyboard in Resources */,
-				7115D4191E135BE300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf in Resources */,
+				7115D45F1E16326C00EF4E4C /* CommonEditor.storyboard in Resources */,
+				7115D4231E13B05300EF4E4C /* GEIC - Home Improvement Contract 2017.pdf in Resources */,
 				7128C27D1E12500B00FF635B /* signature.storyboard in Resources */,
 				7128C2E81E12511B00FF635B /* LICENSE in Resources */,
 				7128C2591E124FAB00FF635B /* GEIC - Home Improvement Contract 2016.json in Resources */,
@@ -560,9 +596,11 @@
 			files = (
 				7128C3471E12545C00FF635B /* DocumentPageViewController.m in Sources */,
 				7128C3081E12513800FF635B /* AFURLSessionManager.m in Sources */,
+				7115D42A1E14DE0A00EF4E4C /* DocListTableViewCell.m in Sources */,
 				7128C2B11E1250CA00FF635B /* PDFDrawable.m in Sources */,
 				7128C2E71E12511B00FF635B /* AESCrypt.m in Sources */,
 				7128C2B21E1250CA00FF635B /* PDFPage.m in Sources */,
+				7115D4271E13B70C00EF4E4C /* DocumentListViewController.m in Sources */,
 				7128C33A1E12540F00FF635B /* ACNetwork.m in Sources */,
 				7128C2B71E1250CA00FF635B /* RectDrawable.m in Sources */,
 				7128C2D91E12510900FF635B /* mztools.c in Sources */,
@@ -594,6 +632,7 @@
 				7128C3221E12515800FF635B /* UIRefreshControl+AFNetworking.m in Sources */,
 				7128C28E1E12501B00FF635B /* TouchImageView.m in Sources */,
 				7128C2B41E1250CA00FF635B /* GridDrawable.m in Sources */,
+				7115D4561E1606F700EF4E4C /* GEContractFilterViewController.m in Sources */,
 				7128C2DA1E12510900FF635B /* unzip.c in Sources */,
 				7128C2981E12504300FF635B /* PDFViewController.m in Sources */,
 				7128C3041E12513800FF635B /* AFSecurityPolicy.m in Sources */,
@@ -603,6 +642,7 @@
 				7128C27B1E12500B00FF635B /* SignatureView.m in Sources */,
 				7128C2B61E1250CA00FF635B /* ImageDrawable.m in Sources */,
 				7128C2AF1E1250CA00FF635B /* TableDrawable.m in Sources */,
+				7115D4591E162BA800EF4E4C /* DatePickerViewController.m in Sources */,
 				7128C2401E124F4500FF635B /* main.m in Sources */,
 				7128C3551E12548C00FF635B /* SignatureListViewController.m in Sources */,
 				7128C2EA1E12511B00FF635B /* NSData+CommonCrypto.m in Sources */,

BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 15 - 15
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -26,11 +26,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/DocumentPageViewController.m"
-            timestampString = "504521339.006227"
+            timestampString = "504778298.834695"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "76"
-            endingLineNumber = "76"
+            startingLineNumber = "117"
+            endingLineNumber = "117"
             landmarkName = "-dealloc"
             landmarkType = "7">
          </BreakpointContent>
@@ -42,11 +42,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/RootViewController.m"
-            timestampString = "504540232.746222"
+            timestampString = "504773621.562093"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "75"
-            endingLineNumber = "75"
+            startingLineNumber = "132"
+            endingLineNumber = "132"
             landmarkName = "-OnSigninClick:"
             landmarkType = "7">
          </BreakpointContent>
@@ -58,11 +58,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/RootViewController.m"
-            timestampString = "504540232.746222"
+            timestampString = "504773621.562093"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "43"
-            endingLineNumber = "43"
+            startingLineNumber = "100"
+            endingLineNumber = "100"
             landmarkName = "-OnSigninClick:"
             landmarkType = "7">
          </BreakpointContent>
@@ -74,11 +74,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/RootViewController.m"
-            timestampString = "504540232.746222"
+            timestampString = "504773621.562093"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "114"
-            endingLineNumber = "114"
+            startingLineNumber = "171"
+            endingLineNumber = "171"
             landmarkName = "-OnSigninClick:"
             landmarkType = "7">
          </BreakpointContent>
@@ -90,11 +90,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/RootViewController.m"
-            timestampString = "504540232.746222"
+            timestampString = "504773621.562093"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "143"
-            endingLineNumber = "143"
+            startingLineNumber = "200"
+            endingLineNumber = "200"
             landmarkName = "-OnSigninClick:"
             landmarkType = "7">
             <Locations>

+ 35 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/GEContractFilterViewController.h

@@ -0,0 +1,35 @@
+//
+//  GEContractFilterViewController.h
+//  Granite Expo eSign
+//
+//  Created by Ray on 12/30/16.
+//  Copyright © 2016 United Software Applications, Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface GEContractFilterViewController : UIViewController
+@property (strong, nonatomic) IBOutlet UITextField *tfDocument;
+
+@property (strong, nonatomic) IBOutlet UITextField *tfCustomer;
+@property (strong, nonatomic) IBOutlet UITextField *tfJobAddr;
+@property (strong, nonatomic) IBOutlet UITextField *tfJobCity;
+@property (strong, nonatomic) IBOutlet UITextField *tfJobState;
+@property (strong, nonatomic) IBOutlet UITextField *tfJobZip;
+@property (strong, nonatomic) IBOutlet UITextField *tfCustomerTel;
+@property (strong, nonatomic) IBOutlet UITextField *tfAgent;
+
+
+@property (strong, nonatomic) IBOutlet UIButton *btnJobDate;
+@property (strong, nonatomic) IBOutlet UIButton *btnSignDate;
+
+@property (strong, nonatomic) IBOutlet UILabel *labelJobDate;
+@property (strong, nonatomic) IBOutlet UILabel *labelSignDate;
+
+
+@property (strong,nonatomic) NSMutableDictionary* filterparams;
+
+
+@property (nonatomic , copy) void (^OnSearch)(NSMutableDictionary * filterparams);
+
+@end

+ 205 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/GEContractFilterViewController.m

@@ -0,0 +1,205 @@
+//
+//  GEContractFilterViewController.m
+//  Granite Expo eSign
+//
+//  Created by Ray on 12/30/16.
+//  Copyright © 2016 United Software Applications, Inc. All rights reserved.
+//
+
+#import "GEContractFilterViewController.h"
+#import "DatePickerViewController.h"
+#import "RAUtils.h"
+
+
+@interface GEContractFilterViewController ()
+
+@end
+
+@implementation GEContractFilterViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.tfAgent.text = self.filterparams[@"agent_name"];
+    self.tfJobZip.text = self.filterparams[@"job_zip"];
+    self.tfJobAddr.text = self.filterparams[@"job_addr"];
+    self.tfJobCity.text = self.filterparams[@"job_city"];
+    self.tfCustomer.text = self.filterparams[@"customer_name"];
+    self.tfDocument.text = self.filterparams[@"doc_number"];
+    self.tfJobState.text = self.filterparams[@"job_state"];
+    self.tfCustomerTel.text = self.filterparams[@"tel"];
+    
+    self.labelJobDate.text =self.filterparams[@"job_date"];
+    self.labelSignDate.text =self.filterparams[@"signed_date"];
+    
+
+    // Do any additional setup after loading the
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+- (IBAction)onSelectSignDate:(id)sender {
+    
+     __weak __typeof(self)weakSelf = self;
+    NSDateFormatter * formatter = [[NSDateFormatter alloc]init];
+    [formatter setDateFormat:@"MM/dd/yyyy"];
+    NSString* date = self.labelSignDate.text;
+
+    NSDate* currentDate =nil;
+    if(date.length==0)
+        currentDate=[NSDate date];
+    else
+        currentDate=[formatter dateFromString:date];
+    
+    DatePickerViewController* dpvc =[ [UIStoryboard storyboardWithName:@"CommonEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"DatePickerViewController"];
+
+        dpvc.pickerMode = UIDatePickerModeDate;
+ 
+    
+    
+    dpvc.date = currentDate;
+    dpvc.formatter = formatter;
+    dpvc.labelTime.text = [formatter stringFromDate:currentDate];
+    
+    dpvc.blk_Set = ^(NSString* strdate)
+    {
+        weakSelf.labelSignDate.text = strdate;
+    };
+    dpvc.title=@"Please choose sign date";
+    [self.navigationController pushViewController:dpvc animated:true];
+}
+
+- (IBAction)onSelectJobDate:(id)sender {
+    
+     __weak __typeof(self)weakSelf = self;
+    
+    NSDateFormatter * formatter = [[NSDateFormatter alloc]init];
+    [formatter setDateFormat:@"MM/dd/yyyy"];
+    NSString* date = self.labelJobDate.text;
+    
+    NSDate* currentDate =nil;
+    if(date.length==0)
+        currentDate=[NSDate date];
+    else
+        currentDate=[formatter dateFromString:date];
+    
+    DatePickerViewController* dpvc =[ [UIStoryboard storyboardWithName:@"CommonEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"DatePickerViewController"];
+    
+    dpvc.pickerMode = UIDatePickerModeDate;
+    
+    
+    
+    dpvc.date = currentDate;
+    dpvc.formatter = formatter;
+    dpvc.labelTime.text = [formatter stringFromDate:currentDate];
+    
+    dpvc.blk_Set = ^(NSString* strdate)
+    {
+        weakSelf.labelJobDate.text = strdate;
+    };
+    dpvc.title=@"Please choose job date";
+    [self.navigationController pushViewController:dpvc animated:true];
+}
+
+- (IBAction)onSearchClick:(id)sender {
+    
+    
+    
+    
+    NSString* agent_name= self.tfAgent.text;
+    NSString* job_zip= self.tfJobZip.text;
+    NSString* job_addr= self.tfJobAddr.text;
+    NSString* job_city= self.tfJobCity.text;
+    NSString* customer_name= self.tfCustomer.text;
+    NSString* doc_number= self.tfDocument.text;
+    NSString* job_state= self.tfJobState.text;
+    NSString* tel= self.tfCustomerTel.text;
+    NSString* job_date= self.labelJobDate.text;
+    NSString* signed_date= self.labelSignDate.text;
+
+    if(agent_name.length==0)
+       [self.filterparams removeObjectForKey:@"agent_name"];
+    else
+        self.filterparams[@"agent_name"]=agent_name;
+    
+    if(job_zip.length==0)
+        [self.filterparams removeObjectForKey:@"job_zip"];
+    else
+        self.filterparams[@"job_zip"]=job_zip;
+    
+    if(job_addr.length==0)
+        [self.filterparams removeObjectForKey:@"job_addr"];
+    else
+        self.filterparams[@"job_addr"]=job_addr;
+    
+    if(job_city.length==0)
+        [self.filterparams removeObjectForKey:@"job_city"];
+    else
+        self.filterparams[@"job_city"]=job_city;
+    
+    if(customer_name.length==0)
+        [self.filterparams removeObjectForKey:@"customer_name"];
+    else
+        self.filterparams[@"customer_name"]=customer_name;
+    
+    if(doc_number.length==0)
+        [self.filterparams removeObjectForKey:@"doc_number"];
+    else
+        self.filterparams[@"doc_number"]=doc_number;
+    
+    if(job_state.length==0)
+        [self.filterparams removeObjectForKey:@"job_state"];
+    else
+        self.filterparams[@"job_state"]=job_state;
+    
+    if(tel.length==0)
+        [self.filterparams removeObjectForKey:@"tel"];
+    else
+        self.filterparams[@"tel"]=tel;
+    
+    if(job_date.length==0)
+        [self.filterparams removeObjectForKey:@"job_date"];
+    else
+        self.filterparams[@"job_date"]=job_date;
+    
+    if(signed_date.length==0)
+        [self.filterparams removeObjectForKey:@"signed_date"];
+    else
+        self.filterparams[@"signed_date"]=signed_date;
+    
+    
+    [self dismissViewControllerAnimated:false completion:^{
+    
+        if(self.OnSearch)
+            self.OnSearch(self.filterparams);
+    }];
+}
+- (IBAction)onCancelClick:(id)sender {
+    [self dismissViewControllerAnimated:false completion:nil];
+}
+- (IBAction)onResetClick:(id)sender {
+    self.tfAgent.text = self.filterparams[@"agent_name"];
+    self.tfJobZip.text = self.filterparams[@"job_zip"];
+    self.tfJobAddr.text = self.filterparams[@"job_addr"];
+    self.tfJobCity.text = self.filterparams[@"job_city"];
+    self.tfCustomer.text = self.filterparams[@"customer_name"];
+    self.tfDocument.text = self.filterparams[@"doc_number"];
+    self.tfJobState.text = self.filterparams[@"job_state"];
+    self.tfCustomerTel.text = self.filterparams[@"tel"];
+    
+    self.labelJobDate =self.filterparams[@"job_date"];
+    self.labelSignDate =self.filterparams[@"signed_date"];
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 644 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/GEIC - Home Improvement Contract 2017.json

@@ -0,0 +1,644 @@
+{
+    "count": 5,
+    "signature_name":["Customer Initial","Decision Maker","Agent Of Contractor","Homeowner","Homeowner Print Name","Date"],
+    "page_0": {
+        "count": 21,
+        "control_0": {
+            "type": "Ignor",
+            "pos_x": 122,
+            "pos_y": 132,
+            "width": 522,
+            "height": 80,
+            "field": "team",
+            "title": "team button",
+            "single_select": true,
+            "show_detail": true,
+            "marker_size": 8,
+            "cadedate": [
+                         [
+                          ["T&C","Tan & Chan Construction Lic. B1010166, 2827 22nd Street, Oakland, CA 94606"],
+                          [
+                           127,
+                           143
+                           ]
+                          ],
+                         [
+                          ["W","WMA Construction Lic. B988052, 2888 Darius Way, San Leandro, CA 94577"],
+                          [
+                           236,
+                           143
+                           ]
+                          ],
+                         [
+                          ["X","JimXu Builder Lic. B975007, 1034 Sutter St. #5, San Francisco, CA 94109"],
+                          [
+                           336,
+                           143
+                           ]
+                          ],
+                         [
+                          ["F","F Huang Construction Inc. Lic. B1011198, 3726 Rosalee Court, Castro Valley, CA 94546"],
+                          [
+                           428,
+                           143
+                           ]
+                          ],
+                         [
+                          ["GE","Granite Expo Installation Inc. Lic. B896945, 3401 Mandela Pkwy, Oakland, CA 94608"],
+                          [
+                           533,
+                           143
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_1": {
+            "type": "TextView",
+            "pos_x": 222,
+            "pos_y": 253,
+            "width": 183,
+            "height": 30,
+            "field": "customer_name",
+            "value": ""
+        },
+        "control_2": {
+            "type": "TextView",
+            "pos_x": 488,
+            "pos_y": 253,
+            "width": 156,
+            "height": 30,
+            "field": "job_date",
+            "value": ""
+        },
+        "control_3": {
+            "type": "TextView",
+            "pos_x": 222,
+            "pos_y": 285,
+            "width": 423,
+            "height": 15,
+            "field": "job_addr",
+            "value": ""
+        },
+        "control_15": {
+            "type": "TextView",
+            "pos_x": 248,
+            "pos_y": 300,
+            "width": 152,
+            "height": 15,
+            "field": "job_city",
+            "value": ""
+        },
+        "control_16": {
+            "type": "TextView",
+            "pos_x": 432,
+            "pos_y": 300,
+            "width": 90,
+            "height": 15,
+            "field": "job_state",
+            "value": ""
+        },
+        "control_17": {
+            "type": "TextView",
+            "pos_x": 545,
+            "pos_y": 300,
+            "width": 99,
+            "height": 15,
+            "field": "job_zip",
+            "value": ""
+        },
+        "control_4": {
+            "type": "TextView",
+            "pos_x": 222,
+            "pos_y": 317,
+            "width": 183,
+            "height": 30,
+            "field": "tel",
+            "value": ""
+        },
+        "control_5": {
+            "type": "TextView",
+            "pos_x": 488,
+            "pos_y": 317,
+            "width": 156,
+            "height": 30,
+            "field": "today_date",
+            "value": ""
+        },
+        "control_6": {
+            "type": "TextView",
+            "pos_x": 222,
+            "pos_y": 349,
+            "width": 183,
+            "height": 30,
+            "field": "contract_price",
+            "value": ""
+        },
+        "control_7": {
+            "type": "TextView",
+            "pos_x": 488,
+            "pos_y": 349,
+            "width": 85,
+            "height": 30,
+            "field": "labor_deposit",
+            "value": ""
+        },
+        "control_18": {
+            "type": "Button",
+            "pos_x": 560,
+            "pos_y": 355,
+            "width": 40,
+            "height": 20,
+            "field": "deposit_percent",
+            "value": "10%"
+        },
+        "control_8": {
+            "type": "TextView",
+            "pos_x": 222,
+            "pos_y": 382,
+            "width": 183,
+            "height": 40,
+            "field": "balance",
+            "value": ""
+        },
+        "control_9": {
+            "type": "Check",
+            "pos_x": 122,
+            "pos_y": 538,
+            "width": 522,
+            "height": 70,
+            "field": "service",
+            "title": "service button",
+            "single_select": false,
+            "show_detail": false,
+            "marker_size": 6,
+            "cadedate": [
+                         [
+                          ["Installation of Cabinetry.",""],
+                          [
+                           133,
+                           545
+                           ]
+                          ],
+                         [
+                          ["Installation of Granite, Marble or Quartz Countertop(s).",""],
+                          [
+                           133,
+                           557
+                           ]
+                          ],
+                         [
+                          ["Installation of Plywood.",""],
+                          [
+                           133,
+                           569
+                           ]
+                          ],
+                         [
+                          ["Demolition Work.",""],
+                          [
+                           133,
+                           581
+                           ]
+                          ],
+                         [
+                          ["Other / Include Description:",""],
+                          [
+                           133,
+                           593
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_10": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 693,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_11": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 730,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_12": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 779,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_13": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 795,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_14": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 844,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_20": {
+            "type": "Label",
+            "pos_x": 568,
+            "pos_y": 917,
+            "width": 64,
+            "size": 8,
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_19": {
+            "type": "Image",
+            "pos_x": 550,
+            "pos_y": 898,
+            "width": 100,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_1": {
+        "count": 18,
+        "control_0": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 79,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_1": {
+            "type": "Signature",
+            "pos_x": 230,
+            "pos_y": 87,
+            "width": 200,
+            "height": 20,
+            "name": "Decision Maker",
+            "value": ""
+        },
+        "control_2": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 148,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_3": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 168,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_4": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 195,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_5": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 232,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_6": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 280,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_7": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 307,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_8": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 333,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_9": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 370,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_10": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 408,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_11": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 434,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_12": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 495,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_13": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 533,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_14": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 592,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_15": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 609,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_16": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 626,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_9": {
+            "type": "Check",
+            "pos_x": 135,
+            "pos_y": 463,
+            "width": 475,
+            "height": 50,
+            "field": "joint_seams",
+            "title": "joint seams",
+            "single_select": true,
+            "show_detail": true,
+            "marker_size": 6,
+            "cadedate": [
+                         [
+                          ["OPTION A:","Unpolished joint seams, which the Undersigned understands may not be smooth."],
+                          [
+                           149,
+                           476
+                           ]
+                          ],
+                         [
+                          ["OPTION B","Polished joint seams, which the Undersigned understands that color dullness or shade variation may occur."],
+                          [
+                           149,
+                           488
+                           ]
+                          ],
+                         [
+                          ["OPTION C","The Decision Maker will determine on-site with the assistance of the Contractor."],
+                          [
+                           149,
+                           499
+                           ]
+                          ]
+                         ],
+            "value": []
+        }
+    },
+    "page_2": {
+        "count": 8,
+        "control_0": {
+            "type": "Signature",
+            "pos_x": 143,
+            "pos_y": 746,
+            "width": 200,
+            "height": 45,
+            "name": "Agent Of Contractor",
+            "value": ""
+        },
+        "control_1": {
+            "type": "Signature",
+            "pos_x": 385,
+            "pos_y": 746,
+            "width": 240,
+            "height": 45,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_2": {
+            "type": "TextView",
+            "pos_x": 194,
+            "pos_y": 803,
+            "width": 160,
+            "height": 14,
+            "field": "agent_name",
+            "value": ""
+        },
+        "control_3": {
+            "type": "TextView",
+            "pos_x": 472,
+            "pos_y": 803,
+            "width": 165,
+            "height": 14,
+            "field": "customer_name_1",
+            "value": ""
+        },
+        "control_4": {
+            "type": "Ignor",
+            "pos_x": 194,
+            "pos_y": 818,
+            "width": 160,
+            "height": 14,
+            "field": "signor_name",
+            "value": ""
+        },
+        "control_5": {
+            "type": "TextView",
+            "pos_x": 472,
+            "pos_y": 818,
+            "width": 165,
+            "height": 14,
+            "field": "owner_name",
+            "value": ""
+        },
+        "control_6": {
+            "type": "TextView",
+            "pos_x": 472,
+            "pos_y": 834,
+            "width": 165,
+            "height": 14,
+            "field": "tel1",
+            "value": ""
+        }
+    },
+    "page_3": {
+        "count": 8,
+        "control_0": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 644,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_1": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 660,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_2": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 687,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_3": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 724,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_4": {
+            "type": "Signature",
+            "pos_x": 615,
+            "pos_y": 762,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_5": {
+            "type": "Signature",
+            "pos_x": 132,
+            "pos_y": 808,
+            "width": 185,
+            "height": 24,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_6": {
+            "type": "Signature",
+            "pos_x": 352,
+            "pos_y": 808,
+            "width": 183,
+            "height": 24,
+            "name": "Homeowner Print Name",
+            "value": ""
+        },
+        "control_7": {
+            "type": "Signature",
+            "pos_x": 566,
+            "pos_y": 808,
+            "width": 60,
+            "height": 24,
+            "name": "Date",
+            "value": ""
+        }
+    },
+    "page_4": {
+        "count": 3,
+        "control_0": {
+            "type": "Signature",
+            "pos_x": 127,
+            "pos_y": 537,
+            "width": 146,
+            "height": 40,
+            "field": "Homeowner",
+            "value": ""
+        },
+        "control_1": {
+            "type": "Signature",
+            "pos_x": 326,
+            "pos_y": 537,
+            "width": 148,
+            "height": 40,
+            "field": "Homeowner Print Name",
+            "value": ""
+        },
+        "control_2": {
+            "type": "Signature",
+            "pos_x": 546,
+            "pos_y": 537,
+            "width": 75,
+            "height": 40,
+            "field": "Date",
+            "value": ""
+        }
+        
+    }
+
+}

BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/GEIC - Home Improvement Contract 2017.pdf


+ 6 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/config.h

@@ -9,6 +9,8 @@
 #ifndef config_h
 #define config_h
 
+//#define ENCRYPT_OFF
+
 #define DEBUG_PDFSIG true
 
 #define PDF_DEBUG false
@@ -20,11 +22,15 @@
     #define  URL_UPDATE_AUTH  @"http://192.168.0.155/phpcms/admin.php"
     #define  URL_UPLOAD_PDF  @"http://192.168.0.155/phpcms/admin.php"
     #define  URL_LOGOUT  @"http://192.168.0.155/phpcms/admin.php"
+    #define  URL_NEW_DOCUMENT  @"http://192.168.0.155/phpcms/admin.php"
+    #define  URL_REQUEST_DOC  @"http://192.168.0.155/phpcms/admin.php"
 #else
     #define  URL_ERR_LOG  @""
     #define  URL_UPDATE_AUTH  @"http://www.thegraniteexpo.com/admin.php"
     #define  URL_UPLOAD_PDF  @"http://www.thegraniteexpo.com/admin.php"
     #define  URL_LOGOUT  @"http://www.thegraniteexpo.com/admin.php"
+    #define  URL_REQUEST_DOC  @"http://www.thegraniteexpo.com/admin.php"
+    #define  URL_NEW_DOCUMENT  @"http://www.thegraniteexpo.com/admin.php"
 #endif
 
 #endif /* config_h */

+ 3 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/const.h

@@ -33,10 +33,13 @@
 
 
 #define TV_BG 0xccffff
+
 #define CK_BG 0xccffff
 #define CK_MK 0x000000
+
 #define SIG_BG 0xFFFFCC
 
+#define BT_BG 0xccffff
 
 #define JSON_TIMEOUT 30