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