Browse Source

会计质量复核和签章功能整合

user5 1 year ago
parent
commit
bc8c6410fa

+ 7 - 0
src/api/cw/reportManagement/ProjectReportService.js

@@ -175,6 +175,13 @@ saveSignatureAnnotator: function (inputForm) {
       params: {reportId: id}
     })
   },
+	rebackReviewSign: function (id) {
+    return request({
+      url: prefix + '/cwProjectReport/rebackReviewSign',
+      method: 'get',
+      params: {reportId: id}
+    })
+  },
   findByReportId:function (id) {
 	return request({
 		url: prefix + '/cwProjectReport/getSignatureAnnotatorList',

+ 48 - 23
src/views/cw/reportManagement/ReportManagementList.vue

@@ -48,7 +48,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item v-if="showHideItem" label="复核状态" prop="reviewStatus">
+      <el-form-item v-if="showHideItem" label="复核签章状态" prop="reviewStatus">
         <el-select v-model="searchForm.reviewStatus" placeholder="请选择" style="width:100%;">
           <el-option
             v-for="item in $dictUtils.getDictList('cw_status')"
@@ -58,7 +58,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item v-if="showHideItem" label="签章状态" prop="status1">
+      <el-form-item v-if="showHideItem" label="签章状态(原)" prop="status1">
         <el-select v-model="searchForm.status1" placeholder="请选择" style="width:100%;">
           <el-option
             v-for="item in $dictUtils.getDictList('cw_status')"
@@ -147,33 +147,36 @@
 <!--          <vxe-column min-width="160" align="center" title="报告主办人" field="reportSponsor"></vxe-column>-->
           <vxe-column min-width="160" align="center" title="创建人" field="userName"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
-          <vxe-column  min-width="120px" align="center" fixed="right" title="复核状态" field="reviewStatus" >
+          <vxe-column  min-width="230px" align="center" fixed="right" title="复核签章状态" field="reviewStatus" >
             <template #default="scope">
               <el-button @click="detail(scope.row)" effect="dark"
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.reviewStatus, '-')">
                 {{$dictUtils.getDictLabel("cw_status", scope.row.reviewStatus, '-')}}
               </el-button>
+
+				<el-button v-if="scope.row.signatureType === '1' && scope.row.newType === '0'" @click="detailS(scope.row)" effect="dark"
+						   :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status1, '-')">
+					{{scope.row.status1 === '5' ? '电子章已完成' : $dictUtils.getDictLabel("cw_status", scope.row.status1, '-')}}
+				</el-button>
+				<el-button v-else-if="scope.row.signatureType === '2' && scope.row.newType === '0'" @click="detailS2(scope.row)" effect="dark"
+						   :type="$dictUtils.getDictLabel('cw_project_report_sign_status_flag', scope.row.status2, '-')">
+					{{$dictUtils.getDictLabel("cw_project_report_sign_status", scope.row.status2, '-')}}
+				</el-button>
+				<el-button v-else-if="scope.row.signatureType === '3' && scope.row.newType === '0'" @click="detailS3(scope.row)" effect="dark"
+						   :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status3, '-')">
+					{{scope.row.status3 === '5' ? '实体章已完成' : $dictUtils.getDictLabel("cw_status", scope.row.status3, '-')}}
+				</el-button>
+				<el-button v-else-if="scope.row.newType === '0'" effect="dark" >
+					未发起
+				</el-button>
+
             </template>
           </vxe-column>
-          <vxe-column  min-width="150px" align="center" fixed="right" title="签章状态" >
+          <!--<vxe-column  min-width="150px" align="center" fixed="right" title="签章状态" >
             <template #default="scope">
