瀏覽代碼

复核调整

wangqiang 1 年之前
父節點
當前提交
71947ad19e

+ 23 - 2
src/api/cw/reportManagement/ProjectReportService.js

@@ -44,14 +44,35 @@ export default {
 			params: {id: id}
 		})
 	},
+	queryBySignAndIssueId: function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/queryBySignAndIssueId',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	queryByOnlineArchivingId: function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/queryByOnlineArchivingId',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	queryByPaperArchivingId: function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/queryByPaperArchivingId',
+			method: 'get',
+			params: {id: id}
+		})
+	},
 	/*
 	根据项目id,与报告id查询附件信息
 	 */
-	getAttachmentList(projectId,id){
+	getAttachmentList(projectId,id,type){
 		return request({
 			url: prefix + '/cwProjectReport/getAttachmentList',
 			method: 'get',
-			params: {projectId:projectId, id: id}
+			params: {projectId:projectId, id: id,type: type}
 		})
 	},
 	queryById2: function (id) {

+ 26 - 0
src/api/cw/reportManagement/ReportOnlineArchivingService.js

@@ -0,0 +1,26 @@
+import request from '@/utils/httpRequest';
+import { FINANCE_PATH as prefix } from "../../AppPath";
+
+export default {
+	queryByReportId: function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/onlineArchiving/queryByReportId',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusByReportId: function (data) {
+		return request({
+			url: prefix + '/cwProjectReport/onlineArchiving/updateStatusByReportId',
+			method: 'post',
+			data: data
+		})
+	},
+	saveForm: function (param) {
+		return request({
+			url: prefix + '/cwProjectReport/onlineArchiving/saveForm',
+			method: 'post',
+			data: param
+		})
+	}
+}

+ 26 - 0
src/api/cw/reportManagement/ReportPaperArchivingService.js

@@ -0,0 +1,26 @@
+import request from '@/utils/httpRequest';
+import { FINANCE_PATH as prefix } from "../../AppPath";
+
+export default {
+	queryByReportId: function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/paperArchiving/queryByReportId',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+	updateStatusByReportId: function (data) {
+		return request({
+			url: prefix + '/cwProjectReport/paperArchiving/updateStatusByReportId',
+			method: 'post',
+			data: data
+		})
+	},
+	saveForm: function (param) {
+		return request({
+			url: prefix + '/cwProjectReport/paperArchiving/saveForm',
+			method: 'post',
+			data: param
+		})
+	}
+}

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

@@ -58,6 +58,13 @@ export default class ReportReviewService {
       params: {id: id}
     })
   }
+	getUserInfo (id) {
+    return request({
+      url: prefix + '/projectReport/review/getUserInfo',
+      method: 'get',
+      params: {id: id}
+    })
+  }
   getProcessStatus (id) {
     return request({
       url: prefix + '/projectReport/review/getProcessStatus',

+ 33 - 0
src/api/cw/reportManagement/ReportSignAndIssueService.js

@@ -0,0 +1,33 @@
+import request from '@/utils/httpRequest';
+import { FINANCE_PATH as prefix } from "../../AppPath";
+
+export default class ReportSignAndIssueService {
+	queryByReportId (id) {
+		return request({
+			url: prefix + '/cwProjectReport/signAndIssue/queryByReportId',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+	updateStatusByReportId (data) {
+		return request({
+			url: prefix + '/cwProjectReport/signAndIssue/updateStatusByReportId',
+			method: 'post',
+			data: data
+		})
+	}
+	saveForm (param) {
+		return request({
+			url: prefix + '/cwProjectReport/signAndIssue/saveForm',
+			method: 'post',
+			data: param
+		})
+	}
+	delete(id) {
+		return request({
+			url: prefix + '/cwProjectReport/signAndIssue/delete',
+			method: 'delete',
+			params: {id: id}
+		})
+	}
+}

+ 2 - 2
src/views/cw/invoice/InvoiceFormTask.vue

@@ -301,7 +301,7 @@
 			  >
 				  <el-select v-model="inputForm.reportType" placeholder="请选择项目类别" clearable style="width: 100%;">
 					  <el-option
-						  v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+						  v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
 						  :key="item.value"
 						  :label="item.label"
 						  :value="item.value">
@@ -315,7 +315,7 @@
 			  >
 				  <el-select v-model="inputForm.reportType" placeholder="请选择项目类别" clearable style="width: 100%;">
 					  <el-option
-						  v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+						  v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
 						  :key="item.value"
 						  :label="item.label"
 						  :value="item.value">

+ 2 - 2
src/views/cw/invoice/InvoiceList.vue

@@ -159,7 +159,7 @@
 			  v-if="showHideItem" label="报备类型" prop="reportType">
 			  <el-select v-model="searchForm.reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
 				  <el-option
-					  v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+					  v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
 					  :key="item.value"
 					  :label="item.label"
 					  :value="item.value">
@@ -235,7 +235,7 @@
           <vxe-column min-width="150" title="发票金额(元)" align="center" field="account"></vxe-column>
           <vxe-column min-width="150" title="报备类型" align="center" field="reportType">
 			  <template #default="scope">
-				  {{$dictUtils.getDictLabel('cw_work_client_report_type', scope.row.reportType, '')}}
+				  {{$dictUtils.getDictLabel('program_cost_audit_type', scope.row.reportType, '')}}
 			  </template>
 		  </vxe-column>
           <vxe-column min-width="120" title="开票内容" align="center" field="billingContent">

+ 1 - 1
src/views/cw/invoice/InvoiceUpdateForm.vue

@@ -287,7 +287,7 @@
 			  >
 				  <el-select v-model="inputForm.reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
 					  <el-option
-						  v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+						  v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
 						  :key="item.value"
 						  :label="item.label"
 						  :value="item.value">

+ 7 - 6
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -169,7 +169,7 @@
                   ]">
                     <el-select v-model="inputForm.reportType" placeholder="请选择项目类别" clearable style="width: 100%;">
                       <el-option
-                        v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+                        v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
                         :key="item.value"
                         :label="item.label"
                         :value="item.value">
@@ -216,8 +216,9 @@
                   <el-form-item label="现场负责人" prop="projectLeaderId"
                                 :rules="[
                    ]">
-                    <UserSelectSignatory :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelectSignatory>
-                  </el-form-item>
+<!--                    <UserSelectSignatory :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelectSignatory>-->
+					  <UserSelectForQualification :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelectForQualification>
+				  </el-form-item>
                 </el-col>
 				  <el-col :span="12">
 					  <el-form-item label="项目经理1" prop="projectMasterId"
@@ -644,9 +645,9 @@
             if (this.commonJS.isEmpty(this.inputForm.cwProjectClientInfoDTOList)) {
               this.inputForm.cwProjectClientInfoDTOList = []
             }
-            if (this.commonJS.isEmpty(this.inputForm.projectLeaderId)) {
-              this.inputForm.projectLeaderId = this.$store.state.user.id
-            }
+            // if (this.commonJS.isEmpty(this.inputForm.projectLeaderId)) {
+            //   this.inputForm.projectLeaderId = this.$store.state.user.id
+            // }
             if (this.commonJS.isEmpty(this.inputForm.projectMoney)) {
               this.inputForm.projectMoney = ''
             }

+ 3 - 2
src/views/cw/projectRecords/ProjectRecordsForm.vue

@@ -172,7 +172,7 @@
                   ]">
                     <el-select v-model="inputForm.reportType" placeholder="请选择项目类别" clearable style="width: 100%;">
                       <el-option
-                        v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+                        v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
                         :key="item.value"
                         :label="item.label"
                         :value="item.value">
@@ -219,7 +219,8 @@
                   <el-form-item label="现场负责人" prop="projectLeaderId"
                                 :rules="[
                    ]">
-                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :modleValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>
+					  <UserSelectForQualification :readonly="true" :disabled="method === 'view'" :limit='1' :modelValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelectForQualification>
+<!--                    <UserSelect :readonly="true" :disabled="method === 'view'" :limit='1' :modleValue="inputForm.projectLeaderId" @update:modelValue='(value) => {inputForm.projectLeaderId = value}'></UserSelect>-->
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">

+ 1 - 1
src/views/cw/projectRecords/ProjectRecordsList.vue

@@ -50,7 +50,7 @@
 		<el-form-item v-if="showHideItem" label="报备类型" prop="filingType">
 			<el-select v-model="searchForm.reportType" placeholder="请选择" style="width:100%;">
 				<el-option
-					v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+					v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
 					:key="item.value"
 					:label="item.label"
 					:value="item.value">

+ 1 - 1
src/views/cw/projectRecords/ProjectRecordsList2.vue

@@ -50,7 +50,7 @@
 		<el-form-item v-if="showHideItem" label="报备类型" prop="filingType">
 			<el-select v-model="searchForm.reportType" placeholder="请选择" style="width:100%;">
 				<el-option
-					v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+					v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
 					:key="item.value"
 					:label="item.label"
 					:value="item.value">

+ 1 - 1
src/views/cw/projectRecords/ProjectRecordsTaskForm.vue

@@ -150,7 +150,7 @@
                   ]">
                     <el-select v-model="inputForm.reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
                       <el-option
-                        v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+                        v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
                         :key="item.value"
                         :label="item.label"
                         :value="item.value">

+ 254 - 44
src/views/cw/reportManagement/ReportManagementFormNew.vue

@@ -57,7 +57,7 @@
 					<el-col :span="12">
 						<el-form-item label="送审价(元)" prop="reviewFee"
 									  :rules="[
-
+							{required: true, message: '送审价(元)不能为空', trigger: 'blur'},
                    ]">
 							<!--						  <el-input v-model="inputForm.reviewFee" placeholder="请输入送审价" @change="getFee" clearable></el-input>-->
 							<el-input
@@ -78,7 +78,7 @@
 					<el-col :span="12">
 						<el-form-item label="审定价(元)" prop="approvalFee"
 									  :rules="[
-
+								{required: true, message: '审定价(元)不能为空', trigger: 'blur'},
 			   ]">
 							<!--						  <el-input v-model="inputForm.approvalFee" placeholder="请输入审定价" clearable></el-input>-->
 							<el-input
@@ -124,7 +124,7 @@
 									  :rules="[
 										{required: true, message:'下一节点审核人不能为空', trigger:'blur'}
                    ]">
-							<UserSelectSignatory style="width: 100%" ref="userSelect1"
+							<UserSelectSignatory :disabled="true" style="width: 100%" ref="userSelect1"
 												 :readonly="true" :limit='1' :modelValue="inputForm.reviewBy"
 												 @update:modelValue='(value) => {inputForm.reviewBy = value}'></UserSelectSignatory>
 						</el-form-item>
@@ -240,9 +240,9 @@
 						</el-form-item>
 					</el-col>
 					<el-col :span="12">
-						<el-form-item label="造价咨询营业收入(万元)" prop="ziXunShouRu"
+						<el-form-item label="造价咨询营业收入(万元)" prop="ziXunShouRu"
 									  :rules="[
-
+										{ validator: ziXunShouRuRange, trigger: 'change' }
 			   ]">
 							<!--						  <el-input v-model="inputForm.ziXunShouRu" placeholder="请输入造价咨询营业收入" clearable></el-input>-->
 							<el-input
@@ -263,11 +263,68 @@
 				<div>
 					<el-divider content-position="left"><i class="el-icon-document"></i>
 						<span style="color:#f5222d;">*</span> 项目组成员(质量控制流程)
-						<el-button size="default" style="margin-left: 20px" type="primary" @click="insertEvent('detail')" plain>
+						<el-button size="default" style="margin-left: 20px" :disabled="true" type="primary" @click="insertEvent('detail')" plain>
 							新增
 						</el-button>
 					</el-divider>
-					<el-row  :gutter="15" >
+					<el-row  :gutter="15" v-if="inputForm.projectLevel==='1'">
+						<el-col :span="24">
+							<vxe-table
+								border
+								show-footer
+								show-overflow
+								ref="detailTable"
+								:key="detailKey"
+								class="vxe-table-element"
+								:data="inputForm.detailInfos"
+								style="margin-left: 5em"
+								highlight-current-row
+								:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+							>
+								<vxe-table-column title="编号" field="index" width="80">
+									<template v-slot="scope">
+										{{ scope.$rowIndex + 1 }}
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="memberName" title="成员名称" :edit-render="{}" show-overflow="title" :rules="[{required: true, message:'请选择用户', trigger:'blur'}]">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.memberName" :disabled="true" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="userRole" title="角色" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.userRole" :readonly="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="enrollCertNo" title="注册/资格证号" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.enrollCertNo" :readonly="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="profession" title="专业" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.profession" :readonly="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="content" title="本人负责内容" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.content" :disabled="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="opinion" title="审核意见" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input v-model="scope.row.opinion" :disabled="true"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column title="操作" width="100">
+									<template v-slot="scope">
+<!--										<el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')" :disabled="true" v-if="scope.$rowIndex !== 0 ">删除</el-button>-->
+									</template>
+								</vxe-table-column>
+							</vxe-table>
+						</el-col>
+					</el-row>
+					<el-row  :gutter="15" v-else-if="inputForm.projectLevel==='2'">
 						<el-col :span="24">
 							<vxe-table
 								border
@@ -280,11 +337,15 @@
 								style="margin-left: 5em"
 								highlight-current-row
 								:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
-								:edit-rules="validRules"
 							>
+								<vxe-table-column title="编号" field="index" width="80">
+									<template v-slot="scope">
+										{{ scope.$rowIndex + 1 }}
+									</template>
+								</vxe-table-column>
 								<vxe-table-column field="memberName" title="成员名称" :edit-render="{}" show-overflow="title" :rules="[{required: true, message:'请选择用户', trigger:'blur'}]">
 									<template v-slot:edit="scope">
-										<el-input v-model="scope.row.memberName" :disabled="scope.$rowIndex == 0" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+										<el-input v-model="scope.row.memberName" :disabled="true" @focus="userPullListForm(scope.$rowIndex)"></el-input>
 									</template>
 								</vxe-table-column>
 								<vxe-table-column field="userRole" title="角色" :edit-render="{}" show-overflow="title">
@@ -304,17 +365,17 @@
 								</vxe-table-column>
 								<vxe-table-column field="content" title="本人负责内容" :edit-render="{}" show-overflow="title">
 									<template v-slot:edit="scope">
-										<el-input v-model="scope.row.content" ></el-input>
+										<el-input v-model="scope.row.content" :readonly="true"></el-input>
 									</template>
 								</vxe-table-column>
 								<vxe-table-column field="opinion" title="审核意见" :edit-render="{}" show-overflow="title">
 									<template v-slot:edit="scope">
-										<el-input v-model="scope.row.opinion" ></el-input>
+										<el-input v-model="scope.row.opinion" :readonly="true"></el-input>
 									</template>
 								</vxe-table-column>
 								<vxe-table-column title="操作" width="100">
 									<template v-slot="scope">
-										<el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')"  v-if="scope.$rowIndex !== 0">删除</el-button>
+<!--										<el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')"  v-if="scope.$rowIndex !== 0 && scope.$rowIndex !== 1 ">删除</el-button>-->
 									</template>
 								</vxe-table-column>
 							</vxe-table>
@@ -333,7 +394,6 @@
 						show-overflow
 						ref="clientTable"
 						class="vxe-table-element"
