Explorar el Código

1.修改iOS Apex Drivers显示多张照片。
2.修改iOS Apex Drivers拍照预览图片缩小。

Pen Li hace 7 años
padre
commit
986ec69ee0
Se han modificado 52 ficheros con 676 adiciones y 80 borrados
  1. 12 0
      Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj
  2. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo.png
  3. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo@2x.png
  4. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo@3x.png
  5. 23 0
      Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/Contents.json
  6. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/new_flag.png
  7. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/new_flag@2x.png
  8. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/new_flag@3x.png
  9. 2 0
      Redant Drivers/Apex And Drivers/Base.lproj/Localizable.strings
  10. 40 28
      Redant Drivers/Apex And Drivers/Camera/Camera.storyboard
  11. 34 3
      Redant Drivers/Apex And Drivers/Camera/RACameraViewController.m
  12. 2 0
      Redant Drivers/Apex And Drivers/Camera/RATakePhotoPreviewController.h
  13. 26 0
      Redant Drivers/Apex And Drivers/Camera/RATakePhotoPreviewController.m
  14. 6 0
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/Contents.json
  15. 23 0
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/Contents.json
  16. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/btn_photo_assign.png
  17. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/btn_photo_assign@2x.png
  18. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/btn_photo_assign@3x.png
  19. 23 0
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/Contents.json
  20. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/btn_photo_retake.png
  21. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/btn_photo_retake@2x.png
  22. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/btn_photo_retake@3x.png
  23. 23 0
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/Contents.json
  24. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/btn_return.png
  25. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/btn_return@2x.png
  26. BIN
      Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/btn_return@3x.png
  27. 2 1
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailBaseModel.h
  28. 23 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultPhotoModel.h
  29. 71 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultPhotoModel.m
  30. 2 1
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.h
  31. 18 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.m
  32. 29 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m
  33. 5 3
      Redant Drivers/Apex And Drivers/Home/Base.lproj/Home.storyboard
  34. 9 1
      Redant Drivers/Apex And Drivers/Home/RAOrderCell.m
  35. 1 0
      Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.h
  36. 11 5
      Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.m
  37. 16 6
      Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.xib
  38. 5 0
      Redant Drivers/Apex And Drivers/PhotoCell/Layout/RAPhotoLayout.m
  39. 3 0
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoItemModel.h
  40. 36 1
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoItemModel.m
  41. 6 0
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoModel.h
  42. 24 0
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoModel.m
  43. 21 0
      Redant Drivers/Apex And Drivers/PhotoCell/Protocol/RAPhotoCellDelegate.h
  44. 3 1
      Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.h
  45. 22 5
      Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.m
  46. 8 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditMultPhotoModel.h
  47. 8 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditMultPhotoModel.m
  48. 2 1
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.h
  49. 50 10
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.m
  50. 83 14
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.m
  51. 2 0
      Redant Drivers/Apex And Drivers/en.lproj/Localizable.strings
  52. 2 0
      Redant Drivers/Apex And Drivers/zh-Hans.lproj/Localizable.strings

+ 12 - 0
Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj

@@ -136,6 +136,8 @@
 		429A0AD7216CA666004DEF7A /* RASettingLinkCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 429A0AD6216CA666004DEF7A /* RASettingLinkCell.m */; };
 		429A0ADA216CA6A6004DEF7A /* RASettingLinkModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 429A0AD9216CA6A6004DEF7A /* RASettingLinkModel.m */; };
 		429CF61C20E0E32E00CE8DAD /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 429CF61E20E0E32E00CE8DAD /* Localizable.strings */; };
+		42AF41B0218951B0008F9124 /* RADetailMultPhotoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 42AF41AF218951B0008F9124 /* RADetailMultPhotoModel.m */; };
+		42AF41B22189832D008F9124 /* camera.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 42AF41B12189832D008F9124 /* camera.xcassets */; };
 		42C1B2742134F24C00637085 /* RADatePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42C1B2732134F24C00637085 /* RADatePickerViewController.m */; };
 		42C6074C21536E5A003E5379 /* RAExceptionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 42C6074B21536E59003E5379 /* RAExceptionHandler.m */; };
 		42D187802140BACC00C822C0 /* RAEditRequiredAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D1877F2140BACC00C822C0 /* RAEditRequiredAlert.m */; };
@@ -459,6 +461,10 @@
 		429A0AD8216CA6A6004DEF7A /* RASettingLinkModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RASettingLinkModel.h; sourceTree = "<group>"; };
 		429A0AD9216CA6A6004DEF7A /* RASettingLinkModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RASettingLinkModel.m; sourceTree = "<group>"; };
 		429CF61F20E0E35D00CE8DAD /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
+		42AF41AD218935C1008F9124 /* RAPhotoCellDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoCellDelegate.h; sourceTree = "<group>"; };
+		42AF41AE218951B0008F9124 /* RADetailMultPhotoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailMultPhotoModel.h; sourceTree = "<group>"; };
+		42AF41AF218951B0008F9124 /* RADetailMultPhotoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailMultPhotoModel.m; sourceTree = "<group>"; };
+		42AF41B12189832D008F9124 /* camera.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = camera.xcassets; sourceTree = "<group>"; };
 		42C1B2722134F24C00637085 /* RADatePickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADatePickerViewController.h; sourceTree = "<group>"; };
 		42C1B2732134F24C00637085 /* RADatePickerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADatePickerViewController.m; sourceTree = "<group>"; };
 		42C6074A21536E59003E5379 /* RAExceptionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RAExceptionHandler.h; sourceTree = "<group>"; };
@@ -765,6 +771,7 @@
 				424204E020C65817005AEED9 /* RACameraViewController.h */,
 				42F0C5D620E20B3E00922442 /* RACameraViewController.m */,
 				424204E320C65827005AEED9 /* Camera.storyboard */,
+				42AF41B12189832D008F9124 /* camera.xcassets */,
 			);
 			path = Camera;
 			sourceTree = "<group>";
@@ -828,6 +835,7 @@
 			children = (
 				4243C8D621884A7A0019A070 /* RAPhotoModelDelegate.h */,
 				4243C8DB218858570019A070 /* RAPhotoLayoutDelegate.h */,
+				42AF41AD218935C1008F9124 /* RAPhotoCellDelegate.h */,
 			);
 			path = Protocol;
 			sourceTree = "<group>";
@@ -1282,6 +1290,8 @@
 				4235FAA2213E124C000B6672 /* RADetailMapModel.m */,
 				4235FABC213E6512000B6672 /* RADetailSignatureModel.h */,
 				4235FABD213E6512000B6672 /* RADetailSignatureModel.m */,
+				42AF41AE218951B0008F9124 /* RADetailMultPhotoModel.h */,
+				42AF41AF218951B0008F9124 /* RADetailMultPhotoModel.m */,
 				42D8B8C920C24B11001C125F /* Collection */,
 			);
 			path = Model;
@@ -1489,6 +1499,7 @@
 				420D112B2133F98600149B37 /* fake_order_filter.json in Resources */,
 				42DCCC6B2181B0F50027A5BB /* message.storyboard in Resources */,
 				42DCCC5D2181AECF0027A5BB /* HomeHeader.xib in Resources */,
