OrderItemModel.m 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // OrderItemModel.m
  3. // IBOSSIPAD
  4. //
  5. // Created by iHope on 14-8-20.
  6. // Copyright (c) 2014年 elongtian. All rights reserved.
  7. //
  8. #import "OrderItemModel.h"
  9. #import "DateFormat.h"
  10. @implementation OrderItemModel
  11. -(void)ParseDic:(NSDictionary *)dic
  12. {
  13. if(dic!=nil){
  14. _address = [dic objectForKey:@"Address"];
  15. _channelName = [dic objectForKey:@"ChannelName"];
  16. _customerCode = [dic objectForKey:@"CustomerCode"];
  17. _customerName = [dic objectForKey:@"CustomerName"];
  18. _customerTypeName = [dic objectForKey:@"CustomerTypeName"];
  19. _discount = [dic objectForKey:@"Discount"];
  20. double goodsAmountValue=[[dic objectForKey:@"GoodsAmount"]doubleValue];
  21. NSString *createTime= [dic objectForKey:@"CreateTime"];
  22. if(createTime!=nil){
  23. _createDate= [DateFormat dateFormatSplit:createTime];
  24. }
  25. _goodsAmount = [NSString stringWithFormat:@"%lf",goodsAmountValue];
  26. double markedPriceAmountValue= [[dic objectForKey:@"MarkedPriceAmount"]doubleValue];
  27. _markedPriceAmount =[NSString stringWithFormat:@"%lf",markedPriceAmountValue] ;
  28. int orderIdValue= [[dic objectForKey:@"OrderID"]intValue];
  29. _orderID = [NSString stringWithFormat:@"%d",orderIdValue] ;
  30. _orderNo = [dic objectForKey:@"OrderNo"];
  31. _organizationName = [dic objectForKey:@"OrganizationName"];
  32. _staffName = [dic objectForKey:@"StaffName"];
  33. double earnestAmountValue= [[dic objectForKey:@"EarnestAmount"]doubleValue];
  34. _earnestAmount=[NSString stringWithFormat:@"%lf",earnestAmountValue];
  35. double totalAmountValue= [[dic objectForKey:@"TotalAmount"]doubleValue];
  36. _totalAmount=[NSString stringWithFormat:@"%lf",totalAmountValue];
  37. double discountAmountValue= [[dic objectForKey:@"DiscountAmount"]doubleValue];
  38. _discountAmount=[NSString stringWithFormat:@"%lf",discountAmountValue];
  39. _telephone=[dic objectForKey:@"Telephone"];
  40. _remarks=[dic objectForKey:@"Remarks"]==nil?@"":[dic objectForKey:@"Remarks"];
  41. _isChecked=NO;
  42. }
  43. }
  44. @end