Commit 7e94e12c authored by 勾芒's avatar 勾芒

debug

parent 4c5cda30
...@@ -20,10 +20,9 @@ ...@@ -20,10 +20,9 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Gdg-fx-ziI"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Gdg-fx-ziI">
<rect key="frame" x="95" y="13" width="150" height="17"/> <rect key="frame" x="95" y="13" width="150" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -35,10 +34,9 @@ ...@@ -35,10 +34,9 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IhE-VI-oy0"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IhE-VI-oy0">
<rect key="frame" x="95" y="45" width="220" height="17"/> <rect key="frame" x="95" y="45" width="220" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -50,10 +48,9 @@ ...@@ -50,10 +48,9 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7ty-c7-Sgn"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7ty-c7-Sgn">
<rect key="frame" x="432" y="13" width="170" height="17"/> <rect key="frame" x="432" y="13" width="170" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -65,10 +62,9 @@ ...@@ -65,10 +62,9 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="曹云霄" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MPi-P0-LEg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MPi-P0-LEg">
<rect key="frame" x="432" y="43" width="170" height="17"/> <rect key="frame" x="432" y="43" width="170" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="0.7124683436" blue="0.054982668810000003" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init]; ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = 1; page.page = 1;
page.rows = 10; page.rows = KROWS;
condition.page = page; condition.page = page;
[self getShoppersAssociatedCustomer:condition isRemove:YES]; [self getShoppersAssociatedCustomer:condition isRemove:YES];
}]; }];
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init]; ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.rows = 10; page.rows = KROWS;
if (self.indexPage ++ > self.totalPages) { if (self.indexPage ++ > self.totalPages) {
[self.allCustomerTableview.mj_footer endRefreshingWithNoMoreData]; [self.allCustomerTableview.mj_footer endRefreshingWithNoMoreData];
}else }else
......
...@@ -48,4 +48,9 @@ ...@@ -48,4 +48,9 @@
*/ */
@property (nonatomic,strong) ShopcarModel *model; @property (nonatomic,strong) ShopcarModel *model;
/**
* 成交价
*/
@property (weak, nonatomic) IBOutlet UILabel *clinchPrice;
@end @end
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
_model = model; _model = model;
[self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:_model.goods.pictures] placeholderImage:REPLACEIMAGE]; [self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:_model.goods.pictures] placeholderImage:REPLACEIMAGE];
self.goodsName.text = _model.goods.name; self.goodsName.text = _model.goods.name;
self.goodsCraneQuotation.text = [_model.goods.tagPrice stringValue]; self.goodsCraneQuotation.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.tagPrice floatValue]];
self.goodsSpecifications.text = _model.goods.spec; self.goodsSpecifications.text = _model.goods.size;
self.goodsNumber.text = _model.goods.number; self.clinchPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]];
self.goodsPrice.text = [_model.goods.costPrice stringValue]; self.goodsNumber.text = [NSString stringWithFormat:@"%d",_model.goodsNum];
self.goodsPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]*_model.goodsNum];
} }
......
...@@ -104,8 +104,6 @@ ...@@ -104,8 +104,6 @@
//监听键盘落下的通知 //监听键盘落下的通知
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(KeyboadrDismiss) name:UIKeyboardWillHideNotification object:nil]; [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(KeyboadrDismiss) name:UIKeyboardWillHideNotification object:nil];
//下拉刷新 //下拉刷新
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{ MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init]; ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init];
...@@ -113,7 +111,7 @@ ...@@ -113,7 +111,7 @@
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = 1; page.page = 1;
condition.page = page; condition.page = page;
page.rows = 10; page.rows = KROWS;
self.indexPage = 1; self.indexPage = 1;
[self.informationTableview.mj_footer resetNoMoreData]; [self.informationTableview.mj_footer resetNoMoreData];
[self getShoppersAssociatedCustomer:condition isRemoveArray:YES]; [self getShoppersAssociatedCustomer:condition isRemoveArray:YES];
...@@ -134,7 +132,7 @@ ...@@ -134,7 +132,7 @@
ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init]; ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = self.indexPage ++; page.page = self.indexPage ++;
page.rows = 10; page.rows = KROWS;
condition.page = page; condition.page = page;
[self getShoppersAssociatedCustomer:condition isRemoveArray:NO]; [self getShoppersAssociatedCustomer:condition isRemoveArray:NO];
} }
......
...@@ -51,14 +51,14 @@ ...@@ -51,14 +51,14 @@
self.phoneNumber.text = _model.consumer.mobile; self.phoneNumber.text = _model.consumer.mobile;
self.consigneeAddress.text = _model.order.receiverAddress; self.consigneeAddress.text = _model.order.receiverAddress;
NSInteger goodsAllprice = 0; CGFloat goodsAllprice = 0;
NSInteger goodsAllnum = 0; NSInteger goodsAllnum = 0;
for (TOOrderdetailEntity *goodslist in _model.orderdetailList) { for (TOOrderdetailEntity *goodslist in _model.orderdetailList) {
goodsAllprice += [goodslist.goodsTotalPrice integerValue]; goodsAllprice += [goodslist.goodsTotalPrice floatValue];
goodsAllnum += [goodslist.goodsNum integerValue]; goodsAllnum += [goodslist.goodsNum integerValue];
} }
self.orderTotalPrice.text = [NSString stringWithFormat:@"%ld",goodsAllprice]; self.orderTotalPrice.text = [NSString stringWithFormat:@"¥%.2f",goodsAllprice];
self.styleNumber.text = [NSString stringWithFormat:@"%ld",goodsAllnum]; self.styleNumber.text = [NSString stringWithFormat:@"%ld",goodsAllnum];
......
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
orderState = @"004"; orderState = @"004";
} }
self.indexPage = 0; self.indexPage = 1;
Neworder.orderState = orderState; Neworder.orderState = orderState;
[self getGuideAllcustomerOrder:YES WithorderBill:allOrder]; [self getGuideAllcustomerOrder:YES WithorderBill:allOrder];
} }
...@@ -325,8 +325,6 @@ ...@@ -325,8 +325,6 @@
/** /**
* 撤销订单 * 撤销订单
* *
......
...@@ -17,4 +17,8 @@ ...@@ -17,4 +17,8 @@
@property (nonatomic,copy) NSArray *datasArray; @property (nonatomic,copy) NSArray *datasArray;
/**
* 身份ID/判断是场景库调用还是产品库调用
*/
@property (nonatomic,assign) BOOL isProductLibrary;
@end @end
...@@ -63,8 +63,8 @@ static NSString * const reuseIdentifier = @"Cell"; ...@@ -63,8 +63,8 @@ static NSString * const reuseIdentifier = @"Cell";
#pragma amrk 返回View #pragma amrk 返回View
- (void)CreateBackView - (void)CreateBackView
{ {
self.backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 0)]; self.backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 64)];
self.backView.backgroundColor = [kMainGrayColor colorWithAlphaComponent:0.5]; self.backView.backgroundColor = [kMainGrayColor colorWithAlphaComponent:0.8];
[self.view addSubview:self.backView]; [self.view addSubview:self.backView];
//返回按钮 //返回按钮
...@@ -73,13 +73,15 @@ static NSString * const reuseIdentifier = @"Cell"; ...@@ -73,13 +73,15 @@ static NSString * const reuseIdentifier = @"Cell";
[backButton setImage:TCImage(@"1") forState:UIControlStateNormal]; [backButton setImage:TCImage(@"1") forState:UIControlStateNormal];
[backButton addTarget:self action:@selector(BackButtonClick) forControlEvents:UIControlEventTouchUpInside]; [backButton addTarget:self action:@selector(BackButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.backView addSubview:backButton]; [self.backView addSubview:backButton];
//体验中心
UIButton *tiYanCenterButton = [UIButton buttonWithType:UIButtonTypeCustom];
tiYanCenterButton.frame = CGRectMake(ScreenWidth-100, 0, 100, 64);
[tiYanCenterButton setImage:TCImage(@"1") forState:UIControlStateNormal];
[tiYanCenterButton addTarget:self action:@selector(GotoTiYanCenterButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.backView addSubview:tiYanCenterButton];
if (self.isProductLibrary) {
//体验中心
UIButton *tiYanCenterButton = [UIButton buttonWithType:UIButtonTypeCustom];
tiYanCenterButton.frame = CGRectMake(ScreenWidth-100, 0, 100, 64);
[tiYanCenterButton setImage:TCImage(@"1") forState:UIControlStateNormal];
[tiYanCenterButton addTarget:self action:@selector(GotoTiYanCenterButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.backView addSubview:tiYanCenterButton];
}
} }
#pragma mark -返回 #pragma mark -返回
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
} }
#pragma mark - 布局 #pragma mark - 布局
- (void)uiConfigAction - (void)uiConfigAction
{ {
......
...@@ -33,16 +33,16 @@ ...@@ -33,16 +33,16 @@
self.consigneeName.text = _model.order.receiverName; self.consigneeName.text = _model.order.receiverName;
self.consigneePhoneNumber.text = _model.order.receiverMobile; self.consigneePhoneNumber.text = _model.order.receiverMobile;
self.orderSerialNumber.text = _model.order.orderNumber; self.orderSerialNumber.text = _model.order.orderNumber;
self.shopperName.text = _model.employee.userName; self.shopperName.text = _model.employee.realName;
self.phoneNumber.text = _model.consumer.mobile; self.phoneNumber.text = _model.consumer.mobile;
//价格 //价格
NSInteger allprice = 0; CGFloat allprice = 0;
for (TOOrderdetailEntity *objc in _model.orderdetailList) { for (TOOrderdetailEntity *objc in _model.orderdetailList) {
allprice += [objc.goodsPrice integerValue]; allprice += [objc.goodsPrice floatValue]*[objc.goodsNum integerValue];
} }
self.orderAllprice.text = [NSString stringWithFormat:@"%ld",allprice]; self.orderAllprice.text = [NSString stringWithFormat:@"¥%.2f",allprice];
self.customerAddress.text = _model.consumer.address; self.customerAddress.text = _model.order.receiverAddress;
//订单状态图片 //订单状态图片
self.orderStateShowImageView.image = [BaseViewController ReturnOrderStateImageWithStateCode:[_model.order.orderState integerValue]]; self.orderStateShowImageView.image = [BaseViewController ReturnOrderStateImageWithStateCode:[_model.order.orderState integerValue]];
......
...@@ -334,12 +334,14 @@ ...@@ -334,12 +334,14 @@
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{ {
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 44)]; UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 60)];
//区头文字 //区头文字
UILabel *Titlelabe = [[UILabel alloc]initWithFrame:CGRectMake(30, 0, 100, 44)]; UILabel *Titlelabe = [[UILabel alloc]initWithFrame:CGRectMake(0, 10, ScreenWidth, 50)];
Titlelabe.text = [self.sectionTitle objectAtIndex_opple:section]; Titlelabe.text = [NSString stringWithFormat:@" %@",[self.sectionTitle objectAtIndex_opple:section]];
view.backgroundColor = kTCColor(236, 236, 236);
Titlelabe.backgroundColor = [UIColor whiteColor];
Titlelabe.font = [UIFont systemFontOfSize:13]; Titlelabe.font = [UIFont systemFontOfSize:13];
[view addSubview:Titlelabe]; [view addSubview:Titlelabe];
return view; return view;
...@@ -349,7 +351,7 @@ ...@@ -349,7 +351,7 @@
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{ {
return 44; return 60;
} }
...@@ -414,36 +416,45 @@ ...@@ -414,36 +416,45 @@
}else if ([button.currentTitle isEqualToString:@"撤销订单"]) }else if ([button.currentTitle isEqualToString:@"撤销订单"])
{ {
[self CreateMBProgressHUDLoding]; __weak typeof(self) weakSelf = self;
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@/%@/%@",ServerAddress,@"/order/updateOrderState/",_orderCode,@"001",@"005"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:@"请确认是否撤销订单" preferredStyle:UIAlertControllerStyleAlert];
[alertVC addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[self RemoveMBProgressHUDLoding]; [weakSelf dismissViewControllerAnimated:YES completion:nil];
if ([returnValue[@"code"] isEqualToNumber:@0]) { }]];
[self SuccessMBProgressView:@"撤销成功"]; [alertVC addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action)
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 0)]; {
self.orderDetailsTableview.tableHeaderView = view; [self CreateMBProgressHUDLoding];
self.orderDetailsTableview.tableFooterView = nil; [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@/%@/%@",ServerAddress,@"/order/updateOrderState/",_orderCode,@"001",@"005"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
self.orderDetails.order.orderState = @"005";
[self.orderDetailsTableview reloadData];
if (self.DelecteAndPayButtonBlock) { [self RemoveMBProgressHUDLoding];
self.DelecteAndPayButtonBlock(_cellindex,@"005"); if ([returnValue[@"code"] isEqualToNumber:@0]) {
[self SuccessMBProgressView:@"撤销成功"];
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 0)];
self.orderDetailsTableview.tableHeaderView = view;
self.orderDetailsTableview.tableFooterView = nil;
self.orderDetails.order.orderState = @"005";
[self.orderDetailsTableview reloadData];
if (self.DelecteAndPayButtonBlock) {
self.DelecteAndPayButtonBlock(_cellindex,@"005");
}
} }
} else
else {
{ [self ErrorMBProgressView:returnValue[@"message"]];
[self ErrorMBProgressView:returnValue[@"message"]]; }
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
[self RemoveMBProgressHUDLoding]; }];
}]; }]];
[self presentViewController:alertVC animated:YES completion:nil];
} }
} }
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
self.headerView.serialNumber.text = self.entity.code; self.headerView.serialNumber.text = self.entity.code;
self.headerView.nameLabe.text = self.entity.name; self.headerView.nameLabe.text = self.entity.name;
self.headerView.brandName.text = self.entity.company; self.headerView.brandName.text = self.entity.company;
self.headerView.dorpPriceLabe.text = [NSString stringWithFormat:@"¥%.2f",[self.entity.guidePrice floatValue]]; self.headerView.dorpPriceLabe.text = [NSString stringWithFormat:@"¥%.2f",[self.entity.tagPrice floatValue]];
self.imagesArray = [NSMutableArray arrayWithArray:[self.entity.pictures componentsSeparatedByString:@","]]; self.imagesArray = [NSMutableArray arrayWithArray:[self.entity.pictures componentsSeparatedByString:@","]];
[self.headerView.goodsImageview sd_setImageWithURL:[self.imagesArray firstObject] placeholderImage:REPLACEIMAGE]; [self.headerView.goodsImageview sd_setImageWithURL:[self.imagesArray firstObject] placeholderImage:REPLACEIMAGE];
//商品小图 //商品小图
......
...@@ -110,7 +110,16 @@ ...@@ -110,7 +110,16 @@
self.view.backgroundColor = [UIColor blueColor]; self.view.backgroundColor = [UIColor blueColor];
[self uiConfigAction]; [self uiConfigAction];
[self GetdatasAction]; //扫描二维码结果
if (self.barcode) {
[self barCodeSearchRequest];
}else
{
[self GetdatasAction];
}
} }
...@@ -228,7 +237,7 @@ ...@@ -228,7 +237,7 @@
//分页数据 //分页数据
DataPage *Newpage = [[DataPage alloc]init]; DataPage *Newpage = [[DataPage alloc]init];
Newpage.page = 1; Newpage.page = 1;
Newpage.rows = 10; Newpage.rows = KROWS;
conditon.page = Newpage; conditon.page = Newpage;
self.indexPage = 1; self.indexPage = 1;
//搜索 //搜索
...@@ -257,7 +266,7 @@ ...@@ -257,7 +266,7 @@
}else }else
{ {
Newpage.page = self.indexPage ++; Newpage.page = self.indexPage ++;
Newpage.rows = 10; Newpage.rows = KROWS;
conditon.page = Newpage; conditon.page = Newpage;
//搜索 //搜索
if (_selectedCode) { if (_selectedCode) {
...@@ -273,22 +282,26 @@ ...@@ -273,22 +282,26 @@
#pragma mark 填条形码搜索 #pragma mark 填条形码搜索
- (void)barCodeSearchRequest - (void)barCodeSearchRequest
{ {
if (self.barcode) {
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/goods/getGoodsByCode/",_barcode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/getGoodsByCode/"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
TOGoodsEntity *goods = [[TOGoodsEntity alloc]initWithDictionary:returnValue[@"data"] error:nil];
NSLog(@"%@",goods);
}]; }else
} {
[self promptCustomerWithString:@"查询失败"];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
[self promptCustomerWithString:@"查询失败"];
}];
} }
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
// CGRect cropRect = self.scanRectView.frame; // CGRect cropRect = self.scanRectView.frame;
// CGFloat p1 = size.height/size.width; // CGFloat p1 = size.height/size.width;
// CGFloat p2 = 1920./1080.; //使用1080p的图像输出 // CGFloat p2 = 1920./1080.; //使用1080p的图像输出
output.rectOfInterest = CGRectMake(self.scanRectView.frame.origin.y/ScreenHeight,((ScreenWidth-self.scanRectView.frame.size.width)/2)/ScreenWidth, self.scanRectView.frame.size.height/ScreenHeight, self.scanRectView.frame.size.width/ScreenWidth); output.rectOfInterest = CGRectMake(self.scanRectView.frame.origin.y/ScreenHeight,((ScreenWidth-self.scanRectView.frame.size.width)/2)/ScreenWidth+0.1, self.scanRectView.frame.size.height/ScreenHeight, self.scanRectView.frame.size.width/ScreenWidth);
// //
// CGFloat fixHeight = [UIScreen mainScreen].bounds.size.width * 1920. / 1080.; // CGFloat fixHeight = [UIScreen mainScreen].bounds.size.width * 1920. / 1080.;
......
...@@ -109,20 +109,22 @@ ...@@ -109,20 +109,22 @@
self.SpaceButton.layer.cornerRadius = 10; self.SpaceButton.layer.cornerRadius = 10;
[self.backView addSubview:self.StyleButton]; [self.backView addSubview:self.StyleButton];
[self.backView addSubview:self.SpaceButton]; [self.backView addSubview:self.SpaceButton];
self.indexPage = 1;
//下拉刷新 //下拉刷新
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{ MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
//默认数据 //默认数据
self.indexPage = 1;
SceneCondition *condition = [[SceneCondition alloc]init]; SceneCondition *condition = [[SceneCondition alloc]init];
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = 1; page.page = self.indexPage;
page.rows = 10; page.rows = KROWS;
condition.page = page; condition.page = page;
[self.seceneLibararyCollectionView.mj_footer resetNoMoreData]; [self.seceneLibararyCollectionView.mj_footer resetNoMoreData];
[self getSceneLibrarydatas:condition isRemove:YES]; [self getSceneLibrarydatas:condition isRemove:YES];
}]; }];
headerRefresh.stateLabel.hidden = YES; headerRefresh.stateLabel.hidden = YES;
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.seceneLibararyCollectionView.mj_header = headerRefresh; self.seceneLibararyCollectionView.mj_header = headerRefresh;
...@@ -130,15 +132,15 @@ ...@@ -130,15 +132,15 @@
//上拉加载 //上拉加载
self.seceneLibararyCollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.seceneLibararyCollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
//默认数据
SceneCondition *condition = [[SceneCondition alloc]init];
DataPage *page = [[DataPage alloc]init];
if (self.indexPage ++ > self.totalPages) { if (self.indexPage ++ > self.totalPages) {
[self.seceneLibararyCollectionView.mj_footer endRefreshingWithNoMoreData]; [self.seceneLibararyCollectionView.mj_footer endRefreshingWithNoMoreData];
}else }else
{ {
//默认数据
SceneCondition *condition = [[SceneCondition alloc]init];
DataPage *page = [[DataPage alloc]init];
page.page = self.indexPage ++; page.page = self.indexPage ++;
page.rows = 10; page.rows = KROWS;
condition.page = page; condition.page = page;
[self getSceneLibrarydatas:condition isRemove:NO]; [self getSceneLibrarydatas:condition isRemove:NO];
} }
......
...@@ -74,10 +74,10 @@ ...@@ -74,10 +74,10 @@
CGFloat goodAllprice = 0;//总价格 CGFloat goodAllprice = 0;//总价格
for (TOOrderdetailEntity *model in _goodsArray) { for (TOOrderdetailEntity *model in _goodsArray) {
goodsAllNumber += [model.goodsNum integerValue]; goodsAllNumber += [model.goodsNum integerValue];
goodAllprice += [model.goodsPrice floatValue]; goodAllprice += [model.goodsPrice floatValue]*[model.goodsNum integerValue];
} }
self.goodsAllNumber.text = [NSString stringWithFormat:@"%ld",goodsAllNumber]; self.goodsAllNumber.text = [NSString stringWithFormat:@"%ld",goodsAllNumber];
self.goodsAllPrice.text = [NSString stringWithFormat:@"%.2f元",(goodAllprice*goodsAllNumber)]; self.goodsAllPrice.text = [NSString stringWithFormat:@"¥%.2f",goodAllprice];
} }
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
NSLog(@"获取二维码成功"); NSLog(@"获取二维码成功");
self.zhiFubaoLabe = returnValue[@"data"][@"weixin"]; self.zhiFubaoLabe = returnValue[@"data"][@"zhifubao"];
self.weiXinLabe = returnValue[@"data"][@"zhifubao"]; self.weiXinLabe = returnValue[@"data"][@"weixin"];
}else }else
{ {
...@@ -144,6 +144,7 @@ ...@@ -144,6 +144,7 @@
#pragma mark -微信支付 #pragma mark -微信支付
- (IBAction)WechatButtonClick:(UIButton *)sender { - (IBAction)WechatButtonClick:(UIButton *)sender {
self.showPayQrCodeImageView.hidden = NO;
sender.selected = !sender.selected; sender.selected = !sender.selected;
if (sender.selected) { if (sender.selected) {
...@@ -157,6 +158,7 @@ ...@@ -157,6 +158,7 @@
#pragma mark -支付宝支付 #pragma mark -支付宝支付
- (IBAction)ZhifubaoPayButtonClick:(UIButton *)sender { - (IBAction)ZhifubaoPayButtonClick:(UIButton *)sender {
self.showPayQrCodeImageView.hidden = NO;
sender.selected = !sender.selected; sender.selected = !sender.selected;
if (sender.selected) { if (sender.selected) {
...@@ -213,6 +215,7 @@ ...@@ -213,6 +215,7 @@
- (void)returnCellindexpathwithrow:(NSString *)Type WithcellTitle:(NSString *)title Withselected:(NSInteger)Selected - (void)returnCellindexpathwithrow:(NSString *)Type WithcellTitle:(NSString *)title Withselected:(NSInteger)Selected
{ {
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
self.showPayQrCodeImageView.hidden = YES;
switch (Selected) { switch (Selected) {
case 0://支付方式 case 0://支付方式
{ {
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</connections> </connections>
</button> </button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="evA-uJ-YEb"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="evA-uJ-YEb">
<rect key="frame" x="255" y="143" width="100" height="100"/> <rect key="frame" x="253" y="120" width="120" height="187"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="发票类型:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IOP-zc-e6A"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="发票类型:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IOP-zc-e6A">
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="521" y="319.5"/> <point key="canvasLocation" x="521" y="319"/>
</view> </view>
</objects> </objects>
<resources> <resources>
......
...@@ -170,7 +170,9 @@ ...@@ -170,7 +170,9 @@
address.name = self.recipientPerson.text; address.name = self.recipientPerson.text;
address.miblephone = self.PhoneNumber.text; address.miblephone = self.PhoneNumber.text;
address.city = [self.citySelected currentTitle]; address.city = [self.citySelected currentTitle];
address.province = self.provincesString; if (![self.provincesString isEqualToString:[self.citySelected currentTitle]]) {
address.province = self.provincesString;
}
address.address = self.detailsAddress.text; address.address = self.detailsAddress.text;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
...@@ -244,6 +246,9 @@ ...@@ -244,6 +246,9 @@
address.miblephone = self.PhoneNumber.text; address.miblephone = self.PhoneNumber.text;
address.city = [self.citySelected currentTitle]; address.city = [self.citySelected currentTitle];
address.address = self.detailsAddress.text; address.address = self.detailsAddress.text;
if (![self.provincesString isEqualToString:[self.citySelected currentTitle]]) {
address.province = self.provincesString;
}
address.fid = _model.fid; address.fid = _model.fid;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#import "ChangePasswordViewController.h" #import "ChangePasswordViewController.h"
#import "SearchViewController.h" #import "SearchViewController.h"
#import "ScannerViewController.h" #import "ScannerViewController.h"
#import "BaseViewController.h"
@interface CustomTabbarController ()<TabbarButtonClickdelegate,ChangpasswordDelegate,CancelButtondelegate,UITextFieldDelegate> @interface CustomTabbarController ()<TabbarButtonClickdelegate,ChangpasswordDelegate,CancelButtondelegate,UITextFieldDelegate>
...@@ -269,12 +270,17 @@ ...@@ -269,12 +270,17 @@
ScannerViewController *scannerVC = [[ScannerViewController alloc]init]; ScannerViewController *scannerVC = [[ScannerViewController alloc]init];
[scannerVC setReturnScannerResponse:^(id value) { [scannerVC setReturnScannerResponse:^(id value) {
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:^{
//调用商品控制器
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil]; //调用商品控制器
ProductLibraryViewController *productVC = [storyboard instantiateViewControllerWithIdentifier:@"productlibrary"]; UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil];
productVC.selectedCode = value; ProductLibraryViewController *productVC = [storyboard instantiateViewControllerWithIdentifier:@"productlibrary"];
[self.navigationController pushViewController:productVC animated:YES]; productVC.barcode = value;
// [self.navigationController pushViewController:productVC animated:YES];
BaseViewController *baseVC = [self.vcArray objectAtIndex_opple:self.selectedIndex];
[baseVC.navigationController pushViewController:productVC animated:YES];
}];
}]; }];
[self presentViewController:scannerVC animated:YES completion:nil]; [self presentViewController:scannerVC animated:YES completion:nil];
} }
......
...@@ -184,7 +184,10 @@ ...@@ -184,7 +184,10 @@
#define PASSWORD @"password" #define PASSWORD @"password"
/**
* 网络请求返回个数
*/
#define KROWS 10
......
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