Commit 8a8209ab authored by 勾芒's avatar 勾芒

caoyunxiao

parent 913b4774
......@@ -80,7 +80,6 @@
- (IBAction)LoginButtonClick:(UIButton *)sender {
// [self SetTheRootViewController];
if (self.userName.text.length == 0) {
......
......@@ -36,7 +36,6 @@
self.orderDetailsTableview.dataSource = self;
self.orderDetailsTableview.delegate = self;
// self.orderDetailsTableview.tableFooterView = [UIView new];
[self CreateTableviewHeaderView];
[self CreateTableviewFooterView];
}
......@@ -44,9 +43,18 @@
#pragma mark -获取订单详情
- (void)getOrderDetailsData
{
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/order/get/",_orderCode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/order/findOrder/",_orderCode] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
NSLog(@"%@",returnValue);
if ([returnValue[@"code"] isEqualToNumber:@0]) {
OrderBill *orderDetails = [[OrderBill alloc]initWithDictionary:returnValue[@"data"] error:nil];
NSLog(@"%@",orderDetails);
}
else
{
[self ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
......
......@@ -41,4 +41,6 @@
@property (nonatomic,strong) NSArray *settlementGoodsdatas;
@end
......@@ -336,27 +336,38 @@
- (IBAction)CreateOrderButtonClick:(UIButton *)sender {
OrderBill *order = [[OrderBill alloc]init];
//分页
DataPage *page = [[DataPage alloc]init];
page.page = 0;
order.datapage = page;
//收货地址
TOOrderEntity *orderReceiver = [[TOOrderEntity alloc]init];
orderReceiver.receiverName = @"caoyunxiao";
orderReceiver.receiverMobile = @"15121161964";
orderReceiver.receiverAddress = @"dasdsssssssssss";
TOOrderdetailEntity *orderGoods = [[TOOrderdetailEntity alloc]init];
orderGoods.goodsId = [[[self.datasArray lastObject] lastObject] goodsId];
order.datapage = page;
order.order = orderReceiver;
NSArray *arr = @[orderGoods];
order.orderdetailList = arr;
orderReceiver.guideId = [[Shoppersmanager manager] Shoppers].employee.fid;
orderReceiver.consumerId = [[Customermanager manager] customerID];
//商品ID
NSArray *goodArray = [self.datasArray lastObject];
NSMutableArray *goodidArr = [NSMutableArray array];
for (int i=0; i<goodArray.count-1; i++) {
ShopcarModel *model = [goodArray objectAtIndex_opple:i];
TOOrderdetailEntity *orderGoods = [[TOOrderdetailEntity alloc]init];
orderGoods.goodsId = model.fid;
[goodidArr addObject:orderGoods];
}
order.orderdetailList = goodidArr;
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/order/save"] WithRequestType:0 WithParameter:order WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
......
......@@ -46,4 +46,12 @@
@property (nonatomic,assign) BOOL currentCustomer;
/**
* 导购ID
*/
@property (nonatomic,copy) NSString *guideid;
@end
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