Commit c03e5b1c authored by 勾芒's avatar 勾芒

debug

parent 23c6bd10
......@@ -37,9 +37,9 @@
self.specifications.text = _model.goods.size;
self.goodsCode.text = _model.goods.code;
self.tagsPriceLabe.text = [_model.goods.tagPrice stringValue];
self.clinchTextfield.text = [_model.costPrice stringValue];
self.clinchTextfield.text = [_model.costPrice stringValue]?[_model.costPrice stringValue]:[_model.goods.tagPrice stringValue];
self.goodsNumbersLabe.text = [NSString stringWithFormat:@"%d",_model.goodsNum];
self.productPriceLabe.text = [NSString stringWithFormat:@"¥%.2f",[self.goodsNumbersLabe.text floatValue]*[_model.costPrice floatValue]];;
self.productPriceLabe.text = [NSString stringWithFormat:@"¥%.2f",[self.goodsNumbersLabe.text floatValue]*([_model.costPrice floatValue]?[_model.costPrice floatValue]:[_model.goods.tagPrice floatValue])];;
}
#pragma mark -增加或者减少商品
......@@ -88,7 +88,7 @@
}
//改变价格
self.productPriceLabe.text = [NSString stringWithFormat:@"¥%ld",[self.goodsNumbersLabe.text integerValue]*[_model.goods.costPrice integerValue]];
_model.costPrice = [NSNumber numberWithFloat:[self.clinchTextfield.text floatValue]];
if ([self.delegate respondsToSelector:@selector(ChangeGoodsNumber:WithcostPrice:Withcellindex:)]) {
[self.delegate ChangeGoodsNumber:[self.goodsNumbersLabe.text intValue] WithcostPrice:[self.clinchTextfield.text intValue]Withcellindex:_cellindex];
}
......
......@@ -319,7 +319,7 @@
CGFloat allPrice = 0;
for (ShopcarModel *model in self.shopResponseArray) {
if (model.isSelected) {
allPrice += [model.costPrice floatValue] * model.goodsNum;
allPrice += ([model.costPrice floatValue]?[model.costPrice floatValue]:[model.goods.tagPrice floatValue]) * model.goodsNum;
}
}
self.totalpriceLabe.text = [NSString stringWithFormat:@"¥%.2f",allPrice];
......
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