This commit is contained in:
ds 2024-10-30 11:00:37 +08:00
parent 2c8513c43f
commit 6298e9249f
4 changed files with 46 additions and 15 deletions

View File

@ -20,6 +20,13 @@ export function getNumDayTime(dayNum) {
return formattedDate;
}
// 格式化日期为YYYY-MM-DD
export function formatDate(date) {
let year = date.getFullYear();
let month = String(date.getMonth() + 1).padStart(2, '0');
let day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
// 日期格式化
export function parseTime(time, pattern) {

View File

@ -625,7 +625,24 @@
<!-- 添加或修改用户配置对话框 class="common-dialog" -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false" >
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24">
<el-form-item label="所属机构" prop="deptId">
<el-select v-model="form.deptId" placeholder="请选择所属机构" style="width: 100%">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
:label="item.deptName"
:value="item.deptId"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="用户姓名" prop="realName">
@ -679,7 +696,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="角色状态">
<el-form-item label="角色状态" prop="accountStatus">
<el-radio-group v-model="form.accountStatus" @change="$forceUpdate()">
<el-radio :key=1 :label=1 :value=1>启用</el-radio>
<el-radio :key=0 :label=0 :value=0>禁用</el-radio>
@ -689,9 +706,9 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button>
</div>
</el-dialog>
@ -997,7 +1014,10 @@ export default {
]
},
rules: {
leaderName: [
deptId: [
{ required: true, message: '所属机构不能为空', trigger: 'blur' },
],
realName: [
{ required: true, message: '姓名不能为空', trigger: 'blur' },
],
accountName: [
@ -1025,6 +1045,10 @@ export default {
roleIds: [
{ required: true, message: '请选择角色信息', trigger: 'blur' },
],
accountStatus: [
{ required: true, message: '请选择角色状态', trigger: 'blur' },
],
region: [
{ required: true, message: '请选择活动区域', trigger: 'change' }

View File

@ -80,37 +80,37 @@
<div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div>
<div>活跃油站数</div>
<div style="color: #000;margin-bottom: 6px;"> 活跃油站数</div>
</div>
<div class="num-size">{{ storeAmount.storeTotal || 0 }}</div>
</div>
<div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div>
<div>交易金额(万元)/交易笔数</div>
<div style="color: #000;margin-bottom: 6px;">交易金额(万元)/交易笔数</div>
</div>
<div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
<div class="num-size">{{ storeAmount.tradeAmount || 0 }} / {{ storeAmount.tradeTotal || 0 }}</div>
</div>
<div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div>
<div>退款金额()/退款笔数</div>
<div style="color: #000;margin-bottom: 6px;">退款金额()/退款笔数</div>
</div>
<div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
<div class="num-size">{{ storeAmount.refundAmount || 0 }} / {{ storeAmount.refundTotal || 0 }}</div>
</div>
<div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div>
<div>笔均单价()</div>
<div style="color: #000;margin-bottom: 6px;">笔均单价()</div>
</div>
<div class="num-size">{{ storeAmount.averagePrice || 0 }}</div>
</div>
<div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div>
<div>日均交易额(万元)/日均交易笔数</div>
<div style="color: #000;margin-bottom: 6px;">日均交易额(万元)/日均交易笔数</div>
</div>
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }} / {{ storeAmount.dayTradeTotal || 0 }}</div>
</div>
</div>
<div class="hui-hang"></div>
@ -182,7 +182,7 @@
import echarts from "echarts";
import {getStoreAmountByTime, storeAmountIndex1, storeTotalIndex} from "@/api/indexBanner";
import {selectChildByDeptId} from "@/api/system/Site/site";
import {parseTime} from "@/utils/fuint";
import {parseTime,formatDate} from "@/utils/fuint";
import {getBannerListApi} from "@/api/sys/banner";
import {getListApi} from "@/api/setting/hardware";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
@ -236,7 +236,7 @@ export default {
created() {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
this.value1 = [formatDate(oneWeekAgo),formatDate(nowDate)]
this.getStoreTotal()
this.selectChildByDeptIdApi()
// this.getStoreAmount()

View File

@ -1574,7 +1574,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
}
Double averagePrice = tradeAmount / tradeTotal;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
Double dayTradeAmount = 0.0;
Integer dayTradeTotal = 0;