Przeglądaj źródła

1.修改NPD Assembly Introduction。
2.修改NPD Model Detail增加Content Writing和Seat Dimension。
3.修改Email Wish List。

Pen Li 8 lat temu
rodzic
commit
543809fb96

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


+ 0 - 12
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,16 +2,4 @@
 <Bucket
    type = "0"
    version = "2.0">
-   <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            scope = "0"
-            stopOnStyle = "0">
-         </BreakpointContent>
-      </BreakpointProxy>
-   </Breakpoints>
 </Bucket>

+ 1 - 1
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -2084,7 +2084,7 @@
     }
     else if ([title isEqualToString:@"BLOG"]) {
         
-        NSString* url = @"https://www.newpacificdirect.com";
+        NSString* url = URL_BLOG;
         
         
         NSString* title = @"NPD BLOG";

+ 2 - 0
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.h

@@ -89,6 +89,8 @@
 @property (strong, nonatomic) IBOutlet UILabel *selector_label;
 @property (strong, nonatomic) IBOutlet UIButton *introduceBtn;
 @property (nonatomic,copy) void(^introduceBlock)(UIButton *sender);
+@property (strong, nonatomic) IBOutlet UIButton *descriptionBtn;
+@property (nonatomic,copy) void(^descriptionBlock)(UIButton *sender);
 -(void)Hide_selector:(bool) bhide;
 
 -(void)ClearPhotos;

+ 7 - 0
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -1616,6 +1616,13 @@
     
 }
 
+
+- (IBAction)descriptionBtnClick:(UIButton *)sender {
+    if (self.descriptionBlock) {
+        self.descriptionBlock(sender);
+    }
+}
+
 - (IBAction)OnClosePlayer:(id)sender {
     [self.playerView stopVideo];
     

+ 31 - 3
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -28,6 +28,8 @@
 #import "ImageUtils.h"
 #import "PDFViewController.h"
 
+#import "ModelDescriptionController.h"
+
 #define  DEF_CELL_HEIGHT 44
 #define  DEF_TABLE_HEIGHT 44
 #define  LINE_WIDTH 0
@@ -1547,12 +1549,20 @@ self.isrefreshing=false;
             [((MainViewController*)appDelegate.main_vc) reloadPortfolio:true immediately:false];
         };
         
+        NSString *introduce = [section_json objectForKey:@"assembly_pdf_path"];
         cell.introduceBlock = ^(UIButton *sender) {
-            NSString *introduce = [weakself.detail_data objectForKey:@"introduce"];
-//            introduce = @"http://127.0.0.1/ios.pdf";
+            
             [weakself showIntroducePDF:introduce];
         };
         
+        NSString *desc = [section_json objectForKey:@"product_content_writing"];
+        if (!desc.length) {
+            cell.descriptionBtn.hidden = YES;
+        }
+        cell.descriptionBlock = ^(UIButton *sender) {
+            [weakself showModelDescription:desc];
+        };
+        
         return cell;
     }
 //    NSDictionary* related_json = [self.detail_data objectForKey:@"related_model"];
@@ -2065,10 +2075,12 @@ self.isrefreshing=false;
         return;
     }
     
+    NSArray *tmpArr = [link componentsSeparatedByString:@"="];
+    
     BOOL isLocalFile = NO;
     NSMutableDictionary* section_json = [[self.detail_data objectForKey:@"img_section"] mutableCopy];
     NSString *name = [section_json valueForKey:@"model_name"];
-    NSString *path = [NSString stringWithFormat:@"%@/Introduce/%@/%@",[RAUtils appCacheDirectory],name,link.lastPathComponent];
+    NSString *path = [NSString stringWithFormat:@"%@/Introduce/%@.pdf",[RAUtils appCacheDirectory],tmpArr.lastObject];
     if ([RAUtils fileExistsAtPath:path]) { // 检查缓存
         isLocalFile = YES;
         link = path;
@@ -2115,4 +2127,20 @@ self.isrefreshing=false;
     [self.navigationController pushViewController:ViewController animated:YES];
 }
 
