Commit ec7d2ca3 authored by 陈俊俊's avatar 陈俊俊

bug修复

parent 7fcf730c
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
72873CEB1BA27BA6007B3387 /* GXFPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CEA1BA27BA6007B3387 /* GXFPopView.m */; }; 72873CEB1BA27BA6007B3387 /* GXFPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CEA1BA27BA6007B3387 /* GXFPopView.m */; };
72873CEE1BA280DD007B3387 /* GXFPopCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CED1BA280DD007B3387 /* GXFPopCell.m */; }; 72873CEE1BA280DD007B3387 /* GXFPopCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72873CED1BA280DD007B3387 /* GXFPopCell.m */; };
72882D8B1BA9121E00935BA6 /* ChooseProductUnitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72882D8A1BA9121E00935BA6 /* ChooseProductUnitViewController.m */; }; 72882D8B1BA9121E00935BA6 /* ChooseProductUnitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72882D8A1BA9121E00935BA6 /* ChooseProductUnitViewController.m */; };
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 */; }; 72A8132D1BCA8BBA003631F3 /* ChooseTransportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */; };
72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; }; 72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; };
72A813FD1BCD33BE003631F3 /* ReceiveBoltView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813FC1BCD33BE003631F3 /* ReceiveBoltView.m */; }; 72A813FD1BCD33BE003631F3 /* ReceiveBoltView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813FC1BCD33BE003631F3 /* ReceiveBoltView.m */; };
...@@ -710,6 +711,8 @@ ...@@ -710,6 +711,8 @@
72873CED1BA280DD007B3387 /* GXFPopCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GXFPopCell.m; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 72A813F61BCD3205003631F3 /* ReceiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReceiveViewController.h; sourceTree = "<group>"; };
...@@ -1595,6 +1598,8 @@ ...@@ -1595,6 +1598,8 @@
72A813F91BCD3205003631F3 /* Views */ = { 72A813F91BCD3205003631F3 /* Views */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
729A2E911BE60C0200493603 /* GeometryView.h */,
729A2E921BE60C0200493603 /* GeometryView.m */,
72A813FB1BCD33BE003631F3 /* ReceiveBoltView.h */, 72A813FB1BCD33BE003631F3 /* ReceiveBoltView.h */,
72A813FC1BCD33BE003631F3 /* ReceiveBoltView.m */, 72A813FC1BCD33BE003631F3 /* ReceiveBoltView.m */,
72A814161BCF9CF6003631F3 /* ReceiveProductCell.h */, 72A814161BCF9CF6003631F3 /* ReceiveProductCell.h */,
...@@ -2974,6 +2979,7 @@ ...@@ -2974,6 +2979,7 @@
7217E9F11B72364300FE5C1D /* SortMaskView.m in Sources */, 7217E9F11B72364300FE5C1D /* SortMaskView.m in Sources */,
7217E9E71B72364300FE5C1D /* Attachment.m in Sources */, 7217E9E71B72364300FE5C1D /* Attachment.m in Sources */,
72B3C0C41B9D3C7300025D81 /* TransportPurchaseViewController.m in Sources */, 72B3C0C41B9D3C7300025D81 /* TransportPurchaseViewController.m in Sources */,
729A2E931BE60C0200493603 /* GeometryView.m in Sources */,
30ECD6241B00948A0088C57A /* ICRPatrolPlanCellContentView.m in Sources */, 30ECD6241B00948A0088C57A /* ICRPatrolPlanCellContentView.m in Sources */,
72805CF31BB8E1B0009E1F82 /* TransferViewController.m in Sources */, 72805CF31BB8E1B0009E1F82 /* TransferViewController.m in Sources */,
C123A9291B26EDDA003C0C36 /* ICRQInputPopup.m in Sources */, C123A9291B26EDDA003C0C36 /* ICRQInputPopup.m in Sources */,
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
@"新建行情调研",@"查看行情调研", @"查看行情调研", @"新建行情调研",@"查看行情调研", @"查看行情调研",
@"填写行情反馈", @"填写行情反馈",
@"新建采购通知",@"查看采购通知", @"查看采购通知", @"新建采购通知",@"查看采购通知", @"查看采购通知",
@"新建采购单",@"查看采购单", @"查看采购单", @"审核采购单",//【供应商】", @"新建采购单",@"查看采购单", @"查看采购单", @"供应商确认采购单",//【供应商】",
@"新建发运单",@"查看发运单", @"查看发运单", @"新建发运单",@"查看发运单", @"查看发运单",
@"新增加工单",@"查看加工单", @"查看加工单", @"新增加工单",@"查看加工单", @"查看加工单",
@"新建转运单", @"查看转运单", @"查看转运单", @"新建转运单", @"查看转运单", @"查看转运单",
......
...@@ -164,9 +164,9 @@ ...@@ -164,9 +164,9 @@
} }
}else if([tableStr isEqualToString:GXF_BASECLASS_PRODUCTUNIT]){ }else if([tableStr isEqualToString:GXF_BASECLASS_PRODUCTUNIT]){
if (titleStr.length > 0) { 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{ }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]){ }else if([tableStr isEqualToString:GXF_BASECLASS_ACCOUNTTITLE]){
if (titleStr.length > 0) { if (titleStr.length > 0) {
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
+ (NSDate *)convertToDateFrom:(NSString *)dateString; + (NSDate *)convertToDateFrom:(NSString *)dateString;
+ (NSString *)stringFromDate:(NSDate*)aDate; + (NSString *)stringFromDate:(NSDate*)aDate;
+ (NSString *)stringFromDateWithFormat:(NSDate*)aDate format:(NSString *)format;
+ (NSString*)dictionaryToJson:(id)dic; + (NSString*)dictionaryToJson:(id)dic;
+ (NSString *)checkString:(NSString *)str; + (NSString *)checkString:(NSString *)str;
+ (NSString *)checkNull: (id)data; + (NSString *)checkNull: (id)data;
......
...@@ -181,6 +181,12 @@ ...@@ -181,6 +181,12 @@
NSString *dateString = [formatter stringFromDate:aDate]; NSString *dateString = [formatter stringFromDate:aDate];
return dateString; 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 + (NSString*)dictionaryToJson:(id)dic
......
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
case kFunctionExaminePurchase: case kFunctionExaminePurchase:
{ {
PurchaseViewController *tVC = [[PurchaseViewController alloc] init]; PurchaseViewController *tVC = [[PurchaseViewController alloc] init];
tVC.title = @"审核采购单"; tVC.title = @"供应商确认采购单";
tVC.assessorVendor = [ICRUserUtil sharedInstance].userId; tVC.assessorVendor = [ICRUserUtil sharedInstance].userId;
[self PushViewController:tVC animated:YES]; [self PushViewController:tVC animated:YES];
} }
......
...@@ -294,7 +294,7 @@ typedef enum : NSUInteger { ...@@ -294,7 +294,7 @@ typedef enum : NSUInteger {
@"receiveWrh_name":[IBTCommon checkString:_purchaseView.receiveWrh_name], @"receiveWrh_name":[IBTCommon checkString:_purchaseView.receiveWrh_name],
@"total":_purchaseView.total, @"total":_purchaseView.total,
@"charge":_purchaseView.chargePurchase, @"charge":_purchaseView.chargePurchase,
@"remark":_purchaseView.remark, @"remark":[IBTCommon checkString:_purchaseView.remark],
@"products":billProducts}; @"products":billProducts};
[IBTLoadingView showProgressLabel:msg]; [IBTLoadingView showProgressLabel:msg];
[[ICRHTTPController sharedController] savePurchaseWithData:dict success:succ failure:fail]; [[ICRHTTPController sharedController] savePurchaseWithData:dict success:succ failure:fail];
......
...@@ -126,7 +126,6 @@ typedef enum : NSUInteger { ...@@ -126,7 +126,6 @@ typedef enum : NSUInteger {
[self changeBtnFrame:_secondBtn title:@"审核通过" originX:CGRectGetMaxX(_firstBtn.frame) + LeftMargin width:TwoWidth]; [self changeBtnFrame:_secondBtn title:@"审核通过" originX:CGRectGetMaxX(_firstBtn.frame) + LeftMargin width:TwoWidth];
_firstBtn.tag = RejectTag; _firstBtn.tag = RejectTag;
_secondBtn.tag = PassTag; _secondBtn.tag = PassTag;
self.indexStyle = 1;
}else{ }else{
[self hiddenTwoBtn]; [self hiddenTwoBtn];
} }
...@@ -136,9 +135,7 @@ typedef enum : NSUInteger { ...@@ -136,9 +135,7 @@ typedef enum : NSUInteger {
_firstBtn.hidden = YES; _firstBtn.hidden = YES;
[self changeBtnFrame:_secondBtn title:@"确认" originX:LeftMargin width:OneWidth]; [self changeBtnFrame:_secondBtn title:@"确认" originX:LeftMargin width:OneWidth];
_secondBtn.tag = SureTag; _secondBtn.tag = SureTag;
self.indexStyle = 1;
}else{ }else{
self.indexStyle = 0;
if ([self checkIsPermission:PURCHASE_PERMISSIONS_FINISH]&&[self checkIsPermission:PURCHASE_PERMISSIONS_ABORT]) { if ([self checkIsPermission:PURCHASE_PERMISSIONS_FINISH]&&[self checkIsPermission:PURCHASE_PERMISSIONS_ABORT]) {
//显示结束和作废按钮 //显示结束和作废按钮
[self changeBtnFrame:_firstBtn title:@"结束" originX:LeftMargin width:TwoWidth]; [self changeBtnFrame:_firstBtn title:@"结束" originX:LeftMargin width:TwoWidth];
...@@ -167,7 +164,6 @@ typedef enum : NSUInteger { ...@@ -167,7 +164,6 @@ typedef enum : NSUInteger {
_firstBtn.hidden = YES; _firstBtn.hidden = YES;
[self changeBtnFrame:_secondBtn title:@"作废" originX:LeftMargin width:OneWidth]; [self changeBtnFrame:_secondBtn title:@"作废" originX:LeftMargin width:OneWidth];
_secondBtn.tag = CancleTag; _secondBtn.tag = CancleTag;
self.indexStyle = 0;
}else{ }else{
[self hiddenTwoBtn]; [self hiddenTwoBtn];
...@@ -180,7 +176,6 @@ typedef enum : NSUInteger { ...@@ -180,7 +176,6 @@ typedef enum : NSUInteger {
- (void)hiddenTwoBtn{ - (void)hiddenTwoBtn{
_firstBtn.hidden = YES; _firstBtn.hidden = YES;
_secondBtn.hidden = YES; _secondBtn.hidden = YES;
self.indexStyle = 1;
CGRect scrollViewFrame = _scrollView.frame; CGRect scrollViewFrame = _scrollView.frame;
scrollViewFrame.size.height = ScreenSize.height - 64; scrollViewFrame.size.height = ScreenSize.height - 64;
_scrollView.frame = scrollViewFrame; _scrollView.frame = scrollViewFrame;
...@@ -290,13 +285,8 @@ typedef enum : NSUInteger { ...@@ -290,13 +285,8 @@ typedef enum : NSUInteger {
} }
- (void)createPurchaseView{ - (void)createPurchaseView{
if (self.indexStyle == 0) { _leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"最后修改人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
}else if (self.indexStyle == 1) {
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"审核人:",@"状态:",@"类型:",@"供应商:",@"供应商确认:",@"收货仓库:",@"其他费用:",@"总金额:",@"备注:"];
}else{
_leftArr = @[@"单号:",@"采购通知单:",@"创建人:",@"审核人:",@"状态:",@"供应商:",@"其他费用:",@"总金额:",@"备注:"];
}
_purchaseView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*_leftArr.count +LeftMargin)]; _purchaseView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*_leftArr.count +LeftMargin)];
_purchaseView.backgroundColor = [UIColor whiteColor]; _purchaseView.backgroundColor = [UIColor whiteColor];
[_scrollView addSubview:_purchaseView]; [_scrollView addSubview:_purchaseView];
...@@ -318,6 +308,16 @@ typedef enum : NSUInteger { ...@@ -318,6 +308,16 @@ typedef enum : NSUInteger {
self.noticeNumberLabel = rightLabel; self.noticeNumberLabel = rightLabel;
}else if(i == 2){ }else if(i == 2){
self.createOperNameLabel = rightLabel; 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){ }else if(i == _leftArr.count - 3){
self.otherPriceLabel = rightLabel; self.otherPriceLabel = rightLabel;
}else if(i == _leftArr.count - 2){ }else if(i == _leftArr.count - 2){
...@@ -326,36 +326,6 @@ typedef enum : NSUInteger { ...@@ -326,36 +326,6 @@ typedef enum : NSUInteger {
rightLabel.numberOfLines = 0; rightLabel.numberOfLines = 0;
self.noteLabel = rightLabel; 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]; [_purchaseView addSubview:rightLabel];
} }
} }
......
...@@ -132,8 +132,8 @@ typedef enum : NSUInteger { ...@@ -132,8 +132,8 @@ typedef enum : NSUInteger {
[self.selectUsers addObject:self.purchaseNotice.purchaserUuid]; [self.selectUsers addObject:self.purchaseNotice.purchaserUuid];
} }
if (self.purchaseNotice.finishDate) { if (self.purchaseNotice.finishDate) {
if (self.purchaseNotice.finishDate.length > 9) { if (self.purchaseNotice.finishDate.length > 15) {
_finishDateLabel.text = [[IBTCommon checkString:self.purchaseNotice.finishDate]substringToIndex:10]; _finishDateLabel.text = [[IBTCommon checkString:self.purchaseNotice.finishDate]substringToIndex:16];
} }
_finishDateLabel.textColor = GXF_CONTENT_COLOR; _finishDateLabel.textColor = GXF_CONTENT_COLOR;
self.finishDateStr = [IBTCommon checkString:self.purchaseNotice.finishDate]; self.finishDateStr = [IBTCommon checkString:self.purchaseNotice.finishDate];
...@@ -429,7 +429,7 @@ typedef enum : NSUInteger { ...@@ -429,7 +429,7 @@ typedef enum : NSUInteger {
-(void)addShopeDetailed -(void)addShopeDetailed
{ {
NoticeProductViewController *nvc = [NoticeProductViewController new]; NoticeProductViewController *nvc = [NoticeProductViewController new];
nvc.navTitle = @"添加商品"; nvc.navTitle = @"添加商品明细";
nvc.choseNoticeProduct = ^(NoticeProduct *product,NSIndexPath *indexPath){ nvc.choseNoticeProduct = ^(NoticeProduct *product,NSIndexPath *indexPath){
if (product) { if (product) {
[_shopeArr addObject:product]; [_shopeArr addObject:product];
...@@ -461,7 +461,7 @@ typedef enum : NSUInteger { ...@@ -461,7 +461,7 @@ typedef enum : NSUInteger {
NoticeProduct *shopDetail=[_shopeArr objectAtIndex:button.tag]; NoticeProduct *shopDetail=[_shopeArr objectAtIndex:button.tag];
if (indexPath) { if (indexPath) {
nvc.navTitle = @"编辑费用"; nvc.navTitle = @"编辑商品明细";
nvc.indexPath = indexPath; nvc.indexPath = indexPath;
nvc.noticeProduct = shopDetail; nvc.noticeProduct = shopDetail;
} }
...@@ -539,7 +539,7 @@ typedef enum : NSUInteger { ...@@ -539,7 +539,7 @@ typedef enum : NSUInteger {
} }
- (void)startDatePickView{ - (void)startDatePickView{
if (!_startTimeView) { if (!_startTimeView) {
_startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64)]; _startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64) withMode:UIDatePickerModeDateAndTime];
_startTimeView.delegate = self; _startTimeView.delegate = self;
_startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5); _startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5);
[self.view addSubview:_startTimeView]; [self.view addSubview:_startTimeView];
...@@ -559,7 +559,7 @@ typedef enum : NSUInteger { ...@@ -559,7 +559,7 @@ typedef enum : NSUInteger {
- (void)okTimeView:(NSDate *)time{ - (void)okTimeView:(NSDate *)time{
_finishDateLabel.textColor = GXF_CONTENT_COLOR; _finishDateLabel.textColor = GXF_CONTENT_COLOR;
_finishDateLabel.text = [IBTCommon stringFromDate:time]; _finishDateLabel.text = [IBTCommon stringFromDateWithFormat:time format:@"yyyy-MM-dd HH:mm"];
self.finishDateStr = [time httpParameterString]; self.finishDateStr = [time httpParameterString];
// 关闭选择器 // 关闭选择器
[self clearDatePickView]; [self clearDatePickView];
...@@ -601,6 +601,7 @@ typedef enum : NSUInteger { ...@@ -601,6 +601,7 @@ typedef enum : NSUInteger {
}else{//提交成功 }else{//提交成功
PurchaseNoticeViewController *svc = [PurchaseNoticeViewController new]; PurchaseNoticeViewController *svc = [PurchaseNoticeViewController new];
svc.title = @"查看采购通知单";
[self PushViewController:svc animated:YES]; [self PushViewController:svc animated:YES];
} }
}else{ }else{
...@@ -630,13 +631,13 @@ typedef enum : NSUInteger { ...@@ -630,13 +631,13 @@ typedef enum : NSUInteger {
NSDictionary *dict = @{@"uuid":uuidObject,//唯一标识 NSDictionary *dict = @{@"uuid":uuidObject,//唯一标识
@"billnumber":billNumberObject, @"billnumber":billNumberObject,
@"version":versionObject, @"version":versionObject,
@"title":self.titleStr, @"title":[IBTCommon checkString:self.titleStr],
@"state":state, @"state":[IBTCommon checkString:state],
@"purchaserUuid":self.purchaseUuidStr, @"purchaserUuid":[IBTCommon checkString:self.purchaseUuidStr],
@"purchaserCode":self.purchaseCodeStr, @"purchaserCode":[IBTCommon checkString:self.purchaseCodeStr],
@"purchaserName":self.purchaseNameStr, @"purchaserName":[IBTCommon checkString:self.purchaseNameStr],
@"finishDate":[IBTCommon checkString:self.finishDateStr], @"finishDate":[IBTCommon checkString:self.finishDateStr],
@"remark":self.remarkStr, @"remark":[IBTCommon checkString:self.remarkStr],
@"products":billProducts}; @"products":billProducts};
[IBTLoadingView showProgressLabel:msg]; [IBTLoadingView showProgressLabel:msg];
[[ICRHTTPController sharedController] savePurchaseNoticeWithData:dict success:succ failure:fail]; [[ICRHTTPController sharedController] savePurchaseNoticeWithData:dict success:succ failure:fail];
......
...@@ -391,11 +391,11 @@ typedef enum : NSUInteger { ...@@ -391,11 +391,11 @@ typedef enum : NSUInteger {
if ([purchaseNotice.state isEqualToString:PURCHASENOTICE_STATE_INITIAL]) { if ([purchaseNotice.state isEqualToString:PURCHASENOTICE_STATE_INITIAL]) {
NewPurchaseNoticeViewController *nvc = [NewPurchaseNoticeViewController new]; NewPurchaseNoticeViewController *nvc = [NewPurchaseNoticeViewController new];
nvc.purchaseNotice = purchaseNotice; nvc.purchaseNotice = purchaseNotice;
nvc.title = @"修改采购通知单"; nvc.title = @"修改采购通知单";
[self PushViewController:nvc animated:YES]; [self PushViewController:nvc animated:YES];
}else{ }else{
SeePurchaseNoticeViewController *pvc = [SeePurchaseNoticeViewController new]; SeePurchaseNoticeViewController *pvc = [SeePurchaseNoticeViewController new];
pvc.title = @"查看采购通知单"; pvc.title = @"查看采购通知单";
pvc.purchaseNotice = purchaseNotice; pvc.purchaseNotice = purchaseNotice;
[self PushViewController:pvc animated:YES]; [self PushViewController:pvc animated:YES];
} }
......
...@@ -27,5 +27,10 @@ ...@@ -27,5 +27,10 @@
@property (nonatomic,strong)NSString *remark;//备注 @property (nonatomic,strong)NSString *remark;//备注
@property (nonatomic,assign)BOOL IsDeleted;//是否删除 @property (nonatomic,assign)BOOL IsDeleted;//是否删除
@property (nonatomic,assign)BOOL IsXiuGai;//是否删除 @property (nonatomic,assign)BOOL IsXiuGai;//是否删除
//新增
@property (nonatomic,strong)NSString *sourceBillNumber;//来源单号
@property (nonatomic,strong)NSString *sourceDetail;//来源单号id
@property (nonatomic,strong)NSString *sourceType;//来源类型
@end @end
...@@ -119,15 +119,25 @@ typedef enum : NSUInteger { ...@@ -119,15 +119,25 @@ typedef enum : NSUInteger {
self.shopDetail.packageQpcUnit ? (_baseCountLabel.text = self.shopDetail.packageQpcUnit) : (_baseCountLabel.text = @"斤"); self.shopDetail.packageQpcUnit ? (_baseCountLabel.text = self.shopDetail.packageQpcUnit) : (_baseCountLabel.text = @"斤");
//包装数量 //包装数量
if ([self.shopDetail.packageQuantity integerValue] > 0) {
packageQuantity.text=self.shopDetail.packageQuantity; packageQuantity.text=self.shopDetail.packageQuantity;
}
//基础数量 //基础数量
foundationQuantity.text=self.shopDetail.foundationQuantity; foundationQuantity.text=self.shopDetail.foundationQuantity;
//基础单价 //基础单价
if ([self.shopDetail.foundationUnitPrice floatValue] > 0) {
foundationUnitPrice.text=self.shopDetail.foundationUnitPrice; foundationUnitPrice.text=self.shopDetail.foundationUnitPrice;
}
//包装单价 //包装单价
if ([self.shopDetail.packageUnitPrice floatValue] > 0) {
packageUnitPrice.text=self.shopDetail.packageUnitPrice; packageUnitPrice.text=self.shopDetail.packageUnitPrice;
}
//总金额 //总金额
if ([self.shopDetail.totalMoney floatValue] <= 0) {
totalMoney.text=@"0.00";
}else{
totalMoney.text=self.shopDetail.totalMoney; totalMoney.text=self.shopDetail.totalMoney;
}
//备注 //备注
remark.text=self.shopDetail.remark; remark.text=self.shopDetail.remark;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#import "HPGrowingTextView.h" #import "HPGrowingTextView.h"
#import "ChooseProductViewController.h" #import "ChooseProductViewController.h"
#import "ChooseProductUnitViewController.h" #import "ChooseProductUnitViewController.h"
#import "GeometryView.h"
#define LeftMargin 15 #define LeftMargin 15
#define BtnHeight 44 #define BtnHeight 44
#define TableRowHeight 46 #define TableRowHeight 46
...@@ -31,14 +32,17 @@ ...@@ -31,14 +32,17 @@
UILabel *_chooseBaseCountLabel; UILabel *_chooseBaseCountLabel;
UILabel *_choosePackPriceLabel; UILabel *_choosePackPriceLabel;
UILabel *_chooseBasePriceLabel; UILabel *_chooseBasePriceLabel;
UILabel *_chooseTotalLabel;
UILabel *_chooseTotalPriceLabel; UILabel *_chooseTotalPriceLabel;
UITextField *_shPackField; UITextField *_shPackField;
UITextField *_shBaseQuantityField; UITextField *_shBaseQuantityField;
UILabel *_shjcLabel; UILabel *_shjcLabel;
UILabel *_shbzLabel; UILabel *_shbzLabel;
HPGrowingTextView *_noteTextView; HPGrowingTextView *_noteTextView;
GeometryView *_geometryView;
} }
@property (nonatomic,strong)NSString *productNameStr; @property (nonatomic,strong)NSString *productNameStr;
@property (nonatomic,strong)NSString *productCodeStr; @property (nonatomic,strong)NSString *productCodeStr;
...@@ -65,13 +69,11 @@ ...@@ -65,13 +69,11 @@
[_dataArr addObject:@"商品"]; [_dataArr addObject:@"商品"];
[_dataArr addObject:@"包装单位"]; [_dataArr addObject:@"包装单位"];
[_dataArr addObject:@"包装规格"]; [_dataArr addObject:@"包装规格"];
[_dataArr addObject:@"包装数量"];
[_dataArr addObject:@"包装数量[收货]"];
[_dataArr addObject:@"基础数量"];
[_dataArr addObject:@"基础数量[收货]"];
[_dataArr addObject:@"包装单价"]; [_dataArr addObject:@"包装单价"];
[_dataArr addObject:@"基础单价"]; [_dataArr addObject:@"基础单价"];
[_dataArr addObject:@"总金额[收货]"]; [_dataArr addObject:@"包装数量[实收]"];
[_dataArr addObject:@"基础数量[实收]"];
[_dataArr addObject:@"总金额[实收]"];
[_dataArr addObject:@"备注"]; [_dataArr addObject:@"备注"];
} }
...@@ -83,15 +85,51 @@ ...@@ -83,15 +85,51 @@
_tableView.delegate = self; _tableView.delegate = self;
_tableView.dataSource = self; _tableView.dataSource = self;
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)]; UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 60+TableRowHeight* 3)];
UILabel *lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin * 2, 1))];
lineLabel.backgroundColor = GXF_LINE_COLOR;
lineLabel.font = GXF_FIFTEENTEN_SIZE;
[footView addSubview:lineLabel];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 5, (ScreenSize.width - LeftMargin*2), BtnHeight) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_COMMIT_COLOR]; _geometryView = [GeometryView new];
_geometryView.frame = CGRectMake(LeftMargin/2, 5, ScreenSize.width - LeftMargin, TableRowHeight* 3);
[footView addSubview:_geometryView];
[self createBottomField];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, _geometryView.bottom + 5, (ScreenSize.width - LeftMargin*2), BtnHeight) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn]; [footView addSubview:commitBtn];
_tableView.tableFooterView = footView; _tableView.tableFooterView = footView;
[self.view addSubview:_tableView]; [self.view addSubview:_tableView];
} }
- (void)createBottomField{
NSArray *arr = @[@"包装数量[待收]:",@"基础数量[待收]:",@"总金额[待收]:"];
for (NSInteger i =0; i < arr.count; i++) {
UILabel *label =[[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin/2, i*TableRowHeight, 110, TableRowHeight))];
label.textAlignment= NSTextAlignmentLeft;
label.textColor = GXF_LEFTSIX_COLOR;
label.font = GXF_FIFTEENTEN_SIZE;
label.text = arr[i];
[_geometryView addSubview:label];
UILabel *contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(label.right, i*TableRowHeight, _geometryView.width - label.width -LeftMargin, TableRowHeight)];
contentLabel.textAlignment= NSTextAlignmentRight;
contentLabel.textColor = GXF_CONTENT_COLOR;
contentLabel.font = GXF_FIFTEENTEN_SIZE;
[_geometryView addSubview:contentLabel];
if (i == 0) {
_choosePackCountLabel = contentLabel;
}else if(i == 1){
_chooseBaseCountLabel = contentLabel;
}else if(i == 2){
_chooseTotalLabel = contentLabel;
}
}
}
#pragma mark - 按钮点击事件 #pragma mark - 按钮点击事件
- (void)btnClick:(UIButton *)btn{ - (void)btnClick:(UIButton *)btn{
if ([self checkCost]) { if ([self checkCost]) {
...@@ -158,7 +196,7 @@ ...@@ -158,7 +196,7 @@
CGRect lineFrame = cell.lineLabel.frame; CGRect lineFrame = cell.lineLabel.frame;
lineFrame.origin.y = TableRowHeight*2-1; lineFrame.origin.y = TableRowHeight*2-1;
cell.lineLabel.frame = lineFrame; cell.lineLabel.frame = lineFrame;
}else if(indexPath.row == 4 || indexPath.row == 6){ }else if(indexPath.row == 5 || indexPath.row == 6){
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(cell.titleLabel.right, 0, ScreenSize.width - cell.titleLabel.width - LeftMargin*2-30, TableRowHeight)]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(cell.titleLabel.right, 0, ScreenSize.width - cell.titleLabel.width - LeftMargin*2-30, TableRowHeight)];
textField.textAlignment = NSTextAlignmentRight; textField.textAlignment = NSTextAlignmentRight;
textField.textColor = GXF_CONTENT_COLOR; textField.textColor = GXF_CONTENT_COLOR;
...@@ -166,6 +204,7 @@ ...@@ -166,6 +204,7 @@
textField.returnKeyType = UIReturnKeyDone; textField.returnKeyType = UIReturnKeyDone;
textField.keyboardType = UIKeyboardTypeDecimalPad; textField.keyboardType = UIKeyboardTypeDecimalPad;
textField.delegate = self; textField.delegate = self;
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
[cell.contentView addSubview:textField]; [cell.contentView addSubview:textField];
textField.textColor = [UIColor redColor]; textField.textColor = [UIColor redColor];
...@@ -173,15 +212,13 @@ ...@@ -173,15 +212,13 @@
label.textColor = GXF_CONTENT_COLOR; label.textColor = GXF_CONTENT_COLOR;
label.font = GXF_FIFTEENTEN_SIZE; label.font = GXF_FIFTEENTEN_SIZE;
[cell.contentView addSubview:label]; [cell.contentView addSubview:label];
if (indexPath.row == 4) { if (indexPath.row == 5) {
_shbzLabel = label; _shbzLabel = label;
textField.placeholder = @"输入包装数量(收货)"; textField.placeholder = @"输入包装数量(实收)";
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
_shPackField = textField; _shPackField = textField;
}else if(indexPath.row == 6){ }else if(indexPath.row == 6){
_shjcLabel = label; _shjcLabel = label;
textField.enabled = NO; textField.placeholder = @"输入基础数量(实收)";
textField.placeholder = @"基础数量(收货)";
_shBaseQuantityField = textField; _shBaseQuantityField = textField;
} }
}else{ }else{
...@@ -198,16 +235,16 @@ ...@@ -198,16 +235,16 @@
}else if(indexPath.row == 2) { }else if(indexPath.row == 2) {
_choosePackStandLabel = contentLabel; _choosePackStandLabel = contentLabel;
}else if(indexPath.row == 3) { }else if(indexPath.row == 3) {
_choosePackCountLabel = contentLabel;
}else if(indexPath.row == 5) {
_chooseBaseCountLabel = contentLabel;
}else if(indexPath.row == 7) {
_choosePackPriceLabel = contentLabel; _choosePackPriceLabel = contentLabel;
}else if(indexPath.row == 8) { }else if(indexPath.row == 4) {
_chooseBasePriceLabel = contentLabel; _chooseBasePriceLabel = contentLabel;
}else if(indexPath.row == 9) { }else if(indexPath.row == 7) {
_chooseTotalPriceLabel= contentLabel; _chooseTotalPriceLabel= contentLabel;
_chooseTotalPriceLabel.textColor = [UIColor redColor]; _chooseTotalPriceLabel.textColor = [UIColor redColor];
}else if(indexPath.row == 8) {
_choosePackCountLabel = contentLabel;
}else if(indexPath.row == 9) {
_chooseBaseCountLabel= contentLabel;
} }
} }
if (self.noticeProduct) { if (self.noticeProduct) {
...@@ -222,6 +259,7 @@ ...@@ -222,6 +259,7 @@
_choosePackStandLabel.text = [NSString stringWithFormat:@"1*%@ %@",self.noticeProduct.qpc,self.noticeProduct.baseUnit]; _choosePackStandLabel.text = [NSString stringWithFormat:@"1*%@ %@",self.noticeProduct.qpc,self.noticeProduct.baseUnit];
_choosePackCountLabel.text = [NSString stringWithFormat:@"%@ %@",self.noticeProduct.qty,self.noticeProduct.unit]; _choosePackCountLabel.text = [NSString stringWithFormat:@"%@ %@",self.noticeProduct.qty,self.noticeProduct.unit];
_chooseBaseCountLabel.text = [NSString stringWithFormat:@"%@ %@",self.noticeProduct.baseQty,self.noticeProduct.baseUnit]; _chooseBaseCountLabel.text = [NSString stringWithFormat:@"%@ %@",self.noticeProduct.baseQty,self.noticeProduct.baseUnit];
_chooseTotalLabel.text = [NSString stringWithFormat:@"%@元",self.noticeProduct.total];
_choosePackPriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.packprice]; _choosePackPriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.packprice];
_chooseBasePriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.price]; _chooseBasePriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.price];
...@@ -237,7 +275,7 @@ ...@@ -237,7 +275,7 @@
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.rctTotal]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.rctTotal];
}else { }else {
_chooseTotalPriceLabel.text = @"0 元"; _chooseTotalPriceLabel.text = @"0.00元";
} }
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
...@@ -249,6 +287,7 @@ ...@@ -249,6 +287,7 @@
- (void)textChange:(UITextField *)textField{ - (void)textChange:(UITextField *)textField{
if (textField == _shPackField) {
if (_shPackField.text.length > 0) { if (_shPackField.text.length > 0) {
float total = [_shPackField.text floatValue] * [self.noticeProduct.packprice floatValue]; float total = [_shPackField.text floatValue] * [self.noticeProduct.packprice floatValue];
float baseCount = 0; float baseCount = 0;
...@@ -256,9 +295,21 @@ ...@@ -256,9 +295,21 @@
baseCount = total / [self.noticeProduct.price floatValue]; baseCount = total / [self.noticeProduct.price floatValue];
} }
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f",total]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f元",total];
_shBaseQuantityField.text = [NSString stringWithFormat:@"%.0f",baseCount]; _shBaseQuantityField.text = [NSString stringWithFormat:@"%.0f",baseCount];
} }
}else if (textField == _shBaseQuantityField) {
if (_shBaseQuantityField.text.length > 0) {
float total = [_shBaseQuantityField.text floatValue] * [self.noticeProduct.price floatValue];
float baseCount = 0;
if ([self.noticeProduct.packprice floatValue] > 0) {
baseCount = total / [self.noticeProduct.packprice floatValue];
}
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.2f元",total];
_shPackField.text = [NSString stringWithFormat:@"%.0f",baseCount];
}
}
} }
......
...@@ -340,7 +340,7 @@ typedef enum : NSUInteger { ...@@ -340,7 +340,7 @@ typedef enum : NSUInteger {
@"carnumber":[IBTCommon checkString:self.transfer.carnumber], @"carnumber":[IBTCommon checkString:self.transfer.carnumber],
@"type":[IBTCommon checkString:self.transfer.type], @"type":[IBTCommon checkString:self.transfer.type],
@"carphone":[IBTCommon checkString:self.transfer.carphone], @"carphone":[IBTCommon checkString:self.transfer.carphone],
@"note":self.transfer.note, @"note":[IBTCommon checkString:self.transfer.note],
@"pdtDetails":billProducts, @"pdtDetails":billProducts,
}; };
[IBTLoadingView showProgressLabel:msg]; [IBTLoadingView showProgressLabel:msg];
......
//
// 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 @@ ...@@ -72,12 +72,25 @@
self.showbzdwLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showbzdwLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showbzdwLabel.font = GXF_THREETEENTH_SIZE; 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.textAlignment = NSTextAlignmentLeft;
self.showbzCountLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showbzCountLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showbzCountLabel.font = GXF_THREETEENTH_SIZE; 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.textAlignment = NSTextAlignmentLeft;
self.showshCountLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showshCountLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showshCountLabel.font = GXF_THREETEENTH_SIZE; self.showshCountLabel.font = GXF_THREETEENTH_SIZE;
...@@ -92,23 +105,14 @@ ...@@ -92,23 +105,14 @@
self.showshjcCountLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showshjcCountLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showshjcCountLabel.font = GXF_THREETEENTH_SIZE; 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.showTotalLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showjcCountLabel.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.textAlignment = NSTextAlignmentLeft; self.showTotalLabel.textAlignment = NSTextAlignmentLeft;
self.showTotalLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showTotalLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showTotalLabel.font = GXF_THREETEENTH_SIZE; 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.textAlignment = NSTextAlignmentLeft;
self.showshTotalLabel.textColor = GXF_PLACEHOLDER_COLOR; self.showshTotalLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showshTotalLabel.font = GXF_THREETEENTH_SIZE; self.showshTotalLabel.font = GXF_THREETEENTH_SIZE;
...@@ -163,16 +167,16 @@ ...@@ -163,16 +167,16 @@
self.showbzdwLabel.text = [NSString stringWithFormat:@"包装单位:%@",transferProduct.unit]; self.showbzdwLabel.text = [NSString stringWithFormat:@"包装单位:%@",transferProduct.unit];
self.showbzCountLabel.text =[NSString stringWithFormat:@"包装数量:%@%@",transferProduct.qty,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.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.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",transferProduct.packprice];
self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",transferProduct.price]; 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.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",transferProduct.total?transferProduct.total:@"0"];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ];
......
...@@ -17,5 +17,6 @@ ...@@ -17,5 +17,6 @@
@interface StartTimeView : UIView @interface StartTimeView : UIView
@property (nonatomic,weak)id<StartTimeViewDelegate>delegate; @property (nonatomic,weak)id<StartTimeViewDelegate>delegate;
- (instancetype)initWithFrame:(CGRect)frame withMode:(UIDatePickerMode)timeMode
;
@end @end
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
UIView *_bgView; UIView *_bgView;
UIDatePicker *_timePicker; UIDatePicker *_timePicker;
} }
@property (nonatomic,assign)UIDatePickerMode timeMode;
@end @end
@implementation StartTimeView @implementation StartTimeView
...@@ -20,6 +21,16 @@ ...@@ -20,6 +21,16 @@
{ {
self = [super initWithFrame:frame]; self = [super initWithFrame:frame];
if (self) { 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]; [self bulidLayout];
} }
return self; return self;
...@@ -37,7 +48,7 @@ ...@@ -37,7 +48,7 @@
_timePicker= [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 30,ScreenSize.width, DateViewHeight - 30)]; _timePicker= [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 30,ScreenSize.width, DateViewHeight - 30)];
_timePicker.backgroundColor = [UIColor whiteColor]; _timePicker.backgroundColor = [UIColor whiteColor];
_timePicker.datePickerMode = UIDatePickerModeDate; _timePicker.datePickerMode = self.timeMode;
_timePicker.locale = [[NSLocale alloc]initWithLocaleIdentifier:@"zh_CN"]; _timePicker.locale = [[NSLocale alloc]initWithLocaleIdentifier:@"zh_CN"];
// // 设置最小时间段,防止用户的出现已过去的时间 // // 设置最小时间段,防止用户的出现已过去的时间
// _timePicker.minimumDate = [NSDate date]; // _timePicker.minimumDate = [NSDate date];
......
...@@ -215,7 +215,7 @@ typedef enum : NSUInteger { ...@@ -215,7 +215,7 @@ typedef enum : NSUInteger {
@"type":[IBTCommon checkString:_sheetView.type], @"type":[IBTCommon checkString:_sheetView.type],
@"carphone":[IBTCommon checkString:_sheetView.carphone], @"carphone":[IBTCommon checkString:_sheetView.carphone],
@"arriveDate":[IBTCommon checkString:_sheetView.arriveDate], @"arriveDate":[IBTCommon checkString:_sheetView.arriveDate],
@"note":_sheetView.note, @"note":[IBTCommon checkString:_sheetView.note],
@"pdtDetails":billProducts, @"pdtDetails":billProducts,
@"accountDetails":costs @"accountDetails":costs
}; };
...@@ -372,9 +372,9 @@ typedef enum : NSUInteger { ...@@ -372,9 +372,9 @@ typedef enum : NSUInteger {
billProduct.note = shopDetail.remark; billProduct.note = shopDetail.remark;
billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ; billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ;
billProduct.baseUnit = shopDetail.packageQpcUnit; billProduct.baseUnit = shopDetail.packageQpcUnit;
billProduct.sourcetype = @"none"; billProduct.sourcetype = shopDetail.sourceType;
// billProduct.sourcebillnumber = @"11111111"; billProduct.sourcebillnumber = shopDetail.sourceBillNumber;
// billProduct.sourcePdtDetail = @"33333333"; billProduct.sourcePdtDetail = shopDetail.sourceDetail;
return billProduct; return billProduct;
} }
- (ShopDetail *)coverShopDetail:(TransferPdtDetail *)billProduct{ - (ShopDetail *)coverShopDetail:(TransferPdtDetail *)billProduct{
...@@ -393,6 +393,9 @@ typedef enum : NSUInteger { ...@@ -393,6 +393,9 @@ typedef enum : NSUInteger {
shopDetail.remark = billProduct.note; shopDetail.remark = billProduct.note;
shopDetail.packageQpcUnit = billProduct.baseUnit; shopDetail.packageQpcUnit = billProduct.baseUnit;
shopDetail.packageQpcStr = billProduct.qpcStr; shopDetail.packageQpcStr = billProduct.qpcStr;
shopDetail.sourceBillNumber = billProduct.sourcebillnumber;
shopDetail.sourceDetail = billProduct.sourcePdtDetail;
shopDetail.sourceType = billProduct.sourcetype;
return shopDetail; return shopDetail;
} }
......
...@@ -169,8 +169,8 @@ ...@@ -169,8 +169,8 @@
self.carphone = transfer.carphone; self.carphone = transfer.carphone;
} }
if (transfer.arriveDate) { if (transfer.arriveDate) {
if (transfer.arriveDate.length > 9) { if (transfer.arriveDate.length > 15) {
_arriveDateLabel.text = [[IBTCommon checkString:transfer.arriveDate]substringToIndex:10]; _arriveDateLabel.text = [[IBTCommon checkString:transfer.arriveDate]substringToIndex:16];
} }
_arriveDateLabel.textColor = GXF_CONTENT_COLOR; _arriveDateLabel.textColor = GXF_CONTENT_COLOR;
self.arriveDate = [IBTCommon checkString:transfer.arriveDate]; self.arriveDate = [IBTCommon checkString:transfer.arriveDate];
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
} }
- (void)startDatePickView{ - (void)startDatePickView{
if (!_startTimeView) { if (!_startTimeView) {
_startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64)]; _startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64)withMode:UIDatePickerModeDateAndTime];
_startTimeView.delegate = self; _startTimeView.delegate = self;
_startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5); _startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5);
[AppWindow addSubview:_startTimeView]; [AppWindow addSubview:_startTimeView];
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
- (void)okTimeView:(NSDate *)time{ - (void)okTimeView:(NSDate *)time{
_arriveDateLabel.textColor = GXF_CONTENT_COLOR; _arriveDateLabel.textColor = GXF_CONTENT_COLOR;
_arriveDateLabel.text = [IBTCommon stringFromDate:time]; _arriveDateLabel.text = [IBTCommon stringFromDateWithFormat:time format:@"yyyy-MM-dd HH:mm"];
self.arriveDate = [time httpParameterString]; self.arriveDate = [time httpParameterString];
// 关闭选择器 // 关闭选择器
[self clearDatePickView]; [self clearDatePickView];
......
...@@ -220,7 +220,7 @@ typedef enum : NSUInteger { ...@@ -220,7 +220,7 @@ typedef enum : NSUInteger {
@"type":[IBTCommon checkString:_sheetView.type], @"type":[IBTCommon checkString:_sheetView.type],
@"carphone":[IBTCommon checkString:_sheetView.carphone], @"carphone":[IBTCommon checkString:_sheetView.carphone],
@"arriveDate":[IBTCommon checkString:_sheetView.arriveDate], @"arriveDate":[IBTCommon checkString:_sheetView.arriveDate],
@"note":_sheetView.note, @"note":[IBTCommon checkString:_sheetView.note],
@"pdtDetails":billProducts, @"pdtDetails":billProducts,
@"accountDetails":costs}; @"accountDetails":costs};
[IBTLoadingView showProgressLabel:msg]; [IBTLoadingView showProgressLabel:msg];
...@@ -372,7 +372,8 @@ typedef enum : NSUInteger { ...@@ -372,7 +372,8 @@ typedef enum : NSUInteger {
billProduct.note = shopDetail.remark; billProduct.note = shopDetail.remark;
billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ; billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ;
billProduct.baseUnit = shopDetail.packageQpcUnit; billProduct.baseUnit = shopDetail.packageQpcUnit;
billProduct.purchasebillnumber = shopDetail.sourceBillNumber;
billProduct.purchasePdtDetail = shopDetail.sourceDetail;
return billProduct; return billProduct;
} }
- (ShopDetail *)coverShopDetail:(TransportPdtDetail *)billProduct{ - (ShopDetail *)coverShopDetail:(TransportPdtDetail *)billProduct{
...@@ -389,6 +390,8 @@ typedef enum : NSUInteger { ...@@ -389,6 +390,8 @@ typedef enum : NSUInteger {
shopDetail.foundationQuantity= [billProduct.baseQty stringValue]; shopDetail.foundationQuantity= [billProduct.baseQty stringValue];
shopDetail.totalMoney= [billProduct.total stringValue]; shopDetail.totalMoney= [billProduct.total stringValue];
shopDetail.remark = billProduct.note; shopDetail.remark = billProduct.note;
shopDetail.sourceDetail = billProduct.purchasePdtDetail;
shopDetail.sourceBillNumber = billProduct.purchasebillnumber;
return shopDetail; return shopDetail;
} }
......
...@@ -167,8 +167,8 @@ ...@@ -167,8 +167,8 @@
self.carphone = transport.carphone; self.carphone = transport.carphone;
} }
if (transport.arriveDate) { if (transport.arriveDate) {
if (transport.arriveDate.length > 9) { if (transport.arriveDate.length > 15) {
_arriveDateLabel.text = [[IBTCommon checkString:transport.arriveDate]substringToIndex:10]; _arriveDateLabel.text = [[IBTCommon checkString:transport.arriveDate]substringToIndex:16];
} }
_arriveDateLabel.textColor = GXF_CONTENT_COLOR; _arriveDateLabel.textColor = GXF_CONTENT_COLOR;
self.arriveDate = [IBTCommon checkString:transport.arriveDate]; self.arriveDate = [IBTCommon checkString:transport.arriveDate];
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
} }
- (void)startDatePickView{ - (void)startDatePickView{
if (!_startTimeView) { if (!_startTimeView) {
_startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64)]; _startTimeView = [[StartTimeView alloc] initWithFrame:CGRectMake(0, ScreenSize.height, ScreenSize.width, ScreenSize.height - 64) withMode:UIDatePickerModeDateAndTime];
_startTimeView.delegate = self; _startTimeView.delegate = self;
_startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5); _startTimeView.backgroundColor = RGBA(0, 0, 0 ,0.5);
[AppWindow addSubview:_startTimeView]; [AppWindow addSubview:_startTimeView];
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
- (void)okTimeView:(NSDate *)time{ - (void)okTimeView:(NSDate *)time{
_arriveDateLabel.textColor = GXF_CONTENT_COLOR; _arriveDateLabel.textColor = GXF_CONTENT_COLOR;
_arriveDateLabel.text = [IBTCommon stringFromDate:time]; _arriveDateLabel.text = [IBTCommon stringFromDateWithFormat:time format:@"yyyy-MM-dd HH:mm"];
self.arriveDate = [time httpParameterString]; self.arriveDate = [time httpParameterString];
// 关闭选择器 // 关闭选择器
[self clearDatePickView]; [self clearDatePickView];
......
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