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
d2d48b1c
Commit
d2d48b1c
authored
May 24, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caoyunxiao
parent
86b6e5fc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
343 additions
and
148 deletions
+343
-148
AdditionalTableViewCell.m
Lighting/Class/AdditionalTableViewCell.m
+0
-1
ClientViewController.m
Lighting/Class/ClientViewController.m
+4
-3
CustomerOrderTableViewCell.h
Lighting/Class/CustomerOrderTableViewCell.h
+11
-2
CustomerOrderTableViewCell.m
Lighting/Class/CustomerOrderTableViewCell.m
+17
-7
CustomerOrderViewController.m
Lighting/Class/CustomerOrderViewController.m
+84
-53
FullScreenViewController.m
Lighting/Class/FullScreenViewController.m
+1
-0
OrderdetailsViewController.h
Lighting/Class/OrderdetailsViewController.h
+24
-0
OrderdetailsViewController.m
Lighting/Class/OrderdetailsViewController.m
+59
-19
ProductDetailsHeaderView.m
Lighting/Class/ProductDetailsHeaderView.m
+1
-0
ProductDetailsHeaderView.xib
Lighting/Class/ProductDetailsHeaderView.xib
+5
-16
ProductDetailsViewController.m
Lighting/Class/ProductDetailsViewController.m
+1
-1
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+2
-0
ScannerViewController.m
Lighting/Class/ScannerViewController.m
+2
-2
SceneLibraryViewController.m
Lighting/Class/SceneLibraryViewController.m
+1
-1
SettlementViewController.m
Lighting/Class/SettlementViewController.m
+24
-1
AddressViewController.m
Lighting/Class/Shoppingcart/AddressViewController.m
+7
-1
Contents.json
Lighting/Lighting/Images.xcassets/add.imageset/Contents.json
+22
-0
add.png
Lighting/Lighting/Images.xcassets/add.imageset/add.png
+0
-0
add@2x.png
Lighting/Lighting/Images.xcassets/add.imageset/add@2x.png
+0
-0
Contents.json
...ng/Lighting/Images.xcassets/reduce.imageset/Contents.json
+22
-0
reduce.png
Lighting/Lighting/Images.xcassets/reduce.imageset/reduce.png
+0
-0
reduce@2x.png
...ng/Lighting/Images.xcassets/reduce.imageset/reduce@2x.png
+0
-0
Info.plist
Lighting/Lighting/Info.plist
+1
-1
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+55
-40
No files found.
Lighting/Class/AdditionalTableViewCell.m
View file @
d2d48b1c
...
...
@@ -25,7 +25,6 @@
self
.
invoiceHeader
.
text
=
_model
.
billTitle
;
self
.
invoiceType
.
text
=
_model
.
billType
;
self
.
invoiceType
.
text
=
_model
.
payType
;
}
...
...
Lighting/Class/ClientViewController.m
View file @
d2d48b1c
...
...
@@ -72,6 +72,7 @@
page
.
page
=
1
;
condition
.
page
=
page
;
page
.
rows
=
10
;
self
.
indexPage
=
1
;
[
self
.
informationTableview
.
mj_footer
resetNoMoreData
];
[
self
getShoppersAssociatedCustomer
:
condition
isRemoveArray
:
YES
];
}];
...
...
@@ -83,13 +84,13 @@
[
self
.
informationTableview
.
mj_header
beginRefreshing
];
//上拉加载
self
.
informationTableview
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
ConsumerQueryCondition
*
condition
=
[[
ConsumerQueryCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
if
(
self
.
indexPage
++
>
self
.
totalPages
)
{
[
self
.
informationTableview
.
mj_footer
endRefreshingWithNoMoreData
];
}
else
{
ConsumerQueryCondition
*
condition
=
[[
ConsumerQueryCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
++
;
page
.
rows
=
10
;
condition
.
page
=
page
;
...
...
Lighting/Class/CustomerOrderTableViewCell.h
View file @
d2d48b1c
...
...
@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
/**
* 撤销订单
* 撤销订单
、去支付
*/
@protocol
undoOrderDelegate
<
NSObject
>
...
...
@@ -21,7 +21,12 @@
*
* @param cellindex cell下标
*/
-
(
void
)
undoOrderButtonClick
:
(
NSInteger
)
cellindex
WithButtonCurrent
:
(
NSString
*
)
title
;
-
(
void
)
undoOrderButtonClick
:
(
NSInteger
)
cellindex
;
/**
* 去支付
*/
-
(
void
)
TopayButtonClick
:(
NSInteger
)
cellindex
;
@end
...
...
@@ -159,6 +164,10 @@
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
orderStateImageView
;
/**
* 去支付
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
gotoPayButton
;
...
...
Lighting/Class/CustomerOrderTableViewCell.m
View file @
d2d48b1c
...
...
@@ -22,6 +22,8 @@
{
self
.
delecteOrder
.
layer
.
masksToBounds
=
YES
;
self
.
delecteOrder
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
gotoPayButton
.
layer
.
masksToBounds
=
YES
;
self
.
gotoPayButton
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
cellBackView
.
layer
.
masksToBounds
=
YES
;
self
.
cellBackView
.
layer
.
cornerRadius
=
kCornerRadius
;
...
...
@@ -38,7 +40,7 @@
_model
=
model
;
self
.
orderDate
.
text
=
_model
.
order
.
createDate
;
self
.
orderSerialNumber
.
text
=
_model
.
order
.
orderNumber
;
self
.
shoppersName
.
text
=
_model
.
employee
.
user
Name
;
self
.
shoppersName
.
text
=
_model
.
employee
.
real
Name
;
self
.
customerName
.
text
=
_model
.
consumer
.
name
;
[
self
.
customerHeader
sd_setImageWithURL
:[
NSURL
URLWithString
:
_model
.
consumer
.
picture
]
placeholderImage
:
ReplaceImage
];
self
.
orderStatus
.
text
=
_model
.
order
.
orderState
;
...
...
@@ -54,14 +56,14 @@
}
self
.
orderTotalPrice
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
goodsAllprice
];
//撤销订单、去支付
if
([
_model
.
order
.
orderState
isEqualToString
:
@"00
2"
]
||
[
_model
.
order
.
orderState
isEqualToString
:
@"00
1"
])
{
if
([
_model
.
order
.
orderState
isEqualToString
:
@"001"
])
{
self
.
delecteOrder
.
hidden
=
NO
;
if
([
_model
.
order
.
orderState
isEqualToString
:
@"001"
])
{
[
self
.
delecteOrder
setTitle
:
@"去支付"
forState
:
UIControlStateNormal
];
}
self
.
gotoPayButton
.
hidden
=
NO
;
}
else
{
self
.
delecteOrder
.
hidden
=
YES
;
self
.
gotoPayButton
.
hidden
=
YES
;
}
//订单状态图片
self
.
orderStateImageView
.
image
=
[
BaseViewController
ReturnOrderStateImageWithStateCode
:[
_model
.
order
.
orderState
integerValue
]];
...
...
@@ -86,14 +88,22 @@
#pragma mark -撤销订单
-
(
IBAction
)
delecteOrderButtonClick
:
(
UIButton
*
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
undoOrderButtonClick
:
WithButtonCurrent
:
)])
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
undoOrderButtonClick
:)])
{
[
self
.
delegate
undoOrderButtonClick
:
_cellIndex
WithButtonCurrent
:
sender
.
currentTitle
];
[
self
.
delegate
undoOrderButtonClick
:
_cellIndex
];
}
}
#pragma mark -去支付
-
(
IBAction
)
GotoPayButtonClick
:
(
UIButton
*
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
TopayButtonClick
:)])
{
[
self
.
delegate
TopayButtonClick
:
_cellIndex
];
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
...
...
Lighting/Class/CustomerOrderViewController.m
View file @
d2d48b1c
...
...
@@ -26,6 +26,11 @@
*/
@property
(
nonatomic
,
strong
)
NSArray
*
orderStateArray
;
/**
* 总页数
*/
@property
(
nonatomic
,
assign
)
int
totalPages
;
@end
@implementation
CustomerOrderViewController
...
...
@@ -60,9 +65,25 @@
}
#pragma mark -视图渲染完成
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
searchCustomerOrder
.
delegate
=
self
;
self
.
view
.
backgroundColor
=
kTCColor
(
238
,
238
,
238
);
self
.
customerOrderTableView
.
dataSource
=
self
;
self
.
customerOrderTableView
.
delegate
=
self
;
self
.
customerOrderTableView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
StyleButton
=
[
screeningButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
StyleButton
.
frame
=
CGRectMake
(
ScreenWidth
-
250
,
20
,
150
,
30
);
self
.
StyleButton
.
backgroundColor
=
kTCColor
(
131
,
131
,
131
);
[
self
.
StyleButton
setTitle
:
@"订单状态"
forState
:
UIControlStateNormal
];
[
self
.
StyleButton
addTarget
:
self
action
:
@selector
(
OrderStateButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
StyleButton
setImage
:
TCImage
(
@"down_arr"
)
forState
:
UIControlStateNormal
];
self
.
StyleButton
.
layer
.
masksToBounds
=
YES
;
self
.
StyleButton
.
layer
.
cornerRadius
=
10
;
[
self
.
orderStateBackView
addSubview
:
self
.
StyleButton
];
//下拉刷新
MjRefreshHeaderCustom
*
headerRefresh
=
[
MjRefreshHeaderCustom
headerWithRefreshingBlock
:
^
{
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
...
...
@@ -75,55 +96,38 @@
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
[
self
.
customerOrderTableView
.
mj_footer
resetNoMoreData
];
self
.
indexPage
=
1
;
[
self
getGuideAllcustomerOrder
:
YES
WithorderBill
:
allOrder
];
}];
headerRefresh
.
stateLabel
.
hidden
=
YES
;
headerRefresh
.
lastUpdatedTimeLabel
.
hidden
=
YES
;
self
.
customerOrderTableView
.
mj_header
=
headerRefresh
;
[
self
.
customerOrderTableView
.
mj_header
beginRefreshing
];
//上拉加载
self
.
customerOrderTableView
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
;
page
.
rows
=
10
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
self
.
indexPage
++
;
[
self
getGuideAllcustomerOrder
:
NO
WithorderBill
:
allOrder
];
if
(
self
.
indexPage
++
>
self
.
totalPages
)
{
[
self
.
customerOrderTableView
.
mj_footer
endRefreshingWithNoMoreData
];
}
else
{
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
++
;
page
.
rows
=
10
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
[
self
getGuideAllcustomerOrder
:
NO
WithorderBill
:
allOrder
];
}
}];
}
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
searchCustomerOrder
.
delegate
=
self
;
self
.
view
.
backgroundColor
=
kTCColor
(
238
,
238
,
238
);
self
.
customerOrderTableView
.
dataSource
=
self
;
self
.
customerOrderTableView
.
delegate
=
self
;
self
.
customerOrderTableView
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
StyleButton
=
[
screeningButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
StyleButton
.
frame
=
CGRectMake
(
ScreenWidth
-
250
,
20
,
150
,
30
);
self
.
StyleButton
.
backgroundColor
=
kTCColor
(
131
,
131
,
131
);
[
self
.
StyleButton
setTitle
:
@"订单状态"
forState
:
UIControlStateNormal
];
[
self
.
StyleButton
addTarget
:
self
action
:
@selector
(
OrderStateButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
StyleButton
setImage
:
TCImage
(
@"down_arr"
)
forState
:
UIControlStateNormal
];
self
.
StyleButton
.
layer
.
masksToBounds
=
YES
;
self
.
StyleButton
.
layer
.
cornerRadius
=
10
;
[
self
.
orderStateBackView
addSubview
:
self
.
StyleButton
];
}
#pragma mark -获取导购下客户订单 ----isdelecte 表示是否清空数组
-
(
void
)
getGuideAllcustomerOrder
:
(
BOOL
)
isdelecte
WithorderBill
:
(
OrderBill
*
)
allOrder
{
...
...
@@ -139,6 +143,7 @@
[
self
.
datasArray
removeAllObjects
];
}
OrderResponse
*
Allorder
=
[[
OrderResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
self
.
totalPages
=
(
int
)
returnValue
[
@"data"
][
@"totalPages"
];
for
(
OrderBill
*
model
in
Allorder
.
orderBillList
)
{
[
self
.
datasArray
addObject
:
model
];
}
...
...
@@ -194,13 +199,17 @@
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
OrderdetailsViewController
*
orderdetails
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"orderdetails"
];
TOOrderEntity
*
model
=
[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
row
]
order
];
orderdetails
.
orderCode
=
model
.
orderNumber
;
orderdetails
.
sectionTitle
=
@[
@"订单信息"
,
@"客户信息"
,
@"收货信息"
,
@"商品信息"
,
@"附件信息"
];
orderdetails
.
isShowattachment
=
YES
;
if
([
model
.
orderState
isEqualToString
:
@"006"
])
{
orderdetails
.
isShowPrintButton
=
YES
;
orderdetails
.
isDelectedButton
=
NO
;
}
if
([
model
.
orderState
isEqualToString
:
@"001"
])
{
orderdetails
.
isShowPayButton
=
YES
;
orderdetails
.
isDelectedButton
=
YES
;
orderdetails
.
isShowPrintButton
=
YES
;
}
[
self
.
navigationController
pushViewController
:
orderdetails
animated
:
YES
];
...
...
@@ -297,8 +306,8 @@
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
;
page
.
rows
=
10
;
page
.
page
=
1
;
page
.
rows
=
9999
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
...
...
@@ -309,10 +318,8 @@
customer
.
name
=
textField
.
text
;
customer
.
mobile
=
textField
.
text
;
allOrder
.
consumer
=
customer
;
self
.
indexPage
=
0
;
self
.
indexPage
=
1
;
[
self
getGuideAllcustomerOrder
:
YES
WithorderBill
:
allOrder
];
return
YES
;
}
...
...
@@ -325,11 +332,10 @@
*
* @param cellindex cell下标
*/
-
(
void
)
undoOrderButtonClick
:
(
NSInteger
)
cellindex
WithButtonCurrent
:
(
NSString
*
)
title
-
(
void
)
undoOrderButtonClick
:
(
NSInteger
)
cellindex
{
[
self
CreateMBProgressHUDLoding
];
if
([
title
isEqualToString
:
@"撤销订单"
])
{
[
self
CreateMBProgressHUDLoding
];
OrderBill
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@/%@/%@"
,
ServerAddress
,
@"/order/updateOrderState/"
,
model
.
order
.
orderNumber
,
model
.
order
.
orderState
,
@"005"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -352,16 +358,41 @@
[
self
RemoveMBProgressHUDLoding
];
}];
}
else
if
([
title
isEqualToString
:
@"去支付"
])
{
}
}
/**
* 去支付
*/
-
(
void
)
TopayButtonClick
:
(
NSInteger
)
cellindex
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
OrderdetailsViewController
*
orderdetails
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"orderdetails"
];
TOOrderEntity
*
model
=
[[
self
.
datasArray
objectAtIndex_opple
:
cellindex
]
order
];
orderdetails
.
orderCode
=
model
.
orderNumber
;
orderdetails
.
sectionTitle
=
@[
@"订单信息"
,
@"客户信息"
,
@"收货信息"
,
@"商品信息"
,
@"附件信息"
];
orderdetails
.
isShowattachment
=
YES
;
if
([
model
.
orderState
isEqualToString
:
@"006"
])
{
orderdetails
.
isShowPrintButton
=
YES
;
orderdetails
.
isDelectedButton
=
NO
;
}
if
([
model
.
orderState
isEqualToString
:
@"001"
])
{
orderdetails
.
isShowPayButton
=
YES
;
orderdetails
.
isDelectedButton
=
YES
;
orderdetails
.
isShowPrintButton
=
YES
;
}
//撤销、支付回调
[
orderdetails
setDelecteAndPayButtonBlock
:
^
(
NSInteger
cellindex
,
NSString
*
orderSate
)
{
OrderBill
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
model
.
order
.
orderState
=
orderSate
;
NSIndexPath
*
indexapath
=
[
NSIndexPath
indexPathForRow
:
cellindex
inSection
:
0
];
[
self
.
customerOrderTableView
reloadRowsAtIndexPaths
:@[
indexapath
]
withRowAnimation
:
UITableViewRowAnimationNone
];
}];
[
self
.
navigationController
pushViewController
:
orderdetails
animated
:
YES
];
}
...
...
Lighting/Class/FullScreenViewController.m
View file @
d2d48b1c
...
...
@@ -71,6 +71,7 @@ static NSString * const reuseIdentifier = @"Cell";
UIButton
*
backButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backButton
.
frame
=
CGRectMake
(
50
,
0
,
100
,
64
);
[
backButton
setTitle
:
@"返回"
forState
:
UIControlStateNormal
];
[
backButton
addTarget
:
self
action
:
@selector
(
BackButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
backView
addSubview
:
backButton
];
//随心配
...
...
Lighting/Class/OrderdetailsViewController.h
View file @
d2d48b1c
...
...
@@ -46,4 +46,28 @@
*/
@property
(
nonatomic
,
assign
)
BOOL
isShowPrintButton
;
/**
* 是否显示撤销订单
*/
@property
(
nonatomic
,
assign
)
BOOL
isDelectedButton
;
/**
* 撤销按钮、支付按钮完成回调
*/
@property
(
nonatomic
,
copy
)
void
(
^
DelecteAndPayButtonBlock
)(
NSInteger
cellindex
,
NSString
*
orderState
);
/**
* cell下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
cellindex
;
@end
Lighting/Class/OrderdetailsViewController.m
View file @
d2d48b1c
...
...
@@ -103,7 +103,7 @@
//预览
UIButton
*
previewButton
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
previewButton
.
frame
=
CGRectMake
(
50
,
15
,
150
,
30
);
[
previewButton
setTitle
:
@"预览"
forState
:
UIControlStateNormal
];
[
previewButton
setTitle
:
self
.
isDelectedButton
?
@"撤销订单"
:
@"预览"
forState
:
UIControlStateNormal
];
previewButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
previewButton
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
[
previewButton
addTarget
:
self
action
:
@selector
(
PreviewButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
@@ -112,17 +112,21 @@
previewButton
.
layer
.
cornerRadius
=
kCornerRadius
;
[
headerView
addSubview
:
previewButton
];
//打印
UIButton
*
printButton
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
printButton
.
frame
=
CGRectMake
(
ScreenWidth
-
50
-
150
,
15
,
150
,
30
);
[
printButton
setTitle
:
@"打印"
forState
:
UIControlStateNormal
];
[
printButton
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
printButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
printButton
addTarget
:
self
action
:
@selector
(
AirprintButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
printButton
.
layer
.
masksToBounds
=
YES
;
printButton
.
layer
.
cornerRadius
=
kCornerRadius
;
printButton
.
backgroundColor
=
kMainBlueColor
;
[
headerView
addSubview
:
printButton
];
//显示撤销按钮的情况下,不显示打印按钮
if
(
!
self
.
isDelectedButton
)
{
//打印
UIButton
*
printButton
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
printButton
.
frame
=
CGRectMake
(
ScreenWidth
-
50
-
150
,
15
,
150
,
30
);
[
printButton
setTitle
:
@"打印"
forState
:
UIControlStateNormal
];
[
printButton
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateNormal
];
printButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
printButton
addTarget
:
self
action
:
@selector
(
AirprintButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
printButton
.
layer
.
masksToBounds
=
YES
;
printButton
.
layer
.
cornerRadius
=
kCornerRadius
;
printButton
.
backgroundColor
=
kMainBlueColor
;
[
headerView
addSubview
:
printButton
];
}
//横线
UIView
*
lineView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
59
,
ScreenWidth
,
1
)];
...
...
@@ -161,8 +165,12 @@
[
settlement
setPaySuccessReturnBlock
:
^
{
[
self
getOrderDetailsData
];
self
.
isDelectedButton
=
NO
;
[
self
CreateTableviewHeaderView
];
self
.
orderDetailsTableview
.
tableFooterView
=
nil
;
if
(
self
.
DelecteAndPayButtonBlock
)
{
self
.
DelecteAndPayButtonBlock
(
_cellindex
,
@"002"
);
}
}];
settlement
.
preferredContentSize
=
CGSizeMake
(
380
,
500
);
...
...
@@ -396,17 +404,49 @@
}
#pragma mark -预览订单
#pragma mark -预览订单
、撤销订单
-
(
void
)
PreviewButtonClick
:
(
UIButton
*
)
button
{
[
self
DownloadPDF
:
^
(
id
returnValue
)
{
if
([
button
.
currentTitle
isEqualToString
:
@"预览"
])
{
[
self
DownloadPDF
:
^
(
id
returnValue
)
{
PDFViewController
*
pdfVc
=
[[
PDFViewController
alloc
]
init
];
pdfVc
.
pdfURLString
=
self
.
PDFpath
;
[
self
presentViewController
:
pdfVc
animated
:
YES
completion
:
nil
];
}];
}
else
if
([
button
.
currentTitle
isEqualToString
:
@"撤销订单"
])
{
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@/%@/%@"
,
ServerAddress
,
@"/order/updateOrderState/"
,
_orderCode
,
@"001"
,
@"005"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
self
SuccessMBProgressView
:
@"撤销成功"
];
UIView
*
view
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenWidth
,
0
)];
self
.
orderDetailsTableview
.
tableHeaderView
=
view
;
self
.
orderDetailsTableview
.
tableFooterView
=
nil
;
self
.
orderDetails
.
order
.
orderState
=
@"005"
;
[
self
.
orderDetailsTableview
reloadData
];
if
(
self
.
DelecteAndPayButtonBlock
)
{
self
.
DelecteAndPayButtonBlock
(
_cellindex
,
@"005"
);
}
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
PDFViewController
*
pdfVc
=
[[
PDFViewController
alloc
]
init
];
pdfVc
.
pdfURLString
=
self
.
PDFpath
;
[
self
presentViewController
:
pdfVc
animated
:
YES
completion
:
nil
];
}];
}
...
...
Lighting/Class/ProductDetailsHeaderView.m
View file @
d2d48b1c
...
...
@@ -29,6 +29,7 @@
make
.
left
.
equalTo
(
self
.
inventoryLabe
);
make
.
top
.
equalTo
(
self
.
inventoryLabe
).
offset
(
40
);
make
.
width
.
mas_equalTo
(
200
);
make
.
height
.
mas_equalTo
(
40
);
}];
}
...
...
Lighting/Class/ProductDetailsHeaderView.xib
View file @
d2d48b1c
This diff is collapsed.
Click to expand it.
Lighting/Class/ProductDetailsViewController.m
View file @
d2d48b1c
...
...
@@ -368,7 +368,7 @@
[
self
ErrorMBProgressView
:
@"必须设置当前客户"
];
return
;
}
[
self
StartAddShoppingCarAnimationWithimage
:
TCImage
(
@"欧"
)
withStartpoint
:[
self
.
headerView
convertPoint
:[
button
center
]
toView
:
self
.
view
.
window
]];
[
self
StartAddShoppingCarAnimationWithimage
:
self
.
headerView
.
goodsImageview
.
image
withStartpoint
:[
self
.
headerView
convertPoint
:[
button
center
]
toView
:
self
.
view
.
window
]];
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
shopCar
.
consumerId
=
[[
Customermanager
manager
]
customerID
];
shopCar
.
goodsId
=
_goodsID
;
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
d2d48b1c
...
...
@@ -135,6 +135,7 @@
Newpage
.
page
=
1
;
Newpage
.
rows
=
10
;
conditon
.
page
=
Newpage
;
self
.
indexPage
=
1
;
//搜索
if
(
_selectedCode
)
{
conditon
.
categoryEquals
=
_selectedCode
;
...
...
@@ -316,6 +317,7 @@
[
cell
.
productImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
imageArray
firstObject
]]
placeholderImage
:
REPLACEIMAGE
];
cell
.
productPrice
.
text
=
[
NSString
stringWithFormat
:
@"¥%@"
,[[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
]
guidePrice
]
stringValue
]];
cell
.
cellindex
=
indexPath
.
item
;
cell
.
productParameter
.
text
=
[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
]
spec
];
//加入购物车
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
ProductCollectionViewCell
*
)
weakCell
=
cell
;
...
...
Lighting/Class/ScannerViewController.m
View file @
d2d48b1c
...
...
@@ -82,8 +82,8 @@
[
self
.
view
.
layer
insertSublayer
:
self
.
previewLayer
atIndex
:
0
];
//
CGSize
size
=
[
UIScreen
mainScreen
].
bounds
.
size
;
CGRect
cropRect
=
self
.
scanRectView
.
frame
;
//
CGSize size = [UIScreen mainScreen].bounds.size;
//
CGRect cropRect = self.scanRectView.frame;
// CGFloat p1 = size.height/size.width;
// CGFloat p2 = 1920./1080.; //使用1080p的图像输出
output
.
rectOfInterest
=
CGRectMake
(
self
.
scanRectView
.
frame
.
origin
.
y
/
ScreenHeight
,((
ScreenWidth
-
self
.
scanRectView
.
frame
.
size
.
width
)
/
2
)
/
ScreenWidth
,
self
.
scanRectView
.
frame
.
size
.
height
/
ScreenHeight
,
self
.
scanRectView
.
frame
.
size
.
width
/
ScreenWidth
);
...
...
Lighting/Class/SceneLibraryViewController.m
View file @
d2d48b1c
...
...
@@ -221,7 +221,7 @@
{
FullScreenViewController
*
fullScreenVC
=
[[
FullScreenViewController
alloc
]
init
];
[
self
presentViewController
:
fullScreenVC
animated
:
YES
completion
:
nil
];
[
self
presentViewController
:
fullScreenVC
animated
:
NO
completion
:
nil
];
}
...
...
Lighting/Class/SettlementViewController.m
View file @
d2d48b1c
...
...
@@ -8,8 +8,22 @@
#import "SettlementViewController.h"
@interface
SettlementViewController
()
<
ReturnTableviewcellIndexpathdelegate
>
/**
* 支付宝二维码
*/
@property
(
nonatomic
,
copy
)
NSString
*
zhiFubaoLabe
;
/**
* 微信二维码
*/
@property
(
nonatomic
,
copy
)
NSString
*
weiXinLabe
;
@end
@implementation
SettlementViewController
...
...
@@ -72,7 +86,16 @@
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/employee/getReseller"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
NSLog
(
@"%@"
,
returnValue
);
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
NSLog
(
@"获取二维码成功"
);
self
.
zhiFubaoLabe
=
returnValue
[
@"data"
][
@"weixin"
];
self
.
weiXinLabe
=
returnValue
[
@"data"
][
@"zhifubao"
];
}
else
{
NSLog
(
@"获取二维码失败"
);
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
...
...
Lighting/Class/Shoppingcart/AddressViewController.m
View file @
d2d48b1c
...
...
@@ -145,6 +145,12 @@
#pragma mark 新增按钮点击,或者保存
-
(
IBAction
)
addAddressButtonClick
:
(
UIButton
*
)
sender
{
NSString
*
phoneNumber
=
self
.
PhoneNumber
.
text
;
if
(
!
[
HENLENSONG
isValidateMobile
:
phoneNumber
])
{
[
self
ErrorMBProgressView
:
@"手机号码格式不正确"
];
return
;
}
if
([
sender
.
currentTitle
isEqualToString
:
@"新增"
])
{
[
self
addAddressInformationRequest
];
...
...
@@ -243,7 +249,7 @@
address
.
fid
=
_model
.
fid
;
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shippingAddress/
sav
e"
]
WithRequestType
:
0
WithParameter
:
address
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shippingAddress/
updat
e"
]
WithRequestType
:
0
WithParameter
:
address
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
...
...
Lighting/Lighting/Images.xcassets/add.imageset/Contents.json
0 → 100644
View file @
d2d48b1c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"add.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"add@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/add.imageset/add.png
0 → 100644
View file @
d2d48b1c
1.16 KB
Lighting/Lighting/Images.xcassets/add.imageset/add@2x.png
0 → 100644
View file @
d2d48b1c
1.34 KB
Lighting/Lighting/Images.xcassets/reduce.imageset/Contents.json
0 → 100644
View file @
d2d48b1c
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"reduce.png"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"reduce@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/reduce.imageset/reduce.png
0 → 100644
View file @
d2d48b1c
1.06 KB
Lighting/Lighting/Images.xcassets/reduce.imageset/reduce@2x.png
0 → 100644
View file @
d2d48b1c
1.21 KB
Lighting/Lighting/Info.plist
View file @
d2d48b1c
...
...
@@ -11,7 +11,7 @@
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)
<
/string
>
<
string
>
欧立方
<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
d2d48b1c
This diff is collapsed.
Click to expand it.
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