Commit 7d001db7 authored by 陈俊俊's avatar 陈俊俊

商品

parent 3f96fb30
......@@ -321,6 +321,7 @@ typedef enum : NSUInteger {
//两个类之间的转换
- (PurchaseBillProduct *)coverPurchaseProduct:(ShopDetail *)shopDetail{
PurchaseBillProduct *billProduct = [[PurchaseBillProduct alloc]init];
billProduct.uuid = shopDetail.uuid;
billProduct.product_uuid = shopDetail.product_uuid;
billProduct.product_code = shopDetail.product_code;
billProduct.product_name = shopDetail.merchandise;
......@@ -332,7 +333,7 @@ typedef enum : NSUInteger {
billProduct.basePrice = [NSNumber numberWithFloat:[shopDetail.foundationUnitPrice floatValue]];
billProduct.total = [NSNumber numberWithFloat:[shopDetail.totalMoney floatValue]];
billProduct.remark = shopDetail.remark;
billProduct.qpcStr = @"fdsfdsfdsa";
billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无";
return billProduct;
}
- (ShopDetail *)coverShopDetail:(PurchaseBillProduct *)billProduct{
......@@ -349,6 +350,7 @@ typedef enum : NSUInteger {
shopDetail.foundationUnitPrice= [billProduct.basePrice stringValue];
shopDetail.totalMoney= [billProduct.total stringValue];
shopDetail.remark = billProduct.remark;
shopDetail.packageQpcStr = billProduct.qpcStr;
return shopDetail;
}
......@@ -356,7 +358,7 @@ typedef enum : NSUInteger {
NSMutableArray *billArr = [NSMutableArray array];
for (NoticeProduct *product in arr) {
PurchaseBillProduct *billProduct = [PurchaseBillProduct new];
billProduct.uuid = product.uuid;
// billProduct.uuid = product.uuid;
billProduct.product_name = product.productName;
billProduct.product_uuid = product.productUuid;
billProduct.product_code = product.productCode;
......@@ -368,7 +370,7 @@ typedef enum : NSUInteger {
billProduct.basePrice = [NSNumber numberWithFloat:0];
billProduct.total = [NSNumber numberWithFloat:0];
billProduct.remark = product.remark;
billProduct.qpcStr = @"";
billProduct.qpcStr = @"";
[billArr addObject:billProduct];
}
return billArr;
......
......@@ -35,21 +35,6 @@
if (!self.productArr) {
self.productArr = [NSMutableArray array];
}
// PurchaseBillProduct *billProduct = [PurchaseBillProduct new];
//
// billProduct.product_name = @"dd";
// billProduct.product_uuid = @"402880e64e287fe2014e28895b8a0032";
// billProduct.product_code = @"农夫山泉";
// billProduct.qpc = [NSNumber numberWithFloat:22];
// billProduct.unit = @"筐";
// billProduct.qty = [NSNumber numberWithFloat:23];
// billProduct.price = [NSNumber numberWithFloat:333];
// billProduct.baseQty = [NSNumber numberWithFloat:333];
// billProduct.basePrice = [NSNumber numberWithFloat:33];
// billProduct.total = [NSNumber numberWithFloat:80];
// billProduct.remark = @"hshshshsh";
// billProduct.qpcStr = @"fdsfdsfdsa";
// [self.productArr addObject:billProduct];
if (self.productArr.count > 0) {
[[NSNotificationCenter defaultCenter] postNotificationName:SetProductTotalPrice object:nil];
}
......
......@@ -144,12 +144,12 @@
self.titleLabel.text = billProduct.product_name;
self.priceLabel.text = [billProduct.price stringValue];
self.countLabel.text = [billProduct.qty stringValue];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:%@",billProduct.qpc];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@",billProduct.baseQty];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@",billProduct.qty];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@",billProduct.price];
self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%@",billProduct.basePrice];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@",billProduct.total];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@",billProduct.qpc];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",billProduct.baseQty,billProduct.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",billProduct.qty,@"斤"];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@",billProduct.price];
self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%@",billProduct.basePrice];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@",billProduct.total];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",billProduct.remark];
[self isShowShippingQty:billProduct];
}
......
......@@ -15,6 +15,9 @@
@property (nonatomic,strong)NSString *product_code;//商品
@property (nonatomic,strong)NSString *packageSpecification;//包装规格
@property (nonatomic,strong)NSString *packageQpcStr;//规格描述
@property (nonatomic,strong)NSString *packageQpcUnit;//规格单位
@property (nonatomic,strong)NSString *packageQuantity;//包装数量
@property (nonatomic,strong)NSString *packageUnit;//包装单位
@property (nonatomic,strong)NSString *foundationQuantity;//基础数量
......
......@@ -297,6 +297,7 @@ typedef enum : NSUInteger {
ShopDetaileViewController *svc = [[ShopDetaileViewController alloc] init];
if (billProduct) {
svc.title = @"编辑商品";
ShopDetail *shopDetail=[self coverShopDetail:billProduct];
shopDetail.IsXiuGai=YES;
svc.choseShopDetail = ^(ShopDetail *Detail){
......@@ -309,14 +310,13 @@ typedef enum : NSUInteger {
};
svc.shopDetail=shopDetail;
}else{
svc.title = @"添加商品";
// 回调
svc.choseShopDetail = ^(ShopDetail *shopDetail){
TransportPdtDetail *tdetail = [self coverTransportPdtDetail:shopDetail];
[_bottomView refreshProduct:tdetail];
};
}
svc.title = [IBTCommon localizableString:@"AddShopDetail"];
[self PushViewController:svc animated:YES];
}
......@@ -334,7 +334,7 @@ typedef enum : NSUInteger {
billProduct.baseQty = [NSNumber numberWithFloat:[shopDetail.foundationQuantity floatValue]];
billProduct.total = [NSNumber numberWithFloat:[shopDetail.totalMoney floatValue]];
billProduct.note = shopDetail.remark;
billProduct.qpcStr = @"fdsfdsfdsa";
billProduct.qpcStr = shopDetail.packageQpcStr ? shopDetail.packageQpcStr : @"无" ;
return billProduct;
}
- (ShopDetail *)coverShopDetail:(TransportPdtDetail *)billProduct{
......
......@@ -225,8 +225,12 @@
- (void)sureClick{
[self PopViewControllerAnimated:YES];
if (self.indexArr.count > 0) {
NSLog(@"%@",self.indexArr);
self.getProchaseProduct(self.indexArr);
NSMutableArray*arr = [NSMutableArray array];
for (TransportPdtDetail *detail in self.indexArr) {
detail.uuid = nil;
[arr addObject:detail];
}
self.getProchaseProduct(arr);
}
}
- (void)didReceiveMemoryWarning {
......
......@@ -124,6 +124,7 @@
// cell.lineLabel.y = ShowHeight + TableHeight -1;
// cell.showView.height = ShowHeight;
// cell.backgroundColor = [UIColor whiteColor];
[self.selectArr addObject:billProduct];
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"add"}];
}else{
......
......@@ -145,12 +145,12 @@
self.titleLabel.text = pdtDetail.productName;
self.priceLabel.text = [pdtDetail.price stringValue];
self.countLabel.text = [pdtDetail.qty stringValue];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:%@",pdtDetail.qpc];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@",pdtDetail.baseQty];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@",pdtDetail.qty];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@",pdtDetail.price];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@",pdtDetail.qpc];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",pdtDetail.baseQty,pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",pdtDetail.qty,@"斤"];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%@",pdtDetail.price];
self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@",pdtDetail.total];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@",pdtDetail.total];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",pdtDetail.note];
}
......
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