Selaa lähdekoodia

修改Add To Cart,删除本地判断购买数量大于库存。
修改Notify Me出错提示,所有错误状态都提示返回信息。
修改Tap To Sign,没有签名并且不能签名时不显示占位图。
修改Notify Me图标,和应用Icon。
HMLG隐私权限适配。

Pen Li 9 vuotta sitten
vanhempi
commit
e5454bc25e
18 muutettua tiedostoa jossa 75 lisäystä ja 56 poistoa
  1. 8 0
      RedAnt ERP Mobile/HMLG Mobile/Info.plist
  2. BIN
      RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate
  3. 6 14
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m
  4. 14 24
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m
  5. 7 2
      RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m
  6. 10 9
      RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard
  7. 7 7
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Contents.json
  8. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-76.png
  9. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
  10. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Small.png
  11. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
  12. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png
  13. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png
  14. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-iPadPro@2x.png
  15. 23 0
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/Contents.json
  16. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/notifyMe.png
  17. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/notifyMe@2x.png
  18. BIN
      RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/notifyMe@3x.png

+ 8 - 0
RedAnt ERP Mobile/HMLG Mobile/Info.plist

@@ -46,5 +46,13 @@
 		<string>UIInterfaceOrientationLandscapeLeft</string>
 		<string>UIInterfaceOrientationLandscapeRight</string>
 	</array>
+	<key>NSCameraUsageDescription</key>
+	<string></string>
+	<key>NSContactsUsageDescription</key>
+	<string></string>
+	<key>NSMicrophoneUsageDescription</key>
+	<string></string>
+	<key>NSPhotoLibraryUsageDescription</key>
+	<string></string>
 </dict>
 </plist>

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


+ 6 - 14
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -522,24 +522,16 @@
     
     NSString* ct=[self.count_Label.text stringByReplacingOccurrencesOfString:@"\n" withString:@""];
     
-    AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-    /*
-    if (c <= 0 && appDelegate.user_type == USER_ROLE_CUSTOMER && [Singleton sharedInstance].currentOrderIsMerged) {
-        
-        self.btnaddCart.enabled = NO;
-        self.btnNotifyMe.enabled = YES;
-        self.btnNotifyMe.alpha = 1.0f;
-        [RAUtils message_alert:@"Model is out of stock" title:@"Warning" controller:[RAUtils getViewController:self]];
-        return;
-    }
-    */
     
-    if(c<count)
+
+    
+    if(/*c<count*/c == 0)
     {
         
         NSString *msg = nil;
         BOOL continueAdd = YES;
 #ifdef BUILD_NPD
+        AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
         if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
             
             if ([Singleton sharedInstance].currentOrderIsMerged) { // Purchase Order不允许购买数量大于库存
@@ -550,12 +542,12 @@
                 continueAdd = YES;
             }
         }
-#endif
+
         if (appDelegate.user_type == USER_ROLE_EMPLOYEE) { // Employee不允许购买数量大于库存
             msg = @"Item is OUT OF STOCK and not available to order.";
             continueAdd = NO;
         }
-        
+ #endif
         
         
         UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"Availability %@",ct ] message:msg preferredStyle:UIAlertControllerStyleAlert];

