asco
This commit is contained in:
@@ -436,7 +436,7 @@
|
||||
sub-title="لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است."
|
||||
>
|
||||
<template #extra>
|
||||
<a-button>
|
||||
<a-button @click="LoginUser">
|
||||
اتمام
|
||||
</a-button>
|
||||
</template>
|
||||
@@ -479,7 +479,7 @@
|
||||
</div>
|
||||
<div class="md:w-1/2">
|
||||
<a-form-item label="سال خاتمه">
|
||||
<a-input-number autocomplete="off" :disabled="is_check" :min="1350" :max="1401" v-decorator="['end',{rules: [{ required: is_check ? false : true, message: 'لطفا مقدار سال خاتمه را به درستی بین 1350 تا 1401 وارد کنید.' }]}]"/>
|
||||
<a-input-number id="end" ref="end" autocomplete="off" :disabled="is_check" :min="1350" :max="1401" v-decorator="['end',{rules: [{ required: is_check ? false : true, message: 'لطفا مقدار سال خاتمه را به درستی بین 1350 تا 1401 وارد کنید.' }]}]"/>
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div class="md:w-1/3">
|
||||
@@ -553,23 +553,13 @@
|
||||
</a-modal>
|
||||
|
||||
<a-modal :visible="visibleAccept" title="شرایط و مقررات" @ok="visibleAccept = false" @cancel="visibleAccept = false" ok-text="باشه" cancel-text="انصراف">
|
||||
اینجانب.... در تاریخ......... فرم بالا را تکمیل نموده و صحت کلیه اطلاعات تکمیل شده را تأیید می نمایم
|
||||
اینجانب {{ fullName }} در تاریخ {{ date }} فرم بالا را تکمیل نموده و صحت کلیه اطلاعات تکمیل شده را تأیید می نمایم.
|
||||
</a-modal>
|
||||
|
||||
<div class="mt-5">
|
||||
<a-button v-if="current < 2" type="primary" @click="handleSubmit">
|
||||
مرحله بعدی
|
||||
</a-button>
|
||||
<!-- <a-button-->
|
||||
<!-- v-if="current == 2"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- @click="handleSubmit"-->
|
||||
<!-- >-->
|
||||
<!-- ثبت اطلاعات-->
|
||||
<!-- </a-button>-->
|
||||
<!-- <a-button v-if="current > 0" style="margin-left: 8px" @click="prev">-->
|
||||
<!-- قبلی-->
|
||||
<!-- </a-button>-->
|
||||
</div>
|
||||
|
||||
</vx-card>
|
||||
@@ -622,22 +612,21 @@
|
||||
loading:false,
|
||||
editMode:false,
|
||||
id:0,
|
||||
tempRow:{}
|
||||
tempRow:{},
|
||||
fullName:'',
|
||||
date:null
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
addCity()
|
||||
{
|
||||
this.jobs.push({city:null,job:null})
|
||||
//this.model.push(jobs);
|
||||
//console.log(this.model);
|
||||
},
|
||||
number_insurance(e){
|
||||
this.has_instructor = e.target.value
|
||||
},
|
||||
handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
//console.log(this.formFirst.getFieldsValue(),'this.formFirst.getFieldsValue()');
|
||||
if(this.current ==0)
|
||||
{
|
||||
this.formFirst.validateFields(async(err, values) => {
|
||||
@@ -653,19 +642,16 @@
|
||||
if (!err) {
|
||||
|
||||
try{
|
||||
|
||||
this.loading = true
|
||||
console.log(values,'values')
|
||||
values.model = this.formFirst.getFieldsValue();
|
||||
//Object.assign(values,this.formFirst.getFieldsValue());
|
||||
console.log(this.formFirst.getFieldsValue(),'this.formFirst.getFieldsValue()')
|
||||
values.birth_date = this.birth_day
|
||||
values.work = this.work
|
||||
values.training = this.educational
|
||||
values.academic = this.edu
|
||||
await axios.post('register/save', values)
|
||||
this.$message.success('اطلاعات با موفقیت کامل شد')
|
||||
this.fromMosahebe.resetFields()
|
||||
this.$ntSet()
|
||||
// this.from.resetFields()
|
||||
this.current++
|
||||
}catch (e) {
|
||||
this.$ntSetError()
|
||||
@@ -687,6 +673,14 @@
|
||||
this.$ntSetError()
|
||||
}
|
||||
},
|
||||
async getDate(){
|
||||
try{
|
||||
const {data} = await axios.get('/register/date')
|
||||
this.date = data
|
||||
}catch (e) {
|
||||
this.$ntSetError()
|
||||
}
|
||||
},
|
||||
async getJob(){
|
||||
try{
|
||||
const {data} = await axios.post('/register/jobs')
|
||||
@@ -702,10 +696,12 @@
|
||||
},
|
||||
openModalEducational(){
|
||||
this.visibleEducational = true
|
||||
this.editMode = false
|
||||
this.formEducational.resetFields()
|
||||
},
|
||||
openModalWork(){
|
||||
this.visibleWork = true
|
||||
this.editMode = false
|
||||
this.formWork.resetFields()
|
||||
},
|
||||
openModalEduModeEDit(item){
|
||||
@@ -717,10 +713,14 @@
|
||||
},
|
||||
openModalEducationalEDit(item){
|
||||
this.visibleEducational = true
|
||||
this.editMode = true
|
||||
this.tempRow = item
|
||||
this.formEducational.setFieldsValue(item)
|
||||
},
|
||||
openModalWorkEDit(item){
|
||||
this.visibleWork = true
|
||||
this.editMode = true
|
||||
this.tempRow = item
|
||||
this.formWork.setFieldsValue(item)
|
||||
},
|
||||
cancelEdu(){
|
||||
@@ -746,7 +746,6 @@
|
||||
values.id = this.id
|
||||
this.edu.push(values)
|
||||
this.id +=1
|
||||
///console.log(values,'values')
|
||||
this.formEdu.resetFields()
|
||||
this.visibleEdu = false
|
||||
}
|
||||
@@ -766,10 +765,18 @@
|
||||
this.formEducational.validateFields(async(err, values) => {
|
||||
if (!err) {
|
||||
try{
|
||||
this.educational.push(values)
|
||||
console.log(values,'values')
|
||||
this.formEducational.resetFields()
|
||||
this.visibleEducational = false
|
||||
if(this.editMode){
|
||||
const find = this.educational.findIndex(item=> item.id == this.tempRow.id)
|
||||
Object.assign(this.educational[find],values);
|
||||
this.visibleEducational = false
|
||||
}else{
|
||||
values.id = this.id
|
||||
this.educational.push(values)
|
||||
this.id += 1
|
||||
console.log(values,'values')
|
||||
this.formEducational.resetFields()
|
||||
this.visibleEducational = false
|
||||
}
|
||||
}catch (e) {
|
||||
this.$ntSetError()
|
||||
throw e
|
||||
@@ -785,10 +792,17 @@
|
||||
this.formWork.validateFields(async(err, values) => {
|
||||
if (!err) {
|
||||
try{
|
||||
this.work.push(values)
|
||||
console.log(values,'values')
|
||||
this.formWork.resetFields()
|
||||
this.visibleWork = false
|
||||
if(this.editMode){
|
||||
const find = this.work.findIndex(item=> item.id == this.tempRow.id)
|
||||
Object.assign(this.work[find],values);
|
||||
}else{
|
||||
values.id = this.id
|
||||
this.work.push(values)
|
||||
this.id += 1
|
||||
console.log(values,'values')
|
||||
this.formWork.resetFields()
|
||||
}
|
||||
this.visibleWork = false
|
||||
}catch (e) {
|
||||
this.$ntSetError()
|
||||
throw e
|
||||
@@ -797,14 +811,9 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
isChecked(e){
|
||||
this.is_check = e.target.checked
|
||||
// if(this.is_check){
|
||||
// this.formEdu.resetField('end_now')
|
||||
// }
|
||||
},
|
||||
isCheckedWork(e){
|
||||
this.is_work_check = e.target.checked
|
||||
if(this.is_work_check) this.formWork.resetFields('end')
|
||||
},
|
||||
removeEdu(item){
|
||||
const index = this.edu.indexOf(item)
|
||||
@@ -821,17 +830,28 @@
|
||||
changeGrade(id){
|
||||
console.log(id,'id')
|
||||
this.find_grade = this.grade.find(item=>item.level == id)
|
||||
|
||||
},
|
||||
isChecked(e){
|
||||
this.is_check = e.target.checked
|
||||
if(this.is_check) this.formEdu.resetFields('end')
|
||||
},
|
||||
openAccept(){
|
||||
this.visibleAccept = true
|
||||
this.visibleAccept = true;
|
||||
this.fullName = this.from.getFieldValue('name');
|
||||
this.getDate()
|
||||
},
|
||||
LoginUser(){
|
||||
this.$router.push('/auth/login')
|
||||
},
|
||||
next() {
|
||||
this.current++;
|
||||
},
|
||||
prev() {
|
||||
this.current--;
|
||||
},
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getCity()
|
||||
|
||||
Reference in New Issue
Block a user