2022-05-23 21:01:38 +04:30
< template >
< div >
2022-06-23 17:15:17 +04:30
<!-- < div id = "printContent" class = "hidden" >
2022-06-14 20:40:57 +04:30
< a-card v-if = "personel && personel.proposal" title="اطلاعات فردی" >
< div class = "grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3" >
< a-form-item label = "نام و نام خانوادگی" >
{{ personel . name }}
</ a-form-item >
< a-form-item label = "نام انگلیسی" >
{{ personel . name_en }}
</ a-form-item >
< a-form-item label = "کدملی" >
{{ personel . ncode }}
</ a-form-item >
< a-form-item label = "شماره پرسنلی" >
{{ personel . personel_id }}
</ a-form-item >
< a-form-item label = "موبایل" >
{{ personel . proposal . mobile }}
</ a-form-item >
< a-form-item label = "شهر متقاضی شغل" >
{{ personel . proposal . for_cities . join ( ' , ' )}}
</ a-form-item >
< a-form-item label = "شغل متقاضی" >
{{ personel . proposal . job_title }}
</ a-form-item >
< a-form-item label = "واحد کار متقاضی" >
{{ personel . unit }}
</ a-form-item >
< a-form-item label = "نام پدر" >
{{ personel . proposal . father_name }}
</ a-form-item >
< a-form-item label = "تاریخ تولد" >
{{ personelBirthDate | jdate }}
</ a-form-item >
< a-form-item label = "شماره شناسنامه" >
{{ personel . proposal . iden_id }}
</ a-form-item >
< a-form-item label = "سریال شناسنامه" >
{{ personel . proposal . iden_serial }}
</ a-form-item >
< a-form-item label = "محل صدور" >
{{ personel . proposal . iden_place }}
</ a-form-item >
< a-form-item label = "محل تولد" >
{{ personel . proposal . birth_place }}
</ a-form-item >
< a-form-item label = "ایمیل" >
{{ personel . proposal . email }}
</ a-form-item >
< a-form-item label = "تلفن ثابت" >
{{ personel . proposal . phone }}
</ a-form-item >
< a-form-item label = "حقوق درخواستی" >
{{ personel . proposal . requested_salary }}
</ a-form-item >
< a-form-item label = "جنسیت" >
< a-radio-group v-model = "personel.proposal.gender" >
< a-radio :value = "1" >
مرد
</ a-radio >
< a-radio :value = "2" >
زن
</ a-radio >
</ a-radio-group >
</ a-form-item >
< a-form-item label = "وضعیت تاهل" >
< a-radio-group v-model = "personel.proposal.marriage_sts" >
< a-radio :value = "2" >
متاهل
</ a-radio >
< a-radio :value = "1" >
مجرد
</ a-radio >
</ a-radio-group >
</ a-form-item >
< a-form-item label = "وضعیت مسکن" >
< a-radio-group v-model = "personel.proposal.house_sts" >
< a-radio :value = "1" >
مالک
</ a-radio >
< a-radio :value = "2" >
مستاجر
</ a-radio >
</ a-radio-group >
</ a-form-item >
< a-form-item label = "آدرس" class = "col-span-3" >
{{ personel . proposal . address }}
</ a-form-item >
< a-form-item label = "تلفن ضروری" >
{{ personel . proposal . phone_emergency }}
</ a-form-item >
< a-form-item label = "نام فرد" >
{{ personel . proposal . phone_emergency_name }}
</ a-form-item >
< a-form-item label = "نسبت" >
{{ personel . proposal . phone_emergency_related }}
</ a-form-item >
< a-form-item label = "شماره کارت" >
{{ personel . bank_card_number }}
</ a-form-item >
< a-form-item label = "شماره حساب" >
{{ personel . bank_account }}
</ a-form-item >
< a-form-item label = "شماره بیمه" >
{{ personel . insurance_no }}
</ a-form-item >
< a-form-item label = "وضعیت بیمه" >
< a-radio-group v-model = "personel.insurance_sts" >
< a-radio :value = "-1" >
ندارد
</ a-radio >
< a-radio :value = "1" >
دارد
</ a-radio >
</ a-radio-group >
</ a-form-item >
< a-form-item label = "تعداد فرزند" >
{{ personel . proposal . count_child }}
</ a-form-item >
< a-form-item label = "وضعیت نظام وظیفه" >
{{
{ 1 : 'معاف' , 2 : 'مشمول' , 3 : 'پایان خدمت' }[ personel . proposal . military_sts ]
}}
</ a-form-item >
</ div >
</ a-card >
< a-card v-if = "personalDetails && personalDetails.family" title="اطلاعات خانوادگی" class="mt-5" >
< template v-for = "(item,index) in personalDetails.family" >
< div class = "grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3" >
< a-form-item label = "شناسه" >
{{ personalDetails . family [ index ]. id }}
</ a-form-item >
< a-form-item label = "نام" >
{{ personalDetails . family [ index ]. name }}
</ a-form-item >
< a-form-item label = "نسبت" >
{{ personalDetails . family [ index ]. relation }}
</ a-form-item >
< a-form-item label = "مقطع" >
{{ personalDetails . family [ index ]. edu_level ?
grade [ personalDetails . family [ index ]. edu_level . toString ()] :
null }}
</ a-form-item >
< a-form-item label = "رشته تحصیلی" >
{{ personalDetails . family [ index ]. edu_title }}
</ a-form-item >
< a-form-item label = "شغل" >
{{ personalDetails . family [ index ]. job }}
</ a-form-item >
</ div >
< a-divider />
</ template >
</ a-card >
< a-card v-if = "personalDetails && personalDetails.education" title="اطلاعات تحصیلی" class="mt-5" >
< template v-for = "(item,index) in personalDetails.education" >
< div class = "grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3" >
< a-form-item label = "شناسه" >
{{ personalDetails . education [ index ]. id }}
</ a-form-item >
< a-form-item label = "مقطع" >
{{ personalDetails . education [ index ]. level ?
grade [ personalDetails . education [ index ]. level . toString ()] :
null }}
</ a-form-item >
< a-form-item label = "دانشگاه" >
{{ personalDetails . education [ index ]. university }}
</ a-form-item >
< a-form-item label = "رشته تحصیلی" >
{{ personalDetails . education [ index ]. title }}
</ a-form-item >
< a-form-item label = "گرایش" >
{{ personalDetails . education [ index ]. trend }}
</ a-form-item >
< a-form-item label = "سال شروع" >
{{ personalDetails . education [ index ]. start_at }}
</ a-form-item >
< a-form-item label = "سال خاتمه" >
{{ personalDetails . education [ index ]. end_at }}
</ a-form-item >
</ div >
< a-divider />
</ template >
</ a-card >
< a-card v-if = "personalDetails && personalDetails.traning" title="سوابق آموزشی" class="mt-5" >
< template v-for = "(item,index) in personalDetails.traning" >
< div class = "grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3" >
< a-form-item label = "شناسه" >
2022-06-15 16:12:39 +04:30
{{ personalDetails . traning [ index ]. id }}
2022-06-14 20:40:57 +04:30
</ a-form-item >
< a-form-item label = "مرکز برگزاری" >
2022-06-15 16:12:39 +04:30
{{ personalDetails . traning [ index ]. university }}
2022-06-14 20:40:57 +04:30
</ a-form-item >
< a-form-item label = "عنوان دوره " >
2022-06-15 16:12:39 +04:30
{{ personalDetails . traning [ index ]. title }}
2022-06-14 20:40:57 +04:30
</ a-form-item >
< a-form-item label = "سال" >
2022-06-15 16:12:39 +04:30
{{ personalDetails . traning [ index ]. start_at }}
2022-06-14 20:40:57 +04:30
</ a-form-item >
< a-form-item label = "امکان ارائه گواهینامه دارم" >
2022-06-15 16:12:39 +04:30
< a-checkbox v-model = "personalDetails.traning[index].has_certificate" />
2022-06-14 20:40:57 +04:30
</ a -form-item >
</ div >
< a-divider />
</ template >
</ a-card >
< a-card v-if = "personalDetails && personalDetails.jobs_history" title="سوابق کاری" class="mt-5" >
< template v-for = "(item,index) in personalDetails.jobs_history" >
< div class = "grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3" >
< a-form-item label = "شناسه" >
{{ personalDetails . jobs_history [ index ]. id }}
</ a-form-item >
< a-form-item label = "نام سازمان " >
{{ personalDetails . jobs_history [ index ]. university }}
</ a-form-item >
< a-form-item label = "عنوان شغل" >
{{ personalDetails . jobs_history [ index ]. title }}
</ a-form-item >
< a-form-item label = "دلیل خاتمه" >
{{ personalDetails . jobs_history [ index ]. note }}
</ a-form-item >
< a-form-item label = "سال شروع" >
{{ personalDetails . jobs_history [ index ]. start_at }}
</ a-form-item >
< a-form-item label = "سال خاتمه" >
{{ personalDetails . jobs_history [ index ]. end_at }}
</ a-form-item >
</ div >
< a-divider />
</ template >
</ a-card >
2022-06-23 17:15:17 +04:30
</ div > -->
< print-content :personel = "personel" :personalDetails = "personalDetails"
:grade = "grade" :personelBirthDate = "personelBirthDate" />
2022-06-14 20:40:57 +04:30
2022-05-23 21:01:38 +04:30
< a-spin :spinning = "showLoading" tip = "در حال دریافت اطلاعات" >
< a-form :form = "fromPersonel" >
2022-06-14 20:40:57 +04:30
< div >
2022-05-23 21:01:38 +04:30
< a-tabs type = "card" : default -active-key ="
$ getAccess (' personnel.basic ')? 1 :
$ getAccess (' personnel.train ')? 3 :
$ getAccess (' personnel.contract ')? 4 :
$ getAccess (' personnel.intro ')? 5 :
$ getAccess (' personnel.delivery ')? 6 :
$ getAccess (' personnel.function ')? 7 :
$ getAccess (' personnel.rule ')? 8 : undefined " >
< a-tab-pane :disabled = "!$getAccess('personnel.basic')" :forceRender = "true" key = "1" tab = "اطلاعات پایه" >
2022-06-14 20:40:57 +04:30
< a-card >
< div class = "flex justify-between" slot = "title" >
< div > اطلاعات فردی </ div >
< a-button class = "ml-2" @click ="printWindow()" > چاپ اطلاعات </ a -button >
2022-05-23 21:01:38 +04:30
</ div >
2022-06-14 20:40:57 +04:30
< div class = "grid grid-cols-2 gap-4" >
< div >
< a-form-item label = "تصویر پرسنلی" >
< single-upload-input ref = "fileUpload" :field = "'profile_file'"
:disabled = "!$getAccess('personnel.basic.update')" ></ single-upload-input >
< a-modal :visible = "previewVisible" :footer = "null" @cancel ="previewVisible = false;" >
< img alt = "example" style = "width: 100%" :src = "previewImage" />
</ a-modal >
</ a-form-item >
</ div >
2022-05-23 21:01:38 +04:30
2022-06-14 20:40:57 +04:30
< div >
< a-form-item label = "فایل ها" >
<!-- < single-upload-input ref = "fileUpload" :field = "'profile_file'" ></ single-upload-input > -->
<!-- -->
< div class = "dropbox" >
< a-upload-dragger
:disabled = "!$getAccess('personnel.basic.update')"
action = "http://hr.asco-intl.com:2020/kernel/api/register/upload"
:file-list = "documentFileList"
:default-file-list = "documentFileList"
@change ="changeDocumentUpload"
:remove = "handleRemoveDocument"
>
< p class = "ant-upload-drag-icon" >
< a-icon type = "inbox" />
</ p >
< p class = "ant-upload-text" >
فایل را درگ کنید یا اینکه کاوش کنید .
</ p >
< p class = "ant-upload-hint" >
فایلی که بارگذاری می کنید باید زیر ۵ مگابایت باشد .
</ p >
</ a-upload-dragger >
</ div >
</ a-form-item >
</ div >
2022-05-23 21:01:38 +04:30
</ div >
2022-06-14 20:40:57 +04:30
< div class = "grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3" >
< a-form-item label = "نام و نام خانوادگی" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['name']" />
2022-05-23 21:01:38 +04:30
</ a -form-item >
2022-06-14 20:40:57 +04:30
< a-form-item label = "نام انگلیسی" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['name_en']" />
2022-05-23 21:01:38 +04:30
</ a -form-item >
2022-06-14 20:40:57 +04:30
< a-form-item label = "کدملی" >
< input class = "ant-input" autocomplete = "off"
v-decorator = "['ncode',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]" />
2022-05-23 21:01:38 +04:30
</ a -form-item >
2022-06-14 20:40:57 +04:30
< a-form-item label = "شماره پرسنلی" >
< input class = "ant-input" autocomplete = "off"
v-decorator = "['personel_id',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]" />
</ a -form-item >
< a-form-item label = "موبایل" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['proposal.mobile', {rules: [{pattern:/^(\+98|0098|98|0)?9\d{9}$/g,message:'موبایل وارد شده معتبر نیست.'}]}]" />
</ a -form-item >
< a-form-item label = "شهر متقاضی شغل" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['proposal.for_cities']" />
</ a -form-item >
< a-form-item label = "شغل متقاضی" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['proposal.job_title']" />
</ a -form-item >
< a-form-item label = "واحد کار متقاضی" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['unit']" />
</ a -form-item >
< a-form-item label = "نام پدر" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['proposal.father_name']" />
</ a -form-item >
< a-form-item label = "تاریخ تولد" >
< input v-if = "!personelBirthDate" class="hidden" autocomplete="off"
v-decorator = "['note',{ rules:[{ required: true, message: 'تاریخ را وارد نمایید' }] }]" />
< date-picker v-model = "personelBirthDate" />
</ a -form-item >
< a-form-item label = "شماره شناسنامه" >
< input class = "ant-input" autocomplete = "off"
v-decorator = "['proposal.iden_id',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]" />
</ a -form-item >
< a-form-item label = "سریال شناسنامه" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['proposal.iden_serial']" />
</ a -form-item >
< a-form-item label = "محل صدور" >
< input class = "ant-input" autocomplete = "off" v-decorator = "['proposal.iden_place']" />
</ a -form-item >
< a-form-item label = "محل تولد" >
< input class = "ant-input" autocomplete = "off" v-decorator ="['proposal.birth_place',{rules: [{
pattern: /^([\u0600-\u06FF\uFB8A\u067E\u0686\u06AF\u200C ])+$/,
message: `محل صدور باید فارسی باشد `, }]}]"/>
</a-form-item>
<a-form-item label="ایمیل">
<input class="ant-input" autocomplete="off" v-decorator="['proposal.email']"/>
</a-form-item>
<a-form-item label="تلفن ثابت">
<input class="ant-input" autocomplete="off"
v-decorator="['proposal.phone',{ rules: [{pattern:/^((\+98|0098|98|0)\d{2})?\d{8}$/g,message:'تلفن وارد شده معتبر نیست.'},] }]"/>
</a-form-item>
<a-form-item label="حقوق درخواستی">
<input class="ant-input" autocomplete="off"
v-decorator="['proposal.requested_salary',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
<a-form-item label="جنسیت">
<a-radio-group v-decorator="['proposal.gender']" @change="setGender">
2022-05-23 21:01:38 +04:30
<a-radio :value="1">
2022-06-14 20:40:57 +04:30
مرد
</a-radio>
<a-radio :value="2">
زن
2022-05-23 21:01:38 +04:30
</a-radio>
</a-radio-group>
</a-form-item>
2022-06-14 20:40:57 +04:30
<a-form-item label="وضعیت تاهل">
<a-radio-group v-decorator="['proposal.marriage_sts']" @change="setMarriage_sts">
<a-radio :value="2">
متاهل
</a-radio>
<a-radio :value="1">
مجرد
</a-radio>
</a-radio-group>
2022-05-23 21:01:38 +04:30
</a-form-item>
2022-06-14 20:40:57 +04:30
<a-form-item label="وضعیت مسکن">
<a-radio-group v-decorator="['proposal.house_sts']">
<a-radio :value="1">
مالک
</a-radio>
<a-radio :value="2">
مستاجر
</a-radio>
</a-radio-group>
2022-05-23 21:01:38 +04:30
</a-form-item>
2022-06-14 20:40:57 +04:30
<a-form-item label="آدرس" class="col-span-3">
2022-05-23 21:01:38 +04:30
<input class="ant-input" autocomplete="off"
2022-06-14 20:40:57 +04:30
v-decorator="['proposal.address',{initialValue: null,rules: [{ required: false, message: 'آدرس را وارد نمایید' }]}]"/>
</a-form-item>
<a-form-item label="تلفن ضروری">
<input class="ant-input" style="direction: rtl !important;"
v-decorator="['proposal.phone_emergency',{initialValue: null,rules: [{ required:false, message: 'تلفن ضروری را وارد نمایید' },{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'}]}]">
</a-form-item>
<a-form-item label="نام فرد">
<input class="ant-input" autocomplete="off"
v-decorator="['proposal.phone_emergency_name',{initialValue: null}]">
2022-05-23 21:01:38 +04:30
</a-form-item>
<a-form-item label="نسبت">
<input class="ant-input" autocomplete="off"
2022-06-14 20:40:57 +04:30
v-decorator="['proposal.phone_emergency_related',{initialValue: null}]">
2022-05-23 21:01:38 +04:30
</a-form-item>
2022-06-14 20:40:57 +04:30
</div>
<div class="grid sm:grid-cols-1 md:grid-cols-3 gap-4 lg:grid-cols-3">
<div>
<a-form-item label="شماره کارت">
<a-input-number class="w-full"
v-decorator="['bank_card_number']"/>
</a-form-item>
</div>
<div>
<a-form-item label="شماره حساب">
<a-input-number class="w-full"
v-decorator="['bank_account']"/>
</a-form-item>
</div>
<div>
<a-form-item label="شماره بیمه">
<input class="ant-input"
v-decorator="['insurance_no',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="وضعیت بیمه">
<a-radio-group v-decorator="['insurance_sts']">
<a-radio :value="-1">
ندارد
</a-radio>
<a-radio :value="1">
دارد
</a-radio>
</a-radio-group>
</a-form-item>
</div>
<div>
<a-form-item label="تعداد فرزند">
<input class="ant-input"
v-decorator="['proposal.count_child',{rules: [{ required: false, message: 'لطفا مقدار را وارد کنید' },{ pattern: /^[0-9]+$/, message: 'فقط عدد مجاز است' }] }]"/>
</a-form-item>
</div>
<div v-if="flags.gender == 1">
<a-form-item label="وضعیت نظام وظیفه">
<a-select style="width: 100%"
v-decorator="['proposal.military_sts',{rules: [{ required: true, message: 'لطفا مقدار را وارد کنید' }] }]">
<a-select-option v-for="(item,index) in {1:'معاف',2:'مشمول',3:'پایان خدمت',}"
:value="index">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
</div>
<!-- <a-form-item label="آخرین مدرک تحصیلی">
<a-select v-decorator="[`last_education`]">
<a-select-option v-for="(item,index) in grade" :value="index">
2022-05-23 21:01:38 +04:30
{{ item }}
</a-select-option>
</a-select>
2022-06-14 20:40:57 +04:30
</a-form-item>-->
2022-05-23 21:01:38 +04:30
</div>
2022-06-14 20:40:57 +04:30
</a-card>
<a-card title="اطلاعات خانوادگی" class="mt-5">
<a slot="extra" @click.prevent="AddFamily()"
:disabled="!$getAccess('personnel.basic.family.create')">افزودن اطلاعات خانوادگی</a>
<template v-for="(item,index) in personalDetails.family">
<a-button :disabled="!$getAccess('personnel.basic.family.delete')" type="danger"
@click="handleRemoveFamily(item,index)">حذف
</a-button>
<div class="grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3">
<a-form-item style="display: none">
<input type="hidden" class="ant-input" autocomplete="off"
v-decorator="[`personal_details.family[${index}].id`]"/>
</a-form-item>
<a-form-item label="نام">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.family[${index}].name`, {initialValue: item.name}]"/>
</a-form-item>
<a-form-item label="نسبت">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.family[${index}].relation`, {initialValue: item.relation}]"/>
</a-form-item>
<a-form-item label="مقطع">
<a-select v-decorator="[`personal_details.family[${index}].edu_level`, {initialValue: item.edu_level}]">
<a-select-option v-for="(item,subIndex) in grade" :value="subIndex">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="رشته تحصیلی">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.family[${index}].edu_title`, {initialValue: item.edu_title}]"/>
</a-form-item>
<a-form-item label="شغل">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.family[${index}].job`, {initialValue: item.job}]"/>
</a-form-item>
</div>
<a-divider/>
</template>
</a-card>
2022-05-23 21:01:38 +04:30
2022-06-14 20:40:57 +04:30
<a-card title="اطلاعات تحصیلی" class="mt-5">
<a :disabled="!$getAccess('personnel.basic.education.create')" slot="extra"
@click.prevent="AddEducation()">افزودن سابقه تحصیلی</a>
<template v-for="(item,index) in personalDetails.education">
<a-button :disabled="!$getAccess('personnel.basic.education.delete')" type="danger"
@click="handleRemoveEducation(item,index)">حذف
</a-button>
<div class="grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3">
<a-form-item style="display: none">
<input type="hidden" class="ant-input" autocomplete="off"
v-decorator="[`personal_details.education[${index}].id`, {initialValue: item.id}]"/>
</a-form-item>
<a-form-item label="مقطع">
<a-select v-decorator="[`personal_details.education[${index}].level`, {initialValue: item.level}]">
<a-select-option v-for="(item,subIndex) in grade" :value="subIndex">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="دانشگاه">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.education[${index}].university`, {initialValue: item.university}]"/>
</a-form-item>
<a-form-item label="رشته تحصیلی">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.education[${index}].title`, {initialValue: item.title}]"/>
</a-form-item>
<a-form-item label="گرایش">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.education[${index}].trend`, {initialValue: item.trend}]"/>
</a-form-item>
<a-form-item label="سال شروع">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.education[${index}].start_at`,{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},],initialValue: item.start_at }]"/>
</a-form-item>
<a-form-item label="سال خاتمه">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.education[${index}].end_at`,{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},],initialValue: item.end_at }]"/>
</a-form-item>
</div>
<a-divider/>
</template>
</a-card>
<a-card title="سوابق آموزشی" class="mt-5">
<a :disabled="!$getAccess('personnel.basic.train.create')" slot="extra"
@click.prevent="AddTraning()">افزودن سابقه آموزشی </a>
<template v-for="(item,index) in personalDetails.traning">
<a-button :disabled="!$getAccess('personnel.basic.train.delete')" type="danger"
@click="handleRemoveTraning(item,index)">حذف
</a-button>
<div class="grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3">
<a-form-item style="display: none">
<input type="hidden" class="ant-input" autocomplete="off"
v-decorator="[`personal_details.traning[${index}].id`]"/>
</a-form-item>
<a-form-item label="مرکز برگزاری">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.traning[${index}].university`, {initialValue: item.university}]"/>
</a-form-item>
<a-form-item label="عنوان دوره ">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.traning[${index}].title`, {initialValue: item.title}]"/>
</a-form-item>
<a-form-item label="سال">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.traning[${index}].start_at`,{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},],initialValue: item.start_at }]"/>
</a-form-item>
<a-form-item label="امکان ارائه گواهینامه دارم">
<a-checkbox
v-decorator="[`personal_details.traning[${index}].has_certificate`,{initialValue:item.has_certificate,valuePropName: 'checked'}]"/>
</a-form-item>
</div>
<a-divider/>
</template>
</a-card>
<a-card title="سوابق کاری" class="mt-5">
<a :disabled="!$getAccess('personnel.basic.job.create')" slot="extra"
@click.prevent="AddJobsHistory()">افزودن سابقه کاری</a>
<template v-for="(item,index) in personalDetails.jobs_history">
<a-button :disabled="!$getAccess('personnel.basic.job.delete')" type="danger"
@click="handleRemoveJobsHistory(item,index)">حذف
</a-button>
<div class="grid sm:grid-cols-1 md:grid-cols-3 md:gap-3 lg:grid-cols-3 lg:gap-3">
<a-form-item style="display: none">
<input type="hidden" class="ant-input" autocomplete="off"
v-decorator="[`personal_details.jobs_history[${index}].id`]"/>
</a-form-item>
<a-form-item label="نام سازمان ">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.jobs_history[${index}].university`, {initialValue: item.university}]"/>
</a-form-item>
<a-form-item label="عنوان شغل">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.jobs_history[${index}].title`, {initialValue: item.title}]"/>
</a-form-item>
<a-form-item label="دلیل خاتمه">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.jobs_history[${index}].note`, {initialValue: item.note}]"/>
</a-form-item>
<a-form-item label="سال شروع">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.jobs_history[${index}].start_at`,{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},], initialValue: item.start_at }]"/>
</a-form-item>
<a-form-item label="سال خاتمه">
<input class="ant-input" autocomplete="off"
v-decorator="[`personal_details.jobs_history[${index}].end_at`,{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},], initialValue: item.end_at }]"/>
</a-form-item>
</div>
<a-divider/>
</template>
</a-card>
<a-card title="سوابق شخصی" class="mt-5">
<div class="dropbox">
<a-upload-dragger
:multiple="true"
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
:file-list="prsonalFileList"
:default-file-list="prsonalFileList"
@change="fileUpload"
>
<p class="ant-upload-drag-icon">
<a-icon type="inbox"/>
</p>
<p class="ant-upload-text">
فایل را درگ کنید یا اینکه کاوش کنید.
</p>
<p class="ant-upload-hint">
فایلی که بارگذاری می کنید باید زیر ۵ مگابایت باشد.
</p>
</a-upload-dragger>
2022-05-23 21:01:38 +04:30
</div>
2022-06-14 20:40:57 +04:30
</a-card>
2022-05-23 21:01:38 +04:30
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('1')">
ویرایش
</a-button>
</a-tab-pane>
<a-tab-pane :disabled="!$getAccess('personnel.train')" :forceRender="true" key="3" tab="اطلاعات آموزشی">
2022-06-23 17:15:17 +04:30
<training :training="training" :uploadImage="uploadImage" :beforeUpload="beforeUpload" v-model="image_data" @update="getPersonal" :key="updateKey"/>
2022-05-23 21:01:38 +04:30
</a-tab-pane>
<a-tab-pane :disabled="!$getAccess('personnel.contract')" :forceRender="true" key="4" tab="قراردادها">
2022-06-23 17:15:17 +04:30
<contracts :contract="contract" @update="getPersonal" :key="updateKey"/>
2022-05-23 21:01:38 +04:30
</a-tab-pane>
<a-tab-pane :disabled="!$getAccess('personnel.intro')" :forceRender="true" key="5" tab="آشناسازی">
<div class="grid sm:grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-3 lg:gap-4"
style="direction: rtl">
<div>
<a-form-item>
<a-checkbox
v-decorator="['intro_checklist.third',{initialValue:false,valuePropName:'checked'}]">
آموزشهای عمومی 17020،MIS و HSE
</a-checkbox>
</a-form-item>
</div>
<div>
<a-form-item>
<a-checkbox
v-decorator="['intro_checklist.second',{initialValue:false,valuePropName:'checked'}]">
آموزشهای مربوط به اصول اخلاقی و قوانین و مقررات شرکت
</a-checkbox>
</a-form-item>
</div>
<div>
<a-form-item>
<a-checkbox
v-decorator="['intro_checklist.first',{initialValue:false,valuePropName:'checked'}]">
آموزشهای مربوط به شرح شغل
</a-checkbox>
</a-form-item>
</div>
</div>
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('4')">
ویرایش
</a-button>
</a-tab-pane>
<a-tab-pane :disabled="!$getAccess('personnel.delivery')" :forceRender="true" key="6"
tab="تحویل تجهیزات">
<div class="grid sm:grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-10 lg:gap-4"
style="direction: rtl">
<div>
<a-form-item>
<a-checkbox
v-decorator="['equip_checklist.second',{initialValue:false,valuePropName:'checked'}]">لباس
</a-checkbox>
</a-form-item>
</div>
<div>
<a-form-item>
<a-checkbox
v-decorator="['equip_checklist.first',{initialValue:false,valuePropName:'checked'}]">کلاه
</a-checkbox>
</a-form-item>
</div>
<div>
<a-form-item>
<a-checkbox
v-decorator="['equip_checklist.fifth',{initialValue:false,valuePropName:'checked'}]">کفش
</a-checkbox>
</a-form-item>
</div>
<div>
<a-form-item>
<a-checkbox
v-decorator="['equip_checklist.forth',{initialValue:false,valuePropName:'checked'}]">عینک
</a-checkbox>
</a-form-item>
</div>
<div>
<a-form-item>
<a-checkbox
v-decorator="['equip_checklist.third',{initialValue:false,valuePropName:'checked'}]">دستکش
</a-checkbox>
</a-form-item>
</div>
<div>
<a-form-item>
<input class="ant-input"
v-decorator="['equip_checklist.cloth_size']" placeholder="سایز"/>
</a-form-item>
</div>
<div>
<a-form-item>
<input class="ant-input"
v-decorator="['equip_checklist.other']" placeholder="سایر تجهیزات"/>
</a-form-item>
</div>
</div>
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('5')">
ویرایش
</a-button>
</a-tab-pane>
<a-tab-pane :disabled="!$getAccess('personnel.function')" :forceRender="true" key="7"
tab="ارزیابی عملکرد">
2022-06-23 17:15:17 +04:30
<estimate :estimate="estimate" @update="getPersonal" :key="updateKey"/>
2022-05-23 21:01:38 +04:30
</a-tab-pane>
<a-tab-pane :disabled="!$getAccess('personnel.rule')" :forceRender="true" key="8"
tab="احکام / اخطار / پاداش">
2022-06-23 17:15:17 +04:30
<writ :writ="writ" :uploadImage="uploadImage" :beforeUpload="beforeUpload" v-model="image_data" @update="getPersonal" :key="updateKey"/>
</a-tab-pane>
</a-tabs>
</div>
</a-form>
</a-spin>
<!-- writ -->
<!--
<a-modal okText="ایجاد" cancelText="بستن" forceRender v-model="showAddDocument" title="افزودن سند"
@ok="addDocs">
<a-form :form="fromDocs">
<a-form-item label="نوع" has-feedback>
<a-select
v-decorator="['type']"
placeholder="انتخاب نوع"
>
<a-select-option value="1">
حکم
</a-select-option>
<a-select-option value="2">
اخطار
</a-select-option>
<a-select-option value="3">
پاداش
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="شرح">
<input class="ant-input" style="width:100%"
autocomplete="off"
v-decorator="['note']"
/>
</a-form-item>
<a-form-item label="فایل">
<div class="dropbox">
<a-upload-dragger
v-if="!isAlertUpload"
:customRequest="uploadImage"
:show-upload-list="false"
:before-upload="beforeUpload"
>
<p class="ant-upload-drag-icon">
<a-icon type="inbox"/>
</p>
<p class="ant-upload-text">
فایل را درگ کنید یا اینکه کاوش کنید.
</p>
<p class="ant-upload-hint">
تصویر که بارگذاری می کنید باید زیر ۵ مگابایت باشد.
</p>
</a-upload-dragger>
<div v-else>
<a-alert message="آپلود سند با موفقیت انجام شد." type="success"/>
</div>
</div>
</a-form-item>
</a-form>
</a-modal>-->
<!-- <a-list :locale="{emptyText:'رکوردی وجود ندارد.'}" bordered item-layout="horizontal">
2022-05-23 21:01:38 +04:30
<a-list-item class="grid grid-cols-3" v-for="(item,index) in writ" :key="index">
<div>
<a-tooltip placement="bottomRight">
<a-button v-if="item.file" target="_blank" type="primary" :href="item.file.storage" class="mr-3">
دانلود
پیوست
</a-button>
<template slot="title">
<span>حذف</span>
</template>
<a-popconfirm :disabled="!$getAccess('personnel.rule.delete')"
placement="right"
title="آیا می خواهید حذف کنید؟"
ok-text="بله"
cancel-text="خیر"
@confirm="removeDocs(item)"
>
<a-button type="danger" class="mr-3">حذف</a-button>
</a-popconfirm>
</a-tooltip>
</div>
<div style="direction: rtl"><span>نوع :</span><span>{{ item.type_str }}</span></div>
<div style="direction: rtl">عنوان : {{ item.note }}</div>
</a-list-item>
</a-list>
<a-button :disabled="!$getAccess('personnel.rule.create')" class="mt-4 ml-2"
@click="showAddDocument=true;isAlertUpload = false">افزودن ردیف
</a-button>
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('7')"
v-if="writ && writ.length > 0">
ویرایش
2022-06-23 17:15:17 +04:30
</a-button>-->
<!-- writ -->
2022-05-23 21:01:38 +04:30
2022-06-23 17:15:17 +04:30
<!-- estimate -->
<!-- <a-list :locale="{emptyText:'رکوردی وجود ندارد.'}" bordered item-layout="horizontal">
<a-list-item class="grid grid-cols-3" v-for="(item,index) in estimate" :key="index">
<div>
<a-tooltip placement="bottomRight">
<template slot="title">
<span>حذف</span>
</template>
<a-popconfirm :disabled="!$getAccess('personnel.function.delete')"
placement="right"
title="آیا می خواهید حذف کنید؟"
ok-text="بله"
cancel-text="خیر"
@confirm="removeEstimate(item)">
<a-button type="danger" class="mr-3">حذف</a-button>
</a-popconfirm>
</a-tooltip>
</div>
<div>نمره : {{ item.score }}</div>
<div> برنامه توسعه دوره : <span>{{ item.note }} </span></div>
</a-list-item>
</a-list>
<br/>
<a-button class="ml-2" :disabled="!$getAccess('personnel.function.create')"
@click="showAddPerformance=true">افزودن ردیف
</a-button>
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('6')"
v-if="estimate && estimate.length > 0">
ویرایش
</a-button>-->
<!-- <a-modal @ok="savefromPerformance" okText="ایجاد" forceRender cancelText="بستن" v-model="showAddPerformance"
title="افزودن ارزیابی عملکرد">
<a-form :form="fromPerformance">
<a-form-item label="نمره">
<a-input-number autocomplete="off" :min="0" :max="20"
v-decorator="['score',{ rules:[{ required: true, message: 'وارد کردن الزامی است' }] }]"/>
</a-form-item>
<a-form-item label="برنامه توسعه دوره">
<input class="ant-input" autocomplete="off"
v-decorator="['note',{ rules:[{ required: false, message: 'وارد کردن الزامی است' }] }]"/>
</a-form-item>
</a-form>
</a-modal>-->
<!-- estimate -->
<!-- training -->
<!-- <a-modal forceRender okText="ایجاد" cancelText="بستن" v-model="showAddEducationalInformation"
2022-05-23 21:01:38 +04:30
title="افزودن اطلاعات آموزشی" @ok="addEdu">
<a-form :form="fromEducationalInformation">
<div class="grid sm:grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-2 lg:gap-4">
<a-form-item label="دسته گواهینامه">
2022-06-23 17:15:17 +04:30
<!–<input class="ant-input" autocomplete="off" v-decorator="['type',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]"/>–>
2022-05-23 21:01:38 +04:30
<a-select style="width: 100%"
v-decorator="['type',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]">
<a-select-option v-for="(item,index) in category" :value="item">
{{ item }}
</a-select-option>
2022-06-23 17:15:17 +04:30
<!–<a-select-option value="lucy">
2022-05-23 21:01:38 +04:30
Lucy
</a-select-option>
<a-select-option value="disabled" disabled>
Disabled
</a-select-option>
<a-select-option value="Yiminghe">
yiminghe
2022-06-23 17:15:17 +04:30
</a-select-option>–>
2022-05-23 21:01:38 +04:30
</a-select>
</a-form-item>
<a-form-item label="عنوان گواهینامه">
<input class="ant-input" autocomplete="off"
v-decorator="['title',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]"/>
</a-form-item>
</div>
<a-form-item label="فایل">
<div class="dropbox">
<a-upload-dragger
v-if="!isAlertUpload"
:customRequest="uploadImage"
:show-upload-list="false"
:before-upload="beforeUpload">
<p class="ant-upload-drag-icon">
<a-icon type="inbox"/>
</p>
<p class="ant-upload-text">
فایل را درگ کنید یا اینکه کاوش کنید.
</p>
<p class="ant-upload-hint">
فایل را درگ کنید یا اینکه کاوش کنید.
</p>
</a-upload-dragger>
<div v-else>
<a-alert message="آپلود سند با موفقیت انجام شد." type="success"/>
</div>
</div>
</a-form-item>
</a-form>
2022-06-23 17:15:17 +04:30
</a-modal>-->
<!-- <a-list :locale="{emptyText:'رکوردی وجود ندارد.'}" bordered item-layout="horizontal">
<a-list-item class="grid grid-cols-3" v-for="(item,index) in training" :key="index">
<div>
<a-button v-if="item.file" target="_blank" type="primary"
:disabled="!$getAccess('personnel.train.download')" :href="item.file.storage"
class="mr-3">دانلود پیوست
</a-button>
<a-tooltip placement="bottomRight">
<template slot="title">
<span>حذف</span>
</template>
<a-popconfirm
:disabled="!$getAccess('personnel.train.delete')"
placement="right"
title="آیا می خواهید حذف کنید؟"
ok-text="بله"
cancel-text="خیر"
@confirm="removeEdu(item)"
>
<a-button type="danger" class="mr-3">حذف</a-button>
</a-popconfirm>
</a-tooltip>
</div>
<div><span>دسته گواهینامه :</span> {{ item.type }}</div>
<div style="direction: rtl">عنوان گواهینامه : {{ item.title }}</div>
</a-list-item>
</a-list>
<a-button :disabled="!$getAccess('personnel.train.create')" class="mt-4 ml-2"
@click="showAddEducationalInformation=true;isAlertUpload = false">افزودن ردیف
</a-button>
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('2')"
v-if="training && training.length > 0">
ویرایش
</a-button>-->
<!-- training -->
2022-05-23 21:01:38 +04:30
2022-06-23 17:15:17 +04:30
<!-- contract -->
<!-- <a-list :locale="{emptyText:'رکوردی وجود ندارد.'}" bordered item-layout="horizontal">
<a-list-item class="grid grid-cols-4" style="direction: rtl" v-for="(item,index) in contract"
:key="index">
<div class="col-span-3 grid grid-cols-3">
<div class="mt-5">حقوق پایه :
{{ item.salary }}
</div>
<div class="mt-5">تاریخ خاتمه :
{{ item.end_atj | jtjdate }}
</div>
<div class="mt-5">تاریخ شروع :
{{ item.start_atj | jtjdate }}
</div>
<div class="mt-5">بن کارگری :
{{ item.worker_coupon }}
</div>
<div class="mt-5">کمک هزینه مسکن :
{{ item.housing_allowance }}
</div>
<div class="mt-5">حق جذب : {{ item.right_attraction }}</div>
<div class="mt-5"> شماره سفته :
{{ item.promissory_number }}
</div>
<div class="mt-5"> مبلغ سفته :
{{ item.promissory }}
</div>
<div class="mt-5"> حق سرپرستی :
{{ item.right_guardianship }}
</div>
<div class="mt-5"><span>شماره قرارداد :</span> <span>{{ item.contract_number }}</span>
</div>
<div class="mt-5">دلیل فسخ قرارداد :
{{ item.reason_termination }}
</div>
<div class="mt-5">تاریخ فسخ قرارداد :
{{ item.datej_termination | jtjdate }}
</div>
<div class="mt-5">نوع قرارداد :
{{ item.type_str }}
</div>
<div class="mt-5">محل خدمت :
{{ item.cnt.value }}
</div>
</div>
<div class="grid grid-cols-1" style="direction: ltr">
<div class="mt-5">
<a-button :disabled="!$getAccess('personnel.contract.termination')"
v-if="!item.date_termination" class="ml-3" @click="showTerminationModal(index)">فسخ
قرارداد
</a-button>
<a-button :disabled="!$getAccess('personnel.contract.no.termination')" v-else class="ml-3"
@click="removetermination(index)">لغو فسخ قرارداد
</a-button>
<a-button :disabled="!$getAccess('personnel.contract')" v-if="item.file" class="ml-3"
target="_blank" type="primary" :href="item.file.storage">دانلود پیوست
</a-button>
</div>
<div class="mt-5">
<a-tooltip :disabled="!$getAccess('personnel.contract.delete')" placement="bottomRight"
class="ml-3">
<template slot="title">
<span>حذف</span>
</template>
<a-popconfirm
placement="right"
title="آیا می خواهید حذف کنید؟"
ok-text="بله"
cancel-text="خیر"
@confirm="removeContract(item)">
<a-button type="danger" class="mt-3 mr-3">حذف</a-button>
</a-popconfirm>
</a-tooltip>
<a-dropdown class="mb-4">
<a-menu slot="overlay" @click="printContract($event,item.id)">
<a-menu-item v-for="(subItem,subIndex) in contractTypes" :key="subIndex">{{ subItem }}
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> چاپ قرارداد
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button class="ml-3" :disabled="!$getAccess('personnel.contract.update')"
@click="openEditingContractModal(item,index)">ویرایش
</a-button>
</div>
</div>
</a-list-item>
</a-list>
<a-button class="mt-3 ml-2" @click="showAddContract = true">افزودن ردیف</a-button>
<a-button type="primary" @click="savefromPersonel" class="mt-5" :disabled="checkPermission('3')"
v-if="contract && contract.length > 0">
ویرایش
</a-button>-->
<!--
2022-05-23 21:01:38 +04:30
<a-modal @ok="detectEditMode" :okText="editContractFlag?'ویرایش':'ایجاد'" forceRender cancelText="بستن"
v-model="showAddContract" :title="editContractFlag?'ویرایش قرارداد':'افزودن قرارداد'"
:forceRender="true">
<a-form :form="fromContract">
<div class="grid grid-cols-2 gap-4">
<div>
<a-form-item label="تاریخ شروع">
<input v-if="!contractModel.start_at" class="hidden" autocomplete="off"
v-decorator="['note',{ rules:[{ required: true, message: 'تاریخ را وارد نمایید' }] }]"/>
<date-picker v-model="contractModel.start_at"/>
</a-form-item>
</div>
<div>
<a-form-item label="تاریخ خاتمه">
<input v-if="!contractModel.end_at" class="hidden" autocomplete="off"
v-decorator="['note',{ rules:[{ required: true, message: 'تاریخ را وارد نمایید' }] }]"/>
<date-picker v-model="contractModel.end_at"/>
</a-form-item>
</div>
</div>
<div class="grid grid-cols-3 gap-4">
<div>
<a-form-item label="حقوق پایه">
<input class="ant-input"
v-decorator="['salary', { initialValue: 0 },{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="بن کارگری">
<input class="ant-input"
v-decorator="['worker_coupon', { initialValue: 0 },{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="کمک هزینه مسکن">
<input class="ant-input"
v-decorator="['housing_allowance', { initialValue: 0 },{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="حق جذب">
<input class="ant-input"
v-decorator="['right_attraction', { initialValue: 0 },{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="حق سرپرستی">
<input class="ant-input"
v-decorator="['right_guardianship', { initialValue: 0 },{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="مبلغ سفته">
<input class="ant-input"
v-decorator="['promissory', { initialValue: 0 },{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="شماره سفته">
<input class="ant-input"
v-decorator="['promissory_number',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="شماره قرارداد">
<input class="ant-input"
v-decorator="['contract_number']"/>
</a-form-item>
</div>
<div>
<a-form-item label="حق فرزند">
<input class="ant-input"
v-decorator="['right_child',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="پایه سنوات">
<input class="ant-input"
v-decorator="['basic_years',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="حق ماموریت">
<input class="ant-input"
v-decorator="['right_mission',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="حق شیفت">
<input class="ant-input"
v-decorator="['right_shift',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="پاداش مستمر">
<input class="ant-input"
v-decorator="['reward',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<a-form-item label="نوع قرارداد">
<a-select v-model="contractType" style="width: 100%" v-decorator="['type']">
<a-select-option v-for="(item,index) in contractTypes" :value="`${index}`">
{{ item }}
</a-select-option>
</a-select>
</a-form-item>
<div>
<a-form-item label="حق السعی">
<input class="ant-input"
v-decorator="['right_try',{ rules: [{pattern:/^[0-9]+$/,message:'مقدار وارد شده باید عددی باشد.'},] }]"/>
</a-form-item>
</div>
<div>
<a-form-item label="محل خدمت">
<input class="ant-input" v-decorator="['city_workplace']"/>
</a-form-item>
</div>
<div>
<a-form-item label="واحد کار">
<a-select
v-decorator="['work_unit', { initialValue:null,rules: [{ required: true, message: 'لطفاسطح مقدار را انتخاب کنید' }] }]"
@change="selectChange">
<a-select-option v-for="item in work_units" :value="item.id">
{{ item.value }}
</a-select-option>
</a-select>
</a-form-item>
</div>
<div>
<a-form-item label="نام واحد" has-feedback v-if="showName">
<input class="ant-input"
v-decorator="['work_unit_name', { rules: [{ required: true, message: 'لطفا مقدار را وارد کنید' }] }]"
autocomplete="off"
/>
</a-form-item>
</div>
</div>
2022-06-23 17:15:17 +04:30
<!–<a-form-item label="دلیل فسخ قرارداد">
2022-05-23 21:01:38 +04:30
<input class="ant-input" style="width: 100%" v-decorator="['reason_termination']" />
2022-06-23 17:15:17 +04:30
</a-form-item>–>
2022-05-23 21:01:38 +04:30
<a-form-item label="فایل">
<div class="dropbox">
<a-upload-dragger
:disabled="!$getAccess('personnel.basic.update')"
:multiple="false"
action="http://hr.asco-intl.com:2020/kernel/api/register/upload"
:file-list="contractFileList"
:default-file-list="contractFileList"
@change="contractFileUpload"
:remove="contractFileRemove"
>
<p class="ant-upload-drag-icon">
<a-icon type="inbox"/>
</p>
<p class="ant-upload-text">
فایل را درگ کنید یا اینکه کاوش کنید.
</p>
<p class="ant-upload-hint">
فایلی که بارگذاری می کنید باید زیر ۵ مگابایت باشد.
</p>
</a-upload-dragger>
2022-06-23 17:15:17 +04:30
<!– <a-upload-dragger
2022-05-23 21:01:38 +04:30
:customRequest="uploadImage"
:file-list="contractFileList"
:before-upload="beforeUpload"
>
<p class="ant-upload-drag-icon">
<a-icon type="inbox" />
</p>
<p class="ant-upload-text">
فایل را درگ کنید یا اینکه کاوش کنید.
</p>
<p class="ant-upload-hint">
تصویر که بارگذاری می کنید باید زیر ۵ مگابایت باشد.
</p>
2022-06-23 17:15:17 +04:30
</a-upload-dragger>–>
<!– <div v-else>
2022-05-23 21:01:38 +04:30
<a-alert message="آپلود سند با موفقیت انجام شد." type="success" />
2022-06-23 17:15:17 +04:30
</div>–>
2022-05-23 21:01:38 +04:30
</div>
</a-form-item>
</a-form>
2022-06-23 17:15:17 +04:30
</a-modal>-->
<!--
2022-05-23 21:01:38 +04:30
<a-modal okText="ثبت" cancelText="بستن" forceRender v-model="showTermination" title="فسخ قرارداد"
@ok="addtermination">
<a-form :form="formTermination">
2022-06-23 17:15:17 +04:30
<!– <a-form-item label="تاریخ فسخ قرارداد">
2022-05-23 21:01:38 +04:30
<input class="ant-input" autocomplete="off" v-decorator="['date_termination']" />
<!–v-model="contract[activeContract].date_termination"–>
2022-06-23 17:15:17 +04:30
</a-form-item>–>
2022-05-23 21:01:38 +04:30
<a-form-item label="تاریخ فسخ قرارداد">
<input v-if="!date_termination" class="hidden" autocomplete="off"
v-decorator="['note',{ rules:[{ required: true, message: 'تاریخ را وارد نمایید' }] }]"/>
<date-picker v-model="date_termination"/>
</a-form-item>
<a-form-item label="دلیل فسخ قرارداد">
<input class="ant-input" autocomplete="off" v-decorator="['reason_termination']"/>
2022-06-23 17:15:17 +04:30
<!–v-model="contract[activeContract].reason_termination"–>
2022-05-23 21:01:38 +04:30
</a-form-item>
</a-form>
2022-06-23 17:15:17 +04:30
</a-modal>-->
<!-- contract -->
2022-05-23 21:01:38 +04:30
</div>
</template>
<script>
import axios from "@/axios";
import VuePersianDatetimePicker from 'vue-persian-datetime-picker'
import themeConfig from '@/../themeConfig.js'
import SingleUploadInput from '@/components/SingleUploadInput'
2022-06-23 17:15:17 +04:30
import {printWindow} from "@/mixin/keyEvent";
import contracts from "./components/contracts";
import training from "./components/training";
import printContent from "./components/printContent";
import estimate from "./components/estimate";
import writ from "./components/writ";
2022-05-23 21:01:38 +04:30
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
export default {
components: {
SingleUploadInput,
2022-06-23 17:15:17 +04:30
datePicker: VuePersianDatetimePicker,
contracts,
training,
printContent,
estimate,
writ,
2022-05-23 21:01:38 +04:30
},
data() {
return {
flags: {
gender: undefined,
marriage_sts: undefined,
},
prsonalFileList: [],
2022-06-14 20:40:57 +04:30
file_ids: [],
2022-05-23 21:01:38 +04:30
fileList: [],
documentFileList: [],
documents: [],
loading: false,
imageUrl: '',
previewVisible: false,
previewImage: '',
showLoading: false,
2022-06-23 17:15:17 +04:30
fromPersonel: this.$form.createForm(this, {name: 'cordinate'}),
2022-05-23 21:01:38 +04:30
frm1: this.$form.createForm(this, {name: 'cordinate'}),
form: this.$form.createForm(this, {name: 'cordinate'}),
2022-06-23 17:15:17 +04:30
personel: {},
personelBirthDate: null,
estimate: [],
writ: [],
training: [],
image_data: null,
personalDetails: {},
grade: {},
contract: [],
updateKey: 0,
/*previewVisible: false,*/
// showTermination: false,
// fromPerformance: this.$form.createForm(this, {name: 'cordinate'}),
// fromDocs: this.$form.createForm(this, {name: 'cordinate'}),
// date_termination: null,
// showAddPerformance: false,
// showAddDocument: false,
// isAlertUpload: false,
// isShowDocs: false,
//training
// showAddEducationalInformation: false,
// fromEducationalInformation: this.$form.createForm(this, {name: 'cordinate'}),
// category: [],
//training
// contract
// formTermination: this.$form.createForm(this, {name: 'cordinate'}),
// isAlertUploadContract: false,
/*fromContract: this.$form.createForm(this, {name: 'cordinate'}),
2022-05-23 21:01:38 +04:30
contractModel: {
start_at: '',
end_at: '',
salary: 0,
worker_coupon: 0,
housing_allowance: 0,
right_attraction: 0,
right_guardianship: 0,
reason_termination: ''
},
2022-06-23 17:15:17 +04:30
*/
/*activeContract: null,
2022-05-23 21:01:38 +04:30
contractId: '',
contractNumber: '',
showContractPrint: false,
//profile_file:null,
// editing mode add
editContractFlag: false,
2022-06-23 17:15:17 +04:30
showAddContract: false,
2022-05-23 21:01:38 +04:30
// editingContractIndex : undefined,
contractTypes: undefined,
2022-06-23 17:15:17 +04:30
contractType: "1",*/
// work_units: [],
// showName: false,
// contractFileList: [],
// contract
2022-06-14 20:40:57 +04:30
printWindow,
2022-05-23 21:01:38 +04:30
}
},
methods: {
setMarriage_sts(event) {
this.flags.marriage_sts = event.target.value
},
setGender(event) {
this.flags.gender = event.target.value
},
fileUpload({fileList, event, file}) {
2022-06-23 17:15:17 +04:30
if (file.status && (file.id || (file.response && file.response.id))) {
2022-06-14 20:40:57 +04:30
this.file_ids = fileList.map(x => x.id || x.response.id)
2022-05-23 21:01:38 +04:30
}
this.prsonalFileList = fileList;
},
checkPermission(index) {
const steps = {
1: 'personnel.basic.update',
2: 'personnel.train.update',
3: 'personnel.contract.update',
4: 'personnel.intro',
5: 'personnel.delivery',
6: 'personnel.function.update',
7: 'personnel.rule.update'
}
return !this.$getAccess(steps[index])
},
AddJobsHistory() {
const obj = {
"title": null,
"university": null,
"start_at": null,
"end_at": null,
"file_id": null,
};
2022-06-14 20:40:57 +04:30
this.personalDetails.jobs_history.push(obj);
2022-05-23 21:01:38 +04:30
},
AddTraning() {
const obj = {
"title": null,
"university": null,
"start_at": null,
2022-06-06 15:49:52 +04:30
"has_certificate": false,
2022-05-23 21:01:38 +04:30
}
2022-06-14 20:40:57 +04:30
this.personalDetails.traning.push(obj);
2022-05-23 21:01:38 +04:30
},
AddEducation() {
const obj = {
2022-06-06 15:49:52 +04:30
"level": null,
2022-05-23 21:01:38 +04:30
"title": null,
"trend": null,
"university": null,
"start_at": null,
"end_at": null,
};
2022-06-14 20:40:57 +04:30
this.personalDetails.education.push(obj);
2022-05-23 21:01:38 +04:30
},
AddFamily() {
const obj = {
"name": null,
"relation": null,
2022-06-06 15:49:52 +04:30
"edu_level": null,
2022-05-23 21:01:38 +04:30
"edu_title": null,
"job": null,
};
2022-06-14 20:40:57 +04:30
this.personalDetails.family.push(obj);
2022-05-23 21:01:38 +04:30
},
async handleRemoveFamily(item, index) {
if (item.id) {
try {
this.loading = true
await axios.post('remove-family', {id: item.id})
2022-06-14 20:40:57 +04:30
this.personalDetails.family.splice(index, 1)
2022-05-23 21:01:38 +04:30
}
catch (e) {
this.$message.error('خطا در دریافت اطلاعات');
}
finally {
this.loading = false
}
} else {
2022-06-14 20:40:57 +04:30
this.personalDetails.family.splice(index, 1);
2022-05-23 21:01:38 +04:30
}
},
async handleRemoveEducation(item, index) {
if (item.id) {
try {
this.loading = true
await axios.post('remove-education', {id: item.id})
2022-06-14 20:40:57 +04:30
this.personalDetails.education.splice(index, 1)
2022-05-23 21:01:38 +04:30
}
catch (e) {
this.$message.error('خطا در دریافت اطلاعات');
}
finally {
this.loading = false
}
} else {
2022-06-14 20:40:57 +04:30
this.personalDetails.education.splice(index, 1);
2022-05-23 21:01:38 +04:30
}
},
async handleRemoveTraning(item, index) {
if (item.id) {
try {
this.loading = true
await axios.post('remove-education', {id: item.id})
2022-06-14 20:40:57 +04:30
this.personalDetails.traning.splice(index, 1)
2022-05-23 21:01:38 +04:30
}
catch (e) {
this.$message.error('خطا در دریافت اطلاعات');
}
finally {
this.loading = false
}
} else {
2022-06-14 20:40:57 +04:30
this.personalDetails.traning.splice(index, 1);
2022-05-23 21:01:38 +04:30
}
},
async handleRemoveJobsHistory(item, index) {
if (item.id) {
try {
this.loading = true
await axios.post('remove-education', {id: item.id})
2022-06-14 20:40:57 +04:30
this.personalDetails.jobs_history.splice(index, 1)
2022-05-23 21:01:38 +04:30
}
catch (e) {
this.$message.error('خطا در دریافت اطلاعات');
}
finally {
this.loading = false
}
} else {
2022-06-14 20:40:57 +04:30
this.personalDetails.jobs_history.splice(index, 1);
2022-05-23 21:01:38 +04:30
}
},
handleRemoveDocument(file) {
let index = this.documents.findIndex((item) => {
return item == file.uid;
});
if (index > -1) {
this.documents.splice(index, 1);
}
},
changeDocumentUpload({fileList, event, file}) {
if (file.response && file.response.id) {
this.documents.push(file.response.id);
}
this.documentFileList = fileList;
/* const status = info.file.status;
console.log('info',info);
if (status === 'done') {
}
if (status === 'removed') {
let id=null;
if(info.file.response){
id=info.file.response.id;
}
else
{
id=info.file.uid;
}
let index=this.documents.findIndex((item)=>{
return item==id;
});
if(index>-1)
{
this.documents.splice(index,1);
}
//console.log('tttt',this.documents);
}*/
},
async saveData() {
this.fromPersonel.validateFields(async (err, values) => {
if (!err) {
try {
this.$vs.loading()
values.proposal.count_child = parseInt(values.proposal.count_child)
values.proposal.birth_date = this.personelBirthDate
2022-06-14 20:40:57 +04:30
values.proposal.file_ids = this.file_ids
2022-05-23 21:01:38 +04:30
//console.log(values);
values.id = this.personel.id;
//values.profile_file=this.profile_file;
2022-06-23 17:15:17 +04:30
// values.writ = this.writ;
// values.estimate = this.estimate
2022-05-23 21:01:38 +04:30
/*values.document=this.documentFileList.map((item)=>{
return item.uid;
});*/
values.documents = this.documents;
if (!this.$getAccess('personnel.basic.update')) {
values.proposal = this.personel.proposal
values.bank_card_number = this.personel.bank_card_number
values.bank_account = this.personel.bank_account
values.name = this.personel.name
values.insurance_no = this.personel.insurance_sts
values.insurance_sts = this.personel.insurance_sts
values.ncode = this.personel.ncode
values.documents = this.personel.documents
values.personel_id = this.personel.personel_id
values.profile_file = this.personel.profile_file
}
2022-06-23 17:15:17 +04:30
//training
// values.training = this.training
/*if (!this.$getAccess('personnel.train')) {
2022-05-23 21:01:38 +04:30
values.training = this.personel.training
2022-06-23 17:15:17 +04:30
}*/
//training
// contract
// values.contract = this.contract;
/*if (!this.$getAccess('personnel.contract')) {
2022-05-23 21:01:38 +04:30
values.contract = this.personel.contract
2022-06-23 17:15:17 +04:30
}*/
// contract
2022-05-23 21:01:38 +04:30
if (!this.$getAccess('personnel.intro')) {
values.intro_checklist = this.personel.intro_checklist
}
if (!this.$getAccess('personnel.delivery')) {
values.equip_checklist = this.personel.equip_checklist
}
2022-06-23 17:15:17 +04:30
/*if (!this.$getAccess('personnel.function')) {
2022-05-23 21:01:38 +04:30
values.estimate = this.personel.estimate
2022-06-23 17:15:17 +04:30
}*/
/*if (!this.$getAccess('personnel.rule')) {
2022-05-23 21:01:38 +04:30
values.writ = this.personel.writ
2022-06-23 17:15:17 +04:30
}*/
2022-05-23 21:01:38 +04:30
await axios.post('personnel/update', values);
this.getdata(this.personel.id);
this.$ntSet()
} catch (e) {
this.$ntSetError()
console.log(e)
} finally {
await this.getPersonal()
this.$vs.loading.close()
2022-06-23 17:15:17 +04:30
// this.showAddPerformance = false
2022-05-23 21:01:38 +04:30
this.showAddDocument = false
2022-06-23 17:15:17 +04:30
// this.showAddEducationalInformation = false
// this.showAddContract = false
// this.showTermination = false
// this.showTermination = false
2022-05-23 21:01:38 +04:30
}
} else {
this.$ntGetError('اطلاعات را به صورت کامل وارد کنید');
}
});
},
async savefromPersonel(e) {
e.preventDefault();
this.fromPersonel.validateFields(async (err, values) => {
if (!err) {
try {
await this.saveData();
await this.getdata(this.personel.id);
} catch (e) {
this.$ntSetError()
console.log(e)
} finally {
await this.getPersonal()
}
}
});
},
async getdata(id) {
try {
const {data} = await axios.post('/personnel/get-data', {id: id});
this.contract = data.contract;
this.writ = data.writ;
this.estimate = data.estimate;
this.training = data.training;
//for per
this.personel.contract = this.contract
this.personel.writ = this.writ
this.personel.estimate = this.estimate
this.personel.training = this.training
} catch (error) {
console.log(error);
throw error;
}
},
async uploadImage(input) {
try {
let formData = new FormData();
formData.append("file", input.file);
const {data} = await axios.post("register/upload", formData, {'Content-Type': 'multipart/form-data'});
//console.log(data,'dataaaa')
this.image_data = data
this.$message.success('آپلود سند با موفقیت انجام شد.');
// this.isAlertUpload = true
} catch (e) {
this.$message.error('خطا در بارگذاری اطلاعات');
} finally {
}
},
beforeUpload(file) {
const isFormat = ['image/']
const isJpgOrPng = isFormat.some((item) => file.type.includes(item));
if (!isJpgOrPng) {
this.$message.error('نوع فایل قابل قبول نیست.');
}
const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
this.$message.error(`سایز فایل نمی تواند بیشتر از ۵ مگ باشد.`);
}
return isLt2M && isJpgOrPng;
},
async showPersonal(record) {
try {
2022-06-15 16:12:39 +04:30
if (record.proposal.file_ids && record.proposal.file_list) {
2022-06-14 20:40:57 +04:30
this.file_ids = record.proposal.file_ids
this.prsonalFileList = record.proposal.file_list.map(x => {
2022-06-15 16:12:39 +04:30
if (x && x.id && x.filename && x.storage) return {
2022-06-14 20:40:57 +04:30
uid: x.id,
id: x.id,
name: x.filename,
status: 'done',
url: x.storage
}
})
2022-05-23 21:01:38 +04:30
}
record.proposal.military_sts = record.proposal.military_sts ? `${record.proposal.military_sts}` : undefined
this.showLoading = true;
const {data} = await axios.post('/proposal/details', {id: record.proposal_id})
record.personal_details = data;
this.$refs.fileUpload.fileList = [];
this.documentFileList = [];
this.$forceUpdate();
if (record.profile != null) {
this.$refs.fileUpload.fileList.push({
uid: '-1',
name: 'image.png',
status: 'done',
url: record.profile.storage
}); //[0].url=record.profile.storage;
}
this.documents = record.documents || [];
for (const file of record.file_list) {
//console.log('file',file);
this.documentFileList.push({uid: file.id, name: file.filename, status: 'done', url: file.storage});
}
console.log(this.documentFileList);
this.personalDetails = data;
this.getdata(record.id);
this.personel = record;
this.personelBirthDate = record && record.proposal && record.proposal.birth_date ? record.proposal.birth_date : null;
this.flags = {gender: record.proposal.gender, marriage_sts: record.proposal.marriage_sts,}
2022-05-26 17:25:49 +04:30
record.personal_details.education.forEach((item) => {
2022-06-06 15:58:58 +04:30
item.level = ['number'].includes(typeof item.level) ? `${item.level}` : item.level
2022-05-26 17:25:49 +04:30
})
record.personal_details.family.forEach((item) => {
2022-06-06 15:58:58 +04:30
item.edu_level = ['number'].includes(typeof item.edu_level) ? `${item.edu_level}` : item.edu_level
2022-05-26 17:25:49 +04:30
})
// personal_details.family[${index}].edu_level
2022-05-23 21:01:38 +04:30
this.$nextTick(() => {
this.fromPersonel.setFieldsValue(record);
});
this.showLoading = false;
} catch (e) {
2022-06-15 16:12:39 +04:30
console.log(e,'in set user')
2022-05-23 21:01:38 +04:30
} finally {
}
},
async getPersonal() {
try {
const {data} = await axios.get(`/personnel/${this.id}`)
await this.showPersonal(data)
2022-06-23 17:15:17 +04:30
this.updateKey++
2022-05-23 21:01:38 +04:30
} catch (e) {
console.log(e)
} finally {
}
},
2022-06-23 17:15:17 +04:30
async getGrad(){
try {
const {data} = await axios.get('/register/education')
this.grade = data
} catch (e) {
this.$ntSetError()
console.log(e)
} finally {
}
},
//training
/*addEdu(e) {
e.preventDefault();
this.fromEducationalInformation.validateFields((err, values) => {
if (!err) {
if (this.image_data) {
values.file_id = this.image_data.id
values.file = this.image_data.storage
}
this.training.push(values);
this.showAddEducationalInformation = false;
this.$message.success('اطلاعات با موفقیت ثبت شد');
this.fromEducationalInformation.resetFields();
this.image_data = null;
this.saveData();
} else {
this.$ntGetError('اطلاعات را به صورت کامل وارد کنید');
}
});
},
async removeEdu(item) {
if (item.id) {
try {
await axios.post('/personnel/remove-traning', {id: item.id});
await this.getdata(this.personel.id);
} catch (e) {
console.log(e);
}
} else {
const index = this.training.indexOf(item);
this.getdata.splice(index, 1);
}
},*/
//training
2022-05-23 21:01:38 +04:30
//get contract types
2022-06-23 17:15:17 +04:30
/*async getTypes() {
2022-05-23 21:01:38 +04:30
try {
const {data} = await axios.get('/personnel/type/type')
this.contractTypes = data
await this.$store.commit('personnel/setContractTypes', data)
} catch (e) {
console.log(e)
}
},
async getUnits() {
try {
let {data} = await axios.get('/personnel/unit/unit')
await this.$store.commit('personnel/setUnits', data)
data.push
({
id: "new",
value: "افزودن واحد جدید"
})
this.work_units = data
} catch (e) {
console.log(e)
}
},
async selectChange(id) {
if (id == "new") {
this.showName = true
}
2022-06-23 17:15:17 +04:30
},*/
/* printContract(event, id) {
window.open(`http://hr.asco-intl.com:2020/kernel/api/personnel/print?type=${event.key}&id=${id}`, '_blank').focus()
},*/
/* contractFileUpload({fileList, event, file}) {
if (file.response && file.response.id) {
this.image_data = file.response
}
this.contractFileList = fileList;
2022-05-23 21:01:38 +04:30
},
2022-06-23 17:15:17 +04:30
contractFileRemove() {
this.image_data = null
},*/
/*showTerminationModal(index) {
this.activeContract = index;
this.showTermination = true;
},
addtermination(e) {
e.preventDefault();
this.formTermination.validateFields(async (err, values) => {
if (!err) {
try {
this.contract[this.activeContract].date_termination = this.date_termination //values.date_termination;
this.contract[this.activeContract].reason_termination = values.reason_termination;
this.showTermination = false;
this.formTermination.resetFields();
this.saveData();
} catch (e) {
this.$ntSetError()
console.log(e)
} finally {
this.$refs.personelTbl.fetch();
}
} else {
this.$ntGetError('اطلاعات را به صورت کامل وارد کنید');
}
});
},
async removetermination(index) {
2022-05-23 21:01:38 +04:30
try {
2022-06-23 17:15:17 +04:30
this.contract[index].date_termination = null
this.contract[index].datej_termination = null
this.contract[index].reason_termination = null
await this.saveData();
2022-05-23 21:01:38 +04:30
} catch (e) {
this.$ntSetError()
2022-06-23 17:15:17 +04:30
console.log(e)
} finally {
await this.getPersonal()
2022-05-23 21:01:38 +04:30
}
2022-06-23 17:15:17 +04:30
},*/
/*async removeContract(item) {
if (item.id) {
try {
await axios.post('/personnel/remove-contract', {id: item.id});
this.getdata(this.personel.id);
} catch (e) {
console.log(e);
}
} else {
const index = this.contract.indexOf(item);
this.contract.splice(index, 1);
}
},*/
/* async detectEditMode(e) {
await this.addContract(e)
if (this.editContractFlag)
this.editContractFlag = false
},*/
/* openEditingContractModal(item, index) {
// console.log(this.contractTypes)
// console.log(item)
item.type = item.type ? item.type.toString() : undefined
if (item.file) {
this.contractFileList = [{uid: item.file.id, name: item.file.filename, status: 'done', url: item.file.storage}]
}
this.activeContract = index
this.editContractFlag = true
this.showAddContract = true
this.contractModel.end_at = item.end_at
this.contractModel.start_at = item.start_at
// console.log("item:::::::::::::",item)
// console.log(item)
this.fromContract.setFieldsValue(item)
},*/
/*addContract(e) {
e.preventDefault();
this.fromContract.validateFields((err, values) => {
if (!err) {
if (this.image_data) {
values.contract_file_id = this.image_data.id
}
if (values.work_unit == "new") {
values.work_unit = values.work_unit_name
}
if (this.editContractFlag) {
values.start_at = this.contractModel.start_at
values.end_at = this.contractModel.end_at
this.contract[this.activeContract] = Object.assign(this.contract[this.activeContract], values)
// console.log("model", this.contractModel)
this.contractModel = {
start_at: '',
end_at: '',
salary: 0,
worker_coupon: 0,
housing_allowance: 0,
right_attraction: 0,
right_guardianship: 0,
reason_termination: ''
}
} else {
// console.log("adding")
values.start_at = this.contractModel.start_at
values.end_at = this.contractModel.end_at
this.contract.push(values);
}
// console.log("data", this.contract[this.editingContractIndex])
this.saveData();
this.showAddContract = false;
this.$message.success('اطلاعات با موفقیت ثبت شد');
this.fromContract.resetFields();
this.image_data = null;
// console.log('contract',this.contract);
} else {
this.$ntGetError('اطلاعات را به صورت کامل وارد کنید');
}
});
},*/
//contract
//esetimate
/*savefromPerformance(e) {
e.preventDefault();
this.fromPerformance.validateFields((err, values) => {
if (!err) {
this.estimate.push(values);
this.showAddPerformance = false;
this.$message.success('اطلاعات با موفقیت ثبت شد');
this.fromPerformance.resetFields();
this.saveData();
} else {
this.$ntGetError('اطلاعات را به صورت کامل وارد کنید');
}
});
},*/
/*async removeEstimate(item) {
if (item.id) {
try {
await axios.post('/personnel/remove-estimate', {id: item.id});
await this.getdata(this.personel.id);
} catch (e) {
console.log(e);
}
} else {
const index = this.estimate.indexOf(item);
this.getdata.splice(index, 1);
}
},*/
//esetimate
//writ
/* addDocs(e) {
e.preventDefault();
this.fromDocs.validateFields((err, values) => {
if (!err) {
if (this.image_data) {
values.file_id = this.image_data.id
values.file = this.image_data.storage
}
this.writ.push(values);
this.showAddDocument = false;
this.$message.success('اطلاعات با موفقیت ثبت شد');
this.fromDocs.resetFields();
this.image_data = null;
this.saveData();
} else {
this.$ntGetError('اطلاعات را به صورت کامل وارد کنید');
}
});
},*/
/*async removeDocs(item) {
if (item.id) {
try {
await axios.post('/personnel/remove-writ', {id: item.id});
this.getdata(this.personel.id);
} catch (e) {
console.log(e);
}
} else {
const index = this.writ.indexOf(item);
this.writ.splice(index, 1);
}
},*/
//writ
2022-05-23 21:01:38 +04:30
},
beforeCreate() {
},
computed: {
getBaseURL() {
return themeConfig.baseUrl;
},
id() {
return this.$route.params.id
}
},
async created() {
2022-06-06 15:58:58 +04:30
await this.getPersonal()
2022-06-23 17:15:17 +04:30
await this.getGrad()
/*try {
2022-05-23 21:01:38 +04:30
this.loading = true
const {data} = await axios.get('/get-category')
this.category = data
}
catch (e) {
this.$message.error('خطا در دریافت اطلاعات');
}
finally {
this.loading = false
2022-06-23 17:15:17 +04:30
}*/
2022-05-23 21:01:38 +04:30
2022-06-23 17:15:17 +04:30
// contract
/*await this.getTypes()
await this.getUnits()*/
// contract
2022-05-23 21:01:38 +04:30
},
}
</script>
<style lang="less" >
.ant -pagination {
direction : ltr ! important ;
}
td , th {
text -align : right ! important ;
}
.ant -tabs-nav-wrap {
float : right ! important ;
}
.ant -tabs-content {
text -align : right ! important ;
}
.ant -modal-content {
direction : ltr ! important ;
}
.ant -modal-body {
direction : rtl ! important ;
}
.ant -modal-header {
direction : rtl ;
margin -right : 25px ;
}
.ant -form-item-label {
direction : rtl ! important ;
}
.ant -list-item {
direction : ltr ;
}
.ant -upload .ant -upload-select-picture-card , .ant -upload-list-picture-card-container {
float : right ! important ;
}
.ant -upload-list-item-card-actions {
right : 80 % ! important ;
}
</ style >