Explorar el Código

修改Merge为Combine。
修改价格设置锁的提示语句。
修改新建order时attention -> warning

Pen Li hace 9 años
padre
commit
5a78b20843

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


+ 27 - 11
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -27,7 +27,7 @@
 
 @property (nonatomic,strong) NSMutableArray *mergeList;
 
-@property (strong, nonatomic) IBOutlet UIButton *mergeListButton;
+@property (strong, nonatomic) IBOutlet UIBarButtonItem *mergeListButton;
 
 @end
 
@@ -120,8 +120,6 @@
     self.content_data = [[NSMutableArray alloc]init];
     
     
-    
-    
     UIRefreshControl *ref = [[UIRefreshControl alloc]init];
     ref.tag = 201 ;
     ref.attributedTitle = [[NSAttributedString alloc]initWithString:@"Pull to refresh"];
@@ -275,14 +273,33 @@
     
     // 检查权限
     AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    NSMutableArray *items = [self.toolbarView.items mutableCopy];
+    
     if(appDelegate.user && appDelegate.user_type == USER_ROLE_CUSTOMER) {
         
+        
         // 合并订单的权限
-        self.mergeListButton.hidden = ![Singleton sharedInstance].permissions_merge_order;
+        if ([Singleton sharedInstance].permissions_merge_order) { // 能够合并
+            
+            if (![items containsObject:self.mergeListButton]) { // 没显示button
+                [items insertObject:self.mergeListButton atIndex:4];
+                self.toolbarView.items = items;
+            }
+            
+        } else { // 不能合并
+            if ([items containsObject:self.mergeListButton]) { // 显示button
+                [items removeObject:self.mergeListButton];
+                self.toolbarView.items = items;
+            }
+        }
 
     } else {
         
-        self.mergeListButton.hidden = YES;
+//        self.mergeListButton.hidden = YES;
+        if ([items containsObject:self.mergeListButton]) { // 显示button
+            [items removeObject:self.mergeListButton];
+            self.toolbarView.items = items;
+        }
     }
     
 }
@@ -300,7 +317,7 @@
             
         }
     }
-    UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Attention", nil) message:msg delegate:self cancelButtonTitle:NSLocalizedString(@"NO", nil) otherButtonTitles:NSLocalizedString(@"YES", nil), nil];
+    UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Warning", nil) message:msg delegate:self cancelButtonTitle:NSLocalizedString(@"NO", nil) otherButtonTitles:NSLocalizedString(@"YES", nil), nil];
     [alert show];
     
     
@@ -1278,7 +1295,7 @@
         
     } else if (appDelegate.user_type==USER_ROLE_CUSTOMER) {
         
-        UITableViewRowAction *add2MergeListAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Add To MergeList" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
+        UITableViewRowAction *add2MergeListAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Add To Combine Order List" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
             
             NSString *orderCode = [NSString stringWithFormat:@"%@",[self.content_data[indexPath.row] valueForKey:@"order_code"]];
             
@@ -1532,12 +1549,12 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 #pragma mark - button action
 
-- (IBAction)mergeListButtonClick:(UIButton *)sender {
+- (IBAction)mergeListButtonClick:(UIBarButtonItem *)sender {
     
     
     if (!self.mergeList.count) {
         
-        [RAUtils message_alert:@"Merge List is Empty" title:nil controller:self];
+        [RAUtils message_alert:@"Combine Order List is Empty" title:nil controller:self];
         return;
     }
     
@@ -1547,13 +1564,12 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     
     mergeVC.mergeList = self.mergeList;
     
-    mergeVC.title = @"Merge List";
+    mergeVC.title = @"Combine Order List";
     
     __weak typeof(self) weakself = self;
     
     mergeVC.mergeBlock = ^(NSDictionary *ret) {
       
-        DebugLog(@"merge order return: %@",ret);
         
         if (weakself) {
             

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

@@ -2970,10 +2970,10 @@
                                             <action selector="onStatusFilterClick:" destination="Jst-hh-WTF" id="yeU-H5-b4F"/>
                                         </connections>
                                     </barButtonItem>
-                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="XgM-Ds-OBI"/>
+                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="i9Q-TF-bBL"/>
                                     <barButtonItem style="plain" id="dZA-gs-cR2">
                                         <searchBar key="customView" contentMode="redraw" searchBarStyle="minimal" placeholder="Sale order number, sales rep, create by, contact" id="afv-fP-PRn">
-                                            <rect key="frame" x="198" y="0.0" width="364" height="44"/>
+                                            <rect key="frame" x="187" y="0.0" width="364" height="44"/>
                                             <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                                             <textInputTraits key="textInputTraits"/>
                                             <connections>
@@ -2981,22 +2981,12 @@
                                             </connections>
                                         </searchBar>
                                     </barButtonItem>
-                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="L0d-T1-Fz0"/>
-                                    <barButtonItem style="plain" id="RsL-7F-uf5">
-                                        <button key="customView" opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="bAb-Lk-i0b">
-                                            <rect key="frame" x="590" y="7" width="90" height="30"/>
-                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                            <state key="normal" title="Merge List">
-                                                <color key="titleColor" red="0.60000002379999995" green="0.40000000600000002" blue="0.20000000300000001" alpha="1" colorSpace="calibratedRGB"/>
-                                            </state>
-                                            <state key="highlighted" title="Merge List">
-                                                <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
-                                            </state>
-                                            <connections>
-                                                <action selector="mergeListButtonClick:" destination="Jst-hh-WTF" eventType="touchUpInside" id="Jyf-Pg-iY9"/>
-                                            </connections>
-                                        </button>
+                                    <barButtonItem style="plain" systemItem="flexibleSpace" id="VhY-Il-XfG"/>
+                                    <barButtonItem image="btn_addtocart_large" id="1xy-6z-T44">
+                                        <color key="tintColor" red="0.60000002379999995" green="0.40000000600000002" blue="0.20000000300000001" alpha="1" colorSpace="calibratedRGB"/>
+                                        <connections>
+                                            <action selector="mergeListButtonClick:" destination="Jst-hh-WTF" id="AJ1-4H-oBD"/>
+                                        </connections>
                                     </barButtonItem>
                                     <barButtonItem style="plain" systemItem="flexibleSpace" id="kuR-14-mMo"/>
                                     <barButtonItem image="neworder" id="wye-VI-b4W">
@@ -3137,7 +3127,7 @@
                         <outlet property="btn_newOrder" destination="wye-VI-b4W" id="kUg-HU-O7w"/>
                         <outlet property="label_filter" destination="yE9-Jb-XL3" id="uXH-zJ-zVW"/>
                         <outlet property="label_net_err" destination="Uyh-tU-Vl5" id="WWd-x3-f1A"/>
-                        <outlet property="mergeListButton" destination="bAb-Lk-i0b" id="kIw-Ee-wgv"/>
+                        <outlet property="mergeListButton" destination="1xy-6z-T44" id="a5e-Xz-XaI"/>
                         <outlet property="mum" destination="O6H-lE-k4f" id="u7B-L3-Nqy"/>
                         <outlet property="searchbar" destination="afv-fP-PRn" id="rXS-RR-xKX"/>
                         <outlet property="table_order" destination="YYj-ih-O6N" id="QBk-va-7yK"/>
@@ -7864,7 +7854,7 @@ Email: redantsupport@united-us.net</string>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="HwF-54-hzr">
-                                                    <frame key="frameInset" minX="28" width="672" height="43.5"/>
+                                                    <frame key="frameInset" minX="15" width="698" height="43.5"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="16"/>
                                                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

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

@@ -228,7 +228,7 @@
                                         <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">
-                                            <frame key="frameInset" width="768" height="85.5"/>
+                                            <frame key="frameInset" width="768" height="86"/>
                                             <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">
@@ -248,14 +248,14 @@
                                                     </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="v9S-8N-eqS">
-                                                    <frame key="frameInset" minX="48" width="63.19%" height="22" maxY="14.5"/>
+                                                    <frame key="frameInset" minX="48" width="63.19%" height="22" maxY="15"/>
                                                     <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="custom" customColorSpace="sRGB"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="11/08/2016 17:55:32 PST" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="efa-f8-yHS">
-                                                    <frame key="frameInset" width="200" height="22" maxY="14.5"/>
+                                                    <frame key="frameInset" width="200" height="22" maxY="15"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/JKLock/JKLockController.m

@@ -424,7 +424,7 @@
     } else { //设置
         
         self.password = self.input;
-        self.tipLabel.text = @"Please Check The Password Again";
+        self.tipLabel.text = @"Please re-enter password to confirm";
     }
     self.input = @"";
 }