相关方app信息同步

liujun-2024-06-06
liujun 2024-06-06 17:03:31 +08:00
parent 287a51c891
commit bbea3b58db
1 changed files with 209 additions and 41 deletions

View File

@ -66,14 +66,29 @@
<u--input v-model="form.IS_SOCIAL_NAME" border="none" disabled disabledColor="#ffffff"
inputAlign="right"></u--input>
</u-form-item>
<u-form-item v-if="form.IS_SOCIAL=='1'" label="社会保障号" prop="SOCIAL_NUMBER" borderBottom required>
<u-form-item v-if="form.IS_SOCIAL=='1'" label="社会保障号" prop="SOCIAL_NUMBER" borderBottom required>
<u--input border="none" v-model="form.SOCIAL_NUMBER"></u--input>
</u-form-item>
<u-form-item v-if="form.IS_SOCIAL=='1'" label="社会保障卡(正反面)" prop="socialPhotoFile" borderBottom required class="form-item-block">
<u-form-item v-if="form.IS_SOCIAL=='1'" label="社会保障卡" prop="socialPhotoFile" borderBottom required class="form-item-block">
<u-upload class="mt-10" :fileList="form.socialPhotoFile" @afterRead="fnAttSocialAdd"
@delete="fnAttSocialDelete" multiple :maxCount="2" previewFullImage>
</u-upload>
</u-form-item>
<u-form-item label="是否缴纳保险" prop="IS_BF_NAME" borderBottom required
@click="fnShowBf">
<u--input v-model="form.IS_BF_NAME" border="none" disabled disabledColor="#ffffff"
inputAlign="right"></u--input>
</u-form-item>
<u-form-item label="是否签订劳动合同" prop="IS_SIGN_LABOR_NAME" borderBottom required
@click="fnShowIsSignLabor">
<u--input v-model="form.IS_SIGN_LABOR_NAME" border="none" disabled disabledColor="#ffffff"
inputAlign="right"></u--input>
</u-form-item>
<u-form-item v-if="form.IS_SIGN_LABOR==='1'" label="合同图片" prop="contractFile" borderBottom required class="form-item-block">
<u-upload class="mt-10" :fileList="form.contractFile" @afterRead="fnIsSignLaborAdd"
@delete="fnIsSignLaborDelete" multiple :maxCount="4" previewFullImage>
</u-upload>
</u-form-item>
<u-form-item label="是否按期缴纳工伤保险" prop="IS_INJURIES_PAY_NAME" borderBottom required
@click="fnShowEmploymentInjuryInsurance">
<u--input v-model="form.IS_INJURIES_PAY_NAME" border="none" disabled disabledColor="#ffffff"
@ -90,6 +105,19 @@
@afterRead="fnInjuriesPayTiemAttachmentsAfterRead" @delete="fnInjuriesPayTiemAttachmentsDelete"
multiple :maxCount="4" previewFullImage></u-upload>
</u-form-item>
<u-form-item label="岗位名称(工种)" prop="POST_ID" borderBottom required>
<u--textarea border="none" v-model="form.POST_ID" autoHeight></u--textarea>
</u-form-item>
<u-form-item label="是否参加三级安全培训" prop="IS_LEVEL_THREE_NAME" borderBottom required
@click="fnShowPhotosOfLevel">
<u--input v-model="form.IS_LEVEL_THREE_NAME" border="none" disabled disabledColor="#ffffff"
inputAlign="right"></u--input>
</u-form-item>
<u-form-item v-if="form.IS_LEVEL_THREE === '1'" label="三级安全培训照片" prop="photosOfLevel" borderBottom required class="form-item-block">
<u-upload class="mt-10" :fileList="form.photosOfLevel" @afterRead="fnPhotosOfLevelAdd"
@delete="fnPhotosOfLevelDelete" multiple :maxCount="4" previewFullImage>
</u-upload>
</u-form-item>
<u-form-item label="是否流动人员" prop="ISFLOW_NAME" borderBottom required
@click="fnShowFloatingPersonnel">
<u--input v-model="form.ISFLOW_NAME" border="none" disabled disabledColor="#ffffff" inputAlign="right"></u--input>
@ -106,6 +134,13 @@
</u-picker>
<u-picker :show="showFloatingPersonnel" :columns="[[{name: '是', id: '1'}, {name: '否', id: '0'}]]" keyName="name"
@confirm="fnFloatingPersonnelConfirm" @cancel="fnShowFloatingPersonnel"></u-picker>
<u-picker :show="showBf" :columns="[[{name: '是', id: '1'}, {name: '否', id: '0'}]]" keyName="name"
@confirm="fnBFConfirm" @cancel="fnShowBf"></u-picker>
<u-picker :show="showIsSignLabor" :columns="[[{name: '是', id: '1'}, {name: '否', id: '0'}]]" keyName="name"
@confirm="fnIsSignLaborConfirm" @cancel="fnShowIsSignLabor"></u-picker>
<u-picker :show="showPhotosOfLevel" :columns="[[{name: '是', id: '1'}, {name: '否', id: '0'}]]" keyName="name"
@confirm="fnShowPhotosOfLevelConfirm" @cancel="fnShowPhotosOfLevel"></u-picker>
<u-datetime-picker :show="showInjuriesPayTiem" v-model="IS_INJURIES_PAY_TIME" mode="date"
@confirm="fnShowInjuriesPayTiemConfirm" @cancel="fnShowInjuriesPayTiemEducation"></u-datetime-picker>
<u-button type="primary" text="保 存" class="mt-10" @click="$u.debounce(fnSubmit, 1000,true)"></u-button>
@ -144,13 +179,18 @@
degreeOfEducationColumns: [],
showPersonWorkType: false,
showFloatingPersonnel: false,
showBf: false,
showIsSignLabor: false,
showPhotosOfLevel: false,
personWorkTypeColumns: [],
prePhotoId: [],
form: {
userPhoto: [],
userCardIDPhotoFile: [],
socialPhotoFile: [],
injuriesPayTiemFile: [], //
contractFile:[],
injuriesPayTiemFile: [],
photosOfLevel:[],
IS_INJURIES_PAY_TIME:'',
NAME: '',
USERNAME: '',
@ -169,6 +209,13 @@
ISFLOW_NAME: '',
IS_SOCIAL:'',
IS_SOCIAL_NAME:'',
IS_BF_NAME: '',
IS_BF: '',
IS_SIGN_LABOR: '',
IS_SIGN_LABOR_NAME: '',
POST_ID: '',
IS_LEVEL_THREE: '',
IS_LEVEL_THREE_NAME: ''
},
rules: {
userPhoto: {
@ -267,14 +314,43 @@
message: '请选择工伤保险有效期',
trigger: ['change']
},
IS_BF_NAME:{
required: true,
message: '请选择是否是否缴纳保险',
trigger: ['change']
},
IS_SIGN_LABOR_NAME:{
required: true,
message: '请选择是否签订劳动合同',
trigger: ['change']
},
contractFile:{
type: 'array',
required: true,
message: '请上传劳动合同',
trigger: ['change']
},
POST_ID:{
required: true,
message: '请填写岗位',
trigger: ['change']
},
photosOfLevel:{
type: 'array',
required: true,
message: '请上传三级安全培训照片',
trigger: ['change']
},
IS_LEVEL_THREE_NAME:{
required: true,
message: '请选择是否为三级人员',
trigger: ['change']
}
}
}
},
onLoad() {
this.fnGetData()
// this.fnGetDataDictionary('d7d80f08d73a4accbccf4fd3d8d1d867', 'degreeOfEducationColumns')
// this.fnGetDataDictionary('55484e491a5e442d839c4595380713ec', 'personWorkTypeColumns')
},
computed: {
userInfo() {
@ -330,20 +406,13 @@
if (event.file.id) {
//
this.prePhotoId.push(event.file.id)
// await removeUploadAttachments({
// IMGFILES_ID: event.file.id
// })
}
uni.showToast({
title: '操作成功',
duration: 2000
});
// var pages = getCurrentPages(); //
// var prePage = pages[pages.length - 2]; //
// prePage.$vm.reloadx();
this.form.userCardIDPhotoFile.splice(event.index, 1)
} else if (res.cancel) {
// console.log('');
}
}
});
@ -363,17 +432,11 @@
if (res.confirm) {
if (event.file.id) {
this.prePhotoId.push(event.file.id)
// await removeUploadAttachments({
// IMGFILES_ID: event.file.id
// })
}
uni.showToast({
title: '操作成功',
duration: 2000
});
// var pages = getCurrentPages(); //
// var prePage = pages[pages.length - 2]; //
// prePage.$vm.reloadx();
this.form.socialPhotoFile.splice(event.index, 1)
} else if (res.cancel) {
// console.log('');
@ -381,6 +444,60 @@
}
});
},
//
fnIsSignLaborAdd(event) {
for (let i = 0; i < event.file.length; i++) {
this.form.contractFile.push(event.file[i])
}
},
//
fnIsSignLaborDelete(event) {
uni.showModal({
title: '提示',
content: '确定删除吗',
success: async (res) => {
if (res.confirm) {
if (event.file.id) {
this.prePhotoId.push(event.file.id)
}
uni.showToast({
title: '操作成功',
duration: 2000
});
this.form.contractFile.splice(event.index, 1)
} else if (res.cancel) {
// console.log('');
}
}
});
},
//
fnPhotosOfLevelAdd(event) {
for (let i = 0; i < event.file.length; i++) {
this.form.photosOfLevel.push(event.file[i])
}
},
//
fnPhotosOfLevelDelete(event) {
uni.showModal({
title: '提示',
content: '确定删除吗',
success: async (res) => {
if (res.confirm) {
if (event.file.id) {
this.prePhotoId.push(event.file.id)
}
uni.showToast({
title: '操作成功',
duration: 2000
});
this.form.photosOfLevel.splice(event.index, 1)
} else if (res.cancel) {
// console.log('');
}
}
});
},
async fnGetDataDictionary(DICTIONARIES_ID) {
let resData = await getDataDictionary({
@ -399,22 +516,38 @@
fnShowPersonWorkType() {
this.showPersonWorkType = !this.showPersonWorkType
},
// fnPersonWorkTypeConfirm(e) {
// this.form.PERSON_WORK_TYPE = e.value[0].BIANMA
// this.form.PERSON_WORK_TYPE_NAME = e.value[0].NAME
// this.fnShowPersonWorkType()
// },
fnShowFloatingPersonnel() {
this.showFloatingPersonnel = !this.showFloatingPersonnel
},
fnShowBf(){
this.showBf = !this.showBf
},
fnShowIsSignLabor(){
this.showIsSignLabor = !this.showIsSignLabor
},
fnShowPhotosOfLevel(){
this.showPhotosOfLevel = !this.showPhotosOfLevel
},
fnShowPhotosOfLevelConfirm(e){
this.form.IS_LEVEL_THREE = e.value[0].id
this.form.IS_LEVEL_THREE_NAME = e.value[0].name
this.fnShowPhotosOfLevel()
},
fnFloatingPersonnelConfirm(e) {
this.form.ISFLOW = e.value[0].id
this.form.ISFLOW_NAME = e.value[0].name
this.fnShowFloatingPersonnel()
},
fnBFConfirm(e){
this.form.IS_BF = e.value[0].id
this.form.IS_BF_NAME = e.value[0].name
this.fnShowBf()
},
fnIsSignLaborConfirm(e){
this.form.IS_SIGN_LABOR = e.value[0].id
this.form.IS_SIGN_LABOR_NAME = e.value[0].name
this.fnShowIsSignLabor()
},
fnShowIsSocial() {
this.showIsSocial = !this.showIsSocial
},
@ -447,17 +580,11 @@
if (res.confirm) {
if (event.file.id) {
this.prePhotoId.push(event.file.id)
// await removeUploadAttachments({
// IMGFILES_ID: event.file.id
// })
}
uni.showToast({
title: '操作成功',
duration: 2000
});
// var pages = getCurrentPages(); //
// var prePage = pages[pages.length - 2]; //
// prePage.$vm.reloadx();
this.form.injuriesPayTiemFile.splice(event.index, 1)
} else if (res.cancel) {
// console.log('');
@ -557,16 +684,34 @@
} else if (this.form.IS_INJURIES_PAY === '1') {
this.form.IS_INJURIES_PAY_NAME = '是'
}
if (this.form.SEX_NAME == '0') {
if (this.form.SEX_NAME === '0') {
this.form.SEX_NAME = '男'
} else if (this.form.SEX_NAME == '1') {
} else if (this.form.SEX_NAME === '1') {
this.form.SEX_NAME = '女'
}
if (this.form.ISFLOW == '0') {
if (this.form.ISFLOW === '0') {
this.form.ISFLOW_NAME = '否'
} else if (this.form.ISFLOW == '1') {
} else if (this.form.ISFLOW === '1') {
this.form.ISFLOW_NAME = '是'
}
if (this.form.IS_LEVEL_THREE === '0'){
this.form.IS_LEVEL_THREE_NAME = '否'
}else {
this.form.IS_LEVEL_THREE_NAME = '是'
}
if (this.form.IS_BF === '0'){
this.form.IS_BF_NAME = '否'
}else {
this.form.IS_BF_NAME = '是'
}
if (this.form.IS_SIGN_LABOR === '0'){
this.form.IS_SIGN_LABOR_NAME = '否'
}else {
this.form.IS_SIGN_LABOR_NAME = '是'
}
if (resData.userPhotoFile.length > 0) {
this.$set(this.form, 'userPhoto', [{
url: this.$filePath + resData.userPhotoFile[0].FILEPATH,
@ -617,12 +762,12 @@
}
if (await this.fnIDCardDeduplication()) return
if (await this.fnPhoneNumberDeduplication()) return
if (this.form.userCardIDPhotoFile.length != 2) {
if (this.form.userCardIDPhotoFile.length !== 2) {
uni.$u.toast('身份证照片需要两张')
return
}
if(this.form.IS_SOCIAL==='1'){
if (this.form.socialPhotoFile.length != 2) {
if (this.form.socialPhotoFile.length !== 2) {
uni.$u.toast('社保卡照片需要两张')
return
}
@ -635,6 +780,7 @@
IMGFILES_ID: this.prePhotoId[i]
})
}
//
for (let i = 0; i < this.form.userPhoto.length; i++) {
if (!this.form.userPhoto[i].FILEPATH) {
let resData = await setUploadAttachments({
@ -660,7 +806,6 @@
}
})
}
for (let i = 0; i < this.form.socialPhotoFile.length; i++) {
await setUploadAttachments({
filePath: this.form.socialPhotoFile[i].url,
@ -672,7 +817,7 @@
}
})
}
for (let i = 0; i < this.form.injuriesPayTiemFile.length; i++) { // 16
for (let i = 0; i < this.form.injuriesPayTiemFile.length; i++) {
await setUploadAttachments({
filePath: this.form.injuriesPayTiemFile[i].url,
name: 'files',
@ -683,6 +828,29 @@
}
})
}
for (let i = 0; i < this.form.photosOfLevel.length; i++) {
await setUploadAttachments({
filePath: this.form.photosOfLevel[i].url,
name: 'files',
formData: {
TYPE: '19',
FOREIGN_KEY: this.userInfo.USER_ID,
CORPINFO_ID: this.CORPINFO_ID,
}
})
}
for (let i = 0; i < this.form.contractFile.length; i++) {
await setUploadAttachments({
filePath: this.form.contractFile[i].url,
name: 'files',
formData: {
TYPE: '10',
FOREIGN_KEY: this.userInfo.USER_ID,
CORPINFO_ID: this.CORPINFO_ID,
}
})
}
//
await setUserInfo({
...this.form,
PHOTO: fileUrl