Browse Source

feat(supplier): 添加供应商采购回复历史列表行选择功能

- 在el-table组件中添加@current-change事件监听器
- 实现handleCurrentChange方法处理行选择变化
- 添加当前行重复选择的判断逻辑避免重复触发
- 集成changeData方法用于处理选中行数据变更
master
qiankanghui 2 weeks ago
parent
commit
961cd69593
  1. 8
      src/views/modules/supplier/supPurReplyHistList.vue

8
src/views/modules/supplier/supPurReplyHistList.vue

@ -45,7 +45,7 @@
</el-form> </el-form>
<!-- 列表 --> <!-- 列表 -->
<el-table :data="dataList" :height="height" border ref="mainTable" highlight-current-row v-loading="loading" style="width:100%" stripe>
<el-table :data="dataList" :height="height" border ref="mainTable" highlight-current-row v-loading="loading" style="width:100%" stripe @current-change="handleCurrentChange">
<el-table-column fixed="right" :label="'操作'" header-align="center" align="center" width="120"> <el-table-column fixed="right" :label="'操作'" header-align="center" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.status === '已报价'" @click="openDialog(scope.row)">审批 </el-link> <el-link style="cursor: pointer" v-if="scope.row.status === '已报价'" @click="openDialog(scope.row)">审批 </el-link>
@ -728,6 +728,12 @@ export default {
window.removeEventListener('resize', this.calcHeight) window.removeEventListener('resize', this.calcHeight)
}, },
methods: { methods: {
handleCurrentChange(row) {
if (!row) return
// 避免与 getList 里的默认选中重复触发(可选,用 id 判断)
if (this.currentRow && this.currentRow.id === row.id) return
this.changeData(row)
},
formalPartNo(row) { formalPartNo(row) {
return formatFormalPartNo(row) return formatFormalPartNo(row)
}, },

Loading…
Cancel
Save