Explorar el Código

1.完成iOS Apex & Drivers Order Detail按钮事件处理。
2.完成iOS Apex & Drivers Update Order。

Pen Li hace 8 años
padre
commit
7dafa9ddd0
Se han modificado 58 ficheros con 1974 adiciones y 32 borrados
  1. 142 0
      Redant Drivers/Apex And Drivers.xcodeproj/project.pbxproj
  2. 16 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionCell.h
  3. 45 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionCell.m
  4. 16 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionModel.h
  5. 13 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionModel.m
  6. 13 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDataSource.h
  7. 32 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDataSource.m
  8. 13 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDelegate.h
  9. 29 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDelegate.m
  10. 24 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController.h
  11. 43 0
      Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController.m
  12. 10 1
      Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.h
  13. 12 2
      Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.m
  14. 2 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.h
  15. 10 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.m
  16. 9 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell.h
  17. 9 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.h
  18. 4 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.m
  19. 81 11
      Redant Drivers/Apex And Drivers/Detail/Detail.storyboard
  20. 8 0
      Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.h
  21. 14 0
      Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.m
  22. 10 0
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailActionCollectionModel.m
  23. 4 1
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.h
  24. 121 2
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.m
  25. 4 4
      Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m
  26. 46 3
      Redant Drivers/Apex And Drivers/FakeData/fake_order_detail.json
  27. 47 0
      Redant Drivers/Apex And Drivers/FakeData/fake_order_edit.json
  28. 0 1
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController+HomeTableDelegate.m
  29. 4 0
      Redant Drivers/Apex And Drivers/Info.plist
  30. 3 1
      Redant Drivers/Apex And Drivers/RADataProvider.h
  31. 15 1
      Redant Drivers/Apex And Drivers/RADataProvider.m
  32. 18 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditLabelCell.h
  33. 48 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditLabelCell.m
  34. 26 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditMultInputCell.h
  35. 72 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditMultInputCell.m
  36. 16 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditPhotoCell.h
  37. 64 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditPhotoCell.m
  38. 26 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditScanInputCell.h
  39. 86 0
      Redant Drivers/Apex And Drivers/Update/Cell/RAEditScanInputCell.m
  40. 214 0
      Redant Drivers/Apex And Drivers/Update/Edit.storyboard
  41. 26 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditBaseModel.h
  42. 17 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditBaseModel.m
  43. 16 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditInputModel.h
  44. 17 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditInputModel.m
  45. 15 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditLabelModel.h
  46. 17 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditLabelModel.m
  47. 15 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditMultInputModel.h
  48. 17 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditMultInputModel.m
  49. 16 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditPhotoModel.h
  50. 18 0
      Redant Drivers/Apex And Drivers/Update/Model/RAEditPhotoModel.m
  51. 15 0
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.h
  52. 101 0
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.m
  53. 13 0
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDelegate.h
  54. 38 0
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDelegate.m
  55. 25 0
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.h
  56. 239 0
      Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.m
  57. BIN
      Redant Drivers/Barcode_h.png
  58. BIN
      Redant Drivers/Barcode_n.png

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

@@ -31,6 +31,27 @@
 		42529D3D20C0EA3F000C0F4D /* ZipArchive.mm in Sources */ = {isa = PBXBuildFile; fileRef = 42529D3820C0EA3F000C0F4D /* ZipArchive.mm */; };
 		42529D4020C0EA59000C0F4D /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D3F20C0EA59000C0F4D /* Reachability.m */; };
 		42529D4320C0EB01000C0F4D /* RANetworkTaskDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42529D4220C0EB01000C0F4D /* RANetworkTaskDelegate.m */; };
+		4255EC6520C4E24500E5DA24 /* RADetailActionSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC6420C4E24500E5DA24 /* RADetailActionSelectionViewController.m */; };
+		4255EC6820C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC6720C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.m */; };
+		4255EC6B20C4E28400E5DA24 /* RADetailActionSelectionViewController+TableDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC6A20C4E28400E5DA24 /* RADetailActionSelectionViewController+TableDelegate.m */; };
+		4255EC6E20C4E29B00E5DA24 /* RADetailActionSelectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC6D20C4E29B00E5DA24 /* RADetailActionSelectionCell.m */; };
+		4255EC7120C4E2EC00E5DA24 /* RADetailActionSelectionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC7020C4E2EC00E5DA24 /* RADetailActionSelectionModel.m */; };
+		4255EC7420C5096400E5DA24 /* RAOrderEditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC7320C5096400E5DA24 /* RAOrderEditViewController.m */; };
+		4255EC7620C5097200E5DA24 /* Edit.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4255EC7520C5097200E5DA24 /* Edit.storyboard */; };
+		4255EC7920C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC7820C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m */; };
+		4255EC7C20C511F000E5DA24 /* RAOrderEditViewController+TableDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC7B20C511F000E5DA24 /* RAOrderEditViewController+TableDelegate.m */; };
+		4255EC8020C518E300E5DA24 /* RAEditScanInputCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC7F20C518E300E5DA24 /* RAEditScanInputCell.m */; };
+		4255EC8220C51A5000E5DA24 /* Barcode_n.png in Resources */ = {isa = PBXBuildFile; fileRef = 4255EC8120C51A4F00E5DA24 /* Barcode_n.png */; };
+		4255EC8720C51D4900E5DA24 /* RAEditPhotoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC8620C51D4900E5DA24 /* RAEditPhotoCell.m */; };
+		4255EC8A20C5211700E5DA24 /* RAEditMultInputCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC8920C5211700E5DA24 /* RAEditMultInputCell.m */; };
+		4255EC8D20C5232C00E5DA24 /* RAEditLabelCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC8C20C5232C00E5DA24 /* RAEditLabelCell.m */; };
+		4255EC8F20C5260400E5DA24 /* fake_order_edit.json in Resources */ = {isa = PBXBuildFile; fileRef = 4255EC8E20C5260400E5DA24 /* fake_order_edit.json */; };
+		4255EC9320C526FE00E5DA24 /* RAEditBaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC9220C526FE00E5DA24 /* RAEditBaseModel.m */; };
+		4255EC9620C5284C00E5DA24 /* RAEditLabelModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC9520C5284C00E5DA24 /* RAEditLabelModel.m */; };
+		4255EC9920C5285C00E5DA24 /* RAEditInputModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC9820C5285C00E5DA24 /* RAEditInputModel.m */; };
+		4255EC9C20C5286D00E5DA24 /* RAEditMultInputModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC9B20C5286D00E5DA24 /* RAEditMultInputModel.m */; };
+		4255EC9F20C5287D00E5DA24 /* RAEditPhotoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4255EC9E20C5287D00E5DA24 /* RAEditPhotoModel.m */; };
+		4255ECA120C5400400E5DA24 /* Barcode_h.png in Resources */ = {isa = PBXBuildFile; fileRef = 4255ECA020C5400300E5DA24 /* Barcode_h.png */; };
 		4280034120C0F146004D4F50 /* AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033920C0F145004D4F50 /* AESCrypt.m */; };
 		4280034220C0F146004D4F50 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 4280033A20C0F145004D4F50 /* LICENSE */; };
 		4280034320C0F146004D4F50 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4280033C20C0F145004D4F50 /* NSData+Base64.m */; };
