|
@@ -950,88 +950,93 @@
|
|
|
},
|
|
|
startFormTrue (callback) {
|
|
|
this.loading = true
|
|
|
- let title = `发起流程【会计-报告签章-电子公章】`
|
|
|
- let describe = `[会计-报告签章-电子公章`
|
|
|
- // 读取流程表单
|
|
|
- if (this.inputForm.signatureType) {
|
|
|
- if (this.inputForm.signatureType === '1') {
|
|
|
- this.processService.getByName('会计-报告签章-电子公章').then(({data}) => {
|
|
|
- if (!this.commonJS.isEmpty(data.id)) {
|
|
|
- this.inputForm.procDefId = data.id
|
|
|
- this.inputForm.procDefKey = data.key
|
|
|
- }
|
|
|
- })
|
|
|
- title = `发起流程【会计-报告签章-电子公章】`
|
|
|
- describe = `[会计-报告签章-电子公章]`
|
|
|
- } else if (this.inputForm.signatureType === '2') {
|
|
|
- this.processService.getByName('财务-报告签章-公章+执业章').then(({data}) => {
|
|
|
- if (!this.commonJS.isEmpty(data.id)) {
|
|
|
- this.inputForm.procDefId = data.id
|
|
|
- this.inputForm.procDefKey = data.key
|
|
|
- }
|
|
|
- })
|
|
|
- title = `发起流程【会计-报告签章-电子公章+执业章】`
|
|
|
- describe = `[会计-报告签章-电子公章+执业章]`
|
|
|
- } else if (this.inputForm.signatureType === '3') {
|
|
|
- this.processService.getByName('会计-报告签章-实体公章').then(({data}) => {
|
|
|
- if (!this.commonJS.isEmpty(data.id)) {
|
|
|
- this.inputForm.procDefId = data.id
|
|
|
- this.inputForm.procDefKey = data.key
|
|
|
- }
|
|
|
- })
|
|
|
- title = `发起流程【会计-报告签章-实体公章】`
|
|
|
- describe = `[会计-报告签章-实体公章]`
|
|
|
+ if (this.$refs.archiveFile.checkProgress()) {
|
|
|
+ this.loading = false
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ let title = `发起流程【会计-报告签章-电子公章】`
|
|
|
+ let describe = `[会计-报告签章-电子公章`
|
|
|
+ // 读取流程表单
|
|
|
+ if (this.inputForm.signatureType) {
|
|
|
+ if (this.inputForm.signatureType === '1') {
|
|
|
+ this.processService.getByName('会计-报告签章-电子公章').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.inputForm.procDefId = data.id
|
|
|
+ this.inputForm.procDefKey = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ title = `发起流程【会计-报告签章-电子公章】`
|
|
|
+ describe = `[会计-报告签章-电子公章]`
|
|
|
+ } else if (this.inputForm.signatureType === '2') {
|
|
|
+ this.processService.getByName('财务-报告签章-公章+执业章').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.inputForm.procDefId = data.id
|
|
|
+ this.inputForm.procDefKey = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ title = `发起流程【会计-报告签章-电子公章+执业章】`
|
|
|
+ describe = `[会计-报告签章-电子公章+执业章]`
|
|
|
+ } else if (this.inputForm.signatureType === '3') {
|
|
|
+ this.processService.getByName('会计-报告签章-实体公章').then(({data}) => {
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
+ this.inputForm.procDefId = data.id
|
|
|
+ this.inputForm.procDefKey = data.key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ title = `发起流程【会计-报告签章-实体公章】`
|
|
|
+ describe = `[会计-报告签章-实体公章]`
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- let processTitle = `${this.userName} 发起了 ${this.inputForm.reportNo} - ${this.inputForm.projectName} ` + describe
|
|
|
- this.inputForm.formTitle = title
|
|
|
- this.inputForm.title = processTitle
|
|
|
+ let processTitle = `${this.userName} 发起了 ${this.inputForm.reportNo} - ${this.inputForm.projectName} ` + describe
|
|
|
+ this.inputForm.formTitle = title
|
|
|
+ this.inputForm.title = processTitle
|
|
|
|
|
|
- this.$refs['inputForm'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.loading = true
|
|
|
- this.$refs.archiveFile.getDataList().then((list) => {
|
|
|
- if (this.commonJS.isNotEmpty(list)) {
|
|
|
- list.forEach((item, index) => {
|
|
|
- if (this.commonJS.isEmpty(item.fileType)) {
|
|
|
- this.loading = false
|
|
|
- this.$message.error('第' + (index + 1) + '条附件信息没有填写文件类型')
|
|
|
- this.loading = false
|
|
|
- throw new Error('第' + (index + 1) + '条附件信息没有填写文件类型')
|
|
|
- }
|
|
|
- if (this.commonJS.isEmpty(item.sealType)) {
|
|
|
- this.loading = false
|
|
|
- this.$message.error('第' + (index + 1) + '条附件信息没有填写盖章类型')
|
|
|
- this.loading = false
|
|
|
- throw new Error('第' + (index + 1) + '条附件信息没有填写盖章类型')
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- this.inputForm.cwFileInfoList = list
|
|
|
- this.reportReviewService.save(this.inputForm).then(() => {
|
|
|
- let da = {cwFileInfoList: this.inputForm.cwFileInfoList, id: this.inputForm.id}
|
|
|
- this.projectReportService.saveSignFiles(da).then(() => {
|
|
|
- this.projectReportService.saveData(this.inputForm).then(({data}) => {
|
|
|
- if (this.inputForm.signatureType === '2') {
|
|
|
- this.inputForm.assignee = this.inputForm.signatureAnnotator1
|
|
|
+ this.$refs['inputForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.loading = true
|
|
|
+ this.$refs.archiveFile.getDataList().then((list) => {
|
|
|
+ if (this.commonJS.isNotEmpty(list)) {
|
|
|
+ list.forEach((item, index) => {
|
|
|
+ if (this.commonJS.isEmpty(item.fileType)) {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error('第' + (index + 1) + '条附件信息没有填写文件类型')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('第' + (index + 1) + '条附件信息没有填写文件类型')
|
|
|
}
|
|
|
- callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
- this.loading = false
|
|
|
- throw new Error()
|
|
|
+ if (this.commonJS.isEmpty(item.sealType)) {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error('第' + (index + 1) + '条附件信息没有填写盖章类型')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('第' + (index + 1) + '条附件信息没有填写盖章类型')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.inputForm.cwFileInfoList = list
|
|
|
+ this.reportReviewService.save(this.inputForm).then(() => {
|
|
|
+ let da = {cwFileInfoList: this.inputForm.cwFileInfoList, id: this.inputForm.id}
|
|
|
+ this.projectReportService.saveSignFiles(da).then(() => {
|
|
|
+ this.projectReportService.saveData(this.inputForm).then(({data}) => {
|
|
|
+ if (this.inputForm.signatureType === '2') {
|
|
|
+ this.inputForm.assignee = this.inputForm.signatureAnnotator1
|
|
|
+ }
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
+ this.loading = false
|
|
|
+ throw new Error()
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('流程发起失败')
|
|
|
+ })
|
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
|
throw new Error('流程发起失败')
|
|
|
})
|
|
|
- }).catch(() => {
|
|
|
- this.loading = false
|
|
|
- throw new Error('流程发起失败')
|
|
|
})
|
|
|
})
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.loading = false
|
|
|
- }
|
|
|
- })
|
|
|
+ } else {
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
reapplyForm (callback) {
|
|
|
this.loading = true
|