+- (void)showModelDescription:(NSString *)desc {
+    
+    ModelDescriptionController *vc = [[UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"ModelDescriptionController"];
+    vc.model_desc = desc;
+    
+    vc.title = [NSString stringWithFormat:@"%@ Description",self.model_name];
+    
+    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
+    nav.modalPresentationStyle = UIModalPresentationFormSheet;// 只在iPad起作用
+    nav.preferredContentSize = CGSizeMake(400, 380);// 只有在 UIModalPresentationFormSheet 的时候起作用
+    
+    [self presentViewController:nav animated:YES completion:nil];
+    
+    
+}
+
 @end

+ 6 - 2
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -3098,10 +3098,10 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     NSString *sqlQuery = nil;
     
     if(product_id==nil)
-        sqlQuery = [NSString stringWithFormat:@"select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging,ETA,item_id from product where name='%@';",model_name]; // select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging from model where name='%@';
+        sqlQuery = [NSString stringWithFormat:@"select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging,ETA,item_id,seat_dimension,product_content_writing from product where name='%@';",model_name]; // select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging from model where name='%@';
     else
 
-        sqlQuery = [NSString stringWithFormat:@"select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging,ETA,item_id from product where product_id=%@;",product_id]; // select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging from model where product_id=%@;
+        sqlQuery = [NSString stringWithFormat:@"select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging,ETA,item_id,seat_dimension,product_content_writing from product where product_id=%@;",product_id]; // select name,description,product_id,color,legcolor,availability,incoming_stock,demension,seat_height,material,box_dim,volume,weight,model_set,load_ability,default_category,fabric_content,assembling,made_in,special_remarks,stockUom,product_group,selector_field,property_field,packaging from model where product_id=%@;
 
     
     sqlite3_stmt * statement;
@@ -3288,6 +3288,8 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             
             
             int item_id = sqlite3_column_int(statement, 26);
+            NSString *seat_dimension = [self textAtColumn:27 statement:statement];
+            NSString *content_writing = [self textAtColumn:28 statement:statement];
             
             NSString* Price=nil;
             if(appDelegate.bLogin==false)
@@ -3302,6 +3304,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
                     Price=[NSString stringWithFormat:@"%.2f",price.floatValue];
             }
             
+            [img_section setObject:content_writing forKey:@"product_content_writing"];
             [img_section setValue:Price forKey:@"price"];
             [img_section setValue:nsname forKey:@"model_name"];
             [img_section setValue:nsdescription forKey:@"model_descrition"];
@@ -3328,6 +3331,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             
             [detail0_section setObject:[self model_kvItem:@"Dimension" value:nsdemension] forKey:[NSString stringWithFormat:@"item_%d",detail0_item_count++]];
             [detail0_section setObject:[self model_kvItem:@"Seat Height" value:nsseat_height] forKey:[NSString stringWithFormat:@"item_%d",detail0_item_count++]];
+            [detail0_section setObject:[self model_kvItem:@"Seat Dimension" value:seat_dimension] forKey:[NSString stringWithFormat:@"item_%d",detail0_item_count++]];
             [detail0_section setObject:[self model_kvItem:@"Material" value:nsmaterial] forKey:[NSString stringWithFormat:@"item_%d",detail0_item_count++]];
             [detail0_section setObject:[self model_kvItem:@"Box dimension" value:nsbox_dim] forKey:[NSString stringWithFormat:@"item_%d",detail0_item_count++]];
             [detail0_section setObject:[self model_kvItem:@"Volume" value:nsvolume] forKey:[NSString stringWithFormat:@"item_%d",detail0_item_count++]];

+ 17 - 0
RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m

@@ -29,6 +29,8 @@
 //#import "PDFViewController.h"
 @interface WatchListViewController ()
 
+@property (strong, nonatomic) IBOutlet UIBarButtonItem *emailBtn;
+@property (strong, nonatomic) IBOutlet UIBarButtonItem *printBtn;
 @property (nonatomic,strong) SortItemViewController *sortItemController;
 @property (nonatomic,assign) int sortIndex;
 @property (nonatomic,strong) SortButton *sortButton;
@@ -563,6 +565,12 @@
     [super viewWillAppear:animated];
 
     [[self navigationController] setNavigationBarHidden:YES animated:NO];
+    
+    AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
+    // 离线隐藏Email
+    self.emailBtn.enabled = !appDelegate.offline_mode;
+    // 离线隐藏Print
+    self.printBtn.enabled = !appDelegate.offline_mode;
 }
 
 -(void) operation_reload_data
