fix: 数据统计,销售统计,桌台统计更新,404页面跳转更新,三方配置更新
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
<el-form :model="query" inline label-position="left">
|
||||
<template v-if="orderType == 2">
|
||||
<el-form-item>
|
||||
<el-input placeholder="商品名称" v-model="query.proName" />
|
||||
<el-input placeholder="商品名称" v-model="query.productName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="query.cateId" placeholder="商品分类" style="width: 140px">
|
||||
<el-select v-model="query.prodCategoryId" placeholder="商品分类" style="width: 140px">
|
||||
<el-option
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
@@ -23,14 +23,14 @@
|
||||
</template>
|
||||
<el-form-item>
|
||||
<el-radio-group v-model="timeValue" @change="timeChange">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="0">今天</el-radio-button>
|
||||
<el-radio-button label="-1">昨天</el-radio-button>
|
||||
<el-radio-button label="-7">最近7天</el-radio-button>
|
||||
<el-radio-button label="-30">最近30天</el-radio-button>
|
||||
<el-radio-button label="week">本周</el-radio-button>
|
||||
<el-radio-button label="month">本月</el-radio-button>
|
||||
<el-radio-button label="custom">自定义</el-radio-button>
|
||||
<el-radio-button value="">全部</el-radio-button>
|
||||
<el-radio-button value="0">今天</el-radio-button>
|
||||
<el-radio-button value="-1">昨天</el-radio-button>
|
||||
<el-radio-button value="-7">最近7天</el-radio-button>
|
||||
<el-radio-button value="-30">最近30天</el-radio-button>
|
||||
<el-radio-button value="week">本周</el-radio-button>
|
||||
<el-radio-button value="month">本月</el-radio-button>
|
||||
<el-radio-button value="custom">自定义</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker
|
||||
v-model="query.createdAt"
|
||||
@@ -46,7 +46,7 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
<el-button icon="el-icon-download" v-loading="downloadLoading" @click="downloadHandle">
|
||||
<el-button icon="download" v-loading="downloadLoading" @click="downloadHandle">
|
||||
<span v-if="!downloadLoading">导出Excel</span>
|
||||
<span v-else>下载中...</span>
|
||||
</el-button>
|
||||
@@ -55,16 +55,40 @@
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<div class="collect_wrap">
|
||||
<div class="item" v-for="item in payCountList" :key="item.id">
|
||||
<div class="item">
|
||||
<div class="icon_wrap" style="--bg-color: #c978ee">
|
||||
<i class="icon" :class="item.icon"></i>
|
||||
<el-icon color="#fff"><Coin /></el-icon>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="m">
|
||||
<template v-if="item.isAmount == 1">¥</template>
|
||||
{{ item.payAmount }}
|
||||
</div>
|
||||
<div class="t">{{ item.payType }}</div>
|
||||
<div class="m">¥{{ payCount.totalAmount || 0 }}</div>
|
||||
<div class="t">总金额</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="icon_wrap" style="--bg-color: #c978ee">
|
||||
<el-icon color="#fff"><Coin /></el-icon>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="m">¥{{ payCount.refundAmount || 0 }}</div>
|
||||
<div class="t">退款金额</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="icon_wrap" style="--bg-color: #c978ee">
|
||||
<el-icon color="#fff"><ShoppingCartFull /></el-icon>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="m">{{ payCount.saleCount || 0 }}</div>
|
||||
<div class="t">总数量</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="icon_wrap" style="--bg-color: #c978ee">
|
||||
<el-icon color="#fff"><ShoppingCart /></el-icon>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="m">{{ payCount.refundCount || 0 }}</div>
|
||||
<div class="t">退单量</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,13 +133,13 @@
|
||||
<!-- <el-table-column label="商品分类" prop="cateName"></el-table-column>
|
||||
<el-table-column label="商品描述" prop="productSkuName"></el-table-column>
|
||||
<el-table-column label="单价" prop="price"></el-table-column> -->
|
||||
<el-table-column label="商品名称" prop="name"></el-table-column>
|
||||
<el-table-column label="销量" prop="salesNum"></el-table-column>
|
||||
<el-table-column label="销售金额" prop="salesAmount">
|
||||
<el-table-column label="商品名称" prop="productName"></el-table-column>
|
||||
<el-table-column label="销量" prop="saleCount"></el-table-column>
|
||||
<el-table-column label="销售金额" prop="saleAmount">
|
||||
<template v-slot="scope">¥{{ scope.row.salesAmount }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退单量" prop="refNum"></el-table-column>
|
||||
<el-table-column label="退款金额" prop="refAmount">
|
||||
<el-table-column label="退单量" prop="refundCount"></el-table-column>
|
||||
<el-table-column label="退款金额" prop="refundAmount">
|
||||
<template v-slot="scope">¥{{ scope.row.refAmount }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -148,18 +172,18 @@ export default {
|
||||
categorys: [],
|
||||
query: {
|
||||
createdAt: [],
|
||||
proName: "",
|
||||
cateId: "",
|
||||
productName: "",
|
||||
prodCategoryId: "",
|
||||
},
|
||||
tableData: {
|
||||
data: [],
|
||||
page: 0,
|
||||
page: 1,
|
||||
size: 10,
|
||||
loading: false,
|
||||
total: 0,
|
||||
},
|
||||
downloadLoading: false,
|
||||
payCountList: "",
|
||||
payCount: "",
|
||||
payCountTotal: 0,
|
||||
};
|
||||
},
|
||||
@@ -195,14 +219,14 @@ export default {
|
||||
async daycount() {
|
||||
try {
|
||||
const res = await saleSummaryApi.count({
|
||||
startTime: this.query.createdAt[0],
|
||||
endTime: this.query.createdAt[1],
|
||||
cateId: this.query.cateId,
|
||||
proName: this.query.proName,
|
||||
beginDate: this.query.createdAt[0],
|
||||
endDate: this.query.createdAt[1],
|
||||
prodCategoryId: this.query.prodCategoryId,
|
||||
productName: this.query.productName,
|
||||
|
||||
type: this.orderType,
|
||||
});
|
||||
this.payCountList = res;
|
||||
this.payCount = res;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
@@ -211,12 +235,11 @@ export default {
|
||||
async downloadHandle() {
|
||||
try {
|
||||
this.downloadLoading = true;
|
||||
const file = await daydownload({
|
||||
type: this.orderType,
|
||||
startTime: this.query.createdAt[0],
|
||||
endTime: this.query.createdAt[1],
|
||||
cateId: this.query.cateId,
|
||||
proName: this.query.proName,
|
||||
const file = await saleSummaryApi.export({
|
||||
beginDate: this.query.createdAt[0],
|
||||
endDate: this.query.createdAt[1],
|
||||
prodCategoryId: this.query.prodCategoryId,
|
||||
productName: this.query.productName,
|
||||
});
|
||||
downloadFile(file, "数据", "xlsx");
|
||||
this.downloadLoading = false;
|
||||
@@ -250,10 +273,10 @@ export default {
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
type: this.orderType,
|
||||
startTime: this.query.createdAt[0],
|
||||
endTime: this.query.createdAt[1],
|
||||
proName: this.query.proName,
|
||||
cateId: this.query.cateId,
|
||||
beginDate: this.query.createdAt[0],
|
||||
endDate: this.query.createdAt[1],
|
||||
productName: this.query.productName,
|
||||
prodCategoryId: this.query.prodCategoryId,
|
||||
});
|
||||
this.tableData.loading = false;
|
||||
this.tableData.data = res.records;
|
||||
|
||||
Reference in New Issue
Block a user