bug修复

This commit is contained in:
BianLzhaoMin 2025-09-05 14:45:06 +08:00
parent 461b6cb5f6
commit 8d011e88c8
19 changed files with 263 additions and 59 deletions

View File

@ -49,6 +49,7 @@
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",
"lodash": "^4.17.21",
"nprogress": "0.2.0",
"quill": "1.3.7",
"screenfull": "5.0.2",

View File

@ -13,6 +13,10 @@
<span class="legend-mark not-in-range"></span>
<span>补卡</span>
</div>
<div class="legend-item">
<span class="legend-mark inactive-no-att"></span>
<span>不在场</span>
</div>
</div>
<!-- 循环展示每个月份的日历 -->
<div
@ -43,17 +47,17 @@
<div
:key="day.dayIndex"
class="calendar-day current-month"
:class="getDayClass(day)"
class="calendar-day current-month"
v-for="day in monthData.currentMonthDays"
>
<span class="day-number">{{ day.dayIndex }}</span>
</div>
<div
:key="'empty-end-' + i"
class="calendar-day empty"
v-for="(empty, i) in monthData.emptyEndDays"
:key="'empty-end-' + i"
>
</div>
</div>
@ -231,9 +235,15 @@ export default {
//
getDayClass(day) {
if (!day.isRepair && day.isAtt === 0) return 'inactive'
if (day.isRepair && day.isAtt === 1) return 'active'
if (!day.isRepair) return 'is-no-att'
switch (day.isAtt) {
case 0:
return 'inactive'
case 1:
return 'active'
case 2:
return 'active-repair'
}
return 'is-no-att'
},
},
@ -352,6 +362,17 @@ export default {
color: #000;
}
/* 已补卡样式 */
.active-repair {
background-color: #ff9900;
color: #000;
}
/* 不在场样式 */
.inactive-no-att {
background-color: #999;
color: #000;
}
.day-number {
z-index: 1;
}
@ -402,6 +423,6 @@ export default {
}
.is-no-att {
background-color: #999;
background-color: #999 !important;
}
</style>

View File

@ -26,6 +26,13 @@ const isProduction = process.env.VUE_APP_ENV === 'production'
// }
let downloadLoadingInstance
console.log(
decryptWithSM4(
'bdd931fb1f0780a8f9311c56cf6963ba94542b39961cf4c746e9f5a1a6918ffc3a5cfda6a0c8edca82ac663703a9a318',
),
'isProduction-----****-----',
)
// 是否显示重新登录
export let isRelogin = { show: false }

View File

