|
|
@@ -13,7 +13,7 @@
|
|
|
? '详情'
|
|
|
: '')
|
|
|
"
|
|
|
- :right-text="typeValue == '4' ? '退回原因' : ''"
|
|
|
+ :right-text="typeValue == '10' ? '退回原因' : ''"
|
|
|
@click-left="closePop()"
|
|
|
@click-right="getBack()"
|
|
|
>
|
|
|
@@ -147,7 +147,7 @@
|
|
|
<van-button
|
|
|
type="success"
|
|
|
class="btn btn-back-color"
|
|
|
- @click="onAgree('待审核', '重新提交', '申请')"
|
|
|
+ @click="onSubmit"
|
|
|
>
|
|
|
重新申请
|
|
|
</van-button>
|
|
|
@@ -232,7 +232,9 @@ export default {
|
|
|
maxDate: new Date(),
|
|
|
minTime: new Date(),
|
|
|
maxTime: new Date(),
|
|
|
- approver: []
|
|
|
+ approver: [],
|
|
|
+ defaultUpTime: '',
|
|
|
+ defaultDownTime: ''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -355,7 +357,8 @@ export default {
|
|
|
const midStr = this.$common.getFormatDate('string', 10, this.xuanzeDate)
|
|
|
const midDate = new Date(midStr)
|
|
|
const midMax = this.$common.getFormatDate('string', 10, midDate.setDate(midDate.getDate() + 1))
|
|
|
-
|
|
|
+ this.defaultUpTime = midStr + ' ' + e.config.dateRange[0].startTime
|
|
|
+ this.defaultDownTime = (e.config.dateRange[0].isSecondDay === 'Y' ? midMax : midStr) + ' ' + e.config.dateRange[0].endTime
|
|
|
if (e.config.dateRange[0].isSecondDay === 'Y') {
|
|
|
this.minTime = new Date(midStr + ' 00:00:00')
|
|
|
this.maxTime = new Date(midMax + ' 23:59:59')
|
|
|
@@ -369,6 +372,7 @@ export default {
|
|
|
actionTypeCallback(e) {
|
|
|
this.form.buKaLeiXing = e.text
|
|
|
this.typeShow = false
|
|
|
+ this.form.buKaShiJian = e.text === '上班' ? this.defaultUpTime : e.text === '下班' ? this.defaultDownTime : ''
|
|
|
},
|
|
|
async schedule(val) {
|
|
|
const date = this.$common.getFormatDate('string', 10, val)
|
|
|
@@ -449,13 +453,16 @@ export default {
|
|
|
this.form.buKaBanCi = this.reissueData.name
|
|
|
this.form.buKaRiQi = this.selectDate
|
|
|
this.form.buKaLeiXing = this.reissueType === '' ? '' : this.reissueType
|
|
|
- // this.form.buKaShiJian = this.$methCommon.time(16)
|
|
|
// this.xuanzeTime = new Date()
|
|
|
this.xuanzeDate = new Date(this.selectDate)
|
|
|
this.approver = this.reissueData.approver
|
|
|
const midStr = this.$common.getFormatDate('string', 10, this.xuanzeDate)
|
|
|
const midDate = new Date(midStr)
|
|
|
const midMax = this.$common.getFormatDate('string', 10, midDate.setDate(midDate.getDate() + 1))
|
|
|
+ this.defaultUpTime = midStr + ' ' + this.reissueData.config.dateRange[0].startTime
|
|
|
+ this.defaultDownTime = (this.reissueData.config.dateRange[0].isSecondDay === 'Y' ? midMax : midStr) + ' ' + this.reissueData.config.dateRange[0].endTime
|
|
|
+ this.form.buKaShiJian = this.reissueType === '上班' ? this.defaultUpTime : this.reissueType === '下班' ? this.defaultDownTime : ''
|
|
|
+
|
|
|
if (this.reissueData.config.dateRange[0].isSecondDay === 'Y') {
|
|
|
this.minTime = new Date(midStr + ' 00:00:00')
|
|
|
this.maxTime = new Date(midMax + ' 23:59:59')
|
|
|
@@ -525,83 +532,76 @@ export default {
|
|
|
const info = this.$store.getters.userInfo
|
|
|
const useId = info.user.id
|
|
|
// const detpId = info.employee.positions
|
|
|
- const transmitData = {
|
|
|
- bianZhiRen: useId,
|
|
|
- bianZhiShiJian: this.$methCommon.time(16),
|
|
|
- // bianZhiBuMen: this.mainPosition === null ? detpId : this.mainPosition.id,
|
|
|
- zhuangTai: '待审核',
|
|
|
- diDian: this.level.second || this.level.first,
|
|
|
- buKaBanCi: this.form.buKaBanCi + '-' + this.form.buKaLeiXing,
|
|
|
- buKaShiYou: this.form.buKaShiYou,
|
|
|
- buKaRiQi: this.form.buKaRiQi,
|
|
|
- buKaShiJian: this.form.buKaShiJian,
|
|
|
- fuJian: this.form.fuJian,
|
|
|
- paiBanId: clockInData[0].pai_ban_id_,
|
|
|
- paiBanJiLuId: clockInData[0].pai_ban_ji_lu_id_,
|
|
|
- kaoQinId: clockInData[0].id_,
|
|
|
- shenHeRen: this.approver.join(',')
|
|
|
- }
|
|
|
const that = this
|
|
|
-
|
|
|
- saveReissue(transmitData)
|
|
|
- .then(res => {
|
|
|
- if (res.state === 200) {
|
|
|
- that.$toast.success('提交成功!')
|
|
|
- setTimeout(() => {
|
|
|
- that.closePop('1')
|
|
|
- }, 1000)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ if (this.typeValue === '4') {
|
|
|
+ const field = {
|
|
|
+ bian_zhi_ren_: useId,
|
|
|
+ bian_zhi_shi_jian: this.$methCommon.time(16),
|
|
|
+ // bianZhiBuMen: this.mainPosition === null ? detpId : this.mainPosition.id,
|
|
|
+ zhuang_tai_: '待审核',
|
|
|
+ di_dian_: this.level.second || this.level.first,
|
|
|
+ bu_ka_ban_ci_: this.form.buKaBanCi + '-' + this.form.buKaLeiXing,
|
|
|
+ bu_ka_shi_you_: this.form.buKaShiYou,
|
|
|
+ bu_ka_ri_qi_: this.form.buKaRiQi,
|
|
|
+ bu_ka_shi_jian_: this.form.buKaShiJian,
|
|
|
+ fu_jian_: this.form.fuJian,
|
|
|
+ pai_ban_id_: clockInData[0].pai_ban_id_,
|
|
|
+ pai_ban_ji_lu_id_: clockInData[0].pai_ban_ji_lu_id_,
|
|
|
+ kao_qin_id_: clockInData[0].id_,
|
|
|
+ shen_he_ren_: this.approver.join(',')
|
|
|
+ }
|
|
|
+ this.updateData(this.form.id, field)
|
|
|
+ } else {
|
|
|
+ const transmitData = {
|
|
|
+ bianZhiRen: useId,
|
|
|
+ bianZhiShiJian: this.$methCommon.time(16),
|
|
|
+ // bianZhiBuMen: this.mainPosition === null ? detpId : this.mainPosition.id,
|
|
|
+ zhuangTai: '待审核',
|
|
|
+ diDian: this.level.second || this.level.first,
|
|
|
+ buKaBanCi: this.form.buKaBanCi + '-' + this.form.buKaLeiXing,
|
|
|
+ buKaShiYou: this.form.buKaShiYou,
|
|
|
+ buKaRiQi: this.form.buKaRiQi,
|
|
|
+ buKaShiJian: this.form.buKaShiJian,
|
|
|
+ fuJian: this.form.fuJian,
|
|
|
+ paiBanId: clockInData[0].pai_ban_id_,
|
|
|
+ paiBanJiLuId: clockInData[0].pai_ban_ji_lu_id_,
|
|
|
+ kaoQinId: clockInData[0].id_,
|
|
|
+ shenHeRen: this.approver.join(',')
|
|
|
+ }
|
|
|
+ saveReissue(transmitData)
|
|
|
+ .then(res => {
|
|
|
+ if (res.state === 200) {
|
|
|
+ that.$toast.success('提交成功!')
|
|
|
+ setTimeout(() => {
|
|
|
+ that.closePop('1')
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
+ }
|
|
|
},
|
|
|
onAgree(shiFouGuoShen, opinion, type) {
|
|
|
- if (this.typeValue !== '2' && !this.getYanZheng()) {
|
|
|
+ if ((this.typeValue !== '2' || this.typeValue !== '4') && !this.getYanZheng()) {
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
- this.form.shiFouGuoShen = shiFouGuoShen
|
|
|
- this.form.diDian = this.level.second
|
|
|
- this.form.shiFouGuoShen = shiFouGuoShen
|
|
|
- const editData = {
|
|
|
- data: JSON.stringify(this.form),
|
|
|
- opinion: opinion,
|
|
|
- taskId: this.taskId
|
|
|
- }
|
|
|
- // agree(editData).then(res => {
|
|
|
- // if (res.state === 200) {
|
|
|
- // if (this.typeValue === '2') {
|
|
|
- // } else {
|
|
|
- // this.$toast.success(type + '成功!')
|
|
|
- // this.closePop()
|
|
|
- // }
|
|
|
- // this.$toast.success(type + '成功!')
|
|
|
- // setTimeout(() => {
|
|
|
- // this.closePop()
|
|
|
- // }, 1000)
|
|
|
- // } else {
|
|
|
- // this.$toast.fail(type + '异常!')
|
|
|
- // }
|
|
|
- // })
|
|
|
+ // this.updateData(this.form.id)
|
|
|
},
|
|
|
- updateData(id, fileId) {
|
|
|
- const pp = {
|
|
|
+ updateData(id, field) {
|
|
|
+ const updateParams = {
|
|
|
+ tableName: 't_attendance_reissue',
|
|
|
updList: [
|
|
|
{
|
|
|
where: {
|
|
|
id_: id
|
|
|
},
|
|
|
- param: {
|
|
|
- shi_fou_guo_shen_: '待审核'
|
|
|
- }
|
|
|
+ param: field
|
|
|
}
|
|
|
- ],
|
|
|
- tableName: 't_attendance_reissue'
|
|
|
+ ]
|
|
|
}
|
|
|
- const data = this.$sig(pp)
|
|
|
- this.$common.request('update', data).then(res => {
|
|
|
- this.$methCommon.getPrompt('提交成功', 'success')
|
|
|
+ this.$common.request('update', updateParams).then(res => {
|
|
|
+ this.$toast.success('提交成功!')
|
|
|
setTimeout(() => {
|
|
|
- this.closePop()
|
|
|
+ this.closePop('1')
|
|
|
}, 1000)
|
|
|
})
|
|
|
},
|