Compare commits

...

8 Commits

8 changed files with 149 additions and 61 deletions

View File

@ -213,17 +213,17 @@ export default {
console.log(item.id);
//
// request(afterSaleApi.isAllow, "POST", {
// order_id: item.id,
// }).then((res) => {
// if (res.data.is_allow_after_sales) {
// this.afterSaleGoods = res.data.allow_items;
// // this.selectedAsGood = item.commodity_order_item_list[0].id;
// this.$refs.afterSalePopupRef.openAfterSalePopup();
// } else {
// this.noSalePopup = true
// }
// });
request(afterSaleApi.isAllow, "POST", {
order_id: item.id,
}).then((res) => {
if (res.data.is_allow_after_sales) {
this.afterSaleGoods = res.data.allow_items;
// this.selectedAsGood = item.commodity_order_item_list[0].id;
this.$refs.afterSalePopupRef.openAfterSalePopup();
} else {
this.noSalePopup = true
}
});
},
// 退
@ -244,7 +244,9 @@ export default {
change_goods_id: data.changeServiceId
}
request(afterSaleApi.afterSaleCreate, "POST", params).then((res) => {
uni.showToast({ title: "申请售后成功", icon: "sucess" }), setTimeout(() => {
this.getOrderList();
}, 1000);
});
},

View File

