Commit 5859d32c authored by youjie's avatar youjie

no message

parent 2a402a91
......@@ -198,37 +198,39 @@
</el-tag>
</div>
<div class="d-flex">
<div class="img-box-form" v-for="(file,fIndex) in item.vorcherInos"
<div class="img-box-form" v-for="(items,indexs) in item.vorcherInos"
style="margin-left: 5px;">
<span>{{file.SetUpTypeStr.slice(0,2)}}凭证:</span>
<div v-if="file.Type==3" class="img-box">
<div style="width:100%;height:100%;">
<el-image
style="width: 100%; height: 100%"
:src="file.Url?file.Url:file.Content"
:preview-src-list="[file.Url?file.Url:file.Content]">
</el-image>
<span v-if="items.SetUpTypeStr">{{items.SetUpTypeStr.slice(0,2)}}凭证:</span>
<template v-for="(file,fIndex) in items.vorcherInos">
<div v-if="file.Type==3" class="img-box">
<div style="width:100%;height:100%;">
<el-image
style="width: 100%; height: 100%"
:src="file.Url?file.Url:file.Content"
:preview-src-list="[file.Url?file.Url:file.Content]">
</el-image>
</div>
<span class="iconfont icon-guanbi1 delete" @click="deleteUploadFile(index,indexs,fIndex)"></span>
</div>
<span class="iconfont icon-guanbi1 delete" @click="deleteUploadFile(index,fIndex)"></span>
</div>
<div v-if="file.Type==1" class="img-box">
<div class="iconfont _wenjian_P"
:class="file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(file.Content)">
<div v-if="file.Type==1" class="img-box">
<div class="iconfont _wenjian_P"
:class="file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(file.Content)">
</div>
<span class="iconfont icon-guanbi1 delete" @click="deleteUploadFile(index,indexs,fIndex)"></span>
</div>
<span class="iconfont icon-guanbi1 delete" @click="deleteUploadFile(index,fIndex)"></span>
</div>
<div class="_fujian_box" style="margin-left: 15px;margin-right: 5px;">
<div class="_pic_upload">
<el-upload drag :http-request="(file)=>uploadFileBtn(file,index,fIndex)" :multiple="true"
:show-file-list="false" action="">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<div class="_fujian_box" style="margin-left: 15px;margin-right: 5px;"
v-if="fIndex==items.vorcherInos.length-1">
<div class="_pic_upload">
<el-upload drag :http-request="(file)=>uploadFileBtn(file,index,indexs,fIndex)" :multiple="true"
:show-file-list="false" action="">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
</div>
</div>
</template>
</div>
</div>
</div>
</div>
......@@ -361,9 +363,10 @@ export default {
return;
}
for (let index = 0; index < this.addMsg.detailList.length; index++) {
if(this.addMsg.detailList[index].UnitPrice==''||this.addMsg.detailList[index].UnitPrice==null||
!this.addMsg.detailList[index].CurrencyId||!this.addMsg.detailList[index].IsPublic||
!this.addMsg.detailList[index].ClientID){
if(this.addMsg.detailList[index].UnitPrice==null||
this.addMsg.detailList[index].CurrencyId==null||
this.addMsg.detailList[index].IsPublic==null||
this.addMsg.detailList[index].ClientID==null){
this.Error(`请完善第${index+1}行信息`);
return;
}
......@@ -390,14 +393,18 @@ export default {
})
this.proofList.forEach(x=>{
x.vorcherInos.forEach(y=>{
let obj = {
VisaOrder: x.Id,
VisaType: y.VisaType,
Type: y.Type,
Content: y.Content,
Url: y.Url,
}
msg.vorcherInos.push(obj)
y.vorcherInos.forEach(z=>{
if(z.Type){
let obj = {
VisaOrder: x.Id,
VisaType: y.VisaType,
Type: z.Type,
Content: z.Content,
Url: z.Url,
}
msg.vorcherInos.push(obj)
}
})
})
})
this.submitLoading = true
......@@ -410,7 +417,7 @@ export default {
this.submitLoading = false
}, null)
},
uploadFileBtn(file,index,fIndex) { //上传
uploadFileBtn(file,index,indexs,fIndex) { //上传
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning('文件大小不能超过10M!')
return
......@@ -441,6 +448,15 @@ export default {
this.$message.info('上传中...')
this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0);
let obj = {
Type: fileTypeNumber,
Content: x.data.FilePath,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath
}
this.proofList[index].vorcherInos[indexs].vorcherInos.push(JSON.parse(JSON.stringify(obj)))
this.$message.success('上传成功');
this.$forceUpdate()
return
this.proofList.forEach((y,indexs)=>{
if(indexs==index){
y.vorcherInos.forEach((z,i)=>{
......@@ -448,6 +464,7 @@ export default {
z.Type = fileTypeNumber,
z.Content = x.data.FilePath,
z.Url = this.domainManager().ViittoFileUrl + x.data.FilePath
}
})
}
......@@ -457,8 +474,9 @@ export default {
});
},
deleteUploadFile(index,i) { // 删除上传文件
this.proofList[index].vorcherInos.splice(i, 1);
deleteUploadFile(index,indexs,i) { // 删除上传文件
this.proofList[index].vorcherInos[indexs].vorcherInos.splice(i, 1);
this.$forceUpdate()
},
showUpLoadFile(i) { // 预览上传文件
if (i.substring(i.lastIndexOf('.') + 1, i.length).toUpperCase() == 'PDF') {
......@@ -482,9 +500,9 @@ export default {
IsMonthly: x.IsMonthly,
UnitPrice: x.SetUpTypeStr=='签证费'?this.visaInfor.CostPrice:null,
CurrencyId: null,
IsPublic: '',
IsPublic: null,
ClientType: '',
ClientID: '',
ClientID: null,
OtherType: 1,
ClientAccountList: [],
// vorcherInos:[],
......@@ -500,10 +518,14 @@ export default {
let obj = {
VisaType: x.TemplateId,
SetUpTypeStr: x.SetUpTypeStr,
vorcherInos: []
}
let obj2 = {
Type: null,
Content: null,
Url: null
Url: null,
}
obj.vorcherInos.push(obj2)
if(this.SwitchStatus==true&&(x.SetUpTypeStr=='签证费'||x.SetUpTypeStr=='快递费')){
y.vorcherInos.push(obj)
}if(!this.SwitchStatus){
......@@ -530,7 +552,11 @@ export default {
for(let x=0;x<this.proofList[i].vorcherInos.length;x++){
for(let y=0;y<this.newProofList[j].vorcherInos.length;y++){
if(this.proofList[i].vorcherInos[x].VisaType==this.newProofList[j].vorcherInos[y].VisaType){
this.proofList[i].vorcherInos[x] = this.newProofList[j].vorcherInos[y]
for(let a=0;a<this.proofList[i].vorcherInos[x].vorcherInos.length;a++){
for(let b=0;b<this.newProofList[j].vorcherInos[y].vorcherInos.length;b++)
this.proofList[i].vorcherInos[x].vorcherInos = this.newProofList[j].vorcherInos[y].vorcherInos
// this.proofList[i].vorcherInos[x] = this.newProofList[j].vorcherInos[y]
}
}
}
}
......
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