Merge branch 'feature/task1.0.0-0505-ch' into msb_test

merge-requests/61/merge
ch 2 years ago
commit 7d0f236488

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-09 15:52:51
* @LastEditors: ch
* @LastEditTime: 2022-05-10 13:50:29
* @LastEditTime: 2022-05-16 11:18:10
* @Description: file content
-->
<template>
@ -19,11 +19,11 @@
</p>
<p>
<label>收货地址</label>
<span>{{logisitcsInfo.recipientAddress}}{{logisitcsInfo.recipientAddress}}{{logisitcsInfo.recipientAddress}}</span>
<span>{{logisitcsInfo.recipientAddress}}</span>
</p>
</div>
</UiLineBox>
<UiLineBox class="logisitcs--list" v-if="logisitcsList.length">
<UiLineBox class="logisitcs--list" v-if="orderInfo.orderStatus > 4">
<div slot="head" class="title">
<b>物流信息</b>
<span>{{logisitcsInfo.companyName}}<small>{{logisitcsInfo.trackingNo}}</small></span>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-09 14:41:37
* @LastEditors: ch
* @LastEditTime: 2022-05-12 11:08:57
* @LastEditTime: 2022-05-16 11:46:05
* @Description: file content
-->
<template>
@ -24,6 +24,7 @@
</div>
</template>
<script>
import {ApiPutOrderReceive} from '@/plugins/api/order';
import BsPay from '@/components/BsPay.vue'
import UiButton from '@/components/UiButton.vue'
import BsCancelOrder from '../../../../../../components/BsCancelOrder.vue'
@ -124,7 +125,11 @@ export default {
});
},
emitStatus(){
this.$emit('changeStatus')
//
if(this.timerStop){
clearTimeout(this.timerStop);
}
this.$emit('changeStatus');
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-09 14:41:37
* @LastEditors: ch
* @LastEditTime: 2022-05-12 10:43:37
* @LastEditTime: 2022-05-16 11:15:29
* @Description: file content
-->
<template>
@ -96,6 +96,7 @@ export default {
let lastLog = logs[logs.length - 1];
let lastStep = {
type:-1, name: '交易完成',
active : true,
icon: require('@/assets/img/account/order/order_status_5.png'),
iconActive : require('@/assets/img/account/order/order_status_5_active.png')
}

@ -2,12 +2,12 @@
* @Author: ch
* @Date: 2022-05-04 20:47:29
* @LastEditors: ch
* @LastEditTime: 2022-05-12 16:55:56
* @LastEditTime: 2022-05-16 14:14:18
* @Description: file content
-->
<template>
<div class="main">
<Tab :active="tabActive" @change="changeTab"></Tab>
<Tab :active="tabActive" @change="changeTab" ref="tab"></Tab>
<UiLoading v-if="loading"></UiLoading>
<UiEmpty v-if="!orderTotal && !loading" desc="暂无订单数据" :icon="require('@/assets/img/account/order/empty.png')">
<UiButton type="grey" @click="$router.push('/')"></UiButton>
@ -47,7 +47,7 @@
<td width="145" :rowspan="item.products.length">
<template v-if="item.orderStatus === 1">
<UiButton type="yellow_gradual" @click="pay(item)"></UiButton>
<span class="link-btn" @click="canvelPay(item)"></span>
<span class="link-btn" @click="cancelPay(item)"></span>
</template>
<router-link :to="`./detail?id=${item.orderId}`" v-if="item.orderStatus > 4"></router-link>
<template v-if="item.orderStatus === 4">
@ -67,8 +67,8 @@
</template>
<BsCancelOrder :visible.sync="cancelVisible" :orderId="operationOrder.orderId"/>
<BsPay :visible.sync="payVisible" :orderId="operationOrder.orderId" @finish="getOrderList"/>
<BsCancelOrder :visible.sync="cancelVisible" :orderId="operationOrder.orderId" @cancel="reloadData"/>
<BsPay :visible.sync="payVisible" :orderId="operationOrder.orderId" @finish="reloadData"/>
</div>
</template>
<script>
@ -114,6 +114,9 @@ export default {
this.getOrderList();
},
/**
* 查询订单列表
*/
async getOrderList(){
this.loading = true;
const {error, result} = await ApiGetOrderList({
@ -129,30 +132,38 @@ export default {
this.orderList = result.records;
this.orderTotal = result.total
},
/**
* 重新加载数据确认收货和取消支付订单这些操作完成后需要
*/
reloadData(){
this.getOrderList();
this.$refs.tab.getOrderStatistics();
},
pay(item){
this.operationOrder = item;
this.payVisible = true;
},
canvelPay(item){
cancelPay(item){
this.operationOrder = item;
this.cancelVisible = true;
},
receive(){
receive(item){
this.$confirm('确认已经收到货了吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const {error} = await ApiPutOrderReceive({orderId : this.operationOrder.orderId});
const {error} = await ApiPutOrderReceive({orderId : item.orderId});
if(error){
uni.$toast(error.message);
this.$$message.error(error.message);
return false;
}
this.$message({
type: 'success',
message: '成功收货!'
});
this.emitStatus()
this.reloadData()
});
},
}

@ -2,16 +2,16 @@
* @Author: ch
* @Date: 2022-05-03 22:41:15
* @LastEditors: ch
* @LastEditTime: 2022-05-12 19:40:43
* @LastEditTime: 2022-05-16 14:17:43
* @Description: file content
-->
<template>
<div>
<UiLoading v-if="isLoading" ></UiLoading>
<UiEmpty v-if="!isLoading && !list.length" desc="购物车空空如也,去挑点喜欢的好货吧~"
:icon="require('@/assets/img/cart/empty.png')">
<UiButton type="grey" @click="$router.push('/')"></UiButton>
</UiEmpty>
<UiLoading v-if="isLoading" ></UiLoading>
<div class="main" v-else>
<table class="table table--head">
<thead>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-04 17:30:58
* @LastEditors: ch
* @LastEditTime: 2022-05-12 09:58:47
* @LastEditTime: 2022-05-16 13:53:56
* @Description: file content
-->
@ -18,7 +18,7 @@
<h3 class="title">确认商品信息</h3>
<OrderInfo :products="orderInfo.products" />
<Message :orderInfo="orderInfo" :message.sync="userMessage"/>
<Amount :amount="orderInfo.payAmount"/>
<Amount :amount="orderInfo.payAmount" :address="address"/>
<div class="pay">
<UiButton radius type="red_panel" @click="submit"></UiButton>
</div>

@ -1,22 +0,0 @@
<!--
* @Author: ch
* @Date: 2022-05-04 17:35:44
* @LastEditors: ch
* @LastEditTime: 2022-05-04 17:38:31
* @Description: file content
-->
<template>
<div>我是地址模块</div>
</template>
<script>
export default {
data(){
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-08 16:12:18
* @LastEditors: ch
* @LastEditTime: 2022-05-08 16:14:57
* @LastEditTime: 2022-05-16 13:56:07
* @Description: file content
-->
<template>
@ -11,8 +11,8 @@
<span>应付款</span>
<b>{{amount}}</b>
</div>
<p>北京市XXXXX区XXXX路xxxxxx小区XXX单元</p>
<p>卖火柴的灰姑凉 18888888888</p>
<p>{{address.province + address.city + address.area + address.detailAddress}}</p>
<p>{{address.name}} {{address.phone}}</p>
</div>
</template>
<script>

Loading…
Cancel
Save