Commit 957833fb authored by youjie's avatar youjie

审核 出纳上传附件功能

parent a6ec9603
<style> <style>
._addUpload_box_btm{
padding-top: 20px;
max-height: 230px;
overflow: auto;
}
._addUpload_box_btm img{
width: 100%;
}
._addUpload_box_btm>div{
float: left;
width:135px;
height:80px;
border:1px dashed rgba(210,210,210,1);
border-radius:2px;
cursor: pointer;
margin-bottom: 10px;
padding: 5px;
margin-right: 10px;
position: relative;
}
._addUpload_box_btm>div:hover{
background-color: #f5f5f5;
}
._addFile_name{
padding-left: 15px;
max-width: 450px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
._addUpload_box_btm .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;
}
._addUpload_box_btm .icon-guanbi1:hover {
font-size: 12px;
color: #c94052;
}
._addUpload_box_btm .icon-excel{
text-align: center;
font-size: 38px;
color: green;
line-height: 75px;
}
._show_img_box{position: fixed; background: rgba(0,0,0,.6); left: 0; top:0; width: 100%; height: 100%; z-index: 999; text-align: center;}
._addUpload_tips{
font-size: 12px;
color: #999999;
}
.page_fdd .avatar-uploader-icon{
width: 100%;
line-height: 0;
height: 10px;
}
.page_fdd .shangchuanfujian{
text-align: right;
}
.page_bdm .page_bdm{padding: 20px 0;} .page_bdm .page_bdm{padding: 20px 0;}
.page_bdm ._tit{padding-left: 10px;border-left: 3px solid #E95252;font-size: 14px} .page_bdm ._tit{padding-left: 10px;border-left: 3px solid #E95252;font-size: 14px}
.page_bdm ._conten,._process{margin-top: 20px;width: 890px;} .page_bdm ._conten,._process{margin-top: 20px;width: 890px;}
...@@ -499,7 +568,7 @@ ...@@ -499,7 +568,7 @@
<div class="_addUpload_box" v-if="fujianShow"> <div class="_addUpload_box" v-if="fujianShow">
<div style="width:100%;" v-if="FuImgList.length>0"> <div style="width:100%;" v-if="FuImgList.length>0">
<el-carousel trigger="click" height="293px" width="440px" :interval="5000"> <el-carousel trigger="click" height="293px" width="440px" :interval="5000">
<el-carousel-item style="height: 293px;" v-for="item in FuImgList" :key="item"> <el-carousel-item style="height: 293px;" v-for="(item,index) in FuImgList" :key="index">
<img @click="showImg(item)" :src="item" alt="" style="width: 100%;"> <img @click="showImg(item)" :src="item" alt="" style="width: 100%;">
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
...@@ -511,6 +580,41 @@ ...@@ -511,6 +580,41 @@
</div> </div>
</template> </template>
</div> </div>
<div v-if="saveMsg.length>0">
<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>
<div v-if='picIsShow' class="_show_img_box" @click="picIsShow=false,picObj=''">
<img :src="picObj" style="margin-top: 80px;"/>
</div>
<div style="margin-top: 80px;" class="page_fdd" v-if="isShowAttachment&&GetDetail.IsUploadPic===1">
<div class="_pic_upload">
<el-upload
drag
:http-request="uploadFileBtn2"
: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>
</div> </div>
<div class="w890px"> <div class="w890px">
...@@ -1374,7 +1478,7 @@ ...@@ -1374,7 +1478,7 @@
<img :src="picObj" style="margin-top: 80px"/> <img :src="picObj" style="margin-top: 80px"/>
</div> </div>
<viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer"> <viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
<img v-for="src in images" :src="src" :key="src"> <img v-for="(src,index) in images" :src="src" :key="index">
</viewer> </viewer>
<a id='groupTourOrder_DownLoad' target="_blank" style="display:none">1不要删除</a> <a id='groupTourOrder_DownLoad' target="_blank" style="display:none">1不要删除</a>
</div> </div>
...@@ -1400,6 +1504,11 @@ import czBillModule from "./FinancialSubmodule/czBillModule.vue"; ...@@ -1400,6 +1504,11 @@ import czBillModule from "./FinancialSubmodule/czBillModule.vue";
export default { export default {
data(){ data(){
return{ return{
picIsShow:false,
picObj:'',
imgList:[],
isShowAttachment:false,//是出纳可上传附件
saveMsg:[],
StandCurrBranchId:'', StandCurrBranchId:'',
TeamShouZhi:false, TeamShouZhi:false,
F_Disbursement_Schedule:false, F_Disbursement_Schedule:false,
...@@ -1575,6 +1684,77 @@ export default { ...@@ -1575,6 +1684,77 @@ export default {
}, },
methods:{ methods:{
showUpLoadFileT(i){ // 预览上传文件
if(i.Type==3){
this.picObj.push(i.Url);
this.imgList.push(i.Url);
this.picIsShow= true;
}else{
if(i.Content.substring(i.Content.lastIndexOf('.')+1,i.Content.length).toUpperCase()=='PDF'){
this.previewPDF(i.Url)
}else{
let dom = document.querySelector("#groupTourOrder_DownLoad");
dom.href = i.Url;
dom.click();
// window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Url)
}
}
},
uploadFileBtn2(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('上传成功');
});
},
deleteUploadFile(i){ // 删除上传文件
this.saveMsg.splice(i,1);
},
upLoadFuJian() {
if (this.saveMsg.length===0) return this.$message.error('请上传文件!');
let msg = {
FrID: this.ID,
vorcherInos: this.saveMsg
};
this.apipost('Financial_post_SetVoucher', msg, res=>{
if (res.data.resultCode===1) {
this.saveMsg = []
this.Financial_post_GetDetail(this.ID)
} else {
this.$message.error(res.data.message);
}
}, null)
},
// 单项服务提成 // 单项服务提成
ImpressionSingleCommissionDetails(path,type){ ImpressionSingleCommissionDetails(path,type){
this.$router.push({ this.$router.push({
...@@ -2659,6 +2839,11 @@ export default { ...@@ -2659,6 +2839,11 @@ export default {
} }
this.chongJudge(data) this.chongJudge(data)
this.GetDetail = data; this.GetDetail = data;
this.GetDetail.AuditSteps.forEach(x=>{
if(x.NextStep==1&&(x.SpecialNode==1||x.SpecialNode==2)){
this.isShowAttachment = true
}
})
this.StandCurrBranchId = this.GetDetail.RB_Branch_Id this.StandCurrBranchId = this.GetDetail.RB_Branch_Id
if(this.GetDetail.DetailList){ if(this.GetDetail.DetailList){
this.GetDetail.DetailList.forEach(item=>{ this.GetDetail.DetailList.forEach(item=>{
......
...@@ -987,6 +987,7 @@ export default { ...@@ -987,6 +987,7 @@ export default {
imageUrl:'', imageUrl:'',
uploadImgList:[], uploadImgList:[],
FuImgList:[], FuImgList:[],
imgList:[],
picIsShow:false, picIsShow:false,
picObj:'', picObj:'',
initialIndex:0, initialIndex:0,
......
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