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
Expand all
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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