Commit f603834e authored by 曹云霄's avatar 曹云霄

送货,路径规划开发

parent be364872
......@@ -8,9 +8,18 @@
/* Begin PBXBuildFile section */
245A94E8CF106B8484648757 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8BAB5AF34EDA6C9F919C2FC /* libPods.a */; };
290DAADD1D6E8276005F5085 /* CoordinateAcquisitionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 290DAADC1D6E8276005F5085 /* CoordinateAcquisitionViewController.m */; };
290DAAE01D6E8296005F5085 /* DeliveryTrackingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 290DAADF1D6E8296005F5085 /* DeliveryTrackingViewController.m */; };
290DAAE31D6E9259005F5085 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 290DAAE21D6E9259005F5085 /* MainViewController.m */; };
292311981D86A9B00043A55E /* UIView+cornerRadius.m in Sources */ = {isa = PBXBuildFile; fileRef = 292311971D86A9B00043A55E /* UIView+cornerRadius.m */; };
2927DEF11D87CF1200E0BC8E /* OrderListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2927DEF01D87CF1200E0BC8E /* OrderListViewController.m */; };
2927DEF41D87CF3F00E0BC8E /* OrderListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2927DEF31D87CF3F00E0BC8E /* OrderListTableViewCell.m */; };
295ECD871D86784500DC6EB0 /* UIImage+Rotate.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECD861D86784500DC6EB0 /* UIImage+Rotate.m */; };
295ECD8A1D8690F200DC6EB0 /* NSDate+FormatterAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECD891D8690F200DC6EB0 /* NSDate+FormatterAdditions.m */; };
295ECD8D1D86910100DC6EB0 /* NSDictionary+Category.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECD8C1D86910100DC6EB0 /* NSDictionary+Category.m */; };
295ECDA41D86977000DC6EB0 /* CoordinateAcquisitionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECD991D86977000DC6EB0 /* CoordinateAcquisitionViewController.m */; };
295ECDA51D86977000DC6EB0 /* DeliveryTrackingViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 295ECD9B1D86977000DC6EB0 /* DeliveryTrackingViewController.mm */; };
295ECDA61D86977000DC6EB0 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECD9D1D86977000DC6EB0 /* MainViewController.m */; };
295ECDA71D86977000DC6EB0 /* OrderDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECD9F1D86977000DC6EB0 /* OrderDetailsViewController.m */; };
295ECDA81D86977000DC6EB0 /* SearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECDA11D86977000DC6EB0 /* SearchViewController.m */; };
295ECDAB1D86979B00DC6EB0 /* OrderDetailsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 295ECDAA1D86979B00DC6EB0 /* OrderDetailsTableViewCell.m */; };
2970D1891D6D7C1000ADB311 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2970D1881D6D7C1000ADB311 /* Images.xcassets */; };
2970D18B1D6D7CFE00ADB311 /* PalmwmsMain.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2970D18A1D6D7CFE00ADB311 /* PalmwmsMain.storyboard */; };
2970D18E1D6D7D3900ADB311 /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2970D18D1D6D7D3900ADB311 /* BaseViewController.m */; };
......@@ -20,7 +29,6 @@
2970D1A91D6D8F9D00ADB311 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2970D1A81D6D8F9D00ADB311 /* LoginViewController.m */; };
2970D1AC1D6D991100ADB311 /* UIView+Corners.m in Sources */ = {isa = PBXBuildFile; fileRef = 2970D1AB1D6D991100ADB311 /* UIView+Corners.m */; };
2970D1B01D6D9CB300ADB311 /* palmwms_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 2970D1AF1D6D9CB200ADB311 /* palmwms_objc_json_client.m */; };
29CAE1FD1D6EB71B0011CCE6 /* SearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29CAE1FC1D6EB71B0011CCE6 /* SearchViewController.m */; };
29CAE20A1D6ED4BF0011CCE6 /* CustomLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 29CAE2041D6ED4BF0011CCE6 /* CustomLabel.m */; };
29CAE20C1D6ED4BF0011CCE6 /* UserPaopaoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29CAE2081D6ED4BF0011CCE6 /* UserPaopaoView.m */; };
29CAE20F1D6EE34E0011CCE6 /* CustomBMKAnnotationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29CAE20E1D6EE34E0011CCE6 /* CustomBMKAnnotationView.m */; };
......@@ -35,12 +43,30 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
290DAADB1D6E8276005F5085 /* CoordinateAcquisitionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoordinateAcquisitionViewController.h; sourceTree = "<group>"; };
290DAADC1D6E8276005F5085 /* CoordinateAcquisitionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoordinateAcquisitionViewController.m; sourceTree = "<group>"; };
290DAADE1D6E8296005F5085 /* DeliveryTrackingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeliveryTrackingViewController.h; sourceTree = "<group>"; };
290DAADF1D6E8296005F5085 /* DeliveryTrackingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeliveryTrackingViewController.m; sourceTree = "<group>"; };
290DAAE11D6E9259005F5085 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
290DAAE21D6E9259005F5085 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
292311961D86A9B00043A55E /* UIView+cornerRadius.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+cornerRadius.h"; sourceTree = "<group>"; };
292311971D86A9B00043A55E /* UIView+cornerRadius.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+cornerRadius.m"; sourceTree = "<group>"; };
2927DEEF1D87CF1200E0BC8E /* OrderListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderListViewController.h; sourceTree = "<group>"; };
2927DEF01D87CF1200E0BC8E /* OrderListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderListViewController.m; sourceTree = "<group>"; };
2927DEF21D87CF3F00E0BC8E /* OrderListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderListTableViewCell.h; sourceTree = "<group>"; };
2927DEF31D87CF3F00E0BC8E /* OrderListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderListTableViewCell.m; sourceTree = "<group>"; };
295ECD851D86784500DC6EB0 /* UIImage+Rotate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Rotate.h"; sourceTree = "<group>"; };
295ECD861D86784500DC6EB0 /* UIImage+Rotate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Rotate.m"; sourceTree = "<group>"; };
295ECD881D8690F200DC6EB0 /* NSDate+FormatterAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+FormatterAdditions.h"; sourceTree = "<group>"; };
295ECD891D8690F200DC6EB0 /* NSDate+FormatterAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+FormatterAdditions.m"; sourceTree = "<group>"; };
295ECD8B1D86910100DC6EB0 /* NSDictionary+Category.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+Category.h"; sourceTree = "<group>"; };
295ECD8C1D86910100DC6EB0 /* NSDictionary+Category.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+Category.m"; sourceTree = "<group>"; };
295ECD981D86977000DC6EB0 /* CoordinateAcquisitionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoordinateAcquisitionViewController.h; sourceTree = "<group>"; };
295ECD991D86977000DC6EB0 /* CoordinateAcquisitionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoordinateAcquisitionViewController.m; sourceTree = "<group>"; };
295ECD9A1D86977000DC6EB0 /* DeliveryTrackingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeliveryTrackingViewController.h; sourceTree = "<group>"; };
295ECD9B1D86977000DC6EB0 /* DeliveryTrackingViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeliveryTrackingViewController.mm; sourceTree = "<group>"; };
295ECD9C1D86977000DC6EB0 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
295ECD9D1D86977000DC6EB0 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
295ECD9E1D86977000DC6EB0 /* OrderDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderDetailsViewController.h; sourceTree = "<group>"; };
295ECD9F1D86977000DC6EB0 /* OrderDetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderDetailsViewController.m; sourceTree = "<group>"; };
295ECDA01D86977000DC6EB0 /* SearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchViewController.h; sourceTree = "<group>"; };
295ECDA11D86977000DC6EB0 /* SearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchViewController.m; sourceTree = "<group>"; };
295ECDA91D86979B00DC6EB0 /* OrderDetailsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderDetailsTableViewCell.h; sourceTree = "<group>"; };
295ECDAA1D86979B00DC6EB0 /* OrderDetailsTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderDetailsTableViewCell.m; sourceTree = "<group>"; };
2970D1881D6D7C1000ADB311 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
2970D18A1D6D7CFE00ADB311 /* PalmwmsMain.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = PalmwmsMain.storyboard; sourceTree = "<group>"; };
2970D18C1D6D7D3900ADB311 /* BaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseViewController.h; sourceTree = "<group>"; };
......@@ -59,8 +85,6 @@
2970D1AB1D6D991100ADB311 /* UIView+Corners.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Corners.m"; sourceTree = "<group>"; };
2970D1AE1D6D9CB200ADB311 /* palmwms_objc_json_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = palmwms_objc_json_client.h; sourceTree = "<group>"; };
2970D1AF1D6D9CB200ADB311 /* palmwms_objc_json_client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = palmwms_objc_json_client.m; sourceTree = "<group>"; };
29CAE1FB1D6EB71B0011CCE6 /* SearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchViewController.h; sourceTree = "<group>"; };
29CAE1FC1D6EB71B0011CCE6 /* SearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchViewController.m; sourceTree = "<group>"; };
29CAE2031D6ED4BF0011CCE6 /* CustomLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomLabel.h; sourceTree = "<group>"; };
29CAE2041D6ED4BF0011CCE6 /* CustomLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomLabel.m; sourceTree = "<group>"; };
29CAE2071D6ED4BF0011CCE6 /* UserPaopaoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserPaopaoView.h; sourceTree = "<group>"; };
......@@ -100,6 +124,46 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
295ECD971D86977000DC6EB0 /* Contrillers */ = {
isa = PBXGroup;
children = (
295ECD981D86977000DC6EB0 /* CoordinateAcquisitionViewController.h */,
295ECD991D86977000DC6EB0 /* CoordinateAcquisitionViewController.m */,
295ECD9A1D86977000DC6EB0 /* DeliveryTrackingViewController.h */,
295ECD9B1D86977000DC6EB0 /* DeliveryTrackingViewController.mm */,
295ECD9C1D86977000DC6EB0 /* MainViewController.h */,
295ECD9D1D86977000DC6EB0 /* MainViewController.m */,
295ECD9E1D86977000DC6EB0 /* OrderDetailsViewController.h */,
295ECD9F1D86977000DC6EB0 /* OrderDetailsViewController.m */,
2927DEEF1D87CF1200E0BC8E /* OrderListViewController.h */,
2927DEF01D87CF1200E0BC8E /* OrderListViewController.m */,
295ECDA01D86977000DC6EB0 /* SearchViewController.h */,
295ECDA11D86977000DC6EB0 /* SearchViewController.m */,
);
name = Contrillers;
path = Map/Contrillers;
sourceTree = "<group>";
};
295ECDA21D86977000DC6EB0 /* Models */ = {
isa = PBXGroup;
children = (
);
name = Models;
path = Map/Models;
sourceTree = "<group>";
};
295ECDA31D86977000DC6EB0 /* Views */ = {
isa = PBXGroup;
children = (
295ECDA91D86979B00DC6EB0 /* OrderDetailsTableViewCell.h */,
295ECDAA1D86979B00DC6EB0 /* OrderDetailsTableViewCell.m */,
2927DEF21D87CF3F00E0BC8E /* OrderListTableViewCell.h */,
2927DEF31D87CF3F00E0BC8E /* OrderListTableViewCell.m */,
);
name = Views;
path = Map/Views;
sourceTree = "<group>";
};
2970D1861D6D7BF800ADB311 /* Class */ = {
isa = PBXGroup;
children = (
......@@ -138,14 +202,9 @@
isa = PBXGroup;
children = (
29CAE2001D6ED4BF0011CCE6 /* Map */,
290DAAE11D6E9259005F5085 /* MainViewController.h */,
290DAAE21D6E9259005F5085 /* MainViewController.m */,
290DAADB1D6E8276005F5085 /* CoordinateAcquisitionViewController.h */,
290DAADC1D6E8276005F5085 /* CoordinateAcquisitionViewController.m */,
290DAADE1D6E8296005F5085 /* DeliveryTrackingViewController.h */,
290DAADF1D6E8296005F5085 /* DeliveryTrackingViewController.m */,
29CAE1FB1D6EB71B0011CCE6 /* SearchViewController.h */,
29CAE1FC1D6EB71B0011CCE6 /* SearchViewController.m */,
295ECD971D86977000DC6EB0 /* Contrillers */,
295ECDA21D86977000DC6EB0 /* Models */,
295ECDA31D86977000DC6EB0 /* Views */,
);
path = Main;
sourceTree = "<group>";
......@@ -165,6 +224,14 @@
2970D1941D6D885F00ADB311 /* Category */ = {
isa = PBXGroup;
children = (
292311961D86A9B00043A55E /* UIView+cornerRadius.h */,
292311971D86A9B00043A55E /* UIView+cornerRadius.m */,
295ECD8B1D86910100DC6EB0 /* NSDictionary+Category.h */,
295ECD8C1D86910100DC6EB0 /* NSDictionary+Category.m */,
295ECD881D8690F200DC6EB0 /* NSDate+FormatterAdditions.h */,
295ECD891D8690F200DC6EB0 /* NSDate+FormatterAdditions.m */,
295ECD851D86784500DC6EB0 /* UIImage+Rotate.h */,
295ECD861D86784500DC6EB0 /* UIImage+Rotate.m */,
2970D19E1D6D8AF500ADB311 /* UILabel+CalculateSize.h */,
2970D19F1D6D8AF500ADB311 /* UILabel+CalculateSize.m */,
2970D1AA1D6D991100ADB311 /* UIView+Corners.h */,
......@@ -338,6 +405,11 @@
29CF91721D66B8CC00AE13A8 = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 39XYE6VSP8;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
};
};
};
};
};
......@@ -426,25 +498,33 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
295ECDA51D86977000DC6EB0 /* DeliveryTrackingViewController.mm in Sources */,
295ECDAB1D86979B00DC6EB0 /* OrderDetailsTableViewCell.m in Sources */,
2970D1A01D6D8AF500ADB311 /* UILabel+CalculateSize.m in Sources */,
29CAE1FD1D6EB71B0011CCE6 /* SearchViewController.m in Sources */,
2970D1A31D6D8CE800ADB311 /* UserInforMation.m in Sources */,
295ECD8A1D8690F200DC6EB0 /* NSDate+FormatterAdditions.m in Sources */,
29CAE20C1D6ED4BF0011CCE6 /* UserPaopaoView.m in Sources */,
290DAADD1D6E8276005F5085 /* CoordinateAcquisitionViewController.m in Sources */,
295ECD871D86784500DC6EB0 /* UIImage+Rotate.m in Sources */,
29CF917B1D66B8CC00AE13A8 /* AppDelegate.m in Sources */,
29DC842F1D6FD9A100F377C3 /* ChangepassWordTableViewController.m in Sources */,
29D7651B1D6F322A0005CA21 /* UserViewController.m in Sources */,
290DAAE01D6E8296005F5085 /* DeliveryTrackingViewController.m in Sources */,
2970D1AC1D6D991100ADB311 /* UIView+Corners.m in Sources */,
292311981D86A9B00043A55E /* UIView+cornerRadius.m in Sources */,
2970D1B01D6D9CB300ADB311 /* palmwms_objc_json_client.m in Sources */,
295ECDA61D86977000DC6EB0 /* MainViewController.m in Sources */,
29D765221D6F33920005CA21 /* LogoutTableViewCell.m in Sources */,
29D7651F1D6F33800005CA21 /* ChangePasswordTableViewCell.m in Sources */,
290DAAE31D6E9259005F5085 /* MainViewController.m in Sources */,
295ECDA41D86977000DC6EB0 /* CoordinateAcquisitionViewController.m in Sources */,
2970D1A61D6D8DBF00ADB311 /* NetworkRequestClassManager.m in Sources */,
2970D1A91D6D8F9D00ADB311 /* LoginViewController.m in Sources */,
295ECDA71D86977000DC6EB0 /* OrderDetailsViewController.m in Sources */,
2970D18E1D6D7D3900ADB311 /* BaseViewController.m in Sources */,
295ECD8D1D86910100DC6EB0 /* NSDictionary+Category.m in Sources */,
2927DEF41D87CF3F00E0BC8E /* OrderListTableViewCell.m in Sources */,
2927DEF11D87CF1200E0BC8E /* OrderListViewController.m in Sources */,
29CF91781D66B8CC00AE13A8 /* main.m in Sources */,
29CAE20A1D6ED4BF0011CCE6 /* CustomLabel.m in Sources */,
295ECDA81D86977000DC6EB0 /* SearchViewController.m in Sources */,
29CAE20F1D6EE34E0011CCE6 /* CustomBMKAnnotationView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -566,9 +646,9 @@
INFOPLIST_FILE = Palmwms/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.palmmall;
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.palmwms;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "df541a2c-b94a-4874-904a-04e7843bc5ab";
PROVISIONING_PROFILE = "e922dce2-c5d3-497c-8fa8-132e12cff6c0";
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
name = Debug;
......@@ -596,9 +676,9 @@
INFOPLIST_FILE = Palmwms/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.palmmall;
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.palmwms;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "df541a2c-b94a-4874-904a-04e7843bc5ab";
PROVISIONING_PROFILE = "e922dce2-c5d3-497c-8fa8-132e12cff6c0";
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
};
name = Release;
......
......@@ -25,6 +25,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];//保持屏幕常亮
[self detectionNetwork];
[self setIQKeyboardManager];
[self startBaiduMapManager];
......
......@@ -38,7 +38,8 @@
- (void)showSheetViewWithMessage:(NSString *)message complete:(void(^)())finish;
#pragma mark -获取当前时间之前或之后的时间
- (NSString *)getTimeby:(NSInteger)day;
......
......@@ -43,9 +43,9 @@
self.navigationController.navigationBar.barTintColor = MainColor;
[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:20],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[self detectionUpdateVersion];
// [self detectionUpdateVersion];
//版本更新
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detectionUpdateVersion) name:UPLOADVERSION object:nil];
// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(detectionUpdateVersion) name:UPLOADVERSION object:nil];
}
......@@ -146,7 +146,7 @@
hud.mode = MBProgressHUDModeText;
hud.label.text = Text;
hud.contentColor = MainColor;
hud.offset = CGPointMake(0.f, MBProgressMaxOffset);
// hud.offset = CGPointMake(0.f, MBProgressMaxOffset);
[hud hideAnimated:YES afterDelay:2.0f];
}
......@@ -222,7 +222,7 @@
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:dict[@"url"]]];
}]];
//是否强制更新
if (![dict[@"forceupdate"] isEqualToString:@"yes"]) {
if (![dict[@"forceupdate"] isEqualToString:@"1"]) {
[alertVC addAction:[UIAlertAction actionWithTitle:@"以后再说" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[alertVC dismissViewControllerAnimated:YES completion:nil];
}]];
......@@ -238,6 +238,22 @@
}
#pragma mark - 获取当前时间之前或者之后的时间(之前传入负数)
- (NSString *)getTimeby:(NSInteger)day
{
NSDate*nowDate = [NSDate date];
NSDate* theDate;
if(day!=0){
NSTimeInterval oneDay = 24*60*60*1; //1天的长度
theDate = [nowDate initWithTimeIntervalSinceNow: oneDay*day];
}else{
theDate = nowDate;
}
NSDateFormatter *date_formatter = [[NSDateFormatter alloc] init];
[date_formatter setDateFormat:@"yyyy-MM-dd"];
NSString *the_date_str = [date_formatter stringFromDate:theDate];
return the_date_str;
}
@end
......@@ -26,8 +26,17 @@
if ([self.passWordTextField.text length]) {
[self changeColor:self.passWordTextField];
}
self.versionInformation.text = [self getAppVersion];
}
- (NSString*)getAppVersion {
NSString *ver = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleShortVersionString"];
return [NSString stringWithFormat:@"版本%@",ver];
}
- (void)viewWillDisappear:(BOOL)animated
{
[UIApplication sharedApplication].statusBarHidden = NO;
......
//
// DeliveryTrackingViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "DeliveryTrackingViewController.h"
#import <BaiduMapAPI_Map/BMKMapComponent.h>
#import <BaiduMapAPI_Location/BMKLocationComponent.h>
#import <BaiduMapAPI_Search/BMKSearchComponent.h>
#import <BaiduMapAPI_Utils/BMKUtilsComponent.h>
#import "CustomBMKAnnotationView.h"
#import "UserPaopaoView.h"
#import "UIImage+Rotate.h"
#define MYBUNDLE_NAME @ "mapapi.bundle"
#define MYBUNDLE_PATH [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: MYBUNDLE_NAME]
#define MYBUNDLE [NSBundle bundleWithPath: MYBUNDLE_PATH]
@interface RouteAnnotation : BMKPointAnnotation
{
int _type; ///<0:起点 1:终点 2:公交 3:地铁 4:驾乘 5:途经点
int _degree;
}
@property (nonatomic) int type;
@property (nonatomic) int degree;
@end
@implementation RouteAnnotation
@synthesize type = _type;
@synthesize degree = _degree;
@end
@interface DeliveryTrackingViewController ()<BMKMapViewDelegate,BMKLocationServiceDelegate,BMKRouteSearchDelegate>
{
BMKRouteSearch* _routesearch;
}
@property (strong, nonatomic) BMKLocationService *locService;
@property (strong, nonatomic) BMKMapView* mapView;
@property (nonatomic,strong) BMKLocationViewDisplayParam *displayLocation;
@end
@implementation DeliveryTrackingViewController
- (NSString*)getMyBundlePath1:(NSString *)filename
{
NSBundle * libBundle = MYBUNDLE ;
if ( libBundle && filename ){
NSString * s=[[libBundle resourcePath ] stringByAppendingPathComponent : filename];
return s;
}
return nil ;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self startDrawWayPointRoute];
[self queryOrderBillDatas];
}
-(void)viewWillAppear:(BOOL)animated {
[_mapView viewWillAppear];
_mapView.delegate = self; // 此处记得不用的时候需要置nil,否则影响内存的释放
_locService.delegate = self;
_routesearch.delegate = self; // 此处记得不用的时候需要置nil,否则影响内存的释放
}
-(void)viewWillDisappear:(BOOL)animated {
[_mapView viewWillDisappear];
_mapView.delegate = nil; // 不用时,置nil
_locService.delegate = nil;
_routesearch.delegate = nil; // 此处记得不用的时候需要置nil,否则影响内存的释放
}
#pragma mark - 获取订单
- (void)queryOrderBillDatas
{
BusbillQueryDefintion *query = [[BusbillQueryDefintion alloc]init];
query.driverCode = [UserInforMation manager].userCode;
QueryOrder *sorting = [[QueryOrder alloc]init];
sorting.field = @"pickingDate";
sorting.direction = QUERYORDERDIRECTION_DESC;
query.orders = (NSArray<QueryOrder> *)@[sorting];
query.date = [[NSDate date] httpParameterString];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(QUERYORDERBILL) WithRequestType:NetworkRequestWithPOST WithParameter:query WithReturnValueBlock:^(id returnValue) {
NSLog(@"%@",returnValue);
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(NSError *error) {
}];
}
#pragma mark -UI
- (void)startDrawWayPointRoute
{
_routesearch = [[BMKRouteSearch alloc]init];
_mapView = [[BMKMapView alloc]initWithFrame:CGRectMake(0, 0, self.view.mj_w, self.view.mj_h-44-64)];
[self.view insertSubview:_mapView atIndex:0];
_mapView.zoomLevel = 16;
_locService.distanceFilter = 50.0;
_mapView.userTrackingMode = BMKUserTrackingModeFollow;
BMKPlanNode* start = [[BMKPlanNode alloc]init];
start.name = @"天安门";
start.cityName = @"北京市";
BMKPlanNode* end = [[BMKPlanNode alloc]init];
end.name = @"百度大厦";
end.cityName = @"北京市";
NSMutableArray * array = [[NSMutableArray alloc] initWithCapacity:10];
BMKPlanNode* wayPointItem1 = [[BMKPlanNode alloc]init];
wayPointItem1.name = @"鸟巢";
wayPointItem1.cityName = @"北京";
[array addObject:wayPointItem1];
BMKPlanNode* wayPointItem2 = [[BMKPlanNode alloc]init];
wayPointItem2.name = @"清华大学";
wayPointItem2.cityName = @"北京";
[array addObject:wayPointItem2];
BMKPlanNode* wayPointItem3 = [[BMKPlanNode alloc]init];
wayPointItem3.name = @"北京大学";
wayPointItem3.cityName = @"北京";
[array addObject:wayPointItem3];
BMKDrivingRoutePlanOption *drivingRouteSearchOption = [[BMKDrivingRoutePlanOption alloc]init];
drivingRouteSearchOption.from = start;
drivingRouteSearchOption.to = end;
drivingRouteSearchOption.wayPointsArray = array;
BOOL flag = [_routesearch drivingSearch:drivingRouteSearchOption];
if(flag)
{
NSLog(@"search success.");
}
else
{
NSLog(@"search failed!");
}
}
- (BMKAnnotationView*)getRouteAnnotationView:(BMKMapView *)mapview viewForAnnotation:(RouteAnnotation*)routeAnnotation
{
BMKAnnotationView* view = nil;
switch (routeAnnotation.type) {
case 0:
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"start_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"start_node"];
view.image = [UIImage imageWithContentsOfFile:[self getMyBundlePath1:@"images/icon_nav_start.png"]];
view.centerOffset = CGPointMake(0, -(view.frame.size.height * 0.5));
view.canShowCallout = TRUE;
}
view.annotation = routeAnnotation;
}
break;
case 1:
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"end_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"end_node"];
view.image = [UIImage imageWithContentsOfFile:[self getMyBundlePath1:@"images/icon_nav_end.png"]];
view.centerOffset = CGPointMake(0, -(view.frame.size.height * 0.5));
view.canShowCallout = TRUE;
}
view.annotation = routeAnnotation;
}
break;
case 4:
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"route_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"route_node"];
view.canShowCallout = TRUE;
} else {
[view setNeedsDisplay];
}
UIImage* image = [UIImage imageWithContentsOfFile:[self getMyBundlePath1:@"images/icon_direction.png"]];
view.image = [image imageRotatedByDegrees:routeAnnotation.degree];
view.annotation = routeAnnotation;
}
break;
case 5:
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"waypoint_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"waypoint_node"];
view.canShowCallout = TRUE;
} else {
[view setNeedsDisplay];
}
UIImage* image = [UIImage imageWithContentsOfFile:[self getMyBundlePath1:@"images/icon_nav_waypoint.png"]];
view.image = [image imageRotatedByDegrees:routeAnnotation.degree];
view.annotation = routeAnnotation;
}
break;
default:
break;
}
return view;
}
- (BMKAnnotationView *)mapView:(BMKMapView *)view viewForAnnotation:(id <BMKAnnotation>)annotation
{
if ([annotation isKindOfClass:[RouteAnnotation class]]) {
return [self getRouteAnnotationView:view viewForAnnotation:(RouteAnnotation*)annotation];
}
return nil;
}
- (BMKOverlayView*)mapView:(BMKMapView *)map viewForOverlay:(id<BMKOverlay>)overlay
{
if ([overlay isKindOfClass:[BMKPolyline class]]) {
BMKPolylineView* polylineView = [[BMKPolylineView alloc] initWithOverlay:overlay];
polylineView.fillColor = [[UIColor cyanColor] colorWithAlphaComponent:1];
polylineView.strokeColor = [[UIColor blueColor] colorWithAlphaComponent:0.7];
polylineView.lineWidth = 3.0;
return polylineView;
}
return nil;
}
- (void)onGetDrivingRouteResult:(BMKRouteSearch*)searcher result:(BMKDrivingRouteResult*)result errorCode:(BMKSearchErrorCode)error
{
NSArray* array = [NSArray arrayWithArray:_mapView.annotations];
[_mapView removeAnnotations:array];
array = [NSArray arrayWithArray:_mapView.overlays];
[_mapView removeOverlays:array];
if (error == BMK_SEARCH_NO_ERROR) {
BMKDrivingRouteLine* plan = (BMKDrivingRouteLine*)[result.routes objectAtIndex:0];
// 计算路线方案中的路段数目
NSInteger size = [plan.steps count];
int planPointCounts = 0;
for (int i = 0; i < size; i++) {
BMKDrivingStep* transitStep = [plan.steps objectAtIndex:i];
if(i==0){
RouteAnnotation* item = [[RouteAnnotation alloc]init];
item.coordinate = plan.starting.location;
item.title = @"起点";
item.type = 0;
[_mapView addAnnotation:item]; // 添加起点标注
}else if(i==size-1){
RouteAnnotation* item = [[RouteAnnotation alloc]init];
item.coordinate = plan.terminal.location;
item.title = @"终点";
item.type = 1;
[_mapView addAnnotation:item]; // 添加起点标注
}
//添加annotation节点
RouteAnnotation* item = [[RouteAnnotation alloc]init];
item.coordinate = transitStep.entrace.location;
item.title = transitStep.entraceInstruction;
item.degree = transitStep.direction * 30;
item.type = 4;
[_mapView addAnnotation:item];
//轨迹点总数累计
planPointCounts += transitStep.pointsCount;
}
// 添加途经点
if (plan.wayPoints) {
for (BMKPlanNode* tempNode in plan.wayPoints) {
RouteAnnotation* item = [[RouteAnnotation alloc]init];
item = [[RouteAnnotation alloc]init];
item.coordinate = tempNode.pt;
item.type = 5;
item.title = tempNode.name;
[_mapView addAnnotation:item];
}
}
//轨迹点
BMKMapPoint * temppoints = new BMKMapPoint[planPointCounts];
int i = 0;
for (int j = 0; j < size; j++) {
BMKDrivingStep* transitStep = [plan.steps objectAtIndex:j];
int k=0;
for(k=0;k<transitStep.pointsCount;k++) {
temppoints[i].x = transitStep.points[k].x;
temppoints[i].y = transitStep.points[k].y;
i++;
}
}
// 通过points构建BMKPolyline
BMKPolyline* polyLine = [BMKPolyline polylineWithPoints:temppoints count:planPointCounts];
[_mapView addOverlay:polyLine]; // 添加路线overlay
delete []temppoints;
[self mapViewFitPolyLine:polyLine];
}
}
//根据polyline设置地图范围
- (void)mapViewFitPolyLine:(BMKPolyline *) polyLine {
CGFloat ltX, ltY, rbX, rbY;
if (polyLine.pointCount < 1) {
return;
}
BMKMapPoint pt = polyLine.points[0];
ltX = pt.x, ltY = pt.y;
rbX = pt.x, rbY = pt.y;
for (int i = 1; i < polyLine.pointCount; i++) {
BMKMapPoint pt = polyLine.points[i];
if (pt.x < ltX) {
ltX = pt.x;
}
if (pt.x > rbX) {
rbX = pt.x;
}
if (pt.y > ltY) {
ltY = pt.y;
}
if (pt.y < rbY) {
rbY = pt.y;
}
}
BMKMapRect rect;
rect.origin = BMKMapPointMake(ltX , ltY);
rect.size = BMKMapSizeMake(rbX - ltX, rbY - ltY);
[_mapView setVisibleMapRect:rect];
_mapView.zoomLevel = _mapView.zoomLevel - 0.3;
}
@end
......@@ -21,7 +21,6 @@
@property (nonatomic,strong) DeliveryTrackingViewController *DeliveryVC;
/**
* UISegmentedControl
*/
......
//
// OrderDetailsViewController.h
// Palmwms
//
// Created by 曹云霄 on 16/9/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface OrderDetailsViewController : BaseViewController
@end
//
// DeliveryTrackingViewController.m
// OrderDetailsViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Created by 曹云霄 on 16/9/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "DeliveryTrackingViewController.h"
#import "OrderDetailsViewController.h"
@interface DeliveryTrackingViewController ()
@interface OrderDetailsViewController ()
@end
@implementation DeliveryTrackingViewController
@implementation OrderDetailsViewController
- (void)viewDidLoad {
[super viewDidLoad];
......
//
// CoordinateAcquisitionViewController.h
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface CoordinateAcquisitionViewController : BaseViewController
@end
//
// CoordinateAcquisitionViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "CoordinateAcquisitionViewController.h"
#import "SearchViewController.h"
#import <BaiduMapAPI_Map/BMKMapComponent.h>
#import <BaiduMapAPI_Location/BMKLocationComponent.h>
#import "CustomBMKAnnotationView.h"
#import "UserPaopaoView.h"
#define USERLOCATIONID @"userlocation"
@interface CoordinateAcquisitionViewController ()<UITextFieldDelegate,BMKMapViewDelegate,BMKLocationServiceDelegate>
@property (strong, nonatomic) BMKLocationService *locService;
@property (strong, nonatomic) BMKMapView* mapView;
@property (nonatomic,strong) BMKLocationViewDisplayParam *displayLocation;
/**
* 选择客户
*/
@property (weak, nonatomic) IBOutlet UITextField *inputUserInformationField;
/**
* 采集
*/
@property (weak, nonatomic) IBOutlet UIButton *collectCoordinateButton;
/**
* 保存用户大头针对象
*/
@property (nonatomic,strong) BMKPointAnnotation *userPointAnnotation;
/**
* 当前选中的客户
*/
@property (nonatomic,strong) Customer *currentUser;
@end
@implementation CoordinateAcquisitionViewController
#pragma mark - lazy
- (BMKLocationViewDisplayParam *)displayLocation
{
if (!_displayLocation) {
_displayLocation = [[BMKLocationViewDisplayParam alloc]init];
_displayLocation.locationViewImgName = @"location";
_displayLocation.locationViewOffsetX = 0;
_displayLocation.locationViewOffsetY = 0;
_displayLocation.isAccuracyCircleShow = false;
_displayLocation.isRotateAngleValid = false;
}
return _displayLocation;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self uiConfigAction];
[self startpositionAction];
}
-(void)viewWillAppear:(BOOL)animated {
[_mapView viewWillAppear];
_mapView.delegate = self; // 此处记得不用的时候需要置nil,否则影响内存的释放
_locService.delegate = self;
}
-(void)viewWillDisappear:(BOOL)animated {
[_mapView viewWillDisappear];
_mapView.delegate = nil; // 不用时,置nil
_locService.delegate = nil;
}
#pragma mark -UI
- (void)startpositionAction
{
self.locService = [[BMKLocationService alloc]init];
[self.locService startUserLocationService];
self.mapView = [[BMKMapView alloc]initWithFrame:CGRectMake(0, 0, self.view.mj_w, self.view.mj_h-44-64)];
[self.view insertSubview:_mapView atIndex:0];
self.mapView.zoomLevel = 16;
self.locService.pausesLocationUpdatesAutomatically = NO;
self.locService.distanceFilter = 10;
self.mapView.userTrackingMode = BMKUserTrackingModeFollow;
}
/**
*用户位置更新后,会调用此函数
*@param userLocation 新的用户位置
*/
- (void)didUpdateBMKUserLocation:(BMKUserLocation *)userLocation
{
[_mapView updateLocationData:userLocation];
double latitude = userLocation.location.coordinate.latitude;
double longitude = userLocation.location.coordinate.longitude;
[UserInforMation manager].latitude = latitude;
[UserInforMation manager].longitude = longitude;//记录用户经纬度
[self displayAnnotationWithLatitude:latitude andLongitude:longitude title:USERLOCATIONID];
}
/**
*在地图View停止定位后,会调用此函数
*@param mapView 地图View
*/
- (void)didStopLocatingUser
{
NSLog(@"定位停止");
}
/**
*定位失败后,会调用此函数
*@param mapView 地图View
*@param error 错误号,参考CLError.h中定义的错误号
*/
- (void)didFailToLocateUserWithError:(NSError *)error
{
// [self SHOWPrompttext:@"定位失败"];
NSLog(@"定位失败");
}
#pragma mark -自定义用户大头针
- (void)displayAnnotationWithLatitude: (CGFloat)latitude andLongitude: (CGFloat)longitude title:(NSString *)title
{
[self.mapView removeAnnotation:self.userPointAnnotation];
[self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(latitude,longitude) animated:YES];
BMKPointAnnotation *pointAnnotation = [[BMKPointAnnotation alloc]init];
self.userPointAnnotation = pointAnnotation;
pointAnnotation.coordinate = CLLocationCoordinate2DMake(latitude, longitude);
pointAnnotation.title = title;
[self.mapView addAnnotation:pointAnnotation];
}
/**
*根据anntation生成对应的View
*@param mapView 地图View
*@param annotation 指定的标注
*@return 生成的标注View
*/
- (BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id <BMKAnnotation>)annotation
{
CustomBMKAnnotationView *annottionView = (CustomBMKAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:USERLOCATIONID];
if (!annottionView) {
annottionView = [[CustomBMKAnnotationView alloc]userSignInitialize:annotation reuseIdentifier:USERLOCATIONID];
}
[annottionView setSelected:YES animated:YES];
UserPaopaoView *paopaoView = [[UserPaopaoView alloc] signUserInitialize:[UIView new] withCoord:annotation.coordinate];
paopaoView.frame = CGRectMake(0, 0, ScreenSize.width-150, 70);
annottionView.paopaoView = paopaoView;
return annottionView;
}
#pragma mark - UI
- (void)uiConfigAction
{
[self.collectCoordinateButton addCorners];
[self.inputUserInformationField addCorners];
[self.inputUserInformationField addLines];
UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 60, 40)];
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 10, 20, 20)];
imageView.image = LOADIMAGENAME(@"search");
[leftView addSubview:imageView];
self.inputUserInformationField.leftViewMode = UITextFieldViewModeAlways;
self.inputUserInformationField.leftView = leftView;
self.collectCoordinateButton.backgroundColor = [self.inputUserInformationField.text length]?RGBA(250, 71, 76, 1):[UIColor lightGrayColor];
self.collectCoordinateButton.enabled = [self.inputUserInformationField.text length]?YES:NO;
}
#pragma mark - <UITextFieldDelegate>
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
WS(weakSelf);
SearchViewController *searchVC = [self.getStoryboardWithName instantiateViewControllerWithIdentifier:@"SearchViewController"];
[searchVC setSelectCustomer:^(Customer *model) {
weakSelf.currentUser = model;
textField.text = [NSString stringWithFormat:@"【%@】%@",model.code,model.name];
weakSelf.collectCoordinateButton.backgroundColor = [weakSelf.inputUserInformationField.text length]?RGBA(250, 71, 76, 1):[UIColor lightGrayColor];
weakSelf.collectCoordinateButton.enabled = [weakSelf.inputUserInformationField.text length]?YES:NO;
}];
[self.navigationController pushViewController:searchVC animated:YES];
return NO;
}
#pragma mark - 采集数据
- (IBAction)CoordinateAcquisitionButtonClick:(UIButton *)sender {
WS(weakSelf);
[self showSheetViewWithMessage:@"请确认是否上传该采集点数据?" complete:^{
[weakSelf CreateMBProgressHUDLoding:@"上传采集点数据中"];
Customer *uploadLocation = [[Customer alloc]init];
uploadLocation.fid = self.currentUser.fid;
uploadLocation.code = self.currentUser.code;
uploadLocation.lat = [NSString stringWithFormat:@"%lf",[UserInforMation manager].latitude];
uploadLocation.lng = [NSString stringWithFormat:@"%lf",[UserInforMation manager].longitude];
uploadLocation.address = self.currentUser.address;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(UPLOADLOCATION) WithRequestType:NetworkRequestWithPOST WithParameter:uploadLocation WithReturnValueBlock:^(id returnValue) {
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weakSelf SuccessMBProgressView:@"上传成功" timeDelay:1.0f finish:nil];
}else
{
[weakSelf SHOWPrompttext:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf SHOWPrompttext:NETWORK];
} WithFailureBlock:^(NSError *error) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf SHOWPrompttext:error.localizedDescription];
}];
}];
}
#pragma mark - 刷新按钮
- (IBAction)refreshLocationButton:(UIButton *)sender {
[self.mapView setCenterCoordinate:self.userPointAnnotation.coordinate animated:YES];
[_locService startUserLocationService];
}
#pragma mark - 释放
- (void)dealloc {
if (_mapView) {
_mapView = nil;
}
}
@end
//
// DeliveryTrackingViewController.h
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface DeliveryTrackingViewController : BaseViewController
@end
//
// DeliveryTrackingViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "DeliveryTrackingViewController.h"
#import <BaiduMapAPI_Map/BMKMapComponent.h>
#import <BaiduMapAPI_Location/BMKLocationComponent.h>
#import <BaiduMapAPI_Search/BMKSearchComponent.h>
#import <BaiduMapAPI_Utils/BMKUtilsComponent.h>
#import "CustomBMKAnnotationView.h"
#import "UserPaopaoView.h"
#import "UIImage+Rotate.h"
#import "OrderDetailsViewController.h"
#import "OrderListViewController.h"
#define MYBUNDLE_NAME @ "mapapi.bundle"
#define MYBUNDLE_PATH [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: MYBUNDLE_NAME]
#define MYBUNDLE [NSBundle bundleWithPath: MYBUNDLE_PATH]
#define USERLOCATIONID @"userlocation"
@interface RouteAnnotation : BMKPointAnnotation
{
int _type; ///<0:起点 1:终点 2:公交 3:已送达途经点 4:驾乘 5:为送达途经点
int _degree;//方向
}
@property (nonatomic,assign) int type;
@property (nonatomic,assign) int degree;
@end
@implementation RouteAnnotation
@synthesize type = _type;
@synthesize degree = _degree;
@end
@interface DeliveryTrackingViewController ()<BMKMapViewDelegate,BMKLocationServiceDelegate,BMKRouteSearchDelegate,BMKGeoCodeSearchDelegate>
@property (nonatomic,strong) BMKRouteSearch *routesearch;
@property (strong, nonatomic) BMKLocationService *locService;
@property (strong, nonatomic) BMKMapView* mapView;
@property (nonatomic,strong) BMKLocationViewDisplayParam *displayLocation;
@property (nonatomic,strong) BMKGeoCodeSearch *geographicSearch;//用于反地理编码
/**
* 保存用户大头针对象
*/
@property (nonatomic,strong) BMKPointAnnotation *userPointAnnotation;
/**
* 发货单
*/
@property (weak, nonatomic) IBOutlet UIView *invoiceView;
/**
* 发货单信息
*/
@property (weak, nonatomic) IBOutlet UILabel *invoiceInformationlabel;
/**
* 发货单详情
*/
@property (nonatomic,strong) UIView *invoiceDetailsView;
/**
* 发货单列表
*/
@property (nonatomic,strong) UIView *orderListView;
/**
* 已送达店铺
*/
@property (nonatomic,strong) NSMutableArray *arriveStoreArray;
/**
* 订单列表
*/
@property (nonatomic,strong) NSMutableArray *orderListArray;
/**
* 当前选中的发货单
*/
@property (nonatomic,strong) Busbill *selecteOrderBill;
/**
* 当前选中的发货单indexPath
*/
@property (nonatomic,strong) NSIndexPath *selectIndexPath;
@end
@implementation DeliveryTrackingViewController
- (NSString*)getMyBundlePath1:(NSString *)filename
{
NSBundle * libBundle = MYBUNDLE ;
if ( libBundle && filename ){
NSString * s=[[libBundle resourcePath ] stringByAppendingPathComponent : filename];
return s;
}
return nil ;
}
#pragma mark - lazy
- (NSMutableArray *)arriveStoreArray
{
if (!_arriveStoreArray) {
_arriveStoreArray = [NSMutableArray array];
}
return _arriveStoreArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self uiConfigAction];
}
-(void)viewWillAppear:(BOOL)animated {
[_mapView viewWillAppear];
_mapView.delegate = self; // 此处记得不用的时候需要置nil,否则影响内存的释放
_locService.delegate = self;
_routesearch.delegate = self; // 此处记得不用的时候需要置nil,否则影响内存的释放
_geographicSearch.delegate = self;
[self queryOrderBillDatasAndDepotInforMation];
}
-(void)viewWillDisappear:(BOOL)animated {
[_mapView viewWillDisappear];
_mapView.delegate = nil; // 不用时,置nil
_locService.delegate = nil;
_routesearch.delegate = nil; // 此处记得不用的时候需要置nil,否则影响内存的释放
_geographicSearch.delegate = nil;
}
#pragma mark - UI
- (void)uiConfigAction
{
[self.invoiceView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(invoiceViewClickAction:)]];
//初始化
_geographicSearch = [[BMKGeoCodeSearch alloc]init];
self.locService = [[BMKLocationService alloc]init];
[self.locService startUserLocationService];
self.mapView = [[BMKMapView alloc]initWithFrame:CGRectMake(0, 0, self.view.mj_w, self.view.mj_h-44-64)];
[self.view insertSubview:_mapView atIndex:0];
self.mapView.zoomLevel = 16;
self.locService.pausesLocationUpdatesAutomatically = NO;
self.locService.distanceFilter = 10;
self.mapView.userTrackingMode = BMKUserTrackingModeFollow;
}
/**
*用户位置更新后,会调用此函数
*@param userLocation 新的用户位置
*/
- (void)didUpdateBMKUserLocation:(BMKUserLocation *)userLocation
{
[self.locService stopUserLocationService];
[_mapView updateLocationData:userLocation];
double latitude = userLocation.location.coordinate.latitude;
double longitude = userLocation.location.coordinate.longitude;
[UserInforMation manager].latitude = latitude;
[UserInforMation manager].longitude = longitude;//记录用户经纬度
CLLocationCoordinate2D location = CLLocationCoordinate2DMake(latitude, longitude);
// 地址解析
BMKReverseGeoCodeOption *CodeOption = [[BMKReverseGeoCodeOption alloc]init];
CodeOption.reverseGeoPoint = location;
[self.geographicSearch reverseGeoCode:CodeOption];
[self displayAnnotationWithLatitude:latitude andLongitude:longitude title:USERLOCATIONID];
}
/**
*返回反地理编码搜索结果
*@param searcher 搜索对象
*@param result 搜索结果
*@param error 错误号,@see BMKSearchErrorCode
*/
- (void)onGetReverseGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKReverseGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error
{
NSLog(@"反地理编码成功");
[UserInforMation manager].driverAddress = result.addressDetail;
[UserInforMation manager].address = result.address;
}
/**
*在地图View停止定位后,会调用此函数
*@param mapView 地图View
*/
- (void)didStopLocatingUser
{
// [self SHOWPrompttext:@"定位失败"];
}
/**
*定位失败后,会调用此函数
*@param mapView 地图View
*@param error 错误号,参考CLError.h中定义的错误号
*/
- (void)didFailToLocateUserWithError:(NSError *)error
{
// [self SHOWPrompttext:@"定位失败"];
}
#pragma mark -自定义用户大头针
- (void)displayAnnotationWithLatitude: (CGFloat)latitude andLongitude: (CGFloat)longitude title:(NSString *)title
{
[self.mapView removeAnnotation:self.userPointAnnotation];
[self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(latitude,longitude) animated:YES];
BMKPointAnnotation *pointAnnotation = [[BMKPointAnnotation alloc]init];
self.userPointAnnotation = pointAnnotation;
pointAnnotation.coordinate = CLLocationCoordinate2DMake(latitude, longitude);
pointAnnotation.title = title;
[self.mapView addAnnotation:pointAnnotation];
}
/**
*根据anntation生成对应的View
*@param mapView 地图View
*@param annotation 指定的标注
*@return 生成的标注View
*/
- (BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id <BMKAnnotation>)annotation
{
//标注物
if ([annotation isKindOfClass:[RouteAnnotation class]]) {
return [self getRouteAnnotationView:mapView viewForAnnotation:(RouteAnnotation*)annotation];
}
//用户位置
CustomBMKAnnotationView *annottionView = (CustomBMKAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:USERLOCATIONID];
if (!annottionView) {
annottionView = [[CustomBMKAnnotationView alloc]carSignInitialize:annotation reuseIdentifier:USERLOCATIONID];
}
UserPaopaoView *paopaoView = [[UserPaopaoView alloc] signUserInitialize:[UIView new] withCoord:annotation.coordinate];
paopaoView.frame = CGRectMake(0, 0, ScreenSize.width-150, 70);
annottionView.paopaoView = paopaoView;
return annottionView;
}
#pragma mark -路径规划
- (void)startDrawWayPointRoutepointArray:(NSArray *)arrays
{
UserInforMation *user = [UserInforMation manager];
//起点
BMKPlanNode* start = [[BMKPlanNode alloc]init];
start.name = user.address;
start.cityName = user.driverAddress.city;
start.pt = CLLocationCoordinate2DMake(user.depotLatitude, user.depotLongitude);
//途径点
NSMutableArray *array = [NSMutableArray array];
[arrays enumerateObjectsUsingBlock:^(id _Nonnull object, NSUInteger index, BOOL * _Nonnull stop) {
BusbillDtl *model = (BusbillDtl *)object;
BMKPlanNode* wayPointItem = [[BMKPlanNode alloc]init];
wayPointItem.name = model.customerName;
wayPointItem.cityName = user.driverAddress.city;
CLLocationCoordinate2D pt = CLLocationCoordinate2DMake([model.customerLat doubleValue], [model.customerLng doubleValue]);
wayPointItem.pt = pt;
[array addObject:wayPointItem];
}];
BMKDrivingRoutePlanOption *drivingRouteSearchOption = [[BMKDrivingRoutePlanOption alloc]init];
drivingRouteSearchOption.from = start;
drivingRouteSearchOption.to = start;
drivingRouteSearchOption.wayPointsArray = array;
BOOL flag = [_routesearch drivingSearch:drivingRouteSearchOption];
if(flag)
{
[self CreateMBProgressHUDLoding:@"路径规划中"];
}
else
{
[self SHOWPrompttext:@"路径规划错误"];
}
}
#pragma mark - 获取发货单列表和仓库信息
- (void)queryOrderBillDatasAndDepotInforMation
{
WS(weakSelf);
dispatch_group_t group = dispatch_group_create();
[self CreateMBProgressHUDLoding:@"加载中"];
//任务一,获取仓库信息
dispatch_group_enter(group);
NSString *URL = [NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(QUERYDEPOT),@"depot"];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:URL WithRequestType:NetworkRequestWithGET WithParameter:nil WithReturnValueBlock:^(id returnValue) {
dispatch_group_leave(group);
[UserInforMation manager].depotLatitude = [returnValue[@"data"][@"lat"] doubleValue];
[UserInforMation manager].depotLongitude = [returnValue[@"data"][@"lng"] doubleValue];
} WithErrorCodeBlock:^(id errorCodeValue) {
dispatch_group_leave(group);
[weakSelf SHOWPrompttext:NETWORK];
} WithFailureBlock:^(NSError *error) {
dispatch_group_leave(group);
[weakSelf SHOWPrompttext:error.localizedDescription];
}];
//任务二,获取发货单列表信息
dispatch_group_enter(group);
BusbillQueryDefintion *query = [[BusbillQueryDefintion alloc]init];
query.driverCode = [UserInforMation manager].userCode;
QueryOrder *sorting = [[QueryOrder alloc]init];
sorting.field = @"pickingDate";
sorting.direction = QUERYORDERDIRECTION_DESC;
query.orders = (NSArray<QueryOrder> *)@[sorting];
query.date = [NSString stringWithFormat:@"%@ 00:00:00",[[NSDate date] yearMonthDayString]];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(QUERYORDERBILL) WithRequestType:NetworkRequestWithPOST WithParameter:query WithReturnValueBlock:^(id returnValue) {
dispatch_group_leave(group);
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
BusbillQueryResult *result = [[BusbillQueryResult alloc]initWithDictionary:returnValue[@"data"] error:nil];
weakSelf.orderListArray = [NSMutableArray arrayWithArray:result.records];
}else
{
[weakSelf SHOWPrompttext:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
dispatch_group_leave(group);
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf SHOWPrompttext:NETWORK];
} WithFailureBlock:^(NSError *error) {
dispatch_group_leave(group);
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf SHOWPrompttext:error.localizedDescription];
}];
//完成后回调
dispatch_group_notify(group, dispatch_get_main_queue(), ^{
[weakSelf RemoveMBProgressHUDLoding];
NSLog(@"完成请求");
});
}
- (BMKAnnotationView*)getRouteAnnotationView:(BMKMapView *)mapview viewForAnnotation:(RouteAnnotation*)routeAnnotation
{
BMKAnnotationView* view = nil;
switch (routeAnnotation.type) {
case 0://起点
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"start_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"start_node"];
view.image = LOADIMAGENAME(@"warehouse");
view.centerOffset = CGPointMake(0, -(view.frame.size.height * 0.5));
view.canShowCallout = TRUE;
}
view.annotation = routeAnnotation;
}
break;
case 1://终点
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"end_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"end_node"];
view.image = LOADIMAGENAME(@"warehouse");
view.centerOffset = CGPointMake(0, -(view.frame.size.height * 0.5));
view.canShowCallout = TRUE;
}
view.annotation = routeAnnotation;
}
break;
case 3://已送达途径点
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"route_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"route_node"];
view.canShowCallout = TRUE;
} else {
[view setNeedsDisplay];
}
UIImage* image = [UIImage imageNamed:@"finishstore"];
view.image = [image imageRotatedByDegrees:routeAnnotation.degree];
view.annotation = routeAnnotation;
}
break;
case 5://未送达途经点
{
view = [mapview dequeueReusableAnnotationViewWithIdentifier:@"waypoint_node"];
if (view == nil) {
view = [[BMKAnnotationView alloc]initWithAnnotation:routeAnnotation reuseIdentifier:@"waypoint_node"];
view.canShowCallout = TRUE;
} else {
[view setNeedsDisplay];
}
UIImage* image = LOADIMAGENAME(@"store");
view.image = [image imageRotatedByDegrees:routeAnnotation.degree];
view.annotation = routeAnnotation;
}
break;
default:
break;
}
return view;
}
- (BMKOverlayView*)mapView:(BMKMapView *)map viewForOverlay:(id<BMKOverlay>)overlay
{
if ([overlay isKindOfClass:[BMKPolyline class]]) {
BMKPolylineView* polylineView = [[BMKPolylineView alloc] initWithOverlay:overlay];
polylineView.strokeColor = [[UIColor redColor] colorWithAlphaComponent:0.7];
polylineView.lineWidth = 5.0f;
return polylineView;
}
return nil;
}
/**
*返回驾乘搜索结果
*@param searcher 搜索对象
*@param result 搜索结果,类型为BMKDrivingRouteResult
*@param error 错误号,@see BMKSearchErrorCode
*/
- (void)onGetDrivingRouteResult:(BMKRouteSearch*)searcher result:(BMKDrivingRouteResult*)result errorCode:(BMKSearchErrorCode)error
{
[self RemoveMBProgressHUDLoding];
NSMutableArray* array = [NSMutableArray arrayWithArray:_mapView.annotations];
[array removeObject:self.userPointAnnotation];
[_mapView removeAnnotations:array];
array = [NSMutableArray arrayWithArray:_mapView.overlays];
[_mapView removeOverlays:array];
if (error == BMK_SEARCH_NO_ERROR) {
[self SuccessMBProgressView:@"路径规划成功" timeDelay:1 finish:nil];
BMKDrivingRouteLine* plan = (BMKDrivingRouteLine*)[result.routes objectAtIndex:0];
// 计算路线方案中的路段数目
NSInteger size = [plan.steps count];
int planPointCounts = 0;
for (int i = 0; i < size; i++) {
BMKDrivingStep* transitStep = [plan.steps objectAtIndex:i];
if(i==0){
RouteAnnotation* item = [[RouteAnnotation alloc]init];
item.coordinate = plan.starting.location;
item.title = @"仓库";
item.type = 0;
[_mapView addAnnotation:item]; // 添加起点标注
}else if(i==size-1){
RouteAnnotation* item = [[RouteAnnotation alloc]init];
item.coordinate = plan.terminal.location;
item.title = @"仓库";
item.type = 1;
[_mapView addAnnotation:item]; // 添加终点标注
}
//轨迹点总数累计
planPointCounts += transitStep.pointsCount;
}
// 添加途经点
if (plan.wayPoints) {
for (int i=0; i<plan.wayPoints.count; i++) {
BMKPlanNode* tempNode = plan.wayPoints[i];
RouteAnnotation* item = [[RouteAnnotation alloc]init];
item = [[RouteAnnotation alloc]init];
item.coordinate = tempNode.pt;
//判断已送达、未送达情况
BusbillDtl *model = self.selecteOrderBill.dtls[i];
item.type = [model.state isEqualToString:@"已完成"]?3:5;
item.title = tempNode.name;
[_mapView addAnnotation:item];
}
}
//轨迹点
BMKMapPoint * temppoints = new BMKMapPoint[planPointCounts];
int i = 0;
for (int j = 0; j < size; j++) {
BMKDrivingStep* transitStep = [plan.steps objectAtIndex:j];
int k=0;
for(k=0;k<transitStep.pointsCount;k++) {
temppoints[i].x = transitStep.points[k].x;
temppoints[i].y = transitStep.points[k].y;
i++;
}
}
// 通过points构建BMKPolyline
BMKPolyline* polyLine = [BMKPolyline polylineWithPoints:temppoints count:planPointCounts];
[_mapView addOverlay:polyLine]; // 添加路线overlay
delete []temppoints;
[self mapViewFitPolyLine:polyLine];
}else
{
[self ErrorMBProgressView:@"路径规划失败"];
}
}
//根据polyline设置地图范围
- (void)mapViewFitPolyLine:(BMKPolyline *) polyLine {
CGFloat ltX, ltY, rbX, rbY;
if (polyLine.pointCount < 1) {
return;
}
BMKMapPoint pt = polyLine.points[0];
ltX = pt.x, ltY = pt.y;
rbX = pt.x, rbY = pt.y;
for (int i = 1; i < polyLine.pointCount; i++) {
BMKMapPoint pt = polyLine.points[i];
if (pt.x < ltX) {
ltX = pt.x;
}
if (pt.x > rbX) {
rbX = pt.x;
}
if (pt.y > ltY) {
ltY = pt.y;
}
if (pt.y < rbY) {
rbY = pt.y;
}
}
BMKMapRect rect;
rect.origin = BMKMapPointMake(ltX , ltY);
rect.size = BMKMapSizeMake(rbX - ltX, rbY - ltY);
[_mapView setVisibleMapRect:rect];
_mapView.zoomLevel = _mapView.zoomLevel - 0.3;
}
#pragma mark - 发货单详情
- (void)invoiceViewClickAction:(UITapGestureRecognizer *)sender
{
if (!self.selecteOrderBill) {
[self SHOWPrompttext:@"请先选择发货单"];
}else{
//发货单详情
OrderDetailsViewController *orderDetails = [self.storyboard instantiateViewControllerWithIdentifier:@"OrderDetailsViewController"];
orderDetails.orderDetails = self.selecteOrderBill;
WS(weakSelf);
[orderDetails setReturnoffButtonClickBlock:^{
[weakSelf turnoffButtonClickAction];
}];
[orderDetails setRefreshListDatasBlock:^{
[weakSelf queryOrderBillDatasAndDepotInforMation];
}];
self.invoiceDetailsView = orderDetails.view;
self.invoiceDetailsView.frame = CGRectMake(0, self.view.mj_h, ScreenSize.width, orderDetails.view.mj_h);
[self addChildViewController:orderDetails];
[self.view addSubview:self.invoiceDetailsView];
[UIView animateWithDuration:0.3 animations:^{
self.invoiceDetailsView.frame = CGRectMake(0, 0, ScreenSize.width, self.view.mj_h);
}];
}
}
#pragma mark - 关闭发货单详情
- (void)turnoffButtonClickAction
{
[UIView animateWithDuration:0.3 animations:^{
CGRect frame = self.invoiceDetailsView.frame;
frame.origin.y = self.view.mj_h;
self.invoiceDetailsView.frame = frame;
}completion:^(BOOL finished) {
[self.invoiceDetailsView removeFromSuperview];
}];
}
#pragma mark - 发货单列表
- (IBAction)orderListButtonClickAction:(UIButton *)sender {
if (!self.orderListArray.count) {
[self SHOWPrompttext:@"暂无订单"];
}else
{
//发货单列表
OrderListViewController *orderList = [self.storyboard instantiateViewControllerWithIdentifier:@"OrderListViewController"];
orderList.datasArray = self.orderListArray;
orderList.indexPath = self.selectIndexPath;
WS(weakSelf);
[orderList setReturnoffButtonClickBlock:^{
[weakSelf turnoffListButtonClickAction];
}];
[orderList setSelectOrderClickBlock:^(Busbill *order,NSIndexPath *indexPath) {
weakSelf.selectIndexPath = indexPath;
weakSelf.selecteOrderBill = order;
[weakSelf turnoffListButtonClickAction];
weakSelf.invoiceInformationlabel.text = [NSString stringWithFormat:@"%@(单号:%@)",order.busInfo,order.billNumber];
[weakSelf startDrawWayPointRoutepointArray:order.dtls];
}];
self.orderListView = orderList.view;
self.orderListView.frame = CGRectMake(0, self.view.mj_h, ScreenSize.width, orderList.view.mj_h);
[self addChildViewController:orderList];
[self.view addSubview:self.orderListView];
[UIView animateWithDuration:0.3 animations:^{
self.orderListView.frame = CGRectMake(0, 0, ScreenSize.width, self.view.mj_h);
}];
}
}
#pragma mark - 关闭发货单详情
- (void)turnoffListButtonClickAction
{
[UIView animateWithDuration:0.3 animations:^{
CGRect frame = self.orderListView.frame;
frame.origin.y = self.view.mj_h;
self.orderListView.frame = frame;
}completion:^(BOOL finished) {
[self.orderListView removeFromSuperview];
}];
}
@end
//
// MainViewController.h
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface MainViewController : BaseViewController
@end
//
// MainViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "MainViewController.h"
#import "CoordinateAcquisitionViewController.h"
#import "DeliveryTrackingViewController.h"
@interface MainViewController ()
/**
* 当前控制器
*/
@property (nonatomic,strong) BaseViewController *currentVC;
@property (nonatomic,strong) CoordinateAcquisitionViewController *coordinateVC;
@property (nonatomic,strong) DeliveryTrackingViewController *DeliveryVC;
/**
* UISegmentedControl
*/
@property (weak, nonatomic) IBOutlet UISegmentedControl *segmentControl;
@end
@implementation MainViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self setupController];
}
#pragma mark - 设置控制器
- (void)setupController
{
_coordinateVC = [self.getStoryboardWithName instantiateViewControllerWithIdentifier:@"CoordinateAcquisitionViewController"];
[self addChildViewController:_coordinateVC];
_DeliveryVC = [self.getStoryboardWithName instantiateViewControllerWithIdentifier:@"DeliveryTrackingViewController"];
[self addChildViewController:_DeliveryVC];
[self.view addSubview:_coordinateVC.view];
self.currentVC = self.coordinateVC;
}
#pragma mark - 切换内容控制器
- (void)changeViewControllerWithNewController:(BaseViewController *)newController
{
[self transitionFromViewController:self.currentVC toViewController:newController duration:0.3 options:UIViewAnimationOptionTransitionNone animations:nil completion:^(BOOL finished) {
if (finished) {
[self.view addSubview:newController.view];
self.currentVC = newController;
}
}];
}
- (IBAction)UISegmentedControlClickAction:(UISegmentedControl *)sender {
if (sender.selectedSegmentIndex) {
//送货跟踪
[self changeViewControllerWithNewController:self.DeliveryVC];
}
else
{ //坐标采集
[self changeViewControllerWithNewController:self.coordinateVC];
}
}
@end
//
// OrderDetailsViewController.h
// Palmwms
//
// Created by 曹云霄 on 16/9/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface OrderDetailsViewController : BaseViewController
/**
* 关闭
*/
@property (weak, nonatomic) IBOutlet UIButton *turnoffButton;
/**
* 回调
*/
@property (nonatomic,copy) void(^ReturnoffButtonClickBlock)();
/**
* 发货单详情
*/
@property (nonatomic,strong) Busbill *orderDetails;
/**
* 刷新列表数据
*/
@property (nonatomic,copy) void(^refreshListDatasBlock)();
@end
//
// OrderDetailsViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/9/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "OrderDetailsViewController.h"
#import "OrderDetailsTableViewCell.h"
#define FINISH @"1"
@interface OrderDetailsViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *orderDetailsTableview;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@end
@implementation OrderDetailsViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self uiConfigAction];
}
#pragma mark - UI
- (void)uiConfigAction
{
//已完成
NSInteger index = 0;
for (BusbillDtl *model in self.orderDetails.dtls) {
if ([model.state isEqualToString:FINISH]) {
index ++;
}
}
NSString *indexString = [NSString stringWithFormat:@"%ld",index?index:1];
NSString *totalCount = [NSString stringWithFormat:@"%ld",self.orderDetails.dtls.count];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"本次应送%ld,已完成%ld",self.orderDetails.dtls.count,index]];
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor blackColor] range:NSMakeRange(attributedString.length-([indexString length] + 4 + [totalCount length]), [totalCount length])];
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor greenColor] range:NSMakeRange(attributedString.length-[indexString length], [indexString length])];
self.titleLabel.attributedText = attributedString;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
OrderDetailsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"OrderDetailsTableViewCell" forIndexPath:indexPath];
BusbillDtl *model = self.orderDetails.dtls[indexPath.row];
cell.storeTitleLabel.text = model.customerName;
if ([model.state isEqualToString:FINISH]) {
[cell.arriveButton setTitle:@"送货完成" forState:UIControlStateNormal];
[cell.arriveButton setTitleColor:RGBA(129, 196, 56, 1) forState:UIControlStateNormal];
[cell.arriveButton setBackgroundColor:[UIColor whiteColor]];
cell.arriveButton.enabled = NO;
}else
{
[cell.arriveButton setTitle:@"送货到达" forState:UIControlStateNormal];
[cell.arriveButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[cell.arriveButton setBackgroundColor:[UIColor redColor]];
cell.arriveButton.enabled = YES;
}
cell.arriveButton.tag = indexPath.row;
[cell.arriveButton addTarget:self action:@selector(arriveButtonClickAction:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.orderDetails.dtls.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 60;
}
#pragma mark - 确认送达
- (void)arriveButtonClickAction:(UIButton *)sender
{
WS(weakSelf);
BusbillDtl *model = self.orderDetails.dtls[sender.tag];
[self CreateMBProgressHUDLoding:@"加载中"];
NSString *urlString = [NSString stringWithFormat:SERVERREQUESTURL(ORDERDETAILSSTATE),model.fid,@"1"];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:urlString WithRequestType:NetworkRequestWithPOST WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
model.state = @"1";
[sender setTitle:@"送货完成" forState:UIControlStateNormal];
[sender setTitleColor:RGBA(129, 196, 56, 1) forState:UIControlStateNormal];
[sender setBackgroundColor:[UIColor whiteColor]];
sender.enabled = NO;
if (weakSelf.refreshListDatasBlock) {
weakSelf.refreshListDatasBlock();
}
[weakSelf refreshDeliveryOrderState];
}else{
[weakSelf SHOWPrompttext:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf SHOWPrompttext:NETWORK];
} WithFailureBlock:^(NSError *error) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf SHOWPrompttext:error.localizedDescription];
}];
}
#pragma mark - 更新送货单状态
- (void)refreshDeliveryOrderState
{
for (BusbillDtl *model in self.orderDetails.dtls) {
if (![model.state isEqualToString:FINISH]) {
return;
}
}
WS(weakSelf);
NSString *urlString = [NSString stringWithFormat:SERVERREQUESTURL(REFRESHORDERSTATE),self.orderDetails.billNumber,@"1"];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:urlString WithRequestType:NetworkRequestWithPOST WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (weakSelf.refreshListDatasBlock) {
weakSelf.refreshListDatasBlock();
}
}else
{
[weakSelf SHOWPrompttext:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
[weakSelf SHOWPrompttext:NETWORK];
} WithFailureBlock:^(NSError *error) {
[weakSelf SHOWPrompttext:error.localizedDescription];
}];
}
#pragma mark - 关闭
- (IBAction)turnoffButtonClickAction:(UIButton *)sender {
if (self.ReturnoffButtonClickBlock) {
self.ReturnoffButtonClickBlock();
}
}
@end
//
// OrderListViewController.h
// Palmwms
//
// Created by 曹云霄 on 16/9/13.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface OrderListViewController : BaseViewController
/**
* 订单title
*/
@property (weak, nonatomic) IBOutlet UILabel *orderTitleLabel;
/**
* 订单tableview
*/
@property (weak, nonatomic) IBOutlet UITableView *orderTableView;
/**
* 关闭回调
*/
@property (nonatomic,copy) void(^ReturnoffButtonClickBlock)();
/**
* 选中发货单
*/
@property (nonatomic,copy) void(^SelectOrderClickBlock)(Busbill *order,NSIndexPath *indexPath);
/**
* 数据源列表
*/
@property (nonatomic,strong) NSArray *datasArray;
/**
* indexpath
*/
@property (nonatomic,strong) NSIndexPath *indexPath;
@end
//
// OrderListViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/9/13.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "OrderListViewController.h"
#import "OrderListTableViewCell.h"
#define FINISH @"已完成"
@interface OrderListViewController ()<UITableViewDataSource,UITableViewDelegate>
@end
@implementation OrderListViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self uiConfigAction];
}
#pragma mark - UI
- (void)uiConfigAction
{
NSInteger index = 0;
for (Busbill *model in self.datasArray) {
if ([model.state isEqualToString:FINISH]) {
index ++;
}
}
NSString *indexString = [NSString stringWithFormat:@"%ld",index?index:1];
NSString *totalCount = [NSString stringWithFormat:@"%ld",self.datasArray.count];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"今日订单%ld,已完成订单%ld",self.datasArray.count,index]];
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor blackColor] range:NSMakeRange(attributedString.length-([indexString length] + 6 + totalCount.length), totalCount.length)];
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor greenColor] range:NSMakeRange(attributedString.length-[indexString length], [indexString length])];
self.orderTitleLabel.attributedText = attributedString;
//选中状态
[self.orderTableView selectRowAtIndexPath:self.indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
OrderListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"OrderListTableViewCell" forIndexPath:indexPath];
Busbill *model = self.datasArray[indexPath.row];
cell.orderBillStateLabel.text = model.state;
cell.orderTitleLabel.text = [NSString stringWithFormat:@"单号:%@",model.billNumber];
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.datasArray.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 50;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (self.SelectOrderClickBlock) {
self.SelectOrderClickBlock(self.datasArray[indexPath.row],indexPath);
}
}
#pragma mark - 关闭
- (IBAction)turnoffButtonClickAction:(UIButton *)sender {
if (self.ReturnoffButtonClickBlock) {
self.ReturnoffButtonClickBlock();
}
}
@end
//
// SearchViewController.h
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface SearchViewController : BaseViewController
/**
* 选中客户
*/
@property (nonatomic,copy) void(^selectCustomer)(Customer *model);
@end
//
// SearchViewController.m
// Palmwms
//
// Created by 曹云霄 on 16/8/25.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "SearchViewController.h"
#define PAGENUMBER 12
#define QUERYUSER @"queryuser"
@interface SearchViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
/**
* 输入框
*/
@property (weak, nonatomic) IBOutlet UITextField *userInputTextField;
/**
* tableview
*/
@property (weak, nonatomic) IBOutlet UITableView *userTableView;
/**
* 查询对象
*/
@property (nonatomic,strong) CustomerQueryDefintion *queryModel;
/**
* 返回对象
*/
@property (nonatomic,strong) CustomerQueryResult *result;
/**
* 数据源
*/
@property (nonatomic,strong) NSMutableArray *datasArray;
/**
* 记录上一次选择的cell下标
*/
@property (nonatomic,strong) NSIndexPath *selectIndexPath;
@end
@implementation SearchViewController
#pragma mark - lazy
- (CustomerQueryDefintion *)queryModel
{
if (!_queryModel) {
_queryModel = [[CustomerQueryDefintion alloc]init];
//排序
QueryOrder *order = [[QueryOrder alloc]init];
order.field = @"id";
order.direction = QUERYORDERDIRECTION_ASC;
_queryModel.orders = (NSArray<QueryOrder> *)@[order];
_queryModel.pageSize = PAGENUMBER;
_queryModel.pageNumber = PAGENUMBER - PAGENUMBER;
}
return _queryModel;
}
- (NSMutableArray *)datasArray
{
if (!_datasArray) {
_datasArray = [NSMutableArray array];
}
return _datasArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self uiConfigAction];
[self setupRefreshing];
}
#pragma mark - UI
- (void)uiConfigAction
{
[self customBackButton:@selector(backButtonClick)];
[self.userInputTextField addCorners];
[self.userInputTextField addLines];
UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 60, 40)];
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 10, 20, 20)];
imageView.image = LOADIMAGENAME(@"search");
[leftView addSubview:imageView];
self.userInputTextField.leftViewMode = UITextFieldViewModeAlways;
self.userInputTextField.leftView = leftView;
self.userTableView.tableFooterView = [UIView new];
[self.userTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:QUERYUSER];
//确认选择
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc]initWithTitle:@"确认" style:UIBarButtonItemStyleDone target:self action:@selector(rightButtonClickAction:)];
rightButton.tintColor = [UIColor whiteColor];
self.navigationItem.rightBarButtonItem = rightButton;
self.navigationItem.rightBarButtonItem.enabled = false;
}
#pragma mark - 设置刷新
- (void)setupRefreshing
{
WS(weakSelf);
self.userTableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
[weakSelf.userTableView.mj_footer resetNoMoreData];
[weakSelf queryUserisRemoveAll:YES];
}];
[self.userTableView.mj_header beginRefreshing];
MJRefreshAutoNormalFooter *footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (weakSelf.result.paging.page >= weakSelf.result.paging.pageCount - 1) {
[weakSelf.userTableView.mj_footer endRefreshingWithNoMoreData];
}else
{
[weakSelf queryUserisRemoveAll:NO];
}
}];
self.userTableView.mj_footer = footer;
footer.automaticallyHidden = YES;
}
#pragma mark - 查询客户
- (void)queryUserisRemoveAll:(BOOL)boolValue
{
WS(weakSelf);
[self CreateMBProgressHUDLoding:@"查询中"];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(QUERY) WithRequestType:0 WithParameter:self.queryModel WithReturnValueBlock:^(id returnValue) {
[weakSelf endRefreshingForTableView:weakSelf.userTableView];
[weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (boolValue) {
[self.datasArray removeAllObjects];
}
CustomerQueryResult *result = [[CustomerQueryResult alloc]initWithDictionary:returnValue[@"data"] error:nil];
for (Customer *dict in result.records) {
[self.datasArray addObject:dict];
}
[self.userTableView reloadData];
}else
{
[weakSelf SHOWPrompttext:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
[weakSelf SHOWPrompttext:NETWORK];
} WithFailureBlock:^(NSError *error) {
[weakSelf RemoveMBProgressHUDLoding];
[weakSelf SHOWPrompttext:error.localizedDescription];
}];
}
#pragma mark - <UITableViewDataSource>
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:QUERYUSER forIndexPath:indexPath];
Customer *dict = self.datasArray[indexPath.row];
cell.textLabel.text = [NSString stringWithFormat:@"【%@】%@",dict.code,dict.name];
cell.tintColor = [UIColor redColor];
cell.accessoryType = (self.selectIndexPath == indexPath)?UITableViewCellAccessoryCheckmark:UITableViewCellAccessoryNone;
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return self.datasArray.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 50;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.selectIndexPath) {
UITableViewCell *selectCell = [tableView cellForRowAtIndexPath:self.selectIndexPath];
selectCell.accessoryType = UITableViewCellAccessoryNone;
self.navigationItem.rightBarButtonItem.enabled = false;
if (self.selectIndexPath == indexPath) {
self.selectIndexPath = nil;return;
}
}
//更新记录,选中点击的cell
self.selectIndexPath = indexPath;
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
self.navigationItem.rightBarButtonItem.enabled = true;
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
#pragma mark - 确认选择
- (void)rightButtonClickAction:(UIBarButtonItem *)item
{
if (self.selectCustomer) {
self.selectCustomer(self.datasArray[self.selectIndexPath.row]);
}
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - 返回
- (void)backButtonClick
{
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - <UITextFieldDelegate>
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
self.queryModel.codeEqualsOrNameLike = [textField.text length]?textField.text:nil;
[self.userTableView.mj_header beginRefreshing];
return YES;
}
@end
......@@ -21,6 +21,10 @@
*/
- (instancetype)userSignInitialize:(id<BMKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier;
/**
* 汽车
*/
- (instancetype)carSignInitialize:(id<BMKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier;
@end
......@@ -17,7 +17,19 @@
{
if ([self initWithAnnotation:annotation reuseIdentifier:reuseIdentifier]) {
self.image = [UIImage imageNamed:@"location"];
self.image = [UIImage imageNamed:@"store"];
}
return self;
}
/**
* 汽车
*/
- (instancetype)carSignInitialize:(id<BMKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier
{
if ([self initWithAnnotation:annotation reuseIdentifier:reuseIdentifier]) {
self.image = [UIImage imageNamed:@"car"];
}
return self;
}
......
......@@ -17,5 +17,4 @@
- (instancetype)signUserInitialize:(UIView *)customer withCoord:(CLLocationCoordinate2D)coord;
@end
//
// OrderDetailsTableViewCell.h
// Palmwms
//
// Created by 曹云霄 on 16/9/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OrderDetailsTableViewCell : UITableViewCell
/**
* 到达
*/
@property (weak, nonatomic) IBOutlet UIButton *arriveButton;
/**
* 店名
*/
@property (weak, nonatomic) IBOutlet UILabel *storeTitleLabel;
/**
* 店铺地址
*/
@property (weak, nonatomic) IBOutlet UILabel *storeAddressLabel;
@end
//
// OrderDetailsTableViewCell.m
// Palmwms
//
// Created by 曹云霄 on 16/9/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "OrderDetailsTableViewCell.h"
@implementation OrderDetailsTableViewCell
- (void)awakeFromNib {
// Initialization code
}
#pragma mark - 送货到达
- (IBAction)arriveButtonClickAction:(UIButton *)sender {
}
@end
//
// OrderListTableViewCell.h
// Palmwms
//
// Created by 曹云霄 on 16/9/13.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OrderListTableViewCell : UITableViewCell
/**
* 订单title
*/
@property (weak, nonatomic) IBOutlet UILabel *orderTitleLabel;
/**
* 订单状态
*/
@property (weak, nonatomic) IBOutlet UILabel *orderBillStateLabel;
@end
//
// OrderListTableViewCell.m
// Palmwms
//
// Created by 曹云霄 on 16/9/13.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "OrderListTableViewCell.h"
@implementation OrderListTableViewCell
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
{
"images" : [
{
"idiom" : "universal",
"filename" : "arrow.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "arrow@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "arrow@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "car.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "car@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "car@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "finishstore.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "finishstore@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "finishstore@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "orderbill.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "orderbill@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "orderbill@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "orederDetails.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "orederDetails@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "orederDetails@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "location.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "location@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "location@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "store.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "store@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "store@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "turnoff.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "turnoff@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "turnoff@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "warehouse.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "warehouse@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "warehouse@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -4,22 +4,20 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>物流移动平台</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>物流移动平台</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......@@ -29,6 +27,10 @@
</dict>
<key>NSLocationAlwaysUsageDescription</key>
<string></string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
......
......@@ -170,6 +170,14 @@
</subviews>
<color key="backgroundColor" red="0.87058823529411766" green="0.87058823529411766" blue="0.87058823529411766" alpha="1" colorSpace="calibratedRGB"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="C4r-B6-A2X">
<rect key="frame" x="315" y="155" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="refresh"/>
<connections>
<action selector="refreshLocationButton:" destination="mEs-Sf-Dxl" eventType="touchUpInside" id="pfx-2O-4oQ"/>
</connections>
</button>
</subviews>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
......@@ -225,7 +233,7 @@
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="ChangePasswordTableViewCell" rowHeight="50" id="0zn-fl-tTo" customClass="ChangePasswordTableViewCell">
<rect key="frame" x="0.0" y="272" width="375" height="50"/>
<rect key="frame" x="0.0" y="208" width="375" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0zn-fl-tTo" id="ll8-Po-7jK">
<rect key="frame" x="0.0" y="0.0" width="342" height="50"/>
......@@ -244,7 +252,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="LogoutTableViewCell" rowHeight="50" id="Nq8-rt-cgv" customClass="LogoutTableViewCell">
<rect key="frame" x="0.0" y="322" width="375" height="50"/>
<rect key="frame" x="0.0" y="258" width="375" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Nq8-rt-cgv" id="PRu-JX-c6s">
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
......@@ -314,7 +322,7 @@
<tableViewSection id="wuy-kY-t9n">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="30" id="emo-7t-bDA">
<rect key="frame" x="0.0" y="64" width="375" height="30"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="emo-7t-bDA" id="oTk-lT-lvm">
<rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
......@@ -332,7 +340,7 @@
<color key="backgroundColor" red="0.9137254901960784" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="SHo-Lo-eDn">
<rect key="frame" x="0.0" y="94" width="375" height="44"/>
<rect key="frame" x="0.0" y="30" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="SHo-Lo-eDn" id="SMr-T2-EIZ">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
......@@ -348,7 +356,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="30" id="3cD-Ht-OvV">
<rect key="frame" x="0.0" y="138" width="375" height="30"/>
<rect key="frame" x="0.0" y="74" width="375" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3cD-Ht-OvV" id="lLG-T0-VPD">
<rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
......@@ -366,7 +374,7 @@
<color key="backgroundColor" red="0.9137254901960784" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="6tu-E0-HLy">
<rect key="frame" x="0.0" y="168" width="375" height="44"/>
<rect key="frame" x="0.0" y="104" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6tu-E0-HLy" id="unZ-cF-yBF">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
......@@ -382,7 +390,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="30" id="Ru3-MJ-I7L">
<rect key="frame" x="0.0" y="212" width="375" height="30"/>
<rect key="frame" x="0.0" y="148" width="375" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ru3-MJ-I7L" id="N5G-dD-xlQ">
<rect key="frame" x="0.0" y="0.0" width="375" height="30"/>
......@@ -400,7 +408,7 @@
<color key="backgroundColor" red="0.9137254901960784" green="0.91764705882352937" blue="0.92156862745098034" alpha="1" colorSpace="calibratedRGB"/>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="iCn-cT-yPm">
<rect key="frame" x="0.0" y="242" width="375" height="44"/>
<rect key="frame" x="0.0" y="178" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="iCn-cT-yPm" id="ZlM-ts-wlV">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
......@@ -488,6 +496,203 @@
</objects>
<point key="canvasLocation" x="1329.5" y="922.5"/>
</scene>
<!--Order Details View Controller-->
<scene sceneID="fyC-U5-qfi">
<objects>
<viewController storyboardIdentifier="OrderDetailsViewController" id="C0o-Mg-Dma" customClass="OrderDetailsViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="FKk-Sc-b0J">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="FjB-pf-FJ8">
<rect key="frame" x="0.0" y="223" width="375" height="380"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="51" sectionHeaderHeight="28" sectionFooterHeight="28" id="o2d-wH-JlE">
<rect key="frame" x="0.0" y="64" width="375" height="316"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="OrderDetailsTableViewCell" rowHeight="60" id="Gtc-7O-ArB" customClass="OrderDetailsTableViewCell">
<rect key="frame" x="0.0" y="28" width="375" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Gtc-7O-ArB" id="RCH-Eb-Bwe">
<rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三百货" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ryA-Yg-G3c">
<rect key="frame" x="12" y="9" width="206" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="上海市联航路店" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0VZ-gm-JKC">
<rect key="frame" x="12" y="32" width="206" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="jsI-w3-AlX">
<rect key="frame" x="280" y="13" width="87" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<state key="normal" title="送货到达">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="selected" title="送货完成">
<color key="titleColor" red="0.50588235290000005" green="0.76862745099999996" blue="0.21960784310000001" alpha="1" colorSpace="calibratedRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="arriveButtonClickAction:" destination="Gtc-7O-ArB" eventType="touchUpInside" id="3fV-4N-fhU"/>
</connections>
</button>
</subviews>
</tableViewCellContentView>
<connections>
<outlet property="arriveButton" destination="jsI-w3-AlX" id="el9-CD-yaZ"/>
<outlet property="storeAddressLabel" destination="0VZ-gm-JKC" id="yNx-Dy-1PE"/>
<outlet property="storeTitleLabel" destination="ryA-Yg-G3c" id="ZCp-ra-3kG"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="C0o-Mg-Dma" id="MNX-oP-psc"/>
<outlet property="delegate" destination="C0o-Mg-Dma" id="Lqn-jd-aUq"/>
</connections>
</tableView>
<view contentMode="scaleToFill" id="8lD-SK-705">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本次应送5,已送1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Zxh-Q1-kCC">
<rect key="frame" x="12" y="11" width="351" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.91372549020000005" green="0.91764705879999997" blue="0.92156862750000001" alpha="1" colorSpace="calibratedRGB"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="Aw1-t5-ZbC">
<rect key="frame" x="326" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="turnoff"/>
<connections>
<action selector="turnoffButtonClickAction:" destination="C0o-Mg-Dma" eventType="touchUpInside" id="T0k-m2-bjL"/>
</connections>
</button>
</subviews>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections>
<outlet property="orderDetailsTableview" destination="o2d-wH-JlE" id="eIG-tf-MqR"/>
<outlet property="titleLabel" destination="Zxh-Q1-kCC" id="nkC-gy-rNb"/>
<outlet property="turnoffButton" destination="Aw1-t5-ZbC" id="hY6-xV-sLf"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pL6-9U-3b6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1761.5" y="922.5"/>
</scene>
<!--Order List View Controller-->
<scene sceneID="tVb-8W-oqa">
<objects>
<viewController storyboardIdentifier="OrderListViewController" id="X69-NL-suy" customClass="OrderListViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="yLk-FG-wYf">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="363-qH-g2l">
<rect key="frame" x="0.0" y="223" width="375" height="380"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="51" sectionHeaderHeight="28" sectionFooterHeight="28" id="ANO-kd-943">
<rect key="frame" x="0.0" y="64" width="375" height="316"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="OrderListTableViewCell" rowHeight="60" id="6T5-Ed-fED" customClass="OrderListTableViewCell">
<rect key="frame" x="0.0" y="28" width="375" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6T5-Ed-fED" id="eiw-ho-EmX">
<rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fhQ-cN-P6C">
<rect key="frame" x="10" y="19" width="243" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rB4-PK-a2j">
<rect key="frame" x="292.5" y="19" width="66.5" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.2901960784" green="0.57254901960000004" blue="0.93725490199999995" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<outlet property="orderBillStateLabel" destination="rB4-PK-a2j" id="kiq-gT-oLc"/>
<outlet property="orderTitleLabel" destination="fhQ-cN-P6C" id="qWa-Gh-CxE"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="X69-NL-suy" id="UWN-a3-AlW"/>
<outlet property="delegate" destination="X69-NL-suy" id="z7S-c7-Kyx"/>
</connections>
</tableView>
<view contentMode="scaleToFill" id="Xv7-LG-dfL">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今天应送订单5,已送订单1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jTL-eX-K6H">
<rect key="frame" x="12" y="11" width="351" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.91372549020000005" green="0.91764705879999997" blue="0.92156862750000001" alpha="1" colorSpace="calibratedRGB"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="iqq-1N-mtS">
<rect key="frame" x="326" y="0.0" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="turnoff"/>
<connections>
<action selector="turnoffButtonClickAction:" destination="C0o-Mg-Dma" eventType="touchUpInside" id="fsJ-Jg-NvQ"/>
<action selector="turnoffButtonClickAction:" destination="X69-NL-suy" eventType="touchUpInside" id="zBW-o4-24C"/>
</connections>
</button>
</subviews>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections>
<outlet property="orderTableView" destination="ANO-kd-943" id="90h-rC-V10"/>
<outlet property="orderTitleLabel" destination="jTL-eX-K6H" id="Kat-Vc-MoQ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pX9-bJ-jTl" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1761.5" y="1690.5"/>
</scene>
<!--Delivery Tracking View Controller-->
<scene sceneID="Avb-8J-Nau">
<objects>
......@@ -496,17 +701,45 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="该功能待开发" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qdp-Gw-X1E">
<rect key="frame" x="23" y="249" width="328" height="60"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="30"/>
<color key="textColor" red="0.23137254900000001" green="0.52941176469999995" blue="0.75294117650000003" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="EAK-MO-QVL">
<rect key="frame" x="20" y="352" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.91372549020000005" green="0.91764705879999997" blue="0.92156862750000001" alpha="1" colorSpace="calibratedRGB"/>
<state key="normal" backgroundImage="orderbill"/>
<connections>
<action selector="orderListButtonClickAction:" destination="xvB-d8-elF" eventType="touchUpInside" id="MFH-n3-6AN"/>
</connections>
</button>
<view contentMode="scaleToFill" id="OzJ-Ks-0JI">
<rect key="frame" x="0.0" y="559" width="375" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="orederDetails" id="JW1-Po-07h">
<rect key="frame" x="23" y="10" width="25" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrow" id="uO5-jt-Ge1">
<rect key="frame" x="353" y="15" width="9" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请先选择发货单" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="e4s-Qj-hP4">
<rect key="frame" x="55" y="12" width="290" height="21"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections>
<outlet property="invoiceInformationlabel" destination="e4s-Qj-hP4" id="M3H-Yz-Ujh"/>
<outlet property="invoiceView" destination="OzJ-Ks-0JI" id="DfW-Bv-bSR"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ew9-pq-5x2" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
......@@ -532,9 +765,14 @@
</scene>
</scenes>
<resources>
<image name="arrow" width="9" height="17"/>
<image name="header" width="57" height="57"/>
<image name="headerBackground" width="314" height="200"/>
<image name="headerBackground" width="360" height="306"/>
<image name="icon" width="23" height="24"/>
<image name="logo" width="114" height="62"/>
<image name="orderbill" width="32" height="32"/>
<image name="orederDetails" width="27" height="27"/>
<image name="refresh" width="83" height="82"/>
<image name="turnoff" width="38" height="38"/>
</resources>
</document>
//
// palmwms_objc_json_client.h
// Palmwms
//
// Created by 曹云霄 on 16/8/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JSONModel.h"
......@@ -29,35 +21,173 @@ extern NSString * const QUERYORDERDIRECTION_DESC;
@class ExceptionCode;
@class RsResponse;
@class BusbillDtl;
@class QueryDefinition;
@class RsQueryResult;
@class Customer;
@class Depot;
@class QueryResultPaging;
@class Distance;
@class Driver;
@class LoginResult;
@class ResetPasswordRequest;
@class ModifyPasswordRequest;
@class LoginRequest;
@class QueryResultPaging;
@class QueryOrder;
@class RsResponse;
@class ExceptionCode;
@class CustomerQueryResult;
@class Busbill;
@class CustomerQueryDefintion;
@class DepotQueryDefintion;
@class DistanceQueryDefintion;
@class DistanceQueryResult;
@class DepotQueryResult;
@class CustomerQueryResult;
@class BusbillQueryResult;
@class BusbillQueryDefintion;
@class BusbillDtlQueryResult;
@class BusbillDtlQueryDefintion;
@protocol ExceptionCode @end
@protocol RsResponse @end
@protocol BusbillDtl @end
@protocol QueryDefinition @end
@protocol RsQueryResult @end
@protocol Customer @end
@protocol Depot @end
@protocol QueryResultPaging @end
@protocol Distance @end
@protocol Driver @end
@protocol LoginResult @end
@protocol ResetPasswordRequest @end
@protocol ModifyPasswordRequest @end
@protocol LoginRequest @end
@protocol QueryResultPaging @end
@protocol QueryOrder @end
@protocol RsResponse @end
@protocol ExceptionCode @end
@protocol CustomerQueryResult @end
@protocol Busbill @end
@protocol CustomerQueryDefintion @end
@protocol DepotQueryDefintion @end
@protocol DistanceQueryDefintion @end
@protocol DistanceQueryResult @end
@protocol DepotQueryResult @end
@protocol CustomerQueryResult @end
@protocol BusbillQueryResult @end
@protocol BusbillQueryDefintion @end
@protocol BusbillDtlQueryResult @end
@protocol BusbillDtlQueryDefintion @end
/**
* 异常代码。
@author Debenson
@since 0.1
*/
@interface ExceptionCode : JSONModel
/**
* 异常代码
*
*
*/
@property (nonatomic, assign) NSInteger code;
/**
* 异常信息
*
*
*/
@property (nonatomic, copy) NSString *message;
@end /* interface ExceptionCode */
/**
* Restful Service response base
@author Debenson
@since 0.1
*/
@interface RsResponse : JSONModel
/**
* 0:正常, 非0异常。
*
*
*/
@property (nonatomic, assign) long long code;
/**
* 异常描述
*
*
*/
@property (nonatomic, copy) NSString *message;
/**
* 返回数据
*
*
*/
@property (nonatomic, strong) NSObject *data;
@end /* interface RsResponse */
/**
* 出车单明细。
@author Debenson
@since 0.1
*/
@interface BusbillDtl : JSONModel
/**
* 标识
*
*
*/
@property (nonatomic, copy) NSString *fid;
/**
* 单号
*
*
*/
@property (nonatomic, copy) NSString *billNumber;
/**
* 客户标识
*
*
*/
@property (nonatomic, copy) NSString *customerUuid;
/**
* 客户代码
*
*
*/
@property (nonatomic, copy) NSString *customerCode;
/**
* 客户名称
*
*
*/
@property (nonatomic, copy) NSString *customerName;
/**
* 客户精度
*
*
*/
@property (nonatomic, copy) NSString *customerLng;
/**
* 客户纬度
*
*
*/
@property (nonatomic, copy) NSString *customerLat;
/**
* 单据状态
*
*
*/
@property (nonatomic, copy) NSString *state;
@end /* interface BusbillDtl */
/**
......@@ -186,6 +316,114 @@ extern NSString * const QUERYORDERDIRECTION_DESC;
/**
* 客户。
@author Debenson
@since 0.1
*/
@interface Depot : JSONModel
/**
* 标识
*
*
*/
@property (nonatomic, copy) NSString *fid;
/**
* 代码
*
*
*/
@property (nonatomic, copy) NSString *code;
/**
* 经度
*
*
*/
@property (nonatomic, copy) NSString *lng;
/**
* 纬度
*
*
*/
@property (nonatomic, copy) NSString *lat;
@end /* interface Depot */
/**
* 分页数据。
@author Debenson
@since 0.0.1
*/
@interface QueryResultPaging : JSONModel
/**
* 当前页数,起始于0
*
*
*/
@property (nonatomic, assign) NSInteger page;
/**
* 每页记录数,传0表示查询所有记录
*
*
*/
@property (nonatomic, assign) NSInteger pageSize;
/**
* 查询结果总页数
*
*
*/
@property (nonatomic, assign) NSInteger pageCount;
/**
* 查询结果总记录数
*
*
*/
@property (nonatomic, assign) long long recordCount;
@end /* interface QueryResultPaging */
/**
* 客户间距离。
@author Debenson
@since 0.1
*/
@interface Distance : JSONModel
/**
* 标识
*
*
*/
@property (nonatomic, copy) NSString *fid;
/**
* 出发地代码
*
*
*/
@property (nonatomic, copy) NSString *startCustomerCode;
/**
* 目的地代码
*
*
*/
@property (nonatomic, copy) NSString *endCustomerCode;
/**
* 距离
*
*
*/
@property (nonatomic, assign) double distance;
@end /* interface Distance */
/**
* 司机
......@@ -319,116 +557,164 @@ extern NSString * const QUERYORDERDIRECTION_DESC;
/**
* 分页数据
* 查询排序条件
@author Debenson
@since 0.0.1
*/
@interface QueryResultPaging : JSONModel
@interface QueryOrder : JSONModel
/**
* 当前页数,起始于0
* 字段名称
*
*
*/
@property (nonatomic, assign) NSInteger page;
@property (nonatomic, copy) NSString *field;
/**
* 每页记录数,传0表示查询所有记录
* 排序方向
*
* 取值: QUERYORDERDIRECTION_ASC, QUERYORDERDIRECTION_DESC,
*/
@property (nonatomic, copy) NSString *direction;
@end /* interface QueryOrder */
/**
* 出车单。
@author Debenson
@since 0.1
*/
@interface Busbill : JSONModel
/**
* 标识
*
*
*/
@property (nonatomic, assign) NSInteger pageSize;
@property (nonatomic, copy) NSString *fid;
/**
* 查询结果总页数
* 单号
*
*
*/
@property (nonatomic, assign) NSInteger pageCount;
@property (nonatomic, copy) NSString *billNumber;
/**
* 查询结果总记录数
* 送货日期
*
*
*/
@property (nonatomic, assign) long long recordCount;
@end /* interface QueryResultPaging */
@property (nonatomic, copy) NSString *pickingDate;
/**
* 司机信息
*
*
*/
@property (nonatomic, copy) NSString *driverInfo;
/**
* 车辆信息
*
*
*/
@property (nonatomic, copy) NSString *busInfo;
/**
* 单据状态
*
*
*/
@property (nonatomic, copy) NSString *state;
/**
* 出车单明细
* @see BusbillDtl
*
*/
@property (nonatomic, strong) NSArray<BusbillDtl> *dtls;
@end /* interface Busbill */
/**
* 查询排序条件
* 客户查询定义
@author Debenson
@since 0.0.1
@since 0.1
*/
@interface QueryOrder : JSONModel
@interface CustomerQueryDefintion : QueryDefinition
/**
* 字段名称
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *field;
@property (nonatomic, copy) NSString *codeEqualsOrNameLike;
@end /* interface CustomerQueryDefintion */
/**
* 排序方向
*
* 取值: QUERYORDERDIRECTION_ASC, QUERYORDERDIRECTION_DESC,
* 客户查询定义。
@author Debenson
@since 0.1
*/
@property (nonatomic, copy) NSString *direction;
@end /* interface QueryOrder */
@interface DepotQueryDefintion : QueryDefinition
@end /* interface DepotQueryDefintion */
/**
* Restful Service response base
* 客户查询定义。
@author Debenson
@since 0.1
*/
@interface RsResponse : JSONModel
@interface DistanceQueryDefintion : QueryDefinition
/**
* 0:正常, 非0异常。
* (no documentation provided)
*
*
*/
@property (nonatomic, assign) long long code;
@property (nonatomic, copy) NSString *codeEqualsOrNameLike;
@end /* interface DistanceQueryDefintion */
/**
* 异常描述
*
*
* 客户查询结果。
@author Debenson
@since 0.1
*/
@property (nonatomic, copy) NSString *message;
@interface DistanceQueryResult : RsQueryResult
/**
* 返回数据
*
* 查询结果集合
* @see Distance
*
*/
@property (nonatomic, strong) NSObject *data;
@end /* interface RsResponse */
@property (nonatomic, strong) NSArray<Distance> *records;
@end /* interface DistanceQueryResult */
/**
* 异常代码
* 客户查询结果
@author Debenson
@since 0.1
*/
@interface ExceptionCode : JSONModel
@interface DepotQueryResult : RsQueryResult
/**
* 异常代码
*
*
*/
@property (nonatomic, assign) NSInteger code;
/**
* 异常信息
*
* 查询结果集合
* @see Depot
*
*/
@property (nonatomic, copy) NSString *message;
@end /* interface ExceptionCode */
@property (nonatomic, strong) NSArray<Depot> *records;
@end /* interface DepotQueryResult */
......@@ -442,7 +728,7 @@ extern NSString * const QUERYORDERDIRECTION_DESC;
@interface CustomerQueryResult : RsQueryResult
/**
* 查询结果集合
* @see RsQueryResult
* @see Customer
*
*/
@property (nonatomic, strong) NSArray<Customer> *records;
......@@ -451,19 +737,73 @@ extern NSString * const QUERYORDERDIRECTION_DESC;
/**
* 客户查询定义
* 出车单查询结果
@author Debenson
@since 0.1
*/
@interface CustomerQueryDefintion : QueryDefinition
@interface BusbillQueryResult : RsQueryResult
/**
* 查询结果集合
* @see Busbill
*
*/
@property (nonatomic, strong) NSArray<Busbill> *records;
@end /* interface BusbillQueryResult */
/**
* 出车单查询定义。
@author Debenson
@since 0.1
*/
@interface BusbillQueryDefintion : QueryDefinition
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *codeEqualsOrNameLike;
@end /* interface CustomerQueryDefintion */
@property (nonatomic, copy) NSString *driverCode;
/**
* (no documentation provided)
*
*
*/
@property (nonatomic, copy) NSString *date;
@end /* interface BusbillQueryDefintion */
/**
* 出车单明细查询结果。
@author Debenson
@since 0.1
*/
@interface BusbillDtlQueryResult : RsQueryResult
/**
* 查询结果集合
* @see BusbillDtl
*
*/
@property (nonatomic, strong) NSArray<BusbillDtl> *records;
@end /* interface BusbillDtlQueryResult */
/**
* 出车单明细查询定义。
@author Debenson
@since 0.1
*/
@interface BusbillDtlQueryDefintion : QueryDefinition
@end /* interface BusbillDtlQueryDefintion */
//
// palmwms_objc_json_client.m
// Palmwms
//
// Created by 曹云霄 on 16/8/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "palmwms_objc_json_client.h"
@implementation ExceptionCode
@synthesize code;
@synthesize message;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation RsResponse
@synthesize code;
@synthesize message;
@synthesize data;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation BusbillDtl
@synthesize fid;
@synthesize billNumber;
@synthesize customerUuid;
@synthesize customerCode;
@synthesize customerName;
@synthesize customerLng;
@synthesize customerLat;
@synthesize state;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end
@implementation QueryDefinition
@synthesize orders;
@synthesize pageNumber;
......@@ -62,6 +106,64 @@ NSString * const QUERYORDERDIRECTION_DESC = @"desc";
}
@end
@implementation Depot
@synthesize fid;
@synthesize code;
@synthesize lng;
@synthesize lat;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end
@implementation QueryResultPaging
@synthesize page;
@synthesize pageSize;
@synthesize pageCount;
@synthesize recordCount;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation Distance
@synthesize fid;
@synthesize startCustomerCode;
@synthesize endCustomerCode;
@synthesize distance;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end
@implementation Driver
......@@ -150,11 +252,9 @@ NSString * const QUERYORDERDIRECTION_DESC = @"desc";
@end
@implementation QueryResultPaging
@synthesize page;
@synthesize pageSize;
@synthesize pageCount;
@synthesize recordCount;
@implementation QueryOrder
@synthesize field;
@synthesize direction;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
......@@ -164,9 +264,14 @@ NSString * const QUERYORDERDIRECTION_DESC = @"desc";
@end
@implementation QueryOrder
@synthesize field;
@synthesize direction;
@implementation Busbill
@synthesize fid;
@synthesize billNumber;
@synthesize pickingDate;
@synthesize driverInfo;
@synthesize busInfo;
@synthesize state;
@synthesize dtls;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
......@@ -174,12 +279,18 @@ NSString * const QUERYORDERDIRECTION_DESC = @"desc";
}
+(JSONKeyMapper*)keyMapper
{
return [[JSONKeyMapper alloc] initWithDictionary:@{
@"id": @"fid",
}];
}
@end
@implementation RsResponse
@synthesize code;
@synthesize message;
@synthesize data;
@implementation CustomerQueryDefintion
@synthesize codeEqualsOrNameLike;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
......@@ -189,9 +300,40 @@ NSString * const QUERYORDERDIRECTION_DESC = @"desc";
@end
@implementation ExceptionCode
@synthesize code;
@synthesize message;
@implementation DepotQueryDefintion
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation DistanceQueryDefintion
@synthesize codeEqualsOrNameLike;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation DistanceQueryResult
@synthesize records;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation DepotQueryResult
@synthesize records;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
......@@ -212,8 +354,41 @@ NSString * const QUERYORDERDIRECTION_DESC = @"desc";
@end
@implementation CustomerQueryDefintion
@synthesize codeEqualsOrNameLike;
@implementation BusbillQueryResult
@synthesize records;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation BusbillQueryDefintion
@synthesize driverCode;
@synthesize date;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation BusbillDtlQueryResult
@synthesize records;
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
return YES;
}
@end
@implementation BusbillDtlQueryDefintion
+(BOOL)propertyIsOptional:(NSString*)propertyName
{
......
//
// NSDate+FormatterAdditions.h
// JobTalk
//
// Created by Xummer on 14-5-16.
// Copyright (c) 2014年 BST. All rights reserved.
//
#import <Foundation/Foundation.h>
// https://github.com/samsoffes/sstoolkit/blob/master/SSToolkit/NSDate%2BSSToolkitAdditions.h
/**
Provides extensions to `NSDate` for various common tasks.
*/
@interface NSDate (FormatterAdditions)
///---------------
/// @name ISO 8601
///---------------
/**
Returns a new date represented by an ISO8601 string.
@param iso8601String An ISO8601 string
@return Date represented by the ISO8601 string
*/
+ (NSDate *)dateFromISO8601String:(NSString *)iso8601String;
/**
Returns a string representation of the receiver in ISO8601 format.
@return A string representation of the receiver in ISO8601 format.
*/
- (NSString *)ISO8601String;
/**
@param dateFormatter a date formatter, like @"%Y-%m-%dT%H:%M:%SZ".
@return A string representation of the receiver in dateFormatter.
*/
- (NSString *)stringWithFormatter:(NSString *)dateFormatter;
- (NSString *)chatAttachmentFormatterString;
- (NSString *)YMDHMSFormatterString;
- (NSString *)chatMsgFormatterString;
- (NSString *)localYMDString;
- (NSString *)briefTimeForTimeLine;
// yyyy-MM-dd HH:mm:ss
- (NSString *)httpParameterString;
// yyyy-MM-dd
- (NSString *)yearMonthDayString;
// yymmddhhmmssSSS
- (NSString *)mobileIDDateString;
- (NSDate *)endOfTheDay;
///--------------------
/// @name Time In Words
///--------------------
/**
Returns a string representing the time interval from now in words (including seconds).
The strings produced by this method will be similar to produced by Twitter for iPhone or Tweetbot in the top right of
the tweet cells.
Internally, this does not use `timeInWordsFromTimeInterval:includingSeconds:`.
@return A string representing the time interval from now in words
*/
- (NSString *)briefTimeInWords;
/**
Returns a string representing the time interval from now in words (including seconds).
The strings produced by this method will be similar to produced by ActiveSupport's `time_ago_in_words` helper method.
@return A string representing the time interval from now in words
@see timeInWordsIncludingSeconds:
@see timeInWordsFromTimeInterval:includingSeconds:
*/
- (NSString *)timeInWords;
/**
Returns a string representing the time interval from now in words.
The strings produced by this method will be similar to produced by ActiveSupport's `time_ago_in_words` helper method.
@param includeSeconds `YES` if seconds should be included. `NO` if they should not.
@return A string representing the time interval from now in words
@see timeInWordsIncludingSeconds:
@see timeInWordsFromTimeInterval:includingSeconds:
*/
- (NSString *)timeInWordsIncludingSeconds:(BOOL)includeSeconds;
/**
Returns a string representing a time interval in words.
The strings produced by this method will be similar to produced by ActiveSupport's `time_ago_in_words` helper method.
@param intervalInSeconds The time interval to convert to a string
@param includeSeconds `YES` if seconds should be included. `NO` if they should not.
@return A string representing the time interval in words
@see timeInWords
@see timeInWordsIncludingSeconds:
*/
+ (NSString *)timeInWordsFromTimeInterval:(NSTimeInterval)intervalInSeconds includingSeconds:(BOOL)includeSeconds;
@end
@interface NSDate (DateFormatterAdditions)
- (NSString *)timeStampStr;
+ (NSString *)curTimeStamp;
/** 返回网络请求需要的时间(巡店项目等) */
+ (NSString *)httpRequestTimeString;
@end
@interface NSDate (DateCalculate)
- (NSDate *)dateAddHourse: (NSUInteger)hourse;
@end
@interface NSNumber (DateFormatterAdditions)
- (NSDate *)dateValue;
- (NSDate *)overZeroDateValue;
@end
@interface NSString (DateFormatterAdditions)
- (NSTimeInterval)timeStamp;
- (NSDate *)dateValue;
- (NSDate *)overZeroDateValue;
@end
//
// NSDate+FormatterAdditions.m
// JobTalk
//
// Created by Xummer on 14-5-16.
// Copyright (c) 2014年 BST. All rights reserved.
//
#import "NSDate+FormatterAdditions.h"
#include <time.h>
#include <xlocale.h>
#define JTLocalizedString(key) [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]
#define ISO8601_MAX_LEN 25
@implementation NSDate (FormatterAdditions)
+ (NSDate *)dateFromISO8601String:(NSString *)iso8601 {
if (!iso8601) {
return nil;
}
const char *str = [iso8601 cStringUsingEncoding:NSUTF8StringEncoding];
char newStr[ISO8601_MAX_LEN];
bzero(newStr, ISO8601_MAX_LEN);
size_t len = strlen(str);
if (len == 0) {
return nil;
}
// UTC dates ending with Z
if (len == 20 && str[len - 1] == 'Z') {
memcpy(newStr, str, len - 1);
strncpy(newStr + len - 1, "+0000\0", 6);
}
// Timezone includes a semicolon (not supported by strptime)
else if (len == 25 && str[22] == ':') {
memcpy(newStr, str, 22);
memcpy(newStr + 22, str + 23, 2);
}
// Fallback: date was already well-formatted OR any other case (bad-formatted)
else {
memcpy(newStr, str, len > ISO8601_MAX_LEN - 1 ? ISO8601_MAX_LEN - 1 : len);
}
// Add null terminator
newStr[sizeof(newStr) - 1] = 0;
struct tm tm = {
.tm_sec = 0,
.tm_min = 0,
.tm_hour = 0,
.tm_mday = 0,
.tm_mon = 0,
.tm_year = 0,
.tm_wday = 0,
.tm_yday = 0,
.tm_isdst = -1,
};
if (strptime_l(newStr, "%FT%T%z", &tm, NULL) == NULL) {
return nil;
}
return [NSDate dateWithTimeIntervalSince1970:mktime(&tm)];
}
- (NSString *)ISO8601String {
struct tm *timeinfo;
char buffer[80];
time_t rawtime = (time_t)[self timeIntervalSince1970];
timeinfo = gmtime(&rawtime);
strftime(buffer, 80, "%Y-%m-%dT%H:%M:%SZ", timeinfo);
return [NSString stringWithCString:buffer encoding:NSUTF8StringEncoding];
}
+ (NSString *)stringWithFormatter:(NSString *)dateFormatter andDate:(NSDate *)date {
if ([dateFormatter length] == 0) {
return nil;
}
struct tm *timeinfo;
char buffer[80];
time_t rawtime = (time_t)[date timeIntervalSince1970];
timeinfo = gmtime(&rawtime);
strftime(buffer, 80, [dateFormatter UTF8String], timeinfo);
return [NSString stringWithCString:buffer encoding:NSUTF8StringEncoding];
}
- (NSString *)stringWithFormatter:(NSString *)dateFormatter {
if ([dateFormatter length] == 0) {
return nil;
}
// Change to Local time zone
NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate:self];
NSDate *localDate = [self dateByAddingTimeInterval: interval];
return [[self class] stringWithFormatter:dateFormatter andDate:localDate];
}
- (NSString *)chatAttachmentFormatterString {
NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate:self];
NSDate *localDate = [self dateByAddingTimeInterval: interval];
NSString *dateFormatter = @"%m/%d/%Y %H:%M:%S";
return [[self class] stringWithFormatter:dateFormatter andDate:localDate];
}
- (NSString *)YMDHMSFormatterString {
NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate:self];
NSDate *localDate = [self dateByAddingTimeInterval: interval];
NSString *dateFormatter = @"%Y%m%d%H%M%S";
return [[self class] stringWithFormatter:dateFormatter andDate:localDate];
}
- (NSString *)chatMsgFormatterString {
NSTimeZone *zone = [NSTimeZone systemTimeZone];
NSInteger interval = [zone secondsFromGMTForDate:self];
NSDate *localDate = [self dateByAddingTimeInterval: interval];
NSDate *tmpDate = [NSDate date];
interval = [zone secondsFromGMTForDate:tmpDate];
NSDate *localCurDate = [tmpDate dateByAddingTimeInterval: interval];
NSString *dateFormatter = @"%Y-%m-%d-%H-%M-%S";
NSString *dateStr = [[self class] stringWithFormatter:dateFormatter andDate:localDate];
NSString *currentDateStr = [[self class] stringWithFormatter:dateFormatter andDate:localCurDate];
NSArray *dateComponents = [dateStr componentsSeparatedByString:@"-"];
NSArray *currentDateComponents = [currentDateStr componentsSeparatedByString:@"-"];
// Year
if (![dateComponents[ 0 ] isEqualToString:currentDateComponents[ 0 ]]) {
dateFormatter = @"%Y-%m";
}
// Month
else if (![dateComponents[ 1 ] isEqualToString:currentDateComponents[ 1 ]]) {
dateFormatter = @"%m-%d";
}
// Day
else if (![dateComponents[ 2 ] isEqualToString:currentDateComponents[ 2 ]]) {
dateFormatter = @"%m-%d";
}
// Min
else if (![dateComponents[ 3 ] isEqualToString:currentDateComponents[ 3 ]]) {
dateFormatter = @"%H:%M";
}
// Sec
else {
dateFormatter = @"%H:%M";
}
return [[self class] stringWithFormatter:dateFormatter andDate:localDate];
}
- (NSString *)briefTimeInWords {
NSTimeInterval seconds = fabs([self timeIntervalSinceNow]);
static NSNumberFormatter *numberFormatter = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
numberFormatter = [[NSNumberFormatter alloc] init];
numberFormatter.numberStyle = NSNumberFormatterCurrencyStyle;
numberFormatter.currencySymbol = @"";
numberFormatter.maximumFractionDigits = 0;
});
// Seconds
if (seconds < 60.0) {
if (seconds < 2.0) {
return JTLocalizedString(@"1s");
}
return [NSString stringWithFormat:JTLocalizedString(@"%ds"), (NSInteger)seconds];
}
NSTimeInterval minutes = round(seconds / 60.0);
// Minutes
if (minutes >= 0.0 && minutes < 60.0) {
if (minutes < 2.0) {
return JTLocalizedString(@"1m");
}
return [NSString stringWithFormat:JTLocalizedString(@"%dm"), (NSInteger)minutes];
}
// Hours
else if (minutes >= 60.0 && minutes < 1440.0) {
NSInteger hours = (NSInteger)round(minutes / 60.0);
if (hours < 2) {
return JTLocalizedString(@"1h");
}
return [NSString stringWithFormat:JTLocalizedString(@"%dh"), hours];
}
// Days
else if (minutes >= 1440.0 && minutes < 525600.0) {
NSInteger days = (NSInteger)round(minutes / 1440.0);
if (days < 2) {
return JTLocalizedString(@"1d");
}
return [NSString stringWithFormat:JTLocalizedString(@"%@d"),
[numberFormatter stringFromNumber:[NSNumber numberWithInteger:days]]];
}
// Years
else if (minutes >= 525600.0) {
NSInteger years = (NSInteger)round(minutes / 525600.0);
if (years < 2) {
return JTLocalizedString(@"1y");
}
return [NSString stringWithFormat:JTLocalizedString(@"%@y"),
[numberFormatter stringFromNumber:[NSNumber numberWithInteger:years]]];
}
return nil;
}
- (NSString *)localYMDString {
return [self stringWithFormatter:@"%Y-%m-%d"];
}
- (NSString *)briefTimeForTimeLine {
NSTimeInterval seconds = fabs([self timeIntervalSinceNow]);
static NSNumberFormatter *numberFormatter = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
numberFormatter = [[NSNumberFormatter alloc] init];
numberFormatter.numberStyle = NSNumberFormatterCurrencyStyle;
numberFormatter.currencySymbol = @"";
numberFormatter.maximumFractionDigits = 0;
});
NSTimeInterval minutes = round(seconds / 60.0);
// Minutes
if (minutes >= 0.0 && minutes < 60.0) {
if (minutes < 2.0) {
return JTLocalizedString(@"1m");
}
return [NSString stringWithFormat:JTLocalizedString(@"%dm"), (NSInteger)minutes];
}
// Hours
else if (minutes >= 60.0 && minutes < 1440.0) {
NSInteger hours = (NSInteger)round(minutes / 60.0);
if (hours < 2) {
return JTLocalizedString(@"1h");
}
return [NSString stringWithFormat:JTLocalizedString(@"%dh"), hours];
}
// in 7 Days
else if (minutes >= 1440.0 && minutes < 10080.0) {
NSInteger days = (NSInteger)round(minutes / 1440.0);
if (days < 2) {
return JTLocalizedString(@"1d");
}
return [NSString stringWithFormat:JTLocalizedString(@"%@d"),
[numberFormatter stringFromNumber:[NSNumber numberWithInteger:days]]];
}
// > 7 Days
else if (minutes >= 10080.0) {
return [self stringWithFormatter:@"%m/%d/%Y"];
}
return nil;
}
- (NSString *)httpParameterString {
return [self stringWithFormatter:@"%Y-%m-%d %H:%M:%S"];
}
- (NSString *)yearMonthDayString {
return [self stringWithFormatter:@"%Y-%m-%d"];
}
- (NSString *)mobileIDDateString {
return [self stringWithFormatter:@"%y%m%d%H%M%S000"];
}
- (NSDate *)endOfTheDay {
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
NSUInteger preservedComponents = (NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit);
NSDateComponents *comp = [calendar components:preservedComponents fromDate:self];
[comp setMinute:59];
[comp setHour:23];
return [calendar dateFromComponents:comp];
}
+ (NSString *)timeInWordsFromTimeInterval:(NSTimeInterval)intervalInSeconds includingSeconds:(BOOL)includeSeconds {
NSTimeInterval intervalInMinutes = round(intervalInSeconds / 60.0f);
if (intervalInMinutes >= 0 && intervalInMinutes <= 1) {
if (!includeSeconds) {
return intervalInMinutes <= 0 ? JTLocalizedString(@"less than a minute") : JTLocalizedString(@"1 minute");
}
if (intervalInSeconds >= 0 && intervalInSeconds < 5) {
return [NSString stringWithFormat:JTLocalizedString(@"less than %d seconds"), 5];
} else if (intervalInSeconds >= 5 && intervalInSeconds < 10) {
return [NSString stringWithFormat:JTLocalizedString(@"less than %d seconds"), 10];
} else if (intervalInSeconds >= 10 && intervalInSeconds < 20) {
return [NSString stringWithFormat:@"%d seconds", 20];
} else if (intervalInSeconds >= 20 && intervalInSeconds < 40) {
return JTLocalizedString(@"half a minute");
} else if (intervalInSeconds >= 40 && intervalInSeconds < 60) {
return JTLocalizedString(@"less than a minute");
} else {
return JTLocalizedString(@"1 minute");
}
} else if (intervalInMinutes >= 2 && intervalInMinutes <= 44) {
return [NSString stringWithFormat:JTLocalizedString(@"%d minutes"), (NSInteger)intervalInMinutes];
} else if (intervalInMinutes >= 45 && intervalInMinutes <= 89) {
return JTLocalizedString(@"about 1 hour");
} else if (intervalInMinutes >= 90 && intervalInMinutes <= 1439) {
return [NSString stringWithFormat:JTLocalizedString(@"about %d hours"), (NSInteger)round(intervalInMinutes / 60.0f)];
} else if (intervalInMinutes >= 1440 && intervalInMinutes <= 2879) {
return JTLocalizedString(@"1 day");
} else if (intervalInMinutes >= 2880 && intervalInMinutes <= 43199) {
return [NSString stringWithFormat:JTLocalizedString(@"%d days"), (NSInteger)round(intervalInMinutes / 1440.0f)];
} else if (intervalInMinutes >= 43200 && intervalInMinutes <= 86399) {
return JTLocalizedString(@"about 1 month");
} else if (intervalInMinutes >= 86400 && intervalInMinutes <= 525599) {
return [NSString stringWithFormat:JTLocalizedString(@"%d months"), (NSInteger)round(intervalInMinutes / 43200.0f)];
} else if (intervalInMinutes >= 525600 && intervalInMinutes <= 1051199) {
return JTLocalizedString(@"about 1 year");
} else {
return [NSString stringWithFormat:JTLocalizedString(@"over %d years"), (NSInteger)round(intervalInMinutes / 525600.0f)];
}
return nil;
}
- (NSString *)timeInWords {
return [self timeInWordsIncludingSeconds:YES];
}
- (NSString *)timeInWordsIncludingSeconds:(BOOL)includeSeconds {
return [[self class] timeInWordsFromTimeInterval:fabs([self timeIntervalSinceNow]) includingSeconds:includeSeconds];
}
@end
@implementation NSDate (DateFormatterAdditions)
- (NSString *)timeStampStr {
NSTimeInterval curTimeInterval = [self timeIntervalSince1970];
NSString *result = [NSString stringWithFormat:@"%li", (unsigned long)curTimeInterval];
while ([result length] < 13) {
result = [result stringByAppendingString:@"0"];
}
return result;
}
+ (NSString *)curTimeStamp {
return [[NSDate date] timeStampStr];
}
+ (NSString *)httpRequestTimeString {
NSDateFormatter *dateFormater = [[NSDateFormatter alloc] init];
[dateFormater setDateFormat:@"yyyy-MM-dd+HH:mm:ss"];
return [dateFormater stringFromDate:[NSDate date]];
}
@end
@implementation NSDate (DateCalculate)
- (NSDate *)dateAddHourse: (NSUInteger)hourse {
NSTimeInterval curTimeInterval = [self timeIntervalSince1970];
NSTimeInterval totalTimeInterval = curTimeInterval + hourse * 3600;
NSDate *date = [NSDate dateWithTimeIntervalSince1970:totalTimeInterval];
return date;
}
@end
@implementation NSNumber (DateFormatterAdditions)
- (NSDate *)dateValue {
if (self) {
return [NSDate dateWithTimeIntervalSince1970:[self integerValue]];
}
else {
return nil;
}
}
- (NSDate *)overZeroDateValue {
if (self) {
NSInteger iSelf = [self integerValue];
if (iSelf > 0) {
return [NSDate dateWithTimeIntervalSince1970:iSelf];
}
else {
return nil;
}
}
else {
return nil;
}
}
@end
@implementation NSString (DateFormatterAdditions)
- (NSTimeInterval)timeStamp {
if (self.length > 10) {
return [[self substringToIndex:10] integerValue];
}
else {
return [self integerValue];
}
}
- (NSDate *)dateValue {
if (self) {
return [NSDate dateWithTimeIntervalSince1970:[self timeStamp]];
}
else {
return nil;
}
}
- (NSDate *)overZeroDateValue {
if (self) {
NSInteger iSelf = [self timeStamp];
if (iSelf > 0) {
return [NSDate dateWithTimeIntervalSince1970:iSelf];
}
else {
return nil;
}
}
else {
return nil;
}
}
@end
//
// NSDictionary+Category.h
// ALand
//
// Created by Z on 16/3/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDictionary (Category)
/**
* 字典转换为json字符串
*
* @return
*/
- (NSString *)JSONString;
/**
* 删除NULL
*
* @return NSDictionary
*/
- (NSDictionary *)deleteNull;
@end
//
// NSDictionary+Category.m
// ALand
//
// Created by Z on 16/3/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import "NSDictionary+Category.h"
@implementation NSDictionary (Category)
- (NSString *)JSONString {
NSError *parseError = nil;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self options:NSJSONWritingPrettyPrinted error:&parseError];
return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}
- (NSDictionary *)deleteNull{
NSMutableDictionary *mutableDic = [[NSMutableDictionary alloc] init];
for (NSString *keyStr in self.allKeys) {
if ([[self objectForKey:keyStr] isEqual:[NSNull null]] || ![self objectForKey:keyStr]) {
[mutableDic setObject:@"" forKey:keyStr];
}
else{
[mutableDic setObject:[self objectForKey:keyStr] forKey:keyStr];
}
}
return mutableDic;
}
@end
//
// UIImage+Rotate.h
// IphoneMapSdkDemo
//
// Created by wzy on 14-11-14.
// Copyright (c) 2014年 Baidu. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (Rotate)
///设置图片旋转角度
- (UIImage*)imageRotatedByDegrees:(CGFloat)degrees;
@end
//
// UIImage+Rotate.m
// IphoneMapSdkDemo
//
// Created by wzy on 14-11-14.
// Copyright (c) 2014年 Baidu. All rights reserved.
//
#import "UIImage+Rotate.h"
@implementation UIImage (Rotate)
- (UIImage*)imageRotatedByDegrees:(CGFloat)degrees
{
CGFloat width = CGImageGetWidth(self.CGImage);
CGFloat height = CGImageGetHeight(self.CGImage);
CGSize rotatedSize;
rotatedSize.width = width;
rotatedSize.height = height;
UIGraphicsBeginImageContext(rotatedSize);
CGContextRef bitmap = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(bitmap, rotatedSize.width/2, rotatedSize.height/2);
CGContextRotateCTM(bitmap, degrees * M_PI / 180);
CGContextRotateCTM(bitmap, M_PI);
CGContextScaleCTM(bitmap, -1.0, 1.0);
CGContextDrawImage(bitmap, CGRectMake(-rotatedSize.width/2, -rotatedSize.height/2, rotatedSize.width, rotatedSize.height), self.CGImage);
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
@end
//
// UIView+cornerRadius.h
// Lighting
//
// Created by 曹云霄 on 16/8/26.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (cornerRadius)
/**
* 圆角
*/
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius;
@end
//
// UIView+cornerRadius.m
// Lighting
//
// Created by 曹云霄 on 16/8/26.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "UIView+cornerRadius.h"
@implementation UIView (cornerRadius)
- (void)setCornerRadius:(CGFloat)cornerRadius
{
self.layer.cornerRadius = cornerRadius;
}
- (CGFloat)cornerRadius
{
return self.layer.cornerRadius;
}
@end
......@@ -52,6 +52,11 @@
#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self
///**
// * 服务器正式地址
// */
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://122.228.134.82:8180/palmwms-web/app/%@",URL]
/**
* 服务器开发地址
*/
......@@ -80,7 +85,7 @@
/**
百度地图KEY
*/
#define BAIDUMAPKEY @"jcdvG3LHQF9NQ2wTncWibQKv6w7zsD70"
#define BAIDUMAPKEY @"qwaIDu5SBOWbjeDKeG46V2ax9nWWrglr"
/**
保存账号密码serviceName
......
......@@ -25,6 +25,9 @@
#import "BaseViewController.h"
#import "SSKeychain.h"
#import "SSKeychainQuery.h"
#import "NSDate+FormatterAdditions.h"
#import "UIView+Corners.h"
#import "UIView+cornerRadius.h"
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
......
......@@ -33,4 +33,43 @@
#define UPLOADVERSION @"uploadVersion"
/**
* 查询配送单
*/
#define QUERYORDERBILL @"busbill/query"
/**
* 查询配送单详情
*/
#define ORDERDETAILS @"busbill/getByBillnumber?billNumber="
/**
* 查询仓库
*/
#define QUERYDEPOT @"depot/getByCode?code="
/**
* 更新送货单详情店铺状态
*/
#define ORDERDETAILSSTATE @"busbillDtl/updateState?id=%@&state=%@"
/**
* 上传店铺坐标
*/
#define UPLOADLOCATION @"customer/saveCoordinate"
/**
* 更新送货单状态
*/
#define REFRESHORDERSTATE @"busbill/updateState?billNumber=%@&state=%@"
#endif /* urlInformation_h */
......@@ -7,6 +7,8 @@
//
#import <Foundation/Foundation.h>
#import "BMKGeocodeType.h"
@class newData,newDriver;
@interface UserInforMation : NSObject
......@@ -44,6 +46,27 @@
*/
@property (nonatomic,assign) double longitude;
/**
* 仓库纬度
*/
@property (nonatomic,assign) double depotLatitude;
/**
* 仓库经度
*/
@property (nonatomic,assign) double depotLongitude;
/**
* 司机位置信息层次
*/
@property (nonatomic,strong) BMKAddressComponent *driverAddress;
/**
* 司机位置全称
*/
@property (nonatomic,copy) NSString *address;
@end
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