Переглянути джерело

1.修改NPD Cart Section Header。

Pen Li 8 роки тому
батько
коміт
3ffda00bf7

+ 28 - 4
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -1590,8 +1590,17 @@
 - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
 {
     if (self.back_order_flag) {
-        UIView *header = [tableView dequeueReusableCellWithIdentifier:@"section_header_cell"];
-        UILabel *title_lb = [header viewWithTag:8520];
+//        UIView *header = [tableView dequeueReusableCellWithIdentifier:@"section_header_cell"];
+//        UILabel *title_lb = [header viewWithTag:8520];
+        UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 50.0f)];
+        header.backgroundColor = [UIColor colorWithRed:128 / 255.0 green:95 / 255.0 blue:54 / 255.0 alpha:1];
+        header.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+        
+        UILabel *title_lb = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, CGRectGetWidth(header.bounds) - 10, 50.0f)];
+        title_lb.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+        title_lb.font = [UIFont systemFontOfSize:25.0f];
+        [header addSubview:title_lb];
+        
         title_lb.text = [self titleForSection:section];
         return header;
     } else {
@@ -1920,7 +1929,15 @@
     if(!self.itemListTable.editing)
         return;
     
-    NSMutableDictionary * item_json = [self.content_arr[indexPath.row] mutableCopy];//[[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]] mutableCopy];
+//    NSMutableDictionary * item_json = [self.content_arr[indexPath.row] mutableCopy];//[[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]] mutableCopy];
+    
+    NSMutableDictionary * item_json = nil;
+    if (self.back_order_flag) {
+        item_json = [[self itemJsonAtIndexPath:indexPath] mutableCopy];
+    } else {
+        item_json = [self.content_arr[indexPath.row] mutableCopy];//[[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]] mutableCopy];
+        
+    }
     
     NSString *cart_item_id=[NSString stringWithFormat:@"%d",[[item_json valueForKey:@"cart_item_id"] intValue]];
     if ([self.edit_select_arr containsObject:cart_item_id])
@@ -1930,8 +1947,15 @@
 }
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
+    NSMutableDictionary * item_json = nil;
+    if (self.back_order_flag) {
+        item_json = [[self itemJsonAtIndexPath:indexPath] mutableCopy];
+    } else {
+        item_json = [self.content_arr[indexPath.row] mutableCopy];//[[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]] mutableCopy];
+        
+    }
     
-    NSMutableDictionary * item_json =[self.content_arr[indexPath.row] mutableCopy];// [[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]] mutableCopy];
+//    NSMutableDictionary * item_json =[self.content_arr[indexPath.row] mutableCopy];// [[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]] mutableCopy];
     if(self.itemListTable.editing)
     {
         

+ 5 - 5
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -2453,13 +2453,13 @@
                                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                         <color key="color" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                     </activityIndicatorView>
-                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="120" sectionHeaderHeight="22" sectionFooterHeight="22" id="r3H-Zh-AQ4">
+                                    <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="120" sectionHeaderHeight="28" sectionFooterHeight="28" id="r3H-Zh-AQ4">
                                         <rect key="frame" x="0.0" y="0.0" width="768" height="860"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                         <prototypes>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CartItemCell" rowHeight="146" id="0QE-xl-8q8" customClass="ModelItemCell">
-                                                <rect key="frame" x="0.0" y="22" width="768" height="146"/>
+                                                <rect key="frame" x="0.0" y="28" width="768" height="146"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="0QE-xl-8q8" id="tZa-g0-y6H">
                                                     <rect key="frame" x="0.0" y="0.0" width="768" height="145.5"/>
@@ -2599,7 +2599,7 @@
                                                 </connections>
                                             </tableViewCell>
                                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="section_header_cell" rowHeight="50" id="ijv-SU-8ew">
-                                                <rect key="frame" x="0.0" y="168" width="768" height="50"/>
+                                                <rect key="frame" x="0.0" y="174" width="768" height="50"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ijv-SU-8ew" id="0df-Vm-VB0">
                                                     <rect key="frame" x="0.0" y="0.0" width="768" height="49.5"/>
@@ -9799,7 +9799,7 @@ Email: redantsupport@united-us.net</string>
         <image name="check_0_24" width="24" height="24"/>
         <image name="check_1_24" width="24" height="24"/>
         <image name="checkbox" width="16" height="16"/>
-        <image name="close" width="40" height="40"/>
+        <image name="close" width="32" height="32"/>
         <image name="contact" width="72" height="72"/>
         <image name="continue" width="131" height="30"/>
         <image name="filter" width="32" height="32"/>