+				42AF41B22189832D008F9124 /* camera.xcassets in Resources */,
 				4235FAAB213E255D000B6672 /* signature.storyboard in Resources */,
 				42DCCC642181AFAD0027A5BB /* setting.storyboard in Resources */,
 				42D8B8A320C2253E001C125F /* fake_order_list.json in Resources */,
@@ -1550,6 +1561,7 @@
 				425B97E520C7BD3800B35713 /* UIView+Toast.m in Sources */,
 				42DFE26A213F821E000213C2 /* RAEmptyView.m in Sources */,
 				42DFE265213F80AF000213C2 /* RAEmptyDataView.m in Sources */,
+				42AF41B0218951B0008F9124 /* RADetailMultPhotoModel.m in Sources */,
 				42529D2B20C0EA0A000C0F4D /* RAUtils.m in Sources */,
 				4281100420E4D47000315156 /* UIScrollView+JLRefresh.m in Sources */,
 				4205FD6620C13BF400DB42B4 /* RAOrderCell.m in Sources */,

BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo@2x.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo@3x.png


+ 23 - 0
Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/Contents.json

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

BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/new_flag.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/new_flag@2x.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/new_flag.imageset/new_flag@3x.png


+ 2 - 0
Redant Drivers/Apex And Drivers/Base.lproj/Localizable.strings

@@ -55,6 +55,8 @@
 "update_upload_failed_tips" = "upload the photos failed,would you like to retry or do it background?";
 "Background" = "Background";
 "Retry" = "Retry";
+"update_success" = "update success";
+"update_photo_success" = "update success,the photos and signatures will upload background,you can find them on upload list.";
 
 /**
  Detail

+ 40 - 28
Redant Drivers/Apex And Drivers/Camera/Camera.storyboard

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
-        <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -36,6 +35,13 @@
                                             <action selector="takePictureBtnClick:" destination="u3G-8E-Sj8" eventType="touchUpInside" id="1LX-1e-klr"/>
                                         </connections>
                                     </button>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mbh-f5-Pjk">
+                                        <rect key="frame" x="10" y="20" width="30" height="30"/>
+                                        <state key="normal" image="btn_return"/>
+                                        <connections>
+                                            <action selector="returnButtonClick:" destination="u3G-8E-Sj8" eventType="touchUpInside" id="HSh-Rt-lSF"/>
+                                        </connections>
+                                    </button>
                                 </subviews>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
@@ -44,15 +50,17 @@
                                 </constraints>
                             </view>
                         </subviews>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <color key="backgroundColor" red="0.76354031735751293" green="0.76354031735751293" blue="0.76354031735751293" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
                             <constraint firstItem="fLT-zm-dh6" firstAttribute="bottom" secondItem="2cM-nE-ueF" secondAttribute="bottom" id="9Y0-7J-sXY"/>
                             <constraint firstItem="fLT-zm-dh6" firstAttribute="trailing" secondItem="aIR-II-sqh" secondAttribute="trailing" id="CZh-X5-9Zr"/>
                             <constraint firstItem="2cM-nE-ueF" firstAttribute="leading" secondItem="fLT-zm-dh6" secondAttribute="leading" id="Igd-YW-xgj"/>
                             <constraint firstItem="fLT-zm-dh6" firstAttribute="bottom" secondItem="aIR-II-sqh" secondAttribute="bottom" id="bSC-7H-ATA"/>
+                            <constraint firstItem="mbh-f5-Pjk" firstAttribute="leading" secondItem="fLT-zm-dh6" secondAttribute="leading" constant="10" id="d8B-Ug-GS1"/>
                             <constraint firstItem="2cM-nE-ueF" firstAttribute="top" secondItem="fLT-zm-dh6" secondAttribute="top" id="fox-Pf-jXw"/>
                             <constraint firstItem="aIR-II-sqh" firstAttribute="top" secondItem="fLT-zm-dh6" secondAttribute="top" id="iNS-Ag-rc8"/>
                             <constraint firstItem="fLT-zm-dh6" firstAttribute="trailing" secondItem="2cM-nE-ueF" secondAttribute="trailing" id="plK-cA-ZV1"/>
+                            <constraint firstItem="mbh-f5-Pjk" firstAttribute="top" secondItem="fLT-zm-dh6" secondAttribute="top" constant="20" id="vud-1w-6K9"/>
                             <constraint firstItem="aIR-II-sqh" firstAttribute="leading" secondItem="fLT-zm-dh6" secondAttribute="leading" id="yWd-lg-8xz"/>
                         </constraints>
                         <viewLayoutGuide key="safeArea" id="fLT-zm-dh6"/>
@@ -79,7 +87,7 @@
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" maximumZoomScale="4" translatesAutoresizingMaskIntoConstraints="NO" id="w4v-z1-b7B">
+                            <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" maximumZoomScale="4" translatesAutoresizingMaskIntoConstraints="NO" id="w4v-z1-b7B">
                                 <rect key="frame" x="0.0" y="20" width="375" height="647"/>
                                 <subviews>
                                     <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Z0q-fB-hKK">
@@ -98,43 +106,42 @@
                                     <outlet property="delegate" destination="hfm-f2-DNT" id="0Kg-98-liP"/>
                                 </connections>
                             </scrollView>
-                            <view alpha="0.44999998807907104" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WfP-Fk-mo9">
+                            <view hidden="YES" alpha="0.44999998807907099" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WfP-Fk-mo9">
                                 <rect key="frame" x="0.0" y="605" width="375" height="62"/>
-                                <subviews>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XlI-8n-qRu">
-                                        <rect key="frame" x="20" y="16" width="47" height="30"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                        <state key="normal" title="Retake"/>
-                                        <connections>
-                                            <action selector="retakeBtnClick:" destination="hfm-f2-DNT" eventType="touchUpInside" id="7eA-Kj-Zq8"/>
-                                        </connections>
-                                    </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZBU-jX-GTo">
-                                        <rect key="frame" x="283" y="16" width="72" height="30"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                        <state key="normal" title="Use Photo"/>
-                                        <connections>
-                                            <action selector="usePhotoClick:" destination="hfm-f2-DNT" eventType="touchUpInside" id="3JY-Vk-Gu3"/>
-                                        </connections>
-                                    </button>
-                                </subviews>
                                 <color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
-                                    <constraint firstItem="ZBU-jX-GTo" firstAttribute="centerY" secondItem="WfP-Fk-mo9" secondAttribute="centerY" id="IPi-1Q-dac"/>
-                                    <constraint firstItem="XlI-8n-qRu" firstAttribute="leading" secondItem="WfP-Fk-mo9" secondAttribute="leading" constant="20" id="PQS-SF-GaW"/>
-                                    <constraint firstAttribute="trailing" secondItem="ZBU-jX-GTo" secondAttribute="trailing" constant="20" id="bwu-A0-IZQ"/>
                                     <constraint firstAttribute="height" constant="62" id="cnn-ba-VJB"/>
-                                    <constraint firstItem="XlI-8n-qRu" firstAttribute="centerY" secondItem="WfP-Fk-mo9" secondAttribute="centerY" id="gCx-yd-g3m"/>
                                 </constraints>
                             </view>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XlI-8n-qRu">
+                                <rect key="frame" x="50" y="532" width="60" height="60"/>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                <state key="normal" image="btn_photo_retake"/>
+                                <connections>
+                                    <action selector="retakeBtnClick:" destination="hfm-f2-DNT" eventType="touchUpInside" id="7eA-Kj-Zq8"/>
+                                </connections>
+                            </button>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZBU-jX-GTo">
+                                <rect key="frame" x="265" y="532" width="60" height="60"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                <state key="normal" image="btn_photo_assign"/>
+                                <connections>
+                                    <action selector="usePhotoClick:" destination="hfm-f2-DNT" eventType="touchUpInside" id="3JY-Vk-Gu3"/>
+                                </connections>
+                            </button>
                         </subviews>
                         <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
                             <constraint firstItem="1aO-Vd-AQh" firstAttribute="top" secondItem="WfP-Fk-mo9" secondAttribute="bottom" id="18i-Al-Ypd"/>
+                            <constraint firstItem="BrA-yF-F9H" firstAttribute="trailing" secondItem="ZBU-jX-GTo" secondAttribute="trailing" constant="50" id="1MK-Io-C0h"/>
+                            <constraint firstItem="1aO-Vd-AQh" firstAttribute="top" secondItem="XlI-8n-qRu" secondAttribute="bottom" constant="75" id="I6O-uF-hVL"/>
+                            <constraint firstItem="XlI-8n-qRu" firstAttribute="leading" secondItem="BrA-yF-F9H" secondAttribute="leading" constant="50" id="M5Y-yj-q9i"/>
                             <constraint firstItem="WfP-Fk-mo9" firstAttribute="leading" secondItem="khP-jm-wId" secondAttribute="leading" id="MSv-jh-Kws"/>
                             <constraint firstItem="1aO-Vd-AQh" firstAttribute="top" secondItem="w4v-z1-b7B" secondAttribute="bottom" id="ZV0-ao-dGH"/>
                             <constraint firstItem="w4v-z1-b7B" firstAttribute="leading" secondItem="khP-jm-wId" secondAttribute="leading" id="eWS-j0-eyB"/>
                             <constraint firstAttribute="trailing" secondItem="w4v-z1-b7B" secondAttribute="trailing" id="qYR-pg-xfY"/>
+                            <constraint firstItem="ZBU-jX-GTo" firstAttribute="centerY" secondItem="XlI-8n-qRu" secondAttribute="centerY" id="uMc-9T-hZd"/>
                             <constraint firstItem="w4v-z1-b7B" firstAttribute="top" secondItem="JtE-cJ-OW0" secondAttribute="bottom" id="vBb-3e-ld9"/>
                             <constraint firstAttribute="trailing" secondItem="WfP-Fk-mo9" secondAttribute="trailing" id="wKB-RK-2W0"/>
                         </constraints>
@@ -156,4 +163,9 @@
             <point key="canvasLocation" x="2557.5999999999999" y="243.32833583208398"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="btn_photo_assign" width="60" height="60"/>
+        <image name="btn_photo_retake" width="60" height="60"/>
+        <image name="btn_return" width="30" height="30"/>
+    </resources>
 </document>

+ 34 - 3
Redant Drivers/Apex And Drivers/Camera/RACameraViewController.m

@@ -16,6 +16,8 @@
 @property (nonatomic,strong) IBOutlet UIView *controlContanier;
 @property (strong, nonatomic) IBOutlet UIButton *takePhotoBtn;
 
+@property (nonatomic,assign) BOOL barHidden;
+
 #pragma mark - Camera
 
 @property (nonatomic,strong) AVCaptureDevice *captureDevice;
@@ -94,6 +96,18 @@
             
         }];
     }
+    /**
+     * 管理导航条
+     * 在viewDidload的时候隐藏导航条
+     * 恢复导航条的显示/隐藏有两个地方:1.退出的时候;2.确认使用照片的时候
+     */
+    if (self.navigationController) {
+        BOOL navBarHidden = self.navigationController.navigationBar.hidden;
+        self.barHidden = navBarHidden;
+        if (!navBarHidden) {
+            [self.navigationController setNavigationBarHidden:YES animated:YES];
+        }
+    }
 }
 
 - (void)didReceiveMemoryWarning {
@@ -117,6 +131,10 @@
     }
 }
 
