rushfee/build/classes/html/bureau/hotwireclass.html

201 lines
6.4 KiB
HTML

<html login="false" auth="false">
<head>
<meta charset="UTF-8">
<title>热线等级</title>
</head>
<body>
<div widget="toolbar" style="padding:5px;border:0;">
<input widget="combox" name="orgname" label="分公司" url="rush/hot/getOrgList"
emptyText="请选择" textField="text" valueField="text" allowInput="false"
showNullItem="true"/>
<input widget="edit" name="custname" label="客户名称"/>
<input widget="edit" name="custtaxno" label="客户税号"/>
<input widget="edit" name="mobile" label="联系电话"/>
<input name="state" widget=combox allowinput="f" style="width: 200px;" showNullItem="true"
data="[{id:'0',text:'无效'},{id:'1',text:'有效'}]" emptyText="请选择" label="状态">
<input widget="combox" name="mprice" label="价格" url="rush/hot/getmprice" multiSelect="true"
emptyText="请选择" textField="text" valueField="text" allowInput="false"
showNullItem="true"/>
<input widget="combox" name="mlevel" label="等级" url="rush/hot/getmlevel" multiSelect="true"
emptyText="请选择" textField="text" valueField="text" allowInput="false"
showNullItem="true"/>
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconCls="icon-add" onclick="add">新增</a>
<a widget="button" iconCls="icon-save" onclick="weihu">维护</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rush/hot/getlist" onrowdblclick="pay()">
<div type="indexcolumn" width="35" header="序号"></div>
<div field="id" visible="id"></div>
<div field="khid" visible="khid"></div>
<div field="custname" width="60" header="客户名称" align="center"></div>
<div field="custtaxno" width="60" header="客户税号" align="center"></div>
<div field="createdate" width="60" header="创建日期" align="center"></div>
<div field="mobile" width="50" header="联系电话" align="center"></div>
<div field="enddate" width="35" header="到期日期" align="center"></div>
<div field="orgname" width="50" header="分公司" align="center"></div>
<div field="state" width="30" header="状态" renderer="statetype" align="center"></div>
<div field="mlevel" width="30" header="等级" align="center"></div>
<div field="mprice" width="40" header="金额" align="center"></div>
<div field="caozuojilu" width="45" align="center" renderer="onRendererCZ" header="操作记录"></div>
<div field="jiaofeijilu" width="45" align="center" renderer="onRendererJF" header="缴费详情"></div>
<div field="caozuo" width="45" align="center" renderer="onRenderer" header="操作"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
function search() {
var grid = aos.get('grid');
var params = {
mobile: aos.get('mobile').getValue(),
custname: aos.get('custname').getValue(),
custtaxno: aos.get('custtaxno').getValue(),
orgname: aos.get('orgname').getValue(),
mlevel: aos.get('mlevel').getValue(),
mprice: aos.get('mprice').getValue(),
state: aos.get('state').getValue()
};
grid.load(params);
}
function onRenderer(e) {
if (e.row.state == '0') {
return "<a href='javascript:void(0)' style='text-decoration:none' onclick='huifu(\"" + e.row.id + "\")'>" + "恢复";
}
if (e.row.state=='1') {
return "<a href='javascript:void(0)' onclick='pay()'>" + "更新";
}
return "暂无操作";
}
function rekp(id) {
aos.post({
url: 'rush/hot/delete',
data: {id: id},
success: function () {
grid.reload();
}
});
}
function onRendererJF(e) {
return "<a href='javascript:void(0)' onclick='latestrecord(\"" + e.row.khid + "\")'>" + "缴费记录";
}
function onRendererCZ(e) {
return "<a href='javascript:void(0)' onclick='logrecord(\"" + e.row.id + "\")'>" + "日志";
}
function latestrecord(khid){
var param = {};
param['customer_id'] = khid;
aos.showWindow( 'canvas/rush/oldpaylist', param, '600px','400px','缴费记录',
function(params, rtnData){
}
);}
function logrecord(id){
var param = {};
param['id'] = id;
aos.showWindow( 'canvas/bureau/hotlog', param, '1000px','700px','缴费记录',
function(params, rtnData){
}
);}
function huifu(id) {
aos.post({
url: 'rush/hot/huifu',
data: {id: id},
success: function () {
grid.reload();
}
});
}
function statetype(e) {
var row = e.row;
var value = row.state;
if (value == '0') {
return '<p style="color:red;">无效</p>';
}
if (value == '1') {
return '<p style="color:green;">有效</p>';
} else {
return value;
}
}
function add() {
var param = {};
aos.showWindow('canvas/bureau/hotadd', param, '600px', '500px', '热线数据新增', function(rtnValue){
grid.reload();
});
}
function weihu() {
var param = {};
aos.showWindow('canvas/bureau/weihu', param, '600px', '800px', '热线维护', function(rtnValue){
grid.reload();
});
}
function pay(){
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条数据!');
return;
}
var param = {};
param['pageState'] = 'editold';
param['id'] = data.id ;
param['khid'] = data.khid;
param['custname'] = data.custname;
param['custtaxno'] = data.custtaxno;
param['mobile'] = data.mobile;
param['enddate'] = data.enddate;
param['orgname'] = data.orgname;
param['state'] = data.state;
param['mlevel'] = data.mlevel;
param['mprice'] = data.mprice;
dakai(param);
}
function dakai(param){
aos.showWindow('canvas/bureau/hotupdate', param, '600', '590px', '热线等级更新', function(rtnValue){
grid.reload();
});
}
</script>
</html>