@@ -112,6 +133,44 @@
 		42529D3F20C0EA59000C0F4D /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Reachability.m; path = "../../RedAnt ERP Mobile/common/Reachability.m"; sourceTree = "<group>"; };
 		42529D4120C0EB01000C0F4D /* RANetworkTaskDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RANetworkTaskDelegate.h; path = ../../common/upload/RANetworkTaskDelegate.h; sourceTree = "<group>"; };
 		42529D4220C0EB01000C0F4D /* RANetworkTaskDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RANetworkTaskDelegate.m; path = ../../common/upload/RANetworkTaskDelegate.m; sourceTree = "<group>"; };
+		4255EC6320C4E24500E5DA24 /* RADetailActionSelectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionSelectionViewController.h; sourceTree = "<group>"; };
+		4255EC6420C4E24500E5DA24 /* RADetailActionSelectionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionSelectionViewController.m; sourceTree = "<group>"; };
+		4255EC6620C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RADetailActionSelectionViewController+TableDataSource.h"; sourceTree = "<group>"; };
+		4255EC6720C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RADetailActionSelectionViewController+TableDataSource.m"; sourceTree = "<group>"; };
+		4255EC6920C4E28400E5DA24 /* RADetailActionSelectionViewController+TableDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RADetailActionSelectionViewController+TableDelegate.h"; sourceTree = "<group>"; };
+		4255EC6A20C4E28400E5DA24 /* RADetailActionSelectionViewController+TableDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RADetailActionSelectionViewController+TableDelegate.m"; sourceTree = "<group>"; };
+		4255EC6C20C4E29B00E5DA24 /* RADetailActionSelectionCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionSelectionCell.h; sourceTree = "<group>"; };
+		4255EC6D20C4E29B00E5DA24 /* RADetailActionSelectionCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionSelectionCell.m; sourceTree = "<group>"; };
+		4255EC6F20C4E2EC00E5DA24 /* RADetailActionSelectionModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RADetailActionSelectionModel.h; sourceTree = "<group>"; };
+		4255EC7020C4E2EC00E5DA24 /* RADetailActionSelectionModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RADetailActionSelectionModel.m; sourceTree = "<group>"; };
+		4255EC7220C5096400E5DA24 /* RAOrderEditViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAOrderEditViewController.h; sourceTree = "<group>"; };
+		4255EC7320C5096400E5DA24 /* RAOrderEditViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAOrderEditViewController.m; sourceTree = "<group>"; };
+		4255EC7520C5097200E5DA24 /* Edit.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Edit.storyboard; sourceTree = "<group>"; };
+		4255EC7720C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAOrderEditViewController+TableDataSource.h"; sourceTree = "<group>"; };
+		4255EC7820C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAOrderEditViewController+TableDataSource.m"; sourceTree = "<group>"; };
+		4255EC7A20C511F000E5DA24 /* RAOrderEditViewController+TableDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RAOrderEditViewController+TableDelegate.h"; sourceTree = "<group>"; };
+		4255EC7B20C511F000E5DA24 /* RAOrderEditViewController+TableDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RAOrderEditViewController+TableDelegate.m"; sourceTree = "<group>"; };
+		4255EC7E20C518E300E5DA24 /* RAEditScanInputCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditScanInputCell.h; sourceTree = "<group>"; };
+		4255EC7F20C518E300E5DA24 /* RAEditScanInputCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditScanInputCell.m; sourceTree = "<group>"; };
+		4255EC8120C51A4F00E5DA24 /* Barcode_n.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Barcode_n.png; sourceTree = "<group>"; };
+		4255EC8520C51D4900E5DA24 /* RAEditPhotoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditPhotoCell.h; sourceTree = "<group>"; };
+		4255EC8620C51D4900E5DA24 /* RAEditPhotoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditPhotoCell.m; sourceTree = "<group>"; };
+		4255EC8820C5211700E5DA24 /* RAEditMultInputCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditMultInputCell.h; sourceTree = "<group>"; };
+		4255EC8920C5211700E5DA24 /* RAEditMultInputCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditMultInputCell.m; sourceTree = "<group>"; };
+		4255EC8B20C5232C00E5DA24 /* RAEditLabelCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditLabelCell.h; sourceTree = "<group>"; };
+		4255EC8C20C5232C00E5DA24 /* RAEditLabelCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditLabelCell.m; sourceTree = "<group>"; };
+		4255EC8E20C5260400E5DA24 /* fake_order_edit.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = fake_order_edit.json; sourceTree = "<group>"; };
+		4255EC9120C526FE00E5DA24 /* RAEditBaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditBaseModel.h; sourceTree = "<group>"; };
+		4255EC9220C526FE00E5DA24 /* RAEditBaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditBaseModel.m; sourceTree = "<group>"; };
+		4255EC9420C5284C00E5DA24 /* RAEditLabelModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditLabelModel.h; sourceTree = "<group>"; };
+		4255EC9520C5284C00E5DA24 /* RAEditLabelModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditLabelModel.m; sourceTree = "<group>"; };
+		4255EC9720C5285C00E5DA24 /* RAEditInputModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditInputModel.h; sourceTree = "<group>"; };
+		4255EC9820C5285C00E5DA24 /* RAEditInputModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditInputModel.m; sourceTree = "<group>"; };
+		4255EC9A20C5286D00E5DA24 /* RAEditMultInputModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditMultInputModel.h; sourceTree = "<group>"; };
+		4255EC9B20C5286D00E5DA24 /* RAEditMultInputModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditMultInputModel.m; sourceTree = "<group>"; };
+		4255EC9D20C5287D00E5DA24 /* RAEditPhotoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAEditPhotoModel.h; sourceTree = "<group>"; };
+		4255EC9E20C5287D00E5DA24 /* RAEditPhotoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RAEditPhotoModel.m; sourceTree = "<group>"; };
+		4255ECA020C5400300E5DA24 /* Barcode_h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Barcode_h.png; sourceTree = "<group>"; };
 		4280033520C0EE1E004D4F50 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
 		4280033620C0F0C6004D4F50 /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
 		4280033820C0F145004D4F50 /* AESCrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AESCrypt.h; sourceTree = "<group>"; };
@@ -320,6 +379,55 @@
 			path = minizip;
 			sourceTree = "<group>";
 		};
+		4255EC6220C4E21B00E5DA24 /* Action Selection */ = {
+			isa = PBXGroup;
+			children = (
+				4255EC6320C4E24500E5DA24 /* RADetailActionSelectionViewController.h */,
+				4255EC6420C4E24500E5DA24 /* RADetailActionSelectionViewController.m */,
+				4255EC6620C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.h */,
+				4255EC6720C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.m */,
+				4255EC6920C4E28400E5DA24 /* RADetailActionSelectionViewController+TableDelegate.h */,
+				4255EC6A20C4E28400E5DA24 /* RADetailActionSelectionViewController+TableDelegate.m */,
+				4255EC6C20C4E29B00E5DA24 /* RADetailActionSelectionCell.h */,
+				4255EC6D20C4E29B00E5DA24 /* RADetailActionSelectionCell.m */,
+				4255EC6F20C4E2EC00E5DA24 /* RADetailActionSelectionModel.h */,
+				4255EC7020C4E2EC00E5DA24 /* RADetailActionSelectionModel.m */,
+			);
+			path = "Action Selection";
+			sourceTree = "<group>";
+		};
+		4255EC7D20C518B000E5DA24 /* Cell */ = {
+			isa = PBXGroup;
+			children = (
+				4255EC7E20C518E300E5DA24 /* RAEditScanInputCell.h */,
+				4255EC7F20C518E300E5DA24 /* RAEditScanInputCell.m */,
+				4255EC8520C51D4900E5DA24 /* RAEditPhotoCell.h */,
+				4255EC8620C51D4900E5DA24 /* RAEditPhotoCell.m */,
+				4255EC8820C5211700E5DA24 /* RAEditMultInputCell.h */,
+				4255EC8920C5211700E5DA24 /* RAEditMultInputCell.m */,
+				4255EC8B20C5232C00E5DA24 /* RAEditLabelCell.h */,
+				4255EC8C20C5232C00E5DA24 /* RAEditLabelCell.m */,
+			);
+			path = Cell;
+			sourceTree = "<group>";
+		};
+		4255EC9020C526E600E5DA24 /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				4255EC9120C526FE00E5DA24 /* RAEditBaseModel.h */,
+				4255EC9220C526FE00E5DA24 /* RAEditBaseModel.m */,
+				4255EC9420C5284C00E5DA24 /* RAEditLabelModel.h */,
+				4255EC9520C5284C00E5DA24 /* RAEditLabelModel.m */,
+				4255EC9720C5285C00E5DA24 /* RAEditInputModel.h */,
+				4255EC9820C5285C00E5DA24 /* RAEditInputModel.m */,
+				4255EC9A20C5286D00E5DA24 /* RAEditMultInputModel.h */,
+				4255EC9B20C5286D00E5DA24 /* RAEditMultInputModel.m */,
+				4255EC9D20C5287D00E5DA24 /* RAEditPhotoModel.h */,
+				4255EC9E20C5287D00E5DA24 /* RAEditPhotoModel.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
 		4280033720C0F145004D4F50 /* AES */ = {
 			isa = PBXGroup;
 			children = (
@@ -340,6 +448,7 @@
 		42D8B8A120C224EE001C125F /* FakeData */ = {
 			isa = PBXGroup;
 			children = (
+				4255EC8E20C5260400E5DA24 /* fake_order_edit.json */,
 				42D8B8DF20C28755001C125F /* fake_order_detail.json */,
 				42D8B8A220C2253E001C125F /* fake_order_list.json */,
 			);
@@ -349,6 +458,7 @@
 		42D8B8A420C23D69001C125F /* Detail */ = {
 			isa = PBXGroup;
 			children = (
+				4255EC6220C4E21B00E5DA24 /* Action Selection */,
 				42D8B8BC20C24A77001C125F /* Model */,
 				42D8B8AB20C245A9001C125F /* Cell */,
 				42D8B8A620C23DD9001C125F /* RAOrderDetailViewController.h */,
@@ -365,6 +475,15 @@
 		42D8B8A520C23D75001C125F /* Update */ = {
 			isa = PBXGroup;
 			children = (
+				4255EC9020C526E600E5DA24 /* Model */,
+				4255EC7D20C518B000E5DA24 /* Cell */,
+				4255EC7520C5097200E5DA24 /* Edit.storyboard */,
+				4255EC7220C5096400E5DA24 /* RAOrderEditViewController.h */,
+				4255EC7320C5096400E5DA24 /* RAOrderEditViewController.m */,
+				4255EC7720C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.h */,
+				4255EC7820C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m */,
+				4255EC7A20C511F000E5DA24 /* RAOrderEditViewController+TableDelegate.h */,
+				4255EC7B20C511F000E5DA24 /* RAOrderEditViewController+TableDelegate.m */,
 			);
 			path = Update;
 			sourceTree = "<group>";
@@ -430,6 +549,8 @@
 		71EAA32520B9571B002F003C = {
 			isa = PBXGroup;
 			children = (
+				4255EC8120C51A4F00E5DA24 /* Barcode_n.png */,
+				4255ECA020C5400300E5DA24 /* Barcode_h.png */,
 				71EAA33020B9571B002F003C /* Apex And Drivers */,
 				71EAA32F20B9571B002F003C /* Products */,
 			);
@@ -531,11 +652,15 @@
 			buildActionMask = 2147483647;
 			files = (
 				71EAA33E20B95720002F003C /* LaunchScreen.storyboard in Resources */,
+				4255EC8220C51A5000E5DA24 /* Barcode_n.png in Resources */,
+				4255ECA120C5400400E5DA24 /* Barcode_h.png in Resources */,
 				42D8B8A320C2253E001C125F /* fake_order_list.json in Resources */,
 				42D8B8E020C28755001C125F /* fake_order_detail.json in Resources */,
 				71EAA33B20B95720002F003C /* Assets.xcassets in Resources */,
 				42D8B8AA20C23DF0001C125F /* Detail.storyboard in Resources */,
+				4255EC8F20C5260400E5DA24 /* fake_order_edit.json in Resources */,
 				4280034220C0F146004D4F50 /* LICENSE in Resources */,
+				4255EC7620C5097200E5DA24 /* Edit.storyboard in Resources */,
 				4205FD6320C136F900DB42B4 /* Home.storyboard in Resources */,
 				4205FD4420C0F2C000DB42B4 /* Login.storyboard in Resources */,
 				71EAA33920B9571B002F003C /* Main.storyboard in Resources */,
@@ -549,12 +674,14 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				4255EC8720C51D4900E5DA24 /* RAEditPhotoCell.m in Sources */,
 				4280034520C0F146004D4F50 /* NSString+Base64.m in Sources */,
 				42D8B8BF20C24A92001C125F /* RADetailSingleLineModel.m in Sources */,
 				42D8B8D820C273AC001C125F /* RADetailActionsCell+CollectionViewDataSource.m in Sources */,
 				42529D3B20C0EA3F000C0F4D /* unzip.c in Sources */,
 				4205FD4B20C0F4C400DB42B4 /* RetrievePasswordViewController.m in Sources */,
 				42529D4320C0EB01000C0F4D /* RANetworkTaskDelegate.m in Sources */,
+				4255EC7120C4E2EC00E5DA24 /* RADetailActionSelectionModel.m in Sources */,
 				42D8B8DE20C279BA001C125F /* RAOrderDetailViewController+TableViewDelegate.m in Sources */,
 				42529D2B20C0EA0A000C0F4D /* RAUtils.m in Sources */,
 				4205FD6620C13BF400DB42B4 /* RAOrderCell.m in Sources */,
@@ -564,13 +691,20 @@
 				42529D3D20C0EA3F000C0F4D /* ZipArchive.mm in Sources */,
 				4280034320C0F146004D4F50 /* NSData+Base64.m in Sources */,
 				42D8B8C820C24B0B001C125F /* RADetailActionCollectionModel.m in Sources */,
+				4255EC7C20C511F000E5DA24 /* RAOrderEditViewController+TableDelegate.m in Sources */,
 				42D8B8DB20C279AA001C125F /* RAOrderDetailViewController+TableViewDataSource.m in Sources */,
+				4255EC8020C518E300E5DA24 /* RAEditScanInputCell.m in Sources */,
+				4255EC8D20C5232C00E5DA24 /* RAEditLabelCell.m in Sources */,
 				42D8B8CC20C24B27001C125F /* RADetailActionModel.m in Sources */,
 				4205FD5820C0F6F100DB42B4 /* RAConvertor.m in Sources */,
 				4205FD5320C0F50C00DB42B4 /* JLCustomerAlertController.m in Sources */,
+				4255EC6820C4E27700E5DA24 /* RADetailActionSelectionViewController+TableDataSource.m in Sources */,
+				4255EC9C20C5286D00E5DA24 /* RAEditMultInputModel.m in Sources */,
+				4255EC7420C5096400E5DA24 /* RAOrderEditViewController.m in Sources */,
 				4280034420C0F146004D4F50 /* NSData+CommonCrypto.m in Sources */,
 				4205FD6120C135CF00DB42B4 /* RAHomeViewController.m in Sources */,
 				4205FD7220C1465400DB42B4 /* RAHomeOrderModel.m in Sources */,
+				4255EC6B20C4E28400E5DA24 /* RADetailActionSelectionViewController+TableDelegate.m in Sources */,
 				42529D3C20C0EA3F000C0F4D /* zip.c in Sources */,
 				42D8B8D220C267C7001C125F /* RADetailActionsLayout.m in Sources */,
 				42D8B8B420C2463D001C125F /* RADetailLocationCell.m in Sources */,
@@ -581,17 +715,25 @@
 				42529D2520C0E97E000C0F4D /* RADataProvider.m in Sources */,
 				42D8B8D520C27399001C125F /* RADetailActionsCell+CollectionViewDelegate.m in Sources */,
 				4205FD6C20C13E0700DB42B4 /* RAHomeViewController+HomeTableDelegate.m in Sources */,
+				4255EC9F20C5287D00E5DA24 /* RAEditPhotoModel.m in Sources */,
 				4205FD5420C0F50C00DB42B4 /* JLCustomerNavigationAlertController.m in Sources */,
 				42D8B8A820C23DD9001C125F /* RAOrderDetailViewController.m in Sources */,
 				42D8B8AE20C245D5001C125F /* RADetailSingleLineCell.m in Sources */,
+				4255EC6520C4E24500E5DA24 /* RADetailActionSelectionViewController.m in Sources */,
+				4255EC8A20C5211700E5DA24 /* RAEditMultInputCell.m in Sources */,
+				4255EC9620C5284C00E5DA24 /* RAEditLabelModel.m in Sources */,
 				42D8B8C220C24AA6001C125F /* RADetailMultLineModel.m in Sources */,
+				4255EC9920C5285C00E5DA24 /* RAEditInputModel.m in Sources */,
 				71EAA34120B95720002F003C /* main.m in Sources */,
+				4255EC6E20C4E29B00E5DA24 /* RADetailActionSelectionCell.m in Sources */,
 				4205FD4820C0F33500DB42B4 /* LoginViewController.m in Sources */,
+				4255EC7920C511E400E5DA24 /* RAOrderEditViewController+TableDataSource.m in Sources */,
 				42D8B8BB20C2486C001C125F /* RADetailActionSubCell.m in Sources */,
 				71EAA33320B9571B002F003C /* AppDelegate.m in Sources */,
 				4205FD6F20C13E2700DB42B4 /* RAHomeViewController+HomeTableDataSource.m in Sources */,
 				42D8B8C520C24AB4001C125F /* RADetailLocationModel.m in Sources */,
 				42529D4020C0EA59000C0F4D /* Reachability.m in Sources */,
+				4255EC9320C526FE00E5DA24 /* RAEditBaseModel.m in Sources */,
 				42529D3920C0EA3F000C0F4D /* ioapi.c in Sources */,
 				42D8B8B720C24656001C125F /* RADetailActionsCell.m in Sources */,
 			);

+ 16 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionCell.h

@@ -0,0 +1,16 @@
+//
+//  RADetailActionSelectionCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RADetailActionSelectionModel;
+@interface RADetailActionSelectionCell : UITableViewCell
+
+@property (nonatomic,strong) RADetailActionSelectionModel *model;
+
+@end

+ 45 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionCell.m

@@ -0,0 +1,45 @@
+//
+//  RADetailActionSelectionCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSelectionCell.h"
+#import "RADetailActionSelectionModel.h"
+
+@interface RADetailActionSelectionCell ()
+
+@property (nonatomic,strong) IBOutlet UILabel *actionLabel;
+
+@end
+
+@implementation RADetailActionSelectionCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    self.model = nil;
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+}
+
+- (void)setModel:(RADetailActionSelectionModel *)model {
+    _model = model;
+    
+    self.actionLabel.text = _model.actionTitle;
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionModel.h

@@ -0,0 +1,16 @@
+//
+//  RADetailActionSelectionModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface RADetailActionSelectionModel : NSObject
+
+@property (nonatomic,copy) NSString *actionTitle;
+@property (nonatomic,assign) NSInteger actionID;
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionModel.m

@@ -0,0 +1,13 @@
+//
+//  RADetailActionSelectionModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSelectionModel.h"
+
+@implementation RADetailActionSelectionModel
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDataSource.h

@@ -0,0 +1,13 @@
+//
+//  RADetailActionSelectionViewController+TableDataSource.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSelectionViewController.h"
+
+@interface RADetailActionSelectionViewController (TableDataSource) <UITableViewDataSource>
+
+@end

+ 32 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDataSource.m

@@ -0,0 +1,32 @@
+//
+//  RADetailActionSelectionViewController+TableDataSource.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSelectionViewController+TableDataSource.h"
+#import "RADetailActionSelectionModel.h"
+#import "RADetailActionSelectionCell.h"
+
+@implementation RADetailActionSelectionViewController (TableDataSource)
+
+- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    
+    RADetailActionSelectionCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailActionSelectionCell" forIndexPath:indexPath];
+    RADetailActionSelectionModel *model = [self.actions objectAtIndex:indexPath.row];
+    cell.model = model;
+    
+    return cell;
+}
+
+- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return self.actions.count;
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDelegate.h

@@ -0,0 +1,13 @@
+//
+//  RADetailActionSelectionViewController+TableDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSelectionViewController.h"
+
+@interface RADetailActionSelectionViewController (TableDelegate) <UITableViewDelegate>
+
+@end

+ 29 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController+TableDelegate.m

@@ -0,0 +1,29 @@
+//
+//  RADetailActionSelectionViewController+TableDelegate.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSelectionViewController+TableDelegate.h"
+#import "RADetailActionSelectionModel.h"
+
+@implementation RADetailActionSelectionViewController (TableDelegate)
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 44.0f;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    [self dismissViewControllerAnimated:NO completion:^{
+        
+        if (self.delegate && [self.delegate respondsToSelector:@selector(detailSelectAction:)]) {
+            RADetailActionSelectionModel *model = [self.actions objectAtIndex:indexPath.row];
+            [self.delegate detailSelectAction:model];
+        }
+    }];
+}
+
+@end

+ 24 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController.h

@@ -0,0 +1,24 @@
+//
+//  RADetailActionSelectionViewController.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RABaseViewController.h"
+
+@class RADetailActionSelectionModel;
+@protocol RADetailActionSelectionDelegate <NSObject>
+
+- (void)detailSelectAction:(RADetailActionSelectionModel *)model;
+
+@end
+
+@interface RADetailActionSelectionViewController : RABaseViewController
+
+@property (nonatomic,strong) NSArray <RADetailActionSelectionModel *> *actions;
+@property (nonatomic,weak) id<RADetailActionSelectionDelegate> delegate;
+
+
+@end

+ 43 - 0
Redant Drivers/Apex And Drivers/Detail/Action Selection/RADetailActionSelectionViewController.m

@@ -0,0 +1,43 @@
+//
+//  RADetailActionSelectionViewController.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RADetailActionSelectionViewController.h"
+
+@interface RADetailActionSelectionViewController ()
+
+@property (nonatomic,strong) IBOutlet UITableView *actionSelectionTableView;
+
+@end
+
+@implementation RADetailActionSelectionViewController
+
++ (instancetype)viewControllerFromStoryboard {
+    RADetailActionSelectionViewController *selectionVC = [[UIStoryboard storyboardWithName:@"Detail" bundle:nil] instantiateViewControllerWithIdentifier:[self storyboardID]];
+    return selectionVC;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self configureTable];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)configureTable {
+    
+    self.actionSelectionTableView.tableFooterView = [UIView new];
+    self.actionSelectionTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
+}
+
+
+@end

+ 10 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.h

@@ -8,9 +8,18 @@
 
 #import <UIKit/UIKit.h>
 
-@class RADetailActionModel;
+@class RADetailActionModel,RADetailActionSubCell;
+
+@protocol RADetailActionSubCellDelegate <NSObject>
+
+- (void)actionSubCell:(RADetailActionSubCell *)cell didClickForModel:(RADetailActionModel *)model;
+
+@end
+
 @interface RADetailActionSubCell : UICollectionViewCell
 
 @property (nonatomic,strong) RADetailActionModel *model;
 
+@property (nonatomic,weak) id <RADetailActionSubCellDelegate> delegate;
+
 @end

+ 12 - 2
Redant Drivers/Apex And Drivers/Detail/Cell/CollectionView/RADetailActionSubCell.m

@@ -11,7 +11,7 @@
 
 @interface RADetailActionSubCell ()
 
-@property (strong, nonatomic) IBOutlet UILabel *actionTitleLabel;
+@property (strong, nonatomic) IBOutlet UIButton *actionTitleBtn;
 
 
 @end
@@ -21,13 +21,23 @@
 - (void)setModel:(RADetailActionModel *)model {
     _model = model;
     
-    self.actionTitleLabel.text = model.actionTitle;
+    [self.actionTitleBtn setTitle:model.actionTitle forState:UIControlStateNormal];
 }
 
 - (void)prepareForReuse {
     [super prepareForReuse];
     
     self.model = nil;
+    self.delegate = nil;
 }
 
+- (IBAction)actionBtnClick:(UIButton *)sender {
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(actionSubCell:didClickForModel:)]) {
+        [self.delegate actionSubCell:self didClickForModel:self.model];
+    }
+    
+}
+
+
 @end

+ 2 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.h

@@ -7,7 +7,8 @@
 //
 
 #import "RADetailActionsCell.h"
+#import "RADetailActionSubCell.h"
 
-@interface RADetailActionsCell (CollectionViewDataSource) <UICollectionViewDataSource>
+@interface RADetailActionsCell (CollectionViewDataSource) <UICollectionViewDataSource,RADetailActionSubCellDelegate>
 
 @end

+ 10 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell+CollectionViewDataSource.m

@@ -8,7 +8,6 @@
 
 #import "RADetailActionsCell+CollectionViewDataSource.h"
 #import "RADetailActionModel.h"
-#import "RADetailActionSubCell.h"
 
 @implementation RADetailActionsCell (CollectionViewDataSource)
 
@@ -22,9 +21,19 @@
     
     RADetailActionModel *model = [self actionModelForIndexPath:indexPath];
     cell.model = model;
+    cell.delegate = self;
     
     return cell;
 }
 
+#pragma mark - Action Delegate
+
+- (void)actionSubCell:(RADetailActionSubCell *)cell didClickForModel:(RADetailActionModel *)model {
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(actionsCell:didClickSubCell:forModel:)]) {
+        [self.delegate actionsCell:self didClickSubCell:cell forModel:model];
+    }
+    
+}
 
 @end