@@ -1281,6 +1289,11 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 - (IBAction)printWishlistClick:(UIBarButtonItem *)sender {
     
+    if ([[self.content_data valueForKey:@"count"] intValue] < 1) {
+        [RAUtils message_alert:@"Please add wishlist first" title:@"Warning" controller:self];
+        return;
+    }
+    
     if (self.print_url.length == 0) {
         [RAUtils message_alert:@"There is no resource to print" title:@"Warning" controller:self];
     }
@@ -1317,6 +1330,10 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 - (IBAction)emailWishlistClick:(UIBarButtonItem *)sender {
     
+    if ([[self.content_data valueForKey:@"count"] intValue] < 1) {
+        [RAUtils message_alert:@"Please add wishlist first" title:@"Warning" controller:self];
+        return;
+    }
     
     JKMessageBoxController *emailAddrVC = [JKMessageBoxController messageBoxControllerWithTip:@"Please enter email address"];
     emailAddrVC.textFiled.secureTextEntry = NO;

+ 3 - 2
RedAnt ERP Mobile/common/data_provider/iSalesDB.m

@@ -677,7 +677,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     
     // [self execSql:@"PRAGMA journal_mode = WAL;" db:db];
     
-    NSString* create_product=@"CREATE TABLE IF NOT EXISTS product ( _id INTEGER PRIMARY KEY, name VARCHAR(20,0), description VARCHAR(20,0), product_id INTEGER, color VARCHAR(20,0), legcolor VARCHAR(20,0), availability INTEGER, incoming_stock INTEGER, ETA DATE, demension VARCHAR(20,0), seat_height VARCHAR(20,0), material VARCHAR(20,0), box_dim VARCHAR(20,0), volume VARCHAR(20,0), weight VARCHAR(20,0), model_set VARCHAR(20,0), load_ability VARCHAR(20,0), default_category VARCHAR(20,0), category VARCHAR(100,0), fabric_content VARCHAR(20,0), assembling VARCHAR(20,0), made_in VARCHAR(20,0), special_remarks VARCHAR(20,0), stockUom integer, fashion VARCHAR(20,0), isnew integer, property_field VARCHAR(20,0), property_display VARCHAR(20,0), selector_field VARCHAR(20,0), selector_display VARCHAR(20,0), product_group VARCHAR(20,0), packaging VARCHAR(20,0), closeout integer ,best_seller integer,alert VARCHAR(20,0),has_bundle integer,is_active integer,item_id integer,more_color integer);";
+    NSString* create_product=@"CREATE TABLE IF NOT EXISTS product ( _id INTEGER PRIMARY KEY, name VARCHAR(20,0), description VARCHAR(20,0), product_id INTEGER, color VARCHAR(20,0), legcolor VARCHAR(20,0), availability INTEGER, incoming_stock INTEGER, ETA DATE, demension VARCHAR(20,0), seat_height VARCHAR(20,0), material VARCHAR(20,0), box_dim VARCHAR(20,0), volume VARCHAR(20,0), weight VARCHAR(20,0), model_set VARCHAR(20,0), load_ability VARCHAR(20,0), default_category VARCHAR(20,0), category VARCHAR(100,0), fabric_content VARCHAR(20,0), assembling VARCHAR(20,0), made_in VARCHAR(20,0), special_remarks VARCHAR(20,0), stockUom integer, fashion VARCHAR(20,0), isnew integer, property_field VARCHAR(20,0), property_display VARCHAR(20,0), selector_field VARCHAR(20,0), selector_display VARCHAR(20,0), product_group VARCHAR(20,0), packaging VARCHAR(20,0), closeout integer ,best_seller integer,alert VARCHAR(20,0),has_bundle integer,is_active integer,item_id integer,more_color integer,seat_dimension text,assembly_instruction text,product_content_writing text);";
     
     NSString* create_catalog=@"CREATE TABLE IF NOT EXISTS catalog ( _id INTEGER PRIMARY KEY, name VARCHAR(20,0), description VARCHAR(20,0), item_id INTEGER,is_active integer,ulength float,uwidth float,uheight float,uweight float,pcs integer,mpack integer,mlength float,mwidth float,mheight float,mweigth float,ipack integer,ilength float,iwidth float,iheight float, iweight float,ucbf float,icbf float, mcbf float,is_single_model integer, is_master_model integer,is_rate integer,is_part integer);";
     
@@ -801,8 +801,9 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
 //    [self alterTable:@"model" columns:@"product" rename:YES db:db];
     /**
      *  2017-06-01 v1.90 add more_color
+     *  2017-06-30 v1.90 add seat_dimension , assembly_instruction , product_content_writing
      */
-    [self alterTable:@"product" columns:@"has_bundle integer;is_active integer;item_id integer;more_color integer" rename:NO db:db];
+    [self alterTable:@"product" columns:@"has_bundle integer;is_active integer;item_id integer;more_color integer;seat_dimension text;assembly_instruction text;product_content_writing text" rename:NO db:db];
     
     [self alterTable:@"model_image" columns:@"item_id integer;picture_id integer" rename:NO db:db];
     

+ 7 - 7
RedAnt ERP Mobile/common/data_provider/iSalesNetwork.m

@@ -4332,12 +4332,12 @@ repeat:
     
     [dic setObject:ScreenCodeWishList forKey:kScreenName];
     
-    if (appDelegate.customerInfo) {
-        NSString *customer_cid = [appDelegate.customerInfo objectForKey:@"customer_cid"];
-        if (customer_cid) {
-            [dic setValue:customer_cid forKey:@"contactId"];
-        }
-    }
+//    if (appDelegate.customerInfo) {
+//        NSString *customer_cid = [appDelegate.customerInfo objectForKey:@"customer_cid"];
+//        if (customer_cid) {
+//            [dic setValue:customer_cid forKey:@"contactId"];
+//        }
+//    }
     
     NSData* json=nil;
     if(appDelegate.offline_mode)
@@ -4349,7 +4349,7 @@ repeat:
         if(![self IsNetworkAvailable])
             return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
         
-        json = [iSalesNetwork get_json:URL_EMAIL_CART parameters:dic];
+        json = [iSalesNetwork get_json:URL_EMAIL_WISHLIST parameters:dic];
     }
     if(json!=nil)
     {

+ 6 - 0
RedAnt ERP Mobile/iSales-NPD.xcodeproj/project.pbxproj

@@ -7,6 +7,7 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		420409B81F06314600B76C6F /* ModelDescriptionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 420409B71F06314600B76C6F /* ModelDescriptionController.m */; };
 		423A4ADC1D503A53005ECE4A /* createContact.json in Resources */ = {isa = PBXBuildFile; fileRef = 423A4ADB1D503A53005ECE4A /* createContact.json */; };
 		423B49EF1DAC8071004181C2 /* CUL.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 423B49EE1DAC8071004181C2 /* CUL.storyboard */; };
 		428980041E2490C1005F1BD8 /* NotificationNameCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 428980031E2490C1005F1BD8 /* NotificationNameCenter.m */; };
