更新
This commit is contained in:
parent
457b953046
commit
6ebc2f6f2f
@ -8,9 +8,6 @@
|
||||
<scroll-view :style="{ height: scrollHeight + 'px' }" scroll-y="true" class="scroll-view">
|
||||
<view class="group_3 flex-col">
|
||||
<image style="width: 100%; height: 100%;" :src="imagesUrl + '/' + courseDetails.photo" />
|
||||
v-if="courseDetails.photo" />
|
||||
<u-empty mode="data" text='暂无图片' v-else>
|
||||
</u-empty>
|
||||
</view>
|
||||
<view class="group_4 flex-col">
|
||||
<view class="section_2 flex-row justify-between">
|
||||
@ -171,4 +168,4 @@
|
||||
margin-top: 20rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -45,46 +45,53 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="bm-page-info">
|
||||
<view class="bm-page-info" :class="{ disabled: isDisabled }">
|
||||
<view style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
|
||||
<view class="bm-page-info-title">
|
||||
填写身份信息
|
||||
</view>
|
||||
<view class="anniu" @click="popupShow = true">
|
||||
<view class="anniu" :class="{ disabled: isDisabled }" @click="!isDisabled && (popupShow = true)">
|
||||
点击上传身份证
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="info-name">
|
||||
<view class="info-name-left">姓名</view>
|
||||
<view class="info-name-right">
|
||||
<input class="info-name-input" v-model="name" type="text" placeholder="请填写真实姓名">
|
||||
<input class="info-name-input" :disabled="isDisabled" v-model="name" type="text"
|
||||
placeholder="请填写真实姓名">
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-name">
|
||||
<view class="info-name-left">性别</view>
|
||||
<view class="d-s" style="width: 70%;">
|
||||
<view class="size-lv" :class="{'clv' : sex == index }" v-for=" (item,index) in sexlist"
|
||||
:key="index" @click="getsexindex(index)">{{ item }}
|
||||
<view class="size-lv" :class="{'clv': sex == index, 'disabled': isDisabled }"
|
||||
v-for="(item, index) in sexlist" :key="index" @click="!isDisabled && getsexindex(index)">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="info-name">
|
||||
<view class="info-name-left">年龄</view>
|
||||
<view class="info-name-right">
|
||||
<input class="info-name-input" v-model="age" type="number" placeholder="请填写真实年龄">
|
||||
<input class="info-name-input" :disabled="isDisabled" v-model="age" type="number"
|
||||
placeholder="请填写真实年龄">
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-name">
|
||||
<view class="info-name-left">手机号</view>
|
||||
<view class="info-name-right">
|
||||
<input class="info-name-input" v-model="phone" type="text" placeholder="请输入正确手机号">
|
||||
<input class="info-name-input" :disabled="isDisabled" v-model="phone" type="text"
|
||||
placeholder="请输入正确手机号">
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-name">
|
||||
<view class="info-name-left">身份证号</view>
|
||||
<view class="info-name-right">
|
||||
<input class="info-name-input" v-model="identity" type="text" placeholder="请输入身份证号">
|
||||
<input class="info-name-input" :disabled="isDisabled" v-model="identity" type="text"
|
||||
placeholder="请输入身份证号">
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="padding: 0;" class="info-name">
|
||||
@ -214,6 +221,7 @@
|
||||
djshow: false,
|
||||
userId: null,
|
||||
tenantId: null,
|
||||
isDisabled: false,
|
||||
userinfo: [],
|
||||
payPrice: null,
|
||||
payStatus: null,
|
||||
@ -237,15 +245,20 @@
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log('option', option)
|
||||
uni.showToast({
|
||||
title: '请完善个人信息',
|
||||
icon: 'none'
|
||||
})
|
||||
if (uni.getStorageSync('jlId')) {
|
||||
this.hideTeacher = 1
|
||||
}
|
||||
this.jlId = uni.getStorageSync('jlId');
|
||||
this.userDetails = getLocalUserInfo();
|
||||
if (this.userDetails) {
|
||||
this.getStudentDetail()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请完善个人信息',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
console.log(this.userDetails, '学生信息');
|
||||
this.courseId = option.courseId,
|
||||
this.tenantId = option.tenantId,
|
||||
this.userId = this.userDetails.id,
|
||||
@ -301,6 +314,28 @@
|
||||
this.rightInfoList.reserveMoney :
|
||||
this.rightInfoList.price;
|
||||
},
|
||||
async getStudentDetail() {
|
||||
const res = await request({
|
||||
url: '/app-api/small/dl-drive-school-student/getByUserId',
|
||||
method: "GET",
|
||||
params: {
|
||||
userId: this.userDetails.id
|
||||
},
|
||||
})
|
||||
if (res.data) {
|
||||
this.name = res.data.name
|
||||
this.sex = res.data.sex
|
||||
this.identity = res.data.idCard
|
||||
this.phone = res.data.phone
|
||||
this.age = res.data.age
|
||||
this.isDisabled = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请完善个人信息',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 教练信息
|
||||
async getListAll() {
|
||||
@ -354,55 +389,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
/* async getListAll() {
|
||||
this.columnjl = []
|
||||
let res = await request({
|
||||
url: '/app-api/dl-drive-school-coach-small/queryCoachByCourseId',
|
||||
method: 'GET',
|
||||
params: {
|
||||
courseId: this.courseId,
|
||||
},
|
||||
tenantIdFlag: false
|
||||
})
|
||||
console.log('data',res.data)
|
||||
|
||||
// 过滤数据,只保留subject为2或3的教练
|
||||
const filteredData = res.data.filter(coach =>
|
||||
coach.subject === '2' || coach.subject === '3'
|
||||
);
|
||||
// 去重处理 - 根据coachId去除重复教练
|
||||
const uniqueCoaches = [];
|
||||
const coachIds = new Set();
|
||||
|
||||
filteredData.forEach(coach => {
|
||||
if (!coachIds.has(coach.coachId)) {
|
||||
coachIds.add(coach.coachId);
|
||||
uniqueCoaches.push(coach);
|
||||
}
|
||||
});
|
||||
|
||||
this.columnjl = [
|
||||
filteredData.map(coach => ({
|
||||
label: coach.coachName,
|
||||
value: coach
|
||||
}))
|
||||
];
|
||||
|
||||
if (this.localStaffType === '02' && this.localCoachId) {
|
||||
console.log('123123',this.localStaffType)
|
||||
console.log('321321', this.localCoachId)
|
||||
console.log('coach', filteredData)
|
||||
const defaultCoach = filteredData.find(coach =>
|
||||
String(coach.coachId) === String(this.localCoachId)
|
||||
);
|
||||
console.log('111222333', defaultCoach)
|
||||
if (defaultCoach) {
|
||||
this.jlName = defaultCoach.coachName;
|
||||
this.jlId = defaultCoach.coachId;
|
||||
}
|
||||
}
|
||||
}, */
|
||||
|
||||
getsexindex(index) {
|
||||
this.sex = index
|
||||
},
|
||||
@ -624,9 +610,6 @@
|
||||
time: this.getCurrentDateTime(),
|
||||
endTime: this.getEndTime(),
|
||||
};
|
||||
/* uni.navigateTo({
|
||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
||||
}); */
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData)) +
|
||||
'&callback=' + encodeURIComponent('handleContractSigned')
|
||||
@ -654,37 +637,6 @@
|
||||
this.insertSchoolStudent();
|
||||
},
|
||||
|
||||
// 处理已存在的订单
|
||||
/* async processExistingOrder() {
|
||||
uni.showLoading({title: '准备支付...', mask: true});
|
||||
|
||||
try {
|
||||
if (this.startPay === 1) {
|
||||
const payType = this.selectedPayType;
|
||||
const res = await request({
|
||||
url: `/small/jxInfo/prepayment?type=jsapi&orderNo=${this.orderNo}&orderId=${this.orderId}&payType=${payType}`,
|
||||
method: 'get'
|
||||
});
|
||||
|
||||
|
||||
const result = await this.handleWxPayment(res);
|
||||
if (result === 'success') {
|
||||
await Promise.all([
|
||||
this.updateOrderStatus(this.orderId, '2'),
|
||||
this.insertSchoolStudent()
|
||||
]);
|
||||
this.signContract();
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
this.xxiaPayClick();
|
||||
return 'success';
|
||||
}
|
||||
} finally {
|
||||
uni.hideLoading();
|
||||
}
|
||||
}, */
|
||||
|
||||
async processExistingOrder() {
|
||||
uni.showLoading({
|
||||
title: '准备支付...',
|
||||
@ -987,25 +939,6 @@
|
||||
|
||||
this.updateSysUsersNickName();
|
||||
},
|
||||
/* insertSchoolStudent() {
|
||||
request({
|
||||
url: '/app-api/small/dl-drive-school-student/create',
|
||||
method: 'post',
|
||||
data: {
|
||||
avatar: this.userinfo.avatar,
|
||||
name: this.name,
|
||||
age: this.age,
|
||||
sex: this.sex,
|
||||
phone: this.phone,
|
||||
idCard: this.identity,
|
||||
registAddress: this.Address,
|
||||
userId: this.userinfo.id,
|
||||
tenantId: this.tenantId,
|
||||
idPhoto: this.sfzimg,
|
||||
}
|
||||
})
|
||||
this.updateSysUsersNickName()
|
||||
}, */
|
||||
|
||||
// 修改users信息
|
||||
updateSysUsersNickName() {
|
||||
@ -1286,6 +1219,33 @@
|
||||
border: 1px solid #8c8c8d;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
/* 禁用点击(保险) */
|
||||
}
|
||||
|
||||
/* 你也可以细调样式,比如输入框变灰底色 */
|
||||
.disabled .info-name-input {
|
||||
background-color: #f5f5f5;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.disabled .size-lv {
|
||||
background-color: #eee;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.disabled .anniu {
|
||||
background-color: #ccc;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
// .disabled .info-name-right {
|
||||
// background-color: #ccc;
|
||||
// color: #fff;
|
||||
// }
|
||||
|
||||
.twol {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
@ -1345,4 +1305,4 @@
|
||||
.size-lv {
|
||||
margin-right: 35px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user