<template> <div class="review"> <div class="review-inputs"> 供应商编号 <el-input style="width: 200px" placeholder="请输入编号" v-model="selectInfo.supplierCode" clearable class="review-input"> </el-input> 供应商名称 <el-input style="width: 200px" placeholder="请输入供应商名称" v-model="selectInfo.supplierName" clearable class="review-input"> </el-input> 录库评审结果 <el-select v-model="selectInfo.inputReviewResultName" class="review-select" filterable placeholder="请选择结果" style="width: 200px"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> <div class="review-btns"> <el-button type="primary" class="review-button" @click="selectData">查询</el-button> <el-button type="primary" class="el-icon-refresh-right" @click="reset">重置</el-button> </div> </div> <div class="review-table"> <el-table :data="tableData.rows" :row-class-name="tableRowClassName" :header-cell-style="{ 'text-align': 'center', background: '#2483b3', color: 'white', }" :row-style="{ 'text-align': 'center' }" style="width: 100%"> <el-table-column type="index" label="序号" width="180"> </el-table-column> <el-table-column prop="supplierCode" label="供应商编号" width="180"> </el-table-column> <el-table-column prop="supplierName" label="供应商名称"> </el-table-column> <el-table-column prop="supplierStatusName" label="供应商状态"> </el-table-column> <el-table-column prop="inputReviewResultName" label="录库评审结果"> </el-table-column> <el-table-column prop="inputReviewIllustration" label="录库评审说明"> </el-table-column> <el-table-column prop="inputReviewDate" label="录库评审日期"> </el-table-column> <el-table-column header-align="center" align="center" fixed="right" label="操作"> <template slot-scope="scope"> <el-button type="text" size="small" @click="hitstoryDialog(scope.row)">历史评审</el-button> <el-button type="text" size="small" @click="reviewDialogClick">录库评审</el-button> </template> </el-table-column> </el-table> <group-page :limit="limit" :total="total" :offset="offset" :count="tableData.total" @setOffset="setOffset" @setLimit="setLimit" v-model="isFristPage" /> </div> <historyReviewDialog v-if="isShowHistoryDialog" @close="riviewHistoryDialogClose" :dataInfo="dataInfo"> </historyReviewDialog> <riviewDialog v-if="isShowDialog" @close="riviewDialogClose"></riviewDialog> </div> </template> <script> import GroupPage from '../../components/mycomponent/groupPage.vue'; import riviewDialog from '../../components/mycomponent/dialog/reviewDialog.vue' import historyReviewDialog from '../../components/mycomponent/dialog/historyReviewDialog.vue'; import { r_list } from '../../api/supplier/supplier' import { tableRowClassName } from "../../utils/myUtils/changeTableTr"; import { listMixin } from '../../utils/myUtils/mixins/listPage' export default { mixins: [listMixin], // 加入分页逻辑 components: { historyReviewDialog, riviewDialog, GroupPage }, data () { return { dataInfo: {}, isShowHistoryDialog: false, isShowDialog: false, selectInfo: { supplierCode: '', supplierName: '', inputReviewResultName: '' }, options: [ { label: '预审通过', value: '预审通过' }, { label: '预审不通过', value: '预审不通过' } ], } }, mounted () { }, methods: { tableRowClassName: tableRowClassName, hitstoryDialog (row) { console.log(row) this.dataInfo = row this.isShowHistoryDialog = true }, riviewHistoryDialogClose () { this.isShowHistoryDialog = false }, riviewDialogClose () { this.isShowDialog = false }, reviewDialogClick () { this.isShowDialog = true }, getListPage (limit, offset) { r_list(`limit=${limit}&offset=${offset}`, this.queryInfo).then(res => { console.log(res) this.tableData = res }) }, reset () { this.selectInfo = { // 搜索框中的数据的数据 supplierCode: '', supplierName: '', inputReviewResultName: '' } } } } </script> <style lang="scss"> .review { position: relative; width: 100%; min-height: 700px; height: 223px; overflow: auto; } .review-inputs { position: relative; .review-input { margin: 0 1rem 0 0.5rem; } .review-select { margin: 0 4rem 0 0.5rem; } .review-btns { position: absolute; right: 0; top: 0; .review-button { margin-right: 1rem; } } } .review-table { margin-top: 20px; } </style>