Bladeren bron

1.修改iOS Apex Mobile Result Document,移除Description,增加PO#和BOL。

Pen Li 7 jaren geleden
bovenliggende
commit
c021f13bab

+ 2 - 1
Apex Mobile/Apex Mobile/RANetwork.m

@@ -1458,7 +1458,8 @@
                                 @"type": @3,
                                 @"fileName":@"A1811390637FR1-UTA.pdf",
                                 @"fileType":@"HBL",
-                                @"fileDesc":@"BOL:A1811390637, PO#:0001791,0001722,0001885",
+                                @"po":@"0001791,0001722,0001885",
+                                @"bol":@"A1811390637",
                                 @"rowActionParameters":@[
                                                          @"handset_search",
                                                          @"download_doc",

+ 2 - 1
Apex Mobile/Apex Mobile/Result/Cell/ApexResultDocumentCell.h

@@ -14,7 +14,8 @@
 
 - (instancetype)setFileName:(NSString *)fileName;
 - (instancetype)setFileType:(NSString *)fileType;
-- (instancetype)setFileDescription:(NSString *)fileDescription;
+- (instancetype)setFilePO:(NSString *)po;
+- (instancetype)setFileBOL:(NSString *)bol;
 
 @end
 

+ 11 - 4
Apex Mobile/Apex Mobile/Result/Cell/ApexResultDocumentCell.m

@@ -14,7 +14,9 @@
 @property (nonatomic,strong) IBOutlet UIImageView *fileIconView;
 @property (nonatomic,strong) IBOutlet UILabel *fileNameLabel;
 @property (nonatomic,strong) IBOutlet UILabel *fileTypeLabel;
-@property (nonatomic,strong) IBOutlet UILabel *fileDescLabel;
+@property (nonatomic,strong) IBOutlet UILabel *filePOLabel;
+@property (nonatomic,strong) IBOutlet UILabel *fileBOLLabel;
+
 
 @property (nonatomic,strong) UIView *selectView;
 
@@ -49,7 +51,7 @@
 - (void)prepareForReuse {
     [super prepareForReuse];
     
-    [[[self setFileName:nil] setFileType:nil] setFileDescLabel:nil];
+    [[[[self setFileName:nil] setFileType:nil] setFileBOL:nil] setFilePO:nil];
 }
 
 #pragma mark - Getter
@@ -70,8 +72,13 @@
     return self;
 }
 
