tianyi 1 month ago
parent
commit
3df5fd1c2e
  1. 2
      package1/buyFood/buyFood.vue
  2. 1
      package1/order/orderDetail.vue
  3. 486
      package1/order/returnOrder.vue

2
package1/buyFood/buyFood.vue

@ -1345,6 +1345,8 @@
border: 2rpx solid #e8eeee; border: 2rpx solid #e8eeee;
margin: 0 18rpx 0 0; margin: 0 18rpx 0 0;
background: #fff; background: #fff;
text-align: center;
line-height: 42rpx;
} }
.buy-bottom { .buy-bottom {

1
package1/order/orderDetail.vue

@ -1108,7 +1108,6 @@
that.$forceUpdate(); that.$forceUpdate();
} else { } else {
that.tui.toast(res.message); that.tui.toast(res.message);
return;
} }
uni.hideLoading(); uni.hideLoading();
}).catch((res) => {}); }).catch((res) => {});

486
package1/order/returnOrder.vue

@ -18,7 +18,9 @@
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;"> <view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;">
{{orderDetail.shopName}} {{orderDetail.shopName}}
</view> </view>
<view v-for="(item1,index1) in orderDetail.goodsList" :key="index1" v-if="orderDetail.goodsList != null && orderDetail.goodsList.length > 0" style="display: flex;padding: 20rpx;background: rgba(247, 248, 248, 0.6);border-radius: 20rpx;"> <view v-for="(item1,index1) in orderDetail.goodsList" :key="index1"
v-if="orderDetail.goodsList != null && orderDetail.goodsList.length > 0"
style="display: flex;padding: 20rpx;background: rgba(247, 248, 248, 0.6);border-radius: 20rpx;">
<view class="goods-img"> <view class="goods-img">
<img :src="item1.productPicture" alt=""> <img :src="item1.productPicture" alt="">
</view> </view>
@ -40,7 +42,7 @@
</view> </view>
<view class="goods-content-center"> <view class="goods-content-center">
<view class="goods-deal1"> <view class="goods-deal1">
{{item1.specs}} {{item1.specs | delNode}}
</view> </view>
</view> </view>
<view class="goods-content-bottom"> <view class="goods-content-bottom">
@ -54,7 +56,8 @@
</view> </view>
</view> </view>
<view> <view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.packageFee != null && orderDetail.packageFee > 0"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.packageFee != null && orderDetail.packageFee > 0">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
打包费 打包费
</view> </view>
@ -62,7 +65,8 @@
{{orderDetail.packageFee}} {{orderDetail.packageFee}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
配送费 配送费
</view> </view>
@ -70,7 +74,8 @@
{{orderDetail.deliveryFee}} {{orderDetail.deliveryFee}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.userCouponNum > 0"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.userCouponNum > 0">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
优惠券 优惠券
</view> </view>
@ -79,7 +84,8 @@
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;height: 80rpx;line-height: 100rpx;border-top: 1px solid #eee;font-size: 32rpx;font-weight: 700;"> <view
style="display: flex;height: 80rpx;line-height: 100rpx;border-top: 1px solid #eee;font-size: 32rpx;font-weight: 700;">
<view style="flex: 1;"> <view style="flex: 1;">
实付 实付
</view> </view>
@ -98,7 +104,8 @@
北校区1号宿舍楼5楼512(0702) 北校区1号宿舍楼5楼512(0702)
</view> </view>
</view> --> </view> -->
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.numberCode != null"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.numberCode != null">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
订单号 订单号
</view> </view>
@ -114,18 +121,21 @@
{{orderDetail.createTime | formatTime}} {{orderDetail.createTime | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
配送员 配送员
</view> </view>
<view style="color: #000;font-weight: 700;" v-if="orderDetail.deliveryInfo.workerId != null && orderDetail.deliveryInfo.workerId != ''"> <view style="color: #000;font-weight: 700;"
v-if="orderDetail.deliveryInfo.workerId != null && orderDetail.deliveryInfo.workerId != ''">
{{orderDetail.deliveryInfo.workerName != null ? orderDetail.deliveryInfo.workerName : ''}} {{orderDetail.deliveryInfo.workerName != null ? orderDetail.deliveryInfo.workerName : ''}}
</view> </view>
<view style="color: #000;font-weight: 700;" v-else> <view style="color: #000;font-weight: 700;" v-else>
未指定等待接单中 未指定等待接单中
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
配送员接单时间 配送员接单时间
</view> </view>
@ -133,15 +143,18 @@
{{orderDetail.deliveryInfo.acceptTime | formatTime}} {{orderDetail.deliveryInfo.acceptTime | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
商家出餐时间 商家出餐时间
</view> </view>
<view style="color: #000;font-weight: 700;" v-if="orderDetail.deliveryInfo.workerId != null && orderDetail.deliveryInfo.workerId != ''"> <view style="color: #000;font-weight: 700;"
v-if="orderDetail.deliveryInfo.workerId != null && orderDetail.deliveryInfo.workerId != ''">
{{orderDetail.shopMakeTime ? orderDetail.shopMakeTime : '' | formatTime}} {{orderDetail.shopMakeTime ? orderDetail.shopMakeTime : '' | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
配送员到店时间 配送员到店时间
</view> </view>
@ -149,7 +162,8 @@
{{orderDetail.deliveryInfo.arriveTime ? orderDetail.deliveryInfo.arriveTime : '' | formatTime}} {{orderDetail.deliveryInfo.arriveTime ? orderDetail.deliveryInfo.arriveTime : '' | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
配送员取货时间 配送员取货时间
</view> </view>
@ -157,7 +171,8 @@
{{orderDetail.deliveryInfo.getTime ? orderDetail.deliveryInfo.getTime : '' | formatTime}} {{orderDetail.deliveryInfo.getTime ? orderDetail.deliveryInfo.getTime : '' | formatTime}}
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1 && orderDetail.deliveryInfo.workerId != ''">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
配送员送达时间 配送员送达时间
</view> </view>
@ -166,7 +181,8 @@
</view> </view>
</view> </view>
<view style="height: 80rpx;line-height: 80rpx;display: flex;" v-if="orderDetail.deliveryType == 1"> <view style="height: 80rpx;line-height: 80rpx;display: flex;"
v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
送达时间 送达时间
</view> </view>
@ -174,7 +190,8 @@
{{orderDetail.deliveryInfo.finishTime ? orderDetail.deliveryInfo.finishTime : '尽快送达' | formatTime}} {{orderDetail.deliveryInfo.finishTime ? orderDetail.deliveryInfo.finishTime : '尽快送达' | formatTime}}
</view> </view>
</view> </view>
<view style="height: 160rpx;line-height: 160rpx;display: flex;" v-if="orderDetail.deliveryType == 1"> <view style="height: 160rpx;line-height: 160rpx;display: flex;"
v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
上传图片 上传图片
</view> </view>
@ -184,28 +201,29 @@
<uni-icons type="camera" size="28" color="#777"></uni-icons> <uni-icons type="camera" size="28" color="#777"></uni-icons>
</view> </view>
<view style="overflow-x: scroll;display: flex;width: 350rpx;"> <view style="overflow-x: scroll;display: flex;width: 350rpx;">
<view v-if="returnData.pictures !=''" style="width: 160rpx;height: 160rpx;margin-left: 20rpx;"> <view v-if="returnData.pictures !=''"
style="width: 160rpx;height: 160rpx;margin-left: 20rpx;">
<img :src="returnData.pictures" alt="" class="upload-img"> <img :src="returnData.pictures" alt="" class="upload-img">
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="height: 170rpx;line-height: 170rpx;display: flex;margin-top: 40rpx;" v-if="orderDetail.deliveryType == 1"> <view style="height: 170rpx;line-height: 170rpx;display: flex;margin-top: 40rpx;"
v-if="orderDetail.deliveryType == 1">
<view style="flex: 1;color: #777;font-weight: 700;"> <view style="flex: 1;color: #777;font-weight: 700;">
订单备注 订单备注
</view> </view>
<view style="height: 200rpx;background: rgba(247, 248, 248, 0.6);border-radius: 40rpx;padding: 20rpx;width: 70%;"> <view
<textarea name="" id="" cols="30" rows="10" placeholder="请填写备注" v-model="returnData.reason" style="height: 200rpx;background: rgba(247, 248, 248, 0.6);border-radius: 40rpx;padding: 20rpx;width: 70%;">
style="height: 160rpx;width: 100%;"></textarea> <textarea name="" id="" cols="30" rows="10" placeholder="请填写备注"
v-model="returnData.reason" style="height: 160rpx;width: 100%;"></textarea>
</view> </view>
</view> </view>
<view class="btn" <view class="btn" @tap.stop="$refs.carPopup.open()">
@tap.stop="$refs.carPopup.open()">
售后原因 售后原因
</view> </view>
<view class="btn" <view class="btn" @tap.stop="submit()">
@tap.stop="submit()">
申请售后{{returnData.refundAmount}} 申请售后{{returnData.refundAmount}}
</view> </view>
</view> </view>
@ -223,7 +241,7 @@
选择退款原因 选择退款原因
</view> </view>
<view style="padding: 0 20rpx;"> <view style="padding: 0 20rpx;">
<view style="height:80rpx;" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1"> <view style="height:80rpx;" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==0" name="sellTime" @click="checkSellTime(0)" /> <radio :checked="sellTime==0" name="sellTime" @click="checkSellTime(0)" />
商品退款 商品退款
</view> </view>
@ -231,7 +249,7 @@
<radio :checked="sellTime==1" name="sellTime" @click="checkSellTime(1)" /> <radio :checked="sellTime==1" name="sellTime" @click="checkSellTime(1)" />
退配送费 退配送费
</view> </view>
<view style="height:80rpx;" v-if="orderDetail.otherOrder != 1"> <view style="height:80rpx;" v-if="orderDetail.otherOrder != 1">
<radio :checked="sellTime==2" name="sellTime" @click="checkSellTime(2)" /> <radio :checked="sellTime==2" name="sellTime" @click="checkSellTime(2)" />
全额退款商家原因 全额退款商家原因
</view> </view>
@ -240,12 +258,12 @@
<radio :checked="sellTime==3" name="sellTime" @click="checkSellTime(3)" /> <radio :checked="sellTime==3" name="sellTime" @click="checkSellTime(3)" />
全额退款配送员原因 全额退款配送员原因
</view> </view>
<view style="height:80rpx;" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1"> <view style="height:80rpx;" v-if="orderDetail.deliveryType ==1 && orderDetail.otherOrder != 1">
<radio :checked="sellTime==4" name="sellTime" @click="checkSellTime(4)" /> <radio :checked="sellTime==4" name="sellTime" @click="checkSellTime(4)" />
全额退款商家+配送员原因 全额退款商家+配送员原因
</view> </view>
</view> </view>
<view class="btn" @tap="chooseReturnType()">确认</view> <view class="btn" @tap="chooseReturnType()">确认</view>
</view> </view>
</uni-popup> </uni-popup>
@ -253,7 +271,8 @@
<view class="guize-list"> <view class="guize-list">
<view style="height: 80rpx;line-height: 80rpx;font-size: 36rpx;font-weight: 700;text-align: center;"> <view style="height: 80rpx;line-height: 80rpx;font-size: 36rpx;font-weight: 700;text-align: center;">
确定要取消订单吗 确定要取消订单吗
<text v-if="payData.status == 2 || payData.status == 3 || payData.status == 4 || payData.status == 4">取消订单需要商家同意</text> <text
v-if="payData.status == 2 || payData.status == 3 || payData.status == 4 || payData.status == 4">取消订单需要商家同意</text>
</view> </view>
<view class="btn" @tap="returnOrder()"> <view class="btn" @tap="returnOrder()">
确认取消 确认取消
@ -267,66 +286,83 @@
export default { export default {
data() { data() {
return { return {
sellTime:0, sellTime: 0,
pintuan:false, pintuan: false,
menuButtonInfo: {}, menuButtonInfo: {},
orderId:'', orderId: '',
vModelValue:0, vModelValue: 0,
returnData:{ returnData: {
refundAmount:0 refundAmount: 0
}, },
payData:{}, payData: {},
orderDetail:{}, orderDetail: {},
codeImg:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg' codeImg: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/3a4e68eb14d7417cbb4f15fa85907c64.jpg'
} }
}, },
components: { components: {
}, },
filters: { filters: {
formatHourMinute(value) { formatHourMinute(value) {
if (!value) return ''; if (!value) return '';
const date = new Date(value);
const date = new Date(value); // (getDate)0
const day = String(date.getDate()).padStart(2, '0');
// (getDate)0 // (getHours)0
const day = String(date.getDate()).padStart(2, '0'); const hour = String(date.getHours()).padStart(2, '0');
// (getHours)0 // (getMinutes)0
const hour = String(date.getHours()).padStart(2, '0'); const minute = String(date.getMinutes()).padStart(2, '0');
// (getMinutes)0 // --:
const minute = String(date.getMinutes()).padStart(2, '0'); return `${day}-${hour}:${minute}`;
},
formatTime(value) {
if (!value) return '';
// --: const date = new Date(value);
return `${day}-${hour}:${minute}`;
},
formatTime(value) {
if (!value) return '';
const date = new Date(value); //
const year = date.getFullYear();
// // (getMonth 0-11 +1)0
const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, '0');
// (getMonth 0-11 +1)0 // (getDate)0
const month = String(date.getMonth() + 1).padStart(2, '0'); const day = String(date.getDate()).padStart(2, '0');
// (getDate)0 // (getHours)0
const day = String(date.getDate()).padStart(2, '0'); const hour = String(date.getHours()).padStart(2, '0');
// (getHours)0 // (getMinutes)0
const hour = String(date.getHours()).padStart(2, '0'); const minute = String(date.getMinutes()).padStart(2, '0');
// (getMinutes)0 // (getSeconds)0
const minute = String(date.getMinutes()).padStart(2, '0'); const second = String(date.getSeconds()).padStart(2, '0');
// (getSeconds)0 // -- ::
const second = String(date.getSeconds()).padStart(2, '0'); return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
},
delNode(data) {
// 1.
let str;
if (typeof data === 'object' && data !== null) {
// JSON
str = JSON.stringify(data);
} else if (typeof data === 'string') {
str = data;
} else {
//
str = String(data);
}
// -- :: // 2. { } "
return `${year}-${month}-${day} ${hour}:${minute}:${second}`; const result = str.replace(/[{}"]/g, '');
} return result;
}
}, },
onLoad(option) { onLoad(option) {
if (option.order) { if (option.order) {
@ -338,32 +374,32 @@
this.$refs.carPopup.open(); this.$refs.carPopup.open();
}, },
methods: { methods: {
chooseReturnType(){ chooseReturnType() {
this.$refs.carPopup.close() this.$refs.carPopup.close()
if(this.sellTime == 0){ if (this.sellTime == 0) {
this.returnData.refundAmount = 0 this.returnData.refundAmount = 0
this.returnData.refundType = 1 this.returnData.refundType = 1
}else if(this.sellTime == 1){ } else if (this.sellTime == 1) {
this.returnData.refundAmount = this.orderDetail.deliveryFee this.returnData.refundAmount = this.orderDetail.deliveryFee
this.returnData.refundType = 2 this.returnData.refundType = 2
}else if(this.sellTime == 2){ } else if (this.sellTime == 2) {
this.returnData.refundAmount = this.orderDetail.totalAmount this.returnData.refundAmount = this.orderDetail.totalAmount
this.returnData.refundType = 3 this.returnData.refundType = 3
this.returnData.refundTypeStatus = 1 this.returnData.refundTypeStatus = 1
}else if(this.sellTime == 3){ } else if (this.sellTime == 3) {
this.returnData.refundAmount = this.orderDetail.totalAmount this.returnData.refundAmount = this.orderDetail.totalAmount
this.returnData.refundType = 3 this.returnData.refundType = 3
this.returnData.refundTypeStatus = 2 this.returnData.refundTypeStatus = 2
}else{ } else {
this.returnData.refundAmount = this.orderDetail.totalAmount this.returnData.refundAmount = this.orderDetail.totalAmount
this.returnData.refundType = 3 this.returnData.refundType = 3
this.returnData.refundTypeStatus = 3 this.returnData.refundTypeStatus = 3
} }
this.changeProduct() this.changeProduct()
}, },
changeProduct(){ changeProduct() {
for(let i = 0; i< this.orderDetail.goodsList.length;i++){ for (let i = 0; i < this.orderDetail.goodsList.length; i++) {
if(this.orderDetail.goodsList[i].returnCount){ if (this.orderDetail.goodsList[i].returnCount) {
this.orderDetail.goodsList[i].returnCount = 0 this.orderDetail.goodsList[i].returnCount = 0
} }
} }
@ -414,26 +450,27 @@
uni.hideLoading(); uni.hideLoading();
}, 1000) }, 1000)
}, },
checkSellTime(type){ checkSellTime(type) {
this.sellTime = type; this.sellTime = type;
}, },
submit(){ submit() {
this.returnData.orderId = this.orderDetail.id this.returnData.orderId = this.orderDetail.id
this.returnData.userId = this.orderDetail.userId this.returnData.userId = this.orderDetail.userId
this.returnData.shopId = this.orderDetail.shopId this.returnData.shopId = this.orderDetail.shopId
this.returnData.totalAmount = this.orderDetail.totalAmount this.returnData.totalAmount = this.orderDetail.totalAmount
this.returnData.goodsAmount = this.orderDetail.goodsAmount this.returnData.goodsAmount = this.orderDetail.goodsAmount
this.returnData.packageFee = this.orderDetail.packageFee this.returnData.packageFee = this.orderDetail.packageFee
if(this.orderDetail.deliveryInfo){ if (this.orderDetail.deliveryInfo) {
this.returnData.workerId = this.orderDetail.deliveryInfo.workerId this.returnData.workerId = this.orderDetail.deliveryInfo.workerId
this.returnData.deliveryFee = this.orderDetail.deliveryFee this.returnData.deliveryFee = this.orderDetail.deliveryFee
} }
this.returnData.items = []; this.returnData.items = [];
for(let i = 0; i< this.orderDetail.goodsList.length;i++){ for (let i = 0; i < this.orderDetail.goodsList.length; i++) {
if(this.orderDetail.goodsList[i].returnCount){ if (this.orderDetail.goodsList[i].returnCount) {
this.orderDetail.goodsList[i].quantity = this.orderDetail.goodsList[i].returnCount this.orderDetail.goodsList[i].quantity = this.orderDetail.goodsList[i].returnCount
if(this.orderDetail.deliveryType == 1){ if (this.orderDetail.deliveryType == 1) {
this.orderDetail.goodsList[i].price = Number(this.orderDetail.goodsList[i].price) + Number(this.orderDetail.goodsList[i].packageFee) this.orderDetail.goodsList[i].price = Number(this.orderDetail.goodsList[i].price) + Number(this
.orderDetail.goodsList[i].packageFee)
} }
this.returnData.items.push(this.orderDetail.goodsList[i]) this.returnData.items.push(this.orderDetail.goodsList[i])
} }
@ -441,7 +478,7 @@
uni.showLoading({ uni.showLoading({
title: '提交售后中...' title: '提交售后中...'
}); });
this.tui.request("/mall/refund/create", "POST", this.returnData, false, false).then(res => { this.tui.request("/mall/refund/create", "POST", this.returnData, false, false).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 200) { if (res.code == 200) {
uni.redirectTo({ uni.redirectTo({
@ -457,54 +494,62 @@
uni.hideLoading(); uni.hideLoading();
}); });
}, },
openCode(){ openCode() {
this.$refs.imgPopup.open() this.$refs.imgPopup.open()
}, },
orderStatus(item){ orderStatus(item) {
if(item.status == 0 || item.status == 10 || item.status == 2 || (item.status == 3 && item.deliveryType == 1) || (item.status == 3 && item.deliveryType == 2) || item.status == 4){ if (item.status == 0 || item.status == 10 || item.status == 2 || (item.status == 3 && item.deliveryType ==
1) || (item.status == 3 && item.deliveryType == 2) || item.status == 4) {
return true; return true;
} }
return false; return false;
}, },
returnPopupProp(item){ returnPopupProp(item) {
this.payData = item; this.payData = item;
this.$refs.returnPopup.open('bottom'); this.$refs.returnPopup.open('bottom');
}, },
changeValue(type,index) { changeValue(type, index) {
console.log(this.orderDetail.goodsList[index]) console.log(this.orderDetail.goodsList[index])
if(!this.orderDetail.goodsList[index].returnCount){ if (!this.orderDetail.goodsList[index].returnCount) {
this.orderDetail.goodsList[index].returnCount = 0 this.orderDetail.goodsList[index].returnCount = 0
} }
if(type == 'plus'){ if (type == 'plus') {
if((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index].quantity){ if ((this.orderDetail.goodsList[index].returnCount + 1) <= this.orderDetail.goodsList[index]
.quantity) {
this.orderDetail.goodsList[index].returnCount += 1 this.orderDetail.goodsList[index].returnCount += 1
if(this.orderDetail.deliveryType == 1){ if (this.orderDetail.deliveryType == 1) {
this.returnData.refundAmount += Number(Number(this.orderDetail.goodsList[index].price + this.orderDetail.goodsList[index].packageFee).toFixed(2)) this.returnData.refundAmount += Number(Number(this.orderDetail.goodsList[index].price + this
}else{ .orderDetail.goodsList[index].packageFee).toFixed(2))
} else {
this.returnData.refundAmount += Number(this.orderDetail.goodsList[index].price) this.returnData.refundAmount += Number(this.orderDetail.goodsList[index].price)
} }
this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2)) this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2))
} }
}else{ } else {
if(this.orderDetail.goodsList[index].returnCount > 0){ if (this.orderDetail.goodsList[index].returnCount > 0) {
if(this.orderDetail.deliveryType == 1){ if (this.orderDetail.deliveryType == 1) {
this.returnData.refundAmount -= Number(Number(this.orderDetail.goodsList[index].price + this.orderDetail.goodsList[index].packageFee).toFixed(2)) this.returnData.refundAmount -= Number(Number(this.orderDetail.goodsList[index].price + this
}else{ .orderDetail.goodsList[index].packageFee).toFixed(2))
} else {
this.returnData.refundAmount -= Number(this.orderDetail.goodsList[index].price) this.returnData.refundAmount -= Number(this.orderDetail.goodsList[index].price)
} }
this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2)) this.returnData.refundAmount = Number(this.returnData.refundAmount.toFixed(2))
} }
this.orderDetail.goodsList[index].returnCount = this.orderDetail.goodsList[index].returnCount > 0 ?this.orderDetail.goodsList[index].returnCount -= 1:0 this.orderDetail.goodsList[index].returnCount = this.orderDetail.goodsList[index].returnCount > 0 ?
this.orderDetail.goodsList[index].returnCount -= 1 : 0
} }
this.$forceUpdate() this.$forceUpdate()
}, },
returnOrder(){ returnOrder() {
this.$refs.returnPopup.close(); this.$refs.returnPopup.close();
let item = this.payData let item = this.payData
let that = this let that = this
that.tui.request("/mall/order/cancel", "POST", {orderId:item.id,userId:uni.getStorageSync('id')}, false, true).then((res) => { that.tui.request("/mall/order/cancel", "POST", {
orderId: item.id,
userId: uni.getStorageSync('id')
}, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.tui.toast("取消订单成功"); that.tui.toast("取消订单成功");
that.getOrderDetail(item.id) that.getOrderDetail(item.id)
@ -516,18 +561,18 @@
uni.hideLoading(); uni.hideLoading();
}).catch((res) => {}); }).catch((res) => {});
}, },
refreah(item){ refreah(item) {
this.getOrderDetail(item.id) this.getOrderDetail(item.id)
this.$forceUpdate(); this.$forceUpdate();
}, },
getOrderDetail(id){ getOrderDetail(id) {
let that = this let that = this
that.tui.request("/mall/order/detail/"+id, "GET", {}, false, true).then((res) => { that.tui.request("/mall/order/detail/" + id, "GET", {}, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.orderDetail = res.result; that.orderDetail = res.result;
if(that.orderDetail.groupInfo){ if (that.orderDetail.groupInfo) {
// 0: 1: 2: 3:() // 0: 1: 2: 3:()
if(that.orderDetail.groupInfo.status != 1 && that.orderDetail.groupInfo.status != 2){ if (that.orderDetail.groupInfo.status != 1 && that.orderDetail.groupInfo.status != 2) {
that.pintuan = true; that.pintuan = true;
} }
} }
@ -562,45 +607,48 @@
position: relative; position: relative;
} }
.title{ .title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat; background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
width: 100%; width: 100%;
height: 54%; height: 54%;
} }
.content{ .content {
position: absolute; position: absolute;
top: 200rpx; top: 200rpx;
width: 95%; width: 95%;
margin-left: 2.5%; margin-left: 2.5%;
} }
.title-sreach{ .title-sreach {
width: 100%; width: 100%;
display: flex; display: flex;
height: 200rpx; height: 200rpx;
position: relative; position: relative;
} }
.back-btn{ .back-btn {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
} }
.title-name{
.title-name {
padding-top: 110rpx; padding-top: 110rpx;
font-size: 36rpx; font-size: 36rpx;
font-weight: 700; font-weight: 700;
flex: 1; flex: 1;
text-align: center; text-align: center;
} }
.box1{
.box1 {
width: 95%; width: 95%;
margin: 0 auto 20rpx; margin: 0 auto 20rpx;
background: #fff; background: #fff;
border-radius: 20rpx; border-radius: 20rpx;
padding: 20rpx; padding: 20rpx;
} }
.goods-img { .goods-img {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
@ -612,6 +660,7 @@
height: 100%; height: 100%;
} }
} }
.goods-content { .goods-content {
flex: 1; flex: 1;
padding-left: 20rpx; padding-left: 20rpx;
@ -624,66 +673,78 @@
.goods-content-center { .goods-content-center {
display: flex; display: flex;
margin: 16rpx 0; margin: 16rpx 0;
color: #777; color: #777;
} }
.goods-deal1 { .goods-deal1 {
width: 60%; width: 100%;
} }
.goods-content-bottom { .goods-content-bottom {
display: flex; display: flex;
line-height: 56rpx; line-height: 56rpx;
color: #777; color: #777;
} }
.pintuan-left-price { .pintuan-left-price {
width: 50%; width: 50%;
text-align: right; text-align: right;
font-weight: 700; font-weight: 700;
color: #000; color: #000;
}
.status-img{
width: 84rpx;
height: 84rpx;
img{
width: 84rpx;
height: 84rpx;
background-size: 100%;
}
} }
.status-text{
.status-img {
width: 84rpx;
height: 84rpx;
img {
width: 84rpx;
height: 84rpx;
background-size: 100%;
}
}
.status-text {
flex: 1; flex: 1;
position: relative; position: relative;
padding-left: 20rpx; padding-left: 20rpx;
} }
.status-zhu{
font-size: 32rpx; .status-zhu {
font-weight: 700; font-size: 32rpx;
font-weight: 700;
} }
.status-fu{
height: 50rpx; .status-fu {
line-height: 50rpx; height: 50rpx;
line-height: 50rpx;
} }
.status-address{
font-weight: 700; .status-address {
font-weight: 700;
} }
.status-btn{
.status-btn {
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
right: 0; right: 0;
background: rgba(247, 248, 248, 0.6); background: rgba(247, 248, 248, 0.6);
width: 130rpx; width: 130rpx;
height: 50rpx; height: 50rpx;
text-align: center; text-align: center;
line-height: 50rpx; line-height: 50rpx;
border-radius: 16rpx; border-radius: 16rpx;
color: #777; color: #777;
border: 1px solid #777; border: 1px solid #777;
font-size: 20rpx; font-size: 20rpx;
} }
.btn-box{
.btn-box {
height: 120rpx; height: 120rpx;
} }
.btn{
.btn {
width: 90%; width: 90%;
height: 100rpx; height: 100rpx;
line-height: 100rpx; line-height: 100rpx;
@ -694,6 +755,7 @@
margin: 0 auto; margin: 0 auto;
font-weight: 700; font-weight: 700;
} }
.img-popup-content { .img-popup-content {
width: 600rpx; width: 600rpx;
height: 800rpx; height: 800rpx;
@ -727,7 +789,9 @@
background: #fff; background: #fff;
border-radius: 20rpx; border-radius: 20rpx;
padding: 20rpx; padding: 20rpx;
position: absolute;top: 450rpx;left: 2.5%; position: absolute;
top: 450rpx;
left: 2.5%;
} }
.goods-img1 { .goods-img1 {
@ -800,30 +864,34 @@
color: #02fbdd; color: #02fbdd;
border: 1px solid #a6ffea; border: 1px solid #a6ffea;
line-height: 80rpx; line-height: 80rpx;
margin: 0 auto; margin: 0 auto;
} }
.kaituan11{
.kaituan11 {
display: flex; display: flex;
height: 70rpx; height: 70rpx;
font-size: 44rpx; font-size: 44rpx;
font-weight: 700; font-weight: 700;
margin-top: 20rpx; margin-top: 20rpx;
} }
.kaituan1-title1{
.kaituan1-title1 {
position: relative; position: relative;
margin-left: 20rpx; margin-left: 20rpx;
} }
.kaituan1-title11{
font-size: 24rpx; .kaituan1-title11 {
background: rgba(224, 255, 222, 0.65); font-size: 24rpx;
border: 1px solid rgba(166, 255, 234, 1); background: rgba(224, 255, 222, 0.65);
border-radius: 20rpx; border: 1px solid rgba(166, 255, 234, 1);
height: 44rpx; border-radius: 20rpx;
line-height: 38rpx; height: 44rpx;
width: 280rpx; line-height: 38rpx;
text-align: center; width: 280rpx;
margin: 10rpx 0 0 20rpx; text-align: center;
margin: 10rpx 0 0 20rpx;
} }
.num-plus { .num-plus {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
@ -852,38 +920,45 @@
flex: 1; flex: 1;
margin-left: 40rpx; margin-left: 40rpx;
} }
.kaituan21{
.kaituan21 {
display: flex; display: flex;
width: 90%; width: 90%;
margin: 40rpx auto; margin: 40rpx auto;
} }
.kaituan221{
flex: 1; .kaituan221 {
flex: 1;
} }
.kaituan31{
.kaituan31 {
height: 80rpx; height: 80rpx;
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
color: #777; color: #777;
} }
.kaituan41{
width: 95%; .kaituan41 {
height: 100rpx; width: 95%;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); height: 100rpx;
border-radius: 100rpx; background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
text-align: center; border-radius: 100rpx;
line-height: 100rpx; text-align: center;
font-size: 30rpx; line-height: 100rpx;
font-weight: 700; font-size: 30rpx;
margin: 20rpx auto; font-weight: 700;
} margin: 20rpx auto;
.kaituan51{ }
.kaituan51 {
margin: 80rpx 0 40rpx; margin: 80rpx 0 40rpx;
} }
.pintuan2 { .pintuan2 {
flex: 1; flex: 1;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
} }
.car-content { .car-content {
position: relative; position: relative;
height: auto; height: auto;
@ -910,6 +985,7 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 700; font-weight: 700;
} }
.btn { .btn {
width: 95%; width: 95%;
height: 100rpx; height: 100rpx;

Loading…
Cancel
Save