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