Jelajahi Sumber

1.修改RedAnt Mobile Search,完成界面创建。
2.修改RedAnt Mobile,添加CommonEditor Range类型Item。

Pen Li 8 tahun lalu
induk
melakukan
fedf355520

+ 18 - 0
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.pbxproj

@@ -19,6 +19,8 @@
 		4221EFB51FA8599A0026E1EC /* UIView+JLExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EFB11FA853660026E1EC /* UIView+JLExtension.m */; };
 		4221EFB61FA859B80026E1EC /* JLRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221EFA81FA853660026E1EC /* JLRefreshFooter.m */; };
 		4221EFB81FA879470026E1EC /* Result.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4221EFB71FA879470026E1EC /* Result.storyboard */; };
+		42973AD61FBA8F4A00A3C164 /* Phone_Range_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42973AD41FBA8F4900A3C164 /* Phone_Range_Cell.xib */; };
+		42973AD71FBA8F4A00A3C164 /* CommonEditorRangeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 42973AD51FBA8F4A00A3C164 /* CommonEditorRangeCell.m */; };
 		42DFAE6B1F9B2B73009AFCCC /* Phone_Action_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE6A1F9B2B73009AFCCC /* Phone_Action_Cell.xib */; };
 		42DFAE6D1F9B2BE4009AFCCC /* Phone_Edit_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE6C1F9B2BE4009AFCCC /* Phone_Edit_Cell.xib */; };
 		42DFAE6F1F9B2C18009AFCCC /* Phone_Enum_Cell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42DFAE6E1F9B2C18009AFCCC /* Phone_Enum_Cell.xib */; };
