diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index f7b71a2c..0c98a31f 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -373,8 +373,13 @@ export const BillModalMixin = { this.close() }, onAdded(event) { + let that = this const { row, target } = event target.setValues([{rowKey: row.id, values: {operNumber:0}}]) + //自动下滑到最后一行 + setTimeout(function(){ + that.$refs.materialDataTable.resetScrollTop((target.rows.length+1)*that.$refs.materialDataTable.rowHeight) + },1000) if(this.currentSelectDepotId) { //如果单据选择过仓库,则直接从当前选择的仓库加载 target.setValues([{rowKey: row.id, values: {depotId: this.currentSelectDepotId}}]) diff --git a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js index e6feeef7..77ae8ef4 100644 --- a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js +++ b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js @@ -206,6 +206,14 @@ export const FinancialModalMixin = { workflowModalFormOk() { this.close() }, + onAdded(event) { + let that = this + const { row, target } = event + //自动下滑到最后一行 + setTimeout(function(){ + that.$refs.accountDataTable.resetScrollTop((target.rows.length+1)*that.$refs.accountDataTable.rowHeight) + },1000) + }, //单元值改变一个字符就触发一次 onValueChange(event) { let that = this diff --git a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue index 27d002fc..53c0bf90 100644 --- a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue +++ b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue @@ -66,6 +66,7 @@ :rowNumber="true" :rowSelection="true" :actionButton="true" + @added="onAdded" @valueChange="onValueChange" /> diff --git a/jshERP-web/src/views/financial/modules/GiroModal.vue b/jshERP-web/src/views/financial/modules/GiroModal.vue index ff6b8221..16e993f5 100644 --- a/jshERP-web/src/views/financial/modules/GiroModal.vue +++ b/jshERP-web/src/views/financial/modules/GiroModal.vue @@ -58,6 +58,7 @@ :rowNumber="true" :rowSelection="true" :actionButton="true" + @added="onAdded" @valueChange="onValueChange" /> diff --git a/jshERP-web/src/views/financial/modules/ItemInModal.vue b/jshERP-web/src/views/financial/modules/ItemInModal.vue index 8ccef2c5..5cb94245 100644 --- a/jshERP-web/src/views/financial/modules/ItemInModal.vue +++ b/jshERP-web/src/views/financial/modules/ItemInModal.vue @@ -66,6 +66,7 @@ :rowNumber="true" :rowSelection="true" :actionButton="true" + @added="onAdded" @valueChange="onValueChange" /> diff --git a/jshERP-web/src/views/financial/modules/ItemOutModal.vue b/jshERP-web/src/views/financial/modules/ItemOutModal.vue index bab09fb4..f73c49e5 100644 --- a/jshERP-web/src/views/financial/modules/ItemOutModal.vue +++ b/jshERP-web/src/views/financial/modules/ItemOutModal.vue @@ -66,6 +66,7 @@ :rowNumber="true" :rowSelection="true" :actionButton="true" + @added="onAdded" @valueChange="onValueChange" />