+- (BOOL)prefersStatusBarHidden {
+    return YES;
+}
+
 - (void)viewDidLayoutSubviews {
     [super viewDidLayoutSubviews];
     
@@ -296,13 +314,13 @@
     }
     
     AVCaptureConnection *connection = [self.captureOutput connectionWithMediaType:AVMediaTypeVideo];
+    __weak typeof(self) weakSelf = self;
     [self.captureOutput captureStillImageAsynchronouslyFromConnection:connection completionHandler:^(CMSampleBufferRef  _Nullable imageDataSampleBuffer, NSError * _Nullable error) {
         
         if (imageDataSampleBuffer) {
             NSData *imageData=[AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer];
             UIImage *image=[UIImage imageWithData:imageData];
             
-            __weak typeof(self) weakSelf = self;
             RATakePhotoPreviewController *preVC = [RATakePhotoPreviewController viewControllerFromStoryboard];
             preVC.photoHandler = ^(UIImage *img){
                 if (weakSelf) {
@@ -313,8 +331,9 @@
                 }
             };
             preVC.preImage = image;
-            preVC.popTo = self.fromVC;
-            [self.navigationController pushViewController:preVC animated:YES];
+            preVC.popTo = weakSelf.fromVC;
+            preVC.barHidden = weakSelf.barHidden;
+            [weakSelf.navigationController pushViewController:preVC animated:YES];
             
         } else {
             NSLog(@"take picture failed: %@",error);
@@ -323,6 +342,18 @@
     }];
 }
 
+- (IBAction)returnButtonClick:(UIButton *)sender {
+    if (self.navigationController) {
+        [self.navigationController popViewControllerAnimated:YES];
+    } else {
+        [self dismissViewControllerAnimated:YES completion:nil];
+    }
+    
+    if (self.navigationController) {
+        [self.navigationController setNavigationBarHidden:self.barHidden animated:YES];
+    }
+}
+
 #pragma mark - Utils
 
 + (UIImage *)imageWithColor:(UIColor *)color Size:(CGSize)size {

+ 2 - 0
Redant Drivers/Apex And Drivers/Camera/RATakePhotoPreviewController.h

@@ -16,6 +16,8 @@
 
 @property (nonatomic,weak) UIViewController *popTo;
 
+@property (nonatomic,assign) BOOL barHidden;
+
 + (instancetype)viewControllerFromStoryboard;
 
 @end

+ 26 - 0
Redant Drivers/Apex And Drivers/Camera/RATakePhotoPreviewController.m

@@ -44,6 +44,30 @@
     self.previewPhotoView.image = self.preImage;
 }
 
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+//    if (self.navigationController) {
+//        BOOL navBarHidden = self.navigationController.navigationBar.hidden;
+//        self.barHidden = navBarHidden;
+//        if (!navBarHidden) {
+//            [self.navigationController setNavigationBarHidden:YES animated:animated];
+//        }
+//    }
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    
+//    if (self.navigationController) {
+//        [self.navigationController setNavigationBarHidden:self.barHidden animated:animated];
+//    }
+}
+
+- (BOOL)prefersStatusBarHidden {
+    return YES;
+}
+
 - (void)setPreImage:(UIImage *)preImage {
     _preImage = preImage;
 }
