This commit is contained in:
cun-nan 2024-07-12 08:48:05 +08:00
parent adf5b1ea7a
commit dfa51f9e49
2 changed files with 27 additions and 14 deletions

View File

@ -59,9 +59,9 @@
<el-select v-model="value" clearable placeholder="请选择"> <el-select v-model="value" clearable placeholder="请选择">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.deptId"
:label="item.label" :label="item.deptName"
:value="item.value"> :value="item.deptId">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -72,35 +72,35 @@
<div class="sian"></div> <div class="sian"></div>
<div>活跃油站数</div> <div>活跃油站数</div>
</div> </div>
<div class="num-size">868</div> <div class="num-size">{{ storeAmount.storeTotal || 0 }}</div>
</div> </div>
<div class="k-box"> <div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;"> <div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div> <div class="sian"></div>
<div>交易金额(万元)/交易笔数</div> <div>交易金额(万元)/交易笔数</div>
</div> </div>
<div class="num-size">1080.50</div> <div class="num-size">{{ storeAmount.tradeAmount || 0 }}/{{ storeAmount.tradeTotal || 0 }}</div>
</div> </div>
<div class="k-box"> <div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;"> <div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div> <div class="sian"></div>
<div>退款金额()/退款笔数</div> <div>退款金额()/退款笔数</div>
</div> </div>
<div class="num-size">1868.20</div> <div class="num-size">{{ storeAmount.refundAmount || 0 }}/{{ storeAmount.refundTotal || 0 }}</div>
</div> </div>
<div class="k-box"> <div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;"> <div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div> <div class="sian"></div>
<div>笔均单价()</div> <div>笔均单价()</div>
</div> </div>
<div class="num-size">508.00</div> <div class="num-size">{{ storeAmount.averagePrice || 0 }}</div>
</div> </div>
<div class="k-box"> <div class="k-box">
<div class="d-s" style="font-size: 12px;color: #999999;"> <div class="d-s" style="font-size: 12px;color: #999999;">
<div class="sian"></div> <div class="sian"></div>
<div>日均交易额(万元)/日均交易笔数</div> <div>日均交易额(万元)/日均交易笔数</div>
</div> </div>
<div class="num-size">5208.60 / 90</div> <div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
</div> </div>
</div> </div>
<div class="hui-hang"></div> <div class="hui-hang"></div>
@ -153,6 +153,7 @@
<script> <script>
import echarts from "echarts"; import echarts from "echarts";
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner"; import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
import {selectChildByDeptId} from "@/api/system/Site/site";
export default { export default {
data(){ data(){
@ -184,6 +185,7 @@ export default {
value: '', value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)], value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
imagePath: process.env.VUE_APP_SERVER_URL, imagePath: process.env.VUE_APP_SERVER_URL,
queryParams:{},
// //
storeTotal:{}, storeTotal:{},
// //
@ -192,20 +194,27 @@ export default {
}, },
created() { created() {
this.getStoreTotal() this.getStoreTotal()
this.selectChildByDeptIdApi()
this.getStoreAmount() this.getStoreAmount()
}, },
mounted() { mounted() {
this.initChart() this.initChart()
}, },
methods:{ methods:{
//
selectChildByDeptIdApi() {
selectChildByDeptId().then(res => {
this.options = res.data
})
},
getStoreTotal(){ getStoreTotal(){
storeTotalIndex().then(res => { storeTotalIndex().then(res => {
this.storeTotal = res.data this.storeTotal = res.data
}) })
}, },
getStoreAmount(){ getStoreAmount(){
storeAmountIndex().then(res => { storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
console.log(res) this.storeAmount = res.data
}) })
}, },
initChart() { initChart() {

View File

@ -1026,13 +1026,17 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
map1.put("endTime", allOrderInfoVo.getParams().get("endTime").toString()); map1.put("endTime", allOrderInfoVo.getParams().get("endTime").toString());
} }
Integer storeTotal = selectStoreTotal(map1); Integer storeTotal = selectStoreTotal(map1);
DecimalFormat df = new DecimalFormat("#.00"); // 格式化字符串表示两位小数
// 设置格式化器
df.setRoundingMode(RoundingMode.HALF_UP); // 可选设置四舍五入模式
map.put("tradeTotal",tradeTotal); map.put("tradeTotal",tradeTotal);
map.put("tradeAmount",tradeAmount); map.put("tradeAmount",tradeAmount > 0 ? df.format(tradeAmount) : 0);
map.put("refundTotal",refundTotal); map.put("refundTotal",refundTotal);
map.put("refundAmount",refundAmount); map.put("refundAmount",refundAmount > 0 ? df.format(refundAmount) : 0);
map.put("averagePrice",averagePrice); map.put("averagePrice",averagePrice > 0 ? df.format(averagePrice) : 0);
map.put("dayTradeAmount",dayTradeAmount); map.put("dayTradeAmount",dayTradeAmount > 0 ? df.format(dayTradeAmount) : 0);
map.put("dayTradeTotal",dayTradeTotal); map.put("dayTradeTotal",dayTradeTotal);
map.put("storeTotal",storeTotal); map.put("storeTotal",storeTotal);
return map; return map;