@@ -135,6 +137,9 @@
 		4221EFB01FA853660026E1EC /* UIView+JLExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+JLExtension.h"; sourceTree = "<group>"; };
 		4221EFB11FA853660026E1EC /* UIView+JLExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+JLExtension.m"; sourceTree = "<group>"; };
 		4221EFB71FA879470026E1EC /* Result.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Result.storyboard; sourceTree = "<group>"; };
+		42973AD31FBA8F4900A3C164 /* CommonEditorRangeCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommonEditorRangeCell.h; path = "../../RedAnt ERP Mobile/common/CommonEditor/CommonEditorRangeCell.h"; sourceTree = "<group>"; };
+		42973AD41FBA8F4900A3C164 /* Phone_Range_Cell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = Phone_Range_Cell.xib; path = "../../RedAnt ERP Mobile/common/CommonEditor/Phone_Range_Cell.xib"; sourceTree = "<group>"; };
+		42973AD51FBA8F4A00A3C164 /* CommonEditorRangeCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommonEditorRangeCell.m; path = "../../RedAnt ERP Mobile/common/CommonEditor/CommonEditorRangeCell.m"; sourceTree = "<group>"; };
 		42DFAE6A1F9B2B73009AFCCC /* Phone_Action_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Action_Cell.xib; sourceTree = "<group>"; };
 		42DFAE6C1F9B2BE4009AFCCC /* Phone_Edit_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Edit_Cell.xib; sourceTree = "<group>"; };
 		42DFAE6E1F9B2C18009AFCCC /* Phone_Enum_Cell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Phone_Enum_Cell.xib; sourceTree = "<group>"; };
@@ -355,6 +360,16 @@
 			path = Header;
 			sourceTree = "<group>";
 		};
+		42973ACD1FBA8EFA00A3C164 /* RangeCell */ = {
+			isa = PBXGroup;
+			children = (
+				42973AD31FBA8F4900A3C164 /* CommonEditorRangeCell.h */,
+				42973AD51FBA8F4A00A3C164 /* CommonEditorRangeCell.m */,
+				42973AD41FBA8F4900A3C164 /* Phone_Range_Cell.xib */,
+			);
+			name = RangeCell;
+			sourceTree = "<group>";
+		};
 		42DFAE601F9B2A01009AFCCC /* ActionCell */ = {
 			isa = PBXGroup;
 			children = (
@@ -698,6 +713,7 @@
 				42DFAE671F9B2A71009AFCCC /* SignatureCell */,
 				42DFAE681F9B2A7F009AFCCC /* SwitchCell */,
 				42DFAE691F9B2A90009AFCCC /* TextViewCell */,
+				42973ACD1FBA8EFA00A3C164 /* RangeCell */,
 				71F3AA2A1F612369001036C8 /* CommonEditorViewController.h */,
 				71F3AA2B1F612369001036C8 /* CommonEditorViewController.m */,
 				71F3AA2C1F612369001036C8 /* DatePickerViewController.h */,
@@ -838,6 +854,7 @@
 				42DFAE791F9B2CBD009AFCCC /* Phone_Signature_Cell.xib in Resources */,
 				71F3A9B01F5F8E22001036C8 /* LaunchScreen.storyboard in Resources */,
 				42DFAE711F9B2C36009AFCCC /* Phone_Image_Cell.xib in Resources */,
+				42973AD61FBA8F4A00A3C164 /* Phone_Range_Cell.xib in Resources */,
 				42DFAE7D1F9B2D02009AFCCC /* Phone_TextView_Cell.xib in Resources */,
 				71F3AA0D1F61151D001036C8 /* commoneditor.phone.xib in Resources */,
 				71FF602B1FA802AB00C5523A /* loginUI.json in Resources */,
@@ -880,6 +897,7 @@
 				71F3A9A81F5F8E22001036C8 /* RARootViewController.m in Sources */,
 				71F3AA921F627700001036C8 /* DefaultTableHeaderView.m in Sources */,
 				71F3AA5F1F624AD4001036C8 /* StrikethroughLabel.m in Sources */,
+				42973AD71FBA8F4A00A3C164 /* CommonEditorRangeCell.m in Sources */,
 				71F3A9EE1F5FA557001036C8 /* mztools.c in Sources */,
 				71F3AA861F626E14001036C8 /* RAConvertor.m in Sources */,
 				71F3A9F01F5FA557001036C8 /* zip.c in Sources */,

TEMPAT SAMPAH
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 49 - 4
RedAnt Mobile/RedAnt Mobile/Base.lproj/Main.storyboard

@@ -30,7 +30,7 @@
                                         <rect key="frame" x="0.0" y="28" width="375" height="40"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="dIs-Xr-nJO" id="0xv-T2-kkQ">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="39.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
                                             <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" translatesAutoresizingMaskIntoConstraints="NO" id="dbw-1x-pdX">
@@ -107,7 +107,7 @@
                                         <rect key="frame" x="0.0" y="28" width="375" height="50"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XVx-Pj-3l6" id="j2k-Zt-2jZ">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" placeholder="place order" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="O29-II-M5r">
@@ -135,7 +135,7 @@
                                         <rect key="frame" x="0.0" y="78" width="375" height="50"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5oS-6f-gIz" id="Tg3-Nx-TXI">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="49.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="记住我的登录状态" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="68b-FX-thz">
@@ -347,7 +347,7 @@
                                                         <rect key="frame" x="0.0" y="28" width="375" height="44"/>
                                                         <autoresizingMask key="autoresizingMask"/>
                                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Z8S-HU-HU3" id="dk1-pX-E1r">
-                                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                                            <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
                                                             <autoresizingMask key="autoresizingMask"/>
                                                         </tableViewCellContentView>
                                                     </tableViewCell>
@@ -399,6 +399,51 @@
             </objects>
             <point key="canvasLocation" x="-1564" y="160"/>
         </scene>
+        <!--Search View Controller-->
+        <scene sceneID="4dJ-f3-XCX">
+            <objects>
+                <viewController storyboardIdentifier="SearchViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="Yib-5F-rp7" customClass="SearchViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="bfw-v0-DPT"/>
+                        <viewControllerLayoutGuide type="bottom" id="8So-B7-4rn"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="FHx-Ej-UYr">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QjH-NE-vzj">
+                                <rect key="frame" x="0.0" y="20" width="375" height="597"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </view>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7vx-mj-blW">
+                                <rect key="frame" x="290" y="617" width="80" height="45"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="45" id="VHm-sI-49B"/>
+                                </constraints>
+                                <state key="normal" title="Load Saved"/>
+                                <connections>
+                                    <action selector="loadSaveBtnClick:" destination="Yib-5F-rp7" eventType="touchUpInside" id="kop-pC-SPj"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" red="0.87941224093264247" green="0.87941224093264247" blue="0.87941224093264247" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="8So-B7-4rn" firstAttribute="top" secondItem="QjH-NE-vzj" secondAttribute="bottom" constant="50" id="IxC-KN-hpb"/>
+                            <constraint firstItem="8So-B7-4rn" firstAttribute="top" secondItem="7vx-mj-blW" secondAttribute="bottom" constant="5" id="SCX-Yh-Uwz"/>
+                            <constraint firstItem="QjH-NE-vzj" firstAttribute="leading" secondItem="FHx-Ej-UYr" secondAttribute="leading" id="Uck-Bk-0Br"/>
+                            <constraint firstAttribute="trailing" secondItem="QjH-NE-vzj" secondAttribute="trailing" id="tzp-Vw-QIX"/>
+                            <constraint firstItem="QjH-NE-vzj" firstAttribute="top" secondItem="bfw-v0-DPT" secondAttribute="bottom" id="ve1-uC-CJM"/>
+                            <constraint firstAttribute="trailing" secondItem="7vx-mj-blW" secondAttribute="trailing" constant="5" id="xTj-5L-njZ"/>
+                        </constraints>
+                    </view>
+                    <connections>
+                        <outlet property="tableContainer" destination="QjH-NE-vzj" id="nlP-4d-nV9"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="fpi-xn-cgm" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-803" y="158"/>
+        </scene>
     </scenes>
     <resources>
         <image name="setting" width="60" height="60"/>

+ 14 - 11
RedAnt Mobile/RedAnt Mobile/RARootViewController.m

@@ -116,19 +116,22 @@
 - (void) processQueryModel:(RAModel *)model {
     
     
-    SearchViewController *vc=[[SearchViewController alloc] initWithNibName:@"common" bundle:nil];
-    
+    SearchViewController *queryVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"SearchViewController"];
     
+    queryVC.params = [NSMutableDictionary dictionary];
+    queryVC.request_url = @"search_ui";
+    queryVC.url_type = URL_LOCAL;
+
     //    BViewController *vc =[BViewController new];//[ self.storyboard instantiateViewControllerWithIdentifier:@"commonVC"];
-    
-    
-    
-    [self presentViewController:vc animated:true completion:nil];
-    
-    
-    RAQueryViewController *queryVC = [[UIStoryboard storyboardWithName:@"RAQuery" bundle:nil] instantiateInitialViewController];
-    queryVC.url = model.url;
-    queryVC.title = model.name;
+//
+//
+//
+//    [self presentViewController:vc animated:true completion:nil];
+//
+//
+//    RAQueryViewController *queryVC = [[UIStoryboard storyboardWithName:@"RAQuery" bundle:nil] instantiateInitialViewController];
+//    queryVC.url = model.url;
+//    queryVC.title = model.name;
     [self.navigationController pushViewController:queryVC animated:YES];
 }
 

+ 24 - 7
RedAnt Mobile/RedAnt Mobile/SearchViewController.m

@@ -17,6 +17,8 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    
+    [self setupNavigationBar];
 }
 
 - (void)didReceiveMemoryWarning {
@@ -24,15 +26,30 @@
     // Dispose of any resources that can be recreated.
 }
 
