Compare commits
8 Commits
4b8d27d912
...
b008e2766e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b008e2766e | ||
|
|
a94b70f442 | ||
|
|
571a5738ac | ||
|
|
b55b13596d | ||
|
|
e2b284f048 | ||
|
|
9fe388e5d8 | ||
|
|
f5c197620c | ||
|
|
3ed1cbed6d |
@ -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) => {
|
||||||
|
uni.showToast({ title: "申请售后成功", icon: "sucess" }), setTimeout(() => {
|
||||||
this.getOrderList();
|
this.getOrderList();
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -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{
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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: {
|
||||||
|
|||||||
@ -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: "提示",
|
||||||
@ -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`);
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
@ -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>
|
||||||
|
|||||||
@ -519,7 +519,8 @@
|
|||||||
"path": "sucess/index",
|
"path": "sucess/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarBackgroundColor": "#f6f7fb"
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user