wangfukang 1 month ago
parent
commit
3b7b765a3d
  1. 4
      package2/group/groupBuyList.vue
  2. 138
      package2/group/groupBuySingle.vue
  3. 162
      package2/shop/afterService.vue

4
package2/group/groupBuyList.vue

@ -188,7 +188,7 @@
<view class="zaixian">
<image class="zaixian-gif" src="/static/images/img/loading.gif" mode="aspectFit"></image>
<view class="zaixian-divider"></view>
<swiper class="zaixian-swiper" vertical circular :autoplay="false"
<swiper class="zaixian-swiper" vertical circular :autoplay="true"
:interval="onlineWorkerInterval" :duration="onlineWorkerDuration">
<swiper-item v-if="onlineWorkerAreaList.length === 0">
<view class="zaixian-item">宿舍群正在等一个饭搭子</view>
@ -681,7 +681,7 @@
}
.title-sreach {
width: 75%;
width: 68%;
display: flex;
align-items: flex-start;
height: 188rpx;

138
package2/group/groupBuySingle.vue

@ -306,12 +306,20 @@
</view>
</uni-popup>
<!-- 警告弹出层 -->
<uni-popup ref="warnPopup" background-color="#fff">
<view class="warnImg">
<img @tap="$refs.warnPopup.close()"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/4996043b3987401794b974d359429b8e.png"
alt="购物车是空的" style="width:600rpx;height:740rpx;" />
<!-- 未选商品提示弹窗 -->
<uni-popup ref="selectGoodsPopup" background-color="transparent">
<view class="select-goods-popup" @tap.stop>
<view class="select-goods-close" @tap="$refs.selectGoodsPopup.close()">
<uni-icons type="closeempty" size="22" color="#6f7f79"></uni-icons>
</view>
<view class="select-goods-decor decor-left"></view>
<view class="select-goods-decor decor-right"></view>
<view class="select-goods-icon">
<uni-icons type="cart" size="38" color="#20cda8"></uni-icons>
</view>
<view class="select-goods-title">温馨提示~</view>
<view class="select-goods-text">请先选择商品后再下单</view>
<view class="select-goods-btn" @tap="$refs.selectGoodsPopup.close()">我知道了</view>
</view>
</uni-popup>
<!-- 商品详情弹窗 -->
@ -464,8 +472,8 @@
<view v-if="isPintuan" class="pintuan1">
<template v-if="!groupId">
<view class="pintuan2 group-face-btn" @tap.stop="submitPintuan(true)">
<uni-icons type="help" size="16" style="padding-right: 20rpx;margin-top: 4rpx;"
@tap.stop="openMianRemark"></uni-icons>
<uni-icons type="help" size="20" @tap.stop="openMianRemark"></uni-icons>
<text class="group-face-text">面对面团</text>
</view>
<view class="pintuan2 group-submit-btn" @tap.stop="submitPintuan(false)">
{{isStoreGroupOrder ? '发起到店团' : '发起拼团'}}{{selectedGroupRule && selectedGroupRule.groupPrice ? parseFloat(selectedGroupRule.groupPriceAndMore).toFixed(2) : '0.00'}}
@ -1776,7 +1784,7 @@
},
submitCartCheckout() {
if (this.cartItems.length === 0) {
this.$refs.warnPopup.open()
this.$refs.selectGoodsPopup.open()
return;
}
@ -1929,6 +1937,14 @@
return name;
},
changeValue(type) {
let checkedMoreBuy = this.moreBuyList.find(item => item.isChecked && item.id == this.checkMoreBuyIndex);
if (!checkedMoreBuy) {
uni.showToast({
title: '请先选择搭配小食商品',
icon: 'none'
});
return;
}
if (type == 'plus') {
this.vModelValue += 1
} else {
@ -2117,7 +2133,7 @@
position: fixed;
top: 0;
left: 0;
width: 100%;
width: 75%;
display: flex;
align-items: center;
z-index: 100;
@ -2580,6 +2596,99 @@
font-weight: 700;
}
.select-goods-popup {
position: relative;
width: 580rpx;
padding: 58rpx 44rpx 46rpx;
box-sizing: border-box;
border-radius: 44rpx;
background:
radial-gradient(circle at 18% 12%, rgba(166, 255, 234, 0.42) 0, rgba(166, 255, 234, 0) 128rpx),
radial-gradient(circle at 82% 22%, rgba(216, 255, 122, 0.38) 0, rgba(216, 255, 122, 0) 150rpx),
linear-gradient(180deg, #ffffff 0%, #f6fffb 100%);
text-align: center;
box-shadow: 0 28rpx 80rpx rgba(0, 35, 28, 0.18);
overflow: hidden;
}
.select-goods-close {
position: absolute;
top: 22rpx;
right: 22rpx;
width: 52rpx;
height: 52rpx;
border-radius: 50%;
background: rgba(244, 251, 249, 0.95);
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
}
.select-goods-decor {
position: absolute;
border-radius: 999rpx;
background: linear-gradient(135deg, rgba(216, 255, 122, 0.68), rgba(166, 255, 234, 0.72));
filter: blur(1rpx);
}
.decor-left {
width: 150rpx;
height: 46rpx;
top: 22rpx;
left: -44rpx;
transform: rotate(-18deg);
}
.decor-right {
width: 190rpx;
height: 54rpx;
right: -62rpx;
bottom: 118rpx;
transform: rotate(-22deg);
}
.select-goods-icon {
width: 108rpx;
height: 108rpx;
margin: 0 auto 22rpx;
border-radius: 36rpx;
background: linear-gradient(135deg, #e3ff96 0%, #a6ffea 100%);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 16rpx 32rpx rgba(98, 229, 190, 0.25);
transform: rotate(-6deg);
}
.select-goods-title {
color: #153a35;
font-size: 34rpx;
font-weight: 900;
line-height: 48rpx;
}
.select-goods-text {
margin-top: 18rpx;
color: #334943;
font-size: 32rpx;
font-weight: 900;
line-height: 46rpx;
}
.select-goods-btn {
width: 320rpx;
height: 82rpx;
margin: 42rpx auto 0;
border-radius: 999rpx;
background: linear-gradient(90deg, #d8ff7a 0%, #8ff5d8 100%);
color: #153a35;
font-size: 28rpx;
font-weight: 900;
line-height: 82rpx;
box-shadow: 0 16rpx 34rpx rgba(98, 229, 190, 0.28);
}
.num-plus {
width: 56rpx;
height: 56rpx;
@ -3407,6 +3516,15 @@
color: #153a35 !important;
box-shadow: 0 12rpx 24rpx rgba(98, 229, 190, 0.22);
font-weight: 900;
display: flex;
align-items: center;
justify-content: center;
gap: 18rpx;
line-height: normal;
}
.group-face-text {
line-height: 1;
}
@keyframes checkoutTextShine {

162
package2/shop/afterService.vue

@ -29,11 +29,23 @@
{{item.status == 0?'待退款':item.status == 3?'待售后':""}}
</view>
</view>
<view style="height: 180rpx;padding-top: 20rpx;color: #777;">
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;">
<view class="refund-info">
<view class="refund-info-content">
<view>退款原因: <text style="font-weight: 700;color:#00231C;">{{item.refundTypeStatus == 1?'商家原因':item.refundTypeStatus == 2?'配送原因':item.refundTypeStatus == 3?'商家/配送都有原因(需要退配送费)':item.refundTypeStatus == 4?'平台退款':""}}</text></view>
<view>退款类型: <text style="font-weight: 700;color:#00231C;">{{item.refundType == 1?'退商品':item.refundType == 2?'退配送费':item.refundType == 3?'全额退款':""}}</text></view>
<view class="refund-reason-row">
退款/售后原因:
<text class="refund-reason-text">{{item.reason || '无'}}</text>
</view>
<view class="refund-pictures-row" v-if="getPictureList(item.pictures).length > 0">
<view class="refund-pictures-label">退款/售后原因图片:</view>
<view class="refund-pictures">
<image class="refund-picture" v-for="(picture,pictureIndex) in getPictureList(item.pictures)"
:key="pictureIndex" :src="picture" mode="aspectFill"
@tap.stop="previewRefundImage(item.pictures,pictureIndex)"></image>
</view>
</view>
<view style="text-align: right;">退款金额: <text style="color:red;font-size: 34rpx;font-weight: 700;">{{item.refundAmount}}</text></view>
</view>
</view>
@ -43,11 +55,11 @@
查看订单
</view>
</view>
<view class="btn" @tap="returnAmountAllow(item,0)" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
不同意
<view class="btn" :class="{'btn-disabled': submitLoading}" @tap="returnAmountAllow(item,0)" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
{{submitLoading ? '处理中' : '不同意'}}
</view>
<view class="btn" @tap="returnAmountAllow(item,1)" style="margin-left: 10px;">
同意
<view class="btn" :class="{'btn-disabled': submitLoading}" @tap="returnAmountAllow(item,1)" style="margin-left: 10px;">
{{submitLoading ? '处理中' : '同意'}}
</view>
</view>
</view>
@ -168,7 +180,8 @@
goodsList:[],
orderDetail:{},
returnData:[],
returnCount:0
returnCount:0,
submitLoading:false
}
},
filters:{
@ -247,7 +260,7 @@
}else{
this.searchCountForm.linkId = uni.getStorageSync('shopId')
}
this.tui.request("/mall/refund/page", "POST", this.searchCountForm, false, false).then((res) => {
return this.tui.request("/mall/refund/page", "POST", this.searchCountForm, false, false).then((res) => {
if (res.code == 200 && res.result != null) {
that.returnCount = res.result.records.length;
that.returnData = res.result.records
@ -259,9 +272,26 @@
uni.hideLoading();
}).catch((res) => {});
},
getPictureList(pictures) {
if (pictures == null || pictures === '') return [];
if (Array.isArray(pictures)) {
return pictures.filter(item => item != null && item !== '');
}
return String(pictures).split(',').map(item => item.trim()).filter(item => item !== '');
},
previewRefundImage(pictures, index) {
const urls = this.getPictureList(pictures);
if (urls.length === 0) return;
uni.previewImage({
urls,
current: urls[index]
});
},
returnAmountAllow(item,status){
if (this.submitLoading) return;
let titleText = status == 1 ? '确定同意该申请吗?' : '确定拒绝该申请吗?';
//退
this.groupOrderIdList = [];
if(item.groupOrderIds != null && item.groupOrderIds != ''){
titleText += '该订单为面对面配送单,所有参团订单将同步处理';
@ -271,8 +301,6 @@
this.groupOrderIdList.push(this.returnData[i]);
}
}
}else{
this.groupOrderIdList = []
}
// 2.
@ -281,56 +309,68 @@
content: titleText,
success: (res) => {
if (res.confirm) {
this.submitLoading = true;
uni.showLoading({
title: '处理中',
mask: true
});
let requestList = [];
if(this.groupOrderIdList != [] && this.groupOrderIdList.length > 0){
for(let i = 0; i < this.groupOrderIdList.length;i++){
this.processReturn(this.groupOrderIdList[i], status);
requestList.push(this.processReturn(this.groupOrderIdList[i], status));
}
}else{
this.processReturn(item, status);
requestList.push(this.processReturn(item, status));
}
Promise.all(requestList).then((messageList) => {
this.tui.toast(messageList[0] || '操作成功');
return this.getReturnCount();
}).catch((message) => {
this.tui.toast(message || '操作失败');
}).then(() => {
this.submitLoading = false;
uni.hideLoading();
});
}
}
});
},
processReturn(item,status){
let url = ''
let returnFormData = {}
//退
if(item.status == 0){
//
if(status == 0){
this.returnFormData.status = 2
returnFormData.status = 2
}else{
this.returnFormData.status = 1
returnFormData.status = 1
}
}else if(item.status == 3){
//
if(status == 0){
this.returnFormData.status = 5
returnFormData.status = 5
}else{
this.returnFormData.status = 4
returnFormData.status = 4
}
}
this.returnFormData.id = item.id;
this.returnFormData.linkId = item.linkId;
this.returnFormData.orderId = item.orderId;
this.returnFormData.deliveryType = item.mallOrder.deliveryType;
this.returnFormData.orderType = item.mallOrder.orderType;
this.returnFormData.refundAmount = item.refundAmount;
this.returnFormData.refundType = item.refundType;
this.returnFormData.refundTypeStatus = item.refundTypeStatus;
let that = this
this.tui.request("/mall/refund/allowOrReject", "POST", this.returnFormData, false, false).then((res) => {
returnFormData.id = item.id;
returnFormData.linkId = item.linkId;
returnFormData.orderId = item.orderId;
returnFormData.deliveryType = item.mallOrder.deliveryType;
returnFormData.orderType = item.mallOrder.orderType;
returnFormData.refundAmount = item.refundAmount;
returnFormData.refundType = item.refundType;
returnFormData.refundTypeStatus = item.refundTypeStatus;
return this.tui.request("/mall/refund/allowOrReject", "POST", returnFormData, false, false).then((res) => {
if (res.code == 200) {
that.tui.toast(res.message);
this.getReturnCount()
that.$forceUpdate();
return res.message;
} else {
that.tui.toast(res.message);
return;
return Promise.reject(res.message);
}
uni.hideLoading();
}).catch((res) => {});
}).catch((res) => {
return Promise.reject(res && res.message ? res.message : res);
});
},
back() {
uni.navigateBack()
@ -342,23 +382,27 @@
<style lang="scss">
page {
width: 100%;
height: 100%;
min-height: 100%;
font-size: 24rpx;
background: #F5F8F5;
color: #00231C;
overflow-y: auto;
}
.page1 {
width: 100%;
height: 100%;
min-height: 100vh;
font-size: 24rpx;
position: relative;
overflow-y: auto;
padding-bottom: 80rpx;
box-sizing: border-box;
}
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
width: 100%;
height: 20%;
height: 260rpx;
}
.title-sreach {
@ -382,7 +426,8 @@
text-align: center;
}
.content{
margin: -100rpx auto;
margin: -100rpx auto 0;
padding-bottom: 60rpx;
}
.box1 {
width: 95%;
@ -390,6 +435,41 @@
background: #fff;
border-radius: 20rpx;
padding: 20rpx;
box-sizing: border-box;
}
.refund-info {
padding-top: 20rpx;
color: #777;
}
.refund-info-content {
font-size: 28rpx;
line-height: 50rpx;
}
.refund-reason-row {
line-height: 42rpx;
}
.refund-reason-text {
color: #00231C;
font-weight: 700;
word-break: break-all;
}
.refund-pictures-row {
margin: 10rpx 0;
line-height: 40rpx;
}
.refund-pictures-label {
margin-bottom: 10rpx;
}
.refund-pictures {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
}
.refund-picture {
width: 140rpx;
height: 140rpx;
border-radius: 14rpx;
background: #f0f5f3;
}
.btn{
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
@ -401,6 +481,10 @@
font-weight: 700;
margin-top: 20rpx;
}
.btn-disabled {
opacity: 0.6;
pointer-events: none;
}
.popup-area-title {
font-size: 36rpx;
font-weight: bold;

Loading…
Cancel
Save