bug修复
This commit is contained in:
parent
461b6cb5f6
commit
8d011e88c8
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,13 @@ const isProduction = process.env.VUE_APP_ENV === 'production'
|
|||
// }
|
||||
|
||||
let downloadLoadingInstance
|
||||
|
||||
console.log(
|
||||
decryptWithSM4(
|
||||
'bdd931fb1f0780a8f9311c56cf6963ba94542b39961cf4c746e9f5a1a6918ffc3a5cfda6a0c8edca82ac663703a9a318',
|
||||
),
|
||||
'isProduction-----****-----',
|
||||
)
|
||||
// 是否显示重新登录
|
||||
export let isRelogin = { show: false }
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -225,6 +225,9 @@ export default {
|
|||
mailNum,
|
||||
}
|
||||
|
||||
this.pieOneConfig.data = []
|
||||
this.pieTwoConfig.data = []
|
||||
|
||||
this.pieOneConfig.data = postMsg.map((item) => {
|
||||
return {
|
||||
name: item.key,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue