Commit 80825f5c authored by Sandy's avatar Sandy

查看采购单的时候,如果已运包装数大于0,则不显示作废按钮

parent 707e5ef7
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.0.14</string> <string>2.0.15</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>2.0.14</string> <string>2.0.15</string>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
<dict> <dict>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
......
...@@ -125,6 +125,7 @@ typedef enum : NSUInteger { ...@@ -125,6 +125,7 @@ typedef enum : NSUInteger {
PurchaseBill *bill = [[PurchaseBill alloc]init]; PurchaseBill *bill = [[PurchaseBill alloc]init];
[bill setValuesForKeysWithDictionary:dictData]; [bill setValuesForKeysWithDictionary:dictData];
self.bill = bill; self.bill = bill;
[strongSelf validAbort];
[weakSelf judgeType]; [weakSelf judgeType];
[_aBottomView refreshCost:dictData[@"accountDetails"]]; [_aBottomView refreshCost:dictData[@"accountDetails"]];
[strongSelf fetchtPurchaseDetail]; [strongSelf fetchtPurchaseDetail];
...@@ -160,16 +161,18 @@ typedef enum : NSUInteger { ...@@ -160,16 +161,18 @@ typedef enum : NSUInteger {
} }
- (void)createBtn{ //- (void)createBtn{
_firstBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenHeight - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR]; // _firstBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenHeight - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR];
[self.view addSubview:_firstBtn]; // [self.view addSubview:_firstBtn];
//
// _secondBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(_firstBtn.frame)+ LeftMargin, ScreenHeight - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"" titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
// [self.view addSubview:_secondBtn];
// [self showBtnByPermissions];
//}
_secondBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(_firstBtn.frame)+ LeftMargin, ScreenHeight - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"" titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR]; - (void)createBtnWithArr:(NSArray *)arrTitles{
[self.view addSubview:_secondBtn]; NSMutableArray *arr = [NSMutableArray arrayWithArray:arrTitles];
[self showBtnByPermissions];
}
- (void)createBtnWithArr:(NSArray *)arr{
CGFloat btnWidth = (ScreenSize.width - LeftMargin * (arr.count+1))/arr.count; CGFloat btnWidth = (ScreenSize.width - LeftMargin * (arr.count+1))/arr.count;
for (NSInteger i = 0; i < arr.count; i++) { for (NSInteger i = 0; i < arr.count; i++) {
NSInteger btnTag = 0; NSInteger btnTag = 0;
...@@ -194,6 +197,21 @@ typedef enum : NSUInteger { ...@@ -194,6 +197,21 @@ typedef enum : NSUInteger {
} }
} }
//判断是否可以作废
- (BOOL)validAbort {
for (NSDictionary *pdt in self.bill.products) {
PurchaseBillProduct *billProbuct = [PurchaseBillProduct new];
[billProbuct setValuesForKeysWithDictionary:pdt];
if (billProbuct.shippedQty.doubleValue > 0) {
UIButton *btn = [self.view viewWithTag:CancleTag];
btn.hidden = true;
return false;
}
}
return true;
}
//根据权限判断按钮显示 //根据权限判断按钮显示
- (void)showBtnByPermissions{ - (void)showBtnByPermissions{
//逻辑判断按钮显示不显示 //逻辑判断按钮显示不显示
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[billProduct.qpc stringValue],billProduct.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[billProduct.qpc stringValue],billProduct.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",billProduct.qty,billProduct.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",billProduct.qty,billProduct.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",billProduct.baseQty ,billProduct.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",billProduct.baseQty ,billProduct.baseUnit];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[billProduct.price floatValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.4f元",[billProduct.price floatValue]];
self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%.4f元",[billProduct.basePrice floatValue]]; self.showBasePriceLabel.text = [NSString stringWithFormat:@"基础单价:%.4f元",[billProduct.basePrice floatValue]];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[billProduct.total stringValue]]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%@元",[billProduct.total stringValue]];
self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",billProduct.remark ? billProduct.remark :@"无" ]; self.showNoteLabel.text =[NSString stringWithFormat:@"备注:%@",billProduct.remark ? billProduct.remark :@"无" ];
......
...@@ -210,8 +210,8 @@ ...@@ -210,8 +210,8 @@
if (transferProduct.rctBaseQty == nil) { if (transferProduct.rctBaseQty == nil) {
self.showshjcCountLabel.text = @"基础数量[实收]:空"; self.showshjcCountLabel.text = @"基础数量[实收]:空";
} }
self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[transferProduct.packprice floatValue]]; self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.4f元",[transferProduct.packprice floatValue]];
self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%.2f元",[transferProduct.price floatValue]]; self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%.4f元",[transferProduct.price floatValue]];
self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%.2f元",transferProduct.rctTotal?[transferProduct.rctTotal floatValue]:0.00f]; self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%.2f元",transferProduct.rctTotal?[transferProduct.rctTotal floatValue]:0.00f];
if (transferProduct.rctTotal == nil) { if (transferProduct.rctTotal == nil) {
......
...@@ -204,8 +204,8 @@ ...@@ -204,8 +204,8 @@
if (transferProduct.rctBaseQty == nil) { if (transferProduct.rctBaseQty == nil) {
self.showshjcCountLabel.text = @"基础数量[实收]:空"; self.showshjcCountLabel.text = @"基础数量[实收]:空";
} }
self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[transferProduct.packprice floatValue]]; self.showbzPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.4f元",[transferProduct.packprice floatValue]];
self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%.2f元",[transferProduct.price floatValue]]; self.showjcPriceLabel.text = [NSString stringWithFormat:@"基础单价:%.4f元",[transferProduct.price floatValue]];
self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%.2f元", self.showshTotalLabel.text = [NSString stringWithFormat:@"总金额[实收]:%.2f元",
transferProduct.rctQty.doubleValue * transferProduct.packprice.doubleValue]; transferProduct.rctQty.doubleValue * transferProduct.packprice.doubleValue];
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseUnit];
self.showBasePrice.text = [NSString stringWithFormat:@"基础单价:%@元", pdtDetail.price]; self.showBasePrice.text = [NSString stringWithFormat:@"基础单价:%@元", pdtDetail.price];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.4f元",[pdtDetail.packprice floatValue]];
NSString *sourceT = @""; NSString *sourceT = @"";
if ([pdtDetail.sourcetype isEqualToString:@"none"]) { if ([pdtDetail.sourcetype isEqualToString:@"none"]) {
sourceT = @"无"; sourceT = @"无";
......
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",pdtDetail.baseQty, self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",pdtDetail.baseQty,
pdtDetail.baseUnit]; pdtDetail.baseUnit];
self.showBasePrice.text = [NSString stringWithFormat:@"基础单价:%@元", pdtDetail.price]; self.showBasePrice.text = [NSString stringWithFormat:@"基础单价:%@元", pdtDetail.price];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.4f元",[pdtDetail.packprice floatValue]];
self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"]; self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]];
self.showShippedBaseQty.text = [NSString stringWithFormat:@"转运包装数量:%@%@",pdtDetail.transferQty ? [pdtDetail.transferQty stringValue]:@"0",pdtDetail.unit]; self.showShippedBaseQty.text = [NSString stringWithFormat:@"转运包装数量:%@%@",pdtDetail.transferQty ? [pdtDetail.transferQty stringValue]:@"0",pdtDetail.unit];
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit]; self.showStandLabel.text = [NSString stringWithFormat:@"包装规格:1*%@%@",[pdtDetail.qpc stringValue],pdtDetail.baseUnit];
self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit]; self.showCountLabel.text = [NSString stringWithFormat:@"包装数量:%@%@",[pdtDetail.qty stringValue],pdtDetail.unit];
self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseQty]; self.showBaseCountLabel.text =[NSString stringWithFormat:@"基础数量:%@%@",[pdtDetail.baseQty stringValue],pdtDetail.baseQty];
self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.2f元",[pdtDetail.packprice floatValue]]; self.showPriceLabel.text = [NSString stringWithFormat:@"包装单价:%.4f元",[pdtDetail.packprice floatValue]];
self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"]; self.showPurchaseLabel.text = [NSString stringWithFormat:@"采购单号:%@",pdtDetail.purchasebillnumber.length > 0 ? pdtDetail.purchasebillnumber: @"无"];
self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]]; self.showTotalLabel.text = [NSString stringWithFormat:@"总金额:%.2f元",[pdtDetail.total floatValue]];
self.showShippedBaseQty.text = [NSString stringWithFormat:@"转运包装数量:%@%@",pdtDetail.transferQty ? [pdtDetail.transferQty stringValue]:@"0",pdtDetail.unit]; self.showShippedBaseQty.text = [NSString stringWithFormat:@"转运包装数量:%@%@",pdtDetail.transferQty ? [pdtDetail.transferQty stringValue]:@"0",pdtDetail.unit];
......
No preview for this file type
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