70 lines
2.0 KiB
HTML
70 lines
2.0 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<title>恢复已合并信息</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div widget="toolbar" showCloseButton="false">
|
||
|
<input name="cust_name" widget="edit" style="width: 300px;" label="客户名称">
|
||
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div widget="autosize">
|
||
|
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="crm_sku/getCustInfo"
|
||
|
allowalternating="true" >
|
||
|
<div type="indexcolumn" width="20" header="序号"></div>
|
||
|
<div field="org_customer_id" visible="false" ></div>
|
||
|
<div field="cust_name" width="60" header="客户名称"></div>
|
||
|
<div field="cust_tax_code" width="60" header="客户税号"></div>
|
||
|
<div field="state_str" width="40" header="合并" align="center"></div>
|
||
|
<div field="state" width="40" header="操作" renderer="operateRender" align="center"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<br/>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
<script type="text/javascript">
|
||
|
var grid = aos.get('grid');
|
||
|
function search(){
|
||
|
if(aos.get('cust_name').value==''){
|
||
|
aos.alert("请输入客户名称后再查询!");
|
||
|
}else{
|
||
|
var params={cust_name:aos.get('cust_name').value};
|
||
|
grid.load(params);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
function operateRender(e){
|
||
|
var row=e.row;
|
||
|
var state=row.state;
|
||
|
if(state=='1'){
|
||
|
return "<a href='javascript:void(0)' onclick='operate(\""+row.org_customer_id+"\")'>恢复</a>";
|
||
|
}else{
|
||
|
return '';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function operate(org_customer_id){
|
||
|
var data = {};
|
||
|
data['org_customer_id']= org_customer_id;
|
||
|
aos.post({
|
||
|
url:"crm_sku/updateCustState",
|
||
|
data:data,
|
||
|
success:function(data){
|
||
|
if(data.isOk == 1){
|
||
|
aos.alert(data.msg);
|
||
|
search();
|
||
|
}else{
|
||
|
aos.alert(data.msg);
|
||
|
}
|
||
|
|
||
|
},error:function (e) {
|
||
|
aos.alert('发生错误!');
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</html>
|