1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <%@ page contentType="text/html;charset=UTF-8"%>
- <%@ include file="/WEB-INF/include/taglibs.jsp"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <%@ include file="/WEB-INF/include/common.jsp"%>
- <script type="text/javascript">
- $(function() {
-
- var ajaxFileUrl = new AjaxUpload('#fileToUpload',{
-
- action : WEBROOT +"/ShelvesTask/fileUpload.action",
- name : 'upFile',
- data : {
- shelvesTaskDetailId : $("#shelvesTaskDetailId").val()
- },
- // 选择后自动开始上传
- autoSubmit : true,
- // 返回Text格式数据
- responseType : false,
- // 上传的时候按钮不可用
- onSubmit : function(filename, ext)
- {
- $("#showUrl").val(filename);
- return true;
- },
- // 上传完成后取得文件名filename为本地取得的文件名,msg为服务器返回的信息
- onComplete : function(filename, response)
- {
- var reg = JSON.parse(response);
- $.messager.show({
- title : '提示',
- msg : reg.result
- });
- }
-
- });
-
- $("#btnUpload").click( function(){
- ajaxFileUrl.submit();
- });
-
- $("#btnDownload").click(function(){
- var url = WEBROOT + "/ShelvesTask/templateDownload.action?fileType=3612";
- $("#btnDownload").attr('href',url);
-
- });
-
- });
-
-
-
-
- </script>
- </head>
- <body style="overflow-y: hidden" fit="true" scroll="no">
- <div id="tabs" class="easyui-tabs" fit="true">
- <div title="IMEI库存导入">
- <form id="attachForm" enctype="multipart/form-data" method="post"
- action="fileUpload.action" target="hidden_frame">
- <input type="hidden" id="fileType" name="fileType" value="3612">
- <input type="hidden" id="shelvesTaskDetailId"
- name="shelvesTaskDetailId"
- value="${requestScope.shelvesTaskDetailId }"> <input
- type="hidden" id="extraConfig" name="extraConfig">
- <table style="width: 70% ;">
- <tr align="center">
- <td>导入文件:</td>
- <td width="200px;" align="right" >
- <input class="easyui-validatebox" style="width: 100px; " disabled="disabled" id="showUrl" maxlength="50"></input>
- </td>
- <td align="left">
- <input type="file" id="fileToUpload" style="width: 70px;" id="upFile" name="upFile" maxLength="300" />
- </td>
- <!--
- <input type="file" id="fileToUpload" required="true" name="upFile"></input>
-
- <td align="left"><a id="btnUpload" href="#"
- class="easyui-linkbutton" data-options="iconCls:'icon-search'">提交</a>
- </td>
- -->
- <td><a id="btnDownload" class="easyui-linkbutton l-btn"
- data-options="plain:false" href="#">模版下载</a></td>
- </tr>
- </table>
- </form>
- </div>
- </div>
- <iframe name='hidden_frame' id="hidden_frame" style='display: none;'></iframe>
- </body>
- </html>
|