Browse Source

数电发票报销调整及报告归档列表输入框调整

sangwenwei 8 months ago
parent
commit
515abeced7

+ 7 - 0
src/api/ccpm/reimbursement/ReimbursementService.js

@@ -88,6 +88,13 @@ export default class ReimbursementService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	getEffectiveDataByNumbers (invoiceNumber,id) {
+		return request({
+			url: prefix + '/ccpmReimbursement/info/getEffectiveDataByNumbers',
+			method: 'get',
+			params: {invoiceNumber: invoiceNumber,id:id}
+		})
+	}
 	deleteByIdAndNumber (id,invoiceNumber) {
 		return request({
 			url: prefix + '/ccpmReimbursement/info/deleteByIdAndNumber',

+ 7 - 0
src/api/consultancy/reimbursement/ReimbursementService.js

@@ -88,6 +88,13 @@ export default class ReimbursementService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	getEffectiveDataByNumbers (invoiceNumber,id) {
+		return request({
+			url: prefix + '/consultancyReimbursement/info/getEffectiveDataByNumbers',
+			method: 'get',
+			params: {invoiceNumber: invoiceNumber,id:id}
+		})
+	}
 	deleteByIdAndNumber (id,invoiceNumber) {
 		return request({
 			url: prefix + '/consultancyReimbursement/info/deleteByIdAndNumber',

+ 7 - 0
src/api/cw/reimbursementApproval/ReimbursementApprovalService.js

@@ -141,6 +141,13 @@ export default class ReimbursementApprovalService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	getEffectiveDataByNumbers (invoiceNumber,id) {
+		return request({
+			url: prefix + '/reimbursementApproval/info/getEffectiveDataByNumbers',
+			method: 'get',
+			params: {invoiceNumber: invoiceNumber,id:id}
+		})
+	}
 	deleteByIdAndNumber (id,invoiceNumber) {
 	return request({
 		url: prefix + '/reimbursementApproval/info/deleteByIdAndNumber',

+ 7 - 0
src/api/sys/ReimbursementService.js

@@ -95,6 +95,13 @@ export default class ReimbursementService {
 			params: {invoiceNumber: invoiceNumber,id:id}
 		})
 	}
+	getEffectiveDataByNumbers (invoiceNumber,id) {
+		return request({
+			url: prefix + '/reimbursement/info/getEffectiveDataByNumbers',
+			method: 'get',
+			params: {invoiceNumber: invoiceNumber,id:id}
+		})
+	}
 	deleteByIdAndNumber (id,invoiceNumber) {
 		return request({
 			url: prefix + '/reimbursement/info/deleteByIdAndNumber',

+ 7 - 0
src/api/zs/reimbursement/ReimbursementService.js

@@ -95,6 +95,13 @@ export default class ReimbursementService {
 		params: {invoiceNumber: invoiceNumber,id:id}
 	})
   }
+	getEffectiveDataByNumbers (invoiceNumber,id) {
+		return request({
+			url: prefix + '/zsReimbursement/info/getEffectiveDataByNumbers',
+			method: 'get',
+			params: {invoiceNumber: invoiceNumber,id:id}
+		})
+	}
 	findHistory (id) {
 		return request({
 			url: prefix + '/zsReimbursement/info/findHistory',

+ 33 - 12
src/views/ccpm/reimbursement/info/ReimbursementForm.vue

@@ -1456,6 +1456,7 @@
 				//   throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
 			  // }
 			  //判定附件中xml文件数量是否小于电子发票报销行数量
+			  let flag1 = false
 			  if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
 				  //获取电子报销行数
 				  let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
@@ -1479,19 +1480,39 @@
 						  throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
 					  }
 				  }
+				  //数电发票信息不为空的时候在提交时需要再次判断看当前数电发票是否有存在其他发起或完成的报销
+				  let numbers =[];
+				  for (let i = 0; i < this.inputForm.invoiceReimbursements.length; i++) {
+					  numbers.push(this.inputForm.invoiceReimbursements[i].number)
+				  }
+				  const decide = await this.reimbursementService.getEffectiveDataByNumbers(numbers.join(","),this.inputForm.id)
+				  // .then((decide) => {
+				  if (!decide.success) {
+					  //进行提醒
+					  this.$message.warning(decide.message)
+					  flag1 = true
+				  }
+				  // })
+				  if (flag1){
+					  this.loading = false
+					  return
+					  // throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+				  }
+			  }
+			  if (!flag1) {
+				  this.inputForm.type = '2'
+				  this.reimbursementService.save(this.inputForm).then((data) => {
+					  this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
+					  this.inputForm.formTitle = title
+					  this.inputForm.id = data.businessId
+					  callback(data.businessTable, data.businessId, this.inputForm)
+					  this.$refs.inputForm.resetFields()
+					  this.loading = false
+				  }).catch(() => {
+					  this.$refs.inputForm.resetFields()
+					  this.loading = false
+				  })
 			  }
-            this.inputForm.type = '2'
-            this.reimbursementService.save(this.inputForm).then((data) => {
-				this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
-				this.inputForm.formTitle = title
-				this.inputForm.id = data.businessId
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-            }).catch(() => {
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-            })
             // this.reimbursementService.save(this.inputForm).then(({data}) => {
             //   callback(data.businessTable, data.businessId, this.inputForm)
             //   this.$refs.inputForm.resetFields()

+ 33 - 12
src/views/consultancy/reimbursement/info/ReimbursementForm.vue

@@ -1403,6 +1403,7 @@
 				//   throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
 			  // }
 			  //判定附件中xml文件数量是否小于电子发票报销行数量
+			  let flag1 = false
 			  if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
 				  //获取电子报销行数
 				  let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
@@ -1426,19 +1427,39 @@
 						  throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
 					  }
 				  }
+				  //数电发票信息不为空的时候在提交时需要再次判断看当前数电发票是否有存在其他发起或完成的报销
+				  let numbers =[];
+				  for (let i = 0; i < this.inputForm.invoiceReimbursements.length; i++) {
+					  numbers.push(this.inputForm.invoiceReimbursements[i].number)
+				  }
+				  const decide = await this.reimbursementService.getEffectiveDataByNumbers(numbers.join(","),this.inputForm.id)
+				  // .then((decide) => {
+				  if (!decide.success) {
+					  //进行提醒
+					  this.$message.warning(decide.message)
+					  flag1 = true
+				  }
+				  // })
+				  if (flag1){
+					  this.loading = false
+					  return
+					  // throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+				  }
+			  }
+			  if (!flag1) {
+				  this.inputForm.type = '2'
+				  this.reimbursementService.save(this.inputForm).then((data) => {
+					  this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
+					  this.inputForm.formTitle = title
+					  this.inputForm.id = data.businessId
+					  callback(data.businessTable, data.businessId, this.inputForm)
+					  this.$refs.inputForm.resetFields()
+					  this.loading = false
+				  }).catch(() => {
+					  this.$refs.inputForm.resetFields()
+					  this.loading = false
+				  })
 			  }
-            this.inputForm.type = '2'
-            this.reimbursementService.save(this.inputForm).then((data) => {
-				this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
-				this.inputForm.formTitle = title
-				this.inputForm.id = data.businessId
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-            }).catch(() => {
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-            })
             // this.reimbursementService.save(this.inputForm).then(({data}) => {
             //   callback(data.businessTable, data.businessId, this.inputForm)
             //   this.$refs.inputForm.resetFields()

+ 8 - 5
src/views/cw/projectReportArchive/ProjectReportArchiveList.vue

@@ -6,10 +6,10 @@
 <!--        <el-input v-model="searchForm.name" placeholder="请输入档案名称" clearable></el-input>-->
 <!--      </el-form-item>-->
       <el-form-item label="档案号" prop="fileNumber">
-        <el-input v-model="searchForm.fileNumber" placeholder="请输入档案号" clearable></el-input>
+        <el-input v-model="searchForm.fileNumber" placeholder="请输入档案号" clearable :style="styles"></el-input>
       </el-form-item>
       <el-form-item label="项目名称" prop="cwProjectRecordsDTO.projectName">
-        <el-input v-model="searchForm.cwProjectRecordsDTO.projectName" placeholder="请输入项目名称" clearable></el-input>
+        <el-input v-model="searchForm.cwProjectRecordsDTO.projectName" placeholder="请输入项目名称" clearable :style="styles"></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理1" prop="cwProjectRecordsDTO.projectMasterName">
 <!--        <el-input v-model="searchForm.cwProjectRecordsDTO.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
@@ -37,13 +37,13 @@
           type="year"
           value-format="YYYY"
           placeholder="选择档案年度"
-          style="width:100%"
+		  :style="styles"
           placement="bottom-start"
           clearable>
         </el-date-picker>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="案卷号" prop="number">
-        <el-input v-model="searchForm.number" placeholder="请输入案卷号" clearable></el-input>
+        <el-input v-model="searchForm.number" placeholder="请输入案卷号" clearable :style="styles"></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="归档时间" prop="auditDates">
         <el-date-picker
@@ -81,7 +81,7 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="报告文号" prop="reportNo">
-        <el-input v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+        <el-input  :style="styles" v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="状态" prop="status">
         <el-select v-model="searchForm.status" placeholder="请选择" style="width:100%;" clearable>
@@ -277,6 +277,9 @@
   export default {
     data () {
       return {
+      	styles:{
+      	width : '200px !important'
+		},
 		  searchVisible: true,
         showHideItem: false,
         showHideIcon: 'el-icon-arrow-down',

+ 35 - 12
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -1609,6 +1609,7 @@
 						// 	throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 						// }
 						//判定附件中xml文件数量是否小于电子发票报销行数量
+						let flag1 = false
 						if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
 							//获取电子报销行数
 							let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
@@ -1632,19 +1633,41 @@
 									throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 								}
 							}
+							//数电发票信息不为空的时候在提交时需要再次判断看当前数电发票是否有存在其他发起或完成的报销
+							let numbers =[];
+							for (let i = 0; i < this.inputForm.invoiceReimbursements.length; i++) {
+								numbers.push(this.inputForm.invoiceReimbursements[i].number)
+							}
+							const decide = await this.reimbursementApprovalService.getEffectiveDataByNumbers(numbers.join(","),this.inputForm.id)
+							// .then((decide) => {
+							if (!decide.success) {
+								//进行提醒
+								this.$message.warning(decide.message)
+								flag1 = true
+							}
+							// })
+							if (flag1){
+								this.loading = false
+								return
+								// throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+							}
+
 						}
-						this.inputForm.type = '2'
-						this.reimbursementApprovalService.save(this.inputForm).then((data) => {
-							this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
-							this.inputForm.formTitle = title
-							this.inputForm.id = data.businessId
-							callback(data.businessTable, data.businessId, this.inputForm)
-							this.$refs.inputForm.resetFields()
-							this.loading = false
-						}).catch(() => {
-							this.$refs.inputForm.resetFields()
-							this.loading = false
-						})
+						if (!flag1){
+							this.inputForm.type = '2'
+							this.reimbursementApprovalService.save(this.inputForm).then((data) => {
+								this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
+								this.inputForm.formTitle = title
+								this.inputForm.id = data.businessId
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.$refs.inputForm.resetFields()
+								this.loading = false
+							}).catch(() => {
+								this.$refs.inputForm.resetFields()
+								this.loading = false
+							})
+						}
+
 						// this.reimbursementService.save(this.inputForm).then((data) => {
 						//   callback(data.businessTable, data.businessId, this.inputForm)
 						//   this.$refs.inputForm.resetFields()

+ 7 - 4
src/views/cw/reportManagement/ReportManagementList.vue

@@ -3,13 +3,13 @@
     <el-form :inline="true" class="query-form m-b-10" v-if="searchVisible" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
       <!-- 搜索框-->
       <el-form-item label="项目编号" prop="projectNumber">
-        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+        <el-input v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable :style="styles"></el-input>
       </el-form-item>
       <el-form-item label="项目名称" prop="projectName">
-        <el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+        <el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable :style="styles"></el-input>
       </el-form-item>
       <el-form-item label="报告名称" prop="reportName">
-        <el-input v-model="searchForm.reportName" placeholder="请输入报告名称" clearable></el-input>
+        <el-input v-model="searchForm.reportName" placeholder="请输入报告名称" clearable :style="styles"></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="项目经理1" prop="projectMasterName">
 <!--        <UserSelect :limit='1' :modelValue="searchForm.projectMasterName" @update:modelValue='(value, label) => {searchForm.projectMasterName = value}'></UserSelect>-->
@@ -64,7 +64,7 @@
 
 
       <el-form-item v-if="showHideItem" label="报告文号" prop="reportNo">
-        <el-input v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+        <el-input v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable :style="styles"></el-input>
       </el-form-item>
       <el-form-item v-if="showHideItem" label="审计收费(税前、元)" prop="contractAmounts">
         <InputNumber :disabled="false" :precision="num" :value="searchForm.contractAmounts"
@@ -487,6 +487,9 @@
   export default {
     data () {
       return {
+		  styles:{
+			  width : '200px !important'
+		  },
       	searchVisible : true,
         showHideItem: false,
         showHideIcon: 'el-icon-arrow-down',

+ 34 - 13
src/views/reimbursement/info/ReimbursementForm.vue

@@ -1503,6 +1503,7 @@
 						// 	throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 						// }
 						//判定附件中xml文件数量是否小于电子发票报销行数量
+						let flag1 = false
 						if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
 							//获取电子报销行数
 							let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
@@ -1526,20 +1527,40 @@
 									throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 								}
 							}
-						}
 
-						this.inputForm.type = '2'
-						this.reimbursementService.save(this.inputForm).then((data) => {
-							this.inputForm.id = data.businessId
-							this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
-							this.inputForm.formTitle = title
-							callback(data.businessTable, data.businessId, this.inputForm)
-							this.$refs.inputForm.resetFields()
-							this.loading = false
-						}).catch(() => {
-							this.$refs.inputForm.resetFields()
-							this.loading = false
-						})
+							//数电发票信息不为空的时候在提交时需要再次判断看当前数电发票是否有存在其他发起或完成的报销
+							let numbers =[];
+							for (let i = 0; i < this.inputForm.invoiceReimbursements.length; i++) {
+								numbers.push(this.inputForm.invoiceReimbursements[i].number)
+							}
+							const decide = await this.reimbursementService.getEffectiveDataByNumbers(numbers.join(","),this.inputForm.id)
+							// .then((decide) => {
+							if (!decide.success) {
+								//进行提醒
+								this.$message.warning(decide.message)
+								flag1 = true
+							}
+							// })
+							if (flag1){
+								this.loading = false
+								return
+								// throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+							}
+						}
+						if (!flag1) {
+							this.inputForm.type = '2'
+							this.reimbursementService.save(this.inputForm).then((data) => {
+								this.inputForm.id = data.businessId
+								this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
+								this.inputForm.formTitle = title
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.$refs.inputForm.resetFields()
+								this.loading = false
+							}).catch(() => {
+								this.$refs.inputForm.resetFields()
+								this.loading = false
+							})
+						}
 					} else {
 						this.loading = false
 					}

+ 33 - 12
src/views/zs/reimbursement/info/ReimbursementForm.vue

@@ -1413,6 +1413,7 @@
 				//   throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 			  // }
 			  //判定附件中xml文件数量是否小于电子发票报销行数量
+			  let flag1 = false
 			  if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
 				  //获取电子报销行数
 				  let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
@@ -1436,19 +1437,39 @@
 						  throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 					  }
 				  }
+				  //数电发票信息不为空的时候在提交时需要再次判断看当前数电发票是否有存在其他发起或完成的报销
+				  let numbers =[];
+				  for (let i = 0; i < this.inputForm.invoiceReimbursements.length; i++) {
+					  numbers.push(this.inputForm.invoiceReimbursements[i].number)
+				  }
+				  const decide = await this.reimbursementService.getEffectiveDataByNumbers(numbers.join(","),this.inputForm.id)
+				  // .then((decide) => {
+				  if (!decide.success) {
+					  //进行提醒
+					  this.$message.warning(decide.message)
+					  flag1 = true
+				  }
+				  // })
+				  if (flag1){
+					  this.loading = false
+					  return
+					  // throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+				  }
+			  }
+			  if (!flag1) {
+				  this.inputForm.type = '2'
+				  this.reimbursementService.save(this.inputForm).then((data) => {
+					  this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
+					  this.inputForm.formTitle = title
+					  this.inputForm.id = data.businessId
+					  callback(data.businessTable, data.businessId, this.inputForm)
+					  this.$refs.inputForm.resetFields()
+					  this.loading = false
+				  }).catch(() => {
+					  this.$refs.inputForm.resetFields()
+					  this.loading = false
+				  })
 			  }
-            this.inputForm.type = '2'
-            this.reimbursementService.save(this.inputForm).then((data) => {
-				this.inputForm.title = `${this.$store.state.user.name} 发起了 [${data.no}] - ` + describe
-				this.inputForm.formTitle = title
-				this.inputForm.id = data.businessId
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-            }).catch(() => {
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-            })
             // this.reimbursementService.save(this.inputForm).then(({data}) => {
             //   callback(data.businessTable, data.businessId, this.inputForm)
             //   this.$refs.inputForm.resetFields()