Commit 811d4a17 authored by Sandy's avatar Sandy

鲜丰优化

parent c11d352c
......@@ -219,6 +219,7 @@
8F67988C1DB8CC9E00348267 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F67988B1DB8CC9E00348267 /* WebKit.framework */; };
8FD12B531EC4737200845F9B /* ProductStockModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FD12B521EC4737200845F9B /* ProductStockModel.m */; };
8FD12B541EC4737200845F9B /* ProductStockModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FD12B521EC4737200845F9B /* ProductStockModel.m */; };
8FDA63651F0F56FE00617495 /* TransportCreateProductCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FDA63641F0F56FE00617495 /* TransportCreateProductCell.m */; };
8FEE25DB1DB60B570099B596 /* GXFFunctionDB.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A1C3571B8F09D2004AC9F7 /* GXFFunctionDB.m */; };
8FEE25DC1DB60B570099B596 /* IBTTableViewSectionInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = C15918251AC062460013B391 /* IBTTableViewSectionInfo.m */; };
8FEE25DD1DB60B570099B596 /* ICRAppViewControllerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C15918841AC460BC0013B391 /* ICRAppViewControllerManager.m */; };
......@@ -1236,6 +1237,8 @@
8F67988B1DB8CC9E00348267 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
8FD12B511EC4737200845F9B /* ProductStockModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductStockModel.h; sourceTree = "<group>"; };
8FD12B521EC4737200845F9B /* ProductStockModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductStockModel.m; sourceTree = "<group>"; };
8FDA63631F0F56FE00617495 /* TransportCreateProductCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransportCreateProductCell.h; sourceTree = "<group>"; };
8FDA63641F0F56FE00617495 /* TransportCreateProductCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TransportCreateProductCell.m; sourceTree = "<group>"; };
8FEE27391DB60B570099B596 /* XFFruit copy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "XFFruit copy.app"; sourceTree = BUILT_PRODUCTS_DIR; };
8FEE273A1DB60B570099B596 /* XFFruit copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "XFFruit copy-Info.plist"; path = "/Users/Javen/Documents/MyProject/xffruit/XFFruit copy-Info.plist"; sourceTree = "<absolute>"; };
ABFA26041C87D38800274481 /* JavenImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenImages.h; sourceTree = "<group>"; };
......@@ -2284,6 +2287,8 @@
72B3C0BE1B9D3C7300025D81 /* TransportPurchaseCell.m */,
72B3C0BF1B9D3C7300025D81 /* TransportPurductCell.h */,
72B3C0C01B9D3C7300025D81 /* TransportPurductCell.m */,
8FDA63631F0F56FE00617495 /* TransportCreateProductCell.h */,
8FDA63641F0F56FE00617495 /* TransportCreateProductCell.m */,
72B3C0CB1B9D3FDD00025D81 /* CostCell.h */,
72B3C0CC1B9D3FDD00025D81 /* CostCell.m */,
72B3C0D71B9DB83A00025D81 /* TransportBoltView.h */,
......@@ -3828,6 +3833,7 @@
C14BE30A1ADB84720049F1AA /* ICRFileCache.m in Sources */,
72B3C0C11B9D3C7300025D81 /* CostViewController.m in Sources */,
C1677FCC1AC28A26002613C5 /* ICRAppDelegate.m in Sources */,
8FDA63651F0F56FE00617495 /* TransportCreateProductCell.m in Sources */,
C123A8F31B251284003C0C36 /* UIScrollView+Content.m in Sources */,
72B56DED1BF5E40B0078B5C8 /* GrossRateViewController.m in Sources */,
C1A05CBE1ACCE089006E827D /* ICRSystemHeaderView.m in Sources */,
......
......@@ -56,7 +56,7 @@
CGFloat headWidth = (ScreenSize.width - LeftWidth - LeftWidth - SpaceMargin* (self.arr.count -1))/self.arr.count;
for (NSInteger i = 0; i < self.arr.count; i++) {
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(LeftWidth + (SpaceMargin + headWidth)*i, 0, headWidth, self.frame.size.height)];
label.font = GXF_FOURTEENTH_SIZE;
label.font = GXF_THREETEENTH_SIZE;
label.textAlignment = NSTextAlignmentCenter;
label.textColor = GXF_PLACEHOLDER_COLOR;
// label.backgroundColor = [UIColor redColor];
......
......@@ -36,5 +36,8 @@
*/
@property (strong, nonatomic) NSString *vnum;
@property (strong, nonatomic) NSNumber *receivedQty;
@property (strong, nonatomic) NSNumber *shippedQty;
@end
......@@ -103,16 +103,12 @@ typedef enum : NSUInteger {
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)];
if (self.intertype == ShopDetailInterTypeTransport) {
}else{
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"删除" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_SAVE_COLOR];
[footView addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn];
}
_tableView.tableFooterView = footView;
[self.view addSubview:_tableView];
......@@ -191,7 +187,7 @@ typedef enum : NSUInteger {
if ([self informationComplete]) {
//只有发运单才需要差库存
if (self.intertype == ShopDetailInterTypeTransport) {
if (self.intertype == ShopDetailInterTypeTransport || self.intertype == ShopDetailInterTypeTranfer) {
__weak ShopDetaileViewController *weakSelf = self;
[self stockValidWithBillNumber:self.shopDetail.sourceBillNumber complete:^{
......@@ -321,6 +317,13 @@ typedef enum : NSUInteger {
ShowMessage(@"包装数量不能为空");
return NO;
}
double max = self.shopDetail.receivedQty.doubleValue - self.shopDetail.shippedQty.doubleValue;
if (packageQuantity.text.doubleValue > max && self.shopDetail.receivedQty != nil && self.shopDetail.shippedQty != nil){
NSString *info = [NSString stringWithFormat:@"包装数量不得大于可运包装数[%.0f]", max];
ShowMessage(info);
return NO;
}
if (self.packageUintStr.length == 0) {
ShowMessage(@"包装单位不能为空");
return NO;
......@@ -371,13 +374,14 @@ typedef enum : NSUInteger {
}
[cell setTitleStr:_dataArr[indexPath.row]];
if (self.intertype == ShopDetailInterTypeTransport){
cell.userInteractionEnabled = NO;
}
return cell;
}
- (void)createViewInCell:(SurveyCell *)cell indexPath:(NSIndexPath *)indexPath{
if (self.intertype == ShopDetailInterTypeTransport || self.intertype == ShopDetailInterTypeTranfer){
cell.userInteractionEnabled = NO;
}
NSString *title = _dataArr[indexPath.row];
if ([title isEqualToString:@"商品"] || [title isEqualToString:@"包装单位"]) {
......@@ -408,6 +412,10 @@ typedef enum : NSUInteger {
remarkTextView.placeholder = @"输入备注内容";
[cell.contentView addSubview:remarkTextView];
remark=remarkTextView; //备注
if (self.intertype == ShopDetailInterTypeTransport || self.intertype == ShopDetailInterTypeTranfer){
cell.userInteractionEnabled = YES;
}
}else{
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-30, TableHeight)];
textField.textAlignment = NSTextAlignmentRight;
......@@ -443,6 +451,10 @@ typedef enum : NSUInteger {
textField.placeholder = @"输入包装数量";
[textField addTarget:self action:@selector(textChange:) forControlEvents:UIControlEventAllEditingEvents];
packageQuantity=textField; //包装数量
if (self.intertype == ShopDetailInterTypeTransport || self.intertype == ShopDetailInterTypeTranfer) {
cell.userInteractionEnabled = YES;
}
}else if ([title isEqualToString:@"基础数量"]) {
_baseCountLabel = label;
[textField setEnabled:NO];
......@@ -627,15 +639,6 @@ typedef enum : NSUInteger {
- (void)setPacktAndTotalPrice{
if (self.basePrice && foundationUnitPrice.text.length > 0) {
if (foundationQuantity.text.length > 0) {
// float basePrice = [self.basePrice floatValue] * 100;
// int intBasePrice = (int)basePrice;
// int foundationQtt = [foundationQuantity.text intValue];
// double price = (intBasePrice * foundationQtt * 1.0);
// double totalPrice = price / 100;
// NSDecimalNumber *basePrice = [NSDecimalNumber decimalNumberWithDecimal:[self.basePrice decimalValue]];
// NSDecimalNumber *foundationQty = [NSDecimalNumber decimalNumberWithString:foundationQuantity.text];
// NSDecimalNumber *multiplyResult = [basePrice decimalNumberByMultiplyingBy:foundationQty];
NSDecimalNumber *multiplyResult = [CalculateHelper calculateNum1:self.basePrice num2:foundationQuantity.text type:CalculateTypeMul roundingType:NSRoundBankers cutLenth:2];
totalMoney.text = [multiplyResult stringValue];
self.totalPrice = multiplyResult;
......@@ -653,13 +656,6 @@ typedef enum : NSUInteger {
- (void)setUnitAndTotalPrice{
if (self.packPrice&&packageUnitPrice.text.length > 0) {
if (packageQuantity.text.length > 0) {
// float pakePrice = [self.packPrice floatValue] * 100;
// int intPakePrice = (int)pakePrice;
// int pakageQty = [packageQuantity.text intValue];
//
// double price = (intPakePrice * pakageQty * 1.0);
// double totalPrice = price / 100;
// float totalPrice = pakePrice * 100 * pakageQty / 100;
NSDecimalNumber *totalPrice = [CalculateHelper calculateNum1:self.packPrice num2:packageQuantity.text type:CalculateTypeMul roundingType:NSRoundBankers cutLenth:2];
totalMoney.text = [totalPrice stringValue];
self.totalPrice = totalPrice;
......@@ -675,15 +671,12 @@ typedef enum : NSUInteger {
- (void)setUnitAndPackPrice{
if (totalMoney.text.length > 0) {
if (packageQuantity.text.length > 0 && [packageQuantity.text floatValue] > 0) {
// float packagePrice = [self.totalPrice floatValue] / [packageQuantity.text floatValue];
NSDecimalNumber *packagePrice = [CalculateHelper calculateNum1:self.totalPrice num2:packageQuantity.text type:CalculateTypeDiv roundingType:NSRoundBankers cutLenth:2];
packageUnitPrice.text = packagePrice.stringValue;
self.packPrice = packagePrice;
}
if (foundationQuantity.text.length > 0 && [foundationQuantity.text floatValue] > 0) {
// float packagePrice = [self.totalPrice floatValue] / [foundationQuantity.text floatValue];
NSDecimalNumber *packagePrice = [CalculateHelper calculateNum1:self.totalPrice num2:foundationQuantity.text type:CalculateTypeDiv roundingType:NSRoundBankers cutLenth:2];
foundationUnitPrice.text = packagePrice.stringValue;
self.basePrice = packagePrice;
......
......@@ -222,7 +222,12 @@ typedef enum : NSUInteger {
}
NSMutableArray *billProducts = [NSMutableArray array];
for (TransferPdtDetail *pdtDetail in _bottomView.productVC.transferProductArr) {
[billProducts addObject:[pdtDetail dictForCommit]];
TransferPdtDetail *pdtCopy = [[TransferPdtDetail alloc] init];
[pdtCopy setValuesForKeysWithDictionary:pdtDetail.dictForCommit];
pdtCopy.receivedQty = nil;
pdtCopy.shippedQty = nil;
[billProducts addObject:[pdtCopy dictForCommit]];
}
NSMutableArray *costs = [NSMutableArray array];
for (FeeAcountDetail *fee in _bottomView.costVC.costArr) {
......@@ -523,6 +528,9 @@ typedef enum : NSUInteger {
billProduct.sourcetype = shopDetail.sourceType;
billProduct.sourcebillnumber = shopDetail.sourceBillNumber;
billProduct.sourcePdtDetail = shopDetail.sourceDetail;
billProduct.shippedQty = shopDetail.shippedQty;
billProduct.receivedQty = shopDetail.receivedQty;
return billProduct;
}
- (ShopDetail *)coverShopDetail:(TransferPdtDetail *)billProduct{
......@@ -544,6 +552,8 @@ typedef enum : NSUInteger {
shopDetail.sourceBillNumber = billProduct.sourcebillnumber;
shopDetail.sourceDetail = billProduct.sourcePdtDetail;
shopDetail.sourceType = billProduct.sourcetype;
shopDetail.receivedQty = billProduct.receivedQty;
shopDetail.shippedQty = billProduct.shippedQty;
return shopDetail;
}
......@@ -552,6 +562,7 @@ typedef enum : NSUInteger {
NSMutableArray *transferP = [NSMutableArray new];
for (TransportPdtDetail *pdt in products) {
TransferPdtDetail *ferPdt = [TransferPdtDetail new];
[ferPdt setValuesForKeysWithDictionary:pdt.dictForCommit];
ferPdt.uuid = pdt.uuid;
ferPdt.productCode = pdt.productCode;
ferPdt.productName = pdt.productName;
......@@ -578,6 +589,7 @@ typedef enum : NSUInteger {
NSInteger index = 0;
for (TransportPdtDetail *pdt in products) {
TransferPdtDetail *ferPdt = [TransferPdtDetail new];
[ferPdt setValuesForKeysWithDictionary:pdt.dictForCommit];
ferPdt.uuid = pdt.uuid;
ferPdt.productCode = pdt.productCode;
ferPdt.productName = pdt.productName;
......
......@@ -51,7 +51,7 @@
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.view addSubview:self.tableView];
NSArray *arr = @[@"商品",@"单价",@"包装数量"];
NSArray *arr = @[@"商品",@"待收包装数",@"已收包装数量"];
HeaderCell *headCell = [[HeaderCell alloc] initWithFrame:CGRectMake(0, 0, ScreenSize.width, 38) withArr:arr withHiddenEdit:self.isHiddenEdit];
[self.view addSubview:headCell];
......
......@@ -37,6 +37,8 @@
@property (nonatomic,strong)NSString *carphone; //司机电话
@property (nonatomic,strong)NSString *carnumber; //车牌号
@property (strong, nonatomic) NSNumber *receivedQty;//收货数量
//采购单商品对象
//@property (nonatomic,strong)NSString *uuid;//唯一标识
......
......@@ -144,8 +144,8 @@
- (void)setPdtDetail:(TransferPdtDetail *)pdtDetail row:(NSInteger)row{
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName;
self.priceLabel.text = [NSString stringWithFormat:@"%.2f元",[pdtDetail.price floatValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.priceLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.qty];
self.countLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.receivedQty ? pdtDetail.receivedQty : @"0"];
//已转运
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
......
......@@ -322,8 +322,12 @@ typedef enum : NSUInteger {
}
NSMutableArray *billProducts = [NSMutableArray array];
for (TransportPdtDetail *pdtDetail in _bottomView.productVC.transportProductArr) {
pdtDetail.shippedFlag = nil;
[billProducts addObject:[pdtDetail dictForCommit]];
TransportPdtDetail *pdtCopy = [[TransportPdtDetail alloc] init];
[pdtCopy setValuesForKeysWithDictionary:pdtDetail.dictForCommit];
pdtCopy.shippedFlag = nil;
pdtCopy.shippedQty = nil;
pdtCopy.receivedQty = nil;
[billProducts addObject:[pdtCopy dictForCommit]];
}
NSMutableArray *costs = [NSMutableArray array];
for (FeeAcountDetail *fee in _bottomView.costVC.costArr) {
......@@ -551,10 +555,13 @@ typedef enum : NSUInteger {
billProduct.baseUnit = shopDetail.packageQpcUnit;
billProduct.purchasebillnumber = shopDetail.sourceBillNumber;
billProduct.purchasePdtDetail = shopDetail.sourceDetail;
billProduct.receivedQty = shopDetail.receivedQty;
billProduct.shippedQty = shopDetail.shippedQty;
return billProduct;
}
- (ShopDetail *)coverShopDetail:(TransportPdtDetail *)billProduct{
ShopDetail *shopDetail = [[ShopDetail alloc]init];
[shopDetail setValuesForKeysWithDictionary:billProduct.dictForCommit];
shopDetail.uuid = billProduct.uuid;
shopDetail.product_uuid = billProduct.productUuid;
shopDetail.product_code = billProduct.productCode;
......@@ -569,6 +576,8 @@ typedef enum : NSUInteger {
shopDetail.remark = billProduct.note;
shopDetail.sourceDetail = billProduct.purchasePdtDetail;
shopDetail.sourceBillNumber = billProduct.purchasebillnumber;
shopDetail.receivedQty = billProduct.receivedQty;
shopDetail.shippedQty = billProduct.shippedQty;
return shopDetail;
}
......
......@@ -9,7 +9,7 @@
#import "TransportProductViewController.h"
#import "FooterCell.h"
#import "HeaderCell.h"
#import "TransportPurductCell.h"
#import "TransportCreateProductCell.h"
#import "TransportPdtDetail.h"
#import "GXFPopView.h"
......@@ -203,9 +203,9 @@
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellID = @"TransportPurductCell";
TransportPurductCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
TransportCreateProductCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[TransportPurductCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID withImageName:@"edit"];
cell = [[TransportCreateProductCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID withImageName:@"edit"];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (self.isHiddenEdit) {
cell.editBtn.hidden = YES;
......@@ -249,7 +249,7 @@
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
TransportPurductCell *cell = (TransportPurductCell *)[tableView cellForRowAtIndexPath:indexPath];
TransportCreateProductCell *cell = (TransportCreateProductCell *)[tableView cellForRowAtIndexPath:indexPath];
CGRect Linefrmame = cell.lineLabel.frame;
CGRect showfrmame = cell.showView.frame;
if (Linefrmame.origin.y == TableHeight - 1) {
......
......@@ -178,7 +178,7 @@ NSInteger purchaseStockCheckNumber = 0;
detail.transferBaseQty = arrDict[@"shippedBaseQty"];
detail.transferQty = arrDict[@"shippedQty"];
detail.note = arrDict[@"remark"] != [NSNull null] ? arrDict[@"remark"] : @"无";
detail.qty = @(detail.receivedQty.doubleValue - detail.shippedQty.doubleValue);
[transArr addObject:detail];
}
......@@ -328,7 +328,7 @@ NSInteger purchaseStockCheckNumber = 0;
return;
}
if (!self.isTransportIn) {
// if (!self.isTransportIn) {
//库存足够时,把临时数据放入正式的缓存数据中
for (NSString *key in dicProduct.allKeys) {
NSMutableArray *arrTemp = [dicProduct objectForKey:key];
......@@ -361,47 +361,47 @@ NSInteger purchaseStockCheckNumber = 0;
}
}
return;
}
//******************发运单要检查库存**********************
__weak TransportPurchaseViewController *weakSelf = self;
//判断数量问题
[IBTLoadingView showProgressLabel:@""];
[self stockValidWithDic:dicProduct billNumbers:array complete:^{
[IBTLoadingView hideHUDWithText:@""];
//库存足够时,把临时数据放入正式的缓存数据中
for (NSString *key in dicProduct.allKeys) {
NSMutableArray *arrTemp = [dicProduct objectForKey:key];
NSMutableArray *arrData = [weakSelf.dicProduct objectForKey:key];
if (!arrData) {
arrData = [NSMutableArray array];
[weakSelf.dicProduct setObject:arrData forKey:key];
}
[arrData addObjectsFromArray:arrTemp];
}
[weakSelf PopViewControllerAnimated:YES];
NSMutableArray*arr = [NSMutableArray array];
for (TransportPdtDetail *detail in weakSelf.indexArr) {
detail.purchasePdtDetail = detail.uuid;
detail.uuid = nil;
[arr addObject:detail];
}
if (weakSelf.getProchaseProduct) {
weakSelf.getProchaseProduct(arr);
}
for (PurchaseBill *bill in self.dataArr) {
if ([array containsObject:bill.billNumber]) {
if (weakSelf.blockFirstWarehouse) {
weakSelf.blockFirstWarehouse(@[bill]);
}
break;
}
}
}];
// return;
// }
//
// //******************发运单要检查库存**********************
// __weak TransportPurchaseViewController *weakSelf = self;
// //判断数量问题
// [IBTLoadingView showProgressLabel:@""];
// [self stockValidWithDic:dicProduct billNumbers:array complete:^{
// [IBTLoadingView hideHUDWithText:@""];
//
// //库存足够时,把临时数据放入正式的缓存数据中
// for (NSString *key in dicProduct.allKeys) {
// NSMutableArray *arrTemp = [dicProduct objectForKey:key];
// NSMutableArray *arrData = [weakSelf.dicProduct objectForKey:key];
// if (!arrData) {
// arrData = [NSMutableArray array];
// [weakSelf.dicProduct setObject:arrData forKey:key];
// }
// [arrData addObjectsFromArray:arrTemp];
// }
// [weakSelf PopViewControllerAnimated:YES];
// NSMutableArray*arr = [NSMutableArray array];
// for (TransportPdtDetail *detail in weakSelf.indexArr) {
// detail.purchasePdtDetail = detail.uuid;
// detail.uuid = nil;
// [arr addObject:detail];
// }
//
// if (weakSelf.getProchaseProduct) {
// weakSelf.getProchaseProduct(arr);
// }
//
// for (PurchaseBill *bill in self.dataArr) {
// if ([array containsObject:bill.billNumber]) {
// if (weakSelf.blockFirstWarehouse) {
// weakSelf.blockFirstWarehouse(@[bill]);
// }
// break;
// }
// }
// }];
......
......@@ -28,6 +28,7 @@
@property (nonatomic,strong)NSNumber *transferQty;//已转运数量
@property (nonatomic,strong)NSString *note;//备注
@property (strong, nonatomic) NSNumber *shippedFlag;
@property (strong, nonatomic) NSNumber *shippedQty;
//新增手机和车辆信息
@property (nonatomic,strong)NSString *carphone; //司机电话
......
//
// TransportCreateProductCell.h
// XFFruit
//
// Created by Javen on 2017/7/7.
// Copyright © 2017年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TransportPdtDetail.h"
@interface TransportCreateProductCell : UITableViewCell
@property (nonatomic,strong)UIImageView *smallImageView;
@property (nonatomic,strong)UIButton *editBtn;
@property (nonatomic,strong)UILabel *seqLabel;
@property (nonatomic,strong)UILabel *titleLabel;
/**
* 待收包装数
*/
@property (nonatomic,strong)UILabel *waitRecieveQtyLabel;
/**
* 已收包装数
*/
@property (nonatomic,strong)UILabel *recievedQtyLabel;
@property (nonatomic,strong)UILabel *shippedQtyLabel;
@property (nonatomic,strong)UILabel *lineLabel;
@property (nonatomic,strong)UIView *showView;
@property (nonatomic,strong)UILabel *showNameLabel;
@property (nonatomic,strong)UILabel *showStandLabel;
@property (nonatomic,strong)UILabel *showCountLabel;
@property (nonatomic,strong)UILabel *showBaseCountLabel;
@property (nonatomic,strong)UILabel *showPriceLabel;
@property (nonatomic,strong)UILabel *showTotalLabel;
@property (nonatomic,strong)UILabel *showNoteLabel;
@property (nonatomic,strong)UILabel *showPurchaseLabel;
@property (nonatomic,strong)UILabel *showShippedQty;//转运包装数量
@property (nonatomic,strong)UILabel *showShippedBaseQty;//转运基础数量
@property (nonatomic,strong)NSString *rightImageName;
- (void)setPdtDetail:(TransportPdtDetail *)pdtDetail row:(NSInteger)row;
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier withImageName:(NSString *)imageName;
@end
......@@ -58,7 +58,7 @@
self.secondTable.bounces = NO;
self.secondTable.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.bgView addSubview:self.secondTable];
NSArray *arr = @[@"商品",@"包装规格",@"包装数量",@"基础数量"];
NSArray *arr = @[@"商品",@"包装规格",@"已收货包装数",@"可运包装数"];
__weak TransportPurchaseCell *weakSelf = self;
self.headCell = [[HeaderCell alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 38) WithCheckBoxArr:arr checkBox:^(BOOL isSelect) {
......@@ -181,7 +181,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
//如果不是发运单,则可以单选
if (!self.isTransportIn) {
// if (!self.isTransportIn) {
TransportPdtDetail * billProduct = self.secondArr[indexPath.row];
if (billProduct.shippedFlag.boolValue) {
ShowMessage(@"该商品已经被转运或发运!");
......@@ -200,7 +200,7 @@
self.headCell.checkBox.isSelected = self.selectArr.count == self.secondArr.count;
[self.secondTable reloadData];
}
// }
}
- (BOOL)isHaveIndexPath:(TransportPdtDetail *)billProduct{
for (TransportPdtDetail *detail in self.selectArr) {
......
......@@ -179,9 +179,10 @@
- (void)setPdtDetail:(TransportPdtDetail *)pdtDetail row:(NSInteger)row{
self.seqLabel.text = [NSString stringWithFormat:@"%@",@(row+1)];
self.titleLabel.text = pdtDetail.productName;
// self.qpcLabel.text = [NSString stringWithFormat:@"%.1f元",[pdtDetail.qpc floatValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.shippedQtyLabel.text = @"0";
self.qpcLabel.text = [NSString stringWithFormat:@"%.1f",[pdtDetail.qpc floatValue]];
self.countLabel.text = [NSString stringWithFormat:@"%@",pdtDetail.shippedQty];
NSInteger validShioCount = pdtDetail.receivedQty.integerValue - pdtDetail.shippedQty.integerValue;
self.shippedQtyLabel.text = [NSString stringWithFormat:@"%lu", validShioCount];
self.showNameLabel.text = [NSString stringWithFormat:@"商品:%@[%@]",pdtDetail.productName,pdtDetail.productCode];
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
......
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