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

View File

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

View File

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

View File

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

View File

@ -165,37 +165,81 @@ export default {
data() { data() {
return { return {
status: "", status: "",
countdown: "9:59:59", countdown: "",
orderInfo: {}, orderInfo: {},
}; };
}, },
onLoad(options) { onLoad(options) {
const item = JSON.parse(options?.item); const item = JSON.parse(options?.item);
this.orderInfo = item;
// //
item.order_status == "1" ? this.startCountdown() : ""; item.order_status == "1" ? this.startCountdown() : "";
this.status = JSON.stringify(item.order_status); this.status = JSON.stringify(item.order_status);
this.orderInfo = item;
}, },
methods: { methods: {
startCountdown() { startCountdown() {
// //
let seconds = 10 * 60; // 10 if (!this.orderInfo.timeout_time_stamp) {
const timer = setInterval(() => { console.error('订单时效时间戳不存在');
seconds--; 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 hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60); const minutes = Math.floor((seconds % 3600) / 60);
const secs = seconds % 60; const secs = seconds % 60;
this.countdown = `${hours}:${minutes.toString().padStart(2, "0")}:${secs this.countdown = `${hours}:${minutes.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
.toString() };
.padStart(2, "0")}`;
if (seconds <= 0) { //
updateCountdownDisplay(remainingSeconds);
//
const timer = setInterval(() => {
remainingSeconds--;
updateCountdownDisplay(remainingSeconds);
//
if (remainingSeconds <= 0) {
clearInterval(timer); clearInterval(timer);
// //
uni.showToast({ title: "订单已取消", icon: "none" }); this.handleOrderCancellation();
setTimeout(() => uni.navigateBack(), 1500);
} }
}, 1000); }, 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() { cancelOrder() {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
@ -217,7 +261,7 @@ export default {
}, },
}); });
}, },
// 退 // 退
applyRefund() { applyRefund() {
uni.showModal({ uni.showModal({
@ -238,7 +282,7 @@ export default {
} }
}); });
}, },
// //
confirmReceiving() { confirmReceiving() {
uni.showModal({ uni.showModal({
@ -264,7 +308,7 @@ export default {
// //
const transformedItems = this.orderInfo.commodity_order_item_list.map(goods => ({ const transformedItems = this.orderInfo.commodity_order_item_list.map(goods => ({
isafterSale: true, isafterSale: true,
orderId: item.id, orderId: this.orderInfo.id,
commodity_goods_info: { commodity_goods_info: {
commodity_brief: "", commodity_brief: "",
commodity_id: goods.goods_id, commodity_id: goods.goods_id,
@ -298,8 +342,7 @@ export default {
update_time: this.orderInfo.update_time, update_time: this.orderInfo.update_time,
user_id: this.orderInfo.user_id user_id: this.orderInfo.user_id
})); }));
NavgateTo(`/packages/shop/goodsSubmit/index?shopCarList=${JSON.stringify(transformedItems)}`)
NavgateTo(`/packages/shop/groupPurchaseSubmit/index?shopCarList=${JSON.stringify(transformedItems)}`)
}, },
checkLogistics() { checkLogistics() {
NavgateTo(`/packages/myOrders/logistics/index`); NavgateTo(`/packages/myOrders/logistics/index`);
@ -308,7 +351,7 @@ export default {
orderEvaluate() { orderEvaluate() {
NavgateTo(`/packages/myOrders/orderEvaluate/index?item=${JSON.stringify(this.orderInfo)}`); NavgateTo(`/packages/myOrders/orderEvaluate/index?item=${JSON.stringify(this.orderInfo)}`);
}, },
// //
afterSale() { afterSale() {
NavgateTo(`/packages/myOrders/afterSale/index`); NavgateTo(`/packages/myOrders/afterSale/index`);

View File

@ -4,6 +4,35 @@ page {
padding-bottom: 0; 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 { image {
width: 100%; width: 100%;
@ -31,7 +60,7 @@ image {
margin-top: 43rpx; margin-top: 43rpx;
} }
.Msg2 div { .Msg2 view {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -39,6 +68,7 @@ image {
color: #222222; color: #222222;
margin-top: 10rpx; margin-top: 10rpx;
} }
.Msg2 div span{
.Msg2 view span {
color: #FF370B; color: #FF370B;
} }

View File

@ -1,17 +1,24 @@
<template> <template>
<div class="container"> <view class="container">
<div class="sucessImg"> <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> <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/enter_audit1.png" mode="aspectFill"></image>
</div> </view>
<div class="Msg1">提交成功</div> <view class="Msg1">提交成功</view>
<div class="Msg2"> <view class="Msg2">
<div>入驻申请提交成功!</div> <view>入驻申请提交成功!</view>
<div> <view>
请耐心等待工作人员处理 请耐心等待工作人员处理
</div> </view>
</div> </view>
</div> </view>
</template> </template>
<script> <script>
@ -22,19 +29,27 @@ import {
isPhone, isPhone,
picUrl, picUrl,
request, request,
upload menuButtonInfo,
upload,
NavgateTo
} from '../../../utils'; } from '../../../utils';
export default { export default {
data() { data() {
return { return {
picUrl, picUrl,
top: "",
localHeight: "",
} }
}, },
methods: { methods: {
back() {
NavgateTo('/pages/index/index')
}
}, },
onLoad() { onLoad() {
const meun = menuButtonInfo();
this.top = meun.top;
this.localHeight = meun.height;
} }
} }
</script> </script>

View File

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