Commit edb8a475 authored by Sandy's avatar Sandy

增加查看物流界面

parent b9460043
...@@ -333,6 +333,10 @@ ...@@ -333,6 +333,10 @@
8F59F0241D6D725500C9A564 /* NoPaymentTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F59F0231D6D725500C9A564 /* NoPaymentTableViewController.m */; }; 8F59F0241D6D725500C9A564 /* NoPaymentTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F59F0231D6D725500C9A564 /* NoPaymentTableViewController.m */; };
8F8D99431D6706E50080ECC1 /* PayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8F8D99421D6706E50080ECC1 /* PayView.xib */; }; 8F8D99431D6706E50080ECC1 /* PayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8F8D99421D6706E50080ECC1 /* PayView.xib */; };
8F8D994B1D670F3B0080ECC1 /* PayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F8D994A1D670F3B0080ECC1 /* PayView.m */; }; 8F8D994B1D670F3B0080ECC1 /* PayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F8D994A1D670F3B0080ECC1 /* PayView.m */; };
8FAA08361D72F30700CCA46D /* LogisticsItemsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FAA08351D72F30700CCA46D /* LogisticsItemsModel.m */; };
8FAA083A1D73CDD800CCA46D /* HomeZ.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8FAA08391D73CDD800CCA46D /* HomeZ.storyboard */; };
8FAA083D1D73D54C00CCA46D /* LogisticsTimeLineTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FAA083C1D73D54C00CCA46D /* LogisticsTimeLineTableViewCell.m */; };
8FAA08401D73D81200CCA46D /* LogisticsLineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FAA083F1D73D81200CCA46D /* LogisticsLineViewController.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
...@@ -957,6 +961,13 @@ ...@@ -957,6 +961,13 @@
8F8D99421D6706E50080ECC1 /* PayView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PayView.xib; sourceTree = "<group>"; }; 8F8D99421D6706E50080ECC1 /* PayView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PayView.xib; sourceTree = "<group>"; };
8F8D99491D670F3B0080ECC1 /* PayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PayView.h; sourceTree = "<group>"; }; 8F8D99491D670F3B0080ECC1 /* PayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PayView.h; sourceTree = "<group>"; };
8F8D994A1D670F3B0080ECC1 /* PayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PayView.m; sourceTree = "<group>"; }; 8F8D994A1D670F3B0080ECC1 /* PayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PayView.m; sourceTree = "<group>"; };
8FAA08341D72F30700CCA46D /* LogisticsItemsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogisticsItemsModel.h; sourceTree = "<group>"; };
8FAA08351D72F30700CCA46D /* LogisticsItemsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogisticsItemsModel.m; sourceTree = "<group>"; };
8FAA08391D73CDD800CCA46D /* HomeZ.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = HomeZ.storyboard; sourceTree = "<group>"; };
8FAA083B1D73D54C00CCA46D /* LogisticsTimeLineTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogisticsTimeLineTableViewCell.h; sourceTree = "<group>"; };
8FAA083C1D73D54C00CCA46D /* LogisticsTimeLineTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogisticsTimeLineTableViewCell.m; sourceTree = "<group>"; };
8FAA083E1D73D81200CCA46D /* LogisticsLineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogisticsLineViewController.h; sourceTree = "<group>"; };
8FAA083F1D73D81200CCA46D /* LogisticsLineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LogisticsLineViewController.m; sourceTree = "<group>"; };
AAF51B5D53AE9938C03065C3 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; }; AAF51B5D53AE9938C03065C3 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
C86730AE81FB01EAF9005535 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; }; C86730AE81FB01EAF9005535 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
F32A640135BB4E1F47CB0E21 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; F32A640135BB4E1F47CB0E21 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -1031,6 +1042,8 @@ ...@@ -1031,6 +1042,8 @@
1900A3461CB6305100B2B7C4 /* Order */ = { 1900A3461CB6305100B2B7C4 /* Order */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8FAA08341D72F30700CCA46D /* LogisticsItemsModel.h */,
8FAA08351D72F30700CCA46D /* LogisticsItemsModel.m */,
190A46781CE064FE006037CB /* JavenOrderModel.h */, 190A46781CE064FE006037CB /* JavenOrderModel.h */,
190A46791CE064FE006037CB /* JavenOrderModel.m */, 190A46791CE064FE006037CB /* JavenOrderModel.m */,
); );
...@@ -1083,6 +1096,8 @@ ...@@ -1083,6 +1096,8 @@
199B4D8A1CAE688400451E0E /* SeeLogistics.h */, 199B4D8A1CAE688400451E0E /* SeeLogistics.h */,
199B4D8B1CAE688400451E0E /* SeeLogistics.m */, 199B4D8B1CAE688400451E0E /* SeeLogistics.m */,
199B4D881CAE67C600451E0E /* SeeLogistics.xib */, 199B4D881CAE67C600451E0E /* SeeLogistics.xib */,
8FAA083B1D73D54C00CCA46D /* LogisticsTimeLineTableViewCell.h */,
8FAA083C1D73D54C00CCA46D /* LogisticsTimeLineTableViewCell.m */,
); );
path = Order; path = Order;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1503,6 +1518,8 @@ ...@@ -1503,6 +1518,8 @@
199B4D671CABBCF600451E0E /* OrderDetailViewController.m */, 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */,
8F1E2CE21D7042A5002CCC76 /* OrderWebViewController.h */, 8F1E2CE21D7042A5002CCC76 /* OrderWebViewController.h */,
8F1E2CE31D7042A5002CCC76 /* OrderWebViewController.m */, 8F1E2CE31D7042A5002CCC76 /* OrderWebViewController.m */,
8FAA083E1D73D81200CCA46D /* LogisticsLineViewController.h */,
8FAA083F1D73D81200CCA46D /* LogisticsLineViewController.m */,
); );
name = "Order(订单)"; name = "Order(订单)";
path = Order; path = Order;
...@@ -1948,6 +1965,7 @@ ...@@ -1948,6 +1965,7 @@
19ADD36B1CA3B88A00EE6E5A /* Commodity(添加商品) */, 19ADD36B1CA3B88A00EE6E5A /* Commodity(添加商品) */,
1979752B1CA90D3900407E3F /* CommodityManagement(商品管理) */, 1979752B1CA90D3900407E3F /* CommodityManagement(商品管理) */,
1952C2F51CEDB6730017E4D6 /* Home */, 1952C2F51CEDB6730017E4D6 /* Home */,
8FAA08391D73CDD800CCA46D /* HomeZ.storyboard */,
); );
path = ViewController; path = ViewController;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2407,6 +2425,7 @@ ...@@ -2407,6 +2425,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
19632DA51CB350F80024A8A1 /* StoreQRCodeViewController.xib in Resources */, 19632DA51CB350F80024A8A1 /* StoreQRCodeViewController.xib in Resources */,
8FAA083A1D73CDD800CCA46D /* HomeZ.storyboard in Resources */,
8F8D99431D6706E50080ECC1 /* PayView.xib in Resources */, 8F8D99431D6706E50080ECC1 /* PayView.xib in Resources */,
199B4D871CAE43F800451E0E /* OrderDetailTableViewCell.xib in Resources */, 199B4D871CAE43F800451E0E /* OrderDetailTableViewCell.xib in Resources */,
19ADD3871CA4E21100EE6E5A /* AddCommodityHeaderView.xib in Resources */, 19ADD3871CA4E21100EE6E5A /* AddCommodityHeaderView.xib in Resources */,
...@@ -2611,6 +2630,7 @@ ...@@ -2611,6 +2630,7 @@
1929F1811CA0E597000E9B26 /* UIView+Category.m in Sources */, 1929F1811CA0E597000E9B26 /* UIView+Category.m in Sources */,
19DCCB631C9A9EB30072C3BF /* IBTTableViewSectionInfo.m in Sources */, 19DCCB631C9A9EB30072C3BF /* IBTTableViewSectionInfo.m in Sources */,
19DCCB5D1C9A9EB30072C3BF /* IBTImagePicker.m in Sources */, 19DCCB5D1C9A9EB30072C3BF /* IBTImagePicker.m in Sources */,
8FAA083D1D73D54C00CCA46D /* LogisticsTimeLineTableViewCell.m in Sources */,
19D906B61CC86DA300CD42DC /* SettingViewController.m in Sources */, 19D906B61CC86DA300CD42DC /* SettingViewController.m in Sources */,
194FB0491CE2CAAF0089A3D5 /* MyAcountHelfViewController.m in Sources */, 194FB0491CE2CAAF0089A3D5 /* MyAcountHelfViewController.m in Sources */,
19DCCBCB1C9AA0450072C3BF /* UIApplication+CheckFirstRun.m in Sources */, 19DCCBCB1C9AA0450072C3BF /* UIApplication+CheckFirstRun.m in Sources */,
...@@ -2694,6 +2714,7 @@ ...@@ -2694,6 +2714,7 @@
19DCCBD31C9AA0450072C3BF /* UIScrollView+Content.m in Sources */, 19DCCBD31C9AA0450072C3BF /* UIScrollView+Content.m in Sources */,
197975271CA8FAE500407E3F /* CommodityDetailTopView.m in Sources */, 197975271CA8FAE500407E3F /* CommodityDetailTopView.m in Sources */,
197975221CA8DA8200407E3F /* CommodityDetailViewController.m in Sources */, 197975221CA8DA8200407E3F /* CommodityDetailViewController.m in Sources */,
8FAA08361D72F30700CCA46D /* LogisticsItemsModel.m in Sources */,
192118F61D41CE80000A56EA /* UserInfoAppConfig.m in Sources */, 192118F61D41CE80000A56EA /* UserInfoAppConfig.m in Sources */,
19DCCB771C9A9EB30072C3BF /* IBTUIViewController.m in Sources */, 19DCCB771C9A9EB30072C3BF /* IBTUIViewController.m in Sources */,
191AEE5C1CBCC6D100F5E535 /* addCommodityRequestModel.m in Sources */, 191AEE5C1CBCC6D100F5E535 /* addCommodityRequestModel.m in Sources */,
...@@ -2768,6 +2789,7 @@ ...@@ -2768,6 +2789,7 @@
194FB0D31CE2FA370089A3D5 /* JavenResellerBigModel.m in Sources */, 194FB0D31CE2FA370089A3D5 /* JavenResellerBigModel.m in Sources */,
1900A33C1CB602D500B2B7C4 /* StoreNameViewController.m in Sources */, 1900A33C1CB602D500B2B7C4 /* StoreNameViewController.m in Sources */,
196944DC1CEC4E6C0036E574 /* NoBillHistoryView.m in Sources */, 196944DC1CEC4E6C0036E574 /* NoBillHistoryView.m in Sources */,
8FAA08401D73D81200CCA46D /* LogisticsLineViewController.m in Sources */,
19DCCBCD1C9AA0450072C3BF /* UIFont+Custom.m in Sources */, 19DCCBCD1C9AA0450072C3BF /* UIFont+Custom.m in Sources */,
19DCCBE41C9AA0450072C3BF /* ICRFunctionEntity.m in Sources */, 19DCCBE41C9AA0450072C3BF /* ICRFunctionEntity.m in Sources */,
1929401F1CC8DA5B00E377EE /* InvitePartnerViewController.m in Sources */, 1929401F1CC8DA5B00E377EE /* InvitePartnerViewController.m in Sources */,
......
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "img_time_logo_gray.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "img_time_logo_gray@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "img_time_logo_red.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "img_time_logo_red@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "yto.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--View Controller--> <!--View Controller-->
......
//
// LogisticsItemsModel.h
//
// Created by 杰 张 on 16/8/28
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface LogisticsItemsModel : NSObject <NSCoding, NSCopying>
@property (nonatomic, copy) NSString *operTime;
@property (nonatomic, copy) NSString *internalBaseClassDescription;
@property (nonatomic, copy) NSString *operType;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// LogisticsItemsModel.m
//
// Created by 杰 张 on 16/8/28
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "LogisticsItemsModel.h"
NSString *const kLogisticsItemsModelOperTime = @"operTime";
NSString *const kLogisticsItemsModelDescription = @"description";
NSString *const kLogisticsItemsModelOperType = @"operType";
@interface LogisticsItemsModel ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation LogisticsItemsModel
@synthesize operTime = _operTime;
@synthesize internalBaseClassDescription = _internalBaseClassDescription;
@synthesize operType = _operType;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict
{
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.operTime = [self objectOrNilForKey:kLogisticsItemsModelOperTime fromDictionary:dict];
self.internalBaseClassDescription = [self objectOrNilForKey:kLogisticsItemsModelDescription fromDictionary:dict];
self.operType = [self objectOrNilForKey:kLogisticsItemsModelOperType fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.operTime forKey:kLogisticsItemsModelOperTime];
[mutableDict setValue:self.internalBaseClassDescription forKey:kLogisticsItemsModelDescription];
[mutableDict setValue:self.operType forKey:kLogisticsItemsModelOperType];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
self.operTime = [aDecoder decodeObjectForKey:kLogisticsItemsModelOperTime];
self.internalBaseClassDescription = [aDecoder decodeObjectForKey:kLogisticsItemsModelDescription];
self.operType = [aDecoder decodeObjectForKey:kLogisticsItemsModelOperType];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_operTime forKey:kLogisticsItemsModelOperTime];
[aCoder encodeObject:_internalBaseClassDescription forKey:kLogisticsItemsModelDescription];
[aCoder encodeObject:_operType forKey:kLogisticsItemsModelOperType];
}
- (id)copyWithZone:(NSZone *)zone
{
LogisticsItemsModel *copy = [[LogisticsItemsModel alloc] init];
if (copy) {
copy.operTime = [self.operTime copyWithZone:zone];
copy.internalBaseClassDescription = [self.internalBaseClassDescription copyWithZone:zone];
copy.operType = [self.operType copyWithZone:zone];
}
return copy;
}
@end
//
// LogisticsTimeLineTableViewCell.h
// ALand
//
// Created by Javen on 16/8/29.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, LogisticsLineType) {
LogisticsLineTypeTop,
LogisticsLineTypeCenter,
LogisticsLineTypeBottom
};
@interface LogisticsTimeLineTableViewCell : UITableViewCell
@property (nonatomic, assign) LogisticsLineType type;
- (void)configCellWithArr:(id)array index:(NSIndexPath *)indexPath;
@end
//
// LogisticsTimeLineTableViewCell.m
// ALand
//
// Created by Javen on 16/8/29.
// Copyright © 2016年 Z. All rights reserved.
//
#import "LogisticsTimeLineTableViewCell.h"
#import "LogisticsItemsModel.h"
@interface LogisticsTimeLineTableViewCell ()
/** 上面的灰线 */
@property (weak, nonatomic) IBOutlet UIView *upLIne;
/** 下面的灰线 */
@property (weak, nonatomic) IBOutlet UIView *downLine;
/** 时间 */
@property (weak, nonatomic) IBOutlet UILabel *time;
/** 物流信息 */
@property (weak, nonatomic) IBOutlet UILabel *LogisticsInfo;
/** 小闹钟图标 */
@property (weak, nonatomic) IBOutlet UIImageView *imgClock;
@end
@implementation LogisticsTimeLineTableViewCell
- (void)awakeFromNib {
// Initialization code
}
- (void)configCellWithArr:(id)array index:(NSIndexPath *)indexPath {
LogisticsItemsModel *model = array[indexPath.row];
self.time.text = SAFE_STRING(model.operTime);
self.LogisticsInfo.text = model.internalBaseClassDescription;
if (indexPath.row == 0) {
self.type = LogisticsLineTypeTop;
}else if (indexPath.row + 1 == [array count]){
self.type = LogisticsLineTypeBottom;
}else{
self.type = LogisticsLineTypeCenter;
}
}
/**
* 根据类型设置cell的样式
*
* @param type 类型
*/
- (void)setType:(LogisticsLineType)type {
switch (type) {
case LogisticsLineTypeTop: {
self.upLIne.hidden = YES;
self.imgClock.highlighted = NO;
self.downLine.hidden = NO;
self.time.textColor = kCustomGreenColor;
self.LogisticsInfo.textColor = kCustomGreenColor;
break;
}
case LogisticsLineTypeCenter: {
self.upLIne.hidden = NO;
self.imgClock.highlighted = YES;
self.downLine.hidden = NO;
self.time.textColor = [UIColor grayColor];
self.LogisticsInfo.textColor = [UIColor grayColor];
break;
}
case LogisticsLineTypeBottom: {
self.upLIne.hidden = NO;
self.imgClock.highlighted = YES;
self.downLine.hidden = YES;
self.time.textColor = [UIColor grayColor];
self.LogisticsInfo.textColor = [UIColor grayColor];
break;
}
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "MBLabelWithFontAdapter.h" #import "MBLabelWithFontAdapter.h"
#import "JavenOrderModel.h" #import "JavenOrderModel.h"
@interface OrderDetailTopView : UIView @interface OrderDetailTopView : UIView
@property (nonatomic, strong) NSString *orderType; @property (nonatomic, strong) NSString *orderType;
@property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelExpress; @property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelExpress;
...@@ -19,6 +18,11 @@ ...@@ -19,6 +18,11 @@
@property (weak, nonatomic) IBOutlet UILabel *labelPhoneNumber; @property (weak, nonatomic) IBOutlet UILabel *labelPhoneNumber;
@property (weak, nonatomic) IBOutlet UILabel *labelAddress; @property (weak, nonatomic) IBOutlet UILabel *labelAddress;
@property (weak, nonatomic) IBOutlet UIView *bottomView; @property (weak, nonatomic) IBOutlet UIView *bottomView;
@property (strong , nonatomic) NSMutableArray *arrData;
@property (nonatomic, strong) NSString *shipType;
@property (nonatomic, copy) NSString *shipTrackingNumber;
@property (nonatomic, copy) void(^tapBlcok)(void);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import "OrderDetailTopView.h" #import "OrderDetailTopView.h"
#import "LogisticsItemsModel.h"
@interface OrderDetailTopView () @interface OrderDetailTopView ()
@property (weak, nonatomic) IBOutlet UIView *viewExpress; @property (weak, nonatomic) IBOutlet UIView *viewExpress;
@property (weak, nonatomic) IBOutlet UIImageView *imgIcon; @property (weak, nonatomic) IBOutlet UIImageView *imgIcon;
...@@ -17,17 +17,14 @@ ...@@ -17,17 +17,14 @@
@implementation OrderDetailTopView @implementation OrderDetailTopView
- (void)awakeFromNib { - (void)awakeFromNib {
} }
- (void)updateByOrderType { - (void)updateByOrderType {
if ([self.orderType isEqualToString: @"配送中"] || [self.orderType isEqualToString:@"待发货"]) {
if ([self.orderType isEqualToString: @"配送中"] || [self.orderType isEqualToString:@""]) { CLog(@"待发货");
}else{ }else{
[self.viewExpress removeFromSuperview]; [self.viewExpress removeFromSuperview];
} }
} }
- (void)updateHeight { - (void)updateHeight {
...@@ -49,7 +46,16 @@ ...@@ -49,7 +46,16 @@
WS(weakSelf) WS(weakSelf)
[[HTTPCilent shareCilent] GET:[NSString stringWithFormat:@"order/getLogistics/%@", model.uuid] parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) { [[HTTPCilent shareCilent] GET:[NSString stringWithFormat:@"order/getLogistics/%@", model.uuid] parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
if (kIsResponseSuccess(responseObject)) { if (kIsResponseSuccess(responseObject)) {
weakSelf.labelExpress.text = responseObject[@"logistics"]; NSArray *items = responseObject[@"logistics"][@"items"];
weakSelf.shipType = responseObject[@"logistics"][@"yto"];
weakSelf.shipTrackingNumber = responseObject[@"logistics"][@"shipTrackingNumber"];
weakSelf.arrData = [NSMutableArray array];
for (NSDictionary *dic in items) {
LogisticsItemsModel *model = [LogisticsItemsModel modelObjectWithDictionary:dic];
[weakSelf.arrData insertObject:model atIndex:0];
}
LogisticsItemsModel *model = [weakSelf.arrData firstObject];
weakSelf.labelExpress.text = model.internalBaseClassDescription;
} }
} failure:^(NSURLSessionDataTask *task, NSError *error) { } failure:^(NSURLSessionDataTask *task, NSError *error) {
...@@ -60,6 +66,9 @@ ...@@ -60,6 +66,9 @@
- (void)getLogistics { - (void)getLogistics {
} }
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
self.tapBlcok();
}
- (IBAction)actionCall:(id)sender { - (IBAction)actionCall:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", self.labelPhoneNumber.text]]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", self.labelPhoneNumber.text]]];
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/> <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<rect key="frame" x="0.0" y="0.0" width="345" height="200"/> <rect key="frame" x="0.0" y="0.0" width="345" height="200"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VUy-Fo-j9I" id="9AG-22-NSU"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VUy-Fo-j9I" id="9AG-22-NSU">
<rect key="frame" x="0.0" y="0.0" width="345" height="199"/> <rect key="frame" x="0.0" y="0.0" width="345" height="199.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="买家:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Q9-Yb-5Zd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="买家:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Q9-Yb-5Zd">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<color key="textColor" red="0.63360416669999997" green="0.63360416669999997" blue="0.63360416669999997" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.63360416669999997" green="0.63360416669999997" blue="0.63360416669999997" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="14H-w4-6eU"> <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="14H-w4-6eU">
<rect key="frame" x="8" y="74" width="329" height="1"/> <rect key="frame" x="8" y="74" width="329" height="1"/>
<color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints> <constraints>
...@@ -62,13 +62,13 @@ ...@@ -62,13 +62,13 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NKY-p0-eZH"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NKY-p0-eZH">
<rect key="frame" x="0.0" y="100" width="345" height="44"/> <rect key="frame" x="0.0" y="100" width="345" height="44"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="应付:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NSP-00-fgb"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="应付:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NSP-00-fgb">
<rect key="frame" x="119" y="15" width="39" height="21"/> <rect key="frame" x="119" y="15" width="39" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.50823958329999996" green="0.50823958329999996" blue="0.50823958329999996" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.50823958329999996" green="0.50823958329999996" blue="0.50823958329999996" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥837" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Ga-eZ-C09"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="¥837" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Ga-eZ-C09">
<rect key="frame" x="166" y="15" width="48" height="21"/> <rect key="frame" x="166" y="15" width="48" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies> </dependencies>
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
......
This diff is collapsed.
//
// LogisticsLineViewController.h
// ALand
//
// Created by Javen on 16/8/29.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LogisticsLineViewController : IBTUIViewController
@property (nonatomic, strong) NSArray *arrData;
@property (nonatomic, strong) NSString *shipType;
@property (nonatomic, copy) NSString *shipTrackingNumber;
@end
//
// LogisticsLineViewController.m
// ALand
//
// Created by Javen on 16/8/29.
// Copyright © 2016年 Z. All rights reserved.
//
#import "LogisticsLineViewController.h"
#import "LogisticsTimeLineTableViewCell.h"
@interface LogisticsLineViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
/** 物流图标 */
@property (weak, nonatomic) IBOutlet UIImageView *logisticIcon;
/** 物流名称 */
@property (weak, nonatomic) IBOutlet UILabel *logisticsName;
/** 物流单号 */
@property (weak, nonatomic) IBOutlet UILabel *logisticsNumber;
@end
@implementation LogisticsLineViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"物流详情";
self.logisticsNumber.text = [NSString stringWithFormat:@"运单号:%@",self.shipTrackingNumber];
self.tableView.estimatedRowHeight = 50;
self.tableView.rowHeight = UITableViewAutomaticDimension;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.arrData.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
LogisticsTimeLineTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LogisticsTimeLineTableViewCell" forIndexPath:indexPath];
[cell configCellWithArr:self.arrData index:indexPath];
return cell;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#import "WebViewController.h" #import "WebViewController.h"
#import "OrderWebViewController.h" #import "OrderWebViewController.h"
#define kCellId @"OrderDetailTableViewCell.h" #define kCellId @"OrderDetailTableViewCell.h"
#import "LogisticsLineViewController.h"
@interface OrderDetailViewController ()<UITableViewDelegate, UITableViewDataSource> @interface OrderDetailViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) OrderDetailBottomView *bottomView; @property (nonatomic, strong) OrderDetailBottomView *bottomView;
...@@ -51,6 +52,18 @@ ...@@ -51,6 +52,18 @@
[self.atopView updateByOrderType]; [self.atopView updateByOrderType];
WS(weakSelf);
self.atopView.tapBlcok = ^{
UIStoryboard *board = [UIStoryboard storyboardWithName:@"HomeZ" bundle:nil];
LogisticsLineViewController *lineVC = [board instantiateViewControllerWithIdentifier:@"LogisticsLineViewController"];
lineVC.arrData = weakSelf.atopView.arrData;
lineVC.shipType = weakSelf.atopView.shipType;
lineVC.shipTrackingNumber = weakSelf.atopView.shipTrackingNumber;
lineVC.isShowNavigationBar = YES;
[weakSelf.navigationController pushViewController:lineVC animated:YES];
};
self.bottomView = [OrderDetailBottomView viewWithNibName:@"OrderDetailBottomView"]; self.bottomView = [OrderDetailBottomView viewWithNibName:@"OrderDetailBottomView"];
[self.bottomView viewWithModel:self.model]; [self.bottomView viewWithModel:self.model];
...@@ -116,7 +129,6 @@ ...@@ -116,7 +129,6 @@
JavenGoodsDetails *details = self.model.goodsDetails[indexPath.row]; JavenGoodsDetails *details = self.model.goodsDetails[indexPath.row];
CommodityDetailViewController *detailVC = [[CommodityDetailViewController alloc] init]; CommodityDetailViewController *detailVC = [[CommodityDetailViewController alloc] init];
CommotityListModel *model = [[CommotityListModel alloc] init]; CommotityListModel *model = [[CommotityListModel alloc] init];
model.uuid = details.goods.uuid; model.uuid = details.goods.uuid;
model.name = details.goods.name; model.name = details.goods.name;
...@@ -128,9 +140,6 @@ ...@@ -128,9 +140,6 @@
[self.navigationController pushViewController:detailVC animated:YES]; [self.navigationController pushViewController:detailVC animated:YES];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
......
...@@ -64,11 +64,8 @@ ...@@ -64,11 +64,8 @@
} }
[self addLeftBarBtnItemWithName:_cancelButtonName action:@selector(disMissSelf)]; [self addLeftBarBtnItemWithName:_cancelButtonName action:@selector(disMissSelf)];
} }
[self.navigationController setNavigationBarHidden:!self.isShowNavigationBar animated:YES]; [self.navigationController setNavigationBarHidden:!self.isShowNavigationBar animated:YES];
} }
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
......
...@@ -52,8 +52,7 @@ ...@@ -52,8 +52,7 @@
#define IsArrayObject(Object) [(Object) isKindOfClass:[NSArray class]] #define IsArrayObject(Object) [(Object) isKindOfClass:[NSArray class]]
#define IsDictObject(Object) [(Object) isKindOfClass:[NSDictionary class]] #define IsDictObject(Object) [(Object) isKindOfClass:[NSDictionary class]]
#define IsErrorObject(Object) ![(Object) isKindOfClass:[NSError class]] #define IsErrorObject(Object) ![(Object) isKindOfClass:[NSError class]]
#define SAFE_STRING(string) [string isKindOfClass:[NSString class]] ? string : @""
#define SAFE_STRING(string) string ? string : @""
#define kSysWhite [UIColor whiteColor] #define kSysWhite [UIColor whiteColor]
#define kButtonAddAction(button, buttonAction) [button addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside]; #define kButtonAddAction(button, buttonAction) [button addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside];
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#define UrlHeader_h #define UrlHeader_h
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
//static NSString *const REST_BASE_URL = @"http://139.196.173.244:8080/aland-server/rest"; //正式环境 static NSString *const REST_BASE_URL = @"http://139.196.173.244:8080/aland-server/rest"; //正式环境
static NSString *const REST_BASE_URL = @"http://139.196.195.30:9090/aland-server/rest"; //测试环境 //static NSString *const REST_BASE_URL = @"http://139.196.195.30:9090/aland-server/rest"; //测试环境
static NSString *const kDomain = @"0001"; //组织代码 static NSString *const kDomain = @"0001"; //组织代码
......
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