+ 9 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailActionsCell.h

@@ -8,11 +8,19 @@
 
 #import <UIKit/UIKit.h>
 
-@class RADetailActionCollectionModel,RADetailActionModel,RADetailActionsLayout;
+@class RADetailActionCollectionModel,RADetailActionModel,RADetailActionsLayout,RADetailActionsCell,RADetailActionSubCell;
+
+@protocol RAdetailActionsCellDelegate <NSObject>
+
+- (void)actionsCell:(RADetailActionsCell *)cell didClickSubCell:(RADetailActionSubCell *)subCell forModel:(RADetailActionModel *)model;
+
+@end
+
 @interface RADetailActionsCell : UITableViewCell
 
 @property (nonatomic,strong) RADetailActionCollectionModel *model;
 @property (nonatomic,weak,readonly) RADetailActionsLayout *actionLayout;
+@property (nonatomic,weak) id<RAdetailActionsCellDelegate> delegate;
 
 - (NSInteger)actionNumberForSection:(NSInteger)section;
 - (RADetailActionModel *)actionModelForIndexPath:(NSIndexPath *)indexPath;

+ 9 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.h

@@ -8,9 +8,17 @@
 
 #import <UIKit/UIKit.h>
 
-@class RADetailLocationModel;
+@class RADetailLocationModel,RADetailLocationCell;
+@protocol RADetailLocationCellDelegate <NSObject>
+
+- (void)locationCell:(RADetailLocationCell *)cell didClickNavigation:(RADetailLocationModel *)model;
+
+@end
+
 @interface RADetailLocationCell : UITableViewCell
 
 @property (nonatomic,strong) RADetailLocationModel *model;
 
