151 lines
4.7 KiB
HTML
151 lines
4.7 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-exit" onclick="CloseWindow('close')" style="margin-left:20px;">退出</a>
|
||
|
</div>
|
||
|
|
||
|
<input widget="datechooser" name="startdate" required label="规则开始日期" style = "width:350px;"/>
|
||
|
<input widget="datechooser" name="enddate" required label="规则结束日期" style = "width:350px;"/>
|
||
|
|
||
|
<input widget="textarea" name="emp" label="人员有" emptyText="请点击添加人员" style="width:702px;"/>
|
||
|
<br/>
|
||
|
|
||
|
<input widget="edit" name="count" label="分配任务数" width="502" />
|
||
|
<input widget="edit" name="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">
|
||
|
function init(param){
|
||
|
aos.get('startdate').setValue(param.startdate);
|
||
|
aos.get('enddate').setValue(param.enddate);
|
||
|
aos.get('emp').setValue(param.user_name);
|
||
|
aos.get('id').setValue(param.id);
|
||
|
}
|
||
|
//保存
|
||
|
function save(){
|
||
|
var id = aos.get('id').getValue();
|
||
|
var emp = aos.get('emp').getValue();
|
||
|
var count = aos.get('count').getValue();
|
||
|
if(count){
|
||
|
var params ={
|
||
|
id : id ,
|
||
|
emp : emp,
|
||
|
count : count
|
||
|
};
|
||
|
aos.post({
|
||
|
url:'aisinoha/rule/manual',
|
||
|
data:params,
|
||
|
success: function(datas){
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
CloseWindow(params);
|
||
|
}
|
||
|
//分公司选择
|
||
|
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>
|