Răsfoiți Sursa

修改Select Upload Order,增加Header

Pen Li 9 ani în urmă
părinte
comite
b96b50d12d

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


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

@@ -10,6 +10,8 @@
 #import "iSalesDB.h"
 #import <sqlite3.h>
 #import "SelectOrderTableViewCell.h"
+#import "DefaultTableHeaderView.h"
+#import "DefaultAppearance.h"
 
 @interface SelectUploadOrderViewController ()<UITableViewDataSource,UITableViewDelegate>
 
@@ -146,10 +148,56 @@
 
 #pragma mark - delegate
 
-- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
+{
+    
+    NSString* value =[DefaultAppearance get_noneappearance_value:@"DefaultTableHeaderView" valuename:@"title_text_color"];
+    
+    if(value==nil)
+        value=@"";
+    unsigned long color = strtoul([value UTF8String],0,16);
+    
+    DefaultTableHeaderView* myView = [[DefaultTableHeaderView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 0.0001)];
+    myView.layer.shadowPath =[UIBezierPath bezierPathWithRect:myView.bounds].CGPath;
+    myView.layer.shadowColor = [UIColor blackColor].CGColor;
+    myView.layer.shadowOffset = CGSizeMake(0, 0);
+    myView.layer.shadowOpacity = 0.5;
+    myView.layer.shadowRadius = 2.0;
+    
+
+    
+    UILabel *solabel = [[UILabel alloc] initWithFrame:CGRectMake(48, 2, 100, 22)];
+    solabel.textColor=UIColorFromRGB(color);
+    solabel.backgroundColor = [UIColor clearColor];
+    solabel.text=NSLocalizedString(@"SO#", nil);
+    [solabel sizeToFit];
+    [myView addSubview:solabel];
+    
+    UILabel *userlabel = [[UILabel alloc] initWithFrame:CGRectMake(48, 21, 100, 22)];
+    userlabel.textColor=UIColorFromRGB(color);
+    userlabel.backgroundColor = [UIColor clearColor];
+    userlabel.text=NSLocalizedString(@"Contact", nil);
+    [userlabel sizeToFit];
+    [myView addSubview:userlabel];
+    
+    
+    
+    myView.autoresizesSubviews=true;
+
+    myView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+    //
+    return myView;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
+{
     return 44;
 }
 
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    return 86;
+}
+
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     
     SelectOrderTableViewCell *cell = (SelectOrderTableViewCell *)[tableView cellForRowAtIndexPath:indexPath];

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

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15C50" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
@@ -204,27 +204,27 @@
                         <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="lRS-dn-XTu">
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="68" sectionHeaderHeight="28" sectionFooterHeight="28" id="lRS-dn-XTu">
                                 <rect key="frame" x="0.0" y="0.0" width="768" height="934"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="SelectOrderTableViewCell" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="SelectOrderTableViewCell" id="XXr-fU-67o" customClass="SelectOrderTableViewCell">
-                                        <rect key="frame" x="0.0" y="28" width="768" height="44"/>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="SelectOrderTableViewCell" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="SelectOrderTableViewCell" rowHeight="86" id="XXr-fU-67o" customClass="SelectOrderTableViewCell">
+                                        <rect key="frame" x="0.0" y="28" width="768" height="86"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XXr-fU-67o" id="Ohn-hG-mj9">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="85"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="AIn-eK-sCn">
-                                                    <rect key="frame" x="48" y="15" width="202" height="21"/>
+                                                    <rect key="frame" x="48" y="15" width="712" height="21"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="hrK-DY-RbO">
-                                                    <rect key="frame" x="10" y="15" width="21" height="21"/>
+                                                    <rect key="frame" x="10" y="32" width="21" height="21"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" image="check_0_24"/>
                                                     <state key="selected" image="check_1_24"/>
@@ -233,8 +233,8 @@
                                                     </connections>
                                                 </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">
-                                                    <rect key="frame" x="381" y="15" width="341" height="21"/>
-                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <rect key="frame" x="48" y="50" width="712" height="21"/>
+                                                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                                     <nil key="highlightedColor"/>