@@ -69,7 +93,9 @@
     if (self.photoHandler) {
         self.photoHandler(self.preImage);
     }
+    
     if (self.popTo) {
+        [self.navigationController setNavigationBarHidden:self.barHidden animated:NO];
         [self.navigationController popToViewController:self.popTo animated:YES];
     } else {
         [self.navigationController popViewControllerAnimated:YES];

+ 6 - 0
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 23 - 0
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/Contents.json

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

BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/btn_photo_assign.png


BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/btn_photo_assign@2x.png


BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_assign.imageset/btn_photo_assign@3x.png


+ 23 - 0
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/Contents.json

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

BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/btn_photo_retake.png


BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/btn_photo_retake@2x.png


BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_photo_retake.imageset/btn_photo_retake@3x.png


+ 23 - 0
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/Contents.json

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

BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/btn_return.png


BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/btn_return@2x.png


BIN
Redant Drivers/Apex And Drivers/Camera/camera.xcassets/btn_return.imageset/btn_return@3x.png


+ 2 - 1
Redant Drivers/Apex And Drivers/Detail/Model/RADetailBaseModel.h

@@ -16,7 +16,8 @@ typedef enum {
     RAOrderDetailValueTypeLocation = 3,
     RAOrderDetailValueTypeMap = 4,
     RAOrderDetailValueTypePhoto = 5,
-    RAOrderDetailValueTypeSignature = 6
+    RAOrderDetailValueTypeSignature = 6,
+    RAOrderDetailValueTypeMultiplePhoto = 7
     
 } RAOrderDetailValueType;
 

+ 23 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultPhotoModel.h

@@ -0,0 +1,23 @@
+//
+//  RADetailMultPhotoModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/31.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailBaseModel.h"
+
+@class RAPhotoModel;
+/**
+ * @brief 作为RAPhotoModel和Cell之间的桥接
+ */
+@interface RADetailMultPhotoModel : RADetailBaseModel
+
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,strong) NSArray *photos;
+
+@property (nonatomic,strong,readonly) RAPhotoModel *model;
+
+@end
+

+ 71 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailMultPhotoModel.m

@@ -0,0 +1,71 @@
+//
+//  RADetailMultPhotoModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/31.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailMultPhotoModel.h"
+#import "RAPhotoModel.h"
+
+@interface RADetailMultPhotoModel ()
+
+@property (nonatomic,strong) RAPhotoModel *mapModle;
+
+@end
+
+@implementation RADetailMultPhotoModel
+
+- (RAPhotoModel *)mapModle {
+    if (!_mapModle) {
+        _mapModle = [RAPhotoModel new];
+    }
+    return _mapModle;
+}
+
+#pragma mark - Setter
+
+- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues {
+    [self.mapModle setValuesForKeysWithDictionary:keyedValues];
+}
+
+- (void)setWidth:(CGFloat)width {
+    self.mapModle.width = width;
+}
+
+#pragma mark - Getter
+
+- (RAOrderDetailValueType)type {
+    return (RAOrderDetailValueType)self.mapModle.type;
+}
+
+- (NSString *)title {
+    return self.mapModle.title;
+}
+
+- (NSString *)key {
+    return self.mapModle.key;
+}
+
+- (BOOL)required {
+    return self.mapModle.required;
+}
+
+- (CGFloat)height {
+    return self.mapModle.height;
+}
+
+- (RAPhotoModel *)model {
+    return self.mapModle;
+}
+
+- (NSUInteger)photoCount {
+    return self.mapModle.photoCount;
+}
+
+- (UIImage *)photoForIndex:(NSUInteger)index {
+    return [self.mapModle photoAtIndex:index];
+}
+
+@end

+ 2 - 1
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.h

@@ -13,8 +13,9 @@
 #import "RADetailSignatureCell.h"
 #import "RADetailActionSelectionViewController.h"
 #import "RADetailMapCell.h"
+#import "RAPhotoCellDelegate.h"
 
 
-@interface RAOrderDetailViewController (TableViewDataSource) <UITableViewDataSource,RADetailLocationCellDelegate,RAdetailActionsCellDelegate,UIPopoverPresentationControllerDelegate,RADetailActionSelectionDelegate,RADetailSignatureCellDelegate,RADetailPhotoCellDelegate,RADetailMapCellDelegate>
+@interface RAOrderDetailViewController (TableViewDataSource) <UITableViewDataSource,RADetailLocationCellDelegate,RAdetailActionsCellDelegate,UIPopoverPresentationControllerDelegate,RADetailActionSelectionDelegate,RADetailSignatureCellDelegate,RADetailPhotoCellDelegate,RADetailMapCellDelegate,RAPhotoCellDelegate>
 
 @end

+ 18 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.m

@@ -34,6 +34,9 @@
 #import "RADetailMapModel.h"
 
 #import "RAPhotoPreviewController.h"
+#import "RAPhotoCell.h"
+#import "RADetailMultPhotoModel.h"
+#import "RAPhotoItemModel.h"
 
 
 @implementation RAOrderDetailViewController (TableViewDataSource)
@@ -98,6 +101,15 @@
             return cell;
         }
             break;
+        case RAOrderDetailValueTypeMultiplePhoto: {
+            
+            RADetailMultPhotoModel *photoModel = (RADetailMultPhotoModel *)model;
+            RAPhotoCell *cell = [tableView dequeueReusableCellWithIdentifier:RAPhotoCell.reuseId forIndexPath:indexPath];
+            cell.model = photoModel.model;
+            cell.delegate = self;
+            return cell;
+        }
+            break;
             
         default:
             break;
@@ -384,6 +396,12 @@
 
 }
 
