Przeglądaj źródła

修复Order Detail中Sign按钮不可点击时Signature可以点击签名。

Pen Li 9 lat temu
rodzic
commit
af1d055e8b

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


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

@@ -1459,7 +1459,7 @@
                 OrderDetailSignatureCell * cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
                 NSString* img_url = [self.content_data valueForKey:@"sign_url"];
                 
-                cell.sign_img.userInteractionEnabled = YES;
+                cell.sign_img.userInteractionEnabled = NO;
                 __block BOOL hasTapGesture = NO;
                 [cell.sign_img.gestureRecognizers enumerateObjectsUsingBlock:^(__kindof UIGestureRecognizer * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
                     
@@ -1475,6 +1475,23 @@
                     [cell.sign_img addGestureRecognizer:signatureTap];
                 }
                 
+                int status_code = [[self.content_data valueForKey:@"orderStatus"] intValue];
+                bool offline_edit =[[self.content_data valueForKey:@"offline_edit"] boolValue];
+                if(status_code==1) {
+
+                    if(appDelegate.offline_mode==false||offline_edit) {
+                        cell.sign_img.userInteractionEnabled = YES;
+                    }
+
+                }
+                else if(status_code==0) {
+                        if(appDelegate.offline_mode==false||offline_edit) {
+                            cell.sign_img.userInteractionEnabled = YES;
+                        }
+                }
+
+                
+                
                 NSString* file_name=[img_url lastPathComponent];
                 NSData* img_data=[iSalesDB load_cached_img:file_name loadFrom:img_url];
                 if(img_data!=nil)