@ -93,6 +93,13 @@
>
已考勤
</el-tag>
<el-tag
size="mini"
type="success"
v-if="row['isAtt'] == 2"
>
已补卡
</el-tag>
<el-tag
size="mini"
type="info"
@ -137,6 +144,10 @@ export default {
type: [String, Number],
default: '',
},
timeRangeNew: {
type: Array,
default: [],
},
},
data() {
return {
@ -260,6 +271,16 @@ export default {
created() {
this.getAttendanceDetailsListData()
},
watch: {
timeRangeNew: {
handler(newVal) {
this.timeRange = newVal
},
deep: true,
immediate: true,
},
},
}
</script>

View File

@ -54,6 +54,7 @@
:teamId="teamId"
:workerId="workerId"
:idNumber="idNumber"
:timeRangeNew="timeRange"
/>
</template>
</DialogModel>
@ -99,6 +100,10 @@ export default {
getPersonListAPI,
idNumber: '',
workerId: '',
timeRange: [
new Date().toISOString().split('T')[0],
new Date().toISOString().split('T')[0],
],
slots: ['attNum', 'notAttNum'],
}
},
@ -121,6 +126,10 @@ export default {
//
onHandleCheckPerson(data) {
this.timeRange = [
this.$refs.personTableRef.queryParams.startDate,
this.$refs.personTableRef.queryParams.endDate,
]
this.idNumber = data.idNumber
this.workerId = data.workerId
this.personDialogConfig.outerVisible = true

View File

@ -35,9 +35,17 @@
<template slot="teamEinStatus" slot-scope="{ data }">
<el-tag
size="mini"
:type="data.teamEinStatus == 1 ? 'danger' : 'success'"
type="success"
v-if="data.teamEinStatus == 1"
>
{{ data.teamEinStatus == 1 ? '出场' : '在场' }}
在场
</el-tag>
<el-tag
size="mini"
type="danger"
v-if="data.teamEinStatus == 2"
>
出场
</el-tag>
</template>

View File

@ -50,7 +50,7 @@
<el-button
size="mini"
type="text"
@click="onHandleEdit(scope.row)"
@click="onHandleEdit(scope.row, scope.$index)"
>
修改
</el-button>
@ -144,10 +144,12 @@
<template slot="outerContent">
<SelectPersonAndDate
:editRow="editRow"
:editIndex="editIndex"
ref="selectPersonAndDateRef"
@onPersonSubmit="onPersonSubmit"
:selectProjectId="selectProjectId"
:selectProjectName="selectProjectName"
:selectedPersonIdList="selectedPersonIdList"
/>
<el-row class="dialog-footer-btn">
@ -176,6 +178,7 @@ import {
editCardReplacementApplyAPI,
} from '@/api/construction-person/attendance-manage/card-replacement-apply'
import { getCardReplacementAuditDetailAPI } from '@/api/construction-person/attendance-manage/card-replacement-audit'
import debounce from 'lodash/debounce'
export default {
name: 'AddApplyForm',
props: {
@ -201,6 +204,7 @@ export default {
SelectPersonAndDate,
UploadFileFormData,
},
data() {
return {
addApplyForm: {
@ -226,13 +230,16 @@ export default {
},
editRow: {}, //
editIndex: -1, //
editUploadFileList: [], //
isAdd: true,
}
},
methods: {
handleSelectPerson() {
this.editRow = {}
this.editIndex = -1
this.dialogConfig.outerTitle = '新增补卡人员以及补卡日期'
this.dialogConfig.outerVisible = true
},
@ -247,19 +254,31 @@ export default {
},
//
onPersonSubmit(val) {
onPersonSubmit(val, index) {
console.log(val, index, 'val, index')
//
if (val && val.length > 0) {
val.forEach((item) => {
console.log(item, 'item----')
this.tableData.push(item)
if (index !== -1) {
this.$set(
this.tableData,
index,
JSON.parse(JSON.stringify(item)),
)
} else {
this.tableData.push(item)
}
})
}
console.log(this.tableData, 'this.tableData')
},
//
onHandleEdit(row) {
onHandleEdit(row, index) {
this.editRow = row
this.editIndex = index
this.dialogConfig.outerTitle = '修改补卡人员以及补卡日期'
this.dialogConfig.outerVisible = true
},
@ -384,6 +403,13 @@ export default {
},
},
computed: {
// ID
selectedPersonIdList() {
return this.tableData.map((e) => e.workerId)
},
},
watch: {
queryDetailsId: {
handler(newVal) {

View File

@ -169,6 +169,7 @@ import {
getCardReplacementApplyListAPI,
} from '@/api/construction-person/attendance-manage/card-replacement-apply'
import { getLotProjectSelectListCommonFun } from '@/utils/getCommonData'
import debounce from 'lodash/debounce'
export default {
name: 'CardReplacementApply',
components: {
@ -260,7 +261,7 @@ export default {
},
//
async onHandleConfirmFinish() {
onHandleConfirmFinish: debounce(async () => {
try {
await this.$refs.addApplyFormRef.onHandleConfirmFinishFun()
this.handleCloseDialogOuter()
@ -268,7 +269,7 @@ export default {
} catch (error) {
// console.log('', error)
}
},
}, 1500),
//
onHandleNextStep() {

View File

@ -4,7 +4,7 @@
<el-form :model="queryPersonForm" :inline="true" size="mini">
<el-form-item prop="reason">
<el-select
style="width: 100%"
style="width: 360px"
placeholder="请选择人员"
@change="onChangePerson"
v-model="queryPersonForm.selectPersonId"
@ -91,18 +91,24 @@
? '#19be6b'
: '#f56c6c'
: '#999',
cursor:
item.isActive == 0 && item.inRange
? 'pointer'
: 'default',
}"
:class="{
'item-active': item.isChecked && item.isActive === 0,
}"
@click="handleItemClick(item)"
>
{{ item.date }}
<el-checkbox
class="check-box-item"
v-model="item.isChecked"
v-if="item.isActive == 0 && item.inRange"
/>
<div @click.stop class="check-box-item">
<el-checkbox
v-model="item.isChecked"
v-if="item.isActive == 0 && item.inRange"
/>
</div>
</div>
</div>
</div>
@ -130,6 +136,14 @@ export default {
type: Object,
default: () => {},
},
editIndex: {
type: Number,
default: () => -1,
},
selectedPersonIdList: {
type: Array,
default: () => [],
},
},
components: {
// AttendanceCalendar,
@ -147,7 +161,9 @@ export default {
name: '',
idNumber: '',
workerId: '',
teamId: '',
initHeight: 0,
currentEditIndex: -1,
//
dateList: [],
//
@ -190,8 +206,8 @@ export default {
})
this.personOptions = res.map((item) => ({
...item,
value: item.id,
label: item.name,
value: item.id + '-' + item.teamId,
label: `${item.name}(${item.teamName})`,
}))
},
//
@ -213,12 +229,19 @@ export default {
const tempList = this.cardReplacementDateList.filter(
(item) => item.isChecked,
)
console.log(tempList, 'tempList')
if (tempList.length > 0) {
const repairDate = tempList.map((item) => item.currentDate)
this.dateList[0].repairDate = repairDate.join(',')
this.dateList[0].repairDay = repairDate.length
this.$emit('onPersonSubmit', this.dateList)
this.$emit(
'onPersonSubmit',
this.dateList,
this.currentEditIndex,
)
}
},
@ -230,6 +253,7 @@ export default {
const { data: res } = await getCardReplacementPersonCheckRecordAPI({
workerId: this.workerId,
proId: this.selectProjectId,
teamId: this.teamId,
startTime: this.queryPersonForm.time[0],
endTime: this.queryPersonForm.time[1],
})
@ -279,15 +303,19 @@ export default {
return
}
if (this.selectedPersonIdList.includes(val.split('-')[0] * 1)) {
this.$modal.msgError('该人员已选择过,请重新选择')
this.queryPersonForm.selectPersonId = ''
return
}
const personInfo = this.personOptions.find(
(item) => item.value === val,
)
console.log(personInfo, 'personInfo')
const { name, idNumber, phone, teamName, id, teamId } = personInfo
this.workerId = id
this.teamId = teamId
this.dateList = []
this.dateList.push({
teamName, //
@ -303,6 +331,11 @@ export default {
})
},
//
handleItemClick(item) {
item.isChecked = !item.isChecked
},
getInitHeight() {
const item = this.$refs[`item0`][0]
if (item) {
@ -318,12 +351,25 @@ export default {
watch: {
editRow: {
handler(newVal) {
console.log(newVal, 'newVal--**---')
if (Object.keys(newVal).length > 0) {
const { workerId, idNumber, name, repairDate } = newVal
this.queryPersonForm.selectPersonId = workerId
const {
workerId,
idNumber,
name,
repairDate,
teamId,
teamName,
phone,
proName,
proId,
} = newVal
this.queryPersonForm.selectPersonId =
workerId + '-' + teamId
this.workerId = workerId
this.idNumber = idNumber
this.name = name
this.teamId = teamId
const repairDateList = repairDate.split(',')
this.editRepairDateList = repairDateList
@ -331,12 +377,36 @@ export default {
repairDateList[0],
repairDateList[repairDateList.length - 1],
]
this.dateList = []
this.dateList.push({
teamName, //
name, //
phone, //
idNumber, //
repairDay: '', //
repairDate: '', //
workerId, // id
teamId, // id
proName, //
proId, // id
})
this.getCardReplacementPersonCheckRecord()
}
},
deep: true,
immediate: true,
},
editIndex: {
handler(newVal) {
this.currentEditIndex = newVal
console.log(this.currentEditIndex, 'this.currentEditIndex')
},
deep: true,
immediate: true,
},
},
}
</script>

View File

@ -110,6 +110,7 @@
<DialogModel
:dialogConfig="dialogConfig"
v-if="dialogConfig.outerVisible"
@closeDialogOuter="handleCloseDialogOuter"
>
<template slot="outerContent">
@ -215,7 +216,8 @@ export default {
//
onHandleEdit(row) {
console.log(row)
debugger
console.log(row, '88965523')
this.editRow = row
this.dialogConfig.outerTitle = '修改补卡人员以及补卡日期'
this.dialogConfig.outerVisible = true

View File

@ -4,7 +4,7 @@
<el-form :model="queryPersonForm" :inline="true" size="mini">
<el-form-item prop="reason">
<el-select
style="width: 100%"
style="width: 360px"
placeholder="请选择人员"
@change="onChangePerson"
v-model="queryPersonForm.selectPersonId"
@ -164,11 +164,14 @@ export default {
const { data: res } = await getCardReplacementPersonListAPI({
proId: this.selectProjectId,
})
this.personOptions = res.map((item) => ({
...item,
value: item.id,
label: item.name,
value: item.id + '-' + item.teamId,
label: `${item.name}(${item.teamName})`,
}))
console.log(this.personOptions, 'this.personOptions')
},
//
handleQuery() {
@ -292,6 +295,7 @@ export default {
watch: {
editRow: {
handler(newVal) {
console.log(newVal, 'newVal--**---')
if (Object.keys(newVal).length > 0) {
const { workerId, idNumber, name, repairDate } = newVal
this.queryPersonForm.selectPersonId = workerId
@ -309,7 +313,7 @@ export default {
}
},
deep: true,
immediate: true,
// immediate: true,
},
},
}

View File

@ -165,6 +165,8 @@ import {
getPostTypeSelectListCommonFun,
getLotProjectSelectListCommonFun,
} from '@/utils/getCommonData'
import debounce from 'lodash/debounce'
export default {
name: 'PersonEntry',
components: {
@ -242,7 +244,7 @@ export default {
},
//
async onHandleConfirmAddOrEdit() {
onHandleConfirmAddOrEdit: debounce(async () => {
try {
await this.$refs.addOrEditFormContentRef.onHandleConfirmAddOrEditFun()
this.$refs.personEntryTableRef.getTableList()
@ -250,11 +252,12 @@ export default {
} catch (error) {
// console.log('', error)
}
},
}, 1000),
//
handleCloseDialogOuter() {
// this.$refs.addOrEditFormContentRef.resetForm()
this.importFileList = []
this.dialogConfig.outerVisible = false
},
@ -269,7 +272,15 @@ export default {
//
async onHandleDownloadTemplate() {
window.open(window.origin + '/hd-realname' + '/人员入场-模版.xlsx')
//
if (process.env.VUE_APP_ENV === 'production') {
window.open(
window.origin + '/hd-realname' + '/人员入场-模版.xlsx',
)
} else {
window.open(window.origin + '/人员入场-模版.xlsx')
}
// window.open(window.origin + '/hd-realname' + '/-.xlsx')
// this.download(
// '/bmw/download/workerEinTemplate',
// {},
@ -308,6 +319,7 @@ export default {
},
)
.then(async () => {
this.importFileList = []
this.dialogConfig.outerVisible = false
})
.catch(() => {

View File

@ -186,7 +186,8 @@ export default {
const res = await uploadExitFileAPI(formData)
if (res.code === 200) {
this.$modal.msgSuccess('上传成功')
// this.$modal.msgSuccess('')
this.$modal.msgSuccess(res.msg)
resolve()
} else {
this.$modal.msgError(res.msg)

View File

@ -370,19 +370,26 @@ export default {
formData.append('fileMsg', JSON.stringify(filesList))
try {
const res = await uploadContractAPI(formData)
if (res.code === 200) {
this.$modal.msgSuccess('合同上传成功')
// 绿
const result = await updatePersonLightStatusAPI(
this.workerId,
)
console.log(result, 'result红绿灯状态更新结果')
resolve()
} else {
this.$modal.msgError(res.msg)
reject()
}
// const res = await uploadContractAPI(formData)
uploadContractAPI(formData).then(async (res) => {
if (res.code === 200) {
this.$modal.msgSuccess('合同上传成功')
resolve()
// 绿
const result =
await updatePersonLightStatusAPI(
this.workerId,
)
console.log(
result,
'result红绿灯状态更新结果',
)
} else {
this.$modal.msgError(res.msg)
reject()
}
})
} catch (err) {
this.$modal.msgError('合同上传失败,请重试')
reject(err)

View File

@ -60,6 +60,7 @@
size="mini"
type="primary"
icon="el-icon-upload"
v-if="data.einStatus == 1"
v-hasPermi="['worker:contract:edit']"
@click="onHandleUploadContract(data)"
>
@ -132,6 +133,8 @@ import {
getTeamSelectListCommonFun,
getLotProjectSelectListCommonFun,
} from '@/utils/getCommonData'
import debounce from 'lodash/debounce'
export default {
name: 'ContractWitness',
components: {
@ -230,7 +233,7 @@ export default {
},
//
async onHandleConfirmAddOrEdit() {
onHandleConfirmAddOrEdit: debounce(async () => {
try {
const res =
await this.$refs.uploadContractContentRef.onHandleConfirmAddOrEditFun()
@ -241,7 +244,7 @@ export default {
} catch (error) {
// console.log('', error)
}
},
}, 1000),
//
handleCloseDialogOuter() {

View File

@ -411,7 +411,14 @@ export default {
//
async onHandleDownloadTemplate() {
window.open(window.origin + '/hd-realname' + '/失信人员-模板.xlsx')
//
if (process.env.VUE_APP_ENV === 'production') {
window.open(
window.origin + '/hd-realname' + '/失信人员-模板.xlsx',
)
} else {
window.open(window.origin + '/失信人员-模板.xlsx')
}
// this.download(
// '/bmw/download/workerEinTemplate',
// {},
@ -440,6 +447,7 @@ export default {
//
handleCloseDialogOuter() {
this.importFileList = []
this.dialogConfig.outerVisible = false
},
@ -502,6 +510,7 @@ export default {
},
)
.then(async () => {
this.importFileList = []
this.dialogConfig.outerVisible = false
})
.catch(() => {

View File

@ -112,6 +112,7 @@ import {
getPersonWageCardListAPI,
getWageCarDetailLookFileAPI,
} from '@/api/construction-person/red-green-light-mange/wage-card-witness'
import debounce from 'lodash/debounce'
export default {
name: 'WageCardWitness',
components: {
@ -189,7 +190,7 @@ export default {
},
//
async onHandleConfirmAddOrEdit() {
onHandleConfirmAddOrEdit: debounce(async () => {
try {
const res =
await this.$refs.uploadContractContentRef.onHandleConfirmAddOrEditFun()
@ -201,7 +202,7 @@ export default {
} catch (error) {
// console.log('', error)
}
},
}, 1000),
//
handleCloseDialogOuter() {

View File

@ -225,6 +225,9 @@ export default {
mailNum,
}
this.pieOneConfig.data = []
this.pieTwoConfig.data = []
this.pieOneConfig.data = postMsg.map((item) => {
return {
name: item.key,

View File

@ -111,16 +111,14 @@ export default {
methods: {
async getProjectInfo() {
const { data: res } = await getProjectInfoAPI({
companyId: this.selectCompany,
subComId: this.selectCompany,
})
const {
buildProNum,
prepareProNum,
stopProNum,
completeProNum,
legacyProNum,
proByProStatus,
proByVolLevel,
} = res