update 1400-01-01
This commit is contained in:
@@ -10,7 +10,7 @@ export default [
|
||||
{
|
||||
url: '/config',
|
||||
icon: 'LayersIcon',
|
||||
i18n: 'پیکر بندی',
|
||||
i18n: 'پیکربندی',
|
||||
slug: 'config',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -86,6 +86,15 @@ const router = new Router({
|
||||
parent: 'main'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/register/personnel',
|
||||
name: 'register-personnel',
|
||||
component: () => import('./views/register/RegisterPersonnel.vue'),
|
||||
meta: {
|
||||
rule: 'editor',
|
||||
parent: 'main'
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
+220
-39
@@ -4,7 +4,7 @@
|
||||
<a-spin :spinning="showLoading" tip="در حال دریافت اطلاعات">
|
||||
<div class="spin-content">
|
||||
<a-card>
|
||||
<a-button @click="$router.push('/register/form')" >
|
||||
<a-button @click="$router.push('/register/personnel')" >
|
||||
ثبت پرسنل جدید
|
||||
</a-button>
|
||||
<x-table ref="personelTbl" class="mt-4"
|
||||
@@ -20,12 +20,34 @@
|
||||
<a-tabs type="card">
|
||||
<a-tab-pane :forceRender="true" key="1" tab="اطلاعات پایه">
|
||||
<a-card title="اطلاعات فردی">
|
||||
<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 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>-->
|
||||
<!---->
|
||||
<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']"/>
|
||||
@@ -145,7 +167,7 @@
|
||||
</a-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<a-form-item label="شمار ه حساب">
|
||||
<a-form-item label="شماره حساب">
|
||||
<input class="ant-input"
|
||||
v-decorator="['bank_account']"/>
|
||||
</a-form-item>
|
||||
@@ -174,7 +196,9 @@
|
||||
</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`]"/>
|
||||
@@ -217,7 +241,9 @@
|
||||
</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`]"/>
|
||||
@@ -259,9 +285,10 @@
|
||||
</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`]"/>
|
||||
@@ -276,16 +303,17 @@
|
||||
<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}].end_at`,{initialValue:false,valuePropName: 'checked'}]"/>
|
||||
<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`]"/>
|
||||
@@ -362,12 +390,11 @@
|
||||
title="آیا می خواهید حذف کنید؟"
|
||||
ok-text="بله"
|
||||
cancel-text="خیر"
|
||||
@confirm="removeContract(item)"
|
||||
>
|
||||
<a-button type="danger" class="mt-3 mr-3" style="width:40%">حذف</a-button>
|
||||
@confirm="removeContract(item)" >
|
||||
<a-button type="danger" class="mt-3 mr-3">حذف</a-button>
|
||||
</a-popconfirm>
|
||||
</a-tooltip>
|
||||
<a-button style="width:28%" class="mr-3" @click="contractId=item.id;showContractPrint=true">چاپ</a-button>
|
||||
<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">
|
||||
@@ -417,17 +444,19 @@
|
||||
<div>{{ item.promissory_number }} : شماره سفته</div>
|
||||
<div>{{ item.promissory }} : مبلغ سفته</div>
|
||||
<div>{{ item.right_guardianship }} : حق سرپرستی</div>
|
||||
<div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div> دلیل فسخ قرارداد: <span>{{ item.reason_termination }}</span> </div>
|
||||
<div>{{ item.datej_termination }} : تاریخ فسخ قرارداد</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="آشنا سازی">
|
||||
<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>
|
||||
@@ -642,7 +671,6 @@
|
||||
element="contrat_end_at"
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-3 gap-4">
|
||||
@@ -671,25 +699,26 @@
|
||||
<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" style="width: 100%" v-decorator="['reason_termination']" />
|
||||
</a-form-item>-->
|
||||
|
||||
<a-form-item label="فایل">
|
||||
<div class="dropbox">
|
||||
<a-upload-dragger
|
||||
@@ -713,8 +742,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
@@ -807,9 +834,9 @@
|
||||
</a-modal>
|
||||
|
||||
<a-modal okText="چاپ" :footer="null" cancelText="بستن" forceRender v-model="showContractPrint" title="شماره قرارداد" >
|
||||
<a-form-item label="شماره قرارداد">
|
||||
<!-- <a-form-item label="شماره قرارداد">
|
||||
<input class="ant-input" autocomplete="off" v-model="contractNumber" />
|
||||
</a-form-item>
|
||||
</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">
|
||||
@@ -817,7 +844,7 @@
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-button :href="`/back/public/api/personnel/print?id=${contractId}&type=${contractType}&number=${contractNumber}`" target="_blank">چاپ قرداد</a-button>
|
||||
<a-button :href="`/back/public/api/personnel/print?id=${contractId}&type=${contractType}`" target="_blank">چاپ قرداد</a-button>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</div>
|
||||
@@ -859,6 +886,8 @@
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
documentFileList: [],
|
||||
documents:[],
|
||||
loading: false,
|
||||
imageUrl: '',
|
||||
previewVisible:false,
|
||||
@@ -911,6 +940,131 @@
|
||||
}
|
||||
},
|
||||
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=[];
|
||||
@@ -976,11 +1130,13 @@
|
||||
values.writ=this.writ;
|
||||
values.training = this.training
|
||||
values.estimate = this.estimate
|
||||
//console.log('All Data',values);
|
||||
await axios.post('personnel/update',values);
|
||||
/*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()
|
||||
//this.showPersonalModal = false
|
||||
}catch (e) {
|
||||
this.$ntSetError()
|
||||
throw e
|
||||
@@ -1107,7 +1263,6 @@
|
||||
this.fromPersonel.validateFields(async(err, values) => {
|
||||
if (!err) {
|
||||
try{
|
||||
|
||||
this.saveData();
|
||||
this.getdata(this.personel.id);
|
||||
//this.$ntSet()
|
||||
@@ -1163,7 +1318,6 @@
|
||||
const index = this.writ.indexOf(item);
|
||||
this.writ.splice(index,1);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
async removeEdu(item){
|
||||
@@ -1201,6 +1355,21 @@
|
||||
|
||||
}
|
||||
},
|
||||
/*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();
|
||||
@@ -1240,12 +1409,18 @@
|
||||
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.$refs.fileUpload.fileList.push({ uid: '-1', name: 'image.png', status: 'done', url:record.profile.storage }); //[0].url=record.profile.storage;
|
||||
}
|
||||
console.log(this.fileList);
|
||||
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;
|
||||
@@ -1327,7 +1502,7 @@
|
||||
margin-right: 25px;
|
||||
}
|
||||
.ant-dropdown,.ant-popover.ant-popover-placement-right{
|
||||
z-index: 999999999;
|
||||
z-index: 99999999999;
|
||||
}
|
||||
/*.ant-dropdown
|
||||
{
|
||||
@@ -1344,5 +1519,11 @@
|
||||
.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>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-card>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<!--<div class="grid grid-cols-2 gap-4">
|
||||
<a-form-item class="flex" label="فقط پرونده های باز ">
|
||||
<a-switch default-checked class="mr-2"/>
|
||||
</a-form-item>
|
||||
</div>
|
||||
</div>-->
|
||||
<x-table
|
||||
:model="cols" class="mt-3">
|
||||
<template slot="operator" slot-scope="text,record">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user