From d4c92a016b3148f8e24741ff032cf4df1e1aa46c Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Sun, 26 May 2024 23:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=8D=95=E6=8D=AE=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E8=A1=8C=E7=9A=84=E6=97=B6=E5=80=99=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=BE=80=E4=B8=8B=E6=BB=9A=E5=8A=A8=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/views/bill/mixins/BillModalMixin.js | 5 +++++ .../src/views/financial/mixins/FinancialModalMixin.js | 8 ++++++++ jshERP-web/src/views/financial/modules/AdvanceInModal.vue | 1 + jshERP-web/src/views/financial/modules/GiroModal.vue | 1 + jshERP-web/src/views/financial/modules/ItemInModal.vue | 1 + jshERP-web/src/views/financial/modules/ItemOutModal.vue | 1 + 6 files changed, 17 insertions(+) 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" />