70 lines
2.6 KiB
HTML
70 lines
2.6 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>修改设置</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div widget="toolbar">
|
||
|
<a widget="button" iconCls="icon-save" onclick="save" linkToState="editold,editnew">保存</a>
|
||
|
<a widget="button" iconCls="icon-exit" onclick="CloseWindow()">退出</a>
|
||
|
</div>
|
||
|
|
||
|
<input widget="edit" name="id" label="" required="true" style="margin-top:5px;display: none;"/>
|
||
|
|
||
|
<input widget="autocomplete" name="item_id" popupEmptyText="请选择"
|
||
|
textfield="item_name" valuefield="item_id" label="商品名称"
|
||
|
url="revisit/itemSync/getItemName" readonly="readonly" required="true" onvaluechanged="setItemName()"/>
|
||
|
<input widget="edit" name="item_name" label="" required="true" style="margin-top:5px;display: none;"/>
|
||
|
|
||
|
<br/>
|
||
|
<input widget="textarea" name="description" label="描述" emptyText="" width="250px" height="80px"/>
|
||
|
<br/>
|
||
|
<div name="is_sync" label="是否同步" widget="radiobuttonlist"
|
||
|
repeatitems="2" repeatlayout="table" textfield="text" valuefield="id"
|
||
|
data="[{id:'1',text:'是'},{id:'0',text:'否'}]" value="0" style="margin-top:5px" ></div>
|
||
|
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
function init(param) {
|
||
|
var pageState = param['pageState'];
|
||
|
if(pageState){
|
||
|
aos.setState(pageState)
|
||
|
}
|
||
|
aos.getForm().setData(param);
|
||
|
// aos.get("id").setValue(param["id"]);
|
||
|
// aos.get("item_id").setValue(param["item_id"]);
|
||
|
aos.get("item_id").setText(param["item_name"]);
|
||
|
// aos.get("item_name").setValue(param["item_name"]);
|
||
|
// aos.get("description").setValue(param["description"]);
|
||
|
// aos.get("is_sync").setValue(param["is_sync"]);
|
||
|
|
||
|
}
|
||
|
function setItemName() {
|
||
|
var itemId = aos.get("item_id").getValue();
|
||
|
if(itemId){
|
||
|
var itemName = aos.get("item_id").getText();
|
||
|
aos.get("item_name").setValue(itemName);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function save(){
|
||
|
if(!FORM.validate())
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
aos.post({
|
||
|
url:"revisit/itemSync/editItemSetting",
|
||
|
data:aos.getForm().getData(),
|
||
|
success:function(data, textStatus, jqXHR){
|
||
|
if(data.isOk == 1){
|
||
|
aos.tip('保存成功');
|
||
|
}
|
||
|
else{
|
||
|
aos.tip(data.msg);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|