给财务的收款单和付款单增加勾选删除明细的功能

This commit is contained in:
jishenghua
2025-05-21 22:45:22 +08:00
parent bb42839130
commit 2b7c43c3e1
3 changed files with 67 additions and 61 deletions

View File

@@ -252,6 +252,11 @@ export const FinancialModalMixin = {
that.$refs.accountDataTable.resetScrollTop((target.rows.length+1)*that.$refs.accountDataTable.rowHeight)
},1000)
},
//删除一行或多行的时候触发
onDeleted(ids, target) {
target.recalcAllStatisticsColumns()
this.autoChangeAmount(target)
},
//单元值改变一个字符就触发一次
onValueChange(event) {
let that = this

View File

@@ -64,22 +64,6 @@
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="12" :md="12" :sm="24">
<!-- 操作按钮 -->
<div class="action-button">
<a-button type="primary" icon="plus" @click="handleClickAdd">选择单据</a-button>
<span class="gap"></span>
<a-button type="primary" icon="plus" @click="selectBeginNeed('客户')">选择期初</a-button>
<span class="gap"></span>
<a-button icon="link" @click="handleWaitNeed('客户')">待收款</a-button>
<span class="gap"></span>
<a-button icon="minus" @click="handleClear">清空</a-button>
</div>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :span="24">
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
@@ -88,11 +72,29 @@
:minWidth="minWidth"
:maxHeight="300"
:rowNumber="true"
:rowSelection="false"
:rowSelection="true"
:actionButton="false"
@valueChange="onValueChange" />
:actionDeleteButton="true"
@deleted="onDeleted"
@valueChange="onValueChange">
<template #buttonBefore>
<a-row :gutter="24" style="float:left;padding-bottom:8px;">
<a-col :md="12" :sm="24">
<a-button type="primary" icon="plus" @click="handleClickAdd">选择单据</a-button>
</a-col>
<a-col :md="12" :sm="24" style="padding-left:0">
<a-button type="primary" icon="plus" @click="selectBeginNeed('客户')">选择期初</a-button>
</a-col>
</a-row>
</template>
<template #buttonAfter>
<a-row :gutter="24" style="float:left;padding-bottom:8px;">
<a-col :md="12" :sm="24">
<a-button icon="link" @click="handleWaitNeed('客户')">待收款</a-button>
</a-col>
</a-row>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">
@@ -302,9 +304,6 @@
} else {
this.$message.warning('请选择客户!');
}
},
handleClear() {
this.accountTable.dataSource = []
}
}
}

View File

@@ -64,22 +64,6 @@
</a-form-item>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :lg="12" :md="12" :sm="24">
<!-- 操作按钮 -->
<div class="action-button">
<a-button type="primary" icon="plus" @click="handleClickAdd">选择单据</a-button>
<span class="gap"></span>
<a-button type="primary" icon="plus" @click="selectBeginNeed('供应商')">选择期初</a-button>
<span class="gap"></span>
<a-button icon="link" @click="handleWaitNeed('供应商')">待付款</a-button>
<span class="gap"></span>
<a-button icon="minus" @click="handleClear">清空</a-button>
</div>
</a-col>
</a-row>
<a-row class="form-row" :gutter="24">
<a-col :span="24">
<j-editable-table
:ref="refKeys[0]"
:loading="accountTable.loading"
@@ -88,11 +72,29 @@
:minWidth="minWidth"
:maxHeight="300"
:rowNumber="true"
:rowSelection="false"
:rowSelection="true"
:actionButton="false"
@valueChange="onValueChange" />
:actionDeleteButton="true"
@deleted="onDeleted"
@valueChange="onValueChange">
<template #buttonBefore>
<a-row :gutter="24" style="float:left;padding-bottom:8px;">
<a-col :md="12" :sm="24">
<a-button type="primary" icon="plus" @click="handleClickAdd">选择单据</a-button>
</a-col>
<a-col :md="12" :sm="24" style="padding-left:0">
<a-button type="primary" icon="plus" @click="selectBeginNeed('供应商')">选择期初</a-button>
</a-col>
</a-row>
</template>
<template #buttonAfter>
<a-row :gutter="24" style="float:left;padding-bottom:8px;">
<a-col :md="12" :sm="24">
<a-button icon="link" @click="handleWaitNeed('供应商')">待付款</a-button>
</a-col>
</a-row>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="{xs: { span: 24 },sm: { span: 24 }}" label="">