This commit is contained in:
hrx 2025-11-13 17:07:23 +08:00
parent 0c6ea7ce18
commit ddf377b23c
2 changed files with 24 additions and 3 deletions

View File

@ -119,3 +119,13 @@ export const reqSearchProductList = (data) => {
data
})
}
// 累计消费 共优惠
export const reqDiscount = (data) => {
return request({
url: '/bz_order/cumulative_order.dspy',
method: 'get',
headers: {'Content-Type': 'application/json'},
data
})
}

View File

@ -124,14 +124,14 @@
<span class="stat-label">累计支付总金额:</span>
<div class="stat-value">
<el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
<span v-else class="price-text">¥ {{ all_price || '0.00' }}</span>
<span v-else class="price-text">¥ {{ price || '0.00' }}</span>
</div>
</div>
<div class="stat-item">
<span class="stat-label">累计优惠总金额:</span>
<div class="stat-value">
<el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
<span v-else class="price-text">¥ {{ all_discount || '0.00' }}</span>
<span v-else class="price-text">¥ {{ discount || '0.00' }}</span>
</div>
</div>
</div>
@ -247,12 +247,14 @@
</template>
<script>
import { getOrderAPI } from "@/api/product/product";
import { getOrderAPI ,reqDiscount} from "@/api/product/product";
export default {
name: 'OrderManagement',
data() {
return {
price:0,//
discount:0,//
pagination: {
page: 1,
size: 10,
@ -344,6 +346,7 @@ export default {
created() {
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.userAgent);
this.initFromRouteQuery();
this.getAllPrice()
},
watch: {
//
@ -352,6 +355,14 @@ export default {
}
},
methods: {
//
async getAllPrice() {
console.log(54321,res);
if(res.status === true){
this.price = res.data.total_paid_amount
this.discount = res.data.total_discount_amount
}
},
//
initFromRouteQuery() {
const query = this.$route.query;