浏览代码

报销-文件补充调整

sangwenwei 6 月之前
父节点
当前提交
d3a53c8705

+ 1 - 1
src/views/ccpm/reimbursement/info/InfoList.vue

@@ -237,7 +237,7 @@
 				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
-				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
+				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4' && checkIsAuditFile(scope.row)" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
 				<el-button v-if="scope.row.fileStatus==='2' && checkIsAuditFile(scope.row)" text type="primary"  @click="examineFile(scope.row)">审核</el-button>
 
 			</template>

+ 45 - 35
src/views/ccpm/reimbursement/info/ReimbursementFileSupplementForm.vue

@@ -910,6 +910,7 @@
         this.inputForm = {
 			reimbursementType: '1',
           userName: '',
+          userId: '',
           no: '',
           department: '',
           reimDate: '',
@@ -982,7 +983,7 @@
 			  }
 			  this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
 				  if (this.commonJS.isNotEmpty(data)) {
-					  if (data === '报销人审核' && this.status != 'taskFormDetail') {
+					  if ((data === '报销人审核' || data === '报销人调整') && this.status != 'taskFormDetail') {
 						  method = 'add'
 					  }else {
 						  method = 'view'
@@ -1360,37 +1361,37 @@
             // }
 			  this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 			  this.inputForm.files = this.$refs.uploadComponent.getDataList()
-			  this.dataFiltering()
+			  // this.dataFiltering()
 			  // if(this.inputForm.invoiceReimbursementFiles<=0 && "1" === this.inputForm.reimbursementType){
 				//   this.$message.error("请上传电子发票发票xml文件!")
 				//   this.loading = false
 				//   throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
 			  // }
 			  //判定附件中xml文件数量是否小于电子发票报销行数量
-			  if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
-				  //获取电子报销行数
-				  let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
-				  if(invoiceReimbursementCount>0){
-					  //获取附件信息以xml结尾的附件数量
-					  var flag = false;
-					  var countFlag = 0;
-
-					  for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
-						  //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
-						  const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
-						  var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
-						  if(fileNameSuffix === "xml" ) {
-							  flag = true;
-							  countFlag ++;
-						  }
-					  }
-					  if(!flag){
-						  this.$message.error("已填写电子发票信息,请上传对应发票的xml文件!")
-						  this.loading = false
-						  throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
-					  }
-				  }
-			  }
+			  // if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
+				//   //获取电子报销行数
+				//   let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
+				//   if(invoiceReimbursementCount>0){
+				// 	  //获取附件信息以xml结尾的附件数量
+				// 	  var flag = false;
+				// 	  var countFlag = 0;
+			  //
+				// 	  for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
+				// 		  //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
+				// 		  const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
+				// 		  var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
+				// 		  if(fileNameSuffix === "xml" ) {
+				// 			  flag = true;
+				// 			  countFlag ++;
+				// 		  }
+				// 	  }
+				// 	  if(!flag){
+				// 		  this.$message.error("已填写电子发票信息,请上传对应发票的xml文件!")
+				// 		  this.loading = false
+				// 		  throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
+				// 	  }
+				//   }
+			  // }
             this.inputForm.fileStatus = '2'
 			  this.inputForm.assignee = this.inputForm.createById
             this.reimbursementService.saveFile(this.inputForm).then((data) => {
@@ -1437,12 +1438,12 @@
 			  }
 			  this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 			  this.inputForm.files = this.$refs.uploadComponent.getDataList()
-			  if(this.inputForm.invoiceReimbursementFiles<=0){
-				  this.$message.error("请上传数电发票发票xml文件!")
-				  this.loading = false
-				  throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-			  }
-			  this.dataFiltering()
+			  // if(this.inputForm.invoiceReimbursementFiles<=0){
+				//   this.$message.error("请上传数电发票发票xml文件!")
+				//   this.loading = false
+				//   throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+			  // }
+			  // this.dataFiltering()
 			  this.inputForm.fileStatus = '2'
             this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
               if (this.commonJS.isNotEmpty(data)) {
@@ -1464,9 +1465,18 @@
       updateStatusById (type, callback) {
         if (type === 'reject') {
           this.inputForm.fileStatus = '4'
-          this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
-            callback()
-          })
+			this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
+					if (this.commonJS.isNotEmpty(data)) {
+						if (data === '财务审核') {
+							console.log('this.inputForm.userId', this.inputForm.userId)
+							this.inputForm.assignee = this.inputForm.userId
+						}
+					}
+				this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
+					callback(this.inputForm.assignee)
+				})
+			})
+
           // this.reimbursementService.updateStatusById(this.inputForm)
         } else if (type === 'hold') {
           this.inputForm.fileStatus = '1'

+ 2 - 1
src/views/consultancy/reimbursement/info/InfoList.vue

@@ -236,7 +236,7 @@
 				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
-				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
+				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4' && checkIsAuditFile(scope.row)" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
 				<el-button v-if="scope.row.fileStatus==='2' && checkIsAuditFile(scope.row)" text type="primary"  @click="examineFile(scope.row)">审核</el-button>
 
             </template>
@@ -643,6 +643,7 @@
           this.dataList = data.records
           this.tablePage.total = data.total
           this.loading = false
+			console.log('this.dataList',this.dataList)
         })
         // this.reimbursementService.list({
         //   'current': this.tablePage.currentPage,

