| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- //
- // SalesSlipListModel.m
- // IBOSSmini
- //
- // Created by ssl on 2018/1/29.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "SalesSlipListModel.h"
- #import "DateFormat.h"
- @implementation SalesSlipListModel
- -(void)ParseDic:(NSDictionary *)dic
- {
- if(dic!=nil){
- _status = [[dic objectForKey:@"Status"]integerValue];
- _invoiceStatusName= [dic objectForKey:@"InvoiceStatusName"];
- _customerName=[dic objectForKey:@"CustomerName"];
- _contractNumber=[dic objectForKey:@"ContractNumber"];
- double toSalesAmountValue=[[dic objectForKey:@"ToSalesAmount"]doubleValue ];
- _toSalesAmount=[NSString stringWithFormat:@"%.4f",toSalesAmountValue];
- double markedPriceAmountValue=[[dic objectForKey:@"MarkedPriceAmount"]doubleValue];
- _markedPriceAmount=[NSString stringWithFormat:@"%.4f",markedPriceAmountValue];
- _otherContact=[dic objectForKey:@"OtherContact"];
- _intermediateCustomersName=[dic objectForKey:@"IntermediateCustomersName"];
- _customerCode=[dic objectForKey:@"CustomerCode"];
- double totalAmountValue= [[dic objectForKey:@"TotalAmount"]doubleValue];
- _totalAmount=[NSString stringWithFormat:@"%.4f",totalAmountValue];
- int orderIdValue= [[dic objectForKey:@"SalesID"]intValue];
- _salesId=[NSString stringWithFormat:@"%d",orderIdValue];
- _channelName=[dic objectForKey:@"ChannelName"];
- _deliveryFlag= [[dic objectForKey:@"DeliveryFlag"]boolValue];
- _installationFlag=[[dic objectForKey:@"InstallationFlag"]boolValue];
-
- NSString *estimateDeliveryDateStr= [dic objectForKey:@"EstimateDeliveryDate"];
- _estimateDeliveryDate=[DateFormat dateFormatSplit:estimateDeliveryDateStr];
- _estimateInstallationDate=[DateFormat dateFormatSplit: [dic objectForKey:@"EstimateInstallationDate"]];
- _deliveryAreaName=[dic objectForKey:@"DeliveryAreaName"];
- _floorsName=[dic objectForKey:@"FloorsName"];
- _setReversedOrderNo=[dic objectForKey:@"ReversedSalesNo"];
- _createUser=[dic objectForKey:@"CreateUser"];
- _updateUser=[dic objectForKey:@"UpdateUser"];
- _createTime=[DateFormat dateFormatSplit:[dic objectForKey:@"CreateTime"]];
- _updateTime=[DateFormat dateFormatSplit:[dic objectForKey:@"UpdateTime"]];
- _remarks=[dic objectForKey:@"Remarks"];
- _weight=[[dic objectForKey:@"Weight"] stringValue];
- double totalVolumeValue=[[dic objectForKey:@"TotalVolume"]doubleValue];
- _totalVolume=[NSString stringWithFormat:@"%.6f",totalVolumeValue];
- _contacts=[dic objectForKey:@"Contacts"];
- _salesTypeName=[dic objectForKey:@"SalesTypeName"];
- _salesType=[[dic objectForKey:@"SalesType"]integerValue];
- _telephone=[dic objectForKey:@"Telephone"];
- _customerTypeName=[dic objectForKey:@"CustomerTypeName"];
- _SalesNo=[dic objectForKey:@"SalesNo"];
- double orderEarnestSumValue=[[dic objectForKey:@"SalesEarnestSum"]doubleValue];
- _orderEarnestSum= [NSString stringWithFormat:@"%.4f",orderEarnestSumValue];
- _channelName=[dic objectForKey:@"ChannelName"];
- double goodsAmountValue=[[dic objectForKey:@"GoodsAmount"]doubleValue];
- _goodsAmount= [NSString stringWithFormat:@"%.2f",goodsAmountValue];
- int organizationIdValue=[[dic objectForKey:@"OrganizationID"]intValue];
- _organizationId=[NSString stringWithFormat:@"%d",organizationIdValue];
- int customerIdValue=[[dic objectForKey:@"CustomerID"]intValue];
- _customerId=[NSString stringWithFormat:@"%d",customerIdValue];
- double discountAmountValue=[[dic objectForKey:@"DiscountAmount"]doubleValue];
- _discountAmount=[NSString stringWithFormat:@"%.4f",discountAmountValue];
- //使用定金?
- double earnestAmountValue= [[dic objectForKey:@"EarnestAmount"]doubleValue];
- _earnestAmount=[NSString stringWithFormat:@"%.2f",earnestAmountValue];
- double totalEarnestAmountValue= [[dic objectForKey:@"TotalEarnestAmount"]doubleValue];
- _totalEarnestAmount= [NSString stringWithFormat:@"%.4f",totalEarnestAmountValue];
- double earnestRateValue= [[dic objectForKey:@"EarnestRate"]doubleValue];
- _earnestRate=[NSString stringWithFormat:@"%.2f,%@",earnestRateValue,@"%"];
- double totalEarnestRateValue=[[dic objectForKey:@"TotalEarnestRate"]doubleValue];
- _totalEarnestRate=[NSString stringWithFormat:@"%.2f,%@",totalEarnestRateValue,@"%"];
- double discountValue= [[dic objectForKey:@"Discount"]doubleValue];
- _discount=[NSString stringWithFormat:@"%.2f",discountValue];
- _goodsCount=[dic objectForKey:@"GoodsCount"]==nil?@"0":[dic objectForKey:@"GoodsCount"];
- _organizationName=[dic objectForKey:@"OrganizationName"];
- int staffIdValue= [[dic objectForKey:@"StaffID"]intValue];
- _staffId=[NSString stringWithFormat:@"%d",staffIdValue];
- _staffName=[dic objectForKey:@"StaffName"];
- _createUser=[dic objectForKey:@"CreateUser"];
- _accountDate=[DateFormat dateFormatSplit:[dic objectForKey:@"AccountDate"]];
- _address=[dic objectForKey:@"Address"];
- _depositReceivedAmount=[[dic objectForKey:@"DepositReceivedAmount"] stringValue];
- _amountCollected=[NSString stringWithFormat:@"%.2f",[[dic objectForKey:@"ReceivableAmount"] doubleValue]];
- double finalReceivableValue =[[dic objectForKey:@"FinalReceivableAmount"]doubleValue];
- _finalReceivables=[NSString stringWithFormat:@"%.4f",finalReceivableValue];
- _originalNumber=[dic objectForKey:@"OriginalNumber"];
- _accountReceivableAmount=[[dic objectForKey:@"AccountReceivableAmount"] stringValue];
- _receivables =[dic objectForKey:@"ReceivablesTypeName"];
- _salesDetailType=[[dic objectForKey:@"SalesDetailType"] intValue];
- double receivablePayAmountValue=[[dic objectForKey:@"ReceivableSum"]doubleValue];
- _receivablePayAmount= [NSString stringWithFormat:@"%.4f",receivablePayAmountValue];
- double verificationSumValue=[[dic objectForKey:@"VerificationSum"]doubleValue];
- _verificationSum=[NSString stringWithFormat:@"%.4f",verificationSumValue];
-
- double finalReceivableAmountValue=[[dic objectForKey:@"FinalReceivableAmount"]doubleValue];
- _finalReceivableAmount=[NSString stringWithFormat:@"%.4f",finalReceivableAmountValue];
- }
- }
- @end
|