1、调整业务模块
This commit is contained in:
@@ -60,8 +60,22 @@
|
||||
>
|
||||
手动同步流水
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="hasPermission('receipt_flow_claim')"
|
||||
type="primary"
|
||||
:disabled="!selectedRows.length"
|
||||
@click="openBatchClaim"
|
||||
>
|
||||
批量认领
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table v-loading="loading" :data="rows" border>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="rows"
|
||||
border
|
||||
@selection-change="selectedRows = $event"
|
||||
>
|
||||
<el-table-column type="selection" width="52" align="center" />
|
||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||
<el-table-column
|
||||
v-for="column in columns"
|
||||
@@ -256,6 +270,7 @@ export default {
|
||||
claimStatusOptions: api.claimStatusOptions,
|
||||
columns: receiptFlowTableColumns,
|
||||
rows: [],
|
||||
selectedRows: [],
|
||||
loading: false,
|
||||
syncing: false,
|
||||
searchExpanded: false,
|
||||
@@ -293,6 +308,7 @@ export default {
|
||||
})
|
||||
);
|
||||
this.rows = data.records || [];
|
||||
this.selectedRows = [];
|
||||
this.page.total = Number(data.total || 0);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
@@ -342,6 +358,32 @@ export default {
|
||||
query: { mode: 'add', id: row.id },
|
||||
});
|
||||
},
|
||||
openBatchClaim() {
|
||||
if (!this.selectedRows.length) {
|
||||
this.$message.warning('请先勾选收款流水');
|
||||
return;
|
||||
}
|
||||
const first = this.selectedRows[0];
|
||||
const payerName = String(first.payerName || '').trim();
|
||||
const counterpartyAccount = String(first.counterpartyAccount || '').trim();
|
||||
const sameParty = this.selectedRows.every(
|
||||
row =>
|
||||
String(row.payerName || '').trim() === payerName &&
|
||||
String(row.counterpartyAccount || '').trim() === counterpartyAccount
|
||||
);
|
||||
if (!sameParty) {
|
||||
this.$message.warning('批量认领所选流水的付款人、对方账号必须一致');
|
||||
return;
|
||||
}
|
||||
this.$router.push({
|
||||
path: '/payment/receipt-flow/form',
|
||||
query: {
|
||||
mode: 'add',
|
||||
batch: '1',
|
||||
ids: this.selectedRows.map(row => row.id).join(','),
|
||||
},
|
||||
});
|
||||
},
|
||||
hasPermission(code) {
|
||||
return this.isAdmin || this.validData(this.permission?.[code], false);
|
||||
},
|
||||
@@ -398,6 +440,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 0;
|
||||
}
|
||||
.receipt-flow-page__pagination {
|
||||
|
||||
Reference in New Issue
Block a user