Commit b803c2ea authored by youjie's avatar youjie

no message

parent 7376c3b6
<style scoped>
._wenjian_P {
font-size: 30px;
text-align: center;
color: #41D2A1;
}
._addUpload_box_btm {
/* padding-top: 20px; */
/* max-height: 230px; */
/* overflow: auto; */
}
._addUpload_box_btm img {
width: 100%;
}
._addUpload_box_btm>div {
float: left;
width: 66px;
height: 55px;
border: 1px dashed rgba(210, 210, 210, 1);
border-radius: 2px;
cursor: pointer;
margin-bottom: 17px;
padding: 5px;
margin-right: 17px;
position: relative;
}
.deleticon{
font-size: 12px;
width: 19px;
position: absolute;
right: -10px;
border-radius: 50%;
top: -9px;
background: #eee;
height: 19px;
line-height: 19px;
text-align: center;
}
._addUpload_box_btm>div:hover {
background-color: #f5f5f5;
}
/deep/._fujian_box .el-upload{
width: 100px !important;
}
/deep/._fujian_box .el-upload-dragger{
width: 100px;
height: 100px;
}
/deep/._fujian_box .avatar-uploader-icon{
height: 63px !important;
line-height: 63px !important;
width: 100% !important;
}
.el-pagination {
border-top: none;
}
......@@ -1176,11 +1231,45 @@ input[type="number"] {
@click="DeleteFile(subIndex)">删除</a>
</template>
</template> -->
<el-upload v-loading="uploadLoading" class="avatar-uploader" action="" :http-request="uploadImg"
<!-- <el-upload v-loading="uploadLoading" class="avatar-uploader" action="" :http-request="uploadImg"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false">
<img v-if="BusinessCardPhotos" :src="BusinessCardPhotos" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-upload> -->
<div class="_fujian_box">
<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>
<div class="_addUpload_box _addUpload_box_btm clearfix" v-if="saveMsg.length>0">
<template v-for="(file,fIndex) in saveMsg">
<div v-if="file.Type==3">
<div style="width:100%;height:100%;overflow: hidden;">
<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>
<!-- <img :src="file.Url?file.Url:file.Content" @click="showImg(file.Url?file.Url:file.Content)"> -->
</div>
<span class="iconfont icon-guanbi1 deleticon" @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 deleticon" @click="deleteUploadFile(fIndex)"></span>
</div>
</template>
</div>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_remark')">
<el-input type="textarea" v-model="addMsg.Notes" class="w216"></el-input>
......@@ -1192,7 +1281,7 @@ input[type="number"] {
</div>
</el-dialog>
</div>
<a id='signed_DownLoad' target="_blank" style="display:none">1不要删除</a>
</div>
</template>
<script>
......@@ -1266,7 +1355,8 @@ import myGZBill from "../FinancialModule/FinancialSubmodule/GZBillModule.vue";
HousePhotosNew: '',
CustomerException: [],
JYExceptionList: [],
isShow: false
isShow: false,
saveMsg: [],
}
},
methods: {
......@@ -1280,6 +1370,19 @@ import myGZBill from "../FinancialModule/FinancialSubmodule/GZBillModule.vue";
}
});
},
deleteUploadFile(i) { // 删除上传文件
this.saveMsg.splice(i, 1);
},
showUpLoadFileT(i) { // 预览上传文件
if (i.Content.substring(i.Content.lastIndexOf('.') + 1, i.Content.length).toUpperCase() == 'PDF') {
this.previewPDF(i.Url)
} else {
let dom = document.querySelector("#signed_DownLoad");
dom.href = i.Url;
dom.click();
// window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Url)
}
},
Financial_post_GetFinancLogList(id) {
// 获取单据日志
if (this.checkboxShow) return;
......@@ -1330,11 +1433,15 @@ import myGZBill from "../FinancialModule/FinancialSubmodule/GZBillModule.vue";
.join(",");
},
checkSubmit() {
if(!this.BusinessCardPhotos) {
this.addMsg.vorcherInos = []
if(!this.saveMsg||this.saveMsg.length==0) {
this.$message.error('请上传凭证')
return
}
this.addMsg.Voucher = this.BusinessCardPhotos;
this.saveMsg.forEach(item=>{
this.addMsg.vorcherInos.push(item.Url)
})
// this.addMsg.Voucher = this.BusinessCardPhotos;
this.addMsg.FinanceIds = this.checkObj.FrID;
this.addMsg.SigningCustomerId = this.$route.query.id;
this.apipost('customer_post_GetSigningFinance', this.addMsg, res => {
......@@ -1360,26 +1467,64 @@ import myGZBill from "../FinancialModule/FinancialSubmodule/GZBillModule.vue";
});
},
uploadFileBtn(file) { //上传
if (file.file.size > 1024 * 1024 * 100) {
this.$message.warning('文件大小不能超过100M!')
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning('文件大小不能超过10M!')
return
}
let that = this
// 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 = []
this.saveMsg.push({
Path: x.data.FilePath,
FileName: file.file.name,
MD5Sign: file.file.uid,
FileSize: fileSize,
FolderId: this.msg.ParentId
})
Type: fileTypeNumber,
Content: x.data.FilePath,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
});
this.$message.success('上传成功');
});
// if (file.file.size > 1024 * 1024 * 100) {
// this.$message.warning('文件大小不能超过100M!')
// return
// }
// let that = this
// 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 = []
// this.saveMsg.push({
// Path: x.data.FilePath,
// FileName: file.file.name,
// MD5Sign: file.file.uid,
// FileSize: fileSize,
// FolderId: this.msg.ParentId
// })
// });
},
//删除文件
DeleteFile(subIndex) {
......@@ -1439,7 +1584,6 @@ import myGZBill from "../FinancialModule/FinancialSubmodule/GZBillModule.vue";
this.czList = []
} else {
this.czList = res.data.data.pageData;
console.log(this.czList,'----------')
this.total = res.data.data.count;
this.loading = false;
}
......
<style>
.page_MyCustomer ._mc_addbox {
height: 52px;
width: 100%;
......@@ -347,6 +348,61 @@
</style>
<style scoped>
._wenjian_P {
font-size: 30px;
text-align: center;
color: #41D2A1;
}
._addUpload_box_btm {
/* padding-top: 20px; */
/* max-height: 230px; */
/* overflow: auto; */
}
._addUpload_box_btm img {
width: 100%;
}
._addUpload_box_btm>div {
float: left;
width: 66px;
height: 55px;
border: 1px dashed rgba(210, 210, 210, 1);
border-radius: 2px;
cursor: pointer;
margin-bottom: 17px;
padding: 5px;
margin-right: 17px;
position: relative;
}
.deleticon{
font-size: 12px;
width: 19px;
position: absolute;
right: -10px;
border-radius: 50%;
top: -9px;
background: #eee;
height: 19px;
line-height: 19px;
text-align: center;
}
._addUpload_box_btm>div:hover {
background-color: #f5f5f5;
}
/deep/._fujian_box .el-upload{
width: 100px !important;
}
/deep/._fujian_box .el-upload-dragger{
width: 100px;
height: 100px;
}
/deep/._fujian_box .avatar-uploader-icon{
height: 63px !important;
line-height: 63px !important;
width: 100% !important;
}
.page_fnDm {
background-color: white;
}
......@@ -850,7 +906,28 @@ input[type="number"] {
</div>
<div class="check-info">
<div style="margin-bottom: 10px">申请附件:</div>
<img @click="showImg(detailInfo.Voucher)" style="width: 200px" :src="detailInfo.Voucher" />
<div class="_addUpload_box _addUpload_box_btm clearfix"
v-if="detailInfo.vorcherInos&&detailInfo.vorcherInos.length>0">
<template v-for="(file,fIndex) in detailInfo.vorcherInos">
<div v-if="verificationFile(file)==3">
<div style="width:100%;height:100%;overflow: hidden;">
<el-image
style="width: 100%; height: 100%"
:src="file"
:preview-src-list="[file]">
</el-image>
</div>
</div>
<div v-if="verificationFile(file)==1">
<div class="iconfont _wenjian_P"
:class="file.substring(file.lastIndexOf('.')+1,
file.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFileT(file)">
</div>
</div>
</template>
</div>
<img v-else @click="showImg(detailInfo.Voucher)" style="width: 200px" :src="detailInfo.Voucher" />
</div>
</div>
<div style="text-align: right;">
......@@ -1022,6 +1099,7 @@ input[type="number"] {
>
<el-form label-width="100px">
<el-form-item label="凭证" prop="SigningFile">
<!--
<el-upload
class="avatar-uploader"
action=""
......@@ -1035,7 +1113,41 @@ input[type="number"] {
class="avatar"
/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-upload> -->
<div class="_fujian_box">
<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>
<div class="_addUpload_box _addUpload_box_btm clearfix" v-if="saveMsg.length>0">
<template v-for="(file,fIndex) in saveMsg">
<div v-if="file.Type==3">
<div style="width:100%;height:100%;overflow: hidden;">
<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>
<!-- <img :src="file.Url?file.Url:file.Content" @click="showImg(file.Url?file.Url:file.Content)"> -->
</div>
<span class="iconfont icon-guanbi1 deleticon" @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 deleticon" @click="deleteUploadFile(fIndex)"></span>
</div>
</template>
</div>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_remark')">
<el-input
......@@ -1142,10 +1254,63 @@ import myGZBill from "../FinancialModule/FinancialSubmodule/GZBillModule.vue";
HousePhotosNew: '',
CustomerException: [],
JYExceptionList: [],
isShow: false
isShow: false,
saveMsg: [],
}
},
methods: {
deleteUploadFile(i) { // 删除上传文件
this.saveMsg.splice(i, 1);
},
showUpLoadFileT(i) { // 预览上传文件
if (i.Content.substring(i.Content.lastIndexOf('.') + 1, i.Content.length).toUpperCase() == 'PDF') {
this.previewPDF(i.Url)
} else {
let dom = document.querySelector("#signed_DownLoad");
dom.href = i.Url;
dom.click();
// window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Url)
}
},
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('上传成功');
});
},
inited(viewer) {
this.$viewer = viewer
},
......@@ -1203,17 +1368,22 @@ import myGZBill from "../FinancialModule/FinancialSubmodule/GZBillModule.vue";
);
},
checkSubmit() {
if (!this.BusinessCardPhotos) {
this.$message.error("请上传凭证");
return;
}
this.addMsg.ExamineVoucher = this.BusinessCardPhotos;
this.addMsg.ExamineVouchers = []
if(!this.saveMsg||this.saveMsg.length==0) {
this.$message.error('请上传凭证')
return
}
this.saveMsg.forEach(item=>{
this.addMsg.ExamineVouchers.push(item.Url)
})
// this.addMsg.ExamineVoucher = this.BusinessCardPhotos;
this.addMsg.Id = this.frId;
this.apipost(
"customer_post_UpdateSigningSettlement",
this.addMsg,
(res) => {
if (res.data.resultCode == 1) {
this.saveMsg = []
this.showCheck = false;
this.$message.success(res.data.message || "操作成功");
this.getDetail(this.frId)
......
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