Commit 640b4652 authored by 华国豪's avatar 华国豪 🙄

发票新增通过后上传凭证

parent 42326f40
......@@ -855,7 +855,7 @@ export default {
}, err => {})
},
upLoadFuJian: function() {
if (this.saveMsg.length===0) return this.$message.error('请上传图片!');
if (this.saveMsg.length===0) return this.$message.error('请上传文件!');
let msg = {
FrID: this.ID,
vorcherInos: this.saveMsg
......
<style scoped>
<style>
.page_iisMgdetail {
width: 830px;
background-color: white;
......@@ -16,22 +16,22 @@
top: 10px;
font-size: 14px;
}
.page_iisMgdetail .page_iisMgadd_table {
.page_iisMgdetail .page_iisMgdetail_table {
width: 100%;
font-size: 14px;
text-align: center;
}
.page_iisMgdetail .page_iisMgadd_table td {
.page_iisMgdetail .page_iisMgdetail_table td {
padding: 10px;
}
.page_iisMgdetail .page_iisMgadd_table .page_iisMgadd_bank td._bank_td{
.page_iisMgdetail .page_iisMgdetail_table .page_iisMgdetail_bank td._bank_td{
width: 679px;
}
.iis_save{
text-align: right;
padding: 10px 0 0 0;
}
.page_iisMgdetail .page_iisMgadd_table tr td.font-weight{
.page_iisMgdetail .page_iisMgdetail_table tr td.font-weight{
font-weight: 800;
}
.page_iisMgdetail .cursorpointer{
......@@ -140,6 +140,75 @@
justify-content: center;
display: flex;
}
.page_iisMgdetail ._addUpload_tips {
margin-top: 20px;
font-size: 12px;
color: #999999;
}
.page_iisMgdetail ._addUpload_box {
display: block;
margin-top: 15px;
}
.page_iisMgdetail ._addUpload_box img {
width: 100%;
height: 100%;
}
.page_iisMgdetail ._addUpload_box > div {
float: left;
width: 138px;
height: 92px;
border: 1px dashed rgba(210, 210, 210, 1);
border-radius: 2px;
cursor: pointer;
margin-bottom: 10px;
padding: 5px;
margin-right: 10px;
position: relative;
}
.page_iisMgdetail ._addUpload_box > div:hover {
background-color: #f5f5f5;
}
.page_iisMgdetail ._addFile_name {
padding-left: 15px;
max-width: 450px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.page_iisMgdetail ._addUpload_box .icon-guanbi1 {
font-size: 12px;
color: white;
display: inline-block;
margin-left: 15px;
position: absolute;
right: -6px;
top: -9px;
background-color: #f56c6c;
border-radius: 50%;
height: 20px;
width: 20px;
text-align: center;
line-height: 20px;
}
.page_iisMgdetail ._addUpload_box .icon-guanbi1:hover {
font-size: 12px;
color: #c94052;
}
.page_iisMgdetail ._addUpload_box .icon-excel,
.page_iisMgdetail ._addUpload_box .icon-pdf {
text-align: center;
font-size: 38px;
color: green;
line-height: 75px;
}
.page_iisMgdetail .el-upload-dragger {
font-size: 28px;
color: #8c939d;
width: 126px;
height: 80px;
line-height: 41px;
text-align: center;
}
</style>
<template>
<div class="page_iisMgdetail" v-loading="loading">
......@@ -155,7 +224,7 @@
<table
data-v-ca5157c2
border="1"
class="page_iisMgadd_table"
class="page_iisMgdetail_table"
style="border-collapse: collapse;"
>
<tr>
......@@ -184,7 +253,7 @@
<span @click="goUrlO(detail.OrderId)">{{detail.DueInMoney}}</span>
</td>
</tr>
<tr class="page_iisMgadd_bank">
<tr class="page_iisMgdetail_bank">
<td>{{$t('ios.dzyinhang')}}</td>
<td colspan="3" class="_bank_td">
{{orderList. AccountNumber}}
......@@ -302,7 +371,7 @@
</span>
<span class="cursorpointer" @click="fujianShow = false">收起 <i class="iconfont icon-gengduo"></i></span>
</p>
<div class="_addUpload_box" v-if="fujianShow">
<div class=" clearfix" v-if="fujianShow">
<div style="width:100%;" v-if="FuImgList.length>0">
<el-carousel trigger="click" height="293px" width="440px" :interval="5000">
<el-carousel-item style="height: 293px;" v-for="item in FuImgList" :key="item">
......@@ -310,7 +379,7 @@
</el-carousel-item>
</el-carousel>
</div>
<div class="clearfix bg_white" v-if="detail.ApplyPics && detail.ApplyPics.length">
<div class="clearfix" v-if="detail.ApplyPics && detail.ApplyPics.length">
<template v-for="(file,fIndex) in detail.ApplyPics" v-if="file.Type==='1'">
<div class="_wenjian" @click="showUpLoadFile(file)">
<p v-if="file.Type==='1'" class="_wenjian_P iconfont" :class="file.Url.substring(file.Url.lastIndexOf('.')+1,file.Url.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"></p>
......@@ -319,6 +388,36 @@
</div>
</div>
</div>
<div v-else-if="!detail.ApplyPics && EmployeeId === detail.CreateBy">
<div class="_addUpload_box _addUpload_box_btm clearfix" >
<template v-for="(file,fIndex) in saveMsg">
<div v-if="file.Type==3">
<div style="width:100%;height:100%;overflow: hidden;">
<img :src="file.Url?file.Url:file.Content" @click="showImg(file.Url?file.Url:file.Content)">
</div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div>
<div v-if="file.Type==1">
<div class="iconfont _wenjian_P" :class="file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'" @click="showUpLoadFileT(file)">
</div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div>
</template>
</div>
<div style="margin-top: 80px;">
<div class="_pic_upload" >
<el-upload
drag
:http-request="uploadFileBtn"
:multiple="true" :show-file-list="false" action="">
<i class="el-icon-plus avatar-uploader-icon"></i>
<div class="el-upload__text">点击/拖拽上传</div>
</el-upload>
</div>
<div class="shangchuanfujian"><button class="hollowFixedBtn" @click="upLoadFuJian">上传附件</button></div>
</div>
</div>
<div class="querenhan">
<p >确认函</p>
<div style="width:100%;" >
......@@ -380,9 +479,59 @@ export default {
title:false
},
fujianShow:true,
saveMsg: [],
};
},
methods: {
uploadFileBtn(file) { //上传
if(file.file.size > 1024 * 1024 * 10) {
this.$message.warning('文件大小不能超过10M!')
return
}
// 1 文档 2 数据 3 图片
let typeArr=[
{stringArr:'GIF|JPG|JPEG|PNG|BMP',type:3},
{stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',type:1},
]
let ft=file.file.name.substring(file.file.name.lastIndexOf('.')+1,file.file.name.length).toUpperCase();
let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach(x=>{
if(x.stringArr.indexOf(ft)!='-1')
{
fileTypeNumber=x.type;
typeOk = true;
}
});
if (!typeOk) return this.$message.error('请上传图片、word、excel类型的文件!');
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info('上传中...')
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0);
this.saveMsg.push({
Type: fileTypeNumber,
Content: x.data.FilePath,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
});
this.$message.success('上传成功');
});
},
upLoadFuJian: function() {
if (this.saveMsg.length===0) return this.$message.error('请上传文件!');
let msg = {
ID: this.msg.ID,
ApplyPics: this.saveMsg
};
this.apipost('InvoiceApply_get_UpdateInvoiceApplyInfo', msg, res=>{
if (res.data.resultCode===1) {
this.getDetail(this.msg.ID)
} else {
this.$message.error(res.data.message);
}
}, null)
},
showUpLoadFile(i){ // 预览上传文件
if(i.Url.substring(i.Url.lastIndexOf('.')+1,i.Url.length).toUpperCase()=='PDF'){
this.previewPDF(i.Url)
......
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 to comment