Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-iOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Opple-iOS
Commits
ac6cf0f4
Commit
ac6cf0f4
authored
Nov 10, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项说明:
parent
51f011b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
19 deletions
+14
-19
OrderdetailsViewController.m
Class/OrderdetailsViewController.m
+8
-13
SettlementViewController.m
Class/SettlementViewController.m
+6
-6
No files found.
Class/OrderdetailsViewController.m
View file @
ac6cf0f4
...
@@ -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 -预览订单、撤销订单
...
...
Class/SettlementViewController.m
View file @
ac6cf0f4
...
@@ -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
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment