Selaa lähdekoodia

增加上传的check 按钮的点击响应

Pen Li 9 vuotta sitten
vanhempi
commit
38a5a0c269

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 4 - 0
RedAnt ERP Mobile/common/Functions/offline/SelectOrderTableViewCell.h

@@ -8,9 +8,13 @@
 
 
 #import <UIKit/UIKit.h>
 #import <UIKit/UIKit.h>
 
 
+typedef void (^checkButtonBlock)(void);
+
 @interface SelectOrderTableViewCell : UITableViewCell
 @interface SelectOrderTableViewCell : UITableViewCell
 @property (strong, nonatomic) IBOutlet UILabel *labelsoid;
 @property (strong, nonatomic) IBOutlet UILabel *labelsoid;
 @property (strong, nonatomic) IBOutlet UILabel *labelcompany;
 @property (strong, nonatomic) IBOutlet UILabel *labelcompany;
 @property (strong, nonatomic) IBOutlet UIButton *checkedButton;
 @property (strong, nonatomic) IBOutlet UIButton *checkedButton;
 
 
+@property (nonatomic,copy) checkButtonBlock checkBlock;
+
 @end
 @end

+ 5 - 0
RedAnt ERP Mobile/common/Functions/offline/SelectOrderTableViewCell.m

@@ -25,5 +25,10 @@
 //    self.checkedButton.selected = !self.checkedButton.selected;
 //    self.checkedButton.selected = !self.checkedButton.selected;
     
     
 }
 }
+- (IBAction)checkButtonClick:(UIButton *)sender {
+    if (self.checkBlock) {
+        self.checkBlock();
+    }
+}
 
 
 @end
 @end

+ 8 - 1
RedAnt ERP Mobile/common/Functions/offline/SelectUploadOrderViewController.m

@@ -84,7 +84,7 @@
         int check = [dic[@"check"] integerValue];
         int check = [dic[@"check"] integerValue];
         NSString *so_id = dic[@"so_id"];
         NSString *so_id = dic[@"so_id"];
         
         
-        if (check == 0) {
+        if (check == 1) {
             [uploadArray addObject:so_id];
             [uploadArray addObject:so_id];
         }
         }
         
         
@@ -126,6 +126,13 @@
     cell.labelsoid.text = so_id;
     cell.labelsoid.text = so_id;
     cell.labelcompany.text = company_name;
     cell.labelcompany.text = company_name;
     
     
+    __weak typeof(self) weakSelf = self;
+    __weak typeof(tableView) weakTable = tableView;
+//    NSIndexPath *idxPath = [NSIndexPath indexPathForRow:indexPath.row inSection:0];
+    cell.checkBlock = ^{
+        [weakSelf tableView:weakTable didSelectRowAtIndexPath:indexPath];
+        
+    };
     
     
     return cell;
     return cell;
 }
 }

+ 4 - 1
RedAnt ERP Mobile/iSales-NPD/Base.lproj/OLM.storyboard

@@ -214,6 +214,9 @@
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" image="check_0_24"/>
                                                     <state key="normal" image="check_0_24"/>
                                                     <state key="selected" image="check_1_24"/>
                                                     <state key="selected" image="check_1_24"/>
+                                                    <connections>
+                                                        <action selector="checkButtonClick:" destination="XXr-fU-67o" eventType="touchUpInside" id="KeU-ld-H4J"/>
+                                                    </connections>
                                                 </button>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="v9S-8N-eqS">
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="v9S-8N-eqS">
                                                     <rect key="frame" x="381" y="15" width="341" height="21"/>
                                                     <rect key="frame" x="381" y="15" width="341" height="21"/>
@@ -254,7 +257,7 @@
                 </viewController>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="krm-rW-vWy" userLabel="First Responder" sceneMemberID="firstResponder"/>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="krm-rW-vWy" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
             </objects>
-            <point key="canvasLocation" x="2719" y="677"/>
+            <point key="canvasLocation" x="2976" y="669"/>
         </scene>
         </scene>
     </scenes>
     </scenes>
     <resources>
     <resources>