소스 검색

设备管理

huangyp 6 년 전
부모
커밋
88155969af
69개의 변경된 파일1695개의 추가작업 그리고 144개의 파일을 삭제
  1. 44 0
      shiku_im/shiku_im.xcodeproj/project.pbxproj
  2. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/Contents.json
  3. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/UU_device_icon0@1x.png
  4. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/UU_device_icon0@2x.png
  5. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/UU_device_icon0@3x.png
  6. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/Contents.json
  7. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/UU_device_icon1@1x.png
  8. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/UU_device_icon1@2x.png
  9. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/UU_device_icon1@3x.png
  10. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/Contents.json
  11. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/UU_device_icon10@1x.png
  12. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/UU_device_icon10@2x.png
  13. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/UU_device_icon10@3x.png
  14. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/Contents.json
  15. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/UU_device_icon11@1x.png
  16. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/UU_device_icon11@2x.png
  17. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/UU_device_icon11@3x.png
  18. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/Contents.json
  19. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/UU_device_icon2@1x.png
  20. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/UU_device_icon2@2x.png
  21. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/UU_device_icon2@3x.png
  22. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/Contents.json
  23. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/UU_device_icon3@1x.png
  24. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/UU_device_icon3@2x.png
  25. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/UU_device_icon3@3x.png
  26. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/Contents.json
  27. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/UU_device_icon4@1x.png
  28. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/UU_device_icon4@2x.png
  29. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/UU_device_icon4@3x.png
  30. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/Contents.json
  31. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/UU_device_icon5@1x.png
  32. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/UU_device_icon5@2x.png
  33. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/UU_device_icon5@3x.png
  34. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/Contents.json
  35. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/UU_device_icon6@1x.png
  36. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/UU_device_icon6@2x.png
  37. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/UU_device_icon6@3x.png
  38. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/Contents.json
  39. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/UU_device_icon7@1x.png
  40. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/UU_device_icon7@2x.png
  41. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/UU_device_icon7@3x.png
  42. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/Contents.json
  43. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/UU_device_icon8@1x.png
  44. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/UU_device_icon8@2x.png
  45. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/UU_device_icon8@3x.png
  46. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/Contents.json
  47. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/UU_device_icon9@1x.png
  48. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/UU_device_icon9@2x.png
  49. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/UU_device_icon9@3x.png
  50. 23 0
      shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/Contents.json
  51. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/uu_device_scan@1x.png
  52. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/uu_device_scan@2x.png
  53. BIN
      shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/uu_device_scan@3x.png
  54. 12 3
      shiku_im/shiku_im/controller/myOA/JOOutWorkPlanVC.m
  55. 1 1
      shiku_im/shiku_im/controller/myOA/UASNetworkManager.m
  56. 1 1
      shiku_im/shiku_im/controller/审批流详情/LYYApprovalDetailVC.m
  57. 5 0
      shiku_im/shiku_im/en.lproj/InfoPlist.strings
  58. 1 1
      shiku_im/shiku_im/shiku_im-Info.plist
  59. 6 1
      shiku_im/shiku_im/zh-Hans.lproj/InfoPlist.strings
  60. 5 0
      shiku_im/shiku_im/zh-Hant.lproj/InfoPlist.strings
  61. 1 1
      shiku_im/shiku_im/文件夹1/多明细通用表单/Models/MoreGridModel.h
  62. 90 86
      shiku_im/shiku_im/文件夹1/设备管理/viewcontellers/LYYDeviceMainVC.m
  63. 55 22
      shiku_im/shiku_im/文件夹1/设备管理/viewcontellers/搜索/LYYDMDataSearchVC.m
  64. 30 23
      shiku_im/shiku_im/文件夹1/设备管理/views/查寻cell/LYYDMDataSearchCell.m
  65. 3 5
      shiku_im/shiku_im/文件夹1/设备管理/views/查寻cell/LYYDMDataSearchColectCell.m
  66. 14 0
      shiku_im/shiku_im/文件夹1/设备管理2.0/Controllers/DeviceFormVC.h
  67. 426 0
      shiku_im/shiku_im/文件夹1/设备管理2.0/Controllers/DeviceFormVC.m
  68. 37 0
      shiku_im/shiku_im/文件夹1/设备管理2.0/Views/DeviceFormView.h
  69. 665 0
      shiku_im/shiku_im/文件夹1/设备管理2.0/Views/DeviceFormView.m

+ 44 - 0
shiku_im/shiku_im.xcodeproj/project.pbxproj

@@ -861,6 +861,8 @@
 		27E2EA991CC762F600850F6E /* uu_work_pengyouquan_pinglun.png in Resources */ = {isa = PBXBuildFile; fileRef = 27E2EA981CC762F600850F6E /* uu_work_pengyouquan_pinglun.png */; };
 		27E8FECD1CE5BFAB000A04EA /* JZLocationConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 27E8FECC1CE5BFAB000A04EA /* JZLocationConverter.m */; };
 		27EBA2AD1D5DA118005D119E /* MySubordinateVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EBA2AC1D5DA118005D119E /* MySubordinateVC.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
+		27EBFBC922BA25BE0004CFEF /* DeviceFormVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EBFBC822BA25BE0004CFEF /* DeviceFormVC.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
+		27EBFBCC22BB5D0E0004CFEF /* DeviceFormView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EBFBCB22BB5D0E0004CFEF /* DeviceFormView.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
 		27ECC13F201EF86200E4E899 /* GoodsListView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27ECC13E201EF86200E4E899 /* GoodsListView.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; };
 		27ECC142201F039F00E4E899 /* GoodsListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 27ECC141201F039F00E4E899 /* GoodsListCell.m */; };
 		27ED47391CBB4D1800CAB797 /* uu_me_b2bzhanghu.png in Resources */ = {isa = PBXBuildFile; fileRef = 27ED472C1CBB4D1800CAB797 /* uu_me_b2bzhanghu.png */; };
@@ -4207,6 +4209,10 @@
 		27E8FECC1CE5BFAB000A04EA /* JZLocationConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JZLocationConverter.m; sourceTree = "<group>"; };
 		27EBA2AB1D5DA118005D119E /* MySubordinateVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MySubordinateVC.h; sourceTree = "<group>"; };
 		27EBA2AC1D5DA118005D119E /* MySubordinateVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MySubordinateVC.m; sourceTree = "<group>"; };
+		27EBFBC722BA25BE0004CFEF /* DeviceFormVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceFormVC.h; sourceTree = "<group>"; };
+		27EBFBC822BA25BE0004CFEF /* DeviceFormVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DeviceFormVC.m; sourceTree = "<group>"; };
+		27EBFBCA22BB5D0E0004CFEF /* DeviceFormView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceFormView.h; sourceTree = "<group>"; };
+		27EBFBCB22BB5D0E0004CFEF /* DeviceFormView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DeviceFormView.m; sourceTree = "<group>"; };
 		27ECC13D201EF86200E4E899 /* GoodsListView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GoodsListView.h; sourceTree = "<group>"; };
 		27ECC13E201EF86200E4E899 /* GoodsListView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoodsListView.m; sourceTree = "<group>"; };
 		27ECC140201F039F00E4E899 /* GoodsListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GoodsListCell.h; sourceTree = "<group>"; };
@@ -9936,6 +9942,41 @@
 			path = "多样式提示框";
 			sourceTree = "<group>";
 		};
+		27EBFBC322BA252A0004CFEF /* 设备管理2.0 */ = {
+			isa = PBXGroup;
+			children = (
+				27EBFBC622BA255F0004CFEF /* Models */,
+				27EBFBC522BA25580004CFEF /* Views */,
+				27EBFBC422BA254A0004CFEF /* Controllers */,
+			);
+			path = "设备管理2.0";
+			sourceTree = "<group>";
+		};
+		27EBFBC422BA254A0004CFEF /* Controllers */ = {
+			isa = PBXGroup;
+			children = (
+				27EBFBC722BA25BE0004CFEF /* DeviceFormVC.h */,
+				27EBFBC822BA25BE0004CFEF /* DeviceFormVC.m */,
+			);
+			path = Controllers;
+			sourceTree = "<group>";
+		};
+		27EBFBC522BA25580004CFEF /* Views */ = {
+			isa = PBXGroup;
+			children = (
+				27EBFBCA22BB5D0E0004CFEF /* DeviceFormView.h */,
+				27EBFBCB22BB5D0E0004CFEF /* DeviceFormView.m */,
+			);
+			path = Views;
+			sourceTree = "<group>";
+		};
+		27EBFBC622BA255F0004CFEF /* Models */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = Models;
+			sourceTree = "<group>";
+		};
 		27F5045C1FAAFBEF00704DF6 /* 服务项目选择 */ = {
 			isa = PBXGroup;
 			children = (
@@ -10327,6 +10368,7 @@
 				20C019192021727600312F12 /* InviteReg(邀请注册) */,
 				AA12F9B61FB5AA5000688D9F /* 工资条 */,
 				7DA6733D1FC41689007D2EA3 /* 设备管理 */,
+				27EBFBC322BA252A0004CFEF /* 设备管理2.0 */,
 				7D2A47B81FB155AF0060130A /* 一元捐 */,
 				B85D94751D5AD0D10006B276 /* MainViewController */,
 				B84A35151D210D6300C52DD9 /* 行政办公 */,
@@ -18950,6 +18992,7 @@
 				4D841A4E1E811D6D00852BA1 /* JOB2BEmployeeModel.m in Sources */,
 				7D3128A81EA9AE2300CA0C35 /* LYYSelectSchduleAlerView.m in Sources */,
 				7D49DC6E1FEA8E8800D6DAE2 /* LYYDMCheckDetailVC.m in Sources */,
+				27EBFBCC22BB5D0E0004CFEF /* DeviceFormView.m in Sources */,
 				CCFD208F19592D1D00B98494 /* TPCircularBuffer.c in Sources */,
 				CCE241FC18FFB8EB00A3CB5A /* XMPPRoomMessageCoreDataStorageObject.m in Sources */,
 				B87243B11D36254D005C05B4 /* JOKQSZTableViewController.m in Sources */,
@@ -19022,6 +19065,7 @@
 				7D153EDB1FEB9294003309FC /* LYYTextFieldCell.m in Sources */,
 				2771C81E20B538880066984D /* DFPlayer.m in Sources */,
 				4DD076E71DD9547400ACF90A /* LYJournalTaskCell.m in Sources */,
+				27EBFBC922BA25BE0004CFEF /* DeviceFormVC.m in Sources */,
 				203A97461F7B3CE100B91E16 /* UASInsHeaderView.m in Sources */,
 				CCE241EC18FFB8EB00A3CB5A /* XMPPReconnect.m in Sources */,
 				B8FAEFAA1D2B97EE00094132 /* JOPunchCardViewController.m in Sources */,

+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/UU_device_icon0@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/UU_device_icon0@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon0.imageset/UU_device_icon0@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/UU_device_icon1@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/UU_device_icon1@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon1.imageset/UU_device_icon1@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/UU_device_icon10@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/UU_device_icon10@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon10.imageset/UU_device_icon10@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/UU_device_icon11@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/UU_device_icon11@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon11.imageset/UU_device_icon11@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/UU_device_icon2@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/UU_device_icon2@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon2.imageset/UU_device_icon2@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/UU_device_icon3@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/UU_device_icon3@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon3.imageset/UU_device_icon3@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/UU_device_icon4@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/UU_device_icon4@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon4.imageset/UU_device_icon4@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/UU_device_icon5@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/UU_device_icon5@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon5.imageset/UU_device_icon5@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/UU_device_icon6@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/UU_device_icon6@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon6.imageset/UU_device_icon6@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/UU_device_icon7@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/UU_device_icon7@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon7.imageset/UU_device_icon7@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/UU_device_icon8@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/UU_device_icon8@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon8.imageset/UU_device_icon8@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/UU_device_icon9@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/UU_device_icon9@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/UU_device_icon9.imageset/UU_device_icon9@3x.png


+ 23 - 0
shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/Contents.json

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

BIN
shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/uu_device_scan@1x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/uu_device_scan@2x.png


BIN
shiku_im/shiku_im/Images.xcassets/设备图片/uu_device_scan.imageset/uu_device_scan@3x.png


+ 12 - 3
shiku_im/shiku_im/controller/myOA/JOOutWorkPlanVC.m

@@ -1120,6 +1120,17 @@
         
     } failure:^(NSURLSessionDataTask *task, NSError *error) {
         
+        [UASAlertView showWithTitle:nil content:@"抱歉,没有认出你哦" sureTitle:@"再试一次" cancelTitle:Localized(@"UU_custom_cancle") click:^(NSInteger index) {
+            if (index == 2) {
+                [IDLFaceDetectionManager.sharedInstance reset];
+                [[IDLFaceDetectionManager sharedInstance] startInitial];
+                dvc.hasFinished = NO;
+                [dvc startCapture];
+            }
+            if (index == 1) {
+                [dvc dismissViewControllerAnimated:YES completion:nil];
+            }
+        }];
         
     }];
 }
