Просмотр исходного кода

修改Combine -> Convert / float -> add.
修复在Sales Order状态下退出后,再次登陆时Shop Order选项未被选中。

Pen Li 9 лет назад
Родитель
Сommit
66c8a5d43d

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


+ 13 - 4
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -115,6 +115,8 @@
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(lockOrderListNotification:) name:Lock_Permission_Notification object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(lockOrderListNotification:) name:unLock_Permission_Notification object:nil];
     
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleUserLogin:) name:User_LoginOK_Notification object:nil];
+    
     UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(refresh_btn_click:)];
     //            tap.minimumPressDuration = 0.8; //定义按的时间
     [self.label_net_err addGestureRecognizer:tap];
@@ -1349,7 +1351,7 @@
         
     } else if (appDelegate.user_type==USER_ROLE_CUSTOMER) {
         
-        UITableViewRowAction *add2MergeListAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Add To Combine Order List" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
+        UITableViewRowAction *add2MergeListAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Add To Convert List" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
             
             NSString *orderCode = [NSString stringWithFormat:@"%@",[self.content_data[indexPath.row] valueForKey:@"order_code"]];
             
@@ -1377,7 +1379,7 @@
                 // 检查是否被自己打开
                 if ([orderCode isEqualToString:appDelegate.order_code]) {
                     
-                    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"can not add to merge list because current order is opened. Do you want to close order and add to merge list?" preferredStyle:UIAlertControllerStyleAlert];
+                    UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:@"can not add to convert list because current order is opened. Do you want to close order and add to convert list?" preferredStyle:UIAlertControllerStyleAlert];
                     
                     UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                         
@@ -1726,7 +1728,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     
     if (!self.mergeList.count) {
         
-        [RAUtils message_alert:@"Combine Order List is Empty" title:nil controller:self];
+        [RAUtils message_alert:@"Convert List is Empty" title:nil controller:self];
         return;
     }
     
@@ -1736,7 +1738,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     
     mergeVC.mergeList = self.mergeList;
     
-    mergeVC.title = @"Combine Order List";
+    mergeVC.title = @"Convert List";
     
     __weak typeof(self) weakself = self;
     
@@ -1799,5 +1801,12 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     }
 }
 
+- (void)handleUserLogin:(NSNotification *)notification {
+    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+    if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
+        self.orderTypeSegmentControl.selectedSegmentIndex = 0;
+        
+    }
+}
 
 @end

+ 1 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/LoginViewController.m

@@ -383,7 +383,7 @@
                 //                    [self.delegate LoginViewControllerDidLogin:self];
                 //                }
                 
-                
+                [[NSNotificationCenter defaultCenter] postNotificationName:User_LoginOK_Notification object:nil];
             }
             else
             {

+ 6 - 6
RedAnt ERP Mobile/iSales-NPD/CUL.storyboard

@@ -16,7 +16,7 @@
                         <viewControllerLayoutGuide type="bottom" id="3KL-Lc-pQE"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="dHj-jU-QLP">
-                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Display Price:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L9s-QJ-zuH">
@@ -99,17 +99,17 @@
                         <viewControllerLayoutGuide type="bottom" id="oqY-Ei-LvT"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="ZSB-9h-J88">
-                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <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" translatesAutoresizingMaskIntoConstraints="NO" id="6fy-Su-eKE">
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="CategoryPriceCell" rowHeight="47" id="rnb-EK-8yY" customClass="CategoryPriceCell">
-                                        <rect key="frame" x="0.0" y="28" width="1024" height="47"/>
+                                        <rect key="frame" x="0.0" y="28" width="375" height="47"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rnb-EK-8yY" id="WGZ-Bw-E4C">
-                                            <frame key="frameInset" width="1024" height="46.5"/>
+                                            <frame key="frameInset" width="375" height="46.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Dinning" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3fh-vo-1qn">
@@ -172,7 +172,7 @@
                         <viewControllerLayoutGuide type="bottom" id="lSx-hS-2a7"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="ElC-Gn-Euu">
-                        <rect key="frame" x="0.0" y="0.0" width="1024" height="1366"/>
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Base Price:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1kG-P9-XdK">
@@ -199,7 +199,7 @@
                                     <action selector="floatCheckButtonClick:" destination="UzA-yv-6er" eventType="touchUpInside" id="Dxm-cx-sod"/>
                                 </connections>
                             </button>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="float:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XyN-x8-6ZP">
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="add:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XyN-x8-6ZP">
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>

+ 3 - 1
RedAnt ERP Mobile/iSales-NPD/NotificationNameCenter.h

@@ -10,7 +10,7 @@
 
 @interface NotificationNameCenter : NSObject
 
-UIKIT_EXTERN  NSString  *LoginOK_HandleUrgencyFile_Notification;///<登陆成功通知
+UIKIT_EXTERN  NSString  *LoginOK_HandleUrgencyFile_Notification;///<登陆成功处理恢复文件
 
 UIKIT_EXTERN  NSString  *Change_Price_Type_Notification;///<切换价格通知
 
@@ -20,4 +20,6 @@ UIKIT_EXTERN  NSString  *Lock_Permission_Notification;///<Customer锁Order List
 
 UIKIT_EXTERN  NSString  *unLock_Permission_Notification;///<Customer解锁Order List
 
+UIKIT_EXTERN  NSString  *User_LoginOK_Notification;///<用户登陆成功
+
 @end

+ 2 - 0
RedAnt ERP Mobile/iSales-NPD/NotificationNameCenter.m

@@ -20,4 +20,6 @@ const NSString  *Lock_Permission_Notification = @"Lock_Permission_Notification";
 
 const NSString  *unLock_Permission_Notification = @"unLock_Permission_Notification";
 
+const NSString  *User_LoginOK_Notification = @"User_LoginOK_Notification";
+
 @end