Răsfoiți Sursa

修改orderlist搜索查询

Pen Li 9 ani în urmă
părinte
comite
654941f857

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


+ 1 - 7
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -4677,11 +4677,10 @@
     keyword = [self translateSingleQuote:keyword]; // 转义单引号
     NSString *orderStatus = [params valueForKey:@"orderStatus"];
     
-    NSString *contactID = [self valueInParams:params key:@"contactId"]; // 新建order时会多一个contactId,此时status = 0
     
     NSString* where=@"1 = 1";
     if(keyword.length>0)
-        where=[where stringByAppendingString:[NSString stringWithFormat:@" and (lower(o.order_id) like '%%%@%%' or lower(c.company_name) like '%%%@%%' or lower(c.company_name) like '%%%@%%' or lower(o.create_by) like '%%%@%%')",keyword.lowercaseString,keyword.lowercaseString,keyword.lowercaseString,keyword.lowercaseString]];
+        where=[where stringByAppendingString:[NSString stringWithFormat:@" and (lower(o.so_id) like '%%%@%%' or lower(o.sales_rep) like '%%%@%%' or lower(decrypt(c.company_name)) like '%%%@%%' or lower(o.create_by) like '%%%@%%')",keyword.lowercaseString,keyword.lowercaseString,keyword.lowercaseString,keyword.lowercaseString]];
     
     if (orderStatus.length > 0) {
         NSArray *order_status_array = [orderStatus componentsSeparatedByString:@","];
@@ -4698,11 +4697,6 @@
                 where = [where stringByAppendingString:[NSString stringWithFormat:@"%@ o.status = %@",condition,status]];
             }
             
-            if (contactID.length) {
-                
-                where = [where stringByAppendingString:[NSString stringWithFormat:@" or customer_cid = '%@'",[contactID stringByReplacingOccurrencesOfString:@"'" withString:@"''"]]];
-            }
-            
             where = [where stringByAppendingString:@" )"];
         }
     }