101 lines
3.9 KiB
HTML
101 lines
3.9 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<title>回访结果统计</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div widget="toolbar" style="padding:10px;border:0;">
|
||
|
<input name="searchbegindate" widget="datechooser" allowinput="false" label="销售日期"/>
|
||
|
<input name="searchenddate" widget="datechooser" allowinput="false" label="至"/>
|
||
|
<input widget="combox" name="type" label="类型"
|
||
|
data="[{id:'-1',text:'ALL'},{id:'0',text:'商品'},{id:'1',text:'金融'},{id:'2',text:'满意度'}]"
|
||
|
textField="text" valueField="id" value="-1"/>
|
||
|
|
||
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
||
|
<a widget="button" iconCls="icon-export" onclick="downloadfile()">导出</a>
|
||
|
</div>
|
||
|
|
||
|
<div widget="autosize">
|
||
|
<div widget="datagrid" name="grid" style="width: 100%;height:100%" url="hfrecord/sumHfResult" allowalternating="true">
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
var grid = aos.get('grid');
|
||
|
function search(){
|
||
|
var begindate=aos.get('searchbegindate').getValue();
|
||
|
var enddate=aos.get('searchenddate').getValue();
|
||
|
if(begindate==""&&enddate==""){
|
||
|
aos.alert('请选择销售时间!');
|
||
|
return ;
|
||
|
}
|
||
|
if(begindate!=""){
|
||
|
if (enddate==""){
|
||
|
aos.alert('请选择结束时间!');
|
||
|
return ;
|
||
|
}else {
|
||
|
if (begindate > enddate) {
|
||
|
aos.alert('开始日期必须早于结束日期!');
|
||
|
}
|
||
|
}
|
||
|
}else if(enddate!=""){
|
||
|
aos.alert('请选择开始时间!');
|
||
|
return ;
|
||
|
}
|
||
|
var params={searchbegindate:begindate,searchenddate:enddate,type:aos.get("type").value};
|
||
|
|
||
|
aos.post({
|
||
|
url:"hfrecord/getHfResultType",
|
||
|
data:params,
|
||
|
success:function (data) {
|
||
|
if(data!=null){
|
||
|
var cols=[
|
||
|
{type:"indexcolumn",width:"10",header:"序号"},
|
||
|
{field:"operate_name",width:"30",headerAlign:"center",allowSort:true,header:"回访人"}
|
||
|
];
|
||
|
for(var i=0;i<data.length;i++){
|
||
|
var item={field:data[i]["result_type"],width:"30",headerAlign:"center",allowSort:true,header:data[i]["result_type"]};
|
||
|
cols.push(item);
|
||
|
}
|
||
|
var last={field:"sumHoriz",width:"30",headerAlign:"center",allowSort:true,header:"总计"};
|
||
|
cols.push(last);
|
||
|
grid.setColumns(cols);
|
||
|
grid.load(params);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
/**
|
||
|
* 导出
|
||
|
*/
|
||
|
function downloadfile(){
|
||
|
var begindate=aos.get('searchbegindate').getValue();
|
||
|
var enddate=aos.get('searchenddate').getValue();
|
||
|
if(begindate==""&&enddate==""){
|
||
|
aos.alert('请选择销售时间!');
|
||
|
return ;
|
||
|
}
|
||
|
if(begindate!=""){
|
||
|
if (enddate==""){
|
||
|
aos.alert('请选择结束时间!');
|
||
|
return ;
|
||
|
}else {
|
||
|
if (begindate > enddate) {
|
||
|
aos.alert('开始日期必须早于结束日期!');
|
||
|
}
|
||
|
}
|
||
|
}else if(enddate!=""){
|
||
|
aos.alert('请选择开始时间!');
|
||
|
return ;
|
||
|
}
|
||
|
var base = document.getElementsByTagName("base")[0].href;
|
||
|
window.location.href=encodeURI(encodeURI(base+"hfrecord/exportSumHfResult?searchbegindate="+begindate+
|
||
|
"&searchenddate="+enddate+"&type="+aos.get("type").value));
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|