@@ -1164,9 +1175,7 @@
     mannage.responseSerializer = [AFJSONResponseSerializer serializer];
     
     [mannage request:url method:POST parameters:param progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
-        // wdddnsstring *string = development ;
-        // whatthefuck *string = velopment ;
-        // 
+        
         
     } failure:^(NSURLSessionDataTask *task, NSError *error) {
         

+ 1 - 1
shiku_im/shiku_im/controller/myOA/UASNetworkManager.m

@@ -33,7 +33,7 @@ static UASNetworkManager *b2bManager = nil;
     [manager.requestSerializer setValue:[NSString stringWithFormat:@"JSESSIONID=%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"sessionId"]] forHTTPHeaderField:@"Cookie"];
     
     [manager.requestSerializer willChangeValueForKey:@"timeoutInterval"];
-     manager.requestSerializer.timeoutInterval = 15.0f;
+//     manager.requestSerializer.timeoutInterval = 15.0f;
     [manager.requestSerializer didChangeValueForKey:@"timeoutInterval"];
   
     return manager;

+ 1 - 1
shiku_im/shiku_im/controller/审批流详情/LYYApprovalDetailVC.m

@@ -899,7 +899,7 @@
                 _FD_model.fpd_id = [obj1 objectForKey:@"DG_FIELD"];
                 
             }
-            if ([[obj1 objectForKey:@"DG_CAPTION"] isEqualToString:@"附件"]) {
+            if ([[obj1 objectForKey:@"DG_CAPTION"] isEqualToString:@"附件"]||[FORMAT(@"%@",[obj1 objectForKey:@"DG_RENDERER"]) isEqualToString:@"detailAttach"]) {
                 
                 [_FD_model.fb_attachName addObject:FORMAT(@"%@",[obj1 objectForKey:@"DG_FIELD"]) ];
             }

+ 5 - 0
shiku_im/shiku_im/en.lproj/InfoPlist.strings

@@ -1020,7 +1020,12 @@
 "UU_ScrapApplication" = "ScrapApplication";
 "UU_Maintenance" = "Maintenance";
 "UU_FaultSubmission" = "FaultSubmission";
+"UU_Repair" = "Repair";
 "UU_CycleInventory" = "CycleInventory";
+"UU_Requirement" = "Requirement";
+"UU_Stock" = "Stock";
+"UU_Batchtransfer" = "Batchtransfer";
+"UU_Statistics" = "Statistics";
 
 //报销单
 "UU_FY_Type" = "Type";

+ 1 - 1
shiku_im/shiku_im/shiku_im-Info.plist

@@ -33,7 +33,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>6.4.1</string>
+	<string>6.4.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleURLTypes</key>

+ 6 - 1
shiku_im/shiku_im/zh-Hans.lproj/InfoPlist.strings

@@ -1056,9 +1056,14 @@
 "UU_DeviceInquiry" = "设备查询";
 "UU_UsingApplication" = "使用申请";
 "UU_ScrapApplication" = "报废申请";
-"UU_Maintenance" = "护";
+"UU_Maintenance" = "养护管理";
 "UU_FaultSubmission" = "故障送检";
+"UU_Repair" = "设备维修";
 "UU_CycleInventory" = "周期盘点";
+"UU_Requirement" = "需求匹配";
+"UU_Stock" = "库存查询";
+"UU_Batchtransfer" = "批量转移";
+"UU_Statistics" = "统计分析";
 
 //报销单
 "UU_FY_Type" = "报销类型";

+ 5 - 0
shiku_im/shiku_im/zh-Hant.lproj/InfoPlist.strings

@@ -1017,7 +1017,12 @@
 "UU_ScrapApplication" = "報廢申請";
 "UU_Maintenance" = "保養維護";
 "UU_FaultSubmission" = "故障送檢";
+"UU_Repair" = "設備維修";
 "UU_CycleInventory" = "週期盤點";
+"UU_Requirement" = "需求匹配";
+"UU_Stock" = "庫存查詢";
+"UU_Batchtransfer" = "批量轉移";
+"UU_Statistics" = "統計分析";
 
 //报销单
 "UU_FY_Type" = "報帳類型";

+ 1 - 1
shiku_im/shiku_im/文件夹1/多明细通用表单/Models/MoreGridModel.h

@@ -45,7 +45,7 @@
 @property (nonatomic,strong) NSString *dg_type;//类型
 @property (nonatomic,strong) NSString *dg_maxlength;//长度
 @property (nonatomic,strong) NSString *mdg_isdefault;//是否显示
-@property (nonatomic,strong) NSString *dg_renderer;
+@property (nonatomic,strong) NSString *dg_renderer;//是否附件-detailAttach
 @property (nonatomic,strong) NSString *dg_width;
 @property (nonatomic,strong) NSString *dg_field;//key值
 @property (nonatomic,strong) NSString *dg_logictype;//是否必填(是否允许为空)

+ 90 - 86
shiku_im/shiku_im/文件夹1/设备管理/viewcontellers/LYYDeviceMainVC.m

@@ -17,11 +17,15 @@
 #import <Photos/PHPhotoLibrary.h>
 #import <AVFoundation/AVFoundation.h>
 #import "LYYRMatchingVC.h"//需求匹配
+#import "DeviceFormVC.h"
+
 static NSString *cellID = @"stutus";
 @interface LYYDeviceMainVC ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
 @property (strong , nonatomic) UICollectionViewFlowLayout *layOut;
 @property (strong , nonatomic) UICollectionView *collectView;
 @property (strong , nonatomic) NSMutableArray *dataArr;
+@property (strong , nonatomic) NSArray *callerArr;
+@property (strong , nonatomic) NSArray *nameArr;
 @end
 
 @implementation LYYDeviceMainVC
@@ -29,106 +33,63 @@ static NSString *cellID = @"stutus";
 - (void)viewDidLoad
 {
     [super viewDidLoad];
-    
+    self.title = @"设备管理";
 }
     
-    
-#pragma mark ------------------      创建UI  
+#pragma mark --- 创建UI
 - (void)createUI
 {
-    
-    
     [self getData];
     [self.view addSubview:self.collectView];
-    BackView
-    self.title = @"设备管理";
-    
 }
+
 - (void)backAction
 {
     [self.navigationController popViewControllerAnimated:YES];
-    
 }
+
 - (void)getData{
-    NSArray *nameArr = @[Localized(@"UU_Scan"),Localized(@"UU_DeviceInquiry"),Localized(@"UU_UsingApplication"),Localized(@"UU_ScrapApplication"),Localized(@"UU_Maintenance"),Localized(@"UU_FaultSubmission"),Localized(@"UU_CycleInventory"),@"需求匹配"];
-    for (NSInteger i = 1; i < 9; i ++) {
+    self.nameArr = @[Localized(@"UU_Scan"),Localized(@"UU_DeviceInquiry"),Localized(@"UU_UsingApplication"),Localized(@"UU_ScrapApplication"),Localized(@"UU_Maintenance"),Localized(@"UU_FaultSubmission"),Localized(@"UU_Repair"),Localized(@"UU_CycleInventory"),Localized(@"UU_Requirement"),Localized(@"UU_Stock"),Localized(@"UU_Batchtransfer"),Localized(@"UU_Statistics")];
+    
+    for (NSInteger i = 0; i < self.nameArr.count; i ++) {
         LYYDevieceMainModel *model = [LYYDevieceMainModel new];
-        model.nameSting = nameArr[i-1];
-        model.imageString = FORMAT(@"icon_devicemanagement_nor%ld",i);
-        
+        model.nameSting = self.nameArr[i];
+        model.imageString = FORMAT(@"UU_device_icon%ld",i);
         [self.dataArr addObject:model];
     }
-    
-    
-}
--(NSMutableArray *)dataArr
-{
-    if (!_dataArr) {
-        _dataArr = [NSMutableArray array];
-    }
-    return _dataArr;
-    
-}
--(UICollectionViewFlowLayout *)layOut{
-    
-    if (!_layOut) {
-        _layOut = [[UICollectionViewFlowLayout alloc] init];
-        _layOut.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
-        _layOut.minimumLineSpacing = 0;
-        _layOut.minimumInteritemSpacing = 0;
-        
-        _layOut.scrollDirection=UICollectionViewScrollDirectionVertical;
-   
-        _layOut.itemSize = CGSizeMake(SCREEN_WIDTH/4, 100);
-    }
-    
-    return _layOut;
-}
-- (UICollectionView *)collectView
-{
-    if (!_collectView) {
-        _collectView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) collectionViewLayout:self.layOut];
-        _collectView.dataSource = self;
-        _collectView.delegate = self;
-        _collectView.backgroundColor = BGKJ_COLOR;
-        [_collectView registerClass:[UASWorkMainCell class] forCellWithReuseIdentifier:cellID];
-    }
-    
-    return _collectView;
-    
-    
+
+    self.callerArr = @[@"DeviceChange!Use",@"DeviceChange!Scrap",@"DeviceChange!Maintain",@"DeviceChange!Inspect"];
 }
-#pragma mark ----- delegate && dataSource
+
+#pragma mark ----- CollectionView delegate && dataSource
 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
 {
-    return 8;
-    
+    return self.nameArr.count;
 }
+
 - ( UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
+    
     UASWorkMainCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellID forIndexPath:indexPath];
+    
     LYYDevieceMainModel *model = self.dataArr[indexPath.row];
     
     cell.shouldHidden = YES;
     
     cell.model1 =model;
-   
-    
+ 
     return cell;
-    
-    
 }
+
 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
 {
-    NSArray *arr = @[@"DeviceChange!Use",@"DeviceChange!Scrap",@"DeviceChange!Maintain",@"DeviceChange!Inspect"];
     LYYDevieceMainModel *model = self.dataArr[indexPath.row];
     switch (indexPath.row) {
-        case 0:
+        case 0://扫一扫
         {
             [self upLoadAgainBackToView];
-            
         }
             break;
-        case 1:
+        case 1://设备查询
         {
             LYYDMDataSearchVC *vc = [LYYDMDataSearchVC new];
             vc.caller = @"Device";
@@ -137,64 +98,83 @@ static NSString *cellID = @"stutus";
             
         }
             break;
-        case 2:
+        case 2://使用申请
         {
             LYYDocumentVC *a = [[LYYDocumentVC alloc]init];
             a.nameStr = model.nameSting;
-            a.caller = arr[0];
+            a.caller = self.callerArr[0];
             [self.navigationController pushViewController:a animated:YES];
         }
             break;
-        case 3:
+        case 3://报废申请
         {
             LYYDocumentVC *a = [[LYYDocumentVC alloc]init];
             a.nameStr = model.nameSting;
-            a.caller = arr[1];
+            a.caller = self.callerArr[1];
             [self.navigationController pushViewController:a animated:YES];
             
         }
             break;
-        case 4:
+        case 4://养护管理
         {
             LYYDocumentVC *a = [[LYYDocumentVC alloc]init];
             a.nameStr = model.nameSting;
-            a.caller = arr[2];
+            a.caller = self.callerArr[2];
             [self.navigationController pushViewController:a animated:YES];
         }
             break;
-        case 5:
+        case 5://故障送检
         {
             LYYDocumentVC *a = [[LYYDocumentVC alloc]init];
             a.nameStr = model.nameSting;
-            a.caller = arr[3];
+            a.caller = self.callerArr[3];
             [self.navigationController pushViewController:a animated:YES];
         }
             break;
-        case 6:
+          
+        case 6://设备维修
+        {
+            
+        }
+            break;
+        case 7://周期盘点
         {
             LYYDMCheckVC *vc = [LYYDMCheckVC new];
            
             [self.navigationController pushViewController:vc animated:YES];
         }
             break;
-        case 7:
+        case 8://需求匹配
         {
             LYYRMatchingVC *vc = [LYYRMatchingVC new];
             self.title = @"需求匹配";
             [self.navigationController pushViewController:vc animated:YES];
         }
             break;
-        
+        case 9://库存查询
+        {
             
+        }
+            break;
+        case 10://批量转移
+        {
             
+        }
+            break;
+        case 11://统计分析
+        {
+            DeviceFormVC *vc = [DeviceFormVC new];
+            
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+
         default:
             break;
     }
-    
-    
-    
 }
-#pragma mark -----扫一扫
+
+#pragma mark --- 扫一扫
 - (void)upLoadAgainBackToView
 {
     NSString *mediaType =AVMediaTypeVideo;
@@ -221,14 +201,38 @@ static NSString *cellID = @"stutus";
     
 }
 
-/*
-#pragma mark - Navigation
+#pragma mark --- lazy
+-(NSMutableArray *)dataArr
+{
+    if (!_dataArr) {
+        _dataArr = [NSMutableArray array];
+    }
+    return _dataArr;
+    
+}
+
+-(UICollectionViewFlowLayout *)layOut{
+    if (!_layOut) {
+        _layOut = [[UICollectionViewFlowLayout alloc] init];
+        _layOut.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
+        _layOut.minimumLineSpacing = 0;
+        _layOut.minimumInteritemSpacing = 0;
+        _layOut.scrollDirection = UICollectionViewScrollDirectionVertical;
+        _layOut.itemSize = CGSizeMake(SCREEN_WIDTH/3, 100);
+    }
+    return _layOut;
+}
 
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
+- (UICollectionView *)collectView
+{
+    if (!_collectView) {
+        _collectView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) collectionViewLayout:self.layOut];
+        _collectView.dataSource = self;
+        _collectView.delegate = self;
+        _collectView.backgroundColor = BGKJ_COLOR;
+        [_collectView registerClass:[UASWorkMainCell class] forCellWithReuseIdentifier:cellID];
+    }
+    return _collectView;
 }
-*/
 
 @end

+ 55 - 22
shiku_im/shiku_im/文件夹1/设备管理/viewcontellers/搜索/LYYDMDataSearchVC.m

@@ -19,6 +19,11 @@
 #import "LYYDeviceMainVC.h"
 #import "LYYDocumentDetailVC.h"
 #import "LYYDMScanVC.h"
+#import <AVFoundation/AVFoundation.h>
+#import <AssetsLibrary/AssetsLibrary.h>
+#import "HCScanQRViewController.h"
+#import "DeviceFormVC.h"
+
 static NSString * cellID = @"cellID";
 @interface LYYDMDataSearchVC ()<UISearchBarDelegate,IFlySpeechRecognizerDelegate,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
 /*关于语音搜索界面*/
@@ -85,12 +90,11 @@ static NSString * cellID = @"cellID";
 {
     if (_tableView == nil) {
         _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0, SCREEN_WIDTH,SCREEN_HEIGHT-64) style:UITableViewStylePlain];
-        
         _tableView.delegate=self;
         _tableView.dataSource=self;
         _tableView.backgroundColor = BGKJ_COLOR;
         _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
-        //_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
     }
     return _tableView;
     
@@ -111,13 +115,17 @@ static NSString * cellID = @"cellID";
     
     self.view.backgroundColor = BGKJ_COLOR;
     UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 7,SCREEN_WIDTH-110, 30)];
