Commit 3db71350 authored by 曹云霄's avatar 曹云霄

优化网络请求、增加导购返利显示、订单查询接口更新、随心配长按删除

parent b5bb53a0
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies> </dependencies>
...@@ -42,29 +42,29 @@ ...@@ -42,29 +42,29 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="发票类型:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Zdn-MM-Xad"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="发票类型:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Zdn-MM-Xad">
<rect key="frame" x="401" y="13" width="70" height="17"/> <rect key="frame" x="367" y="13" width="70" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<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="461" y="13" width="170" height="17"/> <rect key="frame" x="428" y="13" width="170" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<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"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付方式:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="S5V-nq-hin"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="支付方式:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="S5V-nq-hin">
<rect key="frame" x="401" y="43" width="70" height="17"/> <rect key="frame" x="367" y="43" width="70" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<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="461" y="43" width="170" height="17"/> <rect key="frame" x="428" y="43" width="170" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<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"/>
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
{ {
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.rows = KROWS; page.rows = KROWS;
page.page = self.indexPage ++; page.page = self.indexPage;
self.conditionModel.page = page; self.conditionModel.page = page;
[self getShoppersAssociatedCustomer:self.conditionModel isRemove:NO]; [self getShoppersAssociatedCustomer:self.conditionModel isRemove:NO];
} }
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(GETSHOPPERSCONSUMER) WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
self.allCustomerTableview.emptyDataSetSource = self; self.allCustomerTableview.emptyDataSetSource = self;
self.allCustomerTableview.emptyDataSetDelegate = self; self.allCustomerTableview.emptyDataSetDelegate = self;
...@@ -373,9 +373,7 @@ ...@@ -373,9 +373,7 @@
[textField resignFirstResponder]; [textField resignFirstResponder];
self.conditionModel.nameEquals = self.searchTextfield.text; self.conditionModel.nameEquals = self.searchTextfield.text;
self.conditionModel.mobileEquals = self.searchTextfield.text; self.conditionModel.mobileEquals = self.searchTextfield.text;
if (self.searchTextfield.text.length == 0) { if (self.searchTextfield.text.length == 0) {
[self ErrorMBProgressView:@"搜索信息不能为空"]; [self ErrorMBProgressView:@"搜索信息不能为空"];
return YES; return YES;
} }
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
modify.employeeId = [Shoppersmanager manager].Shoppers.employee.fid; modify.employeeId = [Shoppersmanager manager].Shoppers.employee.fid;
//修改密码 //修改密码
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/modifyPassword"] WithRequestType:0 WithParameter:modify WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(MODIFYPASSWORD) WithRequestType:0 WithParameter:modify WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,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 = KROWS; page.rows = KROWS;
condition.page = page; condition.page = page;
[self getShoppersAssociatedCustomer:condition isRemoveArray:NO]; [self getShoppersAssociatedCustomer:condition isRemoveArray:NO];
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(GETSHOPPERSCONSUMER) WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
self.informationTableview.emptyDataSetSource = self; self.informationTableview.emptyDataSetSource = self;
self.informationTableview.emptyDataSetDelegate = self; self.informationTableview.emptyDataSetDelegate = self;
...@@ -414,7 +414,7 @@ ...@@ -414,7 +414,7 @@
{ {
NSData *data = UIImageJPEGRepresentation(image, 0.5); NSData *data = UIImageJPEGRepresentation(image, 0.5);
__weak typeof(self) weskSelf = self; __weak typeof(self) weskSelf = self;
[[NetworkRequestClassManager Manager] UploadImageWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/system/upload"] WithRequestType:1 WithImageDatas:data WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] UploadImageWithURL:SERVERREQUESTURL(UPLOADHEADER) WithRequestType:1 WithImageDatas:data WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weskSelf modifyshoppersInformation:returnValue[@"data"] complete:^{ [weskSelf modifyshoppersInformation:returnValue[@"data"] complete:^{
...@@ -458,7 +458,7 @@ ...@@ -458,7 +458,7 @@
MyclientEntityModel *customerEntity = [[MyclientEntityModel alloc]init]; MyclientEntityModel *customerEntity = [[MyclientEntityModel alloc]init];
customerEntity = [Customermanager manager].model; customerEntity = [Customermanager manager].model;
customerEntity.picture = headerurl; customerEntity.picture = headerurl;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/save"] WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDCONSUMER) WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -498,7 +498,7 @@ ...@@ -498,7 +498,7 @@
- (void)SetupUserRequest - (void)SetupUserRequest
{ {
MyclientEntityModel *model = [Customermanager manager].model; MyclientEntityModel *model = [Customermanager manager].model;
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/consumer/saveLastVisitedTime?consumerId=",model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(SAVEVISITEDTIME),model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
NSLog(@"写入客户访问时间成功"); NSLog(@"写入客户访问时间成功");
...@@ -592,7 +592,7 @@ ...@@ -592,7 +592,7 @@
} }
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/save"] WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDCONSUMER) WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -650,7 +650,7 @@ ...@@ -650,7 +650,7 @@
address.miblephone = self.phoneNumberField.text; address.miblephone = self.phoneNumberField.text;
address.address = self.customerAddress.text; address.address = self.customerAddress.text;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shippingAddress/save"] WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDADDRESS) WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -723,7 +723,7 @@ ...@@ -723,7 +723,7 @@
searchCustomer.mobileEquals = self.searchPersonInformationField.text; searchCustomer.mobileEquals = self.searchPersonInformationField.text;
//request //request
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/consumer/query"] WithRequestType:0 WithParameter:searchCustomer WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(GETSHOPPERSCONSUMER) WithRequestType:0 WithParameter:searchCustomer WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -143,17 +143,13 @@ ...@@ -143,17 +143,13 @@
else if (self.orderRecordButton.selected)//订单记录 else if (self.orderRecordButton.selected)//订单记录
{ {
self.orderRecordPage = 1; self.orderRecordPage = 1;
OrderBill *allOrder = [[OrderBill alloc]init]; OrderFilter *allOrder = [[OrderFilter alloc]init];
//分页 //分页
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = self.orderRecordPage; page.page = self.orderRecordPage;
page.rows = KROWS; page.rows = KROWS;
//订单 allOrder.dp = page;
TOOrderEntity *Neworder = [[TOOrderEntity alloc]init]; allOrder.consumerIdEquals = _model.fid;
Neworder.guideId = [Shoppersmanager manager].Shoppers.employee.fid;
Neworder.consumerId = _model.fid;
allOrder.datapage = page;
allOrder.order = Neworder;
[self getGuideAllcustomerOrder:allOrder isRemove:YES]; [self getGuideAllcustomerOrder:allOrder isRemove:YES];
} }
}]; }];
...@@ -176,7 +172,7 @@ ...@@ -176,7 +172,7 @@
ShopCartFilter *shopcarNumber = [[ShopCartFilter alloc]init]; ShopCartFilter *shopcarNumber = [[ShopCartFilter alloc]init];
shopcarNumber.consumerId = _model.fid; shopcarNumber.consumerId = _model.fid;
DataPage *Newpage = [[DataPage alloc]init]; DataPage *Newpage = [[DataPage alloc]init];
Newpage.page = self.shoppingBagPage++; Newpage.page = self.shoppingBagPage;
Newpage.rows = KROWS; Newpage.rows = KROWS;
shopcarNumber.dp = Newpage; shopcarNumber.dp = Newpage;
[self getShoppingCardata:shopcarNumber isRemove:NO]; [self getShoppingCardata:shopcarNumber isRemove:NO];
...@@ -184,21 +180,17 @@ ...@@ -184,21 +180,17 @@
} }
else if (self.orderRecordButton.selected)//订单记录 else if (self.orderRecordButton.selected)//订单记录
{ {
if (self.orderRecordPage ++ > self.orderRecordTotalPage) { if ( ++self.orderRecordPage > self.orderRecordTotalPage) {
[self.ClientdetailsTableview.mj_footer endRefreshingWithNoMoreData]; [self.ClientdetailsTableview.mj_footer endRefreshingWithNoMoreData];
}else }else
{ {
OrderBill *allOrder = [[OrderBill alloc]init]; OrderFilter *allOrder = [[OrderFilter alloc]init];
//分页 //分页
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = self.orderRecordPage++; page.page = self.orderRecordPage;
page.rows = KROWS; page.rows = KROWS;
//订单 allOrder.dp = page;
TOOrderEntity *Neworder = [[TOOrderEntity alloc]init]; allOrder.consumerIdEquals = _model.fid;
Neworder.guideId = [Shoppersmanager manager].Shoppers.employee.fid;
Neworder.consumerId = _model.fid;
allOrder.datapage = page;
allOrder.order = Neworder;
[self getGuideAllcustomerOrder:allOrder isRemove:NO]; [self getGuideAllcustomerOrder:allOrder isRemove:NO];
} }
} }
...@@ -291,7 +283,7 @@ ...@@ -291,7 +283,7 @@
- (void)getShoppingCardata:(ShopCartFilter *)shopCar isRemove:(BOOL)remove - (void)getShoppingCardata:(ShopCartFilter *)shopCar isRemove:(BOOL)remove
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/query"] WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SHOPPINGBAG) WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) {
[self endRefreshingForTableView:self.ClientdetailsTableview]; [self endRefreshingForTableView:self.ClientdetailsTableview];
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
...@@ -341,10 +333,10 @@ ...@@ -341,10 +333,10 @@
#pragma mark -获取客户订单数据 #pragma mark -获取客户订单数据
- (void)getGuideAllcustomerOrder:(OrderBill *)allOrder isRemove:(BOOL)remove - (void)getGuideAllcustomerOrder:(OrderFilter *)allOrder isRemove:(BOOL)remove
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/query"] WithRequestType:0 WithParameter:allOrder WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(QUERYORDER) WithRequestType:0 WithParameter:allOrder WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
[self endRefreshingForTableView:self.ClientdetailsTableview]; [self endRefreshingForTableView:self.ClientdetailsTableview];
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
self.customerName.text = _model.consumer.name; self.customerName.text = _model.consumer.name;
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:_model.consumer.picture] placeholderImage:ReplaceImage]; [self.customerHeader sd_setImageWithURL:[NSURL URLWithString:_model.consumer.picture] placeholderImage:ReplaceImage];
self.orderStatus.text = _model.order.orderState; self.orderStatus.text = _model.order.orderState;
//self.styleNumber.text = _model.order.goodsNum;
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.phoneNumber.text = _model.consumer.mobile; self.phoneNumber.text = _model.consumer.mobile;
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
/** /**
* 上传参数模型 * 上传参数模型
*/ */
@property (nonatomic,strong) OrderBill *model; @property (nonatomic,strong) OrderFilter *model;
......
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
return _orderStateArray; return _orderStateArray;
} }
- (OrderBill *)model - (OrderFilter *)model
{ {
if (!_model) { if (!_model) {
_model = [[OrderBill alloc]init]; _model = [[OrderFilter alloc]init];
} }
return _model; return _model;
} }
...@@ -96,10 +96,8 @@ ...@@ -96,10 +96,8 @@
self.StyleButton.layer.masksToBounds = YES; self.StyleButton.layer.masksToBounds = YES;
self.StyleButton.layer.cornerRadius = 10; self.StyleButton.layer.cornerRadius = 10;
[self.orderStateBackView addSubview:self.StyleButton]; [self.orderStateBackView addSubview:self.StyleButton];
//导购id //经销商代码
TOOrderEntity *Neworder = [[TOOrderEntity alloc]init]; self.model.resellerCodeEquals = [[Shoppersmanager manager].Shoppers.employee.currentDepart orgCode];
Neworder.guideId = [Shoppersmanager manager].Shoppers.employee.fid;
self.model.order = Neworder;
//下拉刷新 //下拉刷新
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{ MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
...@@ -108,7 +106,7 @@ ...@@ -108,7 +106,7 @@
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = weakSelf.indexPage; page.page = weakSelf.indexPage;
page.rows = KROWS; page.rows = KROWS;
weakSelf.model.datapage = page; weakSelf.model.dp = page;
[weakSelf.customerOrderTableView.mj_footer resetNoMoreData]; [weakSelf.customerOrderTableView.mj_footer resetNoMoreData];
[weakSelf getGuideAllcustomerOrder:YES WithorderBill:weakSelf.model]; [weakSelf getGuideAllcustomerOrder:YES WithorderBill:weakSelf.model];
}]; }];
...@@ -124,10 +122,10 @@ ...@@ -124,10 +122,10 @@
}else }else
{ {
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = weakSelf.indexPage ++; page.page = weakSelf.indexPage;
page.rows = KROWS; page.rows = KROWS;
weakSelf.model.datapage = page; weakSelf.model.dp = page;
Neworder.orderState = weakSelf.currentState; self.model.orderStateEquals = weakSelf.currentState;
[weakSelf getGuideAllcustomerOrder:NO WithorderBill:weakSelf.model]; [weakSelf getGuideAllcustomerOrder:NO WithorderBill:weakSelf.model];
} }
}]; }];
...@@ -135,11 +133,11 @@ ...@@ -135,11 +133,11 @@
#pragma mark -获取导购下客户订单 ----isdelecte 表示是否清空数组 #pragma mark -获取导购下客户订单 ----isdelecte 表示是否清空数组
- (void)getGuideAllcustomerOrder:(BOOL)isdelecte WithorderBill:(OrderBill *)allOrder - (void)getGuideAllcustomerOrder:(BOOL)isdelecte WithorderBill:(OrderFilter *)allOrder
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/query"] WithRequestType:0 WithParameter:allOrder WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(QUERYORDER) WithRequestType:0 WithParameter:allOrder WithReturnValueBlock:^(id returnValue) {
self.customerOrderTableView.emptyDataSetSource = self; self.customerOrderTableView.emptyDataSetSource = self;
self.customerOrderTableView.emptyDataSetDelegate = self; self.customerOrderTableView.emptyDataSetDelegate = self;
...@@ -283,9 +281,8 @@ ...@@ -283,9 +281,8 @@
else if ([title isEqualToString:@"已退货"]) { else if ([title isEqualToString:@"已退货"]) {
orderState = @"004"; orderState = @"004";
} }
self.model.order.orderState = orderState; self.model.consumerNameOrMobileEquals = nil;
self.model.consumer.name = nil; self.model.orderStateEquals = orderState;
self.model.consumer.mobile = nil;
[self.customerOrderTableView.mj_header beginRefreshing]; [self.customerOrderTableView.mj_header beginRefreshing];
} }
...@@ -295,11 +292,8 @@ ...@@ -295,11 +292,8 @@
- (BOOL)textFieldShouldReturn:(UITextField *)textField - (BOOL)textFieldShouldReturn:(UITextField *)textField
{ {
[textField resignFirstResponder]; [textField resignFirstResponder];
TOConsumerEntity *consumer = [[TOConsumerEntity alloc]init]; self.model.consumerNameOrMobileEquals = textField.text;
consumer.name = textField.text; self.model.orderStateEquals = nil;
consumer.mobile = textField.text;
self.model.consumer = consumer;
self.model.order.orderState = nil;
[self.customerOrderTableView.mj_header beginRefreshing]; [self.customerOrderTableView.mj_header beginRefreshing];
return YES; return YES;
} }
...@@ -319,7 +313,7 @@ ...@@ -319,7 +313,7 @@
[weakSelf CreateMBProgressHUDLoding]; [weakSelf CreateMBProgressHUDLoding];
OrderBill *model = [weakSelf.datasArray objectAtIndex_opple:cellindex]; OrderBill *model = [weakSelf.datasArray objectAtIndex_opple:cellindex];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@/%@/%@",ServerAddress,@"/order/updateOrderState/",model.order.orderNumber,model.order.orderState,@"005"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@/%@/%@",SERVERREQUESTURL(RESETORDER),model.order.orderNumber,model.order.orderState,@"005"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[weakSelf dismissViewControllerAnimated:YES completion:nil]; [weakSelf dismissViewControllerAnimated:YES completion:nil];
[weakSelf RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
......
...@@ -164,12 +164,10 @@ ...@@ -164,12 +164,10 @@
- (void)judgeUserNameAndPassword - (void)judgeUserNameAndPassword
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
NSString *URL = [NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/login"];
LoginInfo *login = [[LoginInfo alloc]init]; LoginInfo *login = [[LoginInfo alloc]init];
login.username = self.userName.text; login.username = self.userName.text;
login.password = self.passWord.text; login.password = self.passWord.text;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(LOGIN) WithRequestType:0 WithParameter:login WithReturnValueBlock:^(id returnValue) {
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:URL WithRequestType:0 WithParameter:login WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -258,9 +256,8 @@ ...@@ -258,9 +256,8 @@
selectedIndex = 1; selectedIndex = 1;
CustomerOrderViewController *customerVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:1]; CustomerOrderViewController *customerVC = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:1];
customerVC.searchCustomerOrder.text = nil; customerVC.searchCustomerOrder.text = nil;
customerVC.model.consumer.name = nil; customerVC.model.consumerNameOrMobileEquals = nil;
customerVC.model.consumer.mobile = nil; customerVC.model.orderStateEquals = nil;
customerVC.model.order.orderState = nil;
[customerVC.customerOrderTableView.mj_header beginRefreshing]; [customerVC.customerOrderTableView.mj_header beginRefreshing];
}else if ([Name isEqualToString:@"关于"]) }else if ([Name isEqualToString:@"关于"])
{ {
...@@ -317,7 +314,7 @@ ...@@ -317,7 +314,7 @@
} }
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
//发送验证码 //发送验证码
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@/system/sendSms?mobilephone=%@&username=%@",ServerAddress,inputPhoneNumber,self.identityView.userName.text] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(SENDSMS),self.identityView.userName.text] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -431,7 +428,7 @@ ...@@ -431,7 +428,7 @@
passwrod.username = self.userName.text; passwrod.username = self.userName.text;
passwrod.smsCode = self.identityView.verificationCode.text; passwrod.smsCode = self.identityView.verificationCode.text;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/resetPassword"] WithRequestType:0 WithParameter:passwrod WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(RESETPASSWORD) WithRequestType:0 WithParameter:passwrod WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
- (void)getOrderDetailsData - (void)getOrderDetailsData
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/order/findOrder/",self.orderCode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(ORDERDETAILS),self.orderCode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -417,7 +417,7 @@ ...@@ -417,7 +417,7 @@
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/order/urlOfprintPDF/",_orderCode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(DOWNLOADPDF),_orderCode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
NSString *url = [NSString stringWithFormat:@"%@",returnValue[@"data"]]; NSString *url = [NSString stringWithFormat:@"%@",returnValue[@"data"]];
...@@ -462,7 +462,7 @@ ...@@ -462,7 +462,7 @@
[alertVC addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) [alertVC addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action)
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@/%@/%@",ServerAddress,@"/order/updateOrderState/",_orderCode,@"001",@"005"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@/%@/%@",SERVERREQUESTURL(RESETORDER),_orderCode,@"001",@"005"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
- (void)setModel:(TOConsumerEntity *)model - (void)setModel:(TOConsumerEntity *)model
{ {
_model = model; _model = model;
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:_model.picture] placeholderImage:REPLACEIMAGE]; [self.customerHeader sd_setImageWithURL:[NSURL URLWithString:[Customermanager manager].model.picture] placeholderImage:ReplaceImage];
self.customerName.text = _model.name; self.customerName.text = _model.name;
self.companyName.text = _model.company; self.companyName.text = _model.company;
self.customerAddress.text = _model.address; self.customerAddress.text = _model.address;
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
NSString *url = [NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/goods/getGoods/",_goodsID]; NSString *url = [NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(GOODSDETAILS),_goodsID];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:url WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:url WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
...@@ -467,7 +467,7 @@ ...@@ -467,7 +467,7 @@
shopCar.consumerId = [Customermanager manager].model.fid; shopCar.consumerId = [Customermanager manager].model.fid;
shopCar.goodsId = _goodsID; shopCar.goodsId = _goodsID;
shopCar.count = self.headerView.goodsNumber.text; shopCar.count = self.headerView.goodsNumber.text;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/save"] WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDSHOPPINGBAG) WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
{ {
//分页数据 //分页数据
DataPage *Newpage = [[DataPage alloc]init]; DataPage *Newpage = [[DataPage alloc]init];
Newpage.page = self.indexPage ++; Newpage.page = self.indexPage;
Newpage.rows = KROWS; Newpage.rows = KROWS;
self.condtionModel.page = Newpage; self.condtionModel.page = Newpage;
//搜索 //搜索
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
{ {
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/getGoodsFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(PRODUCTSCREENING) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (remove) { if (remove) {
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/query"] WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(PRODUCTLIST) WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
[self endRefreshingForTableView:self.collectionView]; [self endRefreshingForTableView:self.collectionView];
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
- (void)getScreeningdatasisRemoveArray:(BOOL)remove - (void)getScreeningdatasisRemoveArray:(BOOL)remove
{ {
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/getGoodsFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(PRODUCTSCREENING) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
- (void)getGoodsListdatas:(GoodsCondition *)conditon returnResponse:(void(^)(GoodsResponse *))finish - (void)getGoodsListdatas:(GoodsCondition *)conditon returnResponse:(void(^)(GoodsResponse *))finish
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/query"] WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(PRODUCTLIST) WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) {
self.productCollectionView.emptyDataSetSource = self; self.productCollectionView.emptyDataSetSource = self;
self.productCollectionView.emptyDataSetDelegate = self; self.productCollectionView.emptyDataSetDelegate = self;
...@@ -300,7 +300,7 @@ ...@@ -300,7 +300,7 @@
{ {
//分页数据 //分页数据
DataPage *Newpage = [[DataPage alloc]init]; DataPage *Newpage = [[DataPage alloc]init];
Newpage.page = weakSelf.indexPage ++; Newpage.page = weakSelf.indexPage;
Newpage.rows = KROWS; Newpage.rows = KROWS;
weakSelf.condtionModel.page = Newpage; weakSelf.condtionModel.page = Newpage;
//搜索 //搜索
...@@ -350,7 +350,7 @@ ...@@ -350,7 +350,7 @@
- (void)barCodeSearchRequest - (void)barCodeSearchRequest
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/goods/getGoodsByCode/",_barcode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(BARCODESEARCH),_barcode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self endRefreshingForTableView:self.productCollectionView]; [self endRefreshingForTableView:self.productCollectionView];
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
...@@ -745,7 +745,7 @@ ...@@ -745,7 +745,7 @@
shopCar.consumerId = [Customermanager manager].model.fid; shopCar.consumerId = [Customermanager manager].model.fid;
shopCar.goodsId = model.fid; shopCar.goodsId = model.fid;
shopCar.count = @"1"; shopCar.count = @"1";
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/save"] WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDSHOPPINGBAG) WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -17,9 +17,20 @@ ...@@ -17,9 +17,20 @@
@interface RightViewController ()<UITableViewDataSource,UITableViewDelegate> @interface RightViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong) UITableView *rightTableview; @property (nonatomic,strong) UITableView *rightTableview;
/**
* 数据源
*/
@property (nonatomic,strong) NSMutableArray *dataArray; @property (nonatomic,strong) NSMutableArray *dataArray;
/**
* 图片数组
*/
@property (nonatomic,strong) NSArray *imageArray; @property (nonatomic,strong) NSArray *imageArray;
/**
* 是否开启
*/
@property (nonatomic,assign) BOOL isOpen; @property (nonatomic,assign) BOOL isOpen;
@end @end
...@@ -70,8 +81,8 @@ ...@@ -70,8 +81,8 @@
self.rightTableview.delegate = self; self.rightTableview.delegate = self;
self.rightTableview.dataSource = self; self.rightTableview.dataSource = self;
[self.view addSubview:self.rightTableview]; [self.view addSubview:self.rightTableview];
self.rightTableview.tableFooterView = [UIView new];
self.rightTableview.separatorStyle = UITableViewCellSeparatorStyleNone; self.rightTableview.separatorStyle = UITableViewCellSeparatorStyleNone;
self.rightTableview.tableFooterView = [UIView new];
[self.rightTableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"rightcell"]; [self.rightTableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"rightcell"];
[self createHeaderview]; [self createHeaderview];
} }
...@@ -101,7 +112,6 @@ ...@@ -101,7 +112,6 @@
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"rightcell" forIndexPath:indexPath]; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"rightcell" forIndexPath:indexPath];
cell.textLabel.text = [self.dataArray objectAtIndex_opple:indexPath.row]; cell.textLabel.text = [self.dataArray objectAtIndex_opple:indexPath.row];
if (self.isOpen && ([cell.textLabel.text isEqualToString:@"所有客户"] || [cell.textLabel.text isEqualToString:@"客户订单"])) { if (self.isOpen && ([cell.textLabel.text isEqualToString:@"所有客户"] || [cell.textLabel.text isEqualToString:@"客户订单"])) {
cell.backgroundColor = kMainBlueColor; cell.backgroundColor = kMainBlueColor;
} }
else else
...@@ -118,7 +128,6 @@ ...@@ -118,7 +128,6 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
// [tableView deselectRowAtIndexPath:indexPath animated:YES];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
if ([cell.textLabel.text isEqualToString:@"客户管理"] ) { if ([cell.textLabel.text isEqualToString:@"客户管理"] ) {
...@@ -137,12 +146,9 @@ ...@@ -137,12 +146,9 @@
{ {
//收起右侧控制器 //收起右侧控制器
[SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:^(BOOL finished) { [SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:^(BOOL finished) {
[self recoveryCell]; [self recoveryCell];
}]; }];
if ([self.delegate respondsToSelector:@selector(SelectedControllerWithIndex:)]) { if ([self.delegate respondsToSelector:@selector(SelectedControllerWithIndex:)]) {
[self.delegate SelectedControllerWithIndex:[self.dataArray objectAtIndex_opple:indexPath.row]]; [self.delegate SelectedControllerWithIndex:[self.dataArray objectAtIndex_opple:indexPath.row]];
} }
} }
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
{ {
//默认数据 //默认数据
DataPage *Newpage = [[DataPage alloc]init]; DataPage *Newpage = [[DataPage alloc]init];
Newpage.page = self.indexPage ++; Newpage.page = self.indexPage;
Newpage.rows = KROWS; Newpage.rows = KROWS;
self.conditionModel.page = Newpage; self.conditionModel.page = Newpage;
[self getSceneLibrarydatas:self.conditionModel isRemove:NO]; [self getSceneLibrarydatas:self.conditionModel isRemove:NO];
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
#pragma mark -获取场景筛选数据 #pragma mark -获取场景筛选数据
- (void)getdatasAction - (void)getdatasAction
{ {
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/getSceneFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SCENESCREENING) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -187,14 +187,13 @@ ...@@ -187,14 +187,13 @@
- (void)getSceneLibrarydatas:(SceneCondition *)condition isRemove:(BOOL)remove - (void)getSceneLibrarydatas:(SceneCondition *)condition isRemove:(BOOL)remove
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/query"] WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SCENELIST) WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
self.seceneLibararyCollectionView.emptyDataSetSource = self; self.seceneLibararyCollectionView.emptyDataSetSource = self;
self.seceneLibararyCollectionView.emptyDataSetDelegate = self; self.seceneLibararyCollectionView.emptyDataSetDelegate = self;
[self endRefreshingForTableView:self.seceneLibararyCollectionView]; [self endRefreshingForTableView:self.seceneLibararyCollectionView];
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (remove) { if (remove) {
[self.responseArray removeAllObjects]; [self.responseArray removeAllObjects];
} }
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
- (void)getHotSearchdatas - (void)getHotSearchdatas
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/hottag/getHotTag"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(HOTSEARCH) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
{ {
//默认数据 //默认数据
DataPage *Newpage = [[DataPage alloc]init]; DataPage *Newpage = [[DataPage alloc]init];
Newpage.page = self.indexPage ++; Newpage.page = self.indexPage;
Newpage.rows = KROWS; Newpage.rows = KROWS;
self.conditionModel.page = Newpage; self.conditionModel.page = Newpage;
[self getSceneLibrarydatas:self.conditionModel isRemove:NO]; [self getSceneLibrarydatas:self.conditionModel isRemove:NO];
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
- (void)getdatasAction - (void)getdatasAction
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/getSceneFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SCENESCREENING) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
- (void)getSceneLibrarydatas:(SceneCondition *)condition isRemove:(BOOL)remove - (void)getSceneLibrarydatas:(SceneCondition *)condition isRemove:(BOOL)remove
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/query"] WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SCENELIST) WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
[self endRefreshingForTableView:self.collectionView]; [self endRefreshingForTableView:self.collectionView];
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
#pragma mark -获取经营者支付二维码 #pragma mark -获取经营者支付二维码
- (void)getPayQrCode - (void)getPayQrCode
{ {
[[NetworkRequestClassManager Manager ] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/getReseller"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager ] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(QRCODE) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
order.isbill = @"N"; order.isbill = @"N";
} }
//发票类型 //发票类型
if ([self.invoiceType.currentTitle isEqualToString:@"公司发票"]) { if ([self.invoiceType.currentTitle isEqualToString:@"公司发票"] && [order.isbill isEqualToString:@"Y"]) {
order.billType = @"002"; order.billType = @"002";
if (self.invoiceHeader.text.length == 0 || !self.invoiceHeader.text) { if (self.invoiceHeader.text.length == 0 || !self.invoiceHeader.text) {
...@@ -318,12 +318,12 @@ ...@@ -318,12 +318,12 @@
return; return;
} }
order.billTitle = self.invoiceHeader.text; order.billTitle = self.invoiceHeader.text;
}else if ([self.invoiceType.currentTitle isEqualToString:@"个人发票"]) }else if ([self.invoiceType.currentTitle isEqualToString:@"个人发票"] && [order.isbill isEqualToString:@"Y"])
{ {
order.billType = @"001"; order.billType = @"001";
} }
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/payOrder"] WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(CONFIRMPAY) WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
NSDictionary *parameterDict = [NSDictionary dictionaryWithObjectsAndKeys:self.goodsIDs,@"goodsIds",@"",@"title",@"",@"remark",nil]; NSDictionary *parameterDict = [NSDictionary dictionaryWithObjectsAndKeys:self.goodsIDs,@"goodsIds",@"",@"title",@"",@"remark",nil];
//上传图片 //上传图片
[[NetworkRequestClassManager Manager] UploadImageWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/system/shareGoods"] WithRequestType:0 WithImageDatas:imageData WithParameter:parameterDict WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] UploadImageWithURL:SERVERREQUESTURL(SHARE) WithRequestType:0 WithImageDatas:imageData WithParameter:parameterDict WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
- (void)addGoodsShoppingbags:(SaveShoppingCartRequest *)shopCar complate:(void(^)())response - (void)addGoodsShoppingbags:(SaveShoppingCartRequest *)shopCar complate:(void(^)())response
{ {
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/save"] WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDSHOPPINGBAG) WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
address.address = self.detailsAddress.text; address.address = self.detailsAddress.text;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shippingAddress/save"] WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDADDRESS) WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
address.fid = self.model.fid; address.fid = self.model.fid;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shippingAddress/update"] WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(CHANGEADDRESS) WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
- (void)deleteAddressButtonClick - (void)deleteAddressButtonClick
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/shippingAddress/remove/",_model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(REMOVEADDRESS),_model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
- (void)getAddressDatasRequest - (void)getAddressDatasRequest
{ {
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/shippingAddress/listAddress/",[Customermanager manager].model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(SHIPPINGADDRESS),[Customermanager manager].model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -396,7 +396,7 @@ ...@@ -396,7 +396,7 @@
orderGoods.goodsSpec = model.goods.spec; orderGoods.goodsSpec = model.goods.spec;
orderGoods.goodsName = model.goods.name; orderGoods.goodsName = model.goods.name;
orderGoods.goodsBrand = model.goods.brandId; orderGoods.goodsBrand = model.goods.brandId;
orderGoods.goodsNum = [NSString stringWithFormat:@"%d",model.goodsNum]; orderGoods.goodsNum = [NSString stringWithFormat:@"%ld",(long)model.goodsNum];
orderGoods.goodsPrice = model.costPrice; orderGoods.goodsPrice = model.costPrice;
orderGoods.remark = model.goods.spec; orderGoods.remark = model.goods.spec;
orderGoods.goodsUnit = model.goods.unit; orderGoods.goodsUnit = model.goods.unit;
...@@ -414,7 +414,7 @@ ...@@ -414,7 +414,7 @@
orderReceiver.goodsNum = [NSString stringWithFormat:@"%ld",allNumber]; orderReceiver.goodsNum = [NSString stringWithFormat:@"%ld",allNumber];
order.orderdetailList = (NSArray<TOOrderdetailEntity> *)goodidArr; order.orderdetailList = (NSArray<TOOrderdetailEntity> *)goodidArr;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/save"] WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(CREATEORDER) WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
//商品购物车id //商品购物车id
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
Newpage.rows = 99999; Newpage.rows = 99999;
shopcarNumber.dp = Newpage; shopcarNumber.dp = Newpage;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/query"] WithRequestType:0 WithParameter:shopcarNumber WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SHOPPINGBAG) WithRequestType:0 WithParameter:shopcarNumber WithReturnValueBlock:^(id returnValue) {
self.shoppingTableview.emptyDataSetSource = self; self.shoppingTableview.emptyDataSetSource = self;
[self endRefreshingForTableView:self.shoppingTableview]; [self endRefreshingForTableView:self.shoppingTableview];
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
DeleteCartRequest *delecteGoods = [[DeleteCartRequest alloc]init]; DeleteCartRequest *delecteGoods = [[DeleteCartRequest alloc]init];
delecteGoods.cartIds = goodsCode; delecteGoods.cartIds = goodsCode;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/delete"] WithRequestType:0 WithParameter:delecteGoods WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(REMOVESHOPPINGBAG) WithRequestType:0 WithParameter:delecteGoods WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
return; return;
} }
delecteGoods.cartIds = codeArr; delecteGoods.cartIds = codeArr;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/delete"] WithRequestType:0 WithParameter:delecteGoods WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(REMOVESHOPPINGBAG) WithRequestType:0 WithParameter:delecteGoods WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -414,7 +414,7 @@ ...@@ -414,7 +414,7 @@
NSString *costpriceString = [NSString stringWithFormat:@"%.2f",costprice]; NSString *costpriceString = [NSString stringWithFormat:@"%.2f",costprice];
//商品数量 //商品数量
NSString *goodsNumberString = [NSString stringWithFormat:@"%d",goodsNumber]; NSString *goodsNumberString = [NSString stringWithFormat:@"%d",goodsNumber];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@/%@/%@/%@",ServerAddress,@"/shopcart/updateCostPrice/",carid,goodsis,costpriceString,goodsNumberString] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@/%@/%@/%@",SERVERREQUESTURL(CHANGESHOPPINGBAGNUMBERPRICE),carid,goodsis,costpriceString,goodsNumberString] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
{ {
UserViewController *userVC = [[UserViewController alloc]init]; UserViewController *userVC = [[UserViewController alloc]init];
userVC.delegate = self; userVC.delegate = self;
userVC.preferredContentSize = CGSizeMake(260, 170); userVC.preferredContentSize = CGSizeMake(260, 230);
userVC.modalPresentationStyle = UIModalPresentationPopover; userVC.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *pop = userVC.popoverPresentationController; UIPopoverPresentationController *pop = userVC.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
...@@ -233,8 +233,7 @@ ...@@ -233,8 +233,7 @@
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = changpassword.view; pop.sourceView = changpassword.view;
pop.barButtonItem = [[UIBarButtonItem alloc]initWithCustomView:_Newbutton]; pop.barButtonItem = [[UIBarButtonItem alloc]initWithCustomView:_Newbutton];
[self presentViewController:changpassword animated:YES completion:nil]; [self presentViewController:changpassword animated:NO completion:nil];
}]; }];
} }
...@@ -247,7 +246,7 @@ ...@@ -247,7 +246,7 @@
UserViewController *userVC = [[UserViewController alloc]init]; UserViewController *userVC = [[UserViewController alloc]init];
userVC.delegate = self; userVC.delegate = self;
userVC.preferredContentSize = CGSizeMake(260, 170); userVC.preferredContentSize = CGSizeMake(260, 230);
userVC.modalPresentationStyle = UIModalPresentationPopover; userVC.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *pop = userVC.popoverPresentationController; UIPopoverPresentationController *pop = userVC.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
......
...@@ -73,6 +73,36 @@ ...@@ -73,6 +73,36 @@
@property (weak, nonatomic) IBOutlet UIView *passWordBack; @property (weak, nonatomic) IBOutlet UIView *passWordBack;
/**
* 返利余额背景
*/
@property (weak, nonatomic) IBOutlet UIView *rebateBackView;
/**
* 返利余额
*/
@property (weak, nonatomic) IBOutlet UILabel *rebateLabe;
@end @end
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
// Do any additional setup after loading the view from its nib. // Do any additional setup after loading the view from its nib.
[self uiConfigAction]; [self uiConfigAction];
[self queryShoppersCommission];
} }
#pragma mark -UI #pragma mark -UI
...@@ -43,6 +44,11 @@ ...@@ -43,6 +44,11 @@
self.changePassword.layer.cornerRadius = kCornerRadius; self.changePassword.layer.cornerRadius = kCornerRadius;
self.changePassword.layer.borderWidth = 0.5; self.changePassword.layer.borderWidth = 0.5;
self.changePassword.layer.borderColor = kMainBlueColor.CGColor; self.changePassword.layer.borderColor = kMainBlueColor.CGColor;
self.rebateBackView.layer.masksToBounds = YES;
self.rebateBackView.layer.borderWidth = 1.0f;
self.rebateBackView.layer.borderColor = kMainBlueColor.CGColor;
self.rebateBackView.layer.cornerRadius = 20;
[self.rebateBackView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(rebateViewClickAction:)]];
self.userName.text = [Shoppersmanager manager].userNameString; self.userName.text = [Shoppersmanager manager].userNameString;
self.passWord.text = [Shoppersmanager manager].passWordString; self.passWord.text = [Shoppersmanager manager].passWordString;
self.userHeader.userInteractionEnabled = YES; self.userHeader.userInteractionEnabled = YES;
...@@ -51,6 +57,26 @@ ...@@ -51,6 +57,26 @@
[self.userHeader addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(userHeaderClickAction:)]]; [self.userHeader addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(userHeaderClickAction:)]];
} }
#pragma mark -查询返利金额
- (void)queryShoppersCommission
{
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(SHOPPERSCOMMISSION),[Shoppersmanager manager].Shoppers.employee.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) {
self.rebateLabe.text = [NSString stringWithFormat:@"¥%@",returnValue[@"data"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
}];
}
#pragma mark -返利余额点击
- (void)rebateViewClickAction:(UITapGestureRecognizer *)tap
{
NSLog(@"点击");
}
#pragma mark -用户头像点击 #pragma mark -用户头像点击
- (void)userHeaderClickAction:(UITapGestureRecognizer *)tap - (void)userHeaderClickAction:(UITapGestureRecognizer *)tap
{ {
...@@ -107,7 +133,7 @@ ...@@ -107,7 +133,7 @@
- (void)uploadUserHeader:(UIImage *)image completeBlock:(void(^)(NSString *string))complete - (void)uploadUserHeader:(UIImage *)image completeBlock:(void(^)(NSString *string))complete
{ {
NSData *data = UIImageJPEGRepresentation(image, 0.5); NSData *data = UIImageJPEGRepresentation(image, 0.5);
[[NetworkRequestClassManager Manager] UploadImageWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/system/upload"] WithRequestType:1 WithImageDatas:data WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] UploadImageWithURL:SERVERREQUESTURL(UPLOADHEADER) WithRequestType:1 WithImageDatas:data WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
[self modifyshoppersInformation:returnValue[@"data"] complete:^{ [self modifyshoppersInformation:returnValue[@"data"] complete:^{
...@@ -151,7 +177,7 @@ ...@@ -151,7 +177,7 @@
RsEmployeeRequest *employ = [[RsEmployeeRequest alloc]init]; RsEmployeeRequest *employ = [[RsEmployeeRequest alloc]init];
employ.employee = [Shoppersmanager manager].Shoppers.employee; employ.employee = [Shoppersmanager manager].Shoppers.employee;
employ.employee.picture = headerurl; employ.employee.picture = headerurl;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/updateEmployee"] WithRequestType:0 WithParameter:employ WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(MODITYSHOPPERSINFORMATION) WithRequestType:0 WithParameter:employ WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -174,11 +200,8 @@ ...@@ -174,11 +200,8 @@
#pragma mark -修改密码 #pragma mark -修改密码
- (IBAction)ChangPasswordButtonClick:(UIButton *)sender { - (IBAction)ChangPasswordButtonClick:(UIButton *)sender {
if ([self.delegate respondsToSelector:@selector(changPasswordButtonClick)]) { if ([self.delegate respondsToSelector:@selector(changPasswordButtonClick)]) {
[self.delegate changPasswordButtonClick]; [self.delegate changPasswordButtonClick];
} }
} }
...@@ -195,7 +218,7 @@ ...@@ -195,7 +218,7 @@
[alertVC addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { [alertVC addAction:[UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
[weakSelf CreateMBProgressHUDLoding]; [weakSelf CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/logout"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(CANCELLOGIN) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[weakSelf RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -259,12 +282,11 @@ ...@@ -259,12 +282,11 @@
} }
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
NSString *URL = [NSString stringWithFormat:@"%@%@",ServerAddress,@"/employee/login"];
LoginInfo *login = [[LoginInfo alloc]init]; LoginInfo *login = [[LoginInfo alloc]init];
login.username = self.userName.text; login.username = self.userName.text;
login.password = self.passWord.text; login.password = self.passWord.text;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:URL WithRequestType:0 WithParameter:login WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(LOGIN) WithRequestType:0 WithParameter:login WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies> </dependencies>
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
<outlet property="changePassword" destination="MmS-T7-ieX" id="FlY-Na-P0f"/> <outlet property="changePassword" destination="MmS-T7-ieX" id="FlY-Na-P0f"/>
<outlet property="passWord" destination="iPT-ib-2cp" id="H67-mf-uqf"/> <outlet property="passWord" destination="iPT-ib-2cp" id="H67-mf-uqf"/>
<outlet property="passWordBack" destination="6JT-hH-lKv" id="af3-IA-3s3"/> <outlet property="passWordBack" destination="6JT-hH-lKv" id="af3-IA-3s3"/>
<outlet property="rebateBackView" destination="3Kh-CF-MvS" id="dhv-OU-Rc9"/>
<outlet property="rebateLabe" destination="Rhj-kj-q1f" id="5oU-hl-I1A"/>
<outlet property="switchUser" destination="7l0-kF-pfD" id="vc3-Kf-zAK"/> <outlet property="switchUser" destination="7l0-kF-pfD" id="vc3-Kf-zAK"/>
<outlet property="userHeader" destination="tuQ-DW-D80" id="aWE-cf-oQH"/> <outlet property="userHeader" destination="tuQ-DW-D80" id="aWE-cf-oQH"/>
<outlet property="userName" destination="cgR-tl-g1N" id="qeK-vw-Mf8"/> <outlet property="userName" destination="cgR-tl-g1N" id="qeK-vw-Mf8"/>
...@@ -19,7 +21,7 @@ ...@@ -19,7 +21,7 @@
</placeholder> </placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="260" height="170"/> <rect key="frame" x="0.0" y="0.0" width="260" height="230"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="矢量智能对象" id="tuQ-DW-D80"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="矢量智能对象" id="tuQ-DW-D80">
...@@ -98,15 +100,39 @@ ...@@ -98,15 +100,39 @@
</subviews> </subviews>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</view> </view>
<view contentMode="scaleToFill" id="NsN-9d-1WJ">
<rect key="frame" x="10" y="166" width="240" height="1"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.81568627450980391" green="0.81960784313725488" blue="0.82352941176470584" alpha="1" colorSpace="calibratedRGB"/>
</view>
<view contentMode="scaleToFill" id="3Kh-CF-MvS">
<rect key="frame" x="20" y="175" width="220" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="¥-副本" id="7AA-eS-ui1">
<rect key="frame" x="46" y="5" width="30" height="30"/>
<autoresizingMask key="autoresizingMask"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Rhj-kj-q1f">
<rect key="frame" x="81" y="10" width="94" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.98431372549019602" green="0.32941176470588235" blue="0.12549019607843137" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.94117647058823528" green="0.93725490196078431" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</view>
</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="244" y="296"/> <point key="canvasLocation" x="244" y="328"/>
</view> </view>
</objects> </objects>
<resources> <resources>
<image name="Lock-0" width="17" height="21"/> <image name="Lock-0" width="17" height="21"/>
<image name="User-Profile" width="17" height="17"/> <image name="User-Profile" width="17" height="17"/>
<image name="¥-副本" width="35" height="35"/>
<image name="矢量智能对象" width="110" height="110"/> <image name="矢量智能对象" width="110" height="110"/>
</resources> </resources>
</document> </document>
...@@ -91,6 +91,8 @@ ...@@ -91,6 +91,8 @@
29807C651CD20F0F00F111B8 /* StoryboardwithCYX.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29807C641CD20F0F00F111B8 /* StoryboardwithCYX.storyboard */; }; 29807C651CD20F0F00F111B8 /* StoryboardwithCYX.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29807C641CD20F0F00F111B8 /* StoryboardwithCYX.storyboard */; };
29808A641CFEC41B001D1020 /* ExperienceCentreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29808A631CFEC41B001D1020 /* ExperienceCentreViewController.m */; }; 29808A641CFEC41B001D1020 /* ExperienceCentreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29808A631CFEC41B001D1020 /* ExperienceCentreViewController.m */; };
29808A6B1CFED730001D1020 /* SceneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29808A6A1CFED730001D1020 /* SceneViewController.m */; }; 29808A6B1CFED730001D1020 /* SceneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29808A6A1CFED730001D1020 /* SceneViewController.m */; };
2980AEC41D0D09B2001AA4A3 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2980AEC31D0D09B2001AA4A3 /* AssetsLibrary.framework */; };
2980AEC51D0D0B10001AA4A3 /* opple_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */; };
29834EB41CDF1EAA001A484F /* screeningSecondView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29834EB31CDF1EAA001A484F /* screeningSecondView.m */; }; 29834EB41CDF1EAA001A484F /* screeningSecondView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29834EB31CDF1EAA001A484F /* screeningSecondView.m */; };
29834EB61CDF1EB6001A484F /* screeningSecondView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29834EB51CDF1EB6001A484F /* screeningSecondView.xib */; }; 29834EB61CDF1EB6001A484F /* screeningSecondView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29834EB51CDF1EB6001A484F /* screeningSecondView.xib */; };
29834EB91CDF1FB3001A484F /* screeningFirstView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29834EB81CDF1FB3001A484F /* screeningFirstView.m */; }; 29834EB91CDF1FB3001A484F /* screeningFirstView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29834EB81CDF1FB3001A484F /* screeningFirstView.m */; };
...@@ -162,7 +164,6 @@ ...@@ -162,7 +164,6 @@
29F14BAA1CF6B60D0005D3E5 /* QRView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F14BA51CF6B60D0005D3E5 /* QRView.m */; }; 29F14BAA1CF6B60D0005D3E5 /* QRView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F14BA51CF6B60D0005D3E5 /* QRView.m */; };
29F14BAB1CF6B60D0005D3E5 /* QRViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F14BA71CF6B60D0005D3E5 /* QRViewController.m */; }; 29F14BAB1CF6B60D0005D3E5 /* QRViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F14BA71CF6B60D0005D3E5 /* QRViewController.m */; };
29F725FB1CE17B0D0072FE0E /* Shoppersmanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FA1CE17B0D0072FE0E /* Shoppersmanager.m */; }; 29F725FB1CE17B0D0072FE0E /* Shoppersmanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FA1CE17B0D0072FE0E /* Shoppersmanager.m */; };
29F725FE1CE1928F0072FE0E /* opple_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */; };
29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */; }; 29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */; };
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */; }; 29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */; };
FDB3E374E3D92A371F79B245 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD9ABF900C09EF17340B0DE6 /* libPods.a */; }; FDB3E374E3D92A371F79B245 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD9ABF900C09EF17340B0DE6 /* libPods.a */; };
...@@ -320,6 +321,8 @@ ...@@ -320,6 +321,8 @@
29808A631CFEC41B001D1020 /* ExperienceCentreViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExperienceCentreViewController.m; sourceTree = "<group>"; }; 29808A631CFEC41B001D1020 /* ExperienceCentreViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExperienceCentreViewController.m; sourceTree = "<group>"; };
29808A691CFED730001D1020 /* SceneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneViewController.h; sourceTree = "<group>"; }; 29808A691CFED730001D1020 /* SceneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneViewController.h; sourceTree = "<group>"; };
29808A6A1CFED730001D1020 /* SceneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SceneViewController.m; sourceTree = "<group>"; }; 29808A6A1CFED730001D1020 /* SceneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SceneViewController.m; sourceTree = "<group>"; };
2980AEC31D0D09B2001AA4A3 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
2980AEC81D0D20D9001AA4A3 /* HeaderforURL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HeaderforURL.h; sourceTree = "<group>"; };
29834EB21CDF1EAA001A484F /* screeningSecondView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screeningSecondView.h; sourceTree = "<group>"; }; 29834EB21CDF1EAA001A484F /* screeningSecondView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = screeningSecondView.h; sourceTree = "<group>"; };
29834EB31CDF1EAA001A484F /* screeningSecondView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = screeningSecondView.m; sourceTree = "<group>"; }; 29834EB31CDF1EAA001A484F /* screeningSecondView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = screeningSecondView.m; sourceTree = "<group>"; };
29834EB51CDF1EB6001A484F /* screeningSecondView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = screeningSecondView.xib; sourceTree = "<group>"; }; 29834EB51CDF1EB6001A484F /* screeningSecondView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = screeningSecondView.xib; sourceTree = "<group>"; };
...@@ -467,6 +470,7 @@ ...@@ -467,6 +470,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
2980AEC41D0D09B2001AA4A3 /* AssetsLibrary.framework in Frameworks */,
041843E71CF773A00081B694 /* libz.tbd in Frameworks */, 041843E71CF773A00081B694 /* libz.tbd in Frameworks */,
041843E51CF773990081B694 /* libstdc++.tbd in Frameworks */, 041843E51CF773990081B694 /* libstdc++.tbd in Frameworks */,
04F9EE221CF27B1D00BD729F /* CoreTelephony.framework in Frameworks */, 04F9EE221CF27B1D00BD729F /* CoreTelephony.framework in Frameworks */,
...@@ -719,6 +723,7 @@ ...@@ -719,6 +723,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2928F7E21CD085F40036D761 /* PrefixHeader.pch */, 2928F7E21CD085F40036D761 /* PrefixHeader.pch */,
2980AEC81D0D20D9001AA4A3 /* HeaderforURL.h */,
); );
name = pch; name = pch;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1466,6 +1471,7 @@ ...@@ -1466,6 +1471,7 @@
4333C4B25549A396FC0CD944 /* Frameworks */ = { 4333C4B25549A396FC0CD944 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2980AEC31D0D09B2001AA4A3 /* AssetsLibrary.framework */,
041843E61CF773A00081B694 /* libz.tbd */, 041843E61CF773A00081B694 /* libz.tbd */,
041843E41CF773990081B694 /* libstdc++.tbd */, 041843E41CF773990081B694 /* libstdc++.tbd */,
041843E21CF7737E0081B694 /* libsqlite3.tbd */, 041843E21CF7737E0081B694 /* libsqlite3.tbd */,
...@@ -1635,6 +1641,7 @@ ...@@ -1635,6 +1641,7 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
2980AEC51D0D0B10001AA4A3 /* opple_objc_json_client.m in Sources */,
29BFBD981CE46FDA00C238FB /* MyclientEntityModel.m in Sources */, 29BFBD981CE46FDA00C238FB /* MyclientEntityModel.m in Sources */,
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */, 29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */,
2985AEA11CE72F1500704C91 /* NSArray+ ZXPUnicode.m in Sources */, 2985AEA11CE72F1500704C91 /* NSArray+ ZXPUnicode.m in Sources */,
...@@ -1755,7 +1762,6 @@ ...@@ -1755,7 +1762,6 @@
29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */, 29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */,
29F14BAA1CF6B60D0005D3E5 /* QRView.m in Sources */, 29F14BAA1CF6B60D0005D3E5 /* QRView.m in Sources */,
2936F29A1D01868E007CA67C /* ShareGoodsViewController.m in Sources */, 2936F29A1D01868E007CA67C /* ShareGoodsViewController.m in Sources */,
29F725FE1CE1928F0072FE0E /* opple_objc_json_client.m in Sources */,
29834EC01CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m in Sources */, 29834EC01CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m in Sources */,
29834EC51CDF76C1001A484F /* UserViewController.m in Sources */, 29834EC51CDF76C1001A484F /* UserViewController.m in Sources */,
29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */, 29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */,
...@@ -1893,6 +1899,7 @@ ...@@ -1893,6 +1899,7 @@
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-all_load",
"-ObjC", "-ObjC",
"-l\"AFNetworking\"", "-l\"AFNetworking\"",
"-l\"IQKeyboardManager\"", "-l\"IQKeyboardManager\"",
...@@ -1922,7 +1929,7 @@ ...@@ -1922,7 +1929,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple; PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8"; PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
STRIP_PNG_TEXT = NO; STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
...@@ -1949,6 +1956,7 @@ ...@@ -1949,6 +1956,7 @@
ONLY_ACTIVE_ARCH = NO; ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-all_load",
"-ObjC", "-ObjC",
"-l\"AFNetworking\"", "-l\"AFNetworking\"",
"-l\"IQKeyboardManager\"", "-l\"IQKeyboardManager\"",
...@@ -1978,7 +1986,7 @@ ...@@ -1978,7 +1986,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple; PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "e9bd3600-5e9c-4cd0-a0d5-b7d8b0882ca8"; PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
STRIP_PNG_TEXT = NO; STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "¥-副本.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "¥-副本@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -1568,7 +1568,7 @@ ...@@ -1568,7 +1568,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="欧普照明零售全渠道营销平台" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xQF-RE-TsR"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="欧普照明零售全渠道营销平台" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xQF-RE-TsR">
<rect key="frame" x="53" y="137" width="672" height="77"/> <rect key="frame" x="53" y="137" width="672" height="77"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="46"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="48"/>
<color key="textColor" red="0.2627450980392157" green="0.67450980392156867" blue="0.87450980392156863" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.2627450980392157" green="0.67450980392156867" blue="0.87450980392156863" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
......
...@@ -116,6 +116,10 @@ ...@@ -116,6 +116,10 @@
*/ */
@property (nonatomic,strong) MBProgressHUD*TCHud; @property (nonatomic,strong) MBProgressHUD*TCHud;
/**
* 友好化时间
*/
+ (NSString *) compareCurrentTime:(NSString *)str;
......
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
if (code) { if (code) {
return kTCColor(126, 191, 53); return kTCColor(126, 191, 53);
} }
return @"已付款"; return @"已支付";
} }
break; break;
case 003://已发货 case 003://已发货
...@@ -424,7 +424,7 @@ ...@@ -424,7 +424,7 @@
#pragma mark -查询购物车数量 #pragma mark -查询购物车数量
- (void)QueryShoppingCarNumber - (void)QueryShoppingCarNumber
{ {
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/shopcart/get/",[Customermanager manager].model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(QUERYSHOPPINGBAGNUMBER),[Customermanager manager].model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -452,6 +452,47 @@ ...@@ -452,6 +452,47 @@
} }
#pragma mark -友好化时间
+ (NSString *) compareCurrentTime:(NSString *)str
{
//把字符串转为NSdate
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss.SSS"];
NSDate *timeDate = [dateFormatter dateFromString:str];
//得到与当前时间差
NSTimeInterval timeInterval = [timeDate timeIntervalSinceNow];
timeInterval = -timeInterval;
//标准时间和北京时间差8个小时
timeInterval = timeInterval - 8*60*60;
long temp = 0;
NSString *result;
if (timeInterval < 60) {
result = [NSString stringWithFormat:@"刚刚"];
}
else if((temp = timeInterval/60) <60){
result = [NSString stringWithFormat:@"%ld分钟前",temp];
}
else if((temp = temp/60) <24){
result = [NSString stringWithFormat:@"%ld小时前",temp];
}
else if((temp = temp/24) <30){
result = [NSString stringWithFormat:@"%ld天前",temp];
}
else if((temp = temp/30) <12){
result = [NSString stringWithFormat:@"%ld月前",temp];
}
else{
temp = temp/12;
result = [NSString stringWithFormat:@"%ld年前",temp];
}
return result;
}
......
...@@ -97,6 +97,9 @@ ...@@ -97,6 +97,9 @@
sceneScreeningCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"sceneScreeningCollectionViewCell" forIndexPath:indexPath]; sceneScreeningCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"sceneScreeningCollectionViewCell" forIndexPath:indexPath];
SceneListModel *model = [self.sceneDatasArray objectAtIndex_opple:indexPath.item]; SceneListModel *model = [self.sceneDatasArray objectAtIndex_opple:indexPath.item];
[cell.selectedScrenImageView sd_setImageWithURL:[NSURL URLWithString:model.pricure] placeholderImage:REPLACEIMAGE]; [cell.selectedScrenImageView sd_setImageWithURL:[NSURL URLWithString:model.pricure] placeholderImage:REPLACEIMAGE];
cell.selectedScrenImageView.tag = indexPath.item+100;
cell.selectedScrenImageView.userInteractionEnabled = YES;
[cell.selectedScrenImageView addGestureRecognizer:[[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(longPressRemove:)]];
cell.selectedScrenImageView.layer.masksToBounds = YES; cell.selectedScrenImageView.layer.masksToBounds = YES;
cell.selectedScrenImageView.layer.cornerRadius = kCornerRadius; cell.selectedScrenImageView.layer.cornerRadius = kCornerRadius;
if (model.isSelectedSate) { if (model.isSelectedSate) {
...@@ -143,6 +146,9 @@ ...@@ -143,6 +146,9 @@
} }
NSArray *imags = [model.pictures componentsSeparatedByString:@","]; NSArray *imags = [model.pictures componentsSeparatedByString:@","];
[cell.selectedGoodsImageView sd_setImageWithURL:[NSURL URLWithString:[imags firstObject]]]; [cell.selectedGoodsImageView sd_setImageWithURL:[NSURL URLWithString:[imags firstObject]]];
cell.selectedGoodsImageView.userInteractionEnabled = YES;
cell.selectedGoodsImageView.tag = indexPath.row + 100;
[cell.selectedGoodsImageView addGestureRecognizer:[[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(productLongPressRemove:)]];
return cell; return cell;
} }
...@@ -500,7 +506,31 @@ ...@@ -500,7 +506,31 @@
} }
} }
#pragma mark -场景长按删除
- (void)longPressRemove:(UILongPressGestureRecognizer *)longPress
{
if (longPress.state == UIGestureRecognizerStateBegan) {
NSInteger index = longPress.view.tag-100;
[self.sceneDatasArray removeObjectAtIndex:index];
[self.sceneScrollview deleteItemsAtIndexPaths:@[[NSIndexPath indexPathForItem:index inSection:0]]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.sceneScrollview reloadData];
});
}
}
#pragma mark -产品长按删除
- (void)productLongPressRemove:(UILongPressGestureRecognizer *)longPress
{
if (longPress.state == UIGestureRecognizerStateBegan) {
NSInteger index = longPress.view.tag-100;
[self.productDatasArray removeObjectAtIndex:index];
[self.productScrollview deleteRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:index inSection:0]] withRowAnimation:UITableViewRowAnimationFade];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.productScrollview reloadData];
});
}
}
#pragma mark ---SharePicturedelegate #pragma mark ---SharePicturedelegate
#pragma mark -上传图片进度 #pragma mark -上传图片进度
......
//
// HeaderforURL.h
// Lighting
//
// Created by 曹云霄 on 16/6/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#ifndef HeaderforURL_h
#define HeaderforURL_h
/******************************************************接口地址*******************************************************/
/**
* 登陆
*/
#define LOGIN @"/employee/login"
/**
* 发送验证码
*/
#define SENDSMS @"/system/sendSms?mobilephone=%@&username="
/**
* 重置密码
*/
#define RESETPASSWORD @"/employee/resetPassword"
/**
* 新增地址
*/
#define ADDADDRESS @"/shippingAddress/save"
/**
* 更改地址
*/
#define CHANGEADDRESS @"/shippingAddress/update"
/**
* 删除地址
*/
#define REMOVEADDRESS @"/shippingAddress/remove/"
/**
* 场景筛选
*/
#define SCENESCREENING @"/scene/getSceneFilter"
/**
* 场景列表
*/
#define SCENELIST @"/scene/query"
/**
* 热门搜索
*/
#define HOTSEARCH @"/hottag/getHotTag"
/**
* 经营者二维码
*/
#define QRCODE @"/employee/getReseller"
/**
* 确认支付
*/
#define CONFIRMPAY @"/order/payOrder"
/**
* 获取购物袋商品
*/
#define SHOPPINGBAG @"/shopcart/query"
/**
* 删除购物袋
*/
#define REMOVESHOPPINGBAG @"/shopcart/delete"
/**
* 更改购物车商品数量、价格
*/
#define CHANGESHOPPINGBAGNUMBERPRICE @"/shopcart/updateCostPrice/"
/**
* 添加到购物车
*/
#define ADDSHOPPINGBAG @"/shopcart/save"
/**
* 查询购物车数量
*/
#define QUERYSHOPPINGBAGNUMBER @"/shopcart/get/"
/**
* 查询所有订单
*/
#define QUERYORDER @"/order/query"
/**
* 撤销订单
*/
#define RESETORDER @"/order/updateOrderState/"
/**
* 分享
*/
#define SHARE @"/system/shareGoods"
/**
* 产品筛选
*/
#define PRODUCTSCREENING @"/goods/getGoodsFilter"
/**
* 产品列表
*/
#define PRODUCTLIST @"/goods/query"
/**
* 条形码搜索
*/
#define BARCODESEARCH @"/goods/getGoodsByCode/"
/**
* 获取导购关联客户
*/
#define GETSHOPPERSCONSUMER @"/consumer/query"
/**
* 修改密码
*/
#define MODIFYPASSWORD @"/employee/modifyPassword"
/**
* 订单详情
*/
#define ORDERDETAILS @"/order/findOrder/"
/**
* PDF路径
*/
#define DOWNLOADPDF @"/order/urlOfprintPDF/"
/**
* 收货地址
*/
#define SHIPPINGADDRESS @"/shippingAddress/listAddress/"
/**
* 生成订单
*/
#define CREATEORDER @"/order/save"
/**
* 商品详情
*/
#define GOODSDETAILS @"/goods/getGoods/"
/**
* 导购返利
*/
#define SHOPPERSCOMMISSION @"/employee/getCommission?id="
/**
* 上传头像
*/
#define UPLOADHEADER @"/system/upload"
/**
* 修改导购个人信息
*/
#define MODITYSHOPPERSINFORMATION @"/employee/updateEmployee"
/**
* 注销登录
*/
#define CANCELLOGIN @"/employee/logout"
/**
* 新增客户
*/
#define ADDCONSUMER @"/consumer/save"
/**
* 写入访问时间
*/
#define SAVEVISITEDTIME @"/consumer/saveLastVisitedTime?consumerId="
#endif /* HeaderforURL_h */
...@@ -31,22 +31,10 @@ ...@@ -31,22 +31,10 @@
#import "BaseViewController.h" #import "BaseViewController.h"
#import "MjRefreshHeaderCustom.h" #import "MjRefreshHeaderCustom.h"
#import "UIScrollView+EmptyDataSet.h" #import "UIScrollView+EmptyDataSet.h"
#import "HeaderforURL.h"
// Include any system framework and library headers here that should be included in all compilation units. // Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
/**
* 禁止所有的打印,提交AppStore时使用
*/
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define NSLog(...)
#define debugMethod()
#endif
/** /**
* AppDelegate代理 * AppDelegate代理
*/ */
...@@ -123,16 +111,17 @@ ...@@ -123,16 +111,17 @@
*/ */
#define kSelectedCornerRadius 25 #define kSelectedCornerRadius 25
/** /**
* 服务器测试地址 * 服务器开发地址
*/ */
#define ServerAddress @"http://dg-dev.opple.com/opple-web/app" #define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
/** /**
* 服务器开发地址 * 服务器测试地址
*/ */
//#define ServerAddress @"http://139.196.195.30:8090/opple-web/app" //#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
/** /**
...@@ -202,4 +191,5 @@ ...@@ -202,4 +191,5 @@
#endif /* PrefixHeader_pch */ #endif /* PrefixHeader_pch */
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
{ {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
//场景筛选条件 //场景筛选条件
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/getSceneFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SCENESCREENING) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
- (void)getSceneLibrarydatas:(SceneCondition *)condition isRemove:(BOOL)remove - (void)getSceneLibrarydatas:(SceneCondition *)condition isRemove:(BOOL)remove
{ {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/query"] WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(SCENELIST) WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
weakSelf.sceneOrProductClollectionView.emptyDataSetSource = weakSelf; weakSelf.sceneOrProductClollectionView.emptyDataSetSource = weakSelf;
[weakSelf endRefreshingForTableView:weakSelf.sceneOrProductClollectionView]; [weakSelf endRefreshingForTableView:weakSelf.sceneOrProductClollectionView];
...@@ -405,7 +405,7 @@ ...@@ -405,7 +405,7 @@
- (void)getScreeningdatasisRemoveArray:(BOOL)remove - (void)getScreeningdatasisRemoveArray:(BOOL)remove
{ {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/getGoodsFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:SERVERREQUESTURL(PRODUCTSCREENING) WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
- (void)getGoodsListdatas:(GoodsCondition *)conditon returnResponse:(void(^)(GoodsResponse *))finish - (void)getGoodsListdatas:(GoodsCondition *)conditon returnResponse:(void(^)(GoodsResponse *))finish
{ {
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/query"] WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(PRODUCTLIST) WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) {
[weakSelf endRefreshingForTableView:weakSelf.sceneOrProductClollectionView]; [weakSelf endRefreshingForTableView:weakSelf.sceneOrProductClollectionView];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -699,7 +699,7 @@ ...@@ -699,7 +699,7 @@
NSMutableIndexSet *index = [[NSMutableIndexSet alloc]init]; NSMutableIndexSet *index = [[NSMutableIndexSet alloc]init];
for (int i=0; i<self.openArray.count; i++) { for (int i=0; i<self.openArray.count; i++) {
[self.openArray replaceObjectAtIndex:i withObject:@"0"]; [self.openArray replaceObjectAtIndex:i withObject:@"0"];
[index addIndex:i]; [index addIndex:i];
} }
[self.openArray replaceObjectAtIndex:button.tag-100 withObject:boolValue?@"0":@"1"]; [self.openArray replaceObjectAtIndex:button.tag-100 withObject:boolValue?@"0":@"1"];
[self.screeningTableView reloadSections:index withRowAnimation:UITableViewRowAnimationMiddle]; [self.screeningTableView reloadSections:index withRowAnimation:UITableViewRowAnimationMiddle];
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
NSString *goodsID = [self.goodsIds substringToIndex:[self.goodsIds length]-1]; NSString *goodsID = [self.goodsIds substringToIndex:[self.goodsIds length]-1];
NSDictionary *parameterDict = [NSDictionary dictionaryWithObjectsAndKeys:[goodsID substringToIndex:self.goodsIds.length-1],@"goodsIds",@"",@"title",@"",@"remark",nil]; NSDictionary *parameterDict = [NSDictionary dictionaryWithObjectsAndKeys:[goodsID substringToIndex:self.goodsIds.length-1],@"goodsIds",@"",@"title",@"",@"remark",nil];
//上传图片 //上传图片
[[NetworkRequestClassManager Manager] UploadImageWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/system/shareGoods"] WithRequestType:0 WithImageDatas:imageData WithParameter:parameterDict WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] UploadImageWithURL:SERVERREQUESTURL(SHARE) WithRequestType:0 WithImageDatas:imageData WithParameter:parameterDict WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
...@@ -246,14 +246,14 @@ ...@@ -246,14 +246,14 @@
for (ShopcarModel *model in self.datasArray) { for (ShopcarModel *model in self.datasArray) {
if (model.isSelected) { if (model.isSelected) {
[goodsIds appendFormat:@"%@,",model.goods.fid]; [goodsIds appendFormat:@"%@,",model.goods.fid];
[goodsCounts appendFormat:@"%d,",model.goodsNum]; [goodsCounts appendFormat:@"%ld,",(long)model.goodsNum];
} }
} }
SaveShoppingCartRequest *shopCar = [[SaveShoppingCartRequest alloc]init]; SaveShoppingCartRequest *shopCar = [[SaveShoppingCartRequest alloc]init];
shopCar.consumerId = [Customermanager manager].model.fid; shopCar.consumerId = [Customermanager manager].model.fid;
shopCar.goodsId = [goodsIds substringToIndex:goodsIds.length-1]; shopCar.goodsId = [goodsIds substringToIndex:goodsIds.length-1];
shopCar.count = [goodsCounts substringToIndex:goodsCounts.length-1]; shopCar.count = [goodsCounts substringToIndex:goodsCounts.length-1];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/shopcart/save"] WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDSHOPPINGBAG) WithRequestType:0 WithParameter:shopCar WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
This diff is collapsed.
This diff is collapsed.
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