This commit is contained in:
BianLzhaoMin 2025-10-31 13:09:47 +08:00
parent ed9a002698
commit b014727a2c
9 changed files with 119 additions and 22 deletions

View File

@ -54,10 +54,19 @@ export const importEntryPersonAPI = (data) => {
} }
// 修改人员的红绿灯状态 // 修改人员的红绿灯状态
export const updatePersonLightStatusAPI = (id) => { export const updatePersonLightStatusAPI = (data) => {
return request({ return request({
url: `/bmw/workerWageCard/light/${id}`, url: `/bmw/workerWageCard/light`,
method: 'POST', method: 'POST',
data,
})
}
// 修改人员的红绿灯状态(工资卡见证中更新使用)
export const updatePersonWageLightStatusAPI = (data) => {
return request({
url: `/bmw/workerWageCard/wageLight`,
method: 'POST',
data,
}) })
} }

View File

@ -1356,11 +1356,17 @@ export default {
// 绿 // 绿
const result = const result =
await updatePersonLightStatusAPI( await updatePersonLightStatusAPI(
this {
.queryDetailsId workerId:
? this this
.queryDetailsId .queryDetailsId
: res.data, ? this
.queryDetailsId
: res.data,
proId: this
.proId,
},
) )
console.log( console.log(
result, result,

View File

@ -751,11 +751,53 @@ export default {
const status = this.checkFormStatus() const status = this.checkFormStatus()
const filesList = [] const filesList = []
const formData = new FormData() const formData = new FormData()
// const params = {
// ...this.addEntryProjectForm,
// }
const {
name,
idNumber,
postName,
proName,
subName,
teamName,
teamId,
subId,
proId,
postId,
id,
contractCode,
contractTermType,
contractStartDate,
contractStopDate,
wageApprovedWay,
wageCriterion,
} = this.addEntryProjectForm
const params = { const params = {
...this.addEntryProjectForm, name,
idNumber,
postName,
proName,
subName,
teamName,
teamId,
subId,
proId,
postId,
id,
bmWorkerContract: {
contractCode,
contractTermType,
contractStartDate,
contractStopDate,
wageApprovedWay,
wageCriterion,
},
} }
console.log('status', status) // console.log('status', status)
if (status === 'partial') { if (status === 'partial') {
this.$modal.msgError( this.$modal.msgError(
'请完善合同见证中的必填信息(除附件外)后再提交', '请完善合同见证中的必填信息(除附件外)后再提交',
@ -780,13 +822,21 @@ export default {
const res = await addShanghaiProEinAPI(formData) const res = await addShanghaiProEinAPI(formData)
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('新增成功') this.$modal.msgSuccess('新增成功')
this.contractImageList.forEach((item) => {
item.fileList = []
})
resolve(true) resolve(true)
await updatePersonLightStatusAPI(this.workerId) await updatePersonLightStatusAPI({
workerId: this.workerId,
proId: this.addEntryProjectForm.proId,
})
} else { } else {
reject(false) reject(false)
} }
} catch (err) { } catch (err) {
this.$modal.msgError('合同上传失败,请重试') // this.$modal.msgError('')
reject(err) reject(err)
} }
} else { } else {

View File

@ -115,6 +115,10 @@ export default {
type: [String, Number], type: [String, Number],
default: '', default: '',
}, },
proId: {
type: [String, Number],
default: '',
},
}, },
data() { data() {
return { return {
@ -151,6 +155,7 @@ export default {
async getContractDetailList() { async getContractDetailList() {
const { rows: res } = await getContractDetailListAPI({ const { rows: res } = await getContractDetailListAPI({
workerId: this.workerId, workerId: this.workerId,
proId: this.proId,
}) })
this.detailsList = res this.detailsList = res
}, },

View File

@ -167,6 +167,10 @@ export default {
type: [String, Number], type: [String, Number],
default: '', // id default: '', // id
}, },
proId: {
type: [String, Number],
default: '', // id
},
}, },
components: { components: {
UploadImg, UploadImg,
@ -335,6 +339,7 @@ export default {
const status = this.checkFormStatus() const status = this.checkFormStatus()
let params = { let params = {
...this.contractInfoForm, ...this.contractInfoForm,
proId: this.proId,
workerId: this.workerId, workerId: this.workerId,
} }
const filesList = [] const filesList = []
@ -387,9 +392,10 @@ export default {
resolve() resolve()
// 绿 // 绿
const result = const result =
await updatePersonLightStatusAPI( await updatePersonLightStatusAPI({
this.workerId, workerId: this.workerId,
) proId: this.proId,
})
console.log( console.log(
result, result,
'result红绿灯状态更新结果', 'result红绿灯状态更新结果',

View File

@ -82,6 +82,7 @@
:formType="formType" :formType="formType"
:workerId="workerId" :workerId="workerId"
:einStatus="einStatus" :einStatus="einStatus"
:proId="proId"
ref="uploadContractContentRef" ref="uploadContractContentRef"
:queryDetailsId="queryDetailsId" :queryDetailsId="queryDetailsId"
/> />
@ -104,7 +105,7 @@
</template> </template>
<template v-if="dialogConfig.outerTitle === '历史合同见证详情'"> <template v-if="dialogConfig.outerTitle === '历史合同见证详情'">
<ContractDetailsList :workerId="workerId" /> <ContractDetailsList :workerId="workerId" :proId="proId" />
</template> </template>
<template v-if="dialogConfig.outerTitle === '合同图片详情'"> <template v-if="dialogConfig.outerTitle === '合同图片详情'">
@ -157,6 +158,7 @@ export default {
einStatus: 1, // einStatus: 1, //
formType: 1, // formType: 1, //
workerId: '', // id workerId: '', // id
proId: '', // id
slots: { slots: {
businessLicense: 'businessLicense', businessLicense: 'businessLicense',
@ -184,6 +186,7 @@ export default {
// //
onHandleUploadContract(data) { onHandleUploadContract(data) {
this.queryDetailsId = data.id this.queryDetailsId = data.id
this.proId = data.proId
if (data.isSign == 1) { if (data.isSign == 1) {
this.$confirm( this.$confirm(
'当前已上传合同信息,是否要重新上传,重新上传将会覆盖原数据?', '当前已上传合同信息,是否要重新上传,重新上传将会覆盖原数据?',
@ -216,6 +219,7 @@ export default {
onHandleViewContractDetailsList(data) { onHandleViewContractDetailsList(data) {
this.dialogConfig.outerTitle = '历史合同见证详情' this.dialogConfig.outerTitle = '历史合同见证详情'
this.workerId = data.workerId this.workerId = data.workerId
this.proId = data.proId
this.dialogConfig.outerWidth = '80%' this.dialogConfig.outerWidth = '80%'
this.dialogConfig.minHeight = '80vh' this.dialogConfig.minHeight = '80vh'
this.dialogConfig.maxHeight = '80vh' this.dialogConfig.maxHeight = '80vh'

View File

@ -75,6 +75,7 @@
<WageCardUpload <WageCardUpload
:formType="formType" :formType="formType"
:workerId="workerId" :workerId="workerId"
:proId="proId"
:einStatus="einStatus" :einStatus="einStatus"
ref="uploadContractContentRef" ref="uploadContractContentRef"
:queryDetailsId="queryDetailsId" :queryDetailsId="queryDetailsId"
@ -138,6 +139,7 @@ export default {
formType: 1, // formType: 1, //
workerId: '', // id workerId: '', // id
contractImgList: [], // contractImgList: [], //
proId: '', // id
} }
}, },
methods: { methods: {
@ -179,6 +181,8 @@ export default {
this.queryDetailsId = '' this.queryDetailsId = ''
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
} }
this.proId = data.proId
}, },
// //

View File

@ -115,7 +115,7 @@
]" ]"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -129,7 +129,7 @@ import {
uploadWageCardAPI, uploadWageCardAPI,
getContractDetailAPI, getContractDetailAPI,
} from '@/api/construction-person/red-green-light-mange/wage-card-witness' } from '@/api/construction-person/red-green-light-mange/wage-card-witness'
import { updatePersonLightStatusAPI } from '@/api/construction-person/entry-and-exit-manage/person-entry' import { updatePersonWageLightStatusAPI } from '@/api/construction-person/entry-and-exit-manage/person-entry'
export default { export default {
name: 'AddOrEditForm', name: 'AddOrEditForm',
props: { props: {
@ -150,6 +150,10 @@ export default {
type: [String, Number], type: [String, Number],
default: '', // id default: '', // id
}, },
proId: {
type: [String, Number],
default: '', // id
},
}, },
components: { components: {
UploadImg, UploadImg,
@ -356,9 +360,11 @@ export default {
this.$modal.msgSuccess('工资卡信息上传成功') this.$modal.msgSuccess('工资卡信息上传成功')
// 绿 // 绿
const result = await updatePersonLightStatusAPI( const result =
this.workerId, await updatePersonWageLightStatusAPI({
) workerId: this.workerId,
// proId: this.proId,
})
console.log(result, 'result红绿灯状态更新结果') console.log(result, 'result红绿灯状态更新结果')
resolve() resolve()
@ -413,8 +419,14 @@ export default {
) )
if (res && Object.keys(res).length > 0) { if (res && Object.keys(res).length > 0) {
const { id, files, bankName, bankCardCode, bankBranchName, bankIdentifierCode } = const {
res id,
files,
bankName,
bankCardCode,
bankBranchName,
bankIdentifierCode,
} = res
this.salaryCardInfoForm = { this.salaryCardInfoForm = {
id, id,

View File

@ -496,6 +496,7 @@ export default {
// //
const { data: result } = await getWorkerAttendanceAPI({ const { data: result } = await getWorkerAttendanceAPI({
id: this.workerId, id: this.workerId,
proId: this.proId,
}) })
this.lightDetails = result this.lightDetails = result