Commit d0465329 by 杨树贤

银行凭证格式上传修改

parent ca602d6d
[ZoneTransfer]
ZoneId=3
HostUrl=about:internet
......@@ -29,7 +29,7 @@
form.on('radio(receipt_type)', function (data) {
if (data.value == 1) {
$('#swift_code_div').hide();
}else{
} else {
$('#swift_code_div').show();
}
});
......@@ -44,6 +44,8 @@
k2: k2,
source: 1
}
, accept: 'file'
, exts: 'jpg|png|bmp|jpeg|zip|pdf'
, before: function (obj) {
layer.msg('加载中', {
icon: 16
......@@ -52,7 +54,11 @@
let item = this.item;
//预读本地文件示例,不支持ie8
obj.preview(function (index, file, result) {
$('#' + item.attr('preview')).attr('src', result); //图片链接(base64)
// if (file.type.indexOf('image') !== -1){
// $('#' + item.attr('preview')).attr('src', result); //图片链接(base64)
// }else{
// $('#' + item.attr('preview')).attr('src', '/images/file.png');
// }
});
}
, done: function (res) {
......@@ -60,6 +66,7 @@
layer.msg('上传成功', {icon: 6});
let item = this.item;
$('#' + item.attr('data-obj')).val(res.data[0]);
$('#certificate_url').text(res.data[0]);
return false;
} else {
layer.msg('上传失败', {icon: 5});
......
......@@ -33,11 +33,10 @@
{field: 'bank_adderss', title: '开户行', align: 'center', width: 150},
{field: 'account_no', title: '银行账号', align: 'center', width: 130},
{field: 'account_name', title: '账户名称', align: 'center', width: 150},
{field: 'swift_code', title: '电汇号码', align: 'center', width: 150},
{field: 'swift_code', title: '电汇号码', align: 'center', width: 130},
{
field: 'certificate', title: '信息凭证', width: 150, align: 'center', templet: function (data) {
return "<a href='" + data.certificate + "' target='_blank'>" +
"<img class='certificate_img' style='width: 70px;height: 60px' src='" + data.certificate + "'></a>";
field: 'certificate', title: '信息凭证', width: 200, align: 'center', templet: function (data) {
return "<a href='" + data.certificate + "' target='_blank'>" + data.certificate + "</a>";
}
},
{field: 'remark', title: '备注', align: 'center', width: 200},
......
......@@ -82,10 +82,11 @@
value="{{$receipt['certificate'] or ''}}">
<button type="button" class="layui-btn upload-img" preview="preview" data-obj="certificate">
<i class="layui-icon">&#xe67c;</i>上传图片
<i class="layui-icon">&#xe67c;</i>上传文件
</button>
<img @if(!empty($receipt['certificate'])) src="{{$receipt['certificate'] or ''}}"
@endif class="layui-upload-img" width="50px" height="50px" id="preview">
<a target="_blank" id="certificate_url" href="{{$receipt['certificate'] or ''}}">{{$receipt['certificate'] or ''}}</a>
{{-- <img @if(!empty($receipt['certificate'])) src="{{$receipt['certificate'] or ''}}"--}}
{{-- @endif class="layui-upload-img" width="50px" height="50px" id="preview">--}}
</div>
</div>
<div class="layui-form-item">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment