...
|
...
|
@@ -12,11 +12,8 @@ |
|
|
</tr>
|
|
|
|
|
|
<tr style="height: 60px">
|
|
|
<td width="10%">上传</td>
|
|
|
<td width="10%"><span style="color:red">*</span><label>上传</label></td>
|
|
|
<td width="50%">
|
|
|
<!--<input id="file" name="file" class="easyui-filebox" style="margin-left: 20px" data-options="buttonText: '请选择文件',width:300,onChange:function(){$('#importBtn').click()},onClickButton: function(){$('#uploadXlsx').filebox('reset')}"/> -->
|
|
|
<!--<a id="importBtn" class="btn-success" style="display:none"></a>-->
|
|
|
|
|
|
<input id="file" name="file" class="easyui-filebox" style="margin-left: 20px" data-options="buttonText: '请选择文件',width:300,onClickButton: function(){$('#file').filebox('reset')}"/>
|
|
|
</td>
|
|
|
</tr>
|
...
|
...
|
@@ -35,14 +32,6 @@ |
|
|
|
|
|
$(function () {
|
|
|
|
|
|
/*$("#downLoadFileModel").linkbutton({
|
|
|
text : "2.下载样例.xlsx",
|
|
|
iconCls : "icon-more",
|
|
|
onClick : function() {
|
|
|
window.open(contextPath + '/common/productId.xlsx');
|
|
|
}
|
|
|
});*/
|
|
|
|
|
|
// 隐藏域赋值
|
|
|
$('#productPoolEditForm #id').val(productPoolId);
|
|
|
|
...
|
...
|
@@ -51,69 +40,6 @@ |
|
|
missingMessage: "商品池名称不能为空",
|
|
|
prompt: "请输入"
|
|
|
});
|
|
|
|
|
|
|
|
|
/*$("#importBtn").linkbutton({
|
|
|
text : "上传文件",
|
|
|
iconCls : "icon-more",
|
|
|
onClick : function() {
|
|
|
var input = window.self.$('input[name="uploadXlsx"]')[0];
|
|
|
if(!input){
|
|
|
return;
|
|
|
}
|
|
|
var files = input.files;
|
|
|
if(files.length == 0){
|
|
|
return;
|
|
|
}
|
|
|
var filename = files[0].name;
|
|
|
//文件的后缀名
|
|
|
var extension = filename.substr(filename.lastIndexOf(".")).toLowerCase();
|
|
|
if(extension != ".xlsx"){
|
|
|
window.self.$.messager.alert("提示消息","请选择xlsx类型文件!");
|
|
|
return;
|
|
|
}
|
|
|
//创建formdata
|
|
|
var form = new FormData();
|
|
|
form.append("file",input.files[0]);
|
|
|
//发送请求
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: contextPath + '/GoodsShelvesInfoController/uploadShelves.do',
|
|
|
data: form,
|
|
|
async: false,
|
|
|
cache: false,
|
|
|
contentType: false,
|
|
|
processData: false,
|
|
|
dataType: 'json',
|
|
|
success: function(result) {
|
|
|
if(result.code == 200){
|
|
|
$("#shelvesListTable").datagrid("reload");
|
|
|
var msg = "添加成功"+result.data+"条,";
|
|
|
var errorMsg = result.message;
|
|
|
if(errorMsg != null && errorMsg != ""){
|
|
|
msg += "<br>";
|
|
|
msg += errorMsg;
|
|
|
}
|
|
|
$.messager.alert("提示消息",msg);
|
|
|
}else{
|
|
|
var msg = '<span style="color: red;font-weight: bold;">导入失败。请检查如下内容并重新导入:</span><br>'
|
|
|
msg += result.message;
|
|
|
$.messager.alert("导入失败提示",msg);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});*/
|
|
|
|
|
|
|
|
|
|
|
|
/*if (productPoolId > 0) {
|
|
|
$.post(contextPath + "/productPool/getProductPoolById", {
|
|
|
id: productPoolId
|
|
|
}, function (data) {
|
|
|
$("#productPoolEditForm").form("load", data.data);
|
|
|
});
|
|
|
}*/
|
|
|
});
|
|
|
|
|
|
</script> |
|
|
\ No newline at end of file |
...
|
...
|
|