@@ -276,6 +277,8 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXFileReference section */
+		420409B61F06314600B76C6F /* ModelDescriptionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelDescriptionController.h; sourceTree = "<group>"; };
+		420409B71F06314600B76C6F /* ModelDescriptionController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelDescriptionController.m; sourceTree = "<group>"; };
 		423A4ADB1D503A53005ECE4A /* createContact.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = createContact.json; sourceTree = "<group>"; };
 		423B49EE1DAC8071004181C2 /* CUL.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = CUL.storyboard; sourceTree = "<group>"; };
 		428980021E2490C1005F1BD8 /* NotificationNameCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationNameCenter.h; path = common/NotificationNameCenter.h; sourceTree = SOURCE_ROOT; };
@@ -1628,6 +1631,8 @@
 				7162A56B1C58728D00AB630E /* DetailViewController.m */,
 				7162A56C1C58728D00AB630E /* LineView.h */,
 				7162A56D1C58728D00AB630E /* LineView.m */,
+				420409B61F06314600B76C6F /* ModelDescriptionController.h */,
+				420409B71F06314600B76C6F /* ModelDescriptionController.m */,
 			);
 			name = modelDetail;
 			sourceTree = "<group>";
@@ -2083,6 +2088,7 @@
 				71131F921CA1372300DBF6E2 /* SimplifiedBuyingProgramViewController.m in Sources */,
 				7162A55C1C58724700AB630E /* ContactListTableViewCell.m in Sources */,
 				71DF745C1C575E7900F2789C /* CommonEditorCellEdit.m in Sources */,
+				420409B81F06314600B76C6F /* ModelDescriptionController.m in Sources */,
 				7186C25D1C97A6EE00CB43F4 /* FunctionTestViewController.m in Sources */,
 				71DF74691C575E7900F2789C /* MonthPickerViewController.m in Sources */,
 				71DF74371C575D6600F2789C /* CommonGridViewController.m in Sources */,

+ 18 - 7
RedAnt ERP Mobile/iSales-NPD/Base.lproj/Main.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="jsC-F8-zYF">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16A323" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES" initialViewController="jsC-F8-zYF">
     <device id="ipad9_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -588,9 +588,11 @@
                     <connections>
                         <outlet property="btnAddtoCart" destination="nkH-wk-LKl" id="qv8-L1-WS9"/>
                         <outlet property="btnselect" destination="4ut-I6-lhS" id="fBU-bd-mXV"/>
