Преглед на файлове

版本号:X1.2.0
流程调整,添加苏州分部报告作废归档审核流程。流程审核人指向苏州档案负责人

user5 преди 1 година
родител
ревизия
2766ff7cac

+ 11 - 13
src/views/modules/cw/invoice/ProgramPageForm.vue

@@ -12,10 +12,8 @@
       :visible.sync="visible">
       <div v-if="isShow">
         <el-radio v-model="checkType" label="1" size="small" style="margin-right: 20px">项目</el-radio>
-        <el-radio v-if="hasPermission('cw_finance:invoice:add:report')" v-model="checkType" label="2" size="small"
-                  style="margin-right: 20px">报告
-        </el-radio>
-        <el-radio v-model="checkType" label="3" size="small" style="margin-right: 20px">其他</el-radio>
+        <el-radio v-model="checkType" label="2" size="small" style="margin-right: 20px">报告</el-radio>
+        <el-radio v-if="hasPermission('cw_finance:invoice:add:report')" v-model="checkType" label="3" size="small" style="margin-right: 20px">其他</el-radio>
 
       </div>
       <!--报告        -->
@@ -184,7 +182,7 @@
 import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
 
 export default {
-  data() {
+  data () {
     return {
       title: '项目选择',
       method: '',
@@ -231,7 +229,7 @@ export default {
      *      num为空或者true,则允许多选
      *      num为其他任何值,则只可以单选
      */
-    init(isShow, num) {
+    init (isShow, num) {
       if (this.commonJS.isEmpty(isShow)) {
         this.isShow = true
         this.checkType = '1'
@@ -337,7 +335,7 @@ export default {
       this.close()
       this.$emit('getProgram', rows)
     }, */
-    list() {
+    list () {
       this.loading = true
       this.searchForm.status = '5'
       this.projectRecordsService.list({
@@ -351,7 +349,7 @@ export default {
         this.loading = false
       })
     },
-    list1() {
+    list1 () {
       this.loading = true
       this.searchForm.status = '5'
       this.projectRecordsService.list1({
@@ -366,25 +364,25 @@ export default {
       })
     },
     // 当前页
-    currentChangeHandle({currentPage, pageSize}) {
+    currentChangeHandle ({currentPage, pageSize}) {
       this.tablePage.currentPage = currentPage
       this.tablePage.pageSize = pageSize
       this.list()
     },
-    resetSearch() {
+    resetSearch () {
       this.$refs.searchForm.resetFields()
       this.list()
     },
-    currentChangeHandle1({currentPage, pageSize}) {
+    currentChangeHandle1 ({currentPage, pageSize}) {
       this.tablePage.currentPage = currentPage
       this.tablePage.pageSize = pageSize
       this.list1()
     },
-    resetSearch1() {
+    resetSearch1 () {
       this.$refs.searchForm.resetFields()
       this.list1()
     },
-    close() {
+    close () {
       this.detail = ''
       this.visible = false
     }

+ 20 - 3
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList.vue

@@ -185,6 +185,7 @@
   import UserService from '@/api/sys/UserService'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import UserSelect from '@/views/modules/cw/workClientInfo/clientUserSelect'
+  import OfficeService from '@/api/sys/OfficeService'
 
   export default {
     data () {
@@ -213,6 +214,8 @@
         loading: false,
         processDefinitionAuditId: '',
         procDefAuditKey: '',
+        processDefinitionAuditIdSZ: '',
+        procDefAuditKeySZ: '',
         isAdmin: false,
         create: ''
       }
@@ -224,6 +227,7 @@
     taskService: null,
     processService: null,
     userService: null,
+    officeService: null,
     created () {
       this.workClientService = new WorkClientService()
       // this.projectReportService = new ProjectReportService()
@@ -232,6 +236,7 @@
       this.taskService = new TaskService()
       this.processService = new ProcessService()
       this.userService = new UserService()
+      this.officeService = new OfficeService()
     },
     components: {
       ReportManagementForm,
@@ -327,6 +332,12 @@
             this.procDefAuditKey = data.key
           }
         })
+        this.processService.getByName('会计-报告作废归档-苏州').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditIdSZ = data.id
+            this.procDefAuditKeySZ = data.key
+          }
+        })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -426,14 +437,20 @@
       }, */
       // 查看流程结果
       detail (row) {
-        console.log('row', row)
         if (row.applyFileType !== '0' && row.applyFileType !== '1') {
+          this.officeService.queryById(this.$store.state.user.office.id).then((byId) => {
+            // 判断当前人的所属部门是否为苏州分部,根据部门的机构编码(szfb)来判断是不是苏州分部
+            if (byId.data.code === 'szfb') {
+              this.procDefId = this.processDefinitionAuditIdSZ
+            } else {
+              this.procDefId = this.processDefinitionAuditId
+            }
+          })
           this.reportCancellApplyArchivedService.findByContractInfoId(row.id).then(({data}) => {
             if (!this.commonJS.isEmpty(data.id)) {
-              console.log('data', data)
               this.taskService.getTaskDef({
                 procInsId: data.cwProcInsId,
-                procDefId: data.cwProDefId
+                procDefId: this.procDefId
               }).then(({data}) => {
                 this.$router.push({
                   path: '/flowable/task/TaskFormDetail',

+ 47 - 2
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedTaskForm.vue

@@ -276,6 +276,8 @@
   import ProjectRecordsChooseCom from '@/views/modules/cw/projectRecords/ProjectRecordsChooseCom'
   // import WorkClientChooseByProjectCom from '@/views/modules/cw/projectReportArchive/WorkClientChooseByProjectCom'
   import ReportChooseByProjectCom from '@/views/modules/cw/projectReportArchive/ReportChooseByProjectCom'
+  import OfficeService from '@/api/sys/OfficeService'
+  import ProcessService from '@/api/flowable/ProcessService'
   export default {
     props: {
       businessId: {
@@ -355,10 +357,14 @@
     projectRecordsService: null,
     projectReportArchiveService: null,
     reportCancellApplyArchivedService: null,
+    officeService: null,
+    processService: null,
     created () {
       this.projectRecordsService = new ProjectRecordsService()
       this.projectReportArchiveService = new ProjectReportArchiveService()
       this.reportCancellApplyArchivedService = new ReportCancellApplyArchivedService()
+      this.officeService = new OfficeService()
+      this.processService = new ProcessService()
     },
     computed: {
       bus: {
@@ -605,8 +611,47 @@
                 })
               }
               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
                 }).catch(() => {
                   this.loading = false

+ 2 - 0
src/views/modules/flowable/task/TaskForm.vue

@@ -547,6 +547,7 @@
       // Process_1670486210438 报告复核
       // Process_1668759076824 报告作废申请
       // Process_1670548572652 报告作废归档
+      // Process_1670548572655 报告作废归档-苏州
       // Process_1669700915383 合同登记纸质归档
       // Process_1669271524486 报销审批
       // Process_1669275081328 发票申请
@@ -583,6 +584,7 @@
           this.procDefId.includes('Process_1670486210438') ||
           this.procDefId.includes('Process_1668759076824') ||
           this.procDefId.includes('Process_1670548572652') ||
+          this.procDefId.includes('Process_1670548572655') ||
           this.procDefId.includes('Process_1669700915383') ||
           this.procDefId.includes('Process_1669271524486') ||
           this.procDefId.includes('Process_1669275081328') ||