+#pragma mark - Mult Photo Cell Delegate
+
+- (void)photoCell:(RAPhotoCell *)cell didClickPhotoItem:(RAPhotoItemModel *)model {
+    [self previewImage:model.photo];
+}
+
 #pragma mark - Private
 
 - (void)instance:(id)obj playSEL:(SEL)selector parameters:(NSArray *)params {

+ 29 - 0
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m

@@ -15,10 +15,12 @@
 #import "RADetailMapModel.h"
 #import "RADetailPhotoModel.h"
 #import "RADetailSignatureModel.h"
+#import "RADetailMultPhotoModel.h"
 
 #import "RAProgressHUD.h"
 #import "UIScrollView+Empty.h"
 #import "RAEmptyView.h"
+#import "RAPhotoCell.h"
 
 @interface RAOrderDetailSectionModel : NSObject
 
@@ -41,6 +43,23 @@
 
 - (void)setValues:(NSArray *)values {
     
+    NSMutableArray *tmpItems = [values mutableCopy];
+    
+    NSString *url_0 = @"http://a.hiphotos.baidu.com/image/pic/item/4a36acaf2edda3ccc4a53e450ce93901213f9216.jpg";
+    NSString *url_1 = @"http://g.hiphotos.baidu.com/image/pic/item/5243fbf2b211931376d158d568380cd790238dc1.jpg";
+    NSString *url_2 = @"http://b.hiphotos.baidu.com/image/pic/item/0b46f21fbe096b631f4b3b3301338744ebf8ac07.jpg";
+    NSString *url_3 = @"http://b.hiphotos.baidu.com/image/pic/item/80cb39dbb6fd5266f9aeaf69a618972bd50736c1.jpg";
+    NSString *url_4 = @"http://e.hiphotos.baidu.com/image/pic/item/4b90f603738da977f53a9d57bd51f8198618e3b1.jpg";
+    
+    [tmpItems addObject:@{
+                          @"type" : @7,
+                          @"title" : @"Container Photo",
+                          @"photos" : @[@{@"url":url_0},@{@"url":url_1},@{@"url":url_2},@{@"url":url_3},@{@"url":url_4}],
+                          @"key" : @"test_photo"
+                          }];
+    
+    values = tmpItems;
+    
     NSMutableArray *modelArr = [NSMutableArray array];
     for (int i = 0; i < values.count; i++) {
         NSDictionary *value = [values objectAtIndex:i];
@@ -95,6 +114,12 @@
                 [modelArr addObject:model];
             }
                 break;
+            case RAOrderDetailValueTypeMultiplePhoto: {
+                RADetailMultPhotoModel *model = [[RADetailMultPhotoModel alloc] init];
+                model.width = self.tableWidth;
+                [model setValuesForKeysWithDictionary:value];
+                [modelArr addObject:model];
+            }
                 
             default:
                 break;
@@ -149,6 +174,8 @@
     // Dispose of any resources that can be recreated.
 }
 
+#pragma mark - Config
+
 - (void)configureTable {
     
     if (@available(iOS 11.0, *)) {
@@ -170,6 +197,8 @@
     self.detailTableView.emptyView = [RAEmptyView emptyViewWithTapBlk:^(id sender) {
         [weakSelf loadData];
     }];
+    
+    [RAPhotoCell regist2TableView:self.detailTableView];
 }
 
 #pragma mark - Action

+ 5 - 3
Redant Drivers/Apex And Drivers/Home/Base.lproj/Home.storyboard

@@ -131,9 +131,9 @@
                                                                 <constraint firstAttribute="width" constant="20" id="SmO-AW-5Qc"/>
                                                             </constraints>
                                                         </imageView>
-                                                        <imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="uN3-ZP-3F9">
+                                                        <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="new_flag" translatesAutoresizingMaskIntoConstraints="NO" id="uN3-ZP-3F9">
                                                             <rect key="frame" x="275" y="5.5" width="60" height="20"/>
-                                                            <color key="backgroundColor" red="1" green="0.1047433005" blue="0.075207091899999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="20" id="CUd-oi-SAo"/>
                                                                 <constraint firstAttribute="width" constant="60" id="QKR-BL-DbE"/>
@@ -143,7 +143,6 @@
                                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <constraints>
                                                         <constraint firstItem="0oy-zO-2fZ" firstAttribute="leading" secondItem="V2e-NM-tUq" secondAttribute="trailing" constant="5" id="7KA-O9-0Sw"/>
-                                                        <constraint firstItem="uN3-ZP-3F9" firstAttribute="leading" secondItem="y2j-9I-xL6" secondAttribute="trailing" constant="5" id="Crp-1a-VQS"/>
                                                         <constraint firstAttribute="trailing" secondItem="Rxe-zz-m6W" secondAttribute="trailing" constant="5" id="LFL-kC-1K5"/>
                                                         <constraint firstItem="uN3-ZP-3F9" firstAttribute="centerY" secondItem="y2j-9I-xL6" secondAttribute="centerY" id="Nse-AO-pJz"/>
                                                         <constraint firstItem="y2j-9I-xL6" firstAttribute="leading" secondItem="etn-cW-0fL" secondAttribute="leading" constant="10" id="Qm2-OM-HzS"/>
@@ -153,6 +152,7 @@
                                                         <constraint firstItem="Rxe-zz-m6W" firstAttribute="centerY" secondItem="y2j-9I-xL6" secondAttribute="centerY" id="eIq-Fm-AyY"/>
                                                         <constraint firstItem="0oy-zO-2fZ" firstAttribute="top" secondItem="y2j-9I-xL6" secondAttribute="bottom" constant="8" id="efZ-Uk-CRn"/>
                                                         <constraint firstItem="y2j-9I-xL6" firstAttribute="top" secondItem="etn-cW-0fL" secondAttribute="top" constant="5" id="gyS-0m-TZb"/>
+                                                        <constraint firstItem="Rxe-zz-m6W" firstAttribute="leading" secondItem="y2j-9I-xL6" secondAttribute="trailing" constant="70" id="hBS-hP-CfI"/>
                                                         <constraint firstItem="Rxe-zz-m6W" firstAttribute="leading" secondItem="uN3-ZP-3F9" secondAttribute="trailing" constant="5" id="ha4-x2-AAa"/>
                                                         <constraint firstItem="V2e-NM-tUq" firstAttribute="leading" secondItem="y2j-9I-xL6" secondAttribute="leading" id="y8C-4T-ykP"/>
                                                     </constraints>
@@ -178,6 +178,7 @@
                                             <outlet property="orderNoLabel" destination="ZZd-1e-a8S" id="nJJ-JC-dEN"/>
                                             <outlet property="orderType2Label" destination="Utf-Vm-dJV" id="C1T-zQ-vnr"/>
                                             <outlet property="statusView" destination="V2e-NM-tUq" id="sls-Iw-UWW"/>
+                                            <outlet property="titlTrailling" destination="hBS-hP-CfI" id="dcc-CJ-ibl"/>
                                             <outlet property="titleLabel" destination="y2j-9I-xL6" id="YPB-Xg-Bwr"/>
                                         </connections>
                                     </tableViewCell>
@@ -405,5 +406,6 @@
     </scenes>
     <resources>
         <image name="backend_flag" width="20" height="20"/>
+        <image name="new_flag" width="60" height="20"/>
     </resources>
 </document>

+ 9 - 1
Redant Drivers/Apex And Drivers/Home/RAOrderCell.m

@@ -21,6 +21,7 @@
 @property (strong, nonatomic) IBOutlet UILabel *orderType2Label;
 @property (strong, nonatomic) IBOutlet UILabel *indexLabel; ///< 索引,只有More Order存在
 @property (strong, nonatomic) IBOutlet UIImageView *nwflagView;///<New Order Flag,只有首页存在
+@property (nonatomic,strong) IBOutlet NSLayoutConstraint *titlTrailling;
 
 @property (nonatomic,strong) UIView *selectionView;
 
@@ -159,7 +160,14 @@
     [[[[[[[[self setTitle:title] setOrderNo:orderNo] setContainerNo:containerNo] setDate:date] setBackendFlag:flag] setOrderType2:orderType] setStatusIcon:icon] setOrderTypeColor:orderTypeColor];
     
     if (self.isHome) {
-        self.nwflagView.hidden = _orderModel.status != RAOrderStatusNew;
+        BOOL hidden = _orderModel.status != RAOrderStatusNew;
+        self.nwflagView.hidden = hidden;
+        if (hidden) {
+            self.titlTrailling.constant = 5;
+        } else {
+            self.titlTrailling.constant = 70.0f;
+        }
+        [self.contentContainer updateConstraints];
     }
     
 }

+ 1 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.h

@@ -15,6 +15,7 @@
 
 + (void)regist2CollectionView:(UICollectionView *)collectionView;
 
+@property (nonatomic,copy) void (^clickBlk)(RAPhotoItemModel *model);
 @property (nonatomic,weak) RAPhotoItemModel *model;
 
 @end

+ 11 - 5
Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.m

@@ -53,6 +53,7 @@
     _model = model;
     _model.delegate = self;
     
+//    NSLog(@"Photo Item Cell SetModel: %p %p",self,model);
     [self refreshUI];
 }
 