+                        <outlet property="emailBtn" destination="d4C-NX-kua" id="mn5-pm-tCk"/>
                         <outlet property="itemListTable" destination="Bod-ih-aFz" id="8co-dm-KPz"/>
                         <outlet property="label_net_err" destination="VoW-od-XKq" id="AxP-Qf-bN0"/>
                         <outlet property="mum" destination="P7H-gM-8cZ" id="V5L-M8-XG2"/>
+                        <outlet property="printBtn" destination="ElH-Kz-wRI" id="cxR-aA-76k"/>
                         <outlet property="toolbar" destination="TEJ-4m-gTF" id="LR0-Lb-tMy"/>
                     </connections>
                 </viewController>
@@ -1045,7 +1047,7 @@
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                                 </view>
                                                 <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="IRl-nF-CWX">
-                                                    <rect key="frame" x="215" y="420" width="167" height="30"/>
+                                                    <rect key="frame" x="215" y="510" width="167" height="30"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" title="Assembly instructions">
                                                         <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -1054,6 +1056,14 @@
                                                         <action selector="introduceBtnClick:" destination="PCZ-Ci-oQf" eventType="touchUpInside" id="6N2-cG-mXO"/>
                                                     </connections>
                                                 </button>
+                                                <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="t2l-bU-0kL">
+                                                    <rect key="frame" x="35" y="510" width="100" height="30"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <state key="normal" title="Description"/>
+                                                    <connections>
+                                                        <action selector="descriptionBtnClick:" destination="PCZ-Ci-oQf" eventType="touchUpInside" id="5jn-ta-qdm"/>
+                                                    </connections>
+                                                </button>
                                                 <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="selector_name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qoq-Cs-JnE">
                                                     <rect key="frame" x="448" y="152" width="135" height="19"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
@@ -1190,7 +1200,7 @@
                                                     </connections>
                                                 </button>
                                                 <view hidden="YES" contentMode="scaleToFill" misplaced="YES" id="0nt-dh-BF2" customClass="YTPlayerView">
-                                                    <rect key="frame" x="0.0" y="0.0" width="768" height="550"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="768" height="554"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
                                                     <subviews>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Video player will show here" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="o27-8h-cXw" userLabel="Video player will be there">
@@ -1222,6 +1232,7 @@
                                             <outlet property="btnaddWish" destination="AHJ-EJ-V5A" id="MWP-hv-a4g"/>
                                             <outlet property="count_Label" destination="U9s-Ng-Fzb" id="WZo-1v-DoQ"/>
                                             <outlet property="cqyt_label" destination="g3j-Vx-s9x" id="cC2-Dd-4xI"/>
+                                            <outlet property="descriptionBtn" destination="t2l-bU-0kL" id="Alk-lr-reD"/>
                                             <outlet property="descriptionRTLabel" destination="HE5-zj-CRh" id="gk4-Sq-64o"/>
                                             <outlet property="eta_label" destination="Usu-57-rC5" id="cIJ-PM-tEy"/>
                                             <outlet property="etaval_label" destination="Ydc-b8-vOC" id="zhh-qS-HNd"/>
@@ -2189,7 +2200,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">
@@ -5805,7 +5816,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="22" width="768" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6hT-I3-WW3" id="gKI-En-sgV">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="44"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <view contentMode="scaleToFill" id="Eyx-Zr-PLO" customClass="RTLabel">
@@ -5823,7 +5834,7 @@ Email: redantsupport@united-us.net</string>
                                         <rect key="frame" x="0.0" y="66" width="768" height="190"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lSe-2G-cT7" id="KDS-aU-tYT">
-                                            <rect key="frame" x="0.0" y="0.0" width="768" height="190"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="768" height="189.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="12345678.00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="yQq-ma-HdT" userLabel="unit price">
@@ -7949,7 +7960,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"/>

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

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16A323" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
     <device id="ipad9_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
@@ -149,6 +149,33 @@
             </objects>
             <point key="canvasLocation" x="3919" y="633"/>
         </scene>
