73 lines
2.8 KiB
HTML
73 lines
2.8 KiB
HTML
|
<html login="false">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>CRM流向不一致处理</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div widget="toolbar">
|
||
|
</div>
|
||
|
<br/>
|
||
|
<br/>
|
||
|
<input label="状态" name="state" widget="combox" allowInput="false" data="[{id:'7',text:'售出'},{id:'10',text:'安装'},{id:'-1',text:'最后一条'}]" value="7" showNullItem="false"/><br/>
|
||
|
<input widget="edit" name="article_no" label="单个盘号" required="true" style="margin-top:5px"/>
|
||
|
<a widget="button" iconCls="icon-save" onclick="save" linkToState="editold,editnew">执行</a>
|
||
|
|
||
|
<br/>
|
||
|
<br/>
|
||
|
<input label="状态" name="state2" widget="combox" allowInput="false" data="[{id:'7',text:'售出'},{id:'10',text:'安装'},{id:'-1',text:'最后一条'}]" value="7" showNullItem="false"/><br/>
|
||
|
<input id="fileupload1" widget="fileupload" limitType="*.xlsx" label="批量导入"
|
||
|
flashUrl="www/lib/uploader/swfupload/swfupload.swf"
|
||
|
uploadUrl="crm_sku/importExlfile" buttonText="浏览" width="120px"
|
||
|
uploadOnSelect="false" onuploadsuccess="onUploadSuccess"
|
||
|
onuploaderror="onUploadError" onfileselect="onFileSelect" />
|
||
|
<a widget="button" iconCls="icon-import" onclick="startUpload()">批量执行</a>
|
||
|
<script type="text/javascript">
|
||
|
var isSaving = false;
|
||
|
function save(){
|
||
|
if(isSaving){
|
||
|
aos.tip('正在处理中...');
|
||
|
return;
|
||
|
}else{
|
||
|
isSaving=true;
|
||
|
}
|
||
|
if(!FORM.validate())
|
||
|
{
|
||
|
isSaving = false;
|
||
|
return;
|
||
|
}
|
||
|
aos.post({
|
||
|
url:"crm_sku/deal",
|
||
|
data:aos.getForm().getData(),
|
||
|
success:function(data, textStatus, jqXHR){
|
||
|
if(data.isOk == 1){
|
||
|
aos.get("article_no").setValue("");
|
||
|
aos.tip(data.msg);
|
||
|
isSaving=false;
|
||
|
}
|
||
|
else{
|
||
|
aos.tip(data.msg);
|
||
|
isSaving=false;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function startUpload() {
|
||
|
|
||
|
var fileupload = aos.get("fileupload1");
|
||
|
var param = {state:aos.get("state2").getValue()};
|
||
|
fileupload.setPostParam(param);
|
||
|
fileupload.startUpload();
|
||
|
}
|
||
|
function onFileSelect(e) {//file,sender,source,type[fileselect]
|
||
|
var file=e.file;//size,modificationdate,creationdate,post,type[.txt],id,name,filestatus,index[0]
|
||
|
//alert(file.name);
|
||
|
}
|
||
|
function onUploadSuccess(e) {
|
||
|
var result=aos.decode(e.serverData);
|
||
|
aos.alert(result.data.info);
|
||
|
this.setText("");
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|