+@property (nonatomic,weak) id<RADetailLocationCellDelegate> delegate;
+
 @end

+ 4 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.m

@@ -37,6 +37,7 @@
     [super prepareForReuse];
     
     self.model = nil;
+    self.delegate = nil;
 }
 
 - (void)setModel:(RADetailLocationModel *)model {
@@ -49,7 +50,9 @@
 #pragma mark - User Action
 
 - (IBAction)navigationBtnClick:(UIButton *)sender {
-    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(locationCell:didClickNavigation:)]) {
+        [self.delegate locationCell:self didClickNavigation:self.model];
+    }
 }
 
 

+ 81 - 11
Redant Drivers/Apex And Drivers/Detail/Detail.storyboard

@@ -168,23 +168,32 @@ OAKLAND,CA</string>
                                                                 <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
                                                                 <autoresizingMask key="autoresizingMask"/>
                                                                 <subviews>
-                                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Action" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UyU-YA-BgD">
-                                                                        <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
-                                                                        <color key="backgroundColor" red="0.64783424140000001" green="0.22448275840000001" blue="0.21907054149999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5xB-Fx-vYR">
+                                                                        <rect key="frame" x="0.0" y="10" width="224" height="30"/>
+                                                                        <constraints>
+                                                                            <constraint firstAttribute="height" constant="30" id="JNu-Xv-sVe"/>
+                                                                        </constraints>
                                                                         <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                                                        <nil key="textColor"/>
-                                                                        <nil key="highlightedColor"/>
-                                                                    </label>
+                                                                        <state key="normal" title="Accept">
+                                                                            <color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                                        </state>
+                                                                        <state key="highlighted">
+                                                                            <color key="titleColor" white="0.33333333329999998" alpha="1" colorSpace="calibratedWhite"/>
+                                                                        </state>
+                                                                        <connections>
+                                                                            <action selector="actionBtnClick:" destination="NRo-Hn-zDX" eventType="touchUpInside" id="Pyd-jv-LAa"/>
+                                                                        </connections>
+                                                                    </button>
                                                                 </subviews>
                                                             </view>
+                                                            <color key="backgroundColor" red="0.64783424140000001" green="0.22448275840000001" blue="0.21907054149999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                             <constraints>
-                                                                <constraint firstItem="UyU-YA-BgD" firstAttribute="leading" secondItem="NRo-Hn-zDX" secondAttribute="leading" id="9LK-aO-4yB"/>
-                                                                <constraint firstAttribute="bottom" secondItem="UyU-YA-BgD" secondAttribute="bottom" id="NmW-Al-o3u"/>
-                                                                <constraint firstAttribute="trailing" secondItem="UyU-YA-BgD" secondAttribute="trailing" id="SPX-5C-FB0"/>
-                                                                <constraint firstItem="UyU-YA-BgD" firstAttribute="top" secondItem="NRo-Hn-zDX" secondAttribute="top" id="hqg-xe-row"/>
+                                                                <constraint firstItem="5xB-Fx-vYR" firstAttribute="width" secondItem="NRo-Hn-zDX" secondAttribute="width" id="1yI-GZ-JrT"/>
+                                                                <constraint firstItem="5xB-Fx-vYR" firstAttribute="centerX" secondItem="NRo-Hn-zDX" secondAttribute="centerX" id="2vz-5F-VXV"/>
+                                                                <constraint firstItem="5xB-Fx-vYR" firstAttribute="centerY" secondItem="NRo-Hn-zDX" secondAttribute="centerY" id="mtG-08-44e"/>
                                                             </constraints>
                                                             <connections>
-                                                                <outlet property="actionTitleLabel" destination="UyU-YA-BgD" id="NYw-fR-lZU"/>
+                                                                <outlet property="actionTitleBtn" destination="5xB-Fx-vYR" id="Uzb-Tr-JNT"/>
                                                             </connections>
                                                         </collectionViewCell>
                                                     </cells>
@@ -229,5 +238,66 @@ OAKLAND,CA</string>
             </objects>
             <point key="canvasLocation" x="-274.39999999999998" y="9.4452773613193415"/>
         </scene>
+        <!--Detail Action Selection View Controller-->
+        <scene sceneID="Sbt-sV-jDk">
+            <objects>
+                <viewController storyboardIdentifier="RADetailActionSelectionViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="6bG-Uu-EAO" customClass="RADetailActionSelectionViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="xE6-be-FMb">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="dkO-Ta-IQf">
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <prototypes>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailActionSelectionCell" id="8M5-Ka-QBN" customClass="RADetailActionSelectionCell">
+                                        <rect key="frame" x="0.0" y="28" width="375" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8M5-Ka-QBN" id="CTw-dI-j8V">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DSZ-Hp-4ld">
+                                                    <rect key="frame" x="5" y="0.0" width="370" height="43.5"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="DSZ-Hp-4ld" firstAttribute="top" secondItem="CTw-dI-j8V" secondAttribute="top" id="6lS-aT-plO"/>
+                                                <constraint firstItem="DSZ-Hp-4ld" firstAttribute="leading" secondItem="CTw-dI-j8V" secondAttribute="leading" constant="5" id="Iyc-hO-evr"/>
+                                                <constraint firstAttribute="trailing" secondItem="DSZ-Hp-4ld" secondAttribute="trailing" id="WRh-DT-hfR"/>
+                                                <constraint firstAttribute="bottom" secondItem="DSZ-Hp-4ld" secondAttribute="bottom" id="tGB-1A-KfD"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="actionLabel" destination="DSZ-Hp-4ld" id="CBw-uz-qNb"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="6bG-Uu-EAO" id="7bI-Wq-V3w"/>
+                                    <outlet property="delegate" destination="6bG-Uu-EAO" id="Wfj-Vc-oqn"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstItem="dkO-Ta-IQf" firstAttribute="leading" secondItem="eZe-q4-btM" secondAttribute="leading" id="Atc-qC-Sp2"/>
+                            <constraint firstItem="eZe-q4-btM" firstAttribute="trailing" secondItem="dkO-Ta-IQf" secondAttribute="trailing" id="Lvy-I1-AH0"/>
+                            <constraint firstItem="dkO-Ta-IQf" firstAttribute="top" secondItem="eZe-q4-btM" secondAttribute="top" id="vzb-AN-fm4"/>
+                            <constraint firstItem="eZe-q4-btM" firstAttribute="bottom" secondItem="dkO-Ta-IQf" secondAttribute="bottom" id="xR4-cB-YUn"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="eZe-q4-btM"/>
+                    </view>
+                    <connections>
+                        <outlet property="actionSelectionTableView" destination="dkO-Ta-IQf" id="i6E-qT-AWQ"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="88A-VM-aby" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="548" y="9"/>
+        </scene>
     </scenes>
 </document>

+ 8 - 0
Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.h

@@ -13,9 +13,17 @@ typedef enum {
     RADetailActionTypeLocal = 1
 } RADetailActionType;
 
+typedef enum {
+    RADetailActionSubTypeEnum = 0
+} RADetailActionSubType;
+
+@class RADetailActionSelectionModel;
 @interface RADetailActionModel : NSObject
 
 @property (nonatomic,assign) RADetailActionType actionType;
+@property (nonatomic,assign) RADetailActionSubType actionSubType;
 @property (nonatomic,copy) NSString *actionTitle;
 
+@property (nonatomic,strong,readonly) NSArray <RADetailActionSelectionModel *> *enums;
+
 @end

+ 14 - 0
Redant Drivers/Apex And Drivers/Detail/Model/Collection/RADetailActionModel.m

@@ -7,6 +7,7 @@
 //
 
 #import "RADetailActionModel.h"
+#import "RADetailActionSelectionModel.h"
 
 @implementation RADetailActionModel
 
@@ -14,4 +15,17 @@
     
 }
 
+- (void)setEnums:(NSArray<RADetailActionSelectionModel *> *)enums {
+    
+    NSMutableArray *modelArr = [NSMutableArray arrayWithCapacity:enums.count];
+    NSArray *tmpEnums = enums; // 用于消除Dic和model类型不匹配警告
+    for (int i = 0; i < tmpEnums.count; i++) {
+        NSDictionary *enumDic = [tmpEnums objectAtIndex:i];
+        RADetailActionSelectionModel *model = [[RADetailActionSelectionModel alloc] init];
+        [model setValuesForKeysWithDictionary:enumDic];
+        [modelArr addObject:model];
+    }
+    _enums = modelArr;
+}
+
 @end

+ 10 - 0
Redant Drivers/Apex And Drivers/Detail/Model/RADetailActionCollectionModel.m

@@ -62,6 +62,16 @@
     return [self.actions objectAtIndex:indexPath.item];
 }
 
+- (CGFloat)width {
+    CGFloat width = [super width];
+    if (width <= 0) {
+        NSLog(@"action width is zero");
+        width = CGRectGetWidth([UIScreen mainScreen].bounds);
+        self.width = width;
+    }
+    return width;
+}
+
 - (CGFloat)height {
     if (self.contentHeight <= 0) {
         [self prepareLayout];

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

@@ -7,7 +7,10 @@
 //
 
 #import "RAOrderDetailViewController.h"
+#import "RADetailLocationCell.h"
+#import "RADetailActionsCell.h"
+#import "RADetailActionSelectionViewController.h"
 
-@interface RAOrderDetailViewController (TableViewDataSource) <UITableViewDataSource>
+@interface RAOrderDetailViewController (TableViewDataSource) <UITableViewDataSource,RADetailLocationCellDelegate,RAdetailActionsCellDelegate,UIPopoverPresentationControllerDelegate,RADetailActionSelectionDelegate>
 
 @end

+ 121 - 2
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.m

@@ -13,11 +13,18 @@
 #import "RADetailMultLineModel.h"
 #import "RADetailLocationModel.h"
 #import "RADetailActionCollectionModel.h"
+#import "RADetailActionModel.h"
 
 #import "RADetailSingleLineCell.h"
 #import "RADetailMultLineCell.h"
-#import "RADetailActionsCell.h"
-#import "RADetailLocationCell.h"
+#import "RADetailActionSubCell.h"
+
+#import <MapKit/MapKit.h>
+
+#import "RADetailActionSelectionModel.h"
+#import "RAOrderEditViewController.h"
+
+
 
 
 @implementation RAOrderDetailViewController (TableViewDataSource)
@@ -46,6 +53,7 @@
             RADetailActionsCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailActionsCell" forIndexPath:indexPath];
             cell.actionLayout.delegate = actionModel;
             [cell setModel:actionModel];
+            cell.delegate = self;
             return cell;
         }
             break;
@@ -53,6 +61,7 @@
             RADetailLocationModel *locationModel = (RADetailLocationModel *)model;
             RADetailLocationCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RADetailLocationCell" forIndexPath:indexPath];
             [cell setModel:locationModel];
+            cell.delegate = self;
             return cell;
         }
             break;
