ソースを参照

签章功能选择签章类型调整

user5 2 年 前
コミット
8ef0c04b1f

+ 21 - 3
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -177,7 +177,9 @@
 <!--              复核流程-->
               <el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& (scope.row.reviewStatus === '0' || scope.row.reviewStatus === '1' || scope.row.reviewStatus === '3' || scope.row.reviewStatus === undefined || scope.row.reviewStatus === '')" type="text" size="small" @click="pushF(scope.row)">复核</el-button>
               <el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '2'" type="text" size="small" @click="rebackF(scope.row)">撤回复核申请</el-button>
-<!--              公章流程-->
+<!--              未选择盖章类型点击签章操作-->
+              <el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5' && !scope.row.signatureType" type="text" size="small" @click="pushS(scope.row)">签章</el-button>
+              <!--公章流程-->
               <el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5' && scope.row.signatureType === '1' && (scope.row.status1 === '0' || scope.row.status1 === '3')" type="text" size="small" @click="pushS(scope.row)">签章</el-button>
               <el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||isAdmin||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5' && scope.row.signatureType === '1' && scope.row.status1 === '2'" type="text" size="small" @click="rebackS(scope.row)">撤回签章申请</el-button>
 <!--              实体章流程-->
@@ -363,7 +365,7 @@
             this.procDefSKey2 = data.key
           }
         })
