Commit 2e360c7a authored by 管鹏飞's avatar 管鹏飞

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

parents 78fc495d a36226dd
This diff is collapsed.
...@@ -40,8 +40,11 @@ ...@@ -40,8 +40,11 @@
+ (NSString *)checkNull: (id)data; + (NSString *)checkNull: (id)data;
+ (BOOL)checkStringIsNilOrSpance: (NSString *)str; + (BOOL)checkStringIsNilOrSpance: (NSString *)str;
+ (NSMutableAttributedString *)setTextViewFontOfString:(NSString *)string paragraphStyle:(NSInteger)lineHeight fontSize:(float)size color:(UIColor *)color; + (NSMutableAttributedString *)setTextViewFontOfString:(NSString *)string paragraphStyle:(NSInteger)lineHeight fontSize:(float)size color:(UIColor *)color;
+ (NSMutableAttributedString *)setTextViewBoldFontOfString:(NSString *)string paragraphStyle:(NSInteger)lineHeight fontSize:(float)size color:(UIColor *)color;
+ (NSString *)trimmingCharacters:(NSString *)str; + (NSString *)trimmingCharacters:(NSString *)str;
+ (int)compareDate:(NSString*)oneDate withDate:(NSString*)twoDate; + (int)compareDate:(NSString*)oneDate withDate:(NSString*)twoDate;
+ (BOOL)checkIsPermission:(NSString *)permission; + (BOOL)checkIsPermission:(NSString *)permission;
+(UILabel *)labelWithTitle:(NSString *)title frame:(CGRect)frame textFont:(UIFont *)titleFont;
+ (UIButton *)buttonWithTitle:(NSString *)title Image:(UIImage *)image frame:(CGRect)frame fontSize:(float)fontSize fontColor:(UIColor *)color;
+ (UIButton *)buttonWithImage:(UIImage *)image frame:(CGRect)frame;
@end @end
...@@ -224,6 +224,14 @@ ...@@ -224,6 +224,14 @@
return attributeStr; return attributeStr;
} }
+ (NSMutableAttributedString *)setTextViewBoldFontOfString:(NSString *)string paragraphStyle:(NSInteger)lineHeight fontSize:(float)size color:(UIColor *)color {
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
paragraphStyle.lineSpacing = lineHeight;
NSDictionary *attributes = @{ NSFontAttributeName:[UIFont boldSystemFontOfSize:size],NSForegroundColorAttributeName :color, NSParagraphStyleAttributeName:paragraphStyle};
NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc] initWithString:string attributes:attributes];
return attributeStr;
}
+ (NSString *)trimmingCharacters:(NSString *)str{ + (NSString *)trimmingCharacters:(NSString *)str{
NSString *newStr = [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; NSString *newStr = [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
return newStr; return newStr;
...@@ -258,4 +266,46 @@ ...@@ -258,4 +266,46 @@
return NO; return NO;
} }
+(UILabel *)labelWithTitle:(NSString *)title frame:(CGRect)frame textFont:(UIFont *)titleFont
{
UILabel * titleLabel = [[UILabel alloc] initWithFrame:frame];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = titleFont;
titleLabel.textColor = [UIColor blackColor];
titleLabel.numberOfLines = 1;
//设置文字过长时的显示格式,截去尾部...
titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
titleLabel.text=title;
return titleLabel;
}
+ (UIButton *)buttonWithTitle:(NSString *)title Image:(UIImage *)image frame:(CGRect)frame fontSize:(float)fontSize fontColor:(UIColor *)color
{
UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setTitle:title forState:UIControlStateNormal];
button.frame = frame;
button.titleLabel.font = [UIFont systemFontOfSize:fontSize];
button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[button setImage:image forState:UIControlStateNormal];
[button setTitleColor:color forState:UIControlStateNormal];
return button;
}
+ (UIButton *)buttonWithImage:(UIImage *)image frame:(CGRect)frame
{
UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = frame;
button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
button.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[button setImage:image forState:UIControlStateNormal];
return button;
}
@end @end
...@@ -217,11 +217,15 @@ ...@@ -217,11 +217,15 @@
#define TRANSPORT_ACTION_FINISH @"500504" //结束权 #define TRANSPORT_ACTION_FINISH @"500504" //结束权
#define TRANSPORT_ACTION_ABORT @"500505" //作废权 #define TRANSPORT_ACTION_ABORT @"500505" //作废权
//选中的颜色
#define BASESELECT_COLOR RGBA(255, 127, 0, 1)
//销售
#define SaleDay @"日"
#define SaleWeek @"周"
#define SaleMonth @"月"
//选中的颜色
#define BASESELECT_COLOR RGBA(255, 127, 0, 1)
#endif #endif
...@@ -25,4 +25,12 @@ ...@@ -25,4 +25,12 @@
+ (UIButton *)creatButtonWithFrame:(CGRect)frame target:(id)target sel:(SEL)sel tag:(NSInteger)tag image:(NSString *)name title:(NSString *)title titleColor:(UIColor *)titleCorlor isCorner:(BOOL)isCornor corner:(CGFloat)corner bgColor:(UIColor *)bgcolor; + (UIButton *)creatButtonWithFrame:(CGRect)frame target:(id)target sel:(SEL)sel tag:(NSInteger)tag image:(NSString *)name title:(NSString *)title titleColor:(UIColor *)titleCorlor isCorner:(BOOL)isCornor corner:(CGFloat)corner bgColor:(UIColor *)bgcolor;
#pragma mark - border
- (void)addTopBorderWithHeight:(CGFloat)height color:(UIColor *)color;
- (void)addBottomBorderWithHeight:(CGFloat)height color:(UIColor *)color;
- (void)addLeftBorderWithWidth:(CGFloat)width color:(UIColor *)color;
- (void)addRightBorderWithWidth:(CGFloat)width color:(UIColor *)color;
@end @end
...@@ -92,5 +92,39 @@ ...@@ -92,5 +92,39 @@
return button; return button;
} }
#pragma mark - border
- (void)addTopBorderWithHeight:(CGFloat)height color:(UIColor *)color
{
CALayer *layer = [CALayer layer];
layer.frame = CGRectMake(0, 0, self.frame.size.width, height);
layer.backgroundColor = color.CGColor;
[self.layer addSublayer:layer];
}
- (void)addBottomBorderWithHeight:(CGFloat)height color:(UIColor *)color
{
CALayer *layer = [CALayer layer];
layer.frame = CGRectMake(0, self.frame.size.height - height, self.frame.size.width, height);
layer.backgroundColor = color.CGColor;
[self.layer addSublayer:layer];
}
- (void)addLeftBorderWithWidth:(CGFloat)width color:(UIColor *)color
{
CALayer *layer = [CALayer layer];
layer.frame = CGRectMake(0, 0, width, self.frame.size.height);
layer.backgroundColor = color.CGColor;
[self.layer addSublayer:layer];
}
- (void)addRightBorderWithWidth:(CGFloat)width color:(UIColor *)color
{
CALayer *layer = [CALayer layer];
layer.frame = CGRectMake(self.frame.size.width - width, 0, width, self.frame.size.height);
layer.backgroundColor = color.CGColor;
[self.layer addSublayer:layer];
}
@end @end
...@@ -396,8 +396,7 @@ typedef enum : NSUInteger { ...@@ -396,8 +396,7 @@ typedef enum : NSUInteger {
billProduct.basePrice = [NSNumber numberWithFloat:0]; billProduct.basePrice = [NSNumber numberWithFloat:0];
billProduct.total = [NSNumber numberWithFloat:0]; billProduct.total = [NSNumber numberWithFloat:0];
billProduct.remark = @""; billProduct.remark = @"";
#warning 包装规格说明是不是少了在NoticeProduct billProduct.qpcStr = [NSString stringWithFormat:@"1*%@",product.qpc];
billProduct.qpcStr = @"无";
[billArr addObject:billProduct]; [billArr addObject:billProduct];
} }
return billArr; return billArr;
......
...@@ -145,17 +145,17 @@ ...@@ -145,17 +145,17 @@
{ {
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = billProduct.product_name; self.titleLabel.text = billProduct.product_name;
self.priceLabel.text = [NSString stringWithFormat:@"%@元",billProduct.basePrice]; self.priceLabel.text = [NSString stringWithFormat:@"%@元",[billProduct.basePrice stringValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",billProduct.qty,billProduct.unit]; self.countLabel.text = [NSString stringWithFormat:@"%@%@",[billProduct.qty stringValue],billProduct.unit];
self.shippedQtyLabel.text = [NSString stringWithFormat:@"%@%@",billProduct.shippedBaseQty ? [billProduct.shippedBaseQty stringValue]:@"0",billProduct.unit]; self.shippedQtyLabel.text = [NSString stringWithFormat:@"%@%@",billProduct.shippedBaseQty ? [billProduct.shippedBaseQty stringValue]:@"0",billProduct.unit];
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",billProduct.product_name,billProduct.product_code]; self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",billProduct.product_name,billProduct.product_code];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",billProduct.qpc,billProduct.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[billProduct.qpc stringValue],billProduct.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",billProduct.qty,billProduct.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[billProduct.qty stringValue],billProduct.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",billProduct.baseQty,billProduct.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[billProduct.baseQty stringValue],billProduct.baseUnit];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",billProduct.price]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[billProduct.price stringValue]];
self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",billProduct.basePrice]; self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",[billProduct.basePrice stringValue]];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",billProduct.total]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[billProduct.total stringValue]];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",billProduct.remark ? billProduct.remark :@"无" ]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",billProduct.remark ? billProduct.remark :@"无" ];
[self isShowShippingQty:billProduct]; [self isShowShippingQty:billProduct];
} }
......
...@@ -274,20 +274,20 @@ typedef enum : NSUInteger { ...@@ -274,20 +274,20 @@ typedef enum : NSUInteger {
if (_qpcQuantityField.text.length > 0) {//包装数量 if (_qpcQuantityField.text.length > 0) {//包装数量
//计算基础数量 //计算基础数量
float baseCount = [_qpcField.text floatValue] * [_qpcQuantityField.text floatValue]; float baseCount = [_qpcField.text floatValue] * [_qpcQuantityField.text floatValue];
_quantityField.text = [NSString stringWithFormat:@"%.0f",baseCount]; _quantityField.text = [NSString stringWithFormat:@"%.2f",baseCount];
} }
}else if (textField == _qpcQuantityField) {//包装数量 }else if (textField == _qpcQuantityField) {//包装数量
if (_qpcField.text.length > 0) {//包装规格 if (_qpcField.text.length > 0) {//包装规格
//计算基础数量 //计算基础数量
float baseCount = [_qpcField.text floatValue] * [_qpcQuantityField.text floatValue]; float baseCount = [_qpcField.text floatValue] * [_qpcQuantityField.text floatValue];
_quantityField.text = [NSString stringWithFormat:@"%.0f",baseCount]; _quantityField.text = [NSString stringWithFormat:@"%.2f",baseCount];
} }
}else if (textField == _quantityField) {//基础数量 }else if (textField == _quantityField) {//基础数量
if (_qpcField.text.length > 0) {//包装规格 if (_qpcField.text.length > 0) {//包装规格
//计算包装数量 //计算包装数量
if ([_qpcField.text integerValue] > 0) { if ([_qpcField.text integerValue] > 0) {
float packCount = [_quantityField.text floatValue] / [_qpcField.text floatValue]; float packCount = [_quantityField.text floatValue] / [_qpcField.text floatValue];
_qpcQuantityField.text = [NSString stringWithFormat:@"%.0f",packCount]; _qpcQuantityField.text = [NSString stringWithFormat:@"%.2f",packCount];
} }
} }
} }
......
...@@ -118,7 +118,7 @@ typedef enum : NSUInteger { ...@@ -118,7 +118,7 @@ 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) { if ([self.shopDetail.packageQuantity floatValue] > 0) {
packageQuantity.text=self.shopDetail.packageQuantity; packageQuantity.text=self.shopDetail.packageQuantity;
} }
//基础数量 //基础数量
...@@ -221,7 +221,7 @@ typedef enum : NSUInteger { ...@@ -221,7 +221,7 @@ typedef enum : NSUInteger {
self.shopDetail.merchandise = self.productNameStr; self.shopDetail.merchandise = self.productNameStr;
self.shopDetail.packageSpecification = packageSpecification.text; self.shopDetail.packageSpecification = packageSpecification.text;
self.shopDetail.packageQpcStr = self.packageQpcStr; self.shopDetail.packageQpcStr = [NSString stringWithFormat:@"1*%@",packageSpecification.text];
self.shopDetail.packageQpcUnit = self.productMeasureUnit; self.shopDetail.packageQpcUnit = self.productMeasureUnit;
self.shopDetail.packageUnit = self.packageUintStr; self.shopDetail.packageUnit = self.packageUintStr;
...@@ -407,7 +407,6 @@ typedef enum : NSUInteger { ...@@ -407,7 +407,6 @@ typedef enum : NSUInteger {
self.productNameStr = product.name; self.productNameStr = product.name;
self.productUuidStr = product.uuid; self.productUuidStr = product.uuid;
self.productCodeStr = product.code; self.productCodeStr = product.code;
self.packageQpcStr = product.qpcStr;
self.productMeasureUnit = product.measureUnit; self.productMeasureUnit = product.measureUnit;
if (self.selectProducts.count > 0) { if (self.selectProducts.count > 0) {
[self.selectProducts removeAllObjects]; [self.selectProducts removeAllObjects];
...@@ -451,8 +450,8 @@ typedef enum : NSUInteger { ...@@ -451,8 +450,8 @@ typedef enum : NSUInteger {
if (textField == packageSpecification || textField == packageQuantity) { if (textField == packageSpecification || textField == packageQuantity) {
if (packageSpecification.text.length > 0 && packageQuantity.text.length > 0 ) { if (packageSpecification.text.length > 0 && packageQuantity.text.length > 0 ) {
//计算基础数量 和 总金额和包装单价 //计算基础数量 和 总金额和包装单价
int baseCount = [packageSpecification.text intValue] * [packageQuantity.text intValue]; float baseCount = [packageSpecification.text floatValue] * [packageQuantity.text floatValue];
foundationQuantity.text = [NSString stringWithFormat:@"%d",baseCount]; foundationQuantity.text = [NSString stringWithFormat:@"%.2f",baseCount];
//如果基础单价有 会计算出包装单价和总价 //如果基础单价有 会计算出包装单价和总价
//如果包装单价有 会计算出基础单价和总价 //如果包装单价有 会计算出基础单价和总价
[self setTotalMoney]; [self setTotalMoney];
...@@ -480,7 +479,7 @@ typedef enum : NSUInteger { ...@@ -480,7 +479,7 @@ typedef enum : NSUInteger {
if (foundationQuantity.text.length > 0) { if (foundationQuantity.text.length > 0) {
float totalPrice = [foundationUnitPrice.text floatValue] * [foundationQuantity.text floatValue]; float totalPrice = [foundationUnitPrice.text floatValue] * [foundationQuantity.text floatValue];
totalMoney.text = [NSString stringWithFormat:@"%.4f",totalPrice]; totalMoney.text = [NSString stringWithFormat:@"%.4f",totalPrice];
if (packageQuantity.text.length > 0 && [packageQuantity.text integerValue] > 0) { if (packageQuantity.text.length > 0 && [packageQuantity.text floatValue] > 0) {
float packagePrice = totalPrice / [packageQuantity.text floatValue]; float packagePrice = totalPrice / [packageQuantity.text floatValue];
packageUnitPrice.text = [NSString stringWithFormat:@"%.4f",packagePrice]; packageUnitPrice.text = [NSString stringWithFormat:@"%.4f",packagePrice];
} }
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
_chooseBasePriceLabel = contentLabel; _chooseBasePriceLabel = contentLabel;
}else if(indexPath.row == 7) { }else if(indexPath.row == 7) {
_chooseTotalPriceLabel= contentLabel; _chooseTotalPriceLabel= contentLabel;
_chooseTotalPriceLabel.textColor = [UIColor redColor]; _chooseTotalPriceLabel.textColor = GXF_NAVIGAYION_COLOR;
}else if(indexPath.row == 8) { }else if(indexPath.row == 8) {
_choosePackCountLabel = contentLabel; _choosePackCountLabel = contentLabel;
}else if(indexPath.row == 9) { }else if(indexPath.row == 9) {
...@@ -255,26 +255,26 @@ ...@@ -255,26 +255,26 @@
_choosePackUnitLabel.text = self.noticeProduct.unit; _choosePackUnitLabel.text = self.noticeProduct.unit;
_choosePackStandLabel.text = [NSString stringWithFormat:@"1*%@ %@",self.noticeProduct.qpc,self.noticeProduct.baseUnit]; _choosePackStandLabel.text = [NSString stringWithFormat:@"1*%@ %@",[self.noticeProduct.qpc stringValue],self.noticeProduct.baseUnit];
_choosePackCountLabel.text = [NSString stringWithFormat:@"%@ %@",self.noticeProduct.qty,self.noticeProduct.unit]; _choosePackCountLabel.text = [NSString stringWithFormat:@"%@ %@",[self.noticeProduct.qty stringValue],self.noticeProduct.unit];
_chooseBaseCountLabel.text = [NSString stringWithFormat:@"%@ %@",self.noticeProduct.baseQty,self.noticeProduct.baseUnit]; _chooseBaseCountLabel.text = [NSString stringWithFormat:@"%@ %@",[self.noticeProduct.baseQty stringValue],self.noticeProduct.baseUnit];
_chooseTotalLabel.text = [NSString stringWithFormat:@"%@元",self.noticeProduct.total]; _chooseTotalLabel.text = [NSString stringWithFormat:@"%@元",[self.noticeProduct.total stringValue]];
_choosePackPriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.packprice]; _choosePackPriceLabel.text = [NSString stringWithFormat:@"%@ 元",[self.noticeProduct.packprice stringValue]];
_chooseBasePriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.price]; _chooseBasePriceLabel.text = [NSString stringWithFormat:@"%@ 元",[self.noticeProduct.price stringValue]];
_shbzLabel.text = self.noticeProduct.unit; _shbzLabel.text = self.noticeProduct.unit;
_shjcLabel.text = self.noticeProduct.baseUnit; _shjcLabel.text = self.noticeProduct.baseUnit;
if (self.noticeProduct.rctBaseQty) { if (self.noticeProduct.rctBaseQty) {
_shBaseQuantityField.text =[NSString stringWithFormat:@"%@",self.noticeProduct.rctBaseQty]; _shBaseQuantityField.text =[NSString stringWithFormat:@"%@",[self.noticeProduct.rctBaseQty stringValue]];
} }
if (self.noticeProduct.rctQty) { if (self.noticeProduct.rctQty) {
_shPackField.text =[NSString stringWithFormat:@"%@",self.noticeProduct.rctQty]; _shPackField.text =[NSString stringWithFormat:@"%@",[self.noticeProduct.rctQty stringValue]];
} }
if (self.noticeProduct.rctTotal) { if (self.noticeProduct.rctTotal) {
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%@ 元",self.noticeProduct.rctTotal]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%@ 元",[self.noticeProduct.rctTotal stringValue]];
}else { }else {
_chooseTotalPriceLabel.text = @"0.00元"; _chooseTotalPriceLabel.text = @"0.0000元";
} }
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
} }
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total];
_shBaseQuantityField.text = [NSString stringWithFormat:@"%.0f",baseCount]; _shBaseQuantityField.text = [NSString stringWithFormat:@"%.2f",baseCount];
} }
}else if (textField == _shBaseQuantityField) { }else if (textField == _shBaseQuantityField) {
if (_shBaseQuantityField.text.length > 0) { if (_shBaseQuantityField.text.length > 0) {
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
} }
_chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total]; _chooseTotalPriceLabel.text = [NSString stringWithFormat:@"%.4f元",total];
_shPackField.text = [NSString stringWithFormat:@"%.0f",baseCount]; _shPackField.text = [NSString stringWithFormat:@"%.2f",baseCount];
} }
} }
} }
......
...@@ -161,24 +161,24 @@ ...@@ -161,24 +161,24 @@
{ {
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = transferProduct.productName; self.titleLabel.text = transferProduct.productName;
self.dscountLabel.text = [NSString stringWithFormat:@"%@%@",transferProduct.qty,transferProduct.unit]; self.dscountLabel.text = [NSString stringWithFormat:@"%@%@",[transferProduct.qty stringValue],transferProduct.unit];
self.yscountLabel.text = [NSString stringWithFormat:@"%@%@",transferProduct.rctQty?transferProduct.rctQty:@"0",transferProduct.unit]; self.yscountLabel.text = [NSString stringWithFormat:@"%@%@",transferProduct.rctQty?[transferProduct.rctQty stringValue]:@"0",transferProduct.unit];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",transferProduct.qpc,transferProduct.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[transferProduct.qpc stringValue],transferProduct.baseUnit];
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 stringValue],transferProduct.unit];
self.showshCountLabel.text =[NSString stringWithFormat:@"包装数量[实收]:%@%@",transferProduct.rctQty?(transferProduct.rctQty):@"0",transferProduct.unit]; self.showshCountLabel.text =[NSString stringWithFormat:@"包装数量[实收]:%@%@",transferProduct.rctQty?([transferProduct.rctQty stringValue]):@"0",transferProduct.unit];
self.showjcCountLabel.text = [NSString stringWithFormat:@"基础数量:%@%@",transferProduct.baseQty,transferProduct.baseUnit]; self.showjcCountLabel.text = [NSString stringWithFormat:@"基础数量:%@%@",[transferProduct.baseQty stringValue],transferProduct.baseUnit];
self.showshjcCountLabel.text = [NSString stringWithFormat:@"基础数量[实收]:%@%@",transferProduct.rctBaseQty?transferProduct.rctBaseQty:@"0",transferProduct.baseUnit]; self.showshjcCountLabel.text = [NSString stringWithFormat:@"基础数量[实收]:%@%@",transferProduct.rctBaseQty?[transferProduct.rctBaseQty stringValue]:@"0",transferProduct.baseUnit];
self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",transferProduct.packprice]; self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[transferProduct.packprice stringValue]];
self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",transferProduct.price]; self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%@元",[transferProduct.price stringValue]];
self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%@元",transferProduct.rctTotal?transferProduct.rctTotal:@"0"]; self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%@元",transferProduct.rctTotal?[transferProduct.rctTotal stringValue]:@"0"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",transferProduct.total?transferProduct.total:@"0"]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",transferProduct.total?[transferProduct.total stringValue]:@"0"];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ];
if ([state isEqualToString:@"YES"]) { if ([state isEqualToString:@"YES"]) {
if ([transferProduct.qty floatValue] > [transferProduct.rctQty floatValue]) { if ([transferProduct.qty floatValue] > [transferProduct.rctQty floatValue]) {
......
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
- (void)addChildView{ - (void)addChildView{
self.productVC = [[TransferProductViewController alloc]init]; self.productVC = [[TransferProductViewController alloc]init];
// self.productVC.twoTitle = @"";
self.costVC = [[CostViewController alloc]init]; self.costVC = [[CostViewController alloc]init];
} }
- (void)btnClick:(UIButton *)btn{ - (void)btnClick:(UIButton *)btn{
...@@ -130,8 +129,6 @@ ...@@ -130,8 +129,6 @@
- (void)refreshCost:(FeeAcountDetail *)fee indexPath:(NSIndexPath *)indexPath{ - (void)refreshCost:(FeeAcountDetail *)fee indexPath:(NSIndexPath *)indexPath{
if (indexPath) { if (indexPath) {
[self.costVC.costArr replaceObjectAtIndex:indexPath.row withObject:fee]; [self.costVC.costArr replaceObjectAtIndex:indexPath.row withObject:fee];
// NSArray *indexArray=[NSArray arrayWithObject:indexPath];
// [self.costVC.tableView reloadRowsAtIndexPaths:indexArray withRowAnimation:UITableViewRowAnimationAutomatic];
[self.costVC.tableView reloadData]; [self.costVC.tableView reloadData];
}else{ }else{
if (self.costVC.costArr) { if (self.costVC.costArr) {
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
- (void)setTransfer:(Transfer *)transfer{ - (void)setTransfer:(Transfer *)transfer{
self.billNumberLabel.text = [NSString stringWithFormat:@"单号:%@",transfer.billnumber]; self.billNumberLabel.text = [NSString stringWithFormat:@"单号:%@",transfer.billnumber];
self.warehouseLabel.text = [NSString stringWithFormat:@"发货仓库:%@",transfer.warehouseName]; self.warehouseLabel.text = [NSString stringWithFormat:@"发货仓库:%@",transfer.warehouseName];
self.rwarehouseLabel.text = [NSString stringWithFormat:@"货仓库:%@",transfer.rwarehouseName]; self.rwarehouseLabel.text = [NSString stringWithFormat:@"货仓库:%@",transfer.rwarehouseName];
self.carnumberLabel.text = [NSString stringWithFormat:@"车辆:%@",transfer.carnumber] ; self.carnumberLabel.text = [NSString stringWithFormat:@"车辆:%@",transfer.carnumber] ;
self.createOperNameLabel.text = [NSString stringWithFormat:@"创建人:%@",transfer.create_operName] ; self.createOperNameLabel.text = [NSString stringWithFormat:@"创建人:%@",transfer.create_operName] ;
self.createTimeLabel.text =[NSString stringWithFormat:@"创建时间:%@",transfer.create_time]; self.createTimeLabel.text =[NSString stringWithFormat:@"创建时间:%@",transfer.create_time];
......
...@@ -145,12 +145,12 @@ ...@@ -145,12 +145,12 @@
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName; self.titleLabel.text = pdtDetail.productName;
self.priceLabel.text = [NSString stringWithFormat:@"%@元",[pdtDetail.price stringValue]]; self.priceLabel.text = [NSString stringWithFormat:@"%@元",[pdtDetail.price stringValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",pdtDetail.qty,pdtDetail.unit]; self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode]; self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",pdtDetail.qpc,pdtDetail.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",pdtDetail.qty,pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",pdtDetail.baseQty,pdtDetail.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",pdtDetail.packprice]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[pdtDetail.packprice stringValue]];
NSString *sourceT = @""; NSString *sourceT = @"";
if ([pdtDetail.sourcetype isEqualToString:@"none"]) { if ([pdtDetail.sourcetype isEqualToString:@"none"]) {
sourceT = @"无"; sourceT = @"无";
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
self.showPurchaseLabel.text = [NSString stringWithFormat:@"来源类型:%@",sourceT]; self.showPurchaseLabel.text = [NSString stringWithFormat:@"来源类型:%@",sourceT];
self.showSourceNumberLabel.text = [NSString stringWithFormat:@"来源单号:%@",pdtDetail.sourcebillnumber.length > 0 ?pdtDetail.sourcebillnumber : @"无"]; self.showSourceNumberLabel.text = [NSString stringWithFormat:@"来源单号:%@",pdtDetail.sourcebillnumber.length > 0 ?pdtDetail.sourcebillnumber : @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",pdtDetail.total]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[pdtDetail.total stringValue]];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"];
} }
......
...@@ -33,7 +33,7 @@ typedef enum : NSUInteger { ...@@ -33,7 +33,7 @@ typedef enum : NSUInteger {
UITextField *_leftmoneyField; UITextField *_leftmoneyField;
HPGrowingTextView *_noteTextView; HPGrowingTextView *_noteTextView;
} }
@property (nonatomic,strong)NSString *selectStr;
@end @end
@implementation NewCostViewController @implementation NewCostViewController
...@@ -233,6 +233,8 @@ typedef enum : NSUInteger { ...@@ -233,6 +233,8 @@ typedef enum : NSUInteger {
_leftmoneyField.text = [self.accountDetail.leftmoney stringValue]; _leftmoneyField.text = [self.accountDetail.leftmoney stringValue];
_noteTextView.text = self.accountDetail.note; _noteTextView.text = self.accountDetail.note;
self.selectStr = self.accountDetail.accounttitle;
} }
- (void)textChange:(UITextField *)textField{ - (void)textChange:(UITextField *)textField{
if (_actualmoneyField.text.length > 0 && _paidmoneyField.text.length > 0 ) { if (_actualmoneyField.text.length > 0 && _paidmoneyField.text.length > 0 ) {
...@@ -247,11 +249,15 @@ typedef enum : NSUInteger { ...@@ -247,11 +249,15 @@ typedef enum : NSUInteger {
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.row == 0){ if(indexPath.row == 0){
ChooseCostViewController *cvc = [ChooseCostViewController new]; ChooseCostViewController *cvc = [ChooseCostViewController new];
if (self.selectStr.length > 0) {
cvc.selectStr = self.selectStr;
}
cvc.choseBaseInfo = ^(NSArray *costs){ cvc.choseBaseInfo = ^(NSArray *costs){
if (costs.count > 0) { if (costs.count > 0) {
Accounttitle *type = costs[0]; Accounttitle *type = costs[0];
_chooseCostLabel.text = type.name; _chooseCostLabel.text = type.name;
_chooseCostLabel.textColor = GXF_CONTENT_COLOR; _chooseCostLabel.textColor = GXF_CONTENT_COLOR;
self.selectStr = type.name;
} }
}; };
[self PushViewController:cvc animated:YES]; [self PushViewController:cvc animated:YES];
......
...@@ -151,14 +151,14 @@ ...@@ -151,14 +151,14 @@
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)]; self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName; self.titleLabel.text = pdtDetail.productName;
self.priceLabel.text = [NSString stringWithFormat:@"%@元",[pdtDetail.price stringValue]]; self.priceLabel.text = [NSString stringWithFormat:@"%@元",[pdtDetail.price stringValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",pdtDetail.qty,pdtDetail.unit]; self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode]; self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",pdtDetail.qpc,pdtDetail.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",pdtDetail.qty,pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",pdtDetail.baseQty,pdtDetail.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",pdtDetail.packprice]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@元",[pdtDetail.packprice stringValue]];
self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"]; self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",pdtDetail.total]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[pdtDetail.total stringValue]];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment