113 lines
3.8 KiB
HTML
113 lines
3.8 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="状态">
|
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
|
<a widget="button" iconCls="icon-add" onclick="add">新增</a>
|
|
</div>
|
|
<div widget="autosize">
|
|
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rush/hot/getlist">
|
|
<div type="indexcolumn" width="35" header="序号"></div>
|
|
<div field="id" visible="id"></div>
|
|
<div field="khid" visible="id"></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="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(),
|
|
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)' style='text-decoration:none' onclick='rekp(\"" + e.row.id + "\")'>" + "删除";
|
|
}
|
|
return "暂无操作";
|
|
|
|
}
|
|
|
|
|
|
function rekp(id) {
|
|
aos.post({
|
|
url: 'rush/hot/delete',
|
|
data: {id: id},
|
|
success: function () {
|
|
grid.reload();
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
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();
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</html> |