소스 검색

1.修改iOS Apex Drivers Detail刷新首页红点。
2.修改iOS Apex Drivers Container Photo显示多张。

Pen Li 7 년 전
부모
커밋
2a2a13a4f6
38개의 변경된 파일1064개의 추가작업 그리고 19개의 파일을 삭제
  1. 88 0
      Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj
  2. 16 0
      Redant Drivers/Apex And Drivers/AppDelegate.m
  3. 23 0
      Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/Contents.json
  4. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo.png
  5. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo@2x.png
  6. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/btn_add_photo.imageset/btn_add_photo@3x.png
  7. 7 0
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m
  8. 13 2
      Redant Drivers/Apex And Drivers/Home/Base.lproj/Home.storyboard
  9. 31 0
      Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController.m
  10. 2 1
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDataSource.m
  11. 2 0
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController.h
  12. 59 1
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m
  13. 1 0
      Redant Drivers/Apex And Drivers/Home/RAOrderCell.h
  14. 6 1
      Redant Drivers/Apex And Drivers/Home/RAOrderCell.m
  15. 18 8
      Redant Drivers/Apex And Drivers/Message/RAMessageViewController.m
  16. 20 0
      Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.h
  17. 75 0
      Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.m
  18. 41 0
      Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.xib
  19. 17 0
      Redant Drivers/Apex And Drivers/PhotoCell/Layout/RAPhotoLayout.h
  20. 61 0
      Redant Drivers/Apex And Drivers/PhotoCell/Layout/RAPhotoLayout.m
  21. 19 0
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoItemModel.h
  22. 27 0
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoItemModel.m
  23. 27 0
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoModel.h
  24. 114 0
      Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoModel.m
  25. 22 0
      Redant Drivers/Apex And Drivers/PhotoCell/Protocol/RAPhotoLayoutDelegate.h
  26. 23 0
      Redant Drivers/Apex And Drivers/PhotoCell/Protocol/RAPhotoModelDelegate.h
  27. 22 0
      Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.h
  28. 132 0
      Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.m
  29. 68 0
      Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.xib
  30. 1 0
      Redant Drivers/Apex And Drivers/RANotificationNameCenter.h
  31. 1 0
      Redant Drivers/Apex And Drivers/RANotificationNameCenter.m
  32. 10 4
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditDateCell.m
  33. 2 1
      Redant Drivers/Apex And Drivers/Update/Model/RAEditBaseModel.h
  34. 1 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditDateModel.h
  35. 21 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditMultPhotoModel.h
  36. 63 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditMultPhotoModel.m
  37. 9 0
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.m
  38. 22 1
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.m

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

@@ -60,6 +60,14 @@
 		424204EE20C66D20005AEED9 /* RAPhotoPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 424204ED20C66D20005AEED9 /* RAPhotoPreviewController.m */; };
 		424204F020C66D2D005AEED9 /* PhotoPreview.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 424204EF20C66D2D005AEED9 /* PhotoPreview.storyboard */; };
 		424204F320C68E02005AEED9 /* RAProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 424204F220C68E02005AEED9 /* RAProgressHUD.m */; };
+		4243C8C2218829C40019A070 /* RAPhotoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4243C8C0218829C40019A070 /* RAPhotoCell.m */; };
+		4243C8C3218829C40019A070 /* RAPhotoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4243C8C1218829C40019A070 /* RAPhotoCell.xib */; };
+		4243C8C7218839920019A070 /* RAPhotoItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4243C8C5218839920019A070 /* RAPhotoItemCell.m */; };
+		4243C8C8218839920019A070 /* RAPhotoItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4243C8C6218839920019A070 /* RAPhotoItemCell.xib */; };
+		4243C8CD21883E340019A070 /* RAPhotoLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 4243C8CC21883E340019A070 /* RAPhotoLayout.m */; };
+		4243C8D1218840310019A070 /* RAPhotoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4243C8D0218840310019A070 /* RAPhotoModel.m */; };
+		4243C8D4218840400019A070 /* RAPhotoItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4243C8D3218840400019A070 /* RAPhotoItemModel.m */; };
+		4243C8DA218852E40019A070 /* RAEditMultPhotoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4243C8D9218852E40019A070 /* RAEditMultPhotoModel.m */; };
 		424BA1E32136806C007912EC /* UIImage+RedAnt.m in Sources */ = {isa = PBXBuildFile; fileRef = 424BA1E22136806C007912EC /* UIImage+RedAnt.m */; };
 		42529D2120C0E8EC000C0F4D /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D2020C0E8EC000C0F4D /* NetworkUtils.m */; };
 		42529D2520C0E97E000C0F4D /* RADataProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D2420C0E97E000C0F4D /* RADataProvider.m */; };