-    UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-110, 30)];
+    titleView.backgroundColor = [UIColor whiteColor];
+    titleView.layer.cornerRadius = 5;
+    titleView.layer.masksToBounds = YES;
+    
+    UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-95, 30)];
     searchBar.backgroundImage = [UIImage imageNamed:@"clearImage"];
     searchBar.delegate = self;
     searchBar.returnKeyType = UIReturnKeySearch;
     searchBar.tintColor = Color(69, 92, 255, 1);
     searchBar.backgroundColor = [UIColor whiteColor];
-    searchBar.layer.cornerRadius = 4;
+    searchBar.layer.cornerRadius = 5;
     searchBar.layer.masksToBounds = YES;
     if (_mustStr.length != 0) {
       
@@ -131,14 +139,13 @@ static NSString * cellID = @"cellID";
     searchBar.layer.borderColor = [UIColor whiteColor].CGColor;
     searchBar.layer.borderWidth = 0.5;
     
-    
-    
     UITextField *txfSearchField = [searchBar valueForKey:@"_searchField"];
+    txfSearchField.font = FONT_SIZE(13);
     [txfSearchField setLeftViewMode:UITextFieldViewModeNever];
     //    [txfSearchField setRightViewMode:UITextFieldViewModeNever];
     
     self.searchBar = searchBar;
-    UIView * uv = [[UIView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(searchBar.frame)-30, 0, 30, 30)];
+    UIView * uv = [[UIView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(titleView.frame)-30, 0, 30, 30)];
     uv.userInteractionEnabled = YES;
     self.uv = uv;
     UITapGestureRecognizer * tapges =[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickVoiceSearch)];
@@ -151,8 +158,6 @@ static NSString * cellID = @"cellID";
     [titleView addSubview:uv];
     self.navigationItem.titleView = titleView;
   
-   
-   
     
     UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeSystem];
     btn2.frame = CGRectMake(0, 5, 22, 22);
@@ -173,8 +178,42 @@ static NSString * cellID = @"cellID";
     UIBarButtonItem *bbi3 = [[UIBarButtonItem alloc]initWithCustomView:btn3];
     self.navigationItem.rightBarButtonItems = @[bbi3];
     
