Commit ec504896 authored by Sandy's avatar Sandy

采购单费用明细加到其它费用里面

parent 370b3b4b
......@@ -23,14 +23,14 @@
#define ICR_IMAGE_BG_COLOR [UIColor colorWithW:242 a:1]
//********阿里云内部测试环境********
//#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
#define HTTP_REST_API_BASE_URL @"http://218.244.151.129:7580/cruiser-server/rest"
//********现场测试环境********
//#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7280/cruiser-server/rest"
//********现场正式环境*********
#define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
// #define HTTP_REST_API_BASE_URL @"http://122.224.171.126:7380/cruiser-server/rest"
#define HTTP_REST_REPORT_BASE_URL @"http://122.224.171.126:7380"
// HTTP
......
......@@ -188,18 +188,35 @@ typedef enum : NSUInteger {
}
//添加商品明细,更新上部显示的费用
- (void)setProductTotalPrice:(NSNotification *)fication{
//计算总金额
float otherPrice = 0;
// if (_aBottomView.costVC.costArr.count == 0) {
// otherPrice = [_purchaseView.otherPriceFiled.text floatValue];
// }else{
for (FeeAcountDetail *cost in _aBottomView.costVC.costArr) {
otherPrice += [cost.leftmoney floatValue];
}
_purchaseView.otherPriceFiled.text = [NSString stringWithFormat:@"%.2f", otherPrice];
// }
//其他费用 + 商品总金额
float otherPrice = [_purchaseView.otherPriceFiled.text floatValue];
NSMutableArray *purchaseProduct = _aBottomView.productVC.productArr;
float totalPrice = 0;
for (PurchaseBillProduct *billProduct in purchaseProduct) {
totalPrice += [billProduct.total floatValue];
}
_purchaseView.purchasePriceLabel.text = [NSString stringWithFormat:@"%.2f",totalPrice + otherPrice];
_purchaseView.chargePurchase = [NSNumber numberWithFloat:otherPrice];
_purchaseView.total = [NSNumber numberWithFloat:totalPrice+otherPrice];
_purchaseView.chargePurchase = [NSNumber numberWithFloat:otherPrice];
}
- (void)addPurchaseProduct:(NSNotification *)fication{
......
......@@ -138,7 +138,11 @@
[self.costVC.tableView reloadData];
}
}
[[NSNotificationCenter defaultCenter] postNotificationName:SetProductTotalPrice object:nil];
}
//删除
- (void)refreshDelCost:(FeeAcountDetail *)fee indexPath:(NSIndexPath *)indexPath{
if (indexPath) {
......
......@@ -58,6 +58,13 @@
[self addSubview:_tableView];
}
#pragma mark - 协议方法
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 4) {
return 0.01;
}
return 44;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
......@@ -90,13 +97,16 @@
textField.delegate = self;
[cell.contentView addSubview:textField];
self.otherPriceFiled = textField;
self.otherPriceFiled.placeholder = @"请输入其他费用";
self.otherPriceFiled.placeholder = @"其他费用";
self.otherPriceFiled.enabled = NO;
[self.otherPriceFiled addTarget:self action:@selector(boxValueChanged:) forControlEvents:UIControlEventEditingChanged];
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(textField.frame) + 5, 0, 20, TableHeight)];
label.text = @"元";
label.textColor = GXF_CONTENT_COLOR;
label.font = GXF_FIFTEENTEN_SIZE;
[cell.contentView removeAllSubViews];
[cell.contentView addSubview:label];
cell.alpha = 0;
}else if (indexPath.row == _dataArr.count -1){
self.remarkTextView = [[HPGrowingTextView alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-15, TableHeight)];
......
......@@ -101,6 +101,8 @@ typedef enum : NSUInteger {
default:
break;
}
[[NSNotificationCenter defaultCenter] postNotificationName:SetProductTotalPrice object:nil];
}
- (void)clearInfomation{
_chooseCostLabel.text = @"选择费用类型";
......
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