234 lines
9.2 KiB
HTML
234 lines
9.2 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>添加规则</title>
|
||
|
</head>
|
||
|
<body >
|
||
|
<div widget="toolbar" >
|
||
|
<a widget="button" iconCls="icon-save" onclick="save" >保存</a>
|
||
|
<a widget="button" iconCls="icon-edit" onclick="choosecomp()"style="margin-left:20px;">分公司选择</a>
|
||
|
<a widget="button" iconCls="icon-edit" onclick="choosecheck()"style="margin-left:20px;">反馈筛选</a>
|
||
|
<a widget="button" iconCls="icon-edit" onclick="addpeople()"style="margin-left:20px;">添加人员</a>
|
||
|
<a widget="button" iconCls="icon-exit" onclick="CloseWindow('close')" style="margin-left:20px;">退出</a>
|
||
|
</div>
|
||
|
<input widget="edit" name="rule_name" label="规则名称" required style="width:702px;margin-top:5px"/>
|
||
|
<br/>
|
||
|
<input widget="int" name="bl" label="分配比例(%)" minValue="1" maxValue="100" />
|
||
|
<div name="typechoose" required label="客户类型选择" widget="radiobuttonlist" onValueChanged="tuoguan"
|
||
|
repeatitems="2" repeatlayout="table" textfield="text" valuefield="id"
|
||
|
data="[{id:0,text:'服务费'},{id:1,text:'托管'}]">
|
||
|
</div>
|
||
|
<div name="jiguichosoe" label="是否在机柜" widget="radiobuttonlist" onValueChanged="tuoguan"
|
||
|
repeatitems="2" repeatlayout="table" textfield="text" valuefield="id"
|
||
|
data="[{id:0,text:'否'},{id:1,text:'是'}]">
|
||
|
</div>
|
||
|
<div name="mianzhengchoose" label="是否免征" widget="radiobuttonlist" onValueChanged="tuoguan"
|
||
|
repeatitems="2" repeatlayout="table" textfield="text" valuefield="id"
|
||
|
data="[{id:0,text:'否'},{id:1,text:'是'}]">
|
||
|
</div>
|
||
|
<input widget="combox" name="rule_level" label="规则优先级" required style="width:702px;margin-top:5px"
|
||
|
url="aisinoha/rule/searchlevel" valueField="id" textField="text"/>
|
||
|
<br/>
|
||
|
<input widget="datechooser" name="startdate" required label="规则开始日期" style = "width:350px;"/>
|
||
|
<input widget="datechooser" name="enddate" required label="规则结束日期" style = "width:350px;"/>
|
||
|
<br/>
|
||
|
<input widget="textarea" name="company" label="分公司" emptyText="请点击分公司选择" style="width:702px;" />
|
||
|
<br/>
|
||
|
<input widget="textarea" name="feedback" label="筛选条件有" emptyText="请点击反馈筛选"style="width:702px;"/>
|
||
|
<br/>
|
||
|
<input widget="textarea" name="emp" label="人员有" emptyText="请点击添加人员" style="width:702px;height:70px;"/>
|
||
|
<br/>
|
||
|
<input widget="combox" name="end_date" label="到期情况" multiSelect="true" sqlid="rushfee_list.grouplist" showNullItem="true" onValueChanged="endRevenue"style = "width:351px;"/>
|
||
|
<input widget="combox" name="last_date" label="距上次催缴天数" sqlid="search.getrushday" onValueChanged="last_dateRevenue" showNullItem="true" style = "width:351px;"/>
|
||
|
<br/>
|
||
|
<input widget="combox" name="count" label="回访次数" multiSelect="true" sqlid="companycount.rushcount" showNullItem="true" style="width:632px;margin-top:5px" emptyText="请选择" onValueChanged="countRevenue"/>
|
||
|
<a widget="button" iconCls="icon-enabled" style="width:70px;margin-top:5px" onclick="select()">全选</a>
|
||
|
<input widget="edit" name="end_date_id" label="到期情况ID" width="502"visible="false"/>
|
||
|
<input widget="edit" name="last_date_id" label="距上次催缴天数ID" width="502" visible="false"/>
|
||
|
<input widget="edit" name="count_id" label="回访次数ID" width="502" visible="false"/>
|
||
|
<input widget="edit" name="feedback_id" label="筛选条件ID" width="502" visible="false"/>
|
||
|
<input widget="edit" name="org_id" label="分公司id" style="width:502px;" visible="false" />
|
||
|
<input widget="edit" name="user_id" label="人员id" width="502px" visible="false"/>
|
||
|
<h4 > <font color="red">请注意:指定人时,规则将按指定人进行分配,不指定人时默认当前分配任务中的人员</font></h4>
|
||
|
</body>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
//保存
|
||
|
aos.get('typechoose').setValue(0);
|
||
|
aos.get('bl').setValue(100);
|
||
|
function tuoguan(e){
|
||
|
var typechoose = aos.get('typechoose').getValue();
|
||
|
if(typechoose==0){
|
||
|
aos.get('jiguichosoe').setValue();
|
||
|
aos.get('mianzhengchoose').setValue();
|
||
|
aos.tip("服务费不能选择是否机柜和免征!",3000);
|
||
|
}
|
||
|
}
|
||
|
function save(){
|
||
|
var jiguichosoe = aos.get('jiguichosoe').getValue();
|
||
|
var mianzhengchoose = aos.get('mianzhengchoose').getValue();
|
||
|
var typechoose = aos.get('typechoose').getValue();
|
||
|
var bl = aos.get('bl').getValue();
|
||
|
var rule_name = aos.get('rule_name').getValue();
|
||
|
var rule_level = aos.get('rule_level').getValue();
|
||
|
var startdate = aos.get('startdate').getValue();
|
||
|
var enddate = aos.get('enddate').getValue();
|
||
|
var company = aos.get('company').getValue();
|
||
|
var org_id = aos.get('org_id').getValue();
|
||
|
var end_date = aos.get('end_date').getText();
|
||
|
var end_date_id = aos.get('end_date_id').getValue();
|
||
|
var last_date = aos.get('last_date').getText();
|
||
|
var last_date_id = aos.get('last_date_id').getValue();
|
||
|
var count = aos.get('count').getText();
|
||
|
var count_id = aos.get('count_id').getValue();
|
||
|
var feedback = aos.get('feedback').getValue();
|
||
|
var feedback_id = aos.get('feedback_id').getValue();
|
||
|
var emp = aos.get('emp').getValue();
|
||
|
var user_id = aos.get('user_id').getValue();
|
||
|
var params ={
|
||
|
typechoose : typechoose,
|
||
|
jiguichosoe : jiguichosoe,
|
||
|
mianzhengchoose : mianzhengchoose,
|
||
|
rule_name : rule_name,
|
||
|
rule_level : rule_level,
|
||
|
startdate : startdate,
|
||
|
enddate : enddate,
|
||
|
company : company,
|
||
|
org_id : org_id,
|
||
|
end_date : end_date,
|
||
|
end_date_id : end_date_id,
|
||
|
last_date : last_date,
|
||
|
last_date_id : last_date_id,
|
||
|
count : count,
|
||
|
count_id : count_id,
|
||
|
feedback : feedback,
|
||
|
feedback_id : feedback_id,
|
||
|
emp : emp,
|
||
|
bl:bl,
|
||
|
user_id : user_id
|
||
|
};
|
||
|
if(startdate>enddate){
|
||
|
aos.alert("规则起始时间大于结束时间,请重新选择时间!");
|
||
|
return;
|
||
|
}
|
||
|
var flag=aos.getForm().validate();
|
||
|
if(!flag){
|
||
|
aos.alert("校验失败!");
|
||
|
return;
|
||
|
}
|
||
|
aos.post({
|
||
|
url:'aisinoha/rule/save',
|
||
|
data:params,
|
||
|
success: function(datas){
|
||
|
if(datas.code=='0000'){
|
||
|
aos.alert(datas.message);
|
||
|
CloseWindow(params);
|
||
|
grid.load();
|
||
|
}else{
|
||
|
aos.alert(datas.message);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//分公司选择
|
||
|
function choosecomp(){
|
||
|
var param = {};
|
||
|
param['pageState'] = 'editnew';
|
||
|
param['company']=aos.get('company').getValue();
|
||
|
aos.showWindow('canvas/authtask/addcompany', param, '400px', '300px', '选择分公司', function(params,RtnData){
|
||
|
aos.get('company').setValue(params['company']);
|
||
|
aos.get('company').setValue(RtnData['company']);
|
||
|
var company = aos.get('company').getValue();
|
||
|
var params= {
|
||
|
company : company
|
||
|
}
|
||
|
if(company==""){
|
||
|
aos.get('org_id').setValue("");
|
||
|
return ;
|
||
|
}
|
||
|
aos.post({
|
||
|
url:'aisinoha/rule/getcompany',
|
||
|
data:params,
|
||
|
success: function(datas){
|
||
|
//aos.alert(datas.id);
|
||
|
aos.get('org_id').setValue(datas.id);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
//反馈筛选
|
||
|
function choosecheck(){
|
||
|
var param = {};
|
||
|
param['pageState'] = 'editnew';
|
||
|
param['feedback']=aos.get('feedback').getValue();
|
||
|
aos.showWindow('canvas/authtask/addfeedback', param, '500px', '280px', '反馈类型筛选任务', function(params,RtnData){
|
||
|
aos.get('feedback').setValue(params['feedback']);
|
||
|
aos.get('feedback').setValue(RtnData['feedback']);
|
||
|
var feedback = aos.get('feedback').getValue();
|
||
|
var params= {
|
||
|
feedback : feedback
|
||
|
}
|
||
|
if(feedback==""){
|
||
|
aos.get('feedback_id').setValue("");
|
||
|
return;
|
||
|
}
|
||
|
aos.post({
|
||
|
url:'aisinoha/rule/getfeedbacklist',
|
||
|
data:params,
|
||
|
success: function(datas){
|
||
|
//aos.alert(datas.id);
|
||
|
aos.get('feedback_id').setValue(datas.id);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
//添加人员
|
||
|
function addpeople(){
|
||
|
var param = {};
|
||
|
param['pageState'] = 'editnew';
|
||
|
param['emp']=aos.get('emp').getValue();
|
||
|
aos.showWindow('canvas/authtask/addtaskpeople', param, '500px', '400px', '添加人员列表', function(params,RtnData){
|
||
|
aos.get('emp').setValue(params['emp']);
|
||
|
aos.get('emp').setValue(RtnData['emp']);
|
||
|
var emp = aos.get('emp').getValue();
|
||
|
var params= {
|
||
|
emp : emp
|
||
|
}
|
||
|
if(emp==""){
|
||
|
aos.get('user_id').setValue("");
|
||
|
return;
|
||
|
}
|
||
|
aos.post({
|
||
|
url:'aisinoha/rule/getuserlist',
|
||
|
data:params,
|
||
|
success: function(datas){
|
||
|
//aos.alert(datas.id);
|
||
|
aos.get('user_id').setValue(datas.id);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
function select(){
|
||
|
var select=aos.get('count');
|
||
|
var asd ='0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26';
|
||
|
select.setValue(asd);
|
||
|
aos.get('count_id').setValue(asd);
|
||
|
}
|
||
|
|
||
|
function endRevenue (e){
|
||
|
var id = aos.get('end_date').getValue();
|
||
|
aos.get('end_date_id').setValue(id);
|
||
|
}
|
||
|
function countRevenue(e){
|
||
|
var id = aos.get('count').getValue();
|
||
|
aos.get('count_id').setValue(id);
|
||
|
}
|
||
|
function last_dateRevenue(e){
|
||
|
var id = aos.get('last_date').getValue();
|
||
|
aos.get('last_date_id').setValue(id);
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</html>
|