This commit is contained in:
parent
ed9a002698
commit
b014727a2c
|
|
@ -54,10 +54,19 @@ export const importEntryPersonAPI = (data) => {
|
|||
}
|
||||
|
||||
// 修改人员的红绿灯状态
|
||||
export const updatePersonLightStatusAPI = (id) => {
|
||||
export const updatePersonLightStatusAPI = (data) => {
|
||||
return request({
|
||||
url: `/bmw/workerWageCard/light/${id}`,
|
||||
url: `/bmw/workerWageCard/light`,
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 修改人员的红绿灯状态(工资卡见证中更新使用)
|
||||
export const updatePersonWageLightStatusAPI = (data) => {
|
||||
return request({
|
||||
url: `/bmw/workerWageCard/wageLight`,
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1356,11 +1356,17 @@ export default {
|
|||
// 更新一下红绿灯状态
|
||||
const result =
|
||||
await updatePersonLightStatusAPI(
|
||||
this
|
||||
.queryDetailsId
|
||||
? this
|
||||
.queryDetailsId
|
||||
: res.data,
|
||||
{
|
||||
workerId:
|
||||
this
|
||||
.queryDetailsId
|
||||
? this
|
||||
.queryDetailsId
|
||||
: res.data,
|
||||
|
||||
proId: this
|
||||
.proId,
|
||||
},
|
||||
)
|
||||
console.log(
|
||||
result,
|
||||
|
|
|
|||
|
|
@ -751,11 +751,53 @@ export default {
|
|||
const status = this.checkFormStatus()
|
||||
const filesList = []
|
||||
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 = {
|
||||
...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') {
|
||||
this.$modal.msgError(
|
||||
'请完善合同见证中的必填信息(除附件外)后再提交',
|
||||
|
|
@ -780,13 +822,21 @@ export default {
|
|||
const res = await addShanghaiProEinAPI(formData)
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
|
||||
this.contractImageList.forEach((item) => {
|
||||
item.fileList = []
|
||||
})
|
||||
|
||||
resolve(true)
|
||||
await updatePersonLightStatusAPI(this.workerId)
|
||||
await updatePersonLightStatusAPI({
|
||||
workerId: this.workerId,
|
||||
proId: this.addEntryProjectForm.proId,
|
||||
})
|
||||
} else {
|
||||
reject(false)
|
||||
}
|
||||
} catch (err) {
|
||||
this.$modal.msgError('合同上传失败,请重试')
|
||||
// this.$modal.msgError('合同上传失败,请重试')
|
||||
reject(err)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -115,6 +115,10 @@ export default {
|
|||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
proId: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -151,6 +155,7 @@ export default {
|
|||
async getContractDetailList() {
|
||||
const { rows: res } = await getContractDetailListAPI({
|
||||
workerId: this.workerId,
|
||||
proId: this.proId,
|
||||
})
|
||||
this.detailsList = res
|
||||
},
|
||||
|
|
|
|||
|
|
@ -167,6 +167,10 @@ export default {
|
|||
type: [String, Number],
|
||||
default: '', // 人员id
|
||||
},
|
||||
proId: {
|
||||
type: [String, Number],
|
||||
default: '', // 标段工程id
|
||||
},
|
||||
},
|
||||
components: {
|
||||
UploadImg,
|
||||
|
|
@ -335,6 +339,7 @@ export default {
|
|||
const status = this.checkFormStatus()
|
||||
let params = {
|
||||
...this.contractInfoForm,
|
||||
proId: this.proId,
|
||||
workerId: this.workerId,
|
||||
}
|
||||
const filesList = []
|
||||
|
|
@ -387,9 +392,10 @@ export default {
|
|||
resolve()
|
||||
// 更新一下红绿灯状态
|
||||
const result =
|
||||
await updatePersonLightStatusAPI(
|
||||
this.workerId,
|
||||
)
|
||||
await updatePersonLightStatusAPI({
|
||||
workerId: this.workerId,
|
||||
proId: this.proId,
|
||||
})
|
||||
console.log(
|
||||
result,
|
||||
'result红绿灯状态更新结果',
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@
|
|||
:formType="formType"
|
||||
:workerId="workerId"
|
||||
:einStatus="einStatus"
|
||||
:proId="proId"
|
||||
ref="uploadContractContentRef"
|
||||
:queryDetailsId="queryDetailsId"
|
||||
/>
|
||||
|
|
@ -104,7 +105,7 @@
|
|||
</template>
|
||||
|
||||
<template v-if="dialogConfig.outerTitle === '历史合同见证详情'">
|
||||
<ContractDetailsList :workerId="workerId" />
|
||||
<ContractDetailsList :workerId="workerId" :proId="proId" />
|
||||
</template>
|
||||
|
||||
<template v-if="dialogConfig.outerTitle === '合同图片详情'">
|
||||
|
|
@ -157,6 +158,7 @@ export default {
|
|||
einStatus: 1, // 在场状态
|
||||
formType: 1, // 表单类型
|
||||
workerId: '', // 人员id
|
||||
proId: '', // 标段工程id
|
||||
|
||||
slots: {
|
||||
businessLicense: 'businessLicense',
|
||||
|
|
@ -184,6 +186,7 @@ export default {
|
|||
// 上传按钮点击
|
||||
onHandleUploadContract(data) {
|
||||
this.queryDetailsId = data.id
|
||||
this.proId = data.proId
|
||||
if (data.isSign == 1) {
|
||||
this.$confirm(
|
||||
'当前已上传合同信息,是否要重新上传,重新上传将会覆盖原数据?',
|
||||
|
|
@ -216,6 +219,7 @@ export default {
|
|||
onHandleViewContractDetailsList(data) {
|
||||
this.dialogConfig.outerTitle = '历史合同见证详情'
|
||||
this.workerId = data.workerId
|
||||
this.proId = data.proId
|
||||
this.dialogConfig.outerWidth = '80%'
|
||||
this.dialogConfig.minHeight = '80vh'
|
||||
this.dialogConfig.maxHeight = '80vh'
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
<WageCardUpload
|
||||
:formType="formType"
|
||||
:workerId="workerId"
|
||||
:proId="proId"
|
||||
:einStatus="einStatus"
|
||||
ref="uploadContractContentRef"
|
||||
:queryDetailsId="queryDetailsId"
|
||||
|
|
@ -138,6 +139,7 @@ export default {
|
|||
formType: 1, // 表单类型
|
||||
workerId: '', // 人员id
|
||||
contractImgList: [], // 合同图片列表
|
||||
proId: '', // 标段工程id
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -179,6 +181,8 @@ export default {
|
|||
this.queryDetailsId = ''
|
||||
this.dialogConfig.outerVisible = true
|
||||
}
|
||||
|
||||
this.proId = data.proId
|
||||
},
|
||||
|
||||
// 查看合同图片详情
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
]"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -129,7 +129,7 @@ import {
|
|||
uploadWageCardAPI,
|
||||
getContractDetailAPI,
|
||||
} 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 {
|
||||
name: 'AddOrEditForm',
|
||||
props: {
|
||||
|
|
@ -150,6 +150,10 @@ export default {
|
|||
type: [String, Number],
|
||||
default: '', // 人员id
|
||||
},
|
||||
proId: {
|
||||
type: [String, Number],
|
||||
default: '', // 标段工程id
|
||||
},
|
||||
},
|
||||
components: {
|
||||
UploadImg,
|
||||
|
|
@ -356,9 +360,11 @@ export default {
|
|||
this.$modal.msgSuccess('工资卡信息上传成功')
|
||||
|
||||
// 更新一下红绿灯状态
|
||||
const result = await updatePersonLightStatusAPI(
|
||||
this.workerId,
|
||||
)
|
||||
const result =
|
||||
await updatePersonWageLightStatusAPI({
|
||||
workerId: this.workerId,
|
||||
// proId: this.proId,
|
||||
})
|
||||
console.log(result, 'result红绿灯状态更新结果')
|
||||
|
||||
resolve()
|
||||
|
|
@ -413,8 +419,14 @@ export default {
|
|||
)
|
||||
|
||||
if (res && Object.keys(res).length > 0) {
|
||||
const { id, files, bankName, bankCardCode, bankBranchName, bankIdentifierCode } =
|
||||
res
|
||||
const {
|
||||
id,
|
||||
files,
|
||||
bankName,
|
||||
bankCardCode,
|
||||
bankBranchName,
|
||||
bankIdentifierCode,
|
||||
} = res
|
||||
|
||||
this.salaryCardInfoForm = {
|
||||
id,
|
||||
|
|
|
|||
|
|
@ -496,6 +496,7 @@ export default {
|
|||
// 状态信息
|
||||
const { data: result } = await getWorkerAttendanceAPI({
|
||||
id: this.workerId,
|
||||
proId: this.proId,
|
||||
})
|
||||
|
||||
this.lightDetails = result
|
||||
|
|
|
|||
Loading…
Reference in New Issue