|
@@ -167,6 +167,27 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
+ <uni-popup ref="popupReason" type="bottom" 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">
|
|
|
|
|
+ <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>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -174,6 +195,9 @@
|
|
|
// import UniQrcode from 'uniapp-qrcode'
|
|
// import UniQrcode from 'uniapp-qrcode'
|
|
|
import tools from '@/service/tools';
|
|
import tools from '@/service/tools';
|
|
|
import EnBlank from "@/components/en-utils/en-blank/en-blank";
|
|
import EnBlank from "@/components/en-utils/en-blank/en-blank";
|
|
|
|
|
+ import {
|
|
|
|
|
+ commonRefundReason
|
|
|
|
|
+ } from "@/api/common.js"
|
|
|
import {
|
|
import {
|
|
|
orderStatus,
|
|
orderStatus,
|
|
|
orderList,
|
|
orderList,
|
|
@@ -244,7 +268,11 @@
|
|
|
isAjax: false,
|
|
isAjax: false,
|
|
|
qrcodeData: '',
|
|
qrcodeData: '',
|
|
|
options2: {},
|
|
options2: {},
|
|
|
- onlyCode: ''
|
|
|
|
|
|
|
+ onlyCode: '',
|
|
|
|
|
+ refundReason: [],
|
|
|
|
|
+ order_id: 0,
|
|
|
|
|
+ refund_msg: '', // 退款理由
|
|
|
|
|
+ sureType: 0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
@@ -412,104 +440,219 @@
|
|
|
item.shop_logo
|
|
item.shop_logo
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ popCancel() {
|
|
|
|
|
+ // 退款取消
|
|
|
|
|
+ this.$refs.popupReason.close()
|
|
|
|
|
+ uni.showTabBar()
|
|
|
|
|
+ },
|
|
|
|
|
+ popSure() {
|
|
|
|
|
+ // 退款确认
|
|
|
|
|
+ if (this.sureType === 1) {
|
|
|
|
|
+ // 外卖退款
|
|
|
|
|
+ if (this.isAJAX) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isAJAX = true;
|
|
|
|
|
+ orderCancel({
|
|
|
|
|
+ order_id: this.order_id,
|
|
|
|
|
+ refund_msg: this.refund_msg
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
|
+ tools.success(res.msg)
|
|
|
|
|
+ this.$refs.popupReason.close()
|
|
|
|
|
+ uni.showTabBar()
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.orderList()
|
|
|
|
|
+ }, 1500)
|
|
|
|
|
+ this.isAJAX = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tools.error(res.msg)
|
|
|
|
|
+ this.isAJAX = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (this.sureType === 2) {
|
|
|
|
|
+ // 代取退款
|
|
|
|
|
+ if (this.isAJAX) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isAJAX = true;
|
|
|
|
|
+ expressOrderCancel({
|
|
|
|
|
+ order_id: this.order_id,
|
|
|
|
|
+ refund_msg: this.refund_msg
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
|
+ tools.success(res.msg)
|
|
|
|
|
+ this.$refs.popupReason.close()
|
|
|
|
|
+ uni.showTabBar()
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.expressOrderList()
|
|
|
|
|
+ }, 1500)
|
|
|
|
|
+ this.isAJAX = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tools.error(res.msg)
|
|
|
|
|
+ this.isAJAX = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if(this.sureType === 3) {
|
|
|
|
|
+ //干洗退款
|
|
|
|
|
+ if (this.isAJAX) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isAJAX = true;
|
|
|
|
|
+ laundryOrderCancel({
|
|
|
|
|
+ order_id: this.order_id,
|
|
|
|
|
+ refund_msg: this.refund_msg
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
|
+ tools.success(res.msg)
|
|
|
|
|
+ this.$refs.popupReason.close()
|
|
|
|
|
+ uni.showTabBar()
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ this.laundryOrderList()
|
|
|
|
|
+ }, 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
|
|
|
|
|
+ },
|
|
|
tackOut(item) {
|
|
tackOut(item) {
|
|
|
// 外卖取消订单
|
|
// 外卖取消订单
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '是否取消订单?',
|
|
|
|
|
- confirmText: '确定',
|
|
|
|
|
- confirmColor: '#FB3D03',
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.confirm === true) {
|
|
|
|
|
- if (this.isAJAX) {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.isAJAX = true;
|
|
|
|
|
- orderCancel({
|
|
|
|
|
- order_id: item.id
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.code == 1) {
|
|
|
|
|
- tools.success(res.msg)
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.page = 1;
|
|
|
|
|
- this.list = [];
|
|
|
|
|
- this.orderList()
|
|
|
|
|
- }, 1500)
|
|
|
|
|
- this.isAJAX = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- tools.error(res.msg)
|
|
|
|
|
- this.isAJAX = false;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ uni.hideTabBar()
|
|
|
|
|
+ this.sureType = 1
|
|
|
|
|
+ this.order_id = item.id
|
|
|
|
|
+ commonRefundReason().then((res) => {
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
|
+ this.refundReason = res.data
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$refs.popupReason.open()
|
|
|
|
|
+ // uni.showModal({
|
|
|
|
|
+ // title: '提示',
|
|
|
|
|
+ // content: '是否取消订单?',
|
|
|
|
|
+ // confirmText: '确定',
|
|
|
|
|
+ // confirmColor: '#FB3D03',
|
|
|
|
|
+ // success: (res) => {
|
|
|
|
|
+ // if (res.confirm === true) {
|
|
|
|
|
+ // if (this.isAJAX) {
|
|
|
|
|
+ // return
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.isAJAX = true;
|
|
|
|
|
+ // orderCancel({
|
|
|
|
|
+ // order_id: item.id
|
|
|
|
|
+ // }).then((res) => {
|
|
|
|
|
+ // if (res.code == 1) {
|
|
|
|
|
+ // tools.success(res.msg)
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
|
+ // this.page = 1;
|
|
|
|
|
+ // this.list = [];
|
|
|
|
|
+ // this.orderList()
|
|
|
|
|
+ // }, 1500)
|
|
|
|
|
+ // this.isAJAX = false;
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // tools.error(res.msg)
|
|
|
|
|
+ // this.isAJAX = false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
expressCancel(item) {
|
|
expressCancel(item) {
|
|
|
// 代取取消订单
|
|
// 代取取消订单
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '是否取消订单?',
|
|
|
|
|
- confirmText: '确定',
|
|
|
|
|
- confirmColor: '#FB3D03',
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.confirm === true) {
|
|
|
|
|
- if (this.isAJAX) {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.isAJAX = true;
|
|
|
|
|
- expressOrderCancel({
|
|
|
|
|
- order_id: item.id
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.code == 1) {
|
|
|
|
|
- tools.success(res.msg)
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.page = 1;
|
|
|
|
|
- this.list = [];
|
|
|
|
|
- this.expressOrderList()
|
|
|
|
|
- }, 1500)
|
|
|
|
|
- this.isAJAX = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- tools.error(res.msg)
|
|
|
|
|
- this.isAJAX = false;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ uni.hideTabBar()
|
|
|
|
|
+ this.sureType = 2
|
|
|
|
|
+ this.order_id = item.id
|
|
|
|
|
+ commonRefundReason().then((res) => {
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
|
+ this.refundReason = res.data
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$refs.popupReason.open()
|
|
|
|
|
+ // uni.showModal({
|
|
|
|
|
+ // title: '提示',
|
|
|
|
|
+ // content: '是否取消订单?',
|
|
|
|
|
+ // confirmText: '确定',
|
|
|
|
|
+ // confirmColor: '#FB3D03',
|
|
|
|
|
+ // success: (res) => {
|
|
|
|
|
+ // if (res.confirm === true) {
|
|
|
|
|
+ // if (this.isAJAX) {
|
|
|
|
|
+ // return
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.isAJAX = true;
|
|
|
|
|
+ // expressOrderCancel({
|
|
|
|
|
+ // order_id: item.id
|
|
|
|
|
+ // }).then((res) => {
|
|
|
|
|
+ // if (res.code == 1) {
|
|
|
|
|
+ // tools.success(res.msg)
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
|
+ // this.page = 1;
|
|
|
|
|
+ // this.list = [];
|
|
|
|
|
+ // this.expressOrderList()
|
|
|
|
|
+ // }, 1500)
|
|
|
|
|
+ // this.isAJAX = false;
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // tools.error(res.msg)
|
|
|
|
|
+ // this.isAJAX = false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
cancel(item) {
|
|
cancel(item) {
|
|
|
// 干洗取消订单
|
|
// 干洗取消订单
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '是否取消订单?',
|
|
|
|
|
- confirmText: '确定',
|
|
|
|
|
- confirmColor: '#FB3D03',
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.confirm === true) {
|
|
|
|
|
- if (this.isAJAX) {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.isAJAX = true;
|
|
|
|
|
- laundryOrderCancel({
|
|
|
|
|
- order_id: item.id
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.code == 1) {
|
|
|
|
|
- tools.success(res.msg)
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.page = 1;
|
|
|
|
|
- this.list = [];
|
|
|
|
|
- this.laundryOrderList()
|
|
|
|
|
- }, 1500)
|
|
|
|
|
- this.isAJAX = false;
|
|
|
|
|
- } else {
|
|
|
|
|
- tools.error(res.msg)
|
|
|
|
|
- this.isAJAX = false;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ uni.hideTabBar()
|
|
|
|
|
+ this.sureType = 3
|
|
|
|
|
+ this.order_id = item.id
|
|
|
|
|
+ commonRefundReason().then((res) => {
|
|
|
|
|
+ if (res.code === 1) {
|
|
|
|
|
+ this.refundReason = res.data
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$refs.popupReason.open()
|
|
|
|
|
+ // uni.showModal({
|
|
|
|
|
+ // title: '提示',
|
|
|
|
|
+ // content: '是否取消订单?',
|
|
|
|
|
+ // confirmText: '确定',
|
|
|
|
|
+ // confirmColor: '#FB3D03',
|
|
|
|
|
+ // success: (res) => {
|
|
|
|
|
+ // if (res.confirm === true) {
|
|
|
|
|
+ // if (this.isAJAX) {
|
|
|
|
|
+ // return
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.isAJAX = true;
|
|
|
|
|
+ // laundryOrderCancel({
|
|
|
|
|
+ // order_id: item.id
|
|
|
|
|
+ // }).then((res) => {
|
|
|
|
|
+ // if (res.code == 1) {
|
|
|
|
|
+ // tools.success(res.msg)
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
|
+ // this.page = 1;
|
|
|
|
|
+ // this.list = [];
|
|
|
|
|
+ // this.laundryOrderList()
|
|
|
|
|
+ // }, 1500)
|
|
|
|
|
+ // this.isAJAX = false;
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // tools.error(res.msg)
|
|
|
|
|
+ // this.isAJAX = false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
scrolltolower() {
|
|
scrolltolower() {
|
|
|
++this.page
|
|
++this.page
|
|
@@ -829,6 +972,35 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
|
+ .pop-b {
|
|
|
|
|
+ height: 80rpx;
|
|
|
|
|
+ line-height: 80rpx;
|
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
|
+ // border: 1rpx solid #F9F9F9;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .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;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.nav-b {
|
|
.nav-b {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
z-index: -1 !important;
|
|
z-index: -1 !important;
|