修改退款审核、订单详情等页面显示
This commit is contained in:
@@ -8,11 +8,13 @@
|
||||
row-key="profitId"
|
||||
:columns="columns"
|
||||
:datasource="datasource"
|
||||
:parse-data="otherData"
|
||||
v-model:selection="selection"
|
||||
tool-class="ele-toolbar-form"
|
||||
:scroll="{ x: 1200 }"
|
||||
class="sys-org-table"
|
||||
:striped="true"
|
||||
@done="onTableDone"
|
||||
>
|
||||
<template #toolbar>
|
||||
<search
|
||||
@@ -67,6 +69,16 @@
|
||||
</a-space> -->
|
||||
</template>
|
||||
</template>
|
||||
<template #summary>
|
||||
<a-table-summary fixed>
|
||||
<a-table-summary-row>
|
||||
<a-table-summary-cell :index="0"></a-table-summary-cell>
|
||||
<a-table-summary-cell :index="1">合计</a-table-summary-cell>
|
||||
<a-table-summary-cell :col-span="4"></a-table-summary-cell>
|
||||
<a-table-summary-cell :index="5">¥{{amountSummary}}</a-table-summary-cell>
|
||||
</a-table-summary-row>
|
||||
</a-table-summary>
|
||||
</template>
|
||||
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
@@ -79,7 +91,8 @@
|
||||
import type { EleProTable } from 'ele-admin-pro';
|
||||
import type {
|
||||
DatasourceFunction,
|
||||
ColumnItem
|
||||
ColumnItem,
|
||||
EleProTableDone
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { toDateString } from 'ele-admin-pro';
|
||||
import Search from './search.vue';
|
||||
@@ -172,6 +185,12 @@
|
||||
// 是否显示高级搜索
|
||||
const showAdvancedSearch = ref(false);
|
||||
|
||||
// 合计
|
||||
const amountSummary = ref(0);
|
||||
|
||||
// 案卷数据
|
||||
// const data = ref<Profit[]>([]);
|
||||
|
||||
// 表格数据源
|
||||
const datasource: DatasourceFunction = ({
|
||||
page,
|
||||
@@ -193,6 +212,23 @@
|
||||
});
|
||||
};
|
||||
|
||||
/* 表格数据加载完成事件 */
|
||||
const onTableDone: EleProTableDone<Profit> = (res) => {
|
||||
console.log(res);
|
||||
// data.value = res.data;
|
||||
/* amountSummary.value = res.data
|
||||
.map((item) => Number(item.amount))
|
||||
.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0); */
|
||||
amountSummary.value = res.response.otherData.total;
|
||||
};
|
||||
|
||||
/* 搜索 */
|
||||
const reload = (where?: ProfitParam) => {
|
||||
selection.value = [];
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<a-select v-model:value="type" style="width: 100px; margin: -5px -12px">
|
||||
<a-select-option value="keywords">模糊搜索</a-select-option>
|
||||
<a-select-option value="orderNo">订单号</a-select-option>
|
||||
<a-select-option value="merchantName">门店名称</a-select-option>
|
||||
<a-select-option value="merchantCode">门店编号</a-select-option>
|
||||
<a-select-option value="orderUserName">用户名</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
@@ -74,8 +74,8 @@
|
||||
if (type.value == 'orderUserName') {
|
||||
where.orderUserName = searchText.value;
|
||||
}
|
||||
if (type.value == 'merchantName') {
|
||||
where.merchantName = searchText.value;
|
||||
if (type.value == 'merchantCode') {
|
||||
where.merchantCode = searchText.value;
|
||||
}
|
||||
if (type.value == 'keywords') {
|
||||
where.keywords = searchText.value;
|
||||
|
||||
Reference in New Issue
Block a user