@@ -73,4 +82,114 @@
     return [self sectionNumber];
 }
 
+#pragma mark - Location Delegate
+
+- (void)locationCell:(RADetailLocationCell *)cell didClickNavigation:(RADetailLocationModel *)model {
+    
+    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
+    
+//    __weak typeof(self) weakSelf = self;
+    if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"comgooglemaps://"]]) {
+        
+        UIAlertAction *googleMapAction = [UIAlertAction actionWithTitle:@"Google Map" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+            
+            NSString *urlString = [[NSString stringWithFormat:@"comgooglemaps://?center=37.782652,-122.410126&directionsmode=driving"]
+                                   stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+            
+            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
+                NSLog(@"%u",success);
+            }];
+            
+//            NSString *urlString = [[NSString stringWithFormat:@"comgooglemaps://?center=37.782652,-122.410126&directionsmode=driving"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+//            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
+            
+        }];
+        [alertVC addAction:googleMapAction];
+    }
+    
+    UIAlertAction *appleMapAction = [UIAlertAction actionWithTitle:@"Apple Map" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        
+        MKMapItem *currentLocation = [MKMapItem mapItemForCurrentLocation];
+        MKMapItem *toLocation = [[MKMapItem alloc] initWithPlacemark:[[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(37.782652, -122.410126) addressDictionary:nil]];
+        [MKMapItem openMapsWithItems:@[currentLocation, toLocation] launchOptions:@{
+                                                                                    MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving,
+                                                                                    MKLaunchOptionsShowsTrafficKey: @(YES)
+                                                                                    }];
+        
+    }];
+    [alertVC addAction:appleMapAction];
+    
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+        
+    }];
+    [alertVC addAction:cancelAction];
+    
+    [self presentViewController:alertVC animated:YES completion:nil];
+}
+
+#pragma mark - Action Delegate
+
+- (void)actionsCell:(RADetailActionsCell *)cell didClickSubCell:(RADetailActionSubCell *)subCell forModel:(RADetailActionModel *)model {
+    switch (model.actionType) {
+        case RADetailActionTypeRemote: {
+            
+        }
+            break;
+        case RADetailActionTypeLocal: {
+            
+            switch (model.actionSubType) {
+                case RADetailActionSubTypeEnum: {
+                    [self handleEnumAction:model forCell:subCell];
+                }
+                    break;
+                    
+                default:
+                    break;
+            }
+        }
+            break;
+            
+        default:
+            break;
+    }
+}
+
+#pragma mark - Action
+
+- (void)handleEnumAction:(RADetailActionModel *)model forCell:(RADetailActionSubCell *)subCell {
+    
+    RADetailActionSelectionViewController *vc = [RADetailActionSelectionViewController viewControllerFromStoryboard];
+    vc.actions = model.enums;
+    vc.delegate = self;
+    
+    vc.modalPresentationStyle = UIModalPresentationPopover;
+    vc.preferredContentSize = CGSizeMake(250, 300);
+    
+    vc.popoverPresentationController.sourceView = subCell;
+    vc.popoverPresentationController.sourceRect = subCell.bounds;
+    vc.popoverPresentationController.delegate = self;
+    
+    [self presentViewController:vc animated:YES completion:nil];
+}
+
+#pragma mark - Popover Delegate
+
+-(UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller{
+    return UIModalPresentationNone;//不适配
+}
+
+#pragma mark - ActionSelection Delegate
+
+- (void)detailSelectAction:(RADetailActionSelectionModel *)model {
+    
+    RAOrderEditViewController *vc = [RAOrderEditViewController viewControllerFromStoryboard];
+//    RAOrderEditViewController *vc = [[RAOrderEditViewController alloc] init]; // 使用代码直接创建,在Push动画过程中会卡一下,具体原因不明
+
+    vc.title = @"Update Action";
+    vc.orderID = self.orderID;
+    vc.actionID = model.actionID;
+    [self.navigationController pushViewController:vc animated:YES];
+
+}
+
 @end

+ 4 - 4
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController.m

@@ -41,29 +41,29 @@
         switch (type) {
             case RAOrderDetailValueTypeSingleLine: {
                 RADetailSingleLineModel *model = [[RADetailSingleLineModel alloc] init];
-                [model setValuesForKeysWithDictionary:value];
                 model.width = self.tableWidth;
+                [model setValuesForKeysWithDictionary:value];
                 [modelArr addObject:model];
             }
                 break;
             case RAOrderDetailValueTypeMultipleLine: {
                 RADetailMultLineModel *model = [[RADetailMultLineModel alloc] init];
+                 model.width = self.tableWidth;
                 [model setValuesForKeysWithDictionary:value];
-                model.width = self.tableWidth;
                 [modelArr addObject:model];
             }
                 break;
             case RAOrderDetailValueTypeAction: {
                 RADetailActionCollectionModel *model = [[RADetailActionCollectionModel alloc] init];
+                 model.width = self.tableWidth;
                 [model setValuesForKeysWithDictionary:value];
-                model.width = self.tableWidth;
                 [modelArr addObject:model];
             }
                 break;
             case RAOrderDetailValueTypeLocation: {
                 RADetailLocationModel *model = [[RADetailLocationModel alloc] init];
+                 model.width = self.tableWidth;
                 [model setValuesForKeysWithDictionary:value];
-                model.width = self.tableWidth;
                 [modelArr addObject:model];
             }
                 break;

+ 46 - 3
Redant Drivers/Apex And Drivers/FakeData/fake_order_detail.json

@@ -52,11 +52,54 @@
                                         },
                                         {
                                         "actionType": "0",
-                                        "actionTitle": "Reject"
+                                        "actionTitle": "Accept"
                                         },
                                         {
-                                        "actionType": "0",
-                                        "actionTitle": "Test"
+                                        "actionType": "1",
+                                        "actionTitle": "Update Action",
+                                        "actionSubType": "0",
+                                        "enums": [
+                                                  {
+                                                  "actionTitle": "Action 0",
+                                                  "actionID": "0"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 1",
+                                                  "actionID": "1"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 2",
+                                                  "actionID": "2"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 3",
+                                                  "actionID": "3"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 4",
+                                                  "actionID": "4"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 5",
+                                                  "actionID": "5"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 6",
+                                                  "actionID": "6"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 7",
+                                                  "actionID": "7"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 8",
+                                                  "actionID": "8"
+                                                  },
+                                                  {
+                                                  "actionTitle": "Action 9",
+                                                  "actionID": "9"
+                                                  }
+                                                  ]
                                         }
                                         ],
                             "type": 2

+ 47 - 0
Redant Drivers/Apex And Drivers/FakeData/fake_order_edit.json

@@ -0,0 +1,47 @@
+{
+    "result": 2,
+    "sections": [
+                 {
+                 "title": "Update Action",
+                 "items": [
+                           {
+                           "type": 0,
+                           "title": "Order ID",
+                           "value": "AFS20180530001200"
+                           },
+                           {
+                           "type": 0,
+                           "title": "Dispatcher",
+                           "value": "Jack Li"
+                           },
+                           {
+                           "type": 0,
+                           "title": "Current Action",
+                           "value": "Delivered"
+                           },
+                           {
+                           "type": 1,
+                           "title": "File No.",
+                           "value": "AFS20180530001200",
+                           "scannable": true
+                           },
+                           {
+                           "type": 1,
+                           "title": "File No.",
+                           "value": "AFS20180530001200",
+                           "scannable": false
+                           },
+                           {
+                           "type": 2,
+                           "title": "Instruction",
+                           "value": "不同于一般的 bug,性能问题因为并没有统一的标准,而且与用户的机器环境相关性较大,所以往往是在产品上线后才被发现,也导致解决问题的周期很长。微信读书 1.3.0 版本之前,性能问题基本都来自于用户反馈(包括测试人员),受限于测试时间和用户反馈的积极性,性能问题往往到了比较严重的程度,开发人员才真正发现问题。\n\n但是,移动应用要保证良好的用户体验,产品在性能方面的表现极其重要。为了尽可能早、尽可能全面地收集产品的性能问题,就避免不了对产品做性能监控。我们主要从两个维度进行了监控"
+                           },
+                           {
+                           "type": 3,
+                           "title": "Container Photo",
+                           "path": "photoPath"
+                           }
+                           ]
+                 }
+                 ]
+}

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

@@ -36,7 +36,6 @@
     
     RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
     [self pushDetailViewControllerForModel:order];
-    
 }
 
 @end

+ 4 - 0
Redant Drivers/Apex And Drivers/Info.plist

@@ -41,5 +41,9 @@
 		<string>UIInterfaceOrientationLandscapeLeft</string>
 		<string>UIInterfaceOrientationLandscapeRight</string>
 	</array>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>comgooglemaps</string>
+	</array>
 </dict>
 </plist>

+ 3 - 1
Redant Drivers/Apex And Drivers/RADataProvider.h

@@ -12,10 +12,12 @@
 
 + (NSDictionary *)requestLogin:(NSString *)user password:(NSString *)pwd;
 
++ (int)requestRetrievePassword : (NSString*)user  email:(NSString*)email;
+
 + (NSDictionary *)requestOrderList;
 
 + (NSDictionary *)requestOrderDetail:(NSString *)orderID;
 
-+(int) requestRetrievePassword : (NSString*)user  email:(NSString*)email;
++ (NSDictionary *)requestUpdateOrder:(NSString *)orderID driverAction:(NSInteger)action;
 
 @end

+ 15 - 1
Redant Drivers/Apex And Drivers/RADataProvider.m

@@ -130,7 +130,7 @@
     return [self handleJsonData:json];
 }
 
-+(int) requestRetrievePassword : (NSString*)user  email:(NSString*)email
++ (int)requestRetrievePassword : (NSString*)user  email:(NSString*)email
 {
     
     if(![NetworkUtils IsNetworkAvailable])
@@ -196,6 +196,20 @@
     return [self handleJsonData:json];
 }
 