@@ -299,6 +307,22 @@
 		424204EF20C66D2D005AEED9 /* PhotoPreview.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = PhotoPreview.storyboard; sourceTree = "<group>"; };
 		424204F120C68E02005AEED9 /* RAProgressHUD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAProgressHUD.h; sourceTree = "<group>"; };
 		424204F220C68E02005AEED9 /* RAProgressHUD.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAProgressHUD.m; sourceTree = "<group>"; };
+		4243C8BF218829C40019A070 /* RAPhotoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoCell.h; sourceTree = "<group>"; };
+		4243C8C0218829C40019A070 /* RAPhotoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAPhotoCell.m; sourceTree = "<group>"; };
+		4243C8C1218829C40019A070 /* RAPhotoCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RAPhotoCell.xib; sourceTree = "<group>"; };
+		4243C8C4218839920019A070 /* RAPhotoItemCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoItemCell.h; sourceTree = "<group>"; };
+		4243C8C5218839920019A070 /* RAPhotoItemCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAPhotoItemCell.m; sourceTree = "<group>"; };
+		4243C8C6218839920019A070 /* RAPhotoItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RAPhotoItemCell.xib; sourceTree = "<group>"; };
+		4243C8CB21883E340019A070 /* RAPhotoLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoLayout.h; sourceTree = "<group>"; };
+		4243C8CC21883E340019A070 /* RAPhotoLayout.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAPhotoLayout.m; sourceTree = "<group>"; };
+		4243C8CF218840310019A070 /* RAPhotoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoModel.h; sourceTree = "<group>"; };
+		4243C8D0218840310019A070 /* RAPhotoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAPhotoModel.m; sourceTree = "<group>"; };
+		4243C8D2218840400019A070 /* RAPhotoItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoItemModel.h; sourceTree = "<group>"; };
+		4243C8D3218840400019A070 /* RAPhotoItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAPhotoItemModel.m; sourceTree = "<group>"; };
+		4243C8D621884A7A0019A070 /* RAPhotoModelDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoModelDelegate.h; sourceTree = "<group>"; };
+		4243C8D8218852E40019A070 /* RAEditMultPhotoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditMultPhotoModel.h; sourceTree = "<group>"; };
+		4243C8D9218852E40019A070 /* RAEditMultPhotoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditMultPhotoModel.m; sourceTree = "<group>"; };
+		4243C8DB218858570019A070 /* RAPhotoLayoutDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAPhotoLayoutDelegate.h; sourceTree = "<group>"; };
 		424BA1E12136806C007912EC /* UIImage+RedAnt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+RedAnt.h"; sourceTree = "<group>"; };
 		424BA1E22136806C007912EC /* UIImage+RedAnt.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RedAnt.m"; sourceTree = "<group>"; };
 		42529D1F20C0E8EB000C0F4D /* NetworkUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = ../../common/NetworkUtils.h; sourceTree = "<group>"; };
@@ -755,6 +779,59 @@
 			path = PhotoPreView;
 			sourceTree = "<group>";
 		};
+		4243C8BE2188297D0019A070 /* PhotoCell */ = {
+			isa = PBXGroup;
+			children = (
+				4243C8D521884A300019A070 /* Protocol */,
+				4243C8CE218840200019A070 /* Model */,
+				4243C8CA21883DF30019A070 /* Layout */,
+				4243C8C92188399C0019A070 /* Collection */,
+				4243C8BF218829C40019A070 /* RAPhotoCell.h */,
+				4243C8C0218829C40019A070 /* RAPhotoCell.m */,
+				4243C8C1218829C40019A070 /* RAPhotoCell.xib */,
+			);
+			path = PhotoCell;
+			sourceTree = "<group>";
+		};
+		4243C8C92188399C0019A070 /* Collection */ = {
+			isa = PBXGroup;
+			children = (
+				4243C8C4218839920019A070 /* RAPhotoItemCell.h */,
+				4243C8C5218839920019A070 /* RAPhotoItemCell.m */,
+				4243C8C6218839920019A070 /* RAPhotoItemCell.xib */,
+			);
+			path = Collection;
+			sourceTree = "<group>";
+		};
+		4243C8CA21883DF30019A070 /* Layout */ = {
+			isa = PBXGroup;
+			children = (
+				4243C8CB21883E340019A070 /* RAPhotoLayout.h */,
+				4243C8CC21883E340019A070 /* RAPhotoLayout.m */,
+			);
+			path = Layout;
+			sourceTree = "<group>";
+		};
+		4243C8CE218840200019A070 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				4243C8CF218840310019A070 /* RAPhotoModel.h */,
+				4243C8D0218840310019A070 /* RAPhotoModel.m */,
+				4243C8D2218840400019A070 /* RAPhotoItemModel.h */,
+				4243C8D3218840400019A070 /* RAPhotoItemModel.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
+		4243C8D521884A300019A070 /* Protocol */ = {
+			isa = PBXGroup;
+			children = (
+				4243C8D621884A7A0019A070 /* RAPhotoModelDelegate.h */,
+				4243C8DB218858570019A070 /* RAPhotoLayoutDelegate.h */,
+			);
+			path = Protocol;
+			sourceTree = "<group>";
+		};
 		42529D1E20C0E8C4000C0F4D /* Network */ = {
 			isa = PBXGroup;
 			children = (
@@ -898,6 +975,8 @@
 				4235FAB5213E30CC000B6672 /* RAEditImageBaseModel.m */,
 				42DCCC39218155620027A5BB /* RAEditDateModel.h */,
 				42DCCC3A218155620027A5BB /* RAEditDateModel.m */,
+				4243C8D8218852E40019A070 /* RAEditMultPhotoModel.h */,
+				4243C8D9218852E40019A070 /* RAEditMultPhotoModel.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -1320,6 +1399,7 @@
 				425B97D220C7B7E100B35713 /* Upload */,
 				4235FAA4213E24FE000B6672 /* Signature */,
 				4282B5B3217DB1F3001EBCE2 /* Offline */,
+				4243C8BE2188297D0019A070 /* PhotoCell */,
 				425B97C920C7895F00B35713 /* RASingleton.h */,
 				425B97CA20C7895F00B35713 /* RASingleton.m */,
 				423C6A4C20C909FC00455E27 /* RANotificationNameCenter.h */,
@@ -1414,8 +1494,10 @@
 				42D8B8A320C2253E001C125F /* fake_order_list.json in Resources */,
 				42DCCC722181B13E0027A5BB /* orderFilter.storyboard in Resources */,
 				424204E420C65827005AEED9 /* Camera.storyboard in Resources */,
+				4243C8C3218829C40019A070 /* RAPhotoCell.xib in Resources */,
 				42D8B8E020C28755001C125F /* fake_order_detail.json in Resources */,
 				71EAA33B20B95720002F003C /* Assets.xcassets in Resources */,
+				4243C8C8218839920019A070 /* RAPhotoItemCell.xib in Resources */,
 				42DCCC792181B18A0027A5BB /* Detail.storyboard in Resources */,
 				4255EC8F20C5260400E5DA24 /* fake_order_edit.json in Resources */,
 				424204DE20C6156E005AEED9 /* QRCode.storyboard in Resources */,
@@ -1451,6 +1533,7 @@
 				42D8B8BF20C24A92001C125F /* RADetailSingleLineModel.m in Sources */,
 				42D8B8D820C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.m in Sources */,
 				42C1B2742134F24C00637085 /* RADatePickerViewController.m in Sources */,
+				4243C8C2218829C40019A070 /* RAPhotoCell.m in Sources */,
 				42529D3B20C0EA3F000C0F4D /* unzip.c in Sources */,
 				4205FD4B20C0F4C400DB42B4 /* RetrievePasswordViewController.m in Sources */,
 				42ECE189214A49B600AD8283 /* RAChangePasswordViewController.m in Sources */,
@@ -1472,6 +1555,7 @@
 				4205FD6620C13BF400DB42B4 /* RAOrderCell.m in Sources */,
 				42529D2120C0E8EC000C0F4D /* NetworkUtils.m in Sources */,
 				420D11152133EF2800149B37 /* RAOrderFilterBaseModel.m in Sources */,
+				4243C8DA218852E40019A070 /* RAEditMultPhotoModel.m in Sources */,
 				42D8B8CF20C2657D001C125F /* RADetailBaseModel.m in Sources */,
 				4259598F2148FD9200F7DD41 /* RASettingViewController+TableDelegate.m in Sources */,
 				42F0C5D720E20B3F00922442 /* RACameraViewController.m in Sources */,
@@ -1504,6 +1588,7 @@
 				422B06BC21743ABE003DA2DA /* NSData+RAImageType.m in Sources */,
 				420D110F2133EEE300149B37 /* RAOrderFilterInputModel.m in Sources */,
 				421C417621719EB500835447 /* RALoginNavigationController.m in Sources */,
+				4243C8D1218840310019A070 /* RAPhotoModel.m in Sources */,
 				42529D3C20C0EA3F000C0F4D /* zip.c in Sources */,
 				4259599C21490B6200F7DD41 /* RAOptionCell.m in Sources */,
 				422DA1C02134FA7D0021BD70 /* RAPresentationController.m in Sources */,
@@ -1516,6 +1601,7 @@
 				423C6A4E20C909FC00455E27 /* RANotificationNameCenter.m in Sources */,
 				429A0ADA216CA6A6004DEF7A /* RASettingLinkModel.m in Sources */,
 				42ECE185214A08A900AD8283 /* RASettingAboutCell.m in Sources */,
+				4243C8D4218840400019A070 /* RAPhotoItemModel.m in Sources */,
 				4259597D2148F39300F7DD41 /* RASettingActionModel.m in Sources */,
 				42D7B0792147946D0046FE89 /* RAMessageViewController.m in Sources */,
 				42529D3A20C0EA3F000C0F4D /* mztools.c in Sources */,
@@ -1557,6 +1643,8 @@
 				4235FA9D213E0F3A000B6672 /* RADetailPhotoCell.m in Sources */,
 				4255EC8A20C5211700E5DA24 /* RAEditMultInputCell.m in Sources */,
 				4255EC9620C5284C00E5DA24 /* RAEditLabelModel.m in Sources */,
+				4243C8C7218839920019A070 /* RAPhotoItemCell.m in Sources */,
+				4243C8CD21883E340019A070 /* RAPhotoLayout.m in Sources */,
 				425B97ED20C7C35C00B35713 /* ApexDriverUploadCell.m in Sources */,
 				42D8B8C220C24AA6001C125F /* RADetailMultLineModel.m in Sources */,
 				42F624EE214BA97F00B1F012 /* RAMessageModel.m in Sources */,

+ 16 - 0
Redant Drivers/Apex And Drivers/AppDelegate.m

@@ -296,6 +296,22 @@
         if (report_location == 1) {
             
             NSString *orderID = [aps objectForKey:@"order-id"];
+            BOOL tracing = [[aps objectForKey:@"tracing"] boolValue];
+            
+            if (tracing) {
+                
+                if (RASingleton.sharedInstance.backgroundReportType == RABackgroundReportTypeAllow) {
+                    
+                    [self reportLastLocation:[RASingleton sharedInstance].lastLocation forOrder:orderID];
+                    
+                } else {
+                    
+                    [self rejectReportLocationWithReason:[NSString stringWithFormat:@"Driver %@ rejected to report location",RASingleton.sharedInstance.user] forOrder:orderID];
+                }
+                
+                return;
+            }
+            
             if (RASingleton.sharedInstance.backgroundReportType == RABackgroundReportTypeAllow) {
                 
                 [self reportLastLocation:[RASingleton sharedInstance].lastLocation forOrder:orderID];

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

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

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


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

@@ -125,6 +125,8 @@
 @property (nonatomic,strong) NSMutableArray <RAOrderDetailSectionModel *> *sectionArray;
 @property (nonatomic,strong) UIRefreshControl *refreshControl;
 
+@property (nonatomic,assign) BOOL firstRequestOk;
+
 @end
 
 @implementation RAOrderDetailViewController
@@ -214,6 +216,11 @@
                 int result = [[json objectForKey:@"result"] intValue];
                 if (result == RESULT_TRUE) {
                     
+                    if (!strongSelf.firstRequestOk) { // 刷新Home或More的backendFlag圆点
+                        [[NSNotificationCenter defaultCenter] postNotificationName:RANotificationCheckDetail object:nil userInfo:@{@"order_id":strongSelf.orderID}];
+                        strongSelf.firstRequestOk = YES;
+                    }
+                    
                     NSArray *sectionArray = [json objectForKey:@"sections"];
                     [strongSelf.sectionArray removeAllObjects];
                     CGFloat width = CGRectGetWidth(strongSelf.detailTableView.bounds);

+ 13 - 2
Redant Drivers/Apex And Drivers/Home/Base.lproj/Home.storyboard

@@ -40,7 +40,7 @@
                                                             </constraints>
                                                         </imageView>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pickup Order New" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y2j-9I-xL6">
-                                                            <rect key="frame" x="10" y="5" width="139" height="21"/>
+                                                            <rect key="frame" x="10" y="5" width="260" height="21"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="21" id="vQr-l2-y2d"/>
                                                             </constraints>
@@ -131,12 +131,21 @@
                                                                 <constraint firstAttribute="width" constant="20" id="SmO-AW-5Qc"/>
                                                             </constraints>
                                                         </imageView>
+                                                        <imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" 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"/>
+                                                            <constraints>
+                                                                <constraint firstAttribute="height" constant="20" id="CUd-oi-SAo"/>
+                                                                <constraint firstAttribute="width" constant="60" id="QKR-BL-DbE"/>
+                                                            </constraints>
+                                                        </imageView>
                                                     </subviews>
                                                     <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="Rxe-zz-m6W" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="y2j-9I-xL6" secondAttribute="trailing" priority="999" constant="5" id="DnA-3X-1WX"/>
+                                                        <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"/>
                                                         <constraint firstAttribute="bottom" secondItem="0oy-zO-2fZ" secondAttribute="bottom" id="WpU-nw-Gp9"/>
                                                         <constraint firstItem="V2e-NM-tUq" firstAttribute="centerY" secondItem="0oy-zO-2fZ" secondAttribute="centerY" id="abX-9a-uwY"/>
@@ -144,6 +153,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="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>
                                                 </view>
@@ -164,6 +174,7 @@
                                             <outlet property="contentContainer" destination="etn-cW-0fL" id="Csc-aw-fMh"/>
                                             <outlet property="dateLabel" destination="89d-EX-Krm" id="b0e-0A-H0f"/>
                                             <outlet property="markView" destination="Rxe-zz-m6W" id="7oc-i1-cKw"/>
+                                            <outlet property="nwflagView" destination="uN3-ZP-3F9" id="raU-uO-W9t"/>
                                             <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"/>

+ 31 - 0
Redant Drivers/Apex And Drivers/Home/More/RAHomeMoreViewController.m

@@ -104,6 +104,27 @@ typedef enum {
 - (void)registNotification {
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNewOrderNotification:) name:RANotificationHandleOrder object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveReloadNotification:) name:RANotificationReloadHome object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveCheckDetailNofitication:) name:RANotificationCheckDetail object:nil];
+}
+
+#pragma mark - Private
+
+- (void)_checkOrder:(NSString *)orderId {
+    
+    if (orderId) {
+        __block RAHomeOrderModel *model = nil;
+        [self.orderArray enumerateObjectsUsingBlock:^(RAHomeOrderModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+            if ([obj.orderID isEqualToString:orderId]) {
+                model = obj;
+            }
+        }];
+        
+        if (model && model.backendFlag) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                model.backendFlag = NO;
+            });
+        }
+    }
 }
 
 #pragma mark - Lazy
