Commit 5565ab33 by zhangxw

bug修复

1 parent 596af35d
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
<div class="info-item"> <div class="info-item">
<label>当前帮带导师:</label> <label>当前帮带导师:</label>
<el-form-item label="" prop="mentorPhone"> <el-form-item label="" prop="mentorPhone">
<el-select v-model="detail.copyMentorPhone" v-if="editStaffTeacher" filterable clearable placeholder="请选择"> <el-select v-model="detail.mentorPhone" v-if="editStaffTeacher" filterable clearable placeholder="请选择">
<el-option v-for="(item, index) in mentorPhoneList" :key="index" :value="item.confId" :label="item.confValue"></el-option> <el-option v-for="(item, index) in mentorPhoneList" :key="index" :value="item.confId" :label="item.confValue"></el-option>
</el-select> </el-select>
<div v-else>{{ mentorPhoneList.findIndex(item => item.confId === detail.mentorPhone) > -1 ? filterStr(detail.mentorPhone, mentorPhoneList) : (detail.mentorName || "-") }}</div> <div v-else>{{ mentorPhoneList.findIndex(item => item.confId === detail.mentorPhone) > -1 ? filterStr(detail.mentorPhone, mentorPhoneList) : (detail.mentorName || "-") }}</div>
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="info-item-block"> <div class="info-item-block">
<div class="change-log" v-if="!isEmpty(detail.logMentorName) && detail.startEffectiveTime && !isEmpty(detail.beforeMentorName)"> <div class="change-log" v-if="detail.startEffectiveTime && !isEmpty(detail.beforeMentorName)">
<i class="el-icon-warning custom-icon"></i> <i class="el-icon-warning custom-icon"></i>
<div class="log-text">已修改为{{detail.logMentorName || '-'}},生效时间为{{detail.startEffectiveTimeStr}},前值是{{ detail.beforeMentorName || '-' }}</div> <div class="log-text">已修改为{{detail.logMentorName || '-'}},生效时间为{{detail.startEffectiveTimeStr}},前值是{{ detail.beforeMentorName || '-' }}</div>
</div> </div>
...@@ -310,10 +310,9 @@ export default { ...@@ -310,10 +310,9 @@ export default {
if (res) { if (res) {
res.staffEntryDate = res.entryTime ? Util.dateFormate(res.entryTime, 'YYYY-MM-DD') : '' res.staffEntryDate = res.entryTime ? Util.dateFormate(res.entryTime, 'YYYY-MM-DD') : ''
res.hireTypeStr = res.hireType == 1 ? '校招管培生' : res.hireType == 2 ? '社会招聘' : '-' res.hireTypeStr = res.hireType == 1 ? '校招管培生' : res.hireType == 2 ? '社会招聘' : '-'
res.baseSalary = this.isEmpty(res.nextMonthBasicSalary) ? res.basicSalary : res.nextMonthBasicSalary res.baseSalary = deepClone(res.basicSalary)
res.lowSalary = this.isEmpty(res.nextMonthMinimumSalary) ? res.minimumSalary : res.nextMonthMinimumSalary res.lowSalary = deepClone(res.minimumSalary)
res.levelType = !this.isEmpty(res.jobType) ? res.jobType : '' res.levelType = !this.isEmpty(res.jobType) ? deepClone(res.jobType) : ''
res.copyMentorPhone = deepClone(res.mentorPhone)
res.startEffectiveTimeStr = res.startEffectiveTime ? Util.dateFormate(res.startEffectiveTime, 'YYYY-MM-DD HH:mm:ss') : '' res.startEffectiveTimeStr = res.startEffectiveTime ? Util.dateFormate(res.startEffectiveTime, 'YYYY-MM-DD HH:mm:ss') : ''
res.logMentorName = res.mentorName res.logMentorName = res.mentorName
res.openNoteFlag = res?.openFlag == "Y" ? true : false res.openNoteFlag = res?.openFlag == "Y" ? true : false
...@@ -351,28 +350,6 @@ export default { ...@@ -351,28 +350,6 @@ export default {
}) })
}, },
edit(key, infoItem, isCancel = false) { edit(key, infoItem, isCancel = false) {
// if (isCancel) {
// this.$refs['staffInfoForm']?.clearValidate([infoItem])
// return this[key] = !this[key]
// }
// if (this[key]) {
// this.$refs['staffInfoForm']?.validateField(infoItem, varid => {
// if (!varid) {
// if (infoItem == 'staffEntryDate') {
// this.detail.entryTime = this.detail[infoItem] || ''
// this.detail[infoItem] = this.detail[infoItem] ? dayjs(this.detail[infoItem]).format('YYYY-MM-DD') : ''
// }
// if (infoItem == 'mentorPhone') {
// this.detail[infoItem] = this.detail.copyMentorPhone
// this.detail.mentorName = this.filterStr(this.detail[infoItem], this.mentorPhoneList)
// }
// this[key] = !this[key]
// }
// })
// return
// } else {
// if (infoItem == 'mentorPhone' && this.mentorPhoneList?.findIndex(item => item.confId == this.detail[infoItem]) == -1) this.detail.copyMentorPhone = ''
// }
this[key] = !this[key] this[key] = !this[key]
}, },
...@@ -413,16 +390,15 @@ export default { ...@@ -413,16 +390,15 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs['staffInfoForm']?.validate((valid) => { this.$refs['staffInfoForm']?.validate((valid) => {
if (valid) { if (valid) {
let mentorPhone = this.detail.copyMentorPhone || this.detail.mentorPhone
let params = { let params = {
staffPhone: this.detail.staffPhone, staffPhone: this.detail.staffPhone,
entryTime: new Date(this.detail.entryTime), entryTime: new Date(this.detail.entryTime),
jobType: (this.detail.jobType == this.detail.levelType) ? !this.isEmpty(this.detail.nextMonthJobType) ? this.detail.nextMonthJobType : this.detail.jobType : this.detail.levelType, jobType: (this.detail.jobType == this.detail.levelType) ? !this.isEmpty(this.detail.nextMonthJobType) ? this.detail.nextMonthJobType : this.detail.jobType : this.detail.levelType,
workingStatus: this.detail.workingStatus, workingStatus: this.detail.workingStatus,
mentorName: mentorPhone ? (this.mentorPhoneList?.find(item => item.confId == mentorPhone)?.confValue || this.detail.mentorName) : '', mentorName: this.detail.mentorPhone ? (this.mentorPhoneList?.find(item => item.confId == this.detail.mentorPhone)?.confValue || this.detail.mentorName) : '',
mentorPhone: mentorPhone, mentorPhone: this.detail.mentorPhone,
basicSalary: this.detail.baseSalary, basicSalary: (this.detail.basicSalary == this.detail.baseSalary) ? !this.isEmpty(this.detail.nextMonthBasicSalary) ? this.detail.nextMonthBasicSalary : this.detail.basicSalary : this.detail.baseSalary,
minimumSalary: this.detail.lowSalary || 0 minimumSalary: (this.detail.minimumSalary == this.detail.lowSalary) ? !this.isEmpty(this.detail.nextMonthMinimumSalary) ? this.detail.nextMonthMinimumSalary : (this.detail.minimumSalary || 0) : (this.detail.lowSalary || 0),
} }
editStaffApi(params).then(res => { editStaffApi(params).then(res => {
if (res) { if (res) {
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
</div> </div>
<div class="content"> <div class="content">
<InStoreManageIndex v-show="windowId == -1" <InStoreManageIndex v-show="windowId == -1"
ref="inStoreManageIndex"
@openWindow="openWindow" /> @openWindow="openWindow" />
<template v-for="i in [...tab, ...dropdownList]"> <template v-for="i in [...tab, ...dropdownList]">
<staffInfo :ref="`recep-${i.id}`" <staffInfo :ref="`recep-${i.id}`"
...@@ -146,6 +147,7 @@ export default { ...@@ -146,6 +147,7 @@ export default {
backIndex() { backIndex() {
this.windowId = -1 this.windowId = -1
this.$refs['inStoreManageIndex']?.handleSearch()
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!