-						style="margin-left: 5em;width: 100%"
 						:row-config="{keyField: 'id'}"
 						:column-config="{resizable: true}"
 						:tree-config="{transform: true, expandAll: true}"
@@ -434,10 +494,8 @@
 	} from '@/api/sys/OSSService'
 	import UserPullFormNew from '@/views/finance/invoice/UserPullFormNew'
 	import UserSelectSignatory from '@/components/userSelectNew'
-	import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
 	import ReportReviewService from '@/api/cw/reportManagement/ReportReviewService'
 	import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
-	import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
 	import CommonApi from '@/api/cw/common/CommonApi'
   import FileForm from "./reportReview/FileForm";
   export default {
@@ -457,6 +515,7 @@
     },
     data () {
       return {
+		  detailKey: '',
         title: '',
         method: '',
         loading: false,
@@ -480,6 +539,7 @@
 			  ],
 		  },
 		  inputForm: {
+			  reviewByName: '',
 			  reviewNewId: '',
 			  projectLevel: '',
 			  memberName: '',
@@ -520,13 +580,9 @@
         tabName: ''
       }
     },
-	  ReportCancellApplyService: null,
 	  ReportReviewService: null,
-	  enterpriseSearchService: null,
 	  commonApi: null,
     created () {
-		this.enterpriseSearchService = new EnterpriseSearchService()
-		this.reportCancellApplyService = new ReportCancellApplyService()
 		this.reportReviewService = new ReportReviewService()
 		this.commonApi = new CommonApi()
     },
@@ -575,6 +631,7 @@
         this.reportReviewService = new ReportReviewService()
         this.method = method
 		  this.inputForm = {
+			  reviewByName: '',
 			  reviewNewId: '',
 			  projectLevel: '',
 			  memberName: '',
@@ -624,14 +681,12 @@
 
 				// 根据证书类型  获取字典值
 				let professionList = this.getProfessionList(this.inputForm.professionType)
-				professionList.forEach(item => {
-					if (item.value == this.inputForm.profession) {
-						this.inputForm.profession = item.label
-					}
-				})
-
-
 				if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+					professionList.forEach(item => {
+						if (item.value == this.inputForm.profession) {
+							this.inputForm.profession = item.label
+						}
+					})
 					let d = {
 						memberName: this.inputForm.memberName,
 						userId: this.inputForm.projectManagerId,
@@ -642,9 +697,23 @@
 					this.inputForm.detailInfos = []
 					this.inputForm.detailInfos.push(d)
 					this.detailKey = Math.random()
+				} else {
+					this.reportReviewService.getUserInfo(this.inputForm.reviewBy).then((data) => {
+						this.inputForm.detailInfos.forEach(item => {
+							professionList = this.getProfessionList(item.professionType)
+							professionList.forEach(item2 => {
+								if (item.profession == item2.value) {
+									item.profession = item2.label
+								}
+								if (item.userRole === '技术负责人') {
+									item.memberName = data.memberName + '(' + this.inputForm.reviewByName + '代)'
+								}
+							})
+						})
+					})
 				}
 
-				projectReportService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
+				projectReportService.getAttachmentList(data.projectId,this.inputForm.id,'').then((data) => {
 					this.tableData = data
 					this.tableKey = Math.random()
 				})
@@ -660,6 +729,90 @@
 				  if (valid) {
 					  // 暂存
 					  this.loading = true
+
+					  if (this.commonJS.isEmpty(this.inputForm.reviewBy)){
+						  this.loading = false
+						  this.$message.error('请选择下一节点审核人')
+						  throw new Error()
+					  }
+					  if (this.commonJS.isEmpty(this.inputForm.workStartDate)){
+						  this.loading = false
+						  this.$message.error('请选择工作开始时间')
+						  throw new Error()
+					  }
+					  if (this.commonJS.isEmpty(this.inputForm.workEndDate)){
+						  this.loading = false
+						  this.$message.error('请选择工作结束时间')
+						  throw new Error()
+					  }
+					  if (this.commonJS.isEmpty(this.inputForm.detailInfos)){
+						  this.loading = false
+						  this.$message.error('至少选择一位项目组成员')
+						  throw new Error()
+					  }else {
+						  let i = this.inputForm.detailInfos.length
+
+						  if (this.inputForm.projectLevel === '1') {
+							  if (i <= 1) {
+								  this.loading = false
+								  this.$message.error('请添加咨询员信息')
+								  throw new Error('请添加咨询员信息')
+							  }
+						  } else if (this.inputForm.projectLevel === '2') {
+							  if (i <= 1) {
+								  this.loading = false
+								  this.$message.error('请添加技术负责人信息')
+								  throw new Error('请添加技术负责人信息')
+							  } else if (i <= 2) {
+								  this.loading = false
+								  this.$message.error('请添加咨询员信息')
+								  throw new Error('请添加咨询员信息')
+							  }
+						  }
+
+						  for (let j = 0; j < i; j++) {
+							  this.inputForm.detailInfos[j].detailNumber = j+1;
+							  /*let k = j + 1
+							  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].memberName)){
+								  this.loading = false
+								  this.$message.error('项目组成员第'+k+'行成员名称为空')
+								  throw new Error('项目组成员第'+k+'行成员名称为空')
+							  }
+							  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].enrollCertNo)){
+								  this.loading = false
+								  this.$message.error('项目组成员第'+k+'行注册/资格证号为空')
+								  throw new Error('项目组成员第'+k+'行注册/资格证号为空')
+							  }
+							  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].profession)){
+								  this.loading = false
+								  this.$message.error('项目组成员第'+k+'行专业为空')
+								  throw new Error('项目组成员第'+k+'行专业为空')
+							  }
+							  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].content)){
+								  this.loading = false
+								  this.$message.error('项目组成员第'+k+'行本人负责内容为空')
+								  throw new Error('项目组成员第'+k+'行本人负责内容为空')
+							  }
+							  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].opinion)){
+								  this.loading = false
+								  this.$message.error('项目组成员第'+k+'行审核意见为空')
+								  throw new Error('项目组成员第'+k+'行审核意见为空')
+							  }*/
+
+
+						  }
+					  }
+
+					  this.tableData.forEach(item=>{
+						  if (item.levelFlag === 2 && item.mustFlag === 1){
+							  if (item.children.length === 0){
+								  this.loading = false
+								  this.$message.error('文件未上传')
+								  throw new Error('文件未上传')
+							  }
+						  }
+					  })
+
 					  this.reportReviewService.saveFormReviewNew(this.inputForm).then(() => {
 						  this.$emit('refreshList')
 						  this.close()
@@ -674,6 +827,7 @@
       },
 		close () {
 			this.inputForm = {
+				reviewByName: '',
 				reviewNewId: '',
 				projectLevel: '',
 				memberName: '',
@@ -814,6 +968,15 @@
 				callback();
 			}
 		},
+		ziXunShouRuRange(rule, value, callback) {
+			if (!value || value.trim() === "") {
+				callback(new Error('造价咨询营业收入不能为空!'));
+			} else if (parseFloat(value) <= 0) {
+				callback(new Error('造价咨询营业收入必须大于0!'));
+			} else {
+				callback();
+			}
+		},
 		// 项目组成员下拉弹窗
 		userPullListForm (rowIndex) {
 			this.indexRow = rowIndex
@@ -832,7 +995,6 @@
 			}
 		},
 		showFile (row) {
-			console.log("showFile",row)
 			row.name = row.attachmentName
 			openWindowOnUrl(row)
 		},
@@ -851,26 +1013,22 @@
 		},
 		//测试按钮
 		openFileForm(id,typeId){
-			console.log('this.id', id )
 			this.$refs.fileForm.init("add", id,this.inputForm.projectId)
 		},
 		toHref (row) {
-			console.log("toHref",row)
 			toHref(row)
 		},
 		getFiles(){
-			projectReportService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
+			projectReportService.getAttachmentList(this.inputForm.projectId,this.inputForm.id,'').then((data) => {
 				this.tableData = data
 				this.tableKey = Math.random()
 			})
 
 		},
 		getProgramForUser (rows) {
-			console.log('rows', rows)
 			this.inputForm.detailInfos[this.indexRow].userId = rows[0].id
 			this.inputForm.detailInfos[this.indexRow].memberName = rows[0].name
 			this.inputForm.detailInfos[this.indexRow].enrollCertNo = rows[0].enrollCertNo
-
 			// 根据证书类型  获取字典值
 			let professionList = this.getProfessionList(rows[0].type)
 			professionList.forEach(item => {
@@ -885,18 +1043,70 @@
 		},
 		async insertEvent (type) {
 			if (type === 'detail') {
-				let d = {
-					memberName: '',
-					userId: '',
-					userRole: '咨询员',
-					enrollCertNo: '',
-					profession: '',
-				}
-				if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
-					this.inputForm.detailInfos = []
+
+				//根据项目等级来设置
+				if (this.inputForm.projectLevel === '1') {
+					let d = {
+						memberName: '',
+						userId: '',
+						userRole: '咨询员',
+						enrollCertNo: '',
+						profession: '',
+					}
+					if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+						this.inputForm.detailInfos = []
+					}
+					this.inputForm.detailInfos.push(d)
+					this.detailKey = Math.random()
+				} else if (this.inputForm.projectLevel === '2') {
+
+					if (this.commonJS.isEmpty(this.inputForm.reviewBy)) {
+						this.$message.error('请先选择审核人员!')
+						throw new Error('请先选择审核人员!')
+					}
+
+					if (this.inputForm.detailInfos.length  == 1) {
+						//查询陈红星的注册/资格证号,专业信息
+						this.reportReviewService.getUserInfo(this.inputForm.reviewBy).then((data) => {
+
+							let professionList = this.getProfessionList(data.professionType)
+							professionList.forEach(item => {
+								if (item.value == data.profession) {
+									data.profession = item.label
+								}
+							})
+
+							let d = {
+								memberName: data.memberName + '(' + this.inputForm.reviewByName + '代)',
+								userId: data.id,
+								userRole: '技术负责人',
+								enrollCertNo: data.enrollCertNo,
+								profession: data.profession,
+							}
+							if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+								this.inputForm.detailInfos = []
+							}
+							this.inputForm.detailInfos.push(d)
+							this.detailKey = Math.random()
+						}).catch(() => {
+
+						})
+					} else {
+						let d = {
+							memberName: '',
+							userId: '',
+							userRole: '咨询员',
+							enrollCertNo: '',
+							profession: '',
+						}
+						if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+							this.inputForm.detailInfos = []
+						}
+						this.inputForm.detailInfos.push(d)
+						this.detailKey = Math.random()
+					}
+
 				}
-				this.inputForm.detailInfos.push(d)
-				this.detailKey = Math.random()
 			}
 		},
     }

+ 484 - 68
src/views/cw/reportManagement/ReportManagementList.vue

@@ -43,7 +43,7 @@
       <el-form-item v-if="showHideItem" label="报备类型" prop="filingType">
         <el-select v-model="searchForm.filingType" placeholder="请选择" style="width:100%;">
           <el-option
-            v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
+            v-for="item in $dictUtils.getDictList('program_cost_audit_type')"
             :key="item.value"
             :label="item.label"
             :value="item.value">
@@ -132,11 +132,26 @@
 					{{$dictUtils.getDictLabel('cw_project_level', scope.row.projectLevel, '')}}
 				</template>
 			</vxe-column>
-			<vxe-column min-width="100" title="状态" fixed="right" align="center" field="reviewStatus">
+			<vxe-column min-width="100" title="质量复核" fixed="right" align="center" field="reviewStatus">
 				<template #default="scope">
 					<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.reviewStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.reviewStatus, '未开始')}} </el-button>
 				</template>
 			</vxe-column>
+			<vxe-column min-width="100" title="报告签发" fixed="right" align="center" field="signAndIssueStatus">
+				<template #default="scope">
+					<el-button @click="signAndIssueDetail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.signAndIssueStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.signAndIssueStatus, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" title="电子/超期天数" fixed="right" align="center" field="onlineArchivingStatus">
+				<template #default="scope">
+					<el-button @click="pushOnlineDetail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.onlineArchivingStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.onlineArchivingStatus, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
+			<vxe-column min-width="100" title="纸质/超期天数" fixed="right" align="center" field="paperArchivingStatus">
+				<template #default="scope">
+					<el-button @click="pushPaperDetail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.paperArchivingStatus, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.paperArchivingStatus, '未开始')}} </el-button>
+				</template>
+			</vxe-column>
           <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  #default="scope">
               <div v-if="isAdmin">
@@ -144,21 +159,35 @@
                 <el-button text type="primary" @click="del(scope.row.id,scope.row.projectId)">删除</el-button>
               </div>
 				<div v-else>
-					<el-button v-if="hasPermission('cwProjectReport:edit')&&
+					<!--<el-button v-if="hasPermission('cwProjectReport:edit')&&
                               (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId))&&
-                              scope.row.status === '5'"
+                              scope.row.status === '5' && scope.row.reviewStatus === '5'"
 							   text type="primary"  @click="edit(scope.row.id)">修改</el-button>
 
 					<el-button v-else-if="hasPermission('cwProjectReport:del')&&
                               (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId))&&
-                              scope.row.status === '5'"
-							   text type="primary" @click="del(scope.row.id,scope.row.projectId)">删除</el-button>
+                              scope.row.status === '5' && scope.row.reviewStatus === '5'"
+							   text type="primary" @click="del(scope.row.id,scope.row.projectId)">删除</el-button>-->
 					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||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 === '')" text type="primary" @click="pushF(scope.row)">复核</el-button>
-					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '2'" text type="primary" @click="rebackF(scope.row)">撤回复核申请</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '2'" text type="primary" @click="rebackF(scope.row)">撤回复核</el-button>
 					<!--              审核-->
-					<el-button v-if="scope.row.reviewStatus==='2' && checkIsAuditReview(scope.row)" text type="primary" @click="examineReview(scope.row)">审核</el-button>
+<!--					<el-button v-if="scope.row.reviewStatus==='2' && checkIsAuditReview(scope.row)" text type="primary" @click="examineReview(scope.row)">审核</el-button>-->
 					<!--              被驳回后当前申请人重新调整-->
 					<el-button v-if="hasPermission('cw:workContract:filed')&&scope.row.createById === $store.state.user.id&&scope.row.reviewStatus === '4'" text type="primary" @click="adjustReview(scope.row)">驳回调整</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5'