+        <!--Model Description Controller-->
+        <scene sceneID="bQH-p8-91A">
+            <objects>
+                <viewController storyboardIdentifier="ModelDescriptionController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="cfs-SS-G2Z" customClass="ModelDescriptionController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="vB2-Se-iLa">
+                        <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" editable="NO" textAlignment="justified" id="VRj-M1-sDm">
+                                <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                <string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                            </textView>
+                        </subviews>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                    </view>
+                    <connections>
+                        <outlet property="desc_tv" destination="VRj-M1-sDm" id="4ou-i7-w86"/>
+                    </connections>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="bXK-BE-pEt" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="4775" y="669"/>
+        </scene>
         <!--Sync Control Panel View Controller-->
         <scene sceneID="INA-Kf-FWJ">
             <objects>
@@ -245,7 +272,7 @@
                                                     <rect key="frame" x="10" y="32" width="21" height="21"/>
                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     <state key="normal" image="button:hrK-DY-RbO:image"/>
-                                                    <state key="selected" image="756ABE2D-369C-4EF1-B698-CCE6116D5A54"/>
+                                                    <state key="selected" image="C7C675DC-E713-414F-8CA7-B40124132C94"/>
                                                     <connections>
                                                         <action selector="checkButtonClick:" destination="XXr-fU-67o" eventType="touchUpInside" id="KeU-ld-H4J"/>
                                                     </connections>
@@ -389,7 +416,7 @@
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hql-hH-AXh">
-                                                    <rect key="frame" x="15" y="0.0" width="330" height="44"/>
+                                                    <rect key="frame" x="15" y="0.0" width="330" height="43"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <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"/>
@@ -425,7 +452,7 @@
         </scene>
     </scenes>
     <resources>
-        <image name="756ABE2D-369C-4EF1-B698-CCE6116D5A54" width="24" height="24">
+        <image name="C7C675DC-E713-414F-8CA7-B40124132C94" width="24" height="24">
             <mutableData key="keyedArchiveRepresentation">
 YnBsaXN0MDDUAQIDBAUGPT5YJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK4HCBMU
 GR4fIyQrLjE3OlUkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5TUmVw

+ 15 - 0
RedAnt ERP Mobile/iSales-NPD/ModelDescriptionController.h

@@ -0,0 +1,15 @@
+//
+//  ModelDescriptionController.h
+//  iSales-NPD
+//
+//  Created by Jack on 2017/6/30.
+//  Copyright © 2017年 United Software Applications, Inc. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ModelDescriptionController : UIViewController
+
+@property (nonatomic,copy) NSString *model_desc;
+
+@end

+ 39 - 0
RedAnt ERP Mobile/iSales-NPD/ModelDescriptionController.m

@@ -0,0 +1,39 @@
+//
+//  ModelDescriptionController.m
+//  iSales-NPD
+//
+//  Created by Jack on 2017/6/30.
+//  Copyright © 2017年 United Software Applications, Inc. All rights reserved.
+//
+
+#import "ModelDescriptionController.h"
+
+@interface ModelDescriptionController ()
+
+@property (strong, nonatomic) IBOutlet UITextView *desc_tv;
+
+@end
+
+@implementation ModelDescriptionController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    self.desc_tv.text = self.model_desc;
+    
+    UIBarButtonItem *exitBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"close"] style:UIBarButtonItemStylePlain target:self action:@selector(exitVC)];
+    self.navigationItem.rightBarButtonItem = exitBtn;
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)exitVC {
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
+
+
+@end

+ 8 - 0
RedAnt ERP Mobile/iSales-NPD/config.h

@@ -168,6 +168,10 @@
 
 #define URL_NOTIFY_ME @"http://192.168.0.133:8080/site/isales/notifyMeEmail.htm"
 
+#define URL_EMAIL_WISHLIST @"http://192.168.0.133:8080/site/isales/sendWishListEmail.htm"
+
+#define URL_BLOG @"http://192.168.0.133:8080/site/blog"
+
 #else
 
 
@@ -291,6 +295,10 @@
 
 #define URL_NOTIFY_ME @"https://www.newpacificdirect.com/isales/notifyMeEmail.htm"
 
+#define URL_EMAIL_WISHLIST @"https://www.newpacificdirect.com/isales/sendWishListEmail.htm"
+
+#define URL_BLOG @"https://www.newpacificdirect.com/blog"
+
 #endif
 
 #endif

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/createContact.json

@@ -160,7 +160,7 @@
       "name" : "address_4",
       "value" : ""
     },
-    "title" : "* field is required"
+    "title" : "* field is required(NO RESIDENTIAL DELIVERY)"
   },
   "section_count" : 1,
   "title" : "New Contact",