| | |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="medium" @click="exportExcel">导 出</el-button> |
| | | <!-- <el-button size="medium" @click="exportExcel">导 出</el-button>--> |
| | | <el-button size="medium" type="primary" @click="showDialog('add')">新 增</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <form-dia ref="formDia" v-if="formDia" @closeDia="closeDia"></form-dia> |
| | | </div> |
| | |
| | | async getTableData() { |
| | | this.tableLoading = true; |
| | | selectQualifiedSupplierManagementPage(this.searchForm).then(res => { |
| | | this.tableLoading = false; |
| | | if(res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total |
| | | } |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // 重置 |
| | | resetSearchForm () { |
| | | resetSearchForm() { |
| | | this.pagination.current = 1 |
| | | this.pagination.pageSize = 20 |
| | | this.searchForm.supplierName = '' |
| | |
| | | }) |
| | | }, |
| | | // 关闭弹框 |
| | | closeDia () { |
| | | closeDia() { |
| | | this.formDia = false |
| | | this.getTableData() |
| | | }, |
| | | // 删除记录 |
| | | deleteRow (row) { |
| | | deleteRow(row) { |
| | | this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delSupplierManagement({supplierManagementId:row.supplierManagementId}).then(res => { |
| | | delSupplierManagement({ supplierManagementId: row.supplierManagementId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('删除成功!') |
| | | this.getTableData() |
| | |
| | | }, |
| | | // 导出excel |
| | | async exportExcel() { |
| | | exportSupplierManagement({deviceId:this.clickNodeVal.value}).then(res => { |
| | | exportSupplierManagement({ deviceId: this.clickNodeVal.value }).then(res => { |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '合格供应商.xlsx') |
| | | this.$message.success('导出成功') |
| | | }) |
| | | } |
| | | }, |