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-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
:key="item.deptId"
:label="item.deptName"
:value="item.deptId">
</el-option>
</el-select>
</div>
@ -72,35 +72,35 @@
<div class="sian"></div>
<div>活跃油站数</div>
</div>
<div class="num-size">868</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>
<div class="num-size">1080.50</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>
<div class="num-size">1868.20</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>
<div class="num-size">508.00</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>
<div class="num-size">5208.60 / 90</div>
<div class="num-size">{{ storeAmount.dayTradeAmount || 0 }}/{{ storeAmount.dayTradeTotal || 0 }}</div>
</div>
</div>
<div class="hui-hang"></div>
@ -153,6 +153,7 @@
<script>
import echarts from "echarts";
import {storeAmountIndex, storeTotalIndex} from "@/api/indexBanner";
import {selectChildByDeptId} from "@/api/system/Site/site";
export default {
data(){
@ -184,6 +185,7 @@ export default {
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
imagePath: process.env.VUE_APP_SERVER_URL,
queryParams:{},
//
storeTotal:{},
//
@ -192,20 +194,27 @@ export default {
},
created() {
this.getStoreTotal()
this.selectChildByDeptIdApi()
this.getStoreAmount()
},
mounted() {
this.initChart()
},
methods:{
//
selectChildByDeptIdApi() {
selectChildByDeptId().then(res => {
this.options = res.data
})
},
getStoreTotal(){
storeTotalIndex().then(res => {
this.storeTotal = res.data
})
},
getStoreAmount(){
storeAmountIndex().then(res => {
console.log(res)
storeAmountIndex(this.addDateRange(this.queryParams,this.value1)).then(res => {
this.storeAmount = res.data
})
},
initChart() {

View File

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