Browse Source

项目报告签发,报批签发调整

user5 5 tháng trước cách đây
mục cha
commit
0afc2fc619

+ 8 - 0
src/api/jy/SignetService.js

@@ -50,6 +50,14 @@ export default class SignetService {
 		});
 	}
 
+	queryByProjectIdAndTypeStatus (projectId,typeStatus) {
+		return request({
+			url: prefix + '/useSeal/queryByProjectIdAndTypeStatus',
+			method: 'get',
+			params: {projectId: projectId,typeStatus: typeStatus}
+		})
+	}
+
 
 
 

+ 88 - 3
src/views/jy/project/ProjectEiaForm.vue

@@ -49,6 +49,22 @@
 				<el-col :span="24" >
 					<el-divider content-position="left"><i class="el-icon-document"></i>
 						项目基本信息
+						<el-link  v-if="commonJS.isEmpty(tabName) && projectData.firstInstanceStatus === '5'"
+								  @click="openAuditDetail(projectData.auditId1, '1')" type="primary" style="font-weight: bold;font-size: 15px;margin-left: 20px"><i class="el-icon-document"></i>
+							一级校审详情
+						</el-link>
+						<el-link v-if="commonJS.isEmpty(tabName) && projectData.secondInstanceStatus === '5'"
+								 @click="openAuditDetail(projectData.auditId2, '2')" type="primary" style="font-weight: bold;font-size: 15px;margin-left: 20px"><i class="el-icon-document"></i>
+							二级校审详情
+						</el-link>
+						<el-link v-if="commonJS.isEmpty(tabName) && projectData.thirdInstanceStatus === '5'"
+								 @click="openAuditDetail(projectData.auditId3, '3')" type="primary" style="font-weight: bold;font-size: 15px;margin-left: 20px"><i class="el-icon-document"></i>
+							三级校审详情
+						</el-link>
+						<el-link v-if="commonJS.isEmpty(tabName) && projectData.signetStatus === '5'"
+								 @click="openSignetDetail(projectData.signetId)" type="primary" style="font-weight: bold;font-size: 15px;margin-left: 20px"><i class="el-icon-document"></i>
+							报告签发详情
+						</el-link>
 					</el-divider>
 				</el-col>
 				<el-col :span="12">
@@ -196,6 +212,8 @@
 
 <!--		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>-->
 		<FileForm ref="fileForm" @getFiles="getFiles"></FileForm>
+		<ProjectAuditFormDialog ref="auditDetail"></ProjectAuditFormDialog>
+		<SignetAddFormDialogDialog ref="signetDetail"></SignetAddFormDialogDialog>
 	</div>
 </template>
 
@@ -203,6 +221,8 @@
 	import ProjectInfoService from "@/api/jy/ProjectInfoService";
 	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
 	import UpLoadComponent from '@/views/common/JyEiaUpLoadComponent'
+	import ProjectAuditFormDialog from '@/views/jy/project/ProjectAuditFormDialog'
+	import SignetAddFormDialogDialog from '@/views/materialManagement/userSeal/SignetAddFormDialog'
 	import FileForm from './fileForm'
 	import OSSSerivce, {
 		// eslint-disable-next-line no-unused-vars
@@ -212,6 +232,7 @@
 		// eslint-disable-next-line no-unused-vars
 		toHref
 	} from '@/api/sys/OSSService'
