2022-05-16 15:07:40 +00:00
|
|
|
<html login="false" auth="false">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>规则列表</title>
|
|
|
|
<style>
|
|
|
|
a {float:right;}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div widget="toolbar" style="padding:4px;border:0;">
|
|
|
|
|
|
|
|
<input name="rulename" widget="edit" textfield="text" style="width: 300px;" label="规则名称">
|
|
|
|
<input name="begindate" widget=datechooser allowinput="f" style="margin-left: 20px;" label="规则开始日期">
|
|
|
|
<input name="enddate" widget=datechooser allowinput="f" style="margin-left: -50px;" label="至">
|
|
|
|
<input name="custtype" widget=combox allowinput="f" style="width: 150px;" showNullItem="true"
|
|
|
|
data="[{id:1,text:'托管'},{id:0,text:'服务费'}]" label="客户类型">
|
|
|
|
<input name="injf" widget=combox allowinput="f" style="width: 150px;" showNullItem="true"
|
|
|
|
data="[{id:1,text:'是'},{id:0,text:'否'}]" label="是否在机柜">
|
|
|
|
<input name="ifmz" widget=combox allowinput="f" style="width: 150px;" showNullItem="true"
|
|
|
|
data="[{id:1,text:'是'},{id:0,text:'否'}]" label="是否免征">
|
|
|
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
|
|
|
<a widget="button" iconCls="icon-edit" onclick="authTask()">创建规则</a>
|
|
|
|
<a widget="button" iconCls="icon-edit" onclick="updateTask()">修改规则</a>
|
|
|
|
<a widget="button" iconCls="icon-delete" onclick="deleteTask()">删除</a>
|
2022-10-01 13:37:45 +00:00
|
|
|
<a widget="button" iconCls="icon-ok" onclick="autotask()">手动执行</a>
|
2022-05-16 15:07:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div widget="autosize">
|
|
|
|
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="aisinoha/rule/search">
|
|
|
|
<div type="checkcolumn" width="20" header="选择"></div>
|
|
|
|
<div type="indexcolumn" width="20" header="序号"></div>
|
|
|
|
<div field="id" width= "50" header= "规则id" visible= "false"></div>
|
|
|
|
<div field="rule_level" width= "50" header= "规则等级" renderer= "changeRenderer"></div>
|
|
|
|
<div field="cust_type" width= "50" header= "客户类型" renderer= "custRenderer"></div>
|
|
|
|
<div field="rule_name" width= "50" header= "规则名称"></div>
|
|
|
|
<div field="org_name" width= "50" header= "分公司"></div>
|
|
|
|
<div field="visit_account_name" width= "50" header= "回访次数"></div>
|
|
|
|
<div field="last_time_days_name" width= "50" header= "距离上次催缴天数"></div>
|
|
|
|
<div field="expire_memo" width= "50" header= "到期情况"></div>
|
|
|
|
<div field="feedback_conditon_name" width= "50" header= "筛选条件"></div>
|
|
|
|
<div field="user_name" width= "50" header= "分配人员名称"></div>
|
|
|
|
<div field="num" width= "50" header= "该规则任务数"></div>
|
|
|
|
<div field="bl" width= "50" header= "分配比例%"></div>
|
|
|
|
<!-- <div field="injf" width= "50" header= "是否在机柜"></div>
|
|
|
|
<div field="ifmz" width= "50" header= "是否免征"></div>-->
|
|
|
|
<div field="startdate" width= "50" header= "规则开始时间"></div>
|
|
|
|
<div field="enddate" width= "50" header= "规则结束时间"></div>
|
|
|
|
<!--<div field="typechoose" width= "50" header= "规则类型" renderer= "typeRenderer"></div>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
<script type="text/javascript">
|
|
|
|
/* window.onload=function(){
|
|
|
|
aos.post({
|
|
|
|
url://'aisino/job/getrule',
|
|
|
|
data: null,
|
|
|
|
success: function(datas){
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
} */
|
|
|
|
var grid = aos.get('grid');
|
|
|
|
grid.load();
|
|
|
|
//查询
|
|
|
|
function search(){
|
|
|
|
var params={
|
|
|
|
custtype:aos.get('custtype').getValue(),
|
|
|
|
injf:aos.get('injf').getValue(),
|
|
|
|
ifmz:aos.get('ifmz').getValue(),
|
|
|
|
rulename:aos.get('rulename').getValue(),
|
|
|
|
begindate:aos.get('begindate').getValue(),
|
|
|
|
enddate : aos.get('enddate').getValue()
|
|
|
|
};
|
|
|
|
grid.load(params);
|
|
|
|
}
|
|
|
|
//修改
|
|
|
|
function updateTask(){
|
|
|
|
var rows=grid.getSelected();//getSelecteds
|
|
|
|
if(rows==null || rows==''){
|
|
|
|
aos.alert('请选择一条数据!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(rows.length>1){
|
|
|
|
aos.alert('请选择一条数据!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var rtnData=grid.getSelected();
|
|
|
|
var param = {};
|
|
|
|
param['id'] = rtnData.id;
|
|
|
|
param['rule_level'] = rtnData.rule_level;
|
|
|
|
param['rule_name']=rtnData.rule_name;
|
|
|
|
param['org_id']=rtnData.org_id;
|
|
|
|
param['org_name']=rtnData.org_name;
|
|
|
|
param['visit_account_name']=rtnData.visit_account_name;
|
|
|
|
param['visit_account_id']=rtnData.visit_account_id;
|
|
|
|
param['last_time_days_name']= rtnData.last_time_days_name;
|
|
|
|
param['last_time_days_id'] = rtnData.last_time_days_id;
|
|
|
|
param['expire_memo'] = rtnData.expire_memo;
|
|
|
|
param['expire_memo_id'] = rtnData.expire_memo_id;
|
|
|
|
param['feedback_conditon_name'] = rtnData.feedback_conditon_name;
|
|
|
|
param['feedback_conditon_id'] = rtnData.feedback_conditon_id;
|
|
|
|
param['user_id'] = rtnData.user_id;
|
|
|
|
param['user_name'] = rtnData.user_name;
|
|
|
|
param['startdate'] = rtnData.startdate;
|
|
|
|
param['enddate'] = rtnData.enddate;
|
|
|
|
param['cust_type'] = rtnData.cust_type;
|
|
|
|
param['injf'] = rtnData.injf;
|
|
|
|
param['ifmz'] = rtnData.ifmz;
|
|
|
|
param['num'] = rtnData.num;
|
|
|
|
param['bl'] = rtnData.bl;
|
|
|
|
//param['typechoose'] = rtnData.typechoose;
|
|
|
|
//aos.alert(rtnData.logourl);
|
|
|
|
aos.showWindow('canvas/authtask/authtaskdetail', param, '750px', '550px', '规则修改页面',function(rtnValue){
|
|
|
|
grid.reload();
|
|
|
|
//search();
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
//添加
|
|
|
|
function authTask(){
|
|
|
|
var param = {};
|
|
|
|
param['flag']=1;
|
|
|
|
aos.showWindow('canvas/authtask/taskadd', param, '750px', '550px', '添加规则', function(){
|
|
|
|
search();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//删除
|
|
|
|
function deleteTask(){
|
|
|
|
var row=grid.getSelected();
|
|
|
|
if(!row){
|
|
|
|
aos.alert('选择一行后进行删除!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
aos.confirm('确认删除吗?',null,function(action){
|
|
|
|
if(action == 'cancel')
|
|
|
|
return;
|
|
|
|
var data={};
|
|
|
|
data['id']=row.id;
|
|
|
|
data['typechoose'] = row.typechoose;
|
|
|
|
aos.post({
|
|
|
|
url:"aisinoha/rule/delete",
|
|
|
|
data:data,
|
|
|
|
success:function(rtnData){
|
|
|
|
aos.alert('删除成功!');
|
|
|
|
grid.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
grid.removeRow(row, true);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function changeRenderer(e){
|
|
|
|
var value = e.value;
|
|
|
|
if(value==0){
|
|
|
|
return "第一等级";
|
|
|
|
}else if(value==1){
|
|
|
|
return "第二等级";
|
|
|
|
}else if(value==2){
|
|
|
|
return "第三等级";
|
|
|
|
}
|
|
|
|
else if(value==3){
|
|
|
|
return "第四等级";
|
|
|
|
}else if(value==4){
|
|
|
|
return "第五等级";
|
|
|
|
}else if(value==5){
|
|
|
|
return "第六等级";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function custRenderer(e){
|
|
|
|
var value = e.value;
|
|
|
|
if(value==0){
|
|
|
|
return "服务费";
|
|
|
|
}else if(value==1){
|
|
|
|
return "托管";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function typeRenderer(e){
|
|
|
|
var row = e.row;
|
|
|
|
var value = row.typechoose;
|
|
|
|
if(value=='auth'){
|
|
|
|
return "自动";
|
|
|
|
}else if(value=='manual'){
|
|
|
|
return "手动";
|
|
|
|
}else {
|
|
|
|
return "其他";
|
|
|
|
}
|
|
|
|
}
|
2022-10-01 13:37:45 +00:00
|
|
|
|
|
|
|
function autotask(){
|
|
|
|
var rows=grid.getSelected();//getSelecteds
|
|
|
|
if(rows==null || rows==''){
|
|
|
|
aos.alert('请选择一条数据!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(rows.length>1){
|
|
|
|
aos.alert('请选择一条数据!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
aos.tip('任务开始执行!');
|
|
|
|
|
|
|
|
var data={};
|
|
|
|
data['id']=rows.id;
|
|
|
|
aos.post({
|
|
|
|
url:"rush/manualtask/zbtask",
|
|
|
|
data:data,
|
|
|
|
success:function(rtnData){
|
|
|
|
|
|
|
|
if(rtnData==1){
|
|
|
|
aos.alert('任务执行完成!');
|
|
|
|
grid.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-16 15:07:40 +00:00
|
|
|
function autoexe(){
|
|
|
|
var rows=grid.getSelected();//getSelecteds
|
|
|
|
if(rows==null || rows==''){
|
|
|
|
aos.alert('请选择一条数据!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(rows.length>1){
|
|
|
|
aos.alert('请选择一条数据!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var typechoose = rows.typechoose;
|
|
|
|
if(typechoose=='auth'){
|
|
|
|
aos.alert("该功能只支持手动");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var rtnData=grid.getSelected();
|
|
|
|
var param = {};
|
|
|
|
param['id'] = rtnData.id;
|
|
|
|
param['user_name']=rtnData.user_name;
|
|
|
|
param['startdate'] = rtnData.startdate;
|
|
|
|
param['enddate'] = rtnData.enddate;
|
|
|
|
|
|
|
|
aos.showWindow('canvas/authtask/taskadd_manual', param, '720px', '500px', '制定手动规则', function(){
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</html>
|