md
This commit is contained in:
parent
aa267b2815
commit
36bc196756
@ -120,14 +120,23 @@
|
|||||||
<el-table-column :label="$t('发票号')" align="center" prop="invoiceNo" width="100" :show-overflow-tooltip="true" />
|
<el-table-column :label="$t('发票号')" align="center" prop="invoiceNo" width="100" :show-overflow-tooltip="true" />
|
||||||
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.openChStatus=='2'"
|
v-if="scope.row.openChStatus=='2'"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleDownPDF(scope.row)"
|
@click="handleDownPDF(scope.row)"
|
||||||
>下载发票</el-button>
|
>下载发票</el-button> -->
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.invoiceStatus=='2'"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-document-copy"
|
||||||
|
size="mini"
|
||||||
|
@click="handleDownPDF(scope.row,$event)"
|
||||||
|
>复制发票地址</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column :label="$t('qr路径')" align="center" prop="qrPath" width="100" /> -->
|
<!-- <el-table-column :label="$t('qr路径')" align="center" prop="qrPath" width="100" /> -->
|
||||||
@ -274,6 +283,42 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleDownPDF(row) {
|
handleDownPDF(row) {
|
||||||
|
|
||||||
|
let downUrl=row.filePath;
|
||||||
|
if (navigator.clipboard && window.isSecureContext) {
|
||||||
|
// navigator clipboard 向剪贴板写文本
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return navigator.clipboard.writeText(downUrl)
|
||||||
|
} else {
|
||||||
|
// 创建text area
|
||||||
|
const textArea = document.createElement('textarea')
|
||||||
|
textArea.value = downUrl
|
||||||
|
// 使text area不在viewport,同时设置不可见
|
||||||
|
document.body.appendChild(textArea)
|
||||||
|
textArea.focus()
|
||||||
|
textArea.select()
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return new Promise((res, rej) => {
|
||||||
|
// 执行复制命令并移除文本框
|
||||||
|
document.execCommand('copy') ? res() : rej()
|
||||||
|
textArea.remove()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
removeEndChar(str,char, type) {
|
||||||
|
if (char) {
|
||||||
|
if (type == 'left') {
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+', 'g'), '');
|
||||||
|
} else if (type == 'right') {
|
||||||
|
return str.replace(new RegExp('\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+|\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(/^\s+|\s+$/g, '');
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDownPDFOld(row) {
|
||||||
let settleBillName=row.companyName;
|
let settleBillName=row.companyName;
|
||||||
let pdfUrl=row.filePath;
|
let pdfUrl=row.filePath;
|
||||||
let fileName=settleBillName+"-"+row.invoiceNo+".pdf";
|
let fileName=settleBillName+"-"+row.invoiceNo+".pdf";
|
||||||
|
|||||||
@ -81,14 +81,22 @@
|
|||||||
<el-table-column :label="$t('发票号')" align="center" prop="invoiceNo" width="100" :show-overflow-tooltip="true" />
|
<el-table-column :label="$t('发票号')" align="center" prop="invoiceNo" width="100" :show-overflow-tooltip="true" />
|
||||||
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.openChStatus=='2'"
|
v-if="scope.row.openChStatus=='2'"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleDownPDF(scope.row)"
|
@click="handleDownPDF(scope.row)"
|
||||||
>下载发票</el-button>
|
>下载发票</el-button> -->
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.invoiceStatus=='2'"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-document-copy"
|
||||||
|
size="mini"
|
||||||
|
@click="handleDownPDF(scope.row,$event)"
|
||||||
|
>复制发票地址</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column :label="$t('qr路径')" align="center" prop="qrPath" width="100" /> -->
|
<!-- <el-table-column :label="$t('qr路径')" align="center" prop="qrPath" width="100" /> -->
|
||||||
@ -230,8 +238,44 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
handleDownPDF(row) {
|
handleDownPDF(row) {
|
||||||
|
let downUrl=row.filePath;
|
||||||
|
if (navigator.clipboard && window.isSecureContext) {
|
||||||
|
// navigator clipboard 向剪贴板写文本
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return navigator.clipboard.writeText(downUrl)
|
||||||
|
} else {
|
||||||
|
// 创建text area
|
||||||
|
const textArea = document.createElement('textarea')
|
||||||
|
textArea.value = downUrl
|
||||||
|
// 使text area不在viewport,同时设置不可见
|
||||||
|
document.body.appendChild(textArea)
|
||||||
|
textArea.focus()
|
||||||
|
textArea.select()
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return new Promise((res, rej) => {
|
||||||
|
// 执行复制命令并移除文本框
|
||||||
|
document.execCommand('copy') ? res() : rej()
|
||||||
|
textArea.remove()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
removeEndChar(str,char, type) {
|
||||||
|
if (char) {
|
||||||
|
if (type == 'left') {
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+', 'g'), '');
|
||||||
|
} else if (type == 'right') {
|
||||||
|
return str.replace(new RegExp('\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+|\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(/^\s+|\s+$/g, '');
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
handleDownPDFOld(row) {
|
||||||
let settleBillName=row.companyName;
|
let settleBillName=row.companyName;
|
||||||
let pdfUrl=row.filePath;
|
let pdfUrl=row.filePath;
|
||||||
let fileName=settleBillName+"-"+row.invoiceNo+".pdf";
|
let fileName=settleBillName+"-"+row.invoiceNo+".pdf";
|
||||||
|
|||||||
@ -180,14 +180,22 @@
|
|||||||
<el-table-column :label="$t('账单名称')" align="center" prop="settleBillName" min-width="100" :show-overflow-tooltip="true"/>
|
<el-table-column :label="$t('账单名称')" align="center" prop="settleBillName" min-width="100" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.invoiceStatus=='2'"
|
v-if="scope.row.invoiceStatus=='2'"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleDownPDF(scope.row)"
|
@click="handleDownPDF(scope.row)"
|
||||||
>下载发票</el-button>
|
>下载发票</el-button> -->
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.invoiceStatus=='2'"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-document-copy"
|
||||||
|
size="mini"
|
||||||
|
@click="handleDownPDF(scope.row,$event)"
|
||||||
|
>复制发票地址</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('开票状态')" align="center" prop="invoiceStatus" width="100" >
|
<el-table-column :label="$t('开票状态')" align="center" prop="invoiceStatus" width="100" >
|
||||||
@ -434,6 +442,57 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleDownPDF(row) {
|
handleDownPDF(row) {
|
||||||
|
let qParam = {
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:50,
|
||||||
|
applySeqNo: row.applySeqNo,
|
||||||
|
openChStatus:'2'
|
||||||
|
}
|
||||||
|
listEmisSettleInvoiceChRecord(qParam).then(response => {
|
||||||
|
let list = response.rows;
|
||||||
|
if(list&&list.length>0){
|
||||||
|
let downUrl="";
|
||||||
|
list.forEach(item=>{
|
||||||
|
downUrl=downUrl+item.filePath+",";
|
||||||
|
});
|
||||||
|
|
||||||
|
downUrl=this.removeEndChar(downUrl,',','');
|
||||||
|
|
||||||
|
if (navigator.clipboard && window.isSecureContext) {
|
||||||
|
// navigator clipboard 向剪贴板写文本
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return navigator.clipboard.writeText(downUrl)
|
||||||
|
} else {
|
||||||
|
// 创建text area
|
||||||
|
const textArea = document.createElement('textarea')
|
||||||
|
textArea.value = downUrl
|
||||||
|
// 使text area不在viewport,同时设置不可见
|
||||||
|
document.body.appendChild(textArea)
|
||||||
|
textArea.focus()
|
||||||
|
textArea.select()
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return new Promise((res, rej) => {
|
||||||
|
// 执行复制命令并移除文本框
|
||||||
|
document.execCommand('copy') ? res() : rej()
|
||||||
|
textArea.remove()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
removeEndChar(str,char, type) {
|
||||||
|
if (char) {
|
||||||
|
if (type == 'left') {
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+', 'g'), '');
|
||||||
|
} else if (type == 'right') {
|
||||||
|
return str.replace(new RegExp('\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+|\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(/^\s+|\s+$/g, '');
|
||||||
|
},
|
||||||
|
handleDownPDFOld(row) {
|
||||||
let settleBillName=row.settleBillName;
|
let settleBillName=row.settleBillName;
|
||||||
|
|
||||||
let qParam = {
|
let qParam = {
|
||||||
|
|||||||
@ -182,24 +182,17 @@
|
|||||||
<el-table-column :label="$t('账单名称')" align="center" prop="settleBillName" min-width="100" :show-overflow-tooltip="true"/>
|
<el-table-column :label="$t('账单名称')" align="center" prop="settleBillName" min-width="100" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
<el-table-column :label="$t('发票文件')" align="center" prop="filePath" min-width="170" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-button
|
|
||||||
|
<el-button
|
||||||
v-if="scope.row.invoiceStatus=='2'"
|
v-if="scope.row.invoiceStatus=='2'"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-document-copy"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleDownPDF(scope.row)"
|
@click="handleDownPDF(scope.row,$event)"
|
||||||
>下载发票</el-button> -->
|
>复制发票地址</el-button>
|
||||||
<el-link
|
|
||||||
v-if="scope.row.invoiceStatus=='2'"
|
|
||||||
type="primary" style="line-height: 28px;font-size:13px;color:blue" @click="handleDownPDF(scope.row)" >
|
|
||||||
下载发票
|
|
||||||
</el-link>
|
|
||||||
<el-link
|
|
||||||
v-if="scope.row.invoiceStatus=='2'"
|
|
||||||
type="primary" style="line-height: 28px;font-size:13px;color:blue" @click="handleDownPDF(scope.row)" >
|
|
||||||
复制发票地址
|
|
||||||
</el-link>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -284,6 +277,7 @@ import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
|||||||
import emisSettleInvoiceRecordForm from '@/views/emis/emisSettleInvoiceRecord/emisSettleInvoiceRecordForm';
|
import emisSettleInvoiceRecordForm from '@/views/emis/emisSettleInvoiceRecord/emisSettleInvoiceRecordForm';
|
||||||
import { listEmisSettleInvoiceChRecord } from "@/api/emis/emisSettleInvoiceChRecord";
|
import { listEmisSettleInvoiceChRecord } from "@/api/emis/emisSettleInvoiceChRecord";
|
||||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||||
|
import clip from '@/utils/clipboard'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "emisSettleInvoiceRecord",
|
name: "emisSettleInvoiceRecord",
|
||||||
@ -439,7 +433,61 @@ export default {
|
|||||||
this.openForm = true;
|
this.openForm = true;
|
||||||
this.titleForm = "修改";
|
this.titleForm = "修改";
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDownPDF(row) {
|
handleDownPDF(row) {
|
||||||
|
let qParam = {
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:50,
|
||||||
|
applySeqNo: row.applySeqNo,
|
||||||
|
openChStatus:'2'
|
||||||
|
}
|
||||||
|
listEmisSettleInvoiceChRecord(qParam).then(response => {
|
||||||
|
let list = response.rows;
|
||||||
|
if(list&&list.length>0){
|
||||||
|
let downUrl="";
|
||||||
|
list.forEach(item=>{
|
||||||
|
// this.downPdfFile(item.filePath);
|
||||||
|
downUrl=downUrl+item.filePath+",";
|
||||||
|
});
|
||||||
|
|
||||||
|
downUrl=this.removeEndChar(downUrl,',','');
|
||||||
|
|
||||||
|
if (navigator.clipboard && window.isSecureContext) {
|
||||||
|
// navigator clipboard 向剪贴板写文本
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return navigator.clipboard.writeText(downUrl)
|
||||||
|
} else {
|
||||||
|
// 创建text area
|
||||||
|
const textArea = document.createElement('textarea')
|
||||||
|
textArea.value = downUrl
|
||||||
|
// 使text area不在viewport,同时设置不可见
|
||||||
|
document.body.appendChild(textArea)
|
||||||
|
textArea.focus()
|
||||||
|
textArea.select()
|
||||||
|
this.$modal.msgSuccess('复制成功')
|
||||||
|
return new Promise((res, rej) => {
|
||||||
|
// 执行复制命令并移除文本框
|
||||||
|
document.execCommand('copy') ? res() : rej()
|
||||||
|
textArea.remove()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
removeEndChar(str,char, type) {
|
||||||
|
if (char) {
|
||||||
|
if (type == 'left') {
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+', 'g'), '');
|
||||||
|
} else if (type == 'right') {
|
||||||
|
return str.replace(new RegExp('\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(new RegExp('^\\'+char+'+|\\'+char+'+$', 'g'), '');
|
||||||
|
}
|
||||||
|
return str.replace(/^\s+|\s+$/g, '');
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDownPDFOld(row) {
|
||||||
|
|
||||||
let settleBillName=row.settleBillName;
|
let settleBillName=row.settleBillName;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user