diff --git a/pages/mine/information/index.vue b/pages/mine/information/index.vue index 3a085fc..c0d5d89 100644 --- a/pages/mine/information/index.vue +++ b/pages/mine/information/index.vue @@ -52,6 +52,27 @@ + + + + + + + + + @@ -63,6 +84,17 @@ + + + + + @@ -82,6 +114,9 @@ userCardIDPhotoFile: [], socialPhotoFile: [], injuriesPayTiemFile:[], + photosOfLevel:[], + contractFile:[], + insuranceFile: [], EMPLOYMENT_APPLY_MANAGEMENT_ID:'', } }, @@ -110,6 +145,9 @@ this.userCardIDPhotoFile = [] this.socialPhotoFile = [] this.injuriesPayTiemFile = [] + this.contractFile = [] + this.photosOfLevel = [] + this.insuranceFile = [] let Employed = await getEmployedBy({ showCount: 10, currentPage: 1, @@ -132,10 +170,23 @@ for (let i = 0; i < resData.socialPhotoFile.length; i++) { this.socialPhotoFile.push(this.$filePath + resData.socialPhotoFile[i].FILEPATH) } - + for (let i = 0; i < resData.workInsurancePhotoFile.length; i++) { this.injuriesPayTiemFile.push(this.$filePath + resData.workInsurancePhotoFile[i].FILEPATH) } + + for (let i = 0; i < resData.contractFile.length; i++) { + this.contractFile.push(this.$filePath + resData.contractFile[i].FILEPATH) + } + + for (let i = 0; i < resData.photosOfLevel.length; i++) { + this.photosOfLevel.push(this.$filePath + resData.photosOfLevel[i].FILEPATH) + } + + for (let i = 0; i < resData.insuranceFile.length; i++){ + this.insuranceFile.push(this.$filePath + resData.insuranceFile[i].FILEPATH) + } + if (this.info.ISFLOW === '0') { this.info.ISFLOW_NAME = '否' } else if (this.info.ISFLOW === '1') { @@ -151,6 +202,21 @@ } else if (this.info.IS_INJURIES_PAY === '1') { this.info.IS_INJURIES_PAY_NAME = '是' } + if (this.info.IS_SIGN_LABOR === '0') { + this.info.IS_SIGN_LABOR_NAME = '否' + } else if (this.info.IS_SIGN_LABOR === '1') { + this.info.IS_SIGN_LABOR_NAME = '是' + } + if (this.info.IS_LEVEL_THREE === '0'){ + this.info.IS_LEVEL_THREE_NAME = '否' + } else if (this.info.IS_LEVEL_THREE === '1'){ + this.info.IS_LEVEL_THREE_NAME = '是' + } + if (this.info.ISPAY === '1'){ + this.info.ISPAY_NAME = '是' + }else { + this.info.ISPAY_NAME = '否' + } if (resData.userPhotoFile.length > 0) { this.$set(this.info, 'userPhoto', this.$filePath + resData.userPhotoFile[0].FILEPATH) } diff --git a/pages/mine/information/update.vue b/pages/mine/information/update.vue index 12d6a2e..9c00de0 100644 --- a/pages/mine/information/update.vue +++ b/pages/mine/information/update.vue @@ -88,6 +88,19 @@ + + + + + + + + + + @@ -140,6 +153,8 @@ @confirm="fnIsSignLaborConfirm" @cancel="fnShowIsSignLabor"> + @@ -182,6 +197,7 @@ showBf: false, showIsSignLabor: false, showPhotosOfLevel: false, + showIsPay: false, personWorkTypeColumns: [], prePhotoId: [], form: { @@ -191,6 +207,7 @@ contractFile:[], injuriesPayTiemFile: [], photosOfLevel:[], + insuranceFile: [], IS_INJURIES_PAY_TIME:'', NAME: '', USERNAME: '', @@ -215,7 +232,9 @@ IS_SIGN_LABOR_NAME: '', POST_ID: '', IS_LEVEL_THREE: '', - IS_LEVEL_THREE_NAME: '' + IS_LEVEL_THREE_NAME: '', + ISPAY: '', + ISPAY_NAME: '' }, rules: { userPhoto: { @@ -472,12 +491,39 @@ }); }, // 合同图片 + fnIsPayAdd(event) { + for (let i = 0; i < event.file.length; i++) { + this.form.insuranceFile.push(event.file[i]) + } + }, + // 合同图片删除 + fnIsPayDelete(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.insuranceFile.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: '提示', @@ -525,6 +571,14 @@ fnShowIsSignLabor(){ this.showIsSignLabor = !this.showIsSignLabor }, + fnShowIsPay(){ + this.showIsPay = !this.showIsPay + }, + fnShowIsPayConfirm(e){ + this.form.ISPAY = e.value[0].id + this.form.ISPAY_NAME = e.value[0].name + this.fnShowIsPay() + }, fnShowPhotosOfLevel(){ this.showPhotosOfLevel = !this.showPhotosOfLevel }, @@ -695,6 +749,12 @@ this.form.ISFLOW_NAME = '是' } + if (this.form.ISPAY === '1'){ + this.form.ISPAY_NAME = '是' + }else { + this.form.ISPAY_NAME = '否' + } + if (this.form.IS_LEVEL_THREE === '0'){ this.form.IS_LEVEL_THREE_NAME = '否' }else { @@ -745,7 +805,33 @@ this.form.injuriesPayTiemFile.push(obj) }) } - + if (resData.photosOfLevel.length > 0) { + resData.photosOfLevel.forEach(item => { + const obj = { + id: item.IMGFILES_ID, + url: this.$filePath + item.FILEPATH + } + this.form.photosOfLevel.push(obj) + }) + } + if (resData.contractFile.length > 0) { + resData.contractFile.forEach(item => { + const obj = { + id: item.IMGFILES_ID, + url: this.$filePath + item.FILEPATH + } + this.form.contractFile.push(obj) + }) + } + if (resData.insuranceFile.length > 0) { + resData.insuranceFile.forEach(item => { + const obj = { + id: item.IMGFILES_ID, + url: this.$filePath + item.FILEPATH + } + this.form.insuranceFile.push(obj) + }) + } }, fnAfterRead(event) { this.form.userPhoto.push(event.file) @@ -823,8 +909,8 @@ name: 'files', formData: { TYPE: '16', - FOREIGN_KEY: this.userInfo.USER_ID, - CORPINFO_ID: this.CORPINFO_ID, + FOREIGN_KEY: this.form.EMPLOYMENT_APPLY_MANAGEMENT_ID, + CORPINFO_ID: this.userInfo.CORPINFO_ID, } }) } @@ -834,8 +920,8 @@ name: 'files', formData: { TYPE: '19', - FOREIGN_KEY: this.userInfo.USER_ID, - CORPINFO_ID: this.CORPINFO_ID, + FOREIGN_KEY: this.form.EMPLOYMENT_APPLY_MANAGEMENT_ID, + CORPINFO_ID: this.userInfo.CORPINFO_ID, } }) } @@ -845,8 +931,19 @@ name: 'files', formData: { TYPE: '10', - FOREIGN_KEY: this.userInfo.USER_ID, - CORPINFO_ID: this.CORPINFO_ID, + FOREIGN_KEY: this.form.EMPLOYMENT_APPLY_MANAGEMENT_ID, + CORPINFO_ID: this.userInfo.CORPINFO_ID, + } + }) + } + for (let i = 0; i < this.form.insuranceFile.length; i++) { + await setUploadAttachments({ + filePath: this.form.insuranceFile[i].url, + name: 'files', + formData: { + TYPE: '11', + FOREIGN_KEY: this.form.EMPLOYMENT_APPLY_MANAGEMENT_ID, + CORPINFO_ID: this.userInfo.CORPINFO_ID, } }) }