+ 44 - 35
src/views/consultancy/reimbursement/info/ReimbursementFileSupplementForm.vue

@@ -908,6 +908,7 @@
         this.inputForm = {
 			reimbursementType: '1',
           userName: '',
+          userId: '',
           no: '',
           department: '',
           reimDate: '',
@@ -980,7 +981,7 @@
 			  }
 			  this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
 				  if (this.commonJS.isNotEmpty(data)) {
-					  if (data === '报销人审核' && this.status != 'taskFormDetail') {
+					  if ((data === '报销人审核'|| data === '报销人调整') && this.status != 'taskFormDetail') {
 						  method = 'add'
 					  }else {
 						  method = 'view'
@@ -1348,37 +1349,37 @@
             // }
 			  this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 			  this.inputForm.files = this.$refs.uploadComponent.getDataList()
-			  this.dataFiltering()
+			  // this.dataFiltering()
 			  // if(this.inputForm.invoiceReimbursementFiles<=0 && "1" === this.inputForm.reimbursementType){
 				//   this.$message.error("请上传电子发票发票xml文件!")
 				//   this.loading = false
 				//   throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
 			  // }
 			  //判定附件中xml文件数量是否小于电子发票报销行数量
-			  if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
-				  //获取电子报销行数
-				  let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
-				  if(invoiceReimbursementCount>0){
-					  //获取附件信息以xml结尾的附件数量
-					  var flag = false;
-					  var countFlag = 0;
-
-					  for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
-						  //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
-						  const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
-						  var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
-						  if(fileNameSuffix === "xml" ) {
-							  flag = true;
-							  countFlag ++;
-						  }
-					  }
-					  if(!flag){
-						  this.$message.error("已填写电子发票信息,请上传对应发票的xml文件!")
-						  this.loading = false
-						  throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
-					  }
-				  }
-			  }
+			  // if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
+				//   //获取电子报销行数
+				//   let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
+				//   if(invoiceReimbursementCount>0){
+				// 	  //获取附件信息以xml结尾的附件数量
+				// 	  var flag = false;
+				// 	  var countFlag = 0;
+			  //
+				// 	  for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
+				// 		  //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
+				// 		  const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
+				// 		  var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
+				// 		  if(fileNameSuffix === "xml" ) {
+				// 			  flag = true;
+				// 			  countFlag ++;
+				// 		  }
+				// 	  }
+				// 	  if(!flag){
+				// 		  this.$message.error("已填写电子发票信息,请上传对应发票的xml文件!")
+				// 		  this.loading = false
+				// 		  throw new Error("已填写电子发票信息,请上传对应发票的xml文件!")
+				// 	  }
+				//   }
+			  // }
             this.inputForm.fileStatus = '2'
 			  this.inputForm.assignee = this.inputForm.createById
             this.reimbursementService.saveFile(this.inputForm).then((data) => {
@@ -1425,12 +1426,12 @@
 			  }
 			  this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 			  this.inputForm.files = this.$refs.uploadComponent.getDataList()
-			  if(this.inputForm.invoiceReimbursementFiles<=0){
-				  this.$message.error("请上传数电发票发票xml文件!")
-				  this.loading = false
-				  throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-			  }
-			  this.dataFiltering()
+			  // if(this.inputForm.invoiceReimbursementFiles<=0){
+				//   this.$message.error("请上传数电发票发票xml文件!")
+				//   this.loading = false
+				//   throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+			  // }
+			  // this.dataFiltering()
 			  this.inputForm.fileStatus = '2'
 			  this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
               if (this.commonJS.isNotEmpty(data)) {
@@ -1452,9 +1453,17 @@
       updateStatusById (type, callback) {
         if (type === 'reject') {
           this.inputForm.fileStatus = '4'
-          this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
-            callback()
-          })
+			this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
+				if (this.commonJS.isNotEmpty(data)) {
+					if (data === '财务审核') {
+						console.log('this.inputForm.userId', this.inputForm.userId)
+						this.inputForm.assignee = this.inputForm.userId
+					}
+				}
+				this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
+					callback(this.inputForm.assignee)
+				})
+			})
           // this.reimbursementService.updateStatusById(this.inputForm)
         } else if (type === 'hold') {
           this.inputForm.fileStatus = '1'

+ 1 - 1
src/views/cw/reimbursementApproval/info/InfoList.vue

@@ -250,7 +250,7 @@
 								<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 								<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 								<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
-								<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
+								<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4' && checkIsAuditFile(scope.row)" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
 								<el-button v-if="scope.row.fileStatus==='2' && checkIsAuditFile(scope.row)" text type="primary"  @click="examineFile(scope.row)">审核</el-button>
 
 

+ 77 - 68
src/views/cw/reimbursementApproval/info/ReimbursementFileSupplementForm.vue

@@ -1041,6 +1041,7 @@
 				this.inputForm = {
 					reimbursementType: '1',
 					userName: '',
+					userId: '',
 					no: '',
 					department: '',
 					reimDate: '',
@@ -1114,7 +1115,7 @@
 						}
 						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
 							if (this.commonJS.isNotEmpty(data)) {
-								if (data === '报销人审核' && this.status != 'taskFormDetail') {
+								if ((data === '报销人审核'|| data === '报销人调整') && this.status != 'taskFormDetail') {
 									method = 'add'
 								}else {
 									method = 'view'
@@ -1540,30 +1541,30 @@
 						// 	throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 						// }
 						//判定附件中xml文件数量是否小于电子发票报销行数量
-						if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
-							//获取电子报销行数
-							let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
-							if(invoiceReimbursementCount>0){
-								//获取附件信息以xml结尾的附件数量
-								var flag = false;
-								var countFlag = 0;
-
-								for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
-									//如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
-									const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
-									var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
-									if(fileNameSuffix === "xml" ) {
-										flag = true;
-										countFlag ++;
-									}
-								}
-								if(!flag){
-									this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
-									this.loading = false
-									throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-								}
-							}
-						}
+						// if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
+						// 	//获取电子报销行数
+						// 	let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
+						// 	if(invoiceReimbursementCount>0){
+						// 		//获取附件信息以xml结尾的附件数量
+						// 		var flag = false;
+						// 		var countFlag = 0;
+						//
+						// 		for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
+						// 			//如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
+						// 			const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
+						// 			var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
+						// 			if(fileNameSuffix === "xml" ) {
+						// 				flag = true;
+						// 				countFlag ++;
+						// 			}
+						// 		}
+						// 		if(!flag){
+						// 			this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
+						// 			this.loading = false
+						// 			throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+						// 		}
+						// 	}
+						// }
 						this.inputForm.fileStatus = '2'
 						this.inputForm.assignee = this.inputForm.createById
 						this.reimbursementApprovalService.saveFile(this.inputForm).then((data) => {
@@ -1593,12 +1594,12 @@
 			// 通过
 			async agreeForm (callback) {
 				this.loading = true
-				this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
-					if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
-						this.loading = false
-						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-					} else {
+				// this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
+				// 	if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
+				// 		this.loading = false
+				// 		this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+				// 		throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+				// 	} else {
 						this.$refs['inputForm'].validate(async (valid) => {
 							if (valid) {
 								this.loading = true
@@ -1620,13 +1621,13 @@
 								console.log('in',this.inputForm)
 
 								this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
-								this.inputForm.files = this.$refs.uploadComponent.getDataList()
-								if(this.inputForm.invoiceReimbursementFiles<=0){
-									this.$message.error("请上传数电发票发票xml文件!")
-									this.loading = false
-									throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-								}
-								this.dataFiltering()
+								// this.inputForm.files = this.$refs.uploadComponent.getDataList()
+								// if(this.inputForm.invoiceReimbursementFiles<=0){
+								// 	this.$message.error("请上传数电发票发票xml文件!")
+								// 	this.loading = false
+								// 	throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+								// }
+								// this.dataFiltering()
 								this.inputForm.fileStatus = '2'
 								this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
 									if (this.commonJS.isNotEmpty(data)) {
@@ -1646,50 +1647,58 @@
 								this.loading = false
 							}
 						})
-					}
-				})
+					// }
+				// })
 			},
 			// 修改状态
 			updateStatusById (type, callback) {
 				if (type === 'reject') {
 					this.loading = true
-					this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
-						if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						}
-						if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
-							this.loading = false
-							throw new Error()
-						}
-
-						if (this.$refs.uploadComponent.checkProgress()) {
-							this.loading = false
-							throw new Error()
-						} else {
+					// this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
+					// 	if (data.fileStatus !== '2') { // 审核状态不是“审核中”,就弹出提示
+					// 		this.loading = false
+					// 		this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					// 		throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					// 	}
+					// 	if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
+					// 		this.loading = false
+					// 		throw new Error()
+					// 	}
+					//
+					// 	if (this.$refs.uploadComponent.checkProgress()) {
+					// 		this.loading = false
+					// 		throw new Error()
+					// 	} else {
 							this.inputForm.fileStatus = '4'
-							this.reimbursementApprovalService.updateFileStatusById(this.inputForm).then(() => {
-								this.loading = false
-								callback()
+							this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
+								if (this.commonJS.isNotEmpty(data)) {
+									if (data === '财务审核') {
+										console.log('this.inputForm.userId', this.inputForm.userId)
+										this.inputForm.assignee = this.inputForm.userId
+									}
+								}
+								this.reimbursementApprovalService.updateFileStatusById(this.inputForm).then(() => {
+									this.loading = false
+									callback(this.inputForm.assignee)
+								})
 							})
-						}
-					})
+					// 	}
+					// })
 				} else if (type === 'hold') {
 					this.loading = true
-					this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
-						if (data.fileStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
-							this.loading = false
-							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						} else {
+					// this.reimbursementApprovalService.findFileById(this.inputForm.fileSuppleId).then((data) => {
+					// 	if (data.fileStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
+					// 		this.loading = false
+					// 		this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					// 		throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					// 	} else {
 							this.inputForm.fileStatus = '1'
 							this.reimbursementApprovalService.updateFileStatusById(this.inputForm).then(() => {
 								this.loading = false
 								callback()
 							})
-						}
-					})
+					// 	}
+					// })
 				}
 			},
 			footerMethod ({ columns, data }) {

+ 1 - 1
src/views/reimbursement/info/InfoList.vue

@@ -229,7 +229,7 @@
 				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
-				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
+				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4' && checkIsAuditFile(scope.row)" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
 				<el-button v-if="scope.row.fileStatus==='2' && checkIsAuditFile(scope.row)" text type="primary"  @click="examineFile(scope.row)">审核</el-button>
 
 			</template>

+ 60 - 50
src/views/reimbursement/info/ReimbursementFileSupplementForm.vue

@@ -1063,7 +1063,7 @@
 						}
 						taskService.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
 							if (this.commonJS.isNotEmpty(data)) {
-								if (data === '报销人审核' && this.status != 'taskFormDetail') {
+								if ((data === '报销人审核'|| data === '报销人调整') && this.status != 'taskFormDetail') {
 									method = 'add'
 								}else {
 									method = 'view'
@@ -1445,37 +1445,37 @@
 						this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 						this.inputForm.files = this.$refs.uploadComponent.getDataList()
 
-						this.dataFiltering()
+						// this.dataFiltering()
 						// if(this.inputForm.invoiceReimbursementFiles<=0 && "1" === this.inputForm.reimbursementType){
 						// 	this.$message.error("请上传数电发票发票xml文件!")
 						// 	this.loading = false
 						// 	throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 						// }
 						//判定附件中xml文件数量是否小于电子发票报销行数量
-						if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
-							//获取电子报销行数
-							let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
-							if(invoiceReimbursementCount>0){
-								//获取附件信息以xml结尾的附件数量
-								var flag = false;
-								var countFlag = 0;
-
-								for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
-									//如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
-									const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
-									var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
-									if(fileNameSuffix === "xml" ) {
-										flag = true;
-										countFlag ++;
-									}
-								}
-								if(!flag){
-									this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
-									this.loading = false
-									throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-								}
-							}
-						}
+						// if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
+						// 	//获取电子报销行数
+						// 	let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
+						// 	if(invoiceReimbursementCount>0){
+						// 		//获取附件信息以xml结尾的附件数量
+						// 		var flag = false;
+						// 		var countFlag = 0;
+						//
+						// 		for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
+						// 			//如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
+						// 			const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
+						// 			var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
+						// 			if(fileNameSuffix === "xml" ) {
+						// 				flag = true;
+						// 				countFlag ++;
+						// 			}
+						// 		}
+						// 		if(!flag){
+						// 			this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
+						// 			this.loading = false
+						// 			throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+						// 		}
+						// 	}
+						// }
 
 						this.inputForm.fileStatus = '2'
 						this.inputForm.assignee = this.inputForm.createById
@@ -1498,12 +1498,12 @@
 			// 通过
 			async agreeForm (callback) {
 				this.loading = true
-				await this.reimbursementService.findFileById(this.inputForm.fileSuppleId).then((data) => {
-					if (data.fileStatus !== '2') { // status的值不等于“审核中”,就弹出提示
-						this.loading = false
-						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-						throw new Error()
-					} else {
+				// await this.reimbursementService.findFileById(this.inputForm.fileSuppleId).then((data) => {
+				// 	if (data.fileStatus !== '2') { // status的值不等于“审核中”,就弹出提示
+				// 		this.loading = false
+				// 		this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+				// 		throw new Error()
+				// 	} else {
 						this.$refs['inputForm'].validate(async (valid) => {
 							if (valid) {
 								this.loading = true
@@ -1524,12 +1524,12 @@
 								}
 								this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 								this.inputForm.files = this.$refs.uploadComponent.getDataList()
-								if(this.inputForm.invoiceReimbursementFiles<=0){
-									this.$message.error("请上传数电发票发票xml文件!")
-									this.loading = false
-									throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-								}
-								this.dataFiltering()
+								// if(this.inputForm.invoiceReimbursementFiles<=0){
+								// 	this.$message.error("请上传数电发票发票xml文件!")
+								// 	this.loading = false
+								// 	throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+								// }
+								// this.dataFiltering()
 								this.inputForm.fileStatus = '2'
 								taskService.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
 									if (this.commonJS.isNotEmpty(data)) {
@@ -1546,8 +1546,8 @@
 								})
 							}
 						})
-					}
-				})
+				// 	}
+				// })
 			},
 			async updateStatusById (type, callback) {
 				this.loading = true
@@ -1560,28 +1560,38 @@
 					throw new Error()
 				} else {
 					if (type === 'reject' || type === 'reback') {
-						this.reimbursementService.findFileById(this.inputForm.fileSuppleId).then((data) => {
-							if (data.fileStatus !== '2') { // status的值不等于“审核中”,就弹出提示
-								this.loading = false
-								this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-								throw new Error()
-							} else {
+						// this.reimbursementService.findFileById(this.inputForm.fileSuppleId).then((data) => {
+						// 	if (data.fileStatus !== '2') { // status的值不等于“审核中”,就弹出提示
+						// 		this.loading = false
+						// 		this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						// 		throw new Error()
+						// 	} else {
 								if (type === 'reject') {
 									// 驳回
 									this.inputForm.fileStatus = '4'
+									taskService.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
+										if (this.commonJS.isNotEmpty(data)) {
+											if (data === '财务审核') {
+												console.log('this.inputForm.userId', this.inputForm.userId)
+												this.inputForm.assignee = this.inputForm.userId
+											}
+										}
+										this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
+											this.loading = false
+											callback(this.inputForm.assignee)
+										})
+									})
 								}
 								if (type === 'reback') {
 									// 撤回
 									this.inputForm.fileStatus = '3'
-								}
-								if (type === 'reject' || type === 'reback') {
 									this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
 										this.loading = false
 										callback()
 									})
 								}
