Commit 6f33c727 authored by freecui's avatar freecui

Merge branch 'DEV_20150805_001' of http://121.42.32.57/root/xffruit into #DEV_20150805_001

parents cb7feb46 ec7d2ca3
......@@ -8,6 +8,6 @@ pod 'SSKeychain', '~> 1.2.3'
pod 'FMDB', '~> 2.5'
pod 'Base64nl', '~> 1.2'
pod 'Reveal-iOS-SDK', '~> 1.5.1'
pod 'BaiduMapAPI', '~> 2.8.1'
pod 'BaiduMapAPI', '~> 2.8.1
pod 'MJRefresh', '~> 2.2.0'
pod 'IQKeyboardManager', '~> 3.2.3'
......@@ -33,11 +33,11 @@ PODS:
- FMDB/common
- IQKeyboardManager (3.2.4)
- MBProgressHUD (0.9.1)
- MJRefresh (2.2.1)
- MJRefresh (2.2.0)
- Reveal-iOS-SDK (1.5.1)
- SDWebImage (3.7.3):
- SDWebImage/Core (= 3.7.3)
- SDWebImage/Core (3.7.3)
- SDWebImage (3.7.2):
- SDWebImage/Core (= 3.7.2)
- SDWebImage/Core (3.7.2)
- SSKeychain (1.2.3)
DEPENDENCIES:
......@@ -59,9 +59,9 @@ SPEC CHECKSUMS:
FMDB: 96e8f1bcc1329e269330f99770ad4285d9003e52
IQKeyboardManager: 555b1231fefafb21b19278d7cca72986a27b748b
MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad
MJRefresh: c3fa0387e8e97a11a9666639d2f815607edd1c2f
MJRefresh: 65a2bf14abb6feeaed8696aa1551f70e15ab0a08
Reveal-iOS-SDK: c9c55cad2729c85f6ced415f1b21857c9a2d8ef9
SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84
SDWebImage: 71b7cdc1d1721d6a82ed62889030225f2c249e29
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
COCOAPODS: 0.39.0
COCOAPODS: 0.38.2
......@@ -146,6 +146,7 @@
72873CEB1BA27BA6007B3387 /* GXFPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CEA1BA27BA6007B3387 /* GXFPopView.m */; };
72873CEE1BA280DD007B3387 /* GXFPopCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CED1BA280DD007B3387 /* GXFPopCell.m */; };
72882D8B1BA9121E00935BA6 /* ChooseProductUnitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72882D8A1BA9121E00935BA6 /* ChooseProductUnitViewController.m */; };
729A2E931BE60C0200493603 /* GeometryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 729A2E921BE60C0200493603 /* GeometryView.m */; settings = {ASSET_TAGS = (); }; };
72A8132D1BCA8BBA003631F3 /* ChooseTransportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */; };
72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; };
72A813FD1BCD33BE003631F3 /* ReceiveBoltView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813FC1BCD33BE003631F3 /* ReceiveBoltView.m */; };
......@@ -710,6 +711,8 @@
72873CED1BA280DD007B3387 /* GXFPopCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFPopCell.m; sourceTree = "<group>"; };
72882D891BA9121E00935BA6 /* ChooseProductUnitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseProductUnitViewController.h; sourceTree = "<group>"; };
72882D8A1BA9121E00935BA6 /* ChooseProductUnitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseProductUnitViewController.m; sourceTree = "<group>"; };
729A2E911BE60C0200493603 /* GeometryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeometryView.h; sourceTree = "<group>"; };
729A2E921BE60C0200493603 /* GeometryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeometryView.m; sourceTree = "<group>"; };
72A8132B1BCA8BBA003631F3 /* ChooseTransportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseTransportViewController.h; sourceTree = "<group>"; };
72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseTransportViewController.m; sourceTree = "<group>"; };
72A813F61BCD3205003631F3 /* ReceiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReceiveViewController.h; sourceTree = "<group>"; };
......@@ -1595,6 +1598,8 @@
72A813F91BCD3205003631F3 /* Views */ = {
isa = PBXGroup;
children = (
729A2E911BE60C0200493603 /* GeometryView.h */,
729A2E921BE60C0200493603 /* GeometryView.m */,
72A813FB1BCD33BE003631F3 /* ReceiveBoltView.h */,
72A813FC1BCD33BE003631F3 /* ReceiveBoltView.m */,
72A814161BCF9CF6003631F3 /* ReceiveProductCell.h */,
......@@ -2558,7 +2563,6 @@
C1F696001AB870B400F9F5DD /* Frameworks */,
C1F696011AB870B400F9F5DD /* Resources */,
1454647E6246AB3D8AAE6FF2 /* Copy Pods Resources */,
D17DB74B89F4D8DFDFC2E29A /* Embed Pods Frameworks */,
);
buildRules = (
);
......@@ -2698,21 +2702,6 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
D17DB74B89F4D8DFDFC2E29A /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
......@@ -2990,6 +2979,7 @@
7217E9F11B72364300FE5C1D /* SortMaskView.m in Sources */,
7217E9E71B72364300FE5C1D /* Attachment.m in Sources */,
72B3C0C41B9D3C7300025D81 /* TransportPurchaseViewController.m in Sources */,
729A2E931BE60C0200493603 /* GeometryView.m in Sources */,
30ECD6241B00948A0088C57A /* ICRPatrolPlanCellContentView.m in Sources */,
72805CF31BB8E1B0009E1F82 /* TransferViewController.m in Sources */,
C123A9291B26EDDA003C0C36 /* ICRQInputPopup.m in Sources */,
......@@ -3217,7 +3207,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
......@@ -3255,7 +3245,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = NO;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
......@@ -3268,8 +3258,8 @@
baseConfigurationReference = 1B0B22845F5CD40B5CF655F2 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist;
......@@ -3281,7 +3271,7 @@
"$(PROJECT_DIR)/XFFruit/Vendors/JiGuang/lib",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Debug;
......@@ -3291,8 +3281,8 @@
baseConfigurationReference = 7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
INFOPLIST_FILE = XFFruit/Info.plist;
......@@ -3304,7 +3294,7 @@
"$(PROJECT_DIR)/XFFruit/Vendors/JiGuang/lib",
);
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Release;
......@@ -3327,7 +3317,7 @@
INFOPLIST_FILE = XFFruitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = XFFruitTests;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
......@@ -3347,7 +3337,7 @@
INFOPLIST_FILE = XFFruitTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = XFFruitTests;
PROVISIONING_PROFILE = "cfc700e3-f78e-4893-a7fd-62daba6a0c6c";
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XFFruit.app/XFFruit";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
......
......@@ -129,9 +129,9 @@
// NSOrderedSame self.version==self.severVersion
if (self.severForceUpdate) {
//强制更新
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: @"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil];
alertV.tag = 1001;
[alertV show];
// UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: @"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:nil otherButtonTitles: @"去下载", nil];
// alertV.tag = 1001;
// [alertV show];
}else
{
UIAlertView *alertV = [[UIAlertView alloc]initWithTitle:@"新版本告知" message: @"有新版本发布请您下载最新版本" delegate:self cancelButtonTitle:@"下次再说"otherButtonTitles: @"去下载", nil];//
......
......@@ -98,7 +98,7 @@
@"新建行情调研",@"查看行情调研", @"查看行情调研",
@"填写行情反馈",
@"新建采购通知",@"查看采购通知", @"查看采购通知",
@"新建采购单",@"查看采购单", @"查看采购单", @"审核采购单",//【供应商】",
@"新建采购单",@"查看采购单", @"查看采购单", @"供应商确认采购单",//【供应商】",
@"新建发运单",@"查看发运单", @"查看发运单",
@"新增加工单",@"查看加工单", @"查看加工单",
@"新建转运单", @"查看转运单", @"查看转运单",
......
......@@ -243,7 +243,7 @@ static NSString * const ICRHTTPInterface[] = {
//收货
[XFFHttp_SaveRctinfo] =@"transfer/save_rctinfo",
[XFFHttp_SaveReceipt] =@"transfer/receipt",
[XFFHttp_getVersionId] = @"ipapk",
[XFFHttp_getVersionId] = @"rest/ipapk",
};
......@@ -2944,7 +2944,7 @@ acceptTypeJson:YES
}
};
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_getVersionId] stringByAppendingFormat:@"?type=%@",type];
NSString *urlStr = [NSString stringWithFormat:@"%@/%@?type=%@",Server_Url,ICRHTTPInterface[XFFHttp_getVersionId],type];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[self GET:encodeUrlStr
......
......@@ -164,9 +164,9 @@
}
}else if([tableStr isEqualToString:GXF_BASECLASS_PRODUCTUNIT]){
if (titleStr.length > 0) {
sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE NAME LIKE '%%%@%%' ORDER BY %@", tableStr,titleStr, @"uuid"];
sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE NAME LIKE '%%%@%%' AND ENABLED = 1 ORDER BY %@", tableStr,titleStr, @"priority"];
}else{
sql = [NSString stringWithFormat:@"SELECT * FROM %@ ORDER BY %@", tableStr, @"uuid"];
sql = [NSString stringWithFormat:@"SELECT * FROM %@ WHERE ENABLED = 1 ORDER BY %@", tableStr, @"priority"];
}
}else if([tableStr isEqualToString:GXF_BASECLASS_ACCOUNTTITLE]){
if (titleStr.length > 0) {
......
......@@ -22,18 +22,23 @@
#define ICR_TABBAR_TINT_COLOR [UIColor colorWithR:36 g:38 b:53 a:1]
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
// HTTP
//#define HTTP_REST_API_BASE_URL @"http://115.28.191.44:8080/IPatrol/rest"
//new HTTP
//阿里云内部测试环境
//#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
#define Server_Url @"http://218.244.151.129:7580/cruiser-server"
//现场测试环境
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//#define Server_Url @"http://122.224.171.126:7280/cruiser-server"
// HTTP
//#define HTTP_REST_API_BASE_URL @"http://115.28.191.44:8080/IPatrol/rest"
//10月23 122.224.171.126:7280
//#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:8281/XFFruit-server/rest"
// Import Headers
#import "ICRUtilsMacro.h"
#import "ICRVendorMacro.h"
#import "ICRHTTPController.h"
......
......@@ -34,6 +34,7 @@
+ (NSDate *)convertToDateFrom:(NSString *)dateString;
+ (NSString *)stringFromDate:(NSDate*)aDate;
+ (NSString *)stringFromDateWithFormat:(NSDate*)aDate format:(NSString *)format;
+ (NSString*)dictionaryToJson:(id)dic;
+ (NSString *)checkString:(NSString *)str;
+ (NSString *)checkNull: (id)data;
......
......@@ -181,6 +181,12 @@
NSString *dateString = [formatter stringFromDate:aDate];
return dateString;
}
+ (NSString *)stringFromDateWithFormat:(NSDate*)aDate format:(NSString *)format {
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:format];
NSString *dateString = [formatter stringFromDate:aDate];
return dateString;
}
+ (NSString*)dictionaryToJson:(id)dic
......
......@@ -190,7 +190,7 @@
case kFunctionExaminePurchase:
{
PurchaseViewController *tVC = [[PurchaseViewController alloc] init];
tVC.title = @"审核采购单";
tVC.title = @"供应商确认采购单";
tVC.assessorVendor = [ICRUserUtil sharedInstance].userId;
[self PushViewController:tVC animated:YES];
}
......
......@@ -18,5 +18,5 @@
@property (nonatomic, strong) NSDate *lastModified_time;//最后修改时间
@property (nonatomic, copy) NSString *lastModified_id;//最后修改人代码
@property (nonatomic, copy) NSString *lastModified_operName;//最后修改人名称
@property (nonatomic, assign) NSInteger priority;//新增字段优先级
@end
......@@ -269,6 +269,12 @@ typedef enum : NSUInteger {
if (self.purchaseBill && [versionObject integerValue] == 0) {
versionObject = self.purchaseBill.version;
}
if (_purchaseView.noticeUuid.length ==0 || _purchaseView.noticeNumber.length == 0) {
if (self.purchaseBill && self.purchaseBill.noticeNumber && self.purchaseBill.noticeUuid) {
_purchaseView.noticeUuid = self.purchaseBill.noticeUuid;
_purchaseView.noticeNumber = self.purchaseBill.noticeNumber;
}
}
NSMutableArray *billProducts = [NSMutableArray array];
for (PurchaseBillProduct *billProduct in _pvc.productArr) { [billProducts addObject:[billProduct dictForCommit]];
}
......@@ -288,7 +294,7 @@ typedef enum : NSUInteger {
@"receiveWrh_name":[IBTCommon checkString:_purchaseView.receiveWrh_name],
@"total":_purchaseView.total,
@"charge":_purchaseView.chargePurchase,
@"remark":_purchaseView.remark,
@"remark":[IBTCommon checkString:_purchaseView.remark],
@"products":billProducts};
[IBTLoadingView showProgressLabel:msg];
[[ICRHTTPController sharedController] savePurchaseWithData:dict success:succ failure:fail];
......
......@@ -126,7 +126,6 @@ typedef enum : NSUInteger {
[self changeBtnFrame:_secondBtn title:@"审核通过" originX:CGRectGetMaxX(_firstBtn.frame) + LeftMargin width:TwoWidth];
_firstBtn.tag = RejectTag;
_secondBtn.tag = PassTag;
self.indexStyle = 1;
}else{
[self hiddenTwoBtn];
}
......@@ -136,9 +135,7 @@ typedef enum : NSUInteger {
_firstBtn.hidden = YES;
[self changeBtnFrame:_secondBtn title:@"确认" originX:LeftMargin width:OneWidth];
_secondBtn.tag = SureTag;
self.indexStyle = 1;
}else{
self.indexStyle = 0;
if ([self checkIsPermission:PURCHASE_PERMISSIONS_FINISH]&&[self checkIsPermission:PURCHASE_PERMISSIONS_ABORT]) {
//显示结束和作废按钮
[self changeBtnFrame:_firstBtn title:@"结束" originX:LeftMargin width:TwoWidth];
......@@ -167,7 +164,6 @@ typedef enum : NSUInteger {
_firstBtn.hidden = YES;
[self changeBtnFrame:_secondBtn title:@"作废" originX:LeftMargin width:OneWidth];
_secondBtn.tag = CancleTag;
self.indexStyle = 0;
}else{
[self hiddenTwoBtn];
......@@ -180,7 +176,6 @@ typedef enum : NSUInteger {
- (void)hiddenTwoBtn{
_firstBtn.hidden = YES;
_secondBtn.hidden = YES;
self.indexStyle = 1;
CGRect scrollViewFrame = _scrollView.frame;
scrollViewFrame.size.height = ScreenSize.height - 64;
_scrollView.frame = scrollViewFrame;
......@@ -290,13 +285,8 @@ typedef enum : NSUInteger {
}
- (void)createPurchaseView{
if (self.indexStyle == 0) {
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"最后修改人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
}else if (self.indexStyle == 1) {
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"审核人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
}else{
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"审核人:",@"状态:",@"供应商:",@"其他费用:",@"总金额:",@"备注:"];
}
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
_purchaseView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*_leftArr.count +LeftMargin)];
_purchaseView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_purchaseView];
......@@ -318,6 +308,16 @@ typedef enum : NSUInteger {
self.noticeNumberLabel = rightLabel;
}else if(i == 2){
self.createOperNameLabel = rightLabel;
}else if(i == 3){
self.stateLabel = rightLabel;
}else if(i == 4){
self.typeLabel = rightLabel;
}else if(i == 5){
self.vendorNameLabel = rightLabel;
}else if(i == 6){
self.vendorIsSureLabel = rightLabel;
}else if(i == 7){
self.warehouseLabel = rightLabel;
}else if(i == _leftArr.count - 3){
self.otherPriceLabel = rightLabel;
}else if(i == _leftArr.count - 2){
......@@ -326,36 +326,6 @@ typedef enum : NSUInteger {
rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel;
}
if (self.indexStyle == 0 || self.indexStyle == 1) {
if (self.indexStyle == 0) {
if (i == 3) {
self.lastModifyNameLabel = rightLabel;
}
}else{
if (i == 3) {
self.checkNameLabel = rightLabel;
}
}
if(i == 4){
self.stateLabel = rightLabel;
}else if(i == 5){
self.typeLabel = rightLabel;
}else if(i == 6){
self.vendorNameLabel = rightLabel;
}else if(i == 7){
self.vendorIsSureLabel = rightLabel;
}else if(i == 8){
self.warehouseLabel = rightLabel;
}
}else{
if(i == 3){
self.checkNameLabel = rightLabel;
}else if(i == 4){
self.stateLabel = rightLabel;
}else if(i == 5){
self.vendorNameLabel = rightLabel;
}
}
[_purchaseView addSubview:rightLabel];
}
}
......
......@@ -391,11 +391,11 @@ typedef enum : NSUInteger {
if ([purchaseNotice.state isEqualToString:PURCHASENOTICE_STATE_INITIAL]) {
NewPurchaseNoticeViewController *nvc = [NewPurchaseNoticeViewController new];
nvc.purchaseNotice = purchaseNotice;
nvc.title = @"修改采购通知单";
nvc.title = @"修改采购通知单";
[self PushViewController:nvc animated:YES];
}else{
SeePurchaseNoticeViewController *pvc = [SeePurchaseNoticeViewController new];
pvc.title = @"查看采购通知单";
pvc.title = @"查看采购通知单";
pvc.purchaseNotice = purchaseNotice;
[self PushViewController:pvc animated:YES];
}
......
......@@ -57,6 +57,8 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)UILabel *userLabel;
@property (nonatomic,strong)UILabel *stateLabel;
@property (nonatomic,strong)UILabel *countLabel;
@property (nonatomic,strong)UILabel *finishLabel;
@property (nonatomic,strong)UILabel *noteLabel;
@property (nonatomic,strong)UILabel *HeardLabel;
@property (nonatomic,strong)UILabel *FootLabel;
......@@ -122,14 +124,27 @@ typedef enum : NSUInteger {
self.titleLabel.text = [IBTCommon checkString:self.purchaseNotice.title];
self.userLabel.text = [IBTCommon checkString:self.purchaseNotice.purchaserName];
self.countLabel.text = [NSString stringWithFormat:@"%@",@"222"];
self.countLabel.text = [NSString stringWithFormat:@"%@",[self calutionTotalCount]];
self.finishLabel.text = [NSString stringWithFormat:@"%@",self.purchaseNotice.finishDate?[[IBTCommon checkString:self.purchaseNotice.finishDate] substringToIndex:10]:@"无"];
self.noteLabel.text = [IBTCommon checkString:self.purchaseNotice.remark];
[_shopeArr addObjectsFromArray:self.purchaseNotice.products];
[mingXiTableView reloadData];
[self setNoteHeight];
}
- (NSString *)calutionTotalCount{
NSString *str = @"";
NSInteger baseCount = 0;
NSInteger purshaseCount = 0;
for (NoticeProduct *noticeProduct in self.purchaseNotice.products) {
baseCount += [noticeProduct.quantity integerValue];
purshaseCount += [noticeProduct.purchasedQuantity integerValue];
}
str = [NSString stringWithFormat:@"%@ 已采(%@)",[NSNumber numberWithInteger:baseCount],[NSNumber numberWithInteger:purshaseCount]];
return str;
}
#pragma mark - 视图初始化
- (void)bulidLayout{
......@@ -157,20 +172,25 @@ typedef enum : NSUInteger {
[self.view addSubview:_endBtn];
if ([self.purchaseNotice.state isEqualToString:PURCHASENOTICE_STATE_NOTACCEPTED]) {
if ([self checkIsPermission:NOTICE_PERMISSIONS_ACCEPTTASK]) {
_rejectBtn.hidden = YES;
_endBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
if ([self checkIsPermission:NOTICE_PERMISSIONS_ACCEPTTASK]&& [self checkIsPermission:NOTICE_PERMISSIONS_FINISH]) {
_rejectBtn.tag = EndTag;
[_rejectBtn setTitle:@"结束" forState:UIControlStateNormal];
_endBtn.tag = AcceptTag;
[_endBtn setTitle:@"接受任务" forState:UIControlStateNormal];
}
// else if ([self checkIsPermission:NOTICE_PERMISSIONS_CREATEBILL]) {
// _rejectBtn.hidden = YES;
// _endBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
// _endBtn.tag = NewTag;
// [_endBtn setTitle:@"新建采购单" forState:UIControlStateNormal];
// }
else{
[self hiddenBottomBtn];
}else{
if ([self checkIsPermission:NOTICE_PERMISSIONS_ACCEPTTASK]) {
_rejectBtn.hidden = YES;
_endBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
_endBtn.tag = AcceptTag;
[_endBtn setTitle:@"接受任务" forState:UIControlStateNormal];
}else if([self checkIsPermission:NOTICE_PERMISSIONS_FINISH]){
_rejectBtn.hidden = YES;
_endBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
_endBtn.tag = EndTag;
[_endBtn setTitle:@"结束" forState:UIControlStateNormal];
}else{
[self hiddenBottomBtn];
}
}
}else if([self.purchaseNotice.state isEqualToString:PURCHASENOTICE_STATE_PURCHASEING]){
if ([self checkIsPermission:NOTICE_PERMISSIONS_FINISH] && [self checkIsPermission:NOTICE_PERMISSIONS_CREATEBILL]) {
......@@ -242,13 +262,19 @@ typedef enum : NSUInteger {
NSString *message = data[@"message"];
if (success == 1) {
if ([action isEqualToString:@"accept"]) {
_stateLabel.text = @"发运中";
_endBtn.hidden = YES;
_rejectBtn.hidden = NO;
[_rejectBtn setTitle:@"新建采购单" forState:UIControlStateNormal];
_rejectBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
_rejectBtn.tag = NewTag;
#warning 有点问
[ICRUserUtil sharedInstance].needFresh = YES;
if ([IBTCommon checkIsPermission:NOTICE_PERMISSIONS_CREATEBILL]) {
_stateLabel.text = @"发运中";
_endBtn.hidden = YES;
_rejectBtn.hidden = NO;
[_rejectBtn setTitle:@"新建采购单" forState:UIControlStateNormal];
_rejectBtn.frame = CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin * 2, 40);
_rejectBtn.tag = NewTag;
}else{
[self PopViewControllerAnimated:YES];
}
}else{
[ICRUserUtil sharedInstance].needFresh = YES;
[self PopViewControllerAnimated:YES];
......@@ -277,7 +303,7 @@ typedef enum : NSUInteger {
_bottomView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_bottomView];
_shopeArr=[[NSMutableArray alloc]initWithObjects: nil];
_shopeArr=[[NSMutableArray alloc]init];
selectCellAry=[[NSMutableArray alloc]initWithCapacity:1000];
mingXiTableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, _bottomView.height)];
mingXiTableView.backgroundColor = [UIColor whiteColor];
......@@ -333,7 +359,7 @@ typedef enum : NSUInteger {
}
- (void)createPurchaseView{
_leftArr = @[@"单号:",@"创建人:",@"标题:",@"状态:",@"采购员:",@"合计基础数量:",@"备注:"];
_leftArr = @[@"单号:",@"创建人:",@"标题:",@"状态:",@"采购员:",@"合计基础数量:",@"要求采购完成时间:",@"备注:"];
_purchaseView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*_leftArr.count +LeftMargin)];
_purchaseView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_purchaseView];
......@@ -363,7 +389,12 @@ typedef enum : NSUInteger {
leftLabel.width = 110;
rightLabel.x = leftLabel.right;
self.countLabel = rightLabel;
}else if(i == _leftArr.count - 1){
}else if(i == 6){
leftLabel.width = 145;
rightLabel.left = leftLabel.right;
self.finishLabel = rightLabel;
}
else if(i == _leftArr.count - 1){
rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel;
}
......
......@@ -23,6 +23,7 @@
@property (nonatomic,strong)NSString *purchaserUuid;//采购员ID
@property (nonatomic,strong)NSString *purchaserCode;//采购员代码
@property (nonatomic,strong)NSString *purchaserName;//采购员名称
@property (nonatomic,strong)NSString *finishDate;//新增要求采购完成时间
@property (nonatomic,strong)NSString *remark;//备注
@property (nonatomic,strong)NSArray *products;//商品
......
......@@ -27,5 +27,10 @@
@property (nonatomic,strong)NSString *remark;//备注
@property (nonatomic,assign)BOOL IsDeleted;//是否删除
@property (nonatomic,assign)BOOL IsXiuGai;//是否删除
//新增
@property (nonatomic,strong)NSString *sourceBillNumber;//来源单号
@property (nonatomic,strong)NSString *sourceDetail;//来源单号id
@property (nonatomic,strong)NSString *sourceType;//来源类型
@end
......@@ -7,7 +7,7 @@
//
#import "NoticeDetailCell.h"
#define TitleSize 17
#define TitleSize 16
#define LeftMargin 15
#define TableHeight 46
#define TableWidth 60
......@@ -62,7 +62,7 @@
self.SpLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20, 0, gipWidth, TableHeight))];
self.SpLabel.textAlignment= NSTextAlignmentLeft;
self.SpLabel.textColor = HexColor(@"666666");
self.SpLabel.textColor = GXF_CONTENT_COLOR;
self.SpLabel.font = FontSize(TitleSize);
// self.DjLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin+20+self.SpLabel.size.width+gipWidth , 0, TableWidth,TableHeight ))];
......@@ -72,12 +72,12 @@
self.BzggLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+20+gipWidth+1, 0, gipWidth, TableHeight)];
self.BzggLabel.textAlignment= NSTextAlignmentLeft;
self.BzggLabel.textColor = HexColor(@"666666");
self.BzggLabel.textColor = GXF_CONTENT_COLOR;
self.BzggLabel.font = FontSize(TitleSize);
self.BzslLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+20+2*gipWidth+2, 0, gipWidth, TableHeight)];
self.BzslLabel.textAlignment= NSTextAlignmentLeft;
self.BzslLabel.textColor = HexColor(@"666666");
self.BzslLabel.textColor = GXF_CONTENT_COLOR;
self.BzslLabel.font = FontSize(TitleSize);
......@@ -85,7 +85,7 @@
self.YcgslLabel=[[UILabel alloc]initWithFrame:CGRectMake(LeftMargin+20+3*gipWidth+3, 0, gipWidth, TableHeight)];
self.YcgslLabel.textAlignment= NSTextAlignmentLeft;
self.YcgslLabel.textColor = HexColor(@"666666");
self.YcgslLabel.textColor = GXF_CONTENT_COLOR;
self.YcgslLabel.font = FontSize(TitleSize);
......
......@@ -26,21 +26,21 @@
{
self.contentView.backgroundColor = XXFBgColor;
UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(20, 5, ScreenSize.width - 40, 130 -10)];
UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 5, ScreenSize.width, 130 -10)];
bgView.backgroundColor = [UIColor whiteColor];
bgView.layer.cornerRadius = 5;
bgView.layer.masksToBounds = YES;
// bgView.layer.cornerRadius = 5;
// bgView.layer.masksToBounds = YES;
[self.contentView addSubview:bgView];
self.createdLable = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 0, bgView.width - 100, 30)];//业务时间
self.createdLable.font = GXF_FIFTEENTEN_SIZE;
self.createdLable.textColor = GXF_CELL_COLOR;
self.createdLable.textColor = GXF_NAVIGAYION_COLOR;
self.createdLable.text = @"2015-04-05 09:05:05";
self.creatorLable = [[UILabel alloc]initWithFrame:CGRectMake(self.createdLable.right, 0, bgView.width - self.createdLable.width - LeftMargin * 2, 30)];//业务人
self.creatorLable.font = GXF_FIFTEENTEN_SIZE;
self.creatorLable.textAlignment = NSTextAlignmentRight;
self.creatorLable.textColor = GXF_CELL_COLOR;
self.creatorLable.textColor = GXF_NAVIGAYION_COLOR;
self.traceIdLable = [[UILabel alloc]initWithFrame:CGRectMake(self.createdLable.x, self.createdLable.bottom, bgView.width - LeftMargin*2, 20)];//采购通知单uuid
self.traceIdLable.font = GXF_FIFTEENTEN_SIZE;
......
......@@ -7,7 +7,7 @@
//
#import "PurchaseNoticeCell.h"
#define TitleSize 17
#define TitleSize 16
#define LeftMargin 15
#define TableHeight 46
#define TableWidth 60
......
......@@ -119,15 +119,25 @@ typedef enum : NSUInteger {
self.shopDetail.packageQpcUnit ? (_baseCountLabel.text = self.shopDetail.packageQpcUnit) : (_baseCountLabel.text = @"斤");
//包装数量
packageQuantity.text=self.shopDetail.packageQuantity;
if ([self.shopDetail.packageQuantity integerValue] > 0) {
packageQuantity.text=self.shopDetail.packageQuantity;
}
//基础数量
foundationQuantity.text=self.shopDetail.foundationQuantity;
//基础单价
foundationUnitPrice.text=self.shopDetail.foundationUnitPrice;
if ([self.shopDetail.foundationUnitPrice floatValue] > 0) {
foundationUnitPrice.text=self.shopDetail.foundationUnitPrice;
}
//包装单价
packageUnitPrice.text=self.shopDetail.packageUnitPrice;
if ([self.shopDetail.packageUnitPrice floatValue] > 0) {
packageUnitPrice.text=self.shopDetail.packageUnitPrice;
}
//总金额
totalMoney.text=self.shopDetail.totalMoney;
if ([self.shopDetail.totalMoney floatValue] <= 0) {
totalMoney.text=@"0.00";
}else{
totalMoney.text=self.shopDetail.totalMoney;
}
//备注
remark.text=self.shopDetail.remark;
......
......@@ -340,7 +340,7 @@ typedef enum : NSUInteger {
@"carnumber":[IBTCommon checkString:self.transfer.carnumber],
@"type":[IBTCommon checkString:self.transfer.type],
@"carphone":[IBTCommon checkString:self.transfer.carphone],
@"note":self.transfer.note,
@"note":[IBTCommon checkString:self.transfer.note],
@"pdtDetails":billProducts,
};
[IBTLoadingView showProgressLabel:msg];
......
......@@ -104,7 +104,7 @@ typedef enum : NSUInteger {
NSDictionary *dict = @{
@"state":stateObject,
@"queryOrders":orderArr,
@"userCode":userUtil.userCode,
@"userUuid":userUtil.userId,
@"pageNumber":@(_currentPage),
@"pageSize":@(20)};
[[ICRHTTPController sharedController] queryTransferWithData:dict success:succ failure:fail];
......
//
// GeometryView.h
// CNTaipingAgent
//
// Created by chenchen on 15/9/7.
// Copyright (c) 2015年 Taiping. All rights reserved.
//
// 虚线边框
#import <UIKit/UIKit.h>
@interface GeometryView : UIView
@end
//
// GeometryView.m
// CNTaipingAgent
//
// Created by chenchen on 15/9/7.
// Copyright (c) 2015年 Taiping. All rights reserved.
//
// 虚线边框
#import "GeometryView.h"
@implementation GeometryView
- (void)drawRect:(CGRect)rect
{
CGFloat dashPattern[] = {3.0, 2};
// 获取绘图上下文
CGContextRef context = UIGraphicsGetCurrentContext();
// 线宽
CGContextSetLineWidth(context, 5.0);
// 画虚线
CGContextSetLineDash(context, 0.0, dashPattern, 2);
// 设置线条颜色
CGContextSetStrokeColorWithColor(context, GXF_NAVIGAYION_COLOR.CGColor);
// 设置填充颜色
CGContextSetFillColorWithColor(context, [[UIColor whiteColor] CGColor]);
// 填充一个矩形
CGContextFillRect(context, rect);
// 绘制矩形边框
CGContextStrokeRect(context, rect);
}
@end
......@@ -72,12 +72,25 @@
self.showbzdwLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showbzdwLabel.font = GXF_THREETEENTH_SIZE;
self.showbzCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showStandLabel.frame), ShowWidth, ShowHeight))];
self.showjcPriceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showStandLabel.frame), ShowWidth, ShowHeight))];
self.showjcPriceLabel.textAlignment = NSTextAlignmentLeft;
self.showjcPriceLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showjcPriceLabel.font = GXF_THREETEENTH_SIZE;
self.showbzPriceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showbzdwLabel.frame), CGRectGetMaxY(self.showStandLabel.frame), ShowWidth, ShowHeight))];
self.showbzPriceLabel.textAlignment = NSTextAlignmentLeft;
self.showbzPriceLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showbzPriceLabel.font = GXF_THREETEENTH_SIZE;
self.showbzCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showjcPriceLabel.frame), ShowWidth, ShowHeight))];
self.showbzCountLabel.textAlignment = NSTextAlignmentLeft;
self.showbzCountLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showbzCountLabel.font = GXF_THREETEENTH_SIZE;
self.showshCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showbzdwLabel.frame), CGRectGetMaxY(self.showStandLabel.frame), ShowWidth, ShowHeight))];
self.showshCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showbzdwLabel.frame), CGRectGetMaxY(self.showjcPriceLabel.frame), ShowWidth, ShowHeight))];
self.showshCountLabel.textAlignment = NSTextAlignmentLeft;
self.showshCountLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showshCountLabel.font = GXF_THREETEENTH_SIZE;
......@@ -92,23 +105,14 @@
self.showshjcCountLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showshjcCountLabel.font = GXF_THREETEENTH_SIZE;
self.showjcPriceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showjcCountLabel.frame), ShowWidth, ShowHeight))];
self.showjcPriceLabel.textAlignment = NSTextAlignmentLeft;
self.showjcPriceLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showjcPriceLabel.font = GXF_THREETEENTH_SIZE;
self.showbzPriceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showbzdwLabel.frame), CGRectGetMaxY(self.showshjcCountLabel.frame), ShowWidth, ShowHeight))];
self.showbzPriceLabel.textAlignment = NSTextAlignmentLeft;
self.showbzPriceLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showbzPriceLabel.font = GXF_THREETEENTH_SIZE;
self.showTotalLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showjcPriceLabel.frame), ShowWidth, ShowHeight))];
self.showTotalLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showjcCountLabel.frame), ShowWidth, ShowHeight))];
self.showTotalLabel.textAlignment = NSTextAlignmentLeft;
self.showTotalLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showTotalLabel.font = GXF_THREETEENTH_SIZE;
self.showshTotalLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showbzdwLabel.frame), CGRectGetMaxY(self.showjcPriceLabel.frame), ShowWidth, ShowHeight))];
self.showshTotalLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showbzdwLabel.frame), CGRectGetMaxY(self.showjcCountLabel.frame), ShowWidth, ShowHeight))];
self.showshTotalLabel.textAlignment = NSTextAlignmentLeft;
self.showshTotalLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showshTotalLabel.font = GXF_THREETEENTH_SIZE;
......@@ -163,16 +167,16 @@
self.showbzdwLabel.text = [NSString stringWithFormat:@"包装单位:%@",transferProduct.unit];
self.showbzCountLabel.text =[NSString stringWithFormat:@"包装数量:%@%@",transferProduct.qty,transferProduct.unit];
self.showshCountLabel.text =[NSString stringWithFormat:@"包装数量[收货]:%@%@",transferProduct.rctQty?(transferProduct.rctQty):@"0",transferProduct.unit];
self.showshCountLabel.text =[NSString stringWithFormat:@"包装数量[实收]:%@%@",transferProduct.rctQty?(transferProduct.rctQty):@"0",transferProduct.unit];
self.showjcCountLabel.text = [NSString stringWithFormat:@"基础数量:%@%@",transferProduct.baseQty,transferProduct.baseUnit];
self.showshjcCountLabel.text = [NSString stringWithFormat:@"基础数量[收货]:%@%@",transferProduct.rctBaseQty?transferProduct.rctBaseQty:@"0",transferProduct.baseUnit];
self.showshjcCountLabel.text = [NSString stringWithFormat:@"基础数量[实收]:%@%@",transferProduct.rctBaseQty?transferProduct.rctBaseQty:@"0",transferProduct.baseUnit];
self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",transferProduct.packprice];
self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",transferProduct.price];
self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[收货]:%@元",transferProduct.rctTotal?transferProduct.rctTotal:@"0"];
self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%@元",transferProduct.rctTotal?transferProduct.rctTotal:@"0"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",transferProduct.total?transferProduct.total:@"0"];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ];
......
......@@ -17,5 +17,6 @@
@interface StartTimeView : UIView
@property (nonatomic,weak)id<StartTimeViewDelegate>delegate;
- (instancetype)initWithFrame:(CGRect)frame withMode:(UIDatePickerMode)timeMode
;
@end
......@@ -13,6 +13,7 @@
UIView *_bgView;
UIDatePicker *_timePicker;
}
@property (nonatomic,assign)UIDatePickerMode timeMode;
@end
@implementation StartTimeView
......@@ -20,6 +21,16 @@
{
self = [super initWithFrame:frame];
if (self) {
self.timeMode = UIDatePickerModeDate;
[self bulidLayout];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame withMode:(UIDatePickerMode)timeMode
{
self = [super initWithFrame:frame];
if (self) {
self.timeMode = timeMode;
[self bulidLayout];
}
return self;
......@@ -37,7 +48,7 @@
_timePicker= [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 30,ScreenSize.width, DateViewHeight - 30)];
_timePicker.backgroundColor = [UIColor whiteColor];
_timePicker.datePickerMode = UIDatePickerModeDate;
_timePicker.datePickerMode = self.timeMode;
_timePicker.locale = [[NSLocale alloc]initWithLocaleIdentifier:@"zh_CN"];
// // 设置最小时间段,防止用户的出现已过去的时间
// _timePicker.minimumDate = [NSDate date];
......
......@@ -151,6 +151,8 @@ typedef enum : NSUInteger {
UIButton *endBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin*2, 40) target:self sel:@selector(btnClick:) tag:EndTag image:nil title:@"结束" titleColor:[UIColor whiteColor] isCorner:YES corner:8 bgColor:GXF_COMMIT_COLOR];
[self.view addSubview:endBtn];
_surveyView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight * 9+ ContentMargin * 10)];
_surveyView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_surveyView];
......
......@@ -22,7 +22,7 @@ typedef enum : NSUInteger {
CommitTag,
} BtnTag;
#define TopHeight 284
#define TopHeight 382
#define BottomHeight 300
#define SpaceHeight 20
#define BottomViewHeight 60
......@@ -214,7 +214,8 @@ typedef enum : NSUInteger {
@"carnumber":[IBTCommon checkString:_sheetView.carnumber],
@"type":[IBTCommon checkString:_sheetView.type],
@"carphone":[IBTCommon checkString:_sheetView.carphone],
@"note":_sheetView.note,
@"arriveDate":[IBTCommon checkString:_sheetView.arriveDate],
@"note":[IBTCommon checkString:_sheetView.note],
@"pdtDetails":billProducts,
@"accountDetails":costs
};
......@@ -371,9 +372,9 @@ typedef enum : NSUInteger {
billProduct.note = shopDetail.remark;
billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ;
billProduct.baseUnit = shopDetail.packageQpcUnit;
billProduct.sourcetype = @"none";
// billProduct.sourcebillnumber = @"11111111";
// billProduct.sourcePdtDetail = @"33333333";
billProduct.sourcetype = shopDetail.sourceType;
billProduct.sourcebillnumber = shopDetail.sourceBillNumber;
billProduct.sourcePdtDetail = shopDetail.sourceDetail;
return billProduct;
}
- (ShopDetail *)coverShopDetail:(TransferPdtDetail *)billProduct{
......@@ -392,6 +393,9 @@ typedef enum : NSUInteger {
shopDetail.remark = billProduct.note;
shopDetail.packageQpcUnit = billProduct.baseUnit;
shopDetail.packageQpcStr = billProduct.qpcStr;
shopDetail.sourceBillNumber = billProduct.sourcebillnumber;
shopDetail.sourceDetail = billProduct.sourcePdtDetail;
shopDetail.sourceType = billProduct.sourcetype;
return shopDetail;
}
......
......@@ -35,6 +35,7 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)UILabel *carnumberLabel;
@property (nonatomic,strong)UILabel *carhoneLabel;
@property (nonatomic,strong)UILabel *createOperLabel;
@property (nonatomic,strong)UILabel *arriveDateLabel;
@property (nonatomic,strong)UILabel *noteLabel;
@end
......@@ -93,6 +94,7 @@ typedef enum : NSUInteger {
self.carhoneLabel.text = [IBTCommon checkString:self.transfer.carphone];
self.noteLabel.text = [NSString stringWithFormat:@"%@",self.transfer.note?self.transfer.note:@"无"];
self.createOperLabel.text = [NSString stringWithFormat:@"%@%@",[IBTCommon checkString:self.transfer.create_operName],self.transfer.create_time.length > 10 ? [self.transfer.create_time substringToIndex:10] : self.transfer.create_time];
self.arriveDateLabel.text = [NSString stringWithFormat:@"%@",self.transfer.arriveDate?[[IBTCommon checkString:self.transfer.arriveDate]substringToIndex:10]:@"无"];
[_transView refreshTranProduct:self.transfer.pdtDetails];
[_transView refreshCost:self.transfer.accountDetails];
[self setNoteHeight];
......@@ -149,17 +151,16 @@ typedef enum : NSUInteger {
[self.view addSubview:_firstBtn];
// _secondBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(_firstBtn.frame)+ LeftMargin, ScreenSize.height - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:EndTag image:nil title:@"结束" titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
// [self.view addSubview:_secondBtn];
if ([self.transfer.state isEqualToString:TRANSFER_STATE_RECEIVED] || [self.transfer.state isEqualToString:TRANSFER_STATE_ABORTED] || ![self checkIsPermission:TRANSFER_ACTION_ABORT]) {
_firstBtn.hidden = YES;
_secondBtn.hidden = YES;
CGRect scrollViewFrame = _scrollView.frame;
scrollViewFrame.size.height = ScreenSize.height - 64;
_scrollView.frame = scrollViewFrame;
if ([self.transfer.state isEqualToString:TRANSFER_STATE_RECEIVED] || [self.transfer.state isEqualToString:TRANSFER_STATE_UNRECEIVED]) {
if ([IBTCommon checkIsPermission:TRANSFER_ACTION_ABORT]) {
_firstBtn.hidden = NO;
}else{
[self hiddenBottomView];
}
}else{
[self hiddenBottomView];
}
NSArray *leftArr = @[@"单号:",@"来源单据:",@"状态:",@"发货仓库:",@"收货仓库:",@"车辆:",@"司机电话:",@"创建:",@"备注"];
NSArray *leftArr = @[@"单号:",@"来源单据:",@"状态:",@"发货仓库:",@"收货仓库:",@"车辆:",@"司机电话:",@"创建:",@"预计到货时间:",@"备注:"];
_transportView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*leftArr.count +LeftMargin)];
_transportView.backgroundColor = [UIColor whiteColor];
......@@ -193,6 +194,11 @@ typedef enum : NSUInteger {
self.carhoneLabel = rightLabel;
}else if(i == 7){
self.createOperLabel = rightLabel;
}else if(i == 8){
leftLabel.width = LeftWidth + 10;
rightLabel.left = leftLabel.right;
rightLabel.width = ScreenSize.width - leftLabel.width - LeftMargin;
self.arriveDateLabel = rightLabel;
}else if(i == leftArr.count - 1){
rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel;
......@@ -201,6 +207,12 @@ typedef enum : NSUInteger {
}
[self createBottomView];
}
- (void)hiddenBottomView{
_firstBtn.hidden = YES;
CGRect scrollViewFrame = _scrollView.frame;
scrollViewFrame.size.height = ScreenSize.height - 64;
_scrollView.frame = scrollViewFrame;
}
- (void)createBottomView{
_bottomView= [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_transportView.frame) + TopMargin, ScreenSize.width, 300)];
_bottomView.backgroundColor = [UIColor whiteColor];
......@@ -278,14 +290,7 @@ typedef enum : NSUInteger {
[[ICRHTTPController sharedController] endTransferWithTransferUuid:self.transfer.uuid version:self.transfer.version success:succ failure:fail];
}
}
- (BOOL)checkIsPermission:(NSString *)permission{
for (NSString *per in [ICRUserUtil sharedInstance].permissions) {
if ([per isEqualToString:permission]) {
return YES;
}
}
return NO;
}
- (void)didReceiveMemoryWarning {
......
......@@ -122,7 +122,7 @@ typedef enum : NSUInteger {
@"billNumberLike":billObject,
@"creator":userObject,
@"queryOrders":orderArr,
@"userCode":userUtil.userCode,
@"userUuid":userUtil.userId,
@"pageNumber":@(_currentPage),
@"pageSize":@(20)};
[[ICRHTTPController sharedController] queryTransferWithData:dict success:succ failure:fail];
......
......@@ -29,7 +29,7 @@
@property (nonatomic,strong)NSString *lastModified_id; //最后修改人代码
@property (nonatomic,strong)NSString *lastModified_operName;//最后修改人名称
@property (nonatomic,strong)NSNumber *version; //版本
@property (nonatomic,strong)NSString *arriveDate;//新增预计到达时
@property (nonatomic,strong)NSArray *pdtDetails;//商品
@property (nonatomic,strong)NSArray *accountDetails;//费用
......
......@@ -21,6 +21,8 @@
@property (nonatomic,strong)UITextField *carTextFiled; //车辆
@property (nonatomic,strong)UILabel *typeLabel; //运输类型
@property (nonatomic,strong)UITextField *phoneTextFiled; //电话
@property (nonatomic,strong)UILabel *arriveDateLabel; //预计到货时间
@property (nonatomic,strong)HPGrowingTextView *remarkTextView;//备注
......@@ -35,6 +37,7 @@
@property (nonatomic,strong)NSString *carnumber;
@property (nonatomic,strong)NSString *type;
@property (nonatomic,strong)NSString *carphone;
@property (nonatomic,strong)NSString *arriveDate;
@property (nonatomic,strong)NSString *note;
@property (nonatomic,strong)Transfer *transfer;
@end
......@@ -13,17 +13,19 @@
#import "Warehouse.h"
#import "ChooseWarehouseViewController.h"
#import "ChooseTypeViewController.h"
#import "StartTimeView.h"
#define LeftMargin 15
#define TopMargin 20
#define LeftWidth 80
#define TableHeight 44
#define SpaceHeight 10
@interface TopTransferView ()<UITableViewDataSource,UITableViewDelegate,HPGrowingTextViewDelegate,UITextFieldDelegate>
@interface TopTransferView ()<UITableViewDataSource,UITableViewDelegate,HPGrowingTextViewDelegate,UITextFieldDelegate,StartTimeViewDelegate>
{
UITableView *_tableView;
NSMutableArray *_dataArr;
StartTimeView *_startTimeView;
}
@property (nonatomic,strong)NSString *selectType;
@property (nonatomic,strong)NSString *selectRwarehouse;
......@@ -46,7 +48,7 @@
{
self.backgroundColor = XXFBgColor;
_dataArr = [NSMutableArray array];
NSArray *arr = @[@"发货仓库:",@"收货仓库:",@"运输类型:",@"车辆:",@"司机电话:",@"备注:"];
NSArray *arr = @[@"发货仓库:",@"收货仓库:",@"运输类型:",@"车辆:",@"司机电话:",@"预计到货时间:",@"备注:"];
[_dataArr addObjectsFromArray:arr];
_tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, TopMargin,self.frame.size.width, self.frame.size.height - TopMargin)) style:(UITableViewStylePlain)];
......@@ -70,7 +72,7 @@
cell = [[SurveyCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (indexPath.row ==0 || indexPath.row == 1 || indexPath.row == 2) {
if (indexPath.row ==0 || indexPath.row == 1 || indexPath.row == 2 || indexPath.row == 5) {
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
[self createViewInCell:cell indexPath:indexPath];
......@@ -127,6 +129,9 @@
contentLabel.text = @"选择类型";
self.typeLabel = contentLabel;
}else if(indexPath.row == 5){
contentLabel.text = @"选择预计到货时间";
self.arriveDateLabel = contentLabel;
}
}
}
......@@ -163,6 +168,13 @@
self.phoneTextFiled.text = transfer.carphone;
self.carphone = transfer.carphone;
}
if (transfer.arriveDate) {
if (transfer.arriveDate.length > 15) {
_arriveDateLabel.text = [[IBTCommon checkString:transfer.arriveDate]substringToIndex:16];
}
_arriveDateLabel.textColor = GXF_CONTENT_COLOR;
self.arriveDate = [IBTCommon checkString:transfer.arriveDate];
}
if (transfer.note) {
self.remarkTextView.text = transfer.note;
self.note = transfer.note;
......@@ -229,8 +241,48 @@
};
[self.delegate pushNextViewController:tvc];
}else if(indexPath.row == 5){
[self startDatePickView];
}
}
- (void)startDatePickView{
if (!_startTimeView) {
_startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64)withMode:UIDatePickerModeDateAndTime];
_startTimeView.delegate = self;
_startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5);
[AppWindow addSubview:_startTimeView];
[UIView animateWithDuration:0.15 animations:^{
CGRect startFrame = _startTimeView.frame;
startFrame.origin.y = 64;
_startTimeView.frame = startFrame;
} completion:^(BOOL finished) {
}];
}
}
- (void)cancelTimeView{
[self clearDatePickView];
}
- (void)okTimeView:(NSDate *)time{
_arriveDateLabel.textColor = GXF_CONTENT_COLOR;
_arriveDateLabel.text = [IBTCommon stringFromDateWithFormat:time format:@"yyyy-MM-dd HH:mm"];
self.arriveDate = [time httpParameterString];
// 关闭选择器
[self clearDatePickView];
}
#pragma mark - 取消
- (void)clearDatePickView{
[UIView animateWithDuration:0.15 animations:^{
CGRect startFrame = _startTimeView.frame;
startFrame.origin.y = ScreenSize.height;
_startTimeView.frame = startFrame;
} completion:^(BOOL finished) {
[_startTimeView removeFromSuperview];
_startTimeView = nil;
}];
}
- (BOOL)growingTextViewShouldReturn:(HPGrowingTextView *)growingTextView{
......
......@@ -20,7 +20,7 @@ typedef enum : NSUInteger {
CommitTag,
} BtnTag;
#define TopHeight 284
#define TopHeight 328
#define BottomHeight 300
#define SpaceHeight 20
#define BottomViewHeight 60
......@@ -219,7 +219,8 @@ typedef enum : NSUInteger {
@"carnumber":[IBTCommon checkString:_sheetView.carnumber],
@"type":[IBTCommon checkString:_sheetView.type],
@"carphone":[IBTCommon checkString:_sheetView.carphone],
@"note":_sheetView.note,
@"arriveDate":[IBTCommon checkString:_sheetView.arriveDate],
@"note":[IBTCommon checkString:_sheetView.note],
@"pdtDetails":billProducts,
@"accountDetails":costs};
[IBTLoadingView showProgressLabel:msg];
......@@ -259,6 +260,7 @@ typedef enum : NSUInteger {
ShowMessage(@"司机电话不能为空");
return NO;
}
if (_bottomView.productVC.transportProductArr.count == 0) {
ShowMessage(@"商品不能为空");
return NO;
......@@ -370,7 +372,8 @@ typedef enum : NSUInteger {
billProduct.note = shopDetail.remark;
billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ;
billProduct.baseUnit = shopDetail.packageQpcUnit;
billProduct.purchasebillnumber = shopDetail.sourceBillNumber;
billProduct.purchasePdtDetail = shopDetail.sourceDetail;
return billProduct;
}
- (ShopDetail *)coverShopDetail:(TransportPdtDetail *)billProduct{
......@@ -387,6 +390,8 @@ typedef enum : NSUInteger {
shopDetail.foundationQuantity= [billProduct.baseQty stringValue];
shopDetail.totalMoney= [billProduct.total stringValue];
shopDetail.remark = billProduct.note;
shopDetail.sourceDetail = billProduct.purchasePdtDetail;
shopDetail.sourceBillNumber = billProduct.purchasebillnumber;
return shopDetail;
}
......
......@@ -40,6 +40,7 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)UILabel *carnumberLabel;
@property (nonatomic,strong)UILabel *carhoneLabel;
@property (nonatomic,strong)UILabel *createOperLabel;
@property (nonatomic,strong)UILabel *arriveDateLabel;
@property (nonatomic,strong)UILabel *noteLabel;
@end
......@@ -103,6 +104,7 @@ typedef enum : NSUInteger {
self.carhoneLabel.text = [IBTCommon checkString:self.transport.carphone];
self.noteLabel.text = [NSString stringWithFormat:@"%@",self.transport.note?self.transport.note:@"无"];
self.createOperLabel.text = [NSString stringWithFormat:@"%@%@",[IBTCommon checkString:self.transport.create_operName],self.transport.create_time.length > 10 ? [self.transport.create_time substringToIndex:10] : self.transport.create_time];
self.arriveDateLabel.text = [NSString stringWithFormat:@"%@",self.transport.arriveDate?[[IBTCommon checkString:self.transport.arriveDate]substringToIndex:10]:@"无"];
[_transView refreshTranProduct:self.transport.pdtDetails];
[_transView refreshCost:self.transport.accountDetails];
[self setNoteHeight];
......@@ -252,7 +254,7 @@ typedef enum : NSUInteger {
}
}
}
NSArray *leftArr = @[@"单号:",@"采购单:",@"状态:",@"发货仓库:",@"收货仓库:",@"车辆:",@"司机电话:",@"创建:",@"备注"];
NSArray *leftArr = @[@"单号:",@"采购单:",@"状态:",@"发货仓库:",@"收货仓库:",@"车辆:",@"司机电话:",@"创建:",@"预计到货时间:",@"备注:"];
_transportView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*leftArr.count +LeftMargin)];
_transportView.backgroundColor = [UIColor whiteColor];
......@@ -286,6 +288,11 @@ typedef enum : NSUInteger {
self.carhoneLabel = rightLabel;
}else if(i == 7){
self.createOperLabel = rightLabel;
}else if(i == 8){
leftLabel.width = LeftWidth + 10;
rightLabel.left = leftLabel.right;
rightLabel.width = ScreenSize.width - leftLabel.width - LeftMargin;
self.arriveDateLabel = rightLabel;
}else if(i == leftArr.count - 1){
rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel;
......
......@@ -123,7 +123,7 @@ typedef enum : NSUInteger {
@"billNumberLike":billObject,
@"creator":userObject,
@"queryOrders":orderArr,
@"userCode":userUtil.userCode,
@"userUuid":userUtil.userId,
@"pageNumber":@(_currentPage),
@"pageSize":@(20)};
[[ICRHTTPController sharedController] queryTransPortWithData:dict success:succ failure:fail];
......
......@@ -31,6 +31,7 @@
@property (nonatomic,strong)NSString *lastModified_time;//最后修改时间
@property (nonatomic,strong)NSString *lastModified_id;//最后修改人代码
@property (nonatomic,strong)NSString *lastModified_operName;//最后修改人名称
@property (nonatomic,strong)NSString *arriveDate;//新增预计到达时
@property (nonatomic,strong)NSArray *pdtDetails;//商品
@property (nonatomic,strong)NSArray *accountDetails;//费用
......
......@@ -21,6 +21,7 @@
@property (nonatomic,strong)UITextField *carTextFiled; //车辆
@property (nonatomic,strong)UILabel *typeLabel; //运输类型
@property (nonatomic,strong)UITextField *phoneTextFiled; //电话
@property (nonatomic,strong)UILabel *arriveDateLabel; //预计收货时间
@property (nonatomic,strong)HPGrowingTextView *remarkTextView;//备注
......@@ -35,6 +36,7 @@
@property (nonatomic,strong)NSString *carnumber;
@property (nonatomic,strong)NSString *type;
@property (nonatomic,strong)NSString *carphone;
@property (nonatomic,strong)NSString *arriveDate;
@property (nonatomic,strong)NSString *note;
@property (nonatomic,strong)Transport *transport;
......
......@@ -11,17 +11,18 @@
#import "Warehouse.h"
#import "ChooseWarehouseViewController.h"
#import "ChooseTypeViewController.h"
#import "StartTimeView.h"
#define LeftMargin 15
#define TopMargin 20
#define LeftWidth 80
#define TableHeight 44
#define SpaceHeight 10
@interface TopTransportView ()<UITableViewDataSource,UITableViewDelegate,HPGrowingTextViewDelegate,UITextFieldDelegate>
@interface TopTransportView ()<UITableViewDataSource,UITableViewDelegate,HPGrowingTextViewDelegate,UITextFieldDelegate,StartTimeViewDelegate>
{
UITableView *_tableView;
NSMutableArray *_dataArr;
StartTimeView *_startTimeView;
}
@property (nonatomic,strong)NSString *selectType;
@property (nonatomic,strong)NSString *selectRwarehouse;
......@@ -44,7 +45,7 @@
{
self.backgroundColor = XXFBgColor;
_dataArr = [NSMutableArray array];
NSArray *arr = @[@"发货仓库:",@"收货仓库:",@"运输类型:",@"车辆:",@"司机电话:",@"备注:"];
NSArray *arr = @[@"发货仓库:",@"收货仓库:",@"运输类型:",@"车辆:",@"司机电话:",@"预计到货时间:",@"备注:"];
[_dataArr addObjectsFromArray:arr];
_tableView = [[UITableView alloc]initWithFrame:(CGRectMake(0, TopMargin,self.frame.size.width, self.frame.size.height - TopMargin)) style:(UITableViewStylePlain)];
......@@ -68,9 +69,10 @@
cell = [[SurveyCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (indexPath.row ==0 || indexPath.row == 1 || indexPath.row == 2) {
if (indexPath.row ==0 || indexPath.row == 1 || indexPath.row == 2 || indexPath.row == 5) {
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
[self createViewInCell:cell indexPath:indexPath];
}
[cell setTitleStr:_dataArr[indexPath.row]];
......@@ -125,6 +127,9 @@
contentLabel.text = @"选择类型";
self.typeLabel = contentLabel;
}else if(indexPath.row == 5){
contentLabel.text = @"选择预计到货时间";
self.arriveDateLabel = contentLabel;
}
}
}
......@@ -161,6 +166,14 @@
self.phoneTextFiled.text = transport.carphone;
self.carphone = transport.carphone;
}
if (transport.arriveDate) {
if (transport.arriveDate.length > 15) {
_arriveDateLabel.text = [[IBTCommon checkString:transport.arriveDate]substringToIndex:16];
}
_arriveDateLabel.textColor = GXF_CONTENT_COLOR;
self.arriveDate = [IBTCommon checkString:transport.arriveDate];
}
if (transport.note) {
self.remarkTextView.text = transport.note;
self.note = transport.note;
......@@ -227,9 +240,49 @@
};
[self.delegate pushNextViewController:tvc];
}else if(indexPath.row == 5){
[self startDatePickView];
}
}
- (void)startDatePickView{
if (!_startTimeView) {
_startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64) withMode:UIDatePickerModeDateAndTime];
_startTimeView.delegate = self;
_startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5);
[AppWindow addSubview:_startTimeView];
[UIView animateWithDuration:0.15 animations:^{
CGRect startFrame = _startTimeView.frame;
startFrame.origin.y = 64;
_startTimeView.frame = startFrame;
} completion:^(BOOL finished) {
}];
}
}
- (void)cancelTimeView{
[self clearDatePickView];
}
- (void)okTimeView:(NSDate *)time{
_arriveDateLabel.textColor = GXF_CONTENT_COLOR;
_arriveDateLabel.text = [IBTCommon stringFromDateWithFormat:time format:@"yyyy-MM-dd HH:mm"];
self.arriveDate = [time httpParameterString];
// 关闭选择器
[self clearDatePickView];
}
#pragma mark - 取消
- (void)clearDatePickView{
[UIView animateWithDuration:0.15 animations:^{
CGRect startFrame = _startTimeView.frame;
startFrame.origin.y = ScreenSize.height;
_startTimeView.frame = startFrame;
} completion:^(BOOL finished) {
[_startTimeView removeFromSuperview];
_startTimeView = nil;
}];
}
- (BOOL)growingTextViewShouldReturn:(HPGrowingTextView *)growingTextView{
[self.remarkTextView resignFirstResponder];
......
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