Commit 655c6f92 authored by 陈俊俊's avatar 陈俊俊

小数位数

parent 9c761228
...@@ -64,4 +64,4 @@ SPEC CHECKSUMS: ...@@ -64,4 +64,4 @@ SPEC CHECKSUMS:
SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
COCOAPODS: 0.39.0 COCOAPODS: 0.38.2
...@@ -123,6 +123,7 @@ ...@@ -123,6 +123,7 @@
724171731B9D30660094DF55 /* ChosePersonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7241716E1B9D30660094DF55 /* ChosePersonViewController.m */; }; 724171731B9D30660094DF55 /* ChosePersonViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7241716E1B9D30660094DF55 /* ChosePersonViewController.m */; };
724171761B9D30DE0094DF55 /* ChooseCostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 724171751B9D30DE0094DF55 /* ChooseCostViewController.m */; }; 724171761B9D30DE0094DF55 /* ChooseCostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 724171751B9D30DE0094DF55 /* ChooseCostViewController.m */; };
7249BDD71BE794640059EB8C /* FinishTimeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7249BDD61BE794640059EB8C /* FinishTimeView.m */; }; 7249BDD71BE794640059EB8C /* FinishTimeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7249BDD61BE794640059EB8C /* FinishTimeView.m */; };
726BEE831BF220450081360F /* ChooseTansferCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 726BEE821BF220450081360F /* ChooseTansferCell.m */; settings = {ASSET_TAGS = (); }; };
726F4C6D1BDE5F83006A5E6D /* RejectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F4C6C1BDE5F83006A5E6D /* RejectView.m */; }; 726F4C6D1BDE5F83006A5E6D /* RejectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 726F4C6C1BDE5F83006A5E6D /* RejectView.m */; };
72805CF31BB8E1B0009E1F82 /* TransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72805CF21BB8E1B0009E1F82 /* TransferViewController.m */; }; 72805CF31BB8E1B0009E1F82 /* TransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72805CF21BB8E1B0009E1F82 /* TransferViewController.m */; };
72805CF61BB8E20B009E1F82 /* NewTransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72805CF51BB8E20B009E1F82 /* NewTransferViewController.m */; }; 72805CF61BB8E20B009E1F82 /* NewTransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72805CF51BB8E20B009E1F82 /* NewTransferViewController.m */; };
...@@ -147,18 +148,18 @@ ...@@ -147,18 +148,18 @@
72873CEB1BA27BA6007B3387 /* GXFPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CEA1BA27BA6007B3387 /* GXFPopView.m */; }; 72873CEB1BA27BA6007B3387 /* GXFPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CEA1BA27BA6007B3387 /* GXFPopView.m */; };
72873CEE1BA280DD007B3387 /* GXFPopCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CED1BA280DD007B3387 /* GXFPopCell.m */; }; 72873CEE1BA280DD007B3387 /* GXFPopCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CED1BA280DD007B3387 /* GXFPopCell.m */; };
72882D8B1BA9121E00935BA6 /* ChooseProductUnitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72882D8A1BA9121E00935BA6 /* ChooseProductUnitViewController.m */; }; 72882D8B1BA9121E00935BA6 /* ChooseProductUnitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72882D8A1BA9121E00935BA6 /* ChooseProductUnitViewController.m */; };
728899D01BECADA8003CC41E /* ReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899CD1BECADA8003CC41E /* ReportViewController.m */; settings = {ASSET_TAGS = (); }; }; 728899D01BECADA8003CC41E /* ReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899CD1BECADA8003CC41E /* ReportViewController.m */; };
728899D31BECADCD003CC41E /* CustomSegView.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899D21BECADCD003CC41E /* CustomSegView.m */; settings = {ASSET_TAGS = (); }; }; 728899D31BECADCD003CC41E /* CustomSegView.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899D21BECADCD003CC41E /* CustomSegView.m */; };
728899D61BECB323003CC41E /* SaleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899D51BECB323003CC41E /* SaleViewController.m */; settings = {ASSET_TAGS = (); }; }; 728899D61BECB323003CC41E /* SaleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899D51BECB323003CC41E /* SaleViewController.m */; };
728899D91BEF20BA003CC41E /* SMPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899D81BEF20BA003CC41E /* SMPageControl.m */; settings = {ASSET_TAGS = (); }; }; 728899D91BEF20BA003CC41E /* SMPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899D81BEF20BA003CC41E /* SMPageControl.m */; };
728899E21BEF35F3003CC41E /* SaleViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899E11BEF35F3003CC41E /* SaleViewCell.m */; settings = {ASSET_TAGS = (); }; }; 728899E21BEF35F3003CC41E /* SaleViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899E11BEF35F3003CC41E /* SaleViewCell.m */; };
728899E51BEF3609003CC41E /* SaleHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899E41BEF3609003CC41E /* SaleHeaderView.m */; settings = {ASSET_TAGS = (); }; }; 728899E51BEF3609003CC41E /* SaleHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899E41BEF3609003CC41E /* SaleHeaderView.m */; };
728899E81BEF41FC003CC41E /* PassengerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899E71BEF41FC003CC41E /* PassengerViewController.m */; settings = {ASSET_TAGS = (); }; }; 728899E81BEF41FC003CC41E /* PassengerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899E71BEF41FC003CC41E /* PassengerViewController.m */; };
728899EB1BEF4233003CC41E /* PassgerPriceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899EA1BEF4233003CC41E /* PassgerPriceViewController.m */; settings = {ASSET_TAGS = (); }; }; 728899EB1BEF4233003CC41E /* PassgerPriceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899EA1BEF4233003CC41E /* PassgerPriceViewController.m */; };
728899EE1BEF4A75003CC41E /* PasengerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899ED1BEF4A75003CC41E /* PasengerCell.m */; settings = {ASSET_TAGS = (); }; }; 728899EE1BEF4A75003CC41E /* PasengerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899ED1BEF4A75003CC41E /* PasengerCell.m */; };
728899F11BEF4A8A003CC41E /* PassengerHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F01BEF4A8A003CC41E /* PassengerHeaderCell.m */; settings = {ASSET_TAGS = (); }; }; 728899F11BEF4A8A003CC41E /* PassengerHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F01BEF4A8A003CC41E /* PassengerHeaderCell.m */; };
728899F41BEF4D3D003CC41E /* PassgerPriceHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F31BEF4D3D003CC41E /* PassgerPriceHeaderCell.m */; settings = {ASSET_TAGS = (); }; }; 728899F41BEF4D3D003CC41E /* PassgerPriceHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F31BEF4D3D003CC41E /* PassgerPriceHeaderCell.m */; };
728899F71BEF4D53003CC41E /* PassgerPriceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F61BEF4D53003CC41E /* PassgerPriceCell.m */; settings = {ASSET_TAGS = (); }; }; 728899F71BEF4D53003CC41E /* PassgerPriceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F61BEF4D53003CC41E /* PassgerPriceCell.m */; };
729A2E931BE60C0200493603 /* GeometryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 729A2E921BE60C0200493603 /* GeometryView.m */; }; 729A2E931BE60C0200493603 /* GeometryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 729A2E921BE60C0200493603 /* GeometryView.m */; };
72A8132D1BCA8BBA003631F3 /* ChooseTransportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */; }; 72A8132D1BCA8BBA003631F3 /* ChooseTransportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */; };
72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; }; 72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; };
...@@ -185,7 +186,7 @@ ...@@ -185,7 +186,7 @@
72B3C0DC1B9DBD7500025D81 /* TransportCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B3C0DB1B9DBD7500025D81 /* TransportCell.m */; }; 72B3C0DC1B9DBD7500025D81 /* TransportCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B3C0DB1B9DBD7500025D81 /* TransportCell.m */; };
72B3C0DF1B9DC60D00025D81 /* TransportDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B3C0DE1B9DC60D00025D81 /* TransportDetailViewController.m */; }; 72B3C0DF1B9DC60D00025D81 /* TransportDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B3C0DE1B9DC60D00025D81 /* TransportDetailViewController.m */; };
72C803521B7B897B00990363 /* DataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C803511B7B897B00990363 /* DataManager.m */; }; 72C803521B7B897B00990363 /* DataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C803511B7B897B00990363 /* DataManager.m */; };
72D645231BF1E9B80029E146 /* ChooseTransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D645221BF1E9B80029E146 /* ChooseTransferViewController.m */; settings = {ASSET_TAGS = (); }; }; 72D645231BF1E9B80029E146 /* ChooseTransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D645221BF1E9B80029E146 /* ChooseTransferViewController.m */; };
72EDD86E1B96E11700964115 /* ChooseParentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EDD86D1B96E11700964115 /* ChooseParentViewController.m */; }; 72EDD86E1B96E11700964115 /* ChooseParentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EDD86D1B96E11700964115 /* ChooseParentViewController.m */; };
72F56CB21B76EC200077F0C9 /* SurveyUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F56CB11B76EC200077F0C9 /* SurveyUser.m */; }; 72F56CB21B76EC200077F0C9 /* SurveyUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F56CB11B76EC200077F0C9 /* SurveyUser.m */; };
72F9D47F1BA7E97200795A00 /* NoticeProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D47E1BA7E97200795A00 /* NoticeProduct.m */; }; 72F9D47F1BA7E97200795A00 /* NoticeProduct.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D47E1BA7E97200795A00 /* NoticeProduct.m */; };
...@@ -679,6 +680,8 @@ ...@@ -679,6 +680,8 @@
724171751B9D30DE0094DF55 /* ChooseCostViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseCostViewController.m; sourceTree = "<group>"; }; 724171751B9D30DE0094DF55 /* ChooseCostViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseCostViewController.m; sourceTree = "<group>"; };
7249BDD51BE794640059EB8C /* FinishTimeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FinishTimeView.h; sourceTree = "<group>"; }; 7249BDD51BE794640059EB8C /* FinishTimeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FinishTimeView.h; sourceTree = "<group>"; };
7249BDD61BE794640059EB8C /* FinishTimeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FinishTimeView.m; sourceTree = "<group>"; }; 7249BDD61BE794640059EB8C /* FinishTimeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FinishTimeView.m; sourceTree = "<group>"; };
726BEE811BF220450081360F /* ChooseTansferCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseTansferCell.h; sourceTree = "<group>"; };
726BEE821BF220450081360F /* ChooseTansferCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseTansferCell.m; sourceTree = "<group>"; };
726F4C6B1BDE5F83006A5E6D /* RejectView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RejectView.h; sourceTree = "<group>"; }; 726F4C6B1BDE5F83006A5E6D /* RejectView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RejectView.h; sourceTree = "<group>"; };
726F4C6C1BDE5F83006A5E6D /* RejectView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RejectView.m; sourceTree = "<group>"; }; 726F4C6C1BDE5F83006A5E6D /* RejectView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RejectView.m; sourceTree = "<group>"; };
72805CF11BB8E1B0009E1F82 /* TransferViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransferViewController.h; sourceTree = "<group>"; }; 72805CF11BB8E1B0009E1F82 /* TransferViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransferViewController.h; sourceTree = "<group>"; };
...@@ -1550,6 +1553,8 @@ ...@@ -1550,6 +1553,8 @@
72805D071BB8F22B009E1F82 /* BottomTransferView.m */, 72805D071BB8F22B009E1F82 /* BottomTransferView.m */,
72805D0C1BB8F46B009E1F82 /* TransferProductCell.h */, 72805D0C1BB8F46B009E1F82 /* TransferProductCell.h */,
72805D0D1BB8F46B009E1F82 /* TransferProductCell.m */, 72805D0D1BB8F46B009E1F82 /* TransferProductCell.m */,
726BEE811BF220450081360F /* ChooseTansferCell.h */,
726BEE821BF220450081360F /* ChooseTansferCell.m */,
); );
path = Views; path = Views;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2665,7 +2670,6 @@ ...@@ -2665,7 +2670,6 @@
C1F696001AB870B400F9F5DD /* Frameworks */, C1F696001AB870B400F9F5DD /* Frameworks */,
C1F696011AB870B400F9F5DD /* Resources */, C1F696011AB870B400F9F5DD /* Resources */,
1454647E6246AB3D8AAE6FF2 /* Copy Pods Resources */, 1454647E6246AB3D8AAE6FF2 /* Copy Pods Resources */,
257FA5FADFB85E73662B5F98 /* Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
...@@ -2790,21 +2794,6 @@ ...@@ -2790,21 +2794,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
257FA5FADFB85E73662B5F98 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
2F15FB75DA97749DAA8CA872 /* Check Pods Manifest.lock */ = { 2F15FB75DA97749DAA8CA872 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
...@@ -3074,6 +3063,7 @@ ...@@ -3074,6 +3063,7 @@
C15918451AC062460013B391 /* IBTBadgeView.m in Sources */, C15918451AC062460013B391 /* IBTBadgeView.m in Sources */,
7281A0C81B89BFE60052B1AC /* Vendor.m in Sources */, 7281A0C81B89BFE60052B1AC /* Vendor.m in Sources */,
C15295C31B2451AC00DF60D1 /* ICRQReseachViewController.m in Sources */, C15295C31B2451AC00DF60D1 /* ICRQReseachViewController.m in Sources */,
726BEE831BF220450081360F /* ChooseTansferCell.m in Sources */,
358432F71B998ED2007E73ED /* GXFProductUnit.m in Sources */, 358432F71B998ED2007E73ED /* GXFProductUnit.m in Sources */,
C15918531AC062460013B391 /* IBTUINavigationController.m in Sources */, C15918531AC062460013B391 /* IBTUINavigationController.m in Sources */,
C11A346F1B247BDB00079129 /* ICRAnswerDetail.m in Sources */, C11A346F1B247BDB00079129 /* ICRAnswerDetail.m in Sources */,
......
...@@ -98,7 +98,7 @@ static NSString *ICRDataBasePath = @""; ...@@ -98,7 +98,7 @@ static NSString *ICRDataBasePath = @"";
[_m_dbQueue inDatabase:^(FMDatabase *db) { [_m_dbQueue inDatabase:^(FMDatabase *db) {
NSArray *tableNameArr = NSArray *tableNameArr =
@[ [Product class],[User class],[Survey class],[Vendor class],[Warehouse class],[GXFProductUnit class],[Accounttitle class]]; @[ [Product class],[User class],[Survey class],[Vendor class],[Warehouse class],[GXFProductUnit class],[Accounttitle class],[ICRAnnouncement class]];
NSMutableArray *sqlBatch = [NSMutableArray array]; NSMutableArray *sqlBatch = [NSMutableArray array];
NSString *sql = nil; NSString *sql = nil;
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
#define KNOTIFICATION_getSelectPurchaseProduct @"KNOTIFICATION_getSelectPurchaseProduct" #define KNOTIFICATION_getSelectPurchaseProduct @"KNOTIFICATION_getSelectPurchaseProduct"
#define KNOTIFICATION_ChoseTransportPurchase @"KNOTIFICATION_ChoseTransportPurchase"//选择采购单 #define KNOTIFICATION_ChoseTransportPurchase @"KNOTIFICATION_ChoseTransportPurchase"//选择采购单
#define KNOTIFICATION_ChoseTransportProduct @"KNOTIFICATION_ChoseTransportProduct"//选择发运单 #define KNOTIFICATION_ChoseTransportProduct @"KNOTIFICATION_ChoseTransportProduct"//选择发运单
#define KNOTIFICATION_ChoseTransferProduct @"KNOTIFICATION_ChoseTransferProduct"//选择转运单
#define KNOTIFICATION_EditReceiveProduct @"KNOTIFICATION_EditReceiveProduct" #define KNOTIFICATION_EditReceiveProduct @"KNOTIFICATION_EditReceiveProduct"
......
...@@ -74,8 +74,6 @@ static ICRUserUtil *sharedInstance = nil; ...@@ -74,8 +74,6 @@ static ICRUserUtil *sharedInstance = nil;
- (BOOL)saveArchive { - (BOOL)saveArchive {
BOOL result; BOOL result;
// get archive path to storage
NSString *filePath = [[self class] archivePath]; NSString *filePath = [[self class] archivePath];
result = [NSKeyedArchiver archiveRootObject:self toFile:filePath]; result = [NSKeyedArchiver archiveRootObject:self toFile:filePath];
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "BusinessViewController.h" #import "BusinessViewController.h"
#import "ICRAnnouncementViewController.h"
#import "NewSurveyViewController.h" #import "NewSurveyViewController.h"
#import "SurveyViewController.h" #import "SurveyViewController.h"
...@@ -123,8 +123,8 @@ ...@@ -123,8 +123,8 @@
switch (imageView.tag) { switch (imageView.tag) {
case kFunctionNotice://公告 case kFunctionNotice://公告
{ {
// ICRAnnouncementViewController *aVC = [[ICRAnnouncementViewController alloc] init]; ICRAnnouncementViewController *aVC = [[ICRAnnouncementViewController alloc] init];
// [self PushViewController:aVC animated:YES]; [self PushViewController:aVC animated:YES];
} }
break; break;
case kFunctionNewSurvey://新建行情 case kFunctionNewSurvey://新建行情
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#import "ICRFunctionBaseView.h" #import "ICRFunctionBaseView.h"
#import "ICRFunctionEntity.h" #import "ICRFunctionEntity.h"
#import "ICRAnnouncementViewController.h"
#import "NewSurveyViewController.h" #import "NewSurveyViewController.h"
#import "SurveyViewController.h" #import "SurveyViewController.h"
...@@ -26,22 +27,17 @@ ...@@ -26,22 +27,17 @@
#import "PurchaseNoticeViewController.h" #import "PurchaseNoticeViewController.h"
#import "GXFNewProcessViewController.h" #import "GXFNewProcessViewController.h"
#import "GXFFunctionsViewController.h" #import "GXFFunctionsViewController.h"
#import "GXFDisplayFunction.h" #import "GXFDisplayFunction.h"
#import "GXFFunction.h" #import "GXFFunction.h"
#import "GXFNoticeFunctionTableViewCell.h" #import "GXFNoticeFunctionTableViewCell.h"
#import "GXFFunctionCollectionViewCell.h" #import "GXFFunctionCollectionViewCell.h"
#import "GXFListProcessViewController.h" #import "GXFListProcessViewController.h"
#import "GXFFunctionDB.h" #import "GXFFunctionDB.h"
#define ICRFUNCTION_IMG_TOP_PADDING (25) #define ICRFUNCTION_IMG_TOP_PADDING (25)
#define ICRFUNCTION_IMG_WIDTH (65) #define ICRFUNCTION_IMG_WIDTH (65)
#define ICRFUNCTION_LABEL_HEIGHT (15) #define ICRFUNCTION_LABEL_HEIGHT (15)
#define ICRFUNCTION_INNER_GAP (5)
#define RIGHT_LINE_WIDTH (0.5) #define RIGHT_LINE_WIDTH (0.5)
@interface ICRHomeViewController () @interface ICRHomeViewController ()
<UITableViewDataSource,UITableViewDelegate,UICollectionViewDataSource,UICollectionViewDelegate,ICRFunctionBaseViewDelegate>//,UICollectionViewDelegateFlowLayout> <UITableViewDataSource,UITableViewDelegate,UICollectionViewDataSource,UICollectionViewDelegate,ICRFunctionBaseViewDelegate>//,UICollectionViewDelegateFlowLayout>
...@@ -226,8 +222,8 @@ static NSString *collectionCellID = @"collectionCell"; ...@@ -226,8 +222,8 @@ static NSString *collectionCellID = @"collectionCell";
switch (imageView.tag) { switch (imageView.tag) {
case kFunctionNotice://公告 case kFunctionNotice://公告
{ {
// ICRAnnouncementViewController *aVC = [[ICRAnnouncementViewController alloc] init]; ICRAnnouncementViewController *aVC = [[ICRAnnouncementViewController alloc] init];
// [self PushViewController:aVC animated:YES]; [self PushViewController:aVC animated:YES];
} }
break; break;
case kFunctionNewSurvey://新建行情 case kFunctionNewSurvey://新建行情
......
...@@ -161,7 +161,7 @@ typedef enum : NSUInteger { ...@@ -161,7 +161,7 @@ typedef enum : NSUInteger {
for (PurchaseBillProduct *billProduct in purchaseProduct) { for (PurchaseBillProduct *billProduct in purchaseProduct) {
totalPrice += [billProduct.total floatValue]; totalPrice += [billProduct.total floatValue];
} }
_purchaseView.purchasePriceLabel.text = [NSString stringWithFormat:@"%.4f",totalPrice + otherPrice]; _purchaseView.purchasePriceLabel.text = [NSString stringWithFormat:@"%.2f",totalPrice + otherPrice];
_purchaseView.chargePurchase = [NSNumber numberWithFloat:otherPrice]; _purchaseView.chargePurchase = [NSNumber numberWithFloat:otherPrice];
_purchaseView.total = [NSNumber numberWithFloat:totalPrice+otherPrice]; _purchaseView.total = [NSNumber numberWithFloat:totalPrice+otherPrice];
} }
...@@ -370,10 +370,10 @@ typedef enum : NSUInteger { ...@@ -370,10 +370,10 @@ typedef enum : NSUInteger {
shopDetail.packageSpecification = [billProduct.qpc stringValue]; shopDetail.packageSpecification = [billProduct.qpc stringValue];
shopDetail.packageUnit = billProduct.unit; shopDetail.packageUnit = billProduct.unit;
shopDetail.packageQuantity = [billProduct.qty stringValue]; shopDetail.packageQuantity = [billProduct.qty stringValue];
shopDetail.packageUnitPrice = [billProduct.price stringValue]; shopDetail.packageUnitPrice = billProduct.price;
shopDetail.foundationQuantity= [billProduct.baseQty stringValue]; shopDetail.foundationQuantity= [billProduct.baseQty stringValue];
shopDetail.foundationUnitPrice= [billProduct.basePrice stringValue]; shopDetail.foundationUnitPrice= billProduct.basePrice;
shopDetail.totalMoney= [billProduct.total stringValue]; shopDetail.totalMoney= billProduct.total;
shopDetail.remark = billProduct.remark; shopDetail.remark = billProduct.remark;
shopDetail.packageQpcStr = billProduct.qpcStr; shopDetail.packageQpcStr = billProduct.qpcStr;
shopDetail.packageQpcUnit = billProduct.baseUnit; shopDetail.packageQpcUnit = billProduct.baseUnit;
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
{ {
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = billProduct.product_name; self.titleLabel.text = billProduct.product_name;
self.priceLabel.text = [NSString stringWithFormat:@"%@元",[billProduct.basePrice stringValue]]; self.priceLabel.text = [NSString stringWithFormat:@"%.2f元",[billProduct.basePrice floatValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",[billProduct.qty stringValue],billProduct.unit]; self.countLabel.text = [NSString stringWithFormat:@"%@%@",[billProduct.qty stringValue],billProduct.unit];
self.shippedQtyLabel.text = [NSString stringWithFormat:@"%@%@",billProduct.shippedBaseQty ? [billProduct.shippedBaseQty stringValue]:@"0",billProduct.unit]; self.shippedQtyLabel.text = [NSString stringWithFormat:@"%@%@",billProduct.shippedBaseQty ? [billProduct.shippedBaseQty stringValue]:@"0",billProduct.unit];
...@@ -153,9 +153,9 @@ ...@@ -153,9 +153,9 @@
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[billProduct.qpc stringValue],billProduct.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[billProduct.qpc stringValue],billProduct.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[billProduct.qty stringValue],billProduct.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[billProduct.qty stringValue],billProduct.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[billProduct.baseQty stringValue],billProduct.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[billProduct.baseQty stringValue],billProduct.baseUnit];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[billProduct.price stringValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[billProduct.price floatValue]];
self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",[billProduct.basePrice stringValue]]; self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%.2f元",[billProduct.basePrice floatValue]];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[billProduct.total stringValue]]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[billProduct.total floatValue]];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",billProduct.remark ? billProduct.remark :@"无" ]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",billProduct.remark ? billProduct.remark :@"无" ];
[self isShowShippingQty:billProduct]; [self isShowShippingQty:billProduct];
} }
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
@property (nonatomic,strong)NSString *packageQuantity;//包装数量 @property (nonatomic,strong)NSString *packageQuantity;//包装数量
@property (nonatomic,strong)NSString *packageUnit;//包装单位 @property (nonatomic,strong)NSString *packageUnit;//包装单位
@property (nonatomic,strong)NSString *foundationQuantity;//基础数量 @property (nonatomic,strong)NSString *foundationQuantity;//基础数量
@property (nonatomic,strong)NSString *foundationUnitPrice;//基础单价 @property (nonatomic,strong)NSNumber *foundationUnitPrice;//基础单价
@property (nonatomic,strong)NSString *packageUnitPrice;//包装单价 @property (nonatomic,strong)NSNumber *packageUnitPrice;//包装单价
@property (nonatomic,strong)NSString *totalMoney;//总金额 @property (nonatomic,strong)NSNumber *totalMoney;//总金额
@property (nonatomic,strong)NSString *remark;//备注 @property (nonatomic,strong)NSString *remark;//备注
@property (nonatomic,assign)BOOL IsDeleted;//是否删除 @property (nonatomic,assign)BOOL IsDeleted;//是否删除
@property (nonatomic,assign)BOOL IsXiuGai;//是否删除 @property (nonatomic,assign)BOOL IsXiuGai;//是否删除
......
...@@ -52,6 +52,12 @@ typedef enum : NSUInteger { ...@@ -52,6 +52,12 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)NSString *productMeasureUnit;//默认规格单位 @property (nonatomic,strong)NSString *productMeasureUnit;//默认规格单位
@property (nonatomic,strong)NSString *packageQpcStr; //规格描述 @property (nonatomic,strong)NSString *packageQpcStr; //规格描述
@property (nonatomic,strong)NSString *packageUintStr; //包装单位 @property (nonatomic,strong)NSString *packageUintStr; //包装单位
@property (nonatomic,strong)NSNumber *packPrice;//包装单价
@property (nonatomic,strong)NSNumber *basePrice;//基础单价
@property (nonatomic,strong)NSNumber *totalPrice;//总金额
@property (nonatomic,strong)NSMutableArray *selectProducts; @property (nonatomic,strong)NSMutableArray *selectProducts;
@property (nonatomic,strong)NSString *selectUnit; @property (nonatomic,strong)NSString *selectUnit;
...@@ -125,18 +131,22 @@ typedef enum : NSUInteger { ...@@ -125,18 +131,22 @@ typedef enum : NSUInteger {
foundationQuantity.text=self.shopDetail.foundationQuantity; foundationQuantity.text=self.shopDetail.foundationQuantity;
//基础单价 //基础单价
if ([self.shopDetail.foundationUnitPrice floatValue] > 0) { if ([self.shopDetail.foundationUnitPrice floatValue] > 0) {
foundationUnitPrice.text=self.shopDetail.foundationUnitPrice; foundationUnitPrice.text= [NSString stringWithFormat:@"%.2f",[self.shopDetail.foundationUnitPrice floatValue]];
} }
self.basePrice = self.shopDetail.foundationUnitPrice;
//包装单价 //包装单价
if ([self.shopDetail.packageUnitPrice floatValue] > 0) { if ([self.shopDetail.packageUnitPrice floatValue] > 0) {
packageUnitPrice.text=self.shopDetail.packageUnitPrice; packageUnitPrice.text=[NSString stringWithFormat:@"%.2f",[self.shopDetail.packageUnitPrice floatValue]];
} }
self.packPrice = self.shopDetail.packageUnitPrice;
//总金额 //总金额
if ([self.shopDetail.totalMoney floatValue] <= 0) { if ([self.shopDetail.totalMoney floatValue] <= 0) {
totalMoney.text=@"0.0000"; totalMoney.text=@"0.0000";
}else{ }else{
totalMoney.text=self.shopDetail.totalMoney; totalMoney.text=[NSString stringWithFormat:@"%.2f",[self.shopDetail.totalMoney floatValue]];
} }
self.totalPrice = self.shopDetail.totalMoney;
//备注 //备注
remark.text=self.shopDetail.remark; remark.text=self.shopDetail.remark;
...@@ -226,12 +236,12 @@ typedef enum : NSUInteger { ...@@ -226,12 +236,12 @@ typedef enum : NSUInteger {
self.shopDetail.packageUnit = self.packageUintStr; self.shopDetail.packageUnit = self.packageUintStr;
self.shopDetail.packageQuantity = packageQuantity.text; self.shopDetail.packageQuantity = packageQuantity.text;
self.shopDetail.packageUnitPrice = packageUnitPrice.text; self.shopDetail.packageUnitPrice = self.packPrice;
self.shopDetail.foundationQuantity = foundationQuantity.text; self.shopDetail.foundationQuantity = foundationQuantity.text;
self.shopDetail.foundationUnitPrice = foundationUnitPrice.text; self.shopDetail.foundationUnitPrice = self.basePrice;
self.shopDetail.totalMoney = totalMoney.text; self.shopDetail.totalMoney = self.totalPrice;
self.shopDetail.remark = remark.text; self.shopDetail.remark = remark.text;
if (self.productNameStr.length == 0 ) { if (self.productNameStr.length == 0 ) {
...@@ -458,13 +468,16 @@ typedef enum : NSUInteger { ...@@ -458,13 +468,16 @@ typedef enum : NSUInteger {
} }
}else if(textField == foundationUnitPrice){ }else if(textField == foundationUnitPrice){
//基础单价 //基础单价
self.basePrice = [NSNumber numberWithFloat:foundationUnitPrice.text.floatValue];
[self setPacktAndTotalPrice]; [self setPacktAndTotalPrice];
//如果基础数量和包装数量有的话计算出包装单价和和总价 //如果基础数量和包装数量有的话计算出包装单价和和总价
}else if (textField == packageUnitPrice){ }else if (textField == packageUnitPrice){
//包装单价 //包装单价
self.packPrice = [NSNumber numberWithFloat:packageUnitPrice.text.floatValue];
[self setUnitAndTotalPrice]; [self setUnitAndTotalPrice];
}else if(textField == totalMoney){ }else if(textField == totalMoney){
//总金额 //总金额
self.totalPrice = [NSNumber numberWithFloat:totalMoney.text.floatValue];
[self setUnitAndPackPrice]; [self setUnitAndPackPrice];
} }
} }
...@@ -475,27 +488,30 @@ typedef enum : NSUInteger { ...@@ -475,27 +488,30 @@ typedef enum : NSUInteger {
[self setUnitAndTotalPrice]; [self setUnitAndTotalPrice];
} }
- (void)setPacktAndTotalPrice{ - (void)setPacktAndTotalPrice{
if (foundationUnitPrice.text.length > 0) { if (self.basePrice && foundationUnitPrice.text.length > 0) {
if (foundationQuantity.text.length > 0) { if (foundationQuantity.text.length > 0) {
float totalPrice = [foundationUnitPrice.text floatValue] * [foundationQuantity.text floatValue]; float totalPrice = [self.basePrice floatValue] * [foundationQuantity.text floatValue];
totalMoney.text = [NSString stringWithFormat:@"%.4f",totalPrice]; totalMoney.text = [NSString stringWithFormat:@"%.2f",totalPrice];
self.totalPrice = [NSNumber numberWithFloat:totalPrice];
if (packageQuantity.text.length > 0 && [packageQuantity.text floatValue] > 0) { if (packageQuantity.text.length > 0 && [packageQuantity.text floatValue] > 0) {
float packagePrice = totalPrice / [packageQuantity.text floatValue]; float packagePrice = totalPrice / [packageQuantity.text floatValue];
packageUnitPrice.text = [NSString stringWithFormat:@"%.4f",packagePrice]; packageUnitPrice.text = [NSString stringWithFormat:@"%.2f",packagePrice];
self.packPrice = [NSNumber numberWithFloat:packagePrice];
} }
} }
} }
} }
//输入包装单价(包装数量和基础数量)计算基础单价和总金额 //输入包装单价(包装数量和基础数量)计算基础单价和总金额
- (void)setUnitAndTotalPrice{ - (void)setUnitAndTotalPrice{
if (packageUnitPrice.text.length > 0) { if (self.packPrice&&packageUnitPrice.text.length > 0) {
if (packageQuantity.text.length > 0) { if (packageQuantity.text.length > 0) {
float totalPrice = [packageUnitPrice.text floatValue] * [packageQuantity.text floatValue]; float totalPrice = [self.packPrice floatValue] * [packageQuantity.text floatValue];
totalMoney.text = [NSString stringWithFormat:@"%.4f",totalPrice]; totalMoney.text = [NSString stringWithFormat:@"%.2f",totalPrice];
self.totalPrice = [NSNumber numberWithFloat:totalPrice];
if (foundationQuantity.text.length > 0 && [foundationQuantity.text integerValue] > 0) { if (foundationQuantity.text.length > 0 && [foundationQuantity.text integerValue] > 0) {
float packagePrice = totalPrice / [foundationQuantity.text floatValue]; float packagePrice = totalPrice / [foundationQuantity.text floatValue];
foundationUnitPrice.text = [NSString stringWithFormat:@"%.4f",packagePrice]; foundationUnitPrice.text = [NSString stringWithFormat:@"%.2f",packagePrice];
} self.basePrice = [NSNumber numberWithFloat:packagePrice]; }
} }
} }
} }
...@@ -503,12 +519,14 @@ typedef enum : NSUInteger { ...@@ -503,12 +519,14 @@ typedef enum : NSUInteger {
- (void)setUnitAndPackPrice{ - (void)setUnitAndPackPrice{
if (totalMoney.text.length > 0) { if (totalMoney.text.length > 0) {
if (packageQuantity.text.length > 0 && [packageQuantity.text floatValue] > 0) { if (packageQuantity.text.length > 0 && [packageQuantity.text floatValue] > 0) {
float packagePrice = [totalMoney.text floatValue] / [packageQuantity.text floatValue]; float packagePrice = [self.totalPrice floatValue] / [packageQuantity.text floatValue];
packageUnitPrice.text = [NSString stringWithFormat:@"%.4f",packagePrice]; packageUnitPrice.text = [NSString stringWithFormat:@"%.2f",packagePrice];
self.packPrice = [NSNumber numberWithFloat:packagePrice];
} }
if (foundationQuantity.text.length > 0 && [foundationQuantity.text floatValue] > 0) { if (foundationQuantity.text.length > 0 && [foundationQuantity.text floatValue] > 0) {
float packagePrice = [totalMoney.text floatValue] / [foundationQuantity.text floatValue]; float packagePrice = [self.totalPrice floatValue] / [foundationQuantity.text floatValue];
foundationUnitPrice.text = [NSString stringWithFormat:@"%.4f",packagePrice]; foundationUnitPrice.text = [NSString stringWithFormat:@"%.2f",packagePrice];
self.basePrice = [NSNumber numberWithFloat:packagePrice];
} }
} }
} }
......
...@@ -33,9 +33,10 @@ ...@@ -33,9 +33,10 @@
UILabel *_choosePackPriceLabel; UILabel *_choosePackPriceLabel;
UILabel *_chooseBasePriceLabel; UILabel *_chooseBasePriceLabel;
UILabel *_chooseTotalLabel; UILabel *_chooseTotalLabel;
UILabel *_chooseTotalPriceLabel;
UILabel *_chooseTotalPriceLabel;
UITextField *_shPackField; UITextField *_shPackField;
UITextField *_shBaseQuantityField; UITextField *_shBaseQuantityField;
UILabel *_shjcLabel; UILabel *_shjcLabel;
...@@ -152,8 +153,7 @@ ...@@ -152,8 +153,7 @@
} }
self.noticeProduct.rctQty =[NSNumber numberWithFloat:[_shPackField.text floatValue]]; self.noticeProduct.rctQty =[NSNumber numberWithFloat:[_shPackField.text floatValue]];
self.noticeProduct.rctBaseQty = [NSNumber numberWithFloat:[_shBaseQuantityField.text floatValue]];; self.noticeProduct.rctBaseQty = [NSNumber numberWithFloat:[_shBaseQuantityField.text floatValue]];
self.noticeProduct.rctTotal = [NSNumber numberWithFloat:[_chooseTotalPriceLabel.text floatValue]];
self.noticeProduct.note = _noteTextView.text; self.noticeProduct.note = _noteTextView.text;
return YES; return YES;
} }
...@@ -251,36 +251,43 @@ ...@@ -251,36 +251,43 @@
} }
} }
- (void)prepareDataIncell{ - (void)prepareDataIncell{
//商品
_chooseProductLabel.text = [NSString stringWithFormat:@"%@[%@]",self.noticeProduct.productName,self.noticeProduct.productCode]; _chooseProductLabel.text = [NSString stringWithFormat:@"%@[%@]",self.noticeProduct.productName,self.noticeProduct.productCode];
//包装单位
_choosePackUnitLabel.text = self.noticeProduct.unit; _choosePackUnitLabel.text = self.noticeProduct.unit;
//包装规格
_choosePackStandLabel.text = [NSString stringWithFormat:@"1*%@ %@",[self.noticeProduct.qpc stringValue],self.noticeProduct.baseUnit]; _choosePackStandLabel.text = [NSString stringWithFormat:@"1*%@ %@",[self.noticeProduct.qpc stringValue],self.noticeProduct.baseUnit];
//待收包装数量
_choosePackCountLabel.text = [NSString stringWithFormat:@"%@ %@",[self.noticeProduct.qty stringValue],self.noticeProduct.unit]; _choosePackCountLabel.text = [NSString stringWithFormat:@"%@ %@",[self.noticeProduct.qty stringValue],self.noticeProduct.unit];
//待收基础数量
_chooseBaseCountLabel.text = [NSString stringWithFormat:@"%@ %@",[self.noticeProduct.baseQty stringValue],self.noticeProduct.baseUnit]; _chooseBaseCountLabel.text = [NSString stringWithFormat:@"%@ %@",[self.noticeProduct.baseQty stringValue],self.noticeProduct.baseUnit];
_chooseTotalLabel.text = [NSString stringWithFormat:@"%@元",[self.noticeProduct.total stringValue]]; //待收总金额
_choosePackPriceLabel.text = [NSString stringWithFormat:@"%@ 元",[self.noticeProduct.packprice stringValue]]; _chooseTotalLabel.text = [NSString stringWithFormat:@"%.2f元",[self.noticeProduct.total floatValue]];
_chooseBasePriceLabel.text = [NSString stringWithFormat:@"%@ 元",[self.noticeProduct.price stringValue]];
//包装单价
_choosePackPriceLabel.text = [NSString stringWithFormat:@"%.2f 元",[self.noticeProduct.packprice floatValue]];
//基础单价
_chooseBasePriceLabel.text = [NSString stringWithFormat:@"%.2f 元",[self.noticeProduct.price floatValue]];
_shbzLabel.text = self.noticeProduct.unit; _shbzLabel.text = self.noticeProduct.unit;
_shjcLabel.text = self.noticeProduct.baseUnit; _shjcLabel.text = self.noticeProduct.baseUnit;
//实收基础数量
if (self.noticeProduct.rctBaseQty) { if (self.noticeProduct.rctBaseQty) {
_shBaseQuantityField.text =[NSString stringWithFormat:@"%@",[self.noticeProduct.rctBaseQty stringValue]]; _shBaseQuantityField.text =[NSString stringWithFormat:@"%@",[self.noticeProduct.rctBaseQty stringValue]];
} }
//实收包装数量
if (self.noticeProduct.rctQty) { if (self.noticeProduct.rctQty) {
_shPackField.text =[NSString stringWithFormat:@"%@",[self.noticeProduct.rctQty stringValue]]; _shPackField.text =[NSString stringWithFormat:@"%@",[self.noticeProduct.rctQty stringValue]];
} }
//实收总金额
if (self.noticeProduct.rctTotal) { if (self.noticeProduct.rctTotal) {
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%@ 元",[self.noticeProduct.rctTotal stringValue]]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f 元",[self.noticeProduct.rctTotal floatValue]];
}else { }else {
_chooseTotalPriceLabel.text = @"0.0000元"; _chooseTotalPriceLabel.text = @"0.00元";
} }
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
// if (indexPath.row == _dataArr.count - 1) {
// return TableRowHeight *2;
// }
return TableRowHeight; return TableRowHeight;
} }
...@@ -288,25 +295,37 @@ ...@@ -288,25 +295,37 @@
- (void)textChange:(UITextField *)textField{ - (void)textChange:(UITextField *)textField{
if (textField == _shPackField) { if (textField == _shPackField) {
if (_shPackField.text.length > 0) { if (_shPackField.text.length > 0) {
float total = [_shPackField.text floatValue] * [self.noticeProduct.packprice floatValue]; //基础数量【实收】= 包装数量【实收】* 规格
float baseCount = 0; float baseCount = [_shPackField.text floatValue] * [self.noticeProduct.qpc floatValue];
if ([self.noticeProduct.price floatValue] > 0) { _shBaseQuantityField.text = [NSString stringWithFormat:@"%.2f",baseCount];
baseCount = total / [self.noticeProduct.price floatValue]; //总金额【实收】= 基础数量【实收】* 基础单价
float total = 0;
if ([_shPackField.text floatValue] == [self.noticeProduct.qty floatValue]) {
total = [self.noticeProduct.total floatValue];
}else{
total = baseCount * [self.noticeProduct.price floatValue];
} }
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f元",total];
_shBaseQuantityField.text = [NSString stringWithFormat:@"%.2f",baseCount];
self.noticeProduct.rctTotal = [NSNumber numberWithFloat:total];
} }
}else if (textField == _shBaseQuantityField) { }else if (textField == _shBaseQuantityField) {
if (_shBaseQuantityField.text.length > 0) { if (_shBaseQuantityField.text.length > 0) {
float total = [_shBaseQuantityField.text floatValue] * [self.noticeProduct.price floatValue];
// 包装数量【实收】= 基础数量【实收】/ 规格
float baseCount = 0; float baseCount = 0;
if ([self.noticeProduct.packprice floatValue] > 0) { if ([self.noticeProduct.qpc floatValue] > 0) {
baseCount = total / [self.noticeProduct.packprice floatValue]; baseCount = [_shBaseQuantityField.text floatValue]/ [self.noticeProduct.qpc floatValue];
} }
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total];
_shPackField.text = [NSString stringWithFormat:@"%.2f",baseCount]; _shPackField.text = [NSString stringWithFormat:@"%.2f",baseCount];
float total = 0;
if ([_shPackField.text floatValue] == [self.noticeProduct.qty floatValue]) {
total = [self.noticeProduct.total floatValue];
}else{
total = baseCount * [self.noticeProduct.price floatValue];
}
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f元",total];
self.noticeProduct.rctTotal = [NSNumber numberWithFloat:total];
} }
} }
} }
......
...@@ -173,12 +173,12 @@ ...@@ -173,12 +173,12 @@
self.showshjcCountLabel.text = [NSString stringWithFormat:@"基础数量[实收]:%@%@",transferProduct.rctBaseQty?[transferProduct.rctBaseQty stringValue]:@"0",transferProduct.baseUnit]; self.showshjcCountLabel.text = [NSString stringWithFormat:@"基础数量[实收]:%@%@",transferProduct.rctBaseQty?[transferProduct.rctBaseQty stringValue]:@"0",transferProduct.baseUnit];
self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[transferProduct.packprice stringValue]]; self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[transferProduct.packprice floatValue]];
self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",[transferProduct.price stringValue]]; self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%.2f元",[transferProduct.price floatValue]];
self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%@元",transferProduct.rctTotal?[transferProduct.rctTotal stringValue]:@"0"]; self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%.2f元",transferProduct.rctTotal?[transferProduct.rctTotal floatValue]:0.00f];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",transferProduct.total?[transferProduct.total stringValue]:@"0"]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",transferProduct.total?[transferProduct.total floatValue]:0.00f];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ];
if ([state isEqualToString:@"YES"]) { if ([state isEqualToString:@"YES"]) {
if ([transferProduct.qty floatValue] > [transferProduct.rctQty floatValue]) { if ([transferProduct.qty floatValue] > [transferProduct.rctQty floatValue]) {
......
...@@ -7,31 +7,262 @@ ...@@ -7,31 +7,262 @@
// //
#import "ChooseTransferViewController.h" #import "ChooseTransferViewController.h"
#import "ChooseTansferCell.h"
@interface ChooseTransferViewController () #import "QueryOrder.h"
#import "TransferPdtDetail.h"
#import "MJRefresh.h"
#import "Transfer.h"
#define TopMargin 50
#define TableHeight 50
@interface ChooseTransferViewController ()<UITextFieldDelegate,UITableViewDataSource,UITableViewDelegate>
{
BOOL _isRefresh;
BOOL _isLoadMore;
NSInteger _currentPage;
id billNumberObject;
}
@property (nonatomic,strong)NSMutableArray *indexArr;
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UITextField *selectTextFiled;
@property (nonatomic,strong)NSString *contentStr;
@end @end
@implementation ChooseTransferViewController @implementation ChooseTransferViewController
- (instancetype)init{
self = [super init];
if (self) {
}
return self;
}
- (void)dealloc{
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. self.title = @"选择转运单";
[self initData];
[self bulidLayout];
[self createRefresh];
[self getData];
} }
- (void)initData{
- (void)didReceiveMemoryWarning { self.dataArr = [NSMutableArray array];
[super didReceiveMemoryWarning]; self.indexArr = [NSMutableArray array];
// 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)getData{
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [ICRUserUtil sharedInstance].needFresh = NO;
// Get the new view controller using [segue destinationViewController]. __weak typeof(self)weakSelf = self;
// Pass the selected object to the new view controller. 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 (orderArr.count == 0) {
QueryOrder *order = [QueryOrder new];
order.field = @"billNumber";
order.direction = @"desc";
[orderArr addObject:[order dictForCommit]];
}
billNumberObject = [NSNull null];
if (self.contentStr.length > 0) {
billNumberObject = self.contentStr;
}
NSDictionary *dict = @{
@"state":TRANSFER_STATE_RECEIVED,
@"billNumberLike":billNumberObject,
@"queryOrders":orderArr,
@"userUuid":userUtil.userId,
@"pageNumber":@(_currentPage),
// @"fetchParts":@"pdtDetails",
@"pageSize":@(20)};
[[ICRHTTPController sharedController] queryTransferWithData: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) {
Transfer *purchaseBill = [[Transfer alloc]init];
[purchaseBill setValuesForKeysWithDictionary:purchaseBillDict];
NSMutableArray *pdtArr = [NSMutableArray array];
for (NSDictionary *pdtDetailDict in purchaseBill.pdtDetails) {
TransferPdtDetail *tran = [TransferPdtDetail new];
[tran setValuesForKeysWithDictionary:pdtDetailDict];
tran.sourcebillnumber = purchaseBill.billnumber;
[pdtArr addObject:tran];
}
purchaseBill.pdtDetails = pdtArr;
[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)checkWithBillNumber{
if (self.indexArr.count > 0) {
[self.indexArr removeAllObjects];
}
[self.selectTextFiled resignFirstResponder];
if (self.selectTextFiled.text.length > 0) {
self.contentStr = self.selectTextFiled.text;
}else{
self.contentStr = @"";
}
[self getData];
}
#pragma mark - 布局
- (void)bulidLayout
{
self.selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 100,TopMargin -10)];
self.selectTextFiled.textAlignment = NSTextAlignmentLeft;
self.selectTextFiled.background = [UIImage imageNamed:@"textFiled"];
self.selectTextFiled.delegate = self;
self.selectTextFiled.placeholder = @"输入类似转运单号";
self.selectTextFiled.font = GXF_FIFTEENTEN_SIZE;
[self.view addSubview:self.selectTextFiled];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(self.selectTextFiled.right + 5, 10, 60, TopMargin - 20);
[btn setTitle:@"开始查询" forState:UIControlStateNormal];
btn.titleLabel.font = FontSize(13);
btn.layer.cornerRadius = 5;
btn.layer.masksToBounds = YES;
btn.backgroundColor = GXF_NAVIGAYION_COLOR;
[btn addTarget:self action:@selector(checkWithBillNumber) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)];
leftView.image = [UIImage imageNamed:@"search"];
self.selectTextFiled.leftView = leftView;
self.selectTextFiled.leftViewMode = UITextFieldViewModeAlways;
UIButton *rightView = [UIButton buttonWithType:UIButtonTypeCustom];
[rightView setImage:[UIImage imageNamed:@"delete"] forState:UIControlStateNormal];
rightView.frame = CGRectMake(0, 0, 35, 40);
[rightView addTarget:self action:@selector(deleteTextFieldStr) forControlEvents:UIControlEventTouchUpInside];
self.selectTextFiled.rightView = rightView;
self.selectTextFiled.rightViewMode = UITextFieldViewModeAlways;
self.tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, TopMargin,ScreenSize.width, ScreenSize.height - 64 - TopMargin)) style:(UITableViewStylePlain)];
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.view addSubview:self.tableView];
UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)];
self.navigationItem.rightBarButtonItem = rightItem;
}
- (void)createRefresh{
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
if (_isRefresh) {
return ;
}
_isRefresh = YES;
_currentPage = 0;
[self getData];
}];
self.tableView.header.lastUpdatedTimeKey = ChooseTransportUpdateDate;
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)deleteTextFieldStr{
self.selectTextFiled.text = @"";
}
#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 = @"ChooseTansferCell";
ChooseTansferCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[ChooseTansferCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
if(self.dataArr.count > 0){
Transfer *bill = _dataArr[indexPath.row];
[cell setTransfer:bill selectArr:self.indexArr];
}
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
//44+38+10 + count* 44
Transfer *bill = _dataArr[indexPath.row];
return 102 + bill.pdtDetails.count * 44;
}
#pragma mark - 按钮确定
- (void)sureClick{
[self PopViewControllerAnimated:YES];
if (self.indexArr.count > 0) {
NSMutableArray*arr = [NSMutableArray array];
for (TransferPdtDetail *detail in self.indexArr) {
detail.sourcePdtDetail = detail.uuid;
detail.uuid = nil;
detail.sourcetype = @"transfer";
[arr addObject:detail];
}
self.chooseTransferProduct(arr);
}
} }
*/
@end @end
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#import "ShopDetaileViewController.h" #import "ShopDetaileViewController.h"
#import "TransportPdtDetail.h" #import "TransportPdtDetail.h"
#import "ChooseTransportViewController.h" #import "ChooseTransportViewController.h"
#import "ChooseTransferViewController.h"
typedef enum : NSUInteger { typedef enum : NSUInteger {
SaveTag = 7000, SaveTag = 7000,
CommitTag, CommitTag,
...@@ -49,6 +50,7 @@ typedef enum : NSUInteger { ...@@ -49,6 +50,7 @@ typedef enum : NSUInteger {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addTransferCost:) name:KNOTIFICATION_AddTransportCost object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addTransferCost:) name:KNOTIFICATION_AddTransportCost object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addPurchferProduct:) name:KNOTIFICATION_AddPurchaseProduct object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addPurchferProduct:) name:KNOTIFICATION_AddPurchaseProduct object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(chooseTransportProduct) name:KNOTIFICATION_ChoseTransportProduct object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(chooseTransportProduct) name:KNOTIFICATION_ChoseTransportProduct object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(chooseTransferProduct) name:KNOTIFICATION_ChoseTransferProduct object:nil];
} }
return self; return self;
} }
...@@ -300,6 +302,18 @@ typedef enum : NSUInteger { ...@@ -300,6 +302,18 @@ typedef enum : NSUInteger {
}; };
[self PushViewController:tpv animated:YES]; [self PushViewController:tpv animated:YES];
} }
- (void)chooseTransferProduct{
ChooseTransferViewController *ctv = [ChooseTransferViewController new];
ctv.chooseTransferProduct = ^(NSArray *products){
if (products.count > 0) {
[_bottomView reProduct:products];
}
};
[self PushViewController:ctv animated:YES];
}
- (void)addTransferCost:(NSNotification *)fination{ - (void)addTransferCost:(NSNotification *)fination{
NewCostViewController *nvc = [NewCostViewController new]; NewCostViewController *nvc = [NewCostViewController new];
...@@ -386,10 +400,10 @@ typedef enum : NSUInteger { ...@@ -386,10 +400,10 @@ typedef enum : NSUInteger {
shopDetail.packageSpecification = [billProduct.qpc stringValue]; shopDetail.packageSpecification = [billProduct.qpc stringValue];
shopDetail.packageUnit = billProduct.unit; shopDetail.packageUnit = billProduct.unit;
shopDetail.packageQuantity = [billProduct.qty stringValue]; shopDetail.packageQuantity = [billProduct.qty stringValue];
shopDetail.packageUnitPrice = [billProduct.packprice stringValue]; shopDetail.packageUnitPrice = billProduct.packprice;
shopDetail.foundationUnitPrice= [billProduct.price stringValue]; shopDetail.foundationUnitPrice= billProduct.price;
shopDetail.foundationQuantity= [billProduct.baseQty stringValue]; shopDetail.foundationQuantity= [billProduct.baseQty stringValue];
shopDetail.totalMoney= [billProduct.total stringValue]; shopDetail.totalMoney= billProduct.total;
shopDetail.remark = billProduct.note; shopDetail.remark = billProduct.note;
shopDetail.packageQpcUnit = billProduct.baseUnit; shopDetail.packageQpcUnit = billProduct.baseUnit;
shopDetail.packageQpcStr = billProduct.qpcStr; shopDetail.packageQpcStr = billProduct.qpcStr;
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
#pragma mark - headCellDelegate #pragma mark - headCellDelegate
- (void)addClickList{ - (void)addClickList{
if (!self.popView) { if (!self.popView) {
NSArray *arr = @[@"添加商品明细",@"选择采购单",@"选择发运单"]; NSArray *arr = @[@"添加商品明细",@"选择采购单",@"选择发运单",@"选择转运单"];
self.popView = [[GXFPopView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height) withArr:arr]; self.popView = [[GXFPopView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height) withArr:arr];
self.popView.delegate = self; self.popView.delegate = self;
[AppWindow addSubview:self.popView]; [AppWindow addSubview:self.popView];
...@@ -87,6 +87,8 @@ ...@@ -87,6 +87,8 @@
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_ChoseTransportPurchase object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_ChoseTransportPurchase object:nil];
}else if ([str isEqualToString:@"选择发运单"]){ }else if ([str isEqualToString:@"选择发运单"]){
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_ChoseTransportProduct object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_ChoseTransportProduct object:nil];
}else if ([str isEqualToString:@"选择转运单"]){
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_ChoseTransferProduct object:nil];
} }
} }
- (void)clearFromSuper{ - (void)clearFromSuper{
......
//
// ChooseTansferCell.h
// XFFruit
//
// Created by 陈俊俊 on 15/11/10.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Transfer.h"
@interface ChooseTansferCell : UITableViewCell<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UIView *bgView;
@property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)UILabel *lineLabel;
@property (nonatomic,strong)UILabel *secondLabel;
@property (nonatomic,strong)UILabel *threeLabel;
@property (nonatomic,strong)UITableView *secondTable;
@property (nonatomic,strong)NSMutableArray *secondArr;
@property (nonatomic,strong)NSMutableArray *indexArr;
@property (nonatomic,strong)NSMutableArray *selectArr;
- (void)setTransfer:(Transfer *)bill selectArr:(NSMutableArray *)selectArr;
@end
//
// ChooseTansferCell.m
// XFFruit
//
// Created by 陈俊俊 on 15/11/10.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "ChooseTansferCell.h"
#import "TransferProductCell.h"
#import "HeaderCell.h"
#define TableHeight 44
#define ShowHeight 110
@implementation ChooseTansferCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self bulidLayout];
}
return self;
}
- (void)bulidLayout
{
self.contentView.backgroundColor = XXFBgColor;
self.bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 170)];
self.bgView.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:self.bgView];
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0,0, ScreenSize.width, 1))];;
self.lineLabel.backgroundColor = GXF_LINE_COLOR;
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, 0, ScreenSize.width, 44))];
self.titleLabel.textColor = GXF_NAVIGAYION_COLOR;
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.font = GXF_SEVENTEENTH_SIZE;
self.secondLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0,44-1, ScreenSize.width, 1))];;
self.secondLabel.backgroundColor = GXF_LINE_COLOR;
[self.bgView addSubview:self.titleLabel];
[self.bgView addSubview:self.lineLabel];
[self.bgView addSubview:self.secondLabel];
self.secondTable = [[UITableView alloc]initWithFrame:(CGRectMake(0, 44,ScreenSize.width, self.bgView.height-45)) style:(UITableViewStylePlain)];
self.secondTable.delegate = self;
self.secondTable.dataSource = self;
self.secondTable.bounces = NO;
self.secondTable.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.bgView addSubview:self.secondTable];
NSArray *arr = @[@"商品",@"单价",@"包装数量"];
HeaderCell *headCell = [[HeaderCell alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 38) withArr:arr withHiddenEdit:YES];
self.secondTable.tableHeaderView = headCell;
}
//转运单商品
- (void)setTransfer:(Transfer *)bill selectArr:(NSMutableArray *)selectArr{
self.bgView.height = 92 + bill.pdtDetails.count * 44;
self.secondTable.height = self.bgView.height - 45;
self.titleLabel.text = [NSString stringWithFormat:@"转单号:%@",bill.billnumber];
self.secondArr = [NSMutableArray array];
self.selectArr = selectArr;
[self.secondArr addObjectsFromArray:bill.pdtDetails];
//重要
[self.secondTable reloadData];
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.secondArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellID = @"TransferProductCell";
TransferProductCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[TransferProductCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID withImageName:@"selected"];
cell.editBtn.hidden = YES;
cell.rightImageName = @"edit";
}
if (self.secondArr.count > 0) {
TransferPdtDetail * billProduct = self.secondArr[indexPath.row];
[cell setPdtDetail:billProduct row:indexPath.row];
if ([self isHaveIndexPath:billProduct]) {
cell.editBtn.hidden = NO;
}else{
cell.editBtn.hidden = YES;
}
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
TransferProductCell *cell = (TransferProductCell *)[tableView cellForRowAtIndexPath:indexPath];
TransferPdtDetail * billProduct = self.secondArr[indexPath.row];
if (![self isHaveIndexPath:billProduct]) {
cell.editBtn.hidden = NO;
[self.selectArr addObject:billProduct];
}else{
[self.selectArr removeObject:billProduct];
cell.editBtn.hidden = YES;
}
[self.secondTable reloadData];
}
- (BOOL)isHaveIndexPath:(TransferPdtDetail *)billProduct{
for (TransferPdtDetail *detail in self.selectArr) {
if (detail.uuid == billProduct.uuid || [detail.uuid isEqualToString:billProduct.uuid]) {
return YES;
}
}
return NO;
}
@end
...@@ -144,13 +144,13 @@ ...@@ -144,13 +144,13 @@
- (void)setPdtDetail:(TransferPdtDetail *)pdtDetail row:(NSInteger)row{ - (void)setPdtDetail:(TransferPdtDetail *)pdtDetail row:(NSInteger)row{
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName; self.titleLabel.text = pdtDetail.productName;
self.priceLabel.text = [NSString stringWithFormat:@"%@元",[pdtDetail.price stringValue]]; self.priceLabel.text = [NSString stringWithFormat:@"%.2f元",[pdtDetail.price floatValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode]; self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[pdtDetail.packprice stringValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]];
NSString *sourceT = @""; NSString *sourceT = @"";
if ([pdtDetail.sourcetype isEqualToString:@"none"]) { if ([pdtDetail.sourcetype isEqualToString:@"none"]) {
sourceT = @"无"; sourceT = @"无";
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
self.showPurchaseLabel.text = [NSString stringWithFormat:@"来源类型:%@",sourceT]; self.showPurchaseLabel.text = [NSString stringWithFormat:@"来源类型:%@",sourceT];
self.showSourceNumberLabel.text = [NSString stringWithFormat:@"来源单号:%@",pdtDetail.sourcebillnumber.length > 0 ?pdtDetail.sourcebillnumber : @"无"]; self.showSourceNumberLabel.text = [NSString stringWithFormat:@"来源单号:%@",pdtDetail.sourcebillnumber.length > 0 ?pdtDetail.sourcebillnumber : @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[pdtDetail.total stringValue]]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"];
} }
......
...@@ -385,10 +385,10 @@ typedef enum : NSUInteger { ...@@ -385,10 +385,10 @@ typedef enum : NSUInteger {
shopDetail.packageSpecification = [billProduct.qpc stringValue]; shopDetail.packageSpecification = [billProduct.qpc stringValue];
shopDetail.packageUnit = billProduct.unit; shopDetail.packageUnit = billProduct.unit;
shopDetail.packageQuantity = [billProduct.qty stringValue]; shopDetail.packageQuantity = [billProduct.qty stringValue];
shopDetail.packageUnitPrice = [billProduct.packprice stringValue]; shopDetail.packageUnitPrice = billProduct.packprice;
shopDetail.foundationUnitPrice= [billProduct.price stringValue]; shopDetail.foundationUnitPrice= billProduct.price;
shopDetail.foundationQuantity= [billProduct.baseQty stringValue]; shopDetail.foundationQuantity= [billProduct.baseQty stringValue];
shopDetail.totalMoney= [billProduct.total stringValue]; shopDetail.totalMoney= billProduct.total;
shopDetail.remark = billProduct.note; shopDetail.remark = billProduct.note;
shopDetail.sourceDetail = billProduct.purchasePdtDetail; shopDetail.sourceDetail = billProduct.purchasePdtDetail;
shopDetail.sourceBillNumber = billProduct.purchasebillnumber; shopDetail.sourceBillNumber = billProduct.purchasebillnumber;
......
...@@ -71,17 +71,6 @@ ...@@ -71,17 +71,6 @@
self.selectArr = selectArr; self.selectArr = selectArr;
[self.secondArr addObjectsFromArray:bill.products]; [self.secondArr addObjectsFromArray:bill.products];
// self.secondTable = [[UITableView alloc]initWithFrame:(CGRectMake(0, 44,ScreenSize.width, self.bgView.height-45)) style:(UITableViewStylePlain)];
//
// self.secondTable.delegate = self;
// self.secondTable.dataSource = self;
//// self.secondTable.bounces = NO;
// self.secondTable.separatorStyle = UITableViewCellSeparatorStyleNone;
// [self.bgView addSubview:self.secondTable];
// NSArray *arr = @[@"商品",@"单价",@"包装数量"];
//
// HeaderCell *headCell = [[HeaderCell alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 38) withArr:arr];
// self.secondTable.tableHeaderView = headCell;
//重要 //重要
[self.secondTable reloadData]; [self.secondTable reloadData];
} }
......
...@@ -150,15 +150,15 @@ ...@@ -150,15 +150,15 @@
- (void)setPdtDetail:(TransportPdtDetail *)pdtDetail row:(NSInteger)row{ - (void)setPdtDetail:(TransportPdtDetail *)pdtDetail row:(NSInteger)row{
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName; self.titleLabel.text = pdtDetail.productName;
self.priceLabel.text = [NSString stringWithFormat:@"%@元",[pdtDetail.price stringValue]]; self.priceLabel.text = [NSString stringWithFormat:@"%.2f元",[pdtDetail.price floatValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode]; self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[pdtDetail.packprice stringValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]];
self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"]; self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[pdtDetail.total stringValue]]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"];
} }
......
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