|
@@ -42,8 +42,11 @@
|
|
|
<el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="page()" round>搜索</el-button>
|
|
|
<el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置</el-button>
|
|
|
<el-button class="filter-item" style="float: left;" round type="warning" @click="fineRefundListExport()">导出</el-button>
|
|
|
+ <PermissionButton menu-code="_views_finance_fine_refund_returned_batch" class="filter-item" style="float: left;" round type="danger" @click="batchUpdateStatus('RETURNED')" />
|
|
|
+ <PermissionButton menu-code="_views_finance_fine_refund_ignore_batch" class="filter-item" style="float: left;" round type="danger" @click="batchUpdateStatus('IGNORE')" />
|
|
|
</template>
|
|
|
- <parentTable ref="table" v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;">
|
|
|
+ <parentTable ref="table" v-loading="listLoading" :data="pageData.records" :selectionChange="handleSelectionChange" slot="table" style="width: 100%;">
|
|
|
+ <el-table-column type="selection" align="center" width="40"></el-table-column>
|
|
|
<el-table-column label="项⽬编号" align="center" width="150">
|
|
|
<template slot-scope="{row}">
|
|
|
<span>{{ row.orderId }}</span>
|
|
@@ -166,8 +169,11 @@
|
|
|
<el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="page()" round>搜索</el-button>
|
|
|
<el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置</el-button>
|
|
|
<el-button class="filter-item" style="float: left;" round type="warning" @click="fineRefundListExport()">导出</el-button>
|
|
|
+ <PermissionButton menu-code="_views_finance_fine_refund_returned_batch" class="filter-item" style="float: left;" round type="danger" @click="batchUpdateStatus('RETURNED')" />
|
|
|
+ <PermissionButton menu-code="_views_finance_fine_refund_ignore_batch" class="filter-item" style="float: left;" round type="danger" @click="batchUpdateStatus('IGNORE')" />
|
|
|
</template>
|
|
|
- <parentTable ref="table" v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;">
|
|
|
+ <parentTable ref="table" v-loading="listLoading" :data="pageData.records" :selectionChange="handleSelectionChange" slot="table" style="width: 100%;">
|
|
|
+ <el-table-column type="selection" align="center" width="40"></el-table-column>
|
|
|
<el-table-column label="项⽬编号" align="center" width="120">
|
|
|
<template slot-scope="{row}">
|
|
|
<span>{{ row.orderId }}</span>
|
|
@@ -290,8 +296,11 @@
|
|
|
<el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="page()" round>搜索</el-button>
|
|
|
<el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置</el-button>
|
|
|
<el-button class="filter-item" style="float: left;" round type="warning" @click="fineRefundListExport()">导出</el-button>
|
|
|
+ <PermissionButton menu-code="_views_finance_fine_refund_returned_batch" class="filter-item" style="float: left;" round type="danger" @click="batchUpdateStatus('RETURNED')" />
|
|
|
+ <PermissionButton menu-code="_views_finance_fine_refund_ignore_batch" class="filter-item" style="float: left;" round type="danger" @click="batchUpdateStatus('IGNORE')" />
|
|
|
</template>
|
|
|
- <parentTable ref="table" v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;">
|
|
|
+ <parentTable ref="table" v-loading="listLoading" :data="pageData.records" :selectionChange="handleSelectionChange" slot="table" style="width: 100%;">
|
|
|
+ <el-table-column type="selection" align="center" width="40"></el-table-column>
|
|
|
<el-table-column label="项⽬编号" align="center" width="120">
|
|
|
<template slot-scope="{row}">
|
|
|
<span>{{ row.orderId }}</span>
|
|
@@ -447,6 +456,7 @@ export default {
|
|
|
explain: null,
|
|
|
fineAmount: null,
|
|
|
},
|
|
|
+ batchUpdateIds: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -521,6 +531,45 @@ export default {
|
|
|
this.page();
|
|
|
});
|
|
|
},
|
|
|
+ // 多选触发
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.batchUpdateIds = selection.map((item) => item.id);
|
|
|
+ },
|
|
|
+ // 批量更新退款状态
|
|
|
+ batchUpdateStatus(status) {
|
|
|
+ if (this.batchUpdateIds && this.batchUpdateIds.length > 0) {
|
|
|
+ this.$confirm('请仔细确认要进行批量操作的数据, 是否继续?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(() => {
|
|
|
+ let batchUpdateForms = [];
|
|
|
+ for (let index = 0; index < this.batchUpdateIds.length; index++) {
|
|
|
+ this.updateForm = {
|
|
|
+ id: this.batchUpdateIds[index],
|
|
|
+ status: status,
|
|
|
+ };
|
|
|
+ batchUpdateForms.push(this.updateForm);
|
|
|
+ }
|
|
|
+ this.$api.financeFineRefund.batchUpdate(batchUpdateForms).then((res) => {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '批量请求成功!',
|
|
|
+ type: 'success',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ this.page();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$notify({
|
|
|
+ title: '警告',
|
|
|
+ message: '请至少选择一条退款记录!',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|