Bläddra i källkod

HMLG隐藏Request Login按钮。
HMLG屏蔽Model缺货情况下Customer Add To Cart提示信息。
HMLG在Model缺货时使Add To Cart按钮变灰。

Pen Li 9 år sedan
förälder
incheckning
90aae52ca3

+ 25 - 1
RedAnt ERP Mobile/HMLG Mobile.xcodeproj/project.pbxproj

@@ -39,6 +39,10 @@
 		428980941E24B2C2005F1BD8 /* TextDrawable.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980891E24B2C2005F1BD8 /* TextDrawable.m */; };
 		428980971E24B2E7005F1BD8 /* ImageUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980961E24B2E7005F1BD8 /* ImageUtils.m */; };
 		4289809A1E24B304005F1BD8 /* TextUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980991E24B304005F1BD8 /* TextUtils.m */; };
+		42A85BF31E60039A0058A9CE /* HWWeakTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A85BF21E60039A0058A9CE /* HWWeakTimer.m */; };
+		42A85BFB1E6004180058A9CE /* ERPUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A85BF61E6004180058A9CE /* ERPUtils.m */; };
+		42A85BFC1E6004180058A9CE /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A85BF81E6004180058A9CE /* NetworkUtils.m */; };
+		42A85BFD1E6004180058A9CE /* PDFUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A85BFA1E6004180058A9CE /* PDFUtils.m */; };
 		42BB2F081E28986B0025C6CE /* signature.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42BB2F071E28986B0025C6CE /* signature.storyboard */; };
 		715002021D13CDBE00F5927F /* BundleDetailButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 715002011D13CDBE00F5927F /* BundleDetailButton.m */; };
 		715850431CF6F0C400856B20 /* DefaultAppearance.m in Sources */ = {isa = PBXBuildFile; fileRef = 715850421CF6F0C400856B20 /* DefaultAppearance.m */; };
