@@ -10,5 +10,6 @@ FROM sa_order t1
LEFT JOIN sys_enterprise t2 ON t1.sys_enterpriseid = t2.sys_enterpriseid
AND t1.siteid = t2.siteid
WHERE t1.STATUS = '审核'
+ and exists (select 1 from sa_orderitems where (ifnull(undeliqty, 0)!=0 and ifnull(isclose, 0 )= 0) and sa_orderid=t1.sa_orderid)
AND t1.siteid = $siteid$
and $where$