rushfee/resource/html/revisit/revisitLogList.html

137 lines
5.8 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<html login="false">
<head>
<title>回访记录</title>
</head>
<body>
<div widget="toolbar" style="padding:10px;border:0;">
<input widget="edit" name="cust_name" label="客户名称"/>
<input widget="combox" name="hf_state" label="回访结果"
data="[{id:'1',text:'回访成功'},{id:'0',text:'回访不成功'}]"
showNullItem="true" allowInput="false"
textField="text" valueField="id" onvaluechanged="showReflect()"/>
<input widget="combox" name="reflect" label="反馈类型" url="revisit/reflect/getReflect"
emptyText="请选择" textField="reflect_name" valueField="reflect_id" allowInput="false"
showNullItem="true" visible="false"/>
<br/>
<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/getHfLogList" allowalternating="true" onrowdblclick="detail()">
<div type="indexcolumn" width="10" header="序号"></div>
<div field="log_id" visible="false"></div>
<div field="obj_id" visible="false"></div>
<div field="cust_name" width="30" header="客户名称"></div>
<div field="detail" width="40" header="回访内容"></div>
<div field="operate_date" width="20" header="回访时间"></div>
<div field="operate_name" width="25" header="回访人"></div>
<div field="is_success" width="10" header="回访结果"></div>
<div field="reflect_name" width="15" header="反馈类型"></div>
<div field="remark" width="20" header="备注"></div>
</div>
</div>
<script type="text/javascript">
var grid = aos.get('grid');
var params={cust_name:aos.get('cust_name').value,hf_state:aos.get('hf_state').value,reflect:aos.get('reflect').value,
searchbegindate:aos.get('searchbegindate').getValue(),searchenddate:aos.get('searchenddate').getValue(),type:aos.get('type').value};
grid.load(params);
function search(){
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 if(enddate!=""){
aos.alert('请选择开始时间!');
return ;
}
if(begindate!=""&&enddate!=""){
begindate = begindate+" 00:00:00";
enddate = enddate+" 23:59:59";
}
var params={cust_name:aos.get('cust_name').value,hf_state:aos.get('hf_state').value,reflect:aos.get('reflect').value,
searchbegindate:begindate,searchenddate:enddate,type:aos.get('type').value};
grid.load(params);
}
function showReflect() {
if(aos.get("hf_state").value=='0'){
aos.get("reflect").show();
}else{
aos.get("reflect").hide();
}
}
function detail(){
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条数据。');
return;
}
var param = {};
param['log_id'] = data.log_id;
aos.showWindow('canvas/revisit/revisitRecordDetail', param, '700px', '300px', '详情', function(){
});
}
/**
* 导出
*/
function downloadfile(){
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 if(enddate!=""){
aos.alert('请选择开始时间!');
return ;
}
if(begindate!=""&&enddate!=""){
begindate = begindate+" 00:00:00";
enddate = enddate+" 23:59:59";
}
var params={cust_name:aos.get('cust_name').value,hf_state:aos.get('hf_state').value,reflect:aos.get('reflect').value,
searchbegindate:begindate,searchenddate:enddate,type:aos.get('type').value};
var base = document.getElementsByTagName("base")[0].href;
window.location.href=encodeURI(base+"hfrecord/exportHfLog?cust_name="+aos.get('cust_name').value+
"&hf_state="+aos.get('hf_state').value+"&reflect="+aos.get('reflect').value+"&searchbegindate="+begindate+
"&searchenddate="+enddate+"&type="+aos.get('type').value);
// var url = aos.addUrlParams("hfrecord/exportHfLog",params);
// window.location.href=base+url;
// aos.downloadFile(url);
}
</script>
</body>
</html>