-              <el-button v-if="scope.row.signatureType === '1'" @click="detailS(scope.row)" effect="dark"
-                          :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status1, '-')">
-                {{scope.row.status1 === '5' ? '电子章已完成' : $dictUtils.getDictLabel("cw_status", scope.row.status1, '-')}}
-              </el-button>
-              <el-button v-else-if="scope.row.signatureType === '2'" @click="detailS2(scope.row)" effect="dark"
-                          :type="$dictUtils.getDictLabel('cw_project_report_sign_status_flag', scope.row.status2, '-')">
-                {{$dictUtils.getDictLabel("cw_project_report_sign_status", scope.row.status2, '-')}}
-              </el-button>
-              <el-button v-else-if="scope.row.signatureType === '3'" @click="detailS3(scope.row)" effect="dark"
-                         :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status3, '-')">
-                {{scope.row.status3 === '5' ? '实体章已完成' : $dictUtils.getDictLabel("cw_status", scope.row.status3, '-')}}
-              </el-button>
-              <el-button v-else effect="dark" >
-                未发起
-              </el-button>
+
             </template>
-          </vxe-column>
+          </vxe-column>-->
 			<vxe-column  min-width="120px" align="center" fixed="right" title="修改注师" field="signatureAnnotatorStatus" >
 				<template #default="scope">
 					<el-button @click="detailSig(scope.row)" effect="dark"
@@ -203,12 +206,18 @@
                           (scope.row.signatureType === '3' && (scope.row.status3 === '0'||scope.row.status3 === '1'||scope.row.status3 === '3'))
                       )" text type="primary" @click="del(scope.row.id)">删除</el-button>
                 <!-- 签章撤回 (只有管理员在签章完成后可使用此功能)-->
-                <el-button v-if="(
+                <el-button v-if="((
                                   (scope.row.signatureType === '1' && scope.row.status1 === '5') ||
                                   (scope.row.signatureType === '2' && scope.row.status2 === '5') ||
-                                  (scope.row.signatureType === '3' && scope.row.status3 === '5')
-                                  )"
+                                  (scope.row.signatureType === '3' && scope.row.status3 === '5'))
+                                   && scope.row.newType === '0')"
 						   text type="primary" @click="rebackSign(scope.row)">撤回签章</el-button>
+				  <el-button v-if="((
+                                  (scope.row.signatureType === '1' && scope.row.status1 === '5') ||
+                                  (scope.row.signatureType === '2' && scope.row.status2 === '5') ||
+                                  (scope.row.signatureType === '3' && scope.row.status3 === '5'))
+                                   && scope.row.newType !== '0')"
+							 text type="primary" @click="rebackReviewSign(scope.row)">撤回复核签章</el-button>
               </div>
               <div v-else>
                 <el-button v-if="hasPermission('cwProjectReport:edit')&&
@@ -1017,6 +1026,22 @@
           })
         })
       },
