Ver código fonte

预开票,人员筛选,报告删除

sangwenwei 1 ano atrás
pai
commit
c66ea5a3a7

+ 1 - 0
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -723,6 +723,7 @@
             }
             if (this.commonJS.isEmpty(this.inputForm.projectLeaderId)) {
               this.inputForm.projectLeaderId = this.$store.state.user.id
+              this.inputForm.projectLeaderName = this.$store.state.user.name
             }
             if (this.commonJS.isEmpty(this.inputForm.projectMoney)) {
               this.inputForm.projectMoney = ''

+ 1 - 0
src/views/cw/reportManagement/ReportManagementAddForm.vue

@@ -838,6 +838,7 @@
           }
           if (this.commonJS.isEmpty(this.inputForm.realCreate)) {
             this.inputForm.realCreate = this.$store.state.user.id
+            this.inputForm.realCreateName = this.$store.state.user.name
           }
           if (this.commonJS.isEmpty(this.inputForm.signatureType) && this.method !== 'view') {
             this.inputForm.signatureType = '1'

+ 10 - 1
src/views/cw/reportManagement/ReportManagementList.vue

@@ -294,6 +294,8 @@
                                   (scope.row.signatureType === '3' && scope.row.status3 === '5'))
                                    && scope.row.newType !== '0')"
 							 text type="primary" @click="rebackReviewSign(scope.row)">撤回复核签章</el-button>
+				  <el-button v-if="(scope.row.applyStatus === '0' || scope.row.applyStatus === '1' || scope.row.applyStatus === '3'  || commonJS.isEmpty(scope.row.applyStatus))"
+							 text type="primary" @click="del(scope.row.id)">删除</el-button>
               </div>
               <div v-else>
                 <el-button v-if="hasPermission('cwProjectReport:edit')&&
@@ -307,7 +309,14 @@
                               scope.row.status === '5'&&
                               (scope.row.reviewStatus === '0' || scope.row.reviewStatus === '1' || scope.row.reviewStatus === '3'  || commonJS.isEmpty(scope.row.reviewStatus))"
 						   text type="primary" @click="del(scope.row.id)">删除</el-button>
-                <!--              审核-->
+
+				  <el-button v-if="hasPermission('cwProjectReport:del')&&
+                              (scope.row.createById === $store.state.user.id||haveProjectIds.includes(scope.row.projectId))&&
+                              scope.row.status === '5'&&
+                              (scope.row.applyStatus === '0' || scope.row.applyStatus === '1' || scope.row.applyStatus === '3'  || commonJS.isEmpty(scope.row.applyStatus))"
+							 text type="primary" @click="del(scope.row.id)">删除</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>

+ 53 - 31
src/views/cw/reportManagement/ReportReviewTakeNumberForm.vue

@@ -901,48 +901,70 @@
 							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
 						} else {
-							//判断项目是否是预开票
-							if (this.preInvoice && this.completed && (this.invoiceTotal <=1 || this.total <=1)){
-								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)
-									}
-								})
+							if (this.commonJS.isEmpty(this.inputForm.invoiceNumber)){
+								this.loading = false
+								this.$message.error('发票编号未关联,请关联发票')
+								throw new Error('发票编号未关联,请关联发票')
 							}else {
-								this.doSubmit('start', callback)
+								//判断项目是否是预开票
+								if (this.preInvoice && this.completed && (this.invoiceTotal <=1 || this.total <=1)){
+									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 {
-					if (this.preInvoice && this.completed && (this.invoiceTotal <=1 || this.total <=1)){
-						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)
-							}
-						})
+					if (this.commonJS.isEmpty(this.inputForm.reviewBy)){
+						this.loading = false
+						this.$message.error('下一节点审核人未选择,请选择')
+						throw new Error('下一节点审核人未选择,请选择')
+					}else if (this.commonJS.isEmpty(this.inputForm.takeNumberType)){
+						this.loading = false
+						this.$message.error('取号类型未选择,请选择')
+						throw new Error('取号类型未选择,请选择')
+					}else if (this.commonJS.isEmpty(this.inputForm.invoiceNumber)){
+						this.loading = false
+						this.$message.error('发票编号未关联,请关联发票')
+						throw new Error('发票编号未关联,请关联发票')
 					}else {
-						this.doSubmit('start', callback)
+						if (this.preInvoice && this.completed && (this.invoiceTotal <=1 || this.total <=1)){
+							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) {