@@ -284,6 +288,14 @@
 		428980961E24B2E7005F1BD8 /* ImageUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImageUtils.m; path = common/ImageUtils.m; sourceTree = SOURCE_ROOT; };
 		428980981E24B304005F1BD8 /* TextUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextUtils.h; path = common/TextUtils.h; sourceTree = SOURCE_ROOT; };
 		428980991E24B304005F1BD8 /* TextUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TextUtils.m; path = common/TextUtils.m; sourceTree = SOURCE_ROOT; };
+		42A85BF11E60039A0058A9CE /* HWWeakTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWWeakTimer.h; sourceTree = "<group>"; };
+		42A85BF21E60039A0058A9CE /* HWWeakTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWWeakTimer.m; sourceTree = "<group>"; };
+		42A85BF51E6004180058A9CE /* ERPUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ERPUtils.h; path = common/ERPUtils.h; sourceTree = SOURCE_ROOT; };
+		42A85BF61E6004180058A9CE /* ERPUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ERPUtils.m; path = common/ERPUtils.m; sourceTree = SOURCE_ROOT; };
+		42A85BF71E6004180058A9CE /* NetworkUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = common/NetworkUtils.h; sourceTree = SOURCE_ROOT; };
+		42A85BF81E6004180058A9CE /* NetworkUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkUtils.m; path = common/NetworkUtils.m; sourceTree = SOURCE_ROOT; };
+		42A85BF91E6004180058A9CE /* PDFUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFUtils.h; path = common/PDFUtils.h; sourceTree = SOURCE_ROOT; };
+		42A85BFA1E6004180058A9CE /* PDFUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDFUtils.m; path = common/PDFUtils.m; sourceTree = SOURCE_ROOT; };
 		42BB2F071E28986B0025C6CE /* signature.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = signature.storyboard; path = common/Functions/signature/signature.storyboard; sourceTree = SOURCE_ROOT; };
 		715002001D13CDBE00F5927F /* BundleDetailButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BundleDetailButton.h; path = common/Functions/BundleDetailButton.h; sourceTree = SOURCE_ROOT; };
 		715002011D13CDBE00F5927F /* BundleDetailButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BundleDetailButton.m; path = common/Functions/BundleDetailButton.m; sourceTree = SOURCE_ROOT; };
@@ -759,13 +771,13 @@
 		7183E8461CF2913E00524787 /* HMLG Mobile */ = {
 			isa = PBXGroup;
 			children = (
+				7183E9251CF29F4B00524787 /* HMLG */,
 				7183EA4A1CF2A1F300524787 /* Pods */,
 				7183E8451CF2913E00524787 /* Products */,
 				7183EA651CF2A9DC00524787 /* Frameworks */,
 				7183E8931CF29F3900524787 /* utils */,
 				7183E8F41CF29F4500524787 /* CommonUI */,
 				7183E8FC1CF29F4500524787 /* ScanAPI */,
-				7183E9251CF29F4B00524787 /* HMLG */,
 				7183E92C1CF29FCB00524787 /* PDF+Web */,
 				7183E92F1CF29FCB00524787 /* address */,
 				7183E9361CF29FCB00524787 /* AutoScrollImage */,
@@ -874,6 +886,8 @@
 		7183E8931CF29F3900524787 /* utils */ = {
 			isa = PBXGroup;
 			children = (
+				42A85BF11E60039A0058A9CE /* HWWeakTimer.h */,
+				42A85BF21E60039A0058A9CE /* HWWeakTimer.m */,
 				428980731E24B2C2005F1BD8 /* pdfCreator */,
 				428980561E24935E005F1BD8 /* UIColor+HEX */,
 				428980491E249340005F1BD8 /* JKLock */,
@@ -894,6 +908,12 @@
 				428980991E24B304005F1BD8 /* TextUtils.m */,
 				7183E88D1CF29F3900524787 /* iSalesDB.h */,
 				7183E88E1CF29F3900524787 /* iSalesDB.m */,
+				42A85BF51E6004180058A9CE /* ERPUtils.h */,
+				42A85BF61E6004180058A9CE /* ERPUtils.m */,
+				42A85BF71E6004180058A9CE /* NetworkUtils.h */,
+				42A85BF81E6004180058A9CE /* NetworkUtils.m */,
+				42A85BF91E6004180058A9CE /* PDFUtils.h */,
+				42A85BFA1E6004180058A9CE /* PDFUtils.m */,
 				7183E88F1CF29F3900524787 /* iSalesNetwork.h */,
 				7183E8901CF29F3900524787 /* iSalesNetwork.m */,
 				71BF06FF1D2F3CCC00981938 /* OLDataProvider.h */,
@@ -1511,6 +1531,7 @@
 				428980201E24925A005F1BD8 /* SortItemCell.m in Sources */,
 				7183E91E1CF29F4500524787 /* SRMonthPicker.m in Sources */,
 				7183EA2B1CF29FCB00524787 /* SignatureView.m in Sources */,
+				42A85BFD1E6004180058A9CE /* PDFUtils.m in Sources */,
 				7183EA3E1CF2A04000524787 /* MainViewController.m in Sources */,
 				4289808C1E24B2C2005F1BD8 /* GroupDrawable.m in Sources */,
 				7183E91B1CF29F4500524787 /* EnumSelectorCell.m in Sources */,
@@ -1562,6 +1583,7 @@
 				7183E8A81CF29F3900524787 /* iSalesDB.m in Sources */,
 				7183E9071CF29F4500524787 /* PulldownMenu.m in Sources */,
 				7183E9E31CF29FCB00524787 /* WebViewController.m in Sources */,
+				42A85BF31E60039A0058A9CE /* HWWeakTimer.m in Sources */,
 				7183E9FC1CF29FCB00524787 /* RATreeView+TableViewDelegate.m in Sources */,
 				428980531E249340005F1BD8 /* JKLockButton.m in Sources */,
 				7183E9101CF29F4500524787 /* CommonEditorCellEdit.m in Sources */,
@@ -1647,6 +1669,7 @@
 				4289806C1E24A9DE005F1BD8 /* SelectUploadOrderViewController.m in Sources */,
 				428980521E249340005F1BD8 /* JKDotView.m in Sources */,
 				7183E89B1CF29F3900524787 /* QRCodeGenerator.m in Sources */,
+				42A85BFC1E6004180058A9CE /* NetworkUtils.m in Sources */,
 				7183EA191CF29FCB00524787 /* OrderListTableViewCell.m in Sources */,
 				7183E9FA1CF29FCB00524787 /* RATreeView+Private.m in Sources */,
 				7183E8A71CF29F3900524787 /* RAUtils.m in Sources */,
@@ -1675,6 +1698,7 @@
 				7183EA131CF29FCB00524787 /* CreateOrderViewController.m in Sources */,
 				7183E9E21CF29FCB00524787 /* PDFViewController.m in Sources */,
 				7183E9FF1CF29FCB00524787 /* CreditCardEditorViewController.m in Sources */,
+				42A85BFB1E6004180058A9CE /* ERPUtils.m in Sources */,
 				4289801F1E24925A005F1BD8 /* SortButton.m in Sources */,
 				7183E9F81CF29FCB00524787 /* RATreeView.m in Sources */,
 				428980931E24B2C2005F1BD8 /* TableDrawable.m in Sources */,

+ 2 - 1
RedAnt ERP Mobile/HMLG Mobile/config.h

@@ -16,7 +16,8 @@
 
 #define CONTACT_LIST 1
 
-//#define test_server
+#define test_server
+
 #import "Singleton.h"
 #define notifyMe_switch 1
 #define exception_switch 1

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


+ 2 - 1
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -539,6 +539,7 @@
         
         NSString *msg = nil;
         BOOL continueAdd = YES;
+#ifdef BUILD_NPD
         if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
             
             if ([Singleton sharedInstance].currentOrderIsMerged) { // Purchase Order不允许购买数量大于库存
@@ -549,7 +550,7 @@
                 continueAdd = YES;
             }
         }
-        
+#endif
         if (appDelegate.user_type == USER_ROLE_EMPLOYEE) { // Employee不允许购买数量大于库存
             msg = @"Item is OUT OF STOCK and not available to order.";
             continueAdd = NO;

+ 6 - 0
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -1090,12 +1090,18 @@ 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

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

@@ -38,6 +38,7 @@
 #ifdef BUILD_HMLG
     self.title=@"HMLG";
     self.checkOfflineMode.hidden=true;
+    self.requestLoginBtn.hidden = YES;
 #endif
 #ifdef BUILD_NPD
     self.title=@"NPD";

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/config.h

@@ -10,7 +10,7 @@
 #define RedAnt_ERP_Mobile_config_h
 #define BUILD_NPD
 
-//#define test_server
+#define test_server
 
 #define exception_switch 1
 #define notifyMe_switch 1