Merge remote-tracking branch 'origin/master'

This commit is contained in:
Lx 2025-04-17 11:17:44 +08:00
commit 4720e60dff

View File

@ -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,27 +245,31 @@
},
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'
})
}
this.courseId = option.courseId,
this.tenantId = option.tenantId,
this.userId = this.userDetails.id,
this.userinfo = getLocalUserInfo()
this.localStaffType = getStaffType()
this.localCoachId = getCoachId()
console.log('localCoachId', this.localCoachId);
console.log('userId', this.userId);
console.log('this.localStaffType', this.localStaffType);
if (this.localStaffType === '02') {
this.localCoachId = getCoachId()
console.log('localCoachId', this.localCoachId);
}
console.log('localCoachId', this.localCoachId);
},
onShow() {
this.getListAll()
@ -301,6 +313,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 +388,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)
// subject23
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 +609,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 +636,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 +938,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 +1218,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 +1304,4 @@
.size-lv {
margin-right: 35px;
}
</style>
</style>