修改3级Bug

merge-requests/64/head
ch 3 years ago
parent c4c4ce7554
commit 8b8e5372de

@ -2,14 +2,13 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-08 14:41:42 * @Date: 2022-05-08 14:41:42
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-12 14:37:00 * @LastEditTime: 2022-05-16 16:13:11
* @Description: file content * @Description: file content
--> -->
<template> <template>
<div class="ui-goods-info" @click="$router.push(`/goods/detail/${goods.productId}`)"> <div class="ui-goods-info" @click="$router.push(`/goods/detail/${goods.productId}`)">
<div class="ui-goods-info--img"> <div class="ui-goods-info--img"
<img :src="goods.productImageUrl || goods.productMainPicture"/> :style="`background-image:url(${goods.productImageUrl || goods.productMainPicture})`"></div>
</div>
<p> <p>
<b>{{goods.productName}}</b> <b>{{goods.productName}}</b>
<span>{{goods.skuDescribe}}</span> <span>{{goods.skuDescribe}}</span>
@ -34,6 +33,9 @@ export default {
width: 100px; width: 100px;
height: 100px; height: 100px;
border: 1px solid #eee; border: 1px solid #eee;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
} }
p{ p{
width: 270px; width: 270px;

@ -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-16 11:46:05 * @LastEditTime: 2022-05-16 16:40:50
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -46,7 +46,7 @@ export default {
// //
'3' : {name:'等待发货', tips:'您的包裹整装待发'}, '3' : {name:'等待发货', tips:'您的包裹整装待发'},
// //
'4' : {name:'已发货', tips:'您的包裹正向您飞来'}, '4' : {name:'待收货', tips:'您的包裹正向您飞来'},
// //
'5' : {name:'已收货'}, '5' : {name:'已收货'},
// //
@ -62,7 +62,7 @@ export default {
}, },
watch : { watch : {
orderInfo(nVal){ orderInfo(nVal){
const {orderStatus} = this.orderInfo; const {orderStatus, autoReceiveTime, serverTime} = this.orderInfo;
this.ctxCon = this.ctxData[orderStatus]; this.ctxCon = this.ctxData[orderStatus];
if(orderStatus === 1){ if(orderStatus === 1){
@ -73,14 +73,25 @@ export default {
this.calcTimerStartSecondNum(); this.calcTimerStartSecondNum();
this.timer(); this.timer();
}else if(orderStatus === 4){
const receiveTime = (new Date(autoReceiveTime.replace(/-/g,'/'))).getTime();
const curTime = (new Date(serverTime.replace(/-/g,'/'))).getTime();
const minute = parseInt((receiveTime - curTime) / 60000);
const day = parseInt(Math.floor(minute / 1440));
const hour = parseInt(Math.floor((minute - day * 1440) / 60));
const m = parseInt(Math.floor(minute - ((day * 24 + hour) * 60)));
let str = `${day ? `${day}${hour}${m}` : (hour ? `${hour}${m}` : ( m ? `${m}` : '1分'))}`;
this.ctxCon.tips = `${str}后,将自动确认收货`
}else if(orderStatus === 2){ }else if(orderStatus === 2){
this.ctxCon.tips = this.orderInfo.cancelReason; this.ctxCon.tips = this.orderInfo.cancelReason;
} }
} }
}, },
methods:{ methods:{
/** /**
* 计算倒计时开始秒数 * 计算待支付倒计时开始秒数
*/ */
calcTimerStartSecondNum(){ calcTimerStartSecondNum(){
let expireTime = (new Date(this.orderInfo.expireTime.replace(/-/g,'/'))).getTime(), let expireTime = (new Date(this.orderInfo.expireTime.replace(/-/g,'/'))).getTime(),

@ -2,7 +2,7 @@
* @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-16 14:14:18 * @LastEditTime: 2022-05-16 16:14:47
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -39,10 +39,14 @@
<td class="not-border"> <td class="not-border">
<UIGoodsInfo :goods="i"/> <UIGoodsInfo :goods="i"/>
</td> </td>
<td class="not-border" width="96">{{i.realAmount}}</td> <td class="not-border" width="96">
<UiMoney :money="i.realAmount" />
</td>
<td class="not-border" width="96">{{i.quantity}}</td> <td class="not-border" width="96">{{i.quantity}}</td>
<template v-if="!idx"> <template v-if="!idx">
<td width="120" :rowspan="item.products.length">{{item.payAmount}}</td> <td width="120" :rowspan="item.products.length">
<UiMoney :money="item.payAmount" />
</td>
<td width="110" :rowspan="item.products.length">{{item.orderStatusDesc}}</td> <td width="110" :rowspan="item.products.length">{{item.orderStatusDesc}}</td>
<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">
@ -54,7 +58,6 @@
<UiButton type="yellow_gradual" @click="receive(item)"></UiButton> <UiButton type="yellow_gradual" @click="receive(item)"></UiButton>
<router-link class="link-btn" :to="`./detail?id=${item.orderId}`">查看物流</router-link> <router-link class="link-btn" :to="`./detail?id=${item.orderId}`">查看物流</router-link>
</template> </template>
</td> </td>
</template> </template>
</tr> </tr>
@ -81,8 +84,9 @@ import UIGoodsInfo from '@/components/UIGoodsInfo.vue';
import UiLineBox from '@/components/UiLineBox.vue'; import UiLineBox from '@/components/UiLineBox.vue';
import Tab from './module/Tab.vue'; import Tab from './module/Tab.vue';
import UiLoading from '../../../../../components/UiLoading.vue'; import UiLoading from '../../../../../components/UiLoading.vue';
import UiMoney from '../../../../../components/UiMoney.vue';
export default { export default {
components: { UiLineBox, UIGoodsInfo, Tab, UiButton, BsPay, UiEmpty, BsCancelOrder, UiLoading }, components: { UiLineBox, UIGoodsInfo, Tab, UiButton, BsPay, UiEmpty, BsCancelOrder, UiLoading, UiMoney },
data(){ data(){
return { return {
tabActive : this.$route.query.type || -1, tabActive : this.$route.query.type || -1,

@ -2,7 +2,7 @@
* @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-16 14:17:43 * @LastEditTime: 2022-05-16 16:43:38
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -59,7 +59,7 @@
<div class="operation"> <div class="operation">
<div> <div>
<el-checkbox label="全选" @change="handleCheckAll" v-model="checkAll" :indeterminate="isIndeterminate" /> <el-checkbox label="全选" @change="handleCheckAll" v-model="checkAll" :indeterminate="isIndeterminate" />
<a @click="handleDelete()" class="operation--del">批量删</a> <a class="operation--del" href="javascript:void" @click="handleDelete()" v-if="checkedIds.length"></a>
</div> </div>
<div class="operation--right"> <div class="operation--right">
<p>已选<span class="operation--count">{{checkedIds.length}}</span></p> <p>已选<span class="operation--count">{{checkedIds.length}}</span></p>
@ -223,7 +223,6 @@ export default {
}else{ }else{
this.checkedIds = []; this.checkedIds = [];
} }
}) })
}, },
/** /**

@ -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-16 13:53:56 * @LastEditTime: 2022-05-16 16:01:17
* @Description: file content * @Description: file content
--> -->
@ -27,7 +27,7 @@
</div> </div>
</template> </template>
<script> <script>
import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder} from '@/plugins/api/order'; import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder, ApiGetOrderPaySatus} from '@/plugins/api/order';
import BsPay from '../../../components/BsPay.vue'; import BsPay from '../../../components/BsPay.vue';
import UIGoodsInfo from '../../../components/UIGoodsInfo.vue'; import UIGoodsInfo from '../../../components/UIGoodsInfo.vue';
import OrderInfo from './module/OrderInfo.vue'; import OrderInfo from './module/OrderInfo.vue';
@ -116,9 +116,31 @@ export default {
} }
this.payVisible = true; this.payVisible = true;
this.payOrder = result; this.payOrder = result;
setTimeout(()=>{
this.getOrderPayStatus();
}, 5000)
},
/**
* 查询订单支付状态提交订单成功后每隔5秒调一次跳到支付结果页
*/
async getOrderPayStatus(){
const {error, result} = await ApiGetOrderPaySatus({orderId : this.payOrder.orderId});
if(error){
this.$router.replace(`/account/order/detail?id=${this.payOrder.orderId}`);
return false
}
if(!result.isSuccess){
setTimeout(()=>{
this.getOrderPayStatus();
}, 5000)
return false;
}
this.$router.replace(`/order/payResult?id=${this.payOrder.orderId}`)
}, },
cancelPay(){ cancelPay(){
this.$router.replace(`/account/order/detail?id=${this.payOrder.orderId}`) this.$router.replace(`/account/order/detail?id=${this.payOrder.orderId}`);
}, },
finishPay(){ finishPay(){
this.$router.replace(`/order/payResult?id=${this.payOrder.orderId}`) this.$router.replace(`/order/payResult?id=${this.payOrder.orderId}`)

@ -2,21 +2,23 @@
* @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-16 13:56:07 * @LastEditTime: 2022-05-16 15:41:08
* @Description: file content * @Description: file content
--> -->
<template> <template>
<div class="amount"> <div class="amount">
<div> <div>
<span>应付款</span> <span>应付款</span>
<b>{{amount}}</b> <UiMoney class="money" size="20px" preSize="14px" sufSize="14px" :money="amount" float prefix suffix/>
</div> </div>
<p>{{address.province + address.city + address.area + address.detailAddress}}</p> <p>{{address.province + address.city + address.area + address.detailAddress}}</p>
<p>{{address.name}} {{address.phone}}</p> <p>{{address.name}} {{address.phone}}</p>
</div> </div>
</template> </template>
<script> <script>
import UiMoney from '../../../../components/UiMoney.vue'
export default { export default {
components: { UiMoney },
props : { props : {
amount : { amount : {
type : Number, type : Number,
@ -37,8 +39,11 @@ export default {
text-align: right; text-align: right;
padding: 20px 40px; padding: 20px 40px;
margin-top: 10px; margin-top: 10px;
b{ .money{
font-size: 20px; font-size: 0;
color: #FF512B;
display: inline-block;
font-weight: bold;
} }
p{ p{
font-size: 12px; font-size: 12px;

Loading…
Cancel
Save