Commit 5859d32c authored by youjie's avatar youjie

no message

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