+					&& (scope.row.signAndIssueStatus === '0' || scope.row.signAndIssueStatus === '1' || scope.row.signAndIssueStatus === '3' || scope.row.signAndIssueStatus === undefined || scope.row.signAndIssueStatus === '') && scope.row.projectLevel !== '2'" text type="primary" @click="pushSignAndIssue(scope.row)">报告签发</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '5' && scope.row.signAndIssueStatus === '2'" text type="primary" @click="rebackSignAndIssue(scope.row)">撤回签发</el-button>
+					<el-button v-if="hasPermission('signAndIssue:del') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '5' && (scope.row.signAndIssueStatus === '1' || scope.row.signAndIssueStatus === '3' || scope.row.signAndIssueStatus === '4')" text type="primary" @click="deleteSignAndIssue(scope.row)">删除签发</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed')&&scope.row.createById === $store.state.user.id&&scope.row.reviewStatus === '5'&&scope.row.signAndIssueStatus === '4'" text type="primary" @click="adjustSignAndIssue(scope.row)">驳回调整</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5' && (scope.row.signAndIssueStatus === '5' || scope.row.projectLevel === '2')
+							   && (scope.row.onlineArchivingStatus === '0' || scope.row.onlineArchivingStatus === '1' || scope.row.onlineArchivingStatus === '3' || scope.row.onlineArchivingStatus === undefined || scope.row.onlineArchivingStatus === '')"
+							   text type="primary" @click="pushOnlineArchiving(scope.row)">线上归档</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '5' && scope.row.onlineArchivingStatus === '2'" text type="primary" @click="rebackPushOnline(scope.row)">撤回线上归档</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '5' && scope.row.onlineArchivingStatus === '4'" text type="primary" @click="adjustPushOnline(scope.row)">驳回调整</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5' && scope.row.reviewStatus === '5' && scope.row.onlineArchivingStatus === '5'
+					&& (scope.row.paperArchivingStatus === '0' || scope.row.paperArchivingStatus === '1' || scope.row.paperArchivingStatus === '3' || scope.row.paperArchivingStatus === undefined || scope.row.paperArchivingStatus === '')" text type="primary" @click="pushPaperArchiving(scope.row)">纸质归档</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '5' && scope.row.onlineArchivingStatus === '5' && scope.row.paperArchivingStatus === '2'" text type="primary" @click="rebackPushPaper(scope.row)">撤回纸质归档</el-button>
+					<el-button v-if="hasPermission('cw:workContract:filed') && (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId)) && scope.row.status === '5'&& scope.row.reviewStatus === '5' && scope.row.onlineArchivingStatus === '5' && scope.row.paperArchivingStatus === '4'" text type="primary" @click="adjustPushPaper(scope.row)">驳回调整</el-button>
 				</div>
             </template>
           </vxe-column>
@@ -227,6 +256,14 @@
         loading: false,
         processDefinitionAuditId: '',
         procDefAuditKey: '',
+		  signAndIssueProcDefId: '',
+		  signAndIssueProcDefKey: '',
+		  paperArchivingProcDefId: '',
+		  paperArchivingProcDefKey: '',
+		  onlineArchivingProcDefIdA: '',
+		  onlineArchivingProcDefKeyA: '',
+		  onlineArchivingProcDefIdB: '',
+		  onlineArchivingProcDefKeyB: '',
 		processDefinitionAuditIdAndSId: '',
         procDefAuditKeyAndSId: '',
         isAdmin: false,
@@ -249,9 +286,11 @@
       }
     },
     reportReviewService: null,
+	  reportSignAndIssueService: null,
 	  reportNumberApplyService: null,
     created () {
       this.reportReviewService = new ReportReviewService()
+      this.reportSignAndIssueService = new ReportSignAndIssueService()
       this.reportNumberApplyService = new ReportNumberApplyService()
     },
     components: {
@@ -345,6 +384,30 @@
             this.procDefAuditKey = data.key
           }
         })
+		  processService.getByName('报告签发').then((data) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.signAndIssueProcDefId = data.id
+            this.signAndIssueProcDefKey = data.key
+          }
+        })
+		  processService.getByName('报告-线上归档(A)').then((data) => {
+			  if (!this.commonJS.isEmpty(data.id)) {
+				  this.onlineArchivingProcDefIdA = data.id
+				  this.onlineArchivingProcDefKeyA = data.key
+			  }
+		  })
+		  processService.getByName('报告-线上归档(B)').then((data) => {
+			  if (!this.commonJS.isEmpty(data.id)) {
+				  this.onlineArchivingProcDefIdB = data.id
+				  this.onlineArchivingProcDefKeyB = data.key
+			  }
+		  })
+		  processService.getByName('报告-纸质归档').then((data) => {
+			  if (!this.commonJS.isEmpty(data.id)) {
+				  this.paperArchivingProcDefId = data.id
+				  this.paperArchivingProcDefKey = data.key
+			  }
+		  })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -394,70 +457,40 @@
 			} else {
 				title = ' ' + row.documentNo + ' - ' + row.projectName
 			}
-			console.log('row', row)
 
-			if (this.commonJS.isEmpty(row.newType) || row.newType !== '1'){
-
-				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[会计-报告复核]'
-				let status = 'startAndHold'
-				if (row.reviewStatus === '3') {
-					status = 'startAndClose'
-				} else if (row.reviewStatus === '4') {
-					status = 'reapplyFlag'
-				}
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[会计-报告复核]'
+			let status = 'startAndHold'
+			if (row.reviewStatus === '3') {
+				status = 'startAndClose'
+			} else if (row.reviewStatus === '4') {
+				status = 'reapplyFlag'
+			}
 
-				taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
-					businessId: row.id,
-					businessTable: 'cw_project_report_review_new'}).then((data) => {
-					this.$router.push({
-						path: '/flowable/task/TaskForm',
-						query: {
-							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-							procDefId: this.processDefinitionAuditId,
-							procDefKey: this.procDefAuditKey,
-							title: title,
-							formType: data.formType,
-							formUrl: data.formUrl,
-							formTitle: processTitle,
-							businessTable: 'cw_project_report_review_new',
-							businessId: row.id,
-							isShow: 'false',
-							status: status,
-							routePath: '/cw/reportManagement/ReportManagementList'
-						}
-					})
-				})
-			} else if ( row.newType === '1') {
-				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[会计-复核及签章]'
-				let status = 'startAndHold'
-				if (row.reviewStatus === '3') {
-					status = 'startAndClose'
-				} else if (row.reviewStatus === '4') {
-					status = 'reapplyFlag'
-				}
+			if (row.projectLevel === '1') {
+				status = 'startAndClose'
+			}
 
-				taskService.getTaskDef({ procDefId: this.processDefinitionAuditIdAndSId,
-					businessId: row.id,
-					businessTable: 'cw_project_report_review_new'}).then((data) => {
-					this.$router.push({
-						path: '/flowable/task/TaskForm',
-						query: {
-							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
-							procDefId: this.processDefinitionAuditIdAndSId,
-							procDefKey: this.procDefAuditKeyAndSId,
-							title: title,
-							formType: data.formType,
-							formUrl: data.formUrl,
-							formTitle: processTitle,
-							businessTable: 'cw_project_report_review_new',
-							businessId: row.id,
-							isShow: 'false',
-							status: status,
-							routePath: '/cw/reportManagement/ReportManagementList'
-						}
-					})
+			taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+				businessId: row.id,
+				businessTable: 'cw_project_report_review_new'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.processDefinitionAuditId,
+						procDefKey: this.procDefAuditKey,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'cw_project_report_review_new',
+						businessId: row.id,
+						isShow: 'false',
+						status: status,
+						routePath: '/cw/reportManagement/ReportManagementList'
+					}
 				})
-			}
+			})
 		},
 		// 审核或重新调整跳转
 		todoReview (row) {
@@ -544,6 +577,389 @@
 				}
 			})
 		},
