Commit 13264d70 authored by zhengke's avatar zhengke
parents be676a4e 46e54be1
<style> <style>
.page_iisMgadd { .page_iisMgadd {
width: 830px; width: 830px;
background-color: white; background-color: white;
padding: 10px; padding: 10px;
} }
.page_iisMgadd > p {
.page_iisMgadd>p {
font-size: 18px; font-size: 18px;
text-align: center; text-align: center;
padding-bottom: 15px; padding-bottom: 15px;
} }
.page_iisMgadd .page_iisMgadd_table {
.page_iisMgadd .page_iisMgadd_table {
width: 100%; width: 100%;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
} }
.page_iisMgadd .page_iisMgadd_table td {
.page_iisMgadd .page_iisMgadd_table td {
padding: 10px; padding: 10px;
} }
.page_iisMgadd .page_iisMgadd_table .page_iisMgadd_bank td._bank_td {
.page_iisMgadd .page_iisMgadd_table .page_iisMgadd_bank td._bank_td {
width: 679px; width: 679px;
} }
.page_iisMgadd .iis_save {
.page_iisMgadd .iis_save {
text-align: right; text-align: right;
padding: 10px 0 0 0; padding: 10px 0 0 0;
} }
.page_iisMgadd .page_iisMgadd_table tr td.text-align-left {
.page_iisMgadd .page_iisMgadd_table tr td.text-align-left {
font-weight: 800; font-weight: 800;
} }
.page_iisMgadd ._addUpload_tips {
.page_iisMgadd ._addUpload_tips {
margin-top: 20px; margin-top: 20px;
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
} }
.page_iisMgadd ._addUpload_box {
.page_iisMgadd ._addUpload_box {
display: block; display: block;
margin-top: 15px; margin-top: 15px;
} }
.page_iisMgadd ._addUpload_box img {
.page_iisMgadd ._addUpload_box img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.page_iisMgadd ._addUpload_box > div {
.page_iisMgadd ._addUpload_box>div {
float: left; float: left;
width: 138px; width: 138px;
height: 92px; height: 92px;
...@@ -51,18 +61,21 @@ ...@@ -51,18 +61,21 @@
padding: 5px; padding: 5px;
margin-right: 10px; margin-right: 10px;
position: relative; position: relative;
} }
.page_iisMgadd ._addUpload_box > div:hover {
.page_iisMgadd ._addUpload_box>div:hover {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.page_iisMgadd ._addFile_name {
.page_iisMgadd ._addFile_name {
padding-left: 15px; padding-left: 15px;
max-width: 450px; max-width: 450px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.page_iisMgadd ._addUpload_box .icon-guanbi1 {
.page_iisMgadd ._addUpload_box .icon-guanbi1 {
font-size: 12px; font-size: 12px;
color: white; color: white;
display: inline-block; display: inline-block;
...@@ -76,36 +89,35 @@ ...@@ -76,36 +89,35 @@
width: 20px; width: 20px;
text-align: center; text-align: center;
line-height: 20px; line-height: 20px;
} }
.page_iisMgadd ._addUpload_box .icon-guanbi1:hover {
.page_iisMgadd ._addUpload_box .icon-guanbi1:hover {
font-size: 12px; font-size: 12px;
color: #c94052; color: #c94052;
} }
.page_iisMgadd ._addUpload_box .icon-excel,
.page_iisMgadd ._addUpload_box .icon-pdf { .page_iisMgadd ._addUpload_box .icon-excel,
.page_iisMgadd ._addUpload_box .icon-pdf {
text-align: center; text-align: center;
font-size: 38px; font-size: 38px;
color: green; color: green;
line-height: 75px; line-height: 75px;
} }
.page_iisMgadd .el-upload-dragger {
.page_iisMgadd .el-upload-dragger {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
width: 126px; width: 126px;
height: 80px; height: 80px;
line-height: 41px; line-height: 41px;
text-align: center; text-align: center;
} }
</style> </style>
<template> <template>
<div class="page_iisMgadd"> <div class="page_iisMgadd">
<p>发票开具申请单</p> <p>发票开具申请单</p>
<table <table data-v-ca5157c2 border="1" class="page_iisMgadd_table" style="border-collapse: collapse;">
data-v-ca5157c2
border="1"
class="page_iisMgadd_table"
style="border-collapse: collapse;"
>
<tr> <tr>
<td width="130">部门</td> <td width="130">部门</td>
<td width="290">{{DepartName}}</td> <td width="290">{{DepartName}}</td>
...@@ -149,18 +161,9 @@ ...@@ -149,18 +161,9 @@
</el-select> </el-select>
</td> </td>
<td colspan="2"> <td colspan="2">
<el-select <el-select v-model="CompanyID" placeholder v-if="isChang === 1" @change="setDutyParagraph">
v-model="CompanyID" <el-option v-for="item in CustomerList" :key="item.ID" :value="item.ID" :label="item.CompanyName">
placeholder </el-option>
v-if="isChang === 1"
@change="setDutyParagraph"
>
<el-option
v-for="item in CustomerList"
:key="item.ID"
:value="item.ID"
:label="item.CompanyName"
></el-option>
</el-select> </el-select>
<template v-else> <template v-else>
<span style="display:flex;align-items: center;"> <span style="display:flex;align-items: center;">
...@@ -229,11 +232,9 @@ ...@@ -229,11 +232,9 @@
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div> </div>
<div v-if="file.Type==1"> <div v-if="file.Type==1">
<div <div class="iconfont"
class="iconfont"
:class="file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'" :class="file.Content.substring(file.Content.lastIndexOf('.')+1,file.Content.length).toUpperCase()=='PDF'? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(file)" @click="showUpLoadFile(file)"></div>
></div>
<span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span> <span class="iconfont icon-guanbi1" @click="deleteUploadFile(fIndex)"></span>
</div> </div>
<div v-if="file.Type==2"> <div v-if="file.Type==2">
...@@ -242,13 +243,7 @@ ...@@ -242,13 +243,7 @@
</div> </div>
</template> </template>
<div class="_pic_upload"> <div class="_pic_upload">
<el-upload <el-upload drag :http-request="uploadFileBtn" :multiple="true" :show-file-list="false" action>
drag
:http-request="uploadFileBtn"
:multiple="true"
:show-file-list="false"
action
>
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
<div class="el-upload__text">{{$t('active.ld_djscwj')}}</div> <div class="el-upload__text">{{$t('active.ld_djscwj')}}</div>
</el-upload> </el-upload>
...@@ -265,7 +260,7 @@ ...@@ -265,7 +260,7 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {
...@@ -280,7 +275,8 @@ export default { ...@@ -280,7 +275,8 @@ export default {
IsDefaultInfo: 1, IsDefaultInfo: 1,
ApplyPics: [], ApplyPics: [],
ID: 0, ID: 0,
AccountingDate:'' AccountingDate: '',
InvoiceApplyType: 1, //默认为团队订单
}, },
DepartName: "", DepartName: "",
emName: "", emName: "",
...@@ -291,65 +287,76 @@ export default { ...@@ -291,65 +287,76 @@ export default {
CustomerList: [], CustomerList: [],
CompanyID: "", CompanyID: "",
images: [], images: [],
imageOptions:{ imageOptions: {
navbar:false, navbar: false,
title:false title: false
}, },
saveMsg: [], saveMsg: [],
}; };
}, },
methods: { methods: {
goUrlO: function (OrderId) { goUrlO: function (OrderId) {
this.$router.push({ name: 'enrollTotal', query: { id: OrderId, blank: 'y', tab: '报名统计'} }); this.$router.push({
name: 'enrollTotal',
query: {
id: OrderId,
blank: 'y',
tab: '报名统计'
}
});
}, },
inited (viewer){ inited(viewer) {
this.$viewer = viewer this.$viewer = viewer
}, },
showImg(src){ showImg(src) {
src = src.indexOf('http') != -1 ? src : this.domainManager().ViittoFileUrl + src; src = src.indexOf('http') != -1 ? src : this.domainManager().ViittoFileUrl + src;
let isExsit=false let isExsit = false
this.images.forEach(x=>{ this.images.forEach(x => {
if(x==src) if (x == src)
isExsit=true isExsit = true
}) })
if(!isExsit) { if (!isExsit) {
this.images.push(src) this.images.push(src)
} else { } else {
this.$viewer.view(this.images.indexOf(src)) this.$viewer.view(this.images.indexOf(src))
} }
this.$viewer.show() this.$viewer.show()
}, },
showUpLoadFile(i){ // 预览上传文件 showUpLoadFile(i) { // 预览上传文件
if(i.Type==3){ if (i.Type == 3) {
this.showImg(i.Url); this.showImg(i.Url);
}else{ } else {
if(i.Content.substring(i.Content.lastIndexOf('.')+1,i.Content.length).toUpperCase()=='PDF'){ if (i.Content.substring(i.Content.lastIndexOf('.') + 1, i.Content.length).toUpperCase() == 'PDF') {
this.previewPDF(i.Url) this.previewPDF(i.Url)
}else{ } else {
window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Url) window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i.Url)
} }
} }
}, },
deleteUploadFile(i){ // 删除上传文件 deleteUploadFile(i) { // 删除上传文件
this.saveMsg.splice(i,1); this.saveMsg.splice(i, 1);
}, },
uploadFileBtn(file) { //上传 uploadFileBtn(file) { //上传
if(file.file.size > 1024 * 1024 * 10) { if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning(this.$t('tips.wjdxbncgsz')) this.$message.warning(this.$t('tips.wjdxbncgsz'))
return return
} }
// 1 文档 2 数据 3 图片 // 1 文档 2 数据 3 图片
let typeArr=[ let typeArr = [{
{stringArr:'GIF|JPG|JPEG|PNG|BMP',type:3}, stringArr: 'GIF|JPG|JPEG|PNG|BMP',
{stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',type:1}, 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 ft = file.file.name.substring(file.file.name.lastIndexOf('.') + 1, file.file.name.length).toUpperCase();
let fileTypeNumber = 2; let fileTypeNumber = 2;
let typeOk = false; let typeOk = false;
typeArr.forEach(x=>{ typeArr.forEach(x => {
if(x.stringArr.indexOf(ft)!='-1') if (x.stringArr.indexOf(ft) != '-1') {
{ fileTypeNumber = x.type;
fileTypeNumber=x.type;
typeOk = true; typeOk = true;
} }
}) })
...@@ -359,22 +366,22 @@ export default { ...@@ -359,22 +366,22 @@ export default {
let path = "/Upload/Temporary/" let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong')) this.$message.info(this.$t('tips.shangchuanzhong'))
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);
this.saveMsg.push({ this.saveMsg.push({
Content: x.data.FilePath, Content: x.data.FilePath,
ID:0, ID: 0,
Type: fileTypeNumber, Type: fileTypeNumber,
Url: this.domainManager().ViittoFileUrl + x.data.FilePath, Url: this.domainManager().ViittoFileUrl + x.data.FilePath,
}) })
this.$message.success(this.$t('tips.scchenggong')) this.$message.success(this.$t('tips.scchenggong'))
}, 1); }, 1);
}, },
clearInfo: function() { clearInfo: function () {
// 清除数据 // 清除数据
this.msg.DutyParagraph = ""; this.msg.DutyParagraph = "";
this.msg.CompanyName = ""; this.msg.CompanyName = "";
}, },
setDutyParagraph: function() { setDutyParagraph: function () {
// 绑定数据 // 绑定数据
this.CustomerList.forEach(x => { this.CustomerList.forEach(x => {
if (x.ID === this.CompanyID) { if (x.ID === this.CompanyID) {
...@@ -387,7 +394,7 @@ export default { ...@@ -387,7 +394,7 @@ export default {
} }
}); });
}, },
Addiis: function() { Addiis: function () {
// 新增接口 // 新增接口
if (this.msg.CompanyName === "") if (this.msg.CompanyName === "")
return this.$message.error("请填写公司名称!"); return this.$message.error("请填写公司名称!");
...@@ -418,11 +425,12 @@ export default { ...@@ -418,11 +425,12 @@ export default {
err => {} err => {}
); );
}, },
getAccountList: function() { getAccountList: function () {
//获取账户类型对应下的账户列表 //获取账户类型对应下的账户列表
this.apipost( this.apipost(
"FinancialInstitutions_post_GetALLAccountList", "FinancialInstitutions_post_GetALLAccountList", {
{ TypeId: 3 }, TypeId: 3
},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let data = res.data.data; let data = res.data.data;
...@@ -435,12 +443,18 @@ export default { ...@@ -435,12 +443,18 @@ export default {
err => {} err => {}
); );
}, },
getOrderDetail: function() { getOrderDetail: function () {
// 获取订单详情 // 获取订单详情
let OrderResource = this.msg.InvoiceApplyType==1 ? 8 : 10 let OrderResource = 8; //团队订单
if (this.msg.InvoiceApplyType != 1) {
OrderResource = 10; //签证订单
}
this.apipost( this.apipost(
"InvoiceApply_get_GetOrderFinanceList", "InvoiceApply_get_GetOrderFinanceList", {
{ OrderId: this.msg.OrderId, OrderResource: OrderResource, IsTravelMoney: 1 }, OrderId: this.msg.OrderId,
OrderResource: OrderResource,
IsTravelMoney: 1
},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.orderList = res.data.data; this.orderList = res.data.data;
...@@ -449,11 +463,12 @@ export default { ...@@ -449,11 +463,12 @@ export default {
err => {} err => {}
); );
}, },
getCustomerInvoiceList: function() { getCustomerInvoiceList: function () {
// 根据客户id 获取对应发票信息 // 根据客户id 获取对应发票信息
this.apipost( this.apipost(
"InvoiceApply_get_GetCustomerInvoiceList", "InvoiceApply_get_GetCustomerInvoiceList", {
{ CustomerID: this.msg.CustomerId }, CustomerID: this.msg.CustomerId
},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CustomerList = res.data.data; this.CustomerList = res.data.data;
...@@ -463,8 +478,10 @@ export default { ...@@ -463,8 +478,10 @@ export default {
); );
}, },
getDetail: function (id) { // 获取详情 getDetail: function (id) { // 获取详情
let InvoiceApplyType = this.$route.query.InvoiceApplyType ? this.$route.query.InvoiceApplyType : 1 this.apipost('InvoiceApply_get_GetDetails', {
this.apipost('InvoiceApply_get_GetDetails', {ID: id, InvoiceApplyType: InvoiceApplyType}, res=>{ ID: id,
InvoiceApplyType: this.msg.InvoiceApplyType
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let detail = res.data.data let detail = res.data.data
this.isChang = 2 this.isChang = 2
...@@ -475,8 +492,8 @@ export default { ...@@ -475,8 +492,8 @@ export default {
this.msg.CompanyPhone = detail.CompanyPhone; this.msg.CompanyPhone = detail.CompanyPhone;
this.msg.OpeningBank = detail.OpeningBank; this.msg.OpeningBank = detail.OpeningBank;
this.msg.ApplyMoney = detail.ApplyMoney; this.msg.ApplyMoney = detail.ApplyMoney;
if(detail.ApplyPics && detail.ApplyPics.length>0){ if (detail.ApplyPics && detail.ApplyPics.length > 0) {
detail.ApplyPics.forEach(x=>{ detail.ApplyPics.forEach(x => {
this.saveMsg.push({ this.saveMsg.push({
Content: x.Url, Content: x.Url,
Type: x.Type, Type: x.Type,
...@@ -497,7 +514,9 @@ export default { ...@@ -497,7 +514,9 @@ export default {
this.msg.OrderId = this.$route.query.OrderId; this.msg.OrderId = this.$route.query.OrderId;
this.msg.TCID = this.$route.query.TCID; this.msg.TCID = this.$route.query.TCID;
this.msg.CustomerId = this.$route.query.customerId; this.msg.CustomerId = this.$route.query.customerId;
this.msg.InvoiceApplyType = this.$route.query.InvoiceApplyType ? this.$route.query.InvoiceApplyType : 1 if (this.$route.query.InvoiceApplyType) {
this.msg.InvoiceApplyType = this.$route.query.InvoiceApplyType;
}
this.getAccountList(); this.getAccountList();
this.getOrderDetail(); this.getOrderDetail();
this.getCustomerInvoiceList(); this.getCustomerInvoiceList();
...@@ -506,5 +525,5 @@ export default { ...@@ -506,5 +525,5 @@ export default {
this.getDetail(this.$route.query.id) this.getDetail(this.$route.query.id)
} }
} }
}; };
</script> </script>
\ No newline at end of file
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