|
@@ -31,7 +31,7 @@
|
|
|
</u-grid-item>
|
|
|
</u-grid>
|
|
|
</u-card>
|
|
|
- <u-card margin="0px 0px 10px 0px" :head-style="cardStyle" :show-head="false" @click="handleScanClick">
|
|
|
+ <u-card margin="0px 0px 10px 0px" :head-style="cardStyle" :show-head="false" @click="handleScanClick" v-if="classInfo.useLessonsType==1">
|
|
|
<view slot="body" style="display: flex;justify-content: space-between;">
|
|
|
<view style="font-size: 32rpx;font-weight: bold;color:#000000;">扫码</view>
|
|
|
<u-icon name="scan" size="32"></u-icon>
|
|
@@ -52,7 +52,7 @@
|
|
|
<u-grid-item v-for="(item, index) in classInfo.studentLeaveList" :key="index" :custom-style="gridCustomStyle">
|
|
|
<view class="class-student-col" @click="handleOtherClick(item)">
|
|
|
{{item.name}}
|
|
|
- <u-icon :name="item.agreeType == 1 ? 'bookmark-fill' : 'bookmark'" :color="mainColor" size="48"></u-icon>
|
|
|
+ <u-icon name="'bookmark" :color="mainColor" size="48"></u-icon>
|
|
|
</view>
|
|
|
</u-grid-item>
|
|
|
</u-grid>
|
|
@@ -113,9 +113,9 @@
|
|
|
<u-popup v-model="vtCardShow" mode="center" border-radius="30" width="600rpx">
|
|
|
<view class="common-title">续费卡</view>
|
|
|
<view class="menber-box">
|
|
|
- <u-radio-group v-model="vtCardValue" @change="handleRadioChange">
|
|
|
- <u-radio class="menber-col" v-for="(item,index) in vtCardList" :key="index" :name="item.cardName">
|
|
|
- <view class="menber-label">卡名:{{ item.cardName }}</view>
|
|
|
+ <u-radio-group v-model="orderId">
|
|
|
+ <u-radio class="menber-col" v-for="(item,index) in vtCardList" :key="index" :name="item.orderId">
|
|
|
+ <view class="menber-label" >卡名:{{ item.cardName }}</view>
|
|
|
<!-- <view class="menber-label">售价: ¥ 1111</view> -->
|
|
|
<!-- <view class="menber-label">使用时间: 11111</view> -->
|
|
|
<!-- <u-checkbox v-model="true" active-color="#ff6e3e">选择</u-checkbox> -->
|
|
@@ -184,6 +184,8 @@
|
|
|
vtCardShow: false,
|
|
|
vtCardId: '',
|
|
|
vtCardValue: '',
|
|
|
+ orderId:'',
|
|
|
+ cardId:'',
|
|
|
vtCardList: [],
|
|
|
}
|
|
|
},
|
|
@@ -205,6 +207,7 @@
|
|
|
id: this.classId
|
|
|
}, 'POST').then(res => {
|
|
|
this.classInfo = res.data
|
|
|
+ console.log(this.classInfo.venueId)
|
|
|
uni.stopPullDownRefresh();
|
|
|
}).catch(error => {
|
|
|
this.$refs.uTips.show({
|
|
@@ -220,13 +223,22 @@
|
|
|
uni.scanCode({
|
|
|
onlyFromCamera: true,
|
|
|
success: function (res) {
|
|
|
+ console.log(res)
|
|
|
// const studentId = parseInt(res.result)
|
|
|
- const studentId = 8999
|
|
|
+ if(res.result.indexOf("xinghuoclass66889955224477")==-1){
|
|
|
+ that.$refs.uTips.show({
|
|
|
+ title: "二维码错误",
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const studentId = res.result.replace("xinghuoclass66889955224477",'')
|
|
|
const classId = parseInt(that.classId)
|
|
|
NET.request(API.classCourseWriteOff, {
|
|
|
studentId,classId
|
|
|
}, 'POST').then(res => {
|
|
|
if(res.status == 10000) {
|
|
|
+ that.initialize()
|
|
|
that.$refs.uTips.show({
|
|
|
title: res.message,
|
|
|
type: 'success',
|
|
@@ -237,6 +249,11 @@
|
|
|
type: 'warning',
|
|
|
})
|
|
|
}
|
|
|
+ }).catch(error => {
|
|
|
+ that.$refs.uTips.show({
|
|
|
+ title: error.message,
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
fail: function (res) {
|
|
@@ -373,16 +390,18 @@
|
|
|
})
|
|
|
},
|
|
|
// 续费卡切换
|
|
|
- handleRadioChange(cardName) {
|
|
|
- this.vtCardId = this.vtCardList.find( item => item.cardName = cardName).id
|
|
|
- this.vtCardValue = cardName
|
|
|
+ handleRadioChange(orderId) {
|
|
|
+ this.vtCardId = this.vtCardList.find( item => item.orderId = orderId).cardId
|
|
|
+ this.vtCardValue = this.vtCardList.find( item => item.orderId = orderId).cardName
|
|
|
+ this.orderId=orderId
|
|
|
},
|
|
|
// 续费卡确认
|
|
|
handleAffirmClick() {
|
|
|
const data = {
|
|
|
- cardId: parseInt(this.vtCardId),
|
|
|
+ cardId: this.vtCardList.find( item => item.orderId = this.orderId).cardId,
|
|
|
studentId: parseInt(this.studentId),
|
|
|
- classId: parseInt(this.classId)
|
|
|
+ classId: parseInt(this.classId),
|
|
|
+ orderId:parseInt(this.orderId)
|
|
|
}
|
|
|
NET.request(API.openRenewalCard, data,'POST').then(res=> {
|
|
|
if(res.status == 10000) {
|
|
@@ -499,7 +518,7 @@
|
|
|
goToSignForm() {
|
|
|
uni.removeStorageSync('signUserList')
|
|
|
uni.navigateTo({
|
|
|
- url: '/pagesClass/signForm?id=' + this.classId + '&status=' + this.classInfo.signStatus
|
|
|
+ url: '/pagesClass/signForm?id=' + this.classId + '&status=' + this.classInfo.signStatus+'&venueId=' + this.classInfo.venueId
|
|
|
});
|
|
|
},
|
|
|
// 跳转续费卡详情
|