|
|
@@ -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>
|
|
|
@@ -532,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)
|
|
|
})
|
|
|
},
|