325 lines
12 KiB
HTML
325 lines
12 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>任务明细</title>
|
||
|
</head>
|
||
|
<body > <input widget="hidden" name="feedback"/>
|
||
|
<input widget="hidden" name="count" />
|
||
|
<input widget="hidden" name="chargetype" />
|
||
|
<input widget="hidden" name="chargetypeNum" />
|
||
|
<input widget="hidden" name="revenue" />
|
||
|
<input widget="hidden" name="enddate"/>
|
||
|
<input widget="hidden" name="last_date"/>
|
||
|
<input widget="hidden" name="injf"/>
|
||
|
<input widget="hidden" name="ifmz"/>
|
||
|
|
||
|
<input widget="edit" name="task_name" label="任务名称" style="width:516px;margin-top:5px"/>
|
||
|
<br/>
|
||
|
<input widget="edit" name="task_remark" label="任务描述" style="width:516px"/>
|
||
|
<br/>
|
||
|
<input widget="datechooser" name="start_date" label="预计开始日期" style="margin-left:26px"/>
|
||
|
<input widget="datechooser" name="end_date" label="预计结束日期" style="margin-left:-11px" />
|
||
|
<input widget="hidden" name="count" label="count"/>
|
||
|
<br/>
|
||
|
<div widget="toolbar" style="margin-left:35px;width:613px;margin-top:10px;">
|
||
|
<a widget="button" iconcls="icon-add" onclick="assign">新增</a>
|
||
|
<a widget="button" iconcls="icon-delete" onclick="remove">删除</a>
|
||
|
<a widget="button" iconCls="icon-edit" onclick="shaixuan()">反馈筛选</a>
|
||
|
</div>
|
||
|
<div widget="autosize" style="margin-left:35px">
|
||
|
<div widget="datagrid" name="grid" style="width: 618px; height:70%" url="rushtasklist/post/queryTaskDetial" allowcelledit="true" allowcellselect="true" allowalternating="true" editnextonenterkey="true" editnextrowcell="true" >
|
||
|
<div type="checkcolumn" width="35" header="选择" ></div>
|
||
|
<div type="indexcolumn" width="35" header="序号"></div>
|
||
|
<div field="company" width="50" header="分公司" > </div>
|
||
|
<div field="chargetype" width="50" header="客户类型" > </div>
|
||
|
<div field="end_date_name" width="80" header="到期情况"> </div>
|
||
|
<div field="count" width="40" header="回访次数"> </div>
|
||
|
<div field="user_name" width="40" header="人员" ></div>
|
||
|
<div field="last_date_name" width="80" header="距上次催缴"></div>
|
||
|
<div field="tasknum" width="30" header="条数" ></div>
|
||
|
<div field="ratio" width="50" header="完成比例" renderer="percentRenderer" multiplyHundred="true"></div>
|
||
|
<div field="task_user" visible="false"></div>
|
||
|
<div field="task_num" visible="false"></div>
|
||
|
<div field="companyId" visible="false"></div>
|
||
|
<div field="chargetypeNum" visible="false"></div>
|
||
|
<div field="last_date" visible="false"></div>
|
||
|
<div field="revenue" visible="false"></div>
|
||
|
<div field="end_date" visible="false"></div>
|
||
|
<div field="detial_id" visible="false"></div>
|
||
|
<div field="user" visible="false"></div>
|
||
|
<div field="count" visible="false" ></div>
|
||
|
<div field="injf" visible="false" ></div>
|
||
|
<div field="ifmz" visible="false" ></div>
|
||
|
<div field="feedbackserch" visible="false" ></div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="text-align:center;padding:5px;">
|
||
|
<a class="aos-button aos-btn-primary" style="width: 60px; margin-right: 20px;" onclick="savecount()"><span class="aos-button-text ">保存</span></a>
|
||
|
<a class="aos-button aos-btn-primary" style="width: 60px; margin-right: 20px;" onclick="savecount2019()"><span class="aos-button-text ">保存2019积压数据</span></a>
|
||
|
<a class="aos-button aos-btn-primary" style="width: 60px;" hidefocus="" onclick="CloseWindow()"><span class="aos-button-text ">退出</span></a>
|
||
|
</div>
|
||
|
</body>
|
||
|
<script type="text/javascript">
|
||
|
var grid = aos.get('grid');
|
||
|
var taskUser = "";
|
||
|
var listUser="";
|
||
|
var task_id="";
|
||
|
var detail_id="";
|
||
|
var remove=new Array();
|
||
|
function init(param){
|
||
|
if(param.flag!=1){
|
||
|
aos.get('task_name').setValue(param.task_name);//任务名称
|
||
|
aos.get('task_remark').setValue(param.task_remark);//任务描述
|
||
|
aos.get('start_date').setValue(param.start_date);//开始时间
|
||
|
aos.get('end_date').setValue(param.end_date);//结束时间
|
||
|
task_id=param.task_id;
|
||
|
grid.load(param);
|
||
|
}
|
||
|
}
|
||
|
function assign() {
|
||
|
var param ={};
|
||
|
aos.showWindow('canvas/rush/taskassign', param, '580px', '600px', '任务指派', function(rtnValue){
|
||
|
if(rtnValue!='close'){
|
||
|
//alert(JSON.stringify(rtnValue));
|
||
|
aos.get('injf').setValue(rtnValue.injf);
|
||
|
aos.get('ifmz').setValue(rtnValue.ifmz);
|
||
|
aos.get('count').setValue(rtnValue.count);
|
||
|
aos.get('chargetype').setValue(rtnValue.chargetype);
|
||
|
aos.get('chargetypeNum').setValue(rtnValue.chargetypeNum);
|
||
|
aos.get('feedback').setValue(rtnValue.feedback);
|
||
|
aos.get('enddate').setValue(rtnValue.end_date);
|
||
|
aos.get('revenue').setValue(rtnValue.revenue);
|
||
|
aos.get('last_date').setValue(rtnValue.last_date);
|
||
|
taskUser=rtnValue.user.substr(0,rtnValue.user.length-1); //人员名字
|
||
|
listUser=taskUser+","+listUser
|
||
|
var newRow = {
|
||
|
company:rtnValue.company, //分公司
|
||
|
end_date:rtnValue.end_date,
|
||
|
end_date_name:rtnValue.end_date_name,
|
||
|
user:rtnValue.user_name,
|
||
|
tasknum:rtnValue.tasknum,
|
||
|
ratio:0,
|
||
|
user_name:rtnValue.user.substr(0,rtnValue.user.length-1),
|
||
|
task_user:rtnValue.user_id,
|
||
|
task_num:rtnValue.user_task,
|
||
|
companyId:rtnValue.companyId,
|
||
|
revenue:rtnValue.revenue,
|
||
|
last_date:rtnValue.last_date,
|
||
|
last_date_name:rtnValue.last_date_name,
|
||
|
chargetype:rtnValue.chargetype,
|
||
|
chargetypeNum:rtnValue.chargetypeNum,
|
||
|
/* 任务添加回访次数 */
|
||
|
injf:rtnValue.injf,
|
||
|
ifmz:rtnValue.ifmz,
|
||
|
count:rtnValue.count
|
||
|
|
||
|
|
||
|
};
|
||
|
grid.addRow(newRow,0);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function remove(){
|
||
|
var row=grid.getSelected();
|
||
|
if(!row){
|
||
|
aos.alert('选择一行后进行删除!');
|
||
|
return;
|
||
|
}
|
||
|
aos.confirm('确认删除吗?',null,function(action){
|
||
|
if(action == 'cancel')
|
||
|
return;
|
||
|
var i=remove.length;
|
||
|
remove[i]=row.detial_id;
|
||
|
grid.removeRow(row, true);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function save(){
|
||
|
|
||
|
if(!aos.get('task_name').getValue())
|
||
|
{aos.alert('请填写任务名称!');}
|
||
|
else if(!aos.get('start_date').getValue())
|
||
|
{aos.alert('请选择任务开始日期!');}
|
||
|
else if(!aos.get('end_date').getValue())
|
||
|
{aos.alert('请选择任务结束日期!');}
|
||
|
else if(!aos.get('start_date').getValue()>aos.get('end_date').getValue())
|
||
|
{aos.alert('开始日期必须早于结束日期!');}
|
||
|
else{
|
||
|
var date=new Date();
|
||
|
var year=date.getFullYear(); //得到年份
|
||
|
var month=date.getMonth()+1;//得到月份
|
||
|
month =(month<10 ? "0"+month:month);
|
||
|
var day=date.getDate();//得到日期
|
||
|
var currentDate=year+"-"+month+"-"+day;
|
||
|
var grid = aos.get('grid');
|
||
|
var data ={};
|
||
|
data['grid']=grid.getData();
|
||
|
|
||
|
//data['taskuser']=task_user;
|
||
|
//data['task_num']=task_num;
|
||
|
//data['task_username']=task_username;
|
||
|
//data['companyId']=companyId;
|
||
|
//data['revenue']=revenue;
|
||
|
//data['end_date']=end_date;
|
||
|
//data['last_date']=last_date;
|
||
|
data['remove']=remove;
|
||
|
data['task_name']=aos.get('task_name').getValue();
|
||
|
data['task_id']=task_id;
|
||
|
data['task_start_date']=aos.get('start_date').getValue();
|
||
|
data['task_end_date']=aos.get('end_date').getValue();
|
||
|
data['task_remark']=aos.get('task_remark').getValue();
|
||
|
|
||
|
|
||
|
|
||
|
if(aos.get('start_date').getValue()>currentDate)
|
||
|
{
|
||
|
data['status']='未开始';
|
||
|
}else{
|
||
|
data['status']='进行中';
|
||
|
}
|
||
|
aos.post({
|
||
|
url:"rush/taskDetail/saveCenter",
|
||
|
data:data,
|
||
|
success:function(){
|
||
|
aos.tip('保存成功!');
|
||
|
}
|
||
|
});
|
||
|
CloseWindow(data);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function savecount(){
|
||
|
|
||
|
if(!aos.get('task_name').getValue())
|
||
|
{aos.alert('请填写任务名称!');}
|
||
|
else if(!aos.get('start_date').getValue())
|
||
|
{aos.alert('请选择任务开始日期!');}
|
||
|
else if(!aos.get('end_date').getValue())
|
||
|
{aos.alert('请选择任务结束日期!');}
|
||
|
else if(!aos.get('start_date').getValue()>aos.get('end_date').getValue())
|
||
|
{aos.alert('开始日期必须早于结束日期!');}
|
||
|
else{
|
||
|
var date=new Date();
|
||
|
var year=date.getFullYear(); //得到年份
|
||
|
var month=date.getMonth()+1;//得到月份
|
||
|
month =(month<10 ? "0"+month:month);
|
||
|
var day=date.getDate();//得到日期
|
||
|
var currentDate=year+"-"+month+"-"+day;
|
||
|
var grid = aos.get('grid');
|
||
|
var data ={};
|
||
|
data['grid']=grid.getData();
|
||
|
|
||
|
|
||
|
data['remove']=remove;
|
||
|
data['task_name']=aos.get('task_name').getValue();
|
||
|
data['task_id']=task_id;
|
||
|
data['task_start_date']=aos.get('start_date').getValue();
|
||
|
data['task_end_date']=aos.get('end_date').getValue();
|
||
|
data['task_remark']=aos.get('task_remark').getValue();
|
||
|
/* 任务分配回访次数添加 zxf */
|
||
|
data['count']=aos.get('count').getValue();
|
||
|
data['injf']=aos.get('injf').getValue();
|
||
|
data['ifmz']=aos.get('ifmz').getValue();
|
||
|
data['feedback']=aos.get('feedback').getValue();
|
||
|
data['end_date']=aos.get('enddate').getValue();
|
||
|
data['chargetypeNum']=aos.get('chargetypeNum').getValue();
|
||
|
data['revenue']=aos.get('revenue').getValue();
|
||
|
data['last_date']=aos.get('last_date').getValue();
|
||
|
if(aos.get('start_date').getValue()>currentDate)
|
||
|
{
|
||
|
data['status']='未开始';
|
||
|
}else{
|
||
|
data['status']='进行中';
|
||
|
}
|
||
|
aos.tip('正在分配任务,请不要关闭该页面!');
|
||
|
aos.post({
|
||
|
url:"rush/taskDetail/saveCentercount",
|
||
|
data:data,
|
||
|
success:function(){
|
||
|
aos.tip('保存成功!');
|
||
|
CloseWindow(data);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function savecount2019(){
|
||
|
|
||
|
if(!aos.get('task_name').getValue())
|
||
|
{aos.alert('请填写任务名称!');}
|
||
|
else if(!aos.get('start_date').getValue())
|
||
|
{aos.alert('请选择任务开始日期!');}
|
||
|
else if(!aos.get('end_date').getValue())
|
||
|
{aos.alert('请选择任务结束日期!');}
|
||
|
else if(!aos.get('start_date').getValue()>aos.get('end_date').getValue())
|
||
|
{aos.alert('开始日期必须早于结束日期!');}
|
||
|
else{
|
||
|
var date=new Date();
|
||
|
var year=date.getFullYear(); //得到年份
|
||
|
var month=date.getMonth()+1;//得到月份
|
||
|
month =(month<10 ? "0"+month:month);
|
||
|
var day=date.getDate();//得到日期
|
||
|
var currentDate=year+"-"+month+"-"+day;
|
||
|
var grid = aos.get('grid');
|
||
|
var data ={};
|
||
|
data['grid']=grid.getData();
|
||
|
|
||
|
|
||
|
data['remove']=remove;
|
||
|
data['task_name']=aos.get('task_name').getValue();
|
||
|
data['task_id']=task_id;
|
||
|
data['task_start_date']=aos.get('start_date').getValue();
|
||
|
data['task_end_date']=aos.get('end_date').getValue();
|
||
|
data['task_remark']=aos.get('task_remark').getValue();
|
||
|
/* 任务分配回访次数添加 zxf */
|
||
|
data['count']=aos.get('count').getValue();
|
||
|
data['feedback']=aos.get('feedback').getValue();
|
||
|
data['end_date']=aos.get('enddate').getValue();
|
||
|
data['revenue']=aos.get('revenue').getValue();
|
||
|
data['last_date']=aos.get('last_date').getValue();
|
||
|
if(aos.get('start_date').getValue()>currentDate)
|
||
|
{
|
||
|
data['status']='未开始';
|
||
|
}else{
|
||
|
data['status']='进行中';
|
||
|
}
|
||
|
aos.tip('正在分配任务,请不要关闭该页面!');
|
||
|
aos.post({
|
||
|
url:"rush/taskDetail/saveCentercount2019",
|
||
|
data:data,
|
||
|
success:function(){
|
||
|
aos.tip('保存成功!');
|
||
|
CloseWindow(data);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
function shaixuan(){
|
||
|
var row=grid.getSelected();
|
||
|
if(!row){
|
||
|
aos.alert('选择一行后进行查看!');
|
||
|
return;
|
||
|
}
|
||
|
var param ={};
|
||
|
param['pageState'] = 'editnew';
|
||
|
param['feedback'] = aos.get('feedback').getValue();
|
||
|
param['feedbackserch'] =row.feedbackserch;
|
||
|
aos.showWindow('canvas/tick/feedbackserch', param, '500px', '400px', '反馈类型查看', function(params,rtnValue){
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
</html>
|