给单据增加插入行的时候自动往下滚动的功能
This commit is contained in:
@@ -373,8 +373,13 @@ export const BillModalMixin = {
|
|||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
onAdded(event) {
|
onAdded(event) {
|
||||||
|
let that = this
|
||||||
const { row, target } = event
|
const { row, target } = event
|
||||||
target.setValues([{rowKey: row.id, values: {operNumber:0}}])
|
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) {
|
if(this.currentSelectDepotId) {
|
||||||
//如果单据选择过仓库,则直接从当前选择的仓库加载
|
//如果单据选择过仓库,则直接从当前选择的仓库加载
|
||||||
target.setValues([{rowKey: row.id, values: {depotId: this.currentSelectDepotId}}])
|
target.setValues([{rowKey: row.id, values: {depotId: this.currentSelectDepotId}}])
|
||||||
|
|||||||
@@ -206,6 +206,14 @@ export const FinancialModalMixin = {
|
|||||||
workflowModalFormOk() {
|
workflowModalFormOk() {
|
||||||
this.close()
|
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) {
|
onValueChange(event) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
:rowNumber="true"
|
:rowNumber="true"
|
||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true"
|
||||||
|
@added="onAdded"
|
||||||
@valueChange="onValueChange" />
|
@valueChange="onValueChange" />
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
:rowNumber="true"
|
:rowNumber="true"
|
||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true"
|
||||||
|
@added="onAdded"
|
||||||
@valueChange="onValueChange" />
|
@valueChange="onValueChange" />
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
:rowNumber="true"
|
:rowNumber="true"
|
||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true"
|
||||||
|
@added="onAdded"
|
||||||
@valueChange="onValueChange" />
|
@valueChange="onValueChange" />
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
|
|||||||
@@ -66,6 +66,7 @@
|
|||||||
:rowNumber="true"
|
:rowNumber="true"
|
||||||
:rowSelection="true"
|
:rowSelection="true"
|
||||||
:actionButton="true"
|
:actionButton="true"
|
||||||
|
@added="onAdded"
|
||||||
@valueChange="onValueChange" />
|
@valueChange="onValueChange" />
|
||||||
<a-row class="form-row" :gutter="24">
|
<a-row class="form-row" :gutter="24">
|
||||||
<a-col :lg="24" :md="24" :sm="24">
|
<a-col :lg="24" :md="24" :sm="24">
|
||||||
|
|||||||
Reference in New Issue
Block a user