|
@@ -1156,13 +1156,15 @@ export default {
|
|
// 获取当前审核节点
|
|
// 获取当前审核节点
|
|
this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
|
|
this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
|
|
this.currentNodeName = name
|
|
this.currentNodeName = name
|
|
- if (name == "综合管理部主任审批" || name == "财务审批") {
|
|
|
|
- this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
|
|
|
|
|
|
+ if (name == "综合管理部主任审批") {
|
|
|
|
+ this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 1
|
|
|
|
+ }
|
|
|
|
+ if (name == "财务审批") {
|
|
|
|
+ this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 2
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// 获取文件确认状态
|
|
// 获取文件确认状态
|
|
this.invoiceConfirmStatusService.getListByUser(this.inputForm.id).then(data => {
|
|
this.invoiceConfirmStatusService.getListByUser(this.inputForm.id).then(data => {
|
|
- console.log(data);
|
|
|
|
// 先构建一个 Map 方便查找
|
|
// 先构建一个 Map 方便查找
|
|
const statusMap = new Map(data.map(item => [item.invoiceId, item.status]));
|
|
const statusMap = new Map(data.map(item => [item.invoiceId, item.status]));
|
|
// 遍历 targetArray 给每项加 confirmStatus
|
|
// 遍历 targetArray 给每项加 confirmStatus
|
|
@@ -1177,6 +1179,8 @@ export default {
|
|
})
|
|
})
|
|
if (method !== 'edit' && method !== 'view') {
|
|
if (method !== 'edit' && method !== 'view') {
|
|
this.$refs.invoiceReimbursementUpLoadComponent.newUpload(method, [], 'reimbursement')
|
|
this.$refs.invoiceReimbursementUpLoadComponent.newUpload(method, [], 'reimbursement')
|
|
|
|
+
|
|
|
|
+
|
|
this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
|
|
this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
|
|
}
|
|
}
|
|
userService.isKjsz().then((data) => {
|
|
userService.isKjsz().then((data) => {
|
|
@@ -1767,7 +1771,6 @@ export default {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
|
|
this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
|
|
if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
|
|
-
|
|
|
|
taskService.getTaskAuditUsersByprocInstId(this.$route.query.procInsId).then(res => {
|
|
taskService.getTaskAuditUsersByprocInstId(this.$route.query.procInsId).then(res => {
|
|
let userInfo = this.$TOOL.data.get("USER_INFO");
|
|
let userInfo = this.$TOOL.data.get("USER_INFO");
|
|
// 如果审核人是本人的话,则跳过数据状态的限制,可再次审批
|
|
// 如果审核人是本人的话,则跳过数据状态的限制,可再次审批
|
|
@@ -1780,6 +1783,14 @@ export default {
|
|
this.loading = false
|
|
this.loading = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if (this.currentNodeName == "综合管理部主任审批") {
|
|
|
|
+ let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
|
|
|
|
+ if (!confirmFlag) {
|
|
|
|
+ this.$message.warning('数电发票未全部确认,请全部确认后再提交')
|
|
|
|
+ this.loading = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (this.$refs.uploadComponent.checkProgress()) {
|
|
if (this.$refs.uploadComponent.checkProgress()) {
|
|
this.loading = false
|
|
this.loading = false
|
|
return
|
|
return
|
|
@@ -1813,7 +1824,8 @@ export default {
|
|
}
|
|
}
|
|
this.reimbursementApprovalService.save(this.inputForm).then((data) => {
|
|
this.reimbursementApprovalService.save(this.inputForm).then((data) => {
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
- if (this.currentNodeName == "综合管理部主任审批" || this.currentNodeName == "财务审批") {
|
|
|
|
|
|
+ // this.currentNodeName == "财务审批"
|
|
|
|
+ if (this.currentNodeName == "综合管理部主任审批") {
|
|
this.changeStatusApi()
|
|
this.changeStatusApi()
|
|
}
|
|
}
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -1844,6 +1856,14 @@ export default {
|
|
this.loading = false
|
|
this.loading = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if (this.currentNodeName == "综合管理部主任审批") {
|
|
|
|
+ let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
|
|
|
|
+ if (!confirmFlag) {
|
|
|
|
+ this.$message.warning('数电发票未全部确认,请全部确认后再提交')
|
|
|
|
+ this.loading = false
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (this.$refs.uploadComponent.checkProgress()) {
|
|
if (this.$refs.uploadComponent.checkProgress()) {
|
|
this.loading = false
|
|
this.loading = false
|
|
return
|
|
return
|
|
@@ -1878,7 +1898,9 @@ export default {
|
|
console.log('this.inputForm', this.inputForm)
|
|
console.log('this.inputForm', this.inputForm)
|
|
this.reimbursementApprovalService.save(this.inputForm).then((data) => {
|
|
this.reimbursementApprovalService.save(this.inputForm).then((data) => {
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
- this.changeStatusApi()
|
|
|
|
|
|
+ if (this.currentNodeName == "综合管理部主任审批") {
|
|
|
|
+ this.changeStatusApi()
|
|
|
|
+ }
|
|
this.loading = false
|
|
this.loading = false
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loading = false
|
|
this.loading = false
|