Commit cb931342 authored by Sandy's avatar Sandy

增加考核单价和考核总金额

parent cb41091b
......@@ -102,7 +102,7 @@
}
#ifdef DEBUG
self.m_containerView.m_cCodeTextF.text = @"211534962";
self.m_containerView.m_cCodeTextF.text = @"923";
self.m_containerView.m_userNameTextF.text = @"admin";
self.m_containerView.m_passwordTextF.text = @"thoradmin";
#else
......
......@@ -40,5 +40,13 @@
@property (strong, nonatomic) NSNumber *receivedQty;
@property (strong, nonatomic) NSNumber *shippedQty;
//发运单特有
/** 考核单价 */
@property (strong, nonatomic) NSNumber *checkPrice;
/** 考核总金额 */
@property (strong, nonatomic) NSNumber *checkTotal;
@end
......@@ -43,11 +43,19 @@ typedef enum : NSUInteger {
UITextField *packageUnitPrice; //包装单价
UITextField *totalMoney; //总金额
UITextField *counterNum;//柜台
/** 考核单价 */
UITextField *_checkPriceTextField;
/** 考核总金额 */
UITextField *_checkTotalTextField;
HPGrowingTextView *remark; //备注
UILabel *_measureUnitLabel; //默认规格单位
UILabel *_packageCountLabel; //包装数量
UILabel *_baseCountLabel; //基础数量
UILabel *_counterNum;//柜台
/** 考核单价 */
UILabel *_checkPriceLabel;
/** 考核总金额 */
UILabel *_checkTotalLabel;
}
@property (nonatomic,strong)NSString *productCodeStr;//商品代码
......@@ -61,7 +69,11 @@ typedef enum : NSUInteger {
@property (nonatomic,strong)NSNumber *basePrice;//基础单价
@property (nonatomic,strong)NSNumber *totalPrice;//总金额
/** 考核单价 */
@property (strong, nonatomic) NSNumber *checkPrice;
/** 考核总金额 */
@property (strong, nonatomic) NSNumber *checkTotal;
@property (nonatomic,strong)NSMutableArray *selectProducts;
@property (nonatomic,strong)NSString *selectUnit;
......@@ -91,6 +103,11 @@ typedef enum : NSUInteger {
}
[_dataArr addObject:@"备注"];
if (self.intertype == ShopDetailInterTypeTransport) {
[_dataArr addObject:@"考核单价"];
[_dataArr addObject:@"考核总金额"];
}
}
-(void)setupSubviews
......@@ -155,6 +172,11 @@ typedef enum : NSUInteger {
}else{
totalMoney.text=[self.shopDetail.totalMoney stringValue];
}
_checkTotalTextField.text = self.shopDetail.checkTotal.doubleValue > 0 ? self.shopDetail.checkTotal.stringValue : @"0.0000";
_checkPriceTextField.text = self.shopDetail.checkPrice.doubleValue > 0 ? self.shopDetail.checkPrice.stringValue : @"0.0000";
self.totalPrice = self.shopDetail.totalMoney;
//备注
remark.text=self.shopDetail.remark;
......@@ -168,6 +190,8 @@ typedef enum : NSUInteger {
self.packageQpcStr = self.shopDetail.packageQpcStr;
self.packageUintStr = self.shopDetail.packageUnit;
self.productMeasureUnit = self.shopDetail.packageQpcUnit.length > 0 ? self.shopDetail.packageQpcUnit : @"斤";
}
}
......@@ -305,6 +329,10 @@ typedef enum : NSUInteger {
self.shopDetail.totalMoney = [NSDecimalNumber decimalNumberWithString:totalPrices];
self.shopDetail.remark = remark.text;
self.shopDetail.vnum = counterNum.text;
self.shopDetail.checkPrice = self.checkPrice;
self.shopDetail.checkTotal = self.checkTotal;
if (self.productNameStr.length == 0 ) {
ShowMessage(@"商品不能为空");
return NO;
......@@ -486,6 +514,19 @@ typedef enum : NSUInteger {
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
textField.keyboardType = UIKeyboardTypeDefault;
counterNum=textField; //包装数量
}else if ([title isEqualToString:@"考核单价"]) {
_checkPriceLabel = label;
textField.placeholder = @"输入考核单价";
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
textField.keyboardType = UIKeyboardTypeDefault;
_checkPriceTextField=textField;
cell.userInteractionEnabled = YES;
}else if ([title isEqualToString:@"考核总金额"]) {
_checkTotalLabel = label;
textField.placeholder = @"输入考核总金额";
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
textField.keyboardType = UIKeyboardTypeDefault;
_checkTotalTextField=textField;
}
}
......@@ -631,6 +672,13 @@ typedef enum : NSUInteger {
//总金额
self.totalPrice = [NSNumber numberWithFloat:totalMoney.text.floatValue];
[self setUnitAndPackPrice];
}else if (textField == _checkPriceTextField){
self.checkPrice = [CalculateHelper changeType:_checkPriceTextField.text];
self.checkTotal = [CalculateHelper calculateNum1:_checkPriceTextField.text num2:foundationQuantity.text type:CalculateTypeMul roundingType:NSRoundBankers cutLenth:2];
_checkTotalTextField.text = self.checkTotal.stringValue;
}
}
......
......@@ -11,7 +11,7 @@
#import "ReceiveProductCell.h"
#import "PurchaseBillProduct.h"
#define TableHeight 44
#define ShowHeight 130
#define ShowHeight 150
#define HeaderHeight 40
@interface ReceiveProductViewController ()<UITableViewDataSource,UITableViewDelegate,HeaderCellDelegate>
......
......@@ -33,6 +33,11 @@
@property (nonatomic,strong)UILabel *showNoteLabel;
@property (strong, nonatomic) UILabel *showCounterNum;
/** 考核单价 */
@property (strong, nonatomic) UILabel *showCheckPrice;
/** 考核总金额 */
@property (strong, nonatomic) UILabel *showCheckTotal;
@property (nonatomic,assign)BOOL isShowShipping;//是否发运
- (void)setBillProduct:(TransferPdtDetail *)billProduct row:(NSInteger)row defaultState:(NSString *)state;
......
......@@ -133,6 +133,18 @@
self.showNoteLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showNoteLabel.font = GXF_THREETEENTH_SIZE;
self.showCheckPrice = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showCounterNum.frame), ShowWidth*2, ShowHeight))];
self.showCheckPrice.textAlignment = NSTextAlignmentLeft;
self.showCheckPrice.textColor = GXF_PLACEHOLDER_COLOR;
self.showCheckPrice.font = GXF_THREETEENTH_SIZE;
self.showCheckPrice.text = @"考核单价:0.00";
self.showCheckTotal = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showbzdwLabel.frame), CGRectGetMaxY(self.showCounterNum.frame), ShowWidth*2, ShowHeight))];
self.showCheckTotal.textAlignment = NSTextAlignmentLeft;
self.showCheckTotal.textColor = GXF_PLACEHOLDER_COLOR;
self.showCheckTotal.font = GXF_THREETEENTH_SIZE;
self.showCheckTotal.text = @"考核总金额:0.00";
self.editBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[self.editBtn setImage:[UIImage imageNamed:@"edit"] forState:UIControlStateNormal];
self.editBtn.frame = CGRectMake(ScreenSize.width - LeftWidth, 0, LeftWidth , TableHeight);
......@@ -158,6 +170,8 @@
[self.showView addSubview:self.showshjcCountLabel];
[self.showView addSubview:self.showCounterNum];
[self.showView addSubview:self.showjcPriceLabel];
[self.showView addSubview:self.showCheckPrice];
[self.showView addSubview:self.showCheckTotal];
[self.showView addSubview:self.showbzPriceLabel];
[self.showView addSubview:self.showTotalLabel];
......@@ -204,6 +218,10 @@
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",
transferProduct.packprice.doubleValue * transferProduct.qty.doubleValue];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",transferProduct.note ? transferProduct.note :@"无" ];
self.showCheckPrice.text = [NSString stringWithFormat:@"考核单价:%.2f元", transferProduct.checkPrice.doubleValue];
self.showCheckTotal.text = [NSString stringWithFormat:@"考核总金额:%.2f元", transferProduct.checkTotal.doubleValue];
if ([state isEqualToString:@"YES"]) {
if ([transferProduct.qty floatValue] > [transferProduct.rctQty floatValue]) {
self.yscountLabel.textColor = [UIColor redColor];
......
......@@ -60,6 +60,12 @@
@property (nonatomic,strong)NSNumber *shippedBaseQty;//发运基础数量
@property (strong, nonatomic) PurchaseBillProduct *purchasePdt;
@property (strong, nonatomic) TransportPdtDetail *transportPdt;
/** 考核单价 */
@property (strong, nonatomic) NSNumber *checkPrice;
/** 考核总金额 */
@property (strong, nonatomic) NSNumber *checkTotal;
/**
* 柜号
*/
......
......@@ -547,6 +547,8 @@ typedef enum : NSUInteger {
billProduct.purchasePdtDetail = shopDetail.sourceDetail;
billProduct.receivedQty = shopDetail.receivedQty;
billProduct.shippedQty = shopDetail.shippedQty;
billProduct.checkTotal = shopDetail.checkTotal;
billProduct.checkPrice = shopDetail.checkPrice;
return billProduct;
}
- (ShopDetail *)coverShopDetail:(TransportPdtDetail *)billProduct{
......@@ -569,6 +571,8 @@ typedef enum : NSUInteger {
shopDetail.sourceBillNumber = billProduct.purchasebillnumber;
shopDetail.receivedQty = billProduct.receivedQty;
shopDetail.shippedQty = billProduct.shippedQty;
shopDetail.checkPrice = billProduct.checkPrice;
shopDetail.checkTotal = billProduct.checkTotal;
return shopDetail;
}
......
......@@ -15,7 +15,7 @@
#import "GXFPopView.h"
#define TableHeight 44
#define ShowHeight 130
#define ShowHeight 150
#define HeaderHeight 40
@interface TransportProductViewController ()
<UITableViewDataSource,UITableViewDelegate,FooterCellDelegate,HeaderCellDelegate,GXFPopViewDelegate>
......
......@@ -347,9 +347,9 @@ NSInteger purchaseStockCheckNumber = 0;
detail.purchasePdtDetail = detail.uuid;
detail.uuid = nil;
detail.baseQty = [CalculateHelper calculateNum1:detail.qpc num2:detail.qty type:CalculateTypeMul roundingType:NSRoundBankers cutLenth:4];
// detail.baseQty = @(detail.qpc.doubleValue * detail.qty.doubleValue);
detail.total = [CalculateHelper calculateNum1:detail.qty num2:detail.packprice type:(CalculateTypeMul) roundingType:NSRoundBankers cutLenth:4];
// detail.total = @(detail.qty.doubleValue * detail.packprice.doubleValue);
detail.checkPrice = detail.price;
detail.checkTotal = detail.total;
[arr addObject:detail];
}
......
......@@ -36,10 +36,12 @@
@property (strong, nonatomic) NSNumber *receivedQty;//收货数量
@property (strong, nonatomic) NSNumber *receivedBaseQty;//收货基础数量
///**
// * 自定义的采购单的单号
// */
//@property (nonatomic,strong)NSString *z_purchaseBillNumber;
/** 考核单价 */
@property (strong, nonatomic) NSNumber *checkPrice;
/** 考核总金额 */
@property (strong, nonatomic) NSNumber *checkTotal;
......
......@@ -36,6 +36,10 @@
@property (nonatomic,strong)UILabel *showPurchaseLabel;
@property (nonatomic,strong)UILabel *showShippedQty;//转运包装数量
@property (nonatomic,strong)UILabel *showShippedBaseQty;//转运基础数量
/** 考核单价 */
@property (strong, nonatomic) UILabel *showCheckPrice;
/** 考核总金额 */
@property (strong, nonatomic) UILabel *showCheckTotal;
......
......@@ -117,26 +117,6 @@
self.showTotalLabel.text = @"总金额:100";
self.showTotalLabel.font = GXF_THREETEENTH_SIZE;
self.showNoteLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showTotalLabel.frame), ShowWidth, ShowHeight))];
self.showNoteLabel.textAlignment = NSTextAlignmentLeft;
self.showNoteLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showNoteLabel.text = @"备注:1000";
self.showNoteLabel.font = GXF_THREETEENTH_SIZE;
// self.showShippedQty = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showTotalLabel.frame), ShowWidth, ShowHeight))];
// self.showShippedQty.textAlignment = NSTextAlignmentLeft;
// self.showShippedQty.textColor = GXF_PLACEHOLDER_COLOR;
// self.showShippedQty.text = @"转运运包装数量:";
// self.showShippedQty.font = GXF_THREETEENTH_SIZE;
//
// self.showShippedBaseQty = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showTotalLabel.frame), ShowWidth, ShowHeight))];
// self.showShippedBaseQty.textAlignment = NSTextAlignmentLeft;
// self.showShippedBaseQty.textColor = GXF_PLACEHOLDER_COLOR;
// self.showShippedBaseQty.text = @"转运基础数量:";
// self.showShippedBaseQty.font = GXF_THREETEENTH_SIZE;
self.showPurchaseLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showPriceLabel.frame), ShowWidth+ 100, ShowHeight))];
self.showPurchaseLabel.textAlignment = NSTextAlignmentLeft;
......@@ -144,8 +124,23 @@
self.showPurchaseLabel.text = @"采购单号:1000";
self.showPurchaseLabel.font = GXF_THREETEENTH_SIZE;
self.showNoteLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showTotalLabel.frame), ShowWidth, ShowHeight))];
self.showNoteLabel.textAlignment = NSTextAlignmentLeft;
self.showNoteLabel.textColor = GXF_PLACEHOLDER_COLOR;
self.showNoteLabel.text = @"备注:1000";
self.showNoteLabel.font = GXF_THREETEENTH_SIZE;
self.showCheckPrice = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showStandLabel.frame), CGRectGetMaxY(self.showNoteLabel.frame), ShowWidth, ShowHeight))];
self.showCheckPrice.textAlignment = NSTextAlignmentLeft;
self.showCheckPrice.textColor = GXF_PLACEHOLDER_COLOR;
self.showCheckPrice.text = @"考核单价:200";
self.showCheckPrice.font = GXF_THREETEENTH_SIZE;
self.showCheckTotal = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.showCountLabel.frame), CGRectGetMaxY(self.showNoteLabel.frame), ShowWidth, ShowHeight))];
self.showCheckTotal.textAlignment = NSTextAlignmentLeft;
self.showCheckTotal.textColor = GXF_PLACEHOLDER_COLOR;
self.showCheckTotal.text = @"考核总金额:200";
self.showCheckTotal.font = GXF_THREETEENTH_SIZE;
self.editBtn = [UIButton buttonWithType:UIButtonTypeCustom];
......@@ -175,10 +170,11 @@
[self.showView addSubview:self.showShippedBaseQty];
[self.showView addSubview:self.showShippedQty];
[self.showView addSubview:self.showBasePrice];
[self.showView addSubview:self.showTotalLabel];
[self.showView addSubview:self.showNoteLabel];
[self.showView addSubview:self.showCheckPrice];
[self.showView addSubview:self.showCheckTotal];
[self.contentView addSubview:self.lineLabel];
}
......@@ -188,7 +184,6 @@
self.titleLabel.text = pdtDetail.productName;
self.waitRecieveQtyLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.qty];
self.recievedQtyLabel.text = @"0";
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.qpcLabel.text = [pdtDetail.qpcStr stringByAppendingString:pdtDetail.baseUnit];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
......@@ -202,6 +197,10 @@
self.showShippedBaseQty.text = [NSString stringWithFormat:@"转运包装数量:%@%@",pdtDetail.transferQty ? [pdtDetail.transferQty stringValue]:@"0",pdtDetail.unit];
self.showShippedQty.text = [NSString stringWithFormat:@"转运运基础数量:%@%@",pdtDetail.transferBaseQty ? [pdtDetail.transferBaseQty stringValue]:@"0",pdtDetail.baseUnit];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note ? pdtDetail.note :@"无"];
self.showCheckPrice.text = [NSString stringWithFormat:@"考核单价:%.2f元", pdtDetail.checkPrice.doubleValue];
self.showCheckTotal.text = [NSString stringWithFormat:@"考核总金额:%.2f元", pdtDetail.checkTotal.doubleValue];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
......
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