Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4720e60dff
@ -45,46 +45,53 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</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 style="width: 100%; display: flex;align-items: center;justify-content: space-between; ">
|
||||||
<view class="bm-page-info-title">
|
<view class="bm-page-info-title">
|
||||||
填写身份信息
|
填写身份信息
|
||||||
</view>
|
</view>
|
||||||
<view class="anniu" @click="popupShow = true">
|
<view class="anniu" :class="{ disabled: isDisabled }" @click="!isDisabled && (popupShow = true)">
|
||||||
点击上传身份证
|
点击上传身份证
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="info-name">
|
<view class="info-name">
|
||||||
<view class="info-name-left">姓名</view>
|
<view class="info-name-left">姓名</view>
|
||||||
<view class="info-name-right">
|
<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>
|
</view>
|
||||||
<view class="info-name">
|
<view class="info-name">
|
||||||
<view class="info-name-left">性别</view>
|
<view class="info-name-left">性别</view>
|
||||||
<view class="d-s" style="width: 70%;">
|
<view class="d-s" style="width: 70%;">
|
||||||
<view class="size-lv" :class="{'clv' : sex == index }" v-for=" (item,index) in sexlist"
|
<view class="size-lv" :class="{'clv': sex == index, 'disabled': isDisabled }"
|
||||||
:key="index" @click="getsexindex(index)">{{ item }}
|
v-for="(item, index) in sexlist" :key="index" @click="!isDisabled && getsexindex(index)">
|
||||||
|
{{ item }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="info-name">
|
<view class="info-name">
|
||||||
<view class="info-name-left">年龄</view>
|
<view class="info-name-left">年龄</view>
|
||||||
<view class="info-name-right">
|
<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>
|
</view>
|
||||||
<view class="info-name">
|
<view class="info-name">
|
||||||
<view class="info-name-left">手机号</view>
|
<view class="info-name-left">手机号</view>
|
||||||
<view class="info-name-right">
|
<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>
|
</view>
|
||||||
<view class="info-name">
|
<view class="info-name">
|
||||||
<view class="info-name-left">身份证号</view>
|
<view class="info-name-left">身份证号</view>
|
||||||
<view class="info-name-right">
|
<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>
|
</view>
|
||||||
<!-- <view style="padding: 0;" class="info-name">
|
<!-- <view style="padding: 0;" class="info-name">
|
||||||
@ -214,6 +221,7 @@
|
|||||||
djshow: false,
|
djshow: false,
|
||||||
userId: null,
|
userId: null,
|
||||||
tenantId: null,
|
tenantId: null,
|
||||||
|
isDisabled: false,
|
||||||
userinfo: [],
|
userinfo: [],
|
||||||
payPrice: null,
|
payPrice: null,
|
||||||
payStatus: null,
|
payStatus: null,
|
||||||
@ -237,27 +245,31 @@
|
|||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
console.log('option', option)
|
console.log('option', option)
|
||||||
uni.showToast({
|
|
||||||
title: '请完善个人信息',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
if (uni.getStorageSync('jlId')) {
|
if (uni.getStorageSync('jlId')) {
|
||||||
this.hideTeacher = 1
|
this.hideTeacher = 1
|
||||||
}
|
}
|
||||||
this.jlId = uni.getStorageSync('jlId');
|
this.jlId = uni.getStorageSync('jlId');
|
||||||
this.userDetails = getLocalUserInfo();
|
this.userDetails = getLocalUserInfo();
|
||||||
|
if (this.userDetails) {
|
||||||
|
this.getStudentDetail()
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请完善个人信息',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
this.courseId = option.courseId,
|
this.courseId = option.courseId,
|
||||||
this.tenantId = option.tenantId,
|
this.tenantId = option.tenantId,
|
||||||
this.userId = this.userDetails.id,
|
this.userId = this.userDetails.id,
|
||||||
this.userinfo = getLocalUserInfo()
|
this.userinfo = getLocalUserInfo()
|
||||||
this.localStaffType = getStaffType()
|
this.localStaffType = getStaffType()
|
||||||
this.localCoachId = getCoachId()
|
|
||||||
console.log('localCoachId', this.localCoachId);
|
console.log('localCoachId', this.localCoachId);
|
||||||
console.log('userId', this.userId);
|
console.log('userId', this.userId);
|
||||||
|
console.log('this.localStaffType', this.localStaffType);
|
||||||
if (this.localStaffType === '02') {
|
if (this.localStaffType === '02') {
|
||||||
this.localCoachId = getCoachId()
|
this.localCoachId = getCoachId()
|
||||||
console.log('localCoachId', this.localCoachId);
|
|
||||||
}
|
}
|
||||||
|
console.log('localCoachId', this.localCoachId);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getListAll()
|
this.getListAll()
|
||||||
@ -301,6 +313,28 @@
|
|||||||
this.rightInfoList.reserveMoney :
|
this.rightInfoList.reserveMoney :
|
||||||
this.rightInfoList.price;
|
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() {
|
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)
|
|
||||||
|
|
||||||
// 过滤数据,只保留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) {
|
getsexindex(index) {
|
||||||
this.sex = index
|
this.sex = index
|
||||||
},
|
},
|
||||||
@ -624,9 +609,6 @@
|
|||||||
time: this.getCurrentDateTime(),
|
time: this.getCurrentDateTime(),
|
||||||
endTime: this.getEndTime(),
|
endTime: this.getEndTime(),
|
||||||
};
|
};
|
||||||
/* uni.navigateTo({
|
|
||||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
|
||||||
}); */
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData)) +
|
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData)) +
|
||||||
'&callback=' + encodeURIComponent('handleContractSigned')
|
'&callback=' + encodeURIComponent('handleContractSigned')
|
||||||
@ -654,37 +636,6 @@
|
|||||||
this.insertSchoolStudent();
|
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() {
|
async processExistingOrder() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '准备支付...',
|
title: '准备支付...',
|
||||||
@ -987,25 +938,6 @@
|
|||||||
|
|
||||||
this.updateSysUsersNickName();
|
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信息
|
// 修改users信息
|
||||||
updateSysUsersNickName() {
|
updateSysUsersNickName() {
|
||||||
@ -1286,6 +1218,33 @@
|
|||||||
border: 1px solid #8c8c8d;
|
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 {
|
.twol {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
|
Loading…
Reference in New Issue
Block a user