@@ -295,5 +316,15 @@ typedef enum {
     [self loadData];
 }
 
+- (void)receiveCheckDetailNofitication:(NSNotification *)notification {
+    
+    NSDictionary *userInfo = [notification userInfo];
+    if (userInfo) {
+        NSString *orderId = [userInfo objectForKey:@"order_id"];
+        if (orderId) {
+            [self _checkOrder:orderId];
+        }
+    }
+}
 
 @end

+ 2 - 1
Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDataSource.m

@@ -23,7 +23,8 @@
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     
     RAOrderCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAOrderCell" forIndexPath:indexPath];
-
+    cell.isHome = YES;
+    
     RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
     cell.orderModel = order;
     

+ 2 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.h

@@ -31,6 +31,8 @@
 
 - (BOOL)hasMoreOrder;
 
+- (RAHomeOrderModel *)modelForOrder:(NSString *)orderId;
+
 @end
 
 #pragma mark - View Controller

+ 59 - 1
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m

@@ -72,6 +72,19 @@
     return self.totalCount > self.ordersCount;
 }
 
+- (RAHomeOrderModel *)modelForOrder:(NSString *)orderId {
+    if (!orderId) {
+        return nil;
+    }
+    __block RAHomeOrderModel *model = nil;
+    [self.orders enumerateObjectsUsingBlock:^(RAHomeOrderModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+        if ([obj.orderID isEqualToString:orderId]) {
+            model = obj;
+        }
+    }];
+    return model;
+}
+
 @end
 
 #pragma mark - View Controller
@@ -82,6 +95,8 @@
 @property (nonatomic,strong) NSIndexPath *currentIndexPath;
 @property (nonatomic,strong) UIRefreshControl *refreshControl;
 
+@property (nonatomic,assign) NSUInteger messageCount;///<未读消息数量
+
 @end
 
 @implementation RAHomeViewController
@@ -183,6 +198,7 @@
 //    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNewOrderNotification:) name:RANotificationHandleOrder object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveReloadNotification:) name:RANotificationReloadHome object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveCheckDetailNofitication:) name:RANotificationCheckDetail object:nil];
 }
 
 - (void)checkPermission {
@@ -233,6 +249,29 @@
     
 }
 
+#pragma mark - Private
+
+- (void)_checkOrder:(NSString *)orderId {
+    if (orderId) {
+        
+        for (RAHomeSectionModel *section in self.sectionArray) {
+            
+            RAHomeOrderModel *model = [section modelForOrder:orderId];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                
+                if (model && model.backendFlag) {
+                    if (section.backendFlagCount > 0) {
+                        section.backendFlagCount = section.backendFlagCount - 1;
+                    }
+                    model.backendFlag = NO;
+                    self.messageCount = self.messageCount - 1;
+                }
+            });
+        }
+        
+    }
+}
+
 #pragma mark - Action
 
 - (void)uploadListItemClick:(UIBarButtonItem *)sender {
@@ -274,6 +313,13 @@
     _headerView = headerView;
 }
 
+- (void)setMessageCount:(NSUInteger)messageCount {
+    _messageCount = messageCount;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        self.headerView.existNewMessage = messageCount > 0;
+    });
+}
+
 #pragma mark - Getter
 
 - (NSMutableArray *)sectionArray {
@@ -377,7 +423,7 @@
                 strongSelf.headerView.NewOrderCount = newCount;
                 strongSelf.headerView.ProcessingOrderCount = processingCount;
                 strongSelf.headerView.FinishOrderCount = finishCount;
-                strongSelf.headerView.existNewMessage = messageCount > 0;
+                strongSelf.messageCount = messageCount;
                 
                 int result = [[json objectForKey:@"result"] intValue];
                 if (result == RESULT_TRUE) {
@@ -519,6 +565,18 @@
     [self loadData];
 }
 
+- (void)receiveCheckDetailNofitication:(NSNotification *)notification {
+    
+    NSDictionary *userInfo = [notification userInfo];
+    if (userInfo) {
+        NSString *orderId = [userInfo objectForKey:@"order_id"];
+        if (orderId) {
+            [self _checkOrder:orderId];
+        }
+    }
+    
+}
+
 #pragma mark - Header Delegate
 
 - (void)signoutClick:(UIButton *)sender {

+ 1 - 0
Redant Drivers/Apex And Drivers/Home/RAOrderCell.h

@@ -14,5 +14,6 @@
 @property (nonatomic,strong) RAHomeOrderModel *orderModel;
 
 @property (nonatomic,assign) NSUInteger index;
+@property (nonatomic,assign) BOOL isHome;///<是否是Home界面
 
 @end

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

@@ -19,7 +19,8 @@
 @property (strong, nonatomic) IBOutlet UIImageView *markView;
 @property (strong, nonatomic) IBOutlet UIImageView *statusView;
 @property (strong, nonatomic) IBOutlet UILabel *orderType2Label;
-@property (strong, nonatomic) IBOutlet UILabel *indexLabel;
+@property (strong, nonatomic) IBOutlet UILabel *indexLabel; ///< 索引,只有More Order存在
+@property (strong, nonatomic) IBOutlet UIImageView *nwflagView;///<New Order Flag,只有首页存在
 
 @property (nonatomic,strong) UIView *selectionView;
 
@@ -157,6 +158,10 @@
     
     [[[[[[[[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;
+    }
+    
 }
 
 @end

+ 18 - 8
Redant Drivers/Apex And Drivers/Message/RAMessageViewController.m

@@ -47,6 +47,8 @@ typedef enum {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     
+    self.unread = YES;
+    
     [self configNavigationBar];
     [self configTableView];
     
@@ -58,6 +60,20 @@ typedef enum {
     // Dispose of any resources that can be recreated.
 }
 
+#pragma mark - private
+
+- (void)_updateReadItem:(UIBarButtonItem *)item {
+    
+    if (self.unread) {
+        
+        item.title = NSLocalizedString(@"All", nil);
+        
+    } else {
+        
+        item.title = NSLocalizedString(@"Unread", nil);
+    }
+}
+
 #pragma mark - Config
 
 - (void)configTableView {
@@ -89,6 +105,7 @@ typedef enum {
 - (void)configNavigationBar {
     
     UIBarButtonItem *unreadItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Unread", nil) style:UIBarButtonItemStylePlain target:self action:@selector(unreadBtnClick:)];
+    [self _updateReadItem:unreadItem];
     self.navigationItem.rightBarButtonItem = unreadItem;
 }
 
@@ -121,14 +138,7 @@ typedef enum {
 
 - (void)unreadBtnClick:(UIBarButtonItem *)sender {
     self.unread = !self.unread;
-    if (self.unread) {
-        
-        sender.title = NSLocalizedString(@"All", nil);
-        
-    } else {
-        
-        sender.title = NSLocalizedString(@"Unread", nil);
-    }
+    [self _updateReadItem:sender];
     [self reloadData];
 }
 

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

@@ -0,0 +1,20 @@
+//
+//  RAPhotoItemCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RAPhotoItemModel;
+@interface RAPhotoItemCell : UICollectionViewCell
+
++ (NSString *)reuseId;
+
++ (void)regist2CollectionView:(UICollectionView *)collectionView;
+
+@property (nonatomic,weak) RAPhotoItemModel *model;
+
+@end

+ 75 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.m

@@ -0,0 +1,75 @@
+//
+//  RAPhotoItemCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAPhotoItemCell.h"
+#import "RAPhotoModelDelegate.h"
+#import "RAPhotoItemModel.h"
+
+@interface RAPhotoItemCell () <RAPhotoModelDelegate>
+
+@property (nonatomic,strong) IBOutlet UIImageView *photoView;
+
+@end
+
+@implementation RAPhotoItemCell
+
++ (NSString *)reuseId {
+    return @"RAPhotoItemCell";
+}
+
++ (void)regist2CollectionView:(UICollectionView *)collectionView {
+    if (!collectionView) {
+        return;
+    }
+    
+    [collectionView registerNib:[UINib nibWithNibName:@"RAPhotoItemCell" bundle:nil] forCellWithReuseIdentifier:[self reuseId]];
+}
+
+#pragma mark - Super
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    self.photoView.layer.borderWidth = 0.5f;
+    self.photoView.layer.borderColor = [UIColor lightGrayColor].CGColor;
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+#pragma mark - Setter
+
+- (void)setModel:(RAPhotoItemModel *)model {
+    _model.delegate = nil;
+    _model = model;
+    _model.delegate = self;
+    
+    [self refreshUI];
+}
+
+#pragma mark - Model Delegate
+
+- (void)refreshUI {
+    
+    if (_model.photo) {
+        self.photoView.image = _model.photo;
+    } else {
+        self.photoView.image = [UIImage imageNamed:@"btn_add_photo"];
+    }
+}
+
+- (void)unbind {
+    _model = nil;
+    [self refreshUI];
+}
+
+@end

+ 41 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Collection/RAPhotoItemCell.xib

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.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="14283.14"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="RAPhotoItemCell">
+            <rect key="frame" x="0.0" y="0.0" width="90" height="90"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+                <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>
+                </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"/>
+            </constraints>
+            <viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
+            <size key="customSize" width="81" height="91"/>
+            <connections>
+                <outlet property="photoView" destination="f77-2N-GTO" id="BHD-LI-8AE"/>
+            </connections>
+            <point key="canvasLocation" x="157.59999999999999" y="173.16341829085459"/>
+        </collectionViewCell>
+    </objects>
+</document>

+ 17 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Layout/RAPhotoLayout.h

@@ -0,0 +1,17 @@
+//
+//  RAPhotoLayout.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "RAPhotoLayoutDelegate.h"
+
+
+@interface RAPhotoLayout : UICollectionViewLayout
+
+@property (nonatomic,weak) id<RAPhotoLayoutDelegate> delegate;
+
+@end

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

@@ -0,0 +1,61 @@
+//
+//  RAPhotoLayout.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAPhotoLayout.h"
+
+@interface RAPhotoLayout ()
+
+@property (nonatomic,strong) NSArray *attrs;
+
+@end
+
+@implementation RAPhotoLayout
+
+- (CGSize)contentSize {
+    
+    CGFloat height = 0;
+    if (self.delegate) {
+        height = [self.delegate layoutContentHeight];
+    }
+    CGSize size = CGSizeMake(self.collectionView.frame.size.width, height);
+    return size;
+}
+
+- (void)prepareLayout {
+    
+    if (self.delegate) {
+        self.attrs = [self.delegate prepareLayout];
+    }
+}
+
+- (NSArray<UICollectionViewLayoutAttributes *> *)layoutAttributesForElementsInRect:(CGRect)rect {
+    
+    __block NSMutableArray *attrsArr = [NSMutableArray array];
+    [self.attrs enumerateObjectsUsingBlock:^(UICollectionViewLayoutAttributes *  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
+        if (CGRectIntersectsRect(rect, obj.frame)) {
+            [attrsArr addObject:obj];
+        }
+    }];
+    
+    return attrsArr;
+}
+
+- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath {
+    UICollectionViewLayoutAttributes *itemtAttrs = [self.attrs objectAtIndex:indexPath.row];
+    return itemtAttrs;
+}
+
+- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds {
+    CGRect oldBounds = self.collectionView.bounds;
+    if (!CGSizeEqualToSize(newBounds.size, oldBounds.size)) {
+        return YES;
+    }
+    return NO;
+}
+
+@end

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

@@ -0,0 +1,19 @@
+//
+//  RAPhotoItemModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "RAPhotoModelDelegate.h"
+
+@interface RAPhotoItemModel : NSObject
+
+@property (nonatomic,strong) UIImage *photo;
+@property (nonatomic,weak) id<RAPhotoModelDelegate> delegate;
+
+
+@end
+

+ 27 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Model/RAPhotoItemModel.m

@@ -0,0 +1,27 @@
+//
+//  RAPhotoItemModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAPhotoItemModel.h"
+
+@implementation RAPhotoItemModel
+
+- (void)setPhoto:(UIImage *)photo {
+    _photo = photo;
+    if (_delegate && [_delegate respondsToSelector:@selector(refreshUI)]) {
+        [_delegate refreshUI];
+    }
+}
+
+- (void)setDelegate:(id<RAPhotoModelDelegate>)delegate {
+    if (_delegate && [_delegate respondsToSelector:@selector(unbind)]) {
+        [_delegate unbind];
+    }
+    _delegate = delegate;
+}
+
+@end

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

@@ -0,0 +1,27 @@
+//
+//  RAPhotoModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "RAPhotoModelDelegate.h"
+#import "RAphotoLayoutDelegate.h"
+
+@class RAPhotoLayout,RAPhotoItemModel;
+@interface RAPhotoModel : NSObject <RAPhotoLayoutDelegate>
+
+@property (nonatomic,assign)    NSInteger   type;
+@property (nonatomic,  copy)    NSString    *key;
+@property (nonatomic,  copy)    NSString    *title;
+@property (nonatomic,assign)    BOOL        required;
+@property (nonatomic,assign)    CGFloat     width;
+@property (nonatomic,strong)    NSArray<RAPhotoItemModel *>     *photos;
+
+@property (nonatomic,assign,readonly)    CGFloat     height;
+
+@property (nonatomic,weak) id<RAPhotoModelDelegate> delegate;
+
+@end

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

@@ -0,0 +1,114 @@
+//
+//  RAPhotoModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAPhotoModel.h"
+#import "RAPhotoLayout.h"
+#import "RAPhotoItemModel.h"
+
+@interface RAPhotoModel ()
+
+@property (nonatomic,strong) NSArray *layoutAttrs;
+@property (nonatomic,assign) CGFloat contentHeight;
+
+@end
+
+@implementation RAPhotoModel
+
+#pragma mark - Setter
+
+- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues {
+    [super setValuesForKeysWithDictionary:keyedValues];
+}
+
+- (void)setPhotos:(NSArray *)photos {
+    NSMutableArray *arr = [NSMutableArray array];
+    for (NSDictionary *photo in photos) {
+        RAPhotoItemModel *model = [RAPhotoItemModel new];
+        [model setValuesForKeysWithDictionary:photo];
+        [arr addObject:model];
+    }
+    _photos = [arr copy];
+    
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        [self prepareLayout];
+    });
+}
+
+- (void)setDelegate:(id<RAPhotoModelDelegate>)delegate {
+    if (_delegate && [_delegate respondsToSelector:@selector(unbind)]) {
+        [_delegate unbind];
+    }
+    _delegate = delegate;
+}
+
+#pragma mark - Getter
+
+- (CGFloat)height {
+    return self.contentHeight + 36.5f;
+}
+
+- (CGFloat)width {
+    if (_width <= 0) {
+        self.width = [UIScreen mainScreen].bounds.size.width;
+    }
+    return _width;
+}
+
+- (CGFloat)contentHeight {
+    if (_contentHeight <= 0) {
+        [self prepareLayout];
+    }
+    return _contentHeight;
+}
+
+#pragma mark - Layout Delegate
+
+- (NSArray *)prepareLayout {
+    
+    NSUInteger itemCount = self.photos.count;
+    if (itemCount == 0) {
+        self.contentHeight = 0;
+        return 0;
+    }
+    
+    if (self.layoutAttrs) {
+        return self.layoutAttrs;
+    }
+    
+    NSMutableArray *attrs = [NSMutableArray arrayWithCapacity:itemCount];
+    CGFloat interval = 5.0f;
+    NSUInteger colCount = 4;
+    CGFloat width = (self.width - (interval * (colCount + 1))) / colCount;
+    CGFloat height = width;
+    for (int i = 0; i < itemCount; i++) {
+        int col = i % colCount;
+        int row = i / colCount;
+        
+        int x = interval + (interval + width) * col;
+        int y = interval + (interval + height) * row;
+        
+        CGRect frame = CGRectMake(x, y, width, height);
+        
+        NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:0];
+        UICollectionViewLayoutAttributes *itemAttrs = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
+        itemAttrs.frame = frame;
+        [attrs addObject:itemAttrs];
+        
+        self.contentHeight = CGRectGetMaxY(frame);
+    }
+    self.layoutAttrs = [attrs copy];
+    
+    return self.layoutAttrs;
+}
+
+- (CGFloat)layoutContentHeight {
+    return self.contentHeight;
+}
+
+
+@end

+ 22 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Protocol/RAPhotoLayoutDelegate.h

@@ -0,0 +1,22 @@
+//
+//  RAPhotoLayoutDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#ifndef RAPhotoLayoutDelegate_h
+#define RAPhotoLayoutDelegate_h
+
+#import <UIKit/UIkit.h>
+
+@protocol RAPhotoLayoutDelegate <NSObject>
+
+@required
+- (NSArray *)prepareLayout;
+- (CGFloat)layoutContentHeight;
+
+@end
+
+#endif /* RAPhotoLayoutDelegate_h */

+ 23 - 0
Redant Drivers/Apex And Drivers/PhotoCell/Protocol/RAPhotoModelDelegate.h

@@ -0,0 +1,23 @@
+//
+//  RAPhotoModelDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#ifndef RAPhotoModelDelegate_h
+#define RAPhotoModelDelegate_h
+
+#import <Foundation/Foundation.h>
+
+@protocol RAPhotoModelDelegate <NSObject>
+
+@optional
+- (void)refreshUI;
+- (void)unbind; //model被赋予cell_1时,可能cell_0还持有model
+
+@end
+
+
+#endif /* RAPhotoModelDelegate_h */

+ 22 - 0
Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.h

@@ -0,0 +1,22 @@
+//
+//  RAPhotoCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@class RAPhotoModel;
+@interface RAPhotoCell : UITableViewCell
+
++ (NSString *)reuseId;
+
++ (void)regist2TableView:(UITableView *)tableView;
+
+@property (nonatomic,weak) RAPhotoModel *model;
+
+@end
+

+ 132 - 0
Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.m

@@ -0,0 +1,132 @@
+//
+//  RAPhotoCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAPhotoCell.h"
+#import "RAPhotoItemCell.h"
+#import "RAPhotoModel.h"
+#import "RAPhotoModelDelegate.h"
+#import "RAPhotoLayout.h"
+
+@interface RAPhotoCell ()<UICollectionViewDelegate,UICollectionViewDataSource,RAPhotoModelDelegate>
+
+@property (nonatomic,strong) IBOutlet UILabel *titleLabel;
+@property (nonatomic,strong) IBOutlet UILabel *requiredLabel;
+@property (nonatomic,strong) IBOutlet UICollectionView *photoCollectionView;
+
+@property (nonatomic,strong) RAPhotoLayout *photoLayout;
+
+@end
+
+@implementation RAPhotoCell
+
++ (NSString *)reuseId {
+    return @"RAPhotoCell";
+}
+
++ (void)regist2TableView:(UITableView *)tableView {
+    if (tableView == nil) {
+        return;
+    }
+    
+    [tableView registerNib:[UINib nibWithNibName:@"RAPhotoCell" bundle:nil] forCellReuseIdentifier:self.reuseId];
+}
+
+#pragma mark - Super
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    [RAPhotoItemCell regist2CollectionView:self.photoCollectionView];
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
+        
+    }
+    return self;
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+#pragma mark - Setter
+
+- (void)setModel:(RAPhotoModel *)model {
+    _model.delegate = nil;
+    _model = model;
+    _model.delegate = self;
+    
+    self.photoLayout.delegate = _model;
+    
+    [self refreshUI];
+}
+
+#pragma mark - Getter
+
+- (RAPhotoLayout *)photoLayout {
+    if (!_photoLayout) {
+        _photoLayout = [[RAPhotoLayout alloc] init];
+    }
+    return _photoLayout;
+}
+
+#pragma mark - Model Delegate
+
+- (void)refreshUI {
+    
+    NSString *title = _model.title;
+    BOOL required = _model.required;
+    
+    self.titleLabel.text = title;
+    self.requiredLabel.hidden = !required;
+    
+    [self.photoCollectionView reloadData];
+}
+
+- (void)unbind {
+    _model = nil;
+    [self refreshUI];
+}
+
+#pragma mark - CollectionView DataSource
+
+- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
+    return 1;
+}
+
+- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
+    NSInteger count = self.model.photos.count;
+    return count;
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAPhotoItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:RAPhotoItemCell.reuseId forIndexPath:indexPath];
+    RAPhotoItemModel *model = [self.model.photos objectAtIndex:indexPath.row];
+    cell.model = model;
+    
+    return cell;
+}
+
+#pragma mark - CollectionView Delegate
+
+- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
+    
+}
+
+@end

+ 68 - 0
Redant Drivers/Apex And Drivers/PhotoCell/RAPhotoCell.xib

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.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="14283.14"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="RAPhotoCell" rowHeight="260" id="KGk-i7-Jjw" customClass="RAPhotoCell">
+            <rect key="frame" x="0.0" y="0.0" width="465" height="260"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="465" height="259.5"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Container Photo" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v6o-oB-zX2">
+                        <rect key="frame" x="5" y="5" width="133" height="21"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="21" id="Rch-FI-l98"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+                        <nil key="textColor"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="*" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vHy-5x-FBq">
+                        <rect key="frame" x="143" y="2" width="8" height="21"/>
+                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                        <color key="textColor" red="1" green="0.1047433005" blue="0.075207091899999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <nil key="highlightedColor"/>
+                    </label>
+                    <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="6sP-8x-XRt">
+                        <rect key="frame" x="0.0" y="31" width="465" height="223.5"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <collectionViewLayout key="collectionViewLayout" id="E8C-6x-vkJ"/>
+                        <connections>
+                            <outlet property="dataSource" destination="KGk-i7-Jjw" id="1a0-SN-l2q"/>
+                            <outlet property="delegate" destination="KGk-i7-Jjw" id="9L2-gi-CaW"/>
+                        </connections>
+                    </collectionView>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="6sP-8x-XRt" secondAttribute="bottom" constant="5" id="5bm-57-9US"/>
+                    <constraint firstItem="6sP-8x-XRt" firstAttribute="top" secondItem="v6o-oB-zX2" secondAttribute="bottom" constant="5" id="EpF-u0-ea7"/>
+                    <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="vHy-5x-FBq" secondAttribute="trailing" constant="5" id="PXq-0U-Yqp"/>
+                    <constraint firstItem="v6o-oB-zX2" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="5" id="SHR-4M-1Zq"/>
+                    <constraint firstItem="v6o-oB-zX2" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="dhs-Mi-jss"/>
+                    <constraint firstItem="6sP-8x-XRt" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="ind-eD-Et8"/>
+                    <constraint firstItem="vHy-5x-FBq" firstAttribute="leading" secondItem="v6o-oB-zX2" secondAttribute="trailing" constant="5" id="lAC-GK-Ro0"/>
+                    <constraint firstAttribute="trailing" secondItem="6sP-8x-XRt" secondAttribute="trailing" id="tLF-9O-6fZ"/>
+                    <constraint firstItem="vHy-5x-FBq" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="2" id="vF2-RM-tbg"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+            <connections>
+                <outlet property="photoCollectionView" destination="6sP-8x-XRt" id="Tag-Ll-8jj"/>
+                <outlet property="requiredLabel" destination="vHy-5x-FBq" id="YPK-XP-CNA"/>
+                <outlet property="titleLabel" destination="v6o-oB-zX2" id="Rte-DG-L8i"/>
+            </connections>
+            <point key="canvasLocation" x="248.80000000000001" y="238.38080959520241"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 1 - 0
Redant Drivers/Apex And Drivers/RANotificationNameCenter.h

@@ -14,3 +14,4 @@ FOUNDATION_EXTERN NSString * const RANotificationReloadHome;
 FOUNDATION_EXTERN NSString * const RANotificationLogout;
 FOUNDATION_EXTERN NSString * const RANotificationStopLocation;
 FOUNDATION_EXTERN NSString * const RANotificationStartLocation;
+FOUNDATION_EXTERN NSString * const RANotificationCheckDetail;

+ 1 - 0
Redant Drivers/Apex And Drivers/RANotificationNameCenter.m

@@ -14,3 +14,4 @@ NSString * const RANotificationReloadHome       = @"RANotificationReloadHome";
 NSString * const RANotificationLogout           = @"RANotificationLogout";
 NSString * const RANotificationStartLocation    = @"RANotificationStartLocation";
 NSString * const RANotificationStopLocation     = @"RANotificationStopLocation";
+NSString * const RANotificationCheckDetail      = @"RANotificationCheckDetail";

+ 10 - 4
Redant Drivers/Apex And Drivers/Update/Cell/RAEditDateCell.m

@@ -59,6 +59,7 @@
     self.titleLabel.text = self.model.title;
     self.startLabel.hidden = !self.model.required;
     self.dateLabel.text = self.model.display;
+    self.datePickerBtn.hidden = !self.model.editable;
 }
 
 - (void)unbind {
@@ -68,16 +69,21 @@
 
 #pragma mark - Action
 
-- (void)tapClick:(UITapGestureRecognizer *)tap {
+- (void)_clickDate {
+    if (!self.model.editable) {
+        return;
+    }
     if (self.delegate && [self.delegate respondsToSelector:@selector(dateCell:didClickForModel:)]) {
         [self.delegate dateCell:self didClickForModel:self.model];
     }
 }
 
+- (void)tapClick:(UITapGestureRecognizer *)tap {
+    [self _clickDate];
+}
+
 - (IBAction)datePickerBtnClick:(UIButton *)sender {
-    if (self.delegate && [self.delegate respondsToSelector:@selector(dateCell:didClickForModel:)]) {
-        [self.delegate dateCell:self didClickForModel:self.model];
-    }
+    [self _clickDate];
 }
 
 @end

+ 2 - 1
Redant Drivers/Apex And Drivers/Update/Model/RAEditBaseModel.h

@@ -15,7 +15,8 @@ typedef enum {
     RAEditTypeMultInput = 2,
     RAEditTypePhoto = 3,
     RAEditTypeSignature = 4,
-    RAEditTypeDate = 5
+    RAEditTypeDate = 5,
+    RAEditTypeMultPhoto = 6
     
 } RAEditType;
 

+ 1 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditDateModel.h

@@ -23,6 +23,7 @@ typedef enum {
 @property (nonatomic,copy,readonly) NSString *value;
 @property (nonatomic,copy) NSString *display;
 @property (nonatomic,assign) RAEditTypeMode mode;
+@property (nonatomic,assign) BOOL editable;
 
 @end
 

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

@@ -0,0 +1,21 @@
+//
+//  RAEditMultPhotoModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditBaseModel.h"
+
+@class RAPhotoModel;
+@interface RAEditMultPhotoModel : RAEditBaseModel
+
+@property (nonatomic,assign)    CGFloat     width;
+@property (nonatomic,strong)    NSArray     *photos;
+
+@property (nonatomic,strong,readonly) RAPhotoModel *model;
+
+@end
+
+

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

@@ -0,0 +1,63 @@
+//
+//  RAEditMultPhotoModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/10/30.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditMultPhotoModel.h"
+#import "RAPhotoModel.h"
+
+@interface RAEditMultPhotoModel()
+
+@property (nonatomic,strong) RAPhotoModel *mapModle;
+
+@end
+
+@implementation RAEditMultPhotoModel
+
+- (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
+
+- (RAEditType)type {
+    return (RAEditType)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;
+}
+
+@end

+ 9 - 0
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.m

@@ -16,6 +16,8 @@
 #import "RAEditPhotoModel.h"
 #import "RAEditSignatureModel.h"
 #import "RAEditDateModel.h"
+#import "RAEditMultPhotoModel.h"
+#import "RAPhotoCell.h"
 
 #import "RAQRCodeScannerViewController.h"
 #import "RACameraViewController.h"
@@ -89,6 +91,13 @@
             return cell;
         }
             break;
+        case RAEditTypeMultPhoto: {
+            RAEditMultPhotoModel *multPhotoModel = (RAEditMultPhotoModel *)model;
+            RAPhotoCell *cell = [tableView dequeueReusableCellWithIdentifier:RAPhotoCell.reuseId forIndexPath:indexPath];
+            cell.model = multPhotoModel.model;
+            return cell;
+        }
+            break;
             
         default:
             break;

+ 22 - 1
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.m

@@ -15,6 +15,7 @@
 #import "RAEditPhotoModel.h"
 #import "RAEditSignatureModel.h"
 #import "RAEditDateModel.h"
+#import "RAEditMultPhotoModel.h"
 
 #import "RAProgressHUD.h"
 #import "ZipArchive.h"
@@ -23,6 +24,7 @@
 #import "RAEmptyView.h"
 #import "RAEditRequiredAlert.h"
 #import <CoreLocation/CoreLocation.h>
+#import "RAPhotoCell.h"
 
 @interface RAEditSectionModel : NSObject
 
@@ -39,7 +41,18 @@
 
 - (void)setItems:(NSArray<RAEditBaseModel *> *)items {
     
-    NSArray *tmpItems = 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"
+                              }];
+    });
+    
     NSMutableArray *itemArr = [NSMutableArray arrayWithCapacity:items.count];
     for (int i = 0; i < tmpItems.count; i++) {
         NSDictionary *item = [tmpItems objectAtIndex:i];
@@ -102,6 +115,12 @@
             model = [RAEditDateModel new];
         }
             break;
+        case RAEditTypeMultPhoto: {
+            RAEditMultPhotoModel *photoModel = [RAEditMultPhotoModel new];
+            photoModel.width = [UIScreen mainScreen].bounds.size.width;
+            model = photoModel;
+        }
+            break;
             
         default: {
             model = nil;
@@ -194,6 +213,8 @@
     self.orderEditTableView.emptyView = [RAEmptyView emptyViewWithTapBlk:^(id sender) {
         [weakSelf loadData];
     }];
+    
+    [RAPhotoCell regist2TableView:self.orderEditTableView];
 }
 
 - (void)configureNavigationBar {