-    
+    //扫一扫按钮
+    UIButton *scanBtn = [UIButton buttonWithType:UIButtonTypeSystem];
+    scanBtn.frame = CGRectMake(0, 0, 30, 30);
+    [scanBtn addTarget:self action:@selector(scanAction) forControlEvents:UIControlEventTouchUpInside];
+    [titleView addSubview:scanBtn];
+    UIImageView *scanImage = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 20, 20)];
+    scanImage.image = [UIImage imageNamed:@"uu_device_scan"];
+    [scanBtn addSubview:scanImage];
+}
+
+#pragma mark --- 扫一扫
+-(void)scanAction
+{
+    NSString *mediaType = AVMediaTypeVideo;
+    AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];
+    if(authStatus == ALAuthorizationStatusRestricted || authStatus == ALAuthorizationStatusDenied){
+        
+        [((AppDelegate*)[[UIApplication sharedApplication] delegate])  showAlert:@"您没有允许使用相机,请前往“设置”中设置权限"  delegate:self];
+        return;
+    }
+    HCScanQRViewController * hvc = [[HCScanQRViewController alloc]init];
+    hvc.ChechIndex = 11;
+    @weakify(self)
+    [hvc setBlock:^(NSString *QRCodeInfo) {
+        @strongify(self)
+        DLog(@"%@",QRCodeInfo);
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            LYYDMScanVC *vc = [[LYYDMScanVC alloc] init];
+            vc.idstr = QRCodeInfo;
+            [self.navigationController pushViewController:vc animated:NO];
+        });
+        
+    }];
+    [self.navigationController pushViewController:hvc animated:YES];
 }
+
 #pragma mark -------点击条件搜索 clickRightBtn
 -(void)clickRightBtn
 {
@@ -412,10 +451,13 @@ static NSString * cellID = @"cellID";
         [self.navigationController pushViewController:detailVC animated:YES];
     }else{
         //点击跳转 
-        LYYDMScanVC *vc = [[LYYDMScanVC alloc] init];
-        vc.idstr = model.listDic[@"de_code"];
-        [self.navigationController pushViewController:vc animated:YES];
+//        LYYDMScanVC *vc = [[LYYDMScanVC alloc] init];
+//        vc.idstr = model.listDic[@"de_code"];
+//        [self.navigationController pushViewController:vc animated:YES];
         
+        DeviceFormVC *vc = [DeviceFormVC new];
+        vc.deviceCode = FORMAT(@"%@",model.listDic[@"de_code"]);
+        [self.navigationController pushViewController:vc animated:YES];
     }
   
     
@@ -880,14 +922,5 @@ static NSString * cellID = @"cellID";
     return size.height;
     
 }
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
-}
-*/
 
 @end

+ 30 - 23
shiku_im/shiku_im/文件夹1/设备管理/views/查寻cell/LYYDMDataSearchCell.m

@@ -57,8 +57,8 @@ static NSString *cellID  = @"stasss";
     if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
         
         //cell点击没效果
-        self.selectionStyle=UITableViewCellSelectionStyleNone;
-        self.backgroundColor=BGKJ_COLOR;
+        self.selectionStyle = UITableViewCellSelectionStyleNone;
+        self.backgroundColor = BGB_COLOR;
         // 裁剪看不到的
         if ([reuseIdentifier isEqualToString:@"status18811"]) {
             [self setView11];
@@ -76,37 +76,44 @@ static NSString *cellID  = @"stasss";
 - (void)setView11{
     _aaaa = 0;
     [self.contentView addSubview:self.collectView];
+    self.collectView.backgroundColor = BGKJ_COLOR;
+    self.collectView.layer.masksToBounds = YES;
+    self.collectView.layer.cornerRadius = 5;
     [self.collectView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.top.bottom.equalTo(self.contentView);
-        make.right.equalTo(self.contentView).offset(-10);
-        
+        make.right.equalTo(self.contentView).offset(-5);
+        make.left.equalTo(self.contentView).offset(5);
+        make.top.equalTo(self.contentView).offset(5);
+        make.bottom.equalTo(self.contentView).offset(-5);
     }];
     
 }
 - (void)setView{
     _aaaa = 0;
     [self.contentView addSubview:self.collectView];
+    self.collectView.backgroundColor = BGKJ_COLOR;
+    self.collectView.layer.masksToBounds = YES;
+    self.collectView.layer.cornerRadius = 5;
     [self.collectView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.top.bottom.equalTo(self.contentView);
-        make.right.equalTo(self.contentView).offset(-20);
-        
+        make.right.equalTo(self.contentView).offset(-5);
+        make.left.equalTo(self.contentView).offset(5);
+        make.top.equalTo(self.contentView).offset(5);
+        make.bottom.equalTo(self.contentView).offset(-5);
     }];
     
-    _selectBtn = [UIButton buttonWithType:UIButtonTypeCustom];
-    _selectBtn.backgroundColor = [UIColor clearColor];
-    _imageV.image =[UIImage imageNamed:@"ic_menu_retract(2)"];
-    _imageV = [[UIImageView alloc] initWithFrame:CGRectMake(10, 15, 15, 10)];
-    
-    // @""
-    [_selectBtn addSubview:_imageV];
-    [_selectBtn addTarget:self action:@selector(selectAction:) forControlEvents:UIControlEventTouchUpInside];
-    [self.contentView addSubview:self.selectBtn];
-    [self.selectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.bottom.equalTo(self.contentView);
-        make.height.width.mas_equalTo(30);
-        make.right.equalTo(self.contentView);
-        
-    }];
+//    _selectBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+//    _selectBtn.backgroundColor = [UIColor clearColor];
+//    _imageV.image =[UIImage imageNamed:@"ic_menu_retract(2)"];
+//    _imageV = [[UIImageView alloc] initWithFrame:CGRectMake(10, 15, 15, 10)];
+//
+//    [_selectBtn addSubview:_imageV];
+//    [_selectBtn addTarget:self action:@selector(selectAction:) forControlEvents:UIControlEventTouchUpInside];
+//    [self.contentView addSubview:self.selectBtn];
+//    [self.selectBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.bottom.equalTo(self.contentView);
+//        make.height.width.mas_equalTo(30);
+//        make.right.equalTo(self.contentView);
+//        
+//    }];
     UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(doubleTapAction:)];
     doubleTap.numberOfTapsRequired = 2;
     [self addGestureRecognizer:doubleTap];

+ 3 - 5
shiku_im/shiku_im/文件夹1/设备管理/views/查寻cell/LYYDMDataSearchColectCell.m

@@ -30,16 +30,14 @@
 - (void)setView{
     [self.contentView addSubview:self.leftlabel];
     [self.leftlabel mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.bottom.top.equalTo(self.contentView);
+        make.bottom.top.equalTo(self.contentView);
         make.width.mas_equalTo(50);
-        
+        make.left.equalTo(self.contentView).offset(5);
     }];
     [self.contentView addSubview:self.rightlabel];
     [self.rightlabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.leftlabel.mas_right);
         make.top.bottom.right.equalTo(self.contentView);
-        
-        
     }];
     
     
@@ -49,7 +47,7 @@
     _model = model;
     self.leftlabel.text = model.nameSting;
     if ([model.nameSting isEqualToString:@"设备编号"]) {
-        self.rightlabel.textColor = Color(6, 143, 235, 1.0);
+//        self.rightlabel.textColor = Color(6, 143, 235, 1.0);
     }
     self.rightlabel.text = model.imageString;
     

+ 14 - 0
shiku_im/shiku_im/文件夹1/设备管理2.0/Controllers/DeviceFormVC.h

@@ -0,0 +1,14 @@
+//
+//  DeviceFormVC.h
+//  shiku_im
+//
+//  Created by huangyp-pc on 2019/6/19.
+//
+
+#import "UASBaseVC.h"
+
+@interface DeviceFormVC : UASBaseVC
+
+@property (nonatomic,strong) NSString *deviceCode;
+
+@end

+ 426 - 0
shiku_im/shiku_im/文件夹1/设备管理2.0/Controllers/DeviceFormVC.m

