You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
3.1 KiB
88 lines
3.1 KiB
6 years ago
|
<?php
|
||
|
use \common\libs\MyLib;
|
||
|
?>
|
||
|
<link rel="stylesheet" href="/js/fileupload/css/jquery.fileupload.css">
|
||
|
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
|
||
|
<form id="theFrm">
|
||
|
<tr>
|
||
|
<td align="center" width="100" height="25" class="td_bg">导入类型</td>
|
||
|
<td height="25" class="td_bg">数据导入</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" width="100" height="25" class="td_bg">批对日期</td>
|
||
|
<td height="25" class="td_bg">
|
||
|
<input type="text" name="urlfile" id="urlfile" style="width: 300px;">
|
||
|
<input id="fileupload" type="file" name="file">
|
||
|
</td>
|
||
|
</tr>
|
||
|
</form>
|
||
|
<tr>
|
||
|
<td height="22" colspan="2" align="center" class="td_bg">
|
||
|
<input id="submit-btn" type=button class="ACT_btn" name=Submit1 value=" 提交 "/>
|
||
|
|
||
|
<input type="button" class="ACT_btn" name="Submit3" value=" 刷新 " onclick="window.location.reload();">
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script>
|
||
|
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
|
||
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/vendor/jquery.ui.widget.js"></script>
|
||
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.iframe-transport.js"></script>
|
||
|
<script type="text/javascript" language="javascript" src="/js/fileupload/js/jquery.fileupload.js"></script>
|
||
|
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
|
||
|
<script type="text/javascript" language="javascript" src="/js/func.js"></script>
|
||
|
<script type="text/javascript" language="javascript">
|
||
|
//编辑
|
||
|
|
||
|
|
||
|
$(function () {
|
||
|
//上传按钮
|
||
|
$('#upload-btn').click(function(){
|
||
|
$('#fileupload').click();
|
||
|
});
|
||
|
|
||
|
//提交按钮
|
||
|
$("#submit-btn").click(function(){
|
||
|
if(confirm('是否确认提交?')) {
|
||
|
var urlfile = $("#urlfile").val();
|
||
|
var import_type = $(".import_type").val();
|
||
|
if(urlfile == ''){
|
||
|
alert('请先选择文件!');
|
||
|
return false;
|
||
|
}
|
||
|
var last_url = '/finance/imports1';
|
||
|
var params = $("#theFrm").serialize();
|
||
|
|
||
|
$.post(last_url,params,function(obj){
|
||
|
alert(obj.msg);
|
||
|
if(obj.success){
|
||
|
$('#theFrm')[0].reset();
|
||
|
window.location.reload();
|
||
|
}
|
||
|
},'json');
|
||
|
}
|
||
|
});
|
||
|
//上传
|
||
|
$('#fileupload').fileupload({
|
||
|
url: '/finance/receipt-upload',
|
||
|
dataType: 'json',
|
||
|
done: function (e, data) {
|
||
|
var file_info = data.result.files[0];
|
||
|
$('#urlfile').val(file_info.url);
|
||
|
$('#submit-btn').removeAttr('disabled');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
})
|
||
|
</script>
|
||
|
<style>
|
||
|
input[type="text"] {
|
||
|
width: 134px;
|
||
|
}
|
||
|
|
||
|
</style>
|