+	import SignetAddFormDialog from "../../materialManagement/userSeal/SignetAddFormDialog";
 	export default {
 		props: {
 			businessId: {
@@ -255,7 +276,35 @@
 				keyWatch: '',
 				tabName:'',
 				tableData: [],
-				tableKey :'1'
+				tableKey :'1',
+
+				projectData: {
+					auditId1: '',
+					auditId2: '',
+					auditId3: '',
+					id: '',
+					procInsId1:'',
+					procInsId2:'',
+					procInsId3:'',
+					firstInstanceStatus:'',
+					secondInstanceStatus:'',
+					thirdInstanceStatus:'',
+					signetId:'',
+					signetStatus:'',
+					projectLeader:'',
+					createByName:'',
+					createTime:'',
+					initialAuditOpinion:'',
+					initialEditOpinion:'',
+					auditOpinion:'',
+					editOpinion:'',
+					workAttachmentDtoList:[],
+					auditPeople:'',
+					status:'',
+					projectId:'',
+					no:'',
+					auditLevel:''
+				},
 
 			}
 		},
@@ -300,6 +349,9 @@
 			},
 		},
 		components: {
+			SignetAddFormDialog,
+			ProjectAuditFormDialog,
+			SignetAddFormDialogDialog,
 			UserSelectSignatory,
 			UpLoadComponent,
 			FileForm,
@@ -370,11 +422,35 @@
 						this.inputForm.projectId=data.projectId
 						this.inputForm.remarks=data.remarks
 						this.inputForm.no = data.jyProjectList.no
-						console.log('data', this.inputForm)
+
 						if (this.status === 'taskFormDetail') {
 							method = 'view'
 						}
-						console.log('method2',method)
+
+
+						//查询项目各流程节点审核情况与具体信息
+						if(this.inputForm.projectId){
+							const firstProjectId = this.inputForm.projectId.split(",");
+							const firstParam = firstProjectId.length > 0 ? firstProjectId[0] : "";
+							this.projectInfoService.findById(firstParam).then((data)=>{
+								this.projectData.auditId1 = data.auditId1
+								this.projectData.auditId2 = data.auditId2
+								this.projectData.auditId3 = data.auditId3
+								this.projectData.procInsId1 = data.procInsId1
+								this.projectData.procInsId2 = data.procInsId2
+								this.projectData.procInsId3 = data.procInsId3
+								this.projectData.firstInstanceStatus = data.firstInstanceStatus
+								this.projectData.secondInstanceStatus = data.secondInstanceStatus
+								this.projectData.thirdInstanceStatus = data.thirdInstanceStatus
+							})
+							this.projectInfoService.getSignetById(firstParam,1).then((signetData)=>{
+								if(signetData.status === '5'){
+									this.projectData.signetStatus = signetData.status
+									this.projectData.signetId = signetData.id
+								}
+								//this.projectData = this.recover(this.projectData, data)
+							})
+						}
 
 						// this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectEia', null, '附件', null, null, null)
 						// this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
@@ -502,6 +578,15 @@
 					}
 				})
 			},
+			// 根据项目id以及校审级别查询校审详情
+			// 打开校审明细页面
+			openAuditDetail (projectId, auditLevel) {
+				this.$refs.auditDetail.init(projectId, auditLevel)
+			},
+			// 打开校审明细页面
+			openSignetDetail (projectId) {
+				this.$refs.signetDetail.init(projectId,'view')
+			},
 			async updateStatusById (type, callback) {
 				this.loading = true
 				// if (await this.$refs.uploadComponent.checkProgress()) {

+ 6 - 1
src/views/jy/workContractInfo/ContractAddForm.vue

@@ -226,7 +226,7 @@
 			<el-tabs v-model="activeName" type="border-card">
 				<el-tab-pane name="contactParty">
 					<template v-slot:label>
-						<span>抄送人员信息</span>
+						<span><span style="color: red;border-top: 20px">*</span>抄送人员信息</span>
 					</template>
 					<el-row :gutter="15">
 						<UserSelectButton ref="userSelectButton" :disabled="status === 'audit' || status === 'taskFormDetail'" @getValue="(value) => {openUserChoose(value)}"></UserSelectButton>
@@ -855,6 +855,11 @@
           this.$message.error('“委托方”中至少有一条数据')
           throw new Error('“委托方”中至少有一条数据')
         }
+        if (this.commonJS.isEmpty(this.inputForm.informUserList)) {
+          this.loading = false
+          this.$message.error('合同信息至少抄送给一个人')
+          throw new Error('合同信息至少抄送给一个人')
+        }
         if (this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()

+ 8 - 2
src/views/materialManagement/userSeal/ProjectForm.vue

@@ -202,7 +202,8 @@
           projectName: '',
           createDates: [],
 		  reportNo: '',
-          status: ''
+          status: '',
+		  getType: ''
         },
         checkType: '',
         detail: '',
