1579 lines
76 KiB
Vue
1579 lines
76 KiB
Vue
<template>
|
||
<div>
|
||
|
||
<a-spin :spinning="showLoading" tip="در حال دریافت اطلاعات">
|
||
<div class="spin-content">
|
||
<a-card>
|
||
<a-button @click="$router.push('/register/personnel')" >
|
||
ثبت پرسنل جدید
|
||
</a-button>
|
||
<x-table ref="personelTbl" class="mt-4"
|
||
:model="cols">
|
||
<template slot="operator" slot-scope="text,record">
|
||
<a-button type="primary" @click="showPersonal(text.record)">
|
||
مشاهده و ویرایش اطلاعات
|
||
</a-button>
|
||
</template>
|
||
</x-table>
|
||
<a-modal @ok="savefromPersonel" :maskClosable="false" :forceRender="true" okText="ویرایش" cancelText="بستن" width="90%" v-model="showPersonalModal" title="ویرایش اطلاعات پرسنلی">
|
||
<a-form :form="fromPersonel">
|
||
<a-tabs type="card">
|
||
<a-tab-pane :forceRender="true" key="1" tab="اطلاعات پایه">
|
||
<a-card title="اطلاعات فردی">
|
||
|
||
<div class="grid grid-cols-2 gap-4">
|
||
<div>
|
||
<a-form-item label="تصویر پرسنلی" >
|
||
<single-upload-input ref="fileUpload" :field="'profile_file'" ></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>
|
||
|
||
<div>
|
||
<a-form-item label="فایل ها" >
|
||
<!-- <single-upload-input ref="fileUpload" :field="'profile_file'" ></single-upload-input>-->
|
||
<!---->
|
||
<div class="dropbox">
|
||
<a-upload-dragger
|
||
action="http://hr.asco-intl.com/back/public/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-upload
|
||
action="http://hr.asco-intl.com/back/public/api/register/upload"
|
||
:file-list="documentFileList"
|
||
:default-file-list="documentFileList"
|
||
@change="changeDocumentUpload"
|
||
:remove="handleRemoveDocument"
|
||
>
|
||
<a-button> <a-icon type="upload" /> بارگذاری فایل </a-button>
|
||
</a-upload>-->
|
||
|
||
</a-form-item>
|
||
</div>
|
||
</div>
|
||
<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']"/>
|
||
</a-form-item>
|
||
<a-form-item label="کدملی">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['ncode']"/>
|
||
</a-form-item>
|
||
<a-form-item label="شماره پرسنلی">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['personel_id']"/>
|
||
</a-form-item>
|
||
<a-form-item label="موبایل">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['proposal.mobile']"/>
|
||
</a-form-item>
|
||
<!-- <a-form-item label="تاریخ ثبت نام">
|
||
<a-input autocomplete="off" v-decorator="['created_at',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]"/>
|
||
</a-form-item>-->
|
||
<!-- <a-form-item label="تاریخ به روز رسانی ">
|
||
<a-input autocomplete="off" v-decorator="['updated_at',{rules: [{ required: true, 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="['proposal.father_name']"/>
|
||
</a-form-item>
|
||
<a-form-item label="تاریخ تولد">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['proposal.birth_date']"/>
|
||
</a-form-item>
|
||
<!-- <a-form-item label="تاریخ تولد">-->
|
||
<!-- <input class="ant-input" autocomplete="off" v-decorator="['personal.birth_date',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]"/>-->
|
||
<!-- </a-form-item>-->
|
||
<a-form-item label="شماره شناسنامه">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['proposal.iden_id']"/>
|
||
</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']"/>
|
||
</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']"/>
|
||
</a-form-item>
|
||
<a-form-item label="حقوق درخواستی">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['proposal.requested_salary']"/>
|
||
</a-form-item>
|
||
<!-- <a-form-item label="شماره بیمه">
|
||
<a-input autocomplete="off" v-decorator="['insurance_no']"/>
|
||
</a-form-item>-->
|
||
<!-- <a-form-item label="نام طرف مرتبط">
|
||
<a-input autocomplete="off" v-decorator="['proposal.phone_emergency_related']"/>
|
||
</a-form-item>-->
|
||
<a-form-item label="جنسیت">
|
||
<a-radio-group v-decorator="['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-decorator="['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-decorator="['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" >
|
||
<input class="ant-input" autocomplete="off" 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: 'تلفن ضروری را وارد نمایید' }]}]">
|
||
<!-- <feather-icon style="direction: ltr !important;" icon="MailIcon" slot="addonAfter" class="pt-1" svgClasses="w-5 h-5" />-->
|
||
<!-- </a-input>-->
|
||
</a-form-item>
|
||
<a-form-item label="نام فرد">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['proposal.phone_emergency_name',{initialValue: null}]" >
|
||
<!--<feather-icon style="direction: ltr !important;" icon="SmartPhoneIcon" slot="addonAfter" class="pt-1" svgClasses="w-5 h-5" />-->
|
||
<!-- </a-input>-->
|
||
</a-form-item>
|
||
<a-form-item label="نسبت">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['proposal.phone_emergency_related',{initialValue: null}]" >
|
||
<!--<feather-icon style="direction: ltr !important;" icon="PhoneIcon" slot="addonAfter" class="pt-1" svgClasses="w-5 h-5" />-->
|
||
<!-- </a-input>-->
|
||
</a-form-item>
|
||
</div>
|
||
<div class="grid sm:grid-cols-1 md:grid-cols-2 md:gap-4 lg:grid-cols-4 lg:gap-4">
|
||
|
||
<div>
|
||
<a-form-item label="شماره کارت">
|
||
<input class="ant-input"
|
||
v-decorator="['bank_card_number']"/>
|
||
</a-form-item>
|
||
</div>
|
||
<div>
|
||
<a-form-item label="شماره حساب">
|
||
<input class="ant-input"
|
||
v-decorator="['bank_account']"/>
|
||
</a-form-item>
|
||
</div>
|
||
|
||
<div>
|
||
<a-form-item label="شماره بیمه">
|
||
<input class="ant-input" style=""
|
||
v-decorator="['insurance_no']"/>
|
||
</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-card>
|
||
<a-card title="اطلاعات خانوادگی" class="mt-5">
|
||
<a slot="extra" @click.prevent="AddFamily()">افزودن اطلاعات خانوادگی</a>
|
||
<template v-for="(item,index) in personalDetails['family']" >
|
||
<a-button 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`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="نسبت">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.family[${index}].relation`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="مقطع">
|
||
<!-- <a-input autocomplete="off" v-decorator="['personal_details[0].university',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]"/>-->
|
||
<a-select v-decorator="[`personal_details.family[${index}].edu_level`]" >
|
||
<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-option :value="4">
|
||
دکترا
|
||
</a-select-option>
|
||
</a-select>
|
||
</a-form-item>
|
||
<!-- <a-form-item label="دانشگاه">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.family[${index}].university`]"/>
|
||
</a-form-item>-->
|
||
<a-form-item label="رشته تحصیلی">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.family[${index}].edu_title`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="شغل">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.family[${index}].job`]"/>
|
||
</a-form-item>
|
||
</div>
|
||
<a-divider />
|
||
</template>
|
||
</a-card>
|
||
|
||
<a-card title="اطلاعات تحصیلی" class="mt-5">
|
||
<a slot="extra" @click.prevent="AddEducation()">افزودن سابقه تحصیلی</a>
|
||
<template v-for="(item,index) in personalDetails['education']">
|
||
<a-button 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`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="مقطع">
|
||
<!-- <a-input autocomplete="off" v-decorator="['personal_details[0].university',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]"/>-->
|
||
<a-select v-decorator="[`personal_details.education[${index}].level`]" >
|
||
<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-option :value="4">
|
||
دکترا
|
||
</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`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="رشته تحصیلی">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.education[${index}].title`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="گرایش">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.education[${index}].trend`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="سال شروع">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.education[${index}].start_at`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="سال خاتمه">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.education[${index}].end_at`]"/>
|
||
</a-form-item>
|
||
</div>
|
||
<a-divider />
|
||
</template>
|
||
</a-card>
|
||
|
||
<a-card title="سوابق آموزشی" class="mt-5">
|
||
<a slot="extra" @click.prevent="AddTraning()">افزودن سابقه آموزشی </a>
|
||
<template v-for="(item,index) in personalDetails['traning']">
|
||
<a-button 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`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="عنوان دوره ">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.traning[${index}].title`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="سال">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.traning[${index}].start_at`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="امکان ارائه گواهینامه دارم">
|
||
<a-checkbox v-decorator="[`personal_details.traning[${index}].has_certificate`,{initialValue:false,valuePropName: 'checked'}]"/>
|
||
</a-form-item>
|
||
</div>
|
||
<a-divider />
|
||
</template>
|
||
</a-card>
|
||
|
||
<a-card title="سوابق کاری" class="mt-5">
|
||
<a slot="extra" @click.prevent="AddJobsHistory()">افزودن سابقه کاری</a>
|
||
<template v-for="(item,index) in personalDetails['jobs_history']">
|
||
<a-button 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`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="عنوان شغل">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.jobs_history[${index}].title`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="دلیل خاتمه">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.jobs_history[${index}].note`]"/>
|
||
</a-form-item>
|
||
|
||
<a-form-item label="سال شروع">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.jobs_history[${index}].start_at`]"/>
|
||
</a-form-item>
|
||
<a-form-item label="سال خاتمه">
|
||
<input class="ant-input" autocomplete="off" v-decorator="[`personal_details.jobs_history[${index}].end_at`]"/>
|
||
</a-form-item>
|
||
<!--<a-form-item label="تاکنون">
|
||
<a-checkbox v-decorator="['end_now',{initialValue:false,valuePropName: 'checked'}]" />
|
||
</a-form-item>-->
|
||
</div>
|
||
<a-divider />
|
||
</template>
|
||
</a-card>
|
||
</a-tab-pane>
|
||
<a-tab-pane :forceRender="true" key="3" tab="اطلاعات آموزشی">
|
||
<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" :href="item.file.storage" class="mr-3">دانلود پیوست </a-button>
|
||
<a-tooltip placement="bottomRight">
|
||
<template slot="title">
|
||
<span>حذف</span>
|
||
</template>
|
||
<a-popconfirm
|
||
placement="right"
|
||
style="z-index: 999999999999"
|
||
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 class="mt-4" @click="showAddEducationalInformation=true;isAlertUpload = false">افزودن ردیف</a-button>
|
||
</a-tab-pane>
|
||
<a-tab-pane :forceRender="true" key="4" tab="قراردادها">
|
||
<a-list :locale="{emptyText:'رکوردی وجود ندارد.'}" bordered item-layout="horizontal" >
|
||
<a-list-item class="grid grid-cols-4" v-for="(item,index) in contract" :key="index" >
|
||
<div>
|
||
<a-button v-if="!item.date_termination" class="mt-3 mr-3" @click="showTerminationModal(index)">فسخ قرارداد</a-button>
|
||
<a-button v-if="item.file" target="_blank" :href="item.file.storage" >دانلود پیوست</a-button>
|
||
</div>
|
||
<div>{{ item.salary }} : حقوق پایه</div>
|
||
<div>{{ item.end_atj }} : تاریخ خاتمه</div>
|
||
<div>{{ item.start_atj }} : تاریخ شروع</div>
|
||
<div>
|
||
<a-tooltip placement="bottomRight" >
|
||
<template slot="title">
|
||
<span>حذف</span>
|
||
</template>
|
||
<a-popconfirm
|
||
placement="right"
|
||
style="z-index: 999999999999"
|
||
title="آیا می خواهید حذف کنید؟"
|
||
ok-text="بله"
|
||
cancel-text="خیر"
|
||
@confirm="removeContract(item)" >
|
||
<a-button type="danger" class="mt-3 mr-3">حذف</a-button>
|
||
</a-popconfirm>
|
||
</a-tooltip>
|
||
<a-button style="width:20%" class="mr-3" @click="contractId=item.id;showContractPrint=true">چاپ</a-button>
|
||
<!-- <a-dropdown class="mt-3" v-if="item.id">
|
||
<a-menu slot="overlay" >
|
||
<a-menu-item key="1">
|
||
<a @click="showContractId=true">نوع 1</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="2">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=2`" target="_blank">نوع 2</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="3">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=3`" target="_blank">نوع 3</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="4">
|
||
<a :href="`back/public/api/personnel/print?id=${item.id}&type=4`" target="_blank">نوع 4</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="5">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=5`" target="_blank">نوع 5</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="6">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=6`" target="_blank">نوع 6</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="7">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=7`" target="_blank">نوع 7</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="8">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=8`" target="_blank">نوع 8</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="9">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=9`" target="_blank">نوع 9</a>
|
||
</a-menu-item>
|
||
<a-menu-item key="10">
|
||
<a :href="`/back/public/api/personnel/print?id=${item.id}&type=10`" target="_blank">نوع 10</a>
|
||
</a-menu-item>
|
||
<!– <a-menu-item key="7">
|
||
<a href="222" target="_blank">نوع سوم</a>
|
||
</a-menu-item>–>
|
||
</a-menu>
|
||
<a-button style="width: 33%" > چاپ <a-icon type="down" /> </a-button>
|
||
</a-dropdown>-->
|
||
|
||
</div>
|
||
<div>{{ item.worker_coupon }} : بن کارگری</div>
|
||
<div>{{ item.housing_allowance }} : کمک هزینه مسکن</div>
|
||
<div>{{ item.right_attraction }} : حق جذب</div>
|
||
<div>
|
||
<!--<a-button v-if="item.id" :href="`http://hr.asco-intl.com/back/public/api/personnel/print?id=${item.id}`" target="_blank" class="mt-3">چاپ</a-button>-->
|
||
</div>
|
||
<div>{{ item.promissory_number }} : شماره سفته</div>
|
||
<div>{{ item.promissory }} : مبلغ سفته</div>
|
||
<div>{{ item.right_guardianship }} : حق سرپرستی</div>
|
||
<div class="mt-5"></div>
|
||
<!-- <div> شماره قرارداد : <span>{{ item. }}</span> </div>-->
|
||
<!-- <div > : <span>{{ item.reason_termination }}</span> </div>-->
|
||
<!---->
|
||
<div class="mt-5" style="direction: rtl"><span>شماره قرارداد :</span> <span>{{ item.contract_number }}</span></div>
|
||
<div class="mt-5">{{ item.reason_termination }} : دلیل فسخ قرارداد</div>
|
||
<div class="mt-5">{{ item.datej_termination }} : تاریخ فسخ قرارداد</div>
|
||
<!--<div style="direction: rtl">عنوان گواهینامه : {{ item.title }}</div>-->
|
||
</a-list-item>
|
||
</a-list>
|
||
<a-button class="mt-3" @click="showAddContract = true">افزودن ردیف</a-button>
|
||
</a-tab-pane>
|
||
<a-tab-pane :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-tab-pane>
|
||
<a-tab-pane :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="['intro_checklist.third',{valuePropName:'checked'}]">اصول اخلاقی</a-checkbox>
|
||
</a-form-item>-->
|
||
<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="['intro_checklist.second',{valuePropName:'checked'}]">آشنا سازی با قوانین</a-checkbox>
|
||
</a-form-item>-->
|
||
<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>
|
||
<!--<a-form-item>
|
||
<a-checkbox v-decorator="['intro_checklist.first',{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-tab-pane>
|
||
<a-tab-pane :forceRender="true" key="7" tab="ارزیابی عملکرد">
|
||
<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
|
||
placement="right"
|
||
style="z-index: 999999999999"
|
||
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 @click="showAddPerformance=true">افزودن ردیف</a-button>
|
||
</a-tab-pane>
|
||
<a-tab-pane :forceRender="true" key="8" tab="احکام / اخطار / پاداش">
|
||
<a-list :locale="{emptyText:'رکوردی وجود ندارد.'}" bordered item-layout="horizontal" >
|
||
<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" :href="item.file.storage" class="mr-3">دانلود پیوست </a-button>
|
||
<template slot="title">
|
||
<span>حذف</span>
|
||
</template>
|
||
<a-popconfirm
|
||
placement="right"
|
||
style="z-index: 999999999999"
|
||
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 class="mt-4" @click="showAddDocument=true;isAlertUpload = false">افزودن ردیف</a-button>
|
||
</a-tab-pane>
|
||
</a-tabs>
|
||
</a-form>
|
||
</a-modal>
|
||
|
||
<a-modal forceRender okText="ایجاد" cancelText="بستن" v-model="showAddEducationalInformation" 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="دسته گواهینامه">
|
||
<!--<input class="ant-input" autocomplete="off" v-decorator="['type',{rules: [{ required: true, message: 'وارد کردن شغل الزامی است' }]}]"/>-->
|
||
<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>
|
||
<!--<a-select-option value="lucy">
|
||
Lucy
|
||
</a-select-option>
|
||
<a-select-option value="disabled" disabled>
|
||
Disabled
|
||
</a-select-option>
|
||
<a-select-option value="Yiminghe">
|
||
yiminghe
|
||
</a-select-option>-->
|
||
</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>
|
||
</a-modal>
|
||
|
||
<a-modal @ok="addContract" okText="ایجاد" forceRender cancelText="بستن" v-model="showAddContract" title="افزودن قرارداد" >
|
||
<a-form :form="fromContract" >
|
||
<div class="grid grid-cols-2 gap-4">
|
||
<div>
|
||
<a-form-item label="تاریخ شروع">
|
||
<!--v-decorator="['start_at']"-->
|
||
<a-input class="ant-input" id="contrat_start_at" v-model="contractModel.start_at" style="width:100%"/>
|
||
</a-form-item>
|
||
<date-picker
|
||
:auto-submit="true"
|
||
color="#4f72ab"
|
||
v-model="contractModel.start_at"
|
||
element="contrat_start_at" />
|
||
</div>
|
||
<div>
|
||
<a-form-item label="تاریخ خاتمه">
|
||
<!-- <a-input style="width:100%" v-decorator="['end_at']"/>-->
|
||
<input class="ant-input" id="contrat_end_at" style="width:100%" v-model="contractModel.end_at" />
|
||
<date-picker
|
||
:auto-submit="true"
|
||
color="#4f72ab"
|
||
v-model="contractModel.end_at"
|
||
element="contrat_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 }]" />
|
||
</a-form-item>
|
||
</div>
|
||
<div>
|
||
<a-form-item label="بن کارگری">
|
||
<input class="ant-input" v-decorator="['worker_coupon', { initialValue: 0 }]" />
|
||
</a-form-item>
|
||
</div>
|
||
<div>
|
||
<a-form-item label="کمک هزینه مسکن">
|
||
<input class="ant-input" v-decorator="['housing_allowance', { initialValue: 0 }]" />
|
||
</a-form-item>
|
||
</div>
|
||
<div>
|
||
<a-form-item label="حق جذب">
|
||
<input class="ant-input" v-decorator="['right_attraction', { initialValue: 0 }]" />
|
||
</a-form-item>
|
||
</div>
|
||
<div>
|
||
<a-form-item label="حق سرپرستی">
|
||
<input class="ant-input" v-decorator="['right_guardianship', { initialValue: 0 }]" />
|
||
</a-form-item>
|
||
</div>
|
||
<div>
|
||
<a-form-item label="مبلغ سفته">
|
||
<input class="ant-input" v-decorator="['promissory', { initialValue: 0 }]" />
|
||
</a-form-item>
|
||
</div>
|
||
<div>
|
||
<a-form-item label="شماره سفته">
|
||
<input class="ant-input" v-decorator="['promissory_number']" />
|
||
</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="['test1']" />
|
||
</a-form-item>
|
||
</div>
|
||
|
||
<div>
|
||
<a-form-item label="پایه سنوات">
|
||
<input class="ant-input" v-decorator="['test2']" />
|
||
</a-form-item>
|
||
</div>
|
||
|
||
<div>
|
||
<a-form-item label="حق ماموریت">
|
||
<input class="ant-input" v-decorator="['test3']" />
|
||
</a-form-item>
|
||
</div>
|
||
|
||
<div>
|
||
<a-form-item label="حق شیفت">
|
||
<input class="ant-input" v-decorator="['test4']" />
|
||
</a-form-item>
|
||
</div>
|
||
|
||
<div>
|
||
<a-form-item label="پاداش مستمر">
|
||
<input class="ant-input" v-decorator="['test5']" />
|
||
</a-form-item>
|
||
</div>
|
||
</div>
|
||
<!--<a-form-item label="دلیل فسخ قرارداد">
|
||
<input class="ant-input" style="width: 100%" v-decorator="['reason_termination']" />
|
||
</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-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>
|
||
|
||
<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-modal okText="ثبت" cancelText="بستن" forceRender v-model="showTermination" title="فسخ قرارداد" @ok="addtermination">
|
||
<a-form :form="formTermination">
|
||
<!-- <a-form-item label="تاریخ فسخ قرارداد">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['date_termination']" />
|
||
<!–v-model="contract[activeContract].date_termination"–>
|
||
</a-form-item>-->
|
||
<a-form-item label="تاریخ فسخ قرارداد">
|
||
<!-- <a-input style="width:100%" v-decorator="['end_at']"/>-->
|
||
<input class="ant-input" id="contrat_termination" style="width:100%" v-model="date_termination" />
|
||
<date-picker
|
||
:auto-submit="true"
|
||
color="#4f72ab"
|
||
v-model="date_termination"
|
||
element="contrat_termination"
|
||
/>
|
||
</a-form-item>
|
||
<a-form-item label="دلیل فسخ قرارداد">
|
||
<input class="ant-input" autocomplete="off" v-decorator="['reason_termination']" />
|
||
<!--v-model="contract[activeContract].reason_termination"-->
|
||
</a-form-item>
|
||
</a-form>
|
||
</a-modal>
|
||
|
||
<a-modal okText="چاپ" :footer="null" cancelText="بستن" forceRender v-model="showContractPrint" title="شماره قرارداد" >
|
||
<!-- <a-form-item label="شماره قرارداد">
|
||
<input class="ant-input" autocomplete="off" v-model="contractNumber" />
|
||
</a-form-item>-->
|
||
<a-form-item label="نوع قرارداد">
|
||
<a-select v-model="contractType" style="width: 120px" >
|
||
<a-select-option v-for="i in 10" :value="i">
|
||
{{ i }} نوع
|
||
</a-select-option>
|
||
</a-select>
|
||
</a-form-item>
|
||
<a-button :href="`/back/public/api/personnel/print?id=${contractId}&type=${contractType}`" target="_blank">چاپ قرداد</a-button>
|
||
</a-modal>
|
||
</a-card>
|
||
</div>
|
||
</a-spin>
|
||
</div>
|
||
|
||
</template>
|
||
|
||
<script>
|
||
|
||
import * as TableCol from './personelTbl';
|
||
import XTable from "@/components/x-table/XTable";
|
||
import axios from "@/axios";
|
||
import moment from 'moment-jalaali'
|
||
//import Button from "@/views/components/vuesax/button/Button";
|
||
import VuePersianDatetimePicker from 'vue-persian-datetime-picker';
|
||
import themeConfig from '@/../themeConfig.js'
|
||
import SingleUploadInput from '@/components/SingleUploadInput'
|
||
import Button from "@/views/components/vuesax/button/Button";
|
||
|
||
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:{
|
||
Button,
|
||
//Button,
|
||
XTable,
|
||
SingleUploadInput,
|
||
datePicker: VuePersianDatetimePicker
|
||
},
|
||
data() {
|
||
return {
|
||
fileList: [],
|
||
documentFileList: [],
|
||
documents:[],
|
||
loading: false,
|
||
imageUrl: '',
|
||
previewVisible:false,
|
||
/*previewVisible: false,*/
|
||
previewImage: '',
|
||
category:[],
|
||
showLoading:false,
|
||
cols:null,
|
||
showTermination:false,
|
||
frm1:this.$form.createForm(this, {name: 'cordinate'}),
|
||
form:this.$form.createForm(this, {name: 'cordinate'}),
|
||
fromPersonel:this.$form.createForm(this, {name: 'cordinate'}),
|
||
fromPerformance:this.$form.createForm(this, {name: 'cordinate'}),
|
||
fromEducationalInformation:this.$form.createForm(this, {name: 'cordinate'}),
|
||
fromDocs:this.$form.createForm(this, {name: 'cordinate'}),
|
||
fromContract:this.$form.createForm(this, {name: 'cordinate'}),
|
||
formTermination:this.$form.createForm(this, {name: 'cordinate'}),
|
||
contractModel:{
|
||
start_at:'',
|
||
end_at:'',
|
||
salary:0,
|
||
worker_coupon:0,
|
||
housing_allowance:0,
|
||
right_attraction:0,
|
||
right_guardianship:0,
|
||
reason_termination:''
|
||
},
|
||
date_termination:null,
|
||
showPersonalModal:false,
|
||
showAddEducationalInformation:false,
|
||
showAddContract:false,
|
||
showAddPerformance:false,
|
||
showAddDocument:false,
|
||
personel:{},
|
||
estimate:[],
|
||
writ:[],
|
||
training:[],
|
||
contract:[],
|
||
isAlertUpload:false,
|
||
isAlertUploadContract:false,
|
||
isShowDocs:false,
|
||
image_data:null,
|
||
personalDetails:{},
|
||
activeContract:null,
|
||
contractId:'',
|
||
contractNumber:'',
|
||
contractType:1,
|
||
showContractPrint:false,
|
||
//profile_file:null,
|
||
}
|
||
},
|
||
methods:{
|
||
AddJobsHistory(){
|
||
const obj={
|
||
"title": null,
|
||
"university": null,
|
||
"start_at": null,
|
||
"end_at": null,
|
||
"file_id": null,
|
||
};
|
||
this.personalDetails['jobs_history'].push(obj);
|
||
},
|
||
AddTraning(){
|
||
const obj={
|
||
"title": null,
|
||
"university": null,
|
||
"start_at": null,
|
||
"has_certificate": null,
|
||
}
|
||
this.personalDetails['traning'].push(obj);
|
||
},
|
||
AddEducation(){
|
||
const obj={
|
||
"level": 1,
|
||
"title":null,
|
||
"trend":null,
|
||
"university": null,
|
||
"start_at": null,
|
||
"end_at": null,
|
||
};
|
||
this.personalDetails['education'].push(obj);
|
||
},
|
||
AddFamily(){
|
||
const obj={
|
||
"name": null,
|
||
"relation": null,
|
||
"edu_level": 1,
|
||
"edu_title": null,
|
||
"job": null,
|
||
};
|
||
this.personalDetails['family'].push(obj);
|
||
},
|
||
handleRemoveFamily(item,index){
|
||
if(item.id)
|
||
{
|
||
axios.post('remove-family',{id:item.id}).then((res)=>{
|
||
this.personalDetails['family'].splice(index,1);
|
||
});
|
||
}else
|
||
{
|
||
this.personalDetails['family'].splice(index,1);
|
||
}
|
||
},
|
||
handleRemoveEducation(item,index){
|
||
if(item.id){
|
||
axios.post('remove-education',{id:item.id}).then((res)=>{
|
||
this.personalDetails['education'].splice(index,1);
|
||
});
|
||
}
|
||
else
|
||
{
|
||
this.personalDetails['education'].splice(index,1);
|
||
}
|
||
},
|
||
handleRemoveTraning(item,index){
|
||
if(item.id){
|
||
axios.post('remove-education',{id:item.id}).then((res)=>{
|
||
this.personalDetails['traning'].splice(index,1);
|
||
});
|
||
}
|
||
else
|
||
{
|
||
this.personalDetails['traning'].splice(index,1);
|
||
}
|
||
},
|
||
handleRemoveJobsHistory(item,index){
|
||
if(item.id){
|
||
axios.post('remove-education',{id:item.id}).then((res)=>{
|
||
this.personalDetails['jobs_history'].splice(index,1);
|
||
});
|
||
}
|
||
else
|
||
{
|
||
this.personalDetails['jobs_history'].splice(index,1);
|
||
}
|
||
},
|
||
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);
|
||
|
||
}*/
|
||
},
|
||
handleRemove(){
|
||
this.imageUrl='';
|
||
this.fileList=[];
|
||
//this.profile_file=null;
|
||
},
|
||
async handlePreview(file) {
|
||
if (!file.url && !file.preview) {
|
||
file.preview = await getBase64(file.originFileObj);
|
||
}
|
||
this.previewImage = file.url || file.preview;
|
||
this.previewVisible = true;
|
||
},
|
||
handleCancel() {
|
||
this.previewVisible = false;
|
||
},
|
||
handleChange(info) {
|
||
console.log(info);
|
||
if (info.file.status === 'uploading') {
|
||
this.loading = true;
|
||
return;
|
||
}
|
||
if (info.file.status === 'done') {
|
||
this.loading = false;
|
||
this.fileList.push({ uid: '-1', name: 'image.png', status: 'done', url:info.file.response.storage });
|
||
console.log(this.fileList);
|
||
getBase64(info.file.originFileObj, imageUrl => {
|
||
this.imageUrl = imageUrl;
|
||
this.loading = false;
|
||
});
|
||
}
|
||
},
|
||
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=moment(this.date_termination,'jYYYY/jM/jD').format('YYYY-M-D'); //values.date_termination;
|
||
this.contract[this.activeContract].reason_termination=values.reason_termination;
|
||
this.showTermination=false;
|
||
this.formTermination.resetFields();
|
||
this.saveData();
|
||
}catch (e) {
|
||
this.$ntSetError()
|
||
throw e
|
||
}finally {
|
||
this.$refs.personelTbl.fetch();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
async saveData(){
|
||
this.fromPersonel.validateFields(async(err, values) => {
|
||
if (!err) {
|
||
try{
|
||
//console.log(values);
|
||
values.id=this.personel.id;
|
||
//values.profile_file=this.profile_file;
|
||
values.contract=this.contract;
|
||
values.writ=this.writ;
|
||
values.training = this.training
|
||
values.estimate = this.estimate
|
||
/*values.document=this.documentFileList.map((item)=>{
|
||
return item.uid;
|
||
});*/
|
||
values.documents=this.documents;
|
||
await axios.post('personnel/update',values);
|
||
this.getdata(this.personel.id);
|
||
this.$ntSet()
|
||
}catch (e) {
|
||
this.$ntSetError()
|
||
throw e
|
||
}finally {
|
||
this.$refs.personelTbl.fetch();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
handleSubmit(e){
|
||
e.preventDefault();
|
||
this.frm1.validateFields((err, values) => {
|
||
if (!err) {
|
||
console.log(values);
|
||
}
|
||
});
|
||
},
|
||
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();
|
||
}
|
||
});
|
||
},
|
||
async removeContract(item)
|
||
{
|
||
if(item.id)
|
||
{
|
||
try {
|
||
await axios.post('/personnel/remove-contract', {id:item.id});
|
||
this.getdata(this.personel.id);
|
||
}catch (e)
|
||
{
|
||
throw e;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
const index = this.contract.indexOf(item);
|
||
this.contract.splice(index,1);
|
||
}
|
||
},
|
||
async removeEstimate(item)
|
||
{
|
||
if(item.id)
|
||
{
|
||
try {
|
||
await axios.post('/personnel/remove-estimate', {id:item.id});
|
||
await this.getdata(this.personel.id);
|
||
}catch (e)
|
||
{
|
||
throw e;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
const index = this.estimate.indexOf(item);
|
||
this.getdata.splice(index,1);
|
||
}
|
||
},
|
||
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();
|
||
}
|
||
});
|
||
},
|
||
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();
|
||
}
|
||
});
|
||
},
|
||
addContract(e){
|
||
e.preventDefault();
|
||
this.fromContract.validateFields((err, values) => {
|
||
if (!err) {
|
||
if(this.image_data){
|
||
values.contract_file_id = this.image_data.id
|
||
//values.file = this.image_data.storage
|
||
}
|
||
//values.start_at=this.contractModel.start_at,
|
||
//values.end_at=this.contractModel.end_at;
|
||
values.start_at=moment(this.contractModel.start_at,'jYYYY/jM/jD').format('YYYY-M-D');
|
||
values.end_at=moment(this.contractModel.end_at,'jYYYY/jM/jD').format('YYYY-M-D');
|
||
this.contract.push(values);
|
||
this.showAddContract = false;
|
||
this.$message.success('اطلاعات با موفقیت ثبت شد');
|
||
this.fromContract.resetFields();
|
||
this.image_data=null;
|
||
this.saveData();
|
||
// console.log('contract',this.contract);
|
||
}
|
||
});
|
||
},
|
||
savefromPersonel(e) {
|
||
e.preventDefault();
|
||
this.fromPersonel.validateFields(async(err, values) => {
|
||
if (!err) {
|
||
try{
|
||
this.saveData();
|
||
this.getdata(this.personel.id);
|
||
//this.$ntSet()
|
||
this.showPersonalModal = false
|
||
}catch (e) {
|
||
this.$ntSetError()
|
||
throw e
|
||
}finally {
|
||
this.$refs.personelTbl.fetch();
|
||
}
|
||
}
|
||
});
|
||
},
|
||
async getdata(id)
|
||
{
|
||
try {
|
||
const personelData = await axios.post('/personnel/get-data', {id:id});
|
||
this.contract=personelData.data.contract;
|
||
this.writ=personelData.data.writ;
|
||
this.estimate=personelData.data.estimate;
|
||
this.training=personelData.data.training;
|
||
}catch (error)
|
||
{
|
||
console.log(error);
|
||
throw error;
|
||
}
|
||
},
|
||
|
||
async okDelete(item){
|
||
try{
|
||
await axios.delete('remove/estimate',{id:item.id})
|
||
}catch (e) {
|
||
this.$ntSetError()
|
||
|
||
}
|
||
// const index = this.estimate.indexOf(item)
|
||
// this.estimate.splice(index,1)
|
||
},
|
||
|
||
async removeDocs(item){
|
||
if(item.id)
|
||
{
|
||
try {
|
||
await axios.post('/personnel/remove-writ', {id:item.id});
|
||
this.getdata(this.personel.id);
|
||
}catch (e)
|
||
{
|
||
throw e;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
const index = this.writ.indexOf(item);
|
||
this.writ.splice(index,1);
|
||
}
|
||
},
|
||
|
||
async removeEdu(item){
|
||
if(item.id)
|
||
{
|
||
try {
|
||
await axios.post('/personnel/remove-traning', {id:item.id});
|
||
await this.getdata(this.personel.id);
|
||
}catch (e)
|
||
{
|
||
throw e;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
const index = this.training.indexOf(item);
|
||
this.getdata.splice(index,1);
|
||
}
|
||
// const index = this.training.indexOf(item)
|
||
//this.training.splice(index,1)
|
||
},
|
||
|
||
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 {
|
||
|
||
}
|
||
},
|
||
/*async uploadDocument(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 {
|
||
|
||
}
|
||
},*/
|
||
/* async uploadImageProfile(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;
|
||
console.log(data);
|
||
this.fileList=data.map((item)=>{
|
||
return { uid: item.id, name: item.filename,status: 'done',url: item.storage}
|
||
});
|
||
console.log(this.fileList)
|
||
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 {
|
||
this.showLoading=true;
|
||
this.personel = record;
|
||
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.showPersonalModal=true;
|
||
this.$nextTick(()=>{
|
||
// console.log('fdsfgdf',record);
|
||
this.fromPersonel.setFieldsValue(record);
|
||
});
|
||
this.showLoading=false;
|
||
}catch (e) {
|
||
throw e
|
||
}finally {
|
||
|
||
}
|
||
}
|
||
},
|
||
beforeCreate() {
|
||
},
|
||
computed:{
|
||
getBaseURL()
|
||
{
|
||
return themeConfig.baseUrl;
|
||
}
|
||
},
|
||
mounted() {
|
||
|
||
},
|
||
created() {
|
||
axios.get('/get-category')
|
||
.then((res) => {
|
||
//console.log(res.data);
|
||
this.category=res.data;
|
||
}).catch((error) => {
|
||
this.$message.error('خطا در دریافت اطلاعات');
|
||
});
|
||
this.cols = TableCol.default;
|
||
}
|
||
}
|
||
</script>
|
||
|
||
|
||
<style>
|
||
.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-mask
|
||
{
|
||
z-index: 9999999 !important;
|
||
}
|
||
.ant-modal-wrap
|
||
{
|
||
z-index: 999999999 !important;
|
||
}
|
||
.ant-select-dropdown{
|
||
z-index: 999999999!important;
|
||
}
|
||
.ant-modal-content
|
||
{
|
||
direction: ltr !important;
|
||
}
|
||
.ant-modal-body
|
||
{
|
||
direction: rtl !important;
|
||
}
|
||
.ant-modal-header
|
||
{
|
||
direction: rtl;
|
||
margin-right: 25px;
|
||
}
|
||
.ant-dropdown,.ant-popover.ant-popover-placement-right{
|
||
z-index: 99999999999;
|
||
}
|
||
/*.ant-dropdown
|
||
{
|
||
z-index: 9999999999 !important;
|
||
}*/
|
||
.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;
|
||
}
|
||
/* .ant-dropdown,.ant-popover.ant-popover-placement-right{
|
||
z-index: 999999999;
|
||
}*/
|
||
</style>
|
||
|