master
yuan 7 years ago
parent 9abd9b36ed
commit c53ea04d2e

@ -359,11 +359,13 @@
and t.system_transaction_id =#{search_text} and t.system_transaction_id =#{search_text}
</if> </if>
</if> </if>
<if test="org_ids!=null">and p.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
<if test="order_id!=null">and o.order_id=#{order_id}</if> <if test="order_id!=null">and o.order_id=#{order_id}</if>
<if test="trade_type!=null">and o.gateway in <if test="trade_type!=null">and o.gateway in
<foreach collection="trade_type" item="gateway" open="(" close=")" separator=",">#{gateway}</foreach> <foreach collection="trade_type" item="gateway" open="(" close=")" separator=",">#{gateway}</foreach>
</if> </if>
<if test="org_id!=null">and p.org_id=#{org_id}</if> <if test="org_id!=null and org_ids==null">and p.org_id=#{org_id}</if>
<if test="from!=null">and o.create_time &gt;= #{from}</if> <if test="from!=null">and o.create_time &gt;= #{from}</if>
<if test="to!=null">and o.create_time &lt; #{to}</if> <if test="to!=null">and o.create_time &lt; #{to}</if>
<if test="date!=null">and date(o.create_time)=date(#{date})</if> <if test="date!=null">and date(o.create_time)=date(#{date})</if>

@ -3,7 +3,7 @@
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.ManagerMapper"> <mapper namespace="au.com.royalpay.payment.manage.mappers.system.ManagerMapper">
<select id="listByRole" resultType="com.alibaba.fastjson.JSONObject"> <select id="listByRole" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[ <![CDATA[
SELECT manager_id,display_name,role,m.org_id,o.name org_name,m.wx_openid wx_openid FROM sys_managers m SELECT manager_id,display_name,role,m.org_id,o.name org_name,m.wx_openid wx_openid,o.parent_org_id FROM sys_managers m
LEFT JOIN sys_org o ON o.org_id=m.org_id LEFT JOIN sys_org o ON o.org_id=m.org_id
WHERE role & #{mask} >0 and m.is_valid=1 WHERE role & #{mask} >0 and m.is_valid=1
AND o.type = 0 AND o.type = 0

@ -168,7 +168,8 @@
ng-click="disableOrg(org)" ng-if="(currentUser.org_id == null)||(org.parent_org_id == currentUser.org_id)">Disable</a> ng-click="disableOrg(org)" ng-if="(currentUser.org_id == null)||(org.parent_org_id == currentUser.org_id)">Disable</a>
<a role="button" class="text-bold text-primary" <a role="button" class="text-bold text-primary"
ui-sref=".detail_parent({orgId:org.org_id})" ng-if="org.org_id==currentUser.org_id">Detail</a> ui-sref=".detail_parent({orgId:org.org_id})" ng-if="org.org_id==currentUser.org_id"><i
class="fa fa-edit"></i> Edit</a>
</div> </div>
</td> </td>
</tr> </tr>

@ -2519,5 +2519,32 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return bdUsers; return bdUsers;
} }
}); });
app.filter('bdOrgSelect', function () {
return function (bdUsers, params) {
var org_id;
org_id = params.org_ids ||params.org_id || currentUser.org_id;
if (org_id) {
var bdUserByOrg = {};
var count = 0;
angular.forEach(bdUsers, function (bdUser) {
if(params.org_ids){
if (bdUser.org_id == org_id) {
bdUserByOrg[count] = bdUser;
count++;
}
}else {
if (bdUser.org_id == org_id || bdUser.parent_org_id == org_id) {
bdUserByOrg[count] = bdUser;
count++;
}
}
});
return bdUserByOrg;
}
return bdUsers;
}
});
return app; return app;
}); });

@ -237,12 +237,12 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group col-sm-6" ng-if="!('100'|withRole)"> <div class="form-group col-sm-6" ng-if="!('100'|withRole) || (currentUser.org_id && !currentUser.parent_org_id)">
<label class="control-label col-xs-4 col-sm-4" for="bd-select">BD <label class="control-label col-xs-4 col-sm-4" for="bd-select">BD
User</label> User</label>
<div class="col-xs-6 col-sm-6"> <div class="col-xs-6 col-sm-6">
<select id="bd-select" class="form-control" ng-model="params.bd" <select id="bd-select" class="form-control" ng-model="params.bd"
ng-options="bd.manager_id as bd.display_name group by bd.org_name for bd in bdUserSource | bdOrg:params.org_id"> ng-options="bd.manager_id as bd.display_name group by bd.org_name for bd in bdUserSource | bdOrgSelect:params">
<option value="">All</option> <option value="">All</option>
</select> </select>
</div> </div>

Loading…
Cancel
Save