rushfee/resource/html/tick/njiaofeicount.html

121 lines
3.7 KiB
HTML

<html auth="false" >
<head >
<title>催缴记录统计</title>
</head>
<body >
<div widget="toolbar" style="padding:5px;border:0;">
<input name="searchbegindate" widget=datechooser allowinput="f" label="考核日期">
<input name="searchenddate" widget=datechooser allowinput="f" style="margin-left: 30px;" label="改善截至日期">
<a widget="button" iconCls="icon-search" style="margin-left: 10px;" onclick="search()">查询</a>
<a widget="button" iconCls="icon-export" style="margin-left: 10px;" onclick="downloadfileGet()">导出</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rush/ContactMt/getnjiaofeicount" onrowdblclick="pay()">
<div type="indexcolumn" width="5" header="序号"></div>
<div field="org_name" width="10" align="center" header="分公司"></div>
<div field="num" width="10" align="center" header="总量 (10次以上未交费)"></div>
<div field="jiaofei" width="10" align="center" header="缴费数量"></div>
<div field="jiaofeibili" width="10" align="center" header="缴费百分比"></div>
<div field="contact" width="10" align="center" header="维护联系人数量"></div>
<div field="weihubili" width="10" align="center" header="维护百分比"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var curDate = new Date();
var begintime = new Date(curDate.getTime() - 48*60*60*1000); //前一天
var endtime = new Date(curDate.getTime() - 24*60*60*1000);
/* var begintime =aos.formatDate(date.getTime() - 48*60*60*1000,"yyyy-MM-dd");
var endtime =aos.formatDate(date.getTime() - 24*60*60*1000,"yyyy-MM-dd"); */
//begintime.addDay(-2);
aos.get('searchbegindate').setValue(begintime);
aos.get('searchenddate').setValue(endtime);
function search(){
var grid = aos.get('grid');
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
if (begindate!="")
{
if (enddate=="")
{aos.alert('请选择结束时间!');
return ;
}
else{
if (begindate>enddate)
{
aos.alert('开始日期必须早于结束日期!');
}else{
var begindate=begindate+" "+"00:00:00";
var enddate=enddate+" "+"23:59:59";
var params={
searchbegindate:begindate,
searchenddate:enddate };
grid.load(params);
}
}
}else if(enddate!="")
{
aos.alert('请选择开始时间!');
return ;
}else{
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
var params = {searchbegindate:begindate,
searchenddate:enddate
};
grid.load(params);
}
}
function pay(){
var grid = aos.get('grid');
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条数据。');
return;
}
var begindate1=aos.get('searchbegindate').getValue();
var enddate1=aos.get('searchenddate').getValue();
var begindate=begindate1+" "+"00:00:00";
var enddate=enddate1+" "+"23:59:59";
var param = {};
param['org_name']=data.org_name;
param['enddate']=enddate;
param['begindate']=begindate;
param['pageState'] = 'editold';
aos.showWindow('canvas/tick/njiaofeidetail', param, '950px', '600px', '客户信息明细', function(rtnValue){
});
}
function downloadfileGet(){
var base = document.getElementsByTagName("base")[0].href;
var begindate1=aos.get('searchbegindate').getValue();
var enddate1=aos.get('searchenddate').getValue();
var begindate=begindate1+" "+"00:00:00";
var enddate=enddate1+" "+"23:59:59";
window.location.href=base+"rush/ContactMt/getnjiaofeicountexcel?begindate="+begindate1+"&enddate="+enddate;
}
</script>
</html>