提交 2753e792 authored 作者: Ras's avatar Ras

仓库货物报表(在库)新增入库列表筛选功能。

上级 da2d02d1
...@@ -707,6 +707,13 @@ ...@@ -707,6 +707,13 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
// 是否一直显示编辑框,如果为false则只有点击的时候才出现输入框
compareFields: {
type: Object,
default() {
return {}
}
},
}, },
data() { data() {
return { return {
...@@ -911,7 +918,7 @@ ...@@ -911,7 +918,7 @@
// 当selectRowIds改变时触发事件 // 当selectRowIds改变时触发事件
selectedRowIds(newValue) { selectedRowIds(newValue) {
this.$emit('selectRowChange', cloneObject(newValue).map(i => this.getCleanId(i))) this.$emit('selectRowChange', cloneObject(newValue).map(i => this.getCleanId(i)))
} },
}, },
mounted() { mounted() {
let vm = this let vm = this
...@@ -1068,7 +1075,14 @@ ...@@ -1068,7 +1075,14 @@
let searchSelectValues = { ...this.searchSelectValues } let searchSelectValues = { ...this.searchSelectValues }
// 禁用行的id // 禁用行的id
let disabledRowIds = (this.disabledRowIds || []) let disabledRowIds = (this.disabledRowIds || [])
dataSource.forEach((data, newValueIndex) => { dataSource.forEach((data, newValueIndex) => {
//根据件数筛选子表数据
if(data[this.compareFields.field1] >= data[this.compareFields.field2]){
return;
}
// 不能直接更改数据源的id // 不能直接更改数据源的id
let dataId = data.id let dataId = data.id
// 判断源数据是否带有id // 判断源数据是否带有id
...@@ -2706,6 +2720,7 @@ ...@@ -2706,6 +2720,7 @@
return !!(current && current[col.key] === true) return !!(current && current[col.key] === true)
}, },
/* ---- 事件监听 ---- */ /* ---- 事件监听 ---- */
// 鼠标弹起事件,用于清空输入状态 // 鼠标弹起事件,用于清空输入状态
...@@ -2770,7 +2785,7 @@ ...@@ -2770,7 +2785,7 @@
}, },
/* --------------------------- 2020年5月18日 默认span模式 ------------------------------ */ /* --------------------------- 2020年5月18日 默认span模式 ------------------------------ */
}, },
beforeDestroy() { beforeDestroy() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论