+ 14 - 24
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -961,12 +961,12 @@ self.isrefreshing=false;
             cell.btnNotifyMe.hidden = YES;
             
         } else {
-            
+#ifdef BUILD_NPD
             NSString *qtyStr = [section_json valueForKey:@"Availability"];
-            cell.btnNotifyMe.layer.borderColor = [UIColor blackColor].CGColor;
-            cell.btnNotifyMe.layer.borderWidth = 1.0f;
-            cell.btnNotifyMe.layer.cornerRadius = 3.0f;
-            cell.btnNotifyMe.layer.masksToBounds = YES;
+//            cell.btnNotifyMe.layer.borderColor = [UIColor blackColor].CGColor;
+//            cell.btnNotifyMe.layer.borderWidth = 1.0f;
+//            cell.btnNotifyMe.layer.cornerRadius = 3.0f;
+//            cell.btnNotifyMe.layer.masksToBounds = YES;
             
             __weak typeof(self) weakself = self;
             cell.notifyMeBlock = ^{
@@ -985,12 +985,12 @@ self.isrefreshing=false;
                         if (result != RESULT_TRUE && result != RESULT_NO_EMAIL_ADDRESS) {
                             
                             NSString *msg = [NSString stringWithFormat:@"The email send failed"];
-                            if ([[dic valueForKey:@"result"] integerValue] == 8) {
-                                if ([dic valueForKey:@"err_msg"]) {
-                                    msg = [dic valueForKey:@"err_msg"];
-                                }
+                            
+                            if ([dic valueForKey:@"err_msg"]) {
+                                msg = [dic valueForKey:@"err_msg"];
                             }
                             
+                            
                             UIAlertController *errorAlertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:msg preferredStyle:UIAlertControllerStyleAlert];
                             UIAlertAction *action = [UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                                 
@@ -1036,13 +1036,11 @@ self.isrefreshing=false;
                         if (!qtyStr || !qtyStr.length || [qtyStr isEqualToString:@"In Production"] || [qtyStr isEqualToString:@"0"] || [qtyStr isEqualToString:@"Sold Out"]) {
                             
                             cell.btnaddCart.enabled = NO;
-                            cell.btnNotifyMe.alpha = 1.0;
                             cell.btnNotifyMe.enabled = YES;
                             
                         } else {
                             
                             cell.btnaddCart.enabled = YES;
-                            cell.btnNotifyMe.alpha = 0.4;
                             cell.btnNotifyMe.enabled = NO;
                         }
                         
@@ -1052,12 +1050,10 @@ self.isrefreshing=false;
                             // Shop Order
                             cell.btnaddCart.enabled = YES;
                             // 默认未缺货
-                            cell.btnNotifyMe.alpha = 0.4;
                             cell.btnNotifyMe.enabled = NO;
                             
                             if (!qtyStr || !qtyStr.length || [qtyStr isEqualToString:@"In Production"] || [qtyStr isEqualToString:@"0"] || [qtyStr isEqualToString:@"Sold Out"]) { // 缺货
                                 
-                                cell.btnNotifyMe.alpha = 1.0;
                                 cell.btnNotifyMe.enabled = YES;
                                 
                             }
@@ -1066,11 +1062,9 @@ self.isrefreshing=false;
                             // Purchase Order
                             if (!qtyStr || !qtyStr.length || [qtyStr isEqualToString:@"In Production"] || [qtyStr isEqualToString:@"0"] || [qtyStr isEqualToString:@"Sold Out"]) { // 缺货
                                 cell.btnaddCart.enabled = NO;
-                                cell.btnNotifyMe.alpha = 1.0;
                                 cell.btnNotifyMe.enabled = YES;
                             } else { // 未缺货
                                 cell.btnNotifyMe.enabled = NO;
-                                cell.btnNotifyMe.alpha = 0.4;
                                 cell.btnaddCart.enabled = YES;
                             }
                             
@@ -1090,18 +1084,11 @@ self.isrefreshing=false;
                 
                 if (!qtyStr || !qtyStr.length || [qtyStr isEqualToString:@"In Production"] || [qtyStr isEqualToString:@"0"] || [qtyStr isEqualToString:@"Sold Out"]) { // 缺货
                     cell.btnaddCart.enabled = NO;
-#ifndef BUILD_NPD
-                    cell.btnaddCart.alpha = 0.4;
-#endif
-                    cell.btnNotifyMe.alpha = 1.0;
                     cell.btnNotifyMe.enabled = YES;
                 } else { // 未缺货
                     cell.btnNotifyMe.enabled = NO;
-                    cell.btnNotifyMe.alpha = 0.4;
                     cell.btnaddCart.enabled = YES;
-#ifndef BUILD_NPD
-                    cell.btnaddCart.alpha = 1.0;
-#endif
+
                 }
                 
                 // offline
@@ -1110,7 +1097,10 @@ self.isrefreshing=false;
                 }
                 
             }
-
+#else
+            cell.btnaddPortfolio.hidden = NO;
+            cell.btnNotifyMe.hidden = YES;
+#endif
             
         }
         

+ 7 - 2
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -1520,8 +1520,13 @@
                                 UIImage * img =[UIImage imageWithData:downloadimg_data];
                                 cell.sign_img.image=img ;
                             }
-                            else
-                                cell.sign_img.image=[UIImage imageNamed:@"taptosign_s"];
+                            else {
+                                if (cell.sign_img.userInteractionEnabled) {
+                                    cell.sign_img.image=[UIImage imageNamed:@"taptosign_s"];
+                                } else {
+                                    cell.sign_img.image = nil;
+                                }
+                            }
                             
                             
                         });

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

@@ -956,10 +956,10 @@
                                 <inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                                 <prototypes>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="DetailHeaderCell" rowHeight="550" id="PCZ-Ci-oQf" customClass="DetailHeaderCell">
