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.
86 lines
3.2 KiB
86 lines
3.2 KiB
5 years ago
|
<?php
|
||
|
use \common\libs\MyLib;
|
||
|
?>
|
||
|
<?php $this->beginBlock('header_css'); ?>
|
||
|
<link rel="stylesheet" type="text/css" href="/assets/css/plugins/webuploader/webuploader.css">
|
||
|
<?php $this->endBlock(); ?>
|
||
|
|
||
|
<div class="wrapper wrapper-content animated fadeInRight">
|
||
|
<div class="ibox float-e-margins">
|
||
|
<div class="ibox-content">
|
||
|
<div class="row">
|
||
|
<div class="col-sm-12">
|
||
|
<form role="form" class="form-horizontal data-from" id="theFrm">
|
||
|
<div class="form-group">
|
||
|
<label class="control-label col-sm-2">导入文件</label>
|
||
|
<div class="col-sm-6">
|
||
|
<div class="input-group">
|
||
|
<input type="text" name="urlfile" id="urlfile" class="form-control" value="">
|
||
|
<a href="javascript:void(0);" class="input-group-addon" id="upload">
|
||
|
上传文件
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="row">
|
||
|
<div class="col-sm-5 col-sm-offset-5">
|
||
|
<button class="btn btn-primary btn-save" type="button">
|
||
|
<strong>导 入</strong>
|
||
|
</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<?php $this->beginBlock('footer_js'); ?>
|
||
|
<script src="/assets/js/plugins/webuploader/webuploader.min.js"></script>
|
||
|
<script type="text/javascript" language="javascript">
|
||
|
layui.use(['upload'], function(){
|
||
|
var upload = layui.upload;
|
||
|
var uploadInst = upload.render({
|
||
|
elem: '#upload' //绑定元素
|
||
|
,url: '/common/upload' //上传接口
|
||
|
,accept: 'file'
|
||
|
,done: function(res){
|
||
|
//上传完毕回调
|
||
|
if(res.status == 'SUCCESS') {
|
||
|
$('#urlfile').val(res.fileUrl);
|
||
|
}
|
||
|
}
|
||
|
,error: function(){
|
||
|
//请求异常回调
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
$(function () {
|
||
|
//提交按钮
|
||
|
$(".btn-save").click(function(){
|
||
|
parent.layer.confirm('是否确认提交?', {
|
||
|
btn: ['确认','取消'], //按钮
|
||
|
shade: false //不显示遮罩
|
||
|
}, function(){
|
||
|
var params = $("#theFrm").serialize();
|
||
|
$.post('/finance/receipt-process',params,function(obj){
|
||
|
if(obj.success) {
|
||
|
parent.layer.msg('保存成功');
|
||
|
parent.refreshList();
|
||
|
layer_close();
|
||
|
} else {
|
||
|
parent.layer.msg(data.msg);
|
||
|
}
|
||
|
},'json');
|
||
|
}, function(){
|
||
|
//
|
||
|
});
|
||
|
});
|
||
|
})
|
||
|
</script>
|
||
|
<?php $this->endBlock('footer_js'); ?>
|