我的订单 + 积分申请
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<img src="./imgs/points.png" alt="">
|
||||
</div>
|
||||
<h3>申请记录</h3>
|
||||
|
||||
<div class="card" v-for="(item,index) in list" :key="index">
|
||||
<!-- @click="toEdit(item)" -->
|
||||
<div class="card" v-for="(item,index) in list" :key="index" >
|
||||
<div class="top">
|
||||
<div class="top_title">{{ item.applyItem }}</div>
|
||||
<div><span class="top_status" :class="item.status==0? 'status0' : item.status==1? 'status1': 'status2'">{{ $dict.getLabel('integralApplyStatus',item.status) }}</span></div>
|
||||
@@ -37,6 +37,13 @@ export default {
|
||||
toAdd() {
|
||||
uni.navigateTo({url: './addPoints'})
|
||||
},
|
||||
toEdit(item) {
|
||||
if(item.status == '1') {
|
||||
// 审核通过停留此页面
|
||||
} else {
|
||||
uni.navigateTo({url: `./addPoints?id=${item.id}`})
|
||||
}
|
||||
},
|
||||
getPointsList() {
|
||||
this.$http.post(`/app/appintegralmemberapply/listByGirdMember`, null, {
|
||||
params: {
|
||||
|
||||
@@ -36,10 +36,24 @@ export default {
|
||||
flag: false,
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
onLoad(opt) {
|
||||
|
||||
if(opt) {
|
||||
console.log(opt);
|
||||
this.getDetail(opt.id)
|
||||
}
|
||||
document.title = '积分申请'
|
||||
},
|
||||
methods: {
|
||||
getDetail(id) {
|
||||
this.$http.post(`/app/appintegralmemberapply/queryDetailById?id=${id}`).then(res=> {
|
||||
if(res?.data) {
|
||||
// console.log(res);
|
||||
this.form = res.data
|
||||
this.form.files = [res.data.voucherImageUrl]
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if(this.flag) return
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
<div>
|
||||
<div class="title">
|
||||
<div>{{ item.createTime }}</div>
|
||||
<!-- -->
|
||||
<div><span :style="{color: item.orderStatus==0? '#FF883C':item.orderStatus==1? '#42D784': '#999999'}">{{item.orderStatus}}</span></div>
|
||||
<div><span class="status_all" :class="item.orderStatus==0?'status0':item.orderStatus==1?'status1':'status2'">{{ $dict.getLabel('merchandiseOrderStatus', item.orderStatus) }}</span></div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="list-item">
|
||||
@@ -28,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="remark" v-if="item.remark.length">备注:{{ item.remark }}</div>
|
||||
<div class="btn" v-if="item.orderStatus==1 || item.orderStatus==2">
|
||||
<div class="btn" v-if="item.orderStatus==0">
|
||||
<div class="cancel" @click="cancelBtn(item.id)">取消订单</div>
|
||||
<div class="confirm">核销码:<span>{{ item.auditCode }}</span></div>
|
||||
</div>
|
||||
@@ -51,8 +50,11 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getOrderList()
|
||||
document.title = '我的订单'
|
||||
this.$dict.load('merchandiseOrderStatus').then(() => {
|
||||
this.getOrderList()
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
toCheck(index) {
|
||||
@@ -74,15 +76,14 @@ export default {
|
||||
})
|
||||
},
|
||||
cancelBtn(id) {
|
||||
this.$dialog.confirm({ content: '确定要关闭该订单吗?' }).then(() => {
|
||||
this.$http.post('/appvillagerintegralshoporder/overOrderForWx',null,{
|
||||
this.$confirm('确定要取消该订单吗?').then(() => {
|
||||
this.$http.post('/app/appintegralmerchandiseorder/cancelOrder',null,{
|
||||
params: {
|
||||
orderId: id
|
||||
id: id
|
||||
}
|
||||
}).then(res=>{
|
||||
if(res.code==0) {
|
||||
this.$u.toast('关闭成功')
|
||||
this.$store.commit('getUserInfo')
|
||||
this.$u.toast('取消成功')
|
||||
setTimeout(() => {
|
||||
this.getOrderList()
|
||||
},600)
|
||||
@@ -91,17 +92,6 @@ export default {
|
||||
})
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
format(num) {
|
||||
if(num == 0) {
|
||||
return '预约中'
|
||||
}else if(num == 1) {
|
||||
return '已完成'
|
||||
}else if(num == 2) {
|
||||
return '已关闭'
|
||||
}
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getOrderList()
|
||||
@@ -161,10 +151,31 @@ export default {
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
|
||||
.status_all {
|
||||
padding: 3px 10px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.status0 {
|
||||
background: #FFEDE2;
|
||||
color: #FF883C;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #E2F6E1;
|
||||
color: #42D784;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: #EEEEEE;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
padding: 0 32px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16px;
|
||||
height: 100%;
|
||||
.list-item {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user