sangwenwei hai 1 ano
pai
achega
a76c306ea2

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

@@ -268,4 +268,11 @@ saveSignatureAnnotator: function (inputForm) {
 			params: {id: id}
 		})
 	},
+	getCompleteReport: function (id) {
+		return request({
+			url: prefix + '/cwProjectReport/getCompleteReport',
+			method: 'get',
+			params: {id: id}
+		})
+	},
 }

+ 78 - 18
src/views/cw/reportManagement/ReportReviewTakeNumberForm.vue

@@ -187,11 +187,11 @@
 								<el-input :disabled="true" v-model="inputForm.createDate" placeholder="请填写创建时间" clearable></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="12">
+						<el-col :span="12" v-if="preInvoice && !completed">
 							<el-form-item label="开票编号" prop="invoiceNumber"
 										  :rules="[{required: true, message:'开票编号不能为空', trigger:'change'}
                    ]">
-								<el-input v-if="preInvoice" @focus="openInoviceForm()" :disabled="status === 'audit' || status === 'taskFormDetail' ||this.inputForm.isCompleteInvoice === '1'"  v-model="inputForm.invoiceNumber" placeholder="请填写开票编号" clearable></el-input>
+								<el-input @focus="openInoviceForm()" :disabled="status === 'audit' || status === 'taskFormDetail' ||inputForm.isCompleteInvoice === '1'"  v-model="inputForm.invoiceNumber" placeholder="请填写开票编号" clearable></el-input>
 							</el-form-item>
 						</el-col>
 
@@ -487,19 +487,19 @@
 		<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
 		<user-select3 ref="userSelect3" @doSubmit="selectUser3"></user-select3>
 		<!--    <ReportCancellApplyChooseCom  ref="reportCancellApplyChooseCom" @getProject="getContract"></ReportCancellApplyChooseCom>-->
-		<el-dialog v-model="visible" title="提示" width="400" center>
-    <span>
-      该项目是否已完成预开票关联
-    </span>
-			<template #footer>
-				<div class="dialog-footer">
-					<el-button @click="noComplete">否</el-button>
-					<el-button type="primary" @click="complete">
-						是
-					</el-button>
-				</div>
-			</template>
-		</el-dialog>
+<!--		<el-dialog v-model="visible" title="提示" width="500">-->
+<!--		<span>-->
+<!--		  <el-icon><Warning /></el-icon>该项目是否已完成预开票关联-->
+<!--		</span>-->
+<!--			<template #footer>-->
+<!--				<div class="dialog-footer">-->
+<!--					<el-button @click="noComplete">否</el-button>-->
+<!--					<el-button type="primary" @click="complete">-->
+<!---->
+<!--					</el-button>-->
+<!--				</div>-->
+<!--			</template>-->
+<!--		</el-dialog>-->
 	</div>
 </template>
 
@@ -636,6 +636,7 @@
 				searchForm: {
 					programId:''
 				},
+				completed:false
 			}
 		},
 		ReportCancellApplyService: null,
@@ -831,6 +832,23 @@
 								this.total = data.total
 								console.log('total',this.total)
 							})
+							//查询该项目下的报告是否已经关联完成
+							projectReportService.getCompleteReport(this.inputForm.projectId).then((da)=>{
+								//结果为true时说明已完成关联
+								if (da){
+									console.log('32',da)
+									//若已经发起,则进行展示
+									if (this.commonJS.isNotEmpty(data.applyStatus) && data.applyStatus !== '0'){
+										this.completed = false
+									}else {
+										//未发起  则进行选择
+										this.completed = true
+									}
+								}else {
+									this.completed = false
+								}
+								console.log('com',this.completed)
+							})
 						}
 
 						this.loading = false
@@ -890,11 +908,47 @@
 							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 						} else {
-							this.checkTotal()
+							if (this.commonJS.isNotEmpty(this.inputForm.isCompleteInvoice) && this.inputForm.isCompleteInvoice !== '0'){
+								this.$confirm('该项目是否已完成预开票关联','提示',{
+									distinguishCancelAndClose: true,
+									confirmButtonText: '是',
+									cancelButtonText: '否',
+								}).then(async ()=>{
+									this.inputForm.isCompleteInvoice = '1'
+									this.doSubmit('start', callback)
+								}).catch((action)=>{
+									if (action === 'cancel'){
+										this.inputForm.isCompleteInvoice = '0'
+										this.doSubmit('start', callback)
+									}
+								})
+							}else {
+								this.doSubmit('start', callback)
+							}
+
 						}
 					})
 				} else {
-					this.doSubmit('start', callback)
+					if (this.commonJS.isNotEmpty(this.inputForm.isCompleteInvoice) && this.inputForm.isCompleteInvoice !== '0'){
+						this.$confirm('该项目是否已完成预开票关联','提示',{
+							distinguishCancelAndClose: true,
+							confirmButtonText: '是',
+							cancelButtonText: '否',
+						}).then(async ()=>{
+							this.inputForm.isCompleteInvoice = '1'
+							this.doSubmit('start', callback)
+						}).catch(async (action)=>{
+							if (action === 'cancel'){
+								this.inputForm.isCompleteInvoice = '0'
+								this.doSubmit('start', callback)
+							}
+						})
+					}else {
+						this.doSubmit('start', callback)
+					}
+
+
+
 				}
 			},
 			async agreeForm (callback) {
@@ -1179,7 +1233,13 @@
 				//校验当前项目是否预开票及项目下是否存在已开票信息
 				this.checkIsPreInvoice()
 				//查询该项目下的报告是否已完成关联
-				// projectReportService.
+				projectReportService.getCompleteReport(row.id).then((data)=>{
+					if (data){
+						this.completed = true
+						this.preInvoice = false
+					}
+					console.log('com',this.completed)
+				})
 			},
 			openWorkClient () {
 				this.$refs.reportServiceUnitForm.init(this.inputForm.projectId)

+ 1 - 1
src/views/program/registered/ProjectList.vue

@@ -123,7 +123,7 @@
         <template #buttons>
 <!--          <el-button v-if="hasPermission('program:registered:add')" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>-->
 <!--			v-if="(hasPermission('program:registered:add') && overArchiveFlag === 0)" v-show="isOver"-->
-			<el-button v-if="(hasPermission('program:registered:add') && overArchiveFlag === 0)" v-show="isOver"  type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
+			<el-button  type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
 			<a style="color:red;" v-show="!isOver">已登记项目存在信息未填写完成情况,请补充完整(可通过筛选项筛选归档状态为:已归档、超期已归档。进行查看)</a>
         </template>
       </vxe-toolbar>