Commit 1364a19c authored by freecui's avatar freecui

加工单列表

parents 42ce6cb5 4d6dcb24
......@@ -9,6 +9,13 @@
/* Begin PBXBuildFile section */
04040E001B6FE75800326D12 /* ICRPerson.m in Sources */ = {isa = PBXBuildFile; fileRef = 04040DFF1B6FE75800326D12 /* ICRPerson.m */; };
0406BFD91B7C97E700DD65A7 /* BusinessViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0406BFD81B7C97E700DD65A7 /* BusinessViewController.m */; };
0414FF171B94959700C7B00E /* NewPurchaseNoticeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF0C1B94959700C7B00E /* NewPurchaseNoticeViewController.m */; };
0414FF181B94959700C7B00E /* SeePurchaseNoticeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF0E1B94959700C7B00E /* SeePurchaseNoticeViewController.m */; };
0414FF191B94959700C7B00E /* PurchaseNoticeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF121B94959700C7B00E /* PurchaseNoticeCell.m */; };
0414FF1A1B94959700C7B00E /* SelectCompanyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF141B94959700C7B00E /* SelectCompanyViewController.m */; };
0414FF1B1B94959700C7B00E /* ShopDetaileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0414FF161B94959700C7B00E /* ShopDetaileViewController.m */; };
04B4A3871B9CAAD700D88D68 /* ShopDetail.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B4A3861B9CAAD700D88D68 /* ShopDetail.m */; };
04F6E70A1B9B08A500550849 /* PurchaseNoticeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F6E7091B9B08A500550849 /* PurchaseNoticeViewController.m */; };
300DD94A1B184B450080EE12 /* ICRPatrolPlan.m in Sources */ = {isa = PBXBuildFile; fileRef = 300DD9491B184B450080EE12 /* ICRPatrolPlan.m */; };
300DD94B1B184B450080EE12 /* ICRPatrolPlan.m in Sources */ = {isa = PBXBuildFile; fileRef = 300DD9491B184B450080EE12 /* ICRPatrolPlan.m */; };
300DD94E1B184EA70080EE12 /* ICRQuestion.m in Sources */ = {isa = PBXBuildFile; fileRef = 300DD94D1B184EA70080EE12 /* ICRQuestion.m */; };
......@@ -52,13 +59,11 @@
35321F6D1B98C66400E5C670 /* GXFButtonAndLineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35321F6C1B98C66400E5C670 /* GXFButtonAndLineView.m */; };
358432EE1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432ED1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.m */; };
358432F11B993BD8007E73ED /* GXFProcessProductTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F01B993BD8007E73ED /* GXFProcessProductTableViewCell.m */; };
358432F41B994EDD007E73ED /* GXFSeeProcessViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F31B994EDD007E73ED /* GXFSeeProcessViewController.m */; };
358432F41B994EDD007E73ED /* GXFListProcessViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F31B994EDD007E73ED /* GXFListProcessViewController.m */; };
358432F71B998ED2007E73ED /* GXFProductUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 358432F61B998ED2007E73ED /* GXFProductUnit.m */; };
35A1C3551B8EFBBF004AC9F7 /* PermissionJson in Resources */ = {isa = PBXBuildFile; fileRef = 35A1C3541B8EFBBF004AC9F7 /* PermissionJson */; };
35A1C3581B8F09D2004AC9F7 /* GXFFunctionDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A1C3571B8F09D2004AC9F7 /* GXFFunctionDB.m */; };
35B448DF1B9B0A73001209E2 /* ProductBillCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B448DE1B9B0A73001209E2 /* ProductBillCell.m */; };
35B462D91B9C3D7D00AE2C3E /* GXFProcessMaterialItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B462D81B9C3D7D00AE2C3E /* GXFProcessMaterialItemView.m */; };
35B462DC1B9C3D9600AE2C3E /* GXFProcessProductItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B462DB1B9C3D9600AE2C3E /* GXFProcessProductItemView.m */; };
35B9B40E1B8FFB59009851CC /* GXFFunctionDBHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 35B9B40D1B8FFB59009851CC /* GXFFunctionDBHelper.m */; };
35C3C0AC1AE956040035AC8A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35C3C0AB1AE956040035AC8A /* Security.framework */; };
35C3C0AE1AE9560E0035AC8A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35C3C0AD1AE9560E0035AC8A /* CoreGraphics.framework */; };
......@@ -81,6 +86,8 @@
35CF33981B96BB02001211EF /* GXFPaging.m in Sources */ = {isa = PBXBuildFile; fileRef = 35CF33971B96BB02001211EF /* GXFPaging.m */; };
35CF339B1B96E41F001211EF /* GXFVendorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 35CF339A1B96E41F001211EF /* GXFVendorViewController.m */; };
35CF339E1B96E606001211EF /* GXFWarehouseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 35CF339D1B96E606001211EF /* GXFWarehouseViewController.m */; };
35D56A7D1B9D4E8300996C28 /* GXFProcessCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 35D56A7C1B9D4E8300996C28 /* GXFProcessCell.m */; };
35D56A801B9D533900996C28 /* GXFProcessBoltView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35D56A7F1B9D533900996C28 /* GXFProcessBoltView.m */; };
7217E9E51B72364300FE5C1D /* NewSurveyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7217E9C51B72364300FE5C1D /* NewSurveyViewController.m */; };
7217E9E61B72364300FE5C1D /* SurveyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7217E9C71B72364300FE5C1D /* SurveyViewController.m */; };
7217E9E71B72364300FE5C1D /* Attachment.m in Sources */ = {isa = PBXBuildFile; fileRef = 7217E9CA1B72364300FE5C1D /* Attachment.m */; };
......@@ -387,10 +394,6 @@
FE0C652C1B8EAB3400580183 /* AddProductViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0C652B1B8EAB3400580183 /* AddProductViewController.m */; };
FE0C9B091B7C543D00335B39 /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0C9B081B7C543D00335B39 /* User.m */; };
FE17F6791B85847D0078CE96 /* QueryOrder.m in Sources */ = {isa = PBXBuildFile; fileRef = FE17F6781B85847D0078CE96 /* QueryOrder.m */; };
FE17F6831B85CA5B0078CE96 /* NewPurchaseNoticeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE17F67C1B85CA5B0078CE96 /* NewPurchaseNoticeViewController.m */; };
FE17F6841B85CA5B0078CE96 /* PurchaseNoticeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = FE17F67E1B85CA5B0078CE96 /* PurchaseNoticeCell.m */; };
FE17F6851B85CA5B0078CE96 /* SeePurchaseNoticeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE17F6801B85CA5B0078CE96 /* SeePurchaseNoticeViewController.m */; };
FE17F6861B85CA5B0078CE96 /* ShopDetaileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE17F6821B85CA5B0078CE96 /* ShopDetaileViewController.m */; };
FE2FCC7F1B74511000BBC6FB /* ChooseProductViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2FCC7E1B74511000BBC6FB /* ChooseProductViewController.m */; };
FE2FCC821B745E1A00BBC6FB /* SurveyDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2FCC811B745E1A00BBC6FB /* SurveyDetailViewController.m */; };
FE2FCC881B7492C500BBC6FB /* ResultDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2FCC871B7492C500BBC6FB /* ResultDetailViewController.m */; };
......@@ -429,6 +432,20 @@
04040DFF1B6FE75800326D12 /* ICRPerson.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRPerson.m; sourceTree = "<group>"; };
0406BFD71B7C97E700DD65A7 /* BusinessViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BusinessViewController.h; path = ../ViewControllers/Business/BusinessViewController.h; sourceTree = "<group>"; };
0406BFD81B7C97E700DD65A7 /* BusinessViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BusinessViewController.m; path = ../ViewControllers/Business/BusinessViewController.m; sourceTree = "<group>"; };
0414FF0B1B94959700C7B00E /* NewPurchaseNoticeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewPurchaseNoticeViewController.h; sourceTree = "<group>"; };
0414FF0C1B94959700C7B00E /* NewPurchaseNoticeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewPurchaseNoticeViewController.m; sourceTree = "<group>"; };
0414FF0D1B94959700C7B00E /* SeePurchaseNoticeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SeePurchaseNoticeViewController.h; sourceTree = "<group>"; };
0414FF0E1B94959700C7B00E /* SeePurchaseNoticeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SeePurchaseNoticeViewController.m; sourceTree = "<group>"; };
0414FF111B94959700C7B00E /* PurchaseNoticeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseNoticeCell.h; sourceTree = "<group>"; };
0414FF121B94959700C7B00E /* PurchaseNoticeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNoticeCell.m; sourceTree = "<group>"; };
0414FF131B94959700C7B00E /* SelectCompanyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectCompanyViewController.h; sourceTree = "<group>"; };
0414FF141B94959700C7B00E /* SelectCompanyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SelectCompanyViewController.m; sourceTree = "<group>"; };
0414FF151B94959700C7B00E /* ShopDetaileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopDetaileViewController.h; sourceTree = "<group>"; };
0414FF161B94959700C7B00E /* ShopDetaileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopDetaileViewController.m; sourceTree = "<group>"; };
04B4A3851B9CAAD700D88D68 /* ShopDetail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopDetail.h; sourceTree = "<group>"; };
04B4A3861B9CAAD700D88D68 /* ShopDetail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopDetail.m; sourceTree = "<group>"; };
04F6E7081B9B08A500550849 /* PurchaseNoticeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseNoticeViewController.h; sourceTree = "<group>"; };
04F6E7091B9B08A500550849 /* PurchaseNoticeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNoticeViewController.m; sourceTree = "<group>"; };
1B0B22845F5CD40B5CF655F2 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
300DD9481B184B450080EE12 /* ICRPatrolPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRPatrolPlan.h; sourceTree = "<group>"; };
300DD9491B184B450080EE12 /* ICRPatrolPlan.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICRPatrolPlan.m; sourceTree = "<group>"; };
......@@ -484,8 +501,8 @@
358432ED1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProcessMaterialTableViewCell.m; sourceTree = "<group>"; };
358432EF1B993BD8007E73ED /* GXFProcessProductTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProcessProductTableViewCell.h; sourceTree = "<group>"; };
358432F01B993BD8007E73ED /* GXFProcessProductTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProcessProductTableViewCell.m; sourceTree = "<group>"; };
358432F21B994EDD007E73ED /* GXFSeeProcessViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFSeeProcessViewController.h; sourceTree = "<group>"; };
358432F31B994EDD007E73ED /* GXFSeeProcessViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFSeeProcessViewController.m; sourceTree = "<group>"; };
358432F21B994EDD007E73ED /* GXFListProcessViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFListProcessViewController.h; sourceTree = "<group>"; };
358432F31B994EDD007E73ED /* GXFListProcessViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFListProcessViewController.m; sourceTree = "<group>"; };
358432F51B998ED2007E73ED /* GXFProductUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProductUnit.h; sourceTree = "<group>"; };
358432F61B998ED2007E73ED /* GXFProductUnit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProductUnit.m; sourceTree = "<group>"; };
35A1C3541B8EFBBF004AC9F7 /* PermissionJson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PermissionJson; sourceTree = "<group>"; };
......@@ -493,10 +510,6 @@
35A1C3571B8F09D2004AC9F7 /* GXFFunctionDB.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFFunctionDB.m; sourceTree = "<group>"; };
35B448DD1B9B0A73001209E2 /* ProductBillCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductBillCell.h; sourceTree = "<group>"; };
35B448DE1B9B0A73001209E2 /* ProductBillCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductBillCell.m; sourceTree = "<group>"; };
35B462D71B9C3D7D00AE2C3E /* GXFProcessMaterialItemView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProcessMaterialItemView.h; sourceTree = "<group>"; };
35B462D81B9C3D7D00AE2C3E /* GXFProcessMaterialItemView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProcessMaterialItemView.m; sourceTree = "<group>"; };
35B462DA1B9C3D9600AE2C3E /* GXFProcessProductItemView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProcessProductItemView.h; sourceTree = "<group>"; };
35B462DB1B9C3D9600AE2C3E /* GXFProcessProductItemView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProcessProductItemView.m; sourceTree = "<group>"; };
35B9B40C1B8FFB59009851CC /* GXFFunctionDBHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFFunctionDBHelper.h; sourceTree = "<group>"; };
35B9B40D1B8FFB59009851CC /* GXFFunctionDBHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFFunctionDBHelper.m; sourceTree = "<group>"; };
35C3C0AB1AE956040035AC8A /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
......@@ -534,6 +547,10 @@
35CF339A1B96E41F001211EF /* GXFVendorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFVendorViewController.m; sourceTree = "<group>"; };
35CF339C1B96E606001211EF /* GXFWarehouseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFWarehouseViewController.h; sourceTree = "<group>"; };
35CF339D1B96E606001211EF /* GXFWarehouseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFWarehouseViewController.m; sourceTree = "<group>"; };
35D56A7B1B9D4E8300996C28 /* GXFProcessCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProcessCell.h; sourceTree = "<group>"; };
35D56A7C1B9D4E8300996C28 /* GXFProcessCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProcessCell.m; sourceTree = "<group>"; };
35D56A7E1B9D533900996C28 /* GXFProcessBoltView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GXFProcessBoltView.h; sourceTree = "<group>"; };
35D56A7F1B9D533900996C28 /* GXFProcessBoltView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFProcessBoltView.m; sourceTree = "<group>"; };
7217E9C41B72364300FE5C1D /* NewSurveyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewSurveyViewController.h; sourceTree = "<group>"; };
7217E9C51B72364300FE5C1D /* NewSurveyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewSurveyViewController.m; sourceTree = "<group>"; };
7217E9C61B72364300FE5C1D /* SurveyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurveyViewController.h; sourceTree = "<group>"; };
......@@ -881,14 +898,6 @@
FE0C9B081B7C543D00335B39 /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = User.m; path = ../Views/User.m; sourceTree = "<group>"; };
FE17F6771B85847D0078CE96 /* QueryOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QueryOrder.h; sourceTree = "<group>"; };
FE17F6781B85847D0078CE96 /* QueryOrder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QueryOrder.m; sourceTree = "<group>"; };
FE17F67B1B85CA5B0078CE96 /* NewPurchaseNoticeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewPurchaseNoticeViewController.h; sourceTree = "<group>"; };
FE17F67C1B85CA5B0078CE96 /* NewPurchaseNoticeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewPurchaseNoticeViewController.m; sourceTree = "<group>"; };
FE17F67D1B85CA5B0078CE96 /* PurchaseNoticeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseNoticeCell.h; sourceTree = "<group>"; };
FE17F67E1B85CA5B0078CE96 /* PurchaseNoticeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNoticeCell.m; sourceTree = "<group>"; };
FE17F67F1B85CA5B0078CE96 /* SeePurchaseNoticeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SeePurchaseNoticeViewController.h; sourceTree = "<group>"; };
FE17F6801B85CA5B0078CE96 /* SeePurchaseNoticeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SeePurchaseNoticeViewController.m; sourceTree = "<group>"; };
FE17F6811B85CA5B0078CE96 /* ShopDetaileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopDetaileViewController.h; sourceTree = "<group>"; };
FE17F6821B85CA5B0078CE96 /* ShopDetaileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopDetaileViewController.m; sourceTree = "<group>"; };
FE2FCC7D1B74511000BBC6FB /* ChooseProductViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseProductViewController.h; sourceTree = "<group>"; };
FE2FCC7E1B74511000BBC6FB /* ChooseProductViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseProductViewController.m; sourceTree = "<group>"; };
FE2FCC801B745E1A00BBC6FB /* SurveyDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurveyDetailViewController.h; sourceTree = "<group>"; };
......@@ -967,6 +976,41 @@
name = Business;
sourceTree = "<group>";
};
0414FF0A1B94959700C7B00E /* Controllers */ = {
isa = PBXGroup;
children = (
0414FF0B1B94959700C7B00E /* NewPurchaseNoticeViewController.h */,
0414FF0C1B94959700C7B00E /* NewPurchaseNoticeViewController.m */,
04F6E7081B9B08A500550849 /* PurchaseNoticeViewController.h */,
04F6E7091B9B08A500550849 /* PurchaseNoticeViewController.m */,
0414FF0D1B94959700C7B00E /* SeePurchaseNoticeViewController.h */,
0414FF0E1B94959700C7B00E /* SeePurchaseNoticeViewController.m */,
);
path = Controllers;
sourceTree = "<group>";
};
0414FF0F1B94959700C7B00E /* Models */ = {
isa = PBXGroup;
children = (
04B4A3851B9CAAD700D88D68 /* ShopDetail.h */,
04B4A3861B9CAAD700D88D68 /* ShopDetail.m */,
);
path = Models;
sourceTree = "<group>";
};
0414FF101B94959700C7B00E /* Views */ = {
isa = PBXGroup;
children = (
0414FF111B94959700C7B00E /* PurchaseNoticeCell.h */,
0414FF121B94959700C7B00E /* PurchaseNoticeCell.m */,
0414FF131B94959700C7B00E /* SelectCompanyViewController.h */,
0414FF141B94959700C7B00E /* SelectCompanyViewController.m */,
0414FF151B94959700C7B00E /* ShopDetaileViewController.h */,
0414FF161B94959700C7B00E /* ShopDetaileViewController.m */,
);
path = Views;
sourceTree = "<group>";
};
351CFF4A1B90633700F30866 /* Controllers */ = {
isa = PBXGroup;
children = (
......@@ -1032,8 +1076,8 @@
35321F691B97EF3600E5C670 /* GXFPopNewProductViewController.m */,
35CF337F1B9542BE001211EF /* GXFNewProcessViewController.h */,
35CF33801B9542BE001211EF /* GXFNewProcessViewController.m */,
358432F21B994EDD007E73ED /* GXFSeeProcessViewController.h */,
358432F31B994EDD007E73ED /* GXFSeeProcessViewController.m */,
358432F21B994EDD007E73ED /* GXFListProcessViewController.h */,
358432F31B994EDD007E73ED /* GXFListProcessViewController.m */,
);
path = Controllers;
sourceTree = "<group>";
......@@ -1066,10 +1110,10 @@
358432ED1B993BAF007E73ED /* GXFProcessMaterialTableViewCell.m */,
358432EF1B993BD8007E73ED /* GXFProcessProductTableViewCell.h */,
358432F01B993BD8007E73ED /* GXFProcessProductTableViewCell.m */,
35B462D71B9C3D7D00AE2C3E /* GXFProcessMaterialItemView.h */,
35B462D81B9C3D7D00AE2C3E /* GXFProcessMaterialItemView.m */,
35B462DA1B9C3D9600AE2C3E /* GXFProcessProductItemView.h */,
35B462DB1B9C3D9600AE2C3E /* GXFProcessProductItemView.m */,
35D56A7B1B9D4E8300996C28 /* GXFProcessCell.h */,
35D56A7C1B9D4E8300996C28 /* GXFProcessCell.m */,
35D56A7E1B9D533900996C28 /* GXFProcessBoltView.h */,
35D56A7F1B9D533900996C28 /* GXFProcessBoltView.m */,
);
path = Views;
sourceTree = "<group>";
......@@ -2170,14 +2214,9 @@
FE17F67A1B85CA5B0078CE96 /* PurchaseNotice */ = {
isa = PBXGroup;
children = (
FE17F67B1B85CA5B0078CE96 /* NewPurchaseNoticeViewController.h */,
FE17F67C1B85CA5B0078CE96 /* NewPurchaseNoticeViewController.m */,
FE17F67D1B85CA5B0078CE96 /* PurchaseNoticeCell.h */,
FE17F67E1B85CA5B0078CE96 /* PurchaseNoticeCell.m */,
FE17F67F1B85CA5B0078CE96 /* SeePurchaseNoticeViewController.h */,
FE17F6801B85CA5B0078CE96 /* SeePurchaseNoticeViewController.m */,
FE17F6811B85CA5B0078CE96 /* ShopDetaileViewController.h */,
FE17F6821B85CA5B0078CE96 /* ShopDetaileViewController.m */,
0414FF0A1B94959700C7B00E /* Controllers */,
0414FF0F1B94959700C7B00E /* Models */,
0414FF101B94959700C7B00E /* Views */,
);
path = PurchaseNotice;
sourceTree = "<group>";
......@@ -2340,14 +2379,15 @@
C10C909B1AE56E8700B911CD /* JTOptionsEntity.m in Sources */,
C11A34621B24485100079129 /* ICRStoreResult.m in Sources */,
35CF33841B954F35001211EF /* GXFTableViewCell.m in Sources */,
04B4A3871B9CAAD700D88D68 /* ShopDetail.m in Sources */,
7217E9E91B72364300FE5C1D /* SurveyResult.m in Sources */,
C10214DB1AD90A3F0024637E /* ICRFunctionBaseView.m in Sources */,
35B448DF1B9B0A73001209E2 /* ProductBillCell.m in Sources */,
35CF337B1B953F9A001211EF /* GXFProcessMaterial.m in Sources */,
FE4F17251B72FAAB00924DED /* ChosePersonViewController.m in Sources */,
30D7495F1ACE8F4400C63BA1 /* ICRConfigurationViewController.m in Sources */,
FE17F6841B85CA5B0078CE96 /* PurchaseNoticeCell.m in Sources */,
FE2FCC821B745E1A00BBC6FB /* SurveyDetailViewController.m in Sources */,
0414FF171B94959700C7B00E /* NewPurchaseNoticeViewController.m in Sources */,
35CF33901B95AF1B001211EF /* GXFBaseSearchViewController.m in Sources */,
FE2FCC8B1B74A9EE00BBC6FB /* SurveyResultCell.m in Sources */,
C182E40E1AD4CE0B009BB9DB /* IBTModel.m in Sources */,
......@@ -2358,10 +2398,10 @@
C142D2BE1AC3A155000109A7 /* UIView+FindUIViewController.m in Sources */,
35C3C0BF1AE95F1D0035AC8A /* UIImage+Rotate.m in Sources */,
7281A0C51B89BF1C0052B1AC /* ChooseVendorViewController.m in Sources */,
04F6E70A1B9B08A500550849 /* PurchaseNoticeViewController.m in Sources */,
35CF337E1B953FFF001211EF /* GXFProcessProduct.m in Sources */,
C11A344D1B1BE27200079129 /* ICRPatrolAllStoreViewController.m in Sources */,
C10214DD1AD90A3F0024637E /* ICRFunctionEntity.m in Sources */,
FE17F6831B85CA5B0078CE96 /* NewPurchaseNoticeViewController.m in Sources */,
FE4678AA1B8D60F900B5EDA3 /* ChooseTypeViewController.m in Sources */,
30DB92A61ADD039F00271835 /* ICRAnnocementContentView.m in Sources */,
C142D2B21AC3A155000109A7 /* UIFont+Custom.m in Sources */,
......@@ -2394,6 +2434,7 @@
C11A34661B24487D00079129 /* ICRAnswer.m in Sources */,
C1D017171AD8EF8100CD9CB8 /* IBTSegmentedControl.m in Sources */,
C10C90901AE54FE300B911CD /* IBTDatePickerViewController.m in Sources */,
0414FF1A1B94959700C7B00E /* SelectCompanyViewController.m in Sources */,
C1C5644B1AD66EB4006A1050 /* ICRTaskListViewController.m in Sources */,
35CF33981B96BB02001211EF /* GXFPaging.m in Sources */,
35CF338D1B95A442001211EF /* GXFSearchView.m in Sources */,
......@@ -2402,6 +2443,7 @@
C1FE50501AE024FA00C18080 /* UIActionSheet+Blocks.m in Sources */,
C123A92B1B26EDDA003C0C36 /* ICRQuestionHelperView.m in Sources */,
7281A0BF1B8980E60052B1AC /* PurchaseBill.m in Sources */,
0414FF191B94959700C7B00E /* PurchaseNoticeCell.m in Sources */,
7217E9EB1B72364300FE5C1D /* HPGrowingTextView.m in Sources */,
72C803521B7B897B00990363 /* DataManager.m in Sources */,
C1C5643E1AD62BD8006A1050 /* ICRPlaceholderTextView.m in Sources */,
......@@ -2473,13 +2515,11 @@
30D749551ACE421A00C63BA1 /* IBTUITextField.m in Sources */,
7217E9EA1B72364300FE5C1D /* BoltMaskView.m in Sources */,
C11A346B1B2451D500079129 /* NALLabelsMatrix.m in Sources */,
35B462D91B9C3D7D00AE2C3E /* GXFProcessMaterialItemView.m in Sources */,
C17DE85A1AD81D1600581AA6 /* NSMutableArray+SafeInsert.m in Sources */,
35C3C0B91AE9567B0035AC8A /* ICRNavigationViewController.mm in Sources */,
35321F6A1B97EF3600E5C670 /* GXFPopNewProductViewController.m in Sources */,
C123A8FB1B2561E1003C0C36 /* JTPopOverWindow.m in Sources */,
72F56CB21B76EC200077F0C9 /* SurveyUser.m in Sources */,
FE17F6861B85CA5B0078CE96 /* ShopDetaileViewController.m in Sources */,
C142D2B41AC3A155000109A7 /* UIImage+Helper.m in Sources */,
C18AEA9E1AD2F48200A1DB7B /* ICRStore.m in Sources */,
C15295BB1B244C8E00DF60D1 /* ICRQScoreViewController.m in Sources */,
......@@ -2510,13 +2550,13 @@
FEAE16E91B79C9F9009D9E01 /* ResultView.m in Sources */,
FEA2F30C1B84687D00D64735 /* FooterCell.m in Sources */,
C142D2C01AC3A155000109A7 /* UIView+ViewFrameGeometry.m in Sources */,
FE17F6851B85CA5B0078CE96 /* SeePurchaseNoticeViewController.m in Sources */,
C1FE50451AE0249A00C18080 /* IBTImagePicker.m in Sources */,
FEA2F3091B8459DA00D64735 /* HeaderCell.m in Sources */,
C1E108611ADA8D3800620375 /* ICRAttachment.m in Sources */,
C159187C1AC435DF0013B391 /* IBTAdditionsObserver.m in Sources */,
C18AEA8C1AC9855400A1DB7B /* IBTLoadingView.m in Sources */,
C10C90A11AE5751D00B911CD /* ICRPost.m in Sources */,
0414FF1B1B94959700C7B00E /* ShopDetaileViewController.m in Sources */,
7217E9F21B72364300FE5C1D /* StartTimeView.m in Sources */,
C1FE50351AE020D400C18080 /* IBTAudioController.m in Sources */,
7281A0C21B898A040052B1AC /* PurchaseDetailViewController.m in Sources */,
......@@ -2526,6 +2566,7 @@
30F7F5711ADE723100A9B24E /* ICRAttachmentCellContentView.m in Sources */,
C15918451AC062460013B391 /* IBTBadgeView.m in Sources */,
7281A0C81B89BFE60052B1AC /* Vendor.m in Sources */,
35D56A7D1B9D4E8300996C28 /* GXFProcessCell.m in Sources */,
C15295C31B2451AC00DF60D1 /* ICRQReseachViewController.m in Sources */,
358432F71B998ED2007E73ED /* GXFProductUnit.m in Sources */,
C15918531AC062460013B391 /* IBTUINavigationController.m in Sources */,
......@@ -2545,11 +2586,10 @@
C1E1085D1ADA577500620375 /* ICRTaskDetailContentView.m in Sources */,
C14BE30E1ADB86DB0049F1AA /* NSData+EncodeAdditions.m in Sources */,
FEA2F3031B8453C700D64735 /* GoodsViewController.m in Sources */,
35B462DC1B9C3D9600AE2C3E /* GXFProcessProductItemView.m in Sources */,
FE0C9B091B7C543D00335B39 /* User.m in Sources */,
C1E093041AC8E8E0003B7126 /* ICRCheckBox.m in Sources */,
C1864A561B0B0D9D00D11C4E /* ICRPostTask.m in Sources */,
358432F41B994EDD007E73ED /* GXFSeeProcessViewController.m in Sources */,
358432F41B994EDD007E73ED /* GXFListProcessViewController.m in Sources */,
FE2FCC7F1B74511000BBC6FB /* ChooseProductViewController.m in Sources */,
351CFF5E1B90633700F30866 /* GXFNoticeFunctionTableViewCell.m in Sources */,
FE2FCC881B7492C500BBC6FB /* ResultDetailViewController.m in Sources */,
......@@ -2559,6 +2599,7 @@
C1FE504E1AE024FA00C18080 /* RIButtonItem.m in Sources */,
C18AEA9A1AD2749200A1DB7B /* ICRStoreListViewController.m in Sources */,
351CFF591B90633700F30866 /* GXFFunctionsViewController.m in Sources */,
35D56A801B9D533900996C28 /* GXFProcessBoltView.m in Sources */,
7217E9F11B72364300FE5C1D /* SortMaskView.m in Sources */,
7217E9E71B72364300FE5C1D /* Attachment.m in Sources */,
30ECD6241B00948A0088C57A /* ICRPatrolPlanCellContentView.m in Sources */,
......@@ -2567,6 +2608,7 @@
FE17F6791B85847D0078CE96 /* QueryOrder.m in Sources */,
C15039221ADE39190081A686 /* IBTUIControl.m in Sources */,
C112BC4D1AD91CF800F75F58 /* ICRPatrolDetailViewController.m in Sources */,
0414FF181B94959700C7B00E /* SeePurchaseNoticeViewController.m in Sources */,
C142D2BC1AC3A155000109A7 /* UITableViewCell+Helper.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -2784,7 +2826,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
......@@ -2822,7 +2864,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = NO;
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
......@@ -2890,7 +2932,7 @@
INFOPLIST_FILE = XFFruitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = XFFruitTests;
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
......@@ -2910,7 +2952,7 @@
INFOPLIST_FILE = XFFruitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = XFFruitTests;
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
......
......@@ -253,6 +253,40 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
failure:(void (^)(id))fail;
//1·保存采购通知单
- (void)savePurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//2·获取采购通知单列表
- (void)getPurchaseNoticeListWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//3·采购通知单明细(读)
- (void)getPurchaseNoticeDetailedWithPurchaseUuid:(NSString *)purchaseUuid success:(void (^)(id))succ
failure:(void (^)(id))fail;
//4·保存并提交采购通知单
- (void)saveAndSubmitPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//5·提交采购通知单
- (void)ComitPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//6·接受采购通知单
- (void)acceptPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//7·结束采购通知单
- (void)finishPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//8·获取采购通知单跟进记录
- (void)getPurchaseNoticeRecodWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//添加采购单
- (void)savePurchaseWithData:(id)data
......
......@@ -86,6 +86,16 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
//加工单
XFFHttp_QueryProcess,
XFFHttp_GetProcess,
//采购通知单
XFFHttp_savePurchaseNotice,
XFFHttp_getPurchaseNoticeList,
XFFHttp_getPurchaseNoticeDetailed,
XFFHttp_saveAndSubmitPurchaseNotice,
XFFHttp_ComitPurchaseNotice,
XFFHttp_acceptPurchaseNotice,
XFFHttp_finishPurchaseNotice,
XFFHttp_getPurchaseNoticeRecod,
//采购单
XFFHttp_PurchaseSave,
......@@ -159,6 +169,16 @@ static NSString * const ICRHTTPInterface[] = {
//加工单
[XFFHttp_QueryProcess ] = @"process/query",
[XFFHttp_GetProcess ] = @"process/get",
//采购通知单
[XFFHttp_savePurchaseNotice] = @"purchase/notice/save",
[XFFHttp_getPurchaseNoticeList] = @"purchase/notice/query",
[XFFHttp_getPurchaseNoticeDetailed] = @"purchase/notice/get/",
[XFFHttp_saveAndSubmitPurchaseNotice] = @"purchase/notice/saveandsubmit",
[XFFHttp_ComitPurchaseNotice] = @"purchase/notice/submit/",
[XFFHttp_acceptPurchaseNotice] = @"purchase/notice/accept/",
[XFFHttp_finishPurchaseNotice] = @"purchase/notice/finish/",
[XFFHttp_getPurchaseNoticeRecod] = @"purchase/trace/get/",
//采购单
......@@ -1800,12 +1820,13 @@ acceptTypeJson:YES
};
NSDictionary *dict = data;
NSString *urlStr = [[self class] UrlForPluginHTTPAction:XFFHttp_QueryProcess ];
[self GET:urlStr
parameters:dict
needToken:NO
acceptTypeJson:YES
success:success
failure:failure];
[self POST:urlStr parameters:dict needToken:NO acceptTypeJson:YES success:success failure:failure];
// [self GET:urlStr
// parameters:dict
// needToken:NO
//acceptTypeJson:YES
// success:success
// failure:failure];
}
//7.3 加工单明细(读) [已实现]
- (void)getResultWithProcessUuid:(NSString *)processUuid
......@@ -1980,5 +2001,80 @@ acceptTypeJson:YES
success:success
failure:failure];
}
//1·保存采购通知单
- (void)savePurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
}
//2·获取采购通知单列表
- (void)getPurchaseNoticeListWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
CLog(@"%@", responseObject);
if (succ) {
succ( responseObject );
}
};
void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
CLog(@"%@", error);
if (fail) {
fail( error );
}
};
NSDictionary *dict = data;
NSString *urlStr = [[self class] UrlForPluginHTTPAction:XFFHttp_getPurchaseNoticeList];
[self POST:urlStr
parameters:dict
needToken:NO
acceptTypeJson:YES
success:success
failure:failure];
}
//3·采购通知单明细(读)
- (void)getPurchaseNoticeDetailedWithPurchaseUuid:(NSString *)purchaseUuid success:(void (^)(id))succ
failure:(void (^)(id))fail
{
}
//4·保存并提交采购通知单
- (void)saveAndSubmitPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
}
//5·提交采购通知单
- (void)ComitPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
}
//6·接受采购通知单
- (void)acceptPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
}
//7·结束采购通知单
- (void)finishPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
}
//8·获取采购通知单跟进记录
- (void)getPurchaseNoticeRecodWithData:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail
{
}
@end
......@@ -19,6 +19,7 @@
//Avatar
#define KNOTIFICATION_saveMaterial @"KNOTIFICATION_saveMaterial"
#define KNOTIFICATION_editMaterial @"KNOTIFICATION_editMaterial"
#define KNOTIFICATION_deleteMaterial @"KNOTIFICATION_deleteMaterial"
#define KNOTIFICATION_saveProduct @"KNOTIFICATION_saveProduct"
#define KNOTIFICATION_editProduct @"KNOTIFICATION_editProduct"
......
......@@ -136,6 +136,12 @@
#define PURCHASE_STATE_FINISHED @"finished"
//加工单状态
#define PROCESS_STATE_PROCESSINF @"processing"
#define PROCESS_STATE_ABORTED @"aborted"
#define PROCESS_STATE_FINISHED @"finished"
#define ShowMessage(msg) [[[UIAlertView alloc] initWithTitle:@"温馨提示" message:msg delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil] show]
//类型
......
......@@ -24,12 +24,16 @@
#import "NewPurchaseViewController.h"
#import "PurchaseViewController.h"
#import"PurchaseNoticeViewController.h"
#import "GXFFunctionDB.h"
#import "GXFNewProcessViewController.h"
#import "GXFSeeProcessViewController.h"
#import "GXFListProcessViewController.h"
@interface BusinessViewController ()<ICRFunctionBaseViewDelegate,UITableViewDataSource,UITableViewDelegate>
@property (nonatomic, strong) ICRFunctionBaseView *c_functionBaseView;
@property (nonatomic, strong) UITableView *c_tableView;
@end
@implementation BusinessViewController
......@@ -143,8 +147,8 @@
break;
case kFunctionSeePurchaseNotice://查看采购通知单
{
SeePurchaseNoticeViewController *svc =
[[SeePurchaseNoticeViewController alloc] init];
PurchaseNoticeViewController *svc =
[[PurchaseNoticeViewController alloc] init];
svc.title = [IBTCommon localizableString:@"Survey3"];
[self PushViewController:svc animated:YES];
}
......@@ -171,7 +175,7 @@
}
break;
case kFunctionSeeProcessing:{
GXFSeeProcessViewController *seeProcessVC= [[GXFSeeProcessViewController alloc]init];
GXFListProcessViewController *seeProcessVC= [[GXFListProcessViewController alloc]init];
[self PushViewController:seeProcessVC animated:YES];
}
break;
......
......@@ -32,7 +32,7 @@
#import "GXFFunction.h"
#import "GXFNoticeFunctionTableViewCell.h"
#import "GXFFunctionCollectionViewCell.h"
#import "GXFSeeProcessViewController.h"
#import "GXFListProcessViewController.h"
......@@ -282,7 +282,7 @@ static NSString *collectionCellID = @"collectionCell";
}
break;
case kFunctionSeeProcessing:{
GXFSeeProcessViewController *seeProcessVC= [[GXFSeeProcessViewController alloc]init];
GXFListProcessViewController *seeProcessVC= [[GXFListProcessViewController alloc]init];
[self PushViewController:seeProcessVC animated:YES];
}
break;
......
......@@ -8,6 +8,6 @@
#import <UIKit/UIKit.h>
@interface GXFSeeProcessViewController : UIViewController
@interface GXFListProcessViewController : UIViewController
@end
......@@ -6,14 +6,14 @@
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "GXFSeeProcessViewController.h"
#import "SurveyListCell.h"
#import "Survey.h"
#import "SortMaskView.h"
#import "BoltMaskView.h"
#import "SurveyDetailViewController.h"
#import "NewSurveyViewController.h"
#import "GXFListProcessViewController.h"
#import "GXFProcessCell.h"
#import "GXFProcessBill.h"
//#import "SeePurchaseNoticeViewController.h"
#import "QueryOrder.h"
#import "SortMaskView.h"
#import "GXFProcessBoltView.h"
#import "MJRefresh.h"
#define TopMargin 44
......@@ -22,18 +22,18 @@
#define BtnWidth 60
#define BtnHeight 24
#define BtnSize 16
typedef enum : NSUInteger {
SortTag = 3000,
BoltTag
} BtnTag;
@interface GXFSeeProcessViewController ()<UITableViewDataSource,UITableViewDelegate,BoltMaskViewDelegate,SortMaskViewDelegate>
@interface GXFListProcessViewController ()<UITableViewDataSource,UITableViewDelegate,GXFProcessBoltViewDelegate,SortMaskViewDelegate>
{
UIView *_maskView;
UIButton *currentBtn;
SortMaskView *_sortView;
BoltMaskView *_boltView;
GXFProcessBoltView*_boltView;
UIBarButtonItem *_sureBtn;
UIButton *_sortBtn;
UIButton *_boltBtn;
......@@ -43,101 +43,35 @@ typedef enum : NSUInteger {
}
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSString *billNumberLike;
@property (nonatomic,strong)NSString *state;//未提交=initial已提交=submitted调研中=insurvey已完成=finished
@property (nonatomic,strong)NSString *titleLike;
@property (nonatomic,strong)NSString *noticeLike;
@property (nonatomic,strong)NSString *state;
@property (nonatomic,strong)NSString *billLike;
@property (nonatomic,strong)NSString *orderDirection;//asc(升序),desc(降序)
@end
@implementation GXFSeeProcessViewController
@implementation GXFListProcessViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = @"加工单列表";
self.view.backgroundColor = XXFBgColor;
[self createBackBtn];
[self initData];
[self createTableView];
[self getData];
//刷新
[self createRefresh];
[self getData];
}
- (void)viewWillAppear:(BOOL)animated {
__weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
__strong __typeof(weakSelf)strongSelf = weakSelf;
//[strongSelf fetchtSurveyList:data];
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTips:data];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
NSDictionary *queryOrderDict = @{@"direction":@"",@"field":@"billNumber"};
NSDictionary *dict = @{
@"billNumberLike":@"",
@"state":@"",
@"titleLike":@"",
@"queryOrders":@[queryOrderDict],
@"pageNumber":@(0),
@"pageSize":@(20)};
[[ICRHTTPController sharedController] querySurveyWithBillData:dict success:succ failure:fail];
// Do any additional setup after loading the view.
}
- (void)initData{
self.view.backgroundColor = XXFBgColor;
self.dataArr = [NSMutableArray array];
}
- (void)createRefresh{
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
if (_isRefresh) {
return ;
}
_isRefresh = YES;
_currentPage = 0;
[self getData];
}];
self.tableView.header.lastUpdatedTimeKey = SurveyUpdateDate;
self.tableView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (_isLoadMore) {
return ;
}
_isLoadMore = YES;
_currentPage ++;
[self getData];
} ];
}
#pragma mark - 结束刷新
- (void)endRefreshing{
_isLoadMore = NO;
_isRefresh = NO;
[self.tableView.header endRefreshing];
[self.tableView.footer endRefreshing];
}
//- (void)viewWillAppear:(BOOL)animated{
// [super viewWillAppear:animated];
// if ([ICRUserUtil sharedInstance].needFresh && self.tableView != nil) {
// [self.tableView.header beginRefreshing];
// }
//}
- (void)getData{
[ICRUserUtil sharedInstance].needFresh = NO;
__weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf fetchtSurveyList:data];
[strongSelf fetchtPuchaseList:data];
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
......@@ -154,8 +88,8 @@ typedef enum : NSUInteger {
[orderArr addObject:[order dictForCommit]];
}
id billObject = [NSNull null];
if (self.billNumberLike.length > 0) {
billObject = self.billNumberLike;
if (self.billLike.length > 0) {
billObject = self.billLike;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"billNumber";
......@@ -173,12 +107,12 @@ typedef enum : NSUInteger {
[orderArr addObject:[order dictForCommit]];
}
}
id titleObject = [NSNull null];
if (self.titleLike.length > 0) {
titleObject = self.titleLike;
id noticeObject = [NSNull null];
if (self.noticeLike.length > 0) {
noticeObject = self.noticeLike;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"title";
order.field = @"noticeNumber";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
......@@ -190,32 +124,37 @@ typedef enum : NSUInteger {
[orderArr addObject:[order dictForCommit]];
}
// 网络请求
NSDictionary *dict = @{
@"billNumberLike":billObject,
@"state":stateObject,
@"titleLike":titleObject,
// @"titleLike":[NSNull null],
@"queryOrders":orderArr,
@"userUuid":userUtil.userId,
@"pageNumber":@(_currentPage),
@"pageSize":@(20)};
[[ICRHTTPController sharedController] querySurveyWithBillData:dict success:succ failure:fail];
// [[ICRHTTPController sharedController] queryPurchaseWithData:dict success:succ failure:fail];
[[ICRHTTPController sharedController] processQueryWithBillData:dict success:succ failure:fail];
}
#pragma mark -成功
- (void)fetchtSurveyList:(id)data{
//刷新列表
- (void)fetchtPuchaseList:(id)data{
if (data) {
NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"] ;
if (success == 1) {
if (_currentPage == 0) {
if (self.dataArr.count > 0) {
[self.dataArr removeAllObjects];
}
// if (self.dataArr.count > 0) {
// [self.dataArr removeAllObjects];
// }
}
NSArray *recodesArr = data[ @"data" ][ @"records" ];
for (NSDictionary *surveyDict in recodesArr) {
Survey *survey = [[Survey alloc]init];
[survey setValuesForKeysWithDictionary:surveyDict];
[self.dataArr addObject:survey];
for (NSDictionary *purchaseBillDict in recodesArr) {
GXFProcessBill *processBill = [[GXFProcessBill alloc]init];
// PurchaseBill *purchaseBill = [[PurchaseBill alloc]init];
[processBill setValuesForKeysWithDictionary:purchaseBillDict];
[self.dataArr addObject:processBill];
}
NSDictionary *pageDict = data[ @"data" ][ @"paging" ];
NSInteger pageCount = [pageDict[@"pageCount"] integerValue];
......@@ -233,8 +172,36 @@ typedef enum : NSUInteger {
}else{
[IBTLoadingView showTips:@" 无记录 "];
}
}
- (void)createRefresh{
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
if (_isRefresh) {
return ;
}
_isRefresh = YES;
_currentPage = 0;
[self getData];
}];
self.tableView.header.lastUpdatedTimeKey = PurchaseUpdateDate;
self.tableView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (_isLoadMore) {
return ;
}
_isLoadMore = YES;
_currentPage ++;
[self getData];
} ];
}
#pragma mark - 结束刷新
- (void)endRefreshing{
_isLoadMore = NO;
_isRefresh = NO;
[self.tableView.header endRefreshing];
[self.tableView.footer endRefreshing];
}
- (void)createTableView
{
_sureBtn = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)];
......@@ -248,6 +215,7 @@ typedef enum : NSUInteger {
_boltBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_boltBtn];
self.tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, TopMargin,ScreenSize.width, ScreenSize.height - 64 - TopMargin)) style:(UITableViewStylePlain)];
self.tableView.delegate = self;
self.tableView.dataSource = self;
......@@ -259,44 +227,6 @@ typedef enum : NSUInteger {
[self.view addSubview:_maskView];
}
//检测排序的颜色
- (void)checkSortBtnColor{
if (self.orderDirection.length > 0) {
[_sortBtn setImage:[UIImage imageNamed:@"select_arrow_up_text"] forState:UIControlStateNormal];
}else{
[_sortBtn setImage:[UIImage imageNamed:@"black_arrow_down_with_text"] forState:UIControlStateNormal];
}
}
- (void)checkBoltBtnColor{
if (self.state.length > 0 || self.billNumberLike.length > 0 || self.titleLike.length > 0) {
[_boltBtn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
}else{
[_boltBtn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal];
}
}
#pragma mark - 确定
- (void)sureClick{
if (self.state.length > 0 || self.billNumberLike.length > 0 || self.titleLike.length > 0 ||self.orderDirection.length > 0) {
[_boltView.titleFiled resignFirstResponder];
[_boltView.billFiled resignFirstResponder];
_currentPage = 0;
//请求
[self getData];
//还原数据
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
}
#pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
......@@ -336,10 +266,12 @@ typedef enum : NSUInteger {
}else{
[btn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
if (_boltView == nil) {
_boltView = [[BoltMaskView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state title:self.titleLike bill:self.billNumberLike];
_boltView = [[GXFProcessBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 200) state:self.state billNumber:self.billLike noticeNumber:self.noticeLike];
_boltView.backgroundColor = XXFBgColor;
_boltView.delegate = self;
_boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"不限",@"未提交",@"已提交" ,@"调研中",nil];
//processin(进行中)aborted(已作废)finished(已完成)
_boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"进行中",@"已作废" ,@"已完成",nil];
[_maskView addSubview:_boltView];
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame;
......@@ -347,7 +279,6 @@ typedef enum : NSUInteger {
_boltView.frame = sortFrame;
}];
currentBtn = btn;
}
}
}
......@@ -391,6 +322,45 @@ typedef enum : NSUInteger {
}];
}
}
//检测排序的颜色
- (void)checkSortBtnColor{
if (self.orderDirection.length > 0) {
[_sortBtn setImage:[UIImage imageNamed:@"select_arrow_up_text"] forState:UIControlStateNormal];
}else{
[_sortBtn setImage:[UIImage imageNamed:@"black_arrow_down_with_text"] forState:UIControlStateNormal];
}
}
- (void)checkBoltBtnColor{
if (self.state.length > 0 || self.noticeLike.length > 0 || self.billLike.length > 0) {
[_boltBtn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
}else{
[_boltBtn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal];
}
}
#pragma mark - 确定
- (void)sureClick{
if (self.state.length > 0 || self.billLike.length > 0 || self.noticeLike.length > 0 ||self.orderDirection.length > 0) {
//[_boltView.noticeFiled resignFirstResponder];
[_boltView.billFiled resignFirstResponder];
_currentPage = 0;
//请求
[self getData];
//还原数据
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
}
#pragma mark - sortDelegate
- (void)getSortValueSelectRow:(NSString *)state{
if (state.length > 0) {
......@@ -403,26 +373,27 @@ typedef enum : NSUInteger {
self.state = state;
CLog(@"%@",state);
}
- (void)getTitleLike:(NSString *)titleLike{
self.titleLike = titleLike;
CLog(@"%@",titleLike);
- (void)getbillLike:(NSString *)billLike{
self.billLike = billLike;
CLog(@"%@",billLike);
}
- (void)getBillNumber:(NSString *)billNumber{
self.billNumberLike = billNumber;
CLog(@"%@",billNumber);
- (void)getnoticeLike:(NSString *)noticeLike{
self.noticeLike = noticeLike;
CLog(@"%@",noticeLike);
}
- (void)clearBoltInformation{
//清空所有条件
if (self.billNumberLike.length > 0) {
self.billNumberLike = @"";
if (self.billLike.length > 0) {
self.billLike = @"";
}
if (self.titleLike.length > 0) {
self.titleLike = @"";
if (self.noticeLike.length > 0) {
self.noticeLike = @"";
}
if (self.state.length > 0) {
self.state = @"";
}
}
#pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
......@@ -432,48 +403,31 @@ typedef enum : NSUInteger {
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"SurveyID";
SurveyListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
GXFProcessCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[SurveyListCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
cell = [[GXFProcessCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if (self.dataArr.count > 0) {
Survey *survey = self.dataArr[indexPath.row];
[cell setSurvey:survey];
GXFProcessBill *bill = self.dataArr[indexPath.row];
[cell setProcessBill:bill];
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
Survey *survey = nil;
if (self.dataArr.count > 0) {
survey = self.dataArr[indexPath.row];
}
if ([survey.state isEqualToString:SURVEY_STATE_INITIAL]) {
NewSurveyViewController *nvc = [[NewSurveyViewController alloc]init];
nvc.survey = survey;
nvc.navTitle = @"修改行情调研单";
[self PushViewController:nvc animated:YES];
}else if([survey.state isEqualToString:SURVEY_STATE_SUBMITTED] || [survey.state isEqualToString:SURVEY_STATE_INSURVEY]|| [survey.state isEqualToString:SURVEY_STATE_FINISHED]){
SurveyDetailViewController *svc = [SurveyDetailViewController new];
svc.survey = survey;
svc.surveyUuid = survey.uuid;
[self PushViewController:svc animated:YES];
}
}
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn addTarget:self action:@selector(backRV) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
}
- (void)backRV{
[self PopToRootViewControllerAnimated:YES];
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
// SeePurchaseNoticeViewController *pvc = [SeePurchaseNoticeViewController new];
// pvc.title = @"查看采购单";
// pvc.bill = _dataArr[indexPath.row];
// if(indexPath.row == 0){
// pvc.indexPerson = 0;
// }else if(indexPath.row == 1){
// pvc.indexPerson = 1;
// }else if(indexPath.row == 2){
// pvc.indexPerson = 2;
// }
// [self PushViewController:pvc animated:YES];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
......@@ -481,6 +435,7 @@ typedef enum : NSUInteger {
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
......@@ -78,10 +78,14 @@ typedef NS_ENUM(NSInteger, cellRow) {
[self initData];
[self initSubViews];
//原料明细
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addNewMaterail:) name:KNOTIFICATION_saveMaterial object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(editMaterail:) name:KNOTIFICATION_editMaterial object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteMaterail:) name:KNOTIFICATION_deleteMaterial object:nil];
//货物明细
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addNewProduct:) name:KNOTIFICATION_saveProduct object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(editProduct:) name:KNOTIFICATION_editProduct object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deleteProduct:) name:KNOTIFICATION_deleteProduct object:nil];
}
//刷新数据
......@@ -89,6 +93,8 @@ typedef NS_ENUM(NSInteger, cellRow) {
NSIndexSet *indexSet = [[NSIndexSet alloc]initWithIndex:1];
[self.c_tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
}
//原料明细
- (void)addNewMaterail: (NSNotification *)aNotification {
GXFProcessMaterial *material = aNotification.object;
if (_d_materialMuArr ) {
......@@ -96,6 +102,21 @@ typedef NS_ENUM(NSInteger, cellRow) {
[self p_refreshData];
}
}
- (void)editMaterail: (NSNotification *)aNotification {
GXFProcessMaterial *material = aNotification.object;
if (_d_materialMuArr ) {
[_d_materialMuArr replaceObjectAtIndex:_d_editOrDelete withObject:material];
[self p_refreshData];
}
}
- (void)deleteMaterail: (NSNotification *)aNotification {
GXFProcessMaterial *material = aNotification.object;
if (_d_materialMuArr) {
[_d_materialMuArr removeObject:material];////待做:优化为刷新这一条
[self p_refreshData];
}
}
//产品明细
- (void)addNewProduct: (NSNotification *)aNotification {
GXFProcessProduct *product = aNotification.object;
if (_d_productMuArr) {
......@@ -359,17 +380,22 @@ typedef NS_ENUM(NSInteger, cellRow) {
} else {
if (indexPath.row == 0) {
xfCell = [tableView dequeueReusableCellWithIdentifier:addDetailCell];
if (!xfCell) {
xfCell = [[GXFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:addDetailCell];
UIButton *addDetailedButton=[UIButton buttonWithType: UIButtonTypeCustom];
[addDetailedButton setFrame:CGRectMake(xfCell.width * 0.5, 0, xfCell.width * 0.5, xfCell.height)];
[addDetailedButton setTitle:@"+ 点击添加商品明细" forState:UIControlStateNormal];
[addDetailedButton addTarget:self action:@selector(addNewInfoDetailed) forControlEvents:UIControlEventTouchUpInside];
[addDetailedButton setTitleColor:HexColor(@"444444") forState:UIControlStateNormal];
[xfCell.contentView addSubview:addDetailedButton];
//if (!xfCell) {
if (_d_isProduct) {
[addDetailedButton setTitle:@"+ 点击添加商品明细" forState:UIControlStateNormal];
} else {
[addDetailedButton setTitle:@"+ 点击添加原料明细" forState:UIControlStateNormal];
}
// }
xfCell.selectionStyle = UITableViewCellAccessoryNone;
return xfCell;
} else if ( indexPath.row == 1){
......@@ -389,25 +415,59 @@ typedef NS_ENUM(NSInteger, cellRow) {
return xfCell;
}else {
static NSString *cellID = @"ProductCell";
// if(_d_isProduct)
GXFProcessMaterialTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
static NSString *cellIDProduct = @"ProductCell";
static NSString *cellIDMaterial = @"materialCell";
if(_d_isProduct){
//GXFProcessProductTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIDProduct];
//if (cell == nil) {
if (cell == nil) {
if (_d_isProduct) {
GXFProcessProduct *processP = (GXFProcessProduct *)_d_productMuArr[indexPath.row - 2];
cell = [[GXFProcessProductTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID processProduct:processP];
} else {
GXFProcessMaterial *pm = (GXFProcessMaterial *)_d_materialMuArr[indexPath.row - 2];
cell = [[GXFProcessMaterialTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID processMaterial:pm];
}
GXFProcessProductTableViewCell *cell = [[GXFProcessProductTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIDProduct processProduct:processP];
// } else {
// while (cell.contentView.subviews.lastObject != nil) {
// [(UIView *)[cell.contentView.subviews lastObject] removeFromSuperview];
// }
// }
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (self.isHiddenEdit) {
cell.editBtn.hidden = YES;
}
if ([self isHaveIndexPath:indexPath]) {
cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
CGRect Linefrmame = cell.lineLabel.frame;
Linefrmame.origin.y = 200-1;
cell.lineLabel.frame = Linefrmame;
CGRect showfrmame = cell.showView.frame;
showfrmame.size.height = 150;
cell.showView.frame = showfrmame;
cell.backgroundColor = XXFBgColor;
}else{
cell.smallImageView.image = [UIImage imageNamed:@"arrowright"];
CGRect Linefrmame = cell.lineLabel.frame;
Linefrmame.origin.y = GXF_TABLEVIEW_NOMALCELL_HEIGHT-1;
cell.lineLabel.frame = Linefrmame;
CGRect showfrmame = cell.showView.frame;
showfrmame.size.height = 0;
cell.showView.frame = showfrmame;
cell.backgroundColor = [UIColor whiteColor];
}
cell.editBtn.tag = indexPath.row;
[cell.editBtn addTarget:self action:@selector(editClick:) forControlEvents:UIControlEventTouchUpInside];
return cell;
} else {
// GXFProcessMaterialTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIDProduct];
//if (cell == nil) {
GXFProcessMaterial *processM = (GXFProcessMaterial *)_d_materialMuArr[indexPath.row - 2];
GXFProcessMaterialTableViewCell * cell = [[ GXFProcessMaterialTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIDMaterial processMaterial:processM];
// }
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (self.isHiddenEdit) {
cell.editBtn.hidden = YES;
}
if ([self isHaveIndexPath:indexPath]) {
cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
......@@ -432,6 +492,48 @@ typedef NS_ENUM(NSInteger, cellRow) {
[cell.editBtn addTarget:self action:@selector(editClick:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
// if (cell == nil) {
// if (_d_isProduct) {
// GXFProcessProduct *processP = (GXFProcessProduct *)_d_productMuArr[indexPath.row - 2];
// cell = [[GXFProcessProductTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID processProduct:processP];
// } else {
// GXFProcessMaterial *pm = (GXFProcessMaterial *)_d_materialMuArr[indexPath.row - 2];
// cell = [[GXFProcessMaterialTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID processMaterial:pm];
// }
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// if (self.isHiddenEdit) {
// cell.editBtn.hidden = YES;
// }
// } else {
//
// }
// if ([self isHaveIndexPath:indexPath]) {
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
// CGRect Linefrmame = cell.lineLabel.frame;
// Linefrmame.origin.y = 200-1;
// cell.lineLabel.frame = Linefrmame;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = 150;
// cell.showView.frame = showfrmame;
// cell.backgroundColor = XXFBgColor;
// }else{
// cell.smallImageView.image = [UIImage imageNamed:@"arrowright"];
// CGRect Linefrmame = cell.lineLabel.frame;
// Linefrmame.origin.y = GXF_TABLEVIEW_NOMALCELL_HEIGHT-1;
// cell.lineLabel.frame = Linefrmame;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = 0;
// cell.showView.frame = showfrmame;
// cell.backgroundColor = [UIColor whiteColor];
// }
// cell.editBtn.tag = indexPath.row;
// [cell.editBtn addTarget:self action:@selector(editClick:) forControlEvents:UIControlEventTouchUpInside];
// return cell;
//
}
}
......@@ -535,7 +637,10 @@ typedef NS_ENUM(NSInteger, cellRow) {
GXFPopNewProductViewController *productVC = [[GXFPopNewProductViewController alloc]initWithProcessProduct:product isEdit: YES];
[self PushViewController:productVC animated:NO];
} else {
self.d_editOrDelete = btn.tag - 2;
GXFProcessMaterial *material = _d_materialMuArr[btn.tag - 2];
GXFPopNewMaterialViewController *materialVC = [[GXFPopNewMaterialViewController alloc]initWithProcessMaterial:material isEdit:YES];
[self PushViewController:materialVC animated:NO];
}
}
- (void)selecNewMaterial {
......
......@@ -7,10 +7,11 @@
//
#import <UIKit/UIKit.h>
@class GXFProcessMaterial;
@interface GXFPopNewMaterialViewController : UIViewController
- (instancetype)initWithProcessMaterial: (GXFProcessMaterial *)processMaterial
isEdit: (BOOL) isEdited;
@end
......@@ -34,10 +34,21 @@
@property (nonatomic, strong) NSIndexPath *d_dateIndexPath;
@property (nonatomic, assign) BOOL d_hasSaved;
@property (nonatomic, strong) GXFBottomView *c_bottomV;
@property (nonatomic, assign) BOOL d_isEdited;
@end
@implementation GXFPopNewMaterialViewController
- (instancetype)initWithProcessMaterial: (GXFProcessMaterial *)processMaterial
isEdit: (BOOL) isEdited {
self = [super init];
if (!self) {
return nil;
}
self.d_processMaterial = processMaterial;
self.d_isEdited = isEdited;
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"新增原料明细";
......@@ -127,7 +138,7 @@
xfCell = [tableView dequeueReusableCellWithIdentifier:lblCell]; //
if (!xfCell) {
xfCell = [[GXFTableViewCell alloc]initWithWidth:_c_tableView.width Style:UITableViewCellStyleDefault reuseIdentifier:lblCell textFieldPlaceholder:_d_rightArr[indexPath.row] hasLable:YES backLableText:_d_lableTextArr[indexPath.row - 4]];
xfCell.f_textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
}
}
......@@ -257,13 +268,18 @@
#pragma GXFBottomViewDelegate
- (void)bottomViewleftButtonClicked:(UIButton *)leftBtn {
if (_d_isEdited) {
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_deleteMaterial object:_d_processMaterial];
}
}
- (void)bottomViewRightButtonClicked:(UIButton *)rightBtn {
self.d_hasSaved = YES;
[self.c_bottomV.f_rightBtn setBackgroundColor:GXF_GRAY_COLOR];
if (_d_isEdited) {
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_editMaterial object:_d_processMaterial];
} else {
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_saveMaterial object:_d_processMaterial];
}
......
......@@ -113,7 +113,7 @@
xfCell = [tableView dequeueReusableCellWithIdentifier:lblCell]; //
if (!xfCell) {
xfCell = [[GXFTableViewCell alloc]initWithWidth:_c_tableView.width Style:UITableViewCellStyleDefault reuseIdentifier:lblCell textFieldPlaceholder:_d_rightArr[indexPath.row] hasLable:YES backLableText:_d_lableTextArr[indexPath.row - 3]];
xfCell.f_textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
}
}
......
//
// GXFProcessBoltView.h
// XFFruit
//
// Created by freecui on 15/9/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol GXFProcessBoltViewDelegate <NSObject>
- (void)getBoltValueSelectRow:(NSString *)state;
- (void)getbillLike:(NSString *)billLike;
- (void)getnoticeLike:(NSString *)noticeLike;
- (void)clearBoltInformation;
@end
@interface GXFProcessBoltView : UIView<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,weak)id <GXFProcessBoltViewDelegate>delegate;
@property (nonatomic,strong)UITextField *billFiled;//采购单号类似于
//@property (nonatomic,strong)UITextField *noticeFiled;//通知单号类似于
@property (nonatomic,strong)UITextField *vendorFiled;//供应商uuid类似于
- (instancetype)initWithFrame:(CGRect)frame state:(NSString *)state billNumber:(NSString *)billNumber noticeNumber:(NSString *)noticeNumber;
@end
//
// PurchaseBoltView.m
// XFFruit
//
// Created by n22 on 15/8/26.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "GXFProcessBoltView.h"
#import "MaskCell.h"
#define TableHeight 45
#define LeftMargin 80
#define TotalHeight 224
#define LeftHeight 44
#define BottomHeight 50
@interface GXFProcessBoltView ()<UITextFieldDelegate>
{
UIView *_leftView;
UIButton *_currentBtn;
NSIndexPath *_currentIndexPath;
UIView *_billView;
// UIView *_noticeView;
NSString *_state;
NSString *_billNumber;
NSString *_title;
UIButton *_clearBtn;
}
@property (nonatomic,strong)NSString *state;
@property (nonatomic,strong)NSString *noticeNumber;
@property (nonatomic,strong)NSString *billNumber;
@end
@implementation GXFProcessBoltView
- (instancetype)initWithFrame:(CGRect)frame state:(NSString *)state billNumber:(NSString *)billNumber noticeNumber:(NSString *)noticeNumber{
self = [super initWithFrame:frame];
if (self) {
self.billNumber = billNumber;
self.noticeNumber = noticeNumber;
self.state = state;
[self createView];
[self createRightView];
[self preferData];
}
return self;
}
- (void)preferData{
//processin(进行中)aborted(已作废)finished(已完成)
if ([self.state isEqualToString:PURCHASE_STATE_INITIAL]) {
_currentIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
}else if ([self.state isEqualToString:PROCESS_STATE_PROCESSINF]) {
_currentIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
}else if ([self.state isEqualToString:PROCESS_STATE_FINISHED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
}else if ([self.state isEqualToString:PROCESS_STATE_ABORTED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0];
}else {
}
_billView.hidden = YES;
if(self.billNumber.length > 0){
self.billFiled.text = self.billNumber;
}
// _noticeView.hidden = YES;
// if (self.noticeNumber.length > 0) {
// self.noticeFiled.text = self.noticeNumber;
// }
}
#pragma mark - 创建视图
- (void)createView
{
_leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)];
[self addSubview:_leftView];
NSArray *arr = @[@"按状态",@"加工单号"];//,@"通知单号"];
for (NSInteger i = 0; i<arr.count; i++) {
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight);
[button setTitle:arr[i] forState:UIControlStateNormal];
[button setTitleColor:GXF_DETAIL_COLOR forState:UIControlStateNormal];
if (i == 0) {
button.enabled = NO;
_currentBtn = button;
}
[button setBackgroundImage:[UIImage imageNamed:@"maskEnable"] forState:UIControlStateDisabled];
[button setBackgroundImage:[UIImage imageNamed:@"mask"] forState:UIControlStateNormal];
button.tag = 1001+i;
[button addTarget:self action:@selector(leftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[_leftView addSubview:button];
}
_clearBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_clearBtn.frame = CGRectMake(0, CGRectGetMaxY(_leftView.frame), self.frame.size.width, BottomHeight);
[_clearBtn setTitle:@"清空选项" forState:UIControlStateNormal];
[_clearBtn setTitleColor:GXF_CONTENT_COLOR forState:UIControlStateNormal];
_clearBtn.titleLabel.font = GXF_FIFTEENTEN_SIZE;
[_clearBtn addTarget:self action:@selector(clearBolt) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_clearBtn];
}
- (void)createRightView{
_billView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)];
_billView.backgroundColor = [UIColor whiteColor];
[self addSubview:_billView];
UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)];
titleLabel.font = GXF_FIFTEENTEN_SIZE;
titleLabel.text = @"类似于:";
[_billView addSubview:titleLabel];
self.billFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(titleLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)];
self.billFiled.textAlignment = NSTextAlignmentLeft;
self.billFiled.textColor = GXF_CONTENT_COLOR;
self.billFiled.placeholder = @"输入类似加工单号";
self.billFiled.borderStyle = UITextBorderStyleRoundedRect;
self.billFiled.font = GXF_FIFTEENTEN_SIZE;
self.billFiled.returnKeyType = UIReturnKeyDone;
self.billFiled.delegate = self;
[_billView addSubview:self.billFiled];
// _noticeView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)];
// _noticeView.backgroundColor = [UIColor whiteColor];
// [self addSubview:_noticeView];
// UILabel *billLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)];
// billLabel.font = GXF_FIFTEENTEN_SIZE;
// billLabel.text = @"类似于:";
// [_noticeView addSubview:billLabel];
// self.noticeFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(billLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)];
// self.noticeFiled.textAlignment = NSTextAlignmentLeft;
// self.noticeFiled.textColor = GXF_CONTENT_COLOR;
// self.noticeFiled.placeholder = @"输入类似采购通知单号";
// self.noticeFiled.borderStyle = UITextBorderStyleRoundedRect;
// self.noticeFiled.font = GXF_FIFTEENTEN_SIZE;
// self.noticeFiled.returnKeyType = UIReturnKeyDone;
// self.noticeFiled.delegate = self;
// [_noticeView addSubview:self.noticeFiled];
self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight) style:(UITableViewStylePlain)];
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self addSubview:self.tableView];
}
- (void)leftBtnClick:(UIButton *)btn{
_currentBtn.enabled = YES;
btn.enabled = NO;
_currentBtn = btn;
[self keyBoardHidden];
switch (btn.tag) {
case 1001://状态
{
self.tableView.hidden = NO;
_billView.hidden = YES;
//_noticeView.hidden = YES;
}
break;
case 1002://条件二
{
self.tableView.hidden = YES;
_billView.hidden = NO;
// _noticeView.hidden = YES;
}
break;
case 1003://条件三
{
self.tableView.hidden = YES;
_billView.hidden = YES;
// _noticeView.hidden = NO;
}
break;
default:
break;
}
}
- (void)clearBolt{
if (_billFiled.text.length > 0) {
_billFiled.text = @"";
}
// if (_noticeFiled.text.length > 0) {
// _noticeFiled.text = @"";
// }
if (_currentIndexPath) {
_currentIndexPath = nil;
[self.tableView reloadData];
}
if ([self.delegate respondsToSelector:@selector(clearBoltInformation)]) {
[self.delegate clearBoltInformation];
}
}
#pragma mark - 协议
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"MaskID";
MaskCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[MaskCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID totalWidth: ScreenSize.width - 80 totalHeight:TableHeight];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if (_dataArr.count > 0) {
cell.Commitbtn.hidden = YES;
[cell setTitleStr:self.dataArr[indexPath.row]];
}
if (_currentIndexPath) {
if (indexPath.row == _currentIndexPath.row) {
cell.Commitbtn.hidden = NO;
}else{
cell.Commitbtn.hidden = YES;
}
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//获取选中的cell
MaskCell *currentCell = (MaskCell *)[tableView cellForRowAtIndexPath:_currentIndexPath];
currentCell.Commitbtn.hidden = YES;
MaskCell *cell = (MaskCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.Commitbtn.hidden = NO;
_currentIndexPath = indexPath;
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
NSString *stateStr = @"";
if (indexPath.row == 0) {
stateStr = PROCESS_STATE_PROCESSINF;
}else if(indexPath.row == 1){
stateStr = PROCESS_STATE_FINISHED;
}else if(indexPath.row == 2){
stateStr = PROCESS_STATE_ABORTED;
}else {
}
[self.delegate getBoltValueSelectRow:stateStr];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
[self keyBoardHidden];
return YES;
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
[self keyBoardHidden];
}
- (void)keyBoardHidden{
[self.billFiled resignFirstResponder];
// [self.noticeFiled resignFirstResponder];
}
- (void)textFieldDidEndEditing:(UITextField *)textField{
if (textField == self.billFiled) {
if (self.billFiled.text.length > 0) {
[self.delegate getbillLike:self.billFiled.text];
}
// }else if(textField == self.noticeFiled){
// if (self.noticeFiled.text.length > 0) {
// [self.delegate getnoticeLike:self.noticeFiled.text];
// }
}
}
@end
//
// GXFProcessBillCell.h
// XFFruit
//
// Created by freecui on 15/9/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GXFProcessBill.h"
@interface GXFProcessCell : UITableViewCell
@property (nonatomic,strong)UILabel *billNumberLabel;//加工单号
@property (nonatomic,strong)UILabel *titleLabel;//标题
//@property (nonatomic,strong)UILabel *noticeNumberLabel;//采购通知单号
@property (nonatomic,strong)UILabel *createOperNameLabel;//创建人
@property (nonatomic,strong)UILabel *createTimeLabel;//创建时间
@property (nonatomic,strong)UILabel *lineLabel;
@property (nonatomic,strong)UIButton *stateBtn;
@property (nonatomic,strong)GXFProcessBill *processBill;
@end
//
// PurchaseCell.m
// XFFruit
//
// Created by 陈俊俊 on 15/8/23.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "GXFProcessCell.h"
#define TitleSize 16
#define ContentSize 14
#define LeftMargin 90
#define TopMargin 10
#define TitleHeight 20
#define TableHeight 120
@implementation GXFProcessCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self bulidLayout];
}
return self;
}
- (void)bulidLayout
{
self.stateBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.stateBtn.frame = CGRectMake(TopMargin *2 , TopMargin, LeftMargin - TopMargin*3, 20);
self.stateBtn.titleLabel.font = FontSize(ContentSize);
[self.stateBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
self.stateBtn.enabled = NO;
self.billNumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, TopMargin, ScreenSize.width - LeftMargin, TitleHeight))];
self.billNumberLabel.textColor = GXF_CONTENT_COLOR;
self.billNumberLabel.font = FontSize(TitleSize);
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.billNumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight*2))];
self.titleLabel.numberOfLines = 0;
self.titleLabel.textColor = GXF_CELL_COLOR;
self.titleLabel.font = FontSize(ContentSize);
self.createOperNameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.titleLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.createOperNameLabel.textColor = GXF_CELL_COLOR;
self.createOperNameLabel.font = FontSize(ContentSize);
self.createTimeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.createOperNameLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.createTimeLabel.textColor = GXF_CELL_COLOR;
self.createTimeLabel.font = FontSize(ContentSize);
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin - TopMargin * 2, 1))];;
self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.stateBtn];
[self.contentView addSubview:self.billNumberLabel];
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.createOperNameLabel];
[self.contentView addSubview:self.createTimeLabel];
[self.contentView addSubview:self.lineLabel];
}
- (void)setProcessBill:(GXFProcessBill *)processBill{
self.billNumberLabel.text = [NSString stringWithFormat:@"单号:%@",processBill.billNumber];
self.titleLabel.text = [NSString stringWithFormat:@"标题:%@",processBill.title];
self.createOperNameLabel.text = [NSString stringWithFormat:@"创建人:%@",processBill.create_operName] ;
self.createTimeLabel.text =[NSString stringWithFormat:@"创建时间:%@",processBill.create_time];
NSString *stateStr = @"";
if ([processBill.state isEqualToString:PROCESS_STATE_PROCESSINF]) {
stateStr = @"进行中";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
}else if ([processBill.state isEqualToString:PROCESS_STATE_ABORTED]) {
stateStr = @"已作废";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"finish"] forState:UIControlStateDisabled];
}else if ([processBill.state isEqualToString:PURCHASE_STATE_FINISHED]) {
stateStr = @"已完成";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"initial"] forState:UIControlStateDisabled];
}
[self.stateBtn setTitle:stateStr forState:UIControlStateNormal];
}
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
//
// GXFProcessMaterialItemView.h
// XFFruit
//
// Created by freecui on 15/9/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTUIView.h"
@interface GXFProcessMaterialItemView : IBTUIView
@end
@class GXFProcessMaterial;
@interface GXFProcessMaterialItemView (configure)
- (void)updateWithProcessMaterial: (GXFProcessMaterial *)processMaterial;
@end
#define ICR_ProcessMaterial_ITEM_HEIGTH (130.0f)
\ No newline at end of file
//
// GXFProcessMaterialItemView.m
// XFFruit
//
// Created by freecui on 15/9/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "GXFProcessMaterialItemView.h"
@implementation GXFProcessMaterialItemView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
......@@ -22,6 +22,7 @@
#define ShowWidth 150
#define ShowHeight 20
#import "GXFProcessMaterialTableViewCell.h"
#import "GXFProcessMaterial.h"
@interface GXFProcessMaterialTableViewCell ()
......@@ -102,43 +103,43 @@
self.showBaseCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.showTitleLabel.frame), 0, ShowWidth, ShowHeight))];
self.showBaseCountLabel.textAlignment = NSTextAlignmentLeft;
self.showBaseCountLabel.textColor = HexColor(ShowColor);
self.showBaseCountLabel.text = @"基础数量:10000";
self.showBaseCountLabel.text = [NSString stringWithFormat:@"基础数量:%@",processMaterial.baseQty];//@"基础数量:10000";
self.showBaseCountLabel.font = FontSize(ShowSize);
self.showDateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.showTitleLabel.frame), ShowWidth, ShowHeight))];
self.showDateLabel.textAlignment = NSTextAlignmentLeft;
self.showDateLabel.textColor = HexColor(ShowColor);
self.showDateLabel.text = @"入库时间:2015-02-04";
self.showDateLabel.text = [NSString stringWithFormat:@"入库时间:%@",processMaterial.instockDate ];//@"入库时间:2015-02-04";
self.showDateLabel.font = FontSize(ShowSize);
self.basebaseQtyLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showBaseCountLabel.frame), CGRectGetMaxY(self.showTitleLabel.frame), ShowWidth, ShowHeight))];
self.basebaseQtyLabel.textAlignment = NSTextAlignmentLeft;
self.basebaseQtyLabel.textColor = HexColor(ShowColor);
self.basebaseQtyLabel.text = @"基础单价:11元";
self.basebaseQtyLabel.text = [NSString stringWithFormat:@"基础单价:%@",processMaterial.basePrice];//@"基础单价:11元";
self.basebaseQtyLabel.font = FontSize(ShowSize);
self.totalbaseQtyLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.showDateLabel.frame), ShowWidth, ShowHeight))];
self.totalbaseQtyLabel.textAlignment = NSTextAlignmentLeft;
self.totalbaseQtyLabel.textColor = HexColor(ShowColor);
self.totalbaseQtyLabel.text = @"总金额:1000";
self.totalbaseQtyLabel.text = [NSString stringWithFormat:@"总金额:%@",processMaterial.total];///@"总金额:1000";
self.totalbaseQtyLabel.font = FontSize(ShowSize);
self.placeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showBaseCountLabel.frame), CGRectGetMaxY(self.showDateLabel.frame), ShowWidth, ShowHeight))];
self.placeLabel.textAlignment = NSTextAlignmentLeft;
self.placeLabel.textColor = HexColor(ShowColor);
self.placeLabel.text = @"产地:河南省";
self.placeLabel.text = [NSString stringWithFormat:@"产地:%@",processMaterial.place];//@"产地:河南省";
self.placeLabel.font = FontSize(ShowSize);
self.qualityLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.totalbaseQtyLabel.frame), ShowWidth, ShowHeight))];
self.qualityLabel.textAlignment = NSTextAlignmentLeft;
self.qualityLabel.textColor = HexColor(ShowColor);
self.qualityLabel.text = @"质量:1000";
self.qualityLabel.text = [NSString stringWithFormat:@"质量:%@",processMaterial.quality];//@"质量:1000";
self.qualityLabel.font = FontSize(ShowSize);
self.remarkLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.qualityLabel.frame), ShowWidth, ShowHeight))];
self.remarkLabel.textAlignment = NSTextAlignmentLeft;
self.remarkLabel.textColor = HexColor(ShowColor);
self.remarkLabel.text = @"描述:河南省";
self.remarkLabel.text = [NSString stringWithFormat:@"备注:%@",processMaterial.remark];//@"描述:河南省";
self.remarkLabel.font = FontSize(ShowSize);
......
//
// GXFProcessProductItemView.m
// XFFruit
//
// Created by freecui on 15/9/6.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "GXFProcessProductItemView.h"
@implementation GXFProcessProductItemView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
......@@ -23,6 +23,7 @@
#define ShowHeight 20
#import "GXFProcessProductTableViewCell.h"
@interface GXFProcessProductTableViewCell ()
@property (nonatomic,strong)UILabel *titleLabel;
......@@ -103,43 +104,43 @@
self.showBaseCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.showTitleLabel.frame), 0, ShowWidth, ShowHeight))];
self.showBaseCountLabel.textAlignment = NSTextAlignmentLeft;
self.showBaseCountLabel.textColor = HexColor(ShowColor);
self.showBaseCountLabel.text = @"基础数量:10000";
self.showBaseCountLabel.text = [NSString stringWithFormat:@"基础数量:%@",processProduct.baseQty];//@"基础数量:10000";
self.showBaseCountLabel.font = FontSize(ShowSize);
self.showDateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.showTitleLabel.frame), ShowWidth, ShowHeight))];
self.showDateLabel.textAlignment = NSTextAlignmentLeft;
self.showDateLabel.textColor = HexColor(ShowColor);
self.showDateLabel.text = @"入库时间:2015-02-04";
self.showDateLabel.text = [NSString stringWithFormat:@"出库时间:%@",processProduct.outstockDate];//@"入库时间:2015-02-04";
self.showDateLabel.font = FontSize(ShowSize);
self.basebaseQtyLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showBaseCountLabel.frame), CGRectGetMaxY(self.showTitleLabel.frame), ShowWidth, ShowHeight))];
self.basebaseQtyLabel.textAlignment = NSTextAlignmentLeft;
self.basebaseQtyLabel.textColor = HexColor(ShowColor);
self.basebaseQtyLabel.text = @"基础单价:11元";
self.basebaseQtyLabel.text = [NSString stringWithFormat:@"包装单位:%@",processProduct.unit];//@"基础单价:11元";
self.basebaseQtyLabel.font = FontSize(ShowSize);
self.totalbaseQtyLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.showDateLabel.frame), ShowWidth, ShowHeight))];
self.totalbaseQtyLabel.textAlignment = NSTextAlignmentLeft;
self.totalbaseQtyLabel.textColor = HexColor(ShowColor);
self.totalbaseQtyLabel.text = @"总金额:1000";
self.totalbaseQtyLabel.text =[NSString stringWithFormat:@"包装规格:%@",processProduct.qpc];// @"总金额:1000";
self.totalbaseQtyLabel.font = FontSize(ShowSize);
self.placeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showBaseCountLabel.frame), CGRectGetMaxY(self.showDateLabel.frame), ShowWidth, ShowHeight))];
self.placeLabel.textAlignment = NSTextAlignmentLeft;
self.placeLabel.textColor = HexColor(ShowColor);
self.placeLabel.text = @"产地:河南省";
self.placeLabel.text = [NSString stringWithFormat:@"包装规格描述:%@",processProduct.qpcStr];//@"产地:河南省";
self.placeLabel.font = FontSize(ShowSize);
self.qualityLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.totalbaseQtyLabel.frame), ShowWidth, ShowHeight))];
self.qualityLabel.textAlignment = NSTextAlignmentLeft;
self.qualityLabel.textColor = HexColor(ShowColor);
self.qualityLabel.text = @"质量:1000";
self.qualityLabel.text = [NSString stringWithFormat:@"包装数量:%@",processProduct.quantity];// @"质量:1000";
self.qualityLabel.font = FontSize(ShowSize);
self.remarkLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showTitleLabel.frame), CGRectGetMaxY(self.qualityLabel.frame), ShowWidth, ShowHeight))];
self.remarkLabel.textAlignment = NSTextAlignmentLeft;
self.remarkLabel.textColor = HexColor(ShowColor);
self.remarkLabel.text = @"描述:河南省";
self.remarkLabel.text = [NSString stringWithFormat:@"备注:%@",processProduct.remark];//@"描述:河南省";
self.remarkLabel.font = FontSize(ShowSize);
......@@ -177,7 +178,7 @@
}
//- (void)
- (void)awakeFromNib {
// Initialization code
}
......
......@@ -16,11 +16,11 @@
#import "Survey.h"
#import "PurchaseNoticeCell.h"
#import "ShopDetaileViewController.h"
#import "ShopDetail.h"
#define LeftMargin 15
#define LeftWidth 40
#define RightWidth 30
#define SpaceMargin 1
#define BtnHeight 44
#define TableHeight 46
#define CornerRadius 5
......@@ -30,10 +30,18 @@
#define KeyboardHeight 258
#define DateViewHeight 300
#define FootOfsetHeight 140
#define BottomViewHeight 60
typedef enum : NSUInteger {
SaveTag = 8000,
CommitTag,
} BtnTag;
@interface NewPurchaseNoticeViewController()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,HPGrowingTextViewDelegate>
{
UITableView *_tableView;
NSMutableArray *_dataArr;
NSMutableArray *_shopeArr;
UITextField *_titleField;
UILabel *_productLabel;
UILabel *_startDateLabel;
......@@ -41,11 +49,8 @@
UILabel *_personLabel;
HPGrowingTextView *_noteTextView;
NSIndexPath *selectedCellIndexPath;
NSMutableArray *selectCellAry;
BOOL _isClickStart;
UITableView *mingXiTableView;
......@@ -76,17 +81,19 @@
}
-(void)setupSubviews
{
selectCellAry=[[NSMutableArray alloc]initWithCapacity:1000];
_dataArr=[[NSMutableArray alloc]initWithObjects:@"标题:",@"采购员:",@"备注:", nil];
_shopeArr=[[NSMutableArray alloc]initWithObjects: nil];
self.view.backgroundColor = XXFBgColor;
_tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, LeftMargin,ScreenSize.width, ScreenSize.height/2 - FootOfsetHeight - LeftMargin)) style:(UITableViewStylePlain)];
_tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, LeftMargin,ScreenSize.width, ScreenSize.height/3-LeftMargin)) style:(UITableViewStylePlain)];
_tableView.backgroundColor = [UIColor whiteColor];
_tableView.tag=1001;
_tableView.bounces = NO;
_tableView.delegate = self;
_tableView.dataSource = self;
mingXiTableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 2*LeftMargin+_tableView.frame.size.height, ScreenSize.width, ScreenSize.height-_tableView.height-TableHeight-LeftMargin)];
mingXiTableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 2*LeftMargin+_tableView.frame.size.height, ScreenSize.width, ScreenSize.height-_tableView.height-ScreenSize.height/5)];
mingXiTableView.backgroundColor = [UIColor whiteColor];
mingXiTableView.tag=1002;
mingXiTableView.bounces=NO;
......@@ -95,15 +102,35 @@
UIView *footView2=[[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)];
footView2.backgroundColor=[UIColor clearColor];
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)];
lable.text=@" 商品 价格 包装规格 包装数量";
NSArray *ary=[NSArray arrayWithObjects:@"商品",@"价格",@"包装规格",@"包装数量", nil];
// NSArray *ary=[NSArray arrayWithObjects: nil];
CGFloat gipWidth = (ScreenSize.width-(((RightWidth+70)+(LeftWidth+35))+(35+70)))/3;
for (int i=0; i< ary.count;i++ ) {
UILabel *lable=[[UILabel alloc]init];
if (i==0) {
lable.frame=CGRectMake(LeftWidth, 0, 35,TableHeight);
}
if (i==1) {
lable.frame=CGRectMake(LeftWidth+35+gipWidth, 0, 35,TableHeight);
}
if (i==2) {
lable.frame=CGRectMake(LeftWidth+35+gipWidth+35+gipWidth, 0, 70,TableHeight);
}
if (i==3) {
lable.frame=CGRectMake(ScreenSize.width-RightWidth-70, 0, 70,TableHeight);
}
// UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(LeftWidth + (SpaceMargin + headWidth)*i,0, headWidth, 50)];
lable.text=[ary objectAtIndex:i];
lable.textColor=HexColor(@"444444");
[footView2 addSubview:lable];
}
UIView *footView3 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)];
footView3.backgroundColor=[UIColor clearColor];
self.addDetailedButton=[UIButton buttonWithType: UIButtonTypeCustom];
[self.addDetailedButton setFrame:CGRectMake(90, 0, 200, TableHeight)];
[self.addDetailedButton setFrame:CGRectMake(0, 0, ScreenSize.width, TableHeight)];
[self.addDetailedButton setTitle:@"+ 点击添加商品明细" forState:UIControlStateNormal];
[self.addDetailedButton addTarget:self action:@selector(addShopeDetailed) forControlEvents:UIControlEventTouchUpInside];
[self.addDetailedButton setTitleColor:HexColor(@"444444") forState:UIControlStateNormal];
......@@ -115,6 +142,15 @@
self.HeardLabel.font = FontSize(TitleSize);
//HexColor(@"e5e5e5")
UIView *footView4 = [[UIView alloc]initWithFrame:CGRectMake(0, ScreenSize.height - BottomViewHeight - 64, ScreenSize.width, BottomViewHeight)];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"50bd62")];
[footView4 addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(saveBtn.frame) + 15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"f69100")];
[footView4 addSubview:commitBtn];
[self.view addSubview:footView4];
[footView3 addSubview:self.addDetailedButton];
[footView3 addSubview:self.HeardLabel];
[footView3 addSubview:self.FootLabel];
......@@ -125,6 +161,7 @@
mingXiTableView.tableHeaderView=footView2;
[self.view addSubview:_tableView];
[self.view addSubview:mingXiTableView];
[self.view addSubview:footView4];
}
......@@ -144,7 +181,7 @@
return _dataArr.count;
}else if ([tableView isEqual:mingXiTableView])
{
return _dataArr.count;
return _shopeArr.count;
}
return 1;
}
......@@ -174,20 +211,23 @@
Cell = [[PurchaseNoticeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
Cell.selectionStyle = UITableViewCellSelectionStyleNone;
// Cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;向左箭头
// Cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;向左箭头
[self showShopDetail:Cell indexPath:indexPath];
}
if(selectedCellIndexPath != nil&[selectedCellIndexPath compare:indexPath] == NSOrderedSame){
if (Cell.isSelected==YES) {
Cell.arrowView.image = [UIImage imageNamed:@"arrowdown"];
Cell.backgroundColor=XXFBgColor;
Cell.subSview.hidden=NO;
}else
{
Cell.subSview.hidden=YES;
Cell.arrowView.image = [UIImage imageNamed:@"arrowright"];
Cell.backgroundColor=[UIColor whiteColor];
Cell.subSview.hidden=YES;
}
[Cell.button addTarget:self action:@selector(didtoucher) forControlEvents:UIControlEventTouchUpInside];
// [cell setTitleStr:_dataArr[indexPath.row]];
return Cell;
}
......@@ -204,15 +244,14 @@
}else if ([tableView isEqual:mingXiTableView])
{
if(selectedCellIndexPath != nil&[selectedCellIndexPath compare:indexPath] == NSOrderedSame){
if ([self comperIndexpath:indexPath]) {
return TableHeight*3;
}else
{
return TableHeight;
}
return TableHeight;
}
return TableHeight;
}
......@@ -252,11 +291,16 @@
}else if ([tableView isEqual:mingXiTableView])
{
PurchaseNoticeCell *Cell=(PurchaseNoticeCell*)[mingXiTableView cellForRowAtIndexPath:indexPath ];
if (Cell.isSelected==NO) {
Cell.isSelected=YES;
[selectCellAry addObject:indexPath];
}else{
Cell.isSelected=NO;
[selectCellAry removeObject:indexPath];
}
selectedCellIndexPath = indexPath;
// [Cell setTitleStr:@"selected"];
// [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
[mingXiTableView reloadData];
}
......@@ -273,11 +317,7 @@
_titleField.returnKeyType = UIReturnKeyDone;
_titleField.delegate = self;
[cell.contentView addSubview:_titleField];
// if (self.survey) {
// _titleField.text = [IBTCommon checkString:self.survey.title];
// self.titleStr = [IBTCommon checkString:self.survey.title];
// }
// }else
}else if (indexPath.row == _dataArr.count -1){
_noteTextView = [[HPGrowingTextView alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight)];
_noteTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0);
......@@ -289,10 +329,6 @@
_noteTextView.returnKeyType = UIReturnKeyDone;
_noteTextView.placeholder = @"输入备注内容";
[cell.contentView addSubview:_noteTextView];
// if (self.survey) {
// _noteTextView.text = [IBTCommon checkString:self.survey.remark];
// self.remarkStr = [IBTCommon checkString:self.survey.remark];
// }
CGRect lineFrame = cell.lineLabel.frame;
lineFrame.origin.y = TableHeight*2-1;
cell.lineLabel.frame = lineFrame;
......@@ -309,7 +345,15 @@
}
}
}
-(BOOL)comperIndexpath:(NSIndexPath *)indexPath
{
for (NSIndexPath *path in selectCellAry) {
if (path.row == indexPath.row) {
return YES;
}
}
return NO;
}
- (void)preferDataInPersonLabel{
if (self.survey) {
if (self.survey.users.count > 0) {
......@@ -334,9 +378,31 @@
-(void)addShopeDetailed
{
ShopDetaileViewController *svc = [[ShopDetaileViewController alloc] init];
// 回调
svc.choseShopDetail = ^(ShopDetail *shopDetail){
[_shopeArr addObject:shopDetail];
[mingXiTableView reloadData];
};
svc.title = [IBTCommon localizableString:@"AddShopDetail"];
[self PushViewController:svc animated:YES];
NSLog(@"1111111111");
}
-(void)showShopDetail:(PurchaseNoticeCell*)Cell indexPath:(NSIndexPath *)indexPath
{
ShopDetail *shopDetail=[_shopeArr objectAtIndex:indexPath.row];
Cell.SpLabel.text=shopDetail.merchandise;//商品
Cell.DjLabel.text=shopDetail.packageUnitPrice;//包装单价
Cell.BzggLabel.text=shopDetail.packageSpecification;//包装规格
Cell.BzslLabel.text=shopDetail.packageQuantity;//包装数量
Cell.packageSpecification.text=shopDetail.packageSpecification;//包装规格
Cell.foundationQuantity.text=shopDetail.foundationQuantity;//基础数量
Cell.packageUnitPrice.text=shopDetail.packageUnitPrice;//包装单价
Cell.remark.text=shopDetail.remark;//备注
Cell.packageQuantity.text=shopDetail.packageQuantity;//包装数量
Cell.foundationUnitPrice.text=shopDetail.foundationUnitPrice;//基础单价
Cell.totalMoney.text=shopDetail.totalMoney;//总金额
}
//编辑
- (void)didtoucher
......@@ -373,6 +439,26 @@
[_noteTextView resignFirstResponder];
[self setTableFrame:LeftMargin];
}
- (void)btnClick:(UIButton *)btn{
switch (btn.tag) {
case SaveTag:
{
// if ([self checkSurvey]) {
// [self saveSurvey:@"initial" message:@"正在保存..."];
// }
}
break;
case CommitTag:
{
// if ([self checkSurvey]) {
// [self saveSurvey:@"submitted" message:@"正在提交..."];
// }
}
break;
default:
break;
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
......
//
// GXFProcessProductItemView.h
// PurchaseNoticeViewController.h
// XFFruit
//
// Created by freecui on 15/9/6.
// Created by mac on 15/9/5.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTUIView.h"
#import "ICRBaseViewController.h"
@interface GXFProcessProductItemView : IBTUIView
@interface PurchaseNoticeViewController : ICRBaseViewController
@end
//
// PurchaseNoticeViewController.m
// XFFruit
//
// Created by mac on 15/9/5.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "PurchaseNoticeViewController.h"
#import "PurchaseCell.h"
#import "PurchaseBill.h"
#import "SeePurchaseNoticeViewController.h"
#import "QueryOrder.h"
#import "SortMaskView.h"
#import "PurchaseBoltView.h"
#import "MJRefresh.h"
#define TopMargin 44
#define TableHeight 120
#define LeftMargin 20
#define BtnWidth 60
#define BtnHeight 24
#define BtnSize 16
typedef enum : NSUInteger {
SortTag = 3000,
BoltTag
} BtnTag;
@interface PurchaseNoticeViewController ()<UITableViewDataSource,UITableViewDelegate,PurchaseViewDelegate,SortMaskViewDelegate>
{
UIView *_maskView;
UIButton *currentBtn;
SortMaskView *_sortView;
PurchaseBoltView *_boltView;
UIBarButtonItem *_sureBtn;
UIButton *_sortBtn;
UIButton *_boltBtn;
BOOL _isRefresh;
BOOL _isLoadMore;
NSInteger _currentPage;
}
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSString *noticeLike;
@property (nonatomic,strong)NSString *state;
@property (nonatomic,strong)NSString *billLike;
@property (nonatomic,strong)NSString *orderDirection;//asc(升序),desc(降序)
@end
@implementation PurchaseNoticeViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initData];
[self createTableView];
[self createRefresh];
[self getData];
// Do any additional setup after loading the view.
}
- (void)initData{
self.view.backgroundColor = XXFBgColor;
self.dataArr = [NSMutableArray array];
for (NSInteger i = 0; i < 6; i++) {
PurchaseBill *bill = [PurchaseBill new];
bill.billNumber = @"222222222";
bill.noticeNumber = @"134594059654";
bill.create_operName = @"创建人";
bill.create_time = @"2013-03-04";
bill.vendor_name = @"供应商";
bill.total = [NSNumber numberWithFloat:22];
bill.remark = @"备注";
bill.lastModify_operName = @"最后修改人";
bill.vendorConfirmTime = @"否";
if (i == 0) {
bill.state = @"initial";
}else if(i == 1){
bill.state = @"submitted";
}else if(i == 2){
bill.state = @"rejected";
}else if(i == 3){
bill.state = @"approved";
}else if(i == 4){
bill.state = @"shipping";
}else if(i == 5){
bill.state = @"finished";
}
[self.dataArr addObject:bill];
}
}
- (void)getData{
[ICRUserUtil sharedInstance].needFresh = NO;
__weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
__strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf fetchtPuchaseList:data];
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTips:data];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
NSMutableArray *orderArr =[NSMutableArray array];
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"lastModified";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
id billObject = [NSNull null];
if (self.billLike.length > 0) {
billObject = self.billLike;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"billNumber";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
}
id stateObject = [NSNull null];
if (self.state.length > 0 && ![self.state isEqualToString:@"none"]) {
stateObject = self.state;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"state";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
}
id noticeObject = [NSNull null];
if (self.noticeLike.length > 0) {
noticeObject = self.noticeLike;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"noticeNumber";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
}
if (orderArr.count == 0) {
QueryOrder *order = [QueryOrder new];
order.field = @"billNumber";
order.direction = @"desc";
[orderArr addObject:[order dictForCommit]];
}
// 网络请求
NSDictionary *dict = @{
@"billNumberLike":billObject,
@"state":stateObject,
@"noticeNumberLike":noticeObject,
@"titleLike":[NSNull null],
@"vendorUuid":[NSNull null],
@"queryOrders":orderArr,
@"userUuid":userUtil.userId,
@"pageNumber":@(_currentPage),
@"pageSize":@(20)};
[[ICRHTTPController sharedController] queryPurchaseWithData:dict success:succ failure:fail];
// NSDictionary *dict = @{
// @"billNumberLike":billObject,
// @"state":stateObject,
// @"noticeNumberLike":noticeObject,
// @"titleLike":[NSNull null],
//// @"orderField":@"created",
//// @"orderDirection":@"desc",
// @"vendorUuid":[NSNull null],
// @"queryOrders":orderArr,
// @"userUuid":userUtil.userId,
// @"pageNumber":@(_currentPage),
// @"pageSize":@(20)};
// [[ICRHTTPController sharedController] queryPurchaseWithData:dict success:succ failure:fail];
}
//刷新列表
- (void)fetchtPuchaseList:(id)data{
if (data) {
NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"] ;
if (success == 1) {
if (_currentPage == 0) {
// if (self.dataArr.count > 0) {
// [self.dataArr removeAllObjects];
// }
}
NSArray *recodesArr = data[ @"data" ][ @"records" ];
for (NSDictionary *purchaseBillDict in recodesArr) {
PurchaseBill *purchaseBill = [[PurchaseBill alloc]init];
[purchaseBill setValuesForKeysWithDictionary:purchaseBillDict];
[self.dataArr addObject:purchaseBill];
}
NSDictionary *pageDict = data[ @"data" ][ @"paging" ];
NSInteger pageCount = [pageDict[@"pageCount"] integerValue];
[self.tableView reloadData];
[self endRefreshing];
if (pageCount <= _currentPage) {
[self.tableView.footer noticeNoMoreData];
}
if (_currentPage == 0 && self.dataArr.count > 0) {
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
}else{
[IBTLoadingView showTips:message];
}
}else{
[IBTLoadingView showTips:@" 无记录 "];
}
}
- (void)createRefresh{
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
if (_isRefresh) {
return ;
}
_isRefresh = YES;
_currentPage = 0;
[self getData];
}];
self.tableView.header.lastUpdatedTimeKey = PurchaseUpdateDate;
self.tableView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (_isLoadMore) {
return ;
}
_isLoadMore = YES;
_currentPage ++;
[self getData];
} ];
}
#pragma mark - 结束刷新
- (void)endRefreshing{
_isLoadMore = NO;
_isRefresh = NO;
[self.tableView.header endRefreshing];
[self.tableView.footer endRefreshing];
}
- (void)createTableView
{
_sureBtn = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)];
self.navigationItem.rightBarButtonItem = _sureBtn;
_sortBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:SortTag image:@"black_arrow_down_with_text" title:nil titleColor:GXF_DETAIL_COLOR isCorner:NO corner:0 bgColor:nil];
_sortBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_sortBtn];
_boltBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(ScreenSize.width-BtnWidth - LeftMargin,10,BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:BoltTag image:@"black_filter_with_text" title:nil titleColor:GXF_DETAIL_COLOR isCorner:NO corner:0 bgColor:nil];
_boltBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_boltBtn];
self.tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, TopMargin,ScreenSize.width, ScreenSize.height - 64 - TopMargin)) style:(UITableViewStylePlain)];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self.view addSubview:self.tableView];
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
_maskView.hidden = YES;
[self.view addSubview:_maskView];
}
#pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
_maskView.hidden = NO;
if (btn.tag == SortTag) {
if(_boltView){
[self hiddenBoltMaskView:NO];
}
if (currentBtn == btn) {
[btn setImage:[UIImage imageNamed:@"black_arrow_down_with_text"] forState:UIControlStateNormal];
[self hiddenSortMaskView:YES];
currentBtn = nil;
}else{
[btn setImage:[UIImage imageNamed:@"select_arrow_up_text"] forState:UIControlStateNormal];
if (_sortView == nil) {
_sortView = [[SortMaskView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 150) withOrderDirection:self.orderDirection];
_sortView.dataArr = [[NSMutableArray alloc]initWithObjects:@"按时间顺序",@"按时间逆序",@"默认排序",nil];
_sortView.delegate = self;
[_maskView addSubview:_sortView];
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _sortView.frame;
sortFrame.origin.y = 0;
_sortView.frame = sortFrame;
}];
}
currentBtn = btn;
}
}else if(btn.tag == BoltTag){
if (_sortView) {
[self hiddenSortMaskView:NO];
}
if (currentBtn == btn) {
[btn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal];
[self hiddenBoltMaskView:YES];
currentBtn = nil;
}else{
[btn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
if (_boltView == nil) {
_boltView = [[PurchaseBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state billNumber:self.billLike noticeNumber:self.noticeLike];
_boltView.backgroundColor = XXFBgColor;
_boltView.delegate = self;
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
_boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"未提交",@"已提交",@"已拒绝" ,@"已审批",@"发运中",@"已完成",nil];
[_maskView addSubview:_boltView];
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame;
sortFrame.origin.y = 0;
_boltView.frame = sortFrame;
}];
currentBtn = btn;
}
}
}
}
- (void)hiddenSortMaskView:(BOOL)isHide{
currentBtn = nil;
[self checkSortBtnColor];
if (isHide == NO) {
[_sortView removeFromSuperview];
_sortView = nil;
}else{
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _sortView.frame;
sortFrame.origin.y = -105;
_sortView.frame = sortFrame;
_maskView.backgroundColor = RGBA(0, 0, 0, 0);
}completion:^(BOOL finished) {
[_sortView removeFromSuperview];
_sortView = nil;
_maskView.hidden = YES;
}];
}
}
- (void)hiddenBoltMaskView:(BOOL)isHide{
currentBtn = nil;
[self checkBoltBtnColor];
if (isHide == NO) {
[_boltView removeFromSuperview];
_boltView = nil;
}else{
[UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame;
sortFrame.origin.y = -105;
_boltView.frame = sortFrame;
_maskView.backgroundColor = RGBA(0, 0, 0, 0);
}completion:^(BOOL finished) {
[_boltView removeFromSuperview];
_boltView = nil;
_maskView.hidden = YES;
}];
}
}
//检测排序的颜色
- (void)checkSortBtnColor{
if (self.orderDirection.length > 0) {
[_sortBtn setImage:[UIImage imageNamed:@"select_arrow_up_text"] forState:UIControlStateNormal];
}else{
[_sortBtn setImage:[UIImage imageNamed:@"black_arrow_down_with_text"] forState:UIControlStateNormal];
}
}
- (void)checkBoltBtnColor{
if (self.state.length > 0 || self.noticeLike.length > 0 || self.billLike.length > 0) {
[_boltBtn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
}else{
[_boltBtn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal];
}
}
#pragma mark - 确定
- (void)sureClick{
if (self.state.length > 0 || self.billLike.length > 0 || self.noticeLike.length > 0 ||self.orderDirection.length > 0) {
[_boltView.noticeFiled resignFirstResponder];
[_boltView.billFiled resignFirstResponder];
_currentPage = 0;
//请求
[self getData];
//还原数据
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
}
#pragma mark - sortDelegate
- (void)getSortValueSelectRow:(NSString *)state{
if (state.length > 0) {
self.orderDirection = state;
CLog(@"%@",state);
}
}
#pragma mark - boltDelegate
- (void)getBoltValueSelectRow:(NSString *)state{
self.state = state;
CLog(@"%@",state);
}
- (void)getbillLike:(NSString *)billLike{
self.billLike = billLike;
CLog(@"%@",billLike);
}
- (void)getnoticeLike:(NSString *)noticeLike{
self.noticeLike = noticeLike;
CLog(@"%@",noticeLike);
}
- (void)clearBoltInformation{
//清空所有条件
if (self.billLike.length > 0) {
self.billLike = @"";
}
if (self.noticeLike.length > 0) {
self.noticeLike = @"";
}
if (self.state.length > 0) {
self.state = @"";
}
}
#pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"SurveyID";
PurchaseCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[PurchaseCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if (self.dataArr.count > 0) {
PurchaseBill *bill = self.dataArr[indexPath.row];
[cell setPurchaseBill:bill];
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
SeePurchaseNoticeViewController *pvc = [SeePurchaseNoticeViewController new];
pvc.title = @"查看采购单";
pvc.bill = _dataArr[indexPath.row];
if(indexPath.row == 0){
pvc.indexPerson = 0;
}else if(indexPath.row == 1){
pvc.indexPerson = 1;
}else if(indexPath.row == 2){
pvc.indexPerson = 2;
}
[self PushViewController:pvc animated:YES];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -7,7 +7,10 @@
//
#import "ICRBaseViewController.h"
#import "PurchaseBill.h"
@interface SeePurchaseNoticeViewController : ICRBaseViewController
@property (nonatomic,strong)PurchaseBill *bill;
//模拟三个人员
@property (nonatomic,assign)NSInteger indexPerson;//0.1.2
@end
//
// SeePurchaseNoticeViewController.m
// XFFruit
//
// Created by mac on 15/8/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SeePurchaseNoticeViewController.h"
#import "ProductBillViewController.h"
#import "PurchaseBillProduct.h"
#define BottomHeight 50
#define LeftMargin 15
#define LeftWidth 100
#define LeftHeight 30
#define TopMargin 15
typedef enum : NSUInteger {
CancleTag = 3500,
EndTag,
RejectTag,
PassTag,
SureTag
} BtnTag;
@interface SeePurchaseNoticeViewController ()
{
UIScrollView *_scrollView;
UIView *_purchaseView;
UIView *_bottomView;
ProductBillViewController *_pvc;
NSArray *_leftArr;
UIButton *_endBtn;
UIButton *_rejectBtn;
}
@property (nonatomic,strong)UILabel *billNumberLabel;
@property (nonatomic,strong)UILabel *noticeNumberLabel;
@property (nonatomic,strong)UILabel *createOperNameLabel;
@property (nonatomic,strong)UILabel *checkNameLabel;
@property (nonatomic,strong)UILabel *stateLabel;
@property (nonatomic,strong)UILabel *lastModifyNameLabel;
@property (nonatomic,strong)UILabel *typeLabel;
@property (nonatomic,strong)UILabel *vendorNameLabel;
@property (nonatomic,strong)UILabel *vendorIsSureLabel;
@property (nonatomic,strong)UILabel *warehouseLabel;
@property (nonatomic,strong)UILabel *otherPriceLabel;
@property (nonatomic,strong)UILabel *totalPriceLabel;
@property (nonatomic,strong)UILabel *noteLabel;
@end
@implementation SeePurchaseNoticeViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self bulidLayout];
[self getDataFromServer];
// Do any additional setup after loading the view.
}
- (void)getDataFromServer{
__weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
__strong __typeof(weakSelf)strongSelf = weakSelf;
if (data) {
NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"] ;
if (success == 1) {
NSDictionary *dictData = data[@"data"];
PurchaseBill *bill = [[PurchaseBill alloc]init];
[bill setValuesForKeysWithDictionary:dictData];
self.bill = bill;
[strongSelf fetchtPurchaseDetail];
}else{
[IBTLoadingView showTips:message];
}
}else{
[IBTLoadingView showTips:@" 无记录 "];
}
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTips:data];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
[[ICRHTTPController sharedController] getPurchaseResultWithPurchaseUuid:@"5a7417014f926eb5014f93b18fbc000f" success:succ failure:fail];
}
#pragma mark - 视图初始化
- (void)bulidLayout{
_scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height - 64 - BottomHeight)];
_scrollView.showsHorizontalScrollIndicator = NO;
_scrollView.showsVerticalScrollIndicator = NO;
_scrollView.backgroundColor = XXFBgColor;
[self.view addSubview:_scrollView];
[self createBtn];
[self createPurchaseView];
[self createBottomView];
if ([self.bill.state isEqualToString:@"finished"]) {
_endBtn.hidden = YES;
_rejectBtn.hidden = YES;
CGRect scrollViewFrame = _scrollView.frame;
scrollViewFrame.size.height = ScreenSize.height - 64;
_scrollView.frame = scrollViewFrame;
}
}
- (void)createBtn{
_rejectBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:RejectTag image:nil title:@"" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR];
[self.view addSubview:_rejectBtn];
_endBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(_rejectBtn.frame)+ LeftMargin, ScreenSize.height - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"" titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
[self.view addSubview:_endBtn];
if (self.indexPerson == 0) {
_rejectBtn.hidden = NO;
_rejectBtn.tag = CancleTag;
[_rejectBtn setTitle:@"作废" forState:UIControlStateNormal];
_endBtn.tag = EndTag;
[_endBtn setTitle:@"结束" forState:UIControlStateNormal];
}else if(self.indexPerson == 1){
_rejectBtn.hidden = NO;
_rejectBtn.tag = RejectTag;
[_rejectBtn setTitle:@"拒绝" forState:UIControlStateNormal];
[_endBtn setTitle:@"审核通过" forState:UIControlStateNormal];
_endBtn.tag = PassTag;
}else{
_rejectBtn.hidden = YES;
_endBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
_endBtn.tag = SureTag;
[_endBtn setTitle:@"确认" forState:UIControlStateNormal];
}
}
- (void)btnClick:(UIButton *)btn{
NSLog(@"%ld",(long)btn.tag);
switch (btn.tag) {
case CancleTag:
{
NSLog(@"作废");
}
break;
case EndTag:
{
NSLog(@"结束");
}
break;
case RejectTag:
{
NSLog(@"拒绝");
}
break;
case PassTag:
{
NSLog(@"审核通过");
}
break;
case SureTag:
{
NSLog(@"确定");
}
break;
default:
break;
}
}
- (void)createBottomView{
_bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_purchaseView.frame) + TopMargin, ScreenSize.width, 200)];
_bottomView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_bottomView];
_pvc = [[ProductBillViewController alloc]init];
[self addChildViewController:_pvc];
_pvc.viewFrame = _bottomView.bounds;
_pvc.isHiddenEdit = YES;
[_bottomView addSubview:_pvc.view];
}
- (void)createPurchaseView{
if (self.indexPerson == 0) {
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"最后修改人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
}else if (self.indexPerson == 1) {
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"审核人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
}else{
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"审核人:",@"状态:",@"供应商:",@"其他费用:",@"总金额:",@"备注:"];
}
_purchaseView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*_leftArr.count +LeftMargin)];
_purchaseView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_purchaseView];
for (NSInteger i = 0 ; i < _leftArr.count; i++) {
UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 10 + LeftHeight *i, LeftWidth, LeftHeight)];
leftLabel.font = GXF_SEVENTEENTH_SIZE;
leftLabel.text = _leftArr[i];
leftLabel.textColor = GXF_DETAIL_COLOR;
[_purchaseView addSubview:leftLabel];
UILabel *rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(leftLabel.frame), 10 + LeftHeight *i, _purchaseView.frame.size.width - LeftMargin - LeftWidth, LeftHeight)];
rightLabel.font = GXF_SEVENTEENTH_SIZE;
rightLabel.textColor = GXF_DETAIL_COLOR;
if (i == 0) {
self.billNumberLabel = rightLabel;
}else if (i == 1) {
self.noticeNumberLabel = rightLabel;
}else if(i == 2){
self.createOperNameLabel = rightLabel;
}else if(i == _leftArr.count - 3){
self.otherPriceLabel = rightLabel;
}else if(i == _leftArr.count - 2){
self.totalPriceLabel = rightLabel;
}else if(i == _leftArr.count - 1){
rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel;
}
if (self.indexPerson == 0 || self.indexPerson == 1) {
if (self.indexPerson == 0) {
if (i == 3) {
self.lastModifyNameLabel = rightLabel;
}
}else{
if (i == 3) {
self.checkNameLabel = rightLabel;
}
}
if(i == 4){
self.stateLabel = rightLabel;
}else if(i == 5){
self.typeLabel = rightLabel;
}else if(i == 6){
self.vendorNameLabel = rightLabel;
}else if(i == 7){
self.vendorIsSureLabel = rightLabel;
}else if(i == 8){
self.warehouseLabel = rightLabel;
}
}else{
if(i == 3){
self.checkNameLabel = rightLabel;
}else if(i == 4){
self.stateLabel = rightLabel;
}else if(i == 5){
self.vendorNameLabel = rightLabel;
}
}
[_purchaseView addSubview:rightLabel];
}
}
- (void)fetchtPurchaseDetail{
self.billNumberLabel.text = [IBTCommon checkString:self.bill.billNumber];
if ([self.bill.state isEqualToString:PURCHASE_STATE_INITIAL]) {
self.stateLabel.textColor = [UIColor redColor];
self.stateLabel.text = @"未提交";
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_SUBMITTED]) {
self.stateLabel.textColor = [UIColor greenColor];
self.stateLabel.text = @"已提交";
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_REJECTED]) {
self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"已拒绝";
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_APPROVED]) {
self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"已审批";
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_SHIPPING]) {
self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"发运中";
}else if ([self.bill.state isEqualToString:PURCHASE_STATE_FINISHED]) {
self.stateLabel.textColor = [UIColor blackColor];
self.stateLabel.text = @"已完成";
}
self.noticeNumberLabel.text = (self.bill.noticeNumber.length == 0) ? @"无":(self.bill.noticeNumber);
self.createOperNameLabel.text = [IBTCommon checkString:self.bill.create_operName];
self.checkNameLabel.text = [IBTCommon checkString:self.bill.vendor_name];
self.vendorNameLabel.text = [IBTCommon checkString:self.bill.vendor_name];
self.totalPriceLabel.text = [IBTCommon checkString:[self.bill.total stringValue]];
self.noteLabel.text = [IBTCommon checkString:self.bill.remark];
self.lastModifyNameLabel.text = [IBTCommon checkString:self.bill.lastModify_operName];
NSString *type = [self.bill.type isEqualToString:GXF_Critical] ? @"紧急" : @"普通";
self.typeLabel.text = type;
self.vendorIsSureLabel.text = self.bill.vendorConfirmTime.length > 0 ? @"是":@"否";
self.warehouseLabel.text = [IBTCommon checkString:self.bill.receiveWrh_name];
self.otherPriceLabel.text = [self.bill.charge stringValue];
NSMutableArray *productArr = [NSMutableArray array];
for (NSDictionary *billDict in self.bill.products) {
PurchaseBillProduct *billProbuct = [PurchaseBillProduct new];
[billProbuct setValuesForKeysWithDictionary:billDict];
[productArr addObject:billProbuct];
}
_pvc.productArr = productArr;
[_pvc.tableView reloadData];
[self setNoteHeight];
}
- (void)setNoteHeight
{
CGFloat height = [self.noteLabel calculateHeight];
CGRect noteFrame = self.noteLabel.frame;
noteFrame.size.height = height;
self.noteLabel.frame = noteFrame;
CGFloat totalHeight = height + LeftHeight*_leftArr.count;
CGRect purchaseFrame = _purchaseView.frame;
purchaseFrame.size.height = totalHeight;
_purchaseView.frame = purchaseFrame;
CGRect bottomFrame = _bottomView.frame;
bottomFrame.origin.y = CGRectGetMaxY(_purchaseView.frame) + TopMargin;
_bottomView.frame = bottomFrame;
_scrollView.contentSize = CGSizeMake(ScreenSize.width, totalHeight + CGRectGetHeight(_bottomView.frame) + TopMargin*2);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// ShopDetail.h
// XFFruit
//
// Created by mac on 15/9/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface ShopDetail : IBTModel
@property (nonatomic,strong)NSString *merchandise;//商品
@property (nonatomic,strong)NSString *packageSpecification;//包装规格
@property (nonatomic,strong)NSString *packageQuantity;//包装数量
@property (nonatomic,strong)NSString *packageUnit;//包装单位
@property (nonatomic,strong)NSString *foundationQuantity;//基础数量
@property (nonatomic,strong)NSString *foundationUnitPrice;//基础单价
@property (nonatomic,strong)NSString *packageUnitPrice;//包装单价
@property (nonatomic,strong)NSString *totalMoney;//总金额
@property (nonatomic,strong)NSString *remark;//备注
@end
//
// ShopDetail.m
// XFFruit
//
// Created by mac on 15/9/7.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ShopDetail.h"
@implementation ShopDetail
+ (NSDictionary *)specialKeysAndReplaceKeys {
return @{ @"pID" : [[self class] PrimaryKey], };
}
+ (NSString *)PrimaryKey {
return @"uuid";
}
@end
//
// SeePurchaseNoticeViewController.m
// XFFruit
//
// Created by mac on 15/8/16.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SeePurchaseNoticeViewController.h"
@interface SeePurchaseNoticeViewController ()
@end
@implementation SeePurchaseNoticeViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -11,6 +11,7 @@
@interface PurchaseNoticeCell : UITableViewCell
@property (nonatomic,strong)UILabel *HeardLabel;
@property (nonatomic,strong)UILabel *FootLabel;
@property (nonatomic,strong)UIImageView *arrowView;
@property (nonatomic,strong)UILabel *SpLabel;
@property (nonatomic,strong)UILabel *DjLabel;
@property (nonatomic,strong)UILabel *BzggLabel;
......@@ -18,6 +19,21 @@
@property (nonatomic,strong)UIView *subSview;
@property (nonatomic, assign) BOOL isSelected;
@property (nonatomic,strong)UIButton *button;
@property (nonatomic,strong)UILabel *packageSpecification;//包装规格
@property (nonatomic,strong)UILabel *packageQuantity;//包装数量
@property (nonatomic,strong)UILabel *packageUnit;//包装单位
@property (nonatomic,strong)UILabel *foundationQuantity;//基础数量
@property (nonatomic,strong)UILabel *foundationUnitPrice;//基础单价
@property (nonatomic,strong)UILabel *packageUnitPrice;//包装单价
@property (nonatomic,strong)UILabel *totalMoney;//总金额
@property (nonatomic,strong)UILabel *remark;//备注
@property (nonatomic,strong)NSArray *shopDetailAry1;
@property (nonatomic,strong)NSArray *shopDetailAry2;
- (void)setTitleStr:(NSString *)str;
......
......@@ -11,6 +11,8 @@
#define LeftMargin 15
#define TableHeight 46
#define TableWidth 60
#define LeftWidth 40
#define RightWidth 30
@implementation PurchaseNoticeCell
......@@ -18,75 +20,114 @@
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.isSelected=NO;
[self initdata];
[self bulidLayout];
}
return self;
}
-(void)initdata
{
self.packageSpecification=[[UILabel alloc]init];//包装规格
self.packageQuantity=[[UILabel alloc]init];;//包装数量
self.packageUnit=[[UILabel alloc]init]; ;//包装单位
self.foundationQuantity=[[UILabel alloc]init];;//基础数量
self.foundationUnitPrice=[[UILabel alloc]init];;//基础单价
self.packageUnitPrice=[[UILabel alloc]init];;//包装单价
self.totalMoney=[[UILabel alloc]init];;//总金额
self.remark=[[UILabel alloc]init];;//备注
self.shopDetailAry1=[NSArray arrayWithObjects: self.packageSpecification, self.foundationQuantity ,self.packageUnitPrice,self.remark,nil];
self.shopDetailAry2=[NSArray arrayWithObjects: self.packageQuantity, self.foundationUnitPrice ,self.totalMoney,nil];
}
- (void)bulidLayout
{
CGFloat gipWidth = (ScreenSize.width-4*TableWidth-(LeftMargin+20)-RightWidth)/3;
self.HeardLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin * 2, 1))];
self.HeardLabel.backgroundColor = HexColor(@"e5e5e5");
self.HeardLabel.font = FontSize(TitleSize);
self.FootLabel=[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.size.height-1, ScreenSize.width - LeftMargin * 2, 1))];
self.HeardLabel.backgroundColor = HexColor(@"e5e5e5");
self.HeardLabel.font = FontSize(TitleSize);
self.FootLabel.backgroundColor = HexColor(@"e5e5e5");
self.FootLabel.font = FontSize(TitleSize);
self.arrowView=[[UIImageView alloc]initWithFrame:CGRectMake(LeftMargin, (TableHeight - 10)/2 , 10, 10)];
self.arrowView.image = [UIImage imageNamed:@"arrowright"];
self.arrowView.contentMode = UIViewContentModeScaleAspectFit;
self.SpLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20, 0, TableWidth, TableHeight))];
self.SpLabel.textAlignment= NSTextAlignmentLeft;
self.SpLabel.textColor = HexColor(@"666666");
self.SpLabel.font = FontSize(TitleSize);
self.DjLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+80, 0, TableWidth,TableHeight ))];
self.DjLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20+self.SpLabel.size.width+gipWidth , 0, TableWidth,TableHeight ))];
self.DjLabel.textAlignment= NSTextAlignmentLeft;
self.DjLabel.textColor = HexColor(@"666666");
self.DjLabel.font = FontSize(TitleSize);
self.BzggLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+150, 0, TableWidth, TableHeight)];
self.BzggLabel=[[UILabel alloc]initWithFrame:CGRectMake(self.DjLabel.frame.origin.x+self.DjLabel.size.width+gipWidth, 0, TableWidth, TableHeight)];
self.BzggLabel.textAlignment= NSTextAlignmentLeft;
self.BzggLabel.textColor = HexColor(@"666666");
self.BzggLabel.font = FontSize(TitleSize);
self.BzslLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+240, 0, TableWidth, TableHeight)];
self.BzslLabel=[[UILabel alloc]initWithFrame:CGRectMake(self.BzggLabel.frame.origin.x+self.BzggLabel.size.width+gipWidth, 0, TableWidth, TableHeight)];
self.BzslLabel.textAlignment= NSTextAlignmentLeft;
self.BzslLabel.textColor = HexColor(@"666666");
self.BzslLabel.font = FontSize(TitleSize);
self.SpLabel.text=@"1 西瓜";
self.DjLabel.text=@"0.8";
self.BzggLabel.text=@"1*12";
self.BzslLabel.text=@"100框";
// self.SpLabel.text=@"1 西瓜";
// self.DjLabel.text=@"0.8";
// self.BzggLabel.text=@"1*12";
// self.BzslLabel.text=@"100框";
self.subSview=[[UIView alloc]initWithFrame:CGRectMake(0, 50, ScreenSize.width, TableHeight*3)];
NSArray*array=[NSArray arrayWithObjects:@"包装规格",@"基础数量" ,@"包装单价",@"备注",nil];
NSArray*array1=[NSArray arrayWithObjects:@"包装数量",@"基础单价" ,@"总金额",nil];
NSArray*array=[NSArray arrayWithObjects:@"包装规格:",@"基础数量:" ,@"包装单价:",@"备注:",nil];
NSArray*array1=[NSArray arrayWithObjects:@"包装数量:",@"基础单价:" ,@"总金额:",nil];
for (int i=0; i<array.count; i++) {
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(TableWidth-10, i*(10+10), 100, 10)];
UILabel *lable=[[UILabel alloc]init];
// if (i==0) {
lable.frame=CGRectMake(LeftWidth, i*(10+10), (ScreenSize.width-2*LeftMargin)/4, 10);
// }
lable.text=[array objectAtIndex:i];
lable.font=FontSize(TitleSize-2);
[lable setTextColor:HexColor(@"444444")];
[self.subSview addSubview:lable];
UILabel*shopeLable= [self.shopDetailAry1 objectAtIndex:i];
if (i==3) {
shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width-LeftMargin, lable.frame.origin.y,(ScreenSize.width-2*LeftMargin)/4*3, 10);
}else{
shopeLable.frame=CGRectMake(lable.frame.origin.x+lable.frame.size.width-LeftMargin, lable.frame.origin.y,(ScreenSize.width-2*LeftMargin)/4, 10);
}
shopeLable.font=FontSize(TitleSize-2);
[shopeLable setTextColor:HexColor(@"444444")];
// shopeLable.backgroundColor=[UIColor redColor];
[self.subSview addSubview:shopeLable];
}
for (int i=0; i<array1.count; i++) {
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(TableWidth+150, i*(10+10), 100, 10)];
lable.text=[array objectAtIndex:i];
UILabel *lable=[[UILabel alloc]initWithFrame:CGRectMake(ScreenSize.width/2, i*(10+10), (ScreenSize.width-2*LeftMargin)/4, 10)];
lable.text=[array1 objectAtIndex:i];
lable.font=FontSize(TitleSize-2);
[lable setTextColor:HexColor(@"444444")];
[self.subSview addSubview:lable];
UILabel*shopeLable= [self.shopDetailAry2 objectAtIndex:i];
shopeLable.frame=CGRectMake(lable.frame.origin.x-LeftMargin+lable.frame.size.width, lable.frame.origin.y,(ScreenSize.width-2*LeftMargin)/4, 10);
shopeLable.font=FontSize(TitleSize-2);
[shopeLable setTextColor:HexColor(@"444444")];
// shopeLable.backgroundColor=[UIColor redColor];
[self.subSview addSubview:shopeLable];
}
self.subSview.hidden=YES;
self.button=[UIButton buttonWithType:UIButtonTypeCustom];
[self.button setFrame:CGRectMake(310, 0, 50, 50)];
[self.button setImage:[UIImage imageNamed:@"AttachHide"] forState:UIControlStateNormal];
// [self.button setTitle:@"编辑" forState:UIControlStateNormal];
// [self.button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[self.button setFrame:CGRectMake(ScreenSize.width-50, 0, 50, 50)];
[self.button setImage:[UIImage imageNamed:@"edit"] forState:UIControlStateNormal];
[self.contentView addSubview:self.button];
[self.contentView addSubview:self.subSview];
[self.contentView addSubview:self.SpLabel];
......@@ -94,6 +135,7 @@
[self.contentView addSubview:self.BzslLabel];
[self.contentView addSubview:self.BzggLabel];
[self.contentView addSubview:self.HeardLabel];
[self.contentView addSubview:self.arrowView];
// [self.contentView addSubview:self.FootLabel];
}
- (void)setTitleStr:(NSString *)str
......
//
// SelectCompanyViewController.h
// XFFruit
//
// Created by mac on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "ICRBaseViewController.h"
#import "MaskCell.h"
typedef void(^ChosePackaging)(NSString *Packaging);
@interface SelectCompanyViewController : ICRBaseViewController
@property (nonatomic,copy)ChosePackaging chosePackaging;
@end
//
// SelectCompanyViewController.m
// XFFruit
//
// Created by mac on 15/8/31.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import "SelectCompanyViewController.h"
#define TableHeight 45
@interface SelectCompanyViewController ()<UITableViewDataSource,UITableViewDelegate>
{
}
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,strong)UITableView *tableView;
@end
@implementation SelectCompanyViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initData];
[self initView];
// Do any additional setup after loading the view.
}
-(void)initData
{
self.dataArr=[NSMutableArray arrayWithObjects:@"筐",@"斤",nil];
self.title = @"选择包装单位";
}
-(void)initView
{
self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0,ScreenSize.width, ScreenSize.height) style:(UITableViewStylePlain)];
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self.view addSubview:self.tableView];
}
#pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"MaskCell";
MaskCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[MaskCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID totalWidth:ScreenSize.width totalHeight:TableHeight];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.textAlignment = UITextAlignmentCenter;
cell.textLabel.text=self.dataArr[indexPath.row];
cell.Commitbtn.hidden = YES;
}
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 40;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *ChosePackaging = self.dataArr[indexPath.row];
//block 回调
self.chosePackaging(ChosePackaging);
[self PopViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -8,7 +8,11 @@
#import "ICRBaseViewController.h"
#import "Survey.h"
#import "ShopDetail.h"
typedef void(^ChoseShopDetail)(ShopDetail *shopDetail);
@interface ShopDetaileViewController : ICRBaseViewController
@property (nonatomic,strong)Survey *survey;
@property (nonatomic,strong)ShopDetail *shopDetail;
@property (nonatomic,strong)ChoseShopDetail choseShopDetail;
@property (nonatomic,strong)NSString *navTitle;
@end
......@@ -12,6 +12,7 @@
#import "StartTimeView.h"
#import "ChosePersonViewController.h"
#import "ChooseProductViewController.h"
#import "SelectCompanyViewController.h"
#import "SurveyUser.h"
#import "Survey.h"
#import "Product.h"
......@@ -34,6 +35,7 @@ typedef enum : NSUInteger {
NSMutableArray *_dataArr;
UITextField *_titleField;
UILabel *_productLabel;
UILabel *_PackagingLable;
UILabel *_startDateLabel;
UILabel *_endDateLabel;
UILabel *_personLabel;
......@@ -41,6 +43,16 @@ typedef enum : NSUInteger {
UIDatePicker *_timePicker;
BOOL _isClickStart;
StartTimeView *_startTimeView;
UITextField *merchandise; //商品
UITextField *packageSpecification;//包装规格
UITextField *packageQuantity; //包装数量
UITextField *packageUnit; //包装单位
UITextField *foundationQuantity; //基础数量
UITextField *foundationUnitPrice; //基础单价
UITextField *packageUnitPrice; //包装单价
UITextField *totalMoney; //总金额
UITextField *remark; //备注
}
@property (nonatomic,strong)NSString *titleStr;
@property (nonatomic,strong)NSString *productCodeStr;
......@@ -58,11 +70,13 @@ typedef enum : NSUInteger {
[super viewDidLoad];
self.title = self.navTitle;
[self initData];
// [self createTableView];
[self setupSubviews];
// Do any additional setup after loading the view.
}
- (void)initData{
merchandise=[[UITextField alloc]init];
packageUnit=[[UITextField alloc]init];
merchandise.text=packageUnit.text=NULL;
_dataArr = [NSMutableArray array];
self.users = [NSMutableArray array];
[_dataArr addObject:@"商品"];
......@@ -71,7 +85,7 @@ typedef enum : NSUInteger {
[_dataArr addObject:@"包装单位"];
[_dataArr addObject:@"基础数量"];
[_dataArr addObject:@"基础单价"];
[_dataArr addObject:@"包装单"];
[_dataArr addObject:@"包装单"];
[_dataArr addObject:@"总金额"];
[_dataArr addObject:@"备注"];
}
......@@ -88,10 +102,10 @@ typedef enum : NSUInteger {
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_SAVE_COLOR];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"删除" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_SAVE_COLOR];
[footView addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_COMMIT_COLOR];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn];
// [self.view addSubview:footView];
......@@ -115,24 +129,63 @@ typedef enum : NSUInteger {
break;
case CommitTag:
{
// if ([self checkSurvey]) {
if ([self informationComplete]) {
ShopDetail *shopDetail=self.shopDetail;
self.choseShopDetail(shopDetail);//回调
[self PopViewControllerAnimated:YES];
// [self saveSurvey:@"submitted" message:@"正在提交..."];
// }
}
}
break;
default:
break;
}
}
- (BOOL)checkSurvey{
self.titleStr = _titleField.text;
self.remarkStr = _noteTextView.text;
if (self.titleStr.length == 0 || self.productUuidStr.length == 0 || self.productNameStr.length == 0|| self.productCodeStr.length == 0 || self.users.count <=0 || self.beginDateStr.length == 0 || self.endDateStr.length == 0) {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"提示信息" message:@"信息不完整" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
[alert show];
- (BOOL)informationComplete{
self.shopDetail=[[ShopDetail alloc]init];
self.shopDetail.merchandise=merchandise.text;
self.shopDetail.packageSpecification=packageSpecification.text;
self.shopDetail.packageQuantity=packageQuantity.text;
self.shopDetail.packageUnit=packageUnit.text;
self.shopDetail.foundationQuantity=foundationQuantity.text;
self.shopDetail.foundationUnitPrice=foundationUnitPrice.text;
self.shopDetail.packageUnitPrice=packageUnitPrice.text;
self.shopDetail.totalMoney=totalMoney.text;
self.shopDetail.remark=remark.text;
if (merchandise.text.length == 0 ) {
ShowMessage(@"商品不能为空");
return NO;
}
if (packageSpecification.text.length == 0 ) {
ShowMessage(@"包装规格不能为空");
return NO;
}
if (packageQuantity.text.length == 0 ) {
ShowMessage(@"包装数量不能为空");
return NO;
}
if (packageUnit.text.length == 0) {
ShowMessage(@"包装单位不能为空");
return NO;
}
if (foundationQuantity.text.length == 0) {
ShowMessage(@"基础数量不能为空");
return NO;
}
if (foundationUnitPrice.text.length == 0) {
ShowMessage(@"基础单价不能为空");
return NO;
}if (packageUnitPrice.text.length == 0) {
ShowMessage(@"总金额不能为空");
return NO;
}
if (remark.text.length == 0) {
ShowMessage(@"备注不能为空");
return NO;
}
return YES;
}
......@@ -254,13 +307,13 @@ typedef enum : NSUInteger {
contentLabel.font = FontSize(TitleSize);
[cell.contentView addSubview:contentLabel];
if (indexPath.row==0) {
contentLabel.text = @"选择商品";
_productLabel = contentLabel;
contentLabel.text = @"选择商品";
[self preferDataInProductLabel];
}else if (indexPath.row==3)
{
_PackagingLable = contentLabel;
contentLabel.text = @"选择包装单位";
_productLabel = contentLabel;
[self preferDataInProductLabel];
}
......@@ -275,134 +328,46 @@ typedef enum : NSUInteger {
_titleField.delegate = self;
[cell.contentView addSubview:_titleField];
if (indexPath.row==1) {
packageSpecification=_titleField;//包装规格
_titleField.placeholder = @"输入包装规格";
}else if (indexPath.row==2)
{
packageQuantity=_titleField; //包装数量
_titleField.placeholder = @"输入包装数量";
}else if (indexPath.row==4)
{
foundationQuantity=_titleField; //基础数量
_titleField.placeholder = @"输入基础数量";
}else if (indexPath.row==5)
{
foundationUnitPrice=_titleField; //基础单价
_titleField.placeholder = @"输入基础单价";
}else if (indexPath.row==6)
{
packageUnitPrice=_titleField; //包装单价
_titleField.placeholder = @"输入包装单价";
}else if (indexPath.row==7)
{
totalMoney=_titleField; //总金额
_titleField.placeholder = @"输入总金额";
}else if (indexPath.row==8)
{
remark=_titleField; //备注
_titleField.placeholder = @"输入备注内容";
}
// if (self.survey) {
// _titleField.text = [IBTCommon checkString:self.survey.title];
// self.titleStr = [IBTCommon checkString:self.survey.title];
// }
}
// _titleField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight)];
// _titleField.textAlignment = NSTextAlignmentRight;
// _titleField.textColor = HexColor(@"444444");
// _titleField.placeholder = @"输入调研标题";
// _titleField.font = FontSize(15);
// _titleField.returnKeyType = UIReturnKeyDone;
// _titleField.delegate = self;
// [cell.contentView addSubview:_titleField];
// if (self.survey) {
// _titleField.text = [IBTCommon checkString:self.survey.title];
// self.titleStr = [IBTCommon checkString:self.survey.title];
// }
// }else if (indexPath.row == _dataArr.count -1){
// _noteTextView = [[HPGrowingTextView alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight)];
// _noteTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0);
// _noteTextView.minNumberOfLines = 1;
// _noteTextView.maxNumberOfLines = 4;
// _noteTextView.font = FontSize(15);
// _noteTextView.textAlignment = NSTextAlignmentRight;
// _noteTextView.delegate = self;
// _noteTextView.returnKeyType = UIReturnKeyDone;
// _noteTextView.placeholder = @"输入备注内容";
// [cell.contentView addSubview:_noteTextView];
// if (self.survey) {
// _noteTextView.text = [IBTCommon checkString:self.survey.remark];
// self.remarkStr = [IBTCommon checkString:self.survey.remark];
// }
// CGRect lineFrame = cell.lineLabel.frame;
// lineFrame.origin.y = TableHeight*2-1;
// cell.lineLabel.frame = lineFrame;
// }else{
// UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight))];
// contentLabel.textAlignment= NSTextAlignmentRight;
// contentLabel.textColor = HexColor(@"bbbbbb");
// contentLabel.font = FontSize(TitleSize);
// [cell.contentView addSubview:contentLabel];
// if (indexPath.row == 1) {
// contentLabel.text = @"选择商品";
// _productLabel = contentLabel;
// [self preferDataInProductLabel];
// }else if(indexPath.row == 2){
// contentLabel.text = @"选择日期";
// _startDateLabel = contentLabel;
// if (self.survey) {
// if (self.survey.beginDate.length > 9) {
// _startDateLabel.text = [[IBTCommon checkString:self.survey.beginDate]substringToIndex:10];
// }
// _startDateLabel.textColor = HexColor(@"444444");
// self.beginDateStr =[IBTCommon checkString:self.survey.beginDate];
//
// }
// }else if(indexPath.row == 3){
// contentLabel.text = @"选择日期";
// _endDateLabel = contentLabel;
// if (self.survey) {
// if (self.survey.endDate.length > 9) {
// _endDateLabel.text = [[IBTCommon checkString:self.survey.endDate]substringToIndex:10];
// }
// _endDateLabel.textColor = HexColor(@"444444");
// self.endDateStr = [IBTCommon checkString:self.survey.endDate];
// }
// }else if(indexPath.row == 4){
// contentLabel.text = @"选择调研人员";
// _personLabel = contentLabel;
// [self preferDataInPersonLabel];
// }
// }
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 2 || indexPath.row == 3) {
[self keyboardHidden];
if (indexPath.row == 2) {
_isClickStart = YES;
}else{
_isClickStart = NO;
}
[self startDatePickView];
}else if(indexPath.row == 4){
ChosePersonViewController *cvc = [ChosePersonViewController new];
cvc.chosePerson = ^(NSArray *users){
NSString *textStr = @"";
if (self.users.count <=0) {
[self.users removeAllObjects];
}
for (SurveyUser *user in users) {
if (textStr.length == 0) {
textStr = [textStr stringByAppendingFormat:@"%@",user.userName];
}else {
textStr = [textStr stringByAppendingFormat:@"、%@",user.userName];
}
[self.users addObject:[user dictForCommit]];
}
_personLabel.text = textStr;
_personLabel.textColor = HexColor(@"444444");
};
cvc.isMoreChose = YES;
[self PushViewController:cvc animated:YES];
}else if(indexPath.row == 1){
if(indexPath.row == 0){
ChooseProductViewController *cvc = [ChooseProductViewController new];
cvc.choseProduct = ^(Product *product){
_productLabel.text = [NSString stringWithFormat:@"%@[%@]",product.name,product.code];
merchandise.text=[NSString stringWithFormat:@"%@[%@]",product.name,product.code];
_productLabel.textColor = HexColor(@"444444");
self.productNameStr = product.name;
self.productUuidStr = product.uuid;
......@@ -410,6 +375,20 @@ typedef enum : NSUInteger {
};
cvc.isMoreChose = NO;
[self PushViewController:cvc animated:YES];
}else if (indexPath.row ==3)
{
SelectCompanyViewController *vc=[SelectCompanyViewController new];
vc.chosePackaging = ^(NSString *Packaging){
_PackagingLable.text = [NSString stringWithFormat:@"%@",Packaging];
packageUnit.text=[NSString stringWithFormat:@"%@",Packaging];
_PackagingLable.textColor = HexColor(@"444444");
};
[self PushViewController:vc animated:YES];
}
}
......
......@@ -79,6 +79,7 @@
if (self.dataArr.count > 0) {
if (_currentIndexPath) {
Product *product = self.dataArr[_currentIndexPath.row];
//block 回调
self.choseProduct(product);
}
}
......
......@@ -195,5 +195,21 @@
"AddSurvey" = "新建行情调研";
"AddPurchase" = "新建采购单";
"Purchase" = "采购单";
//Business
"Business" = "业务";
"Announcement" = "公告";
"AddSurvey" = "新建行情调研";
"Survey" = "查看行情调研";
"Survey1" = "填写行情反馈";
"Survey2" = "新建采购通知";
"Survey3" = "查看采购通知";
"Survey4" = "新建采购单";
"Survey5" = "查看采购单";
"Survey6" = "审核采购单";
"Survey7" = "新建发运单";
"Survey8" = "查看发运单";
"Survey9" = "新建加工单";
"EditorShopDetail" ="编辑商品明细";
"AddShopDetail" ="添加商品明细";
......@@ -182,6 +182,24 @@
"AddPurchase" = "新建采购单";
"Purchase" = "采购单";
//Business
"Business" = "业务";
"Announcement" = "公告";
"AddSurvey" = "新建行情调研";
"Survey" = "查看行情调研";
"Survey1" = "填写行情反馈";
"Survey2" = "新建采购通知";
"Survey3" = "查看采购通知";
"Survey4" = "新建采购单";
"Survey5" = "查看采购单";
"Survey6" = "审核采购单";
"Survey7" = "新建发运单";
"Survey8" = "查看发运单";
"Survey9" = "新建加工单";
"EditorShopDetail" ="编辑商品明细";
"AddShopDetail" ="添加商品明细";
......@@ -193,3 +211,4 @@
"VendorTitle" = "供应商";
"WarehouseTitle" = "加工工厂";
"ProductUnitTitle" = "商品单位";
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