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 {
font-size: 18px; .page_iisMgadd>p {
text-align: center; font-size: 18px;
padding-bottom: 15px; text-align: center;
} padding-bottom: 15px;
.page_iisMgadd .page_iisMgadd_table { }
width: 100%;
font-size: 14px; .page_iisMgadd .page_iisMgadd_table {
text-align: center; width: 100%;
} font-size: 14px;
.page_iisMgadd .page_iisMgadd_table td { text-align: center;
padding: 10px; }
}
.page_iisMgadd .page_iisMgadd_table .page_iisMgadd_bank td._bank_td { .page_iisMgadd .page_iisMgadd_table td {
width: 679px; padding: 10px;
} }
.page_iisMgadd .iis_save {
text-align: right; .page_iisMgadd .page_iisMgadd_table .page_iisMgadd_bank td._bank_td {
padding: 10px 0 0 0; width: 679px;
} }
.page_iisMgadd .page_iisMgadd_table tr td.text-align-left {
font-weight: 800; .page_iisMgadd .iis_save {
} text-align: right;
.page_iisMgadd ._addUpload_tips { padding: 10px 0 0 0;
margin-top: 20px; }
font-size: 12px;
color: #999999; .page_iisMgadd .page_iisMgadd_table tr td.text-align-left {
} font-weight: 800;
.page_iisMgadd ._addUpload_box { }
display: block;
margin-top: 15px; .page_iisMgadd ._addUpload_tips {
} margin-top: 20px;
.page_iisMgadd ._addUpload_box img { font-size: 12px;
width: 100%; color: #999999;
height: 100%; }
}
.page_iisMgadd ._addUpload_box > div { .page_iisMgadd ._addUpload_box {
float: left; display: block;
width: 138px; margin-top: 15px;
height: 92px; }
border: 1px dashed rgba(210, 210, 210, 1);
border-radius: 2px; .page_iisMgadd ._addUpload_box img {
cursor: pointer; width: 100%;
margin-bottom: 10px; height: 100%;
padding: 5px; }
margin-right: 10px;
position: relative; .page_iisMgadd ._addUpload_box>div {
} float: left;
.page_iisMgadd ._addUpload_box > div:hover { width: 138px;
background-color: #f5f5f5; height: 92px;
} border: 1px dashed rgba(210, 210, 210, 1);
.page_iisMgadd ._addFile_name { border-radius: 2px;
padding-left: 15px; cursor: pointer;
max-width: 450px; margin-bottom: 10px;
overflow: hidden; padding: 5px;
text-overflow: ellipsis; margin-right: 10px;
white-space: nowrap; position: relative;
} }
.page_iisMgadd ._addUpload_box .icon-guanbi1 {
font-size: 12px; .page_iisMgadd ._addUpload_box>div:hover {
color: white; background-color: #f5f5f5;
display: inline-block; }
margin-left: 15px;
position: absolute; .page_iisMgadd ._addFile_name {
right: -6px; padding-left: 15px;
top: -9px; max-width: 450px;
background-color: #f56c6c; overflow: hidden;
border-radius: 50%; text-overflow: ellipsis;
height: 20px; white-space: nowrap;
width: 20px; }
text-align: center;
line-height: 20px; .page_iisMgadd ._addUpload_box .icon-guanbi1 {
} font-size: 12px;
.page_iisMgadd ._addUpload_box .icon-guanbi1:hover { color: white;
font-size: 12px; display: inline-block;
color: #c94052; margin-left: 15px;
} position: absolute;
.page_iisMgadd ._addUpload_box .icon-excel, right: -6px;
.page_iisMgadd ._addUpload_box .icon-pdf { top: -9px;
text-align: center; background-color: #f56c6c;
font-size: 38px; border-radius: 50%;
color: green; height: 20px;
line-height: 75px; width: 20px;
} text-align: center;
.page_iisMgadd .el-upload-dragger { line-height: 20px;
}
.page_iisMgadd ._addUpload_box .icon-guanbi1:hover {
font-size: 12px;
color: #c94052;
}
.page_iisMgadd ._addUpload_box .icon-excel,
.page_iisMgadd ._addUpload_box .icon-pdf {
text-align: center;
font-size: 38px;
color: green;
line-height: 75px;
}
.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;">
...@@ -209,8 +212,8 @@ ...@@ -209,8 +212,8 @@
</td> </td>
<td>预计到账时间</td> <td>预计到账时间</td>
<td> <td>
<el-date-picker v-model='msg.AccountingDate' class="w230" value-format="yyyy-MM-dd" type="date" <el-date-picker v-model='msg.AccountingDate' class="w230" value-format="yyyy-MM-dd" type="date"
placeholder="选择日期"></el-date-picker> placeholder="选择日期"></el-date-picker>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -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,93 +260,105 @@ ...@@ -265,93 +260,105 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {
TCID: 0, TCID: 0,
OrderId: 0, OrderId: 0,
ApplyMoney: 0, ApplyMoney: 0,
AactualMoney: 0, AactualMoney: 0,
CompanyName: "", CompanyName: "",
DutyParagraph: "", DutyParagraph: "",
InvoiceApplyState: 1, InvoiceApplyState: 1,
CustomerId: 0, CustomerId: 0,
IsDefaultInfo: 1, IsDefaultInfo: 1,
ApplyPics: [], ApplyPics: [],
ID: 0, ID: 0,
AccountingDate:'' AccountingDate: '',
InvoiceApplyType: 1, //默认为团队订单
},
DepartName: "",
emName: "",
accountList: [],
orderList: {},
isChang: 1,
checked: true,
CustomerList: [],
CompanyID: "",
images: [],
imageOptions: {
navbar: false,
title: false
},
saveMsg: [],
};
},
methods: {
goUrlO: function (OrderId) {
this.$router.push({
name: 'enrollTotal',
query: {
id: OrderId,
blank: 'y',
tab: '报名统计'
}
});
}, },
DepartName: "", inited(viewer) {
emName: "", this.$viewer = viewer
accountList: [],
orderList: {},
isChang: 1,
checked: true,
CustomerList: [],
CompanyID: "",
images: [],
imageOptions:{
navbar:false,
title:false
}, },
saveMsg: [], showImg(src) {
}; src = src.indexOf('http') != -1 ? src : this.domainManager().ViittoFileUrl + src;
}, let isExsit = false
methods: { this.images.forEach(x => {
goUrlO: function (OrderId) { if (x == src)
this.$router.push({ name: 'enrollTotal', query: { id: OrderId, blank: 'y', tab: '报名统计'} }); isExsit = true
}, })
inited (viewer){ if (!isExsit) {
this.$viewer = viewer
},
showImg(src){
src = src.indexOf('http') != -1 ? src : this.domainManager().ViittoFileUrl + src;
let isExsit=false
this.images.forEach(x=>{
if(x==src)
isExsit=true
})
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()
},
showUpLoadFile(i){ // 预览上传文件
if(i.Type==3){
this.showImg(i.Url);
}else{
if(i.Content.substring(i.Content.lastIndexOf('.')+1,i.Content.length).toUpperCase()=='PDF'){
this.previewPDF(i.Url)
}else{
window.open("https://view.officeapps.live.com/op/view.aspx?src="+i.Url)
}
} }
}, this.$viewer.show()
deleteUploadFile(i){ // 删除上传文件 },
this.saveMsg.splice(i,1); showUpLoadFile(i) { // 预览上传文件
}, if (i.Type == 3) {
uploadFileBtn(file) { //上传 this.showImg(i.Url);
if(file.file.size > 1024 * 1024 * 10) { } else {
this.$message.warning(this.$t('tips.wjdxbncgsz')) if (i.Content.substring(i.Content.lastIndexOf('.') + 1, i.Content.length).toUpperCase() == 'PDF') {
return this.previewPDF(i.Url)
} else {
window.open("https://view.officeapps.live.com/op/view.aspx?src=" + i.Url)
}
}
},
deleteUploadFile(i) { // 删除上传文件
this.saveMsg.splice(i, 1);
},
uploadFileBtn(file) { //上传
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning(this.$t('tips.wjdxbncgsz'))
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; }
}
}) })
if (!typeOk) return this.$message.error(this.$t('tips.qscWEfile')); if (!typeOk) return this.$message.error(this.$t('tips.qscWEfile'));
let newArr = []; let newArr = [];
...@@ -359,152 +366,164 @@ export default { ...@@ -359,152 +366,164 @@ 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) {
this.msg.DutyParagraph = x.DutyParagraph; this.msg.DutyParagraph = x.DutyParagraph;
this.msg.CompanyName = x.CompanyName; this.msg.CompanyName = x.CompanyName;
this.msg.Address = x.Address; this.msg.Address = x.Address;
this.msg.BankNo = x.BankNo; this.msg.BankNo = x.BankNo;
this.msg.CompanyPhone = x.CompanyPhone; this.msg.CompanyPhone = x.CompanyPhone;
this.msg.OpeningBank = x.OpeningBank; this.msg.OpeningBank = x.OpeningBank;
}
});
},
Addiis: function () {
// 新增接口
if (this.msg.CompanyName === "")
return this.$message.error("请填写公司名称!");
if (this.msg.DutyParagraph === "")
return this.$message.error("请填写税号!");
if (this.checked) {
this.msg.IsDefaultInfo = 1;
} else {
this.msg.IsDefaultInfo = 0;
} }
}); this.msg.ApplyPics = this.saveMsg
}, this.apipost(
Addiis: function() { "InvoiceApply_get_SetInvoiceApply_V2",
// 新增接口 this.msg,
if (this.msg.CompanyName === "") res => {
return this.$message.error("请填写公司名称!"); if (res.data.resultCode == 1) {
if (this.msg.DutyParagraph === "") this.$message.success(res.data.message);
return this.$message.error("请填写税号!"); let path = this.msg.InvoiceApplyType == 1 ? 'groupTourOrder' : 'VisaProductEditOrder'
if (this.checked) { setTimeout(() => {
this.msg.IsDefaultInfo = 1; this.$router.push({
} else { name: path
this.msg.IsDefaultInfo = 0; });
} }, 1000);
this.msg.ApplyPics = this.saveMsg } else {
this.apipost( this.$message.error(res.data.message);
"InvoiceApply_get_SetInvoiceApply_V2", }
this.msg, },
res => { err => {}
if (res.data.resultCode == 1) { );
this.$message.success(res.data.message); },
let path = this.msg.InvoiceApplyType == 1 ? 'groupTourOrder' : 'VisaProductEditOrder' getAccountList: function () {
setTimeout(() => { //获取账户类型对应下的账户列表
this.$router.push({ this.apipost(
name: path "FinancialInstitutions_post_GetALLAccountList", {
TypeId: 3
},
res => {
if (res.data.resultCode == 1) {
let data = res.data.data;
data.forEach(x => {
x.allName = `${x.Alias}-${x.BackNo}`;
}); });
}, 1000); this.accountList = data;
} else { }
this.$message.error(res.data.message); },
} err => {}
}, );
err => {} },
); getOrderDetail: function () {
}, // 获取订单详情
getAccountList: function() { let OrderResource = 8; //团队订单
//获取账户类型对应下的账户列表 if (this.msg.InvoiceApplyType != 1) {
this.apipost( OrderResource = 10; //签证订单
"FinancialInstitutions_post_GetALLAccountList", }
{ TypeId: 3 }, this.apipost(
res => { "InvoiceApply_get_GetOrderFinanceList", {
if (res.data.resultCode == 1) { OrderId: this.msg.OrderId,
let data = res.data.data; OrderResource: OrderResource,
data.forEach(x => { IsTravelMoney: 1
x.allName = `${x.Alias}-${x.BackNo}`; },
}); res => {
this.accountList = data; if (res.data.resultCode == 1) {
} this.orderList = res.data.data;
}, }
err => {} },
); err => {}
}, );
getOrderDetail: function() { },
// 获取订单详情 getCustomerInvoiceList: function () {
let OrderResource = this.msg.InvoiceApplyType==1 ? 8 : 10 // 根据客户id 获取对应发票信息
this.apipost( this.apipost(
"InvoiceApply_get_GetOrderFinanceList", "InvoiceApply_get_GetCustomerInvoiceList", {
{ OrderId: this.msg.OrderId, OrderResource: OrderResource, IsTravelMoney: 1 }, CustomerID: this.msg.CustomerId
res => { },
if (res.data.resultCode == 1) { res => {
this.orderList = res.data.data; if (res.data.resultCode == 1) {
} this.CustomerList = res.data.data;
}, }
err => {} },
); null
}, );
getCustomerInvoiceList: function() { },
// 根据客户id 获取对应发票信息 getDetail: function (id) { // 获取详情
this.apipost( this.apipost('InvoiceApply_get_GetDetails', {
"InvoiceApply_get_GetCustomerInvoiceList", ID: id,
{ CustomerID: this.msg.CustomerId }, InvoiceApplyType: this.msg.InvoiceApplyType
res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CustomerList = res.data.data; let detail = res.data.data
} this.isChang = 2
}, this.msg.DutyParagraph = detail.DutyParagraph;
null this.msg.CompanyName = detail.CompanyName;
); this.msg.Address = detail.Address;
}, this.msg.BankNo = detail.BankNo;
getDetail: function (id) { // 获取详情 this.msg.CompanyPhone = detail.CompanyPhone;
let InvoiceApplyType = this.$route.query.InvoiceApplyType ? this.$route.query.InvoiceApplyType : 1 this.msg.OpeningBank = detail.OpeningBank;
this.apipost('InvoiceApply_get_GetDetails', {ID: id, InvoiceApplyType: InvoiceApplyType}, res=>{ this.msg.ApplyMoney = detail.ApplyMoney;
if (res.data.resultCode == 1) { if (detail.ApplyPics && detail.ApplyPics.length > 0) {
let detail = res.data.data detail.ApplyPics.forEach(x => {
this.isChang = 2 this.saveMsg.push({
this.msg.DutyParagraph = detail.DutyParagraph; Content: x.Url,
this.msg.CompanyName = detail.CompanyName; Type: x.Type,
this.msg.Address = detail.Address; Url: x.Url
this.msg.BankNo = detail.BankNo; });
this.msg.CompanyPhone = detail.CompanyPhone; })
this.msg.OpeningBank = detail.OpeningBank; }
this.msg.ApplyMoney = detail.ApplyMoney; this.getOrderDetail();
if(detail.ApplyPics && detail.ApplyPics.length>0){
detail.ApplyPics.forEach(x=>{
this.saveMsg.push({
Content: x.Url,
Type: x.Type,
Url: x.Url
});
})
} }
this.getOrderDetail(); this.loading = false
} }, null)
this.loading = false },
}, null)
}, },
}, mounted() {
mounted() { let userInfo = this.getLocalStorage();
let userInfo = this.getLocalStorage(); this.DepartName = userInfo.DepartName;
this.DepartName = userInfo.DepartName; this.emName = userInfo.emName;
this.emName = userInfo.emName; 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; if (this.$route.query.InvoiceApplyType) {
this.msg.InvoiceApplyType = this.$route.query.InvoiceApplyType ? this.$route.query.InvoiceApplyType : 1 this.msg.InvoiceApplyType = this.$route.query.InvoiceApplyType;
this.getAccountList(); }
this.getOrderDetail(); this.getAccountList();
this.getCustomerInvoiceList(); this.getOrderDetail();
if (this.$route.query.edit) { this.getCustomerInvoiceList();
this.msg.ID = this.$route.query.id if (this.$route.query.edit) {
this.getDetail(this.$route.query.id) this.msg.ID = 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