@ -432,13 +432,20 @@
background: #F6F7FB;
border-radius: 40rpx;
padding: 10rpx 15rpx;
white-space: nowrap;
margin:20rpx 30rpx;
word-wrap: break-word;
word-break: break-all;
max-width: calc(100% - 60rpx);
display: inline-block;
}
.itemSize_active {
background: #FF370B;
color: #fff;
word-wrap: break-word;
word-break: break-all;
max-width: calc(100% - 60rpx);
display: inline-block;
}
.itemSize-img{

View File

@ -369,7 +369,7 @@ export default {
console.log('售后商品 - 选中的售后类型:', selectedType);
console.log('选中的售后商品:', this.selectedAsGood);
this.merchantContact = `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone}`;
this.merchantContact = `${this.orderItem.supplier_name} ${this.orderItem.supplier_phone || ''}`;
this.merchantAddress = this.orderItem.supplier_address;
this.afterSalePopup = false;
@ -450,8 +450,8 @@ export default {
res.change_goods_list.forEach(item => {
item.commodity_pic = picUrl + item.commodity_pic;
})
this.changeGoodsList = res.change_goods_list;
console.log("🚀 ~ changeGood ~ this.currentGG:", this.currentGG)
// this.changeGoodsList = res.change_goods_list;
this.changeGoodsList = res.change_goods_list.filter(item => item.id == this.selectedAsGood);
if (!this.currentGG.goods_name) {
this.currentGG = this.changeGoodsList.find(item => item.id == this.selectedAsGood);
this.currentGGIndex = this.changeGoodsList.indexOf(this.currentGG);

View File

@ -52,16 +52,6 @@ export default {
const selectedText = this.applyRefundReasons[this.selectedReason];
this.$emit('update:showPopup', false);
this.$emit('refundConfirmed', { reason: selectedText });
uni.showModal({
title: '退款申请成功',
content: '将在审核后完成退款',
showCancel: false,
success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
}
}
});
}
},
watch: {

View File

@ -165,37 +165,81 @@ export default {
data() {
return {
status: "",
countdown: "9:59:59",
countdown: "",
orderInfo: {},
};
},
onLoad(options) {
const item = JSON.parse(options?.item);
this.orderInfo = item;
//
item.order_status == "1" ? this.startCountdown() : "";
this.status = JSON.stringify(item.order_status);
this.orderInfo = item;
},
methods: {
startCountdown() {
//
let seconds = 10 * 60; // 10
const timer = setInterval(() => {
seconds--;
//
if (!this.orderInfo.timeout_time_stamp) {
console.error('订单时效时间戳不存在');
return;
}
//
const now = Math.floor(new Date().getTime() / 1000);
const timeoutTime = this.orderInfo.timeout_time_stamp;
//
if (now > timeoutTime) {
//
this.handleOrderCancellation();
return;
}
//
let remainingSeconds = timeoutTime - now;
//
remainingSeconds = Math.max(0, remainingSeconds);
//
const updateCountdownDisplay = (seconds) => {
const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60);
const secs = seconds % 60;
this.countdown = `${hours}:${minutes.toString().padStart(2, "0")}:${secs
.toString()
.padStart(2, "0")}`;
if (seconds <= 0) {
this.countdown = `${hours}:${minutes.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
};
//
updateCountdownDisplay(remainingSeconds);
//
const timer = setInterval(() => {
remainingSeconds--;
updateCountdownDisplay(remainingSeconds);
//
if (remainingSeconds <= 0) {
clearInterval(timer);
//
uni.showToast({ title: "订单已取消", icon: "none" });
setTimeout(() => uni.navigateBack(), 1500);
//
this.handleOrderCancellation();
}
}, 1000);
},
//
handleOrderCancellation() {
const params = {
order_id: this.orderInfo.id,
method: 1,
cancel_reason: '倒计时结束取消',
};
request(afterSaleApi.cancelOrConfirm, "POST", params).then((res) => {
uni.showToast({ title: "订单已取消", icon: "none" });
setTimeout(() => {
uni.navigateBack();
}, 1500);
});
},
cancelOrder() {
uni.showModal({
title: "提示",
@ -264,7 +308,7 @@ export default {
//
const transformedItems = this.orderInfo.commodity_order_item_list.map(goods => ({
isafterSale: true,
orderId: item.id,
orderId: this.orderInfo.id,
commodity_goods_info: {
commodity_brief: "",
commodity_id: goods.goods_id,
@ -298,8 +342,7 @@ export default {
update_time: this.orderInfo.update_time,
user_id: this.orderInfo.user_id
}));
NavgateTo(`/packages/shop/groupPurchaseSubmit/index?shopCarList=${JSON.stringify(transformedItems)}`)
NavgateTo(`/packages/shop/goodsSubmit/index?shopCarList=${JSON.stringify(transformedItems)}`)
},
checkLogistics() {
NavgateTo(`/packages/myOrders/logistics/index`);

View File

@ -4,6 +4,35 @@ page {
padding-bottom: 0;
}
.container {
display: flex;
flex-direction: column;
min-height: calc(100vh - 120rpx);
width: 100%;
}
.searchBox {
display: flex;
align-items: center;
padding: 0 20rpx;
/* margin-top: 35rpx; */
justify-content: space-between;
background-color: #fff;
}
.searchBox_add {
display: flex;
align-items: center;
font-weight: 400;
font-size: 30rpx;
color: #000000;
}
.searchBox_add image {
width: 30rpx;
height: 30rpx;
margin-right: 16rpx;
}
image {
width: 100%;
@ -31,7 +60,7 @@ image {
margin-top: 43rpx;
}
.Msg2 div {
.Msg2 view {
display: flex;
align-items: center;
justify-content: center;
@ -39,6 +68,7 @@ image {
color: #222222;
margin-top: 10rpx;
}
.Msg2 div span{
.Msg2 view span {
color: #FF370B;
}

View File

@ -1,17 +1,24 @@
<template>
<div class="container">
<div class="sucessImg">
<view class="container">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add">
<view class="searchBox_left">
<u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon>
</view>
</view>
</view>
<view class="sucessImg">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit1.png" mode="aspectFill"></image>
</div>
</view>
<div class="Msg1">提交成功</div>
<div class="Msg2">
<div>入驻申请提交成功!</div>
<div>
<view class="Msg1">提交成功</view>
<view class="Msg2">
<view>入驻申请提交成功!</view>
<view>
请耐心等待工作人员处理
</div>
</div>
</div>
</view>
</view>
</view>
</template>
<script>
@ -22,19 +29,27 @@ import {
isPhone,
picUrl,
request,
upload
menuButtonInfo,
upload,
NavgateTo
} from '../../../utils';
export default {
data() {
return {
picUrl,
top: "",
localHeight: "",
}
},
methods: {
back() {
NavgateTo('/pages/index/index')
}
},
onLoad() {
const meun = menuButtonInfo();
this.top = meun.top;
this.localHeight = meun.height;
}
}
</script>

View File

@ -519,7 +519,8 @@
"path": "sucess/index",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#f6f7fb"
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#fff"
}
},
{