|
|
@@ -17,8 +17,8 @@
|
|
|
<el-col :span="10">
|
|
|
<el-form-item label="上级推荐人" :prop="mingrade == 1 ? '' : 'referrerId'">
|
|
|
<el-select v-model="operationForm.referrerId" filterable
|
|
|
- :disabled="!operationForm.gradeList || operationForm.gradeList.includes('1') || editId" placeholder="请选择上级推荐人"
|
|
|
- @focus="searchRecommend" @change="handleReferrerChange">
|
|
|
+ :disabled="!operationForm.gradeList || operationForm.gradeList.includes('1') || editId"
|
|
|
+ placeholder="请选择上级推荐人" @focus="searchRecommend" @change="handleReferrerChange">
|
|
|
<el-option v-for="item in referrerList" :key="item.userId" :value="item.userId" :label="item.name">
|
|
|
<span>{{ item.name }}-</span>
|
|
|
<span> {{ item.mobile }}-</span>
|
|
|
@@ -38,8 +38,8 @@
|
|
|
<el-col :span="10">
|
|
|
<!-- 去掉手机号带出人员信息数据 @input="mobileInput" -->
|
|
|
<el-form-item prop="mobile" label="手机号">
|
|
|
- <el-input type="text" :maxlength="11" :disabled="editId" show-word-limit v-model="operationForm.mobile"
|
|
|
- placeholder="请填写手机号" ></el-input>
|
|
|
+ <el-input type="text" :maxlength="11" :disabled="editId" show-word-limit
|
|
|
+ v-model="operationForm.mobile" placeholder="请填写手机号"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -117,10 +117,7 @@
|
|
|
<el-descriptions title="资料附件">
|
|
|
<el-descriptions-item>
|
|
|
<template #default>
|
|
|
- <el-form-item prop="IDCardFront" label-width="150">
|
|
|
- <template #label>
|
|
|
- <span style="color: #f56c6c">*</span>身份证(人像面)
|
|
|
- </template>
|
|
|
+ <el-form-item prop="IDCardFront" label-width="150" label="身份证(人像面)">
|
|
|
<el-upload action="" v-if="!IDCardFront" :auto-upload="false" :show-file-list="false"
|
|
|
accept=".png, .jpg, .jpeg" @change="uploadImage($event, 1)">
|
|
|
<el-button link type="primary" icon="Upload">上传</el-button>
|
|
|
@@ -160,10 +157,7 @@
|
|
|
</div>-->
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="IDCardBack" label-width="150">
|
|
|
- <template #label>
|
|
|
- <span style="color: #f56c6c">*</span>身份证(国徽面)
|
|
|
- </template>
|
|
|
+ <el-form-item prop="IDCardBack" label-width="150" label="身份证(国徽面)">
|
|
|
<el-upload v-if="!IDCardBack" :auto-upload="false" :show-file-list="false" accept=".png, .jpg, .jpeg"
|
|
|
@change="uploadImage($event, 2)">
|
|
|
<el-button link type="primary" icon="Upload">上传</el-button>
|
|
|
@@ -843,76 +837,76 @@ const disabledDateEnd = (time: Date) => {
|
|
|
// 编辑的id
|
|
|
let editId = ref()
|
|
|
const initEditData = (id: any) => {
|
|
|
- editId.value = id
|
|
|
- api.operationApi.operationDetail(id).then((res: any) => {
|
|
|
- if (res?.code == 200) {
|
|
|
- let formData = res.data
|
|
|
- Object.assign(operationForm, formData)
|
|
|
- console.log(operationForm)
|
|
|
- mingrade.value = getMinValueFromStrArray(formData.gradeList)
|
|
|
- searchRecommend();//编辑回显查询上级推荐人列表
|
|
|
- operationForm.deptId = formData.deptId
|
|
|
- let address = [] as any
|
|
|
- if (formData.province && formData.city && formData.district) {
|
|
|
- address = [formData.province, formData.city, formData.district]
|
|
|
+ editId.value = id
|
|
|
+ api.operationApi.operationDetail(id).then((res: any) => {
|
|
|
+ if (res?.code == 200) {
|
|
|
+ let formData = res.data
|
|
|
+ Object.assign(operationForm, formData)
|
|
|
+ console.log(operationForm)
|
|
|
+ mingrade.value = getMinValueFromStrArray(formData.gradeList)
|
|
|
+ searchRecommend();//编辑回显查询上级推荐人列表
|
|
|
+ operationForm.deptId = formData.deptId
|
|
|
+ let address = [] as any
|
|
|
+ if (formData.province && formData.city && formData.district) {
|
|
|
+ address = [formData.province, formData.city, formData.district]
|
|
|
+ }
|
|
|
+ if (formData.province && !formData.city && !formData.district) {
|
|
|
+ address = [formData.province]
|
|
|
+ }
|
|
|
+ if (formData.fileList) {
|
|
|
+ let sfz1 = formData.fileList.find((item: any) => item.fileType == 'sfz1')
|
|
|
+ let sfz2 = formData.fileList.find((item: any) => item.fileType == 'sfz2')
|
|
|
+ let qualification = formData.fileList.find((item: any) => item.fileType == 'qualification')
|
|
|
+ let contractImg = formData.fileList.find((item: any) => item.fileType == 'contract')
|
|
|
+ let applicantImg = formData.fileList.find((item: any) => item.fileType == 'applicant')
|
|
|
+ let salaryTable = formData.fileList.find((item: any) => item.fileType == 'salary')
|
|
|
+ let leaveTable = formData.fileList.find((item: any) => item.fileType == 'leave')
|
|
|
+ if (sfz1) {
|
|
|
+ operationForm.sfz1 = sfz1.id
|
|
|
+ IDCardFrontName.value = sfz1.fileName
|
|
|
+ IDCardFront.value = sfz1.fileUrl
|
|
|
}
|
|
|
- if (formData.province && !formData.city && !formData.district) {
|
|
|
- address = [formData.province]
|
|
|
+ if (sfz2) {
|
|
|
+ operationForm.sfz2 = sfz2.id
|
|
|
+ IDCardBackName.value = sfz2.fileName
|
|
|
+ IDCardBack.value = sfz2.fileUrl
|
|
|
}
|
|
|
- if (formData.fileList) {
|
|
|
- let sfz1 = formData.fileList.find((item: any) => item.fileType == 'sfz1')
|
|
|
- let sfz2 = formData.fileList.find((item: any) => item.fileType == 'sfz2')
|
|
|
- let qualification = formData.fileList.find((item: any) => item.fileType == 'qualification')
|
|
|
- let contractImg = formData.fileList.find((item: any) => item.fileType == 'contract')
|
|
|
- let applicantImg = formData.fileList.find((item: any) => item.fileType == 'applicant')
|
|
|
- let salaryTable = formData.fileList.find((item: any) => item.fileType == 'salary')
|
|
|
- let leaveTable = formData.fileList.find((item: any) => item.fileType == 'leave')
|
|
|
- if (sfz1) {
|
|
|
- operationForm.sfz1 = sfz1.id
|
|
|
- IDCardFrontName.value = sfz1.fileName
|
|
|
- IDCardFront.value = sfz1.fileUrl
|
|
|
- }
|
|
|
- if (sfz2) {
|
|
|
- operationForm.sfz2 = sfz2.id
|
|
|
- IDCardBackName.value = sfz2.fileName
|
|
|
- IDCardBack.value = sfz2.fileUrl
|
|
|
- }
|
|
|
- if (qualification) {
|
|
|
- operationForm.qualification = qualification.id
|
|
|
- certificationName.value = qualification.fileName
|
|
|
- certification.value = qualification.fileUrl
|
|
|
- }
|
|
|
- if (contractImg) {
|
|
|
- operationForm.contract = contractImg.id
|
|
|
- contractName.value = contractImg.fileName
|
|
|
- contract.value = contractImg.fileUrl
|
|
|
- }
|
|
|
- if (applicantImg) {
|
|
|
- operationForm.applicant = applicantImg.id
|
|
|
- applicantName.value = applicantImg.fileName
|
|
|
- applicant.value = applicantImg.fileUrl
|
|
|
- }
|
|
|
- if (salaryTable) {
|
|
|
- operationForm.salaryTable = salaryTable.id
|
|
|
- decidePayName.value = salaryTable.fileName
|
|
|
- decidePay.value = salaryTable.fileUrl
|
|
|
- }
|
|
|
- if (leaveTable) {
|
|
|
- operationForm.leaveTable = leaveTable.id
|
|
|
- dimissionName.value = leaveTable.fileName
|
|
|
- dimission.value = leaveTable.fileUrl
|
|
|
- }
|
|
|
+ if (qualification) {
|
|
|
+ operationForm.qualification = qualification.id
|
|
|
+ certificationName.value = qualification.fileName
|
|
|
+ certification.value = qualification.fileUrl
|
|
|
+ }
|
|
|
+ if (contractImg) {
|
|
|
+ operationForm.contract = contractImg.id
|
|
|
+ contractName.value = contractImg.fileName
|
|
|
+ contract.value = contractImg.fileUrl
|
|
|
+ }
|
|
|
+ if (applicantImg) {
|
|
|
+ operationForm.applicant = applicantImg.id
|
|
|
+ applicantName.value = applicantImg.fileName
|
|
|
+ applicant.value = applicantImg.fileUrl
|
|
|
+ }
|
|
|
+ if (salaryTable) {
|
|
|
+ operationForm.salaryTable = salaryTable.id
|
|
|
+ decidePayName.value = salaryTable.fileName
|
|
|
+ decidePay.value = salaryTable.fileUrl
|
|
|
+ }
|
|
|
+ if (leaveTable) {
|
|
|
+ operationForm.leaveTable = leaveTable.id
|
|
|
+ dimissionName.value = leaveTable.fileName
|
|
|
+ dimission.value = leaveTable.fileUrl
|
|
|
}
|
|
|
- operationForm.address = address
|
|
|
- getUser(operationForm.deptId)
|
|
|
- getRecommend(operationForm.deptId)
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
}
|
|
|
- })
|
|
|
+ operationForm.address = address
|
|
|
+ getUser(operationForm.deptId)
|
|
|
+ getRecommend(operationForm.deptId)
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 新增数据初始化
|
|
|
@@ -1259,87 +1253,81 @@ const onSubmit = async (OperationFormRef: any, type: any) => {
|
|
|
if (type) {
|
|
|
await OperationFormRef.validate((valid: any, error: any) => {
|
|
|
if (valid) {
|
|
|
- if (IDCardFront.value && IDCardBack.value) {
|
|
|
- let formData = { ...operationForm }
|
|
|
- // formData.organization = operationForm.value.organization[operationForm.value.organization.length - 1]
|
|
|
- formData.systemCode = localStorage.getItem('login_system') ? localStorage.getItem('login_system') : ''
|
|
|
- formData.province = operationForm.address ? operationForm.address[0] : ''
|
|
|
- formData.city = operationForm.address ? operationForm.address[1] ? operationForm.address[1] : '' : ''
|
|
|
- formData.district = operationForm.address ? operationForm.address[2] ? operationForm.address[2] : '' : ''
|
|
|
- if (editId.value) {
|
|
|
- api.operationApi.updateOperation(formData).then((res: any) => {
|
|
|
- if (res.code == 200) {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- emits('closeDialog', '确定')
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- }
|
|
|
- IDCardFrontName.value = ''
|
|
|
- IDCardFront.value = ''
|
|
|
- IDCardBackName.value = ''
|
|
|
- IDCardBack.value = ''
|
|
|
- certificationName.value = ''
|
|
|
- certification.value = ''
|
|
|
- contractName.value = ''
|
|
|
- contract.value = ''
|
|
|
- applicantName.value = ''
|
|
|
- applicant.value = ''
|
|
|
- decidePayName.value = ''
|
|
|
- decidePay.value = ''
|
|
|
- dimissionName.value = ''
|
|
|
- dimission.value = ''
|
|
|
- recordShow.value = false
|
|
|
- OperationFormRef.resetFields()
|
|
|
- emits('closeDialog', '取消')
|
|
|
- })
|
|
|
- } else {
|
|
|
- console.log(formData)
|
|
|
- api.partnerApi.saveByPartner({
|
|
|
- ...formData,
|
|
|
- }).then((res: any) => {
|
|
|
- if (res.code == 200) {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- emits('closeDialog', '确定')
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- }
|
|
|
- IDCardFrontName.value = ''
|
|
|
- IDCardFront.value = ''
|
|
|
- IDCardBackName.value = ''
|
|
|
- IDCardBack.value = ''
|
|
|
- certificationName.value = ''
|
|
|
- certification.value = ''
|
|
|
- contractName.value = ''
|
|
|
- contract.value = ''
|
|
|
- applicantName.value = ''
|
|
|
- applicant.value = ''
|
|
|
- decidePayName.value = ''
|
|
|
- decidePay.value = ''
|
|
|
- dimissionName.value = ''
|
|
|
- dimission.value = ''
|
|
|
- recordShow.value = false
|
|
|
- OperationFormRef.resetFields()
|
|
|
- emits('closeDialog', '取消')
|
|
|
- })
|
|
|
- }
|
|
|
+ let formData = { ...operationForm }
|
|
|
+ // formData.organization = operationForm.value.organization[operationForm.value.organization.length - 1]
|
|
|
+ formData.systemCode = localStorage.getItem('login_system') ? localStorage.getItem('login_system') : ''
|
|
|
+ formData.province = operationForm.address ? operationForm.address[0] : ''
|
|
|
+ formData.city = operationForm.address ? operationForm.address[1] ? operationForm.address[1] : '' : ''
|
|
|
+ formData.district = operationForm.address ? operationForm.address[2] ? operationForm.address[2] : '' : ''
|
|
|
+ if (editId.value) {
|
|
|
+ api.operationApi.updateOperation(formData).then((res: any) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ emits('closeDialog', '确定')
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ IDCardFrontName.value = ''
|
|
|
+ IDCardFront.value = ''
|
|
|
+ IDCardBackName.value = ''
|
|
|
+ IDCardBack.value = ''
|
|
|
+ certificationName.value = ''
|
|
|
+ certification.value = ''
|
|
|
+ contractName.value = ''
|
|
|
+ contract.value = ''
|
|
|
+ applicantName.value = ''
|
|
|
+ applicant.value = ''
|
|
|
+ decidePayName.value = ''
|
|
|
+ decidePay.value = ''
|
|
|
+ dimissionName.value = ''
|
|
|
+ dimission.value = ''
|
|
|
+ recordShow.value = false
|
|
|
+ OperationFormRef.resetFields()
|
|
|
+ emits('closeDialog', '取消')
|
|
|
+ })
|
|
|
} else {
|
|
|
- ElMessage({
|
|
|
- message: '请上传必传附件!',
|
|
|
- type: 'warning'
|
|
|
+ console.log(formData)
|
|
|
+ api.partnerApi.saveByPartner({
|
|
|
+ ...formData,
|
|
|
+ }).then((res: any) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ emits('closeDialog', '确定')
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ IDCardFrontName.value = ''
|
|
|
+ IDCardFront.value = ''
|
|
|
+ IDCardBackName.value = ''
|
|
|
+ IDCardBack.value = ''
|
|
|
+ certificationName.value = ''
|
|
|
+ certification.value = ''
|
|
|
+ contractName.value = ''
|
|
|
+ contract.value = ''
|
|
|
+ applicantName.value = ''
|
|
|
+ applicant.value = ''
|
|
|
+ decidePayName.value = ''
|
|
|
+ decidePay.value = ''
|
|
|
+ dimissionName.value = ''
|
|
|
+ dimission.value = ''
|
|
|
+ recordShow.value = false
|
|
|
+ OperationFormRef.resetFields()
|
|
|
+ emits('closeDialog', '取消')
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
Object.keys(error).forEach((key, i) => {
|
|
|
if (i == 0) {
|