<!--录库评审列表--> <template> <div class="review"> <div class="review-inputs"> 供应商编号 <el-input v-model="selectInfo.supplierCode" style="width: 200px" placeholder="请输入编号" clearable class="review-input" /> 供应商名称 <el-input v-model="selectInfo.supplierName" style="width: 200px" placeholder="请输入供应商名称" clearable class="review-input" /> 录库评审结果 <el-select v-model="selectInfo.inputReviewResult" 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-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 prop="supplierCode" label="供应商编号" width="180" /> <el-table-column prop="supplierName" label="供应商名称" /> <el-table-column prop="supplierStatusName" label="供应商状态" /> <el-table-column prop="inputReviewResultName" label="录库评审结果" /> <el-table-column prop="inputReviewIllustration" label="录库评审说明" /> <el-table-column prop="inputReviewDate" label="录库评审日期" /> <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(scope.row)"> 录库评审 </el-button> </template> </el-table-column> </el-table> <group-page v-model="isFristPage" :limit="limit" :total="total" :offset="offset" :count="tableData.total" @setOffset="setOffset" @setLimit="setLimit" /> </div> <historyReviewDialog v-if="isShowHistoryDialog" :data-info="dataInfo" @close="riviewHistoryDialogClose" /> <riviewDialog v-if="isShowDialog" :data-info="dataInfo" @close="riviewDialogClose" /> </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 { // 加入分页逻辑 components: { historyReviewDialog, riviewDialog, GroupPage }, mixins: [listMixin], data() { return { dataInfo: {}, isShowHistoryDialog: false, isShowDialog: false, selectInfo: { supplierCode: '', supplierName: '', inputReviewResult: '' }, 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(row) { this.dataInfo = row 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>