|
|
@@ -156,7 +156,7 @@
|
|
|
配送地址
|
|
|
</view>
|
|
|
<view class="fs-28 fc-3 w-480 text-align-right">
|
|
|
- {{infoData.school_name}}{{infoData.dorm_name}}{{infoData.address}}{{infoData.consignee}}{{infoData.consignee_tel}}
|
|
|
+ {{infoData.school_name}}{{infoData.dorm_name}}{{infoData.address}}{{infoData.consignee}}{{infoData.phone}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- <view class="display-flex flex-justify-space mb-26">
|
|
|
@@ -230,11 +230,36 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
+ <uni-popup ref="popupReason" type="bottom" :is-mask-click="false" background-color="#fff" border-radius="10px 10px 0 0">
|
|
|
+ <view class="popup-reason-box flex-direction">
|
|
|
+ <view class="text-align-center fs-38 fw-600 fc-3 mb-18">
|
|
|
+ 选择取消原因
|
|
|
+ </view>
|
|
|
+ <picker-view @change="bindChange" class="picker-view flex-1" :immediate-change='true'>
|
|
|
+ <picker-view-column>
|
|
|
+ <view class="picker-view-item" v-for="(item,index) in refundReason" :key="index">
|
|
|
+ {{item.refund_msg}}
|
|
|
+ </view>
|
|
|
+ </picker-view-column>
|
|
|
+ </picker-view>
|
|
|
+ <view class="align-items-center flex-justify-space plr-24 box-border-box">
|
|
|
+ <view class="flex-1 mr-20 pop-b text-align-center fs-36 b-r-ccc" @click="popCancel">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="flex-1 pop-b text-align-center bgc-41ABF5 fc-f fs-36" @click="popSure">
|
|
|
+ 确定
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
<SelectAddress ref="selectAddress" @giveAddress='giveAddress'></SelectAddress>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ commonRefundReason
|
|
|
+ } from "@/api/common.js"
|
|
|
import {
|
|
|
expressOrderInfo,
|
|
|
expressOrderCancel,
|
|
|
@@ -265,7 +290,9 @@
|
|
|
s: '',
|
|
|
},
|
|
|
isAJAX: false,
|
|
|
- address_id: ''
|
|
|
+ address_id: '',
|
|
|
+ refund_msg: '', // 退款理由
|
|
|
+ refundReason: [] //退款原因
|
|
|
};
|
|
|
},
|
|
|
onLoad(data) {
|
|
|
@@ -365,36 +392,46 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ popCancel() {
|
|
|
+ // 退款取消
|
|
|
+ this.$refs.popupReason.close()
|
|
|
+ },
|
|
|
+ popSure() {
|
|
|
+ // 退款确认
|
|
|
+ if (this.isAJAX) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isAJAX = true;
|
|
|
+ expressOrderCancel({
|
|
|
+ order_id: this.infoData.id,
|
|
|
+ refund_msg: this.refund_msg
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ tools.success(res.msg)
|
|
|
+ this.$refs.popupReason.close()
|
|
|
+ setTimeout(() => {
|
|
|
+ this.expressOrderInfo(this.infoData.id)
|
|
|
+ }, 1500)
|
|
|
+ this.isAJAX = false;
|
|
|
+ } else {
|
|
|
+ tools.error(res.msg)
|
|
|
+ this.isAJAX = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ bindChange(e) {
|
|
|
+ let num = e.detail.value[0]
|
|
|
+ this.refund_msg = this.refundReason[num].refund_msg
|
|
|
+ },
|
|
|
cancelOrder() {
|
|
|
// 代取取消订单
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '是否取消订单?',
|
|
|
- confirmText: '确定',
|
|
|
- confirmColor: '#FB3D03',
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm === true) {
|
|
|
- if (this.isAJAX) {
|
|
|
- return
|
|
|
- }
|
|
|
- this.isAJAX = true;
|
|
|
- expressOrderCancel({
|
|
|
- order_id: this.infoData.id
|
|
|
- }).then((res) => {
|
|
|
- if (res.code == 1) {
|
|
|
- tools.success(res.msg)
|
|
|
- setTimeout(() => {
|
|
|
- this.expressOrderInfo(this.infoData.id)
|
|
|
- }, 1500)
|
|
|
- this.isAJAX = false;
|
|
|
- } else {
|
|
|
- tools.error(res.msg)
|
|
|
- this.isAJAX = false;
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ commonRefundReason().then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ this.refundReason = res.data
|
|
|
+ this.refund_msg = res.data[0].refund_msg
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
+ this.$refs.popupReason.open()
|
|
|
},
|
|
|
openGoods() {
|
|
|
this.goodsShow = !this.goodsShow
|
|
|
@@ -450,6 +487,33 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .popup-reason-box {
|
|
|
+ width: 100%;
|
|
|
+ height: 45vh;
|
|
|
+ overflow: auto;
|
|
|
+ border-radius: 20rpx 20rpx 0 0;
|
|
|
+ background: #fff;
|
|
|
+ padding: 24rpx 0 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ .picker-view {
|
|
|
+ width: 100%;
|
|
|
+ // height: 70%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .picker-view-item {
|
|
|
+ // height: 90rpx;
|
|
|
+ line-height: 68rpx;
|
|
|
+ text-align: center;
|
|
|
+ background: #F5F5F5;
|
|
|
+ }
|
|
|
+
|
|
|
+ .pop-b {
|
|
|
+ height: 80rpx;
|
|
|
+ line-height: 80rpx;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ }
|
|
|
.finish_image {
|
|
|
width: 34rpx;
|
|
|
height: 34rpx;
|