-                                        <rect key="frame" x="0.0" y="56" width="768" height="550"/>
+                                        <rect key="frame" x="0.0" y="55.5" width="768" height="550"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PCZ-Ci-oQf" id="DiR-eY-PiR">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="549"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="549.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="USD 123.45" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="fD8-Km-IT3">
@@ -1163,9 +1163,9 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="k7m-sd-nvE">
-                                                    <rect key="frame" x="457" y="440" width="125" height="35"/>
+                                                    <rect key="frame" x="457" y="440" width="124" height="39"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
-                                                    <state key="normal" title="Notify Me">
+                                                    <state key="normal" image="notifyMe">
                                                         <color key="titleColor" red="0.60000002379999995" green="0.40000000600000002" blue="0.20000000300000001" alpha="1" colorSpace="calibratedRGB"/>
                                                     </state>
                                                     <connections>
@@ -1208,7 +1208,7 @@
                                         <rect key="frame" x="0.0" y="605.5" width="768" height="600"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zzF-db-bsq" id="rZ0-x8-h3B">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="599"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="599.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Refreshing...
Please wait." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="bSP-hh-M2A">
@@ -1279,7 +1279,7 @@
                                         </tableViewCellContentView>
                                     </tableViewCell>
                                     <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="DetailInfoCell" rowHeight="44" id="hYM-aE-rjR" customClass="DetailKVCell">
-                                        <rect key="frame" x="0.0" y="1806" width="768" height="44"/>
+                                        <rect key="frame" x="0.0" y="1805.5" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hYM-aE-rjR" id="o59-aa-UU2">
                                             <rect key="frame" x="0.0" y="0.0" width="768" height="43"/>
@@ -1356,7 +1356,7 @@
                                 </collectionViewFlowLayout>
                                 <cells>
                                     <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="CategoryCellNPD" id="cah-A8-bXi" customClass="CategoryCellNPD">
-                                        <rect key="frame" x="0.0" y="94.5" width="180" height="251"/>
+                                        <rect key="frame" x="0.0" y="95" width="180" height="251"/>
                                         <autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
                                         <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
                                             <rect key="frame" x="0.0" y="0.0" width="180" height="251"/>
@@ -2133,7 +2133,7 @@
                                         <rect key="frame" x="0.0" y="88" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Pol-lE-P45" id="FAm-1c-nX0">
-                                            <rect key="frame" x="0.0" y="0.0" width="730" height="44"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="702" height="44"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Clean Cache" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="AHm-p1-51h">
@@ -7863,7 +7863,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">
-                                                    <rect key="frame" x="15" y="0.0" width="698" height="43.5"/>
+                                                    <rect key="frame" x="28" y="0.0" width="672" 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"/>
@@ -8649,6 +8649,7 @@ Email: redantsupport@united-us.net</string>
         <image name="menu_open" width="36" height="36"/>
         <image name="newcustomer" width="32" height="32"/>
         <image name="neworder" width="40" height="40"/>
+        <image name="notifyMe" width="124" height="39"/>
         <image name="npd_logo" width="110" height="13"/>
         <image name="order" width="72" height="72"/>
         <image name="pick_bg" width="280" height="280"/>

+ 7 - 7
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -13,43 +13,43 @@
     {
       "size" : "29x29",
       "idiom" : "ipad",
-      "filename" : "appicon.png",
+      "filename" : "Icon-Small.png",
       "scale" : "1x"
     },
     {
       "size" : "29x29",
       "idiom" : "ipad",
-      "filename" : "appicon-1.png",
+      "filename" : "Icon-Small@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "40x40",
       "idiom" : "ipad",
-      "filename" : "appicon-2.png",
+      "filename" : "Icon-Spotlight-40.png",
       "scale" : "1x"
     },
     {
       "size" : "40x40",
       "idiom" : "ipad",
-      "filename" : "appicon-3.png",
+      "filename" : "Icon-Spotlight-40@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "76x76",
       "idiom" : "ipad",
-      "filename" : "appicon-4.png",
+      "filename" : "Icon-76.png",
       "scale" : "1x"
     },
     {
       "size" : "76x76",
       "idiom" : "ipad",
-      "filename" : "appicon-5.png",
+      "filename" : "Icon-76@2x.png",
       "scale" : "2x"
     },
     {
       "size" : "83.5x83.5",
       "idiom" : "ipad",
-      "filename" : "appicon-6.png",
+      "filename" : "Icon-iPadPro@2x.png",
       "scale" : "2x"
     }
   ],

BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-76.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Small.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/AppIcon.appiconset/Icon-iPadPro@2x.png


+ 23 - 0
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "notifyMe.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "notifyMe@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "notifyMe@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/notifyMe.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/notifyMe@2x.png


BIN
RedAnt ERP Mobile/iSales-NPD/Images.xcassets/notifyMe.imageset/notifyMe@3x.png