Commit 6433faf0 authored by admin's avatar admin

添加了管理层、商场的在线抽查部分页面 添加功能模块 修复巡检详情崩溃

parent 3a240f77
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
841D24F81BEB473C0005CC9F /* CheckPicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 841D24F71BEB473C0005CC9F /* CheckPicViewController.m */; }; 841D24F81BEB473C0005CC9F /* CheckPicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 841D24F71BEB473C0005CC9F /* CheckPicViewController.m */; };
841D24FB1BEB75CA0005CC9F /* QuestionDetailFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 841D24FA1BEB75CA0005CC9F /* QuestionDetailFooterView.m */; }; 841D24FB1BEB75CA0005CC9F /* QuestionDetailFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 841D24FA1BEB75CA0005CC9F /* QuestionDetailFooterView.m */; };
842547FC1BF03977006C79C5 /* QuestionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 842547FB1BF03977006C79C5 /* QuestionModel.m */; }; 842547FC1BF03977006C79C5 /* QuestionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 842547FB1BF03977006C79C5 /* QuestionModel.m */; };
843D1B9E1C0B3F7600E30002 /* SpotCheckOnLineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 843D1B9D1C0B3F7600E30002 /* SpotCheckOnLineViewController.m */; };
8442BA5C1BDB8FDB005E5657 /* MineTableHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */; }; 8442BA5C1BDB8FDB005E5657 /* MineTableHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */; };
846206B51C06AF700015C456 /* RankListHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 846206B41C06AF700015C456 /* RankListHeaderView.m */; }; 846206B51C06AF700015C456 /* RankListHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 846206B41C06AF700015C456 /* RankListHeaderView.m */; };
846206B81C06AFCA0015C456 /* RankCommentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 846206B71C06AFCA0015C456 /* RankCommentModel.m */; }; 846206B81C06AFCA0015C456 /* RankCommentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 846206B71C06AFCA0015C456 /* RankCommentModel.m */; };
...@@ -48,6 +49,9 @@ ...@@ -48,6 +49,9 @@
84970E361BD8E09D00C1728A /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E351BD8E09D00C1728A /* LoginViewController.m */; }; 84970E361BD8E09D00C1728A /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E351BD8E09D00C1728A /* LoginViewController.m */; };
84970E391BD8E0B300C1728A /* LoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E381BD8E0B300C1728A /* LoginView.m */; }; 84970E391BD8E0B300C1728A /* LoginView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84970E381BD8E0B300C1728A /* LoginView.m */; };
8497B62B1C043671007ECBE6 /* InspectTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8497B62A1C043671007ECBE6 /* InspectTableView.m */; }; 8497B62B1C043671007ECBE6 /* InspectTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8497B62A1C043671007ECBE6 /* InspectTableView.m */; };
84A673881C0B50B4000F828E /* OnLineCompleteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A673871C0B50B4000F828E /* OnLineCompleteViewController.m */; };
84A6738B1C0B54A6000F828E /* OnLineCompleteHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A6738A1C0B54A6000F828E /* OnLineCompleteHeadView.m */; };
84A6738E1C0BE2D0000F828E /* OnLineCompleteCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A6738D1C0BE2D0000F828E /* OnLineCompleteCell.m */; };
84AD4F201BF425AC00BFB37C /* InspectDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AD4F1F1BF425AC00BFB37C /* InspectDetailView.m */; }; 84AD4F201BF425AC00BFB37C /* InspectDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AD4F1F1BF425AC00BFB37C /* InspectDetailView.m */; };
84AD4F221BF42F8E00BFB37C /* classfiy.plist in Resources */ = {isa = PBXBuildFile; fileRef = 84AD4F211BF42F8E00BFB37C /* classfiy.plist */; }; 84AD4F221BF42F8E00BFB37C /* classfiy.plist in Resources */ = {isa = PBXBuildFile; fileRef = 84AD4F211BF42F8E00BFB37C /* classfiy.plist */; };
84AD4F261BF4356A00BFB37C /* TaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AD4F251BF4356A00BFB37C /* TaskModel.m */; }; 84AD4F261BF4356A00BFB37C /* TaskModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 84AD4F251BF4356A00BFB37C /* TaskModel.m */; };
...@@ -71,6 +75,8 @@ ...@@ -71,6 +75,8 @@
84CC34D81C094682002F10E2 /* StandardTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34D71C094682002F10E2 /* StandardTableViewCell.m */; }; 84CC34D81C094682002F10E2 /* StandardTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34D71C094682002F10E2 /* StandardTableViewCell.m */; };
84CC34DF1C0953C3002F10E2 /* HandOutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34DE1C0953C3002F10E2 /* HandOutViewController.m */; }; 84CC34DF1C0953C3002F10E2 /* HandOutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34DE1C0953C3002F10E2 /* HandOutViewController.m */; };
84CC34E21C09583D002F10E2 /* LookOnLineTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34E11C09583D002F10E2 /* LookOnLineTableViewCell.m */; }; 84CC34E21C09583D002F10E2 /* LookOnLineTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34E11C09583D002F10E2 /* LookOnLineTableViewCell.m */; };
84CC34EC1C09AD98002F10E2 /* LookOnLineDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34EB1C09AD98002F10E2 /* LookOnLineDetailView.m */; };
84CC34EF1C09AEC0002F10E2 /* LookOnLineDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CC34EE1C09AEC0002F10E2 /* LookOnLineDetailViewController.m */; };
84CF0F1E1BE9B40400C855CE /* InspectDetailFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CF0F1D1BE9B40400C855CE /* InspectDetailFooterView.m */; }; 84CF0F1E1BE9B40400C855CE /* InspectDetailFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CF0F1D1BE9B40400C855CE /* InspectDetailFooterView.m */; };
84CF0FA21BE9EDA900C855CE /* TakePhotoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CF0FA11BE9EDA900C855CE /* TakePhotoView.m */; }; 84CF0FA21BE9EDA900C855CE /* TakePhotoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84CF0FA11BE9EDA900C855CE /* TakePhotoView.m */; };
84D3E5F01C04BC8C001FF1DD /* InspectUploadedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D3E5EF1C04BC8C001FF1DD /* InspectUploadedViewController.m */; }; 84D3E5F01C04BC8C001FF1DD /* InspectUploadedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D3E5EF1C04BC8C001FF1DD /* InspectUploadedViewController.m */; };
...@@ -138,6 +144,8 @@ ...@@ -138,6 +144,8 @@
841D24FA1BEB75CA0005CC9F /* QuestionDetailFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionDetailFooterView.m; sourceTree = "<group>"; }; 841D24FA1BEB75CA0005CC9F /* QuestionDetailFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionDetailFooterView.m; sourceTree = "<group>"; };
842547FA1BF03977006C79C5 /* QuestionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuestionModel.h; sourceTree = "<group>"; }; 842547FA1BF03977006C79C5 /* QuestionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuestionModel.h; sourceTree = "<group>"; };
842547FB1BF03977006C79C5 /* QuestionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionModel.m; sourceTree = "<group>"; }; 842547FB1BF03977006C79C5 /* QuestionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuestionModel.m; sourceTree = "<group>"; };
843D1B9C1C0B3F7600E30002 /* SpotCheckOnLineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpotCheckOnLineViewController.h; sourceTree = "<group>"; };
843D1B9D1C0B3F7600E30002 /* SpotCheckOnLineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpotCheckOnLineViewController.m; sourceTree = "<group>"; };
8442BA5A1BDB8FDB005E5657 /* MineTableHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineTableHeaderView.h; sourceTree = "<group>"; }; 8442BA5A1BDB8FDB005E5657 /* MineTableHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineTableHeaderView.h; sourceTree = "<group>"; };
8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineTableHeaderView.m; sourceTree = "<group>"; }; 8442BA5B1BDB8FDB005E5657 /* MineTableHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineTableHeaderView.m; sourceTree = "<group>"; };
846206B31C06AF700015C456 /* RankListHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankListHeaderView.h; sourceTree = "<group>"; }; 846206B31C06AF700015C456 /* RankListHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RankListHeaderView.h; sourceTree = "<group>"; };
...@@ -211,6 +219,12 @@ ...@@ -211,6 +219,12 @@
84970E3F1BD9127A00C1728A /* Constant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = "<group>"; }; 84970E3F1BD9127A00C1728A /* Constant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = "<group>"; };
8497B6291C043671007ECBE6 /* InspectTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectTableView.h; sourceTree = "<group>"; }; 8497B6291C043671007ECBE6 /* InspectTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectTableView.h; sourceTree = "<group>"; };
8497B62A1C043671007ECBE6 /* InspectTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectTableView.m; sourceTree = "<group>"; }; 8497B62A1C043671007ECBE6 /* InspectTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectTableView.m; sourceTree = "<group>"; };
84A673861C0B50B4000F828E /* OnLineCompleteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnLineCompleteViewController.h; sourceTree = "<group>"; };
84A673871C0B50B4000F828E /* OnLineCompleteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnLineCompleteViewController.m; sourceTree = "<group>"; };
84A673891C0B54A6000F828E /* OnLineCompleteHeadView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnLineCompleteHeadView.h; sourceTree = "<group>"; };
84A6738A1C0B54A6000F828E /* OnLineCompleteHeadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnLineCompleteHeadView.m; sourceTree = "<group>"; };
84A6738C1C0BE2D0000F828E /* OnLineCompleteCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OnLineCompleteCell.h; sourceTree = "<group>"; };
84A6738D1C0BE2D0000F828E /* OnLineCompleteCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OnLineCompleteCell.m; sourceTree = "<group>"; };
84AD4F1E1BF425AC00BFB37C /* InspectDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectDetailView.h; sourceTree = "<group>"; }; 84AD4F1E1BF425AC00BFB37C /* InspectDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectDetailView.h; sourceTree = "<group>"; };
84AD4F1F1BF425AC00BFB37C /* InspectDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectDetailView.m; sourceTree = "<group>"; }; 84AD4F1F1BF425AC00BFB37C /* InspectDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectDetailView.m; sourceTree = "<group>"; };
84AD4F211BF42F8E00BFB37C /* classfiy.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = classfiy.plist; sourceTree = "<group>"; }; 84AD4F211BF42F8E00BFB37C /* classfiy.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = classfiy.plist; sourceTree = "<group>"; };
...@@ -256,6 +270,10 @@ ...@@ -256,6 +270,10 @@
84CC34DE1C0953C3002F10E2 /* HandOutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HandOutViewController.m; sourceTree = "<group>"; }; 84CC34DE1C0953C3002F10E2 /* HandOutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HandOutViewController.m; sourceTree = "<group>"; };
84CC34E01C09583D002F10E2 /* LookOnLineTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookOnLineTableViewCell.h; sourceTree = "<group>"; }; 84CC34E01C09583D002F10E2 /* LookOnLineTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookOnLineTableViewCell.h; sourceTree = "<group>"; };
84CC34E11C09583D002F10E2 /* LookOnLineTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LookOnLineTableViewCell.m; sourceTree = "<group>"; }; 84CC34E11C09583D002F10E2 /* LookOnLineTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LookOnLineTableViewCell.m; sourceTree = "<group>"; };
84CC34EA1C09AD98002F10E2 /* LookOnLineDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookOnLineDetailView.h; sourceTree = "<group>"; };
84CC34EB1C09AD98002F10E2 /* LookOnLineDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LookOnLineDetailView.m; sourceTree = "<group>"; };
84CC34ED1C09AEC0002F10E2 /* LookOnLineDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookOnLineDetailViewController.h; sourceTree = "<group>"; };
84CC34EE1C09AEC0002F10E2 /* LookOnLineDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LookOnLineDetailViewController.m; sourceTree = "<group>"; };
84CF0F1C1BE9B40400C855CE /* InspectDetailFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectDetailFooterView.h; sourceTree = "<group>"; }; 84CF0F1C1BE9B40400C855CE /* InspectDetailFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectDetailFooterView.h; sourceTree = "<group>"; };
84CF0F1D1BE9B40400C855CE /* InspectDetailFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectDetailFooterView.m; sourceTree = "<group>"; }; 84CF0F1D1BE9B40400C855CE /* InspectDetailFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectDetailFooterView.m; sourceTree = "<group>"; };
84CF0FA01BE9EDA900C855CE /* TakePhotoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TakePhotoView.h; sourceTree = "<group>"; }; 84CF0FA01BE9EDA900C855CE /* TakePhotoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TakePhotoView.h; sourceTree = "<group>"; };
...@@ -479,6 +497,9 @@ ...@@ -479,6 +497,9 @@
8426A4A41BDF0CD600E5FDF5 /* OnLine */ = { 8426A4A41BDF0CD600E5FDF5 /* OnLine */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
84A673821C0B4D3B000F828E /* OnLineTaskComplete */,
843D1B991C0B3F6200E30002 /* SpotCheckOnLine */,
84CC34E31C09AD58002F10E2 /* LookOnLineDetail */,
84CC34BE1C093C2F002F10E2 /* AddOnLine */, 84CC34BE1C093C2F002F10E2 /* AddOnLine */,
84CC34C81C093C2F002F10E2 /* LookOnLine */, 84CC34C81C093C2F002F10E2 /* LookOnLine */,
); );
...@@ -541,6 +562,31 @@ ...@@ -541,6 +562,31 @@
path = WordOfMouth; path = WordOfMouth;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
843D1B991C0B3F6200E30002 /* SpotCheckOnLine */ = {
isa = PBXGroup;
children = (
843D1B9A1C0B3F6200E30002 /* View */,
843D1B9B1C0B3F6200E30002 /* ViewController */,
);
path = SpotCheckOnLine;
sourceTree = "<group>";
};
843D1B9A1C0B3F6200E30002 /* View */ = {
isa = PBXGroup;
children = (
);
path = View;
sourceTree = "<group>";
};
843D1B9B1C0B3F6200E30002 /* ViewController */ = {
isa = PBXGroup;
children = (
843D1B9C1C0B3F7600E30002 /* SpotCheckOnLineViewController.h */,
843D1B9D1C0B3F7600E30002 /* SpotCheckOnLineViewController.m */,
);
path = ViewController;
sourceTree = "<group>";
};
846206B21C06AF700015C456 /* View */ = { 846206B21C06AF700015C456 /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1023,6 +1069,43 @@ ...@@ -1023,6 +1069,43 @@
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
84A673821C0B4D3B000F828E /* OnLineTaskComplete */ = {
isa = PBXGroup;
children = (
84A673831C0B4D3B000F828E /* Cell */,
84A673841C0B4D3B000F828E /* View */,
84A673851C0B4D3B000F828E /* ViewController */,
);
path = OnLineTaskComplete;
sourceTree = "<group>";
};
84A673831C0B4D3B000F828E /* Cell */ = {
isa = PBXGroup;
children = (
84A6738C1C0BE2D0000F828E /* OnLineCompleteCell.h */,
84A6738D1C0BE2D0000F828E /* OnLineCompleteCell.m */,
);
path = Cell;
sourceTree = "<group>";
};
84A673841C0B4D3B000F828E /* View */ = {
isa = PBXGroup;
children = (
84A673891C0B54A6000F828E /* OnLineCompleteHeadView.h */,
84A6738A1C0B54A6000F828E /* OnLineCompleteHeadView.m */,
);
path = View;
sourceTree = "<group>";
};
84A673851C0B4D3B000F828E /* ViewController */ = {
isa = PBXGroup;
children = (
84A673861C0B50B4000F828E /* OnLineCompleteViewController.h */,
84A673871C0B50B4000F828E /* OnLineCompleteViewController.m */,
);
path = ViewController;
sourceTree = "<group>";
};
84AD4F1D1BF4257C00BFB37C /* View */ = { 84AD4F1D1BF4257C00BFB37C /* View */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1251,6 +1334,41 @@ ...@@ -1251,6 +1334,41 @@
path = ViewController; path = ViewController;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
84CC34E31C09AD58002F10E2 /* LookOnLineDetail */ = {
isa = PBXGroup;
children = (
84CC34E41C09AD58002F10E2 /* Cell */,
84CC34E51C09AD58002F10E2 /* View */,
84CC34E61C09AD58002F10E2 /* ViewController */,
);
path = LookOnLineDetail;
sourceTree = "<group>";
};
84CC34E41C09AD58002F10E2 /* Cell */ = {
isa = PBXGroup;
children = (
);
path = Cell;
sourceTree = "<group>";
};
84CC34E51C09AD58002F10E2 /* View */ = {
isa = PBXGroup;
children = (
84CC34EA1C09AD98002F10E2 /* LookOnLineDetailView.h */,
84CC34EB1C09AD98002F10E2 /* LookOnLineDetailView.m */,
);
path = View;
sourceTree = "<group>";
};
84CC34E61C09AD58002F10E2 /* ViewController */ = {
isa = PBXGroup;
children = (
84CC34ED1C09AEC0002F10E2 /* LookOnLineDetailViewController.h */,
84CC34EE1C09AEC0002F10E2 /* LookOnLineDetailViewController.m */,
);
path = ViewController;
sourceTree = "<group>";
};
84CF0ECA1BE9A7EF00C855CE /* InspectDetail */ = { 84CF0ECA1BE9A7EF00C855CE /* InspectDetail */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1699,6 +1817,7 @@ ...@@ -1699,6 +1817,7 @@
84970E361BD8E09D00C1728A /* LoginViewController.m in Sources */, 84970E361BD8E09D00C1728A /* LoginViewController.m in Sources */,
84720BC11C0377D300314099 /* CommentWithStarView.m in Sources */, 84720BC11C0377D300314099 /* CommentWithStarView.m in Sources */,
846206B81C06AFCA0015C456 /* RankCommentModel.m in Sources */, 846206B81C06AFCA0015C456 /* RankCommentModel.m in Sources */,
84A6738E1C0BE2D0000F828E /* OnLineCompleteCell.m in Sources */,
84CC34D41C094476002F10E2 /* StandardViewController.m in Sources */, 84CC34D41C094476002F10E2 /* StandardViewController.m in Sources */,
84FD8A0A1BDA01D1006E442A /* MineViewController.m in Sources */, 84FD8A0A1BDA01D1006E442A /* MineViewController.m in Sources */,
848699B21BDF810900859DFE /* InspectListViewController.m in Sources */, 848699B21BDF810900859DFE /* InspectListViewController.m in Sources */,
...@@ -1714,12 +1833,14 @@ ...@@ -1714,12 +1833,14 @@
8474C5951BE78AE1007DCF19 /* QuestionDetailViewController.m in Sources */, 8474C5951BE78AE1007DCF19 /* QuestionDetailViewController.m in Sources */,
84FD8A071BDA01C4006E442A /* ChartViewController.m in Sources */, 84FD8A071BDA01C4006E442A /* ChartViewController.m in Sources */,
84970DEF1BD8DD8A00C1728A /* main.m in Sources */, 84970DEF1BD8DD8A00C1728A /* main.m in Sources */,
84A6738B1C0B54A6000F828E /* OnLineCompleteHeadView.m in Sources */,
8474A01C1BE368D700315F30 /* HomeCellItem.m in Sources */, 8474A01C1BE368D700315F30 /* HomeCellItem.m in Sources */,
84CC34D11C093C5E002F10E2 /* LookOnLineViewController.m in Sources */, 84CC34D11C093C5E002F10E2 /* LookOnLineViewController.m in Sources */,
84D8257F1BDD2F7E00CC61F7 /* MineTableFooterView.m in Sources */, 84D8257F1BDD2F7E00CC61F7 /* MineTableFooterView.m in Sources */,
84F57C501BEC7AA300DDEEB1 /* AddQuestionFooterView.m in Sources */, 84F57C501BEC7AA300DDEEB1 /* AddQuestionFooterView.m in Sources */,
84CF0F1E1BE9B40400C855CE /* InspectDetailFooterView.m in Sources */, 84CF0F1E1BE9B40400C855CE /* InspectDetailFooterView.m in Sources */,
84F30DA41BFC19F200CBAD13 /* RankListModel.m in Sources */, 84F30DA41BFC19F200CBAD13 /* RankListModel.m in Sources */,
84CC34EF1C09AEC0002F10E2 /* LookOnLineDetailViewController.m in Sources */,
8487D8091BF20FAD00E63E90 /* TaxisView.m in Sources */, 8487D8091BF20FAD00E63E90 /* TaxisView.m in Sources */,
84AD4F361BF45BEB00BFB37C /* InspectSortTableCell.m in Sources */, 84AD4F361BF45BEB00BFB37C /* InspectSortTableCell.m in Sources */,
84970E281BD8DEFE00C1728A /* AppDelegate.m in Sources */, 84970E281BD8DEFE00C1728A /* AppDelegate.m in Sources */,
...@@ -1731,6 +1852,7 @@ ...@@ -1731,6 +1852,7 @@
848699B31BDF810900859DFE /* InspectTaskViewController.m in Sources */, 848699B31BDF810900859DFE /* InspectTaskViewController.m in Sources */,
84AD4F321BF443E700BFB37C /* InspectDetailHeaderView.m in Sources */, 84AD4F321BF443E700BFB37C /* InspectDetailHeaderView.m in Sources */,
84CC34D81C094682002F10E2 /* StandardTableViewCell.m in Sources */, 84CC34D81C094682002F10E2 /* StandardTableViewCell.m in Sources */,
84CC34EC1C09AD98002F10E2 /* LookOnLineDetailView.m in Sources */,
84E420471BE88AE000689976 /* RootTabBarController.m in Sources */, 84E420471BE88AE000689976 /* RootTabBarController.m in Sources */,
84D3E5F01C04BC8C001FF1DD /* InspectUploadedViewController.m in Sources */, 84D3E5F01C04BC8C001FF1DD /* InspectUploadedViewController.m in Sources */,
8487D80C1BF218F900E63E90 /* MenuView.m in Sources */, 8487D80C1BF218F900E63E90 /* MenuView.m in Sources */,
...@@ -1754,6 +1876,7 @@ ...@@ -1754,6 +1876,7 @@
84D3E5F31C04BCD3001FF1DD /* InspectNotUploadViewController.m in Sources */, 84D3E5F31C04BCD3001FF1DD /* InspectNotUploadViewController.m in Sources */,
84D3E5F91C04BD8E001FF1DD /* InspectNotUpLoadCell.m in Sources */, 84D3E5F91C04BD8E001FF1DD /* InspectNotUpLoadCell.m in Sources */,
84ECCF181C01FA2600EA4960 /* QuestionDetailModel.m in Sources */, 84ECCF181C01FA2600EA4960 /* QuestionDetailModel.m in Sources */,
843D1B9E1C0B3F7600E30002 /* SpotCheckOnLineViewController.m in Sources */,
84846E9A1BE07CDF0010550A /* RankingListCell.m in Sources */, 84846E9A1BE07CDF0010550A /* RankingListCell.m in Sources */,
848699B61BDF812F00859DFE /* RankingListViewController.m in Sources */, 848699B61BDF812F00859DFE /* RankingListViewController.m in Sources */,
84D825821BDD35E000CC61F7 /* HomeHeaderView.m in Sources */, 84D825821BDD35E000CC61F7 /* HomeHeaderView.m in Sources */,
...@@ -1767,6 +1890,7 @@ ...@@ -1767,6 +1890,7 @@
84CC34E21C09583D002F10E2 /* LookOnLineTableViewCell.m in Sources */, 84CC34E21C09583D002F10E2 /* LookOnLineTableViewCell.m in Sources */,
84DAB3F61C0802FD00F3E416 /* FuncItem.m in Sources */, 84DAB3F61C0802FD00F3E416 /* FuncItem.m in Sources */,
84D3E6021C04DA85001FF1DD /* InspectUpLoadFootView.m in Sources */, 84D3E6021C04DA85001FF1DD /* InspectUpLoadFootView.m in Sources */,
84A673881C0B50B4000F828E /* OnLineCompleteViewController.m in Sources */,
8474C5991BE78BBC007DCF19 /* QuestionDetailCell.m in Sources */, 8474C5991BE78BBC007DCF19 /* QuestionDetailCell.m in Sources */,
8474C5911BE78A85007DCF19 /* QuestionListTableCell.m in Sources */, 8474C5911BE78A85007DCF19 /* QuestionListTableCell.m in Sources */,
8490C4D71BF9DF1D006B6569 /* PictureStoryViewController.m in Sources */, 8490C4D71BF9DF1D006B6569 /* PictureStoryViewController.m in Sources */,
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "excellent_case@2x.png", "filename" : "口碑巡检_功能一览@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "excellent_case@3x.png", "filename" : "口碑巡检_功能一览@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "task_05@2x.png", "filename" : "口碑巡检_首页@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "task_05@3x.png", "filename" : "口碑巡检_首页@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "task_06@2x.png", "filename" : "task_07@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "task_06@3x.png", "filename" : "task_07@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "task_07@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "task_07@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#define kDetailSmallTitleColor [UIColor colorWithRed:153 / 255.0 green:153 / 255.0 blue:153 / 255.0 alpha:1.0] #define kDetailSmallTitleColor [UIColor colorWithRed:153 / 255.0 green:153 / 255.0 blue:153 / 255.0 alpha:1.0]
// #444444 // #444444
#define kDetailBigTitleColor [UIColor colorWithRed:68 / 255.0 green:68 / 255.0 blue:68 / 255.0 alpha:1.0] #define kDetailBigTitleColor [UIColor colorWithRed:68 / 255.0 green:68 / 255.0 blue:68 / 255.0 alpha:1.0]
#define kOnLineCompleteHeaderTextColor [UIColor colorWithRed:80 / 255.0 green:80 / 255.0 blue:80 / 255.0 alpha:1.0]
// InspectList // InspectList
......
...@@ -15,5 +15,6 @@ ...@@ -15,5 +15,6 @@
@property (nonatomic, strong) FuncItem *standardBtn; // 口碑标准按钮 @property (nonatomic, strong) FuncItem *standardBtn; // 口碑标准按钮
@property (nonatomic, strong) FuncItem *pictureBtn; // 图说口碑按钮 @property (nonatomic, strong) FuncItem *pictureBtn; // 图说口碑按钮
@property (nonatomic, strong) FuncItem *questionBtn; // 问题与知识按钮 @property (nonatomic, strong) FuncItem *questionBtn; // 问题与知识按钮
@property (nonatomic, strong) FuncItem *caseBtn; // 优秀案例按钮 @property (nonatomic, strong) FuncItem *rankBtn; // 口碑排名按钮
@end @end
...@@ -47,8 +47,9 @@ ...@@ -47,8 +47,9 @@
[self.standardBtn setTitle:@"口碑标准" forState:UIControlStateNormal]; [self.standardBtn setTitle:@"口碑标准" forState:UIControlStateNormal];
[self.pictureBtn setTitle:@"图说口碑" forState:UIControlStateNormal]; [self.pictureBtn setTitle:@"图说口碑" forState:UIControlStateNormal];
[self.questionBtn setTitle:@"问题与知识" forState:UIControlStateNormal]; [self.questionBtn setTitle:@"问题与知识" forState:UIControlStateNormal];
[self.caseBtn setTitle:@"优秀案例" forState:UIControlStateNormal]; [self.rankBtn setTitle:@"口碑排名" forState:UIControlStateNormal];
self.lineView.backgroundColor = kSeparateLineViewColor;
//self.lineView.backgroundColor = kSeparateLineViewColor;
} }
...@@ -69,7 +70,7 @@ ...@@ -69,7 +70,7 @@
} else if ([item.titleLabel.text isEqualToString:@"问题与知识"]) { } else if ([item.titleLabel.text isEqualToString:@"问题与知识"]) {
QuestionViewController *questionVC = [[QuestionViewController alloc] init]; QuestionViewController *questionVC = [[QuestionViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:questionVC]; nav = [[UINavigationController alloc] initWithRootViewController:questionVC];
} else if ([item.titleLabel.text isEqualToString:@"优秀案例"]) { } else if ([item.titleLabel.text isEqualToString:@"口碑排名"]) {
RankingListViewController *rankingListVC = [[RankingListViewController alloc] init]; RankingListViewController *rankingListVC = [[RankingListViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:rankingListVC]; nav = [[UINavigationController alloc] initWithRootViewController:rankingListVC];
} else { } else {
...@@ -205,10 +206,10 @@ ...@@ -205,10 +206,10 @@
[self.view addSubview:_questionBtn]; [self.view addSubview:_questionBtn];
NSLayoutConstraint *questionWidth = [NSLayoutConstraint constraintWithItem:_questionBtn attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.caseBtn attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0]; NSLayoutConstraint *questionWidth = [NSLayoutConstraint constraintWithItem:_questionBtn attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.rankBtn attribute:NSLayoutAttributeWidth multiplier:1.0 constant:0];
[self.view addConstraint:questionWidth]; [self.view addConstraint:questionWidth];
NSLayoutConstraint *questionRight = [NSLayoutConstraint constraintWithItem:_questionBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.caseBtn attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; NSLayoutConstraint *questionRight = [NSLayoutConstraint constraintWithItem:_questionBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.rankBtn attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.view addConstraint:questionRight]; [self.view addConstraint:questionRight];
NSLayoutConstraint *questionTop = [NSLayoutConstraint constraintWithItem:_questionBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_pictureBtn attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; NSLayoutConstraint *questionTop = [NSLayoutConstraint constraintWithItem:_questionBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_pictureBtn attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
...@@ -220,27 +221,27 @@ ...@@ -220,27 +221,27 @@
return _questionBtn; return _questionBtn;
} }
- (FuncItem *)caseBtn - (FuncItem *)rankBtn
{ {
if (!_caseBtn) { if (!_rankBtn) {
_caseBtn = [[FuncItem alloc] init]; _rankBtn = [[FuncItem alloc] init];
[_caseBtn setImage:[UIImage imageNamed:@"task_005"] forState:UIControlStateNormal]; [_rankBtn setImage:[UIImage imageNamed:@"task_005"] forState:UIControlStateNormal];
_caseBtn.translatesAutoresizingMaskIntoConstraints = NO; _rankBtn.translatesAutoresizingMaskIntoConstraints = NO;
[_caseBtn addTarget:self action:@selector(itemClick:) forControlEvents:UIControlEventTouchUpInside]; [_rankBtn addTarget:self action:@selector(itemClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:_caseBtn]; [self.view addSubview:_rankBtn];
NSLayoutConstraint *caseTop = [NSLayoutConstraint constraintWithItem:_caseBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_questionBtn attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; NSLayoutConstraint *caseTop = [NSLayoutConstraint constraintWithItem:_rankBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_questionBtn attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.view addConstraint:caseTop]; [self.view addConstraint:caseTop];
NSLayoutConstraint *caseRight = [NSLayoutConstraint constraintWithItem:_caseBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; NSLayoutConstraint *caseRight = [NSLayoutConstraint constraintWithItem:_rankBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.view addConstraint:caseRight]; [self.view addConstraint:caseRight];
NSLayoutConstraint *caseHeight = [NSLayoutConstraint constraintWithItem:_caseBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:_questionBtn attribute:NSLayoutAttributeHeight multiplier:1.0 constant:0]; NSLayoutConstraint *caseHeight = [NSLayoutConstraint constraintWithItem:_rankBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:_questionBtn attribute:NSLayoutAttributeHeight multiplier:1.0 constant:0];
[self.view addConstraint:caseHeight]; [self.view addConstraint:caseHeight];
} }
return _caseBtn; return _rankBtn;
} }
- (UIView *)lineView - (UIView *)lineView
...@@ -256,7 +257,7 @@ ...@@ -256,7 +257,7 @@
NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; NSLayoutConstraint *lineViewRight = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.view addConstraint:lineViewRight]; [self.view addConstraint:lineViewRight];
NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.caseBtn attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; NSLayoutConstraint *lineViewTop = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.rankBtn attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.view addConstraint:lineViewTop]; [self.view addConstraint:lineViewTop];
NSLayoutConstraint *lineViewHeight = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:1]; NSLayoutConstraint *lineViewHeight = [NSLayoutConstraint constraintWithItem:_lineView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:1];
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#import "OnLineViewController.h" #import "OnLineViewController.h"
#import "OnLineTableViewCell.h" #import "OnLineTableViewCell.h"
#import "OnLineFooterView.h" #import "OnLineFooterView.h"
#import "SpotCheckOnLineViewController.h"
#define kOnLineTableViewCell @"onlineTableViewCell" #define kOnLineTableViewCell @"onlineTableViewCell"
...@@ -47,7 +48,10 @@ ...@@ -47,7 +48,10 @@
-(void)doBack:(id)sender -(void)doBack:(id)sender
{ {
[self.navigationController dismissViewControllerAnimated:YES completion:nil]; if ([[self.navigationController.viewControllers objectAtIndex:0] isKindOfClass:[SpotCheckOnLineViewController class]]) {
SpotCheckOnLineViewController *spotCheckVC = (SpotCheckOnLineViewController *)[self.navigationController.viewControllers objectAtIndex:0];
[self.navigationController popToViewController:spotCheckVC animated:YES];
}
} }
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#import "MenuView.h" #import "MenuView.h"
#import "LookOnLineTableViewCell.h" #import "LookOnLineTableViewCell.h"
#import "LookOnLineDetailViewController.h"
#define kLookOnLineCell @"LookOnLineTableViewCell" #define kLookOnLineCell @"LookOnLineTableViewCell"
@interface LookOnLineViewController ()<UITableViewDelegate, UITableViewDataSource,ScreenTableDelegate, TaxisViewDelegate, InspectTableViewDelegate> @interface LookOnLineViewController ()<UITableViewDelegate, UITableViewDataSource,ScreenTableDelegate, TaxisViewDelegate, InspectTableViewDelegate>
...@@ -288,7 +290,8 @@ ...@@ -288,7 +290,8 @@
// cell的点击事件 // cell的点击事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
LookOnLineDetailViewController *lookDetailVC = [[LookOnLineDetailViewController alloc] init];
[self.navigationController pushViewController:lookDetailVC animated:YES];
} }
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
......
//
// LookOnLineDetailView.h
// redstar
//
// Created by admin on 15/11/28.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LookOnLineDetailView : UIView
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIView *bgView;
@property (nonatomic, strong) UILabel *shopnameLabel; // 商店名称
@property (nonatomic, strong) UILabel *overDateLabel; // 截止时间
@property (nonatomic, strong) UILabel *peopleLabel; // 发起人
@property (nonatomic, strong) UILabel *startDateLabel; // 起始时间
@property (nonatomic, strong) UILabel *taskContentLabel; // 起始时间
@property (nonatomic, strong) UILabel *dayLabel; // 剩余天数
@end
//
// LookOnLineDetailView.m
// redstar
//
// Created by admin on 15/11/28.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "LookOnLineDetailView.h"
@interface LookOnLineDetailView ()
@property (nonatomic, strong) UILabel *shopname; // 商店名称
@property (nonatomic, strong) UILabel *overDate; // 截止时间
@property (nonatomic, strong) UILabel *people; // 截止时间
@property (nonatomic, strong) UILabel *startDate; // 起始时间
@property (nonatomic, strong) UILabel *taskContent; // 起始时间
@property (nonatomic, strong) UILabel *surplus; // 剩余
@property (nonatomic, strong) UILabel *day; // 天
@property (nonatomic, strong) UIImageView *number; // 天
@end
@implementation LookOnLineDetailView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self setup];
}
return self;
}
- (void)setup
{
self.bgView.backgroundColor = [UIColor whiteColor];
self.shopname.text = @"商场名称";
self.overDate.text = @"截止时间";
self.people.text = @"发起人";
self.startDate.text = @"发起时间";
self.taskContent.text = @"任务内容";
self.shopnameLabel.text = @"上海真北店";
self.overDateLabel.text = @"2015-10-03";
self.peopleLabel.text = @"王XX 集团X领导";
self.startDateLabel.text = @"2015-09-30 12:20:12";
NSString *intro = @"1.大厅促销标语、彩旗拍照不少于3张; 2.促销人员着装拍照不少于4张; 3.大厅促销站台拍照不少于3张。";
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:intro];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:5];
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, intro.length)];
[self.taskContentLabel setAttributedText:attributedString];
self.day.text = @"天";
self.number.image = [UIImage imageNamed:@"figure_bg"];
self.surplus.text = @"剩余";
self.dayLabel.text = @"2";
}
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.textColor = kAnnounceTextColor;
_titleLabel.backgroundColor = kSectionBackGroundColor;
_titleLabel.font = [UIFont systemFontOfSize:18.0];
[self addSubview:_titleLabel];
NSLayoutConstraint *titleLabelTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self addConstraint:titleLabelTop];
NSLayoutConstraint *titleLabelLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self addConstraint:titleLabelLeft];
NSLayoutConstraint *titleLabelWidth = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self addConstraint:titleLabelWidth];
NSLayoutConstraint *titleLabelHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:46];
[self addConstraint:titleLabelHeight];
}
return _titleLabel;
}
- (UIView *)bgView
{
if (!_bgView) {
_bgView = [[UIView alloc] init];
_bgView.translatesAutoresizingMaskIntoConstraints = NO;
_bgView.layer.borderWidth = 0.5;
_bgView.layer.borderColor = kSeparateLineCGColor;
[self addSubview:_bgView];
NSLayoutConstraint *titleLabelTop = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:titleLabelTop];
NSLayoutConstraint *titleLabelLeft = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self addConstraint:titleLabelLeft];
NSLayoutConstraint *titleLabelWidth = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self addConstraint:titleLabelWidth];
NSLayoutConstraint *titleLabelBottom = [NSLayoutConstraint constraintWithItem:_bgView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:titleLabelBottom];
}
return _bgView;
}
- (UILabel *)shopname
{
if (!_shopname) {
_shopname = [[UILabel alloc] init];
_shopname.font = [UIFont systemFontOfSize:15.0];
_shopname.textColor = kLightGray;
_shopname.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_shopname];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_shopname attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeTop multiplier:1.0 constant:10];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_shopname attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_shopname attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self.bgView addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_shopname attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _shopname;
}
- (UILabel *)overDate
{
if (!_overDate) {
_overDate = [[UILabel alloc] init];
_overDate.font = [UIFont systemFontOfSize:15.0];
_overDate.textColor = kLightGray;
_overDate.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_overDate];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.shopname attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self.bgView addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _overDate;
}
- (UILabel *)people
{
if (!_people) {
_people = [[UILabel alloc] init];
_people.font = [UIFont systemFontOfSize:15.0];
_people.textColor = kLightGray;
_people.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_people];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_people attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.overDate attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_people attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_people attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self.bgView addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_people attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _people;
}
- (UILabel *)startDate
{
if (!_startDate) {
_startDate = [[UILabel alloc] init];
_startDate.font = [UIFont systemFontOfSize:15.0];
_startDate.textColor = kLightGray;
_startDate.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_startDate];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.people attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self.bgView addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _startDate;
}
- (UILabel *)taskContent
{
if (!_taskContent) {
_taskContent = [[UILabel alloc] init];
_taskContent.font = [UIFont systemFontOfSize:15.0];
_taskContent.textColor = kLightGray;
_taskContent.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_taskContent];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.startDate attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self.bgView addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _taskContent;
}
- (UILabel *)shopnameLabel
{
if (!_shopnameLabel) {
_shopnameLabel = [[UILabel alloc] init];
_shopnameLabel.font = [UIFont systemFontOfSize:15.0];
_shopnameLabel.textColor = kLightBlack;
_shopnameLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_shopnameLabel];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_shopnameLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeTop multiplier:1.0 constant:10];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_shopnameLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.shopname attribute:NSLayoutAttributeRight multiplier:1.0 constant:15];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_shopnameLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _shopnameLabel;
}
- (UILabel *)day
{
if (!_day) {
_day = [[UILabel alloc] init];
_day.font = [UIFont systemFontOfSize:15.0];
_day.textColor = kLightBlack;
_day.textAlignment = NSTextAlignmentCenter;
_day.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_day];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_day attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.shopnameLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_day attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.bgView addConstraint:Right];
NSLayoutConstraint *width = [NSLayoutConstraint constraintWithItem:_day attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_day attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _day;
}
- (UIImageView *)number
{
if (!_number) {
_number = [[UIImageView alloc] init];
_number.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_number];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_number attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.shopnameLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_number attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.day attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.bgView addConstraint:Right];
NSLayoutConstraint *width = [NSLayoutConstraint constraintWithItem:_number attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:26];
[self.bgView addConstraint:width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_number attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _number;
}
- (UILabel *)surplus
{
if (!_surplus) {
_surplus = [[UILabel alloc] init];
_surplus.font = [UIFont systemFontOfSize:15.0];
_surplus.textColor = kLightBlack;
_surplus.textAlignment = NSTextAlignmentCenter;
_surplus.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_surplus];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_surplus attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.shopnameLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_surplus attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.number attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.bgView addConstraint:Right];
NSLayoutConstraint *width = [NSLayoutConstraint constraintWithItem:_surplus attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:40];
[self.bgView addConstraint:width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_surplus attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _surplus;
}
- (UILabel *)overDateLabel
{
if (!_overDateLabel) {
_overDateLabel = [[UILabel alloc] init];
_overDateLabel.font = [UIFont systemFontOfSize:15.0];
_overDateLabel.textColor = kLightBlack;
_overDateLabel.textAlignment = NSTextAlignmentLeft;
_overDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_overDateLabel];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_overDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.shopnameLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_overDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:100];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_overDateLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _overDateLabel;
}
- (UILabel *)peopleLabel
{
if (!_peopleLabel) {
_peopleLabel = [[UILabel alloc] init];
_peopleLabel.font = [UIFont systemFontOfSize:15.0];
_peopleLabel.textColor = kLightBlack;
_peopleLabel.textAlignment = NSTextAlignmentLeft;
_peopleLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_peopleLabel];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.overDateLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:100];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.bgView addConstraint:Right];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_peopleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _peopleLabel;
}
- (UILabel *)startDateLabel
{
if (!_startDateLabel) {
_startDateLabel = [[UILabel alloc] init];
_startDateLabel.font = [UIFont systemFontOfSize:15.0];
_startDateLabel.textColor = kLightBlack;
_startDateLabel.textAlignment = NSTextAlignmentLeft;
_startDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.bgView addSubview:_startDateLabel];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_startDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.peopleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_startDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:100];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_startDateLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.bgView addConstraint:Right];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_startDateLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.bgView addConstraint:Height];
}
return _startDateLabel;
}
- (UILabel *)taskContentLabel
{
if (!_taskContentLabel) {
_taskContentLabel = [[UILabel alloc] init];
_taskContentLabel.font = [UIFont systemFontOfSize:15.0];
_taskContentLabel.textColor = kLightBlack;
_taskContentLabel.textAlignment = NSTextAlignmentLeft;
_taskContentLabel.translatesAutoresizingMaskIntoConstraints = NO;
_taskContentLabel.numberOfLines = 0;
[self.bgView addSubview:_taskContentLabel];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_taskContentLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.startDateLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:10];
[self.bgView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_taskContentLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:100];
[self.bgView addConstraint:Left];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_taskContentLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.bgView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.bgView addConstraint:Right];
}
return _taskContentLabel;
}
- (UILabel *)dayLabel
{
if (!_dayLabel) {
_dayLabel = [[UILabel alloc] init];
_dayLabel.translatesAutoresizingMaskIntoConstraints = NO;
_dayLabel.textColor = kProgressUnSettledColor;
_dayLabel.textAlignment = NSTextAlignmentCenter;
_dayLabel.font = [UIFont boldSystemFontOfSize:20.0];
[self.number addSubview:_dayLabel];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_dayLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.number attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.number addConstraint:overDateTop];
NSLayoutConstraint *overDateLeft = [NSLayoutConstraint constraintWithItem:_dayLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.number attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.number addConstraint:overDateLeft];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_dayLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.number attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.number addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint constraintWithItem:_dayLabel attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.number attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.number addConstraint:overDateHeight];
}
return _dayLabel;
}
@end
//
// LookOnLineDetailViewController.h
// redstar
//
// Created by admin on 15/11/28.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LookOnLineDetailViewController : UIViewController
@end
//
// LookOnLineDetailViewController.m
// redstar
//
// Created by admin on 15/11/28.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "LookOnLineDetailViewController.h"
#import "LookOnLineDetailView.h"
#define kLookOnLineDetailCell @"LookOnLineDetailCell"
@interface LookOnLineDetailViewController () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) LookOnLineDetailView *headerView;
@end
@implementation LookOnLineDetailViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self setNav];
self.tableView.delegate = self;
self.tableView.dataSource = self;
}
#pragma mark - Private Mothods
- (void)setNav
{
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = NO;
self.modalPresentationCapturesStatusBarAppearance = NO;
self.navigationController.navigationBar.translucent = NO;
}
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 30, 44);
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
UILabel *customLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 30)];
[customLab setTextColor:[UIColor whiteColor]];
[customLab setText:@"任务处理"];
customLab.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = customLab;
}
- (void)doBack:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - UITableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
}
// cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kLookOnLineDetailCell];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kLookOnLineDetailCell];
}
return cell;
}
#pragma mark - lazy loading
- (UITableView *)tableView
{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.translatesAutoresizingMaskIntoConstraints = NO;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.tableHeaderView = self.headerView;
[self.view addSubview:_tableView];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.view addConstraint:tableTop];
NSLayoutConstraint *tableLeft = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.view addConstraint:tableLeft];
NSLayoutConstraint *tableRight = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.view addConstraint:tableRight];
NSLayoutConstraint *tableBottom = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.view addConstraint:tableBottom];
}
return _tableView;
}
- (LookOnLineDetailView *)headerView
{
if (!_headerView) {
_headerView = [[LookOnLineDetailView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 255)];
_headerView.titleLabel.text = @"2015年十一促销临时抽查";
}
return _headerView;
}
@end
//
// OnLineCompleteCell.h
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OnLineCompleteCell : UITableViewCell
@property (nonatomic, strong) UIImageView *iconImageView;
@property (nonatomic, strong) UILabel *shopName;
@property (nonatomic, assign) int starNumber;
@property (nonatomic, strong) UILabel *reportTime;
@end
//
// OnLineCompleteCell.m
// redstar
//
// Created by admin on 15/11/30.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "OnLineCompleteCell.h"
@implementation OnLineCompleteCell
#pragma mark - System Methods
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self setup];
}
return self;
}
#pragma mark - Private Methods
- (void)setup
{
}
- (UIImageView *)iconImageView
{
if (!_iconImageView) {
_iconImageView = [[UIImageView alloc] init];
_iconImageView.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_iconImageView];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_iconImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeTop multiplier:1.0 constant:13];
[self.contentView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_iconImageView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self.contentView addConstraint:Left];
NSLayoutConstraint *width = [NSLayoutConstraint constraintWithItem:_iconImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:90];
[self.contentView addConstraint:width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_iconImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:64];
[self.contentView addConstraint:Height];
NSLayoutConstraint *Bottom = [NSLayoutConstraint constraintWithItem:_iconImageView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-13];
[self.contentView addConstraint:Bottom];
}
return _iconImageView;
}
- (UILabel *)shopName
{
if (!_shopName) {
_shopName = [[UILabel alloc] init];
_shopName.font = [UIFont systemFontOfSize:17.0];
_shopName.backgroundColor= [UIColor greenColor];
_shopName.textColor = kLightBlack;
_shopName.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_shopName];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_shopName attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:12];
[self.contentView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_shopName attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.iconImageView attribute:NSLayoutAttributeRight multiplier:1.0 constant:10];
[self.contentView addConstraint:Left];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_shopName attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:Right];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_shopName attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self.contentView addConstraint:Height];
}
return _shopName;
}
- (UILabel *)reportTime
{
if (!_reportTime) {
_reportTime = [[UILabel alloc] init];
_reportTime.font = [UIFont systemFontOfSize:13.0];
_reportTime.textColor = kLightGray;
_reportTime.textAlignment = NSTextAlignmentLeft;
_reportTime.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:_reportTime];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_reportTime attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.shopName attribute:NSLayoutAttributeBottom multiplier:1.0 constant:25];
[self.contentView addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_reportTime attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.iconImageView attribute:NSLayoutAttributeRight multiplier:1.0 constant:10];
[self.contentView addConstraint:Left];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_reportTime attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self.contentView addConstraint:Right];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_reportTime attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:20];
[self.contentView addConstraint:Height];
}
return _reportTime;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// OnLineCompleteHeadView.h
// redstar
//
// Created by admin on 15/11/29.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OnLineCompleteHeadView : UIView
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *startDateLabel; // 商店名称
@property (nonatomic, strong) UILabel *overDateLabel; // 截止时间
@property (nonatomic, strong) UILabel *taskContentLabel; // 发起人
@property (nonatomic, strong) UIButton *unfoldBtn; // 发起人
@property (nonatomic, strong) UIImageView *arrowImageView; // 发起人
@end
//
// OnLineCompleteHeadView.m
// redstar
//
// Created by admin on 15/11/29.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "OnLineCompleteHeadView.h"
@interface OnLineCompleteHeadView ()
@property (nonatomic, strong) UILabel *startDate; // 商店名称
@property (nonatomic, strong) UILabel *overDate; // 截止时间
@property (nonatomic, strong) UILabel *taskContent;
@end
@implementation OnLineCompleteHeadView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self setup];
}
return self;
}
- (void)setup
{
self.titleLabel.text = @"2015年十一促销临时抽查";
self.startDate.text = @"发起时间";
self.overDate.text = @"截止时间";
self.taskContent.text = @"任务内容";
self.startDateLabel.text = @"2015-09-30 12:20:12";
self.overDateLabel.text = @"2015-10-03";
self.unfoldBtn.titleLabel.font = [UIFont systemFontOfSize:13.0];
self.arrowImageView.image = [UIImage imageNamed:@"grey-trilateral_down"];
//self.taskContentLabel.text = @"王XX 集团X领导";
}
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.textColor = kAnnounceTextColor;
_titleLabel.font = [UIFont systemFontOfSize:18.0];
[self addSubview:_titleLabel];
NSLayoutConstraint *titleLabelTop = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:10];
[self addConstraint:titleLabelTop];
NSLayoutConstraint *titleLabelLeft = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:titleLabelLeft];
NSLayoutConstraint *titleLabelWidth = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:titleLabelWidth];
NSLayoutConstraint *titleLabelHeight = [NSLayoutConstraint constraintWithItem:_titleLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:27];
[self addConstraint:titleLabelHeight];
}
return _titleLabel;
}
- (UILabel *)startDate
{
if (!_startDate) {
_startDate = [[UILabel alloc] init];
_startDate.font = [UIFont systemFontOfSize:15.0];
_startDate.textColor = kOnLineCompleteHeaderTextColor;
_startDate.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_startDate];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_startDate attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self addConstraint:Height];
}
return _startDate;
}
- (UILabel *)overDate
{
if (!_overDate) {
_overDate = [[UILabel alloc] init];
_overDate.font = [UIFont systemFontOfSize:15.0];
_overDate.textColor = kOnLineCompleteHeaderTextColor;
_overDate.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_overDate];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.startDate attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_overDate attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self addConstraint:Height];
}
return _overDate;
}
- (UILabel *)taskContent
{
if (!_taskContent) {
_taskContent = [[UILabel alloc] init];
_taskContent.font = [UIFont systemFontOfSize:15.0];
_taskContent.textColor = kOnLineCompleteHeaderTextColor;
_taskContent.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_taskContent];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.overDate attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[self addConstraint:Left];
NSLayoutConstraint *Width = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:65];
[self addConstraint:Width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_taskContent attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self addConstraint:Height];
}
return _taskContent;
}
- (UILabel *)startDateLabel
{
if (!_startDateLabel) {
_startDateLabel = [[UILabel alloc] init];
_startDateLabel.font = [UIFont systemFontOfSize:15.0];
_startDateLabel.textColor = kLightBlack;
_startDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_startDateLabel];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_startDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.titleLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_startDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.startDate attribute:NSLayoutAttributeRight multiplier:1.0 constant:15];
[self addConstraint:Left];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_startDateLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self addConstraint:Height];
}
return _startDateLabel;
}
- (UILabel *)overDateLabel
{
if (!_overDateLabel) {
_overDateLabel = [[UILabel alloc] init];
_overDateLabel.font = [UIFont systemFontOfSize:15.0];
_overDateLabel.textColor = kLightBlack;
_overDateLabel.textAlignment = NSTextAlignmentLeft;
_overDateLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_overDateLabel];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_overDateLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.startDateLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self addConstraint:Top];
NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_overDateLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:100];
[self addConstraint:Left];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_overDateLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self addConstraint:Height];
}
return _overDateLabel;
}
- (UIButton *)unfoldBtn
{
if (!_unfoldBtn) {
_unfoldBtn = [[UIButton alloc] init];
[_unfoldBtn setTitle:@"展开" forState:UIControlStateNormal];
[_unfoldBtn setTitleColor:kLightGray forState:UIControlStateNormal];
_unfoldBtn.tag = 2001;
_unfoldBtn.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_unfoldBtn];
NSLayoutConstraint *overDateTop = [NSLayoutConstraint constraintWithItem:_unfoldBtn attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.overDate attribute:NSLayoutAttributeBottom multiplier:1.0 constant:2];
[self addConstraint:overDateTop];
NSLayoutConstraint *overDateWidth = [NSLayoutConstraint constraintWithItem:_unfoldBtn attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:32];
[self addConstraint:overDateWidth];
NSLayoutConstraint *overDateRight = [NSLayoutConstraint constraintWithItem:_unfoldBtn attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.arrowImageView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self addConstraint:overDateRight];
NSLayoutConstraint *overDateHeight = [NSLayoutConstraint constraintWithItem:_unfoldBtn attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
[self addConstraint:overDateHeight];
}
return _unfoldBtn;
}
- (UIImageView *)arrowImageView
{
if (!_arrowImageView) {
_arrowImageView = [[UIImageView alloc] init];
_arrowImageView.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_arrowImageView];
NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_arrowImageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.overDate attribute:NSLayoutAttributeBottom multiplier:1.0 constant:10];
[self addConstraint:Top];
NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_arrowImageView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[self addConstraint:Right];
NSLayoutConstraint *width = [NSLayoutConstraint constraintWithItem:_arrowImageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:11];
[self addConstraint:width];
NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_arrowImageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:8];
[self addConstraint:Height];
}
return _arrowImageView;
}
//- (UILabel *)taskContentLabel
//{
// if (!_taskContentLabel) {
// _taskContentLabel = [[UILabel alloc] init];
// _taskContentLabel.font = [UIFont systemFontOfSize:15.0];
// _taskContentLabel.textColor = kLightBlack;
// _taskContentLabel.textAlignment = NSTextAlignmentLeft;
// _taskContentLabel.translatesAutoresizingMaskIntoConstraints = NO;
// [self addSubview:_taskContentLabel];
//
// NSLayoutConstraint *Top = [NSLayoutConstraint constraintWithItem:_taskContentLabel attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.overDateLabel attribute:NSLayoutAttributeBottom multiplier:1.0 constant:5];
// [self addConstraint:Top];
//
// NSLayoutConstraint *Left = [NSLayoutConstraint constraintWithItem:_taskContentLabel attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:100];
// [self addConstraint:Left];
//
// NSLayoutConstraint *Right = [NSLayoutConstraint constraintWithItem:_taskContentLabel attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
// [self addConstraint:Right];
//
// NSLayoutConstraint *Height = [NSLayoutConstraint constraintWithItem:_taskContentLabel attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:25];
// [self addConstraint:Height];
// }
// return _taskContentLabel;
//}
@end
//
// OnLineCompleteViewController.h
// redstar
//
// Created by admin on 15/11/29.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OnLineCompleteViewController : UIViewController
@end
//
// OnLineCompleteViewController.m
// redstar
//
// Created by admin on 15/11/29.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "OnLineCompleteViewController.h"
#import "OnLineCompleteHeadView.h"
#import "OnLineCompleteCell.h"
#define kOnLineCompleteCell @"onLineCompleteCell"
@interface OnLineCompleteViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) OnLineCompleteHeadView *headerView;
@end
@implementation OnLineCompleteViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = NO;
self.modalPresentationCapturesStatusBarAppearance = NO;
self.navigationController.navigationBar.translucent = NO;
}
[self setupNav];
self.tableView.delegate = self;
self.tableView.dataSource = self;
}
#pragma mark - Private Mothods
- (void)setupNav
{
UILabel *customLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 30)];
[customLab setTextColor:[UIColor whiteColor]];
[customLab setText:@"任务完成情况一览"];
customLab.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = customLab;
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 30, 44);
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
}
- (void)doBack:(id)sender
{
[self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - UITableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 10;
}
// cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
OnLineCompleteCell *cell = [tableView dequeueReusableCellWithIdentifier:kOnLineCompleteCell];
if (!cell) {
cell = [[OnLineCompleteCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kOnLineCompleteCell];
}
cell.iconImageView.image = [UIImage imageNamed:@"default_pic"];
cell.shopName.text = @"上海真北店";
cell.reportTime.text = @"上报时间:2015-10-02 12:10:16";
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 45;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *sectionView = [[UIView alloc] init];
sectionView.backgroundColor = kSectionBackGroundColor;
UILabel *shopList = [[UILabel alloc] init];
shopList.translatesAutoresizingMaskIntoConstraints = NO;
shopList.text = [NSString stringWithFormat:@"商场列表(5/10)"];
shopList.textColor = kNavigationBarColor;
shopList.font = [UIFont systemFontOfSize:16.0];
sectionView.layer.borderWidth = 0.5;
sectionView.layer.borderColor = kSeparateLineCGColor;
[sectionView addSubview:shopList];
NSLayoutConstraint *titleLabelTop = [NSLayoutConstraint constraintWithItem:shopList attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[sectionView addConstraint:titleLabelTop];
NSLayoutConstraint *titleLabelLeft = [NSLayoutConstraint constraintWithItem:shopList attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:20];
[sectionView addConstraint:titleLabelLeft];
NSLayoutConstraint *titleLabelRight = [NSLayoutConstraint constraintWithItem:shopList attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeRight multiplier:1.0 constant:-20];
[sectionView addConstraint:titleLabelRight];
NSLayoutConstraint *titleLabelBottom = [NSLayoutConstraint constraintWithItem:shopList attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:sectionView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[sectionView addConstraint:titleLabelBottom];
return sectionView;
}
#pragma mark - lazy loading
- (UITableView *)tableView
{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.translatesAutoresizingMaskIntoConstraints = NO;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.tableHeaderView = self.headerView;
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 200.0;
[_tableView registerClass:[OnLineCompleteCell class] forCellReuseIdentifier:kOnLineCompleteCell];
[self.view addSubview:_tableView];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
[self.view addConstraint:tableTop];
NSLayoutConstraint *tableLeft = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.view addConstraint:tableLeft];
NSLayoutConstraint *tableRight = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.view addConstraint:tableRight];
NSLayoutConstraint *tableBottom = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.view addConstraint:tableBottom];
}
return _tableView;
}
- (OnLineCompleteHeadView *)headerView
{
if (!_headerView) {
_headerView = [[OnLineCompleteHeadView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 123)];
_tableView.backgroundColor = [UIColor whiteColor];
}
return _headerView;
}
@end
//
// SpotCheckOnLineViewController.h
// redstar
//
// Created by admin on 15/11/29.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SpotCheckOnLineViewController : UIViewController
@end
//
// SpotCheckOnLineViewController.m
// redstar
//
// Created by admin on 15/11/29.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SpotCheckOnLineViewController.h"
#import "OnLineViewController.h"
#import "TaxisView.h"
#import "ScreenView.h"
#import "MenuView.h"
#import "OnLineCompleteViewController.h"
#import "InspectListCell.h"
#define kInspectListTableViewcellIndeterfor @"inspectListTableViewcellIndeterfor"
@interface SpotCheckOnLineViewController ()<UITableViewDelegate, UITableViewDataSource,ScreenTableDelegate, TaxisViewDelegate, InspectTableViewDelegate>
@property (nonatomic, strong) MenuView *menuView;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) TaxisView *taxisView;
@property (nonatomic, strong) ScreenView *screenView;
@property (nonatomic, strong) MenuButton *selctedButton;
@property (nonatomic, strong) UIView *bgView;
@property (nonatomic, assign) NSInteger selectRow;
@property (nonatomic, assign) NSInteger timeSelectNum;
@end
@implementation SpotCheckOnLineViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = NO;
self.modalPresentationCapturesStatusBarAppearance = NO;
self.navigationController.navigationBar.translucent = NO;
}
[self setupNav];
self.tableView.delegate = self;
self.tableView.dataSource = self;
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.menuView.taxiButton addTarget:self action:@selector(dropCilck:) forControlEvents:UIControlEventTouchUpInside];
[self.menuView.screenButton addTarget:self action:@selector(dropCilck:) forControlEvents:UIControlEventTouchUpInside];
self.tabBarController.tabBar.hidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[self.menuView removeFromSuperview];
self.menuView = nil;
}
#pragma mark - Private Mothods
- (void)setupNav
{
UILabel *customLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 30)];
[customLab setTextColor:[UIColor whiteColor]];
[customLab setText:@"抽查任务列表"];
customLab.font = [UIFont boldSystemFontOfSize:19];
self.navigationItem.titleView = customLab;
UIButton *rightButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
[rightButton setTitle:@"新增任务" forState:UIControlStateNormal];
[rightButton addTarget:self action:@selector(addSpotCheckTaskClick:) forControlEvents:UIControlEventTouchUpInside];
[rightButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
rightButton.titleLabel.font = [UIFont systemFontOfSize:15];
UIBarButtonItem *rightButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightButton];
self.navigationItem.rightBarButtonItem = rightButtonItem;
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
backBtn.frame = CGRectMake(0, 0, 30, 44);
[backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
self.navigationItem.leftBarButtonItem = backItem;
}
- (void)doBack:(id)sender
{
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
}
- (void)addSpotCheckTaskClick:(UIButton *)sender
{
OnLineViewController *onlineVC = [[OnLineViewController alloc] init];
[self.navigationController pushViewController:onlineVC animated:YES];
}
- (void)dropCilck:(MenuButton *)sender
{
sender.isDrop = !sender.isDrop;
if (_selctedButton.tag == sender.tag) {
if (sender.isDrop) {
if (sender.tag == 4001) {
[self showRedView];
} else {
[self showGreenView];
}
sender.selected = YES;
} else {
if (sender.tag == 4001) {
[self closeRedView];
} else {
[self closeGreenView];
}
sender.selected = NO;
}
} else {
// 前一次选中的按钮 选中状态置为NO
_selctedButton.selected = NO;
_selctedButton.isDrop = NO;
// 进行选中状态为NO 的操作
// 2.判断当前是否有bgView 有->移除, 没有->跳过
if (_bgView) {
// _bgView存在
[_bgView removeFromSuperview];
_bgView = nil;
}
if (_taxisView) {
[_taxisView removeFromSuperview];
_taxisView = nil;
}
if (_screenView) {
[_screenView removeFromSuperview];
_screenView = nil;
}
// 将当前选中的按钮设置 选中状态为YES;
sender.selected = YES;
// 对选中按钮 进行相关操作
_selctedButton = (MenuButton *)sender;
if (sender.tag == 4001) {
[self showRedView];
} else {
[self showGreenView];
}
}
}
- (void)showRedView
{
if (!_bgView) {
_bgView = [[UIView alloc] initWithFrame:self.view.bounds];
UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeRedView)];
[_bgView addGestureRecognizer:tapGR];
}
if (!_taxisView) {
_taxisView = [[TaxisView alloc] init];
_taxisView.backgroundColor = [UIColor whiteColor];
}
_taxisView.delegate = self;
[self.view addSubview:_bgView];
[self.view insertSubview:_taxisView aboveSubview:_bgView];
_bgView.alpha = 0;
_bgView.backgroundColor = [UIColor blackColor];
CGRect toFrame = CGRectMake(0, 45, kScreenWidth, kTaxisViewHeight);
CGRect fromFrame = CGRectMake(0, -kTaxisViewHeight, kScreenWidth, kTaxisViewHeight);
_taxisView.frame = fromFrame;
[UIView animateWithDuration:0.3 animations:^{
_bgView.alpha = 0.6;
_taxisView.frame = toFrame;
}];
}
- (void)closeRedView
{
_selctedButton.isDrop = NO;
_selctedButton.selected = NO;
[_selctedButton setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal];
CGRect fromFrame = CGRectMake(0, -kTaxisViewHeight, kScreenWidth, kTaxisViewHeight);
[UIView animateWithDuration:0.3 animations:^{
_bgView.alpha = .0f;
_taxisView.frame = fromFrame;
} completion:^(BOOL finished) {
[_bgView removeFromSuperview];
[_taxisView removeFromSuperview];
}];
}
- (void)showGreenView
{
if (!_bgView) {
_bgView = [[UIView alloc] initWithFrame:self.view.bounds];
UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeGreenView)];
[_bgView addGestureRecognizer:tapGR];
}
if (!_screenView) {
_screenView = [[ScreenView alloc] initWithTitleArray:[NSArray arrayWithObjects:@"待解决", @"已解决",@"已作废",nil]];
_screenView.delegate = self;
_screenView.inspectTableView.inspectDelegate = self;
_screenView.backgroundColor = [UIColor whiteColor];
}
[_screenView.resetBtn addTarget:self action:@selector(resetClick:) forControlEvents:UIControlEventTouchUpInside];
[_screenView.submitBtn addTarget:self action:@selector(submitClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:_bgView];
[self.view insertSubview:_screenView aboveSubview:_bgView];
_bgView.alpha = 0;
_bgView.backgroundColor = [UIColor blackColor];
CGRect toFrame = CGRectMake(0, 45, kScreenWidth, kScreenViewHeight);
CGRect fromFrame = CGRectMake(0, -kScreenViewHeight, kScreenWidth, kScreenViewHeight);
_screenView.frame = fromFrame;
[UIView animateWithDuration:0.3 animations:^{
_bgView.alpha = 0.6;
_screenView.frame = toFrame;
}];
}
- (void)closeGreenView
{
_selctedButton.isDrop = NO;
_selctedButton.selected = NO;
[_selctedButton setTitleColor:kInspectSectionButtonTextColor forState:UIControlStateNormal];
CGRect fromFrame = CGRectMake(0, -kScreenViewHeight, kScreenWidth, kScreenViewHeight);
[UIView animateWithDuration:0.3 animations:^{
_bgView.alpha = .0f;
_screenView.frame = fromFrame;
} completion:^(BOOL finished) {
[_bgView removeFromSuperview];
[_screenView removeFromSuperview];
}];
}
// 重置按钮
- (void)resetClick:(UIButton *)sender
{
NSInteger selectedIndex = 0;
NSIndexPath *selectedIndexPath = [NSIndexPath indexPathForRow:selectedIndex inSection:0];
[_screenView.tableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
_screenView.textView.text = @"";
NSInteger timeIndex = 0;
NSIndexPath *timeIndexPath = [NSIndexPath indexPathForRow:timeIndex inSection:0];
[_screenView.tableView selectRowAtIndexPath:timeIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
_selectRow = 0;
}
// 提交按钮
- (void)submitClick:(UIButton *)sender
{
}
#pragma mark - InspectTableViewDelegate
- (void)inspectTableViewDidSelectWithRow:(NSInteger)row
{
_selectRow = row;
}
#pragma mark - TaxisDelegate
- (void)timeChange:(UIButton *)sender
{
[self closeRedView];
}
#pragma mark - ScreenTableDelegate
- (void)tableViewDidSelectRow:(NSInteger)row
{
_timeSelectNum = row;
}
#pragma mark - UITableView Delegate/DataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 7;
}
// cell显示的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
InspectListCell *cell=[tableView dequeueReusableCellWithIdentifier:kInspectListTableViewcellIndeterfor];
if (!cell) {
cell = [[InspectListCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kInspectListTableViewcellIndeterfor];
}
cell.titleLabel.text = @"9月中旬卫生临时抽查";
cell.startDate.text = @"起始时间:2015-09-21 15:23:21"; // 起
cell.overDate.text = @"截止时间:2015-09-30"; // 截止
NSString *str = [NSString stringWithFormat:@"巡检进度:进行中"];
NSMutableAttributedString *strAttr = [[NSMutableAttributedString alloc] initWithString:str];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kCellDetailColor,NSFontAttributeName:[UIFont systemFontOfSize:14.0f]} range:NSMakeRange(0,5)];
[strAttr addAttributes:@{NSForegroundColorAttributeName:kProgressDealWithColor,NSFontAttributeName:[UIFont systemFontOfSize:14.0f]} range:NSMakeRange(5,str.length - 5)];
[cell.progressLabel setAttributedText:strAttr];
CGFloat already = 5;
CGFloat all = 10;
cell.multiplier = already / all;
cell.alreadyLabel.text = [NSString stringWithFormat:@"%.0f",already];
cell.alreadyLabel.textColor = kProgressDealWithColor;
cell.allLabel.text = [NSString stringWithFormat:@"/%.0f",all];
cell.allLabel.textColor = kProgressDealWithColor;
cell.allView.backgroundColor = kProgressViewAllBackColor;
UIImage *image = [UIImage imageNamed:@"progress-bar"];
image = [image resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeTile];
cell.alreadyView.image = image;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
// cell的点击事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
OnLineCompleteViewController *completeVC = [[OnLineCompleteViewController alloc] init];
[self.navigationController pushViewController:completeVC animated:YES];
}
// section高度
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 0;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 0;
}
#pragma mark - lazy loading
- (UITableView *)tableView
{
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.translatesAutoresizingMaskIntoConstraints = NO;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.showsHorizontalScrollIndicator = NO;
_tableView.tableFooterView = [[UIView alloc] init];
[_tableView registerClass:[InspectListCell class] forCellReuseIdentifier:kInspectListTableViewcellIndeterfor];
_tableView.rowHeight = UITableViewAutomaticDimension;
_tableView.estimatedRowHeight = 200.0;
[self.view addSubview:_tableView];
NSLayoutConstraint *tableTop = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:45];
[self.view addConstraint:tableTop];
NSLayoutConstraint *tableLeft = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[self.view addConstraint:tableLeft];
NSLayoutConstraint *tableRight = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[self.view addConstraint:tableRight];
NSLayoutConstraint *tableBottom = [NSLayoutConstraint constraintWithItem:_tableView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
[self.view addConstraint:tableBottom];
}
return _tableView;
}
- (MenuView *)menuView
{
if (!_menuView) {
_menuView = [[MenuView alloc] init];
_menuView.translatesAutoresizingMaskIntoConstraints = NO;
_menuView.backgroundColor = kInspectSectionBackGroundColor;
UIWindow *window = [[UIApplication sharedApplication].windows lastObject];
[window addSubview:_menuView];
NSLayoutConstraint *menuTop = [NSLayoutConstraint constraintWithItem:_menuView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:window attribute:NSLayoutAttributeTop multiplier:1.0 constant:64];
[window addConstraint:menuTop];
NSLayoutConstraint *menuLeft = [NSLayoutConstraint constraintWithItem:_menuView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:window attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0];
[window addConstraint:menuLeft];
NSLayoutConstraint *menuRight = [NSLayoutConstraint constraintWithItem:_menuView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:window attribute:NSLayoutAttributeRight multiplier:1.0 constant:0];
[window addConstraint:menuRight];
NSLayoutConstraint *menuHeight = [NSLayoutConstraint constraintWithItem:_menuView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:45];
[window addConstraint:menuHeight];
}
return _menuView;
}
@end
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
@property (nonatomic, strong) UILabel *titleLabel; // 标题 @property (nonatomic, strong) UILabel *titleLabel; // 标题
@property (nonatomic, strong) UILabel *startDate; // 起始日期 @property (nonatomic, strong) UILabel *startDate; // 起始日期
@property (nonatomic, strong) UILabel *overDate; // 截止日期 @property (nonatomic, strong) UILabel *overDate; // 截止日期
@property (nonatomic, strong) UILabel *progressLabel;
@property (nonatomic, strong) UILabel *alreadyLabel; @property (nonatomic, strong) UILabel *alreadyLabel;
@property (nonatomic, strong) UILabel *allLabel; @property (nonatomic, strong) UILabel *allLabel;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#import "TaskListModel.h" #import "TaskListModel.h"
@interface InspectListCell () @interface InspectListCell ()
@property (nonatomic, strong) UILabel *progressLabel;
@end @end
......
...@@ -119,12 +119,14 @@ ...@@ -119,12 +119,14 @@
{ {
NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kInspectListURL]; NSString *url = [NSString stringWithFormat:@"%@%@", kRedStarURL, kInspectListURL];
NSLog(@"uuurl = %@", url);
HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url]; HttpClient *httpCilent = [[HttpClient alloc] initWithUrl:url];
NSDictionary *parameters = @{@"userUuid":@"", NSDictionary *parameters = @{
@"queryOrders":@[@{@"field":@"lastModifyInfo"}], @"queryOrders":@[@{@"field":@"lastModifyInfo"}],
@"pageNumber":@(0), @"pageNumber":@(0),
@"pageSize":@(20) @"pageSize":@(20)
}; };
NSLog(@"parameters = %@", parameters);
[MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) { [httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
@property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *uuid; @property (nonatomic, copy) NSString *uuid;
@property (nonatomic, copy) NSString *weight; @property (nonatomic, copy) NSString *weight;
@property (nonatomic, copy) NSString *originScore;
+ (instancetype)taskModelWithDict:(NSDictionary *)dict; + (instancetype)taskModelWithDict:(NSDictionary *)dict;
- (instancetype)initWithDict:(NSDictionary *)dict; - (instancetype)initWithDict:(NSDictionary *)dict;
......
...@@ -96,13 +96,14 @@ ...@@ -96,13 +96,14 @@
- (void)requestRankingDetail - (void)requestRankingDetail
{ {
NSString *url = [NSString stringWithFormat:@"%@%@%@/%@",kRedStarURL, kInspectDetailURL, self.uuid, self.store_uuid]; NSString *url = [NSString stringWithFormat:@"%@%@%@/%@",kRedStarURL, kInspectDetailURL, self.uuid, self.store_uuid];
NSLog(@"url = %@", url);
HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url]; HttpClient *httpClient = [[HttpClient alloc] initWithUrl:url];
__block InspectTaskViewController *weakSelf = self; __block InspectTaskViewController *weakSelf = self;
[MBProgressHUD showHUDAddedTo:self.view animated:YES]; [MBProgressHUD showHUDAddedTo:self.view animated:YES];
[httpClient getPraiseDetailWithParameters:nil completion:^(id response, NSError *error) { [httpClient getPraiseDetailWithParameters:nil completion:^(id response, NSError *error) {
NSLog(@"口碑巡检明细PraiseDetail = %@", response); NSLog(@"口碑巡检明细PraiseDetail = %@", response);
NSLog(@"error = %@", error);
NSDictionary *dataDict = response[@"data"]; NSDictionary *dataDict = response[@"data"];
TaskDetailModel *taskDetail = [TaskDetailModel taskDetailModelWithDict:dataDict]; TaskDetailModel *taskDetail = [TaskDetailModel taskDetailModelWithDict:dataDict];
weakSelf.detailHeaderView.taskDetail = taskDetail; weakSelf.detailHeaderView.taskDetail = taskDetail;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#import "InspectTaskViewController.h" #import "InspectTaskViewController.h"
#import "TaskListModel.h" #import "TaskListModel.h"
#import "OnLineViewController.h" #import "SpotCheckOnLineViewController.h"
#import "LookOnLineViewController.h" #import "LookOnLineViewController.h"
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
// 初始化容器 // 初始化容器
self.titleArray = [NSArray arrayWithObjects:@"图说口碑", @"8月口碑巡检",@"问题与知识",@"口碑任务", nil]; self.titleArray = [NSArray arrayWithObjects:@"图说口碑", @"8月口碑巡检",@"问题与知识",@"口碑任务", nil];
self.btnTitleArray = [NSArray arrayWithObjects:@"在线抽查", @"口碑巡检",@"口碑标准",@"图说口碑",@"问题与知识",@"优秀案例",@"口碑排名",@"查看抽查", nil]; self.btnTitleArray = [NSArray arrayWithObjects:@"在线抽查", @"口碑巡检",@"口碑标准",@"图说口碑",@"问题与知识",@"口碑排名",@"查看抽查", nil];
self.announeArray = [NSArray arrayWithObjects:@"关于展开10月口碑巡检的说明", @"迎2015十一大促活动启动", @"9月口碑巡检结果排名已公布", nil]; self.announeArray = [NSArray arrayWithObjects:@"关于展开10月口碑巡检的说明", @"迎2015十一大促活动启动", @"9月口碑巡检结果排名已公布", nil];
// 初始化 // 初始化
...@@ -153,6 +153,7 @@ ...@@ -153,6 +153,7 @@
}; };
[httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) { [httpCilent getRankingListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"口碑排名response = %@", response); NSLog(@"口碑排名response = %@", response);
NSLog(@"error = %@", error);
NSDictionary *dataDict = response[@"data"]; NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"]; NSArray *dataArray = dataDict[@"records"];
...@@ -185,7 +186,7 @@ ...@@ -185,7 +186,7 @@
[httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) { [httpCilent getInspectListWithParameters:parameters completion:^(id response, NSError *error) {
NSLog(@"巡检列表%@", response); NSLog(@"巡检列表%@", response);
NSLog(@"error = %@", error);
NSDictionary *dataDict = response[@"data"]; NSDictionary *dataDict = response[@"data"];
NSArray *dataArray = dataDict[@"records"]; NSArray *dataArray = dataDict[@"records"];
for (NSDictionary *dict in dataArray) { for (NSDictionary *dict in dataArray) {
...@@ -225,6 +226,7 @@ ...@@ -225,6 +226,7 @@
NSDictionary *dataDict = (NSDictionary *)response[@"data"]; NSDictionary *dataDict = (NSDictionary *)response[@"data"];
NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"]; NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
NSLog(@"问题与知识列表recods = %@", response); NSLog(@"问题与知识列表recods = %@", response);
NSLog(@"error = %@", error);
for (NSDictionary *questionDict in recordsDict) { for (NSDictionary *questionDict in recordsDict) {
QuestionModel *question = [[QuestionModel alloc] init]; QuestionModel *question = [[QuestionModel alloc] init];
[question setValuesForKeysWithDictionary:questionDict]; [question setValuesForKeysWithDictionary:questionDict];
...@@ -260,7 +262,7 @@ ...@@ -260,7 +262,7 @@
CGFloat itemW = kScreenWidth / 4; CGFloat itemW = kScreenWidth / 4;
CGFloat itemH = self.headView.scrollView.frame.size.height; CGFloat itemH = self.headView.scrollView.frame.size.height;
for (int i = 0; i < 8; i++) { for (int i = 0; i < 7; i++) {
HomeCellItem *item = [[HomeCellItem alloc] init]; HomeCellItem *item = [[HomeCellItem alloc] init];
item.frame = CGRectMake(i * itemW, 0, itemW, itemH); item.frame = CGRectMake(i * itemW, 0, itemW, itemH);
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"task_0%d", i]]; UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"task_0%d", i]];
...@@ -303,8 +305,8 @@ ...@@ -303,8 +305,8 @@
HomeCellItem *item = (HomeCellItem *)sender; HomeCellItem *item = (HomeCellItem *)sender;
UINavigationController *nav; UINavigationController *nav;
if ([item.titleLabel.text isEqualToString:@"在线抽查"]) { if ([item.titleLabel.text isEqualToString:@"在线抽查"]) {
OnLineViewController *online = [[OnLineViewController alloc] init]; SpotCheckOnLineViewController *spotOnline = [[SpotCheckOnLineViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:online]; nav = [[UINavigationController alloc] initWithRootViewController:spotOnline];
} else if ([item.titleLabel.text isEqualToString:@"口碑巡检"]) { } else if ([item.titleLabel.text isEqualToString:@"口碑巡检"]) {
InspectListViewController *inspectListVC = [[InspectListViewController alloc] init]; InspectListViewController *inspectListVC = [[InspectListViewController alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:inspectListVC]; nav = [[UINavigationController alloc] initWithRootViewController:inspectListVC];
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
[MBProgressHUD showHUDAddedTo:window animated:YES]; [MBProgressHUD showHUDAddedTo:window animated:YES];
[httpClient loginWithUsername:username password:password completion:^(id response, NSError *error) { [httpClient loginWithUsername:username password:password completion:^(id response, NSError *error) {
NSLog(@"登陆 respo = %@", response); NSLog(@"登陆 respo = %@", response);
NSLog(@"error = %@", error);
if ([response[@"message"] isEqualToString:@"ok"]) { if ([response[@"message"] isEqualToString:@"ok"]) {
// 保存登陆信息 // 保存登陆信息
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
...@@ -164,6 +165,9 @@ ...@@ -164,6 +165,9 @@
*/ */
- (void)loginButtonClick:(UIButton *)sender - (void)loginButtonClick:(UIButton *)sender
{ {
self.rootTBC = [[RootTabBarController alloc] init];
[self presentViewController:_rootTBC animated:YES completion:nil];
if (self.loginView.usernameTextFiled.text.length == 0 || self.loginView.passwordTextFiled.text.length == 0) { if (self.loginView.usernameTextFiled.text.length == 0 || self.loginView.passwordTextFiled.text.length == 0) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:@"账号、密码不能为空" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil]; UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:@"账号、密码不能为空" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
[alertView show]; [alertView show];
......
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