rushfee/resource/html/authtask/authtaskdetail.html

263 lines
11 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="id" label="规则id" visible = "false"/>
<input widget="edit" name="rule_name" label="规则名称" readonly/> <input widget="edit" name="num" label="任务总数" readonly/>
<br/>
<input widget="int" name="bl" label="分配比例(%)" minValue="1" maxValue="100" onvaluechanged="jisuan"/>
<input widget="int" name="yj" label="预计分配" readonly/>
<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;"/>
<br/>
<input widget="combox" name="end_date" label="到期情况" multiSelect="true" showNullItem="true" sqlid="rushfee_list.grouplist" onValueChanged="endRevenue" nullItemText="" 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="回访次数" nullItemText="" multiSelect="true" showNullItem="true" sqlid="companycount.rushcount" 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"/>
<input widget="edit" name="typechoose" label="规则类型" width="502px" visible="false"/>
<h4 >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">请注意:指定人时,规则将按指定人进行分配,不指定人时默认当前分配任务中的人员</font></h4>
</body>
<script type="text/javascript">
function init(param){
aos.get('id').setValue(param.id);
aos.get('rule_name').setValue(param.rule_name);
aos.get('rule_level').setValue(param.rule_level);
aos.get('startdate').setValue(param.startdate);
aos.get('enddate').setValue(param.enddate);
aos.get('company').setValue(param.org_name);
aos.get('feedback').setValue(param.feedback_conditon_name);
aos.get('emp').setValue(param.user_name);
aos.get('end_date').setValue(param.expire_memo_id);
aos.get('last_date').setValue(param.last_time_days_id);
aos.get('count').setValue(param.visit_account_id);
aos.get('end_date_id').setValue(param.expire_memo_id);
aos.get('last_date_id').setValue(param.last_time_days_id);
aos.get('count_id').setValue(param.visit_account_id);
aos.get('feedback_id').setValue(param.feedback_conditon_id);
aos.get('org_id').setValue(param.org_id);
aos.get('user_id').setValue(param.user_id);
aos.get('typechoose').setValue(param.cust_type);
aos.get('jiguichosoe').setValue(param.injf);
aos.get('mianzhengchoose').setValue(param.ifmz);
aos.get('num').setValue(param.num);
aos.get('bl').setValue(param.bl);
aos.get('yj').setValue(param.bl/100*param.num);
}
function jisuan(e){
var num = aos.get('num').getValue();
var bl = aos.get('bl').getValue();
aos.get('yj').setValue(bl/100*num);
}
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 id = aos.get('id').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 typechoose = aos.get('typechoose').getValue();
var jiguichosoe = aos.get('jiguichosoe').getValue();
var mianzhengchoose = aos.get('mianzhengchoose').getValue();
var bl = aos.get('bl').getValue();
var params ={
typechoose : typechoose,
jiguichosoe :jiguichosoe,
mianzhengchoose:mianzhengchoose,
bl:bl,
id : id,
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,
user_id : user_id
};
var flag=aos.getForm().validate();
if(!flag){
aos.alert("校验失败!");
return;
}
aos.post({
url:'aisinoha/rule/update',
data:params,
success: function(datas){
if(datas.code=='0000'){
aos.alert(datas.message);
CloseWindow(params);
}else{
aos.alert(datas.message);
}
}
});
}
//分公司选择
function choosecomp(){
var param = {};
param['pageState'] = 'editnew';
param['company']=aos.get('company').getValue();
aos.showWindow('canvas/authtask/addcompany', param, '500px', '400px', '添加人员列表', 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/tick/feedbacktask', param, '500px', '400px', '反馈类型筛选任务', 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);
}
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>