提交 071fdfba authored 作者: Ras's avatar Ras

在库表件数的更新

上级 9edf0b3f
...@@ -785,6 +785,8 @@ ...@@ -785,6 +785,8 @@
currentEditRows: {}, currentEditRows: {},
// 上次push数据的事件,用于判断是否点击过快 // 上次push数据的事件,用于判断是否点击过快
lastPushTimeMap: new Map(), lastPushTimeMap: new Map(),
// 用于存储rowid和行数据。
rowDic:{},
} }
}, },
...@@ -942,13 +944,12 @@ ...@@ -942,13 +944,12 @@
vm.recalcTrHiddenItem(event.target.scrollTop) vm.recalcTrHiddenItem(event.target.scrollTop)
} }
// 添加事件监听 // 添加事件监听
this.addEventListener() this.addEventListener()
}, },
methods: { methods: {
getElement(id, noCaseId = false) { getElement(id, noCaseId = false) {
if (!this.el[id]) { if (!this.el[id]) {
this.el[id] = document.getElementById((noCaseId ? '' : this.caseId) + id) this.el[id] = document.getElementById((noCaseId ? '' : this.caseId) + id)
...@@ -1093,10 +1094,14 @@ ...@@ -1093,10 +1094,14 @@
} }
let row = { id: dataId } let row = { id: dataId }
let value = { id: dataId } let value = { id: dataId }
//传给父级需要的数据
this.rowDic[dataId] = data
// console.log("rowDic",this.rowDic);
let disabled = false let disabled = false
this.columns.forEach(column => { this.columns.forEach(column => {
if(!this.columnsDic[column.key]) if(!this.columnsDic[column.key])
{ {
this.columnsDic[column.key] = column; this.columnsDic[column.key] = column;
...@@ -1115,8 +1120,18 @@ ...@@ -1115,8 +1120,18 @@
sourceValue = (typeof sourceValue === 'number' || sourceValue) ? sourceValue : defaultValue sourceValue = (typeof sourceValue === 'number' || sourceValue) ? sourceValue : defaultValue
} }
let sourceValueIsEmpty = (sourceValue == null || sourceValue === '') let sourceValueIsEmpty = (sourceValue == null || sourceValue === '')
if (column.type === FormTypes.inputNumber) { if (column.type === FormTypes.inputNumber) {
//值插入前筛选(停用)
// if(this.compareFields !== undefined && this.compareFields.f1 !== undefined && this.compareFields.f2 !== undefined){
// if(column.key === "cases"){
// console.log("refCases:",data[this.compareFields.f1])
// console.log("cases:",data[this.compareFields.f2])
// sourceValue = String(data[this.compareFields.f2] - data[this.compareFields.f1])
// console.log("sourceValue:",sourceValue)
// }
// }
// 判断是否是排序字段,如果是就赋最大值 // 判断是否是排序字段,如果是就赋最大值
if (column.isOrder === true) { if (column.isOrder === true) {
value[column.key] = this.getInputNumberMaxValue(column) + 1 value[column.key] = this.getInputNumberMaxValue(column) + 1
...@@ -1258,6 +1273,8 @@ ...@@ -1258,6 +1273,8 @@
this.forceUpdateFormValues() this.forceUpdateFormValues()
}) })
} }
//当页面加载完成后,回调当前整个对象“this”到父组件iostReceivingFormR,进行数据再次更新
this.$emit('afterEntryMounted', this)
return rows return rows
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论