|
@@ -276,6 +276,8 @@
|
|
import ProjectRecordsChooseCom from '@/views/modules/cw/projectRecords/ProjectRecordsChooseCom'
|
|
import ProjectRecordsChooseCom from '@/views/modules/cw/projectRecords/ProjectRecordsChooseCom'
|
|
// import WorkClientChooseByProjectCom from '@/views/modules/cw/projectReportArchive/WorkClientChooseByProjectCom'
|
|
// import WorkClientChooseByProjectCom from '@/views/modules/cw/projectReportArchive/WorkClientChooseByProjectCom'
|
|
import ReportChooseByProjectCom from '@/views/modules/cw/projectReportArchive/ReportChooseByProjectCom'
|
|
import ReportChooseByProjectCom from '@/views/modules/cw/projectReportArchive/ReportChooseByProjectCom'
|
|
|
|
+ import OfficeService from '@/api/sys/OfficeService'
|
|
|
|
+ import ProcessService from '@/api/flowable/ProcessService'
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
businessId: {
|
|
businessId: {
|
|
@@ -355,10 +357,14 @@
|
|
projectRecordsService: null,
|
|
projectRecordsService: null,
|
|
projectReportArchiveService: null,
|
|
projectReportArchiveService: null,
|
|
reportCancellApplyArchivedService: null,
|
|
reportCancellApplyArchivedService: null,
|
|
|
|
+ officeService: null,
|
|
|
|
+ processService: null,
|
|
created () {
|
|
created () {
|
|
this.projectRecordsService = new ProjectRecordsService()
|
|
this.projectRecordsService = new ProjectRecordsService()
|
|
this.projectReportArchiveService = new ProjectReportArchiveService()
|
|
this.projectReportArchiveService = new ProjectReportArchiveService()
|
|
this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
|
|
this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
|
|
|
|
+ this.officeService = new OfficeService()
|
|
|
|
+ this.processService = new ProcessService()
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
bus: {
|
|
bus: {
|
|
@@ -605,8 +611,47 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
wait().then(() => {
|
|
wait().then(() => {
|
|
- this.reportCancellApplyArchivedService.saveForm(this.inputForm).then(({data}) => {
|
|
|
|
- callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
|
|
|
+ this.reportCancellApplyArchivedService.saveForm(this.inputForm).then((saveDate) => {
|
|
|
|
+ if (status === 'start') {
|
|
|
|
+ this.officeService.queryById(this.$store.state.user.office.id).then((byId) => {
|
|
|
|
+ // 判断当前人的所属部门是否为苏州分部,根据部门的机构编码(szfb)来判断是不是苏州分部
|
|
|
|
+ if (byId.data.code === 'szfb') { // 当前人的所属部门为苏州分部
|
|
|
|
+ this.processService.getByName('会计-报告作废归档-苏州').then(({data}) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ if (status === 'start' || status === 'reapply') {
|
|
|
|
+ if (status === 'start') {
|
|
|
|
+ this.inputForm.procDefId = data.id
|
|
|
|
+ this.inputForm.procDefKey = data.key
|
|
|
|
+ }
|
|
|
|
+ let processTitle = `${this.$store.state.user.name} 发起了 ${this.inputForm.reportNo} - ${this.inputForm.cwProjectRecordsDTO.projectName} ` + `[会计-报告作废归档-苏州分部]`
|
|
|
|
+ this.inputForm.formTitle = processTitle
|
|
|
|
+ this.inputForm.title = `发起流程【会计-报告作废归档-苏州分部】`
|
|
|
|
+ }
|
|
|
|
+ callback(saveDate.data.businessTable, saveDate.data.businessId, this.inputForm)
|
|
|
|
+ this.loading = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.processService.getByName('会计-报告作废归档').then(({data}) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ if (status === 'start' || status === 'reapply') {
|
|
|
|
+ if (status === 'start') {
|
|
|
|
+ this.inputForm.procDefId = data.id
|
|
|
|
+ this.inputForm.procDefKey = data.key
|
|
|
|
+ }
|
|
|
|
+ let processTitle = `${this.$store.state.user.name} 发起了 ${this.inputForm.reportNo} - ${this.inputForm.cwProjectRecordsDTO.projectName} ` + `[会计-报告作废归档]`
|
|
|
|
+ this.inputForm.formTitle = processTitle
|
|
|
|
+ this.inputForm.title = `发起流程【会计-报告作废归档】`
|
|
|
|
+ }
|
|
|
|
+ callback(saveDate.data.businessTable, saveDate.data.businessId, this.inputForm)
|
|
|
|
+ this.loading = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ callback(saveDate.data.businessTable, saveDate.data.businessId, this.inputForm)
|
|
|
|
+ }
|
|
this.loading = false
|
|
this.loading = false
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.loading = false
|
|
this.loading = false
|