@@ -60,16 +61,21 @@
 
 - (void)refreshUI {
     
-    if (_model.photo) {
-        self.photoView.image = _model.photo;
-    } else {
-        self.photoView.image = [UIImage imageNamed:@"btn_add_photo"];
-    }
+    self.photoView.image = _model.photo;
 }
 
 - (void)unbind {
+//    NSLog(@"Photo Item Cell    Unbind: %p",self);
     _model = nil;
     [self refreshUI];
 }
 
+#pragma mark - Action
+
+- (IBAction)photoBtnClick:(UIButton *)sender {
+    if (self.clickBlk) {
+        self.clickBlk(self.model);
+    }
+}
+
 @end

+ 16 - 6
Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.xib

@@ -19,16 +19,26 @@
                 <rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 <subviews>
-                    <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f77-2N-GTO">
-                        <rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
+                    <imageView clipsSubviews="YES" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="f77-2N-GTO">
+                        <rect key="frame" x="1" y="1" width="88" height="88"/>
                     </imageView>
+                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lPX-8s-zlX">
+                        <rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
+                        <connections>
+                            <action selector="photoBtnClick:" destination="gTV-IL-0wX" eventType="touchUpInside" id="zJT-dy-B63"/>
+                        </connections>
+                    </button>
                 </subviews>
             </view>
             <constraints>
-                <constraint firstAttribute="bottom" secondItem="f77-2N-GTO" secondAttribute="bottom" id="KxH-bM-H8G"/>
-                <constraint firstAttribute="trailing" secondItem="f77-2N-GTO" secondAttribute="trailing" id="t0k-6a-6BD"/>
-                <constraint firstItem="f77-2N-GTO" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="vZJ-or-jGr"/>
-                <constraint firstItem="f77-2N-GTO" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="wSW-NI-CVs"/>
+                <constraint firstAttribute="bottom" secondItem="f77-2N-GTO" secondAttribute="bottom" constant="1" id="4MB-QY-f5Y"/>
+                <constraint firstAttribute="bottom" secondItem="lPX-8s-zlX" secondAttribute="bottom" id="GWp-s4-MZR"/>
+                <constraint firstItem="f77-2N-GTO" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="1" id="Hm4-FG-lgl"/>
+                <constraint firstItem="lPX-8s-zlX" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="N6h-W5-4C2"/>
+                <constraint firstAttribute="trailing" secondItem="f77-2N-GTO" secondAttribute="trailing" constant="1" id="P1c-S2-DNg"/>
+                <constraint firstItem="f77-2N-GTO" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="1" id="a37-li-ujJ"/>
+                <constraint firstItem="lPX-8s-zlX" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="co2-Qh-Lta"/>
+                <constraint firstAttribute="trailing" secondItem="lPX-8s-zlX" secondAttribute="trailing" id="k7R-2w-8zt"/>
             </constraints>
             <viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
             <size key="customSize" width="81" height="91"/>

+ 5 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Layout/RAPhotoLayout.m

@@ -16,6 +16,11 @@
 
 @implementation RAPhotoLayout
 
+// 漏写了此方法,导致cell没显示。😓
+- (CGSize)collectionViewContentSize {
+    return [self contentSize];
+}
+
 - (CGSize)contentSize {
     
     CGFloat height = 0;

+ 3 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoItemModel.h

@@ -11,9 +11,12 @@
 
 @interface RAPhotoItemModel : NSObject
 
+@property (nonatomic,copy) NSString *url;
+@property (nonatomic,copy) NSString *placeHolder;
 @property (nonatomic,strong) UIImage *photo;
 @property (nonatomic,weak) id<RAPhotoModelDelegate> delegate;
 
+- (BOOL)isEmpty;
 
 @end
 

+ 36 - 1
Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoItemModel.m

@@ -7,13 +7,31 @@
 //
 
 #import "RAPhotoItemModel.h"
+#import "UIImage+RedAnt.h"
 
 @implementation RAPhotoItemModel
+@synthesize photo = _photo;
+
+#pragma mark - Setter
+
+- (void)setUrl:(NSString *)url {
+    _url = url;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        UIImage *img = [UIImage ra_imageWithURL:[NSURL URLWithString:url]];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            self.photo = img;
+        });
+    });
+}
 
 - (void)setPhoto:(UIImage *)photo {
     _photo = photo;
     if (_delegate && [_delegate respondsToSelector:@selector(refreshUI)]) {
-        [_delegate refreshUI];
+        
+        id<RAPhotoModelDelegate> dlgt = _delegate;
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [dlgt refreshUI];
+        });
     }
 }
 
@@ -24,4 +42,21 @@
     _delegate = delegate;
 }
 
+#pragma mark - Getter
+
+- (UIImage *)photo {
+    if (!_photo) {
+        if (self.placeHolder) {
+            return [UIImage imageNamed:self.placeHolder];
+        } else {
+            return nil;
+        }
+    }
+    return _photo;
+}
+
+- (BOOL)isEmpty {
+    return _photo == nil;
+}
+
 @end

+ 6 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoModel.h

@@ -24,4 +24,10 @@
 
 @property (nonatomic,weak) id<RAPhotoModelDelegate> delegate;
 
+- (RAPhotoItemModel *)photoItemAtIndex:(NSUInteger)index;
+
+- (UIImage *)photoAtIndex:(NSUInteger)index;
+
+- (NSUInteger)photoCount;
+
 @end

+ 24 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoModel.m

@@ -40,7 +40,9 @@
 }
 
 - (void)setDelegate:(id<RAPhotoModelDelegate>)delegate {
+    
     if (_delegate && [_delegate respondsToSelector:@selector(unbind)]) {
+    
         [_delegate unbind];
     }
     _delegate = delegate;
@@ -66,6 +68,28 @@
     return _contentHeight;
 }
 