+      // 撤回复核签章
+      rebackReviewSign (row) {
+        this.$confirm(`确定要撤回已完成的复核并重新签章吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          projectReportService.rebackReviewSign(row.id).then(() => {
+            this.refreshList()
+            this.$message.success('签章已撤回')
+          }).catch(() => {
+            this.refreshList()
+            this.$message.error('签章已撤回')
+          })
+        })
+      },
       // 驳回后调整
       adjustReview (row) {
         projectReportService.queryById(row.id).then((data) => {

+ 114 - 38
src/views/cw/reportManagement/reportReviewNew/ReportReviewFormNew.vue

@@ -67,12 +67,12 @@
                   @getValue="(value) => {inputForm.officeId=value}"/>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <!--<el-col :span="12">
               <el-form-item label="盖章类型" prop="signatureType"
                             :rules="[
                             /*{required: true, message: '盖章类型不能为空', trigger: 'change'}*/
                    ]">
-                <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
+                &lt;!&ndash;                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>&ndash;&gt;
                 <el-select  v-model="inputForm.signatureType" placeholder="请选择盖章类型" clearable style="width: 100%;">
                   <el-option
                     v-for="item in $dictUtils.getDictList('cw_signature_type')"
@@ -82,7 +82,39 @@
                   </el-option>
                 </el-select>
               </el-form-item>
-            </el-col>
+            </el-col>-->
+			<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%;">
+					  <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 v-if="inputForm.signatureType === '1'|| inputForm.signatureType === '3' || commonJS.isEmpty(inputForm.signatureType)" :span="12">
               <el-form-item label="签字注师1" prop="signatureAnnotator1"
@@ -401,7 +433,7 @@
                             :rules="[
                               {required: true, message:'下一节点审核人不能为空', trigger:'blur'}
                    ]">
-                <el-select v-model="inputForm.reviewBy" placeholder="请选择下一节点审核人" style="width:100%;">
+                <el-select :disabled="this.inputForm.reviewStatus === '2' || this.inputForm.reviewStatus === '4' || this.inputForm.reviewStatus === '5'" v-model="inputForm.reviewBy" placeholder="请选择下一节点审核人" style="width:100%;">
                   <el-option
                     v-for="item in reviewBys"
                     :key="item.index"
@@ -670,15 +702,23 @@
             <!--        附件-->
             <UpLoadComponent ref="enclosure"></UpLoadComponent>
           </el-tab-pane>
-          <el-tab-pane label="签章文件" name="archiveFile">
-            <!--        签章文件-->
-            <UpLoadComponent2 ref="archiveFile" @clickSign="clickSign"></UpLoadComponent2>
-          </el-tab-pane>
-          <el-tab-pane label="已签章附件" name="signatureFile">
-            <!--        附件-->
-            <UpLoadComponent2 ref="signatureFile"></UpLoadComponent2>
-          </el-tab-pane>
         </el-tabs>
+
+		<el-tabs v-model="signatureName" type="border-card" @tab-click="tabHandleClick">
+
+		  <el-tab-pane name="archiveFile">
+			  <template v-slot:label>
+				  <span><!--<span style="color: red;border-top: 20px">*</span>--> 签章文件</span>
+			  </template>
+			  <!--        签章文件-->
+			  <UpLoadComponent2 ref="archiveFile" @clickSign="clickSign"></UpLoadComponent2>
+		  </el-tab-pane>
+		  <el-tab-pane label="已签章附件" name="signatureFile">
+			  <!--        附件-->
+			  <UpLoadComponent2 ref="signatureFile"></UpLoadComponent2>
+		  </el-tab-pane>
+		</el-tabs>
+
       </el-col>
     </el-row>
     <ProjectRecoredChooseCom  ref="projectRecoredChooseCom" @getProject="getContract"></ProjectRecoredChooseCom>
@@ -790,9 +830,16 @@
 		  reviewComments0:'',
 		  reviewComments1:'',
 		  reviewComments2:'',
+		  sid1:'',
+		  sid2:'',
+			reviewProcInsId: '',
+			status1:'',
+			status2:'',
+			status3:'',
         },
         keyWatch: '',
         activeName: 'enclosure',
+		  signatureName: 'archiveFile',
         tableKey: '',
         tableKeyClient: '1',
         tableKeyClient2: '1',
@@ -860,6 +907,7 @@
       init (method, id) {
         console.log('method', method)
         this.activeName = 'enclosure'
+        this.signatureName = 'archiveFile'
         this.reportCancellApplyService = new ReportCancellApplyService()
         this.reportReviewService = new ReportReviewService()
         this.method = method
@@ -926,8 +974,14 @@
           projectMasterId1: '',
           projectMasterId2: '',
           industry: '',
-          businessObjects: ''
-        }
+          businessObjects: '',
+			sid1:'',
+			sid2:'',
+			reviewProcInsId: '',
+			status1:'',
+			status2:'',
+			status3:'',
+        },
         this.inputForm.id = id
         this.loading = false
         this.$refs.enclosure.clearUpload()
@@ -941,6 +995,8 @@
           projectReportService.queryById(this.inputForm.id).then((data) => {
             // this.$refs.uploadComponent.clearUpload()
             this.inputForm = this.recover(this.inputForm, data)
+			  console.log(data)
+			  console.log(this.inputForm.status1)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD')
@@ -987,29 +1043,38 @@
 			  }
 
 			  this.reportReviewService.queryByReportId(this.inputForm.id).then((review) => {
-				  this.commonApi.getTaskNameByProcInsId(review.procInsId).then((da) => {
+			  	if(review.procInsId){
+			  		this.inputForm.reviewProcInsId = review.procInsId
+					this.commonApi.getTaskNameByProcInsId(review.procInsId).then((da) => {
+
+						if (da === '三级复核及签章') {
+							if (this.commonJS.isNotEmpty(sFiles) && this.inputForm.signatureType !== '3' && this.status === 'audit') {
+								console.log('建立了')
+								// 签章按钮展示
+								this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwReportSignature', null, null, null, null, false, 'audit')
+								if (this.status === 'audit' && this.commonJS.isNotEmpty(sFiles) && this.inputForm.signatureType !== '3') {
+									this.$emit('callBackFunc', 'hide')
+									this.jobScheduler()
+								}
+							} else {
+								// 签章按钮隐藏
+								this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
+							}
+						} else if (da === '二级复核') {
+							// 签章按钮隐藏
+							this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
+						} else {
+							if(this.inputForm.reviewStatus !== '2' && this.inputForm.reviewStatus !== '5'){
+								// 签章按钮隐藏
+								this.$refs.archiveFile.newUpload('add', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
+							}else{
+								// 签章按钮隐藏
+								this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
+							}
+						}
+					})
+				}
 
-					  if (da === '三级复核及签章') {
-						  if (this.commonJS.isNotEmpty(sFiles) && this.inputForm.signatureType !== '3' && this.status === 'audit') {
-							console.log('建立了')
-						  	// 签章按钮展示
-							  this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwReportSignature', null, null, null, null, false, 'audit')
-							  if (this.status === 'audit' && this.commonJS.isNotEmpty(sFiles) && this.inputForm.signatureType !== '3') {
-								  this.$emit('callBackFunc', 'hide')
-								  // this.jobScheduler()
-							  }
-						  } else {
-							  // 签章按钮隐藏
-							  this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
-						  }
-					  } else if (da === '二级复核') {
-						  // 签章按钮隐藏
-						  this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
-					  } else {
-						  // 签章按钮隐藏
-						  this.$refs.archiveFile.newUpload('add', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
-					  }
-				  })
 			  })
 
             this.$refs.enclosure.newUpload(this.method, data.cwFileInfoList2, 'cwWorkContract', null, null, null, null, false)
@@ -1185,8 +1250,18 @@
 						  this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
 						  console.log('this.inputForm', this.inputForm)
 						  projectReportService.saveForm(this.inputForm).then((da) => {
-							  callback(data.businessTable, data.businessId, this.inputForm)
-							  this.loading = false
+							  this.commonApi.getTaskNameByProcInsId(this.inputForm.reviewProcInsId).then((data) => {
+								  if (data === '三级复核及签章') {//如果是三级复核及签章阶段审核通过,则需要再归档中添加一条归档记录信息
+									  projectReportService.saveReportArchive(this.inputForm.id).then(() => {
+										  let table = 'cw_project_report_signature'
+										  callback(table, this.inputForm.sid1, this.inputForm)
+										  this.loading = false
+									  })
+								  }else{
+									  callback(data.businessTable, data.businessId, this.inputForm)
+									  this.loading = false
+								  }
+							  })
 						  }).catch(() => {
 							  this.loading = false
 						  })
@@ -1460,6 +1535,7 @@
 		jobScheduler () {
 			this.interVal = setInterval(() => {
 				console.log('正在访问签章状态...')
+				console.log(this.inputForm)
 				if (this.inputForm.signatureType === '1') {
 					projectReportService.getAuditNodeByReportId(this.inputForm.sid1).then((data) => {
 						console.log('进来了', data)