This commit is contained in:
jiangfuzhuang
2020-02-11 10:11:08 +08:00
parent ac32df04d7
commit 06506ad5d9
5 changed files with 109 additions and 4 deletions

View File

@@ -7,6 +7,7 @@
<!-- <el-input v-model="materialSpec" placeholder="物料规格" size="small" style="margin-bottom: 10px; width: 120px;" clearable/>-->
<!-- <el-input v-model="materialModel" placeholder="物料型号" size="small" style="margin-bottom: 10px; width: 120px;" clearable/>-->
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 10px" @click="pageCurrent=1;pageSize=30;searchMaterial()">查询</el-button>
<el-button type="success" plain size="small" @click="exportExcel()">导出</el-button>
<!-- <el-button type="primary" icon="el-icon-edit" size="small" @click="addMaterial()">新增</el-button>-->
</el-row>
</div>
@@ -190,6 +191,23 @@ export default {
this.searchMaterial()
},
methods: {
// EXCEL 导出
// 姜福壮
exportExcel() {
let check1, check2, check3
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
var param = []
param[0] = ['物料名称_check', check1]
param[1] = ['物料名称', this.materialName]
param[2] = ['物料规格_check', check2]
param[3] = ['物料规格', this.materialSpec]
param[4] = ['物料型号_check', check3]
param[5] = ['物料型号', this.materialModel]
var Data = this.CreateData('00', '报表_采购部仓库_库存_查询', param)
this.exportExcel_NPOI(Data)
},
// 初始化数据
initData() {
const param = {