基础信息添加模板下载
This commit is contained in:
parent
a26fdfa1c9
commit
a1298819d5
@ -307,6 +307,31 @@ export const JeecgListMixin = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**下载模板 */
|
||||||
|
handleExportTemplate(fileName){
|
||||||
|
if(!fileName || typeof fileName != "string"){
|
||||||
|
fileName = "导出文件"
|
||||||
|
}
|
||||||
|
downFile(this.url.exportTemplate).then((data)=>{
|
||||||
|
if (!data) {
|
||||||
|
this.$message.warning("文件下载失败")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||||
|
window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
|
||||||
|
}else{
|
||||||
|
let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
|
||||||
|
let link = document.createElement('a')
|
||||||
|
link.style.display = 'none'
|
||||||
|
link.href = url
|
||||||
|
link.setAttribute('download', fileName+'.xls')
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link); //下载完成移除元素
|
||||||
|
window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/* 导入 */
|
/* 导入 */
|
||||||
handleImportExcel(info){
|
handleImportExcel(info){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('物流价格基础信息管理')">导出</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('物流价格基础信息管理')">导出</a-button>
|
||||||
|
<a-button type="primary" icon="download" @click="handleExportTemplate('物流价格基础信息管理模板')">下载模板</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
@ -277,6 +278,7 @@
|
|||||||
delete: "/iogisticsprice/tmsIogisticsPrice/delete",
|
delete: "/iogisticsprice/tmsIogisticsPrice/delete",
|
||||||
deleteBatch: "/iogisticsprice/tmsIogisticsPrice/deleteBatch",
|
deleteBatch: "/iogisticsprice/tmsIogisticsPrice/deleteBatch",
|
||||||
exportXlsUrl: "/iogisticsprice/tmsIogisticsPrice/exportXls",
|
exportXlsUrl: "/iogisticsprice/tmsIogisticsPrice/exportXls",
|
||||||
|
exportTemplate: "/iogisticsprice/tmsIogisticsPrice/exportTemplate",
|
||||||
importExcelUrl: "iogisticsprice/tmsIogisticsPrice/importExcel",
|
importExcelUrl: "iogisticsprice/tmsIogisticsPrice/importExcel",
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('物流路线信息维护')">导出</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('物流路线信息维护')">导出</a-button>
|
||||||
|
<a-button type="primary" icon="download" @click="handleExportTemplate('物流路线信息维护模板')">下载模板</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
@ -197,6 +198,7 @@
|
|||||||
delete: "/logisticsroute/logisticsRoute/delete",
|
delete: "/logisticsroute/logisticsRoute/delete",
|
||||||
deleteBatch: "/logisticsroute/logisticsRoute/deleteBatch",
|
deleteBatch: "/logisticsroute/logisticsRoute/deleteBatch",
|
||||||
exportXlsUrl: "/logisticsroute/logisticsRoute/exportXls",
|
exportXlsUrl: "/logisticsroute/logisticsRoute/exportXls",
|
||||||
|
exportTemplate: "/logisticsroute/logisticsRoute/exportTemplate",
|
||||||
importExcelUrl: "logisticsroute/logisticsRoute/importExcel",
|
importExcelUrl: "logisticsroute/logisticsRoute/importExcel",
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('车辆运营商管理')">导出</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('车辆运营商管理')">导出</a-button>
|
||||||
|
<a-button type="primary" icon="download" @click="handleExportTemplate('车辆运营商管理模板')">下载模板</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
@ -180,6 +181,7 @@
|
|||||||
delete: "/vehicleoperator/tmsVehicleOperator/delete",
|
delete: "/vehicleoperator/tmsVehicleOperator/delete",
|
||||||
deleteBatch: "/vehicleoperator/tmsVehicleOperator/deleteBatch",
|
deleteBatch: "/vehicleoperator/tmsVehicleOperator/deleteBatch",
|
||||||
exportXlsUrl: "/vehicleoperator/tmsVehicleOperator/exportXls",
|
exportXlsUrl: "/vehicleoperator/tmsVehicleOperator/exportXls",
|
||||||
|
exportTemplate: "/vehicleoperator/tmsVehicleOperator/exportTemplate",
|
||||||
importExcelUrl: "vehicleoperator/tmsVehicleOperator/importExcel",
|
importExcelUrl: "vehicleoperator/tmsVehicleOperator/importExcel",
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('tms_vehicle_pallet')">导出</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('车型可装托数维护')">导出</a-button>
|
||||||
|
<a-button type="primary" icon="download" @click="handleExportTemplate('车型可装托数维护模板')">下载模板</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
@ -175,6 +176,7 @@
|
|||||||
delete: "/vehiclepallet/vehiclePallet/delete",
|
delete: "/vehiclepallet/vehiclePallet/delete",
|
||||||
deleteBatch: "/vehiclepallet/vehiclePallet/deleteBatch",
|
deleteBatch: "/vehiclepallet/vehiclePallet/deleteBatch",
|
||||||
exportXlsUrl: "/vehiclepallet/vehiclePallet/exportXls",
|
exportXlsUrl: "/vehiclepallet/vehiclePallet/exportXls",
|
||||||
|
exportTemplate: "/vehiclepallet/vehiclePallet/exportTemplate",
|
||||||
importExcelUrl: "vehiclepallet/vehiclePallet/importExcel",
|
importExcelUrl: "vehiclepallet/vehiclePallet/importExcel",
|
||||||
getCarType: "vehiclepallet/vehiclePallet/getCarType",
|
getCarType: "vehiclepallet/vehiclePallet/getCarType",
|
||||||
|
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('product')">导出</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('产品每托支数维护')">导出</a-button>
|
||||||
|
<a-button type="primary" icon="download" @click="handleExportTemplate('产品每托支数维护模板')">下载模板</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
@ -170,6 +171,7 @@
|
|||||||
delete: "/vehicleproduct/tmsVehicleProduct/delete",
|
delete: "/vehicleproduct/tmsVehicleProduct/delete",
|
||||||
deleteBatch: "/vehicleproduct/tmsVehicleProduct/deleteBatch",
|
deleteBatch: "/vehicleproduct/tmsVehicleProduct/deleteBatch",
|
||||||
exportXlsUrl: "/vehicleproduct/tmsVehicleProduct/exportXls",
|
exportXlsUrl: "/vehicleproduct/tmsVehicleProduct/exportXls",
|
||||||
|
exportTemplate: "/vehicleproduct/tmsVehicleProduct/exportTemplate",
|
||||||
importExcelUrl: "vehicleproduct/tmsVehicleProduct/importExcel",
|
importExcelUrl: "vehicleproduct/tmsVehicleProduct/importExcel",
|
||||||
|
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user