uniapp 会员购买申请退款
parent
9a5d6cc1cc
commit
149ea95d48
|
@ -6,7 +6,7 @@
|
|||
width="70%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<el-form ref="ruleForm" :model="ruleForm" label-width="120px" size="mini" v-if="dialogVisible" :rules="rules">
|
||||
<el-form ref="ruleForm" :model="ruleForm" label-width="180px" size="mini" v-if="dialogVisible" :rules="rules">
|
||||
<el-form-item label="模板名称" prop="name">
|
||||
<el-input v-model="ruleForm.name" class="withs" placeholder="请输入模板名称" />
|
||||
</el-form-item>
|
||||
|
@ -31,7 +31,6 @@
|
|||
collapse-tags
|
||||
clearable
|
||||
filterable
|
||||
@change="changeRegion"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -306,9 +305,6 @@ export default {
|
|||
noRegion: []
|
||||
}
|
||||
},
|
||||
changeRegion(value) {
|
||||
console.log(value)
|
||||
},
|
||||
changeRadio(num) {
|
||||
this.columns = Object.assign({}, statusMap[num - 1])
|
||||
},
|
||||
|
@ -346,8 +342,10 @@ export default {
|
|||
name: info.name,
|
||||
type: info.type,
|
||||
appoint: info.appoint,
|
||||
noDelivery: info.noDelivery,
|
||||
sort: info.sort
|
||||
})
|
||||
console.log(this.ruleForm)
|
||||
this.columns = Object.assign({}, statusMap[this.ruleForm.type - 1])
|
||||
this.$nextTick(() => {
|
||||
loadingInstance.close()
|
||||
|
@ -394,11 +392,7 @@ export default {
|
|||
// 包邮
|
||||
shippingNodelivery() {
|
||||
logistics.shippingNodelivery({ tempId: this.tempId }).then(res => {
|
||||
res.data.forEach((item, index) => {
|
||||
// item.title = JSON.parse(item.title)
|
||||
item.city_ids = JSON.parse(item.title)
|
||||
})
|
||||
this.ruleForm.noDelivery = res.data
|
||||
this.ruleForm.noRegion = JSON.parse(res.data[0].title)
|
||||
})
|
||||
},
|
||||
removeChild(list){
|
||||
|
|
|
@ -15,6 +15,13 @@ export function memberOrderInfo(){
|
|||
return request.get('api/order/member/memberOrderInfo', {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据当前手机号获取账号的充值记录
|
||||
*/
|
||||
export function memberOrderInfoByPhone(phone){
|
||||
return request.get(`api/order/member/memberOrderInfoByPhone?phone=${phone}`, {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询权益档位信息
|
||||
*/
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-navbar leftIcon="" title="话费返回情况"></u-navbar>
|
||||
<u-navbar autoBack title="购买纪录"></u-navbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<text>再升1级即可获得【XX】等6项权益</text>
|
||||
<view class="left-button">
|
||||
<view class="left-shopping" @click="handleRouter('购买记录')">
|
||||
<text>购买记录</text>
|
||||
<text>购买记录</text>
|
||||
<image src="../../static/images/shopping-right.png" ></image>
|
||||
</view>
|
||||
<view class="left-others" @click="handleRouter('为他人充值')">
|
||||
|
@ -21,8 +21,8 @@
|
|||
</view>
|
||||
<view class="member-right">
|
||||
<image src='../../static/images/vipStar.png'></image>
|
||||
<text>会员等级{{vipData.findIndex((item) => item == parseInt(memberDetail.grade)) +1}}级</text>
|
||||
<button @click="handleRenew">立即续费</button>
|
||||
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}级</text>
|
||||
<button @click="handleRenew" class="right-button">立即续费</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-equity">
|
||||
|
@ -256,7 +256,7 @@
|
|||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
button {
|
||||
.right-button {
|
||||
border-radius: 18rpx;
|
||||
margin-top: 10rpx;
|
||||
padding: 7rpx 16rpx;
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<view></view>
|
||||
<text>充值号码:{{item.userPhone}}</text>
|
||||
</view>
|
||||
<button v-show="item.bool" @click.stop="handleService(item.orderId)">申请退款</button>
|
||||
<button v-show="item.bool && item.refundStatus == 0" @click.stop="handleService(item)">申请退款</button>
|
||||
<view v-show="item.refundStatus == 1">申请退款中</view>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text>充值档次:{{item.grade}}</text>
|
||||
|
@ -22,7 +23,7 @@
|
|||
|
||||
<script>
|
||||
import {
|
||||
memberOrderInfo,memberApplyRefund
|
||||
memberOrderInfo,memberApplyRefund,memberOrderInfoByPhone
|
||||
} from '@/api/member.js';
|
||||
import { Debounce } from '@/utils/validate.js'
|
||||
export default {
|
||||
|
@ -37,20 +38,12 @@
|
|||
await this.getList()
|
||||
},
|
||||
watch:{
|
||||
keyword :Debounce (function (){
|
||||
this.memberData.sort((a,b) =>{
|
||||
let aIndex = this.keyword.indexOf(a.userPhone)
|
||||
let bIndex = this.keyword.indexOf(b.userPhone)
|
||||
if(aIndex > bIndex) return -1
|
||||
if(aIndex < bIndex) return 1
|
||||
if(a.userPhone == b.userPhone){
|
||||
return a.stringCreateTime - b.stringCreateTime
|
||||
}else{
|
||||
if(a.stringCreateTime<b.stringCreateTime) return -1
|
||||
if(a.stringCreateTime>b.stringCreateTime) return 1
|
||||
return 0
|
||||
}
|
||||
})
|
||||
keyword :Debounce (async function (){
|
||||
if(this.keyword == ''){
|
||||
await this.getList()
|
||||
}else{
|
||||
await this.searchList()
|
||||
}
|
||||
},1000)
|
||||
},
|
||||
methods: {
|
||||
|
@ -59,20 +52,40 @@
|
|||
url:`/pages/member_back/index?userPhone=${item.userPhone}&grade=${item.grade}`
|
||||
})
|
||||
},
|
||||
async searchList(){
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfoByPhone(this.keyword)
|
||||
if(res.data){
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.createTime+milliseconds>timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
}else{
|
||||
this.memberData = []
|
||||
}
|
||||
},
|
||||
async getList(){
|
||||
let milliseconds = 2 * 3600 * 1000 // 7200000 毫秒
|
||||
let timestamp = new Date().getTime()
|
||||
const res = await memberOrderInfo()
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.createTime+milliseconds>timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
if(res.data){
|
||||
const arr = res.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.createTime+milliseconds>timestamp
|
||||
}
|
||||
})
|
||||
this.memberData = arr
|
||||
}else{
|
||||
this.memberData = []
|
||||
}
|
||||
},
|
||||
async handleService(orderId){
|
||||
await memberApplyRefund({orderId})
|
||||
async handleService(item){
|
||||
await memberApplyRefund({orderId:item.id,type:3})
|
||||
this.$util.Tips({
|
||||
title: '申请成功'
|
||||
});
|
||||
|
@ -93,10 +106,10 @@
|
|||
background-attachment: fixed;
|
||||
.box-seach{
|
||||
z-index: 999;
|
||||
padding: 10% 40rpx;
|
||||
padding: 0 40rpx;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 3%;
|
||||
top: 8%;
|
||||
left: 0;
|
||||
}
|
||||
.list-item{
|
||||
|
|
Loading…
Reference in New Issue