<!--资料预审列表--> <template> <div class="inquiry"> <div class="inquiry-inputs"> 供应商编号 <el-input v-model="selectInfo.supplierCode" style="width: 200px" placeholder="请输入编号" clearable class="inquiry-input" /> 供应商名称 <el-input v-model="selectInfo.supplierName" style="width: 200px" placeholder="请输入供应商名称" clearable class="inquiry-input" /> 资料预审结果 <el-select v-model="selectInfo.preReviewResult" class="inquiry-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="inquiry-btns"> <el-button type="primary" class="inquiry-button" @click="selectData"> 查询 </el-button> <el-button type="primary" class="el-icon-refresh-right" @click="reset"> 重置 </el-button> </div> </div> <div class="inquiry-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="preReviewResultName" label="资料预审结果" /> <el-table-column prop="preReviewIllustration" label="资料预审说明" /> <el-table-column prop="preReviewDate" 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="inquiryDialogClick(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> <historyInquiryDialog v-if="isShowHistoryDialog" :data-info="dataInfo" @close="inquiryHistoryDialogClose" /> <inquiryDialog v-if="isShowDialog" :data-info="dataInfo" @close="inquiryDialogClose" /> </div> </template> <script> import GroupPage from '../../components/mycomponent/groupPage.vue' import inquiryDialog from '../../components/mycomponent/dialog/inquiryDialog.vue' import historyInquiryDialog from '../../components/mycomponent/dialog/historyInquiryDialog.vue' import { i_list } from '../../api/supplier/supplier' import { tableRowClassName } from '../../utils/myUtils/changeTableTr' import { listMixin } from '../../utils/myUtils/mixins/listPage' export default { // 加入分页逻辑 components: { historyInquiryDialog, inquiryDialog, GroupPage }, mixins: [listMixin], data() { return { isShowHistoryDialog: false, isShowDialog: false, selectInfo: { supplierCode: '', supplierName: '', preReviewResult: '' }, options: [ { label: '预审通过', value: '预审通过' }, { label: '预审不通过', value: '预审不通过' } ], dataInfo: {}// 传值 } }, mounted() { }, methods: { tableRowClassName: tableRowClassName, hitstoryDialog(row) { console.log(row) this.dataInfo = row this.isShowHistoryDialog = true }, inquiryHistoryDialogClose() { this.isShowHistoryDialog = false }, inquiryDialogClose() { this.isShowDialog = false }, inquiryDialogClick(row) { console.log(row) this.dataInfo = row this.isShowDialog = true }, // 获取列表 getListPage(limit, offset) { i_list(`limit=${limit}&offset=${offset}`, this.queryInfo).then(res => { console.log(res) this.tableData = res }) }, // 重置 reset() { this.selectInfo = { // 搜索框中的数据的数据 supplierCode: '', supplierName: '', preReviewResultName: '' } } } } </script> <style lang="scss"> .inquiry { position: relative; width: 100%; min-height: 700px; height: 223px; overflow: auto; } .inquiry-inputs { position: relative; .inquiry-input { margin: 0 1rem 0 0.5rem; } .inquiry-select { margin: 0 4rem 0 0.5rem; } .inquiry-btns { position: absolute; right: 0; top: 0; .inquiry-button { margin-right: 1rem; } } } .inquiry-table { margin-top: 20px; } </style>