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
c03e5b1c
Commit
c03e5b1c
authored
May 25, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
23c6bd10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ShoppingTableViewCell.m
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
+3
-3
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+1
-1
No files found.
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
View file @
c03e5b1c
...
...
@@ -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
];
}
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
c03e5b1c
...
...
@@ -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
];
...
...
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