62 lines
2.1 KiB
HTML
62 lines
2.1 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="autocomplete" name="item_id" popupEmptyText="请选择"
|
|
textfield="item_name" valuefield="item_id" label="商品名称"
|
|
url="revisit/itemSync/getItemName" showClose="true" required="true" onvaluechanged="setItemName()" oncloseclick ="conCloseClick"/>
|
|
<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="1" style="margin-top:5px" ></div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
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/addItemSetting",
|
|
data:aos.getForm().getData(),
|
|
success:function(data, textStatus, jqXHR){
|
|
if(data.isOk == 1){
|
|
aos.tip('保存成功');
|
|
}
|
|
else{
|
|
aos.tip(data.msg);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function conCloseClick (e){
|
|
var obj =e.sender;
|
|
obj.setText("");
|
|
obj.setValue("");
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html> |