@@ -0,0 +1,426 @@
+//
+//  DeviceFormVC.m
+//  shiku_im
+//
+//  Created by huangyp-pc on 2019/6/19.
+//
+
+#import "DeviceFormVC.h"
+#import "MoreGridModel.h"
+#import "DeviceFormView.h"
+#import "LYYFuJianModel.h"
+#import "LYYReadingVC.h"
+#import "LYYBigImageVC.h"
+
+@interface DeviceFormVC ()
+@property (nonatomic,strong) NSMutableArray *gridData;//从表数据
+@end
+
+@implementation DeviceFormVC
+{
+    BOOL multidetailgrid;//判断是否有多明细表
+    NSMutableArray *_listArr; //获取配置表的数据(主表)
+    
+}
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    self.title = @"设备信息";
+    
+    _listArr = [NSMutableArray new];
+    _gridData = [NSMutableArray new];
+    multidetailgrid = NO;
+    
+    /*获取配置数据*/
+    [self getFormDataFromSever];
+}
+
+#pragma mark --- 获取配置数据
+-(void)getFormDataFromSever
+{
+    [MBProgressHUD showMessage:@"" toView:self.view];
+    NSString *url = [NSString stringWithFormat:@"http://10.1.80.28:8080/ERP/mobile/device/getDeviceInfo.action"];
+    url = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+    NSDictionary *param = @{
+                            @"decode":@"a001",
+//                            @"sessionId":g_sessionId,
+                            };
+    
+    UASNetworkManager *manager = [UASNetworkManager shareManager];
+    manager.responseSerializer = [AFJSONResponseSerializer serializer];
+    [manager request:url method:POST parameters:param progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
+        [MBProgressHUD hideHUDForView:self.view];
+        SLog(@"设备管理多明细通用表单:%@",responseObject);
+        
+        NSMutableArray *formAllDataArr = [NSMutableArray new];
+        NSMutableArray *gridAllDataArr = [NSMutableArray new];
+
+        for (id obj in responseObject[@"data"][@"formdetail"]) {
+
+            [formAllDataArr addObject:obj];
+        }
+        
+        formAllDataArr = [NSDictionary changeType:formAllDataArr];
+
+        multidetailgrid = [responseObject[@"data"][@"multidetailgrid"] boolValue];
+        if (multidetailgrid) {
+            for (id obj in responseObject[@"data"][@"othergridetail"]) {
+                [gridAllDataArr addObject:obj];
+            }
+        }else{
+            NSMutableArray *arr = [NSMutableArray new];
+            for (id obj in responseObject[@"data"][@"gridetail"]) {
+                [arr addObject:obj];
+            }
+            if (arr.count != 0) {
+                NSDictionary *dic = @{
+                                      @"dgtitle":@"从属明细表",
+                                      @"dgcaller":@"",
+                                      @"detailgrid":arr,
+                                      };
+                [gridAllDataArr addObject:dic];
+            }
+        }
+
+        gridAllDataArr = [NSDictionary changeType:gridAllDataArr];
+
+        if (formAllDataArr.count != 0) {
+            [self handlerDataFromDowload:formAllDataArr andGridData:gridAllDataArr];
+        }
+        
+    } failure:^(NSURLSessionDataTask *task, NSError *error) {
+        ErrorInfomation;
+        [MBProgressHUD hideHUDForView:self.view];
+        SLog(@"%@",error);
+    }];
+}
+
+#pragma mark --- 配置表单数据处理
+- (void)handlerDataFromDowload:(NSMutableArray *)dataArr andGridData:(NSMutableArray *)gridDataArr
+{
+    /*先排序,后分组【坑货需求】*/
+    NSArray *aArr ;
+    NSArray *bArr ;
+    aArr = [dataArr mutableCopy];
+    // 排序key, 某个对象的属性名称,是否升序, YES-升序, NO-降序
+    NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"fd_detno" ascending:YES];
+    // 排序结果
+    bArr = [aArr sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]];
+    /************************************************************/
+    
+    /*分组*/
+    NSMutableArray *array = [[NSMutableArray alloc]init];
+    for (int i = 0; i < bArr.count; i++) {
+        [array addObject:bArr[i][@"fd_group"]];
+    }
+    NSMutableArray *reloadArr = [[NSMutableArray alloc]init];
+    reloadArr = [bArr mutableCopy];
+    
+    NSMutableArray *dateMutablearray = [[NSMutableArray alloc]init];
+    NSMutableArray *dateMutablearray1 = [[NSMutableArray alloc]init];
+    for (int i = 0; i < array.count; i ++) {
+        
+        NSString *string = array[i];
+        
+        //根据某个字段分组
+        NSMutableArray *tempArray = [[NSMutableArray alloc]init];
+        
+        [tempArray addObject:string];
+        
+        //切换总体的数据
+        NSMutableArray *tempArray1 = [[NSMutableArray alloc]init];
+        
+        [tempArray1 addObject:reloadArr[i]];
+        
+        for (int j = i+1; j < array.count; j ++) {
+            
+            NSString *jstring = array[j];
+            
+            if([string isEqualToString:jstring]){
+                
+                [tempArray addObject:jstring];
+                
+                [array removeObjectAtIndex:j];
+                
+                [tempArray1 addObject:reloadArr[j]];
+                
+                [reloadArr removeObjectAtIndex:j];
+                
+                j -= 1;
+            }
+        }
+        [dateMutablearray addObject:tempArray];
+        [dateMutablearray1 addObject:tempArray1];
+    }
+    
+    /*构造模型*/
+    for (int i = 0; i < dateMutablearray1.count; i++)
+    {
+        NSMutableArray *sub = [NSMutableArray new];
+        sub = dateMutablearray1[i];
+        
+        NSMutableArray *showArr = [NSMutableArray new];
+        NSMutableArray *hideArr = [NSMutableArray new];
+        NSString *fdTitle = @"";
+        for (id obj in sub) {
+            NSString *isShow = FORMAT(@"%@",[obj objectForKey:@"mfd_isdefault"]);
+            NSString *typeStr = FORMAT(@"%@",[obj objectForKey:@"fd_type"]);
+            if ([isShow isEqualToString:@"-1"] && ![typeStr isEqualToString:@"H"]) {
+                [showArr addObject:obj];
+            }else{
+                [hideArr addObject:obj];
+            }
+            fdTitle = [obj objectForKey:@"fd_group"];
+        }
+        NSDictionary *baseDic = @{
+                                  @"fdtitle":fdTitle != nil ? fdTitle:@"",
+                                  @"showItems":showArr,
+                                  @"hideItems":hideArr,
+                                  };
+        FormModel *model = [FormModel mj_objectWithKeyValues:baseDic];
+        
+        for (id obj in model.showItems) {
+            DetailFormModel *detailFormModel = obj;
+            CGFloat height = [self getSizeWithText:FORMAT(@"%@*",detailFormModel.fd_caption)].height;
+            NSString *heightStr = FORMAT(@"%f",height+10);
+            if (height < 40) {
+                detailFormModel.cellHeight = @"40";
+            }else{
+                detailFormModel.cellHeight = heightStr;
+            }
+        }
+        
+        [_listArr addObject:model];
+    }
+    
+    /*明细表的数据处理*/
+    if (gridDataArr.count != 0) {
+        [self handleGridDataWith:gridDataArr];
+    }
+}
+
+#pragma mark --- 明细表的数据处理
+-(void)handleGridDataWith:(NSMutableArray *)gridDataArr
+{
+    for (id allObj in gridDataArr) {
+        NSArray *bArr = [allObj objectForKey:@"detailgrid"];
+        
+        /*分组*/
+        NSMutableArray *array = [[NSMutableArray alloc]init];
+        for (int i = 0; i < bArr.count; i++) {
+            [array addObject:FORMAT(@"%@",bArr[i][@"dg_group"])];
+        }
+        NSMutableArray *reloadArr = [[NSMutableArray alloc]init];
+        reloadArr = [bArr mutableCopy];
+        
+        NSMutableArray *dateMutablearray = [[NSMutableArray alloc]init];
+        NSMutableArray *dateMutablearray1 = [[NSMutableArray alloc]init];
+        for (int i = 0; i < array.count; i ++) {
+            
+            NSString *string = array[i];
+            
+            //根据某个字段分组
+            NSMutableArray *tempArray = [[NSMutableArray alloc]init];
+            
+            [tempArray addObject:string];
+            
+            //切换总体的数据
+            NSMutableArray *tempArray1 = [[NSMutableArray alloc]init];
+            
+            [tempArray1 addObject:reloadArr[i]];
+            
+            for (int j = i+1; j < array.count; j ++) {
+                
+                NSString *jstring = array[j];
+                
+                if([string isEqualToString:jstring]){
+                    
+                    [tempArray addObject:jstring];
+                    
+                    [array removeObjectAtIndex:j];
+                    
+                    [tempArray1 addObject:reloadArr[j]];
+                    
+                    [reloadArr removeObjectAtIndex:j];
+                    
+                    j -= 1;
+                }
+            }
+            [dateMutablearray addObject:tempArray];
+            [dateMutablearray1 addObject:tempArray1];
+        }
+        
+        /*构造模型*/
+        NSMutableArray <MoreGridModel *> *baseArr = [NSMutableArray new];
+        for (int i = 0; i < dateMutablearray1.count; i++)
+        {
+            NSMutableArray *sub = [NSMutableArray new];
+            sub = dateMutablearray1[i];
+            
+            NSMutableArray *showArr = [NSMutableArray new];
+            NSMutableArray *hideArr = [NSMutableArray new];
+            for (id obj in sub) {
+                NSString *isShow = FORMAT(@"%@",[obj objectForKey:@"mdg_isdefault"]);
+                NSString *typeStr = FORMAT(@"%@",[obj objectForKey:@"dg_type"]);
+                if ([isShow isEqualToString:@"-1"] && ![typeStr isEqualToString:@"H"]) {
+                    [showArr addObject:obj];
+                }else{
+                    [hideArr addObject:obj];
+                }
+            }
+            NSDictionary *baseDic = @{
+                                      @"dgtitle":allObj[@"dgtitle"],
+                                      @"dgcaller":allObj[@"dgcaller"],
+                                      @"showItems":showArr,
+                                      @"hideItems":hideArr,
+                                      };
+            MoreGridModel *model = [MoreGridModel mj_objectWithKeyValues:baseDic];
+            [baseArr addObject:model];
+            
+        }
+        [self.gridData addObject:baseArr];
+    }
+    
+    /**
+     把主表插在第一个TableView
+     */
+    [self.gridData insertObject:_listArr atIndex:0];
+    
+    [self creatFormUIWithData:self.gridData];
+}
+
+#pragma mark --- 配置表单页面
+-(void)creatFormUIWithData:(NSMutableArray *)arr
+{
+    DeviceFormView *view = [[DeviceFormView alloc]initWithFrame:CGRectMake(0, 0, self_width, self_height)];
+    view.statuType = Editing;
+    view.gridData = arr;
+    [self.view addSubview:view];
+    
+    @weakify(self)
+    view.msgBlock = ^(NSString *msgStr) {
+        @strongify(self)
+        [JOShowMessageFromNavi showDropViewWithMessage:msgStr ToNavi:self.navigationController withColor:nil];
+    };
+    
+    __weak typeof(self)  weakSelf = self;
+    view.block = ^(int whichTextView,UITableView *tableView) {
+        __strong typeof(DeviceFormVC)  *strongSelf = weakSelf;
+        int a = whichTextView  / 1000;
+        int b = whichTextView  % 1000;
+        
+        id obj = tableView.dataArray[a];
+        NSString *typeStr,*fieldStr,*titleStr,*renderer,*value;
+        if ([obj isKindOfClass:[MoreGridModel class]]) {
+            MoreGridModel *model = tableView.dataArray[a];
+            DetailgridModel *detailModel = model.showItems[b];
+            typeStr = [NSString stringWithFormat:@"%@",detailModel.dg_type];
+            fieldStr = [NSString stringWithFormat:@"%@",detailModel.dg_field];
+            titleStr = [NSString stringWithFormat:@"%@",detailModel.dg_caption];
+            renderer = [NSString stringWithFormat:@"%@",detailModel.dg_renderer];
+            value = [NSString stringWithFormat:@"%@",detailModel.dg_value];
+        }else{
+            FormModel *model = tableView.dataArray[a];
+            DetailFormModel *detailModel = model.showItems[b];
+            typeStr = [NSString stringWithFormat:@"%@",detailModel.fd_type];
+            fieldStr = [NSString stringWithFormat:@"%@",detailModel.fd_field];
+            titleStr = [NSString stringWithFormat:@"%@",detailModel.fd_caption];
+            value = [NSString stringWithFormat:@"%@",detailModel.fd_value];
+        }
+        
+        if ([renderer isEqualToString:@"detailAttach"] || [typeStr isEqualToString:@"FF"]) {//附件
+            NSArray *arr = [value componentsSeparatedByString:@";"];
+            if (arr.count == 2) {
+                [self getAttachWithID:arr[1]];
+            }else{
+                [JOShowMessageFromNavi showDropViewWithMessage:@"附件打开失败" ToNavi:self.navigationController withColor:nil];
+            }
+        }
+    };
+}
+
+#pragma mark --- 获取附件
+-(void)getAttachWithID:(NSString *)idStr
+{
+    [MBProgressHUD showMessage:@"" toView:self.view];
+    
+    NSString *mustString = FORMAT(@"master=%@&sessionUser=%@&emcode=%@&sessionId=%@",g_master,g_sessionUser,g_emcode,g_sessionId);
+    
+    [LYHTTPRequest Get:BXD_GET_IMAGE page:0 condition:idStr Completion:^(id ObjectData, NSError *error) {
+        if (error == nil) {
+            [MBProgressHUD hideHUDForView:self.view];
+            
+            NSArray *arr = ObjectData[@"files"];
+            
+            NSMutableArray *attachArr = [NSMutableArray new];
+            
+            for (NSDictionary *dic in arr) {
+                
+                NSString *ip=[[NSUserDefaults standardUserDefaults] objectForKey:@"ipAndPort"];
+                
+                NSString *urlStr = FORMAT(@"%@common/download.action?path=%@&%@",ip,dic[@"fp_path"],mustString);
+                
+                urlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+                
+                NSURL *url = [NSURL URLWithString:urlStr];
+                
+                NSData *data = [NSData dataWithContentsOfURL:url];
+                UIImage *image = [[UIImage alloc] initWithData:data];
+
+                LYYFuJianModel *model =[[LYYFuJianModel alloc] init];
+                model.nameStr = dic[@"fp_name"];
+                model.image1 = image;
+                model.pathStr = dic[@"fp_path"];
+                [attachArr addObject:model];
+            }
+            
+            if (attachArr.count != 0) {
+                [self openAttachWithArr:attachArr];
+            }else{
+                [JOShowMessageFromNavi showDropViewWithMessage:@"获取附件地址失败" ToNavi:self.navigationController withColor:nil];
+            }
+            
+        }else{
+            [MBProgressHUD hideHUDForView:self.view];
+            
+            [JOShowMessageFromNavi showDropViewWithMessage:@"获取附件地址失败" ToNavi:self.navigationController withColor:nil];
+        }
+    }];
+}
+
+#pragma mark --- 打开附件
+-(void)openAttachWithArr:(NSMutableArray *)attachArr
+{
+    LYYFuJianModel *model = attachArr[0];
+    
+    LYYBigImageVC *vc = [[LYYBigImageVC alloc] init];
+    vc.image11 = model.image1;
+    vc.title = @"附件";
+    
+    LYYReadingVC *vc1 = [[LYYReadingVC alloc] init];
+    vc1.title = @"附件";
+    vc1.urlStr = model.pathStr;
+    
+    NSArray *arr = [model.pathStr componentsSeparatedByString:@"."];
+    NSString *str = [arr lastObject];
+    if ([str isEqualToString:@"png"] || [str isEqualToString:@"jpg"] ||[str isEqualToString:@"jpeg"]) {
+        
+        [self.navigationController pushViewController:vc animated:YES];
+        
+    }else
+        [self.navigationController pushViewController:vc1 animated:YES];
+}
+
+#pragma mark --- 自动获取文本高度
+- (CGSize)getSizeWithText:(NSString *)text
+{
+    /**
+     参数1:Size 文本显示的最大区域
+     参数2:options 用什么来的换行模式来计算
+     参数3:attributes 文字的大小
+     参数4:context 上下文
+     */
+    
+    return [FORMAT(@"%@",text) boundingRectWithSize:CGSizeMake(90, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : FONT_SIZE(14)} context:NULL].size;
+}
+
+@end

