Commit ac6cf0f4 authored by 曹云霄's avatar 曹云霄

修改项说明:

parent 51f011b5
...@@ -698,23 +698,18 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -698,23 +698,18 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
WS(weakSelf); WS(weakSelf);
NSString *server = [NSString stringWithFormat:SERVERREQUESTURL(ORDERDETAILSURL),[Shoppersmanager manager].Shoppers.employee.departid,self.orderCode]; NSString *server = [NSString stringWithFormat:SERVERREQUESTURL(ORDERDETAILSURL),[Shoppersmanager manager].Shoppers.employee.departid,self.orderCode];
NSString *newServer = [server stringByReplacingOccurrencesOfString:@"/app" withString:@""]; NSString *newServer = [server stringByReplacingOccurrencesOfString:@"/app" withString:@""];
/// 保存文件
// /// 文件 NSFileManager *fileManager = [NSFileManager defaultManager];
// NSFileManager *fileManager = [NSFileManager defaultManager]; NSString * htmlResponseStr=[NSString stringWithContentsOfURL:[NSURL URLWithString:newServer] encoding:NSUTF8StringEncoding error:Nil];
// NSString * htmlResponseStr=[NSString stringWithContentsOfURL:[NSURL URLWithString:newServer] encoding:NSUTF8StringEncoding error:Nil]; NSString *resourcePath = [ [NSBundle mainBundle] resourcePath];
// NSString *resourcePath = [ [NSBundle mainBundle] resourcePath]; [fileManager createDirectoryAtPath:[resourcePath stringByAppendingString:@"/Caches"] withIntermediateDirectories:YES attributes:nil error:nil];
// [fileManager createDirectoryAtPath:[resourcePath stringByAppendingString:@"/Caches"] withIntermediateDirectories:YES attributes:nil error:nil]; NSString * path=[resourcePath stringByAppendingString:[NSString stringWithFormat:@"/Caches/%ld.html",[newServer hash]]];
// NSString * path=[resourcePath stringByAppendingString:[NSString stringWithFormat:@"/Caches/%ld.html",[newServer hash]]]; [htmlResponseStr writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:nil];
// [htmlResponseStr writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:nil]; [self callAirprintWithURL:[NSURL fileURLWithPath:path] SuccessBlock:^{
[self callAirprintWithURL:[NSURL URLWithString:newServer] SuccessBlock:^{
[weakSelf SuccessMBProgressView:@"打印完成"]; [weakSelf SuccessMBProgressView:@"打印完成"];
} ErrorBlock:^{ } ErrorBlock:^{
[weakSelf ErrorMBProgressView:@"打印失败"]; [weakSelf ErrorMBProgressView:@"打印失败"];
}]; }];
} }
#pragma mark -预览订单、撤销订单 #pragma mark -预览订单、撤销订单
......
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
} }
#pragma mark -支付总金额,商品总数量 #pragma mark -支付总金额,商品总数量
- (void)setGoodsArray - (void)setGoodsArray
{ {
...@@ -94,8 +93,13 @@ ...@@ -94,8 +93,13 @@
goodsAllNumber += [model.goodsNum integerValue]; goodsAllNumber += [model.goodsNum integerValue];
goodAllprice += [model.goodsPrice floatValue]*[model.goodsNum integerValue]; goodAllprice += [model.goodsPrice floatValue]*[model.goodsNum integerValue];
} }
//** 促销金额 */ /// 抽奖结果<打折>
NSInteger totalNumber = 0; NSInteger totalNumber = 0;
if ([self.resultModel.type isEqualToString:@"discount"]) {
goodAllprice = goodAllprice*([self.resultModel.number integerValue]/100.0);
}
//** 促销金额 */
for (id object in self.promotionalArray) { for (id object in self.promotionalArray) {
if ([object isKindOfClass:[PromotionalDeductionModel class]]) { if ([object isKindOfClass:[PromotionalDeductionModel class]]) {
PromotionalDeductionModel *model = (PromotionalDeductionModel *)object; PromotionalDeductionModel *model = (PromotionalDeductionModel *)object;
...@@ -105,10 +109,6 @@ ...@@ -105,10 +109,6 @@
} }
} }
goodAllprice -= totalNumber; goodAllprice -= totalNumber;
/// 抽奖结果<打折>
if ([self.resultModel.type isEqualToString:@"discount"]) {
goodAllprice = goodAllprice*([self.resultModel.number integerValue]/100.0);
}
self.goodsAllNumber.text = [NSString stringWithFormat:@"%ld",goodsAllNumber]; self.goodsAllNumber.text = [NSString stringWithFormat:@"%ld",goodsAllNumber];
self.goodsAllPrice.text = [NSString stringWithFormat:@"¥%.2f",goodAllprice]; self.goodsAllPrice.text = [NSString stringWithFormat:@"¥%.2f",goodAllprice];
} }
......
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