+
+		pushSignAndIssue (row) {
+			// 读取流程表单
+			let title = ' '
+			if (!row.documentNo) {
+				title = ' ' + row.projectName
+			} else {
+				title = ' ' + row.documentNo + ' - ' + row.projectName
+			}
+
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[会计-报告签发]'
+			let status = 'startAndHold'
+			if (row.reviewStatus === '3') {
+				status = 'startAndClose'
+			} else if (row.reviewStatus === '4') {
+				status = 'reapplyFlag'
+			}
+
+			if (row.projectLevel === '1') {
+				status = 'startAndClose'
+			}
+
+			taskService.getTaskDef({ procDefId: this.signAndIssueProcDefId,
+				businessId: row.signAndIssueId,
+				businessTable: 'cw_project_report_sign_and_issue'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: this.signAndIssueProcDefId,
+						procDefKey: this.signAndIssueProcDefKey,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'cw_project_report_sign_and_issue',
+						businessId: row.id,
+						isShow: 'false',
+						status: status,
+						routePath: '/cw/reportManagement/ReportManagementList'
+					}
+				})
+			})
+		},
+		// 报告签发流程详情
+		signAndIssueDetail (row) {
+			taskService.getTaskDef({
+				procInsId: row.procInsId4,
+				procDefId: this.signAndIssueProcDefId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskFormDetail',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						isShow: 'false',
+						readOnly: true,
+						title: '报告签发流程详情',
+						formTitle: '报告签发流程详情',
+						businessId: row.id,
+						status: 'reback'
+					}
+				})
+			})
+		},
+		// 撤回报告签发
+		rebackSignAndIssue (row) {
+			this.$confirm(`确定要撤回该申请吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(async () => { // 需要修改row.sid1
+				await this.reportSignAndIssueService.queryByReportId(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						processService.revokeProcIns(row.procInsId4).then((data) => {
+							let form = {status: '3', id: row.signAndIssueId}
+							this.reportSignAndIssueService.updateStatusByReportId(form)
+							this.$message.success(data)
+							this.refreshList()
+						})
+					}
+				})
+			})
+		},
+		// 报告签发驳回调整
+		adjustSignAndIssue (row) {
+			this.reportSignAndIssueService.queryByReportId(row.id).then((data) => {
+				if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todoSignAndIssue(row)
+				}
+			})
+		},
+		// 审核或重新调整跳转
+		todoSignAndIssue (row) {
+      	console.log('row', row)
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.signAndIssueTaskId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+						isShow: false,
+						formReadOnly: true,
+						formTitle: `${data.taskName}`,
+						cUser: cUser,
+						title: `审批【${data.taskName || ''}】`,
+						routePath: '/cw/reportManagement/ReportManagementList'   // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+		},
+		// 删除签发
+		deleteSignAndIssue (row) {
+			this.$confirm(`确定要删除该报告签发吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				this.reportSignAndIssueService.delete(row.signAndIssueId).then((data) => {
+					this.$message.success(data)
+					this.refreshList()
+					this.loading = false
+				})
+			})
+		},
+		pushOnlineArchiving (row) {
+			// 读取流程表单
+			let title = ' '
+			if (!row.documentNo) {
+				title = ' ' + row.projectName
+			} else {
+				title = ' ' + row.documentNo + ' - ' + row.projectName
+			}
+
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[报告-线上归档]'
+			let status = 'startAndHold'
+			if (row.reviewStatus === '3') {
+				status = 'startAndClose'
+			} else if (row.reviewStatus === '4') {
+				status = 'reapplyFlag'
+			}
+
+			let procDefId = ''
+			let procDefKey = ''
+			if (row.projectLevel === '1') {
+				status = 'startAndClose'
+				procDefId = this.onlineArchivingProcDefIdA
+				procDefKey = this.onlineArchivingProcDefKeyA
+			} else if (row.projectLevel === '2'){
+				status = 'startAndClose'
+				procDefId = this.onlineArchivingProcDefIdB
+				procDefKey = this.onlineArchivingProcDefKeyB
+			}
+			console.log('row', row)
+
+
+			taskService.getTaskDef({ procDefId: procDefId,
+				businessId: row.id,
+				businessTable: 'cw_project_report_online_archiving'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: procDefId,
+						procDefKey: procDefKey,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'cw_project_report_online_archiving',
+						businessId: row.id,
+						isShow: 'false',
+						status: status,
+						routePath: '/cw/reportManagement/ReportManagementList'
+					}
+				})
+			})
+		},
+		// 线上归档流程详情
+		pushOnlineDetail (row) {
+
+			let procDefId = ''
+			if (row.projectLevel === '1') {
+				procDefId = this.onlineArchivingProcDefIdA
+			} else if (row.projectLevel === '2'){
+				procDefId = this.onlineArchivingProcDefIdB
+			}
+			taskService.getTaskDef({
+				procInsId: row.onlineArchivingProcInsId,
+				procDefId: procDefId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskFormDetail',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						isShow: 'false',
+						readOnly: true,
+						title: '线上归档流程详情',
+						formTitle: '线上归档流程详情',
+						businessId: row.id,
+						status: 'reback'
+					}
+				})
+			})
+		},
+		// 撤回线上归档
+		rebackPushOnline (row) {
+			this.$confirm(`确定要撤回该申请吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(async () => { // 需要修改row.sid1
+				await reportOnlineArchivingService.queryByReportId(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						processService.revokeProcIns(row.onlineArchivingProcInsId).then((data) => {
+							let form = {status: '3', id: row.onlineArchivingId}
+							reportOnlineArchivingService.updateStatusByReportId(form)
+							this.$message.success(data)
+							this.refreshList()
+						})
+					}
+				})
+			})
+		},
+		// 在线归档驳回调整
+		adjustPushOnline (row) {
+			reportOnlineArchivingService.queryByReportId(row.id).then((data) => {
+				if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todoPushOnline(row)
+				}
+			})
+		},
+		todoPushOnline (row) {
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.onlineArchivingTaskId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+						isShow: false,
+						formReadOnly: true,
+						formTitle: `${data.taskName}`,
+						cUser: cUser,
+						title: `审批【${data.taskName || ''}】`,
+						routePath: '/cw/reportManagement/ReportManagementList'   // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+		},
+		pushPaperArchiving (row) {
+			// 读取流程表单
+			let title = ' '
+			if (!row.documentNo) {
+				title = ' ' + row.projectName
+			} else {
+				title = ' ' + row.documentNo + ' - ' + row.projectName
+			}
+
+			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了` + title + '[报告-线上归档]'
+			let status = 'startAndHold'
+			if (row.reviewStatus === '3') {
+				status = 'startAndClose'
+			} else if (row.reviewStatus === '4') {
+				status = 'reapplyFlag'
+			}
+
+			let procDefId = this.paperArchivingProcDefId
+			let procDefKey = this.paperArchivingProcDefKey
+			status = 'startAndClose'
+
+
+			taskService.getTaskDef({ procDefId: procDefId,
+				businessId: row.id,
+				businessTable: 'cw_project_report_paper_archiving'}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						procDefId: procDefId,
+						procDefKey: procDefKey,
+						title: title,
+						formType: data.formType,
+						formUrl: data.formUrl,
+						formTitle: processTitle,
+						businessTable: 'cw_project_report_paper_archiving',
+						businessId: row.id,
+						isShow: 'false',
+						status: status,
+						routePath: '/cw/reportManagement/ReportManagementList'
+					}
+				})
+			})
+		},
+		// 纸质归档流程详情
+		pushPaperDetail (row) {
+
+			let procDefId = this.paperArchivingProcDefId
+			taskService.getTaskDef({
+				procInsId: row.paperArchivingProcInsId,
+				procDefId: procDefId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskFormDetail',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+						isShow: 'false',
+						readOnly: true,
+						title: '纸质归档流程详情',
+						formTitle: '纸质归档流程详情',
+						businessId: row.id,
+						status: 'reback'
+					}
+				})
+			})
+		},
+		// 撤回纸质归档
+		rebackPushPaper (row) {
+			this.$confirm(`确定要撤回该申请吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(async () => { // 需要修改row.sid1
+				await reportPaperArchivingService.queryByReportId(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						processService.revokeProcIns(row.paperArchivingProcInsId).then((data) => {
+							let form = {status: '3', id: row.paperArchivingId}
+							reportPaperArchivingService.updateStatusByReportId(form)
+							this.$message.success(data)
+							this.refreshList()
+						})
+					}
+				})
+			})
+		},
+		// 纸质归档驳回调整
+		adjustPushPaper (row) {
+			reportPaperArchivingService.queryByReportId(row.id).then((data) => {
+				if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+					this.$message.error('数据已发生改变或不存在,请刷新数据')
+					this.refreshList()
+				} else {
+					this.todoPushPaper(row)
+				}
+			})
+		},
+		todoPushPaper (row) {
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.paperArchivingTaskId
+			}).then((data) => {
+				this.$router.push({
+					path: '/flowable/task/TaskForm',
+					query: {
+						...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+						isShow: false,
+						formReadOnly: true,
+						formTitle: `${data.taskName}`,
+						cUser: cUser,
+						title: `审批【${data.taskName || ''}】`,
+						routePath: '/cw/reportManagement/ReportManagementList'   // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+		},
     }
   }
 </script>

+ 636 - 0
src/views/cw/reportManagement/onlineArchiving/ReportOnlineArchiving.vue

@@ -0,0 +1,636 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-row>
+			<el-col :span="24">
+
+				<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+						 label-width="135px" @submit.native.prevent>
+
+					<el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
+					<el-row  :gutter="0">
+						<el-col :span="12">
+							<el-form-item label="报告号" prop="reportNo"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.reportNo" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="报告日期" prop="reportDate"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.reportDate" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="合同编号" prop="contractNo"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.contractNo" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="合同名称" prop="contractName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.contractName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="委托方" prop="clientName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.clientName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目编号" prop="projectNumber"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectNumber" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目名称" prop="projectName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="归档申请人" prop="applyUserName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.applyUserName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="归档时间" prop="applyDates"
+										  :rules="[
+                   ]">
+								<el-date-picker
+									:disabled="true"
+									style="width: 100%;"
+									v-model="inputForm.applyDates"
+									type="date"
+									value-format="YYYY-MM-DD"
+									placeholder="选择归档时间">
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-row>
+						<el-col :span="24">
+							<el-form-item label="说明" prop="onlineRemarks"
+										  :rules="[
+                   ]">
+								<el-input type="textarea"
+										  maxlength="200" placeholder="请输入说明"
+										  show-word-limit v-model="inputForm.onlineRemarks"></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-form >
+				<el-divider content-position="left"><i class="el-icon-document"></i>
+					<span>文件信息</span>
+				</el-divider>
+				<el-row  :gutter="15" >
+					<el-col :span="24">
+						<vxe-table
+							border
+							show-overflow
+							ref="clientTable"
+							class="vxe-table-element"
+							style="margin-left: 5em"
+							:row-config="{keyField: 'id'}"
+							:column-config="{resizable: true}"
+							:tree-config="{transform: true, expandAll: true}"
+							:key="tableKey"
+							:data="tableData">
+							<vxe-column field="name" title="文件要求" width="240px" tree-node>
+								<template #default="scope">
+							<span style="font-weight: bold"
+								  v-if="scope.row.parentId === '0'"
+							>{{ scope.row.name }}
+							</span>
+									<span
+										v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 1"
+									><span style="color: red;font-weight: bold">* </span>{{ scope.row.name }}
+							</span>
+									<span
+										v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 0"
+									>{{ scope.row.name }}
+							</span>
+								</template>
+							</vxe-column>
+							<vxe-column field="attachmentName" title="文件描述/文件名称" show-overflow="false">
+								<template #default="scope">
+							<span
+								v-if="scope.row.levelFlag === 2"
+							>
+								<span style="font-weight: bold">文件格式及大小:{{ scope.row.size }}</span>
+								<br>
+								<span>{{ scope.row.type }}</span>
+							</span>
+									<div v-if="ifName(scope.row) === true">
+										<el-image
+											style="width: 30px; height: 30px;padding-top: 4px;"
+											:src="scope.row.lsUrl"
+											:preview-src-list="[scope.row.lsUrl]"
+											:preview-teleported="true"
+										></el-image>
+									</div>
+									<div v-else>
+										<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+									</div>
+								</template>
+							</vxe-column>
+							<vxe-column field="workAttachmentType" width="100px" title="文件类型"></vxe-column>
+							<vxe-column field="createDate" title="上传时间" width="100px"></vxe-column>
+							<vxe-column field="fileSize" width="100px" title="文件大小(M)">
+								<template #default="scope">
+									{{getSize(scope.row.fileSize)}}
+								</template>
+							</vxe-column>
+
+							<vxe-column
+								title="操作"
+								width="100px"
+								fixed="right"
+								align="center"
+							>
+								<template #default="scope">
+									<el-button
+										v-if="scope.row.levelFlag === 2"
+										type="primary"
+										size="small"
+										:disabled="status === 'audit' ||status === 'taskFormDetail'|| method ==='view'"
+										@click="openFileForm(scope.row.id,this.inputForm.id)"
+									>编辑</el-button>
+									<el-button
+										v-if="scope.row.levelFlag === 3"
+										type="info"
+										size="small"
+										@click="toHref(scope.row)" >下载</el-button>
+
+								</template>
+							</vxe-column>
+						</vxe-table>
+					</el-col>
+				</el-row>
+				<FileForm ref="fileForm" @getFiles="getFiles"></FileForm>
+			</el-col>
+		</el-row>
+	</div>
+</template>
+
+<script>
+	import moment from 'moment';
+	import FileForm from '@/views/cw/reportManagement/reportReview/FileForm'
+	import OSSSerivce, {
+		// eslint-disable-next-line no-unused-vars
+		beforeAvatarUpload,
+		// eslint-disable-next-line no-unused-vars
+		openWindowOnUrl,
+		// eslint-disable-next-line no-unused-vars
+		toHref
+	} from '@/api/sys/OSSService'
+	import reportOnlineArchivingService from '@/api/cw/reportManagement/ReportOnlineArchivingService'
+	import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				tableKey: '',
+				tableData: [],
+				detailKey: '',
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					onlineArchivingProcInsId: '',
+					onlineArchivingId: '',
+					projectId: '',
+					reportNo: '',
+					reportDate: '',
+					contractNo: '',
+					contractName: '',
+					clientName: '',
+					projectNumber: '',
+					applyDates: new Date(),
+					onlineRemarks: '',
+					applyUserName: this.$store.state.user.name,
+					applyUserId: this.$store.state.user.id,
+					projectName: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			this.commonApi = new CommonApi()
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							// this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		components: {
+			FileForm,
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init (method, id) {
+				console.log('method', method)
+				this.method = method
+				this.inputForm = {
+					onlineArchivingProcInsId: '',
+					onlineArchivingId: '',
+					projectId: '',
+					reportNo: '',
+					reportDate: '',
+					contractNo: '',
+					contractName: '',
+					clientName: '',
+					projectNumber: '',
+					applyDates: '',
+					onlineRemarks: '',
+					applyUserName: '',
+					applyUserId: '',
+					projectName: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					// this.$refs.inputForm.resetFields()
+
+					this.loading = true
+					projectReportService.queryByIdNew(this.inputForm.id).then((data) => {
+						if (data) {
+							this.inputForm = this.recover(this.inputForm, data)
+
+							projectReportService.getAttachmentList(data.projectId,this.inputForm.id,'归档').then((data) => {
+								this.tableData = data
+								this.tableKey = Math.random()
+							})
+
+							if (this.commonJS.isEmpty(this.inputForm.applyUserId)) {
+								this.inputForm.applyUserId = this.$store.state.user.id
+								this.inputForm.applyUserName = this.$store.state.user.name
+							}
+							if (this.commonJS.isEmpty(this.inputForm.applyDates)) {
+								this.inputForm.applyDates = this.moment(new Date()).format('YYYY-MM-DD')
+							}
+
+							if (this.status === 'taskFormDetail' || this.status === 'audit') {
+								this.method = 'view'
+							} else {
+								this.method = 'false'
+							}
+							this.loading = false
+						} else {
+							projectReportService.queryByOnlineArchivingId(this.inputForm.id).then((data2) => {
+								if (data2) {
+									this.inputForm = this.recover(this.inputForm, data2)
+
+									projectReportService.getAttachmentList(data2.projectId,this.inputForm.id,'归档').then((data) => {
+										this.tableData = data
+										this.tableKey = Math.random()
+									})
+
+									if (this.commonJS.isEmpty(this.inputForm.applyUserId)) {
+										this.inputForm.applyUserId = this.$store.state.user.id
+										this.inputForm.applyUserName = this.$store.state.user.name
+									}
+									if (this.commonJS.isEmpty(this.inputForm.applyDates)) {
+										this.inputForm.applyDates = this.moment(new Date()).format('YYYY-MM-DD')
+									}
+
+									if (this.status === 'taskFormDetail' || this.status === 'audit') {
+										this.method = 'view'
+									} else {
+										this.method = 'false'
+									}
+									this.loading = false
+								}
+
+							})
+						}
+
+					})
+				})
+			},
+			saveForm (callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm (callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					reportOnlineArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+						if (this.commonJS.isNotEmpty(data.status) && data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm (callback) {
+				this.loading = true
+				await reportOnlineArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+					if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.doSubmit('agree', callback)
+					}
+				})
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				reportOnlineArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			doSubmit (status, callback) {
+				if (status === 'save') {
+					// 暂存
+					this.inputForm.status = '1'
+					this.loading = true
+					reportOnlineArchivingService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					// 审核同意
+					this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD')
+					this.inputForm.agreeUserId = this.$store.state.user.id
+					// this.inputForm.status = '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				if (this.commonJS.isEmpty(this.tableData)) {
+					this.loading = false
+					this.$message.error('附件信息加载中,请稍等!')
+					throw new Error('附件信息加载中,请稍等!')
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (status === 'agree') {
+							console.log('this.inputForm.onlineArchivingProcInsId', this.inputForm.onlineArchivingProcInsId)
+							//判断当前节点是哪一个节点
+							this.commonApi.getTaskNameByProcInsId(this.inputForm.onlineArchivingProcInsId).then((data) => {
+								if (this.commonJS.isNotEmpty(data)) {
+									if (data === '报告归档管理员审核') {
+										this.inputForm.status = '5'
+									} else {
+										this.inputForm.status = '2'
+									}
+								}
+								console.log('data', data)
+								reportOnlineArchivingService.saveForm(this.inputForm).then((data2) => {
+									callback(data2.businessTable, data2.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							})
+
+
+
+						}else{
+
+							this.tableData.forEach(item=>{
+								if (item.levelFlag === 2 && item.mustFlag === 1){
+									if (item.children.length === 0){
+										this.loading = false
+										this.$message.error('文件未上传')
+										throw new Error('文件未上传')
+									}
+								}
+							})
+
+							reportOnlineArchivingService.saveForm(this.inputForm).then((data) => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+
+						}
+
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			async updateStatusById (type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					await reportOnlineArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							if (type === 'reject') {
+								reportOnlineArchivingService.queryByReportId(this.inputForm.id).then((review) => {
+									console.log('review', review)
+									this.rejectOn(callback)
+								})
+							}
+							if (type === 'reback') {
+								// 撤回
+								let param = {status: '3', id: this.inputForm.onlineArchivingId}
+								reportOnlineArchivingService.updateStatusByReportId(param)
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					reportOnlineArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.onlineArchivingId}
+							reportOnlineArchivingService.updateStatusByReportId(param).then(() => {
+								callback()
+								this.loading = false
+							})
+						}
+					})
+				}
+			},
+			// 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
+			rejectOn (callback) {
+				// 驳回
+				let param
+				this.inputForm.status = '4'
+				param = {status: this.inputForm.status,
+					id: this.inputForm.onlineArchivingId,
+					needUpdate2: this.inputForm.needUpdate2,
+					needUpdate3: this.inputForm.needUpdate3,
+					remark2: this.inputForm.remark2,
+					remark3: this.inputForm.remark3,
+					details: this.inputForm.details
+				}
+				reportOnlineArchivingService.updateStatusByReportId(param).then(() => {
+					this.loading = false
+					callback()
+				})
+			},
+			close () {
+				this.inputForm = {
+					onlineArchivingId: '',
+					projectId: '',
+					reportNo: '',
+					reportDate: '',
+					contractNo: '',
+					contractName: '',
+					clientName: '',
+					projectNumber: '',
+					applyDates: '',
+					onlineRemarks: '',
+					applyUserName: '',
+					applyUserId: '',
+					projectName: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				}
+			},
+			ifName (row) {
+				if (this.commonJS.isEmpty(row.attachmentName)) {
+					row.attachmentName = '---'
+					return false
+				}
+				let suffix = row.attachmentName.substring(row.attachmentName.lastIndexOf('.') + 1)
+				if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+					return true
+				} else {
+					return false
+				}
+			},
+			showFile (row) {
+				console.log("showFile",row)
+				row.name = row.attachmentName
+				openWindowOnUrl(row)
+			},
+			getSize (value) {
+				if (this.commonJS.isEmpty(value)) {
+					return ''
+				} else {
+					let val = parseInt(value)
+					let k = 1024
+					let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+					let i = Math.floor(Math.log(val) / Math.log(k))
+					let result = val / Math.pow(k, i);
+					let kb = parseFloat(result.toPrecision(3));
+					return kb + '' + sizes[i]
+				}
+			},
+			//测试按钮
+			openFileForm(id,typeId){
+				console.log('this.id', id )
+				this.$refs.fileForm.init("add", id,this.inputForm.projectId)
+			},
+			toHref (row) {
+				console.log("toHref",row)
+				toHref(row)
+			},
+			getFiles(){
+				projectReportService.getAttachmentList(this.inputForm.projectId,this.inputForm.id,'归档').then((data) => {
+					this.tableData = data
+					this.tableKey = Math.random()
+				})
+
+			},
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+
+	/deep/ .vxe-select-option {
+		padding: 0 .6em;
+		max-width: 600px;
+		overflow: visible;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		-webkit-user-select: none;
+		-moz-user-select: none;
+		-ms-user-select: none;
+		user-select: none
+	}
+</style>

+ 670 - 0
src/views/cw/reportManagement/paperArchiving/ReportPaperArchiving.vue

@@ -0,0 +1,670 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-row>
+			<el-col :span="24">
+
+				<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+						 label-width="135px" @submit.native.prevent>
+					<el-divider content-position="left"><i class="el-icon-document"></i> 项目合同信息</el-divider>
+					<el-row>
+						<el-col :span="12">
+							<el-form-item label="合同编号" prop="contractNo"
+										  :rules="[
+                   ]">
+								<el-input placeholder="" :disabled="true" show-word-limit v-model="inputForm.contractNo"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="合同名称" prop="contractName"
+										  :rules="[
+                   ]">
+								<el-input placeholder="" :disabled="true" show-word-limit v-model="inputForm.contractName"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="合同金额(元)" prop="contractAmount"
+										  :rules="[
+                   ]">
+								<el-input placeholder="" :disabled="true" show-word-limit v-model="inputForm.contractAmount"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="委托方" prop="clientName"
+										  :rules="[
+                   ]">
+								<el-input placeholder="" :disabled="true" show-word-limit v-model="inputForm.clientName"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="合同类型" prop="contractType"
+										  :rules="[
+              ]">
+								<el-select :disabled="true" v-model="inputForm.contractType" placeholder="请选择" style="width:100%;">
+									<el-option
+										v-for="item in $dictUtils.getDictList('cw_contract_type')"
+										:key="item.value"
+										:label="item.label"
+										:value="item.value">
+									</el-option>
+								</el-select>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-divider content-position="left"><i class="el-icon-document"></i> 项目基础信息</el-divider>
+					<el-row  :gutter="0">
+						<el-col :span="12">
+							<el-form-item label="项目名称" prop="projectName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目编号" prop="projectNumber"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectNumber" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="创建人" prop="projectCreateByName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectCreateByName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目责任人" prop="projectCreateByName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectCreateByName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目所属部门" prop="officeId"
+										  :rules="[
+                                {required: true, message:'项目所属部门不能为空', trigger:'blur'}
+                   ]">
+								<SelectTree
+									ref="officeTree"
+									:props="{
+                          value: 'id',             // ID字段名
+                          label: 'name',         // 显示名称
+                          children: 'children'    // 子级字段名
+                        }"
+									:url="`/system-server/sys/office/treeData?type=2`"
+									:value="inputForm.officeId"
+									:accordion="true"
+									size="large"
+									:disabled="true"
+									@getValue="(value) => {inputForm.officeId=value}"/>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="现场负责人" prop="projectManager"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectManager" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目类别" prop="reportType"
+										  :rules="[
+                                 {required: true, message:'项目类别不能为空', trigger:'blur'}
+                  ]">
+								<el-select :disabled="true" v-model="inputForm.reportType" placeholder="请选择项目类别" clearable style="width: 100%;">
+									<el-option
+										v-for="item in $dictUtils.getDictList('program_engineering_consultation_type')"
+										:key="item.value"
+										:label="item.label"
+										:value="item.value">
+									</el-option>
+								</el-select>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目等级" prop="projectLevel"
+										  :rules="[
+                  {required: true, message:'请选择项目等级(500万及500万以上为A级,500万以下为B级)', trigger:'blur'}
+               ]">
+								<el-radio-group :disabled="true" v-model="inputForm.projectLevel">
+									<el-radio  v-for="item in $dictUtils.getDictList('cw_project_level')" :label="item.value" >{{item.label}}</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目规模(元)" prop="projectMoney"
+										  :rules="[{required: true, message:'项目规模不能为空', trigger:'blur'}
+                   ]">
+								<el-input-number
+									:disabled="true"
+									v-model="inputForm.projectMoney"
+									controls-position="right"
+									style="width:100%"
+									:precision="2"
+									:max="9999999999"
+									:step="0.01"
+									:min="0"
+									placeholder="请填写项目规模"
+									:controls="false"
+									clearable>
+								</el-input-number>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="工作开始日期" prop="planStartDate"
+										  :rules="[
+                 ]">
+								<el-date-picker
+									:disabled="true"
+									v-model="inputForm.planStartDate"
+									type="date"
+									value-format="YYYY-MM-DD"
+									placeholder="选择工作开始日期"
+									style="width:100%"
+									placement="bottom-start"
+									clearable>
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="工作结束日期" prop="planEndDate"
+										  :rules="[
+                 ]">
+								<el-date-picker
+									:disabled="true"
+									v-model="inputForm.planEndDate"
+									type="date"
+									value-format="YYYY-MM-DD"
+									placeholder="选择工作结束日期"
+									style="width:100%"
+									placement="bottom-start"
+									clearable>
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="创建时间" prop="createDate"
+										  :rules="[
+                   ]">
+								<el-date-picker
+									:disabled="true"
+									v-model="inputForm.createDate"
+									type="date"
+									value-format="YYYY-MM-DD"
+									placeholder="选择创建时间"
+									style="width:100%"
+									placement="bottom-start"
+									clearable>
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-form v-if="status === 'audit'" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+							 label-width="135px" @submit.native.prevent>
+						<el-row>
+							<el-col  :span="12">
+								<el-form-item label="案卷号" prop="filedNo"
+											  :rules="[
+                                {required: true, message:'案卷号不能为空', trigger:'blur'}
+                   ]">
+									<el-input :disabled="false" v-model="inputForm.filedNo" placeholder="请填写案卷号" clearable></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col  :span="12">
+								<el-form-item label="确认案卷号" prop="confirmFiledNo"
+											  :rules="[
+                                {required: true, message:'确认案卷号不能为空', trigger:'blur'}
+                   ]">
+									<el-input :disabled="false" v-model="inputForm.confirmFiledNo" placeholder="请填写确认案卷号" clearable></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+					</el-form>
+					<el-form v-if="inputForm.paperArchivingStatus === '5'" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+							 label-width="135px" @submit.native.prevent>
+						<el-row>
+							<el-col  :span="12">
+								<el-form-item label="案卷号" prop="filedNo"
+											  :rules="[
+                                {required: true, message:'案卷号不能为空', trigger:'blur'}
+                   ]">
+									<el-input :disabled="true" v-model="inputForm.filedNo" placeholder="请填写案卷号" clearable></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col  :span="12">
+								<el-form-item label="确认案卷号" prop="confirmFiledNo"
+											  :rules="[
+                                {required: true, message:'确认案卷号不能为空', trigger:'blur'}
+                   ]">
+									<el-input :disabled="true" v-model="inputForm.confirmFiledNo" placeholder="请填写确认案卷号" clearable></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+					</el-form>
+					<el-divider content-position="left"><i class="el-icon-document"></i>
+						委托方联系人信息
+					</el-divider>
+					<el-row  :gutter="15" >
+						<el-col :span="24">
+							<vxe-table
+								border
+								show-footer
+								show-overflow
+								ref="contactTable"
+								class="vxe-table-element"
+								:data="inputForm.contactInfos"
+								style="margin-left: 5em"
+								:key="amountKey"
+								highlight-current-row
+								:edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+							>
+								<vxe-table-column field="clientContactsName" title="委托方" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input maxlength="15" :readonly="true" v-model="scope.row.clientContactsName" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="name" title="联系人姓名" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input maxlength="15" :readonly="true" v-model="scope.row.name" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="contactFirst" title="联系方式1" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input maxlength="15" :readonly="true" v-model="scope.row.contactFirst" ></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="contactSecond" title="联系方式2" :edit-render="{}" show-overflow="title">
+									<template v-slot:edit="scope">
+										<el-input maxlength="15" :readonly="true" v-model="scope.row.contactSecond" ></el-input>
+									</template>
+								</vxe-table-column>
+							</vxe-table>
+						</el-col>
+					</el-row>
+				</el-form >
+			</el-col>
+		</el-row>
+	</div>
+</template>
+
+<script>
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import OSSSerivce, {
+		// eslint-disable-next-line no-unused-vars
+		beforeAvatarUpload,
+		// eslint-disable-next-line no-unused-vars
+		openWindowOnUrl,
+		// eslint-disable-next-line no-unused-vars
+		toHref
+	} from '@/api/sys/OSSService'
+	import reportPaperArchivingService from '@/api/cw/reportManagement/ReportPaperArchivingService'
+	import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				amountKey: '',
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					paperArchivingStatus: '',
+					paperArchivingId: '',
+					contactInfos: [],
+					contractNo: '',
+					contractName: '',
+					contractAmount: '',
+					clientName: '',
+					contractType: '',
+					projectName: '',
+					projectNumber: '',
+					location: '',
+					projectCreateByName: '',
+					officeId: '',
+					projectManager: '',
+					reportType: '',
+					projectLevel: '',
+					projectMoney: '',
+					planStartDate: '',
+					planEndDate: '',
+					createDate: '',
+					filedNo: '',
+					confirmFiledNo: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				},
+				keyWatch: '',
+			}
+		},
+		commonApi: null,
+		created () {
+			this.commonApi = new CommonApi()
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							// this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		components: {
+			SelectTree,
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init (method, id) {
+				this.method = method
+				this.inputForm = {
+					paperArchivingStatus: '',
+					paperArchivingId: '',
+					contactInfos: [],
+					contractNo: '',
+					contractName: '',
+					contractAmount: '',
+					clientName: '',
+					contractType: '',
+					projectName: '',
+					projectNumber: '',
+					location: '',
+					projectCreateByName: '',
+					officeId: '',
+					projectManager: '',
+					reportType: '',
+					projectLevel: '',
+					projectMoney: '',
+					planStartDate: '',
+					planEndDate: '',
+					createDate: '',
+					filedNo: '',
+					confirmFiledNo: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					// this.$refs.inputForm.resetFields()
+
+					this.loading = true
+					projectReportService.queryByIdNew(this.inputForm.id).then((data) => {
+						if (data) {
+							this.inputForm = this.recover(this.inputForm, data)
+
+							if (this.status === 'taskFormDetail' || this.status === 'audit') {
+								this.method = 'view'
+							} else {
+								this.method = 'false'
+							}
+							this.loading = false
+						} else {
+							projectReportService.queryByPaperArchivingId(this.inputForm.id).then((data2) => {
+								if (data2) {
+									this.inputForm = this.recover(this.inputForm, data2)
+
+									if (this.status === 'taskFormDetail' || this.status === 'audit') {
+										this.method = 'view'
+									} else {
+										this.method = 'false'
+									}
+									this.loading = false
+								}
+
+							})
+						}
+
+					})
+				})
+			},
+			saveForm (callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm (callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					reportPaperArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+						if (this.commonJS.isNotEmpty(data.status) && data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm (callback) {
+				this.loading = true
+				await reportPaperArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+					if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.doSubmit('agree', callback)
+					}
+				})
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				reportPaperArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			doSubmit (status, callback) {
+				if (status === 'save') {
+					// 暂存
+					this.inputForm.status = '1'
+					this.loading = true
+					reportPaperArchivingService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					// 审核同意
+					this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD')
+					this.inputForm.agreeUserId = this.$store.state.user.id
+					// this.inputForm.status = '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (status === 'agree') {
+
+							if (this.inputForm.filedNo !== this.inputForm.confirmFiledNo) {
+								this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
+								this.loading = false
+								throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
+							} else {
+								this.inputForm.status = '5'
+								reportPaperArchivingService.saveForm(this.inputForm).then((data2) => {
+									callback(data2.businessTable, data2.businessId, this.inputForm)
+									this.loading = false
+								}).catch(() => {
+									this.loading = false
+								})
+							}
+
+
+
+						}else{
+
+							reportPaperArchivingService.saveForm(this.inputForm).then((data) => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+
+						}
+
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			async updateStatusById (type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					await reportPaperArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							if (type === 'reject') {
+								reportPaperArchivingService.queryByReportId(this.inputForm.id).then((review) => {
+									console.log('review', review)
+									this.rejectOn(callback)
+								})
+							}
+							if (type === 'reback') {
+								// 撤回
+								let param = {status: '3', id: this.inputForm.paperArchivingId}
+								reportPaperArchivingService.updateStatusByReportId(param)
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					reportPaperArchivingService.queryByReportId(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.paperArchivingId}
+							reportPaperArchivingService.updateStatusByReportId(param).then(() => {
+								callback()
+								this.loading = false
+							})
+						}
+					})
+				}
+			},
+			// 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
+			rejectOn (callback) {
+				// 驳回
+				let param
+				this.inputForm.status = '4'
+				param = {status: this.inputForm.status,
+					id: this.inputForm.paperArchivingId,
+					needUpdate2: this.inputForm.needUpdate2,
+					needUpdate3: this.inputForm.needUpdate3,
+					remark2: this.inputForm.remark2,
+					remark3: this.inputForm.remark3,
+					details: this.inputForm.details
+				}
+				reportPaperArchivingService.updateStatusByReportId(param).then(() => {
+					this.loading = false
+					callback()
+				})
+			},
+			close () {
+				this.inputForm = {
+					paperArchivingStatus: '',
+					paperArchivingId: '',
+					contactInfos: [],
+					contractNo: '',
+					contractName: '',
+					contractAmount: '',
+					clientName: '',
+					contractType: '',
+					projectName: '',
+					projectNumber: '',
+					location: '',
+					projectCreateByName: '',
+					officeId: '',
+					projectManager: '',
+					reportType: '',
+					projectLevel: '',
+					projectMoney: '',
+					planStartDate: '',
+					planEndDate: '',
+					createDate: '',
+					filedNo: '',
+					confirmFiledNo: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				}
+			},
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+
+	/deep/ .vxe-select-option {
+		padding: 0 .6em;
+		max-width: 600px;
+		overflow: visible;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		-webkit-user-select: none;
+		-moz-user-select: none;
+		-ms-user-select: none;
+		user-select: none
+	}
+</style>

+ 381 - 44
src/views/cw/reportManagement/reportReview/ReportReviewForm.vue

@@ -49,7 +49,7 @@
 				  <el-col :span="12">
 					  <el-form-item label="送审价(元)" prop="reviewFee"
 									:rules="[
-
+							{required: true, message: '送审价(元)不能为空', trigger: 'blur'},
                    ]">
 <!--						  <el-input v-model="inputForm.reviewFee" placeholder="请输入送审价" @change="getFee" clearable></el-input>-->
 						  <el-input
@@ -70,7 +70,7 @@
 				  <el-col :span="12">
 					  <el-form-item label="审定价(元)" prop="approvalFee"
 									:rules="[
-
+									{required: true, message: '审定价(元)不能为空', trigger: 'blur'},
 			   ]">
 <!--						  <el-input v-model="inputForm.approvalFee" placeholder="请输入审定价" clearable></el-input>-->
 						  <el-input
@@ -232,11 +232,10 @@
 					  </el-form-item>
 				  </el-col>
 				  <el-col :span="12">
-					  <el-form-item label="造价咨询营业收入(万元)" prop="ziXunShouRu"
+					  <el-form-item label="造价咨询营业收入(万元)" prop="ziXunShouRu"
 									:rules="[
-
+										{ validator: ziXunShouRuRange, trigger: 'change' }
 			   ]">
-<!--						  <el-input v-model="inputForm.ziXunShouRu" placeholder="请输入造价咨询营业收入" clearable></el-input>-->
 						  <el-input
 							  v-on:input="inputForm.ziXunShouRu=inputForm.ziXunShouRu.replace(/[^\d.]/g,'')
 							  .replace(/^\./g,'')
@@ -259,7 +258,7 @@
 						  新增
 					  </el-button>
 				  </el-divider>
-				  <el-row  :gutter="15" >
+				  <el-row  :gutter="15" v-if="inputForm.projectLevel==='1' && status !== 'audit' ">
 					  <el-col :span="24">
 						  <vxe-table
 							  border
@@ -274,9 +273,14 @@
 							  :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
 							  :edit-rules="validRules"
 						  >
+							  <vxe-table-column title="编号" field="index" width="80">
+								  <template v-slot="scope">
+									  {{ scope.$rowIndex + 1 }}
+								  </template>
+							  </vxe-table-column>
 							  <vxe-table-column field="memberName" title="成员名称" :edit-render="{}" show-overflow="title" :rules="[{required: true, message:'请选择用户', trigger:'blur'}]">
 								  <template v-slot:edit="scope">
-									  <el-input v-model="scope.row.memberName" :disabled="scope.$rowIndex == 0" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+									  <el-input v-model="scope.row.memberName" :disabled="scope.$rowIndex == 0 " @focus="userPullListForm(scope.$rowIndex)"></el-input>
 								  </template>
 							  </vxe-table-column>
 							  <vxe-table-column field="userRole" title="角色" :edit-render="{}" show-overflow="title">
@@ -306,12 +310,131 @@
 							  </vxe-table-column>
 							  <vxe-table-column title="操作" width="100">
 								  <template v-slot="scope">
-									  <el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')"  v-if="scope.$rowIndex !== 0">删除</el-button>
+									  <el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')"  v-if="scope.$rowIndex !== 0 ">删除</el-button>
 								  </template>
 							  </vxe-table-column>
 						  </vxe-table>
 					  </el-col>
 				  </el-row>
+				  <el-row  :gutter="15" v-else-if="inputForm.projectLevel==='2' && status !== 'audit'">
+					  <el-col :span="24">
+						  <vxe-table
+							  border
+							  show-footer
+							  show-overflow
+							  ref="detailTable"
+							  :key="detailKey"
+							  class="vxe-table-element"
+							  :data="inputForm.detailInfos"
+							  style="margin-left: 5em"
+							  highlight-current-row
+							  :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+							  :edit-rules="validRules"
+						  >
+							  <vxe-table-column title="编号" field="index" width="80">
+								  <template v-slot="scope">
+									  {{ scope.$rowIndex + 1 }}
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column field="memberName" title="成员名称" :edit-render="{}" show-overflow="title" :rules="[{required: true, message:'请选择用户', trigger:'blur'}]">
+								  <template v-slot:edit="scope">
+									  <el-input v-model="scope.row.memberName" :disabled="scope.$rowIndex == 0 || scope.$rowIndex == 1" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column field="userRole" title="角色" :edit-render="{}" show-overflow="title">
+								  <template v-slot:edit="scope">
+									  <el-input v-model="scope.row.userRole" :readonly="true"></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column field="enrollCertNo" title="注册/资格证号" :edit-render="{}" show-overflow="title">
+								  <template v-slot:edit="scope">
+									  <el-input v-model="scope.row.enrollCertNo" :readonly="true"></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column field="profession" title="专业" :edit-render="{}" show-overflow="title">
+								  <template v-slot:edit="scope">
+									  <el-input v-model="scope.row.profession" :readonly="true"></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column field="content" title="本人负责内容" :edit-render="{}" show-overflow="title">
+								  <template v-slot:edit="scope">
+									  <el-input v-model="scope.row.content" ></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column field="opinion" title="审核意见" :edit-render="{}" show-overflow="title">
+								  <template v-slot:edit="scope">
+									  <el-input v-model="scope.row.opinion" ></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column title="操作" width="100">
+								  <template v-slot="scope">
+									  <el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')"  v-if="scope.$rowIndex !== 0 && scope.$rowIndex !== 1 ">删除</el-button>
+								  </template>
+							  </vxe-table-column>
+						  </vxe-table>
+					  </el-col>
+				  </el-row>
+				  <el-form :model="inputForm" ref="inputForm" v-loading="loading" v-if="status === 'audit'" :class="method==='view'?'readonly':''"
+						   label-width="160px" @submit.native.prevent>
+					  <el-row  :gutter="15" >
+						  <el-col :span="24">
+							  <vxe-table
+								  border
+								  show-footer
+								  show-overflow
+								  ref="detailTable"
+								  :key="detailKey"
+								  class="vxe-table-element"
+								  :data="inputForm.detailInfos"
+								  style="margin-left: 5em"
+								  highlight-current-row
+								  :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
+								  :edit-rules="validRules2"
+							  >
+								  <vxe-table-column title="编号" field="index" width="80">
+									  <template v-slot="scope">
+										  {{ scope.$rowIndex + 1 }}
+									  </template>
+								  </vxe-table-column>
+								  <vxe-table-column field="memberName" title="成员名称" :edit-render="{}" show-overflow="title" :rules="[{required: true, message:'请选择用户', trigger:'blur'}]">
+									  <template v-slot:edit="scope">
+										  <el-input v-model="scope.row.memberName" :disabled="scope.$rowIndex == 0 || scope.$rowIndex == 1" @focus="userPullListForm(scope.$rowIndex)"></el-input>
+									  </template>
+								  </vxe-table-column>
+								  <vxe-table-column field="userRole" title="角色" :edit-render="{}" show-overflow="title">
+									  <template v-slot:edit="scope">
+										  <el-input v-model="scope.row.userRole" :readonly="true"></el-input>
+									  </template>
+								  </vxe-table-column>
+								  <vxe-table-column field="enrollCertNo" title="注册/资格证号" :edit-render="{}" show-overflow="title">
+									  <template v-slot:edit="scope">
+										  <el-input v-model="scope.row.enrollCertNo" :readonly="true"></el-input>
+									  </template>
+								  </vxe-table-column>
+								  <vxe-table-column field="profession" title="专业" :edit-render="{}" show-overflow="title">
+									  <template v-slot:edit="scope">
+										  <el-input v-model="scope.row.profession" :readonly="true"></el-input>
+									  </template>
+								  </vxe-table-column>
+								  <vxe-table-column field="content" title="本人负责内容" :edit-render="{}" show-overflow="title">
+									  <template v-slot:edit="scope">
+										  <el-input v-model="scope.row.content" :readonly="scope.$rowIndex == 0 || scope.$rowIndex == 1"></el-input>
+									  </template>
+								  </vxe-table-column>
+								  <vxe-table-column field="opinion" title="审核意见" :edit-render="{}" show-overflow="title">
+									  <template v-slot:edit="scope">
+										  <el-input v-model="scope.row.opinion" :readonly="scope.$rowIndex == 0 || scope.$rowIndex == 1"></el-input>
+									  </template>
+								  </vxe-table-column>
+								  <vxe-table-column title="操作" width="100">
+									  <template v-slot="scope">
+										  <el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')"  v-if="scope.$rowIndex !== 0 && scope.$rowIndex !== 1 && scope.$rowIndex !== 2">删除</el-button>
+									  </template>
+								  </vxe-table-column>
+							  </vxe-table>
+						  </el-col>
+					  </el-row>
+				  </el-form>
 			  </div>
 			  <UserPullFormNew ref="userPullFormNew" @getProgramForUser="getProgramForUser"></UserPullFormNew>
 		  </el-form >
@@ -462,11 +585,26 @@
 				  {required: true, message: '审核意见不能为空'}
 			  ],
 		  },
+		  validRules2: {
+			  memberName: [
+				  {required: true, message: '成员名称不能为空'}
+			  ],
+			  enrollCertNo: [
+				  {required: true, message: '注册/资格证号不能为空'}
+			  ],
+			  profession: [
+				  {required: true, message: '专业不能为空'}
+			  ],
+			  opinion: [
+				  {required: true, message: '审核意见不能为空'}
+			  ],
+		  },
 		  detailKey: '',
         title: '',
         method: '',
         loading: false,
         inputForm: {
+			reviewByName: '',
 			procInsId3: '',
 			reviewNewId: '',
 			projectLevel: '',
@@ -559,6 +697,7 @@
         this.reportReviewService = new ReportReviewService()
         this.method = method
         this.inputForm = {
+			reviewByName: '',
 			procInsId3: '',
 			reviewNewId: '',
 			projectLevel: '',
@@ -610,13 +749,12 @@
 
 			  // 根据证书类型  获取字典值
 			  let professionList = this.getProfessionList(this.inputForm.professionType)
-			  professionList.forEach(item => {
-			  	if (item.value == this.inputForm.profession) {
-					this.inputForm.profession = item.label
-				}
-			  })
-
 			  if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+				  professionList.forEach(item => {
+					  if (item.value == this.inputForm.profession) {
+						  this.inputForm.profession = item.label
+					  }
+				  })
 				  let d = {
 					  memberName: this.inputForm.memberName,
 					  userId: this.inputForm.projectManagerId,
@@ -627,10 +765,55 @@
 				  this.inputForm.detailInfos = []
 				  this.inputForm.detailInfos.push(d)
 				  this.detailKey = Math.random()
+			  } else {
+				  console.log('this.inputForm.detailInfos', this.inputForm.detailInfos)
+				  this.reportReviewService.getUserInfo(this.inputForm.reviewBy).then((data) => {
+					  this.inputForm.detailInfos.forEach(item => {
+						  professionList = this.getProfessionList(item.professionType)
+						  professionList.forEach(item2 => {
+							  if (item.profession == item2.value) {
+								  item.profession = item2.label
+							  }
+							  if (item.userRole === '技术负责人') {
+								  item.memberName = data.memberName + '(' + this.inputForm.reviewByName + '代)'
+							  }
+						  })
+					  })
+				  })
+
 			  }
+			  console.log('status', this.status)
+			  if (this.status === 'audit') {
+
+				  this.reportReviewService.getUserInfo(this.inputForm.reviewBy).then((data) => {
+
+					  let professionList = this.getProfessionList(data.professionType)
+					  professionList.forEach(item => {
+						  if (item.value == data.profession) {
+							  data.profession = item.label
+						  }
+					  })
 
+					  let d = {
+						  memberName: data.memberName + '(' + this.inputForm.reviewByName + '代)',
+						  userId: this.inputForm.reviewBy,
+						  userRole: '技术负责人',
+						  enrollCertNo: data.enrollCertNo,
+						  profession: data.profession,
+					  }
+					  if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+						  this.inputForm.detailInfos = []
+					  }
+					  this.inputForm.detailInfos.push(d)
+					  this.detailKey = Math.random()
+				  }).catch(() => {
 
-			  projectReportService.getAttachmentList(data.projectId,this.inputForm.id).then((data) => {
+				  })
+			  }
+
+
+
+			  projectReportService.getAttachmentList(data.projectId,this.inputForm.id,'').then((data) => {
 				  this.tableData = data
 				  this.tableKey = Math.random()
 			  })
@@ -723,20 +906,41 @@
             this.loading = true
 			  if (status === 'agree') {
 
-				  this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId3).then((data) => {
-					  if (this.commonJS.isNotEmpty(data)) {
-						  if (data === '三级复核') {
-							  this.inputForm.reviewStatus = '5'
-						  } else {
-							  this.inputForm.reviewStatus = '2'
-						  }
+				  let i = this.inputForm.detailInfos.length
+
+				  for (let j = 0; j < i; j++) {
+					  this.inputForm.detailInfos[j].detailNumber = j+1;
+					  let k = j + 1
+					  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].memberName)){
+						  this.loading = false
+						  this.$message.error('项目组成员第'+k+'行成员名称为空')
+						  throw new Error('项目组成员第'+k+'行成员名称为空')
 					  }
-					  this.reportReviewService.saveFormReviewNew(this.inputForm).then((data) => {
-						  callback(data.businessTable, data.businessId, this.inputForm)
+					  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].enrollCertNo)){
 						  this.loading = false
-					  }).catch(() => {
+						  this.$message.error('项目组成员第'+k+'行注册/资格证号为空')
+						  throw new Error('项目组成员第'+k+'行注册/资格证号为空')
+					  }
+					  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].profession)){
 						  this.loading = false
-					  })
+						  this.$message.error('项目组成员第'+k+'行专业为空')
+						  throw new Error('项目组成员第'+k+'行专业为空')
+					  }
+					  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].opinion)){
+						  this.loading = false
+						  this.$message.error('项目组成员第'+k+'行审核意见为空')
+						  throw new Error('项目组成员第'+k+'行审核意见为空')
+					  }
+
+
+				  }
+
+				  this.inputForm.reviewStatus = '5'
+				  this.reportReviewService.saveFormReviewNew(this.inputForm).then((data) => {
+					  callback(data.businessTable, data.businessId, this.inputForm)
+					  this.loading = false
+				  }).catch(() => {
+					  this.loading = false
 				  })
 
 			  }else{
@@ -761,7 +965,27 @@
 					  throw new Error()
 				  }else {
 					  let i = this.inputForm.detailInfos.length
+
+					  if (this.inputForm.projectLevel === '1') {
+						  if (i <= 1) {
+							  this.loading = false
+							  this.$message.error('请添加咨询员信息')
+							  throw new Error('请添加咨询员信息')
+						  }
+					  } else if (this.inputForm.projectLevel === '2') {
+						  if (i <= 1) {
+							  this.loading = false
+							  this.$message.error('请添加技术负责人信息')
+							  throw new Error('请添加技术负责人信息')
+						  } else if (i <= 2) {
+							  this.loading = false
+							  this.$message.error('请添加咨询员信息')
+							  throw new Error('请添加咨询员信息')
+						  }
+					  }
+
 					  for (let j = 0; j < i; j++) {
+						  this.inputForm.detailInfos[j].detailNumber = j+1;
 						  let k = j + 1
 						  if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].memberName)){
 							  this.loading = false
@@ -792,12 +1016,63 @@
 
 					  }
 				  }
-				  this.reportReviewService.saveFormReviewNew(this.inputForm).then((data) => {
-					  callback(data.businessTable, data.businessId, this.inputForm)
-					  this.loading = false
-				  }).catch(() => {
-					  this.loading = false
+				  this.tableData.forEach(item=>{
+					  if (item.levelFlag === 2 && item.mustFlag === 1){
+						  if (item.children.length === 0){
+							  this.loading = false
+							  this.$message.error('文件未上传')
+							  throw new Error('文件未上传')
+						  }
+					  }
 				  })
+
+				  var newDate = this.moment(new Date).format('YYYY-MM-DD');
+				  console.log('newDate', newDate)
+				  if(this.inputForm.workStartDate > newDate || this.inputForm.workEndDate < newDate){
+
+					  this.$confirm(`质量复核日期不在工作开始结束日期之内,是否要修改工作开始结束日期??`, '提示', {
+						  confirmButtonText: '否',
+						  cancelButtonText: '是',
+						  type: 'warning'
+					  }).then(() => {
+						  if (this.inputForm.projectLevel === '1') {
+							  this.reportReviewService.saveFormReviewNew(this.inputForm).then((data) => {
+								  callback(data.businessTable, data.businessId, this.inputForm)
+								  this.loading = false
+							  }).catch(() => {
+								  this.loading = false
+							  })
+						  } else if (this.inputForm.projectLevel === '2'){
+							  this.inputForm.reviewStatus = '5'
+							  this.reportReviewService.saveFormReviewNew(this.inputForm).then((data) => {
+								  this.$router.push({path: '/cw/reportManagement/ReportManagementList'})
+								  this.loading = false
+							  }).catch(() => {
+								  this.loading = false
+							  })
+						  }
+					  }).catch(() => {
+						  this.loading = false
+					  })
+				  } else {
+					  if (this.inputForm.projectLevel === '1') {
+						  this.reportReviewService.saveFormReviewNew(this.inputForm).then((data) => {
+							  callback(data.businessTable, data.businessId, this.inputForm)
+							  this.loading = false
+						  }).catch(() => {
+							  this.loading = false
+						  })
+					  } else if (this.inputForm.projectLevel === '2'){
+						  this.inputForm.reviewStatus = '5'
+						  this.reportReviewService.saveFormReviewNew(this.inputForm).then((data) => {
+							  this.$router.push({path: '/cw/reportManagement/ReportManagementList'})
+							  this.loading = false
+						  }).catch(() => {
+							  this.loading = false
+						  })
+					  }
+				  }
+
 			  }
 
           } else {
@@ -815,7 +1090,7 @@
               throw new Error()
             } else {
               if (type === 'reject') {
-                this.reportReviewService.queryByReportId(this.inputForm.id).then((review) => {
+                this.reportReviewService.queryByReportIdNew(this.inputForm.id).then((review) => {
                 	console.log('review', review)
 					this.rejectOn(callback)
                 })
@@ -864,6 +1139,7 @@
       },
       close () {
         this.inputForm = {
+			reviewByName: '',
 			procInsId3: '',
 			reviewNewId: '',
 			projectLevel: '',
@@ -904,18 +1180,70 @@
 		// 新增
 		async insertEvent (type) {
 			if (type === 'detail') {
-				let d = {
-					memberName: '',
-					userId: '',
-					userRole: '咨询员',
-					enrollCertNo: '',
-					profession: '',
-				}
-				if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
-					this.inputForm.detailInfos = []
+
+				//根据项目等级来设置
+				if (this.inputForm.projectLevel === '1') {
+					let d = {
+						memberName: '',
+						userId: '',
+						userRole: '咨询员',
+						enrollCertNo: '',
+						profession: '',
+					}
+					if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+						this.inputForm.detailInfos = []
+					}
+					this.inputForm.detailInfos.push(d)
+					this.detailKey = Math.random()
+				} else if (this.inputForm.projectLevel === '2') {
+
+					if (this.commonJS.isEmpty(this.inputForm.reviewBy)) {
+						this.$message.error('请先选择审核人员!')
+						throw new Error('请先选择审核人员!')
+					}
+
+					if (this.inputForm.detailInfos.length  == 1) {
+						//查询陈红星的注册/资格证号,专业信息
+						this.reportReviewService.getUserInfo(this.inputForm.reviewBy).then((data) => {
+
+							let professionList = this.getProfessionList(data.professionType)
+							professionList.forEach(item => {
+								if (item.value == data.profession) {
+									data.profession = item.label
+								}
+							})
+
+							let d = {
+								memberName: data.memberName + '(' + this.inputForm.reviewByName + '代)',
+								userId: this.inputForm.reviewBy,
+								userRole: '技术负责人',
+								enrollCertNo: data.enrollCertNo,
+								profession: data.profession,
+							}
+							if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+								this.inputForm.detailInfos = []
+							}
+							this.inputForm.detailInfos.push(d)
+							this.detailKey = Math.random()
+						}).catch(() => {
+
+						})
+					} else {
+						let d = {
+							memberName: '',
+							userId: '',
+							userRole: '咨询员',
+							enrollCertNo: '',
+							profession: '',
+						}
+						if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+							this.inputForm.detailInfos = []
+						}
+						this.inputForm.detailInfos.push(d)
+						this.detailKey = Math.random()
+					}
+
 				}
-				this.inputForm.detailInfos.push(d)
-				this.detailKey = Math.random()
 			}
 		},
 		getProgramForUser (rows) {
@@ -1038,6 +1366,15 @@
 				callback();
 			}
 		},
+		ziXunShouRuRange(rule, value, callback) {
+			if (!value || value.trim() === "") {
+				callback(new Error('造价咨询营业收入不能为空!'));
+			} else if (parseFloat(value) <= 0) {
+				callback(new Error('造价咨询营业收入必须大于0!'));
+			} else {
+				callback();
+			}
+		},
 		// 项目组成员下拉弹窗
 		userPullListForm (rowIndex) {
 			this.indexRow = rowIndex
@@ -1083,7 +1420,7 @@
 			toHref(row)
 		},
 		getFiles(){
-			projectReportService.getAttachmentList(this.inputForm.projectId,this.inputForm.id).then((data) => {
+			projectReportService.getAttachmentList(this.inputForm.projectId,this.inputForm.id,'').then((data) => {
 				this.tableData = data
 				this.tableKey = Math.random()
 			})

+ 975 - 0
src/views/cw/reportManagement/signAndIssue/ReportSignAndIssue.vue

@@ -0,0 +1,975 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-row>
+			<el-col :span="24">
+
+				<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="true"
+						 label-width="135px" @submit.native.prevent>
+
+					<el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
+					<el-row  :gutter="0">
+						<el-col :span="12">
+							<el-form-item label="项目名称" prop="projectName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目编号" prop="projectNumber"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectNumber" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="项目负责人" prop="projectManager"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectManager" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="创建人" prop="projectCreateByName"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectCreateByName" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="创建时间" prop="projectCreateTime"
+										  :rules="[
+                   ]">
+								<el-input :disabled="true" v-model="inputForm.projectCreateTime" clearable></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-divider content-position="left"><i class="el-icon-document"></i> 质量复核信息</el-divider>
+					<el-row  :gutter="0">
+						<el-col :span="12">
+							<el-form-item label="送审价(元)" prop="reviewFee"
+										  :rules="[
+							{required: true, message: '送审价(元)不能为空', trigger: 'blur'},
+                   ]">
+								<!--						  <el-input v-model="inputForm.reviewFee" placeholder="请输入送审价" @change="getFee" clearable></el-input>-->
+								<el-input
+									@change="getFee"
+									v-on:input="inputForm.reviewFee=inputForm.reviewFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+									v-model="inputForm.reviewFee"
+									controls-position="right"
+									:controls="false"
+									style="width:100%;"
+									placeholder="请输入送审价(元)"
+									clearable />
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="审定价(元)" prop="approvalFee"
+										  :rules="[
+									{required: true, message: '审定价(元)不能为空', trigger: 'blur'},
+			   ]">
+								<!--						  <el-input v-model="inputForm.approvalFee" placeholder="请输入审定价" clearable></el-input>-->
+								<el-input
+									@change="getApprovalFee"
+									v-on:input="inputForm.approvalFee=inputForm.approvalFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+									v-model="inputForm.approvalFee"
+									controls-position="right"
+									:controls="false"
+									style="width:100%;"
+									placeholder="请输入审定价(元)"
+									clearable />
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="合同类别" prop="contractCategory" :rules="[]">
+								<el-radio-group v-model="inputForm.contractCategory">
+									<el-radio v-for="item in $dictUtils.getDictList('contract_amount_type')" :key="item.value" :label="item.value">{{item.label}}</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12" v-if="inputForm.contractCategory === '1'">
+							<el-form-item label="合同价(元)" prop="contractFee"
+										  :rules="[
+
+			   ]">
+								<el-input v-model="inputForm.contractFee" placeholder="请输入合同价(元)" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12" v-if="inputForm.contractCategory === '2'">
+							<el-form-item label="费率(%)" prop="contractRate"
+										  :rules="[
+
+			   ]">
+								<el-input v-model="inputForm.contractRate" placeholder="请输入费率(%)" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="下一节点审核人" prop="reviewBy"
+										  :rules="[
+										{required: true, message:'下一节点审核人不能为空', trigger:'change'}
+                   ]">
+								<UserSelectSignatory style="width: 100%" ref="userSelect1"
+													 :readonly="true" :limit='1' :modelValue="inputForm.reviewBy"
+													 @update:modelValue='(value) => {inputForm.reviewBy = value}'></UserSelectSignatory>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="核增核减额(元)" prop="verifyFee"
+										  :rules="[
+
+			   ]">
+								<el-input v-model="inputForm.verifyFee" :disabled="true" placeholder="请输入核增核减额(元)" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="核增核减率(%)" prop="verifyRate"
+										  :rules="[
+
+			   ]">
+								<el-input v-model="inputForm.verifyRate" :disabled="true" placeholder="请输入核增核减率(%)" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="咨询标的额(元)" prop="consultFee"
+										  :rules="[
+
+			   ]">
+								<el-input v-model="inputForm.consultFee" :disabled="true" placeholder="请输入咨询标的额(元)" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="土建造价(元)" prop="buildingFee"
+										  :rules="[
+
+			   ]">
+								<!--						  <el-input v-model="inputForm.buildingFee" placeholder="请输入土建造价(元)" clearable></el-input>-->
+								<el-input
+									@change="getBuildingFee"
+									v-on:input="inputForm.buildingFee=inputForm.buildingFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+									v-model="inputForm.buildingFee"
+									controls-position="right"
+									:controls="false"
+									style="width:100%;"
+									placeholder="土建造价(元)"
+									clearable />
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="安装造价(元)" prop="installFee"
+										  :rules="[
+
+			   ]">
+								<!--						  <el-input v-model="inputForm.installFee" placeholder="请输入安装造价(元)" clearable></el-input>-->
+								<el-input
+									@change="getInstallFee"
+									v-on:input="inputForm.installFee=inputForm.installFee.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+									v-model="inputForm.installFee"
+									controls-position="right"
+									:controls="false"
+									style="width:100%;"
+									placeholder="安装造价(元)"
+									clearable />
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="土建比例(%)" prop="buildingRate"
+										  :rules="[
+
+			   ]">
+								<el-input v-model="inputForm.buildingRate" :disabled="true" placeholder="请输入土建比例(%)" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="安装比例(%)" prop="installRate"
+										  :rules="[
+
+			   ]">
+								<el-input v-model="inputForm.installRate" :disabled="true" placeholder="请输入安装比例(%)" clearable></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="工作开始时间" prop="workStartDate" :rules="[
+					  	{required: true, message: '工作开始时间不能为空', trigger: 'blur'},
+					  	{ validator: validateDateRange, trigger: 'change' }
+               ]">
+								<el-date-picker
+									style="width: 100%"
+									v-model="inputForm.workStartDate"
+									value-format="YYYY-MM-DD"
+									placeholder="选择日期"
+								>
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="工作结束时间" prop="workEndDate" :rules="[
+					  	{required: true, message: '工作结束时间不能为空', trigger: 'blur'},
+					  	{ validator: validateDateRange, trigger: 'change' }
+               ]">
+								<el-date-picker
+									style="width: 100%"
+									v-model="inputForm.workEndDate"
+									value-format="YYYY-MM-DD"
+									placeholder="选择日期"
+								>
+								</el-date-picker>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="造价咨询营业收入(万元)" prop="ziXunShouRu"
+										  :rules="[
+										{ validator: ziXunShouRuRange, trigger: 'change' }
+			   ]">
+								<el-input
+									v-on:input="inputForm.ziXunShouRu=inputForm.ziXunShouRu.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+									v-model="inputForm.ziXunShouRu"
+									controls-position="right"
+									:controls="false"
+									style="width:100%;"
+									placeholder="请输入造价咨询营业收入(万元)"
+									clearable />
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-form >
+				<el-divider content-position="left"><i class="el-icon-document"></i>
+					<span>文件信息</span>
+				</el-divider>
+				<el-row  :gutter="15" >
+					<el-col :span="24">
+						<vxe-table
+							border
+							show-overflow
+							ref="clientTable"
+							class="vxe-table-element"
+							style="margin-left: 5em"
+							:row-config="{keyField: 'id'}"
+							:column-config="{resizable: true}"
+							:tree-config="{transform: true, expandAll: true}"
+							:key="tableKey"
+							:data="tableData">
+							<vxe-column field="name" title="文件要求" width="240px" tree-node>
+								<template #default="scope">
+							<span style="font-weight: bold"
+								  v-if="scope.row.parentId === '0'"
+							>{{ scope.row.name }}
+							</span>
+									<span
+										v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 1"
+									><span style="color: red;font-weight: bold">* </span>{{ scope.row.name }}
+							</span>
+									<span
+										v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 0"
+									>{{ scope.row.name }}
+							</span>
+								</template>
+							</vxe-column>
+							<vxe-column field="attachmentName" title="文件描述/文件名称" show-overflow="false">
+								<template #default="scope">
+							<span
+								v-if="scope.row.levelFlag === 2"
+							>
+								<span style="font-weight: bold">文件格式及大小:{{ scope.row.size }}</span>
+								<br>
+								<span>{{ scope.row.type }}</span>
+							</span>
+									<div v-if="ifName(scope.row) === true">
+										<el-image
+											style="width: 30px; height: 30px;padding-top: 4px;"
+											:src="scope.row.lsUrl"
+											:preview-src-list="[scope.row.lsUrl]"
+											:preview-teleported="true"
+										></el-image>
+									</div>
+									<div v-else>
+										<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+									</div>
+								</template>
+							</vxe-column>
+							<vxe-column field="workAttachmentType" width="100px" title="文件类型"></vxe-column>
+							<vxe-column field="createDate" title="上传时间" width="100px"></vxe-column>
+							<vxe-column field="fileSize" width="100px" title="文件大小(M)">
+								<template #default="scope">
+									{{getSize(scope.row.fileSize)}}
+								</template>
+							</vxe-column>
+
+							<vxe-column
+								title="操作"
+								width="100px"
+								fixed="right"
+								align="center"
+							>
+								<template #default="scope">
+									<el-button
+										v-if="scope.row.levelFlag === 2"
+										type="primary"
+										size="small"
+										:disabled="status === 'audit' ||status === 'taskFormDetail'|| method ==='view'"
+										@click="openFileForm(scope.row.id,this.inputForm.id)"
+									>编辑</el-button>
+									<el-button
+										v-if="scope.row.levelFlag === 3"
+										type="info"
+										size="small"
+										@click="toHref(scope.row)" >下载</el-button>
+
+								</template>
+							</vxe-column>
+						</vxe-table>
+					</el-col>
+				</el-row>
+				<FileForm ref="fileForm" @getFiles="getFiles"></FileForm>
+			</el-col>
+		</el-row>
+	</div>
+</template>
+
+<script>
+	import moment from 'moment';
+	import FileForm from '@/views/cw/reportManagement/reportReview/FileForm'
+	import OSSSerivce, {
+		// eslint-disable-next-line no-unused-vars
+		beforeAvatarUpload,
+		// eslint-disable-next-line no-unused-vars
+		openWindowOnUrl,
+		// eslint-disable-next-line no-unused-vars
+		toHref
+	} from '@/api/sys/OSSService'
+	import UserSelectSignatory from '@/components/userSelectNew'
+	import ReportSignAndIssueService from '@/api/cw/reportManagement/ReportSignAndIssueService'
+	import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				tableKey: '',
+				tableData: [],
+				validRules: {
+					memberName: [
+						{required: true, message: '成员名称不能为空'}
+					],
+					enrollCertNo: [
+						{required: true, message: '注册/资格证号不能为空'}
+					],
+					profession: [
+						{required: true, message: '专业不能为空'}
+					],
+					content: [
+						{required: true, message: '本人负责内容不能为空'}
+					],
+					opinion: [
+						{required: true, message: '审核意见不能为空'}
+					],
+				},
+				validRules2: {
+					memberName: [
+						{required: true, message: '成员名称不能为空'}
+					],
+					enrollCertNo: [
+						{required: true, message: '注册/资格证号不能为空'}
+					],
+					profession: [
+						{required: true, message: '专业不能为空'}
+					],
+					opinion: [
+						{required: true, message: '审核意见不能为空'}
+					],
+				},
+				detailKey: '',
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					reviewByName: '',
+					procInsId3: '',
+					signAndIssueId: '',
+					projectLevel: '',
+					memberName: '',
+					enrollCertNo: '',
+					profession: '',
+					professionType: '',
+					projectName: '',
+					projectId: '',
+					projectNumber: '',
+					projectManager: '',
+					projectManagerId: '',
+					projectCreateByName: '',
+					projectCreateTime: '',
+					reviewFee: '',
+					approvalFee: '',
+					contractCategory: '',
+					contractFee: '',
+					contractRate: '',
+					reviewBy: '',
+					verifyFee: '',
+					verifyRate: '',
+					consultFee: '',
+					buildingFee: '',
+					installFee: '',
+					buildingRate: '',
+					installRate: '',
+					workStartDate: '',
+					workEndDate: '',
+					ziXunShouRu: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				},
+				keyWatch: '',
+			}
+		},
+		reportSignAndIssueService: null,
+		commonApi: null,
+		created () {
+			this.reportSignAndIssueService = new ReportSignAndIssueService()
+			this.commonApi = new CommonApi()
+		},
+		computed: {
+			bus: {
+				get () {
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					if (this.commonJS.isNotEmpty(this.bus)) {
+						this.init('', this.bus)
+					} else {
+						this.$nextTick(() => {
+							// this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+				}
+			}
+		},
+		components: {
+			FileForm,
+			UserSelectSignatory,
+		},
+		methods: {
+			getKeyWatch (keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init (method, id) {
+				console.log('method', method)
+				this.method = method
+				this.inputForm = {
+					reviewByName: '',
+					procInsId3: '',
+					signAndIssueId: '',
+					projectLevel: '',
+					memberName: '',
+					enrollCertNo: '',
+					profession: '',
+					professionType: '',
+					projectName: '',
+					projectId: '',
+					projectNumber: '',
+					projectManager: '',
+					projectManagerId: '',
+					projectCreateByName: '',
+					projectCreateTime: '',
+					reviewFee: '',
+					approvalFee: '',
+					contractCategory: '',
+					contractFee: '',
+					contractRate: '',
+					reviewBy: '',
+					verifyFee: '',
+					verifyRate: '',
+					consultFee: '',
+					buildingFee: '',
+					installFee: '',
+					buildingRate: '',
+					installRate: '',
+					workStartDate: '',
+					workEndDate: '',
+					ziXunShouRu: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				}
+				this.inputForm.id = id
+				this.loading = false
+				this.$nextTick(() => {
+					// this.$refs.inputForm.resetFields()
+
+					this.loading = true
+					projectReportService.queryByIdNew(this.inputForm.id).then((data) => {
+						if (data) {
+							this.inputForm = this.recover(this.inputForm, data)
+
+							if (this.commonJS.isEmpty(this.inputForm.contractCategory)) {
+								this.inputForm.contractCategory = '1'
+							}
+
+							projectReportService.getAttachmentList(data.projectId,this.inputForm.id,'').then((data) => {
+								this.tableData = data
+								this.tableKey = Math.random()
+							})
+
+							if (this.status === 'taskFormDetail' || this.status === 'audit') {
+								this.method = 'view'
+							} else {
+								this.method = 'false'
+							}
+							this.loading = false
+						} else {
+							projectReportService.queryBySignAndIssueId(this.inputForm.id).then((data2) => {
+								if (data2) {
+									this.inputForm = this.recover(this.inputForm, data2)
+
+									if (this.commonJS.isEmpty(this.inputForm.contractCategory)) {
+										this.inputForm.contractCategory = '1'
+									}
+
+									projectReportService.getAttachmentList(data2.projectId,this.inputForm.id,'').then((data3) => {
+										this.tableData = data3
+										this.tableKey = Math.random()
+									})
+
+									if (this.status === 'taskFormDetail' || this.status === 'audit') {
+										this.method = 'view'
+									} else {
+										this.method = 'false'
+									}
+									this.loading = false
+								}
+
+							})
+						}
+
+					})
+				})
+			},
+			clearClientList () {
+				// 项目直接对接联系人列表清除
+				this.inputForm.clientList = []
+				this.$forceUpdate()
+			},
+			saveForm (callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm (callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.reportSignAndIssueService.queryByReportId(this.inputForm.id).then((data) => {
+						if (this.commonJS.isNotEmpty(data.status) && data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm (callback) {
+				this.loading = true
+				await this.reportSignAndIssueService.queryByReportId(this.inputForm.id).then((data) => {
+					if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.doSubmit('agree', callback)
+					}
+				})
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				this.reportSignAndIssueService.queryByReportId(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			doSubmit (status, callback) {
+				if (status === 'save') {
+					// 暂存
+					this.inputForm.status = '1'
+					this.loading = true
+					this.reportSignAndIssueService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					// 送审  待审核
+					this.inputForm.status = '2'
+					this.inputForm.assignee = this.inputForm.reviewBy
+				} else if (status === 'agree') {
+					// 审核同意
+					this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD')
+					this.inputForm.agreeUserId = this.$store.state.user.id
+					// this.inputForm.status = '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+					this.inputForm.assignee = this.inputForm.reviewBy
+				}
+				if (this.commonJS.isEmpty(this.tableData)) {
+					this.loading = false
+					this.$message.error('附件信息加载中,请稍等!')
+					throw new Error('附件信息加载中,请稍等!')
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						if (status === 'agree') {
+
+							this.inputForm.status = '5'
+							this.reportSignAndIssueService.saveForm(this.inputForm).then((data) => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+
+						}else{
+
+							this.tableData.forEach(item=>{
+								if (item.levelFlag === 2 && item.mustFlag === 1){
+									if (item.children.length === 0){
+										this.loading = false
+										this.$message.error('文件未上传')
+										throw new Error('文件未上传')
+									}
+								}
+							})
+
+							this.reportSignAndIssueService.saveForm(this.inputForm).then((data) => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+
+						}
+
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			async updateStatusById (type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					await this.reportSignAndIssueService.queryByReportId(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							if (type === 'reject') {
+								this.reportSignAndIssueService.queryByReportId(this.inputForm.id).then((review) => {
+									console.log('review', review)
+									this.rejectOn(callback)
+								})
+							}
+							if (type === 'reback') {
+								// 撤回
+								let param = {status: '3', id: this.inputForm.signAndIssueId}
+								this.reportSignAndIssueService.updateStatusByReportId(param)
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.reportSignAndIssueService.queryByReportId(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.signAndIssueId}
+							this.reportSignAndIssueService.updateStatusByReportId(param).then(() => {
+								callback()
+								this.loading = false
+							})
+						}
+					})
+				}
+			},
+			// 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
+			rejectOn (callback) {
+				// 驳回
+				let param
+				this.inputForm.status = '4'
+				param = {status: this.inputForm.status,
+					id: this.inputForm.signAndIssueId,
+					needUpdate2: this.inputForm.needUpdate2,
+					needUpdate3: this.inputForm.needUpdate3,
+					remark2: this.inputForm.remark2,
+					remark3: this.inputForm.remark3,
+					details: this.inputForm.details
+				}
+				this.reportSignAndIssueService.updateStatusByReportId(param).then(() => {
+					this.loading = false
+					callback()
+				})
+			},
+			close () {
+				this.inputForm = {
+					reviewByName: '',
+					procInsId3: '',
+					signAndIssueId: '',
+					projectLevel: '',
+					memberName: '',
+					enrollCertNo: '',
+					profession: '',
+					professionType: '',
+					projectName: '',
+					projectId: '',
+					projectNumber: '',
+					projectManager: '',
+					projectManagerId: '',
+					projectCreateByName: '',
+					projectCreateTime: '',
+					reviewFee: '',
+					approvalFee: '',
+					contractCategory: '',
+					contractFee: '',
+					contractRate: '',
+					reviewBy: '',
+					verifyFee: '',
+					verifyRate: '',
+					consultFee: '',
+					buildingFee: '',
+					installFee: '',
+					buildingRate: '',
+					installRate: '',
+					workStartDate: '',
+					workEndDate: '',
+					ziXunShouRu: '',
+					createBy: {
+						id: '',
+						name: this.$store.state.user.name
+					},
+				}
+			},
+			getProfessionList(type) {
+				switch (type) {
+					case '1':
+					case '2':
+						return this.$dictUtils.getDictList('sys_cert_profession_build');
+					case '3':
+					case '4':
+						return this.$dictUtils.getDictList('sys_cert_profession_cost');
+					case '5':
+						return this.$dictUtils.getDictList('sys_cert_profession_supervision');
+					case '6':
+						return this.$dictUtils.getDictList('sys_cert_profession_accounting');
+					default:
+						return [];
+				}
+			},
+			getFee() {
+				//送审价
+				var rf = this.inputForm.reviewFee
+				//审定价
+				var af = this.inputForm.approvalFee
+				if (this.commonJS.isNotEmpty(rf) && rf !== '0.00' && this.commonJS.isNotEmpty(af) && af !== '0.00') {
+					var hf = (af*100-rf*100)/100;
+					var rate = parseFloat(hf) / parseFloat(rf) * 100
+					this.inputForm.verifyFee = hf.toFixed(2)
+					this.inputForm.verifyRate = rate.toFixed(2)
+				}
+				if (this.commonJS.isNotEmpty(af)) {
+					this.inputForm.consultFee = af
+				}
+
+			},
+			getApprovalFee() {
+				//送审价
+				var rf = this.inputForm.reviewFee
+				//审定价
+				var af = this.inputForm.approvalFee
+				if(this.commonJS.isNotEmpty(rf) && rf != '0.00' && this.commonJS.isNotEmpty(af) && af !='0.00'){
+					//计算审核增减额
+					var hf = (af*100-rf*100)/100;
+					var rate = parseFloat(hf) / parseFloat(rf) * 100
+					this.inputForm.verifyFee = hf.toFixed(2)
+					this.inputForm.verifyRate = rate.toFixed(2)
+				}
+				if(this.commonJS.isNotEmpty(af)){
+					this.inputForm.consultFee = af
+				}
+				this.inputForm.buildingFee = ''
+				this.inputForm.installFee = ''
+				this.inputForm.buildingRate = ''
+				this.inputForm.installRate = ''
+			},
+			getBuildingFee() {
+				var af = this.inputForm.approvalFee
+				//土建
+				var bf = this.inputForm.buildingFee
+				if(this.commonJS.isNotEmpty(bf) && this.commonJS.isNotEmpty(af)){
+					var hf = parseInt(af)-parseInt(bf);
+					var rate = Math.round(parseInt(bf) / parseInt(af) * 100) / 100 * 100
+					this.inputForm.buildingRate = rate
+					this.inputForm.installFee = hf
+					var inRate = Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100
+					this.inputForm.installRate = inRate
+				}
+				if(this.commonJS.isEmpty(bf) || this.commonJS.isEmpty(af)){
+					this.inputForm.buildingRate = ''
+				}
+			},
+			getInstallFee() {
+				var af = this.inputForm.approvalFee
+				//安装
+				var inf = this.inputForm.installFee
+				if(this.commonJS.isNotEmpty(inf) && this.commonJS.isNotEmpty(af)){
+					var hf = parseInt(af)-parseInt(inf);
+					var rate = Math.round(parseInt(inf) / parseInt(af) * 100) / 100 * 100
+					this.inputForm.installRate = rate
+					this.inputForm.buildingFee = hf
+					var bRate = Math.round(parseInt(hf) / parseInt(af) * 100) / 100 * 100
+					this.inputForm.buildingRate = bRate
+				}
+				if(this.commonJS.isEmpty(inf) || this.commonJS.isEmpty(af)){
+					this.inputForm.installRate = ''
+				}
+			},
+			validateDateRange(rule, value, callback) {
+				const workStartDate = this.inputForm.workStartDate;
+				const workEndDate = this.inputForm.workEndDate;
+
+				if (workStartDate && workEndDate && workStartDate > workEndDate) {
+					this.inputForm.workEndDate = ''
+					callback(new Error('工作开始时间不能大于工作结束时间'));
+				} else {
+					callback();
+				}
+			},
+			ziXunShouRuRange(rule, value, callback) {
+				if (!value || value.trim() === "") {
+					callback(new Error('造价咨询营业收入不能为空!'));
+				} else if (parseFloat(value) <= 0) {
+					callback(new Error('造价咨询营业收入必须大于0!'));
+				} else {
+					callback();
+				}
+			},
+			ifName (row) {
+				if (this.commonJS.isEmpty(row.attachmentName)) {
+					row.attachmentName = '---'
+					return false
+				}
+				let suffix = row.attachmentName.substring(row.attachmentName.lastIndexOf('.') + 1)
+				if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+					return true
+				} else {
+					return false
+				}
+			},
+			showFile (row) {
+				console.log("showFile",row)
+				row.name = row.attachmentName
+				openWindowOnUrl(row)
+			},
+			getSize (value) {
+				if (this.commonJS.isEmpty(value)) {
+					return ''
+				} else {
+					let val = parseInt(value)
+					let k = 1024
+					let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+					let i = Math.floor(Math.log(val) / Math.log(k))
+					let result = val / Math.pow(k, i);
+					let kb = parseFloat(result.toPrecision(3));
+					return kb + '' + sizes[i]
+				}
+			},
+			//测试按钮
+			openFileForm(id,typeId){
+				console.log('this.id', id )
+				this.$refs.fileForm.init("add", id,this.inputForm.projectId)
+			},
+			toHref (row) {
+				console.log("toHref",row)
+				toHref(row)
+			},
+			getFiles(){
+				projectReportService.getAttachmentList(this.inputForm.projectId,this.inputForm.id,'').then((data) => {
+					this.tableData = data
+					this.tableKey = Math.random()
+				})
+
+			},
+		}
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+
+	/deep/ .vxe-select-option {
+		padding: 0 .6em;
+		max-width: 600px;
+		overflow: visible;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		-webkit-user-select: none;
+		-moz-user-select: none;
+		-ms-user-select: none;
+		user-select: none
+	}
+</style>

+ 14 - 2
src/views/flowable/task/TaskForm.vue

@@ -740,6 +740,10 @@ export default {
 		// Process_1702005929963 完善个人信息
 		// Process_1702369424692 会计-报告号申请
 		// Process_1670486210440 会计-报告号复核
+		// Process_1706161347628 报告签发
+		// Process_1706253503727 报告-线上归档(B)
+		// Process_1706579004224 报告-线上归档(A)
+		// Process_1706603798678 报告-纸质归档
 
 		// 驳回
 		reject(vars) {
@@ -800,7 +804,11 @@ export default {
 				this.procDefId.includes('Process_1701829547129') ||
 				this.procDefId.includes('Process_1702005929963') ||
 				this.procDefId.includes('Process_1702369424692') ||
-				this.procDefId.includes('Process_1670486210440')
+				this.procDefId.includes('Process_1670486210440') ||
+				this.procDefId.includes('Process_1706161347628') ||
+				this.procDefId.includes('Process_1706253503727') ||
+				this.procDefId.includes('Process_1706579004224') ||
+				this.procDefId.includes('Process_1706603798678')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {
@@ -952,7 +960,11 @@ export default {
 				this.procDefId.includes('Process_1699256313120') ||
 				this.procDefId.includes('Process_1699321267272') ||
 				this.procDefId.includes('Process_1699926014064') ||
-				this.procDefId.includes('Process_1698129477831')
+				this.procDefId.includes('Process_1698129477831') ||
+				this.procDefId.includes('Process_1706161347628') ||
+				this.procDefId.includes('Process_1706253503727') ||
+				this.procDefId.includes('Process_1706579004224') ||
+				this.procDefId.includes('Process_1706603798678')
 			) {
 				if (this.formType === '2') {
 					vars = {...vars, agree: false}