++ (NSDictionary *)requestUpdateOrder:(NSString *)orderID driverAction:(NSInteger)action {
+    
+    return [self loadFakeData:@"fake_order_edit.json"];
+    
+    NSMutableDictionary *params = [NSMutableDictionary dictionary];
+    
+    //    [params setObject:user forKey:@"user"];
+    //    [params setObject:pwd forKey:@"password"];
+    
+    NSData* json=[self get_json:URL_HOST parameters:params  file:nil];
+    
+    return [self handleJsonData:json];
+}
+
 + (NSDictionary *)loadFakeData:(NSString *)fileName {
     
     NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:nil];

+ 18 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditLabelCell.h

@@ -0,0 +1,18 @@
+//
+//  RAEditLabelCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@class RAEditLabelModel;
+@interface RAEditLabelCell : UITableViewCell
+
+
+@property (nonatomic,strong) RAEditLabelModel *model;
+
+@end

+ 48 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditLabelCell.m

@@ -0,0 +1,48 @@
+//
+//  RAEditLabelCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditLabelCell.h"
+#import "RAEditLabelModel.h"
+
+@interface RAEditLabelCell ()
+
+@property (strong, nonatomic) IBOutlet UILabel *titleLaebl;
+@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+
+
+@end
+
+@implementation RAEditLabelCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    self.model = nil;
+}
+
+- (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
+}
+
+- (void)setModel:(RAEditLabelModel *)model {
+    _model = model;
+    
+    self.titleLaebl.text = _model.title;
+    self.valueLabel.text = _model.value;
+}
+
+@end

+ 26 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditMultInputCell.h

@@ -0,0 +1,26 @@
+//
+//  RAEditMultInputCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RAEditMultInputModel,RAEditMultInputCell;
+
+@protocol RAEditMultInputDelegate <NSObject>
+
+- (void)beginEditMultInputCell:(RAEditMultInputCell *)cell;
+- (void)endEditMultInputCell:(RAEditMultInputCell *)cell;
+
+
+@end
+
+@interface RAEditMultInputCell : UITableViewCell
+
+@property (nonatomic,strong) RAEditMultInputModel *model;
+@property (nonatomic,weak) id<RAEditMultInputDelegate> delegate;
+
+@end

+ 72 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditMultInputCell.m

@@ -0,0 +1,72 @@
+//
+//  RAEditMultInputCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditMultInputCell.h"
+#import "RAEditMultInputModel.h"
+
+@interface RAEditMultInputCell () <UITextViewDelegate>
+
+@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
+@property (strong, nonatomic) IBOutlet UITextView *inputView;
+
+
+@end
+
+
+@implementation RAEditMultInputCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    self.model = nil;
+    self.inputView.layer.borderWidth = 0.5f;
+    self.inputView.layer.borderColor = [UIColor lightGrayColor].CGColor;
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+    self.delegate = nil;
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)setModel:(RAEditMultInputModel *)model {
+    _model = model;
+    
+    self.titleLabel.text = _model.title;
+    self.inputView.text = _model.value;
+}
+
+#pragma mark - TextView Delegate
+
+- (BOOL)textViewShouldBeginEditing:(UITextView *)textView {
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(beginEditMultInputCell:)]) {
+        [self.delegate beginEditMultInputCell:self];
+    }
+    
+    return YES;
+}
+
+- (BOOL)textViewShouldEndEditing:(UITextView *)textView {
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(endEditMultInputCell:)]) {
+        [self.delegate endEditMultInputCell:self];
+    }
+    
+    return YES;
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditPhotoCell.h

@@ -0,0 +1,16 @@
+//
+//  RAEditPhotoCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class RAEditPhotoModel;
+@interface RAEditPhotoCell : UITableViewCell
+
+@property (nonatomic,strong) RAEditPhotoModel *model;
+
+@end

+ 64 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditPhotoCell.m

@@ -0,0 +1,64 @@
+//
+//  RAEditPhotoCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditPhotoCell.h"
+#import "RAEditPhotoModel.h"
+
+@interface RAEditPhotoCell ()
+
+@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
+@property (strong, nonatomic) IBOutlet UIImageView *photoView;
+
+
+@end
+
+
+@implementation RAEditPhotoCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    self.model = nil;
+    self.photoView.layer.borderWidth = 0.5f;
+    self.photoView.layer.borderColor = [UIColor lightGrayColor].CGColor;
+    
+    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(photoViewTap:)];
+    [self.photoView addGestureRecognizer:tap];
+}
+
+- (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
+}
+
+- (void)setModel:(RAEditPhotoModel *)model {
+    _model = model;
+    
+    self.titleLabel.text = _model.title;
+    self.photoView.image = _model.photo;
+}
+
+- (void)photoViewTap:(UITapGestureRecognizer *)sender {
+    
+    if (self.model.photo) {
+        
+    } else {
+        
+    }
+    
+}
+
+@end

+ 26 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditScanInputCell.h

@@ -0,0 +1,26 @@
+//
+//  RAEditScanInputCell.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@class RAEditInputModel,RAEditScanInputCell;
+
+@protocol RAEditInputDelegate <NSObject>
+
+- (void)beginEditInputCell:(RAEditScanInputCell *)cell;
+- (void)endEditInputCell:(RAEditScanInputCell *)cell;
+
+@end
+
+@interface RAEditScanInputCell : UITableViewCell
+
+@property (nonatomic,strong) RAEditInputModel *model;
+@property (nonatomic,weak) id<RAEditInputDelegate> delegate;
+
+@end

+ 86 - 0
Redant Drivers/Apex And Drivers/Update/Cell/RAEditScanInputCell.m

@@ -0,0 +1,86 @@
+//
+//  RAEditScanInputCell.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditScanInputCell.h"
+#import "RAEditInputModel.h"
+
+@interface RAEditScanInputCell () <UITextFieldDelegate>
+
+@property (strong, nonatomic) IBOutlet UILabel *titlelabel;
+@property (strong, nonatomic) IBOutlet UITextField *inputTextField;
+
+
+@end
+
+@implementation RAEditScanInputCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+    
+    self.model = nil;
+}
+
+- (void)prepareForReuse {
+    [super prepareForReuse];
+    
+    self.model = nil;
+    self.delegate = nil;
+}
+
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
+    [super setSelected:selected animated:animated];
+
+    // Configure the view for the selected state
+}
+
+- (void)setModel:(RAEditInputModel *)model {
+    _model = model;
+    
+    self.titlelabel.text = _model.title;
+    self.inputTextField.text = _model.value;
+    if (_model.scannable) {
+        
+        self.inputTextField.rightViewMode = UITextFieldViewModeAlways;
+        UIButton *scanBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+        scanBtn.bounds = CGRectMake(0, 0, 30, 30);
+        [scanBtn setImage:[UIImage imageNamed:@"Barcode_n"] forState:UIControlStateNormal];
+        [scanBtn setImage:[UIImage imageNamed:@"Barcode_h"] forState:UIControlStateHighlighted];
+        [scanBtn addTarget:self action:@selector(scanBtnClick:) forControlEvents:UIControlEventTouchUpInside];
+        self.inputTextField.rightView = scanBtn;
+        
+    } else {
+        self.inputTextField.rightViewMode = UITextFieldViewModeNever;
+        self.inputTextField.rightView = nil;
+    }
+}
+
+- (void)scanBtnClick:(UIButton *)sender {
+    NSLog(@"scan click");
+}
+
+#pragma mark - TextField Delegate
+
+- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(beginEditInputCell:)]) {
+        [self.delegate beginEditInputCell:self];
+    }
+    
+    return YES;
+}
+
+- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
+    
+    if (self.delegate && [self.delegate respondsToSelector:@selector(endEditInputCell:)]) {
+        [self.delegate endEditInputCell:self];
+    }
+    return YES;
+}
+
+@end

+ 214 - 0
Redant Drivers/Apex And Drivers/Update/Edit.storyboard

