代码更新

This commit is contained in:
2022-10-20 21:14:06 +08:00
parent 910adcfd5b
commit 42e40b2f48
14 changed files with 363 additions and 40 deletions

View File

@@ -64,7 +64,18 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="downdtl"
>
导出Excel
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
ref="table"
@@ -97,6 +108,8 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import {download} from "@/api/data";
import {downloadFile} from "@/utils";
export default {
name: 'Powderorder',
@@ -141,6 +154,24 @@ export default {
},
hand(value) {
this.crud.toQuery()
},
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
const data = {
'begin_time': this.crud.query.createTime[0],
'end_time': this.crud.query.createTime[1],
'status': this.crud.query.status,
'pcsn': this.crud.query.pcsn,
'material_code': this.crud.query.material_code
}
download('/api/powderOrderQuery/download', data).then(result => {
downloadFile(result, '粉料开单记录', 'xlsx')
crud.downloadLoading = false
}).catch(() => {
crud.downloadLoading = false
})
}
}
}
}