@@ -227,8 +228,13 @@
        * @param num
        *      num为空或者true,则允许多选
        *      num为其他任何值,则只可以单选
+       * @param type
+       *      type为判定参数,如果不为空,则需要获取报告签发或报批签发当前能选择的项目信息
        */
-      init (isShow, num) {
+      init (isShow, num,type) {
+      	console.log(isShow)
+      	console.log(num)
+	    this.searchForm.getType = type
         if (this.commonJS.isEmpty(isShow)) {
           this.isShow = true
           this.checkType = '1'

+ 134 - 56
src/views/materialManagement/userSeal/SignetAddForm.vue

@@ -1,61 +1,8 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
 	<div>
 		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail' || method==='view'"
-				 label-width="160px" @submit.native.prevent>
-			<el-divider content-position="left"><i class="el-icon-document"></i>
-				<span style="color: red;border-top: 20px">*</span>关联项目
-				<el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="insertEvent('base')"  plain>
-					新增
-				</el-button>
-			</el-divider>
-			<el-row  :gutter="15">
-				<el-col :span="24">
-					<vxe-table
-						border
-						:footer-method="footerMethod2"
-						show-overflow
-						show-footer
-						ref="baseTable"
-						:key="baseKey"
-						class="vxe-table-element"
-						:data="inputForm.projectList"
-						style="margin-left: 5em"
-						@cell-click=""
-						@edit-closed=""
-						keep-source
-						:readonly="true"
-						highlight-current-row
-						:edit-rules="tableRules"
-						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
-					>
-						<vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
-							<template v-slot:edit="scope">
-								<el-input  :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
-							</template>
-						</vxe-table-column>
-						<vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
-							<template v-slot:edit="scope">
-								<el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
-							</template>
-						</vxe-table-column>
-						<vxe-table-column  field="leader" align="center" title="项目负责人" :edit-render="{}">
-							<template v-slot:edit="scope">
-								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.leader"/>
-							</template>
-						</vxe-table-column>
-						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
-							<template v-slot:edit="scope">
-								<el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.createTime"/>
-							</template>
-						</vxe-table-column>
-						<vxe-table-column title="操作" align="center" width="100">
-							<template v-slot="scope">
-								<el-button :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
-							</template>
-						</vxe-table-column>
-					</vxe-table>
-				</el-col>
-			</el-row>
+				 label-width="160px" @submit.native.prevent style="margin-bottom: 20px">
+
 			<el-divider content-position="left"><i class="el-icon-document"></i>
 				基本信息
 				<el-link  v-if="commonJS.isEmpty(tabName) && projectData.firstInstanceStatus === '5'"
@@ -119,6 +66,62 @@
 					</el-form-item>
 				</el-col>
 			</el-row>
+
+			<el-divider content-position="left"><i class="el-icon-document"></i>
+				<span style="color: red;border-top: 20px">*</span>关联项目
+				<el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="insertEvent('base')"  plain>
+					新增
+				</el-button>
+				<span style="font-size: 14px;color: red;margin-left: 20px">(注:发起报告签发或报批签发时,一个申请仅可选择一个项目)</span>
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="24">
+					<vxe-table
+						border
+						:footer-method="footerMethod2"
+						show-overflow
+						show-footer
+						ref="baseTable"
+						:key="baseKey"
+						class="vxe-table-element"
+						:data="inputForm.projectList"
+						style="margin-left: 5em"
+						@cell-click=""
+						@edit-closed=""
+						keep-source
+						:readonly="true"
+						highlight-current-row
+						:edit-rules="tableRules"
+						:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
+					>
+						<vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
+							<template v-slot:edit="scope">
+								<el-input  :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column  field="leader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.leader"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.createTime"/>
+							</template>
+						</vxe-table-column>
+						<vxe-table-column title="操作" align="center" width="100">
+							<template v-slot="scope">
+								<el-button :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
+							</template>
+						</vxe-table-column>
+					</vxe-table>
+				</el-col>
+			</el-row>
 		</el-form>
 		<!--        附件-->
 		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
@@ -305,6 +308,9 @@
 						this.signetService.queryById(this.inputForm.id).then((data)=>{
 
 							this.inputForm = this.recover(this.inputForm, data)
+							if(!this.inputForm.createByName){
+								this.inputForm.createByName=this.$store.state.user.name
+							}
 							var list=data.projectList
 							this.inputForm.projectList=list
 							this.inputForm.types=data.types
@@ -375,6 +381,47 @@
 				}
 			},
 			// 打开校审明细页面
+			handleChange (types) {
+				let exists = false;
+				for (let key in types) {
+					//如果选择报告签发或报批签发,则需要验证项目选择的行数量,超过一行,则进行删除,并且判定第一行的项目是否符合报批或报告签发的限定
+					if (types[key] === '1713752829629239298' || types[key] === '1713752789795934210') {
+						exists = true;
+						break;
+					}
+				}
+				if(exists && this.inputForm.projectList.length>1){
+					this.inputForm.projectList = this.inputForm.projectList.slice(0, 1);
+				}
+				if(exists && this.inputForm.projectList.length>0){
+					if ('projectId' in this.inputForm.projectList[0]) {
+						//根据第一行项目的项目id查询是否符合报告签发 或者报批签发的选择条件,不符合则不允许选择
+
+						for (let key in this.inputForm.types) {
+							if (this.inputForm.types[key] === '1713752829629239298') {	//报批签发
+								//根据id查询是否处于报批签发阶段
+								this.signetService.queryByProjectIdAndTypeStatus(this.inputForm.projectList[0].projectId,'2').then((data) => {
+									if(!data.success){
+										this.inputForm.projectList =  []
+									}
+								})
+								break;
+							}else if(this.inputForm.types[key] === '1713752789795934210'){	//报告签发
+								//根据id查询是否处于报告签发阶段
+								this.signetService.queryByProjectIdAndTypeStatus(this.inputForm.projectList[0].projectId,'1').then((data) => {
+									if(!data.success){
+										this.inputForm.projectList =  []
+									}
+								})
+								break;
+							}
+						}
+						console.log('包含 projectId 属性');
+					}
+
+				}
+			},
+			// 打开校审明细页面
 			openSignetDetail (projectId) {
 				this.$refs.signetDetail.init(projectId,'view')
 			},
@@ -526,6 +573,22 @@
 				this.visible = false
 			},
 			insertEvent(type) {
+				if(!this.inputForm.types){
+					this.$message.error('请先选择用印类型')
+					return
+				}
+				console.log(this.inputForm.types)
+				console.log(this.inputForm.typeStatus)
+
+				let exists = false;
+				for (let key in this.inputForm.types) {
+					if (this.inputForm.types[key] === '1713752829629239298' || this.inputForm.types[key] === '1713752789795934210') {
+						exists = true;
+						break;
+					}
+				}
+
+
 				if (type === 'base') {
 					if (this.inputForm.projectList.length>=1){
 						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
@@ -533,6 +596,10 @@
 							return
 						}
 					}
+					if(exists && this.inputForm.projectList.length>=1){
+						this.$message.error('选择报告签发或报批签发,仅可选择一个项目')
+						return
+					}
 					this.$refs.baseTable.insertAt({})
 					this.inputForm.projectList.push({})
 					this.baseKey = Math.random()
@@ -547,7 +614,18 @@
 				}
 			},
 			openProgramPageForm(rowIndex) {
-				this.$refs.projectForm.init()
+				var type = '';
+				for (let key in this.inputForm.types) {
+					if (this.inputForm.types[key] === '1713752829629239298') {	//报批签发
+						type = 2;
+						break;
+					}else if(this.inputForm.types[key] === '1713752789795934210'){	//报告签发
+						type = 1;
+						break;
+					}
+				}
+
+				this.$refs.projectForm.init('',1,type)
 				this.programRow = rowIndex
 				console.log('11',this.programRow)
 			},