mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
v1.9 优化申请开票选择明细 bug 处理
This commit is contained in:
parent
d1f3b58786
commit
b3f585ad65
@ -75,7 +75,14 @@
|
||||
</div>
|
||||
|
||||
<el-table :data="feeDetails" border style="width: 100%">
|
||||
<el-table-column type="selection" width="55" align="center" @select-all="handleFeeSelectAll" />
|
||||
<el-table-column width="55" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox
|
||||
:checked="formData.detailIds.includes(scope.row.detailId)"
|
||||
@change="handleFeeCheckboxChange(scope.row.detailId, $event)">
|
||||
</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="feeName" :label="$t('ownerApplyInvoice.feeName')" align="center" />
|
||||
<el-table-column prop="payerObjName" :label="$t('ownerApplyInvoice.payer')" align="center" />
|
||||
<el-table-column :label="$t('ownerApplyInvoice.receivablePaid')" align="center">
|
||||
@ -108,7 +115,14 @@
|
||||
</div>
|
||||
|
||||
<el-table :data="acctDetails" border style="width: 100%">
|
||||
<el-table-column type="selection" width="55" align="center" @select-all="handleAcctSelectAll" />
|
||||
<el-table-column width="55" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox
|
||||
:checked="formData.arIds.includes(scope.row.arId)"
|
||||
@change="handleAcctCheckboxChange(scope.row.arId, $event)">
|
||||
</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="acctName" :label="$t('ownerApplyInvoice.accountName')" align="center" />
|
||||
<el-table-column prop="acctTypeName" :label="$t('ownerApplyInvoice.accountType')" align="center" />
|
||||
<el-table-column prop="ownerName" :label="$t('ownerApplyInvoice.owner')" align="center" />
|
||||
@ -231,21 +245,25 @@ export default {
|
||||
this.loadAcctDetails()
|
||||
}
|
||||
},
|
||||
handleFeeSelectAll(selection) {
|
||||
this.formData.detailIds = selection.length
|
||||
? this.feeDetails.map(item => item.detailId)
|
||||
: []
|
||||
handleFeeCheckboxChange(detailId, checked) {
|
||||
if (checked) {
|
||||
this.formData.detailIds.push(detailId)
|
||||
} else {
|
||||
this.formData.detailIds = this.formData.detailIds.filter(id => id !== detailId)
|
||||
}
|
||||
},
|
||||
handleAcctSelectAll(selection) {
|
||||
this.formData.arIds = selection.length
|
||||
? this.acctDetails.map(item => item.arId)
|
||||
: []
|
||||
handleAcctCheckboxChange(arId, checked) {
|
||||
if (checked) {
|
||||
this.formData.arIds.push(arId)
|
||||
} else {
|
||||
this.formData.arIds = this.formData.arIds.filter(id => id !== arId)
|
||||
}
|
||||
},
|
||||
async handleSubmit() {
|
||||
try {
|
||||
// 验证表单
|
||||
if (!this.formData.ownerId) {
|
||||
this.$message.warning(this.$t('ownerApplyInvoice.chooseContent'))
|
||||
this.$message.warning(this.$t('ownerApplyInvoice.chooseOwner'))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user