Commit e07121cd authored by Sandy's avatar Sandy

销售录入新建修改tableview/图片选取/删除/显示

parent 3f89c559
...@@ -61,6 +61,14 @@ ...@@ -61,6 +61,14 @@
8F4BFCE81F2F07C1003EA16B /* SaleInputViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCE71F2F07C1003EA16B /* SaleInputViewModel.m */; }; 8F4BFCE81F2F07C1003EA16B /* SaleInputViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCE71F2F07C1003EA16B /* SaleInputViewModel.m */; };
8F4BFCEB1F2F09D0003EA16B /* HMSaleInputDetail.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCEA1F2F09D0003EA16B /* HMSaleInputDetail.m */; }; 8F4BFCEB1F2F09D0003EA16B /* HMSaleInputDetail.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCEA1F2F09D0003EA16B /* HMSaleInputDetail.m */; };
8F4BFCEE1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCED1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.m */; }; 8F4BFCEE1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCED1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.m */; };
8F4BFCF41F2F2C0D003EA16B /* SaleInputAddAmountCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCF31F2F2C0D003EA16B /* SaleInputAddAmountCell.m */; };
8F4BFCFA1F2F32D5003EA16B /* InspectRepairAddPicTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCF71F2F32D5003EA16B /* InspectRepairAddPicTableViewCell.m */; };
8F4BFCFB1F2F32D5003EA16B /* RepairAddPicCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCF91F2F32D5003EA16B /* RepairAddPicCollectionViewCell.m */; };
8F4BFCFE1F2F32E4003EA16B /* PicViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFCFD1F2F32E4003EA16B /* PicViewModel.m */; };
8F4BFD061F2F3314003EA16B /* GalleryCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFD011F2F3314003EA16B /* GalleryCollectionViewCell.m */; };
8F4BFD071F2F3314003EA16B /* GalleryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFD031F2F3314003EA16B /* GalleryViewController.m */; };
8F4BFD081F2F3314003EA16B /* SingleScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F4BFD051F2F3314003EA16B /* SingleScrollView.m */; };
8F4BFD0A1F2F3596003EA16B /* ZJPicture.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8F4BFD091F2F3596003EA16B /* ZJPicture.storyboard */; };
8F6C92381F2ADF4F0060E983 /* HomeWeatherBoard.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F6C92371F2ADF4F0060E983 /* HomeWeatherBoard.m */; }; 8F6C92381F2ADF4F0060E983 /* HomeWeatherBoard.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F6C92371F2ADF4F0060E983 /* HomeWeatherBoard.m */; };
8F6C923B1F2ADFEC0060E983 /* WeatherModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F6C923A1F2ADFEC0060E983 /* WeatherModel.m */; }; 8F6C923B1F2ADFEC0060E983 /* WeatherModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F6C923A1F2ADFEC0060E983 /* WeatherModel.m */; };
8F6C923E1F2AE3430060E983 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F6C923D1F2AE3430060E983 /* HomeViewController.m */; }; 8F6C923E1F2AE3430060E983 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F6C923D1F2AE3430060E983 /* HomeViewController.m */; };
...@@ -206,6 +214,21 @@ ...@@ -206,6 +214,21 @@
8F4BFCEA1F2F09D0003EA16B /* HMSaleInputDetail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMSaleInputDetail.m; sourceTree = "<group>"; }; 8F4BFCEA1F2F09D0003EA16B /* HMSaleInputDetail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMSaleInputDetail.m; sourceTree = "<group>"; };
8F4BFCEC1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaleInputAmountCollectionViewCell.h; sourceTree = "<group>"; }; 8F4BFCEC1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaleInputAmountCollectionViewCell.h; sourceTree = "<group>"; };
8F4BFCED1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SaleInputAmountCollectionViewCell.m; sourceTree = "<group>"; }; 8F4BFCED1F2F0F16003EA16B /* SaleInputAmountCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SaleInputAmountCollectionViewCell.m; sourceTree = "<group>"; };
8F4BFCF21F2F2C0D003EA16B /* SaleInputAddAmountCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaleInputAddAmountCell.h; sourceTree = "<group>"; };
8F4BFCF31F2F2C0D003EA16B /* SaleInputAddAmountCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SaleInputAddAmountCell.m; sourceTree = "<group>"; };
8F4BFCF61F2F32D5003EA16B /* InspectRepairAddPicTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectRepairAddPicTableViewCell.h; sourceTree = "<group>"; };
8F4BFCF71F2F32D5003EA16B /* InspectRepairAddPicTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectRepairAddPicTableViewCell.m; sourceTree = "<group>"; };
8F4BFCF81F2F32D5003EA16B /* RepairAddPicCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RepairAddPicCollectionViewCell.h; sourceTree = "<group>"; };
8F4BFCF91F2F32D5003EA16B /* RepairAddPicCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RepairAddPicCollectionViewCell.m; sourceTree = "<group>"; };
8F4BFCFC1F2F32E4003EA16B /* PicViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PicViewModel.h; sourceTree = "<group>"; };
8F4BFCFD1F2F32E4003EA16B /* PicViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PicViewModel.m; sourceTree = "<group>"; };
8F4BFD001F2F3314003EA16B /* GalleryCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GalleryCollectionViewCell.h; sourceTree = "<group>"; };
8F4BFD011F2F3314003EA16B /* GalleryCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryCollectionViewCell.m; sourceTree = "<group>"; };
8F4BFD021F2F3314003EA16B /* GalleryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GalleryViewController.h; sourceTree = "<group>"; };
8F4BFD031F2F3314003EA16B /* GalleryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryViewController.m; sourceTree = "<group>"; };
8F4BFD041F2F3314003EA16B /* SingleScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleScrollView.h; sourceTree = "<group>"; };
8F4BFD051F2F3314003EA16B /* SingleScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SingleScrollView.m; sourceTree = "<group>"; };
8F4BFD091F2F3596003EA16B /* ZJPicture.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ZJPicture.storyboard; sourceTree = "<group>"; };
8F6C92361F2ADF4F0060E983 /* HomeWeatherBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeWeatherBoard.h; sourceTree = "<group>"; }; 8F6C92361F2ADF4F0060E983 /* HomeWeatherBoard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeWeatherBoard.h; sourceTree = "<group>"; };
8F6C92371F2ADF4F0060E983 /* HomeWeatherBoard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeWeatherBoard.m; sourceTree = "<group>"; }; 8F6C92371F2ADF4F0060E983 /* HomeWeatherBoard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeWeatherBoard.m; sourceTree = "<group>"; };
8F6C92391F2ADFEC0060E983 /* WeatherModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeatherModel.h; sourceTree = "<group>"; }; 8F6C92391F2ADFEC0060E983 /* WeatherModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeatherModel.h; sourceTree = "<group>"; };
...@@ -614,10 +637,40 @@ ...@@ -614,10 +637,40 @@
8F4BFCE11F2F02CB003EA16B /* SaleInputTopView.m */, 8F4BFCE11F2F02CB003EA16B /* SaleInputTopView.m */,
8F4BFCD41F2EF56A003EA16B /* SaleInputListTableViewCell.h */, 8F4BFCD41F2EF56A003EA16B /* SaleInputListTableViewCell.h */,
8F4BFCD51F2EF56A003EA16B /* SaleInputListTableViewCell.m */, 8F4BFCD51F2EF56A003EA16B /* SaleInputListTableViewCell.m */,
8F4BFCF21F2F2C0D003EA16B /* SaleInputAddAmountCell.h */,
8F4BFCF31F2F2C0D003EA16B /* SaleInputAddAmountCell.m */,
); );
path = Views; path = Views;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
8F4BFCF51F2F3238003EA16B /* PictureTableViewCell */ = {
isa = PBXGroup;
children = (
8F4BFCFF1F2F3314003EA16B /* Gallery */,
8F4BFCFC1F2F32E4003EA16B /* PicViewModel.h */,
8F4BFCFD1F2F32E4003EA16B /* PicViewModel.m */,
8F4BFCF61F2F32D5003EA16B /* InspectRepairAddPicTableViewCell.h */,
8F4BFCF71F2F32D5003EA16B /* InspectRepairAddPicTableViewCell.m */,
8F4BFCF81F2F32D5003EA16B /* RepairAddPicCollectionViewCell.h */,
8F4BFCF91F2F32D5003EA16B /* RepairAddPicCollectionViewCell.m */,
8F4BFD091F2F3596003EA16B /* ZJPicture.storyboard */,
);
path = PictureTableViewCell;
sourceTree = "<group>";
};
8F4BFCFF1F2F3314003EA16B /* Gallery */ = {
isa = PBXGroup;
children = (
8F4BFD001F2F3314003EA16B /* GalleryCollectionViewCell.h */,
8F4BFD011F2F3314003EA16B /* GalleryCollectionViewCell.m */,
8F4BFD021F2F3314003EA16B /* GalleryViewController.h */,
8F4BFD031F2F3314003EA16B /* GalleryViewController.m */,
8F4BFD041F2F3314003EA16B /* SingleScrollView.h */,
8F4BFD051F2F3314003EA16B /* SingleScrollView.m */,
);
path = Gallery;
sourceTree = "<group>";
};
8F6C923F1F2AE4AD0060E983 /* LocationHelper */ = { 8F6C923F1F2AE4AD0060E983 /* LocationHelper */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -675,6 +728,7 @@ ...@@ -675,6 +728,7 @@
8F973C041F21FB67003D3ADB /* Tools */ = { 8F973C041F21FB67003D3ADB /* Tools */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8F4BFCF51F2F3238003EA16B /* PictureTableViewCell */,
8F6C923F1F2AE4AD0060E983 /* LocationHelper */, 8F6C923F1F2AE4AD0060E983 /* LocationHelper */,
8F250D931F29D8420031B4BC /* ZJPermissionManager */, 8F250D931F29D8420031B4BC /* ZJPermissionManager */,
8F250D8C1F29CF120031B4BC /* ZJAppInstance */, 8F250D8C1F29CF120031B4BC /* ZJAppInstance */,
...@@ -988,6 +1042,7 @@ ...@@ -988,6 +1042,7 @@
8F250D6C1F2981200031B4BC /* ZJShowLogView.xib in Resources */, 8F250D6C1F2981200031B4BC /* ZJShowLogView.xib in Resources */,
8F973C261F21FD54003D3ADB /* Assets.xcassets in Resources */, 8F973C261F21FD54003D3ADB /* Assets.xcassets in Resources */,
8F973C271F21FD54003D3ADB /* Main.storyboard in Resources */, 8F973C271F21FD54003D3ADB /* Main.storyboard in Resources */,
8F4BFD0A1F2F3596003EA16B /* ZJPicture.storyboard in Resources */,
8F250D2B1F297DA80031B4BC /* line.png in Resources */, 8F250D2B1F297DA80031B4BC /* line.png in Resources */,
8F4BFCD01F2EF527003EA16B /* SaleInput.storyboard in Resources */, 8F4BFCD01F2EF527003EA16B /* SaleInput.storyboard in Resources */,
); );
...@@ -1058,6 +1113,7 @@ ...@@ -1058,6 +1113,7 @@
8F250D511F297DA80031B4BC /* XWFilterAnimator+XWPageCurl.m in Sources */, 8F250D511F297DA80031B4BC /* XWFilterAnimator+XWPageCurl.m in Sources */,
8F6C92381F2ADF4F0060E983 /* HomeWeatherBoard.m in Sources */, 8F6C92381F2ADF4F0060E983 /* HomeWeatherBoard.m in Sources */,
8F250D961F29D86E0031B4BC /* ZJPermissionManager.m in Sources */, 8F250D961F29D86E0031B4BC /* ZJPermissionManager.m in Sources */,
8F4BFD061F2F3314003EA16B /* GalleryCollectionViewCell.m in Sources */,
8F250D921F29D4B40031B4BC /* UserInfo.m in Sources */, 8F250D921F29D4B40031B4BC /* UserInfo.m in Sources */,
8F1040B91F25C8A000B4C16E /* MineTableViewController.m in Sources */, 8F1040B91F25C8A000B4C16E /* MineTableViewController.m in Sources */,
8F6C923B1F2ADFEC0060E983 /* WeatherModel.m in Sources */, 8F6C923B1F2ADFEC0060E983 /* WeatherModel.m in Sources */,
...@@ -1065,6 +1121,7 @@ ...@@ -1065,6 +1121,7 @@
8F250D471F297DA80031B4BC /* XWFilterAnimator+XWBoxBlur.m in Sources */, 8F250D471F297DA80031B4BC /* XWFilterAnimator+XWBoxBlur.m in Sources */,
8F250D3F1F297DA80031B4BC /* XWCoolAnimator+XWScanning.m in Sources */, 8F250D3F1F297DA80031B4BC /* XWCoolAnimator+XWScanning.m in Sources */,
8FEF5E761F285E56001496E3 /* UILabel+Addtions.m in Sources */, 8FEF5E761F285E56001496E3 /* UILabel+Addtions.m in Sources */,
8F4BFCFE1F2F32E4003EA16B /* PicViewModel.m in Sources */,
8F250D351F297DA80031B4BC /* XWCoolAnimator+XWFold.m in Sources */, 8F250D351F297DA80031B4BC /* XWCoolAnimator+XWFold.m in Sources */,
8F973C321F21FE32003D3ADB /* AppDelegate.m in Sources */, 8F973C321F21FE32003D3ADB /* AppDelegate.m in Sources */,
8F250D231F297DA80031B4BC /* UIView+Snapshot.m in Sources */, 8F250D231F297DA80031B4BC /* UIView+Snapshot.m in Sources */,
...@@ -1087,11 +1144,13 @@ ...@@ -1087,11 +1144,13 @@
8F250D251F297DA80031B4BC /* UIViewController+XWTransition.m in Sources */, 8F250D251F297DA80031B4BC /* UIViewController+XWTransition.m in Sources */,
8FEF5E7C1F285E56001496E3 /* UIView+Category.m in Sources */, 8FEF5E7C1F285E56001496E3 /* UIView+Category.m in Sources */,
8F250D8F1F29CF190031B4BC /* ZJAppInstance.m in Sources */, 8F250D8F1F29CF190031B4BC /* ZJAppInstance.m in Sources */,
8F4BFD071F2F3314003EA16B /* GalleryViewController.m in Sources */,
8F4BFCE81F2F07C1003EA16B /* SaleInputViewModel.m in Sources */, 8F4BFCE81F2F07C1003EA16B /* SaleInputViewModel.m in Sources */,
8FEF5EA21F28612B001496E3 /* BaseChooseModel.m in Sources */, 8FEF5EA21F28612B001496E3 /* BaseChooseModel.m in Sources */,
8F973C1F1F21FD54003D3ADB /* ViewController.m in Sources */, 8F973C1F1F21FD54003D3ADB /* ViewController.m in Sources */,
8F4BFCC51F2EDCAF003EA16B /* BusinessFunctionModel.m in Sources */, 8F4BFCC51F2EDCAF003EA16B /* BusinessFunctionModel.m in Sources */,
8F250D451F297DA80031B4BC /* XWFilterAnimator+XWBarSwipe.m in Sources */, 8F250D451F297DA80031B4BC /* XWFilterAnimator+XWBarSwipe.m in Sources */,
8F4BFCFA1F2F32D5003EA16B /* InspectRepairAddPicTableViewCell.m in Sources */,
8F250D841F29C14F0031B4BC /* LoginViewModel.m in Sources */, 8F250D841F29C14F0031B4BC /* LoginViewModel.m in Sources */,
8FEF5E7E1F285E56001496E3 /* UIViewController+Additions.m in Sources */, 8FEF5E7E1F285E56001496E3 /* UIViewController+Additions.m in Sources */,
8F250D3B1F297DA80031B4BC /* XWCoolAnimator+XWPageFlip.m in Sources */, 8F250D3B1F297DA80031B4BC /* XWCoolAnimator+XWPageFlip.m in Sources */,
...@@ -1100,6 +1159,7 @@ ...@@ -1100,6 +1159,7 @@
8F4BFCEB1F2F09D0003EA16B /* HMSaleInputDetail.m in Sources */, 8F4BFCEB1F2F09D0003EA16B /* HMSaleInputDetail.m in Sources */,
8FEF5E741F285E56001496E3 /* UIImage+Helper.m in Sources */, 8FEF5E741F285E56001496E3 /* UIImage+Helper.m in Sources */,
8FEF5E6A1F285E56001496E3 /* MBProgressHUD+Addtions.m in Sources */, 8FEF5E6A1F285E56001496E3 /* MBProgressHUD+Addtions.m in Sources */,
8F4BFCFB1F2F32D5003EA16B /* RepairAddPicCollectionViewCell.m in Sources */,
8FEF5E701F285E56001496E3 /* NSNumber+Addtions.m in Sources */, 8FEF5E701F285E56001496E3 /* NSNumber+Addtions.m in Sources */,
8F4BFCD91F2EF6CF003EA16B /* HMSaleInputQuery.m in Sources */, 8F4BFCD91F2EF6CF003EA16B /* HMSaleInputQuery.m in Sources */,
8F250D271F297DA80031B4BC /* XWInteractiveTransition.m in Sources */, 8F250D271F297DA80031B4BC /* XWInteractiveTransition.m in Sources */,
...@@ -1113,10 +1173,12 @@ ...@@ -1113,10 +1173,12 @@
8FEF5E661F285E56001496E3 /* ChineseLogHelper.m in Sources */, 8FEF5E661F285E56001496E3 /* ChineseLogHelper.m in Sources */,
8F250D591F297DA80031B4BC /* XWFilterTransitionView.m in Sources */, 8F250D591F297DA80031B4BC /* XWFilterTransitionView.m in Sources */,
8F250D571F297DA80031B4BC /* XWFilterAnimator.m in Sources */, 8F250D571F297DA80031B4BC /* XWFilterAnimator.m in Sources */,
8F4BFD081F2F3314003EA16B /* SingleScrollView.m in Sources */,
8F6C923E1F2AE3430060E983 /* HomeViewController.m in Sources */, 8F6C923E1F2AE3430060E983 /* HomeViewController.m in Sources */,
8FEF5EA81F28612B001496E3 /* BaseListViewController.m in Sources */, 8FEF5EA81F28612B001496E3 /* BaseListViewController.m in Sources */,
8F250D551F297DA80031B4BC /* XWFilterAnimator+XWSwipe.m in Sources */, 8F250D551F297DA80031B4BC /* XWFilterAnimator+XWSwipe.m in Sources */,
8F250D491F297DA80031B4BC /* XWFilterAnimator+XWCopyMachine.m in Sources */, 8F250D491F297DA80031B4BC /* XWFilterAnimator+XWCopyMachine.m in Sources */,
8F4BFCF41F2F2C0D003EA16B /* SaleInputAddAmountCell.m in Sources */,
8F4BFCE51F2F04CC003EA16B /* NSDate+Additions.m in Sources */, 8F4BFCE51F2F04CC003EA16B /* NSDate+Additions.m in Sources */,
8F250D331F297DA80031B4BC /* XWCoolAnimator+XWExplode.m in Sources */, 8F250D331F297DA80031B4BC /* XWCoolAnimator+XWExplode.m in Sources */,
8FEF5E641F285E56001496E3 /* CALayer+Addtions.m in Sources */, 8FEF5E641F285E56001496E3 /* CALayer+Addtions.m in Sources */,
......
...@@ -157,8 +157,8 @@ ...@@ -157,8 +157,8 @@
</constraints> </constraints>
<variation key="default"> <variation key="default">
<mask key="constraints"> <mask key="constraints">
<exclude reference="vC7-Mn-3ts"/>
<exclude reference="Z3a-9o-K8M"/> <exclude reference="Z3a-9o-K8M"/>
<exclude reference="vC7-Mn-3ts"/>
</mask> </mask>
</variation> </variation>
</tableViewCellContentView> </tableViewCellContentView>
...@@ -419,109 +419,137 @@ ...@@ -419,109 +419,137 @@
<color key="backgroundColor" red="1" green="0.9999405146" blue="0.99998033050000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="0.9999405146" blue="0.99998033050000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="pGM-pq-sCr" firstAttribute="leading" secondItem="CEF-uD-Cq7" secondAttribute="leading" constant="40" id="77K-Fk-hto"/> <constraint firstItem="pGM-pq-sCr" firstAttribute="leading" secondItem="CEF-uD-Cq7" secondAttribute="leading" constant="40" id="77K-Fk-hto"/>
<constraint firstAttribute="height" constant="64" id="UBX-EM-LvB"/>
<constraint firstAttribute="trailing" secondItem="pGM-pq-sCr" secondAttribute="trailing" constant="40" id="oNz-Yf-95k"/> <constraint firstAttribute="trailing" secondItem="pGM-pq-sCr" secondAttribute="trailing" constant="40" id="oNz-Yf-95k"/>
<constraint firstItem="pGM-pq-sCr" firstAttribute="centerY" secondItem="CEF-uD-Cq7" secondAttribute="centerY" id="pma-xX-qSc"/> <constraint firstItem="pGM-pq-sCr" firstAttribute="centerY" secondItem="CEF-uD-Cq7" secondAttribute="centerY" id="pma-xX-qSc"/>
</constraints> </constraints>
</view> </view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="JWA-Cq-aaf"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="54" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="ByU-Du-Lfu">
<rect key="frame" x="0.0" y="120" width="375" height="483"/> <rect key="frame" x="0.0" y="120" width="375" height="483"/>
<color key="backgroundColor" red="1" green="0.9999405146" blue="0.99998033050000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="jin-yq-X2C"> <prototypes>
<size key="itemSize" width="374.5" height="49"/> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="SaleInputAddAmountCell" rowHeight="50" id="Skf-PJ-7lK" customClass="SaleInputAddAmountCell">
<size key="headerReferenceSize" width="50" height="55"/> <rect key="frame" x="0.0" y="28" width="375" height="50"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/> <autoresizingMask key="autoresizingMask"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Skf-PJ-7lK" id="I5Y-dB-SbA">
</collectionViewFlowLayout> <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="SaleInputAmountCollectionViewCell" id="5BP-cr-McD" customClass="SaleInputAmountCollectionViewCell">
<rect key="frame" x="0.5" y="55" width="374.5" height="49"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="374.5" height="49"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入金额" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wtE-kS-FfF"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现金" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NWH-NC-0TM">
<rect key="frame" x="208" y="5" width="150" height="40"/> <rect key="frame" x="16" y="0.0" width="175" height="50"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="40" id="0Fi-YA-quI"/> <constraint firstAttribute="width" constant="131" id="U0K-pb-Vth"/>
<constraint firstAttribute="width" constant="150" id="ktk-NY-u2Y"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现金" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gnp-lB-GtI">
<rect key="frame" x="16" y="0.0" width="168" height="49"/>
<constraints>
<constraint firstAttribute="width" constant="131" id="9YJ-V6-bG7"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
<variation key="default"> <variation key="default">
<mask key="constraints"> <mask key="constraints">
<exclude reference="9YJ-V6-bG7"/> <exclude reference="U0K-pb-Vth"/>
</mask> </mask>
</variation> </variation>
</label> </label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入金额" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="B5T-eI-tXZ">
<rect key="frame" x="209" y="5" width="150" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="150" id="Lia-KH-tx1"/>
<constraint firstAttribute="height" constant="40" id="hzS-LE-XSU"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" keyboardType="numbersAndPunctuation"/>
</textField>
</subviews> </subviews>
</view>
<color key="backgroundColor" red="0.99239385130000002" green="0.96394467350000002" blue="0.92643356320000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="gnp-lB-GtI" firstAttribute="leading" secondItem="5BP-cr-McD" secondAttribute="leading" constant="16" id="6Gg-US-u2t"/> <constraint firstAttribute="bottom" secondItem="NWH-NC-0TM" secondAttribute="bottom" id="05L-pP-fJq"/>
<constraint firstAttribute="trailing" secondItem="wtE-kS-FfF" secondAttribute="trailing" constant="16" id="9tz-Up-xPD"/> <constraint firstItem="NWH-NC-0TM" firstAttribute="leading" secondItem="I5Y-dB-SbA" secondAttribute="leading" constant="16" id="E14-tJ-urK"/>
<constraint firstAttribute="bottom" secondItem="gnp-lB-GtI" secondAttribute="bottom" id="YIR-Gd-e7O"/> <constraint firstAttribute="trailing" secondItem="B5T-eI-tXZ" secondAttribute="trailing" constant="16" id="FIw-9V-6H8"/>
<constraint firstItem="gnp-lB-GtI" firstAttribute="top" secondItem="5BP-cr-McD" secondAttribute="top" id="kem-Ko-Y65"/> <constraint firstItem="B5T-eI-tXZ" firstAttribute="leading" secondItem="NWH-NC-0TM" secondAttribute="trailing" constant="18" id="TzS-m4-0hl"/>
<constraint firstItem="wtE-kS-FfF" firstAttribute="centerY" secondItem="5BP-cr-McD" secondAttribute="centerY" id="pi8-vk-MYe"/> <constraint firstItem="B5T-eI-tXZ" firstAttribute="centerY" secondItem="I5Y-dB-SbA" secondAttribute="centerY" id="aCu-43-HSd"/>
<constraint firstItem="gnp-lB-GtI" firstAttribute="centerY" secondItem="5BP-cr-McD" secondAttribute="centerY" id="rw3-4D-8dN"/> <constraint firstItem="NWH-NC-0TM" firstAttribute="top" secondItem="I5Y-dB-SbA" secondAttribute="top" id="mOb-um-ZNK"/>
<constraint firstItem="wtE-kS-FfF" firstAttribute="leading" secondItem="gnp-lB-GtI" secondAttribute="trailing" constant="24" id="uKL-uz-ky0"/>
</constraints> </constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.99215686274509807" green="0.96470588235294119" blue="0.92941176470588238" alpha="1" colorSpace="calibratedRGB"/>
<connections> <connections>
<outlet property="labelTitle" destination="gnp-lB-GtI" id="p60-Ay-eVh"/> <outlet property="labelTitle" destination="NWH-NC-0TM" id="j8n-NG-PHI"/>
<outlet property="textFieldInput" destination="wtE-kS-FfF" id="1hj-FZ-ajC"/> <outlet property="textFieldInput" destination="B5T-eI-tXZ" id="GH9-5O-16k"/>
</connections> </connections>
</collectionViewCell> </tableViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="SaleInputAttachmentCollectionViewCell" id="K3U-Yc-Vol" customClass="SaleInputAttachmentCollectionViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="InspectRepairAddPicTableViewCell" rowHeight="114" id="bNB-BG-Z0y" customClass="InspectRepairAddPicTableViewCell">
<rect key="frame" x="127.5" y="114" width="120.5" height="85"/> <rect key="frame" x="0.0" y="78" width="375" height="114"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bNB-BG-Z0y" id="aER-Cm-gkK">
<rect key="frame" x="0.0" y="0.0" width="375" height="114"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="voL-Ek-Hau">
<rect key="frame" x="0.0" y="0.0" width="375" height="114"/>
<color key="backgroundColor" red="1" green="0.99997437" blue="0.99999129769999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="d5i-7I-fwZ">
<size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="10" minY="0.0" maxX="10" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="RepairAddPicCollectionViewCell" id="7qg-bO-KRP" customClass="RepairAddPicCollectionViewCell">
<rect key="frame" x="10" y="0.0" width="120.5" height="85"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="120.5" height="85"/> <rect key="frame" x="0.0" y="0.0" width="120.5" height="85"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_photo_icon" translatesAutoresizingMaskIntoConstraints="NO" id="s0e-9U-9nW"> <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_photo_icon" translatesAutoresizingMaskIntoConstraints="NO" id="lu5-ny-Hpy">
<rect key="frame" x="19" y="14" width="82" height="56"/> <rect key="frame" x="19" y="14" width="82" height="56"/>
</imageView> </imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="tFW-o7-qTp"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="qMP-yf-2BK">
<rect key="frame" x="0.0" y="0.0" width="121" height="85"/> <rect key="frame" x="0.0" y="0.0" width="121" height="85"/>
</imageView> </imageView>
</subviews> </subviews>
</view> </view>
<color key="backgroundColor" red="1" green="0.9999405146" blue="0.99998033050000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="0.99997437" blue="0.99999129769999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="s0e-9U-9nW" firstAttribute="centerX" secondItem="K3U-Yc-Vol" secondAttribute="centerX" id="3ZH-Yz-edU"/> <constraint firstItem="lu5-ny-Hpy" firstAttribute="centerY" secondItem="7qg-bO-KRP" secondAttribute="centerY" id="6e8-9y-4qC"/>
<constraint firstItem="tFW-o7-qTp" firstAttribute="top" secondItem="K3U-Yc-Vol" secondAttribute="top" id="6sm-gw-2gb"/> <constraint firstAttribute="trailing" secondItem="qMP-yf-2BK" secondAttribute="trailing" id="D2y-sG-rm6"/>
<constraint firstItem="s0e-9U-9nW" firstAttribute="centerY" secondItem="K3U-Yc-Vol" secondAttribute="centerY" id="Gdh-0l-mP1"/> <constraint firstItem="qMP-yf-2BK" firstAttribute="leading" secondItem="7qg-bO-KRP" secondAttribute="leading" id="DRE-ko-Gkp"/>
<constraint firstAttribute="bottom" secondItem="tFW-o7-qTp" secondAttribute="bottom" id="UCU-kt-afg"/> <constraint firstItem="lu5-ny-Hpy" firstAttribute="centerX" secondItem="7qg-bO-KRP" secondAttribute="centerX" id="Kmu-Zx-29F"/>
<constraint firstAttribute="trailing" secondItem="tFW-o7-qTp" secondAttribute="trailing" id="ejX-XN-085"/> <constraint firstItem="qMP-yf-2BK" firstAttribute="top" secondItem="7qg-bO-KRP" secondAttribute="top" id="aqs-Yw-8Ph"/>
<constraint firstItem="tFW-o7-qTp" firstAttribute="leading" secondItem="K3U-Yc-Vol" secondAttribute="leading" id="oiJ-60-Ujk"/> <constraint firstAttribute="bottom" secondItem="qMP-yf-2BK" secondAttribute="bottom" id="kbi-PK-HHV"/>
</constraints> </constraints>
<size key="customSize" width="120.5" height="85"/> <size key="customSize" width="120.5" height="85"/>
<connections> <connections>
<outlet property="img" destination="s0e-9U-9nW" id="9bQ-Cc-KIo"/> <outlet property="img" destination="lu5-ny-Hpy" id="eqV-W2-hZI"/>
<outlet property="imgPicture" destination="tFW-o7-qTp" id="t5N-4m-ceB"/> <outlet property="imgPicture" destination="qMP-yf-2BK" id="fXg-hL-AbU"/>
</connections> </connections>
</collectionViewCell> </collectionViewCell>
</cells> </cells>
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="picHeaderView" id="ylx-De-oAb" customClass="SaleInputHeaderCollectionReusableView"> </collectionView>
<rect key="frame" x="0.0" y="0.0" width="375" height="55"/> </subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="voL-Ek-Hau" secondAttribute="trailing" id="KYi-IM-JoA"/>
<constraint firstItem="voL-Ek-Hau" firstAttribute="leading" secondItem="aER-Cm-gkK" secondAttribute="leading" id="nFc-u5-Vag"/>
<constraint firstItem="voL-Ek-Hau" firstAttribute="top" secondItem="aER-Cm-gkK" secondAttribute="top" id="oBV-n3-G3i"/>
<constraint firstAttribute="bottom" secondItem="voL-Ek-Hau" secondAttribute="bottom" id="qt5-yZ-Ai6"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="collectionView" destination="voL-Ek-Hau" id="Le8-dO-WBC"/>
<outlet property="layOut" destination="d5i-7I-fwZ" id="hYp-Dt-A8j"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="b3J-hs-7Am">
<rect key="frame" x="0.0" y="192" width="375" height="54"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="b3J-hs-7Am" id="uuZ-Ph-fa6">
<rect key="frame" x="0.0" y="0.0" width="375" height="54"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="照片附件" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KKB-1P-WMt"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="照片附件" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lZ4-C4-veQ">
<rect key="frame" x="16" y="14.5" width="73.5" height="26"/> <rect key="frame" x="16" y="14" width="73.5" height="26"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/> <fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.90180099010000003" green="0.26248830560000003" blue="0.062464497979999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.90180099010000003" green="0.26248830560000003" blue="0.062464497979999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(上传当日结账单)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="02m-sW-db9"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(上传当日结账单)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m5E-PM-P6q">
<rect key="frame" x="97.5" y="24" width="102" height="16"/> <rect key="frame" x="97.5" y="24" width="102" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.90180099010000003" green="0.26248830560000003" blue="0.062464497979999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.90180099010000003" green="0.26248830560000003" blue="0.062464497979999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
...@@ -529,31 +557,32 @@ ...@@ -529,31 +557,32 @@
</label> </label>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="KKB-1P-WMt" firstAttribute="leading" secondItem="ylx-De-oAb" secondAttribute="leading" constant="16" id="Eub-UK-6mo"/> <constraint firstItem="m5E-PM-P6q" firstAttribute="centerY" secondItem="lZ4-C4-veQ" secondAttribute="centerY" constant="5" id="0Z6-rg-zmF"/>
<constraint firstItem="02m-sW-db9" firstAttribute="leading" secondItem="KKB-1P-WMt" secondAttribute="trailing" constant="8" id="Knb-UP-YpW"/> <constraint firstItem="m5E-PM-P6q" firstAttribute="bottom" secondItem="lZ4-C4-veQ" secondAttribute="bottom" id="2tM-fB-KLC"/>
<constraint firstItem="02m-sW-db9" firstAttribute="centerY" secondItem="KKB-1P-WMt" secondAttribute="centerY" constant="5" id="VBh-PI-yKA"/> <constraint firstItem="lZ4-C4-veQ" firstAttribute="leading" secondItem="uuZ-Ph-fa6" secondAttribute="leading" constant="16" id="2xv-f8-YfH"/>
<constraint firstItem="02m-sW-db9" firstAttribute="bottom" secondItem="KKB-1P-WMt" secondAttribute="bottom" id="ZVi-fZ-dg8"/> <constraint firstItem="lZ4-C4-veQ" firstAttribute="centerY" secondItem="uuZ-Ph-fa6" secondAttribute="centerY" id="9mo-9b-7Fy"/>
<constraint firstItem="KKB-1P-WMt" firstAttribute="centerY" secondItem="ylx-De-oAb" secondAttribute="centerY" id="gve-r3-LJl"/> <constraint firstItem="m5E-PM-P6q" firstAttribute="leading" secondItem="lZ4-C4-veQ" secondAttribute="trailing" constant="8" id="MVO-if-PIh"/>
</constraints> </constraints>
</collectionReusableView> </tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections> <connections>
<outlet property="dataSource" destination="28i-0U-BU7" id="XQD-Tk-5Fr"/> <outlet property="dataSource" destination="28i-0U-BU7" id="tct-Wc-X4a"/>
<outlet property="delegate" destination="28i-0U-BU7" id="h1Y-wX-fnu"/> <outlet property="delegate" destination="28i-0U-BU7" id="FTs-sM-5yE"/>
</connections> </connections>
</collectionView> </tableView>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="0.9999405146" blue="0.99998033050000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="0.9999405146" blue="0.99998033050000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="JWA-Cq-aaf" secondAttribute="trailing" id="2MQ-D2-xkG"/> <constraint firstAttribute="trailing" secondItem="ByU-Du-Lfu" secondAttribute="trailing" id="2yR-Mv-MSJ"/>
<constraint firstItem="ByU-Du-Lfu" firstAttribute="leading" secondItem="lqo-x7-uJQ" secondAttribute="leading" id="3wW-DI-Udj"/>
<constraint firstItem="Tfl-FO-sZI" firstAttribute="top" secondItem="PkZ-eg-jf4" secondAttribute="bottom" id="83m-8b-weg"/> <constraint firstItem="Tfl-FO-sZI" firstAttribute="top" secondItem="PkZ-eg-jf4" secondAttribute="bottom" id="83m-8b-weg"/>
<constraint firstItem="JWA-Cq-aaf" firstAttribute="top" secondItem="Tfl-FO-sZI" secondAttribute="bottom" id="FE5-mW-ONe"/>
<constraint firstItem="Tfl-FO-sZI" firstAttribute="top" secondItem="lqo-x7-uJQ" secondAttribute="top" id="ScR-YP-lpB"/> <constraint firstItem="Tfl-FO-sZI" firstAttribute="top" secondItem="lqo-x7-uJQ" secondAttribute="top" id="ScR-YP-lpB"/>
<constraint firstItem="CEF-uD-Cq7" firstAttribute="leading" secondItem="lqo-x7-uJQ" secondAttribute="leading" id="VPt-r2-n0H"/> <constraint firstItem="CEF-uD-Cq7" firstAttribute="leading" secondItem="lqo-x7-uJQ" secondAttribute="leading" id="VPt-r2-n0H"/>
<constraint firstItem="Tfl-FO-sZI" firstAttribute="leading" secondItem="lqo-x7-uJQ" secondAttribute="leading" id="Wqm-vR-7EY"/> <constraint firstItem="Tfl-FO-sZI" firstAttribute="leading" secondItem="lqo-x7-uJQ" secondAttribute="leading" id="Wqm-vR-7EY"/>
<constraint firstAttribute="trailing" secondItem="Tfl-FO-sZI" secondAttribute="trailing" id="cfN-zb-llq"/> <constraint firstAttribute="trailing" secondItem="Tfl-FO-sZI" secondAttribute="trailing" id="cfN-zb-llq"/>
<constraint firstItem="CEF-uD-Cq7" firstAttribute="top" secondItem="JWA-Cq-aaf" secondAttribute="bottom" id="elR-zM-vMr"/> <constraint firstItem="CEF-uD-Cq7" firstAttribute="top" secondItem="ByU-Du-Lfu" secondAttribute="bottom" id="iJp-vj-TIt"/>
<constraint firstItem="Ubr-ff-OkA" firstAttribute="top" secondItem="JWA-Cq-aaf" secondAttribute="bottom" constant="64" id="jIR-Q7-SeE"/> <constraint firstItem="ByU-Du-Lfu" firstAttribute="top" secondItem="Tfl-FO-sZI" secondAttribute="bottom" id="kHm-kB-eN9"/>
<constraint firstItem="JWA-Cq-aaf" firstAttribute="leading" secondItem="lqo-x7-uJQ" secondAttribute="leading" id="qoj-tO-EKs"/>
<constraint firstAttribute="trailing" secondItem="CEF-uD-Cq7" secondAttribute="trailing" id="rX0-Pt-63Y"/> <constraint firstAttribute="trailing" secondItem="CEF-uD-Cq7" secondAttribute="trailing" id="rX0-Pt-63Y"/>
<constraint firstItem="Ubr-ff-OkA" firstAttribute="top" secondItem="CEF-uD-Cq7" secondAttribute="bottom" id="vIA-lt-88L"/> <constraint firstItem="Ubr-ff-OkA" firstAttribute="top" secondItem="CEF-uD-Cq7" secondAttribute="bottom" id="vIA-lt-88L"/>
</constraints> </constraints>
...@@ -567,13 +596,13 @@ ...@@ -567,13 +596,13 @@
<size key="freeformSize" width="375" height="667"/> <size key="freeformSize" width="375" height="667"/>
<connections> <connections>
<outlet property="btnBottom" destination="pGM-pq-sCr" id="Taa-zY-MVJ"/> <outlet property="btnBottom" destination="pGM-pq-sCr" id="Taa-zY-MVJ"/>
<outlet property="collectionView" destination="JWA-Cq-aaf" id="fDB-PK-3HB"/> <outlet property="tableView" destination="ByU-Du-Lfu" id="EYl-ha-xkO"/>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8BI-14-Fwd" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="8BI-14-Fwd" userLabel="First Responder" sceneMemberID="firstResponder"/>
<tapGestureRecognizer id="oQa-iO-TPh"/> <tapGestureRecognizer id="oQa-iO-TPh"/>
</objects> </objects>
<point key="canvasLocation" x="222" y="321"/> <point key="canvasLocation" x="-92" y="139.880059970015"/>
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
......
...@@ -9,11 +9,15 @@ ...@@ -9,11 +9,15 @@
#import "SaleInputAddViewController.h" #import "SaleInputAddViewController.h"
#import "SaleInputViewModel.h" #import "SaleInputViewModel.h"
#import "SaleInputAmountCollectionViewCell.h" #import "SaleInputAmountCollectionViewCell.h"
@interface SaleInputAddViewController ()<UICollectionViewDelegate, UICollectionViewDataSource> #import "SaleInputAddAmountCell.h"
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView; #import "PicViewModel.h"
#import "InspectRepairAddPicTableViewCell.h"
@interface SaleInputAddViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UIButton *btnBottom; @property (weak, nonatomic) IBOutlet UIButton *btnBottom;
@property (strong, nonatomic) SaleInputViewModel *viewModel; @property (strong, nonatomic) SaleInputViewModel *viewModel;
@property (strong, nonatomic) NSMutableArray *arrData; @property (strong, nonatomic) NSMutableArray *arrData;
@property (strong, nonatomic) PicViewModel *picVM;
@end @end
@implementation SaleInputAddViewController @implementation SaleInputAddViewController
...@@ -24,67 +28,35 @@ ...@@ -24,67 +28,35 @@
WS(weakSelf); WS(weakSelf);
[self.viewModel httpAllPayments:^(NSMutableArray<HMSaleInputDetail_payments_payment *> *arrPayments) { [self.viewModel httpAllPayments:^(NSMutableArray<HMSaleInputDetail_payments_payment *> *arrPayments) {
weakSelf.arrData = arrPayments; weakSelf.arrData = arrPayments;
[weakSelf.collectionView reloadData]; [weakSelf.tableView reloadData];
CLog(@"%@", arrPayments); CLog(@"%@", arrPayments);
}]; }];
} }
#pragma mark - UICollectionViewDelegateFlowLayout - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
#pragma mark - item的列间距 return 2;
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
return 0;
} }
#pragma mark - item的行间距 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
if (0 == section) {
return 0;
} else {
return 5;
}
}
//定义每个UICollectionView item的大小
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
if (0 == indexPath.section) {
return CGSizeMake(kWidth, 50);
} else {
return CGSizeMake((kWidth - 30) / 2, kAutoValue(120));
}
}
//定义每个UICollectionView section的 margin
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
if (0 == section) {
return UIEdgeInsetsMake(0, 0, 0, 0);
} else {
return UIEdgeInsetsMake(0, 10, 0, 10);
}
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
if (section == 0) { if (section == 0) {
return CGSizeMake(0, 0); return self.arrData.count;
} else { }else{
return CGSizeMake(kWidth, 50); return 1;
} }
} }
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
UICollectionReusableView *header; if (indexPath.section == 0) {
if ([kind isEqualToString:UICollectionElementKindSectionHeader]) { return 50;
header = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"picHeaderView" forIndexPath:indexPath]; }else{
return self.picVM.cellHeight;
} }
return header;
} }
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
return self.arrData.count; if (indexPath.section == 0) {
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
//输入各种支付方式的金额 //输入各种支付方式的金额
SaleInputAmountCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"SaleInputAmountCollectionViewCell" forIndexPath:indexPath]; SaleInputAddAmountCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SaleInputAddAmountCell" forIndexPath:indexPath];
cell.isEdit = self.viewModel.type != SaleInputTypeReadOnly; cell.isEdit = self.viewModel.type != SaleInputTypeReadOnly;
[cell configCellWithArray:self.arrData indexPath:indexPath]; [cell configCellWithArray:self.arrData indexPath:indexPath];
// WS(weakSelf); // WS(weakSelf);
...@@ -92,13 +64,26 @@ ...@@ -92,13 +64,26 @@
// [weakSelf allInputMoney]; // [weakSelf allInputMoney];
}; };
return cell; return cell;
}else{
InspectRepairAddPicTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"InspectRepairAddPicTableViewCell" forIndexPath:indexPath];
[cell configCellWithViewModel:self.picVM
indexPath:indexPath
target:self];
WS(weakSelf);
cell.blockReloadData = ^{
[weakSelf.tableView reloadSections:[NSIndexSet indexSetWithIndex:0]
withRowAnimation:UITableViewRowAnimationAutomatic];
};
return cell;
}
} }
//
- (void)httpPayments { - (void)httpPayments {
} }
ZJLazy(SaleInputViewModel, viewModel); ZJLazy(SaleInputViewModel, viewModel);
ZJLazy(NSMutableArray, arrData); ZJLazy(NSMutableArray, arrData);
ZJLazy(PicViewModel, picVM);
@end @end
//
// SaleInputAddAmountCell.h
// HDMall
//
// Created by Javen on 2017/7/31.
// Copyright © 2017年 上海勾芒信息科技. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SaleInputViewModel.h"
@interface SaleInputAddAmountCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *labelTitle;
@property (weak, nonatomic) IBOutlet UITextField *textFieldInput;
@property (nonatomic, strong) HMSaleInputDetail_payments *model;
@property (nonatomic, assign) BOOL isEdit;
@property (nonatomic, copy) void (^blockNumberChanged)(void);
- (void)configCellWithArray:(NSMutableArray *)array indexPath:(NSIndexPath *)indexPath;
@end
//
// SaleInputAddAmountCell.m
// HDMall
//
// Created by Javen on 2017/7/31.
// Copyright © 2017年 上海勾芒信息科技. All rights reserved.
//
#import "SaleInputAddAmountCell.h"
#import "CalculateHelper.h"
#import "NSString+Additions.h"
@interface SaleInputAddAmountCell ()<UITextFieldDelegate>
@end
@implementation SaleInputAddAmountCell
- (void)awakeFromNib
{
[super awakeFromNib];
self.textFieldInput.delegate = self;
[self.textFieldInput addTarget:self action:@selector(textFieldDidChanged:) forControlEvents:UIControlEventEditingChanged];
}
/**
* 设置可编辑状态和不可编辑状态
*/
- (void)setIsEdit:(BOOL)isEdit {
_isEdit = isEdit;
if (isEdit) {
self.textFieldInput.userInteractionEnabled = YES;
self.textFieldInput.textColor = [UIColor blackColor];
}else{
self.textFieldInput.userInteractionEnabled = NO;
self.textFieldInput.textColor = [UIColor lightGrayColor];
}
}
//实时获取变化之后的数据
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
//获取改变之后的字符串
NSMutableString *futureString = [NSMutableString stringWithString:textField.text];
[futureString insertString:string atIndex:range.location];
return [futureString isValidMoneyInput];
}
- (void)textFieldDidChanged:(UITextField *)textField {
self.model.total = [CalculateHelper decimalNumber:textField.text];
self.blockNumberChanged();
}
- (void)textFieldDidBeginEditing:(UITextField *)textField {
textField.textColor = [UIColor blackColor];
if ([textField.text isEqualToString:@"0.00"]) {
textField.text = @"";
}
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
//输入框有文字则显示,避免没输入自动出现0.00的情况
if (textField.text.length > 0) {
if ([textField.text isEqualToString:@"0"]) {
textField.textColor = [UIColor lightGrayColor];
textField.text = @"0.00";
}else{
self.textFieldInput.text = [CalculateHelper getMoneyStringFrom:textField.text];
}
}
}
- (void)configCellWithArray:(NSMutableArray *)array indexPath:(NSIndexPath *)indexPath {
self.model = array[indexPath.row];
self.textFieldInput.text = self.model.total ? [CalculateHelper getMoneyStringFrom:self.model.total] : nil;
if ([self.textFieldInput.text isEqualToString:@"0.00"]) {
self.textFieldInput.textColor = [UIColor lightGrayColor];
}else{
self.textFieldInput.textColor = [UIColor blackColor];
}
self.labelTitle.text = self.model.payment.name;
}
@end
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
// Copyright © 2016年 上海勾芒信息科技. All rights reserved. // Copyright © 2016年 上海勾芒信息科技. All rights reserved.
// //
#import "CalculateHelper.h"
#import "SaleInputAmountCollectionViewCell.h" #import "SaleInputAmountCollectionViewCell.h"
#import "CalculateHelper.h"
#import "NSString+Additions.h" #import "NSString+Additions.h"
@interface SaleInputAmountCollectionViewCell () <UITextFieldDelegate> @interface SaleInputAmountCollectionViewCell () <UITextFieldDelegate>
......
...@@ -39,6 +39,32 @@ ...@@ -39,6 +39,32 @@
<array> <array>
<string>armv7</string> <string>armv7</string>
</array> </array>
<key>NSAppleMusicUsageDescription</key>
<string>App需要您的同意,才能访问媒体资料库</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>App需要您的同意,才能访问蓝牙</string>
<key>NSCalendarsUsageDescription</key>
<string>App需要您的同意,才能访问日历</string>
<key>NSCameraUsageDescription</key>
<string>App需要您的同意,才能访问相机</string>
<key>NSHealthShareUsageDescription</key>
<string>App需要您的同意,才能访问健康分享</string>
<key>NSHealthUpdateUsageDescription</key>
<string>App需要您的同意,才能访问健康更新 </string>
<key>NSLocationAlwaysUsageDescription</key>
<string>App需要您的同意,才能始终访问位置</string>
<key>NSLocationUsageDescription</key>
<string>App需要您的同意,才能访问位置</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>App需要您的同意,才能在使用期间访问位置</string>
<key>NSMicrophoneUsageDescription</key>
<string>App需要您的同意,才能访问麦克风</string>
<key>NSMotionUsageDescription</key>
<string>App需要您的同意,才能访问运动与健身</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App需要您的同意,才能访问相册</string>
<key>NSRemindersUsageDescription</key>
<string>App需要您的同意,才能访问提醒事项</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>
......
//
// GalleryCollectionViewCell.h
// CapitalChamberlain
//
// Created by 张杰 on 15/12/3.
// Copyright © 2015年 SunShine. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SingleScrollView.h"
//#import "AttachmentModel.h"
@interface GalleryCollectionViewCell : UICollectionViewCell
@property (nonatomic, strong) UIImageView *imgView;
//- (void)setUpCellWithModel:(AttachmentModel *)model;
- (void)cellWithImgName:(NSString *)imgUrl;
- (void)configCellWithArray:(NSMutableArray *)array indexPath:(NSIndexPath *)indexPath;
@end
//
// GalleryCollectionViewCell.m
// CapitalChamberlain
//
// Created by 张杰 on 15/12/3.
// Copyright © 2015年 SunShine. All rights reserved.
//
#import "GalleryCollectionViewCell.h"
#import "ZJBaseFileModel.h"
@interface GalleryCollectionViewCell ()
@property (nonatomic, strong) SingleScrollView *imageScrollView;
@end
@implementation GalleryCollectionViewCell
- (void)awakeFromNib {
[super awakeFromNib];
CLog(@"%f",self.width);
self.imageScrollView = [[SingleScrollView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight)];
self.backgroundColor = [UIColor blackColor];
[self.contentView addSubview:self.imageScrollView];
}
- (void)cellWithImgName:(NSString *)imgUrl {
}
- (void)configCellWithArray:(NSMutableArray *)array indexPath:(NSIndexPath *)indexPath {
ZJBaseFileModel *model = array[indexPath.row];
if ([model isKindOfClass:[ZJBaseFileModel class]]) {
if (model.image != nil) {
[self.imageScrollView setImage:model.image placeHolder:kPlaceHolderImage];
}else{
WS(weakSelf);
[model getFileUrlComplelet:^(NSString *fileUrl) {
[weakSelf.imageScrollView setImage:fileUrl placeHolder:kPlaceHolderImage];
}];
}
}else if([model isKindOfClass:[UIImage class]]){
[self.imageScrollView setImage:model placeHolder:kPlaceHolderImage];
}
}
@end
//
// GalleryViewController.h
// vanke
//
// Created by Z on 16/7/18.
// Copyright © 2016年 gomore. All rights reserved.
// storyboard
#import <UIKit/UIKit.h>
#import "GalleryCollectionViewCell.h"
typedef NS_ENUM(NSInteger, GalleryType) {
GalleryTypeReadOnly,
GalleryTypeEdit
};
typedef void (^closeBlock)(NSInteger index);
@interface GalleryViewController : UIViewController
@property (nonatomic, strong) NSMutableArray *arrData;
@property (nonatomic, assign) NSInteger page;
@property (nonatomic, assign) GalleryType type;
@property (nonatomic, strong) NSMutableArray *arrOnlineUuids;
@property (nonatomic, copy) closeBlock blockDelete;
@end
//
// GalleryViewController.m
// vanke
//
// Created by Z on 16/7/18.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "ZJBaseFileModel.h"
#import "GalleryCollectionViewCell.h"
#import "GalleryViewController.h"
@interface GalleryViewController () <UIScrollViewDelegate>
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *flowLayout;
@end
@implementation GalleryViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.flowLayout.itemSize = CGSizeMake(kWidth, kHeight);
self.flowLayout.minimumLineSpacing = 0;
self.flowLayout.minimumInteritemSpacing = 0;
self.flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
switch (self.type) {
case GalleryTypeReadOnly: {
break;
}
case GalleryTypeEdit: {
UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemTrash target:self action:@selector(deletePic)];
self.navigationItem.rightBarButtonItem = rightBtn;
break;
}
}
}
- (void)deletePic
{
WS(weakSelf);
[self alertTitle:@"确认删除这张图片?"
msg:nil
okAction:^(UIAlertAction *action) {
weakSelf.page = weakSelf.collectionView.contentOffset.x / weakSelf.view.frame.size.width;
[weakSelf.arrData removeObjectAtIndex:weakSelf.page];
if (self.arrData.count == 0) {
[weakSelf.navigationController popViewControllerAnimated:YES];
} else {
NSIndexPath *index = [NSIndexPath indexPathForRow:weakSelf.page inSection:0];
[weakSelf.collectionView deleteItemsAtIndexPaths:@[ index ]];
}
//删除之后的回调,这里的数字是随便传的
weakSelf.blockDelete(0);
}
cancelAction:nil];
}
- (void)viewDidLayoutSubviews
{
if (self.page < 0) {
return;
}
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:self.page inSection:0]
atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally
animated:NO];
}
#pragma mark <UICollectionViewDataSource>
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
{
return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return self.arrData.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
GalleryCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"GalleryCollectionViewCell" forIndexPath:indexPath];
[cell configCellWithArray:self.arrData indexPath:indexPath];
self.title = [NSString stringWithFormat:@"(%ld/%.0lu)", indexPath.row + 1, (unsigned long)self.arrData.count];
return cell;
}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
self.title = [NSString stringWithFormat:@"(%.0f/%.0lu)", scrollView.contentOffset.x / kWidth + 1, (unsigned long)self.arrData.count];
self.page = scrollView.contentOffset.x / self.view.frame.size.width;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#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
//
// SingleScrollView.h
// PhotoWallDemo
//
// Created by LZXuan on 14-8-18.
// Copyright (c) 2014年 LZXuan. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SingleScrollView : UIScrollView
//
- (SingleScrollView *)initWithFrame:(CGRect)frame image:(NSString *)image;
- (void)setImage:(id)image placeHolder:(UIImage *)placeHolder;
@end
//
// SingleScrollView.m
// PhotoWallDemo
//
// Created by LZXuan on 14-8-18.
// Copyright (c) 2014年 LZXuan. All rights reserved.
//
#import "SingleScrollView.h"
#import "UIImageView+WebCache.h"
@interface SingleScrollView()<UIScrollViewDelegate>
@end
@implementation SingleScrollView {
UIImageView *_imageView;
}
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self setUpViews];
}
return self;
}
- (SingleScrollView *)initWithFrame:(CGRect)frame image:(NSString *)image{
if (self = [super initWithFrame:frame]) {
[self setUpViews];
[self setImage:image placeHolder:nil];
}
return self;
}
- (void)setUpViews {
self.delegate = self;
self.showsHorizontalScrollIndicator = NO;
self.showsVerticalScrollIndicator = NO;
//设置最大放大倍数
self.minimumZoomScale = 1.0;
self.maximumZoomScale = 2.0;
//粘贴一张图片
_imageView = [[UIImageView alloc] init];
_imageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
_imageView.center = CGPointMake(self.frame.size.width/2, self.frame.size.height/2 - 32);//保证居中
_imageView.contentMode = UIViewContentModeScaleAspectFit;
UITapGestureRecognizer *doubleTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleTap:)];
[doubleTapGesture setNumberOfTapsRequired:2];
[_imageView addGestureRecognizer:doubleTapGesture];
_imageView.userInteractionEnabled = YES;
[self addSubview:_imageView];
}
- (void)setImage:(id)image placeHolder:(UIImage *)placeHolder{
//每次重新设置图片的时候设置缩放比例(场景是在做相册的时候)
self.zoomScale = 1.0;
if ([image isKindOfClass:[NSString class]]) {
if ([image hasPrefix:@"http://"]) {
NSURL *url = [NSURL URLWithString:image];
[_imageView sd_setImageWithURL:url placeholderImage:placeHolder];
}else{
_imageView.image=[UIImage imageNamed:image];
}
}else if ([image isKindOfClass:[UIImage class]]){
_imageView.image = image;
}
}
//双击定点缩放
- (void)handleDoubleTap:(UIGestureRecognizer *)gesture {
CGFloat zoomScale = self.zoomScale;
zoomScale = (zoomScale == 1.0) ? 2.0 : 1.0;
CGRect zoomRect = [self zoomRectForScale:zoomScale withCenter:[gesture locationInView:gesture.view]];
[self zoomToRect:zoomRect animated:YES];
}
- (CGRect)zoomRectForScale:(float)scale withCenter:(CGPoint)center {
CGRect zoomRect;
zoomRect.size.height = self.frame.size.height / scale;
zoomRect.size.width = self.frame.size.width / scale;
zoomRect.origin.x = center.x - (zoomRect.size.width /2.0);
zoomRect.origin.y = center.y - (zoomRect.size.height /2.0);
return zoomRect;
}
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
return _imageView;
}
@end
//
// RepairAddPicTableViewCell.h
// patrol
//
// Created by Javen on 2016/10/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PicViewModel.h"
typedef void (^repairBlock)(void);
@interface InspectRepairAddPicTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *layOut;
@property (weak, nonatomic) UIViewController *vc;
@property (strong, nonatomic) PicViewModel *viewModel;
/** 是否显示添加按钮 */
@property (nonatomic, copy) repairBlock blockReloadData;
- (void)configCellWithViewModel:(PicViewModel *)viewModel indexPath:(NSIndexPath *)indexPath target:(UIViewController *)target;
@end
//
// RepairAddPicTableViewCell.m
// patrol
//
// Created by Javen on 2016/10/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "InspectRepairAddPicTableViewCell.h"
#import "RepairAddPicCollectionViewCell.h"
#import "TZImagePickerController.h"
#import "GalleryViewController.h"
@interface InspectRepairAddPicTableViewCell () <UICollectionViewDelegate,
UICollectionViewDataSource>
@end
@implementation InspectRepairAddPicTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
self.layOut.itemSize = kPicCellSize;
self.layOut.minimumInteritemSpacing = 10;
self.layOut.minimumLineSpacing = 10;
self.layOut.sectionInset = UIEdgeInsetsMake(10, 10, 10, 10);
// Initialization code
}
- (void)configCellWithViewModel:(PicViewModel *)viewModel indexPath:(NSIndexPath *)indexPath target:(UIViewController *)target {
self.vc = target;
self.viewModel = viewModel;
//如果是只读的,则直接刷新。
if (self.viewModel.type == kPicCellTypeRead) {
[self.collectionView reloadData];
return;
}
//非只读情况,则是添加或者编辑
if (self.viewModel.arrPics.count == kMaxAddRepairImgNumber) {
self.viewModel.type = kPicCellTypeEdit;
} else {
self.viewModel.type = kPicCellTypeAdd;
}
[self.collectionView reloadData];
}
#pragma mark - collectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
switch (self.viewModel.type) {
case kPicCellTypeAdd: {
return self.viewModel.arrPics.count + 1;
break;
}
default: {
return self.viewModel.arrPics.count;
break;
}
}
return 0;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath {
RepairAddPicCollectionViewCell *cell = [collectionView
dequeueReusableCellWithReuseIdentifier:@"RepairAddPicCollectionViewCell"
forIndexPath:indexPath];
[cell configCellWithArr:self.viewModel.arrPics indexPath:indexPath];
//删除
cell.blockDelete = ^(NSInteger index) {
};
return cell;
}
#pragma mark - collectionView DataSource
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
switch (self.viewModel.type) {
case kPicCellTypeRead: {
UIStoryboard *board = [UIStoryboard storyboardWithName:@"ZJPicture" bundle:nil];
GalleryViewController *galleryVC = [board instantiateViewControllerWithIdentifier:@"GalleryViewController"];
galleryVC.arrData = [self.viewModel.arrPics mutableCopy];
galleryVC.page = indexPath.item;
[self.vc.navigationController pushViewController:galleryVC animated:YES];
break;
}
default: {
if (indexPath.row == self.viewModel.arrPics.count) { //说明点击的是添加图片的那个按钮
[self pushImagePickerController];
} else { //点击查看大图
[self seePicsWithIndex:indexPath.item];
}
break;
}
}
}
#pragma mark - TZImagePickerController
- (void)pushImagePickerController {
CGFloat canSelectNum = kMaxAddRepairImgNumber;
TZImagePickerController *imagePickerVc =
[[TZImagePickerController alloc] initWithMaxImagesCount:canSelectNum - self.viewModel.arrPics.count delegate:nil];
imagePickerVc.isSelectOriginalPhoto = NO;
imagePickerVc.navigationBar.barTintColor = kMainColor;
imagePickerVc.oKButtonTitleColorNormal = kMainColor;
imagePickerVc.allowPickingOriginalPhoto = NO;
imagePickerVc.showSelectBtn = YES;
WS(weakSelf);
[imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
[weakSelf.viewModel.arrPics addObjectsFromArray:photos];
[weakSelf.collectionView reloadData];
weakSelf.blockReloadData();
}];
[self.vc presentViewController:imagePickerVc animated:YES completion:nil];
}
/**
查看大图
@param index 点击中的图片下标
*/
- (void)seePicsWithIndex:(NSInteger)index {
UIStoryboard *board = [UIStoryboard storyboardWithName:@"ZJPicture" bundle:nil];
GalleryViewController *galleryVC = [board instantiateViewControllerWithIdentifier:@"GalleryViewController"];
galleryVC.arrData = self.viewModel.arrPics;
galleryVC.page = index;
galleryVC.type = GalleryTypeEdit;
[self.vc.navigationController pushViewController:galleryVC animated:YES];
WS(weakSelf);
galleryVC.blockDelete = ^(NSInteger index) {
[weakSelf.collectionView reloadData];
weakSelf.blockReloadData();
};
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// PicViewModel.h
// RealEstateManagement
//
// Created by Javen on 2017/1/6.
// Copyright © 2017年 上海勾芒信息科技. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, kPicCellType) {
kPicCellTypeAdd = 0,
kPicCellTypeEdit,
kPicCellTypeRead
};
//图片的size
#define kPicCellSize CGSizeMake((kWidth - 30) / 2.0, (kWidth - 120) / 2.0)
//允许的最大图片数量
static CGFloat const kMaxAddRepairImgNumber = 2;
@interface PicViewModel : NSObject
@property (strong, nonatomic) NSMutableArray *arrPics;
@property(nonatomic, strong) NSMutableArray *selectedAssets;
/**
图片cell的类型
*/
@property (nonatomic, assign) kPicCellType type;
/**
获取cell的高度
@return 高度
*/
- (CGFloat)cellHeight;
@end
//
// PicViewModel.m
// RealEstateManagement
//
// Created by Javen on 2017/1/6.
// Copyright © 2017年 上海勾芒信息科技. All rights reserved.
//
#import "PicViewModel.h"
@implementation PicViewModel
/**
获取cell的高度
@return 高度
*/
- (CGFloat)cellHeight {
NSInteger picCount = self.arrPics.count;
//如果非只读的情况,则还需要多计算一个添加按钮的位置
if (self.type != kPicCellTypeRead) {
if (self.arrPics.count != kMaxAddRepairImgNumber) {
picCount += 1;
}
}
NSInteger div = picCount / 2;
NSInteger remainder = picCount % 2;
if (remainder != 0) {
div = div + 1;
}
return div * (kPicCellSize.height + 20);
}
- (NSMutableArray *)arrPics {
if (!_arrPics) {
_arrPics = [NSMutableArray array];
}
return _arrPics;
}
@end
//
// RepairAddPicCollectionViewCell.h
// patrol
//
// Created by Javen on 2016/10/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface RepairAddPicCollectionViewCell : UICollectionViewCell
@property (weak, nonatomic) IBOutlet UIImageView *img;
@property (weak, nonatomic) IBOutlet UIImageView *imgPicture;
@property (nonatomic, assign) NSInteger index;
@property (nonatomic, copy) void (^blockDelete)(NSInteger index);
- (void)configCellWithArr:(NSMutableArray *)array indexPath:(NSIndexPath *)indexPath;
@end
//
// RepairAddPicCollectionViewCell.m
// patrol
//
// Created by Javen on 2016/10/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "RepairAddPicCollectionViewCell.h"
#import "ZJBaseFileModel.h"
@implementation RepairAddPicCollectionViewCell
- (void)awakeFromNib {
self.layer.borderColor = [UIColor colorWithWhite:0.902 alpha:1.000].CGColor;
self.layer.borderWidth = 1;
UILongPressGestureRecognizer *longPress =
[[UILongPressGestureRecognizer alloc]
initWithTarget:self
action:@selector(actionDelete)];
[self addGestureRecognizer:longPress];
}
- (void)configCellWithArr:(NSMutableArray *)array
indexPath:(NSIndexPath *)indexPath {
if (indexPath.row == array.count) { //说明是添加按钮
self.img.hidden = NO;
self.imgPicture.hidden = YES;
self.index = 999;
} else {
self.img.hidden = YES;
self.imgPicture.hidden = NO;
id imageUrl = array[indexPath.row];
if ([imageUrl isKindOfClass:[NSString class]]) {
if ([imageUrl hasPrefix:@"http://"]) {
[self.imgPicture setImageWithURL:[NSURL URLWithString:imageUrl]
placeholderImage:[UIImage imageNamed:@"AttachPhoto"]];
} else {
self.imgPicture.image = [UIImage imageNamed:imageUrl];
}
} else if ([imageUrl isKindOfClass:[UIImage class]]) {
self.imgPicture.image = imageUrl;
} else if([imageUrl isKindOfClass:[ZJBaseFileModel class]]){
[(ZJBaseFileModel *)imageUrl setImageView:self.imgPicture];
}else if ([imageUrl isKindOfClass:[UIImage class]]){
self.imgPicture.image = imageUrl;
}
self.index = indexPath.row;
}
}
- (void)actionDelete {
self.blockDelete(self.index);
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Gallery View Controller-->
<scene sceneID="waG-zj-w2k">
<objects>
<viewController storyboardIdentifier="GalleryViewController" id="I3m-uw-YGR" customClass="GalleryViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="GB2-cx-312"/>
<viewControllerLayoutGuide type="bottom" id="i5t-uh-9Fc"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="0dd-Qj-Qxv">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" pagingEnabled="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Usg-4T-ohG">
<rect key="frame" x="0.0" y="20" width="600" height="580"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="OpI-qP-qvn">
<size key="itemSize" width="352" height="270"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="GalleryCollectionViewCell" id="m7W-zF-sf7" customClass="GalleryCollectionViewCell">
<rect key="frame" x="0.0" y="0.0" width="352" height="270"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="352" height="270"/>
<autoresizingMask key="autoresizingMask"/>
</view>
<color key="backgroundColor" red="0.81379991770000004" green="0.81370532510000004" blue="0.81376242639999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</collectionViewCell>
</cells>
<connections>
<outlet property="dataSource" destination="I3m-uw-YGR" id="WQ2-MQ-zFm"/>
<outlet property="delegate" destination="I3m-uw-YGR" id="ger-wt-x8g"/>
</connections>
</collectionView>
</subviews>
<color key="backgroundColor" red="1" green="0.99989593030000001" blue="0.99996638299999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Usg-4T-ohG" secondAttribute="trailing" id="BhJ-ur-hvI"/>
<constraint firstItem="Usg-4T-ohG" firstAttribute="top" secondItem="GB2-cx-312" secondAttribute="bottom" id="FLL-8U-wTI"/>
<constraint firstItem="i5t-uh-9Fc" firstAttribute="top" secondItem="Usg-4T-ohG" secondAttribute="bottom" id="Fgk-2a-HiZ"/>
<constraint firstItem="Usg-4T-ohG" firstAttribute="leading" secondItem="0dd-Qj-Qxv" secondAttribute="leading" id="uX0-wb-lGI"/>
</constraints>
</view>
<connections>
<outlet property="collectionView" destination="Usg-4T-ohG" id="VE3-j8-gu9"/>
<outlet property="flowLayout" destination="OpI-qP-qvn" id="uvf-qr-u5t"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="lgx-4B-scg" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1223" y="4220"/>
</scene>
</scenes>
</document>
...@@ -15,6 +15,7 @@ abstract_target 'hdmall_base' do ...@@ -15,6 +15,7 @@ abstract_target 'hdmall_base' do
pod 'MBProgressHUD', '~> 1.0.0' pod 'MBProgressHUD', '~> 1.0.0'
pod 'JSONKit-NoWarning', '~> 1.2' pod 'JSONKit-NoWarning', '~> 1.2'
pod 'RadioButton' pod 'RadioButton'
pod 'TZImagePickerController', '~> 1.8.4'
# target 'HDMall' do # target 'HDMall' do
# end # end
target 'HDMall_TEST' do target 'HDMall_TEST' do
......
...@@ -25,6 +25,7 @@ PODS: ...@@ -25,6 +25,7 @@ PODS:
- SDWebImage (3.7.6): - SDWebImage (3.7.6):
- SDWebImage/Core (= 3.7.6) - SDWebImage/Core (= 3.7.6)
- SDWebImage/Core (3.7.6) - SDWebImage/Core (3.7.6)
- TZImagePickerController (1.8.4)
- UMengAnalytics-NO-IDFA (4.2.5) - UMengAnalytics-NO-IDFA (4.2.5)
DEPENDENCIES: DEPENDENCIES:
...@@ -38,6 +39,7 @@ DEPENDENCIES: ...@@ -38,6 +39,7 @@ DEPENDENCIES:
- MJRefresh (~> 3.1.2) - MJRefresh (~> 3.1.2)
- RadioButton - RadioButton
- SDWebImage (~> 3.7.4) - SDWebImage (~> 3.7.4)
- TZImagePickerController (~> 1.8.4)
- UMengAnalytics-NO-IDFA - UMengAnalytics-NO-IDFA
SPEC CHECKSUMS: SPEC CHECKSUMS:
...@@ -51,8 +53,9 @@ SPEC CHECKSUMS: ...@@ -51,8 +53,9 @@ SPEC CHECKSUMS:
MJRefresh: b96cdb21c4aa75a7b07654311ab2f315c497e806 MJRefresh: b96cdb21c4aa75a7b07654311ab2f315c497e806
RadioButton: 7ef053baf6ff0e7f9e777016c28e9ba4e330edba RadioButton: 7ef053baf6ff0e7f9e777016c28e9ba4e330edba
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9 SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
TZImagePickerController: 612c79b572efd0363c7a966daad7a974c2d6b458
UMengAnalytics-NO-IDFA: 16666e32edce5be44ae5b14aaaa7f3582e09d6ab UMengAnalytics-NO-IDFA: 16666e32edce5be44ae5b14aaaa7f3582e09d6ab
PODFILE CHECKSUM: 45d261b414e3e681e520815408aeab2135ff9722 PODFILE CHECKSUM: c017ac8a85d92e34ba60fa747d2d9eca3dd63550
COCOAPODS: 1.2.1 COCOAPODS: 1.2.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment