Commit d7d33b0c authored by 黄奎's avatar 黄奎

学员修改

parent d2d9c6a2
......@@ -6,10 +6,10 @@
</view>
<view class="box-bg">
<input class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="rules.StuName"
placeholder="请输入学员姓名" maxlength="5"/>
placeholder="请输入学员姓名" maxlength="5" />
</view>
<view class="box-bg">
<view>性别</view>
<view>性别:{{}}</view>
<view class="xingbie">
<text v-for="(item, i) in goodsist" :key="i" @click="gende(item,i)"
:class="[index==i?'gender':'gender2'] ">{{item.name}}</text>
......@@ -23,8 +23,8 @@
</view>
</view>
<view class="box-bg">
<input type="number" class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="rules.StuTel"
placeholder="请输入手机号" maxlength="11" />
<input type="number" class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;'
v-model="rules.StuTel" placeholder="请输入手机号" maxlength="11" />
</view>
<view class="box-bg">
<input class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="rules.BaseCondition"
......@@ -34,22 +34,22 @@
</view>
</view>
<view class="box-bg" @click="gradess()">
<input maxlength="0" readonly="readonly" class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="rules.DemandPoint"
placeholder="就读年级" />
<input maxlength="0" readonly="readonly" class="uni-input inputM"
style='margin-left: 10px;margin-top: 5px;' v-model="rules.DemandPoint" placeholder="就读年级" />
<view>
<u-icon name="arrow" color="#9F9F9F" size="20"></u-icon>
<u-icon name="arrow" color="#9F9F9F" size="20"></u-icon>
</view>
</view>
<view class="box-bg" @click="community()">
<input maxlength="0" class="uni-input inputM" readonly="readonly" style='margin-left: 10px;margin-top: 5px;' v-model="rules.School_Id"
placeholder="报名校区" />
<input maxlength="0" class="uni-input inputM" readonly="readonly"
style='margin-left: 10px;margin-top: 5px;' v-model="rules.School_Id" placeholder="报名校区" />
<view>
<u-icon name="arrow" color="#9F9F9F" size="20"></u-icon>
<u-icon name="arrow" color="#9F9F9F" size="20"></u-icon>
</view>
</view>
<view class="box-bg">
<input class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="rules.ConsultingResults"
placeholder="如何知道进阶思维" />
<input class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;'
v-model="rules.ConsultingResults" placeholder="如何知道进阶思维" />
</view>
<!-- 日历弹窗 -->
<u-popup v-model="show" mode="bottom" length="100%">
......@@ -62,28 +62,36 @@
<u-popup v-model="show2" mode="right" length="80%">
<view class="school-bg">
<text>
<text class="school">选择就读学校></text>
<!-- <u-icon name="arrow-left" size="20"></u-icon> -->
<text class="school">选择就读学校</text>
</text>
</view>
<view class="search">
<u-search placeholder="请输入名称" v-model="keyword"></u-search>
</view>
<scroll-view scroll-y="true" style="height:100%;">
<view class="list" :class="[actuve==i?'list2':'']" v-for="(item, i) in schoollist" :key="i" @click="masklist(item.Content,i)">
<scroll-view scroll-y="true" style="height:100%;">
<view class="list" :class="[actuve==i?'list2':'']" v-for="(item, i) in schoollist" :key="i"
@click="masklist(item.Content,i)">
<view>
{{item.Content}}
</view>
<view v-if="actuve==i">
<u-icon name="arrow" size="20"></u-icon>
<u-icon name="success" size="20"></u-icon>
</view>
</view>
</scroll-view>
</u-popup>
<!-- 年级弹窗 -->
<u-popup v-model="show3" mode="bottom" length="auto">
<scroll-view scroll-y="true" style="height:400rpx;">
<scroll-view scroll-y="true" style="height:400rpx;">
<view v-for="(item, i) in DemandPoint" :key="i">
<view class="list" @click="grades(item.Content,i)">{{item.Content}}</view>
<view class="list" :class="[actuve3==i?'list2':'']" @click="grades(item.Content,i)">
<view>{{item.Content}}</view>
<view v-if="actuve3==i">
<u-icon name="success" size="20"></u-icon>
</view>
</view>
</view>
</scroll-view>
</u-popup>
......@@ -91,19 +99,21 @@
<u-popup v-model="show4" mode="right" length="80%">
<view class="school-bg">
<text>
<text class="school">选择校区></text>
<!-- <u-icon name="arrow-left" size="20"></u-icon> -->
<text class="school">选择校区</text>
</text>
</view>
<view class="search">
<u-search placeholder="请输入名称" v-model="keyword"></u-search>
</view>
<scroll-view scroll-y="true" style="height:100%;">
<view class="list" :class="[actuve2==i?'list2':'']" v-for="(item, i) in campus" :key="i" @click="masklist2(item,i)">
<scroll-view scroll-y="true" style="height:100%;">
<view class="list" :class="[actuve2==i?'list2':'']" v-for="(item, i) in campus" :key="i"
@click="masklist2(item,i)">
<view>
{{item.StuName}}
</view>
<view v-if="actuve2==i">
<u-icon name="arrow" size="20"></u-icon>
<u-icon name="success" size="20"></u-icon>
</view>
</view>
</scroll-view>
......@@ -121,37 +131,38 @@
export default {
data() {
return {
u:{},
School_Id:'',//要传的校区id
schoollist:[],//学校
DemandPoint:[],//班级
campus:[],//校区
u: {},
School_Id: '', //要传的校区id
schoollist: [], //学校
DemandPoint: [], //班级
campus: [], //校区
Type: '',
communitys:false,
actuve:-1,
actuve2:-1,
communitys: false,
actuve: -1,
actuve2: -1,
actuve3: -1,
show: false, //日历
show2: false, //学校
show3:false,//年级
show4:false,//社区
show3: false, //年级
show4: false, //社区
mode: 'date',
rules: {
StuName: '',
StuSex:'0',
StuSex: '0',
StuBirth: '',
BaseCondition: '',
DemandPoint: '',
School_Id:'',
StuTel:'',
ConsultingResults:''
School_Id: '',
StuTel: '',
ConsultingResults: ''
},
goodsist: [{
name: '男',
id:'0',
id: '0',
},
{
name: '女',
id:"1"
id: "1"
}
],
index: 0
......@@ -164,82 +175,83 @@
// 提交表单
registered() {
let that = this;
testCmd = "/api/WeChatPublic/CreateStudent";
postMsg = {
OpenId:that.u.OpenId,// openId 是 [string] 查看
UnionId:that.u.Unoinid,
StuSex:that.rules.StuSex,// 学生性别 0男 1女 是 [string] 查看
StuName:that.rules.StuName,// 学生姓名 是 [string] 查看
StuBirth:that.rules.StuBirth,// 学生生日 是 [string] 查看
StuTel:that.rules.StuTel,// 手机号码 是 [string] 查看
BaseCondition:that.rules.BaseCondition,// 就读学校 是 [string] 查看
DemandPoint:that.rules.DemandPoint,// 班级 是 [string] 查看
ConsultingResults:that.rules.ConsultingResults,// 如何知道进阶思维 是 [string] 查看
School_Id:that.School_Id,// 校区 是 [string]
Group_Id:"100001"
};
that.requestJJSWAdmin(testCmd, postMsg,
(res) => {
if(res.data.Code==1) {
uni.showToast({
title: '成功',
icon:'exception',
duration:2000
});
} else {
uni.showToast({
title: res.data.Message,
position: 'bottom',
icon: 'none',
duration: 2000
});
}
testCmd = "/api/WeChatPublic/CreateStudent";
postMsg = {
OpenId: that.u.OpenId, // openId 是 [string] 查看
UnionId: that.u.Unoinid,
StuSex: that.rules.StuSex, // 学生性别 0男 1女 是 [string] 查看
StuName: that.rules.StuName, // 学生姓名 是 [string] 查看
StuBirth: that.rules.StuBirth, // 学生生日 是 [string] 查看
StuTel: that.rules.StuTel, // 手机号码 是 [string] 查看
BaseCondition: that.rules.BaseCondition, // 就读学校 是 [string] 查看
DemandPoint: that.rules.DemandPoint, // 班级 是 [string] 查看
ConsultingResults: that.rules.ConsultingResults, // 如何知道进阶思维 是 [string] 查看
School_Id: that.School_Id, // 校区 是 [string]
Group_Id: "100001"
};
that.requestJJSWAdmin(testCmd, postMsg,
(res) => {
if (res.data.Code == 1) {
uni.showToast({
title: '提交成功',
icon: 'exception',
duration: 2000
});
uni.navigateTo({
url: 'bankcard'
})
} else {
uni.showToast({
title: res.data.Message,
position: 'bottom',
icon: 'none',
duration: 2000
});
}
);
},
}
);
},
initlist() {
let that = this;
that.requestJJSWAdmin(testCmd, postMsg,
(res) => {
if(postMsg.Type==1) {
if (postMsg.Type == 1) {
that.schoollist = res.data.Data
} else if (postMsg.Type==2) {
} else if (postMsg.Type == 2) {
that.DemandPoint = res.data.Data
}
else if (that.show4) {
} else if (that.show4) {
that.campus = res.data.Data
}
}
);
},
submit() {
let patt = /^[1][3-9][\d]{9}/
if(this.rules.StuName=='') {
let patt = /^[1][3-9][\d]{9}/
if (this.rules.StuName == '') {
uni.showToast({
title: '请填写姓名',
position: 'bottom',
icon: 'none',
duration: 2000
});
} else if (this.rules.StuTel==''){
} else if (this.rules.StuTel == '') {
uni.showToast({
title: '请输入手机号',
position: 'bottom',
icon: 'none',
duration: 2000
});
} else if(!patt.test(this.rules.StuTel)) {
} else if (!patt.test(this.rules.StuTel)) {
uni.showToast({
title: '请输入正确的手机号码',
position: 'bottom',
icon: 'none',
duration: 2000
});
}
else {
} else {
this.registered()
}
},
confirm(e) {
console.log(e);
......@@ -247,7 +259,7 @@
this.rules.StuBirth = e.fulldate
},
gende(item, i) {
this.index = 1
this.index = i
this.rules.StuSex = item.id
},
calendar() {
......@@ -263,7 +275,7 @@
this.initlist()
this.show2 = true
},
masklist(item,i) {
masklist(item, i) {
this.actuve = i
this.rules.BaseCondition = item
this.show2 = false
......@@ -277,7 +289,8 @@
this.show3 = true
},
// 年级
grades(item,i) {
grades(item, i) {
this.actuve3 = i
this.rules.DemandPoint = item
this.show3 = false
},
......@@ -289,7 +302,7 @@
this.initlist()
this.show4 = true
},
masklist2(item,i) {
masklist2(item, i) {
this.actuve2 = i
this.rules.School_Id = item.StuName
this.School_Id = item.StuId
......@@ -300,37 +313,46 @@
</script>
<style>
.uni-input{
.uni-input {
margin-left: 0rpx !important;
}
.search{
.school {
font-size: 22rpx;
}
.search {
margin-bottom: 20rpx;
}
.view-box{
padding-top: 40rpx;
background-color: #EEF1FA;
min-height: 100vh;
}
.submit-box{
margin-top: 50rpx;
.view-box {
padding-top: 40rpx;
background-color: #EEF1FA;
min-height: 100vh;
}
.submit-box {
/* margin-top: 50rpx; */
width: 80%;
display: flex;
justify-content: center;
font-size: 22rpx;
color: #fff;
position: fixed;
bottom: 400rpx;
position: absolute;
bottom: 250rpx;
left: 50%;
transform: translate(-50%,0%);
transform: translate(-50%, 0%);
background-color: #138BF9;
border-radius: 10rpx;
height: 60rpx;
align-items: center;
align-items: center;
}
.list2{
color: blue;
.list2 {
color: #138BF9;
}
.list{
.list {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -340,6 +362,7 @@
padding-right: 20rpx;
font-size: 24rpx;
}
.box {
width: 90%;
border-radius: 10rpx;
......@@ -351,14 +374,16 @@
padding-bottom: 80rpx;
border-radius: 20rpx;
}
.school-bg{
.school-bg {
background-color: #EEF1FA;
height: 50rpx;
display: flex;
align-items: center;
padding-left: 50rpx;
margin-bottom: 20rpx;
height: 50rpx;
display: flex;
align-items: center;
padding-left: 50rpx;
margin-bottom: 20rpx;
}
.xingbie {
width: 185rpx;
display: flex;
......@@ -372,9 +397,9 @@
width: 80rpx;
height: 20px;
display: inline-block;
text-align: center;
line-height: 20px;
border-radius: 5rpx;
text-align: center;
line-height: 20px;
border-radius: 5rpx;
font-size: 22rpx;
}
......@@ -384,9 +409,9 @@
width: 80rpx;
height: 20px;
display: inline-block;
text-align: center;
line-height: 20px;
border-radius: 5rpx;
text-align: center;
line-height: 20px;
border-radius: 5rpx;
font-size: 22rpx;
}
......
......@@ -167,16 +167,16 @@
<text class="introduce2">老师介绍</text>
</view>
<view class="teacher">
<image src="@/static/images/icon/icon-share.png" style="width:20px;height:30px;"
<image :src="g.edu_data.TeacherIcon" mode="aspectFill" style="width:30px;height:30px;"
class="share-icon" />
<view class="teacher2">
<view class="teacher3">
<view class="teacher4">张鑫生</view>
<view class="teacher5">高级高级高级高级高级高级高级高级高级</view>
<view class="teacher4" v-if='g.edu_data.TeacherName'>{{g.edu_data.TeacherName}}</view>
<view class="teacher5"><rich-text :nodes="g.edu_data.TeacherInfo"></rich-text></view>
</view>
<view class="teacher4">
<!-- <view class="teacher4">
<u-icon name="arrow" :size="32" color="#111"></u-icon>
</view>
</view> -->
</view>
</view>
</view>
......@@ -186,7 +186,7 @@
<text class="introduce" :style="{ 'background-color': mc }"></text>
<text class="introduce2">详情介绍</text>
</view>
<view>富文本</view>
<rich-text :nodes="detailContent"></rich-text>
</view>
<!-- top3 -->
<view iew v-if="current==2">
......
......@@ -5,24 +5,25 @@
<!-- <view v-if="address.province && address.province != ''" class="add-info"> -->
<view v-if="address.province && address.province != ''" class="add-info" style="margin-top: 39px;">
<!-- <view class="address">{{ address.province + address.city + address.district }}</view> -->
<view class="area" @click="mask()">{{Thename}}</view>
<view v-if="namelist&&namelist.length>0" class="area" @click="mask()">{{Thename}}</view>
<view v-if="namelist.length<0" class="area"@click="chosenAddress()">请添加学员</view>
<view class="address">
<!-- 切换学员 -->
<!-- <text style="margin-right: 10px;">{{ address.name }}</text>
<text>{{ address.mobile }}</text -->
</view>
</view>
<view v-else class="add-info">
<!-- <view v-else class="add-info">
<span style="position: relative;top: 16rpx;">请选择</span>
</view>
</view> -->
<view class="arrow" @click="chosenAddress()">
<u-icon name="arrow" size="32" color="#444"></u-icon>
</view>
</view>
<view class="pay">
<view>支付方式22</view>
<view style="text-align: right;">在线支付222</view>
<view>支付方式</view>
<view style="text-align: right;">在线支付</view>
</view>
<!-- <view class="discountbox" style="padding: 15px 0;margin-bottom: 12px;" v-if="ds.total_price >0">
<view class="filed" style="justify-content: space-between;">
......@@ -292,7 +293,7 @@
<text :class="[actuve==i?'mask-lit3':'mask-lit33']">{{item.StuName}}</text>
</view>
<view v-if="actuve==i">
<u-icon name="arrow" size="40"></u-icon>
<u-icon name="success" size="40"></u-icon>
</view>
</view>
</view>
......@@ -491,6 +492,13 @@
});
return;
}
if(that.JJSWStuId=='') {
this.$refs.uToast.show({
title: '请添加学员!',
type: 'warning'
});
return;
}
if (!this.submitOrder) {
this.submitOrder = true;
uni.requestSubscribeMessage({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment