Explorar el Código

eSign

新版本修改,目前除了合同模板适配,其他都已改完。
Ray Zhang hace 8 años
padre
commit
5dfbb4d2f6
Se han modificado 26 ficheros con 1908 adiciones y 56 borrados
  1. BIN
      Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate
  2. 361 9
      Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 24 2
      Ants Contract/AntsContract/AntsContract/Base.lproj/Main.storyboard
  4. 1182 0
      Ants Contract/Granite Expo eSign/GEIC - Home Improvement Contract 2017 Desktop.json
  5. BIN
      Ants Contract/Granite Expo eSign/GEIC - Home Improvement Contract 2017 Desktop.pdf
  6. 8 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj
  7. 23 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/Contents.json
  8. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/jiantou(1).png
  9. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/jiantou(1)@2x.png
  10. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/jiantou(1)@3x.png
  11. 23 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/Contents.json
  12. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/zuo(3).png
  13. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/zuo(3)@2x.png
  14. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/zuo(3)@3x.png
  15. 23 0
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/Contents.json
  16. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/appicon-1.png
  17. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/appicon-2.png
  18. BIN
      Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/appicon.png
  19. 34 8
      Ants Contract/common/ACNetwork.m
  20. 2 1
      Ants Contract/common/AppDelegate.h
  21. 2 1
      Ants Contract/common/AppDelegate.m
  22. 2 0
      Ants Contract/common/DocumentPageViewController.h
  23. 118 9
      Ants Contract/common/DocumentPageViewController.m
  24. 3 2
      Ants Contract/common/LoginViewController.h
  25. 97 18
      Ants Contract/common/LoginViewController.m
  26. 6 6
      Ants Contract/common/RootViewController.m

BIN
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 361 - 9
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -10,11 +10,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/LoginViewController.m"
-            timestampString = "514265179.72288"
+            timestampString = "527565522.26494"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "181"
-            endingLineNumber = "181"
+            startingLineNumber = "203"
+            endingLineNumber = "203"
             landmarkName = "-onLoginClick:"
             landmarkType = "7">
             <Locations>
@@ -58,11 +58,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/LoginViewController.m"
-            timestampString = "514265189.147484"
+            timestampString = "527565522.26494"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "180"
-            endingLineNumber = "180"
+            startingLineNumber = "202"
+            endingLineNumber = "202"
             landmarkName = "-onLoginClick:"
             landmarkType = "7">
          </BreakpointContent>
@@ -74,11 +74,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/LoginViewController.m"
-            timestampString = "514265201.681777"
+            timestampString = "527565522.26494"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "143"
-            endingLineNumber = "143"
+            startingLineNumber = "165"
+            endingLineNumber = "165"
             landmarkName = "-onLoginClick:"
             landmarkType = "7">
          </BreakpointContent>
@@ -371,5 +371,357 @@
             landmarkType = "24">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/LoginViewController.m"
+            timestampString = "527565522.26494"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "62"
+            endingLineNumber = "62"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/LoginViewController.m"
+            timestampString = "527565522.26494"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "230"
+            endingLineNumber = "230"
+            landmarkName = "-onLoginClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/LoginViewController.m"
+            timestampString = "527565606.229271"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "218"
+            endingLineNumber = "218"
+            landmarkName = "-onLoginClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1148"
+            endingLineNumber = "1148"
+            landmarkName = "-pageViewController:viewControllerBeforeViewController:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1160"
+            endingLineNumber = "1160"
+            landmarkName = "-pageViewController:viewControllerAfterViewController:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527671027.787121"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "74"
+            endingLineNumber = "74"
+            landmarkName = "-onRightButtonClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "909"
+            endingLineNumber = "909"
+            landmarkName = "-viewControllerAtIndex:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "981"
+            endingLineNumber = "981"
+            landmarkName = "-indexOfViewController:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "930"
+            endingLineNumber = "930"
+            landmarkName = "-viewControllerAtIndex:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1203"
+            endingLineNumber = "1203"
+            landmarkName = "-pageViewController:spineLocationForInterfaceOrientation:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1204"
+            endingLineNumber = "1204"
+            landmarkName = "-pageViewController:spineLocationForInterfaceOrientation:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527671221.017354"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "58"
+            endingLineNumber = "58"
+            landmarkName = "-onLeftButtonClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527671224.714185"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "83"
+            endingLineNumber = "83"
+            landmarkName = "-onRightButtonClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1182"
+            endingLineNumber = "1182"
+            landmarkName = "-pageViewController:didFinishAnimating:previousViewControllers:transitionCompleted:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "527738967.412655"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "659"
+            endingLineNumber = "659"
+            landmarkName = "-addDatePicker:destView:index:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/PageViewController.m"
+            timestampString = "527739106.098874"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "67"
+            endingLineNumber = "67"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "236"
+            endingLineNumber = "236"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739843.652316"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "174"
+            endingLineNumber = "174"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527739915.723977"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "156"
+            endingLineNumber = "156"
+            landmarkName = "-templateInit:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/DocumentPageViewController.m"
+            timestampString = "527740033.121859"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "159"
+            endingLineNumber = "159"
+            landmarkName = "-templateInit:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/ACNetwork.m"
+            timestampString = "527747304.381651"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "363"
+            endingLineNumber = "363"
+            landmarkName = "+parse_authinfo:user:password:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/ACNetwork.m"
+            timestampString = "527747304.381651"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "361"
+            endingLineNumber = "361"
+            landmarkName = "+parse_authinfo:user:password:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 24 - 2
Ants Contract/AntsContract/AntsContract/Base.lproj/Main.storyboard

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="UmP-Fl-ZUI">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="UmP-Fl-ZUI">
     <device id="ipad9_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -222,6 +222,24 @@
                     <view key="view" contentMode="scaleToFill" id="L77-lK-1UM">
                         <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+                        <subviews>
+                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Tr0-iT-sQU">
+                                <rect key="frame" x="20" y="472" width="80" height="80"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Button" image="left_arrow"/>
+                                <connections>
+                                    <action selector="onLeftButtonClick:" destination="UPd-uT-cg4" eventType="touchUpInside" id="UGJ-8q-AeC"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="GGe-bl-kzR">
+                                <rect key="frame" x="668" y="472" width="80" height="80"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Button" image="right_arrow"/>
+                                <connections>
+                                    <action selector="onRightButtonClick:" destination="UPd-uT-cg4" eventType="touchUpInside" id="uDO-s6-KwL"/>
+                                </connections>
+                            </button>
+                        </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                     </view>
                     <navigationItem key="navigationItem" title="Title" id="ToF-qy-nGL">