-        this.processService.getByName('财务-报告签章-实体章').then(({data}) => {
+        this.processService.getByName('会计-报告签章-实体公章').then(({data}) => {
           if (!this.commonJS.isEmpty(data.id)) {
             this.processDefinitionSId3 = data.id
             this.procDefSKey3 = data.key
@@ -597,7 +599,23 @@
       pushS (row) {
         // 读取流程表单
         let title = `发起流程【会计-报告签章-电子公章】`
-        let processTitle = `${this.userName} 发起了 ${row.reportNo} - ${row.projectName} [会计-报告签章-电子公章]`
+        let describe = `[会计-报告签章-电子公章`
+        if (row.signatureType) {
+          if (row.signatureType === 1) {
+            title = `发起流程【会计-报告签章-电子公章】`
+            describe = `[会计-报告签章-电子公章]`
+          } else if (row.signatureType === 2) {
+            title = `发起流程【会计-报告签章-电子公章+执业章】`
+            describe = `[会计-报告签章-电子公章+执业章]`
+          } else if (row.signatureType === 3) {
+            title = `发起流程【会计-报告签章-实体公章】`
+            describe = `[会计-报告签章-实体公章]`
+          }
+        } else {
+          title = `发起流程【会计-报告签章】`
+          describe = `[会计-报告签章]`
+        }
+        let processTitle = `${this.userName} 发起了 ${row.reportNo} - ${row.projectName} ` + describe
         let status = 'startAndClose'
         if (row.status1 === '3') {
           status = 'startAndClose'

+ 107 - 33
src/views/modules/cw/reportManagement/ReportManagementSignatureForm.vue

@@ -68,9 +68,26 @@
                 @getValue="(value) => {inputForm.officeId=value}"/>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="12" v-if="!inputForm.signatureType || (inputForm.signatureType === '1' && inputForm.status1 !== '4') || (inputForm.signatureType === '2' && inputForm.status2 !== '4') || (inputForm.signatureType === '3' && inputForm.status3 !== '4') ">
             <el-form-item label="盖章类型" prop="signatureType"
                           :rules="[
+                            {required: true, message: '盖章类型不能为空', trigger: 'change'}
+                   ]">
+              <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
+              <el-select v-model="inputForm.signatureType" placeholder="请选择盖章类型" clearable style="width: 100%;">
+                <el-option
+                  v-for="item in $dictUtils.getDictList('cw_signature_type')"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="(inputForm.signatureType === '1' && inputForm.status1 === '4') || (inputForm.signatureType === '2' && inputForm.status2 === '4') || (inputForm.signatureType === '3' && inputForm.status3 === '4') ">
+            <el-form-item label="盖章类型" prop="signatureType"
+                          :rules="[
+                            {required: true, message: '盖章类型不能为空', trigger: 'change'}
                    ]">
               <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
               <el-select :disabled="true" v-model="inputForm.signatureType" placeholder="请选择盖章类型" clearable style="width: 100%;">
@@ -463,6 +480,7 @@
   import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
   // import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   import ReportServiceUnitForm from './ReportServiceUnitForm'
+  import ProcessService from '@/api/flowable/ProcessService'
   // import UpLoadComponentDialog from '@/views/common/UpLoadComponentDialog'
   // import ProjectInfoForm from './ProjectInfoForm'
   import ProjectRecoredChooseCom from '../projectRecords/ProjectRecordsChooseCom'
@@ -553,7 +571,11 @@
           cwFileInfoList2: [],
           reviewStatus: '',
           taskName: '',
-          realHeaderName: ''
+          realHeaderName: '',
+          procDefId: '',
+          procDefKey: '',
+          formTitle: '',
+          title: ''
         },
         keyWatch: '',
         activeName: 'archiveFile',
@@ -566,11 +588,13 @@
     projectReportService: null,
     enterpriseSearchService: null,
     reportReviewService: null,
+    processService: null,
     created () {
       this.reportReviewService = new ReportReviewService()
       this.enterpriseSearchService = new EnterpriseSearchService()
       this.projectRecordsService = new ProjectRecordsService()
       this.projectReportService = new ProjectReportService()
+      this.processService = new ProcessService()
     },
     deactivated () {
       // 页面关闭(路由跳转)时清除定时器
@@ -581,6 +605,9 @@
       clearInterval(this.interVal)
     },
     computed: {
+      userName () {
+        return JSON.parse(localStorage.getItem('user')).name
+      },
       bus: {
         get () {
           this.$refs.archiveFile.setDividerName('附件', false)
@@ -611,6 +638,7 @@
       SelectTree,
       UserSelect,
       ReportServiceUnitForm,
+      ProcessService,
       // ProjectInfoForm,
       ProjectRecoredChooseCom
       // UpLoadComponentDialog
@@ -715,7 +743,11 @@
           cwFileInfoList: [],
           reviewStatus: '',
           taskName: '',
-          realHeaderName: ''
+          realHeaderName: '',
+          procDefId: '',
+          procDefKey: '',
+          formTitle: '',
+          title: ''
         }
         this.inputForm.id = id
         this.loading = false
@@ -798,6 +830,44 @@
         this.doSubmit('save', callback)
       },
       startForm (callback) {
+        console.log('form' + this.inputForm.signatureType)
+        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 = processTitle
+        this.inputForm.title = title
+
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
             this.loading = true
@@ -841,36 +911,40 @@
         })
       },
       reapplyForm (callback) {
-        if (this.inputForm.signatureType === '1') {
-          this.projectReportService.findBySignatureId(this.inputForm.sid1).then(({data}) => {
-            if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
-              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            } else {
-              this.startForm(callback)
-            }
-          })
-        }
-        if (this.inputForm.signatureType === '2') {
-          this.projectReportService.findBySignatureId(this.inputForm.sid2).then(({data}) => {
-            if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
-              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            } else {
-              this.startForm(callback)
-            }
-          })
-        }
-        if (this.inputForm.signatureType === '3') {
-          this.projectReportService.findBySignatureId(this.inputForm.sid3).then(({data}) => {
-            if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
-              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-              throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            } else {
-              this.startForm(callback)
-            }
-          })
-        }
+        console.log(this.inputForm)
+        this.projectReportService.queryById(this.inputForm.id).then(({data}) => {
+          console.log('info' + data)
+          if (data.signatureType === '1') {
+            this.projectReportService.findBySignatureId(this.inputForm.sid1).then(({data}) => {
+              if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              } else {
+                this.startForm(callback)
+              }
+            })
+          }
+          if (data.signatureType === '2') {
+            this.projectReportService.findBySignatureId(this.inputForm.sid2).then(({data}) => {
+              if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              } else {
+                this.startForm(callback)
+              }
+            })
+          }
+          if (data.signatureType === '3') {
+            this.projectReportService.findBySignatureId(this.inputForm.sid3).then(({data}) => {
+              if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              } else {
+                this.startForm(callback)
+              }
+            })
+          }
+        })
       },
       async agreeForm (callback) {
         if (this.inputForm.signatureType === '1') {

+ 1 - 1
src/views/modules/cw/reportManagement/reportReview/ReportReviewForm.vue

@@ -71,7 +71,7 @@
             <el-col :span="12">
               <el-form-item label="盖章类型" prop="signatureType"
                             :rules="[
-                            {required: true, message: '盖章类型不能为空', trigger: 'change'}
+                            /*{required: true, message: '盖章类型不能为空', trigger: 'change'}*/
                    ]">
                 <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
                 <el-select  v-model="inputForm.signatureType" placeholder="请选择盖章类型" clearable style="width: 100%;">

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

@@ -309,10 +309,24 @@
         if (this.formType === '2') { // 外置表单
           this.$refs.form.startForm((businessTable, businessId, inputForm) => {
             vars = {...vars, ...inputForm}
+            if (inputForm.procDefId) {
+              this.procDefId = inputForm.procDefId
+            }
+            if (inputForm.procDefKey) {
+              this.procDefId = inputForm.procDefKey
+            }
+            if (inputForm.title) {
+              this.title = inputForm.title
+            }
+            if (inputForm.formTitle) {
+              this.formTitle = inputForm.formTitle
+            }
             let assignee = this.auditForm.assignee
             if (!this.commonJS.isEmpty(inputForm.assignee)) {
               assignee = inputForm.assignee
             }
+            console.log(this.procDefId)
+            console.log(this.procDefKey)
             this.taskService.start({
               procDefId: this.procDefId,
               procDefKey: this.procDefKey,
@@ -380,6 +394,10 @@
           }
           this.$refs.form.reapplyForm((businessTable, businessId, inputForm) => {
             vars = {...vars, ...inputForm}
+            console.log('param' + param)
+            if (inputForm.procDefId) {
+              param.procDefId = inputForm.procDefId
+            }
             let assignee = this.auditForm.assignee
             if (!this.commonJS.isEmpty(inputForm.assignee)) {
               assignee = inputForm.assignee