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

修改项说明:

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