+- (RAPhotoItemModel *)photoItemAtIndex:(NSUInteger)index {
+    if (index >= self.photos.count || index < 0) {
+        return nil;
+    }
+    return [self.photos objectAtIndex:index];
+}
+
+- (UIImage *)photoAtIndex:(NSUInteger)index {
+    return [self photoItemAtIndex:index].photo;
+}
+
+- (NSUInteger)photoCount {
+    __block NSUInteger count = 0;
+    [self.photos enumerateObjectsUsingBlock:^(RAPhotoItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+       
+        if (!obj.isEmpty) {
+            count++;
+        }
+    }];
+    return count;
+}
+
 #pragma mark - Layout Delegate
 
 - (NSArray *)prepareLayout {

+ 21 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Protocol/RAPhotoCellDelegate.h

@@ -0,0 +1,21 @@
+//
+//  RAPhotoCellDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/31.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#ifndef RAPhotoCellDelegate_h
+#define RAPhotoCellDelegate_h
+
+#import <UIKit/UIkit.h>
+
+@class RAPhotoCell,RAPhotoItemModel;
+@protocol RAPhotoCellDelegate <NSObject>
+
+- (void)photoCell:(RAPhotoCell *)cell didClickPhotoItem:(RAPhotoItemModel *)model;
+
+@end
+
+#endif /* RAPhotoCellDelegate_h */

+ 3 - 1
Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.h

@@ -7,7 +7,7 @@
 //
 
 #import <UIKit/UIKit.h>
-
+#import "RAPhotoCellDelegate.h"
 
 @class RAPhotoModel;
 @interface RAPhotoCell : UITableViewCell
@@ -18,5 +18,7 @@
 
 @property (nonatomic,weak) RAPhotoModel *model;
 
+@property (nonatomic,weak) id<RAPhotoCellDelegate> delegate;
+
 @end
 

+ 22 - 5
Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.m

@@ -43,6 +43,7 @@
     // Initialization code
     
     [RAPhotoItemCell regist2CollectionView:self.photoCollectionView];
+    self.photoCollectionView.collectionViewLayout = self.photoLayout;
 }
 
 - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@@ -67,12 +68,11 @@
 #pragma mark - Setter
 
 - (void)setModel:(RAPhotoModel *)model {
+//    NSLog(@"CollectionCell %p %p %p",self,_model,model);
     _model.delegate = nil;
     _model = model;
     _model.delegate = self;
     
-    self.photoLayout.delegate = _model;
-    
     [self refreshUI];
 }
 
@@ -88,19 +88,20 @@
 #pragma mark - Model Delegate
 
 - (void)refreshUI {
-    
+//    NSLog(@"CollectionCell refreshUI %p %p",self,_model);
     NSString *title = _model.title;
     BOOL required = _model.required;
     
     self.titleLabel.text = title;
     self.requiredLabel.hidden = !required;
     
+    self.photoLayout.delegate = _model;
     [self.photoCollectionView reloadData];
 }
 
 - (void)unbind {
     _model = nil;
-    [self refreshUI];
+//    [self refreshUI];
 }
 
 #pragma mark - CollectionView DataSource
@@ -120,13 +121,29 @@
     RAPhotoItemModel *model = [self.model.photos objectAtIndex:indexPath.row];
     cell.model = model;
     
+    __weak typeof(self) weakSelf = self;
+    cell.clickBlk = ^(RAPhotoItemModel *model) {
+        if (weakSelf) {
+            __strong typeof(weakSelf) strongSelf = weakSelf;
+            [strongSelf clickItem:model];
+        }
+    };
+    
     return cell;
 }
 
 #pragma mark - CollectionView Delegate
 
 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
-    
+    [self clickItem:[self.model photoItemAtIndex:indexPath.item]];
+}
+
+#pragma mark - Action
+
+- (void)clickItem:(RAPhotoItemModel *)model {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(photoCell:didClickPhotoItem:)]) {
+        [self.delegate photoCell:self didClickPhotoItem:model];
+    }
 }
 
 @end

+ 8 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditMultPhotoModel.h

@@ -9,13 +9,21 @@
 #import "RAEditBaseModel.h"
 
 @class RAPhotoModel;
+
+/**
+ * @brief 作为RAPhotoModel和Cell的桥接器
+ */
 @interface RAEditMultPhotoModel : RAEditBaseModel
 
 @property (nonatomic,assign)    CGFloat     width;
 @property (nonatomic,strong)    NSArray     *photos;
 
+@property (nonatomic,assign,readonly) NSUInteger photoCount;
+
 @property (nonatomic,strong,readonly) RAPhotoModel *model;
 
+- (UIImage *)photoForIndex:(NSUInteger)index;
+
 @end
 
 

+ 8 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditMultPhotoModel.m

@@ -60,4 +60,12 @@
     return self.mapModle;
 }
 
+- (NSUInteger)photoCount {
+    return self.mapModle.photoCount;
+}
+
+- (UIImage *)photoForIndex:(NSUInteger)index {
+    return [self.mapModle photoAtIndex:index];
+}
+
 @end

+ 2 - 1
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.h

@@ -12,7 +12,8 @@
 #import "RAEditPhotoCell.h"
 #import "RAEditSignatureCell.h"
 #import "RAEditDateCell.h"
+#import "RAPhotoCellDelegate.h"
 
-@interface RAOrderEditViewController (TableDataSource) <UITableViewDataSource,RAEditInputDelegate,RAEditMultInputDelegate,RAEditPhotoCellDelegate,RAEditSignatureCellDelegate,RAEditDateCellDelegate>
+@interface RAOrderEditViewController (TableDataSource) <UITableViewDataSource,RAEditInputDelegate,RAEditMultInputDelegate,RAEditPhotoCellDelegate,RAEditSignatureCellDelegate,RAEditDateCellDelegate,RAPhotoCellDelegate>
 
 @end

+ 50 - 10
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.m

@@ -18,6 +18,7 @@
 #import "RAEditDateModel.h"
 #import "RAEditMultPhotoModel.h"
 #import "RAPhotoCell.h"
+#import "RAPhotoItemModel.h"
 
 #import "RAQRCodeScannerViewController.h"
 #import "RACameraViewController.h"
@@ -95,6 +96,7 @@
             RAEditMultPhotoModel *multPhotoModel = (RAEditMultPhotoModel *)model;
             RAPhotoCell *cell = [tableView dequeueReusableCellWithIdentifier:RAPhotoCell.reuseId forIndexPath:indexPath];
             cell.model = multPhotoModel.model;
+            cell.delegate = self;
             return cell;
         }
             break;
@@ -115,27 +117,47 @@
     return [self editSectionCount];
 }
 
+#pragma mark - Private
+
+- (void)_showCameraWithBlock:(void (^)(UIImage *))blk {
+    
+    RACameraViewController *cameraVC = [RACameraViewController viewControllerFromStoryboard];
+    cameraVC.completion = ^(UIImage *image) {
+        if (blk) {
+            blk(image);
+        }
+    };
+    cameraVC.fromVC = self;
+    [self.navigationController pushViewController:cameraVC animated:YES];
+}
+
+- (void)_showPhotoPreview:(UIImage *)image WithBlock:(void (^)(void))blk {
+    
+    RAPhotoPreviewController *previewVC = [RAPhotoPreviewController viewControllerFromStoryboard];
+    previewVC.image = image;
+    previewVC.completion = ^{
+        if (blk) {
+            blk();
+        }
+    };
+    [self.navigationController pushViewController:previewVC animated:YES];
+}
+
 #pragma mark - PhotoCell Delegate
 
 - (void)photoCellWillOpenCameraOrShowPhoto:(RAEditPhotoCell *)cell {
     
     if (cell.model.photo) {
         
-        RAPhotoPreviewController *previewVC = [RAPhotoPreviewController viewControllerFromStoryboard];
-        previewVC.image = cell.model.photo;
-        previewVC.completion = ^{
+        [self _showPhotoPreview:cell.model.photo WithBlock:^{
             cell.model.photo = nil;
-        };
-        [self.navigationController pushViewController:previewVC animated:YES];
+        }];
         
     } else {
         
-        RACameraViewController *cameraVC = [RACameraViewController viewControllerFromStoryboard];
-        cameraVC.completion = ^(UIImage *image) {
+        [self _showCameraWithBlock:^(UIImage *image) {
             cell.model.photo = [UIImage img_compress:image kbsize:1024];
-        };
-        cameraVC.fromVC = self;
-        [self.navigationController pushViewController:cameraVC animated:YES];
+        }];
     }
 }
 
