Commit bf3284e4 authored by zhengke's avatar zhengke

修改

parent b9e91381
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="text-caption q-mb-lg q-px-md text-grey-6">基础信息</div> <div class="text-caption q-mb-lg q-px-md text-grey-6">基础信息</div>
<q-card-section class="q-pt-none" v-if="msg.ClassId>0"> <q-card-section class="q-pt-none" v-if="msg.ClassId>0">
<div class="row wrap"> <div class="row wrap">
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.GuestName" label="姓名" <q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.GuestName" ref="GuestName" label="姓名"
:rules="[val => !!val || '姓名']" /> :rules="[val => !!val || '姓名']" />
<q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.Profession" label="职业" <q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.Profession" label="职业"
:rules="[val => !!val || '职业']" /> :rules="[val => !!val || '职业']" />
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<q-radio v-model="addMsg.Sex" val="2" label="女" /> <q-radio v-model="addMsg.Sex" val="2" label="女" />
</div> </div>
<q-input filled v-model="addMsg.BirthDate" class="col-6 q-pb-lg" mask="date" label="出生日期"> <q-input filled v-model="addMsg.BirthDate" :rules="[val => !!val || '请选择出生日期']" class="col-6 q-pb-lg" ref="BirthDate" mask="date" label="出生日期">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy3" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy3" transition-show="scale" transition-hide="scale">
...@@ -57,12 +57,12 @@ ...@@ -57,12 +57,12 @@
</template> </template>
</q-input> </q-input>
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.TotalHours" label="总课时" <q-input clearable filled class="col-6 q-pb-lg q-pr-lg" maxlength="5" v-model="addMsg.TotalHours" label="总课时"
:rules="[val => !!val || 'TotalHours']" @keyup.native="checkInteger(addMsg,'TotalHours')" /> :rules="[val => !!val || 'TotalHours']" @keyup.native="checkInteger(addMsg,'TotalHours')" />
<q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.Mobile" label="电话" <q-input clearable filled class="col-6 q-pb-lg" ref="Mobile" maxlength="20" v-model="addMsg.Mobile" label="电话"
:rules="[val => !!val || '电话']" type="number" /> :rules="[val => !!val || '电话']" />
<q-select class="col-6 q-pb-lg q-pr-lg" option-value="Name" standout="bg-primary text-white" <q-select class="col-6 q-pb-lg q-pr-lg" option-value="Name" ref="Basics" standout="bg-primary text-white"
option-label="Name" v-model="addMsg.Basics" :options="GBList" emit-value map-options label="语言基础" option-label="Name" v-model="addMsg.Basics" :options="GBList" emit-value map-options label="语言基础"
use-input new-value-mode="add-unique" hint="自己输入语言基础的话,输入之后按回车!" /> use-input new-value-mode="add-unique" hint="自己输入语言基础的话,输入之后按回车!" />
<q-select class="col-6 q-pb-lg" option-value="Id" standout="bg-primary text-white" option-label="Name" <q-select class="col-6 q-pb-lg" option-value="Id" standout="bg-primary text-white" option-label="Name"
...@@ -77,14 +77,14 @@ ...@@ -77,14 +77,14 @@
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none" v-if="msg.SourceId>0"> <q-card-section class="q-pt-none" v-if="msg.SourceId>0">
<div class="row wrap"> <div class="row wrap">
<q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.GuestName" label="姓名" <q-input clearable filled class="col-6 q-pb-lg q-pr-lg" v-model="addMsg.GuestName" ref="GuestName" label="姓名"
:rules="[val => !!val || '姓名']" /> :rules="[val => !!val || '姓名']" />
<div class="col-6 q-pb-lg"> <div class="col-6 q-pb-lg">
<q-radio v-model="addMsg.Sex" val="1" label="男" /> <q-radio v-model="addMsg.Sex" val="1" label="男" />
<q-radio v-model="addMsg.Sex" val="2" label="女" /> <q-radio v-model="addMsg.Sex" val="2" label="女" />
</div> </div>
<q-input filled v-model="addMsg.BirthDate" class="col-6 q-pb-lg q-pr-lg" mask="date" label="出生日期"> <q-input filled v-model="addMsg.BirthDate" :rules="[val => !!val || '请选择出生日期']" class="col-6 q-pb-lg q-pr-lg" ref="BirthDate" mask="date" label="出生日期">
<template v-slot:append> <template v-slot:append>
<q-icon name="event" class="cursor-pointer"> <q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy3" transition-show="scale" transition-hide="scale"> <q-popup-proxy ref="qDateProxy3" transition-show="scale" transition-hide="scale">
...@@ -94,9 +94,9 @@ ...@@ -94,9 +94,9 @@
</template> </template>
</q-input> </q-input>
<q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.Mobile" label="电话" <q-input clearable filled class="col-6 q-pb-lg" maxlength="20" v-model="addMsg.Mobile" ref="Mobile" label="电话"
:rules="[val => !!val || '电话']" type="number" /> :rules="[val => !!val || '电话']" />
<q-select class="col-6 q-pb-lg q-pr-lg" option-value="Name" standout="bg-primary text-white" <q-select class="col-6 q-pb-lg q-pr-lg" option-value="Name" filled :rules="[val => !!val || '请选择日语水平']" ref="Basics" standout="bg-primary text-white"
option-label="Name" v-model="addMsg.Basics" :options="GBList" emit-value map-options label="日语水平" option-label="Name" v-model="addMsg.Basics" :options="GBList" emit-value map-options label="日语水平"
use-input new-value-mode="add-unique" hint="自己输入日语水平的话,输入之后按回车!" /> use-input new-value-mode="add-unique" hint="自己输入日语水平的话,输入之后按回车!" />
<q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.GraduatedSchool" label="毕业院校" /> <q-input clearable filled class="col-6 q-pb-lg" v-model="addMsg.GraduatedSchool" label="毕业院校" />
...@@ -394,32 +394,22 @@ ...@@ -394,32 +394,22 @@
}, },
//新增修改学员信息 //新增修改学员信息
save_t() { save_t() {
if (this.addMsg.GuestName == '') { this.$refs.GuestName.validate();
this.$q.notify({ this.$refs.Basics.validate();
type: 'negative', this.$refs.BirthDate.validate();
position: "top", this.$refs.Mobile.validate();
message: `请输入客人姓名` if (!this.$refs.GuestName.hasError && !this.$refs.Basics.hasError && !this.$refs.BirthDate.hasError && !this.$refs.Mobile.hasError
}) ){
return; if (this.msg.ClassId > 0) {
} if (this.addMsg.Education == '') {
if (this.addMsg.Basics == '') { this.$q.notify({
this.$q.notify({ type: 'negative',
type: 'negative', position: "top",
position: "top", message: `请选择学历`
message: `请选择语言基础` })
}) return;
return; }
}
if (this.msg.ClassId > 0) {
if (this.addMsg.Education == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择学历`
})
return;
} }
}
this.saveLoading = true this.saveLoading = true
setOrderGuestInfo(this.addMsg).then(res => { setOrderGuestInfo(this.addMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -438,6 +428,24 @@ ...@@ -438,6 +428,24 @@
}).catch(() => { }).catch(() => {
this.saveLoading = false this.saveLoading = false
}) })
}
// if (this.addMsg.GuestName == '') {
// this.$q.notify({
// type: 'negative',
// position: "top",
// message: `请输入客人姓名`
// })
// return;
// }
// if (this.addMsg.Basics == '') {
// this.$q.notify({
// type: 'negative',
// position: "top",
// message: `请选择语言基础`
// })
// return;
// }
}, },
//初始化数据 //初始化数据
initialize() { initialize() {
...@@ -495,6 +503,9 @@ ...@@ -495,6 +503,9 @@
this.addMsg.VolunteerMajor = item.VolunteerMajor; this.addMsg.VolunteerMajor = item.VolunteerMajor;
this.addMsg.Price = item.Price; this.addMsg.Price = item.Price;
this.addMsg.StudyRemark = item.StudyRemark; this.addMsg.StudyRemark = item.StudyRemark;
this.addMsg.BirthDate = item.BirthDate;
this.addMsg.TotalHours = item.TotalHours;
this.persistent = true; this.persistent = true;
}, },
//删除学员 //删除学员
......
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