-							}
-						})
+						// 	}
+						// })
 					} else if (type === 'hold') {
 						this.reimbursementService.findFileById(this.inputForm.fileSuppleId).then((data) => {
 							if (data.fileStatus !== '4') { // status的值不等于“驳回”就弹出提示

+ 1 - 1
src/views/zs/reimbursement/info/InfoList.vue

@@ -243,7 +243,7 @@
 				<el-button v-if="hasPermission('file:supplement')&& (scope.row.type === '5' || scope.row.applyFile === true) && (scope.row.fileStatus === '0' || scope.row.fileStatus === '5'|| scope.row.fileStatus === ''|| scope.row.fileStatus === null|| scope.row.fileStatus === undefined)" text type="primary" @click="addFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '3')" text type="primary"  @click="editFile(scope.row)">文件补充</el-button>
 				<el-button v-if="hasPermission('file:supplement') && (scope.row.fileStatus === '2')" text type="primary"  @click="rebackFile(scope.row)">撤回文件补充</el-button>
-				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4'" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
+				<el-button v-if="hasPermission('file:supplement') && scope.row.fileStatus === '4' && checkIsAuditFile(scope.row)" text type="primary"  @click="adjustFile(scope.row)">文件补充驳回调整</el-button>
 				<el-button v-if="scope.row.fileStatus==='2' && checkIsAuditFile(scope.row)" text type="primary"  @click="examineFile(scope.row)">审核</el-button>
 
 			</template>

+ 44 - 35
src/views/zs/reimbursement/info/ReimbursementFileSupplementForm.vue

@@ -907,6 +907,7 @@
         this.inputForm = {
 			reimbursementType: '1',
           userName: '',
+			userId: '',
           no: '',
           department: '',
           reimDate: '',
@@ -979,7 +980,7 @@
 			  }
 			  this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
 				  if (this.commonJS.isNotEmpty(data)) {
-					  if (data === '报销人审核' && this.status != 'taskFormDetail') {
+					  if ((data === '报销人审核'|| data === '报销人调整') && this.status != 'taskFormDetail') {
 						  method = 'add'
 					  }else {
 						  method = 'view'
@@ -1346,37 +1347,37 @@
             // }
 			  this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 			  this.inputForm.files = this.$refs.uploadComponent.getDataList()
-			  this.dataFiltering()
+			  // this.dataFiltering()
 			  // if(this.inputForm.invoiceReimbursementFiles<=0 && "1" === this.inputForm.reimbursementType){
 				//   this.$message.error("请上传数电发票发票xml文件!")
 				//   this.loading = false
 				//   throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
 			  // }
 			  //判定附件中xml文件数量是否小于电子发票报销行数量
-			  if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
-				  //获取电子报销行数
-				  let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
-				  if(invoiceReimbursementCount>0){
-					  //获取附件信息以xml结尾的附件数量
-					  var flag = false;
-					  var countFlag = 0;
-
-					  for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
-						  //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
-						  const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
-						  var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
-						  if(fileNameSuffix === "xml" ) {
-							  flag = true;
-							  countFlag ++;
-						  }
-					  }
-					  if(!flag){
-						  this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
-						  this.loading = false
-						  throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-					  }
-				  }
-			  }
+			  // if (this.commonJS.isNotEmpty(this.inputForm.invoiceReimbursements) && "1" === this.inputForm.reimbursementType) {
+				//   //获取电子报销行数
+				//   let invoiceReimbursementCount = this.inputForm.invoiceReimbursements.length
+				//   if(invoiceReimbursementCount>0){
+				// 	  //获取附件信息以xml结尾的附件数量
+				// 	  var flag = false;
+				// 	  var countFlag = 0;
+			  //
+				// 	  for (var i=0; i<this.inputForm.invoiceReimbursementFiles.length; i++){
+				// 		  //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
+				// 		  const spliceLength2 = this.inputForm.invoiceReimbursementFiles[i].name.lastIndexOf(".");
+				// 		  var fileNameSuffix = this.inputForm.invoiceReimbursementFiles[i].name.slice(spliceLength2 + 1);
+				// 		  if(fileNameSuffix === "xml" ) {
+				// 			  flag = true;
+				// 			  countFlag ++;
+				// 		  }
+				// 	  }
+				// 	  if(!flag){
+				// 		  this.$message.error("已填写数电发票信息,请上传对应发票的xml文件!")
+				// 		  this.loading = false
+				// 		  throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+				// 	  }
+				//   }
+			  // }
             this.inputForm.fileStatus = '2'
 			  this.inputForm.assignee = this.inputForm.createById
 			  this.reimbursementService.saveFile(this.inputForm).then((data) => {
@@ -1424,12 +1425,12 @@
 
 			  this.inputForm.invoiceReimbursementFiles = this.$refs.invoiceReimbursementUpLoadComponent.getDataList()
 			  this.inputForm.files = this.$refs.uploadComponent.getDataList()
-			  if(this.inputForm.invoiceReimbursementFiles<=0){
-				  this.$message.error("请上传数电发票发票xml文件!")
-				  this.loading = false
-				  throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
-			  }
-			  this.dataFiltering()
+			  // if(this.inputForm.invoiceReimbursementFiles<=0){
+				//   this.$message.error("请上传数电发票发票xml文件!")
+				//   this.loading = false
+				//   throw new Error("已填写数电发票信息,请上传对应发票的xml文件!")
+			  // }
+			  // this.dataFiltering()
 			  this.inputForm.fileStatus = '2'
             this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
               if (this.commonJS.isNotEmpty(data)) {
@@ -1451,9 +1452,17 @@
       updateStatusById (type, callback) {
         if (type === 'reject') {
           this.inputForm.fileStatus = '4'
-          this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
-            callback()
-          })
+			this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsIdFile).then((data) => {
+				if (this.commonJS.isNotEmpty(data)) {
+					if (data === '财务审核') {
+						console.log('this.inputForm.userId', this.inputForm.userId)
+						this.inputForm.assignee = this.inputForm.userId
+					}
+				}
+				this.reimbursementService.updateFileStatusById(this.inputForm).then(() => {
+					callback(this.inputForm.assignee)
+				})
+			})
           // this.reimbursementService.updateStatusById(this.inputForm)
         } else if (type === 'hold') {
           this.inputForm.fileStatus = '1'