|
@@ -6,7 +6,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button @click="getDataList()">查询</el-button>
|
|
|
- <el-button type="primary" @click="test()">导出Excel</el-button>
|
|
|
+ <el-button type="primary" @click="exportExcel()">导出Excel</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table
|
|
@@ -180,6 +180,19 @@
|
|
|
this.dataListLoading = false
|
|
|
})
|
|
|
},
|
|
|
+ exportExcel () {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/biz-service/stock-mg-ctl/exportedExcel'),
|
|
|
+ method: 'get',
|
|
|
+ params: this.$http.adornParams({
|
|
|
+ 'materialName': this.dataForm.materialName
|
|
|
+ })
|
|
|
+ }).then(({data}) => {
|
|
|
+ if (data && data.code !== '200') {
|
|
|
+ this.$message.error(data.msg || '系统错误,请联系管理员')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 每页数
|
|
|
sizeChangeHandle (val) {
|
|
|
this.pageSize = val
|