|
|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
+ <view style="overflow: hidden;">
|
|
|
<!-- tab -->
|
|
|
<view class="tab-box ddflex">
|
|
|
<view class="fflex ddflex">
|
|
|
- <view :class="'tab-item fflex '+(queryType==''?'tab-item-active':'')" @click="queryTypeChange(0)">
|
|
|
+ <view :class="'tab-item fflex '+(queryType==2?'tab-item-active':'')" @click="queryTypeChange(2)">
|
|
|
<view>待处理</view>
|
|
|
<image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
</view>
|
|
|
- <view :class="'tab-item fflex '+(queryType==1?'tab-item-active':'')" @click="queryTypeChange(1)">
|
|
|
+ <view :class="'tab-item fflex '+(queryType==3?'tab-item-active':'')" @click="queryTypeChange(3)">
|
|
|
<view>已处理</view>
|
|
|
<image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
|
|
|
</view>
|
|
|
@@ -52,21 +52,34 @@
|
|
|
<view v-if="item.isException!==0" class="order-btns ddflex">
|
|
|
<view class="order-btn-time">2022-12-31 17:16:37</view>
|
|
|
<view style="justify-content: flex-end;" class="ddflex">
|
|
|
- <view class="order-btn" v-if="item.status>1&&item.refundStatus==0" @click.stop="openPop(item)">退款</view>
|
|
|
- <view class="order-btn" v-else @click.stop="finishOrder">结束订单</view>
|
|
|
+ <view class="order-btn" v-if="item.status>1&&item.refundStatus==0" @click.stop="openPop(item,'退款')">退款</view>
|
|
|
+ <view class="order-btn" v-else @click.stop="openPop(item,'结算')">结算</view>
|
|
|
+ <view class="order-btn" @click.stop="finishOrder">处理</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view v-if="groupList.length==0">
|
|
|
+ <view class="nodata">
|
|
|
+ <image :src="picUrlss+'empty.png'"></image>
|
|
|
+ <text>暂无订单~</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
- <bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='true' title="退款"
|
|
|
+ <bottom-pop v-if="showPop" :showPop='showPop' :btnColor="'#11BB8B'" :showBtn='true' :title="popTitle"
|
|
|
@closePop="closePop()" @popSubmit="popSubmit()">
|
|
|
- <view class="apply-info-box">
|
|
|
+ <view class="apply-info-box" v-if="popTitle=='退款'">
|
|
|
<view class="reason-input">
|
|
|
- <input v-model="tempData.rmoney" placeholder="请填写退款金额"></input>
|
|
|
+ <input v-model="tempData.rmoney" type="number" placeholder="请填写退款金额"></input>
|
|
|
</view>
|
|
|
<view>请填写退款金额,最多可退¥{{tempData.payMoney}}</view>
|
|
|
</view>
|
|
|
+ <view class="apply-info-box" v-if="popTitle=='结算'">
|
|
|
+ <view class="reason-input">
|
|
|
+ <input v-model="tempData.rmoney" type="number" placeholder="是否调整订单金额"></input>
|
|
|
+ </view>
|
|
|
+ <view>如需调整订单金额,请填写调整后的订单金额,否则无需填写</view>
|
|
|
+ </view>
|
|
|
</bottom-pop>
|
|
|
|
|
|
</view>
|
|
|
@@ -84,8 +97,8 @@
|
|
|
props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
- queryType: 0,
|
|
|
+ picUrlss: req.public.picUrls,
|
|
|
+ queryType: 2,
|
|
|
|
|
|
groupList: [],
|
|
|
page: 1,
|
|
|
@@ -96,6 +109,7 @@
|
|
|
// 筛选弹窗
|
|
|
showPop: false,
|
|
|
tempData: null,
|
|
|
+ popTitle:''
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
@@ -156,10 +170,17 @@
|
|
|
},
|
|
|
|
|
|
// 弹窗打开
|
|
|
- openPop(item,index) {
|
|
|
- this.tempData = item;
|
|
|
- this.tempData.rmoney = item.payMoney
|
|
|
- this.showPop = true
|
|
|
+ openPop(item,title) {
|
|
|
+ this.popTitle = title
|
|
|
+ if(title=='退款'){
|
|
|
+ this.tempData = item;
|
|
|
+ this.tempData.rmoney = item.payMoney
|
|
|
+ this.showPop = true
|
|
|
+ }else if(title=='结算'){
|
|
|
+ this.tempData = item;
|
|
|
+ this.tempData.rmoney = 0
|
|
|
+ this.showPop = true
|
|
|
+ }
|
|
|
},
|
|
|
// 弹窗关闭
|
|
|
closePop() {
|
|
|
@@ -168,36 +189,57 @@
|
|
|
},
|
|
|
// 弹窗确认
|
|
|
popSubmit() {
|
|
|
- if(Number(this.tempData.rmoney)>Number(this.tempData.payMoney)) return req.msg('退款金额超出支付金额')
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: "确定退款?",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- req.getRequest('/admin/v2/order/refund', {
|
|
|
- id: this.tempData.id,
|
|
|
- refundMoney:this.tempData.rmoney
|
|
|
- }, data => {
|
|
|
- this.tempData = null
|
|
|
- this.showPop = false
|
|
|
- res.msg('订单已退款')
|
|
|
- this.getMachineList()
|
|
|
- })
|
|
|
+ if(this.popTitle=='退款'){
|
|
|
+ if(Number(this.tempData.rmoney)>Number(this.tempData.payMoney)) return req.msg('退款金额超出支付金额')
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: "确定退款?",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ req.getRequest('/admin/v2/order/refund', {
|
|
|
+ id: this.tempData.id,
|
|
|
+ refundMoney:this.tempData.rmoney
|
|
|
+ }, data => {
|
|
|
+ this.tempData = null
|
|
|
+ this.showPop = false
|
|
|
+ res.msg('订单已退款')
|
|
|
+ this.getMachineList()
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }else if(this.popTitle=='结算'){
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: "确定结算?",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ req.getRequest('/admin/v2/order/settle', {
|
|
|
+ id: this.tempData.id,
|
|
|
+ settleMoney:this.tempData.rmoney,
|
|
|
+ settleType:2
|
|
|
+ }, data => {
|
|
|
+ this.tempData = null
|
|
|
+ this.showPop = false
|
|
|
+ res.msg('订单已结算')
|
|
|
+ this.getMachineList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 结束订单
|
|
|
finishOrder(item) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
- content: "确定结束该订单?",
|
|
|
+ content: "确定直接处理该订单?如需调整订单金额请取消并点击结算操作,如需退款请取消并点击退款操作",
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
req.getRequest('/admin/v2/order/settle', {
|
|
|
id: item.id
|
|
|
}, data => {
|
|
|
- res.msg('订单已结束')
|
|
|
+ res.msg('订单已处理')
|
|
|
this.getMachineList()
|
|
|
})
|
|
|
}
|