|
@@ -61,7 +61,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import SelectTree from '@/components/treeSelect/treeSelect.vue'
|
|
import SelectTree from '@/components/treeSelect/treeSelect.vue'
|
|
- import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
|
|
|
|
|
|
+ import handoverService from '@/api/human/depart/HandoverService'
|
|
import CommonApi from '@/api/cw/common/CommonApi'
|
|
import CommonApi from '@/api/cw/common/CommonApi'
|
|
import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
|
|
import UserSelectSignatory from '@/views/cw/workClientInfo/clientUserSelect'
|
|
|
|
|
|
@@ -94,6 +94,8 @@
|
|
projectManager: '',
|
|
projectManager: '',
|
|
draftAdministrator: '',
|
|
draftAdministrator: '',
|
|
remarks: '',
|
|
remarks: '',
|
|
|
|
+ registrationId: '',
|
|
|
|
+ type: '',
|
|
},
|
|
},
|
|
keyWatch: '',
|
|
keyWatch: '',
|
|
}
|
|
}
|
|
@@ -154,6 +156,8 @@
|
|
projectManager: '',
|
|
projectManager: '',
|
|
draftAdministrator: '',
|
|
draftAdministrator: '',
|
|
remarks: '',
|
|
remarks: '',
|
|
|
|
+ registrationId: '',
|
|
|
|
+ type: '',
|
|
}
|
|
}
|
|
if (method === 'add') {
|
|
if (method === 'add') {
|
|
this.title = `新建离职申请`
|
|
this.title = `新建离职申请`
|
|
@@ -165,7 +169,7 @@
|
|
this.loading = false
|
|
this.loading = false
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.loading = true
|
|
this.loading = true
|
|
- departRegistrationService.findById(this.inputForm.id).then((data) => {
|
|
|
|
|
|
+ handoverService.findById(this.inputForm.id).then((data) => {
|
|
this.fileList = []
|
|
this.fileList = []
|
|
this.fileList2 = []
|
|
this.fileList2 = []
|
|
if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
@@ -193,7 +197,7 @@
|
|
this.inputForm.files = []
|
|
this.inputForm.files = []
|
|
}
|
|
}
|
|
this.inputForm.id = this.businessId
|
|
this.inputForm.id = this.businessId
|
|
- departRegistrationService.save(this.inputForm).then((data) => {
|
|
|
|
|
|
+ handoverService.save(this.inputForm).then((data) => {
|
|
this.close()
|
|
this.close()
|
|
this.$message.success(data)
|
|
this.$message.success(data)
|
|
this.$emit('refreshDataList')
|
|
this.$emit('refreshDataList')
|
|
@@ -212,7 +216,7 @@
|
|
},
|
|
},
|
|
reapplyForm (callback) {
|
|
reapplyForm (callback) {
|
|
this.loading = true
|
|
this.loading = true
|
|
- departRegistrationService.findById(this.inputForm.id).then((data) => {
|
|
|
|
|
|
+ handoverService.findById(this.inputForm.id).then((data) => {
|
|
if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
this.loading = false
|
|
this.loading = false
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
@@ -222,15 +226,35 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ //暂存
|
|
|
|
+ saveForm (callback) {
|
|
|
|
+ // 暂存
|
|
|
|
+ this.loading = true
|
|
|
|
+ this.inputForm.type = '1'
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.registrationId)) {
|
|
|
|
+ this.inputForm.registrationId = this.businessId
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ handoverService.save(this.inputForm).then((data) => {
|
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
|
+ this.loading = false
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 送审
|
|
// 送审
|
|
async startForm (callback) {
|
|
async startForm (callback) {
|
|
this.$refs['inputForm'].validate(async (valid) => {
|
|
this.$refs['inputForm'].validate(async (valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.inputForm.type = '2'
|
|
this.inputForm.type = '2'
|
|
- departRegistrationService.save(this.inputForm).then((data) => {
|
|
|
|
- this.inputForm.title = `${this.$store.state.user.name} 发起了 [离职申请]`
|
|
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.registrationId)) {
|
|
|
|
+ this.inputForm.registrationId = this.businessId
|
|
|
|
+ }
|
|
|
|
+ handoverService.save(this.inputForm).then((data) => {
|
|
|
|
+ this.inputForm.title = `${this.$store.state.user.name} 发起了 [离职交接]`
|
|
this.inputForm.id = data.businessId
|
|
this.inputForm.id = data.businessId
|
|
|
|
+ this.inputForm.assignee = this.inputForm.projectManager
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
this.$refs.inputForm.resetFields()
|
|
this.$refs.inputForm.resetFields()
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -247,7 +271,7 @@
|
|
// 通过
|
|
// 通过
|
|
async agreeForm (callback) {
|
|
async agreeForm (callback) {
|
|
this.loading = true
|
|
this.loading = true
|
|
- departRegistrationService.findById(this.inputForm.id).then((data) => {
|
|
|
|
|
|
+ handoverService.findById(this.inputForm.id).then((data) => {
|
|
if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
this.loading = false
|
|
this.loading = false
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
@@ -259,11 +283,11 @@
|
|
|
|
|
|
this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
|
|
this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
|
|
if (this.commonJS.isNotEmpty(data)) {
|
|
if (this.commonJS.isNotEmpty(data)) {
|
|
- if (data === '办公室主任审批') {
|
|
|
|
|
|
+ if (data === '部门主任审批') {
|
|
this.inputForm.type = '5'
|
|
this.inputForm.type = '5'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- departRegistrationService.save(this.inputForm).then((data) => {
|
|
|
|
|
|
+ handoverService.save(this.inputForm).then((data) => {
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
this.loading = false
|
|
this.loading = false
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
@@ -282,36 +306,36 @@
|
|
updateStatusById (type, callback) {
|
|
updateStatusById (type, callback) {
|
|
if (type === 'reject') {
|
|
if (type === 'reject') {
|
|
this.loading = true
|
|
this.loading = true
|
|
- departRegistrationService.findById(this.inputForm.id).then((data) => {
|
|
|
|
-
|
|
|
|
|
|
+ handoverService.findById(this.inputForm.id).then((data) => {
|
|
|
|
+ console.log('进入了驳回')
|
|
if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
this.loading = false
|
|
this.loading = false
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
} else {
|
|
} else {
|
|
- this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
|
|
|
|
- if (this.commonJS.isNotEmpty(data)) {
|
|
|
|
- if (data === '部门主任审批') {
|
|
|
|
|
|
+ this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((name) => {
|
|
|
|
+ if (this.commonJS.isNotEmpty(name)) {
|
|
|
|
+ if (name === '项目经理审批' || name === '项目经理重新审批') {
|
|
this.inputForm.type = '4'
|
|
this.inputForm.type = '4'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- })
|
|
|
|
- departRegistrationService.updateStatusById(this.inputForm).then(() => {
|
|
|
|
- this.loading = false
|
|
|
|
- callback()
|
|
|
|
|
|
+ handoverService.updateStatusById(this.inputForm).then(() => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ callback()
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else if (type === 'hold') {
|
|
} else if (type === 'hold') {
|
|
this.loading = true
|
|
this.loading = true
|
|
- departRegistrationService.findById(this.inputForm.id).then((data) => {
|
|
|
|
|
|
+ handoverService.findById(this.inputForm.id).then((data) => {
|
|
if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
this.loading = false
|
|
this.loading = false
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
} else {
|
|
} else {
|
|
this.inputForm.type = '1'
|
|
this.inputForm.type = '1'
|
|
- departRegistrationService.updateStatusById(this.inputForm).then(() => {
|
|
|
|
|
|
+ handoverService.updateStatusById(this.inputForm).then(() => {
|
|
this.loading = false
|
|
this.loading = false
|
|
callback()
|
|
callback()
|
|
})
|
|
})
|