@@ -239,6 +257,8 @@
                     <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
                     <connections>
                         <outlet property="ibSave" destination="HzA-Fa-ToQ" id="dtM-YE-NrB"/>
+                        <outlet property="left_button" destination="Tr0-iT-sQU" id="IsS-dh-Kfm"/>
+                        <outlet property="right_button" destination="GGe-bl-kzR" id="MHg-co-UbA"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="8TC-Iz-v3r" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -1146,8 +1166,10 @@
         <image name="file_icon" width="20" height="20"/>
         <image name="home_bg_icon" width="188" height="77"/>
         <image name="home_bg_p" width="768" height="1024"/>
+        <image name="left_arrow" width="80" height="80"/>
         <image name="note_icon" width="20" height="20"/>
         <image name="picture_icon" width="20" height="20"/>
+        <image name="right_arrow" width="80" height="80"/>
     </resources>
     <simulatedMetricsContainer key="defaultSimulatedMetrics">
         <simulatedStatusBarMetrics key="statusBar"/>

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

@@ -0,0 +1,1182 @@
+{
+    "count": 5,
+    "signature_name": [
+                       "Customer Initial",
+                       "Decision Maker",
+                       "Agent Of Contractor",
+                       "Homeowner",
+                       "Homeowner Print Name",
+                       "Date"
+                       ],
+    "page_0": {
+        "count": 22,
+        "control_0": {
+            "aname": "Sales Person",
+            "type": "TextView",
+            "margin_left": "4",
+            "margin_top": "1",
+            "tv_vmargin": 0.4,
+            "size": "12",
+            "required": false,
+            "pos_x": 205,
+            "pos_y": 19,
+            "width": 200,
+            "height": 14,
+            "field": "sales_person",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Invoice Number",
+            "type": "TextView",
+            "margin_left": "4",
+            "margin_top": "1",
+            "tv_vmargin": 0.4,
+            "size": "12",
+            "required": false,
+            "pos_x": 180,
+            "pos_y": 33,
+            "width": 225,
+            "height": 14,
+            "field": "invoice_number",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Customer Name",
+            "type": "TextView",
+            "margin_left": "4",
+            "size": "12",
+            "margin_top": "1",
+            "tv_vmargin": 0.6,
+            "required": true,
+            "pos_x": 216,
+            "pos_y": 238,
+            "width": 169,
+            "height": 30,
+            "field": "customer_name",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Job Date",
+            "type": "DatePicker",
+            "margin_left": "4",
+            "required": false,
+            "size": "12",
+            "pos_x": 462,
+            "pos_y": 238,
+            "width": 182,
+            "height": 30,
+            "field": "job_date",
+            "value": ""
+        },
+        "control_4": {
+            "aname": "Jobsite Address",
+            "type": "TextView",
+            "margin_left": "1",
+            "required": true,
+            "tv_vmargin": 0,
+            "margin_top": "3",
+            "size": "12",
+            "pos_x": 248,
+            "pos_y": 270,
+            "width": 397,
+            "height": 45,
+            "field": "job_addr",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Jobsite City",
+            "type": "TextView",
+            "margin_left": "1",
+            "required": true,
+            "margin_top": "-1",
+            "tv_vmargin": 0.3,
+            "size": "12",
+            "pos_x": 248,
+            "pos_y": 317,
+            "width": 137,
+            "height": 15,
+            "field": "job_city",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Jobsite State",
+            "type": "TextView",
+            "margin_left": "1",
+            "required": true,
+            "size": "12",
+            "tv_vmargin": 0.3,
+            "margin_top": "-1",
+            "capital": "charater",
+            "pos_x": 424,
+            "pos_y": 317,
+            "width": 115,
+            "height": 15,
+            "field": "job_state",
+            "value": "CA"
+        },
+        "control_7": {
+            "aname": "Jobsite Zipcode",
+            "margin_top": "-1",
+            "type": "TextView",
+            "margin_left": "1",
+            "required": true,
+            "tv_vmargin": 0.3,
+            "size": "12",
+            "pos_x": 562,
+            "pos_y": 317,
+            "width": 74,
+            "height": 15,
+            "field": "job_zip",
+            "value": ""
+        },
+        "control_8": {
+            "aname": "Telephone",
+            "format": "us_tel",
+            "size": "12",
+            "keyboard": "tel",
+            "type": "TextView",
+            "margin_left": "4",
+            "required": true,
+            "pos_x": 215,
+            "pos_y": 336,
+            "width": 170,
+            "height": 30,
+            "field": "tel",
+            "value": ""
+        },
+        "control_9": {
+            "aname": "Today's Date",
+            "margin_left": "4",
+            "type": "DatePicker",
+            "required": true,
+            "size": "12",
+            "pos_x": 463,
+            "pos_y": 336,
+            "width": 180,
+            "height": 30,
+            "field": "today_date",
+            "value": ""
+        },
+        "control_10": {
+            "aname": "Contract Price",
+            "type": "TextView",
+            "margin_left": "4",
+            "required": true,
+            "size": "12",
+            "pos_x": 215,
+            "pos_y": 368,
+            "width": 170,
+            "keyboard": "number",
+            "value_type": "float",
+            "height": 30,
+            "format": "price",
+            "prefix_str": "$ ",
+            "field": "contract_price",
+            "action": {
+                "set_val": {
+                    "condition": "true",
+                    "count": 2,
+                    "item_0": {
+                        "control": "control_11",
+                        "value": "*0.1"
+                    },
+                    "item_1": {
+                        "control": "control_12",
+                        "value": "*0.9"
+                    }
+                }
+            },
+            "value": ""
+        },
+        "control_11": {
+            "aname": "Labor Deposit",
+            "type": "TextView",
+            "margin_left": "4",
+            "required": true,
+            "pos_x": 463,
+            "pos_y": 368,
+            "width": 88,
+            "size": "10",
+            "height": 30,
+            "keyboard": "number",
+            "field": "labor_deposit",
+            "value_type": "float",
+            "format": "price",
+            "prefix_str": "$ ",
+            "disable": true,
+            "action": {
+                "set_val": {
+                    "condition": "true",
+                    "count": 1,
+                    "item_0": {
+                        "control": "control_12",
+                        "value": "control_6-control_7"
+                    }
+                }
+            },
+            "value": ""
+        },
+        "control_19": {
+            "type": "Check",
+            "required": true,
+            "pos_x": 565,
+            "pos_y": 374,
+            "width": 40,
+            "height": 20,
+            "field": "deposit_percent",
+            "title": "team button",
+            "single_select": true,
+            "show_detail": false,
+            "size": "10",
+            "cadedate": [
+                         [
+                          [
+                           "10%"
+                           ],
+                          [],
+                          {
+                          "memo": "action",
+                          "disable": [
+                                      "control_11"
+                                      ],
+                          "set_val": {
+                          "condition": "true",
+                          "count": 2,
+                          "item_0": {
+                          "control": "control_11",
+                          "value": "*0.1"
+                          },
+                          "item_1": {
+                          "control": "control_12",
+                          "value": "*0.9"
+                          }
+                          }
+                          }
+                          ],
+                         [
+                          [
+                           "Other"
+                           ],
+                          [],
+                          {
+                          "memo": "action",
+                          "enable": [
+                                     "control_11"
+                                     ]
+                          }
+                          ]
+                         ],
+            "value": [
+                      0
+                      ]
+        },
+        "control_12": {
+            "aname": "Balance on Account",
+            "type": "TextView",
+            "margin_left": "4",
+            "required": true,
+            "size": "12",
+            "prefix_str": "$ ",
+            "value_type": "float",
+            "pos_x": 215,
+            "pos_y": 401,
+            "width": 170,
+            "height": 40,
+            "field": "balance",
+            "disable": true,
+            "value": ""
+        },
+        "control_13": {
+            "aname": "Service",
+            "type": "Check",
+            "required": true,
+            "pos_x": 122,
+            "pos_y": 556,
+            "width": 522,
+            "height": 70,
+            "field": "service",
+            "title": "service button",
+            "single_select": false,
+            "show_detail": false,
+            "marker_size": 6,
+            "cadedate": [
+                         [
+                          [
+                           "Installation of Cabinetry.",
+                           ""
+                           ],
+                          [
+                           133,
+                           562
+                           ]
+                          ],
+                         [
+                          [
+                           "Installation of Granite, Marble or Quartz Countertop(s).",
+                           ""
+                           ],
+                          [
+                           133,
+                           574
+                           ]
+                          ],
+                         [
+                          [
+                           "Installation of Plywood.",
+                           ""
+                           ],
+                          [
+                           133,
+                           586
+                           ]
+                          ],
+                         [
+                          [
+                           "Demolition Work.",
+                           ""
+                           ],
+                          [
+                           133,
+                           598
+                           ],
+                          {
+                          "memo": "action",
+                          "conditional_constraint": {
+                          "true": {
+                          "count": 8,
+                          "item_0": {
+                          "page": "3",
+                          "control": "control_0",
+                          "disable": "false",
+                          "set_val": ""
+                          },
+                          "item_1": {
+                          "page": "3",
+                          "control": "control_1",
+                          "disable": "false",
+                          "set_val": ""
+                          },
+                          "item_2": {
+                          "page": "3",
+                          "control": "control_2",
+                          "disable": "false",
+                          "set_val": ""
+                          },
+                          "item_3": {
+                          "page": "3",
+                          "control": "control_3",
+                          "disable": "false",
+                          "set_val": ""
+                          },
+                          "item_4": {
+                          "page": "3",
+                          "control": "control_4",
+                          "disable": "false",
+                          "set_val": ""
+                          },
+                          "item_5": {
+                          "page": "3",
+                          "control": "control_5",
+                          "disable": "false",
+                          "set_val": ""
+                          },
+                          "item_6": {
+                          "page": "3",
+                          "control": "control_6",
+                          "disable": "false",
+                          "set_val": ""
+                          },
+                          "item_7": {
+                          "page": "3",
+                          "control": "control_7",
+                          "disable": "false",
+                          "set_val": ""
+                          }
+                          },
+                          "false": {
+                          "count": 8,
+                          "item_0": {
+                          "page": "3",
+                          "control": "control_0",
+                          "disable": "true",
+                          "set_val": ""
+                          },
+                          "item_1": {
+                          "page": "3",
+                          "control": "control_1",
+                          "disable": "true",
+                          "set_val": ""
+                          },
+                          "item_2": {
+                          "page": "3",
+                          "control": "control_2",
+                          "disable": "true",
+                          "set_val": ""
+                          },
+                          "item_3": {
+                          "page": "3",
+                          "control": "control_3",
+                          "disable": "true",
+                          "set_val": ""
+                          },
+                          "item_4": {
+                          "page": "3",
+                          "control": "control_4",
+                          "disable": "true",
+                          "set_val": ""
+                          },
+                          "item_5": {
+                          "page": "3",
+                          "control": "control_5",
+                          "disable": "true",
+                          "set_val": ""
+                          },
+                          "item_6": {
+                          "page": "3",
+                          "control": "control_6",
+                          "disable": "true",
+                          "set_val": "NA"
+                          },
+                          "item_7": {
+                          "page": "3",
+                          "control": "control_7",
+                          "disable": "true",
+                          "set_val": "NA"
+                          }
+                          }
+                          }
+                          }
+                          ],
+                         [
+                          [
+                           "Other / Include Description:",
+                           ""
+                           ],
+                          [
+                           133,
+                           610
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_14": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 698,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_15": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 735,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_16": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 784,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_17": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 800,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_18": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 846,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_21": {
+            "type": "Label",
+            "textAlignment": "center",
+            "required": true,
+            "pos_x": 523,
+            "pos_y": 917,
+            "width": 104,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_20": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_1": {
+        "count": 22,
+        "control_21": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 69,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_0": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 117,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Decision Maker",
+            "type": "TextView",
+            "margin_left": "4",
+            "margin_top": "1",
+            "tv_vmargin": 0.6,
+            "size": "12",
+            "required": true,
+            "pos_x": 230,
+            "pos_y": 125,
+            "width": 200,
+            "height": 20,
+            "field": "decision_maker",
+            "name": "Decision Maker",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 185,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 205,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_4": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 232,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 269,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 317,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_7": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 344,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_8": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 370,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_20": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 407,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_9": {
+            "aname": "Joint Seams Option",
+            "type": "Check",
+            "required": true,
+            "pos_x": 135,
+            "pos_y": 501,
+            "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,
+                           514
+                           ]
+                          ],
+                         [
+                          [
+                           "OPTION B",
+                           "Polished joint seams, which the Undersigned understands that color dullness or shade variation may occur."
+                           ],
+                          [
+                           149,
+                           526
+                           ]
+                          ],
+                         [
+                          [
+                           "OPTION C",
+                           "The Decision Maker will determine on-site with the assistance of the Contractor."
+                           ],
+                          [
+                           149,
+                           537
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_10": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 445,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_11": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 471,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_12": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 533,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_13": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 570,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_14": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 629,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_15": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 646,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_16": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 662,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_19": {
+            "type": "Label",
+            "textAlignment": "center",
+            "required": true,
+            "pos_x": 523,
+            "pos_y": 917,
+            "width": 104,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_18": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_2": {
+        "count": 10,
+        "control_0": {
+            "aname": "Agent Signature",
+            "linewidth": 8,
+            "type": "Signature",
+            "required": true,
+            "required_validation": true,
+            "validation_code": "1111",
+            "pos_x": 163,
+            "pos_y": 791,
+            "width": 146,
+            "height": 24,
+            "name": "Agent Of Contractor",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Homeowner Signature",
+            "linewidth": 8,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 405,
+            "pos_y": 791,
+            "width": 146,
+            "height": 24,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Agent Name",
+            "type": "TextView",
+            "textAlignment": "center",
+            "margin_top": "2",
+            "size": "10",
+            "tv_vmargin": 0.3,
+            "required": true,
+            "pos_x": 194,
+            "pos_y": 838,
+            "width": 160,
+            "height": 14,
+            "field": "agent_name",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Print Name",
+            "tv_vmargin": 0.3,
+            "type": "TextView",
+            "textAlignment": "center",
+            "margin_top": "2",
+            "size": "10",
+            "required": true,
+            "pos_x": 472,
+            "pos_y": 838,
+            "width": 165,
+            "height": 14,
+            "field": "customer_name_1",
+            "value": ""
+        },
+        "control_4": {
+            "type": "Ignor",
+            "required": false,
+            "pos_x": 194,
+            "pos_y": 854,
+            "width": 160,
+            "height": 14,
+            "field": "signor_name",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Homeowner Name",
+            "tv_vmargin": 0.3,
+            "type": "TextView",
+            "textAlignment": "center",
+            "required": true,
+            "size": "10",
+            "pos_x": 472,
+            "pos_y": 854,
+            "width": 165,
+            "height": 14,
+            "field": "owner_name",
+            "margin_top": "2",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Telephone Number",
+            "tv_vmargin": 0.3,
+            "format": "us_tel",
+            "keyboard": "tel",
+            "type": "TextView",
+            "textAlignment": "center",
+            "size": "10",
+            "margin_top": "2",
+            "required": true,
+            "pos_x": 472,
+            "pos_y": 869,
+            "width": 165,
+            "height": 14,
+            "field": "tel1",
+            "value": ""
+        },
+        "control_9": {
+            "type": "Label",
+            "textAlignment": "center",
+            "required": true,
+            "pos_x": 523,
+            "pos_y": 917,
+            "width": 104,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_8": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_3": {
+        "count": 10,
+        "control_0": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "disable":true,
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 669,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "disable":true,
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 685,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "disable":true,
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 712,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_3": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "disable":true,
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 749,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_4": {
+            "aname": "Initial",
+            "linewidth": 8,
+            "can_fill": "true",
+            "type": "Signature",
+            "disable":true,
+            "required": true,
+            "pos_x": 616,
+            "pos_y": 787,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": ""
+        },
+        "control_5": {
+            "aname": "Homeowner Signature",
+            "linewidth": 8,
+            "type": "Signature",
+            "disable":true,
+            "required": true,
+            "pos_x": 150,
+            "pos_y": 833,
+            "width": 146,
+            "height": 24,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_6": {
+            "aname": "Demolition Print name",
+            "type": "TextView",
+            "margin_left": "4",
+            "margin_top": "1",
+            "required": true,
+            "disable":true,
+            "pos_x": 345,
+            "pos_y": 833,
+            "width": 195,
+            "height": 24,
+            "field": "demolition_printname",
+            "value": "NA"
+        },
+        "control_7": {
+            "aname": "Demolition Date",
+            "type": "DatePicker",
+            "margin_left": "4",
+            "margin_top": "1",
+            "required": true,
+            "disable":true,
+            "pos_x": 560,
+            "pos_y": 833,
+            "width": 66,
+            "height": 24,
+            "field": "demolition_date",
+            "value": "NA"
+        },
+        "control_9": {
+            "type": "Label",
+            "textAlignment": "center",
+            "required": true,
+            "pos_x": 523,
+            "pos_y": 917,
+            "width": 104,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_8": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    },
+    "page_4": {
+        "count": 5,
+        "control_0": {
+            "aname": "Homeowner Signature",
+            "linewidth": 8,
+            "type": "Signature",
+            "required": true,
+            "pos_x": 127,
+            "pos_y": 553,
+            "width": 146,
+            "height": 24,
+            "name": "Homeowner",
+            "value": ""
+        },
+        "control_1": {
+            "aname": "Handwrite Print Name",
+            "linewidth": 5,
+            "type": "TextView",
+            "required": true,
+            "pos_x": 326,
+            "pos_y": 553,
+            "width": 148,
+            "height": 24,
+            "name": "Homeowner Print Name",
+            "field": "homeowner_printname"
+            "value": ""
+        },
+        "control_2": {
+            "aname": "Handwrite date",
+            "linewidth": 5,
+            "type": "DatePicker",
+            "required": true,
+            "pos_x": 552,
+            "pos_y": 553,
+            "width": 60,
+            "height": 24,
+            "name": "Date",
+            "field": "subcontractors_date"
+            "value": ""
+        },
+        "control_3": {
+            "type": "Label",
+            "textAlignment": "center",
+            "required": true,
+            "pos_x": 523,
+            "pos_y": 917,
+            "width": 104,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": ""
+        },
+        "control_4": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": ""
+        }
+    }
+}

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


+ 8 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj

@@ -71,6 +71,8 @@
 		71B152EF1E66C87F00D2E5EC /* AddExtDocumentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B152EE1E66C87F00D2E5EC /* AddExtDocumentViewController.m */; };
 		71BBFC371E6419D4008668A7 /* ExtDocumentsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BBFC361E6419D4008668A7 /* ExtDocumentsViewController.m */; };
 		71BBFC3A1E651CC4008668A7 /* DocnotesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BBFC391E651CC4008668A7 /* DocnotesViewController.m */; };
+		71D5734D1F7220FE008179ED /* GEIC - Home Improvement Contract 2017 Desktop.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 71D5734C1F7220FE008179ED /* GEIC - Home Improvement Contract 2017 Desktop.pdf */; };
+		71D5734F1F723260008179ED /* GEIC - Home Improvement Contract 2017 Desktop.json in Resources */ = {isa = PBXBuildFile; fileRef = 71D5734E1F723260008179ED /* GEIC - Home Improvement Contract 2017 Desktop.json */; };
 		71F8D0341EC057A2002003DB /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F8D0331EC057A2002003DB /* RANetworkTaskDelegate.m */; };
 		71F8D0E41EC4066D002003DB /* GEIC - Home Improvement Contract 2017 Update_2.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 71F8D0E31EC4066D002003DB /* GEIC - Home Improvement Contract 2017 Update_2.pdf */; };
 /* End PBXBuildFile section */
@@ -198,6 +200,8 @@
 		71BBFC361E6419D4008668A7 /* ExtDocumentsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExtDocumentsViewController.m; path = ../../common/ExtDocumentsViewController.m; sourceTree = "<group>"; };
 		71BBFC381E651CC4008668A7 /* DocnotesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocnotesViewController.h; path = ../../common/DocnotesViewController.h; sourceTree = "<group>"; };
 		71BBFC391E651CC4008668A7 /* DocnotesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DocnotesViewController.m; path = ../../common/DocnotesViewController.m; sourceTree = "<group>"; };
+		71D5734C1F7220FE008179ED /* GEIC - Home Improvement Contract 2017 Desktop.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "GEIC - Home Improvement Contract 2017 Desktop.pdf"; sourceTree = "<group>"; };
+		71D5734E1F723260008179ED /* GEIC - Home Improvement Contract 2017 Desktop.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "GEIC - Home Improvement Contract 2017 Desktop.json"; sourceTree = "<group>"; };
 		71F8D0321EC057A2002003DB /* RANetworkTaskDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RANetworkTaskDelegate.h; path = ../../../common/upload/RANetworkTaskDelegate.h; sourceTree = "<group>"; };
 		71F8D0331EC057A2002003DB /* RANetworkTaskDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RANetworkTaskDelegate.m; path = ../../../common/upload/RANetworkTaskDelegate.m; sourceTree = "<group>"; };
 		71F8D0E31EC4066D002003DB /* GEIC - Home Improvement Contract 2017 Update_2.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "GEIC - Home Improvement Contract 2017 Update_2.pdf"; sourceTree = "<group>"; };
@@ -430,8 +434,10 @@
 			isa = PBXGroup;
 			children = (
 				7188C2881E8E435500938FFC /* GEIC - Home Improvement Contract 2017 Update.json */,
+				71D5734E1F723260008179ED /* GEIC - Home Improvement Contract 2017 Desktop.json */,
 				714B870A1E24CAE200A40D18 /* debug.json */,
 				71F8D0E31EC4066D002003DB /* GEIC - Home Improvement Contract 2017 Update_2.pdf */,
+				71D5734C1F7220FE008179ED /* GEIC - Home Improvement Contract 2017 Desktop.pdf */,
 			);
 			name = "pdf resource";
 			sourceTree = "<group>";
@@ -517,7 +523,9 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				71D5734F1F723260008179ED /* GEIC - Home Improvement Contract 2017 Desktop.json in Resources */,
 				7128C24B1E124F4500FF635B /* Assets.xcassets in Resources */,
+				71D5734D1F7220FE008179ED /* GEIC - Home Improvement Contract 2017 Desktop.pdf in Resources */,
 				7128C26F1E124FF200FF635B /* Main.storyboard in Resources */,
 				7128C2701E124FF200FF635B /* LaunchScreen.storyboard in Resources */,
 				7188C2891E8E435500938FFC /* GEIC - Home Improvement Contract 2017 Update.json in Resources */,

+ 23 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "jiantou(1).png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "jiantou(1)@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "jiantou(1)@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/jiantou(1).png


BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/jiantou(1)@2x.png


BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/combo_24.imageset/jiantou(1)@3x.png


+ 23 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "zuo(3).png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "zuo(3)@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "zuo(3)@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/zuo(3).png


BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/zuo(3)@2x.png


BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/left_arrow.imageset/zuo(3)@3x.png


+ 23 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "appicon.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "appicon-1.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "appicon-2.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/appicon-1.png


BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/appicon-2.png


BIN
Ants Contract/Granite Expo eSign/Granite Expo eSign/Assets.xcassets/right_arrow.imageset/appicon.png


+ 34 - 8
Ants Contract/common/ACNetwork.m

@@ -345,13 +345,36 @@
         NSString* offPrefix = jsobj[@"randcode"];
         bool canModify = [jsobj[@"can_modify"] boolValue];
         
+        
+        
+        NSString* agentName = jsobj[@"agent_name"];
         NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
-        if(offPrefix!=nil)
-        {
-            [defaults setValue:offPrefix forKey:user];
-            [defaults synchronize];
-            
-        }
+        
+        
+       
+
+        
+        NSMutableDictionary* user_info = [NSMutableDictionary new];
+        user_info[@"prefix"]=offPrefix;
+        user_info[@"agent_name"]= agentName;
+        
+
+        
+        [defaults setObject:user_info forKey:user];
+//        if(offPrefix!=nil)
+//        {
+//            [defaults setValue:offPrefix forKey:user];
+//            
+//            
+//        }
+//        if(agentName!=nil)
+//        {
+//            [defaults setValue:agentName forKey:@"agent_name"];
+//            
+//            
+//        }
+        
+        [defaults synchronize];
 //        NSDictionary* objheader = [jsobj objectForKey:@"header"];
 //        
 //        NSString* required_ver=[jsobj objectForKey:@"min_ver"] ;
@@ -381,7 +404,7 @@
 //        appDelegate.bLogin = true;
         
         
-        [appDelegate Login:user pwd:password canModify:canModify offPrefix:offPrefix];
+        [appDelegate Login:user pwd:password canModify:canModify offPrefix:offPrefix agentName:agentName];
         
         
 //        
@@ -789,7 +812,10 @@
     
     NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
     
-    NSString* prefix = [defaults stringForKey:appDelegate.user];
+    NSDictionary* user_info = [defaults dictionaryForKey:appDelegate.user];
+    NSString* prefix=user_info[@"prefix"];
+    NSString* agentname=user_info[@"agent_name"];
+    appDelegate.agentName = agentname;
     if(prefix==nil)
         return nil;
     long docint=[defaults integerForKey:prefix];

+ 2 - 1
Ants Contract/common/AppDelegate.h

@@ -26,8 +26,9 @@ typedef NS_ENUM(NSInteger, AppAccessMode) {
 @property (strong,nonatomic) NSString* user;
 @property (strong,nonatomic) NSString * password;
 @property (strong,nonatomic) NSString* build;
+@property (strong,nonatomic) NSString* agentName;
 -(void) Logout;
--(void) Login:(NSString* )user pwd:(NSString*) pwd canModify:(bool) canModify offPrefix:(NSString*) offPrefix;
+-(void) Login:(NSString* )user pwd:(NSString*) pwd canModify:(bool) canModify offPrefix:(NSString*) offPrefix agentName:(NSString*) name;
 @property (strong,nonatomic) NSString* printerURL;
 @property (strong,nonatomic) NSMutableDictionary* shareFile;
 @property (assign) AppAccessMode accessMode;

+ 2 - 1
Ants Contract/common/AppDelegate.m

@@ -312,7 +312,7 @@
 - (void)applicationWillTerminate:(UIApplication *)application {
     // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
 }
--(void) Login:(NSString* )user pwd:(NSString*) pwd canModify:(bool) canModify offPrefix:(NSString*) offPrefix
+-(void) Login:(NSString* )user pwd:(NSString*) pwd canModify:(bool) canModify offPrefix:(NSString*) offPrefix agentName:(NSString*) name
 {
  //   self.bCanModify = canModify;
 //    self.offPrefix = offPrefix;
@@ -320,6 +320,7 @@
     self.password = pwd;
     self.bLogin = true;
     self.accessMode = AppAccessModeOnline;
+    self.agentName = name;
     // 延迟1s启动心跳,以避免在登录框还在Dismiss动画过程中再次调用Dismiss
     __weak typeof(self) weakself = self;
     dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC);

+ 2 - 0
Ants Contract/common/DocumentPageViewController.h

@@ -17,6 +17,8 @@ typedef NS_ENUM(NSInteger, PDFEditAction) {
 
 
 @interface DocumentPageViewController : UIViewController <UIPageViewControllerDelegate , UIPageViewControllerDataSource>
+@property (weak, nonatomic) IBOutlet UIButton *left_button;
+@property (weak, nonatomic) IBOutlet UIButton *right_button;
 
 @property (strong, nonatomic) UIPageViewController *pageViewController;
 @property (strong, nonatomic) NSMutableDictionary * controlTemplate;

+ 118 - 9
Ants Contract/common/DocumentPageViewController.m

@@ -31,12 +31,69 @@
 #import "RectDrawable.h"
 
 
+
+
 @interface DocumentPageViewController ()
 
 @end
 
 @implementation DocumentPageViewController
 
+
+
+- (IBAction)onLeftButtonClick:(id)sender {
+    
+    
+//    - (NSUInteger) indexOfViewController:(PageViewController *)viewController
+    
+    UIViewController* pvc = [self pageViewController:self.pageViewController viewControllerBeforeViewController:self.pageViewController.viewControllers[0]];
+    
+    if(pvc==nil)
+        return;
+
+
+        __weak typeof(self) weakSelf = self;
+    [self.pageViewController setViewControllers:@[pvc] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:^(BOOL finished){
+        
+        long index=[weakSelf indexOfViewController:(PageViewController*)pvc];
+        if(index==0)
+            weakSelf.left_button.hidden=true;
+        else
+            weakSelf.left_button.hidden=false;
+        
+        if(index==weakSelf.total_page-1)
+            weakSelf.right_button.hidden=true;
+        else
+            weakSelf.right_button.hidden=false;
+    }];
+    
+//    self.pageViewController
+}
+- (IBAction)onRightButtonClick:(id)sender {
+    
+    UIViewController* pvc = [self pageViewController:self.pageViewController viewControllerAfterViewController:self.pageViewController.viewControllers[0]];
+    
+    if(pvc==nil)
+        return;
+    
+    
+    __weak typeof(self) weakSelf = self;
+    [self.pageViewController setViewControllers:@[pvc] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:^(BOOL finished){
+        
+        long index=[weakSelf indexOfViewController:(PageViewController*)pvc];
+        if(index==0)
+            weakSelf.left_button.hidden=true;
+        else
+            weakSelf.left_button.hidden=false;
+        
+        if(index==weakSelf.total_page-1)
+            weakSelf.right_button.hidden=true;
+        else
+            weakSelf.right_button.hidden=false;
+    }];
+
+}
+
 -(NSMutableDictionary*) templateInit:(NSMutableDictionary*) template
 {
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -44,7 +101,9 @@
     NSString* temp = NSTemporaryDirectory();
     NSString* filename =[NSString stringWithFormat:@"%@.png", [[NSUUID UUID] UUIDString]];
     NSString* qrpath=[temp stringByAppendingPathComponent:filename];
-    UIImage* qrimg=[RAUtils generateBarCode:self.docment_id width:300 height:44];//[QRCodeGenerator qrImageForString:order_code imageSize:240];
+    UIImage* qrimg=[ImageUtils generateBarCode:self.docment_id width:300 height:44];//[QRCodeGenerator qrImageForString:order_code imageSize:240];
+    
+
     bool bwrite=[UIImagePNGRepresentation(qrimg)writeToFile: qrpath    atomically:YES];
     
     
@@ -78,7 +137,7 @@
             else if([type isEqualToString:@"DatePicker"])
             {
                 NSString* name =control[@"aname"];
-                if([name isEqualToString:@"Today's Date"])
+                if([name isEqualToString:@"Today's Date"]||[name isEqualToString:@"Handwrite date"])
                 {
                     NSDateFormatter * formatter = [[NSDateFormatter alloc]init];
                     [formatter setDateFormat:@"MM/dd/yyyy"];
@@ -91,6 +150,17 @@
             {
                 control[@"value"]= appDelegate.na_path;
 
+            }
+            else if([type isEqualToString:@"TextView"])
+            {
+                NSString* name =control[@"aname"];
+                if([name isEqualToString:@"Agent Name"]||[name isEqualToString:@"Sales Person"])
+                {
+                    control[@"value"]= appDelegate.agentName;
+                }
+                
+                
+                
             }
         }
     }
@@ -138,6 +208,9 @@
     
     //    PageViewController *startingViewController = [self viewControllerAtIndex:0 storyboard:self.storyboard];
     NSArray *viewControllers = @[startingViewController];
+    
+    
+
     [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
     
     self.pageViewController.dataSource = self;
@@ -154,7 +227,14 @@
     
     [self.pageViewController didMoveToParentViewController:self];
     
-    // Do any additional setup after loading the view.
+    self.left_button.hidden=true;
+
+    self.right_button.hidden=false;
+    
+    
+    [self.view bringSubviewToFront:self.left_button];
+    [self.view bringSubviewToFront:self.right_button];
+        // Do any additional setup after loading the view.
 }
 -(void) dealloc
 {
@@ -1059,11 +1139,8 @@
     return ret;
 }
 
-//#pragma mark - Page View Controller Data Source
-- (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray<UIViewController *> *)previousViewControllers transitionCompleted:(BOOL)completed
-{
-//        self.title = [NSString stringWithFormat:@"%@ [%ld/%ld]", self.docment_id,((PageViewController*)self.pageViewController.viewControllers[0]).pageIndex+1, self.total_page ];
-}
+#pragma mark - Page View Controller Data Source
+
 
 - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
 {
@@ -1096,13 +1173,45 @@
 
 
 #pragma mark - UIPageViewController delegate methods
+- (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray<UIViewController *> *)previousViewControllers transitionCompleted:(BOOL)completed
+{
+    NSLog(@"didFinishAnimating");
+    
+    
+    
+    long index=[self indexOfViewController:pageViewController.viewControllers[0]];
+    if(index==0)
+        self.left_button.hidden=true;
+    else
+        self.left_button.hidden=false;
+    
+    if(index==self.total_page-1)
+        self.right_button.hidden=true;
+    else
+        self.right_button.hidden=false;
+    //        self.title = [NSString stringWithFormat:@"%@ [%ld/%ld]", self.docment_id,((PageViewController*)self.pageViewController.viewControllers[0]).pageIndex+1, self.total_page ];
+}
 - (UIPageViewControllerSpineLocation)pageViewController:(UIPageViewController *)pageViewController spineLocationForInterfaceOrientation:(UIInterfaceOrientation)orientation {
     if (true||UIInterfaceOrientationIsPortrait(orientation) || ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)) {
         // In portrait orientation or on iPhone: Set the spine position to "min" and the page view controller's view controllers array to contain just one view controller. Setting the spine position to 'UIPageViewControllerSpineLocationMid' in landscape orientation sets the doubleSided property to YES, so set it to NO here.
         
         UIViewController *currentViewController = self.pageViewController.viewControllers[0];
         NSArray *viewControllers = @[currentViewController];
-        [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];
+        
+        __weak typeof(self) weakSelf = self;
+        [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:^(BOOL finished){
+            
+            long index=[weakSelf indexOfViewController:(PageViewController*)currentViewController];
+            if(index==0)
+                weakSelf.left_button.hidden=true;
+            else
+                weakSelf.left_button.hidden=false;
+            
+            if(index==weakSelf.total_page-1)
+                weakSelf.right_button.hidden=true;
+            else
+                weakSelf.right_button.hidden=false;
+        }];
         
         self.pageViewController.doubleSided = NO;
         return UIPageViewControllerSpineLocationMin;

+ 3 - 2
Ants Contract/common/LoginViewController.h

@@ -18,7 +18,7 @@
 @end
 
 
-@interface LoginViewController : UIViewController
+@interface LoginViewController : UIViewController<UITextFieldDelegate>
 @property (strong, nonatomic) IBOutlet UIButton *checkSavePassword;
 
 //@property (strong, nonatomic) IBOutlet UIButton *checkOfflineMode;
@@ -31,7 +31,8 @@
 @property (nonatomic , copy) void (^returnValue)(bool blogin);
 
 @property (strong, nonatomic) IBOutlet UITableView *Loginlist;
-@property (strong, nonatomic)  NSArray *logindata;
+@property (strong, nonatomic)  NSMutableArray *logindata;
+@property (strong, nonatomic)  NSMutableArray *filterlogindata;
 @property bool showList;
 //@property (strong,nonatomic) MyAutocompleteView * autocompleteView;
 @end

+ 97 - 18
Ants Contract/common/LoginViewController.m

@@ -38,6 +38,25 @@
     return self;
 }
 
+
+- (void)searchAutocompleteEntriesWithSubstring:(NSString *)substring {
+    
+    // Put anything that starts with this substring into the autocompleteUrls array
+    // 过滤,剩下符合输入文字的候选
+    [self.filterlogindata removeAllObjects];
+    for(NSString *curString in self.logindata) {
+        NSRange substringRange = [curString rangeOfString:substring];
+        if (substringRange.location == 0) {
+            [self.filterlogindata addObject:curString];
+        }
+    }
+    if(self.filterlogindata.count==0)
+    {
+        self.Loginlist.hidden=true;
+        self.showList = false;
+    }
+    [self.Loginlist reloadData];
+}
 - (void)viewDidLoad
 {
     [super viewDidLoad];
@@ -52,7 +71,7 @@
     [self.checkSavePassword setImage:[UIImage imageNamed:@"checkbox_check"] forState:UIControlStateSelected];
     
     
-    
+    self.filterlogindata = [NSMutableArray new];
     
     NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
     NSString * user = [AESCrypt decrypt:[defaults stringForKey:@"user"] password:@"usai"];
@@ -77,6 +96,9 @@
     
 //    self.logindata = [iSalesDB get_saveduser];
     
+    self.logindata = [[defaults arrayForKey:@"login_data"] mutableCopy];
+    if(self.logindata==nil)
+        self.logindata = [NSMutableArray new];
     
     
     UIButton* combobutton=[[UIButton alloc] initWithFrame:CGRectMake(0, 0, 24, 24)];
@@ -88,16 +110,16 @@
     
     
 //    
-//    self.Loginlist.layer.borderColor = [UIColor lightGrayColor].CGColor;
-//    self.Loginlist.layer.borderWidth = 1.0;
-//    //  self.Loginlist.layer.cornerRadius=15;
-//    self.Loginlist.layer.masksToBounds=true;
+    self.Loginlist.layer.borderColor = [UIColor lightGrayColor].CGColor;
+    self.Loginlist.layer.borderWidth = 1.0;
+    //  self.Loginlist.layer.cornerRadius=15;
+    self.Loginlist.layer.masksToBounds=true;
     // Do any additional setup after loading the view.
 }
 - (void)LoginList:(UIButton *)sender {
     [self.edituser endEditing:true];
     self.showList= !self.showList;
-//    self.Loginlist.hidden = !self.showList;
+    self.Loginlist.hidden = !self.showList;
     //    showList;
 }
 -(void)checkboxClick:(UIButton *)btn
@@ -202,6 +224,20 @@
                 [defaults removeObjectForKey:@"password"];
                 NSString* encryptu=[AESCrypt encrypt:appDelegate.user password:@"usai"];
                 NSString* encryptp=[AESCrypt encrypt:self.editpass.text password:@"usai"] ;
+                
+                
+//                long index =[self.logindata indexOfObject:appDelegate.user];
+                if(![self.logindata containsObject:appDelegate.user])
+                {
+                    [self.logindata addObject:appDelegate.user];
+                    NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:nil ascending:YES];
+                    self.logindata = [[self.logindata sortedArrayUsingDescriptors:[NSArray arrayWithObjects:sortDescriptor,nil]] mutableCopy];
+                }
+                [defaults setObject:self.logindata forKey:@"login_data"];
+                
+                
+                
+                
                 if(self.checkSavePassword.selected)
                 {
                     
@@ -330,7 +366,7 @@
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
-    return self.logindata.count;
+    return self.filterlogindata.count;
     
     
 }
@@ -338,13 +374,13 @@
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
     
-    NSMutableDictionary* up = self.logindata[indexPath.row];
+//    NSMutableDictionary* up = self.logindata[indexPath.row];
     
     
     
     NSString *CellIdentifier = @"LoginListCell";
     UITableViewCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
-    NSString* name=up[@"name"];
+    NSString* name=self.filterlogindata[indexPath.row];//up[@"name"];
     cell.textLabel.text = name;
     return cell;
     
@@ -353,15 +389,41 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    
+    NSString* name=self.filterlogindata[indexPath.row];
 //    NSMutableDictionary* up = self.logindata[indexPath.row];
-//    self.edituser.text = up[@"name"];
-//    self.editpass.text = up[@"pwd"];
-//    
-//    self.showList=false;
-//    self.Loginlist.hidden=true;
-//    self.checkSavePassword.selected=true;
+    self.edituser.text = name;//up[@"name"];
+    
+    
+    
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+    NSString * user = [AESCrypt decrypt:[defaults stringForKey:@"user"] password:@"usai"];
+    if([user isEqualToString:name])
+    {
+        NSString * password = [AESCrypt decrypt:[defaults stringForKey:@"password"] password:@"usai"];
+        
+            self.editpass.text = password;
+    }
+    else
+    {
+        self.editpass.text=nil;
+    }
     
+
+    
+    self.showList=false;
+    self.Loginlist.hidden=true;
+    self.checkSavePassword.selected=true;
+    
+}
+#pragma mark UITextFieldDelegate methods
+//当用户增,删字符的时候,都会调用此方法<br>//
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    self.Loginlist.hidden = NO;
+    
+    NSString *substring = [NSString stringWithString:textField.text];
+    substring = [substring stringByReplacingCharactersInRange:range withString:string];
+    [self searchAutocompleteEntriesWithSubstring:substring];
+    return YES;
 }
 - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
 {
@@ -371,11 +433,28 @@
 - (void)textFieldDidBeginEditing:(UITextField *)textField
 {
     
-    self.showList=false;
+//    self.showList=false;
 //    self.Loginlist.hidden=true;
     
 }
-
+- (void)textFieldDidEndEditing:(UITextField *)textField
+{
+        self.showList=false;
+        self.Loginlist.hidden=true;
+    
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+    NSString * user = [AESCrypt decrypt:[defaults stringForKey:@"user"] password:@"usai"];
+    if([user isEqualToString:self.edituser.text])
+    {
+        NSString * password = [AESCrypt decrypt:[defaults stringForKey:@"password"] password:@"usai"];
+        
+        self.editpass.text = password;
+    }
+    else
+    {
+        self.editpass.text = nil;
+    }
+}
 #pragma mark - action
 
 //- (IBAction)requestLoginBtnClicked:(UIButton *)sender {

+ 6 - 6
Ants Contract/common/RootViewController.m

@@ -279,8 +279,8 @@
         DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
         
         //                dvc.templateName = @"debug.json";
-        dvc.templatePath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Update.json" ofType:nil];
-        dvc.pdfPath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Update_2.pdf" ofType:nil];
+        dvc.templatePath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Desktop.json" ofType:nil];
+        dvc.pdfPath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Desktop.pdf" ofType:nil];
 
         dvc.docment_id =  offline_docnumber;
         dvc.OnSave=^(NSString* file, NSString* subject)
@@ -314,8 +314,8 @@
                     DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
                     
                     //                dvc.templateName = @"debug.json";
-                    dvc.templatePath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Update.json" ofType:nil];
-                    dvc.pdfPath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Update_2.pdf" ofType:nil];                    dvc.docment_id = json[@"doc_number"];
+                    dvc.templatePath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Desktop.json" ofType:nil];
+                    dvc.pdfPath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Desktop.pdf" ofType:nil];                    dvc.docment_id = json[@"doc_number"];
                     dvc.OnSave=^(NSString* file, NSString* subject)
                     {
                         
@@ -342,8 +342,8 @@
                         DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
                         
                         //                dvc.templateName = @"debug.json";
-                        dvc.templatePath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Update.json" ofType:nil];
-                        dvc.pdfPath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Update_2.pdf" ofType:nil];
+                        dvc.templatePath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Desktop.json" ofType:nil];
+                        dvc.pdfPath = [[NSBundle mainBundle] pathForResource:@"GEIC - Home Improvement Contract 2017 Desktop.pdf" ofType:nil];
 
                         dvc.docment_id =  offline_docnumber;
                         dvc.OnSave=^(NSString* file, NSString* subject)