常熟吴彦祖 1 month ago
parent
commit
fa19333f2e
  1. 25
      src/views/modules/order/poOrder.vue

25
src/views/modules/order/poOrder.vue

@ -25,11 +25,13 @@
</el-form> </el-form>
<el-table <el-table
ref="poTable"
:height="height" :height="height"
:data="dataList" :data="dataList"
border border
highlight-current-row highlight-current-row
style="width: 100%;">
style="width: 100%;"
@current-change="onTableCurrentChange">
<el-table-column <el-table-column
v-for="(item, index) in visibleColumns" v-for="(item, index) in visibleColumns"
:key="item.serialNumber || index" :key="item.serialNumber || index"
@ -42,9 +44,12 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 编辑态customEditColumnProps 中的列走自定义分支其余走默认 select/num/text - rqrq -->
<template v-if="editMode && item.editAble && (1!=1)">
<!-- rqrq 自定义编辑在下面增加 <template v-if="item.columnProp === 'xxx'">...</template>变更后 onCellChange(scope.row) -->
<template v-if="item.columnProp==='XXX'">
<span style="color: #c0c4cc"></span>
</template>
<template v-else-if="item.columnProp==='XXXX'">
<span style="color: #c0c4cc"></span> <span style="color: #c0c4cc"></span>
</template> </template>
<template v-else-if="editMode && item.editAble"> <template v-else-if="editMode && item.editAble">
@ -165,6 +170,8 @@ export default {
* 示例['mPlanner', 'comments'] * 示例['mPlanner', 'comments']
*/ */
customEditColumnProps: [], customEditColumnProps: [],
currentRow: null,
// select selectOptionsKey selectOptions - rqrq // select selectOptionsKey selectOptions - rqrq
columnSelectOptions: { columnSelectOptions: {
poStatusOptions: [ poStatusOptions: [
@ -1122,6 +1129,16 @@ export default {
}) })
}, },
methods: { methods: {
/**
* 表格当前行变化将选中行深拷贝到 currentRow取消选中时为 null - rqrq
*/
onTableCurrentChange (row) {
if (!row) {
this.currentRow = null
return
}
this.currentRow = row
},
/** /**
* 解析列对应的下拉选项优先列上 selectOptions其次 columnSelectOptions[selectOptionsKey] * 解析列对应的下拉选项优先列上 selectOptions其次 columnSelectOptions[selectOptionsKey]

Loading…
Cancel
Save