|
@@ -62,12 +62,18 @@ FROM u_mattress
|
|
<when notnull="@arg_deptid">
|
|
<when notnull="@arg_deptid">
|
|
u_mattress.deptid = @arg_deptid
|
|
u_mattress.deptid = @arg_deptid
|
|
</when>
|
|
</when>
|
|
- <when>
|
|
|
|
|
|
+ <when $user_deptstr!="-1">
|
|
u_mattress.createby in ($$user_outrepstr$$)
|
|
u_mattress.createby in ($$user_outrepstr$$)
|
|
</when>
|
|
</when>
|
|
- <when>
|
|
|
|
|
|
+ <when $user_deptstr!="-1">
|
|
u_mattress.deptid in ($$user_deptstr$$)
|
|
u_mattress.deptid in ($$user_deptstr$$)
|
|
</when>
|
|
</when>
|
|
|
|
+ <when notnull="@arg_search">
|
|
|
|
+ EXISTS (SELECT 1 FROM dbo.SC_SPLIT(@arg_search, ',') A WHERE A.Item <> '' AND (u_mattress.mattresscode LIKE '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressrelcode like '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressname like '%'+LTRIM(RTRIM(A.Item))+'%'))
|
|
|
|
+ </when>
|
|
|
|
+ <when notnull="@arg_erp_mtrlcode">
|
|
|
|
+ EXISTS (SELECT 1 FROM dbo.SC_SPLIT(@arg_erp_mtrlcode, ',') A WHERE A.Item <> '' AND (u_mattress.erp_mtrlcode LIKE '%'+LTRIM(RTRIM(A.Item))+'%'))
|
|
|
|
+ </when>
|
|
</where>
|
|
</where>
|
|
<displayfields>
|
|
<displayfields>
|
|
<field field="pid" compute="getrow()">序</field>
|
|
<field field="pid" compute="getrow()">序</field>
|