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

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) that.$refs.accountDataTable.resetScrollTop((target.rows.length+1)*that.$refs.accountDataTable.rowHeight)
},1000) },1000)
}, },
//删除一行或多行的时候触发
onDeleted(ids, target) {
target.recalcAllStatisticsColumns()
this.autoChangeAmount(target)
},
//单元值改变一个字符就触发一次 //单元值改变一个字符就触发一次
onValueChange(event) { onValueChange(event) {
let that = this let that = this

View File

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

View File

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