|
@@ -41,7 +41,7 @@
|
|
|
import SecurityCheckHeader from '../components/securityCheckHeader.vue'
|
|
|
import PrintTable from '../components/securityCheckTable.vue'
|
|
|
import SecurityCheckTable from '../components/securityCheckTableWaybill.vue'
|
|
|
-import { waybill } from '@/api/statistics/statistics.js'
|
|
|
+import { waybill, waybilleclex } from '@/api/statistics/statistics.js'
|
|
|
import XLSX from 'xlsx'
|
|
|
import FileSaver from 'file-saver'
|
|
|
export default {
|
|
@@ -190,7 +190,7 @@ export default {
|
|
|
pageNum: '1',
|
|
|
pageSize: '20',
|
|
|
}
|
|
|
- if(queryData){
|
|
|
+ if (queryData) {
|
|
|
this.getData()
|
|
|
this.getPrintData()
|
|
|
}
|
|
@@ -201,8 +201,44 @@ export default {
|
|
|
methods: {
|
|
|
//导出
|
|
|
async exportex() {
|
|
|
- this.downFile()
|
|
|
+ let that = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '是否确认导出',
|
|
|
+ content: '是否确认导出',
|
|
|
+ onOk() {
|
|
|
+ return waybilleclex(this.FormData).then((response) => {
|
|
|
+ that.download(response.msg)
|
|
|
+ that.$message.success('导出成功')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ })
|
|
|
+ // this.downlodTable()
|
|
|
+ },
|
|
|
+ //导出
|
|
|
+ downlodTable() {
|
|
|
+ this.$confirm('是否需要导出xlsx文档, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ // this.downFile()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '导出成功!',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消导出',
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
+ // //导出
|
|
|
+ // async exportex() {
|
|
|
+ // this.downFile()
|
|
|
+ // },
|
|
|
downFile() {
|
|
|
var wb = XLSX.utils.table_to_book(document.querySelector('#table2'))
|
|
|
var wbout = XLSX.write(wb, {
|
|
@@ -237,7 +273,7 @@ export default {
|
|
|
},
|
|
|
searchHandler(arr) {
|
|
|
this.FormData.waybillNo = arr[0]
|
|
|
- if(this.$route.params){
|
|
|
+ if (this.$route.params) {
|
|
|
this.getData()
|
|
|
}
|
|
|
},
|