|
@@ -260,8 +260,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script type="text/javascript">
|
|
|
-import CsvExportor from "csv-exportor";
|
|
|
-import XLSX from "xlsx";
|
|
|
+import CsvExportor from 'csv-exportor';
|
|
|
+import XLSX from 'xlsx';
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
@@ -272,12 +272,12 @@ import XLSX from "xlsx";
|
|
|
plateNum: ''
|
|
|
},
|
|
|
invoiceStatusA: [
|
|
|
- {"label": "待开票", "value": "1"},
|
|
|
- {"label": "开票中", "value": "2"},
|
|
|
- {"label": "开票完成", "value": "3"}
|
|
|
+ {'label': '待开票', 'value': '1'},
|
|
|
+ {'label': '开票中', 'value': '2'},
|
|
|
+ {'label': '开票完成', 'value': '3'}
|
|
|
],
|
|
|
formUserList: {
|
|
|
- "file": ""
|
|
|
+ 'file': ''
|
|
|
},
|
|
|
invoiceTable: [],
|
|
|
hightt: '0px',
|
|
@@ -411,8 +411,8 @@ import XLSX from "xlsx";
|
|
|
// 批量上传模板信息
|
|
|
async batchUpload() {
|
|
|
const isLt50M = this.formUserList.file.size / 1024 / 1024 < 50;
|
|
|
- let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf(".")).toLowerCase();
|
|
|
- let AllUpExt = ".xlsx";
|
|
|
+ let extName = this.formUserList.file.name.substring(this.formUserList.file.name.lastIndexOf('.')).toLowerCase();
|
|
|
+ let AllUpExt = '.xlsx';
|
|
|
if (extName !== AllUpExt) {
|
|
|
this.$message.error('格式错误!请重新选择');
|
|
|
return false;
|
|
@@ -456,7 +456,7 @@ import XLSX from "xlsx";
|
|
|
var replaceTemp = [];
|
|
|
|
|
|
for(var i in sheet) {
|
|
|
- if(sheet[i]['v'] === '交易金额' || sheet[i]['v'] === "价税合计" || sheet[i]['v'] === "税额" || sheet[i]['v'] === "金额" || sheet[i]['v'] === "税率") {
|
|
|
+ if(sheet[i]['v'] === '交易金额' || sheet[i]['v'] === '价税合计' || sheet[i]['v'] === '税额' || sheet[i]['v'] === '金额' || sheet[i]['v'] === '税率') {
|
|
|
replaceTemp.push(i.replace(/[0-9]/g, ''));
|
|
|
continue;
|
|
|
}
|
|
@@ -533,35 +533,35 @@ import XLSX from "xlsx";
|
|
|
let year = time.getFullYear();
|
|
|
let month = time.getMonth() + 1;
|
|
|
let day = time.getDate();
|
|
|
- let name = "无车发票查询列表_"+year + "" + month + "" + day;
|
|
|
+ let name = '无车发票查询列表_'+year + '' + month + '' + day;
|
|
|
let cloums = [
|
|
|
- {"title": "企业编号", "key": "companyNum"},
|
|
|
- {"title": "公司名称", "key": "buyerName"},
|
|
|
- {"title": "运单号", "key": "waybillNum"},
|
|
|
- {"title": "购方税号", "key": "buyerTaxpayerCode"},
|
|
|
- {"title": "车牌号码", "key": "plateNum"},
|
|
|
- {"title": "运单开始时间", "key": "waybillStartTime"},
|
|
|
- {"title": "运单结束时间", "key": "waybillEndTime"},
|
|
|
- {"title": "销方税号", "key": "sellerTaxpayerCode"},
|
|
|
- {"title": "销方名称", "key": "sellerName"},
|
|
|
- {"title": "入口收费站", "key": "enStation"},
|
|
|
- {"title": "出口收费站", "key": "exStation"},
|
|
|
- {"title": "发票代码", "key": "invoiceCode"},
|
|
|
- {"title": "发票号码", "key": "invoiceNum"},
|
|
|
- {"title": "交易Id", "key": "transactionId"},
|
|
|
- {"title": "开票时间", "key": "invoiceMakeTime"},
|
|
|
- {"title": "交易时间", "key": "exTime"},
|
|
|
- {"title": "交易金额(元)", "key": "fee"},
|
|
|
- {"title": "价税合计(元)", "key": "totalAmount"},
|
|
|
- {"title": "税额(元)", "key": "totalTaxAmount"},
|
|
|
- {"title": "金额(元)", "key": "amount"},
|
|
|
- {"title": "税率", "key": "taxRate"},
|
|
|
- {"title": "扣费时间", "key": "calculateTime"},
|
|
|
- {"title": "运单状态", "key": "billStatus"},
|
|
|
- {"title": "发票状态", "key": "invoiceStatus"},
|
|
|
- {"title": "发票状态信息", "key": "msg"},
|
|
|
- {"title": "预览地址", "key": "invoiceHtmlUrl"},
|
|
|
- {"title": "下载地址", "key": "invoiceUrl"}
|
|
|
+ {'title': '企业编号', 'key': 'companyNum'},
|
|
|
+ {'title': '公司名称', 'key': 'buyerName'},
|
|
|
+ {'title': '运单号', 'key': 'waybillNum'},
|
|
|
+ {'title': '购方税号', 'key': 'buyerTaxpayerCode'},
|
|
|
+ {'title': '车牌号码', 'key': 'plateNum'},
|
|
|
+ {'title': '运单开始时间', 'key': 'waybillStartTime'},
|
|
|
+ {'title': '运单结束时间', 'key': 'waybillEndTime'},
|
|
|
+ {'title': '销方税号', 'key': 'sellerTaxpayerCode'},
|
|
|
+ {'title': '销方名称', 'key': 'sellerName'},
|
|
|
+ {'title': '入口收费站', 'key': 'enStation'},
|
|
|
+ {'title': '出口收费站', 'key': 'exStation'},
|
|
|
+ {'title': '发票代码', 'key': 'invoiceCode'},
|
|
|
+ {'title': '发票号码', 'key': 'invoiceNum'},
|
|
|
+ {'title': '交易Id', 'key': 'transactionId'},
|
|
|
+ {'title': '开票时间', 'key': 'invoiceMakeTime'},
|
|
|
+ {'title': '交易时间', 'key': 'exTime'},
|
|
|
+ {'title': '交易金额(元)', 'key': 'fee'},
|
|
|
+ {'title': '价税合计(元)', 'key': 'totalAmount'},
|
|
|
+ {'title': '税额(元)', 'key': 'totalTaxAmount'},
|
|
|
+ {'title': '金额(元)', 'key': 'amount'},
|
|
|
+ {'title': '税率', 'key': 'taxRate'},
|
|
|
+ {'title': '扣费时间', 'key': 'calculateTime'},
|
|
|
+ {'title': '运单状态', 'key': 'billStatus'},
|
|
|
+ {'title': '发票状态', 'key': 'invoiceStatus'},
|
|
|
+ {'title': '发票状态信息', 'key': 'msg'},
|
|
|
+ {'title': '预览地址', 'key': 'invoiceHtmlUrl'},
|
|
|
+ {'title': '下载地址', 'key': 'invoiceUrl'}
|
|
|
];
|
|
|
this.exportExcelComm(cloums, recodes, name, loading)
|
|
|
},
|
|
@@ -569,25 +569,25 @@ import XLSX from "xlsx";
|
|
|
return jsonData.map(v => filterVal.map((j) => { // eslint-disable-line
|
|
|
if(j === 'billStatus'){
|
|
|
if(v[j] === 1){
|
|
|
- return "未结束";
|
|
|
+ return '未结束';
|
|
|
} else if(v[j] === -2){
|
|
|
- return "上传失败";
|
|
|
+ return '上传失败';
|
|
|
}else if(v[j] === -3){
|
|
|
- return "指令结束上传失败";
|
|
|
+ return '指令结束上传失败';
|
|
|
}else if(v[j] === 2){
|
|
|
- return "开票中";
|
|
|
+ return '开票中';
|
|
|
}else if(v[j] === 3){
|
|
|
- return "开票完成";
|
|
|
+ return '开票完成';
|
|
|
}else {
|
|
|
- return "超时运单";
|
|
|
+ return '超时运单';
|
|
|
}
|
|
|
} else if(j === 'invoiceStatus'){
|
|
|
if(v[j] === 1){
|
|
|
- return "待开票";
|
|
|
+ return '待开票';
|
|
|
} else if(v[j] === 2){
|
|
|
- return "开票中";
|
|
|
+ return '开票中';
|
|
|
}else{
|
|
|
- return "开票完成";
|
|
|
+ return '开票完成';
|
|
|
}
|
|
|
}else if(j ==='fee'){
|
|
|
return v[j]/100;
|
|
@@ -614,7 +614,7 @@ import XLSX from "xlsx";
|
|
|
});
|
|
|
const data = this.formatJson(filterVal, list);
|
|
|
data.unshift(tHeader);
|
|
|
- CsvExportor.downloadCsv(data, { tHeader }, excelName+".csv");
|
|
|
+ CsvExportor.downloadCsv(data, { tHeader }, excelName+'.csv');
|
|
|
loading.close();
|
|
|
}
|
|
|
}
|