@@ -237,4 +259,22 @@
     }
 }
 
+#pragma mark - Multiple Photo Cell Delegate
+
+- (void)photoCell:(RAPhotoCell *)cell didClickPhotoItem:(RAPhotoItemModel *)model {
+    
+    if ([model isEmpty]) {
+        
+        [self _showCameraWithBlock:^(UIImage *image) {
+            model.photo = [UIImage img_compress:image kbsize:1024];
+        }];
+        
+    } else {
+        
+        [self _showPhotoPreview:model.photo WithBlock:^{
+            model.photo = nil;
+        }];
+    }
+}
+
 @end

+ 83 - 14
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.m

@@ -42,16 +42,13 @@
 - (void)setItems:(NSArray<RAEditBaseModel *> *)items {
     
     NSMutableArray *tmpItems = [items mutableCopy];
-    static dispatch_once_t token;
-    dispatch_once(&token, ^{
-        [tmpItems addObject:@{
-                              @"type" : @6,
-                              @"title" : @"Container Photo",
-                              @"required" : @(YES),
-                              @"photos" : @[@{},@{},@{},@{},@{},@{}],
-                              @"key" : @"test_photo"
-                              }];
-    });
+    [tmpItems addObject:@{
+                          @"type" : @6,
+                          @"title" : @"Container Photo",
+                          @"required" : @(YES),
+                          @"photos" : @[@{@"placeHolder":@"btn_add_photo"},@{@"placeHolder":@"btn_add_photo"},@{@"placeHolder":@"btn_add_photo"},@{@"placeHolder":@"btn_add_photo"},@{@"placeHolder":@"btn_add_photo"},@{@"placeHolder":@"btn_add_photo"}],
+                          @"key" : @"test_photo"
+                          }];
     
     NSMutableArray *itemArr = [NSMutableArray arrayWithCapacity:items.count];
     for (int i = 0; i < tmpItems.count; i++) {
@@ -359,6 +356,31 @@
     });
 }
 
+#pragma mark - Private
+
+- (void)submitSuccessWithPhoto:(BOOL)photo {
+    
+    NSString *msg = NSLocalizedString(@"update_success", nil);
+    if (photo) {
+        msg = NSLocalizedString(@"update_photo_success", nil);
+    }
+    
+    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:msg preferredStyle:UIAlertControllerStyleAlert];
+    
+    __weak typeof(self) weakSelf = self;
+    UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        
+        if (weakSelf) {
+            __strong typeof(weakSelf) strongSelf = weakSelf;
+            [strongSelf gobackHome];
+        }
+    }];
+    
+    [alertVC addAction:okAction];
+    
+    [self presentViewController:alertVC animated:YES completion:nil];
+}
+
 #pragma mark - Tap Action
 
 - (IBAction)tapToResignFirstResponder:(UITapGestureRecognizer *)sender {
@@ -395,7 +417,7 @@
         return;
     }
     
-    
+    [params setValue:@(photoArr.count) forKey:@"photoCount"];
     
     // show progress
     RAProgressHUD *hud = [RAProgressHUD showHUDOnView:self.view];
@@ -428,11 +450,21 @@
                     
                     dispatch_async(dispatch_get_main_queue(), ^{
                         
+//                        if (photoArr.count > 0) {
+//                            [strongSelf syncUploadPhotos:photoArr Json:json HUD:hud];
+//                        } else {
+//                            [strongSelf gobackHome];
+//                        }
+                        
+                        // 全部转为后台上传
                         if (photoArr.count > 0) {
-                            [strongSelf syncUploadPhotos:photoArr Json:json HUD:hud];
-                        } else {
-                            [self gobackHome];
+                            [strongSelf backgroundUploadPhoto:photoArr Json:json];
                         }
+                        
+                        [hud dismiss:^{
+                            [strongSelf submitSuccessWithPhoto:photoArr.count > 0];
+                        }];
+                        
                     });
                     
                 } else {
@@ -748,6 +780,43 @@
                         [params setObject:dateModel.value forKey:model.key];
                     }
                 }
+                    break;
+                case RAEditTypeMultPhoto: {
+                    
+                    if (photoDir) {
+                        
+                        RAEditMultPhotoModel *photoModel = (RAEditMultPhotoModel *)model;
+                        NSUInteger count = photoModel.photoCount;
+                        if (photoModel.required && count == 0) {
+                            [emptyArr addObject:[NSString stringWithFormat:@"%ld.%@",emptyArr.count + 1,model.title]];
+                            continue;
+                        }
+                        
+                        for (int i = 0; i < count; i++) {
+                            
+                            UIImage *img = [photoModel photoForIndex:i];
+                            if (img) {
+                                
+                                // 临时创建PhotoModel,用于上传
+                                RAEditPhotoModel *tmpPhotoModel = [RAEditPhotoModel new];
+                                tmpPhotoModel.type = RAEditTypePhoto;
+                                tmpPhotoModel.key = [NSString stringWithFormat:@"%@_%d",photoModel.key,i];
+                                tmpPhotoModel.photo = img;
+                                
+                                NSString *photoPath = [photoDir stringByAppendingPathComponent:tmpPhotoModel.imageName];
+                                NSData *imgData = UIImageJPEGRepresentation(tmpPhotoModel.photo, 1.0f);
+                                if (imgData) {
+                                    
+                                    [imgData writeToFile:photoPath atomically:NO];
+                                    [params setObject:tmpPhotoModel.imageName forKey:tmpPhotoModel.key];
+                                    
+                                    [photoArr addObject:tmpPhotoModel];
+                                }
+                            }
+                        }
+                    }
+                }
+                    break;
                     
                 default:
                     break;

+ 2 - 0
Redant Drivers/Apex And Drivers/en.lproj/Localizable.strings

@@ -56,6 +56,8 @@
 "update_upload_failed_tips" = "upload the photos failed,would you like to retry or do it background?";
 "Background" = "Background";
 "Retry" = "Retry";
+"update_success" = "update success";
+"update_photo_success" = "update success,the photos and signatures will upload background,you can find them on upload list.";
 
 /**
  Detail

+ 2 - 0
Redant Drivers/Apex And Drivers/zh-Hans.lproj/Localizable.strings

@@ -56,6 +56,8 @@
 "update_upload_failed_tips" = "上传图片失败,是否重试或者将任务提交到后台上传?";
 "Background" = "后台上传";
 "Retry" = "重试";
+"update_success" = "提交成功";
+"update_photo_success" = "提交成功,照片和签名将上传后台,你可以在上传列表中找到它们。";
 
 /**
  Detail