@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" 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"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Order Edit View Controller-->
+        <scene sceneID="6aP-8P-zu0">
+            <objects>
+                <viewController storyboardIdentifier="RAOrderEditViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="IN3-1q-AsB" customClass="RAOrderEditViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="SQP-tB-vfe">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="h3M-SO-JeC">
+                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <prototypes>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RAEditScanInputCell" rowHeight="70" id="LAb-ek-OMl" customClass="RAEditScanInputCell">
+                                        <rect key="frame" x="0.0" y="28" width="375" height="70"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LAb-ek-OMl" id="OdP-kT-OdJ">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="69.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7mL-uV-Ec4">
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="xpV-6I-fj3">
+                                                    <rect key="frame" x="5" y="31" width="365" height="33.5"/>
+                                                    <nil key="textColor"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits"/>
+                                                    <connections>
+                                                        <outlet property="delegate" destination="LAb-ek-OMl" id="HhP-qc-Ler"/>
+                                                    </connections>
+                                                </textField>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="7mL-uV-Ec4" firstAttribute="leading" secondItem="OdP-kT-OdJ" secondAttribute="leading" constant="5" id="0H6-kh-H5g"/>
+                                                <constraint firstAttribute="bottom" secondItem="xpV-6I-fj3" secondAttribute="bottom" constant="5" id="4uL-YG-IfT"/>
+                                                <constraint firstItem="xpV-6I-fj3" firstAttribute="trailing" secondItem="7mL-uV-Ec4" secondAttribute="trailing" id="5v6-aj-FeD"/>
+                                                <constraint firstItem="7mL-uV-Ec4" firstAttribute="top" secondItem="OdP-kT-OdJ" secondAttribute="top" constant="5" id="8Dw-A1-VX7"/>
+                                                <constraint firstItem="xpV-6I-fj3" firstAttribute="leading" secondItem="7mL-uV-Ec4" secondAttribute="leading" id="Ekc-Ff-6Bk"/>
+                                                <constraint firstItem="xpV-6I-fj3" firstAttribute="top" secondItem="7mL-uV-Ec4" secondAttribute="bottom" constant="5" id="Zay-mH-x7B"/>
+                                                <constraint firstAttribute="trailing" secondItem="7mL-uV-Ec4" secondAttribute="trailing" constant="5" id="b09-TU-lQW"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="inputTextField" destination="xpV-6I-fj3" id="zlO-oi-ql2"/>
+                                            <outlet property="titlelabel" destination="7mL-uV-Ec4" id="M6i-GR-xhU"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RAEditPhotoCell" rowHeight="100" id="O81-hv-hN7" customClass="RAEditPhotoCell">
+                                        <rect key="frame" x="0.0" y="98" width="375" height="100"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="O81-hv-hN7" id="1NM-GJ-ZhA">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qmw-jO-NVe">
+                                                    <rect key="frame" x="5" y="-0.5" width="42" height="100"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MBQ-1e-9Rf">
+                                                    <rect key="frame" x="280.5" y="5" width="89.5" height="89.5"/>
+                                                    <gestureRecognizers/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" secondItem="MBQ-1e-9Rf" secondAttribute="height" multiplier="89:89" id="wf3-jd-K2C"/>
+                                                    </constraints>
+                                                </imageView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="MBQ-1e-9Rf" firstAttribute="top" secondItem="1NM-GJ-ZhA" secondAttribute="top" constant="5" id="3sZ-Ux-FGz"/>
+                                                <constraint firstItem="Qmw-jO-NVe" firstAttribute="centerY" secondItem="1NM-GJ-ZhA" secondAttribute="centerY" id="9ge-KJ-iRy"/>
+                                                <constraint firstAttribute="bottom" secondItem="MBQ-1e-9Rf" secondAttribute="bottom" constant="5" id="HgN-3y-uPQ"/>
+                                                <constraint firstAttribute="trailing" secondItem="MBQ-1e-9Rf" secondAttribute="trailing" constant="5" id="MZv-jg-YDL"/>
+                                                <constraint firstItem="Qmw-jO-NVe" firstAttribute="height" secondItem="1NM-GJ-ZhA" secondAttribute="height" id="YOC-Jh-83d"/>
+                                                <constraint firstItem="MBQ-1e-9Rf" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Qmw-jO-NVe" secondAttribute="trailing" constant="10" id="eEK-Vc-XMC"/>
+                                                <constraint firstItem="Qmw-jO-NVe" firstAttribute="leading" secondItem="1NM-GJ-ZhA" secondAttribute="leading" constant="5" id="wg3-mz-Lx8"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="photoView" destination="MBQ-1e-9Rf" id="y5c-aA-4aD"/>
+                                            <outlet property="titleLabel" destination="Qmw-jO-NVe" id="dV3-vz-92d"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RAEditMultInputCell" rowHeight="120" id="N8K-99-Zru" customClass="RAEditMultInputCell">
+                                        <rect key="frame" x="0.0" y="198" width="375" height="120"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="N8K-99-Zru" id="hEy-c0-9Kf">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="119.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kSq-7N-B38">
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="IOP-ZT-bPg">
+                                                    <rect key="frame" x="5" y="31" width="365" height="83.5"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                    <string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                                    <connections>
+                                                        <outlet property="delegate" destination="N8K-99-Zru" id="mqY-ul-1AU"/>
+                                                    </connections>
+                                                </textView>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstItem="IOP-ZT-bPg" firstAttribute="top" secondItem="kSq-7N-B38" secondAttribute="bottom" constant="5" id="ALn-a5-hd8"/>
+                                                <constraint firstItem="IOP-ZT-bPg" firstAttribute="trailing" secondItem="kSq-7N-B38" secondAttribute="trailing" id="IWB-Wc-5C5"/>
+                                                <constraint firstItem="kSq-7N-B38" firstAttribute="top" secondItem="hEy-c0-9Kf" secondAttribute="top" constant="5" id="Nay-fR-SMJ"/>
+                                                <constraint firstItem="IOP-ZT-bPg" firstAttribute="leading" secondItem="kSq-7N-B38" secondAttribute="leading" id="OhJ-tA-WvU"/>
+                                                <constraint firstAttribute="trailing" secondItem="kSq-7N-B38" secondAttribute="trailing" constant="5" id="ZrD-vg-hUA"/>
+                                                <constraint firstItem="kSq-7N-B38" firstAttribute="leading" secondItem="hEy-c0-9Kf" secondAttribute="leading" constant="5" id="bNJ-Or-Wab"/>
+                                                <constraint firstAttribute="bottom" secondItem="IOP-ZT-bPg" secondAttribute="bottom" constant="5" id="qGB-Zw-orV"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="inputView" destination="IOP-ZT-bPg" id="HHf-TM-AeD"/>
+                                            <outlet property="titleLabel" destination="kSq-7N-B38" id="Nqr-vh-BVJ"/>
+                                        </connections>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RAEditLabelCell" rowHeight="55" id="w0z-0V-x8d" customClass="RAEditLabelCell">
+                                        <rect key="frame" x="0.0" y="318" width="375" height="55"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="w0z-0V-x8d" id="xbL-DH-R1m">
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="54.5"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fYw-WK-y6k">
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="21" id="t5I-gk-pIQ"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rwu-ro-0dr">
+                                                    <rect key="frame" x="5" y="31" width="365" height="18"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="18" id="cE2-kD-1Ra"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <nil key="textColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                            <constraints>
+                                                <constraint firstAttribute="trailing" secondItem="fYw-WK-y6k" secondAttribute="trailing" constant="5" id="Dq0-IT-Kxt"/>
+                                                <constraint firstAttribute="bottom" secondItem="Rwu-ro-0dr" secondAttribute="bottom" constant="5.5" id="Hct-OI-lOR"/>
+                                                <constraint firstItem="Rwu-ro-0dr" firstAttribute="trailing" secondItem="fYw-WK-y6k" secondAttribute="trailing" id="Jee-w6-MqO"/>
+                                                <constraint firstItem="Rwu-ro-0dr" firstAttribute="top" secondItem="fYw-WK-y6k" secondAttribute="bottom" constant="5" id="PzN-lC-v2q"/>
+                                                <constraint firstItem="fYw-WK-y6k" firstAttribute="leading" secondItem="xbL-DH-R1m" secondAttribute="leading" constant="5" id="c7g-IP-6Na"/>
+                                                <constraint firstItem="Rwu-ro-0dr" firstAttribute="leading" secondItem="fYw-WK-y6k" secondAttribute="leading" id="dQ3-jn-rwg"/>
+                                                <constraint firstItem="fYw-WK-y6k" firstAttribute="top" secondItem="xbL-DH-R1m" secondAttribute="top" constant="5" id="s7q-jb-oYh"/>
+                                            </constraints>
+                                        </tableViewCellContentView>
+                                        <connections>
+                                            <outlet property="titleLaebl" destination="fYw-WK-y6k" id="dc5-Qr-LbD"/>
+                                            <outlet property="valueLabel" destination="Rwu-ro-0dr" id="irJ-pb-krL"/>
+                                        </connections>
+                                    </tableViewCell>
+                                </prototypes>
+                                <connections>
+                                    <outlet property="dataSource" destination="IN3-1q-AsB" id="j4i-ZN-kfv"/>
+                                    <outlet property="delegate" destination="IN3-1q-AsB" id="NbU-kh-Hg2"/>
+                                </connections>
+                            </tableView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <gestureRecognizers/>
+                        <constraints>
+                            <constraint firstItem="ySV-Nn-wQz" firstAttribute="bottom" secondItem="h3M-SO-JeC" secondAttribute="bottom" id="8B5-Af-bAC"/>
+                            <constraint firstItem="ySV-Nn-wQz" firstAttribute="trailing" secondItem="h3M-SO-JeC" secondAttribute="trailing" id="MVB-lW-JKx"/>
+                            <constraint firstItem="h3M-SO-JeC" firstAttribute="top" secondItem="ySV-Nn-wQz" secondAttribute="top" id="eC3-64-OfK"/>
+                            <constraint firstItem="h3M-SO-JeC" firstAttribute="leading" secondItem="ySV-Nn-wQz" secondAttribute="leading" id="tzR-Dr-6Hq"/>
+                        </constraints>
+                        <viewLayoutGuide key="safeArea" id="ySV-Nn-wQz"/>
+                        <connections>
+                            <outletCollection property="gestureRecognizers" destination="sHS-5Y-Prb" appends="YES" id="zGA-ih-Yce"/>
+                        </connections>
+                    </view>
+                    <connections>
+                        <outlet property="orderEditTableView" destination="h3M-SO-JeC" id="f7f-IF-rEo"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="M3M-MZ-XRp" userLabel="First Responder" sceneMemberID="firstResponder"/>
+                <tapGestureRecognizer id="sHS-5Y-Prb">
+                    <connections>
+                        <action selector="tapToResignFirstResponder:" destination="IN3-1q-AsB" id="FVY-0T-Rxu"/>
+                    </connections>
+                </tapGestureRecognizer>
+            </objects>
+            <point key="canvasLocation" x="-18.399999999999999" y="178.56071964017991"/>
+        </scene>
+    </scenes>
+</document>

+ 26 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditBaseModel.h

@@ -0,0 +1,26 @@
+//
+//  RAEditBaseModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+typedef enum {
+    
+    RAEditTypeLabel = 0,
+    RAEditTypeInput = 1,
+    RAEditTypeMultInput = 2,
+    RAEditTypePhoto = 3
+    
+} RAEditType;
+
+@interface RAEditBaseModel : NSObject
+
+@property (nonatomic,assign) RAEditType type;
+@property (nonatomic,copy) NSString *title;
+@property (nonatomic,assign) CGFloat height;
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditBaseModel.m

@@ -0,0 +1,17 @@
+//
+//  RAEditBaseModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditBaseModel.h"
+
+@implementation RAEditBaseModel
+
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
+    
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditInputModel.h

@@ -0,0 +1,16 @@
+//
+//  RAEditInputModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditBaseModel.h"
+
+@interface RAEditInputModel : RAEditBaseModel
+
+@property (nonatomic,assign) BOOL scannable;
+@property (nonatomic,copy) NSString *value;
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditInputModel.m

@@ -0,0 +1,17 @@
+//
+//  RAEditInputModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditInputModel.h"
+
+@implementation RAEditInputModel
+
+- (CGFloat)height {
+    return 70.0f;
+}
+
+@end

+ 15 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditLabelModel.h

@@ -0,0 +1,15 @@
+//
+//  RAEditLabelModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditBaseModel.h"
+
+@interface RAEditLabelModel : RAEditBaseModel
+
+@property (nonatomic,copy) NSString *value;
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditLabelModel.m

@@ -0,0 +1,17 @@
+//
+//  RAEditLabelModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditLabelModel.h"
+
+@implementation RAEditLabelModel
+
+- (CGFloat)height {
+    return 55.0f;
+}
+
+@end

+ 15 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditMultInputModel.h

@@ -0,0 +1,15 @@
+//
+//  RAEditMultInputModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditBaseModel.h"
+
+@interface RAEditMultInputModel : RAEditBaseModel
+
+@property (nonatomic,copy) NSString *value;
+
+@end

+ 17 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditMultInputModel.m

@@ -0,0 +1,17 @@
+//
+//  RAEditMultInputModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditMultInputModel.h"
+
+@implementation RAEditMultInputModel
+
+- (CGFloat)height {
+    return 120.0f;
+}
+
+@end

+ 16 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditPhotoModel.h

@@ -0,0 +1,16 @@
+//
+//  RAEditPhotoModel.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditBaseModel.h"
+
+@interface RAEditPhotoModel : RAEditBaseModel
+
+@property (nonatomic,copy) NSString *path;
+@property (nonatomic,strong) UIImage *photo;
+
+@end

+ 18 - 0
Redant Drivers/Apex And Drivers/Update/Model/RAEditPhotoModel.m

@@ -0,0 +1,18 @@
+//
+//  RAEditPhotoModel.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAEditPhotoModel.h"
+
+@implementation RAEditPhotoModel
+
+- (CGFloat)height {
+    return 100.0f;
+}
+
+
+@end

+ 15 - 0
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDataSource.h

@@ -0,0 +1,15 @@
+//
+//  RAOrderEditViewController+TableDataSource.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderEditViewController.h"
+#import "RAEditScanInputCell.h"
+#import "RAEditMultInputCell.h"
+
+@interface RAOrderEditViewController (TableDataSource) <UITableViewDataSource,RAEditInputDelegate,RAEditMultInputDelegate>
+
+@end

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

