Commit 0fdbe5b8 authored by 曹云霄's avatar 曹云霄

no message

parent 30e9f987
......@@ -48,15 +48,11 @@
self.orderStateShowImageView.image = [BaseViewController returnOrderStateImageWithStateCode:[_model.order.orderState integerValue]];
//订单状态文本
self.orderState.text = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderState.frame.origin.x, self.orderState.frame.origin.y) WithCode:0];
self.orderState.textColor = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderState.frame.origin.x, self.orderState.frame.origin.y) WithCode:1];
self.orderState.text = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderState.frame.origin.x, self.orderState.frame.origin.y) withCode:0];
self.orderState.textColor = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderState.frame.origin.x, self.orderState.frame.origin.y) withCode:1];
}
#pragma mark -时间转换NSDate转NSString
- (NSString*)dateAsString:(NSDate*)date {
......
......@@ -22,8 +22,8 @@
_model = model;
self.orderNumber.text = _model.order.orderNumber;
self.orderTime.text = _model.order.createDate;
self.orderStatus.text = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) WithCode:0];
self.orderStatus.textColor = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) WithCode:1];
self.orderStatus.text = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) withCode:0];
self.orderStatus.textColor = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) withCode:1];
self.operatorName.text = _model.employee.realName;
}
......
......@@ -70,8 +70,8 @@
self.orderStateImageView.image = [BaseViewController returnOrderStateImageWithStateCode:[_model.order.orderState integerValue]];
//订单状态文本
self.orderStatus.text = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) WithCode:0];
self.orderStatus.textColor = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) WithCode:1];
self.orderStatus.text = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) withCode:0];
self.orderStatus.textColor = [BaseViewController returnOrderStateTitleWithStateCode:[_model.order.orderState integerValue] withPoint:CGPointMake(self.orderStatus.frame.origin.x, self.orderStatus.frame.origin.y) withCode:1];
}
......
......@@ -517,7 +517,7 @@
}
#pragma mark -修改单个商品数量、价格
- (void)changeGoodsNumber:(NSInteger)goodsNumber WithcostPrice:(CGFloat)costprice Withcellindex:(NSInteger)cellindex returnValue:(void (^)(id))result
- (void)changeGoodsNumber:(NSInteger)goodsNumber withcostPrice:(CGFloat)costprice withcellindex:(NSInteger)cellindex returnValue:(void (^)(id))result
{
[XBLoadingView showHUDViewWithDefault];
//保存商品数量
......@@ -525,17 +525,18 @@
model.goodsNum = goodsNumber;
//保存成交价格
model.costPrice = [NSNumber numberWithFloat:costprice];
//在服务器保存数量、成交价
//购物车ID
NSString *carid = model.fid;
//商品id
NSString *goodsis = model.goodsId;
//成交价
NSString *costpriceString = [NSString stringWithFormat:@"%.2f",costprice];
//商品数量
NSString *goodsNumberString = [NSString stringWithFormat:@"%ld",(long)goodsNumber];
// //在服务器保存数量、成交价
// //购物车ID
// NSString *carid = model.fid;
// //商品id
// NSString *goodsis = model.goodsId;
// //成交价
// NSString *costpriceString = [NSString stringWithFormat:@"%.2f",costprice];
// //商品数量
// NSString *goodsNumberString = [NSString stringWithFormat:@"%ld",(long)goodsNumber];
WS(weakSelf);
[HTTP networkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@/%@/%@/%@",SERVERREQUESTURL(CHANGESHOPPINGBAGNUMBERPRICE),carid,goodsis,costpriceString,goodsNumberString] withRequestType:ONE withParameter:nil withReturnValueBlock:^(id returnValue) {
NSString *urlString = [NSString stringWithFormat:SERVERREQUESTURL(CHANGESHOPPINGBAGNUMBERPRICE),model.fid,[model.costPrice stringValue],model.goodsId,model.goodsNum];
[HTTP networkWithDictionaryRequestWithURL:urlString withRequestType:ZERO withParameter:nil withReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault];
result(returnValue);//提供是否支持修改的参数
......
......@@ -16,7 +16,7 @@
/**
* 当前商品数量、成交价 ,通过返回参数判断是否能修改
*/
- (void)changeGoodsNumber:(NSInteger)goodsNumber WithcostPrice:(CGFloat)costprice Withcellindex:(NSInteger)cellindex returnValue:(void(^)(id value))result;
- (void)changeGoodsNumber:(NSInteger)goodsNumber withcostPrice:(CGFloat)costprice withcellindex:(NSInteger)cellindex returnValue:(void(^)(id value))result;
@end
......
......@@ -81,8 +81,8 @@
}
//改变价格
WS(weakSelf);
if ([self.delegate respondsToSelector:@selector(changeGoodsNumber:WithcostPrice:Withcellindex:returnValue:)]) {
[self.delegate changeGoodsNumber:goodsNumber WithcostPrice:[self.clinchTextfield.text floatValue]Withcellindex:_cellindex returnValue:^(id value) {
if ([self.delegate respondsToSelector:@selector(changeGoodsNumber:withcostPrice:withcellindex:returnValue:)]) {
[self.delegate changeGoodsNumber:goodsNumber withcostPrice:[self.clinchTextfield.text floatValue] withcellindex:_cellindex returnValue:^(id value) {
if ([value isKindOfClass:[NSDictionary class]]) {
if ([value[@"code"] isEqualToNumber:@0]) {
weakSelf.goodsNumbersLabe.text = [NSString stringWithFormat:@"%ld",goodsNumber];
......@@ -122,8 +122,8 @@
//改变价格
self.productPriceLabe.text = [NSString stringWithFormat:@"¥%.2f",[self.goodsNumbersLabe.text integerValue]*[textField.text floatValue]];
if ([self.delegate respondsToSelector:@selector(changeGoodsNumber:WithcostPrice:Withcellindex:returnValue:)]) {
[self.delegate changeGoodsNumber:[self.goodsNumbersLabe.text integerValue] WithcostPrice:[self.clinchTextfield.text floatValue]Withcellindex:_cellindex returnValue:^(id value) {
if ([self.delegate respondsToSelector:@selector(changeGoodsNumber:withcostPrice:withcellindex:returnValue:)]) {
[self.delegate changeGoodsNumber:[self.goodsNumbersLabe.text integerValue] withcostPrice:[self.clinchTextfield.text floatValue] withcellindex:_cellindex returnValue:^(id value) {
}];
}
}
......
......@@ -50,7 +50,7 @@
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self getCardDatasAction];
[self getCardDatasAction:YES];
}
- (void)viewDidLoad {
......@@ -58,7 +58,7 @@
}
#pragma mark - 查询卡劵
- (void)getCardDatasAction
- (void)getCardDatasAction:(BOOL)isRefresh
{
WS(weakSelf);
[XBLoadingView showHUDViewWithDefaultWithView:self.view];
......@@ -69,8 +69,9 @@
[weakSelf endRefreshingForTableView:weakSelf.cardCollectionView];
[XBLoadingView hideHUDViewWithDefaultWithView:weakSelf.view];
if (RESULT(returnValue)) {
[weakSelf.datasArray removeAllObjects];
if (isRefresh) {
[weakSelf.datasArray removeAllObjects];
}
RsSimpleJingDongECardResponse *cardInformation = [[RsSimpleJingDongECardResponse alloc]initWithDictionary:RESPONSE(returnValue) error:nil];
for (TOJingdongEcardEntity *eCard in cardInformation.list) {
[weakSelf.datasArray addObject:eCard];
......@@ -81,9 +82,8 @@
}
}withFailureBlock:^(NSError *error) {
[XBLoadingView hideHUDViewWithDefaultWithView:weakSelf.view];
[weakSelf endRefreshingForTableView:weakSelf.cardCollectionView];
[XBLoadingView showHUDViewWithText:error.localizedDescription];
[XBLoadingView hideHUDViewWithDefaultWithView:weakSelf.view];
}];
}
......
......@@ -52,7 +52,7 @@
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self getDrawDatas];
[self getDrawDatas:YES];
}
- (void)viewDidLoad
......@@ -62,7 +62,7 @@
}
#pragma mark - 抽奖数据
- (void)getDrawDatas
- (void)getDrawDatas:(BOOL)isRefresh
{
WS(weakSelf);
[XBLoadingView showHUDViewWithDefaultWithView:self.view];
......@@ -72,6 +72,9 @@
weakSelf.luckyDrawMainTableView.emptyDataSetDelegate = weakSelf;
[XBLoadingView hideHUDViewWithDefaultWithView:weakSelf.view];
if (RESULT(returnValue)) {
if (isRefresh) {
[weakSelf.datasArray removeAllObjects];
}
RsLotteryResponse *drawRecord = [[RsLotteryResponse alloc]initWithDictionary:RESPONSE(returnValue) error:nil];
[weakSelf.datasArray addObjectsFromArray:drawRecord.list];
[weakSelf.luckyDrawMainTableView reloadData];
......@@ -81,7 +84,6 @@
} withFailureBlock:^(NSError *error) {
[weakSelf endRefreshingForTableView:weakSelf.luckyDrawMainTableView];
[XBLoadingView hideHUDViewWithDefaultWithView:weakSelf.view];
[XBLoadingView showHUDViewWithText:error.localizedDescription];
}];
}
......
......@@ -40,7 +40,7 @@
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self getReadPacketAction];
[self getReadPacketAction:YES];
}
- (void)viewDidLoad {
......@@ -50,17 +50,20 @@
}
#pragma mark - 获取红包信息
- (void)getReadPacketAction
- (void)getReadPacketAction:(BOOL)isRefresh
{
WS(weakSelf);
[XBLoadingView showHUDViewWithDefault];
[XBLoadingView showHUDViewWithDefaultWithView:self.view];
[HTTP networkRequestWithURL:SERVERREQUESTURL(QUERY_REDPACKAGE) withRequestType:ZERO withParameter:self.queryReadPacket withReturnValueBlock:^(id returnValue) {
[XBLoadingView hideHUDViewWithDefault];
[XBLoadingView hideHUDViewWithDefaultWithView:weakSelf.view];
weakSelf.readPacketMainCollectionView.emptyDataSetSource = weakSelf;
weakSelf.readPacketMainCollectionView.emptyDataSetDelegate = weakSelf;
[weakSelf endRefreshingForTableView:weakSelf.readPacketMainCollectionView];
if (RESULT(returnValue)) {
if (isRefresh) {
[weakSelf.readPacketArray removeAllObjects];
}
weakSelf.readPacketResult = [[RedPackageResponse alloc]initWithDictionary:RESPONSE(returnValue) error:nil];
[weakSelf.readPacketArray addObjectsFromArray:[NSMutableArray arrayWithArray:weakSelf.readPacketResult.list]];
[weakSelf.readPacketMainCollectionView reloadData];
......@@ -69,7 +72,7 @@
}
}withFailureBlock:^(NSError *error) {
[weakSelf endRefreshingForTableView:weakSelf.readPacketMainCollectionView];
[XBLoadingView showHUDViewWithText:error.localizedDescription];
[XBLoadingView hideHUDViewWithDefaultWithView:weakSelf.view];
}];
}
......
......@@ -95,12 +95,12 @@ typedef NS_ENUM(NSInteger,COMMENT_PRAISE) {
/**
* 服务器开发地址
*/
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://gomoredev:8082/opple-web/app%@",URL]
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://gomoredev:8082/opple-web/app%@",URL]
/**
* 服务器测试地址
*/
//#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
//**
// * 服务器正式地址
......
......@@ -75,7 +75,7 @@
/**
* 调用打印机
*/
- (void)callAirprintWithdata:(NSString *)PDFpath SuccessBlock:(void(^)())success ErrorBlock:(void(^)())failed;
- (void)callAirprintWithdata:(NSString *)PDFpath successBlock:(void(^)())success errorBlock:(void(^)())failed;
/**
* 判断是否有相机权限
......@@ -96,7 +96,7 @@
/**
* 查询订单状态文本 //code == 0 取文字 code == 1取颜色
*/
+ (id)returnOrderStateTitleWithStateCode:(NSInteger)ordercode withPoint:(CGPoint)point WithCode:(NSInteger)code;
+ (id)returnOrderStateTitleWithStateCode:(NSInteger)ordercode withPoint:(CGPoint)point withCode:(NSInteger)code;
/**
* 查询购物车数量
......
......@@ -293,8 +293,6 @@
return [NSString stringWithFormat:@"%@%@",moneyType,(money>0)?@"返佣":@"提现"];
}
#pragma mark - 获取当前时间之前或者之后的时间(之前传入负数)
+ (NSString *)getTimeby:(NSInteger)day
{
......@@ -313,7 +311,7 @@
}
#pragma mark 调用airPrint无线打印机
- (void)callAirprintWithdata:(NSString *)PDFpath SuccessBlock:(void(^)())success ErrorBlock:(void(^)())failed
- (void)callAirprintWithdata:(NSString *)PDFpath successBlock:(void(^)())success errorBlock:(void(^)())failed
{
NSData *mypdfdata = [NSData dataWithContentsOfFile:PDFpath];
UIPrintInteractionController *pic = [UIPrintInteractionController sharedPrintController];
......@@ -375,7 +373,7 @@
#pragma mark -传入订单状态,返回订单文本信息,字体颜色
+ (id)returnOrderStateTitleWithStateCode:(NSInteger)ordercode withPoint:(CGPoint)point WithCode:(NSInteger)code
+ (id)returnOrderStateTitleWithStateCode:(NSInteger)ordercode withPoint:(CGPoint)point withCode:(NSInteger)code
{
switch (ordercode) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment