|
@@ -186,7 +186,7 @@ export default {
|
|
|
this.dialogVisible = val
|
|
this.dialogVisible = val
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
|
|
+ async mounted() {
|
|
|
this.init()
|
|
this.init()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -194,48 +194,70 @@ export default {
|
|
|
const isEmpty = Object.keys(this.params).length === 0
|
|
const isEmpty = Object.keys(this.params).length === 0
|
|
|
// 查阅状态初始化
|
|
// 查阅状态初始化
|
|
|
if (!isEmpty) {
|
|
if (!isEmpty) {
|
|
|
- //先校验该班次是否被申请过
|
|
|
|
|
- const { first, second } = this.$store.getters.level || {}
|
|
|
|
|
- const { userId } = this.$store.getters || {}
|
|
|
|
|
- const riqi = this.params.bu_ka_ri_qi_ || this.params.buKaRiQi
|
|
|
|
|
- const banci = this.params.bu_ka_ban_ci_ || this.params.buKaBanCi
|
|
|
|
|
- const response = await this.$common.request('query', {
|
|
|
|
|
- key: 'getUserReissueInfo',
|
|
|
|
|
- params: [riqi, userId, second || first]
|
|
|
|
|
- })
|
|
|
|
|
- let shiFouShenQin = false
|
|
|
|
|
- response.variables.data.forEach((el)=>{
|
|
|
|
|
- if(el.bu_ka_ri_qi_ === riqi && el.bu_ka_ban_ci_ === banci){
|
|
|
|
|
- shiFouShenQin = true
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- if(shiFouShenQin){
|
|
|
|
|
- this.$message.warning('该异常班次已申请!')
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- let shiFouyichang = false
|
|
|
|
|
- //校验该班次是否异常班次
|
|
|
|
|
- const kaoQinId = this.params.kao_qin_id_ || this.params.kaoQinId|| ''
|
|
|
|
|
- const res = await getAttendanceDetail({ id : kaoQinId})
|
|
|
|
|
- if(res.data){
|
|
|
|
|
- if(banci.includes('上班')){
|
|
|
|
|
- if(res.data.zhuangTai1 == '正常'){
|
|
|
|
|
- shiFouyichang = true
|
|
|
|
|
|
|
+ if(!this.readonly){
|
|
|
|
|
+ //先校验该班次是否被申请过
|
|
|
|
|
+ const { first, second } = this.$store.getters.level || {}
|
|
|
|
|
+ const { userId } = this.$store.getters || {}
|
|
|
|
|
+ const riqi = this.params.bu_ka_ri_qi_ || this.params.buKaRiQi
|
|
|
|
|
+ const banci = this.params.bu_ka_ban_ci_ || this.params.buKaBanCi
|
|
|
|
|
+ const response = await this.$common.request('query', {
|
|
|
|
|
+ key: 'getUserReissueInfo',
|
|
|
|
|
+ params: [riqi, userId, second || first]
|
|
|
|
|
+ })
|
|
|
|
|
+ let shiFouShenQin = false
|
|
|
|
|
+ response.variables.data.forEach((el)=>{
|
|
|
|
|
+ if(el.bu_ka_ri_qi_ === riqi && el.bu_ka_ban_ci_ === banci){
|
|
|
|
|
+ shiFouShenQin = true
|
|
|
}
|
|
}
|
|
|
- }else if(banci.includes('下班')) {
|
|
|
|
|
- if(res.data.zhuangTai2 == '正常'){
|
|
|
|
|
- shiFouyichang = true
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ if(shiFouShenQin){
|
|
|
|
|
+ this.$message.warning('该异常班次已申请!')
|
|
|
|
|
+ this.formData = {
|
|
|
|
|
+ id: '',
|
|
|
|
|
+ buKaRiQi: '',
|
|
|
|
|
+ buKaBanCi: '',
|
|
|
|
|
+ buKaShiJian: '',
|
|
|
|
|
+ buKaShiYou: '',
|
|
|
|
|
+ shenHeRen: '',
|
|
|
|
|
+ shenHeShiJian: '',
|
|
|
|
|
+ kaoQinId: '',
|
|
|
|
|
+ fuJian: '',
|
|
|
|
|
+ paiBanId: '',
|
|
|
|
|
+ paiBanJiLuId: ''
|
|
|
}
|
|
}
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (this.$refs.makeupForm) {
|
|
|
|
|
+ this.$refs.makeupForm.clearValidate();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if(shiFouyichang){
|
|
|
|
|
- this.$message.warning('该班次打卡状态已无异常!')
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ let shiFouyichang = false
|
|
|
|
|
+ //校验该班次是否异常班次
|
|
|
|
|
+ const kaoQinId = this.params.kao_qin_id_ || this.params.kaoQinId|| ''
|
|
|
|
|
+ const res = await getAttendanceDetail({ id : kaoQinId})
|
|
|
|
|
+ if(res.data){
|
|
|
|
|
+ if(banci.includes('上班')){
|
|
|
|
|
+ if(res.data.zhuangTai1 == '正常'){
|
|
|
|
|
+ shiFouyichang = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }else if(banci.includes('下班')) {
|
|
|
|
|
+ if(res.data.zhuangTai2 == '正常'){
|
|
|
|
|
+ shiFouyichang = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if(shiFouyichang){
|
|
|
|
|
+ this.$message.warning('该班次打卡状态已无异常!')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
this.buKaBanCiOptions = [
|
|
this.buKaBanCiOptions = [
|
|
|
{
|
|
{
|
|
|
label: this.params.bu_ka_ban_ci_ || this.params.buKaBanCi,
|
|
label: this.params.bu_ka_ban_ci_ || this.params.buKaBanCi,
|
|
|
- value: this.params.bu_ka_ban_ci_ || this.params.buKaBanCi
|
|
|
|
|
|
|
+ value: this.params.bu_ka_ban_ci_ || this.params.buKaBanCi,
|
|
|
|
|
+ id: this.params.kao_qin_id_ || this.params.kaoQinId
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
this.formData = {
|
|
this.formData = {
|
|
@@ -254,10 +276,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleOpened() {
|
|
handleOpened() {
|
|
|
- this.init()
|
|
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ /*
|
|
|
if (this.params.bu_ka_ri_qi_) {
|
|
if (this.params.bu_ka_ri_qi_) {
|
|
|
this.handleBuKaRiQiChange(this.params.bu_ka_ri_qi_)
|
|
this.handleBuKaRiQiChange(this.params.bu_ka_ri_qi_)
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 异常考勤查询参数
|
|
* 异常考勤查询参数
|
|
@@ -268,8 +291,9 @@ export default {
|
|
|
: {}
|
|
: {}
|
|
|
const { first, second } = this.$store.getters.level || {}
|
|
const { first, second } = this.$store.getters.level || {}
|
|
|
paramjson['Q^di_dian_^S'] = second || first
|
|
paramjson['Q^di_dian_^S'] = second || first
|
|
|
- paramjson['Q^ri_qi_^S'] = this.formData.buKaRiQi
|
|
|
|
|
|
|
+ paramjson['Q^ri_qi_^S'] = this.formData.buKaRiQi || this.params.bu_ka_ri_qi_ || this.params.buKaRiQi
|
|
|
paramjson['Q^yong_hu_id_^S'] = this.$store.getters.userId
|
|
paramjson['Q^yong_hu_id_^S'] = this.$store.getters.userId
|
|
|
|
|
+ paramjson['Q^ban_ci_ming_^NE'] = '休息' // 异常班次过滤掉休息
|
|
|
return ActionUtils.formatParams(paramjson, this.pagination, this.sorts)
|
|
return ActionUtils.formatParams(paramjson, this.pagination, this.sorts)
|
|
|
},
|
|
},
|
|
|
// 查询补卡日期下的异常数据
|
|
// 查询补卡日期下的异常数据
|
|
@@ -321,7 +345,7 @@ export default {
|
|
|
)
|
|
)
|
|
|
})
|
|
})
|
|
|
if (buKaBanCiArr.length === 0) {
|
|
if (buKaBanCiArr.length === 0) {
|
|
|
- self.$message.warning('该日期异常班次已申请!')
|
|
|
|
|
|
|
+ self.$message.warning('该日期异常班次已全部申请!')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
self.buKaBanCiOptions = buKaBanCiArr
|
|
self.buKaBanCiOptions = buKaBanCiArr
|
|
@@ -399,12 +423,18 @@ export default {
|
|
|
const updateData = self.yichangdata.filter(
|
|
const updateData = self.yichangdata.filter(
|
|
|
(obj) => obj.id === updateId
|
|
(obj) => obj.id === updateId
|
|
|
)
|
|
)
|
|
|
|
|
+ let paiBanId = ''
|
|
|
|
|
+ if(updateData.length > 0){
|
|
|
|
|
+ paiBanId = updateData[0].paiBanId
|
|
|
|
|
+ }else{
|
|
|
|
|
+ paiBanId = this.formData.paiBanId
|
|
|
|
|
+ }
|
|
|
// 获得补卡审批人
|
|
// 获得补卡审批人
|
|
|
// const sql = `select config_ FROM t_schedule WHERE id_ = '${updateData[0].paiBanId}'`
|
|
// const sql = `select config_ FROM t_schedule WHERE id_ = '${updateData[0].paiBanId}'`
|
|
|
self.$common
|
|
self.$common
|
|
|
.request('query', {
|
|
.request('query', {
|
|
|
key: 'getScheduleConfigById',
|
|
key: 'getScheduleConfigById',
|
|
|
- params: [updateData[0].paiBanId]
|
|
|
|
|
|
|
+ params: [paiBanId]
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
const str = res.variables.data[0].config_ || ''
|
|
const str = res.variables.data[0].config_ || ''
|