@@ -0,0 +1,101 @@
+//
+//  RAOrderEditViewController+TableDataSource.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderEditViewController+TableDataSource.h"
+
+#import "RAEditLabelCell.h"
+#import "RAEditPhotoCell.h"
+
+#import "RAEditInputModel.h"
+#import "RAEditMultInputModel.h"
+#import "RAEditLabelModel.h"
+#import "RAEditPhotoModel.h"
+
+@implementation RAOrderEditViewController (TableDataSource)
+
+- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    
+    RAEditBaseModel *model = [self modelForIndexPath:indexPath];
+    
+    switch (model.type) {
+        case RAEditTypeLabel: {
+            
+            RAEditLabelCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAEditLabelCell" forIndexPath:indexPath];
+            RAEditLabelModel *labelModel = (RAEditLabelModel *)model;
+            cell.model = labelModel;
+            
+            return cell;
+        }
+            break;
+        case RAEditTypeInput: {
+            
+            RAEditScanInputCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAEditScanInputCell" forIndexPath:indexPath];
+            RAEditInputModel *inputModel = (RAEditInputModel *)model;
+            cell.model = inputModel;
+            cell.delegate = self;
+            
+            return cell;
+        }
+            break;
+        case RAEditTypeMultInput: {
+            
+            RAEditMultInputCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAEditMultInputCell" forIndexPath:indexPath];
+            RAEditMultInputModel *multInputModel = (RAEditMultInputModel *)model;
+            cell.model = multInputModel;
+            cell.delegate = self;
+            
+            return cell;
+        }
+            break;
+        case RAEditTypePhoto: {
+            
+            RAEditPhotoCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RAEditPhotoCell" forIndexPath:indexPath];
+            RAEditPhotoModel *photoModel = (RAEditPhotoModel *)model;
+            cell.model = photoModel;
+            
+            return cell;
+        }
+            break;
+            
+        default:
+            break;
+    }
+    
+    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"detaulCell"];
+    return cell;
+}
+
+- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self itemCountForSection:section];
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return [self editSectionCount];
+}
+
+#pragma mark - Input Delegate
+
+- (void)beginEditInputCell:(RAEditScanInputCell *)cell {
+    self.editingIndexPath = [self indexPathForCell:cell];
+}
+
+- (void)endEditInputCell:(RAEditScanInputCell *)cell {
+    self.editingIndexPath = nil;
+}
+
+#pragma mark - MultInput Delegate
+
+- (void)beginEditMultInputCell:(RAEditMultInputCell *)cell {
+    self.editingIndexPath = [self indexPathForCell:cell];
+}
+
+- (void)endEditMultInputCell:(RAEditMultInputCell *)cell {
+    self.editingIndexPath = nil;
+}
+
+@end

+ 13 - 0
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDelegate.h

@@ -0,0 +1,13 @@
+//
+//  RAOrderEditViewController+TableDelegate.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderEditViewController.h"
+
+@interface RAOrderEditViewController (TableDelegate) <UITableViewDelegate>
+
+@end

+ 38 - 0
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController+TableDelegate.m

@@ -0,0 +1,38 @@
+//
+//  RAOrderEditViewController+TableDelegate.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderEditViewController+TableDelegate.h"
+#import "RAEditBaseModel.h"
+
+@implementation RAOrderEditViewController (TableDelegate)
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    RAEditBaseModel *model = [self modelForIndexPath:indexPath];
+    
+    return model.height;
+}
+
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
+    
+    UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 44.0f)];
+    header.backgroundColor = [UIColor lightGrayColor];
+    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 11, CGRectGetWidth(tableView.bounds) - 20, 22)];
+    [header addSubview:label];
+    
+    label.text = [self titleForSection:section];
+    
+    return header;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 44.f;
+}
+
+
+@end

+ 25 - 0
Redant Drivers/Apex And Drivers/Update/RAOrderEditViewController.h

@@ -0,0 +1,25 @@
+//
+//  RAOrderEditViewController.h
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RABaseViewController.h"
+
+@class RAEditBaseModel;
+@interface RAOrderEditViewController : RABaseViewController
+
+@property (nonatomic,copy) NSString *orderID;
+@property (nonatomic,assign) NSInteger actionID;
+
+@property (nonatomic,strong) NSIndexPath *editingIndexPath;
+
+- (NSUInteger)editSectionCount;
+- (NSInteger)itemCountForSection:(NSInteger)section;
+- (NSString *)titleForSection:(NSInteger)section;
+- (RAEditBaseModel *)modelForIndexPath:(NSIndexPath *)indexPath;
+- (NSIndexPath *)indexPathForCell:(UITableViewCell *)cell;
+
+@end

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

@@ -0,0 +1,239 @@
+//
+//  RAOrderEditViewController.m
+//  Apex And Drivers
+//
+//  Created by Jack on 2018/6/4.
+//  Copyright © 2018年 USAI. All rights reserved.
+//
+
+#import "RAOrderEditViewController.h"
+
+#import "RAEditInputModel.h"
+#import "RAEditMultInputModel.h"
+#import "RAEditLabelModel.h"
+#import "RAEditPhotoModel.h"
+
+@interface RAEditSectionModel : NSObject
+
+@property (nonatomic,strong) NSArray <RAEditBaseModel *> *items;
+@property (nonatomic,copy) NSString *title;
+
+@end
+
+@implementation RAEditSectionModel
+
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
+    
+}
+
+- (void)setItems:(NSArray<RAEditBaseModel *> *)items {
+    
+    NSArray *tmpItems = items;
+    NSMutableArray *itemArr = [NSMutableArray arrayWithCapacity:items.count];
+    for (int i = 0; i < tmpItems.count; i++) {
+        NSDictionary *item = [tmpItems objectAtIndex:i];
+        RAEditType type = [[item objectForKey:@"type"] intValue];
+        switch (type) {
+            case RAEditTypeLabel: {
+                
+                RAEditLabelModel *model = [RAEditLabelModel new];
+                [model setValuesForKeysWithDictionary:item];
+                [itemArr addObject:model];
+            }
+                break;
+            case RAEditTypeInput: {
+                
+                RAEditInputModel *model = [RAEditInputModel new];
+                [model setValuesForKeysWithDictionary:item];
+                [itemArr addObject:model];
+            }
+                break;
+            case RAEditTypeMultInput: {
+                
+                RAEditMultInputModel *model = [RAEditMultInputModel new];
+                [model setValuesForKeysWithDictionary:item];
+                [itemArr addObject:model];
+            }
+                break;
+            case RAEditTypePhoto: {
+                
+                RAEditPhotoModel *model = [RAEditPhotoModel new];
+                [model setValuesForKeysWithDictionary:item];
+                [itemArr addObject:model];
+            }
+                break;
+                
+            default:
+                break;
+        }
+    }
+    _items = itemArr;
+}
+
+- (NSInteger)itemCount {
+    return self.items.count;
+}
+
+- (RAEditBaseModel *)itemModelForIndex:(NSInteger)index {
+    return [self.items objectAtIndex:index];
+}
+
+@end
+
+
+#pragma mark - View Controller
+
+@interface RAOrderEditViewController ()
+
+@property (nonatomic,strong) IBOutlet UITableView *orderEditTableView;
+@property (nonatomic,strong) NSMutableArray *sectionArray;
+
+
+@end
+
+@implementation RAOrderEditViewController
+
++ (instancetype)viewControllerFromStoryboard {
+    RAOrderEditViewController *editVC = [[UIStoryboard storyboardWithName:@"Edit" bundle:nil] instantiateViewControllerWithIdentifier:[self storyboardID]];
+    return editVC;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self configureTable];
+    [self loadData];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+    [self registKeyboardListener];
+}
+
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    
+    [self unregistKeyboardListener];
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)configureTable {
+    
+    self.orderEditTableView.tableFooterView = [UIView new];
+    self.orderEditTableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
+}
+
+- (void)registKeyboardListener {
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChangeFrame:) name:UIKeyboardWillChangeFrameNotification object:nil];
+}
+
+- (void)unregistKeyboardListener {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+#pragma mark Getter
+
+- (NSMutableArray *)sectionArray {
+    if (!_sectionArray) {
+        _sectionArray = [NSMutableArray array];
+    }
+    return _sectionArray;
+}
+
+- (NSUInteger)editSectionCount {
+    
+    return self.sectionArray.count;
+}
+
+- (NSInteger)itemCountForSection:(NSInteger)section {
+    return [[self.sectionArray objectAtIndex:section] itemCount];
+}
+
+- (RAEditBaseModel *)modelForIndexPath:(NSIndexPath *)indexPath {
+    return [[self.sectionArray objectAtIndex:indexPath.section] itemModelForIndex:indexPath.row];
+}
+
+- (NSString *)titleForSection:(NSInteger)section {
+   return [[self.sectionArray objectAtIndex:section] title];
+}
+
+- (NSIndexPath *)indexPathForCell:(UITableViewCell *)cell {
+    return [self.orderEditTableView indexPathForCell:cell];
+}
+
+#pragma mark - Data
+
+- (void)loadData {
+    
+    // show progress
+    
+    NSString *orderID = self.orderID;
+    NSInteger actionID = self.actionID;
+    __weak typeof(self) weakSelf = self;
+    dispatch_async(dispatch_get_global_queue(0, 0), ^{
+        
+        NSDictionary *json = [RADataProvider requestUpdateOrder:orderID driverAction:actionID];
+        
+        dispatch_async(dispatch_get_main_queue(), ^{
+            
+            // dismiss progress
+            
+            if (weakSelf) {
+                __strong typeof(weakSelf) strongSelf = weakSelf;
+                
+                int result = [[json objectForKey:@"result"] intValue];
+                if (result == RESULT_TRUE) {
+                    
+                    NSArray *sectionArray = [json objectForKey:@"sections"];
+                    [strongSelf.sectionArray removeAllObjects];
+                    for (int i = 0; i < sectionArray.count; i++) {
+                        NSDictionary *section = [sectionArray objectAtIndex:i];
+                        RAEditSectionModel *model = [RAEditSectionModel new];
+                        [model setValuesForKeysWithDictionary:section];
+                        [strongSelf.sectionArray addObject:model];
+                    }
+                    
+                    [strongSelf.orderEditTableView reloadData];
+                    
+                } else {
+                    // process error
+                    
+                }
+            }
+            
+        });
+        
+    });
+}
+
+#pragma mark - Tap Action
+
+- (IBAction)tapToResignFirstResponder:(UITapGestureRecognizer *)sender {
+    
+    [self.view endEditing:YES];
+    
+}
+
+#pragma mark - Keyboard Listener
+
+- (void)keyboardWillChangeFrame:(NSNotification *)notification {
+    
+    CGRect end = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
+    CGFloat screenHeight = CGRectGetHeight([UIScreen mainScreen].bounds);
+    CGFloat keyboardHeight = screenHeight - CGRectGetMinY(end);
+    
+    UIEdgeInsets insets = UIEdgeInsetsMake(0, 0, keyboardHeight, 0);
+    self.orderEditTableView.contentInset = insets;
+    
+    if (self.editingIndexPath) {
+        [self.orderEditTableView scrollToRowAtIndexPath:self.editingIndexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO];
+    }
+}
+
+@end

BIN
Redant Drivers/Barcode_h.png


BIN
Redant Drivers/Barcode_n.png