This commit is contained in:
parent
126504f14f
commit
c5456955c9
|
|
@ -117,6 +117,7 @@
|
||||||
ref="personExitFormRef"
|
ref="personExitFormRef"
|
||||||
:exitFormData="exitFormData"
|
:exitFormData="exitFormData"
|
||||||
:isExitUpload="isExitUpload"
|
:isExitUpload="isExitUpload"
|
||||||
|
:isShanghai="isShanghai"
|
||||||
v-if="dialogConfig.outerTitle === '人员出场'"
|
v-if="dialogConfig.outerTitle === '人员出场'"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -187,6 +188,7 @@ export default {
|
||||||
exitFormData: {},
|
exitFormData: {},
|
||||||
queryDetailsId: '',
|
queryDetailsId: '',
|
||||||
isExitUpload: 1, // 是否出场后上传文件 1:是 2:否
|
isExitUpload: 1, // 是否出场后上传文件 1:是 2:否
|
||||||
|
isShanghai: 0, // 是否是上海工程
|
||||||
getExitPersonListAPI,
|
getExitPersonListAPI,
|
||||||
|
|
||||||
slots: {
|
slots: {
|
||||||
|
|
@ -241,6 +243,7 @@ export default {
|
||||||
// 人员出场
|
// 人员出场
|
||||||
onHandlePersonExit(data, type) {
|
onHandlePersonExit(data, type) {
|
||||||
this.isExitUpload = type
|
this.isExitUpload = type
|
||||||
|
this.isShanghai = data.isShanghai
|
||||||
const {
|
const {
|
||||||
name,
|
name,
|
||||||
id,
|
id,
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,13 @@ export default {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 1,
|
default: 1,
|
||||||
},
|
},
|
||||||
|
// 是否是上海工程
|
||||||
|
isShanghai: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
personExitFormData: {
|
personExitFormData: {
|
||||||
|
|
@ -116,7 +122,9 @@ export default {
|
||||||
fileList: [
|
fileList: [
|
||||||
{
|
{
|
||||||
trigger: 'change,blur',
|
trigger: 'change,blur',
|
||||||
required: this.isExitUpload === 2,
|
required:
|
||||||
|
this.isExitUpload === 2 ||
|
||||||
|
(this.isExitUpload !== 2 && this.isShanghai == 1),
|
||||||
message: '请上传离场工资结算确认单',
|
message: '请上传离场工资结算确认单',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -128,40 +136,50 @@ export default {
|
||||||
onHandleConfirmAddOrEditFun() {
|
onHandleConfirmAddOrEditFun() {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
if (this.isExitUpload === 1) {
|
if (this.isExitUpload === 1) {
|
||||||
const { id, workerId, fileList, proId, subId, teamId } =
|
this.$refs.personExitFormRef.validate(async (valid) => {
|
||||||
this.personExitFormData
|
if (valid) {
|
||||||
const params = {
|
const {
|
||||||
id,
|
id,
|
||||||
proId,
|
workerId,
|
||||||
workerId,
|
fileList,
|
||||||
subId,
|
proId,
|
||||||
teamId,
|
subId,
|
||||||
exitWay: '后端',
|
teamId,
|
||||||
}
|
} = this.personExitFormData
|
||||||
const fileMsg = []
|
const params = {
|
||||||
const formData = new FormData()
|
id,
|
||||||
|
proId,
|
||||||
|
workerId,
|
||||||
|
subId,
|
||||||
|
teamId,
|
||||||
|
exitWay: '后端',
|
||||||
|
}
|
||||||
|
const fileMsg = []
|
||||||
|
const formData = new FormData()
|
||||||
|
|
||||||
if (fileList.length > 0) {
|
if (fileList.length > 0) {
|
||||||
fileList.forEach((e) => {
|
fileList.forEach((e) => {
|
||||||
formData.append('files', e.raw)
|
formData.append('files', e.raw)
|
||||||
fileMsg.push({
|
fileMsg.push({
|
||||||
name: '工资结算确认单',
|
name: '工资结算确认单',
|
||||||
type: 1,
|
type: 1,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
formData.append('params', JSON.stringify(params))
|
formData.append('params', JSON.stringify(params))
|
||||||
formData.append('fileMsg', JSON.stringify(fileMsg))
|
formData.append('fileMsg', JSON.stringify(fileMsg))
|
||||||
const res = await addEntryPersonAPI(formData)
|
const res = await addEntryPersonAPI(formData)
|
||||||
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess('出场成功')
|
this.$modal.msgSuccess('出场成功')
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
reject(new Error(res.msg))
|
reject(new Error(res.msg))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$refs.personExitFormRef.validate(async (valid) => {
|
this.$refs.personExitFormRef.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
|
||||||
|
|
@ -75,13 +75,19 @@
|
||||||
<span
|
<span
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color:
|
||||||
row.attStatus == 0
|
row.attStatus == 1 ||
|
||||||
? '#ef4444'
|
(row.attStatus == 0 &&
|
||||||
: '#10b981',
|
row.isRepair == 1)
|
||||||
|
? '#10b981'
|
||||||
|
: '#ef4444',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
row.attStatus == 0 ? '未打卡' : '已打卡'
|
row.attStatus == 1 ||
|
||||||
|
(row.attStatus == 0 &&
|
||||||
|
row.isRepair == 1)
|
||||||
|
? '已打卡'
|
||||||
|
: '未打卡'
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
<div class="data-item">
|
<div class="data-item">
|
||||||
<div class="data-label">累计补卡天数(人次)</div>
|
<div class="data-label">累计补卡天数(人次)</div>
|
||||||
<div class="data-value">
|
<div class="data-value">
|
||||||
{{ attendanceData.proRepairNum || 0 }}
|
{{ attendanceData.repairNumHis || 0 }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue