This commit is contained in:
BianLzhaoMin 2025-10-21 10:55:24 +08:00
parent 126504f14f
commit c5456955c9
4 changed files with 64 additions and 37 deletions

View File

@ -117,6 +117,7 @@
ref="personExitFormRef"
:exitFormData="exitFormData"
:isExitUpload="isExitUpload"
:isShanghai="isShanghai"
v-if="dialogConfig.outerTitle === '人员出场'"
/>
@ -187,6 +188,7 @@ export default {
exitFormData: {},
queryDetailsId: '',
isExitUpload: 1, // 1: 2:
isShanghai: 0, //
getExitPersonListAPI,
slots: {
@ -241,6 +243,7 @@ export default {
//
onHandlePersonExit(data, type) {
this.isExitUpload = type
this.isShanghai = data.isShanghai
const {
name,
id,

View File

@ -100,7 +100,13 @@ export default {
type: Number,
default: 1,
},
//
isShanghai: {
type: [Number, String],
default: 0,
},
},
data() {
return {
personExitFormData: {
@ -116,7 +122,9 @@ export default {
fileList: [
{
trigger: 'change,blur',
required: this.isExitUpload === 2,
required:
this.isExitUpload === 2 ||
(this.isExitUpload !== 2 && this.isShanghai == 1),
message: '请上传离场工资结算确认单',
},
],
@ -128,40 +136,50 @@ export default {
onHandleConfirmAddOrEditFun() {
return new Promise(async (resolve, reject) => {
if (this.isExitUpload === 1) {
const { id, workerId, fileList, proId, subId, teamId } =
this.personExitFormData
const params = {
id,
proId,
workerId,
subId,
teamId,
exitWay: '后端',
}
const fileMsg = []
const formData = new FormData()
this.$refs.personExitFormRef.validate(async (valid) => {
if (valid) {
const {
id,
workerId,
fileList,
proId,
subId,
teamId,
} = this.personExitFormData
const params = {
id,
proId,
workerId,
subId,
teamId,
exitWay: '后端',
}
const fileMsg = []
const formData = new FormData()
if (fileList.length > 0) {
fileList.forEach((e) => {
formData.append('files', e.raw)
fileMsg.push({
name: '工资结算确认单',
type: 1,
})
})
}
if (fileList.length > 0) {
fileList.forEach((e) => {
formData.append('files', e.raw)
fileMsg.push({
name: '工资结算确认单',
type: 1,
})
})
}
formData.append('params', JSON.stringify(params))
formData.append('fileMsg', JSON.stringify(fileMsg))
const res = await addEntryPersonAPI(formData)
formData.append('params', JSON.stringify(params))
formData.append('fileMsg', JSON.stringify(fileMsg))
const res = await addEntryPersonAPI(formData)
if (res.code === 200) {
this.$modal.msgSuccess('出场成功')
resolve()
} else {
this.$modal.msgError(res.msg)
reject(new Error(res.msg))
}
if (res.code === 200) {
this.$modal.msgSuccess('出场成功')
resolve()
} else {
this.$modal.msgError(res.msg)
reject(new Error(res.msg))
}
}
})
} else {
this.$refs.personExitFormRef.validate(async (valid) => {
if (valid) {

View File

@ -75,13 +75,19 @@
<span
:style="{
color:
row.attStatus == 0
? '#ef4444'
: '#10b981',
row.attStatus == 1 ||
(row.attStatus == 0 &&
row.isRepair == 1)
? '#10b981'
: '#ef4444',
}"
>
{{
row.attStatus == 0 ? '未打卡' : '已打卡'
row.attStatus == 1 ||
(row.attStatus == 0 &&
row.isRepair == 1)
? '已打卡'
: '未打卡'
}}
</span>
</template>

View File

@ -123,7 +123,7 @@
<div class="data-item">
<div class="data-label">累计补卡天数(人次)</div>
<div class="data-value">
{{ attendanceData.proRepairNum || 0 }}
{{ attendanceData.repairNumHis || 0 }}
</div>
</div>
</div>