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

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

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

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

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

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

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

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-04 17:30:58 * @Date: 2022-05-04 17:30:58
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-12 09:58:47 * @LastEditTime: 2022-05-16 13:53:56
* @Description: file content * @Description: file content
--> -->
@ -18,7 +18,7 @@
<h3 class="title">确认商品信息</h3> <h3 class="title">确认商品信息</h3>
<OrderInfo :products="orderInfo.products" /> <OrderInfo :products="orderInfo.products" />
<Message :orderInfo="orderInfo" :message.sync="userMessage"/> <Message :orderInfo="orderInfo" :message.sync="userMessage"/>
<Amount :amount="orderInfo.payAmount"/> <Amount :amount="orderInfo.payAmount" :address="address"/>
<div class="pay"> <div class="pay">
<UiButton radius type="red_panel" @click="submit"></UiButton> <UiButton radius type="red_panel" @click="submit"></UiButton>
</div> </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 * @Author: ch
* @Date: 2022-05-08 16:12:18 * @Date: 2022-05-08 16:12:18
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-08 16:14:57 * @LastEditTime: 2022-05-16 13:56:07
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -11,8 +11,8 @@
<span>应付款</span> <span>应付款</span>
<b>{{amount}}</b> <b>{{amount}}</b>
</div> </div>
<p>北京市XXXXX区XXXX路xxxxxx小区XXX单元</p> <p>{{address.province + address.city + address.area + address.detailAddress}}</p>
<p>卖火柴的灰姑凉 18888888888</p> <p>{{address.name}} {{address.phone}}</p>
</div> </div>
</template> </template>
<script> <script>

Loading…
Cancel
Save