61 lines
2.0 KiB
HTML
61 lines
2.0 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<title>回访商品设置</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div widget="toolbar" showCloseButton="false">
|
||
|
<input name="spname" widget="edit" style="width: 300px;" label="商品名称">
|
||
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
||
|
<a widget="button" iconCls="icon-save" id="savebtn1" onclick="save" linkToState="editold,editnew">保存</a>
|
||
|
<!--<a widget="button" iconCls="icon-enabled" onclick="checkall()">全选</a>
|
||
|
<a widget="button" iconCls="icon-disable" id="savebtn3" onclick="buxuan" linkToState="editold,editnew">全不选</a>-->
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div widget="autosize">
|
||
|
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="revisit/getSpmcSetting" multiSelect="true"
|
||
|
allowcelledit="true" allowcellselect="true" editnextonenterkey="true" editnextrowcell="true"
|
||
|
showPager="false" allowalternating="true" >
|
||
|
<div type="indexcolumn" width="5" header="序号"></div>
|
||
|
<div type ="checkboxcolumn" header ="选择" width="5" field="is_show" truevalue="1" falsevalue="0"></div>
|
||
|
<div field="id" visible="false" ></div>
|
||
|
<div field="item_name" width="60" header="商品名称"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<br/>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
<script type="text/javascript">
|
||
|
var grid = aos.get('grid');
|
||
|
grid.load();
|
||
|
function search(){
|
||
|
var params={spname:aos.get('spname').value};
|
||
|
grid.load(params);
|
||
|
}
|
||
|
|
||
|
function save() {
|
||
|
var list=grid.getChanges("modified");
|
||
|
var data = {};
|
||
|
data['modified']= list;
|
||
|
aos.post({
|
||
|
url:"revisit/saveSpSetting",
|
||
|
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>
|