-- (instancetype)setFileDescription:(NSString *)fileDescription {
-    self.fileDescLabel.text = fileDescription;
+- (instancetype)setFilePO:(NSString *)po {
+    self.filePOLabel.text = po;
+    return self;
+}
+
+- (instancetype)setFileBOL:(NSString *)bol {
+    self.fileBOLLabel.text = bol;
     return self;
 }
 

+ 23 - 13
Apex Mobile/Apex Mobile/Result/Cell/ApexResultDocumentCell.xib

@@ -12,18 +12,18 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="77" id="KGk-i7-Jjw" customClass="ApexResultDocumentCell">
-            <rect key="frame" x="0.0" y="0.0" width="567" height="77"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="100" id="KGk-i7-Jjw" customClass="ApexResultDocumentCell">
+            <rect key="frame" x="0.0" y="0.0" width="567" height="100"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
-                <rect key="frame" x="0.0" y="0.0" width="567" height="76.5"/>
+                <rect key="frame" x="0.0" y="0.0" width="567" height="99.5"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Svu-j8-b5X">
-                        <rect key="frame" x="5" y="15" width="557" height="61.5"/>
+                        <rect key="frame" x="5" y="15" width="557" height="84.5"/>
                         <subviews>
                             <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mode_document" translatesAutoresizingMaskIntoConstraints="NO" id="HhT-58-RDI">
-                                <rect key="frame" x="10" y="10" width="48" height="48"/>
+                                <rect key="frame" x="10" y="18" width="48" height="48"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="48" id="OT1-ho-dUl"/>
                                     <constraint firstAttribute="height" constant="48" id="ZYj-Zo-VVw"/>
@@ -35,8 +35,8 @@
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="desc" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xwz-QR-e6d">
-                                <rect key="frame" x="66" y="35.5" width="486" height="21"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PO#:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xwz-QR-e6d">
+                                <rect key="frame" x="66" y="35.5" width="486" height="18"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                 <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <nil key="highlightedColor"/>
@@ -47,18 +47,27 @@
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BOL:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ms4-My-MJ5">
+                                <rect key="frame" x="66" y="58.5" width="486" height="18"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
-                            <constraint firstItem="yj3-N6-PFN" firstAttribute="top" secondItem="HhT-58-RDI" secondAttribute="top" id="ETb-Fk-maQ"/>
+                            <constraint firstAttribute="bottom" secondItem="Ms4-My-MJ5" secondAttribute="bottom" constant="8" id="6gw-u6-rs9"/>
+                            <constraint firstItem="Xwz-QR-e6d" firstAttribute="trailing" secondItem="cse-Lk-XCd" secondAttribute="trailing" id="7H2-z1-bI5"/>
+                            <constraint firstItem="Ms4-My-MJ5" firstAttribute="trailing" secondItem="Xwz-QR-e6d" secondAttribute="trailing" id="DAj-6j-GWd"/>
                             <constraint firstItem="HhT-58-RDI" firstAttribute="leading" secondItem="Svu-j8-b5X" secondAttribute="leading" constant="10" id="GRY-d1-2AW"/>
                             <constraint firstItem="Xwz-QR-e6d" firstAttribute="top" secondItem="yj3-N6-PFN" secondAttribute="bottom" constant="5" id="Gbx-SF-0JX"/>
-                            <constraint firstItem="Xwz-QR-e6d" firstAttribute="trailing" secondItem="cse-Lk-XCd" secondAttribute="trailing" id="KRO-9i-gn2"/>
                             <constraint firstAttribute="trailing" secondItem="cse-Lk-XCd" secondAttribute="trailing" constant="5" id="LYl-CQ-Yk4"/>
                             <constraint firstItem="yj3-N6-PFN" firstAttribute="leading" secondItem="HhT-58-RDI" secondAttribute="trailing" constant="8" id="V44-zJ-Elx"/>
-                            <constraint firstAttribute="bottom" secondItem="Xwz-QR-e6d" secondAttribute="bottom" constant="5" id="VtG-qu-Yic"/>
+                            <constraint firstItem="yj3-N6-PFN" firstAttribute="top" secondItem="Svu-j8-b5X" secondAttribute="top" constant="10" id="WMm-ZX-LRU"/>
                             <constraint firstItem="Xwz-QR-e6d" firstAttribute="leading" secondItem="yj3-N6-PFN" secondAttribute="leading" id="csQ-or-l7X"/>
-                            <constraint firstItem="HhT-58-RDI" firstAttribute="top" secondItem="Svu-j8-b5X" secondAttribute="top" constant="10" id="hTL-HJ-cvG"/>
+                            <constraint firstItem="Ms4-My-MJ5" firstAttribute="leading" secondItem="Xwz-QR-e6d" secondAttribute="leading" id="czd-SF-AdZ"/>
+                            <constraint firstItem="HhT-58-RDI" firstAttribute="top" secondItem="Svu-j8-b5X" secondAttribute="top" constant="18" id="hTL-HJ-cvG"/>
+                            <constraint firstItem="Ms4-My-MJ5" firstAttribute="top" secondItem="Xwz-QR-e6d" secondAttribute="bottom" constant="5" id="tlr-Q6-yhp"/>
                             <constraint firstItem="cse-Lk-XCd" firstAttribute="centerY" secondItem="yj3-N6-PFN" secondAttribute="centerY" id="xYq-7t-jSb"/>
                         </constraints>
                     </view>
@@ -73,12 +82,13 @@
             <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
             <connections>
                 <outlet property="bgView" destination="Svu-j8-b5X" id="3qM-ZG-hns"/>
-                <outlet property="fileDescLabel" destination="Xwz-QR-e6d" id="df1-Gl-sU4"/>
+                <outlet property="fileBOLLabel" destination="Ms4-My-MJ5" id="0tb-UC-B4I"/>
                 <outlet property="fileIconView" destination="HhT-58-RDI" id="IwC-6T-CoK"/>
                 <outlet property="fileNameLabel" destination="yj3-N6-PFN" id="yCI-Lv-Okk"/>
+                <outlet property="filePOLabel" destination="Xwz-QR-e6d" id="NhU-HJ-3GV"/>
                 <outlet property="fileTypeLabel" destination="cse-Lk-XCd" id="DEF-t9-k60"/>
             </connections>
-            <point key="canvasLocation" x="-178.40000000000001" y="56.221889055472268"/>
+            <point key="canvasLocation" x="-178.40000000000001" y="55.772113943028494"/>
         </tableViewCell>
     </objects>
     <resources>

+ 2 - 1
Apex Mobile/Apex Mobile/Result/Model/ApexResultDocumentModel.h

@@ -12,7 +12,8 @@
 
 @property (nonatomic,copy) NSString *fileName;
 @property (nonatomic,copy) NSString *fileType;
-@property (nonatomic,copy) NSString *fileDesc;
+@property (nonatomic,copy) NSString *po;
+@property (nonatomic,copy) NSString *bol;
 
 @end
 

+ 9 - 1
Apex Mobile/Apex Mobile/Result/Model/ApexResultDocumentModel.m

@@ -11,7 +11,15 @@
 @implementation ApexResultDocumentModel
 
 - (CGFloat)height {
-    return 77.0f;
+    return 100.0f;
+}
+
+- (void)setPo:(NSString *)po {
+    _po = [NSString stringWithFormat:@"PO#:%@", po ? po : @""];
+}
+
+- (void)setBol:(NSString *)bol {
+    _bol = [NSString stringWithFormat:@"BOL:%@", bol ? bol : @""];
 }
 
 @end

+ 1 - 1
Apex Mobile/Apex Mobile/Result/TableDataSource/ApexResultViewController+TableDataSource.m

@@ -73,7 +73,7 @@
             
             ApexResultDocumentModel *docModel = (ApexResultDocumentModel *)model;
             ApexResultDocumentCell *cell = [tableView dequeueReusableCellWithIdentifier:ApexResultDocumentCell.identifier forIndexPath:indexPath];
-            [[[cell setFileName:docModel.fileName] setFileType:docModel.fileType] setFileDescription:docModel.fileDesc];
+            [[[[cell setFileName:docModel.fileName] setFileType:docModel.fileType] setFilePO:docModel.po] setFileBOL:docModel.bol];
             return cell;
         }
             break;