+ 37 - 0
shiku_im/shiku_im/文件夹1/设备管理2.0/Views/DeviceFormView.h

@@ -0,0 +1,37 @@
+//
+//  DeviceFormView.h
+//  shiku_im
+//
+//  Created by huangyp-pc on 2019/6/20.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UITableView(data)
+
+@property (strong,nonatomic) NSMutableArray *dataArray;//每个tableview的配置源
+
+@end
+
+@interface DeviceFormView : UIView
+typedef NS_ENUM(NSInteger,StatuType) {
+    Entering = 999, //在录入
+    Editing, //已提交或已审核
+};
+
+@property (nonatomic,strong) NSMutableArray *gridData;//多明细的数据
+
+@property (nonatomic,strong) NSMutableArray *tableViewArr;//装载所有UITableView
+
+@property (nonatomic,assign) StatuType statuType;
+
+/**
+ whichTextView:哪一个textView
+ tableView:哪一个tableView
+ */
+@property (nonatomic,copy)void(^block)(int whichTextView,UITableView *tableView);//明细点击跳转参数回传
+
+@property (nonatomic,copy)void(^msgBlock)(NSString *msgStr);//回调消息
+
+@end
+

+ 665 - 0
shiku_im/shiku_im/文件夹1/设备管理2.0/Views/DeviceFormView.m

