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
e145e4f4
Commit
e145e4f4
authored
May 26, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
6f6e8b62
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
25 deletions
+34
-25
AllCustomerViewController.m
Lighting/Class/AllCustomerViewController.m
+2
-3
ClientViewController.m
Lighting/Class/ClientViewController.m
+0
-2
SettlementViewController.m
Lighting/Class/SettlementViewController.m
+0
-1
GenerateOrdersViewController.m
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
+5
-0
ShoppingTableViewCell.h
Lighting/Class/Shoppingcart/ShoppingTableViewCell.h
+1
-1
ShoppingTableViewCell.m
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
+6
-6
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+7
-4
Toolview.m
Lighting/Class/Tabbar/Toolview.m
+1
-1
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+12
-7
No files found.
Lighting/Class/AllCustomerViewController.m
View file @
e145e4f4
...
...
@@ -217,7 +217,6 @@
NSString
*
customerID
=
[[
weakSelf
.
CustomerresultArray
objectAtIndex_opple
:
indexPath
.
row
]
fid
];
NSDictionary
*
dict
=
@{
@"customerid"
:
customerID
,
@"title"
:
title
,
@"model"
:
[
weakSelf
.
CustomerresultArray
objectAtIndex_opple
:
indexPath
.
row
]};
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"SETUPCURRENTCUSTOMER"
object
:
dict
];
}];
[
self
.
navigationController
pushViewController
:
clientdetails
animated
:
YES
];
}
...
...
@@ -305,8 +304,8 @@
case
0
:
//start == end
{
[
formater
setDateFormat
:
@"yyyy-MM-dd HH:dd:ss"
];
searchCustomer
.
createTimeBegin
=
[
formater
stringFromDate
:[
self
ReturnZeroTime
:
date
]];
searchCustomer
.
createTimeEnd
=
[
formater
stringFromDate
:[
self
ReturnZeroTime
:
date1
]];
//
searchCustomer.createTimeBegin = [formater stringFromDate:[self ReturnZeroTime:date]];
//
searchCustomer.createTimeEnd = [formater stringFromDate:[self ReturnZeroTime:date1]];
}
break
;
case
1
:
//start > end
...
...
Lighting/Class/ClientViewController.m
View file @
e145e4f4
...
...
@@ -372,7 +372,6 @@
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
promptCustomerWithString
:
@"网络连接已断开"
];
}
WithFailureBlock
:^
(
id
error
)
{
...
...
@@ -537,7 +536,6 @@
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
promptCustomerWithString
:
@"网络连接已断开"
];
}
WithFailureBlock
:^
(
id
error
)
{
...
...
Lighting/Class/SettlementViewController.m
View file @
e145e4f4
...
...
@@ -283,7 +283,6 @@
[
self
ErrorMBProgressView
:
@"发票抬头不能为空"
];
return
;
}
}
else
if
([
self
.
invoiceType
.
currentTitle
isEqualToString
:
@"个人发票"
])
{
order
.
billType
=
@"002"
;
...
...
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
View file @
e145e4f4
...
...
@@ -235,6 +235,11 @@
break
;
case
1
:
{
NSArray
*
arr
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
section
];
if
(
indexPath
.
row
==
arr
.
count
-
1
)
{
return
70
;
}
return
56
;
}
break
;
...
...
Lighting/Class/Shoppingcart/ShoppingTableViewCell.h
View file @
e145e4f4
...
...
@@ -15,7 +15,7 @@
/**
* 当前商品数量、成交价
*/
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
in
t
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
;
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
CGFloa
t
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
;
@end
...
...
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
View file @
e145e4f4
...
...
@@ -37,7 +37,7 @@
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
]?[
_model
.
costPrice
stringValue
]:[
_model
.
goods
.
tagPrice
stringValue
];
self
.
clinchTextfield
.
text
=
[
NSString
stringWithFormat
:
@"%.2f"
,[
_model
.
costPrice
floatValue
]?[
_model
.
costPrice
floatValue
]:[
_model
.
goods
.
tagPrice
floatValue
]
];
self
.
goodsNumbersLabe
.
text
=
[
NSString
stringWithFormat
:
@"%d"
,
_model
.
goodsNum
];
if
([
_model
.
costPrice
integerValue
]
==
0
)
{
_model
.
costPrice
=
_model
.
goods
.
tagPrice
;
...
...
@@ -90,10 +90,10 @@
break
;
}
//改变价格
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%
ld"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
_model
.
goods
.
costPrice
integer
Value
]];
_model
.
costPrice
=
[
NSNumber
numberWithFloat
:[
self
.
clinchTextfield
.
text
floatValue
]];
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%
.2f"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
_model
.
costPrice
float
Value
]];
//
_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
in
tValue
]
Withcellindex
:
_cellindex
];
[
self
.
delegate
ChangeGoodsNumber
:[
self
.
goodsNumbersLabe
.
text
intValue
]
WithcostPrice
:[
self
.
clinchTextfield
.
text
floa
tValue
]
Withcellindex
:
_cellindex
];
}
}
...
...
@@ -119,10 +119,10 @@
}
else
{
//改变价格
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%
ld"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
textField
.
text
integer
Value
]];
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%
.2f"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
textField
.
text
float
Value
]];
if
([
self
.
delegate
respondsToSelector
:
@selector
(
ChangeGoodsNumber
:
WithcostPrice
:
Withcellindex
:
)])
{
[
self
.
delegate
ChangeGoodsNumber
:[
self
.
goodsNumbersLabe
.
text
intValue
]
WithcostPrice
:[
self
.
clinchTextfield
.
text
in
tValue
]
Withcellindex
:
_cellindex
];
[
self
.
delegate
ChangeGoodsNumber
:[
self
.
goodsNumbersLabe
.
text
intValue
]
WithcostPrice
:[
self
.
clinchTextfield
.
text
floa
tValue
]
Withcellindex
:
_cellindex
];
}
}
return
YES
;
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
e145e4f4
...
...
@@ -387,8 +387,9 @@
#pragma mark -改变商品数量
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
in
t
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
CGFloa
t
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
{
[
self
CreateMBProgressHUDLoding
];
//保存商品数量
ShopcarModel
*
model
=
[
self
.
shopResponseArray
objectAtIndex_opple
:
cellindex
];
model
.
goodsNum
=
goodsNumber
;
...
...
@@ -396,10 +397,9 @@
//保存成交价格
ShopcarModel
*
Newmodel
=
[
self
.
shopResponseArray
objectAtIndex_opple
:
cellindex
];
Newmodel
.
costPrice
=
[
NSNumber
numberWith
Integer
:
costprice
];
Newmodel
.
costPrice
=
[
NSNumber
numberWith
Float
:
costprice
];
// [self.shopResponseArray replaceObjectAtIndex:cellindex withObject:Newmodel];
[
self
CalculateSelectedGoodsAllprice
];
////在服务器保存数量、成交价
//购物车ID
...
...
@@ -407,13 +407,15 @@
//商品id
NSString
*
goodsis
=
[[[
self
.
shopResponseArray
objectAtIndex_opple
:
cellindex
]
goods
]
fid
];
//成交价
NSString
*
costpriceString
=
[
NSString
stringWithFormat
:
@"%
d
"
,
costprice
];
NSString
*
costpriceString
=
[
NSString
stringWithFormat
:
@"%
.2f
"
,
costprice
];
//商品数量
NSString
*
goodsNumberString
=
[
NSString
stringWithFormat
:
@"%d"
,
goodsNumber
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@/%@/%@/%@"
,
ServerAddress
,
@"/shopcart/updateCostPrice/"
,
carid
,
goodsis
,
costpriceString
,
goodsNumberString
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
NSLog
(
@"写入服务器成功"
);
[
self
CalculateSelectedGoodsAllprice
];
[
self
QueryShoppingCarNumber
];
}
...
...
@@ -424,6 +426,7 @@
NSLog
(
@"%@"
,
error
);
NSLog
(
@"写入服务器失败"
);
[
self
RemoveMBProgressHUDLoding
];
}];
}
...
...
Lighting/Class/Tabbar/Toolview.m
View file @
e145e4f4
...
...
@@ -83,7 +83,7 @@
//按钮
NSString
*
realName
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
realName
?[
Shoppersmanager
manager
].
Shoppers
.
employee
.
realName
:
@"服务导购"
;
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"功能菜单"
,
realName
,
@"我的客户"
,
@"购物
车
"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"功能菜单"
,
realName
,
@"我的客户"
,
@"购物
袋
"
,
nil
];
//图片
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"dial"
,
@"Cog"
,
@"data"
,
@"ablum"
,
nil
];
for
(
int
i
=
1
;
i
<
5
;
i
++
)
{
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
e145e4f4
...
...
@@ -1181,7 +1181,7 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
reuseIdentifier=
"productcell"
id=
"J5m-0M-uqb"
customClass=
"ProductCollectionViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
64
"
width=
"300"
height=
"300"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
0.0
"
width=
"300"
height=
"300"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<view
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"300"
height=
"300"
/>
...
...
@@ -1263,7 +1263,7 @@
<color
key=
"backgroundColor"
red=
"0.93725490199999995"
green=
"0.93725490199999995"
blue=
"0.95686274510000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"productDetailscell"
rowHeight=
"170"
id=
"Sye-2R-IQf"
customClass=
"ProductDetailsTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
113
.5"
width=
"768"
height=
"170"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
49
.5"
width=
"768"
height=
"170"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"Sye-2R-IQf"
id=
"CXs-SR-gHP"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"169.5"
/>
...
...
@@ -2015,11 +2015,11 @@
<outlet
property=
"isSelectedButton"
destination=
"fs3-Vh-g5G"
id=
"avL-eW-lce"
/>
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"Modifycell"
rowHeight=
"
56
"
id=
"Kk4-Fh-HhL"
customClass=
"GenerateOrdersModifyTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"258"
width=
"768"
height=
"
56
"
/>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"Modifycell"
rowHeight=
"
70
"
id=
"Kk4-Fh-HhL"
customClass=
"GenerateOrdersModifyTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"258"
width=
"768"
height=
"
70
"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"Kk4-Fh-HhL"
id=
"oRX-7p-HkY"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"
55
.5"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"
69
.5"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"m0f-EW-LM5"
>
...
...
@@ -2038,6 +2038,10 @@
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
</button>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"lineNew"
id=
"4A8-SN-0BX"
>
<rect
key=
"frame"
x=
"0.0"
y=
"65"
width=
"768"
height=
"5"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMinY=
"YES"
/>
</imageView>
</subviews>
</tableViewCellContentView>
<color
key=
"backgroundColor"
red=
"0.94901960784313721"
green=
"0.94901960784313721"
blue=
"0.94901960784313721"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
...
@@ -2047,7 +2051,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"fourthcell"
rowHeight=
"80"
id=
"G7o-xS-1mB"
customClass=
"CommodityListTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"3
14
"
width=
"768"
height=
"80"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"3
28
"
width=
"768"
height=
"80"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"G7o-xS-1mB"
id=
"l3e-TL-GCT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"79.5"
/>
...
...
@@ -2119,7 +2123,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"sixthcell"
rowHeight=
"50"
id=
"6K9-mc-7RW"
customClass=
"AllpriceTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
394
"
width=
"768"
height=
"50"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
408
"
width=
"768"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"6K9-mc-7RW"
id=
"Vc7-f6-wGb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"49.5"
/>
...
...
@@ -3234,6 +3238,7 @@
<image
name=
"box-副本"
width=
"26"
height=
"26"
/>
<image
name=
"jia"
width=
"30"
height=
"30"
/>
<image
name=
"line"
width=
"301"
height=
"30"
/>
<image
name=
"lineNew"
width=
"1024"
height=
"7"
/>
<image
name=
"now"
width=
"110"
height=
"110"
/>
<image
name=
"reduce"
width=
"49"
height=
"45"
/>
<image
name=
"已完成"
width=
"88"
height=
"87"
/>
...
...
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