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
4504075d
Commit
4504075d
authored
Nov 14, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项说明:消费者促销区分优先级开发
parent
b264ee99
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
394 additions
and
170 deletions
+394
-170
AllpriceTableViewCell.h
Class/AllpriceTableViewCell.h
+2
-2
AllpriceTableViewCell.m
Class/AllpriceTableViewCell.m
+8
-21
CardAmplificationViewController.m
Class/CardAmplificationViewController.m
+1
-1
CardBeenUseViewController.m
Class/CardBeenUseViewController.m
+3
-3
CardCollectionViewCell.m
Class/CardCollectionViewCell.m
+1
-1
CardDetailsViewController.m
Class/CardDetailsViewController.m
+3
-3
CardViewController.m
Class/CardViewController.m
+4
-5
CustomerOrderTableViewCell.m
Class/CustomerOrderTableViewCell.m
+1
-1
LuckyDrawDetailsViewController.m
Class/LuckyDrawDetailsViewController.m
+1
-2
LuckyDrawViewController.m
Class/LuckyDrawViewController.m
+2
-2
OrderdetailsViewController.m
Class/OrderdetailsViewController.m
+85
-64
PromotionChooseViewController.h
Class/PromotionChooseViewController.h
+13
-0
PromotionChooseViewController.m
Class/PromotionChooseViewController.m
+37
-0
PromotionJDECardModel.h
Class/PromotionJDECardModel.h
+34
-0
PromotionJDECardModel.m
Class/PromotionJDECardModel.m
+13
-0
PromotionLuckDrawResultModel.h
Class/PromotionLuckDrawResultModel.h
+3
-3
PromotionLuckDrawResultModel.m
Class/PromotionLuckDrawResultModel.m
+5
-5
PromotionLuckyDrawModel.h
Class/PromotionLuckyDrawModel.h
+10
-8
PromotionLuckyDrawModel.m
Class/PromotionLuckyDrawModel.m
+3
-3
PromotionWeChatCardModel.h
Class/PromotionWeChatCardModel.h
+34
-0
PromotionWeChatCardModel.m
Class/PromotionWeChatCardModel.m
+13
-0
PromotionalDeductionModel.h
Class/PromotionalDeductionModel.h
+6
-1
PromotionalGoodsModel.h
Class/PromotionalGoodsModel.h
+6
-0
RebateViewController.m
Class/RebateViewController.m
+2
-2
SettlementViewController.h
Class/SettlementViewController.h
+2
-2
SettlementViewController.m
Class/SettlementViewController.m
+14
-12
project.pbxproj
Lighting.xcodeproj/project.pbxproj
+30
-12
Lighting.xcscheme
Lighting.xcodeproj/xcshareddata/xcschemes/Lighting.xcscheme
+1
-1
StoryboardwithCYX.storyboard
Lighting/StoryboardwithCYX.storyboard
+34
-3
BaseViewController.h
Tools/BaseViewController.h
+1
-1
BaseViewController.m
Tools/BaseViewController.m
+3
-3
CYConstManager.h
Tools/CYConstManager.h
+5
-0
CYConstManager.m
Tools/CYConstManager.m
+5
-0
Customermanager.h
Tools/Customermanager.h
+6
-6
PrefixHeader.pch
Tools/PrefixHeader.pch
+3
-3
No files found.
Class/AllpriceTableViewCell.h
View file @
4504075d
...
...
@@ -7,7 +7,7 @@
//
#import <UIKit/UIKit.h>
#import "LuckDrawResultModel.h"
#import "
Promotion
LuckDrawResultModel.h"
#import "ShopcarModel.h"
#import "PromotionalDeductionModel.h"
#import "PromotionalGoodsModel.h"
...
...
@@ -41,7 +41,7 @@
/**
* 抽奖折扣
*/
@property
(
nonatomic
,
copy
)
LuckDrawResultModel
*
model
;
@property
(
nonatomic
,
copy
)
Promotion
LuckDrawResultModel
*
model
;
/**
* 促销金额
...
...
Class/AllpriceTableViewCell.m
View file @
4504075d
...
...
@@ -30,7 +30,6 @@
}
#pragma mark -数据源赋值
-
(
void
)
setGoodsArray
:
(
NSArray
*
)
goodsArray
{
...
...
@@ -44,12 +43,11 @@
allPrice
+=
[
model
.
goodsPrice
floatValue
]
*
[
model
.
goodsNum
intValue
];
}
newPrice
=
allPrice
;
//
/
抽奖折扣
if
(
[
self
.
model
.
number
length
])
{
// 抽奖折扣
if
(
!
[
BaseViewController
isBlankString
:
self
.
model
.
number
])
{
newPrice
=
allPrice
*
([
self
.
model
.
number
integerValue
]
/
100
.
0
);
}
/// 全局抵扣
if
(
self
.
promotionalArray
)
{
// 全局抵扣
for
(
id
object
in
self
.
promotionalArray
)
{
if
([
object
isKindOfClass
:[
PromotionalDeductionModel
class
]])
{
PromotionalDeductionModel
*
model
=
(
PromotionalDeductionModel
*
)
object
;
...
...
@@ -58,7 +56,6 @@
}
}
}
}
NSString
*
goodsAllPriceString
=
nil
;
if
(
deductionPrice
&&
newPrice
!=
allPrice
)
{
goodsAllPriceString
=
[
NSString
stringWithFormat
:
@"¥%.2f (%.2f x %@ - %.2f)"
,
newPrice
-
deductionPrice
,
allPrice
,
self
.
model
.
descriptionString
,
deductionPrice
];
...
...
@@ -77,14 +74,4 @@
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
Class/CardAmplificationViewController.m
View file @
4504075d
...
...
@@ -41,7 +41,7 @@
self
.
backgroundImageView
.
image
=
[
BaseViewController
getCorrespondingPictures
:
_cardModel
.
denomation
];
self
.
cardNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"卡号: %@"
,
_cardModel
.
cardNumber
];
self
.
cardPasswordLabel
.
text
=
[
NSString
stringWithFormat
:
@"密码: %@"
,
_cardModel
.
cardPassword
];
//
/
判断状态
// 判断状态
BOOL
isUsed
=
[
_cardModel
.
state
isEqualToString
:
USED
];
BOOL
isActived
=
[
_cardModel
.
state
isEqualToString
:
ACTIVED
];
BOOL
isDispensed
=
[
_cardModel
.
state
isEqualToString
:
DISPENSED
];
...
...
Class/CardBeenUseViewController.m
View file @
4504075d
...
...
@@ -152,8 +152,8 @@
#pragma mark - 区分已经使用的E卡
-
(
void
)
deleteUsedJDECard
:
(
NSString
*
)
eCardNumber
{
//
/
@property (nonatomic, strong) NSMutableArray<TOJingdongEcardEntity> *eCards;
//
/
手动改为可变数组
//@property (nonatomic, strong) NSMutableArray<TOJingdongEcardEntity> *eCards;
// 手动改为可变数组
for
(
int
i
=
0
;
i
<
self
.
datasArray
.
count
;
i
++
)
{
GroupByOrderNumber
*
order
=
self
.
datasArray
[
i
];
for
(
int
j
=
0
;
j
<
order
.
eCards
.
count
;
j
++
)
{
...
...
@@ -222,7 +222,7 @@
cardVC
.
cardModel
=
model
.
eCards
[
indexPath
.
row
];
cardVC
.
preferredContentSize
=
CGSizeMake
(
500
,
370
);
[
self
.
settingsPopoverController
endThemeUpdates
];
//
/
更新E卡状态
// 更新E卡状态
WS
(
weakSelf
);
[
cardVC
setRefreshJDCardList
:
^
(
NSString
*
cardNumber
)
{
[
weakSelf
.
settingsPopoverController
dismissPopoverAnimated
:
YES
completion
:
^
{
...
...
Class/CardCollectionViewCell.m
View file @
4504075d
...
...
@@ -34,7 +34,7 @@
[
attributedString
addAttribute
:
NSFontAttributeName
value
:[
UIFont
fontWithName
:
@"HelveticaNeue-Bold"
size
:
22
]
range
:
NSMakeRange
(
0
,
totalString
.
length
-
1
)];
self
.
self
.
amountLabel
.
attributedText
=
attributedString
;
//
/
判断状态
// 判断状态
BOOL
isUsed
=
[
_Cardmodel
.
state
isEqualToString
:
USED
];
BOOL
isActived
=
[
_Cardmodel
.
state
isEqualToString
:
ACTIVED
];
BOOL
isDispensed
=
[
_Cardmodel
.
state
isEqualToString
:
DISPENSED
];
...
...
Class/CardDetailsViewController.m
View file @
4504075d
...
...
@@ -30,14 +30,14 @@
#pragma mark - 添加卡劵详情vc
-
(
void
)
addChildViewController
{
//
/
未领取
// 未领取
CardDontUseViewController
*
dontUseVc
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"CardDontUseViewController"
];
[
self
addChildViewController
:
dontUseVc
];
//
/
已领取
// 已领取
CardBeenUseViewController
*
beenUseVc
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"CardBeenUseViewController"
];
beenUseVc
.
cardState
=
ACTIVED
;
[
self
addChildViewController
:
beenUseVc
];
//
/
已使用
// 已使用
CardBeenUseViewController
*
usedVc
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"CardBeenUseViewController"
];
usedVc
.
cardState
=
USED
;
[
self
addChildViewController
:
usedVc
];
...
...
Class/CardViewController.m
View file @
4504075d
...
...
@@ -110,8 +110,8 @@
#pragma mark - 区分已经使用的E卡
-
(
void
)
deleteUsedJDECard
:
(
NSString
*
)
eCardNumber
{
//
/
@property (nonatomic, strong) NSMutableArray<TOJingdongEcardEntity> *eCards;
//
/
手动改为可变数组
//@property (nonatomic, strong) NSMutableArray<TOJingdongEcardEntity> *eCards;
// 手动改为可变数组
for
(
int
i
=
0
;
i
<
self
.
datasArray
.
count
;
i
++
)
{
TOJingdongEcardEntity
*
order
=
self
.
datasArray
[
i
];
if
([
eCardNumber
isEqualToString
:
order
.
cardNumber
])
{
...
...
@@ -139,11 +139,10 @@
WS
(
weakSelf
);
TOJingdongEcardEntity
*
model
=
self
.
datasArray
[
indexPath
.
row
];
if
([[
self
class
]
isBlankString
:
model
.
orderReceiptUrl
])
{
[
self
promptCustomerTitle
:
@"不能查看未激活卡劵,请先上传小票激活卡劵"
finish
:
^
{
[
self
promptCustomerTitle
:
@"
去上传"
withMessage
:
@"
不能查看未激活卡劵,请先上传小票激活卡劵"
finish
:^
{
CardDetailsViewController
*
cardDetails
=
[[
weakSelf
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"CardDetailsViewController"
];
[
weakSelf
.
navigationController
pushViewController
:
cardDetails
animated
:
YES
];
}];
}
else
{
CardAmplificationViewController
*
cardVC
=
[[
CardAmplificationViewController
alloc
]
init
];
self
.
settingsPopoverController
=
[[
WYPopoverController
alloc
]
initWithContentViewController
:
cardVC
];
...
...
@@ -155,7 +154,7 @@
cardVC
.
cardModel
=
self
.
datasArray
[
indexPath
.
row
];
cardVC
.
preferredContentSize
=
CGSizeMake
(
500
,
370
);
[
self
.
settingsPopoverController
endThemeUpdates
];
//
/
更新E卡状态
// 更新E卡状态
WS
(
weakSelf
);
[
cardVC
setRefreshJDCardList
:
^
(
NSString
*
cardNumber
)
{
[
weakSelf
.
settingsPopoverController
dismissPopoverAnimated
:
YES
completion
:
^
{
...
...
Class/CustomerOrderTableViewCell.m
View file @
4504075d
...
...
@@ -49,7 +49,7 @@
self
.
consigneePhoneNumber
.
text
=
_model
.
order
.
receiverMobile
;
self
.
phoneNumber
.
text
=
_model
.
consumer
.
mobile
;
self
.
consigneeAddress
.
text
=
_model
.
order
.
receiverAddress
;
//
/
商品个数
// 商品个数
NSInteger
goodsAllnum
=
0
;
self
.
orderTotalPrice
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,[
_model
.
order
.
orderPrice
floatValue
]];
for
(
TOOrderdetailEntity
*
model
in
_model
.
orderdetailList
)
{
...
...
Class/LuckyDrawDetailsViewController.m
View file @
4504075d
...
...
@@ -10,7 +10,7 @@
#import "NotDrawTableViewCell.h"
#import "CustomWKWebViewController.h"
#import "UsedDrawTableViewCell.h"
#import "LuckDrawResultModel.h"
#import "
Promotion
LuckDrawResultModel.h"
@interface
LuckyDrawDetailsViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
DZNEmptyDataSetSource
,
DZNEmptyDataSetDelegate
>
...
...
@@ -143,7 +143,6 @@
RsLotteryResponse
*
drawRecord
=
[[
RsLotteryResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
weakSelf
.
datasArray
addObjectsFromArray
:
drawRecord
.
list
];
weakSelf
.
totalPage
=
[
returnValue
[
@"data"
][
@"totalpages"
]
integerValue
];
NSLog
(
@"%ld"
,
weakSelf
.
datasArray
.
count
);
[
weakSelf
.
drawDetailsTableView
reloadData
];
}
else
{
[
weakSelf
SHOWPrompttext
:
returnValue
[
@"message"
]];
...
...
Class/LuckyDrawViewController.m
View file @
4504075d
...
...
@@ -26,13 +26,13 @@
#pragma mark - 添加未抽奖和已抽奖情况
-
(
void
)
setupChildrenController
{
//
/
未抽奖
// 未抽奖
LuckyDrawDetailsViewController
*
notDrawControl
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"LuckyDrawDetailsViewController"
];
[
self
addChildViewController
:
notDrawControl
];
notDrawControl
.
drawValue
=
1
;
self
.
currentVC
=
notDrawControl
;
//
/
已抽奖
// 已抽奖
LuckyDrawDetailsViewController
*
usedDrawControl
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"LuckyDrawDetailsViewController"
];
usedDrawControl
.
drawValue
=
2
;
[
self
addChildViewController
:
usedDrawControl
];
...
...
Class/OrderdetailsViewController.m
View file @
4504075d
...
...
@@ -24,10 +24,12 @@
#import "JDEcardViewController.h"
#import "WYPopoverController.h"
#import "RebateSuccessTableViewController.h"
#import "LuckyDrawModel.h"
#import "LuckDrawResultModel.h"
#import "
Promotion
LuckyDrawModel.h"
#import "
Promotion
LuckDrawResultModel.h"
#import "AirPrintManager.h"
#import <WebKit/WebKit.h>
#import "PromotionJDECardModel.h"
#import "PromotionWeChatCardModel.h"
NSString
*
const
PROMOTIONALSTRING
=
@"促销信息"
;
...
...
@@ -65,7 +67,12 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
/**
* 客户抽奖结果
*/
@property
(
nonatomic
,
strong
)
LuckDrawResultModel
*
customerDrawModel
;
@property
(
nonatomic
,
strong
)
PromotionLuckDrawResultModel
*
customerDrawModel
;
/**
消费者促销列表
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
customerPromotionArray
;
@end
...
...
@@ -97,6 +104,14 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
return
_luckyDrawAndJDECardArray
;
}
-
(
NSMutableArray
*
)
customerPromotionArray
{
if
(
!
_customerPromotionArray
)
{
_customerPromotionArray
=
[
NSMutableArray
array
];
}
return
_customerPromotionArray
;
}
#pragma mark -渲染完成
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
...
...
@@ -151,7 +166,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
dispatch_group_enter
(
group
);
[
self
CreateMBProgressHUDLoding
];
WS
(
weakSelf
);
//
/
订单详情
// 订单详情
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
SERVERREQUESTURL
(
ORDERDETAILS
),
self
.
orderCode
]
WithCallClass
:
weakSelf
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
dispatch_group_leave
(
group
);
...
...
@@ -169,9 +184,9 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
//
/
未支付的订单查询实时促销,否则查询历史促销
// 未支付的订单查询实时促销,否则查询历史促销
if
(
self
.
isShowPayButton
)
{
//
/
查询实时促销信息
// 查询实时促销信息
dispatch_group_enter
(
group
);
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
PROMOTIONAL
),
self
.
orderCode
]
WithCallClass
:
weakSelf
WithRequestType
:
ONE
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -183,7 +198,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
.
luckyDrawAndJDECardArray
removeAllObjects
];
for
(
NSDictionary
*
dict
in
promotionalArray
)
{
NSString
*
type
=
dict
[
@"type"
];
//
/
折扣金额
// 折扣金额
if
([
type
isEqualToString
:
deductionAction
])
{
PromotionalDeductionModel
*
deductionModel
=
[[
PromotionalDeductionModel
alloc
]
initWithDictionary
:
dict
error
:
nil
];
deductionModel
.
isSelected
=
YES
;
...
...
@@ -191,7 +206,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
.
sectionTitle
addObject
:
PROMOTIONALSTRING
];
}
[
weakSelf
.
promotionalArray
addObject
:
deductionModel
];
/// 赠送商品
[
weakSelf
getConsumerAllPromotion
:
deductionModel
withBody
:
deductionModel
.
body
];
// 赠送商品
}
else
if
([
type
isEqualToString
:
goodsAction
]){
PromotionalGoodsModel
*
goodsModel
=
[[
PromotionalGoodsModel
alloc
]
initWithDictionary
:
dict
error
:
nil
];
goodsModel
.
isSelected
=
YES
;
...
...
@@ -199,14 +215,22 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
.
sectionTitle
addObject
:
PROMOTIONALSTRING
];
}
[
weakSelf
.
promotionalArray
addObject
:
goodsModel
];
/// 京东E卡
[
weakSelf
getConsumerAllPromotion
:
goodsModel
withBody
:
goodsModel
.
body
];
// 京东E卡
}
else
if
([
type
isEqualToString
:
JDECardAction
]){
Promotion
alDeductionModel
*
deductionModel
=
[[
PromotionalDeduction
Model
alloc
]
initWithDictionary
:
dict
error
:
nil
];
Promotion
JDECardModel
*
deductionModel
=
[[
PromotionJDECard
Model
alloc
]
initWithDictionary
:
dict
error
:
nil
];
[
weakSelf
.
luckyDrawAndJDECardArray
addObject
:
deductionModel
];
/// 转盘抽奖
[
weakSelf
getConsumerAllPromotion
:
deductionModel
withBody
:
deductionModel
.
body
];
// 转盘抽奖
}
else
if
([
type
isEqualToString
:
lotteryAction
]){
LuckyDrawModel
*
model
=
[[
LuckyDrawModel
alloc
]
initWithDictionary
:
dict
error
:
nil
];
[
weakSelf
.
luckyDrawAndJDECardArray
addObject
:
model
];
PromotionLuckyDrawModel
*
drawModel
=
[[
PromotionLuckyDrawModel
alloc
]
initWithDictionary
:
dict
error
:
nil
];
[
weakSelf
.
luckyDrawAndJDECardArray
addObject
:
drawModel
];
[
weakSelf
getConsumerAllPromotion
:
drawModel
withBody
:
drawModel
.
body
];
}
else
if
([
type
isEqualToString
:
WeChatCard
]){
// 微信卡劵
PromotionWeChatCardModel
*
weChatModel
=
[[
PromotionWeChatCardModel
alloc
]
initWithDictionary
:
dict
error
:
nil
];
NSLog
(
@"%@"
,
weChatModel
);
[
weakSelf
getConsumerAllPromotion
:
weChatModel
withBody
:
weChatModel
.
body
];
}
}
}
else
{
...
...
@@ -224,7 +248,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}];
}
else
{
//
/
查询历史促销信息
// 查询历史促销信息
dispatch_group_enter
(
group
);
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
OLDPROMOTIONAL
),
self
.
orderCode
]
WithCallClass
:
weakSelf
WithRequestType
:
ONE
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -236,7 +260,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
.
luckyDrawAndJDECardArray
removeAllObjects
];
for
(
NSDictionary
*
dict
in
promotion
)
{
TOOrderPromotionEntity
*
oldPromotion
=
[[
TOOrderPromotionEntity
alloc
]
initWithDictionary
:
dict
error
:
nil
];
//
/
赠送商品
// 赠送商品
if
(
!
[
BaseViewController
isBlankString
:
oldPromotion
.
goodsName
])
{
if
(
!
[
weakSelf
.
sectionTitle
containsObject
:
PROMOTIONALSTRING
])
{
[
weakSelf
.
sectionTitle
addObject
:
PROMOTIONALSTRING
];
...
...
@@ -250,7 +274,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
.
promotionalArray
addObject
:
goodsModel
];
}
else
if
(
!
[
BaseViewController
isBlankString
:[
oldPromotion
.
promotionMoney
stringValue
]])
{
//
/
促销金额
// 促销金额
if
(
!
[
weakSelf
.
sectionTitle
containsObject
:
PROMOTIONALSTRING
])
{
[
weakSelf
.
sectionTitle
addObject
:
PROMOTIONALSTRING
];
}
...
...
@@ -261,16 +285,16 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
.
promotionalArray
addObject
:
deductionModel
];
}
else
if
(
!
[
BaseViewController
isBlankString
:[
oldPromotion
.
jdecardDenomation
stringValue
]])
{
//
/ 判断
京东E卡
Promotion
alDeductionModel
*
model
=
[[
PromotionalDeduction
Model
alloc
]
init
];
//
京东E卡
Promotion
JDECardModel
*
model
=
[[
PromotionJDECard
Model
alloc
]
init
];
model
.
total
=
[
oldPromotion
.
jdecardDenomation
integerValue
];
model
.
body
=
GUIDE
;
model
.
type
=
JDECardAction
;
[
weakSelf
.
luckyDrawAndJDECardArray
addObject
:
model
];
}
else
if
(
!
[
BaseViewController
isBlankString
:[
oldPromotion
.
redPackageCount
stringValue
]])
{
//
/
导购抽奖数
LuckyDrawModel
*
model
=
[[
LuckyDrawModel
alloc
]
init
];
// 导购抽奖数
PromotionLuckyDrawModel
*
model
=
[[
Promotion
LuckyDrawModel
alloc
]
init
];
model
.
body
=
GUIDE
;
[
weakSelf
.
luckyDrawAndJDECardArray
addObject
:
model
];
}
...
...
@@ -287,11 +311,11 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
}
//
/
查询客户订单抽奖状态
static
RsAwardDraw
*
resultModel
=
nil
;
// 查询客户订单抽奖状态
__block
RsAwardDraw
*
resultModel
=
nil
;
dispatch_group_enter
(
group
);
RsLotteryRequest
*
queryDrawState
=
[[
RsLotteryRequest
alloc
]
init
];
//
/
判断订单是否支付
// 判断订单是否支付
if
(
!
self
.
isShowPayButton
)
{
queryDrawState
.
orderNumberEquals
=
self
.
orderCode
;
}
...
...
@@ -306,50 +330,46 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
NSDictionary
*
dict
=
[
returnValue
[
@"data"
][
@"list"
]
firstObject
];
resultModel
=
[[
RsAwardDraw
alloc
]
initWithDictionary
:
dict
error
:
nil
];
}
else
{
resultModel
=
nil
;
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
resultModel
=
nil
;
dispatch_group_leave
(
group
);
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
NETWORK
];
}
WithFailureBlock
:^
(
NSError
*
error
)
{
resultModel
=
nil
;
dispatch_group_leave
(
group
);
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
//
/
完成后回调
// 完成后回调
dispatch_group_notify
(
group
,
dispatch_get_main_queue
(),
^
{
//
/
消费者抽奖成功后若没有支付,后面支付时可以继续享受奖品折扣
// 消费者抽奖成功后若没有支付,后面支付时可以继续享受奖品折扣
if
([
resultModel
.
draw
.
state
isEqualToString
:
ACCOMPLISHED
])
{
weakSelf
.
customerDrawModel
=
[
LuckDrawResultModel
initializeWith
:
resultModel
];
weakSelf
.
customerDrawModel
=
[
Promotion
LuckDrawResultModel
initializeWith
:
resultModel
];
}
//
/
支付完成后
// 支付完成后
if
(
self
.
isShowPrintButton
&&
resultModel
.
award
)
{
weakSelf
.
customerDrawModel
=
[
LuckDrawResultModel
initializeWith
:
resultModel
];
weakSelf
.
customerDrawModel
=
[
Promotion
LuckDrawResultModel
initializeWith
:
resultModel
];
}
//
/
默认弹出支付框
// 默认弹出支付框
if
(
weakSelf
.
isShowPayButton
&&
[
weakSelf
.
orderDetails
.
order
.
orderState
isEqualToString
:
NOTPAY
])
{
//
/
找出客户抽奖
// 找出客户抽奖
for
(
int
i
=
0
;
i
<
weakSelf
.
luckyDrawAndJDECardArray
.
count
;
i
++
)
{
id
object
=
weakSelf
.
luckyDrawAndJDECardArray
[
i
];
if
([
object
isKindOfClass
:[
LuckyDrawModel
class
]]
&&
!
resultModel
)
{
LuckyDrawModel
*
model
=
(
LuckyDrawModel
*
)
object
;
if
([
object
isKindOfClass
:[
Promotion
LuckyDrawModel
class
]]
&&
!
resultModel
)
{
PromotionLuckyDrawModel
*
model
=
(
Promotion
LuckyDrawModel
*
)
object
;
if
([
model
.
body
isEqualToString
:
CONSUMER
])
{
[
weakSelf
queryConsumerLuckyDrawChance
:
model
];
break
;
}
}
//
/
有促销无抽奖情况
// 有促销无抽奖情况
if
(
i
==
weakSelf
.
luckyDrawAndJDECardArray
.
count
-
1
)
{
[
weakSelf
payButtonClickAction
];
}
}
//
/
无促销情况
// 无促销情况
if
(
!
weakSelf
.
luckyDrawAndJDECardArray
.
count
)
{
[
weakSelf
payButtonClickAction
];
}
...
...
@@ -361,6 +381,13 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
});
}
#pragma mark - 获取关于消费者的所有促销
-
(
void
)
getConsumerAllPromotion
:
(
JSONModel
*
)
model
withBody
:
(
NSString
*
)
body
{
if
([
body
isEqualToString
:
CONSUMER
])
{
[
self
.
customerPromotionArray
addObject
:
model
];
}
}
#pragma mark - 卡劵领取成功
-
(
void
)
rebateApplySuccess
:
(
NSString
*
)
message
...
...
@@ -369,7 +396,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
success
.
titleArray
=
@[
message
,
@"查看账户"
,
@"我知道了"
];
[
success
setClickEvent
:
^
(
NSIndexPath
*
indexPath
)
{
if
(
indexPath
.
row
==
1
)
{
//
/
我知道了
// 我知道了
}
else
if
(
indexPath
.
row
==
0
)
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
OPENCONTROLLER
object
:
@
(
3
)];
...
...
@@ -471,16 +498,15 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}
#pragma mark - 查询客户抽奖机会
-
(
void
)
queryConsumerLuckyDrawChance
:
(
LuckyDrawModel
*
)
model
-
(
void
)
queryConsumerLuckyDrawChance
:
(
Promotion
LuckyDrawModel
*
)
model
{
WS
(
weakSelf
);
UIAlertController
*
alertControl
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
@"恭喜您获得一次大转盘抽奖机会!"
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertControl
addAction
:[
UIAlertAction
actionWithTitle
:
@"马上参与"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
self
promptCustomerTitle
:
@"马上参与"
withMessage
:
@"恭喜您获得一次大转盘抽奖机会!"
finish
:^
{
[
weakSelf
showLuckyDrawControl
:
model
.
lottery
.
uuid
andOrderNumber
:
weakSelf
.
orderCode
luckyDrawFinish
:^
(
NSDictionary
*
dict
)
{
id
json
=
[
NSJSONSerialization
JSONObjectWithData
:[
dict
[
@"body"
]
dataUsingEncoding
:
NSUTF8StringEncoding
]
options
:
NSJSONReadingMutableContainers
error
:
nil
];
if
(
json
)
{
if
([
json
isKindOfClass
:[
NSDictionary
class
]])
{
weakSelf
.
customerDrawModel
=
[[
LuckDrawResultModel
alloc
]
initWithDictionary
:
json
error
:
nil
];
weakSelf
.
customerDrawModel
=
[[
Promotion
LuckDrawResultModel
alloc
]
initWithDictionary
:
json
error
:
nil
];
if
([
BaseViewController
isBlankString
:
weakSelf
.
customerDrawModel
.
awardId
])
{
[
weakSelf
SHOWPrompttext
:
@"未中奖"
];
}
else
{
...
...
@@ -488,19 +514,17 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}
}
}
return
;
}];
}]];
[
self
presentViewController
:
alertControl
animated
:
YES
completion
:
nil
];
}];
}
#pragma mark - 查询导购抽奖机会
-
(
void
)
queryGuideLuckyDrawChanceisTrue
:
(
void
(
^
)())
finish
{
//
/
查询是否有导购抽奖机会
// 查询是否有导购抽奖机会
for
(
id
object
in
self
.
luckyDrawAndJDECardArray
)
{
if
([
object
isKindOfClass
:[
LuckyDrawModel
class
]])
{
LuckyDrawModel
*
model
=
(
LuckyDrawModel
*
)
object
;
if
([
object
isKindOfClass
:[
Promotion
LuckyDrawModel
class
]])
{
PromotionLuckyDrawModel
*
model
=
(
Promotion
LuckyDrawModel
*
)
object
;
if
([
model
.
body
isEqualToString
:
GUIDE
])
{
finish
();
break
;
...
...
@@ -523,7 +547,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
UIPopoverPresentationController
*
pop
=
settlement
.
popoverPresentationController
;
pop
.
sourceView
=
settlement
.
view
;
[
self
presentViewController
:
settlement
animated
:
YES
completion
:
nil
];
//
/
支付成功
//支付成功
WS
(
weakSelf
);
[
settlement
setPaySuccessReturnBlock
:
^
{
...
...
@@ -532,28 +556,28 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}
[
weakSelf
SuccessMBProgressView
:
@"支付成功"
];
weakSelf
.
isShowPayButton
=
NO
;
weakSelf
.
isUserInteractionEnabled
=
NO
;
weakSelf
.
isShowHeaderView
=
YES
;
weakSelf
.
isUserInteractionEnabled
=
NO
;
[
weakSelf
CreateTableviewHeaderView
];
weakSelf
.
orderDetailsTableview
.
tableFooterView
=
nil
;
static
BOOL
isJDEcard
=
NO
;
//促销中是否有京东E卡;
static
BOOL
isGuideDraw
=
NO
;
//促销中是否有导购抽奖机会
//
/
刷新数据成功
__block
BOOL
isJDEcard
=
NO
;
//促销中是否有京东E卡;
__block
BOOL
isGuideDraw
=
NO
;
//促销中是否有导购抽奖机会
// 刷新数据成功
[
weakSelf
getOrderDetailsData
:
^
{
//
/ 先判断促销中有无
E卡,有则认为发放成功
//
先判断促销中有无京东
E卡,有则认为发放成功
for
(
id
object
in
weakSelf
.
luckyDrawAndJDECardArray
)
{
if
([
object
isKindOfClass
:[
Promotion
alDeduction
Model
class
]])
{
Promotion
alDeductionModel
*
model
=
(
PromotionalDeduction
Model
*
)
object
;
if
([
object
isKindOfClass
:[
Promotion
JDECard
Model
class
]])
{
Promotion
JDECardModel
*
model
=
(
PromotionJDECard
Model
*
)
object
;
if
([
model
.
body
isEqualToString
:
GUIDE
]
&&
[
model
.
type
isEqualToString
:
JDECardAction
])
{
isJDEcard
=
YES
;
break
;
}
}
}
//
/
查询导购抽奖机会
// 查询导购抽奖机会
[
weakSelf
queryGuideLuckyDrawChanceisTrue
:
^
{
isGuideDraw
=
YES
;
}];
//
/
弹出框
// 弹出框
if
(
isJDEcard
&&
isGuideDraw
)
{
[
weakSelf
rebateApplySuccess
:
@"京东E卡、抽奖机会已放到你的账户"
];
}
else
if
(
isJDEcard
&&
!
isGuideDraw
)
{
...
...
@@ -561,14 +585,11 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}
else
if
(
!
isJDEcard
&&
isGuideDraw
)
{
[
weakSelf
rebateApplySuccess
:
@"抽奖机会已放到你的账户"
];
}
/// 初始化判断
isGuideDraw
=
NO
;
isJDEcard
=
NO
;
}];
}];
}
#pragma mark - 抽奖界面
#pragma mark - 抽奖界面
HTML
-
(
void
)
showLuckyDrawControl
:
(
NSString
*
)
lotteryId
andOrderNumber
:
(
NSString
*
)
orderNumber
luckyDrawFinish
:
(
void
(
^
)(
NSDictionary
*
dict
))
complete
{
WS
(
weakSelf
);
...
...
@@ -769,7 +790,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
PromotionalDeductionModel
*
deductionModel
=
object
;
deductionModel
.
isSelected
=
!
deductionModel
.
isSelected
;
promotionalCell
.
accessoryType
=
deductionModel
.
isSelected
?
UITableViewCellAccessoryCheckmark
:
UITableViewCellAccessoryNone
;
//
/
刷新总金额
// 刷新总金额
[
self
.
orderDetailsTableview
reloadData
];
}
}
...
...
Class/PromotionChooseViewController.h
0 → 100644
View file @
4504075d
//
// PromotionChooseViewController.h
// Lighting
//
// Created by 曹云霄 on 2016/11/14.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface
PromotionChooseViewController
:
BaseViewController
@end
Class/PromotionChooseViewController.m
0 → 100644
View file @
4504075d
//
// PromotionChooseViewController.m
// Lighting
//
// Created by 曹云霄 on 2016/11/14.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PromotionChooseViewController.h"
@interface
PromotionChooseViewController
()
@end
@implementation
PromotionChooseViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
Class/PromotionJDECardModel.h
0 → 100644
View file @
4504075d
//
// PromotionJDECardModel.h
// Lighting
//
// Created by 曹云霄 on 2016/11/14.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <JSONModel/JSONModel.h>
@interface
PromotionJDECardModel
:
JSONModel
//** 促销对象 */
@property
(
nonatomic
,
copy
)
NSString
*
body
;
//** 类型 */
@property
(
nonatomic
,
copy
)
NSString
*
type
;
//** 抵扣金额 */
@property
(
nonatomic
,
assign
)
NSInteger
total
;
//** 描述 */
@property
(
nonatomic
,
copy
)
NSString
*
descriptionString
;
//** 是否选中 */
@property
(
nonatomic
,
assign
)
BOOL
isSelected
;
// 优先级
@property
(
nonatomic
,
assign
)
NSInteger
priority
;
// 冲突列表
@property
(
nonatomic
,
strong
)
NSArray
*
conflicts
;
@end
Class/PromotionJDECardModel.m
0 → 100644
View file @
4504075d
//
// PromotionJDECardModel.m
// Lighting
//
// Created by 曹云霄 on 2016/11/14.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PromotionJDECardModel.h"
@implementation
PromotionJDECardModel
@end
Class/LuckDrawResultModel.h
→
Class/
Promotion
LuckDrawResultModel.h
View file @
4504075d
//
// LuckDrawResultModel.h
//
Promotion
LuckDrawResultModel.h
// Lighting
//
// Created by 曹云霄 on 2016/11/5.
...
...
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
@interface
LuckDrawResultModel
:
JSONModel
@interface
Promotion
LuckDrawResultModel
:
JSONModel
...
...
@@ -45,6 +45,6 @@
/**
* 通过抽奖列表结果初始化抽奖结果
*/
+
(
LuckDrawResultModel
*
)
initializeWith
:(
RsAwardDraw
*
)
rsAwardDrawModel
;
+
(
Promotion
LuckDrawResultModel
*
)
initializeWith
:(
RsAwardDraw
*
)
rsAwardDrawModel
;
@end
Class/LuckDrawResultModel.m
→
Class/
Promotion
LuckDrawResultModel.m
View file @
4504075d
//
// LuckDrawResultModel.m
//
Promotion
LuckDrawResultModel.m
// Lighting
//
// Created by 曹云霄 on 2016/11/5.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "LuckDrawResultModel.h"
#import "
Promotion
LuckDrawResultModel.h"
@implementation
LuckDrawResultModel
@implementation
Promotion
LuckDrawResultModel
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
...
...
@@ -21,9 +21,9 @@
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"description"
:
@"descriptionString"
}];
}
+
(
LuckDrawResultModel
*
)
initializeWith
:
(
RsAwardDraw
*
)
rsAwardDrawModel
+
(
Promotion
LuckDrawResultModel
*
)
initializeWith
:
(
RsAwardDraw
*
)
rsAwardDrawModel
{
LuckDrawResultModel
*
model
=
[[
LuckDrawResultModel
alloc
]
init
];
PromotionLuckDrawResultModel
*
model
=
[[
Promotion
LuckDrawResultModel
alloc
]
init
];
model
.
lotteryId
=
rsAwardDrawModel
.
draw
.
lotteryId
;
model
.
type
=
rsAwardDrawModel
.
award
.
type
;
model
.
number
=
[
rsAwardDrawModel
.
award
.
number
stringValue
];
...
...
Class/LuckyDrawModel.h
→
Class/
Promotion
LuckyDrawModel.h
View file @
4504075d
//
// LuckyDrawModel.h
//
Promotion
LuckyDrawModel.h
// Lighting
//
// Created by 曹云霄 on 2016/11/3.
...
...
@@ -12,23 +12,25 @@
@protocol
lottery
@end
@interface
LuckyDrawModel
:
JSONModel
@interface
Promotion
LuckyDrawModel
:
JSONModel
//
** 促销对象 */
//
促销对象
@property
(
nonatomic
,
copy
)
NSString
*
body
;
//
** 类型 */
//
类型
@property
(
nonatomic
,
copy
)
NSString
*
type
;
//
/
抽奖ID
// 抽奖ID
@property
(
nonatomic
,
copy
)
lottery
*
lottery
;
//
** 描述 */
//
描述
@property
(
nonatomic
,
copy
)
NSString
*
descriptionString
;
//
/ 优先
@property
(
nonatomic
,
copy
)
NSString
*
priority
;
//
优先级
@property
(
nonatomic
,
assign
)
NSInteger
priority
;
// 冲突列表
@property
(
nonatomic
,
strong
)
NSArray
*
conflicts
;
@end
...
...
Class/LuckyDrawModel.m
→
Class/
Promotion
LuckyDrawModel.m
View file @
4504075d
//
// LuckyDrawModel.m
//
Promotion
LuckyDrawModel.m
// Lighting
//
// Created by 曹云霄 on 2016/11/3.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "LuckyDrawModel.h"
#import "
Promotion
LuckyDrawModel.h"
@implementation
LuckyDrawModel
@implementation
Promotion
LuckyDrawModel
+
(
JSONKeyMapper
*
)
keyMapper
{
...
...
Class/PromotionWeChatCardModel.h
0 → 100644
View file @
4504075d
//
// PromotionWeChatCardModel.h
// Lighting
//
// Created by 曹云霄 on 2016/11/14.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <JSONModel/JSONModel.h>
@interface
PromotionWeChatCardModel
:
JSONModel
//** 促销对象 */
@property
(
nonatomic
,
copy
)
NSString
*
body
;
//** 类型 */
@property
(
nonatomic
,
copy
)
NSString
*
type
;
//** 抵扣金额 */
@property
(
nonatomic
,
assign
)
NSInteger
total
;
//** 描述 */
@property
(
nonatomic
,
copy
)
NSString
*
descriptionString
;
//** 是否选中 */
@property
(
nonatomic
,
assign
)
BOOL
isSelected
;
// 优先级
@property
(
nonatomic
,
assign
)
NSInteger
priority
;
// 冲突列表
@property
(
nonatomic
,
strong
)
NSArray
*
conflicts
;
@end
Class/PromotionWeChatCardModel.m
0 → 100644
View file @
4504075d
//
// PromotionWeChatCardModel.m
// Lighting
//
// Created by 曹云霄 on 2016/11/14.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PromotionWeChatCardModel.h"
@implementation
PromotionWeChatCardModel
@end
Class/PromotionalDeductionModel.h
View file @
4504075d
...
...
@@ -8,7 +8,6 @@
#import <Foundation/Foundation.h>
/// 京东Eka,折扣金额
@interface
PromotionalDeductionModel
:
JSONModel
//** 促销对象 */
...
...
@@ -26,4 +25,10 @@
//** 是否选中 */
@property
(
nonatomic
,
assign
)
BOOL
isSelected
;
// 优先级
@property
(
nonatomic
,
assign
)
NSInteger
priority
;
// 冲突列表
@property
(
nonatomic
,
strong
)
NSArray
*
conflicts
;
@end
Class/PromotionalGoodsModel.h
View file @
4504075d
...
...
@@ -28,9 +28,15 @@
//** 描述 */
@property
(
nonatomic
,
copy
)
NSString
*
descriptionString
;
// 优先级
@property
(
nonatomic
,
assign
)
NSInteger
priority
;
//** 是否选中 */
@property
(
nonatomic
,
assign
)
BOOL
isSelected
;
// 冲突列表
@property
(
nonatomic
,
strong
)
NSArray
*
conflicts
;
@end
@interface
Goods
:
JSONModel
...
...
Class/RebateViewController.m
View file @
4504075d
...
...
@@ -150,13 +150,13 @@
[
self
.
contentBackgroundView
addSubview
:
payments
.
view
];
self
.
currentVC
=
payments
;
//
/
我的卡劵
// 我的卡劵
CardViewController
*
cardVc
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"CardViewController"
];
[
self
addChildViewController
:
cardVc
];
cardVc
.
view
.
frame
=
CGRectMake
(
10
,
40
,
(
self
.
cardBackgroundView
.
mj_w
-
20
),
self
.
cardBackgroundView
.
mj_h
-
50
);
[
self
.
cardBackgroundView
addSubview
:
cardVc
.
view
];
//
/
我的抽奖
// 我的抽奖
LuckyDrawDetailsViewController
*
draw
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"LuckyDrawDetailsViewController"
];
[
self
addChildViewController
:
draw
];
draw
.
drawValue
=
0
;
...
...
Class/SettlementViewController.h
View file @
4504075d
...
...
@@ -7,7 +7,7 @@
//
#import "BaseViewController.h"
#import "LuckDrawResultModel.h"
#import "
Promotion
LuckDrawResultModel.h"
@interface
SettlementViewController
:
BaseViewController
...
...
@@ -132,7 +132,7 @@
/**
* 客户抽奖结果
*/
@property
(
nonatomic
,
strong
)
LuckDrawResultModel
*
resultModel
;
@property
(
nonatomic
,
strong
)
Promotion
LuckDrawResultModel
*
resultModel
;
@end
Class/SettlementViewController.m
View file @
4504075d
...
...
@@ -10,7 +10,9 @@
#import "PayViewController.h"
#import "PromotionalDeductionModel.h"
#import "PromotionalGoodsModel.h"
#import "LuckyDrawModel.h"
#import "PromotionLuckyDrawModel.h"
#import "PromotionWeChatCardModel.h"
#import "PromotionJDECardModel.h"
@interface
SettlementViewController
()
<
ReturnTableviewcellIndexpathdelegate
,
UITextFieldDelegate
>
...
...
@@ -90,9 +92,9 @@
goodsAllNumber
+=
[
model
.
goodsNum
integerValue
];
goodAllprice
+=
[
model
.
goodsPrice
floatValue
]
*
[
model
.
goodsNum
integerValue
];
}
//
/
促销金额大于商品金额情况
// 促销金额大于商品金额情况
goodAllprice
=
(
goodAllprice
<
0
)?
0
:
goodAllprice
;
//
/
抽奖结果<打折>
// 抽奖结果<打折>
if
([
self
.
resultModel
.
type
isEqualToString
:
@"discount"
])
{
goodAllprice
=
goodAllprice
*
([
self
.
resultModel
.
number
integerValue
]
/
100
.
0
);
}
...
...
@@ -308,7 +310,7 @@
order
.
fnewstate
=
PAYSUCCESS
;
order
.
oldstate
=
NOTPAY
;
order
.
drawId
=
self
.
resultModel
.
drawId
;
//
/
查询是否有赠送商品促销
// 查询是否有赠送商品促销
order
.
realAmount
=
[
NSNumber
numberWithFloat
:[[
self
.
goodsAllPrice
.
text
substringFromIndex
:
1
]
floatValue
]];
NSMutableArray
*
goodsArray
=
[
NSMutableArray
array
];
for
(
id
object
in
self
.
promotionalArray
)
{
...
...
@@ -327,7 +329,7 @@
}
}
order
.
promotionGoods
=
(
NSArray
<
PromotionGoods
>
*
)
goodsArray
;
//
/
抵扣金额
// 抵扣金额
CGFloat
promotionMoney
=
0
;
for
(
id
object
in
self
.
promotionalArray
)
{
if
([
object
isKindOfClass
:[
PromotionalDeductionModel
class
]])
{
...
...
@@ -338,21 +340,21 @@
}
}
order
.
promotionMoney
=
@
(
promotionMoney
);
//
/
查询是否有京东E卡促销
NSInteger
totalNumber
=
0
;
//促销卡面额
// 查询是否有京东E卡促销
NSInteger
totalNumber
=
0
;
for
(
id
object
in
self
.
luckyDrawAndJDECardArray
)
{
if
([
object
isKindOfClass
:[
Promotion
alDeduction
Model
class
]])
{
Promotion
alDeductionModel
*
model
=
(
PromotionalDeduction
Model
*
)
object
;
if
([
object
isKindOfClass
:[
Promotion
JDECard
Model
class
]])
{
Promotion
JDECardModel
*
model
=
(
PromotionJDECard
Model
*
)
object
;
if
([
model
.
type
isEqualToString
:
JDECardAction
]
&&
[
model
.
body
isEqualToString
:
GUIDE
])
{
totalNumber
+=
model
.
total
;
}
}
}
order
.
jdCardDenomation
=
totalNumber
;
//
/
查询是否有导购抽奖机会
// 查询是否有导购抽奖机会
for
(
id
object
in
self
.
luckyDrawAndJDECardArray
)
{
if
([
object
isKindOfClass
:[
LuckyDrawModel
class
]])
{
LuckyDrawModel
*
model
=
(
LuckyDrawModel
*
)
object
;
if
([
object
isKindOfClass
:[
Promotion
LuckyDrawModel
class
]])
{
PromotionLuckyDrawModel
*
model
=
(
Promotion
LuckyDrawModel
*
)
object
;
if
([
model
.
body
isEqualToString
:
GUIDE
])
{
order
.
lotteryId
=
model
.
lottery
.
uuid
;
}
...
...
Lighting.xcodeproj/project.pbxproj
View file @
4504075d
...
...
@@ -136,7 +136,7 @@
29A938271CDAE31B00F21E54
/* ProductDetailsHeaderView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A938261CDAE31B00F21E54
/* ProductDetailsHeaderView.xib */
;
};
29A974CA1D72F9C80012AFA1
/* RebateSuccessTableViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A974C91D72F9C80012AFA1
/* RebateSuccessTableViewController.m */
;
};
29A9DCAE1CEB643C00A7567A
/* CustomWKWebViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A9DCAC1CEB643C00A7567A
/* CustomWKWebViewController.m */
;
};
29B3EE6D1DCE0B390065FCCF
/*
LuckDrawResultModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B3EE6C1DCE0B390065FCCF
/*
LuckDrawResultModel.m */
;
};
29B3EE6D1DCE0B390065FCCF
/*
PromotionLuckDrawResultModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B3EE6C1DCE0B390065FCCF
/* Promotion
LuckDrawResultModel.m */
;
};
29B3EE711DCE16130065FCCF
/* LuckyDrawViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B3EE701DCE16130065FCCF
/* LuckyDrawViewController.m */
;
};
29BAA3AB1DC9FB5B00927D04
/* PromptTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BAA3AA1DC9FB5B00927D04
/* PromptTableViewCell.m */
;
};
29BB27681CD9D38E009A0813
/* AllpriceTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BB27671CD9D38E009A0813
/* AllpriceTableViewCell.m */
;
};
...
...
@@ -151,12 +151,15 @@
29C584ED1CDA429500C6F677
/* ProductDetailsViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29C584EC1CDA429500C6F677
/* ProductDetailsViewController.m */
;
};
29CB35421CFF0FB60061A5F3
/* ScreeningCollectionViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29CB35411CFF0FB60061A5F3
/* ScreeningCollectionViewCell.m */
;
};
29CCA43C1CF7ED6100BC19DD
/* SelectedTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29CCA43B1CF7ED6100BC19DD
/* SelectedTableViewCell.m */
;
};
29D0DCE11DD9B04A00729692
/* PromotionChooseViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D0DCE01DD9B04A00729692
/* PromotionChooseViewController.m */
;
};
29D0DCE41DD9B78500729692
/* PromotionJDECardModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D0DCE31DD9B78500729692
/* PromotionJDECardModel.m */
;
};
29D0DCEA1DD9B80700729692
/* PromotionWeChatCardModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D0DCE91DD9B80700729692
/* PromotionWeChatCardModel.m */
;
};
29D260F51CEEAE2800A9787D
/* FullScreenViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260F41CEEAE2800A9787D
/* FullScreenViewController.m */
;
};
29D260F81CEEAF2D00A9787D
/* FullScreenViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260F71CEEAF2D00A9787D
/* FullScreenViewCell.m */
;
};
29D260FB1CEECDFF00A9787D
/* goodsDetailsTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260FA1CEECDFF00A9787D
/* goodsDetailsTableViewCell.m */
;
};
29D260FD1CEED53400A9787D
/* goodsDetailsTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260FC1CEED53400A9787D
/* goodsDetailsTableViewCell.xib */
;
};
29D261001CEEF16D00A9787D
/* MjRefreshHeaderCustom.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260FF1CEEF16D00A9787D
/* MjRefreshHeaderCustom.m */
;
};
29D991DF1DCAE5B700840776
/*
LuckyDrawModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D991DE1DCAE5B700840776
/*
LuckyDrawModel.m */
;
};
29D991DF1DCAE5B700840776
/*
PromotionLuckyDrawModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D991DE1DCAE5B700840776
/* Promotion
LuckyDrawModel.m */
;
};
29E28CE81CE0B91B00812A55
/* HENLENSONG.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29E28CE71CE0B91B00812A55
/* HENLENSONG.m */
;
};
29E2D3201DB8737000443170
/* CardViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29E2D31F1DB8737000443170
/* CardViewController.m */
;
};
29E2D3241DB878F200443170
/* XLPlainFlowLayout.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29E2D3231DB878F200443170
/* XLPlainFlowLayout.m */
;
};
...
...
@@ -436,8 +439,8 @@
29A974C91D72F9C80012AFA1
/* RebateSuccessTableViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RebateSuccessTableViewController.m
;
sourceTree
=
"<group>"
;
};
29A9DCAB1CEB643C00A7567A
/* CustomWKWebViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CustomWKWebViewController.h
;
sourceTree
=
"<group>"
;
};
29A9DCAC1CEB643C00A7567A
/* CustomWKWebViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
CustomWKWebViewController.m
;
sourceTree
=
"<group>"
;
};
29B3EE6B1DCE0B390065FCCF
/*
LuckDrawResultModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
LuckDrawResultModel.h
;
sourceTree
=
"<group>"
;
};
29B3EE6C1DCE0B390065FCCF
/*
LuckDrawResultModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
LuckDrawResultModel.m
;
sourceTree
=
"<group>"
;
};
29B3EE6B1DCE0B390065FCCF
/*
PromotionLuckDrawResultModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Promotion
LuckDrawResultModel.h
;
sourceTree
=
"<group>"
;
};
29B3EE6C1DCE0B390065FCCF
/*
PromotionLuckDrawResultModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
Promotion
LuckDrawResultModel.m
;
sourceTree
=
"<group>"
;
};
29B3EE6F1DCE16130065FCCF
/* LuckyDrawViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
LuckyDrawViewController.h
;
sourceTree
=
"<group>"
;
};
29B3EE701DCE16130065FCCF
/* LuckyDrawViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
LuckyDrawViewController.m
;
sourceTree
=
"<group>"
;
};
29BAA3A91DC9FB5B00927D04
/* PromptTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PromptTableViewCell.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -465,6 +468,12 @@
29CB35411CFF0FB60061A5F3
/* ScreeningCollectionViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ScreeningCollectionViewCell.m
;
sourceTree
=
"<group>"
;
};
29CCA43A1CF7ED6100BC19DD
/* SelectedTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SelectedTableViewCell.h
;
sourceTree
=
"<group>"
;
};
29CCA43B1CF7ED6100BC19DD
/* SelectedTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SelectedTableViewCell.m
;
sourceTree
=
"<group>"
;
};
29D0DCDF1DD9B04A00729692
/* PromotionChooseViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PromotionChooseViewController.h
;
sourceTree
=
"<group>"
;
};
29D0DCE01DD9B04A00729692
/* PromotionChooseViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PromotionChooseViewController.m
;
sourceTree
=
"<group>"
;
};
29D0DCE21DD9B78500729692
/* PromotionJDECardModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PromotionJDECardModel.h
;
sourceTree
=
"<group>"
;
};
29D0DCE31DD9B78500729692
/* PromotionJDECardModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PromotionJDECardModel.m
;
sourceTree
=
"<group>"
;
};
29D0DCE81DD9B80700729692
/* PromotionWeChatCardModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PromotionWeChatCardModel.h
;
sourceTree
=
"<group>"
;
};
29D0DCE91DD9B80700729692
/* PromotionWeChatCardModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PromotionWeChatCardModel.m
;
sourceTree
=
"<group>"
;
};
29D260F31CEEAE2800A9787D
/* FullScreenViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FullScreenViewController.h
;
sourceTree
=
"<group>"
;
};
29D260F41CEEAE2800A9787D
/* FullScreenViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FullScreenViewController.m
;
sourceTree
=
"<group>"
;
};
29D260F61CEEAF2D00A9787D
/* FullScreenViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FullScreenViewCell.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -474,8 +483,8 @@
29D260FC1CEED53400A9787D
/* goodsDetailsTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
goodsDetailsTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
29D260FE1CEEF16D00A9787D
/* MjRefreshHeaderCustom.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MjRefreshHeaderCustom.h
;
sourceTree
=
"<group>"
;
};
29D260FF1CEEF16D00A9787D
/* MjRefreshHeaderCustom.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MjRefreshHeaderCustom.m
;
sourceTree
=
"<group>"
;
};
29D991DD1DCAE5B700840776
/*
LuckyDrawModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
LuckyDrawModel.h
;
sourceTree
=
"<group>"
;
};
29D991DE1DCAE5B700840776
/*
LuckyDrawModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
LuckyDrawModel.m
;
sourceTree
=
"<group>"
;
};
29D991DD1DCAE5B700840776
/*
PromotionLuckyDrawModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Promotion
LuckyDrawModel.h
;
sourceTree
=
"<group>"
;
};
29D991DE1DCAE5B700840776
/*
PromotionLuckyDrawModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
Promotion
LuckyDrawModel.m
;
sourceTree
=
"<group>"
;
};
29E28CE61CE0B91B00812A55
/* HENLENSONG.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
HENLENSONG.h
;
sourceTree
=
"<group>"
;
};
29E28CE71CE0B91B00812A55
/* HENLENSONG.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
HENLENSONG.m
;
sourceTree
=
"<group>"
;
};
29E2D31E1DB8737000443170
/* CardViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
CardViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -737,10 +746,14 @@
2921F2FB1DB5E75300D6439B
/* PromotionalGoodsModel.m */
,
2921F3011DB5EBD600D6439B
/* PromotionalDeductionModel.h */
,
2921F3021DB5EBD600D6439B
/* PromotionalDeductionModel.m */
,
29D991DD1DCAE5B700840776
/* LuckyDrawModel.h */
,
29D991DE1DCAE5B700840776
/* LuckyDrawModel.m */
,
29B3EE6B1DCE0B390065FCCF
/* LuckDrawResultModel.h */
,
29B3EE6C1DCE0B390065FCCF
/* LuckDrawResultModel.m */
,
29D0DCE21DD9B78500729692
/* PromotionJDECardModel.h */
,
29D0DCE31DD9B78500729692
/* PromotionJDECardModel.m */
,
29D0DCE81DD9B80700729692
/* PromotionWeChatCardModel.h */
,
29D0DCE91DD9B80700729692
/* PromotionWeChatCardModel.m */
,
29D991DD1DCAE5B700840776
/* PromotionLuckyDrawModel.h */
,
29D991DE1DCAE5B700840776
/* PromotionLuckyDrawModel.m */
,
29B3EE6B1DCE0B390065FCCF
/* PromotionLuckDrawResultModel.h */
,
29B3EE6C1DCE0B390065FCCF
/* PromotionLuckDrawResultModel.m */
,
);
name
=
model
;
sourceTree
=
"<group>"
;
...
...
@@ -1304,6 +1317,8 @@
2994C0141CFBE793005A80AF
/* PayViewController.xib */
,
2903F93B1DBE57F4003CC6B1
/* JDEcardViewController.h */
,
2903F93C1DBE57F4003CC6B1
/* JDEcardViewController.m */
,
29D0DCDF1DD9B04A00729692
/* PromotionChooseViewController.h */
,
29D0DCE01DD9B04A00729692
/* PromotionChooseViewController.m */
,
29A8D3951CD85A3C004D558F
/* Clientdetails */
,
);
name
=
controller
;
...
...
@@ -1851,6 +1866,8 @@
293163FA1DCE3CBA0075129D
/* LuckyDrawDetailsViewController.m in Sources */
,
29045F321DCA192700E42A86
/* PromptHeaderTableViewCell.m in Sources */
,
2980AEC51D0D0B10001AA4A3
/* opple_objc_json_client.m in Sources */
,
29D0DCEA1DD9B80700729692
/* PromotionWeChatCardModel.m in Sources */
,
29D0DCE41DD9B78500729692
/* PromotionJDECardModel.m in Sources */
,
2916A7521D70557400644C8C
/* PaymentsDetailsTableViewController.m in Sources */
,
29E2D3241DB878F200443170
/* XLPlainFlowLayout.m in Sources */
,
29BFBD981CE46FDA00C238FB
/* MyclientEntityModel.m in Sources */
,
...
...
@@ -1870,6 +1887,7 @@
2949BAC21CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m in Sources */
,
29E2D3301DB8AFD500443170
/* MDScratchImageView.mm in Sources */
,
29D261001CEEF16D00A9787D
/* MjRefreshHeaderCustom.m in Sources */
,
29D0DCE11DD9B04A00729692
/* PromotionChooseViewController.m in Sources */
,
292A14311CE81D1D00EB4430
/* AddressModel.m in Sources */
,
29A938221CDADE4700F21E54
/* ProductDetailsTableViewCell.m in Sources */
,
29E384BE1CE9933300888199
/* AdditionalTableViewCell.m in Sources */
,
...
...
@@ -1936,7 +1954,7 @@
2921F2F81DB5C7E400D6439B
/* OrderDetailsSectionHeaderView.m in Sources */
,
295DEAAA1DB77572006ED4A6
/* CardDetailsViewController.m in Sources */
,
2962D0711CD1A58B0058829D
/* RightViewController.m in Sources */
,
29B3EE6D1DCE0B390065FCCF
/* LuckDrawResultModel.m in Sources */
,
29B3EE6D1DCE0B390065FCCF
/*
Promotion
LuckDrawResultModel.m in Sources */
,
29EAAEA51CDC7F7000C4DBA2
/* CustomerOrderTableViewCell.m in Sources */
,
29706DA91CD082990003C412
/* AppDelegate.m in Sources */
,
29834EB41CDF1EAA001A484F
/* screeningSecondView.m in Sources */
,
...
...
@@ -1959,7 +1977,7 @@
2916A74C1D703DFF00644C8C
/* PaymentsTableViewCell.m in Sources */
,
29E384CB1CE9B0BB00888199
/* HotCollectionViewCell.m in Sources */
,
29834EB91CDF1FB3001A484F
/* screeningFirstView.m in Sources */
,
29D991DF1DCAE5B700840776
/* LuckyDrawModel.m in Sources */
,
29D991DF1DCAE5B700840776
/*
Promotion
LuckyDrawModel.m in Sources */
,
299249401CDB4D1D00786B1E
/* AddaddressViewController.m in Sources */
,
299249371CDB3C6500786B1E
/* GenerateOrdersViewController.m in Sources */
,
291A37771DBA58CC00299F0D
/* GetJDCardView.m in Sources */
,
...
...
Lighting.xcodeproj/xcshareddata/xcschemes/Lighting.xcscheme
View file @
4504075d
...
...
@@ -42,7 +42,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration =
"
Release
"
buildConfiguration =
"
Debug
"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
...
...
Lighting/StoryboardwithCYX.storyboard
View file @
4504075d
...
...
@@ -154,7 +154,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"977"
height=
"100"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"NV8-I4-ig4"
id=
"E0m-wU-1b5"
>
<frame
key=
"frameInset"
width=
"977"
height=
"99
.5
"
/>
<frame
key=
"frameInset"
width=
"977"
height=
"99"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"05产品库-详情_03"
id=
"F66-vh-va3"
>
...
...
@@ -804,11 +804,11 @@
<rect
key=
"frame"
x=
"0.0"
y=
"529.5"
width=
"1024"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"R0y-9Q-NEJ"
id=
"tLA-TB-cwT"
>
<frame
key=
"frameInset"
width=
"
985
"
height=
"43.5"
/>
<frame
key=
"frameInset"
width=
"
824
"
height=
"43.5"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"折扣金额"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"iOu-WG-fyV"
>
<frame
key=
"frameInset"
minX=
"12.5"
minY=
"12"
height=
"21"
maxX=
"-
203
.5"
/>
<frame
key=
"frameInset"
minX=
"12.5"
minY=
"12"
height=
"21"
maxX=
"-
364
.5"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
...
...
@@ -4625,6 +4625,37 @@
</objects>
<point
key=
"canvasLocation"
x=
"6120"
y=
"3417"
/>
</scene>
<!--View Controller-->
<scene
sceneID=
"0Pv-WU-jSx"
>
<objects>
<viewController
id=
"PBr-vr-wKT"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"nrU-4k-SJ7"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"1024"
height=
"768"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
misplaced=
"YES"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"default"
rowHeight=
"44"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
id=
"6YI-vO-JHw"
>
<frame
key=
"frameInset"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
accessoryType=
"checkmark"
indentationWidth=
"10"
id=
"mhH-cy-FIA"
>
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"768"
height=
"44"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"mhH-cy-FIA"
id=
"TSL-c7-uQa"
>
<frame
key=
"frameInset"
width=
"696"
height=
"43"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
</tableView>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"iTY-wF-j6u"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"6120"
y=
"4496"
/>
</scene>
<!--Scene View Controller-->
<scene
sceneID=
"Ezg-ab-G2Y"
>
<objects>
...
...
Tools/BaseViewController.h
View file @
4504075d
...
...
@@ -81,7 +81,7 @@
* 提示框
*
*/
-
(
void
)
promptCustomerTitle
:(
NSString
*
)
title
finish
:(
void
(
^
)())
complete
;
-
(
void
)
promptCustomerTitle
:(
NSString
*
)
title
withMessage
:(
NSString
*
)
message
finish
:(
void
(
^
)())
complete
;
/**
...
...
Tools/BaseViewController.m
View file @
4504075d
...
...
@@ -278,10 +278,10 @@
}
#pragma mark - 提示框
-
(
void
)
promptCustomerTitle
:
(
NSString
*
)
title
finish
:
(
void
(
^
)())
complete
-
(
void
)
promptCustomerTitle
:
(
NSString
*
)
title
withMessage
:
(
NSString
*
)
message
finish
:
(
void
(
^
)())
complete
{
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
titl
e
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertVC
addAction
:[
UIAlertAction
actionWithTitle
:
@"我知道了"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
messag
e
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertVC
addAction
:[
UIAlertAction
actionWithTitle
:
title
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
if
(
complete
)
{
complete
();
}
...
...
Tools/CYConstManager.h
View file @
4504075d
...
...
@@ -253,6 +253,11 @@ extern NSString *const RECEIVEJDECARD;
*/
extern
NSString
*
const
QUERYALLJDECARD
;
/**
* 微信卡劵
*/
extern
NSString
*
const
WeChatCard
;
/**
* 使用京东E卡
*/
...
...
Tools/CYConstManager.m
View file @
4504075d
...
...
@@ -349,6 +349,11 @@ NSString *const goodsAction = @"goodsAction";
*/
NSString
*
const
lotteryAction
=
@"lotteryAction"
;
/**
* 微信卡劵
*/
NSString
*
const
WeChatCard
=
@"wxCardAction"
;
/**
* 未付款
*/
...
...
Tools/Customermanager.h
View file @
4504075d
...
...
@@ -19,32 +19,32 @@
+
(
Customermanager
*
)
manager
;
//
/
**
//**
// * 客户iD
// */
//@property (nonatomic,copy) NSString *customerID;
//
//
/
**
//**
// * 客户姓名
// */
//@property (nonatomic,copy) NSString *customerName;
//
//
/
**
//**
// * 客户手机号码
// */
//@property (nonatomic,copy) NSString *customerPhoneNumber;
//
//
/
**
//**
// * 客户公司名字
// */
//@property (nonatomic,copy) NSString *companyName;
//
//
/
**
//**
// * 客户地址
// */
//@property (nonatomic,copy) NSString *cutomerAddress;
//
//
/
**
//**
// * header
// */
//@property (nonatomic,copy) NSString *header;
...
...
Tools/PrefixHeader.pch
View file @
4504075d
...
...
@@ -130,7 +130,7 @@
/**
* 服务器开发地址
*/
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
/**
...
...
@@ -138,10 +138,10 @@
*/
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
//
/
**
//**
// * 服务器正式地址
// */
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
/**
* 搜索框输入通知
...
...
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