@@ -0,0 +1,665 @@
+//
+//  DeviceFormView.m
+//  shiku_im
+//
+//  Created by huangyp-pc on 2019/6/20.
+//
+
+#import "DeviceFormView.h"
+#import <objc/runtime.h>
+#import "DocumentCell.h"
+#import "MoreGridModel.h"
+
+@implementation UITableView(data)
+
+-(void)setDataArray:(NSMutableArray *)dataArray{
+    objc_setAssociatedObject(self, @"UITableViewDataArray", dataArray, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+    [self reloadData];
+}
+
+-(NSMutableArray *)dataArray{
+    return objc_getAssociatedObject(self, @"UITableViewDataArray");
+}
+
+@end
+
+@interface DeviceFormView()<UIScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,HypTextViewDelegate>
+@property(strong,nonatomic)UIScrollView *scorlView;
+@property(strong,nonatomic)HMSegmentedControl *segment;
+@end
+
+@implementation DeviceFormView
+- (instancetype)initWithFrame:(CGRect)frame
+{
+    self = [super initWithFrame:frame];
+    if (self) {
+        
+        [self createUI];
+        
+    }
+    return self;
+}
+
+-(void)createUI{
+    
+    self.backgroundColor = BGB_COLOR;
+    
+}
+
+#pragma mark --- UITableViewDelegate / DataSource
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
+{
+    return  tableView.dataArray.count;
+}
+
+// 每组多少行
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
+{
+    MoreGridModel *model = tableView.dataArray[section];
+    return [model.showItems count];
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    
+    NSString *CellIdentifier = [NSString stringWithFormat:@"Cell%ld%ld", (long)[indexPath section], (long)[indexPath row]];//以indexPath来唯一确定cell
+    DocumentCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; //出列可重用的cell
+    if (cell == nil) {
+        cell = [[DocumentCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
+    }
+    
+    //...其他代码
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    
+    cell.MyTextView.tag = indexPath.row + indexPath.section*1000;
+    
+    cell.MyTextView.objTag = tableView.tag;
+    
+    cell.MyTextView.delegate = self;
+    
+    cell.MyTextView.block = ^(NSString *textViewHeight, NSString *row) {
+        [tableView beginUpdates];
+        int a = [row integerValue] / 1000;
+        int b = [row integerValue] % 1000;
+        
+        id obj = tableView.dataArray[a];
+        if ([obj isKindOfClass:[MoreGridModel class]]) {
+            MoreGridModel *model1 = tableView.dataArray[a];
+            DetailgridModel *detailModel1 = model1.showItems[b];
+            
+            if ([textViewHeight isEqualToString:@"32"]) {
+                detailModel1.cellHeight = @"40";
+            }else
+                detailModel1.cellHeight = textViewHeight;
+        }else{
+            FormModel *model1 = tableView.dataArray[a];
+            DetailFormModel *detailModel1 = model1.showItems[b];
+            
+            if ([textViewHeight isEqualToString:@"32"]) {
+                detailModel1.cellHeight = @"40";
+            }else
+                detailModel1.cellHeight = textViewHeight;
+        }
+        
+        [tableView endUpdates];
+    };
+    
+    id obj = tableView.dataArray[indexPath.section];
+    
+    NSString *titleName = @"";//名字
+    NSString *str = @"";//类型
+    NSString *field = @"";//key值
+    NSString *length = @"";//长度
+    NSString *allowblank = @"";//是否必填(是否允许为空)
+    NSString *readonly = @"";//是否只读
+    NSString *renderer = @"";//判断是否为附件
+    if ([obj isKindOfClass:[MoreGridModel class]]) {
+        MoreGridModel *model = tableView.dataArray[indexPath.section];
+        DetailgridModel *detailModel = model.showItems[indexPath.row];
+        cell.MyTextView.text = detailModel.dg_value;
+        
+        CGRect frame = cell.titleName.frame;
+        frame.size.height = [detailModel.cellHeight floatValue];
+        cell.titleName.frame = frame;
+        
+        titleName = [NSString stringWithFormat:@"%@",detailModel.dg_caption];
+        str = [NSString stringWithFormat:@"%@",detailModel.dg_type];
+        field = [NSString stringWithFormat:@"%@",detailModel.dg_field];
+        length = [NSString stringWithFormat:@"%@",detailModel.dg_maxlength];
+        allowblank = [NSString stringWithFormat:@"%@",detailModel.dg_logictype];
+        readonly = [NSString stringWithFormat:@"%@",detailModel.dg_editable];
+        renderer = [NSString stringWithFormat:@"%@",detailModel.dg_renderer];
+    }else{
+        FormModel *model = tableView.dataArray[indexPath.section];
+        DetailFormModel *detailModel = model.showItems[indexPath.row];
+        cell.MyTextView.text = detailModel.fd_value;
+        
+        CGRect frame = cell.titleName.frame;
+        frame.size.height = [detailModel.cellHeight floatValue];
+        cell.titleName.frame = frame;
+        
+        titleName = [NSString stringWithFormat:@"%@",detailModel.fd_caption];
+        str = [NSString stringWithFormat:@"%@",detailModel.fd_type];
+        field = [NSString stringWithFormat:@"%@",detailModel.fd_field];
+        length = [NSString stringWithFormat:@"%@",detailModel.fd_maxlength];
+        allowblank = [NSString stringWithFormat:@"%@",detailModel.fd_logictype];
+        readonly = [NSString stringWithFormat:@"%@",detailModel.fd_readonly];
+    }
+    
+    /*富文本,为了必填项的红色“*”*/
+    NSMutableAttributedString *AttributedStr = [[NSMutableAttributedString alloc]initWithString:FORMAT(@"%@*",titleName)];
+    [AttributedStr addAttribute:NSForegroundColorAttributeName
+                          value:[UIColor redColor]
+                          range:NSMakeRange(titleName.length, 1)];
+    
+    if ([allowblank isEqualToString:@"F"]) {/*必填项*/
+        if ([str isEqualToString:@"C"] ||[str isEqualToString:@"SF"] ||[str isEqualToString:@"MF"] ||[str isEqualToString:@"D"] ||[str isEqualToString:@"DF"]) {
+            cell.MyTextView.placeholder = @"请选择";
+        }else{
+            cell.MyTextView.placeholder = @"请输入";
+        }
+        cell.titleName.attributedText = AttributedStr;
+    }
+    else if ([allowblank isEqualToString:@"necessaryField"]) {/*必填项*/
+        if ([str isEqualToString:@"C"] ||[str isEqualToString:@"SF"] ||[str isEqualToString:@"MF"] ||[str isEqualToString:@"D"] ||[str isEqualToString:@"DF"]) {
+            cell.MyTextView.placeholder = @"请选择";
+        }else{
+            cell.MyTextView.placeholder = @"请输入";
+        }
+        cell.titleName.attributedText = AttributedStr;
+    }
+    else if ([allowblank isEqualToString:@"T"]) {
+        if ([str isEqualToString:@"C"] ||[str isEqualToString:@"SF"] ||[str isEqualToString:@"MF"] ||[str isEqualToString:@"D"] ||[str isEqualToString:@"DF"]) {
+            cell.MyTextView.placeholder = @"请选择";
+        }else{
+            cell.MyTextView.placeholder = @"请输入";
+        }
+        cell.titleName.text = titleName;
+    }
+    else{
+        if ([str isEqualToString:@"C"] ||[str isEqualToString:@"SF"] ||[str isEqualToString:@"MF"] ||[str isEqualToString:@"D"] ||[str isEqualToString:@"DF"]) {
+            cell.MyTextView.placeholder = @"请选择";
+        }else{
+            cell.MyTextView.placeholder = @"请输入";
+        }
+        cell.titleName.text = titleName;
+    }
+    
+    //T只读,F非只读,默认非只读
+    if ([readonly isEqualToString:@"T"]) {
+        
+        cell.MyTextView.userInteractionEnabled = NO;
+        
+    }else{
+        
+        cell.MyTextView.userInteractionEnabled = YES;
+        
+    }
+    
+    if (_statuType == Editing) {
+        cell.MyTextView.userInteractionEnabled = NO;
+        cell.MyTextView.placeholder = @"";
+    }
+    
+    //附件判断-可点击查看附件
+    if ([renderer isEqualToString:@"detailAttach"] || [str isEqualToString:@"FF"]) {
+        cell.MyTextView.userInteractionEnabled = YES;
+    }
+    
+    SLog(@"多明细的类型:%@ -- 名字:%@ -- 第几个:%ld -- key:%@ -- 是否只读:%@ -- 长度:%@ -- 是否必填:%@",str,titleName,(long)cell.MyTextView.tag,field,readonly,length,allowblank);
+    
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    id obj = tableView.dataArray[indexPath.section];
+    if ([obj isKindOfClass:[MoreGridModel class]]) {
+        MoreGridModel *model = tableView.dataArray[indexPath.section];
+        DetailgridModel *detailModel = model.showItems[indexPath.row];
+        return [detailModel.cellHeight floatValue];
+    }else{
+        FormModel *model = tableView.dataArray[indexPath.section];
+        DetailFormModel *detailModel = model.showItems[indexPath.row];
+        return [detailModel.cellHeight floatValue];
+    }
+}
+
+-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
+{
+    if (_statuType == Editing) {
+        return 10;
+    }else
+        return 40;
+}
+
+-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
+{
+    return CGFLOAT_MIN;
+}
+
+- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
+{
+    UIView *headerView = [[UIView alloc] init];
+    headerView.userInteractionEnabled = YES;
+    headerView.backgroundColor = [UIColor clearColor];
+    
+    UILabel *lbl = [[UILabel alloc]initWithFrame:CGRectMake(0, 4, SCREEN_WIDTH, 40)];
+    lbl.text = [NSString stringWithFormat:@" 明细%ld",(long)section+1];
+    lbl.backgroundColor = Color(250, 249, 249, 1);
+    lbl.textColor = HexColor(@"#1084D1");
+    lbl.font = FONT_SIZE(13);
+//    [headerView addSubview:lbl];
+    
+    if (_statuType != Editing) {
+        if (section != 0) {
+            UIButton *deleteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+            deleteBtn.frame = CGRectMake(SCREEN_WIDTH-60, 4, 60, 40);
+            deleteBtn.tag = section;
+            [deleteBtn addTarget:self action:@selector(deleteMoreCongBiao:) forControlEvents:UIControlEventTouchUpInside];
+            objc_setAssociatedObject(deleteBtn, "firstObject", tableView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+            objc_setAssociatedObject(deleteBtn, "secondObject", @(section), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+            [headerView addSubview:deleteBtn];
+            
+            UILabel *lbl = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 60, 40)];
+            lbl.text = @"删除";
+            lbl.backgroundColor = Color(250, 249, 249, 1);
+            lbl.textColor = Color(47, 149, 221, 1);
+            lbl.textAlignment = NSTextAlignmentRight;
+            lbl.font = FONT_SIZE(13);
+            [deleteBtn addSubview:lbl];
+        }
+    }
+    
+    return headerView;
+    
+}
+
+- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
+{
+    return nil;
+}
+
+#pragma mark --- HypTextView代理
+- (void)HypTextView:(HypTextView *)HypTextView textDidChanged:(NSString *)text
+{
+    UITableView *tableView = [self viewWithTag:HypTextView.objTag];
+    DLog(@"%ld",(long)HypTextView.tag);
+    int a = HypTextView.tag  / 1000;
+    int b = HypTextView.tag  % 1000;
+    
+    id obj = tableView.dataArray[a];
+    
+    NSString *maxlength = @"";
+    if ([obj isKindOfClass:[MoreGridModel class]]) {
+        MoreGridModel *model = tableView.dataArray[a];
+        DetailgridModel *detailModel = model.showItems[b];
+        maxlength = [NSString stringWithFormat:@"%@",detailModel.dg_maxlength];
+    }else{
+        FormModel *model = tableView.dataArray[a];
+        DetailFormModel *detailModel = model.showItems[b];
+        maxlength = [NSString stringWithFormat:@"%@",detailModel.fd_maxlength];
+    }
+    
+    
+    if ([maxlength isEqualToString:@"0"] || maxlength.length == 0) {
+        maxlength = @"300";
+    }
+    
+    int length = [maxlength intValue];
+    
+    if (HypTextView.text.length > length)
+    {
+        HypTextView.text = [HypTextView.text substringToIndex:length];
+        [self endEditing:YES];
+        if (self.msgBlock) {
+            self.msgBlock([NSString stringWithFormat:@"不能超过%d个字",length]);
+        }
+    }
+}
+
+-(BOOL)textViewShouldBeginEditing:(HypTextView *)textView
+{
+    UITableView *tableView = [self viewWithTag:textView.objTag];
+    int a = textView.tag  / 1000;
+    int b = textView.tag  % 1000;
+    
+    id obj = tableView.dataArray[a];
+    NSString *typeStr = @"", *renderer = @"";
+    if ([obj isKindOfClass:[MoreGridModel class]]) {
+        MoreGridModel *model = tableView.dataArray[a];
+        DetailgridModel *detailModel = model.showItems[b];
+        typeStr = [NSString stringWithFormat:@"%@",detailModel.dg_type];
+        renderer = [NSString stringWithFormat:@"%@",detailModel.dg_renderer];
+    }else{
+        FormModel *model = tableView.dataArray[a];
+        DetailFormModel *detailModel = model.showItems[b];
+        typeStr = [NSString stringWithFormat:@"%@",detailModel.fd_type];
+    }
+    
+    if ([typeStr isEqualToString:@"C"] || [typeStr isEqualToString:@"SF"] || [typeStr isEqualToString:@"DF"] || [typeStr isEqualToString:@"MF"] || [typeStr isEqualToString:@"D"] || [typeStr isEqualToString:@"DT"] || [typeStr isEqualToString:@"FF"] || [renderer isEqualToString:@"detailAttach"]) {
+        if (self.block) {
+            self.block(textView.tag, tableView);
+        }
+        return NO;
+    }
+    else
+        return YES;
+}
+
+- (BOOL)textView:(HypTextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
+    
+    UITableView *tableView = [self viewWithTag:textView.objTag];
+    
+    if ([text isEqualToString:@"\n"]){ //判断输入的字是否是回车,即按下return
+        //在这里做你响应return键的代码
+        [self endEditing:YES];
+        return NO; //这里返回NO,就代表return键值失效,即页面上按下return,不会出现换行,如果为yes,则输入页面会换行
+    }
+    
+    NSMutableString *allText = [NSMutableString stringWithString:[NSString stringWithFormat:@"%@",textView.text]];
+    [allText insertString:[NSString stringWithFormat:@"%@",text] atIndex:range.location];
+    
+    int a = textView.tag  / 1000;
+    int b = textView.tag  % 1000;
+    
+    id obj = tableView.dataArray[a];
+    NSString *typeStr = @"";
+    if ([obj isKindOfClass:[MoreGridModel class]]) {
+        MoreGridModel *model = tableView.dataArray[a];
+        DetailgridModel *detailModel = model.showItems[b];
+        typeStr = detailModel.dg_type;
+    }else{
+        FormModel *model = tableView.dataArray[a];
+        DetailFormModel *detailModel = model.showItems[b];
+        typeStr = [NSString stringWithFormat:@"%@",detailModel.fd_type];
+    }
+    
+    if ([typeStr isEqualToString:@"N"]) {
+        BOOL a = [self validateNumber:allText];
+        if (![self validateNumber:allText]) {
+            if (self.msgBlock) {
+                self.msgBlock(@"只能填写数字");
+            }
+        }
+        return a;
+    }
+    
+    return YES;
+}
+
+-(void)textViewDidEndEditing:(HypTextView *)textView
+{
+    UITableView *tableView = [self viewWithTag:textView.objTag];
+    
+    int a = textView.tag  / 1000;
+    int b = textView.tag  % 1000;
+    
+    id obj = tableView.dataArray[a];
+    if ([obj isKindOfClass:[MoreGridModel class]]) {
+        MoreGridModel *model = tableView.dataArray[a];
+        DetailgridModel *detailModel = model.showItems[b];
+        detailModel.dg_value = textView.text;
+    }else{
+        FormModel *model = tableView.dataArray[a];
+        DetailFormModel *detailModel = model.showItems[b];
+        detailModel.fd_value = textView.text;
+    }
+}
+
+- (void)HypTextView:(HypTextView *)HypTextView textDidEnd:(NSString *)text
+{
+    UITableView *tableView = [self viewWithTag:HypTextView.objTag];
+    
+    int a = HypTextView.tag  / 1000;
+    int b = HypTextView.tag  % 1000;
+    
+    id obj = tableView.dataArray[a];
+    if ([obj isKindOfClass:[MoreGridModel class]]) {
+        MoreGridModel *model = tableView.dataArray[a];
+        DetailgridModel *detailModel = model.showItems[b];
+        detailModel.dg_value = text;
+    }else{
+        FormModel *model = tableView.dataArray[a];
+        DetailFormModel *detailModel = model.showItems[b];
+        detailModel.fd_value = text;
+    }
+}
+
+//只能输入数字和小数点 -- 税率
+- (BOOL)validateNumber:(NSString*)number {
+    BOOL res = YES;
+    NSCharacterSet* tmpSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789."];
+    
+    if (number.length != 0) {
+        NSString * string = [number substringWithRange:NSMakeRange(0, 1)];
+        if ([string isEqualToString:@"."]) {
+            return NO;
+        }
+        
+        int j = 0; int z = 0;
+        while (j < number.length) {
+            NSString * string = [number substringWithRange:NSMakeRange(j, 1)];
+            if ([string isEqualToString:@"."]) {
+                z++;
+            }
+            j++;
+        }
+        if (z>1) {
+            return NO;
+        }
+        
+        int i = 0;
+        while (i < number.length) {
+            NSString * string = [number substringWithRange:NSMakeRange(i, 1)];
+            NSRange range = [string rangeOfCharacterFromSet:tmpSet];
+            if (range.length == 0) {
+                res = NO;
+                break;
+            }
+            i++;
+        }
+    }
+    
+    return res;
+}
+//判断是否为整形;
+- (BOOL)isPureInt:(NSString *)string {
+    NSScanner *scan = [NSScanner scannerWithString:string];
+    int val;
+    return [scan scanInt:&val] && [scan isAtEnd];
+}
+//判断是否为浮点形
+- (BOOL)isPureFloat:(NSString *)string {
+    NSScanner *scan = [NSScanner scannerWithString:string];
+    float val;
+    return [scan scanFloat:&val] && [scan isAtEnd];
+}
+
+#pragma mark --- 添加明细
+-(void)addMoreCongBiao:(UIButton *)sender
+{
+    UITableView *tableView = objc_getAssociatedObject(sender, "firstObject");
+    
+    MoreGridModel *model = [MoreGridModel copyWithModel:_gridData[sender.tag][0]];
+    [tableView.dataArray addObject:model];
+    [tableView reloadData];
+}
+
+#pragma mark --- 删除明细
+-(void)deleteMoreCongBiao:(UIButton *)sender
+{
+    UITableView *tableView = objc_getAssociatedObject(sender, "firstObject");
+    int section = [objc_getAssociatedObject(sender, "secondObject") intValue];
+    
+    [tableView.dataArray removeObjectAtIndex:section];
+    
+    [tableView reloadData];
+}
+
+#pragma mark --- 多从表的数据
+-(void)setGridData:(NSMutableArray *)gridData
+{
+    _gridData = gridData;
+    
+    [self setUpSegmentAndScrollView];
+    
+    [self setUpNoConfirmTableViewWithEntering];
+}
+
+#pragma mark --- 建立不确定几个的tableView
+-(void)setUpNoConfirmTableViewWithEntering
+{
+    for (int i = 0; i < _gridData.count; i ++) {
+        UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(self.width*i, 0, self.width, self.scorlView.height) style:UITableViewStyleGrouped];
+        tableView.delegate = self;
+        tableView.dataSource = self;
+        tableView.showsVerticalScrollIndicator = NO;
+        tableView.backgroundColor = BGB_COLOR;
+        tableView.tag = i + 88888;
+        
+        tableView.dataArray = [NSMutableArray new];
+        NSMutableArray *daiArr = [NSMutableArray new];
+        NSMutableArray *dArr = _gridData[i];
+        for (int j = 0; j < dArr.count; j++) {
+            id obj = dArr[j];
+            if ([obj isKindOfClass:[MoreGridModel class]]) {
+                MoreGridModel *model = dArr[j];
+                for (id obj in model.showItems) {
+                    DetailgridModel *showObj = obj;
+                    CGFloat height = [self getSizeWithText:FORMAT(@"%@*",showObj.dg_caption)].height;
+                    NSString *heightStr = FORMAT(@"%f",height+10);
+                    if (height < 40) {
+                        showObj.cellHeight = @"40";
+                    }else{
+                        showObj.cellHeight = heightStr;
+                    }
+                    showObj.dg_value = showObj.dg_value != nil ? showObj.dg_value:@"";
+                }
+                [daiArr addObject:model];
+            }else{
+                FormModel *model = dArr[j];
+                [daiArr addObject:model];
+            }   
+        }
+        
+        tableView.dataArray = daiArr;
+        
+        if (_statuType != Editing) {
+            UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, 40)];
+            footerView.userInteractionEnabled = YES;
+            footerView.backgroundColor = [UIColor clearColor];
+            
+            UIButton *addBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+            addBtn.frame = CGRectMake(0, 0, SCREEN_WIDTH, 40);
+            [addBtn setTitleColor:HexColor(@"#1084D1") forState:UIControlStateNormal];
+            [addBtn setBackgroundColor:Color(250, 249, 249, 1) forState:UIControlStateNormal];
+            [addBtn setTitle:@"+ 添加" forState:UIControlStateNormal];
+            addBtn.titleLabel.font = FONT_SIZE(13);
+            [addBtn addTarget:self action:@selector(addMoreCongBiao:) forControlEvents:UIControlEventTouchUpInside];
+            objc_setAssociatedObject(addBtn, "firstObject", tableView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
+            addBtn.tag = i;
+            [footerView addSubview:addBtn];
+            tableView.tableFooterView = footerView;
+        }
+        
+        [self.scorlView addSubview:tableView];
+        [self.tableViewArr addObject:tableView];
+    }
+}
+
+-(NSMutableArray *)tableViewArr
+{
+    if (!_tableViewArr) {
+        _tableViewArr = [NSMutableArray new];
+    }
+    return _tableViewArr;
+}
+
+#pragma mark --- 设置segment
+-(void)setUpSegmentAndScrollView
+{
+    NSMutableArray *arr = [NSMutableArray new];
+    for (int i = 0; i < _gridData.count; i++) {
+        id obj = [_gridData[i] count] == 0 ? nil : _gridData[i][0];
+        if ([obj isKindOfClass:[MoreGridModel class]]) {
+            MoreGridModel *model = [_gridData[i] count] == 0 ? nil : _gridData[i][0];
+            [arr addObject:FORMAT(@"%@",model.dgtitle)];
+        }else{
+            [arr addObject:@"基本信息"];
+        }
+    }
+    _segment = [[HMSegmentedControl alloc]initWithSectionTitles:[arr mutableCopy]];
+    
+    _segment.titleTextAttributes = @{NSForegroundColorAttributeName :HexColor(@"#666666"),NSFontAttributeName : FONT_SIZE(12)};
+    _segment.selectedTitleTextAttributes = @{NSForegroundColorAttributeName :HexColor(@"#33A2EE"),NSFontAttributeName : FONT_SIZE(12)};
+    _segment.selectionIndicatorColor = HexColor(@"#33A2EE");
+    _segment.frame = CGRectMake(0, 0, self.width, 35);;
+    _segment.selectionIndicatorHeight = 1.0;
+    _segment.selectionIndicatorLocation = HMSegmentedControlSelectionIndicatorLocationDown;
+    _segment.selectionIndicatorBoxColor = HexColor(@"#33A2EE");
+    _segment.selectionIndicatorBoxOpacity = 1.0;
+    
+    _segment.selectionStyle = HMSegmentedControlSelectionStyleFullWidthStripe;
+    @weakify(self)
+    _segment.indexChangeBlock = ^(NSInteger index) {
+        @strongify(self)
+        
+        [self.scorlView setContentOffset:CGPointMake(index*self.width, 0) animated:YES];
+        
+    };
+    
+    [self addSubview:self.segment];
+    
+    self.scorlView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.segment.frame), self.width, self.height-35)];
+    
+    self.scorlView.pagingEnabled = YES;
+    
+    self.scorlView.contentSize = CGSizeMake(self.width*_gridData.count, self.height-35);
+    
+    [self addSubview:self.scorlView];
+    
+    self.scorlView.backgroundColor = BGKJ_COLOR;
+    
+    self.scorlView.showsVerticalScrollIndicator = NO;
+    
+    self.scorlView.showsHorizontalScrollIndicator = NO;
+    
+    self.scorlView.bounces = NO;
+    
+    self.scorlView.delegate = self;
+}
+
+
+-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
+    
+    if (![scrollView isKindOfClass:UITableView.class]) {
+        
+        CGFloat contentX = scrollView.contentOffset.x;
+        
+        NSInteger index = contentX/scrollView.width;
+        
+        self.segment.selectedSegmentIndex = index;
+        
+    }
+}
+
+-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
+    
+    
+}
+
+#pragma mark --- 自动获取文本高度
+- (CGSize)getSizeWithText:(NSString *)text
+{
+    /**
+     参数1:Size 文本显示的最大区域
+     参数2:options 用什么来的换行模式来计算
+     参数3:attributes 文字的大小
+     参数4:context 上下文
+     */
+    
+    return [FORMAT(@"%@",text) boundingRectWithSize:CGSizeMake(90, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : FONT_SIZE(14)} context:NULL].size;
+}
+
+@end