Sfoglia il codice sorgente

修改签字注师流程

sangwenwei 1 anno fa
parent
commit
ce7e2eb842

+ 29 - 1
src/api/cw/reportManagement/ProjectReportService.js

@@ -181,5 +181,33 @@ saveSignatureAnnotator: function (inputForm) {
 		method: 'get',
 		params: {reportId: id}
 	})
-  }
+  },
+	updateAgree: function (data) {
+		return request({
+			url: prefix + '/cwProjectReport/updateAgree',
+			method: 'post',
+			data: data
+		})
+	},
+	getSigById:function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/getSigById',
+			method: 'get',
+			params: {id:id}
+		})
+	},
+	updateStatusByIdSig:function (param) {
+		return request({
+			url: prefix + '/cwProjectReport/updateStatusByIdSig',
+			method: 'post',
+			data: param
+		})
+	},
+	returnRequest:function (param) {
+		return request({
+			url: prefix + '/cwProjectReport/returnRequest',
+			method: 'post',
+			data: param
+		})
+	},
 }

+ 43 - 31
src/views/cw/invoice/InvoiceForm.vue

@@ -9,11 +9,11 @@
       @close="close"
       @keyup.enter.native="doSubmit"
       v-model="visible">
-      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+      <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="method==='view'"
                label-width="160px" @submit.native.prevent>
         <el-divider content-position="left"><i class="el-icon-document"></i>
           基本信息
-          <el-button style="margin-left: 20px" type="primary" :disabled="method==='view'" @click="insertEvent('base')" plain>
+          <el-button style="margin-left: 20px" type="primary"  @click="insertEvent('base')" plain>
             新增
           </el-button>
         </el-divider>
@@ -35,28 +35,28 @@
 			  >
 				  <vxe-table-column field="programName" title="项目名称" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :disabled="method==='view'" :readonly="true" v-model="scope.row.programName"/>
+						  <el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称"  :readonly="true" v-model="scope.row.programName"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="contractName" title="合同名称" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input @focus="openContractForm()" placeholder="请填写合同名称" :disabled="method==='view'" :readonly="true" v-model="scope.row.contractName"/>
+						  <el-input @focus="openContractForm()" placeholder="请填写合同名称"  :readonly="true" v-model="scope.row.contractName"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="programNo" title="项目编号" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input :readonly="true" :disabled="method==='view'" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
+						  <el-input :readonly="true"  placeholder="请填写项目编号" v-model="scope.row.programNo"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input :readonly="true" :disabled="method==='view'" v-model="scope.row.reportNo" placeholder="请填写报告号"/>
+						  <el-input :readonly="true"  v-model="scope.row.reportNo" placeholder="请填写报告号"/>
 					  </template>
 				  </vxe-table-column>
 				  <vxe-table-column   field="account" align="center" title="发票金额(元)" :edit-render="{}">
 					  <template v-slot:edit="scope">
 						  <el-input
-							  :disabled="method==='view'"
+
 							  v-on:input="scope.row.account=scope.row.account.replace(/[^\d.]/g,'')
 							  .replace(/^\./g,'')
 							  .replace(/\.{2,}/g,'.')
@@ -77,7 +77,7 @@
 				  <!--            </vxe-table-column>-->
 				  <vxe-table-column title="操作" width="100">
 					  <template v-slot="scope">
-						  <el-button type="danger" :disabled="method==='view'" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+						  <el-button type="danger"  @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
 					  </template>
 				  </vxe-table-column>
 			  </vxe-table>
@@ -90,7 +90,7 @@
                           :rules="[
                           {required: true, message:'发票类型不能为空', trigger:'blur'}
                  ]">
-              <el-radio v-model="inputForm.type" :disabled="method==='view'" v-for="item in $dictUtils.getDictList('invoice_type')" :label="item.value" style="margin-right: 20px">
+              <el-radio v-model="inputForm.type"  v-for="item in $dictUtils.getDictList('invoice_type')" :label="item.value" style="margin-right: 20px">
                 {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
@@ -106,7 +106,7 @@
                           :rules="[
                           {required: true, message:'开票类型不能为空', trigger:'blur'}
                  ]">
-              <el-radio v-model="inputForm.billingType" :disabled="method==='view'" @change="changeRadio" v-for="item in $dictUtils.getDictList('invoice_billing_type')" :label="item.value" style="margin-right: 20px">
+              <el-radio v-model="inputForm.billingType"  @change="changeRadio" v-for="item in $dictUtils.getDictList('invoice_billing_type')" :label="item.value" style="margin-right: 20px">
                 {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
@@ -129,7 +129,7 @@
                 :value="inputForm.name"
                 :clearable="true"
                 :accordion="true"
-				:disabled="method==='view'"
+
                 @getValue="(value) => {inputForm.name=value}"/>
             </el-form-item>
           </el-col>
@@ -140,7 +140,7 @@
                           :rules="[
                           {required: true, message:'实际开票单位不能为空', trigger:'blur'},{required: true, message:'实际开票单位不能为空', trigger:'change'}
                  ]">
-              <el-input :readonly="true" :disabled="method==='view'" placeholder="请填写实际开票单位" v-model="inputForm.billingWorkplaceReal" @focus="openWorkClientForm()" clearable></el-input>
+              <el-input :readonly="true"  placeholder="请填写实际开票单位" v-model="inputForm.billingWorkplaceReal" @focus="openWorkClientForm()" clearable></el-input>
             </el-form-item>
           </el-col>
           <template v-if="inputForm.type === '1'" style="width: 100%;">
@@ -149,7 +149,7 @@
                             :rules="[
                         {required: true, message:'纳税人识别号不能为空', trigger:'blur'},{required: true, message:'纳税人识别号不能为空', trigger:'change'}
                ]">
-                <el-input :disabled="method==='view'" v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
+                <el-input  v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
@@ -157,7 +157,7 @@
                             :rules="[
                         {required: true, message:'地址不能为空', trigger:'blur'},{required: true, message:'地址不能为空', trigger:'change'}
                ]">
-                <el-input :disabled="method==='view'" v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
+                <el-input  v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
@@ -165,15 +165,15 @@
                             :rules="[
                         {required: true, message:'电话不能为空', trigger:'blur'},{required: true, message:'电话不能为空', trigger:'change'}
                ]">
-                <el-input :disabled="method==='view'" v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
+                <el-input  v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
               </el-form-item>
             </el-col>
-            <el-col v-if="inputForm.billingType === '1'" :span="12">
+            <el-col v-if="inputForm.billingType === '1' && method!=='view'" :span="12">
               <el-form-item label="开户银行" prop="openBank"
                             :rules="[
                         {required: true, message:'开户银行不能为空', trigger:'blur'},{required: true, message:'开户银行不能为空', trigger:'change'}
                ]">
-                <el-select :disabled="method==='view'" v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
+                <el-select  v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
                   <el-option
                     v-for="item in bankList"
                     :key="item.id"
@@ -183,7 +183,14 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col v-if="inputForm.billingType === '1'" :span="12">
+			  <el-col v-else="inputForm.billingType === '1' && method==='view'" :span="12">
+				  <el-form-item label="开户银行" prop="openBank"
+								:rules="[
+               ]">
+					  <el-input :readonly="true"  placeholder="请填写开户银行" v-model="inputForm.openBank" clearable></el-input>
+				  </el-form-item>
+			  </el-col>
+            <el-col v-if="inputForm.billingType === '1'&& method==='view'" :span="12">
               <el-form-item label="银行账号" prop="bankAccount"
                             :rules="[
                         {required: true, message:'银行账号不能为空', trigger:'blur'},{required: true, message:'银行账号不能为空', trigger:'change'}
@@ -197,28 +204,28 @@
               <el-form-item label="纳税人识别号" prop="taxpayerIdentificationNo"
                             :rules="[
                ]">
-                <el-input :disabled="method==='view'" v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
+                <el-input  v-model="inputForm.taxpayerIdentificationNo" placeholder="请填写纳税人识别号" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
               <el-form-item label="地址" prop="address"
                             :rules="[
                ]">
-                <el-input :disabled="method==='view'" v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
+                <el-input  v-model="inputForm.address" placeholder="请填写地址" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
               <el-form-item label="电话" prop="telPhone"
                             :rules="[
                ]">
-                <el-input :disabled="method==='view'" v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
+                <el-input  v-model="inputForm.telPhone" placeholder="请填写电话" clearable></el-input>
               </el-form-item>
             </el-col>
             <el-col v-if="inputForm.billingType === '1'" :span="12">
               <el-form-item label="开户银行" prop="openBank"
                             :rules="[
                ]">
-                <el-select :disabled="method==='view'" v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
+                <el-select  v-model="inputForm.openBank" @change="changeBank" placeholder="请选择开户银行" clearable style="width: 100%;">
                   <el-option
                     v-for="item in bankList"
                     :key="item.id"
@@ -242,7 +249,7 @@
                           :rules="[
                           {required: true, message:'收款类型不能为空', trigger:'blur'}
                  ]">
-              <el-select :disabled="method==='view'" v-model="inputForm.receivablesType" placeholder="请选择收款类型" clearable style="width: 100%;">
+              <el-select  v-model="inputForm.receivablesType" placeholder="请选择收款类型" clearable style="width: 100%;">
                 <el-option
                   v-for="item in $dictUtils.getDictList('invoice_receivables_type')"
                   :key="item.value"
@@ -257,7 +264,7 @@
                           :rules="[
                           {required: true, message:'开票内容不能为空', trigger:'blur'}
                  ]">
-              <el-select :disabled="method==='view'" v-model="inputForm.billingContent" placeholder="请选择开票内容" clearable style="width: 100%;">
+              <el-select  v-model="inputForm.billingContent" placeholder="请选择开票内容" clearable style="width: 100%;">
                 <el-option
                   v-for="item in $dictUtils.getDictList('invoice_billing_content')"
                   :key="item.value"
@@ -288,7 +295,7 @@
                           :rules="[
                         {required: true, message:'是否多张开票不能为空', trigger:'blur'}
                ]">
-              <el-radio :disabled="method==='view'" v-model="inputForm.isMultiple" v-for="item in yesNoFlag" :label="item.value" style="margin-right: 20px">
+              <el-radio  v-model="inputForm.isMultiple" v-for="item in yesNoFlag" :label="item.value" style="margin-right: 20px">
                 {{item.label}}</el-radio>
             </el-form-item>
           </el-col>
@@ -296,7 +303,7 @@
             <el-form-item label="开票内容要求" prop="billingContentTerms"
                           :rules="[
                  ]">
-              <el-input type="textarea" :disabled="method==='view'" maxlength="500" v-model="inputForm.billingContentTerms" placeholder="开票内容要求" show-word-limit></el-input>
+              <el-input type="textarea"  maxlength="500" v-model="inputForm.billingContentTerms" placeholder="开票内容要求" show-word-limit></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -356,7 +363,7 @@
                 :value="inputForm.billingPeopleReal"
                 :clearable="true"
                 :accordion="true"
-				:disabled="method==='view'"
+
                 @getValue="(value) => {inputForm.billingPeopleReal=value}"/>
             </el-form-item>
           </el-col>
@@ -376,7 +383,7 @@
                 :value="inputForm.reconciliationPeople"
                 :clearable="true"
                 :accordion="true"
-				:disabled="method==='view'"
+
                 @getValue="(value) => {inputForm.reconciliationPeople=value}"/>
             </el-form-item>
           </el-col>
@@ -396,7 +403,7 @@
                 :clearable="true"
                 :accordion="true"
 				size="default"
-				:disabled="method==='view'"
+
                 @getValue="(value) => {inputForm.reconciliationArea=value}"/>
             </el-form-item>
           </el-col>
@@ -404,7 +411,7 @@
             <el-form-item label="备注" prop="remarks"
                           :rules="[
                  ]">
-              <el-input maxlength="500" :disabled="method==='view'" type="textarea" placeholder="请填写备注" v-model="inputForm.remarks" show-word-limit></el-input>
+              <el-input maxlength="500"  type="textarea" placeholder="请填写备注" v-model="inputForm.remarks" show-word-limit></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -701,7 +708,8 @@
         importVisible: false,
 		  detailKey: '',
 		  detailKey2: '',
-        yesNoFlag: [{label: '否', value: '0'}, {label: '是', value: '1'}]
+        yesNoFlag: [{label: '否', value: '0'}, {label: '是', value: '1'}],
+	    showSelect:true
       }
     },
     created () {
@@ -722,6 +730,8 @@
         if (receivablesFlag !== true) {
           this.receivablesFlag = false
           this.title = '查看发票信息'
+			this.showSelect=false
+			console.log('1111',this.showSelect)
           if (meth === true || meth === 'true') {
             this.title = '修改发票明细'
             this.detailFlag = true
@@ -800,6 +810,8 @@
                   data.cwWorkClientBillingDTOList.forEach(i => {
                     i.ourBank = i.accountHolder
                     this.bankList.push(i)
+					  console.log('222',i.ourBank)
+				  	this.inputForm.openBank=i.ourBank
                   })
                 } else {
                   this.bankList = []

+ 53 - 17
src/views/cw/reportManagement/ReportManagementList.vue

@@ -256,13 +256,13 @@
                           && scope.row.createById === $store.state.user.id" @click="adjustSign(scope.row)"   text type="primary" >驳回调整</el-button>
 				<!--			   	修改签字注师流程-->
 			    <el-button
-					v-if="scope.row.reviewStatus === '5'&&(scope.row.status1 === '5' || scope.row.status3 === '5')"
+					v-if="scope.row.reviewStatus === '5'&&(scope.row.status1 === '5' || scope.row.status3 === '5')&& (scope.row.signatureAnnotatorStatus ==='5' || scope.row.signatureAnnotatorStatus ==='0' )"
 					text type="primary"
 					@click="updateSignatureAnnotator(scope.row)"
 				>修改签字注师</el-button>
 				<!--				  审核-->
 				  <el-button
-					  v-if="scope.row.signatureAnnotatorStatus === '2'&& checkIsAuditSign(scope.row)"
+					  v-if="scope.row.signatureAnnotatorStatus === '2'&& checkIsAuditSign(scope.row) && scope.row.reviewStatus === '5'&&(scope.row.status1 === '5' || scope.row.status3 === '5')"
 					  text type="primary"
 					  @click="pushSig(scope.row)"
 				  >签字注师审核</el-button>
@@ -272,6 +272,12 @@
 					  text type="primary"
 					  @click="adjustSig(scope.row)"
 				  >签字注师驳回调整</el-button>
+				  <!--				  签字注师撤回-->
+				  <el-button
+					  v-if="scope.row.signatureAnnotatorStatus === '2'&& scope.row.createById === $store.state.user.id "
+					  text type="primary"
+					  @click="rebackSig(scope.row)"
+				  >签字注师撤回</el-button>
               </div>
             </template>
           </vxe-column>
@@ -432,6 +438,7 @@
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then((data) => {
+        	console.log('data',data.records)
           projectRecordsService.getHaveProjectIds().then((data) => {
             if (this.commonJS.isNotEmpty(data)) {
               this.haveProjectIds = data.map(i => {
@@ -1090,13 +1097,15 @@
 			let title = `发起流程【报告-修改签字注师】`
 			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[报告-修改签字注师]`
 			let status = 'startAndClose'
-			 if (row.status === '4') {
-				status = 'reapply'
+			if (row.signatureAnnotatorStatus === '2') {
+				status = 'startAndClose'
+			} else if (row.signatureAnnotatorStatus === '4') {
+				status = 'reapplyFlag'
 			}
 			taskService.getTaskDef({ procDefId: this.processDefinitionSigId,
 				businessId: row.id,
-				businessTable: 'cw_project_report'}).then((data) => {
-					console.log(data)
+				businessTable: 'cw_project_report_signature_annotator'}).then((data) => {
+					console.log('qqq',data)
 				this.$router.push({
 					path: '/flowable/task/TaskForm',
 					query: {
@@ -1107,7 +1116,7 @@
 						formType: data.formType,
 						formUrl: data.formUrl,
 						formTitle: processTitle,
-						businessTable: 'cw_work_client_base',
+						businessTable: 'cw_project_report_signature_annotator',
 						businessId: row.id,
 						isShow: 'false',
 						status: status,
@@ -1118,11 +1127,11 @@
 		},
 		//查看报告-修改签字注师流程信息
 		detailSig(row){
-      	console.log(row)
+      	console.log('sigrow',row)
 			if (row.signatureAnnotatorStatus !== '0' && row.signatureAnnotatorStatus !== '1') {
 				// eslint-disable-next-line eqeqeq
 				taskService.getTaskDef({
-					procInsId: row.procInsId,
+					procInsId: row.procInsSigId,
 					procDefId: this.processDefinitionSigId
 				}).then((data) => {
 					this.$router.push({
@@ -1151,14 +1160,14 @@
 			}
 			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[报告-修改签字注师]'
 			let status = 'startAndClose'
-			if (row.reviewStatus === '3') {
-				status = 'startAndClose'
-			} else if (row.reviewStatus === '4') {
+			if (row.signatureAnnotatorStatus === '3') {
+				status = 'approve'
+			} else if (row.signatureAnnotatorStatus === '4') {
 				status = 'reapplyFlag'
 			}
 			taskService.getTaskDef({ procDefId: this.processDefinitionSigId,
 				businessId: row.id,
-				businessTable: 'cw_project_report'}).then((data) => {
+				businessTable: 'cw_project_report_signature_annotator'}).then((data) => {
 				this.$router.push({
 					path: '/flowable/task/TaskForm',
 					query: {
@@ -1169,7 +1178,7 @@
 						formType: data.formType,
 						formUrl: data.formUrl,
 						formTitle: processTitle,
-						businessTable: 'cw_project_report',
+						businessTable: 'cw_project_report_signature_annotator',
 						businessId: row.id,
 						isShow: 'false',
 						status: status,
@@ -1180,22 +1189,24 @@
 		},
 		//修改签字注师驳回后调整
 		adjustSig(row){
+      	console.log('gg',row)
 			projectReportService.queryById(row.id).then((data) => {
 				if (data.signatureAnnotatorStatus !== '4') { // status的值不等于“驳回”,就弹出提示
 					this.$message.error('数据已发生改变或不存在,请刷新数据')
 					this.refreshList()
 				} else {
-					this.updateSignatureAnnotator(row)
+					this.todoSig(row)
 				}
 			})
   		},
 		//驳回后重新调整
 		todoSig(row){
-      	console.log(row)
+      	console.log('XXX',row)
 			let cUser = false
 			taskService.getTaskDefInfo({
-				taskId: row.taskId
+				taskId: row.taskSigId
 			}).then((data) => {
+				console.log('data',data)
 				this.$router.push({
 					path: '/flowable/task/TaskForm',
 					query: {
@@ -1209,6 +1220,31 @@
 					}
 				})
 			})
+		},
+		/**
+		 * 签字注师撤回
+		 * @param row
+		 */
+		rebackSig(row){
+			this.$confirm(`确定要撤回该申请吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				projectReportService.queryById(row.id).then((data) => {
+					if (data.signatureAnnotatorStatus !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						processService.revokeProcIns(row.procInsSigId).then((data) => {
+							let form = {signatureAnnotatorStatus: '0', id: row.id}
+							projectReportService.updateStatusByIdSig(form)
+							this.$message.success(data)
+							this.refreshList()
+						})
+					}
+				})
+			})
 		}
     }
   }

+ 138 - 56
src/views/cw/reportManagement/ReportSignatureForm.vue

@@ -674,6 +674,18 @@
 						</el-tab-pane>
 					</el-tabs>
 				</el-form>
+				<el-form :class="method==='view'?'readonly':''">
+					<el-row :gutter="15">
+					<el-col style="margin-top: 15px">
+						<el-form-item label="修改原因" prop="sigReason"
+									  :rules="[
+							  {required: true, message:'修改原因不能为空', trigger:'blur'}
+                   ]">
+							<el-input type="textarea" :disabled="status === 'audit' || status === 'taskFormDetail'" v-model="inputForm.sigReason" placeholder="请填写修改签字注师原因" clearable></el-input>
+						</el-form-item>
+					</el-col>
+					</el-row>
+				</el-form>
 			</el-col>
 		</el-row>
 		<ProjectRecoredChooseCom  ref="projectRecoredChooseCom" @getProject="getContract"></ProjectRecoredChooseCom>
@@ -710,6 +722,10 @@
 			status: {
 				type: String,
 				default: ''
+			},
+			sigId: {
+				type: String,
+				default: ''
 			}
 		},
 		data () {
@@ -785,13 +801,16 @@
 					reviewComments0:'',
 					reviewComments1:'',
 					reviewComments2:'',
+					reason:''
 				},
 				keyWatch: '',
 				activeName: 'enclosure',
 				tableKey: '',
 				tableKeyClient: '1',
 				tableKeyClient2: '1',
-				tableKeyClient3: '1'
+				tableKeyClient3: '1',
+				sigReason:'',
+				sigId:''
 			}
 		},
 		ReportCancellApplyService: null,
@@ -920,7 +939,8 @@
 					projectMasterId1: '',
 					projectMasterId2: '',
 					industry: '',
-					businessObjects: ''
+					businessObjects: '',
+					sigReason: ''
 				}
 				this.inputForm.id = id
 				this.loading = false
@@ -932,42 +952,57 @@
 					// this.$refs.inputForm.resetFields()
 
 					this.loading = true
-					projectReportService.queryById(this.inputForm.id).then((data) => {
-						// this.$refs.uploadComponent.clearUpload()
-						this.inputForm = this.recover(this.inputForm, data)
-						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')
-						}
-						if (this.commonJS.isEmpty(data.details)) {
-							this.reportReviewService.list('1').then((data) => { this.detailDivide(data) })
-						} else {
-							this.detailDivide(data.details)
-						}
-						if (this.commonJS.isNotEmpty(data.procInsId)) {
-							this.reportReviewService.getProcessStatus(data.procInsId).then((data) => {
-								this.inputForm.taskName = data
-							})
-						}
-						if (data.reviewBys) {
-							data.reviewBys.forEach(re => {
-								let va = {
-									label: re.name,
-									value: re.sysUserId
+					// projectReportService.getByName(this.inputForm.)
+						projectReportService.getSigById(this.inputForm.id).then((res)=>{
+							if (this.commonJS.isEmpty(res.id)){
+								this.sigId=this.inputForm.id
+							}else {
+								this.sigId=res.reportId
+								if (status === 'startAndClose'){
+									this.sigReason = ""
+								}else {
+									this.sigReason=res.reason
 								}
-								this.reviewBys.push(va)
+							}
+							console.log('sigReason',this.sigReason)
+							projectReportService.queryById(this.sigId).then((data) => {
+								// this.$refs.uploadComponent.clearUpload()
+								this.inputForm = this.recover(this.inputForm, data)
+								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')
+								}
+								if (this.commonJS.isEmpty(data.details)) {
+									this.reportReviewService.list('1').then((data) => { this.detailDivide(data) })
+								} else {
+									this.detailDivide(data.details)
+								}
+								if (this.commonJS.isNotEmpty(data.procInsId)) {
+									this.reportReviewService.getProcessStatus(data.procInsId).then((data) => {
+										this.inputForm.taskName = data
+									})
+								}
+								if (data.reviewBys) {
+									data.reviewBys.forEach(re => {
+										let va = {
+											label: re.name,
+											value: re.sysUserId
+										}
+										this.reviewBys.push(va)
+									})
+								}
+								if (this.status === 'taskFormDetail' || this.status === 'audit') {
+									this.method = 'view'
+								} else {
+									this.method = 'false'
+								}
+								this.$refs.enclosure.newUpload(this.method, data.cwFileInfoList2, 'cwWorkContract', null, null, null, null, false)
+								this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
+								this.$refs.signatureFile.newUpload('view', data.signatureFileList, 'cwWorkContract', null, null, null, null, false)
+								this.loading = false
 							})
-						}
-						if (this.status === 'taskFormDetail' || this.status === 'audit') {
-							this.method = 'view'
-						} else {
-							this.method = 'false'
-						}
-						this.$refs.enclosure.newUpload(this.method, data.cwFileInfoList2, 'cwWorkContract', null, null, null, null, false)
-						this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
-						this.$refs.signatureFile.newUpload('view', data.signatureFileList, 'cwWorkContract', null, null, null, null, false)
-						this.loading = false
-					})
+						})
+
 				})
 			},
 			detailDivide (details) {
@@ -1002,33 +1037,44 @@
 				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
 					projectReportService.queryById(this.inputForm.id).then((data) => {
 						console.log(data)
-						this.doSubmit('start', callback)
+						this.doSubmit('startAndClose', callback)
 					})
-				} else {
-					this.doSubmit('start', callback)
 				}
 			},
 			async agreeForm (callback) {
 				this.loading = true
-				await projectReportService.queryById(this.inputForm.id).then((data) => {
+				await projectReportService.queryById(this.sigId).then((data) => {
 					if (data.signatureAnnotatorStatus !== '2') { // 审核状态不是“待审核”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 						throw new Error()
 					} else {
-						this.doSubmit('agree', callback)
+						this.inputForm.signatureAnnotatorStatus = '5'
+						projectReportService.updateAgree(this.inputForm).then((da) => {
+							callback(da.businessTable, da.businessId, this.inputForm)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
 					}
 				})
 			},
 			reapplyForm (callback) {
 				this.loading = true
-				projectReportService.queryById(this.inputForm.id).then((data) => {
+				projectReportService.queryById(this.sigId).then((data) => {
 					if (data.signatureAnnotatorStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
 						this.loading = false
 						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 					} else {
-						this.doSubmit('reapply', callback)
+						this.inputForm.signatureAnnotatorStatus = '2'
+						this.inputForm.assignee = this.inputForm.reviewBy
+						projectReportService.updateAgree(this.inputForm).then((da) => {
+							callback(da.businessTable, da.businessId, this.inputForm)
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+						})
 					}
 				})
 			},
@@ -1067,19 +1113,16 @@
 						}
 					});
 					return
-				} else if (status === 'start') {
+				} else if (status === 'startAndClose') {
 					// 送审  待审核
 					this.inputForm.signatureAnnotatorStatus = '2'
 					this.inputForm.assignee = this.inputForm.reviewBy
-				} else if (status === 'agree') {
+				} else if (status === 'approve') {
 					// 审核同意
-					// this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
-					// this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD')
-					// this.inputForm.agreeUserId = this.$store.state.user.id
 					this.inputForm.signatureAnnotatorStatus = '5'
-				} else if (status === 'reapplyFlag') {
-					this.inputForm.signatureAnnotatorStatus = '4'
-					// this.inputForm.assignee = this.inputForm.reviewBy
+				} else if (status === 'reapplyFlag'){
+					this.inputForm.signatureAnnotatorStatus = '2'
+					this.inputForm.assignee = this.inputForm.reviewBy
 				}
 				this.$refs['inputForm2'].validate((valid) => {
 					if (valid) {
@@ -1092,6 +1135,12 @@
 						this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
 						this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
 						this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
+						//校验修改原因
+						if (this.commonJS.isEmpty(this.inputForm.sigReason)) {
+							this.$message.error("修改原因未填写,请填写")
+							this.loading = false
+							return
+						}
 						//根据签字注师1的人员id去查是否超过了100次
 						userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
 							if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
@@ -1114,11 +1163,44 @@
 				})
 			},
 			async updateStatusById (type, callback) {
+				console.log("type",type)
 				this.loading = true
-				let param = {signatureAnnotatorStatus: '4', id: this.inputForm.id}
-				projectReportService.updateSigStatusById(param)
-				callback()
-				this.loading = false
+				if (type === 'reject') {
+					await projectReportService.queryById(this.inputForm.id).then((data) => {
+						if (data.signatureAnnotatorStatus !== '2') { // status的值不等于“审核中”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							if (type ==='reject'){
+								this.inputForm.signatureAnnotatorStatus='4'
+								projectReportService.updateSigStatusById(this.inputForm).then(() => {
+									callback()
+									this.loading = false
+								})
+							}
+						}
+					})
+				} else if (type === 'hold'){
+					await projectReportService.queryById(this.inputForm.id).then((data) => {
+						if (data.signatureAnnotatorStatus !== '4') { // status的值不等于“审核中”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							if (type === 'hold') {
+								// 终止
+								let param = {id: this.inputForm.id}
+								projectReportService.returnRequest(param).then(() => {
+									callback()
+									this.loading = false
+								})
+							}
+
+						}
+					})
+				}
+
 			},
 			// 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
 			rejectOn (callback) {
@@ -1131,7 +1213,7 @@
 				this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
 				this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
 				param = {signatureAnnotatorStatus: this.inputForm.signatureAnnotatorStatus,
-					id: this.inputForm.id,
+					id: this.sigId,
 					needUpdate2: this.inputForm.needUpdate2,
 					needUpdate3: this.inputForm.needUpdate3,
 					remark2: this.inputForm.remark2,

+ 2 - 0
src/views/flowable/task/TaskFormDetail.vue

@@ -147,6 +147,7 @@
 					<vxe-column min-width="160" align="center" title="签字注师1" field="signatureAnnotator1"></vxe-column>
 					<vxe-column min-width="160" align="center" title="签字注师2" field="signatureAnnotator2"></vxe-column>
 					<vxe-column min-width="160" align="center" title="修改人" field="userName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="修改原因" field="reason"></vxe-column>
 					<vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
 				</vxe-table>
 			</el-tab-pane>
@@ -290,6 +291,7 @@ export default {
 			if (event.props.name === 'form-eighth') {
 				if (this.commonJS.isNotEmpty(this.sigId)) {
 					projectReportService.findByReportId(this.sigId).then((data) => {
+						console.log('data',data)
 						this.sigHiCollect = data
 					})
 				}

+ 2 - 0
src/views/flowable/task/TodoList.vue

@@ -258,6 +258,7 @@ export default {
 					...this.searchForm,
 				})
 				.then((data) => {
+					console.log('zzz',data.records)
 					this.dataList = data.records;
 					this.tablePage.total = data.total;
 					this.loading = false;
@@ -283,6 +284,7 @@ export default {
 			this.refreshList();
 		},
 		todo(row) {
+			console.log('row',row)
 			//页面跳转后返回当前页筛选项仍保留
 			let _data = Object.assign(this.searchParams, {});//将筛选项存入到data中
 			sessionStorage.setItem('nowPageData', JSON.stringify(_data));//存入到sessionStorage中