-/*
-#pragma mark - Navigation
+#pragma mark - Setup UI
 
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
+- (void)setupNavigationBar {
+    
+    UIBarButtonItem *saveItem = [[UIBarButtonItem alloc] initWithTitle:@"Save" style:UIBarButtonItemStylePlain target:self action:@selector(saveItemClick:)];
+    UIBarButtonItem *searchItem = [[UIBarButtonItem alloc] initWithTitle:@"Search" style:UIBarButtonItemStylePlain target:self action:@selector(searchItemClick:)];
+    
+    self.navigationItem.rightBarButtonItems = @[searchItem,saveItem];
 }
-*/
+
+#pragma mark - Action
+
+- (void)searchItemClick:(UIBarButtonItem *)item {
+    
+}
+
+- (void)saveItemClick:(UIBarButtonItem *)item {
+    
+}
+
+- (IBAction)loadSaveBtnClick:(UIButton *)sender {
+}
+
+
 #pragma mark Request Editor
 -(NSDictionary*)request_Editor:(NSString*) request_url params:(NSMutableDictionary*)params
 {

+ 3 - 2
RedAnt Mobile/RedAnt Mobile/search_ui.json

@@ -137,11 +137,12 @@
         },
         "item_4": {
             "type": "date",
+            "keyboard": "number",
             "aname": "Invoice Date Betwin",
             "name": "invoice_range",
             "control": "range",
-            "value0": "",
-            "value1": ""
+            "min_value": "",
+            "max_value": ""
         },
         "item_5": {
             "keyboard": "text",