Explorar el Código

1.修改NPD Order Detail增加参数ERP Serial Number。

Pen Li hace 8 años
padre
commit
ba42c9cf90

+ 1 - 0
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.h

@@ -35,6 +35,7 @@
 @property float web_info_height;
 @property float web_moreinfo_height;
 
+@property (nonatomic,copy) NSString *erpSerialNo;
 
 
 @property (strong, nonatomic) IBOutlet UIActivityIndicatorView *mum;

+ 9 - 1
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -1147,9 +1147,17 @@
         self.btnPDF.enabled =false;
         self.btnRelease.enabled =false;
         
+        NSMutableDictionary *params = [NSMutableDictionary dictionary];
+        
+        [params setValue:self.orderid forKey:@"orderId"];
+        if (self.erpSerialNo) {
+            [params setValue:self.erpSerialNo forKey:@"erp_order_serial_no"];
+        }
+        
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
             
-            NSDictionary* order_json = [RANetwork request_OrderDetail:self.orderid];
+            
+            NSDictionary* order_json = [RANetwork request_OrderDetail:params];
             
             dispatch_async(dispatch_get_main_queue(), ^{
                 

+ 2 - 0
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -1203,7 +1203,9 @@
         
     };
     NSString* order_code =[self.content_data[indexPath.row] valueForKey:@"order_code"];
+    NSString *erpSerialNo = [self.content_data[indexPath.row] valueForKey:@"erp_order_serial_no"];
     
+    dvc.erpSerialNo = erpSerialNo;
     dvc.is_shoporder=(self.orderType == 0);
     dvc.order_code = order_code;
     dvc.order_status =[[self.content_data[indexPath.row] valueForKey:@"orderStatus"] intValue];

+ 1 - 1
RedAnt ERP Mobile/common/data_provider/RANetwork.h

@@ -108,7 +108,7 @@ extern NSString *const ScreenCodeOfflineSync;
 +(NSDictionary*) move_cart2wish:(NSString* ) item_ids;
 
 +(NSDictionary*)request_OrderList:(int ) offset limit :(int)limit keywords :(NSString* ) keywords status:(NSString*) status_code customer:(NSString*) customer is_merged:(BOOL) isMerged;
-+(NSDictionary*)request_OrderDetail:(NSString* ) orderid;
++(NSDictionary*)request_OrderDetail:(NSMutableDictionary *) params;
 +(NSDictionary*)commit_Order:(NSString*) order_code;// saved:(bool) saved;
 +(NSDictionary*)copy_Order:(NSString*) order_code;
 +(NSDictionary*)sign_Order:(NSString*) order_code path:(NSString*)path;

+ 6 - 3
RedAnt ERP Mobile/common/data_provider/RANetwork.m

@@ -2051,9 +2051,12 @@ repeat:
     NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
     return jsobj;
 }
-+(NSDictionary*)request_OrderDetail:(NSString* ) orderid
++(NSDictionary*)request_OrderDetail:(NSMutableDictionary *) params
 {
-    NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
+//    NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
+    if (params == nil) {
+        params = [[NSMutableDictionary alloc] init];
+    }
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     if(appDelegate.user!=nil)
         [params setValue:appDelegate.user forKey:@"user"];
@@ -2062,7 +2065,7 @@ repeat:
     if(appDelegate.password!=nil)
         [params setValue:appDelegate.password forKey:@"password"];
     
-    [params setValue:orderid forKey:@"orderId"];
+    
     //    [params setValue:[NSString stringWithFormat:@"%d",limit ] forKey:@"limit"];
     
     [params setObject:ScreenCodeOrderInfo forKey:kScreenName];