Bladeren bron

数电发票确认调整

huangguoce 1 maand geleden
bovenliggende
commit
f6ab843e4e

+ 16 - 3
src/views/ccpm/reimbursement/info/ReimbursementForm.vue

@@ -995,8 +995,11 @@ export default {
           //  获取当前审核节点
           this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
             this.currentNodeName = name
-            if (name == "综合管理部主任审核" || name == "财务审核") {
-              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
+            if (name == "综合管理部主任审核") {
+              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 1
+            }
+            if (name == "财务审核") {
+              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 2
             }
           })
           // 获取文件确认状态
@@ -1565,6 +1568,15 @@ export default {
             this.loading = false
             return
           }
+          if (this.currentNodeName == "综合管理部主任审核") {
+            let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
+            if (!confirmFlag) {
+              this.$message.warning('数电发票未全部确认,请全部确认后再提交')
+              this.loading = false
+              return
+            }
+          }
+
           if (this.$refs.uploadComponent.checkProgress()) {
             this.loading = false
             return
@@ -1602,7 +1614,8 @@ export default {
             }
             this.reimbursementService.save(this.inputForm).then((data) => {
               callback(data.businessTable, data.businessId, this.inputForm)
-              if (this.currentNodeName == "综合管理部主任审核" || this.currentNodeName == "财务审核") {
+              // this.currentNodeName == "财务审核"
+              if (this.currentNodeName == "综合管理部主任审核") {
                 this.changeStatusApi()
               }
               this.loading = false

+ 18 - 12
src/views/common/DigitalInvoiceUploadComponent.vue

@@ -16,10 +16,10 @@
 						上传报销的数电发票xml文件</span>
 				</template>
 			</el-upload>
-			<el-button v-if="this.allStatus && this.isConfirm" type="primary" size="default" style="margin-left: 10px;"
+			<!-- <el-button v-if="this.allStatus && this.isConfirm" type="primary" size="default" style="margin-left: 10px;"
 				@click="allSelect('0')">全部取消</el-button>
 			<el-button v-if="!this.allStatus && this.isConfirm" type="primary" size="default" style="margin-left: 10px;"
-				@click="allSelect('1')">全部确认</el-button>
+				@click="allSelect('1')">全部确认</el-button> -->
 		</el-divider>
 
 		<div style="height: calc(100% - 80px);margin-top: 10px">
@@ -112,8 +112,8 @@
 						<el-input disabled="true" v-model="scope.row.count"></el-input>
 					</template>
 				</el-table-column>
-				<el-table-column v-if="isConfirm" prop="confirmStatus" label="确认状态" align="center" width="120"
-					:edit-render="{}" show-overflow="title">
+				<el-table-column v-if="isConfirm == 1 || isConfirm == 2" prop="confirmStatus" label="确认状态"
+					align="center" width="120" :edit-render="{}" show-overflow="title">
 					<template #default="scope">
 						<el-tag v-if="scope.row.confirmStatus == '1'" type="success">已确认</el-tag>
 						<el-tag v-if="!scope.row.confirmStatus || scope.row.confirmStatus == '0'"
@@ -122,11 +122,12 @@
 				</el-table-column>
 				<el-table-column label="操作" width="200px" fixed="right" align="center">
 					<template #default="scope">
-						<el-button v-if="isConfirm && (!scope.row.confirmStatus || scope.row.confirmStatus == '0')" text
-							type="primary" key="btn01" icon="el-icon-check" size="small"
+						<el-button v-if="isConfirm == 1 && (!scope.row.confirmStatus || scope.row.confirmStatus == '0')"
+							text type="primary" key="btn01" icon="el-icon-check" size="small"
 							@click="changeStatus(scope.row, '1')">确认</el-button>
-						<el-button v-if="isConfirm && scope.row.confirmStatus == '1'" text type="danger" key="btn02"
-							icon="el-icon-close" size="small" @click="changeStatus(scope.row, '0')">取消确认</el-button>
+						<el-button v-if="isConfirm == 1 && scope.row.confirmStatus == '1'" text type="danger"
+							key="btn02" icon="el-icon-close" size="small"
+							@click="changeStatus(scope.row, '0')">取消确认</el-button>
 						<el-button text type="primary" key="01" icon="el-icon-download" size="small"
 							@click="toHref(scope.row)">下载</el-button>
 						<el-button text type="primary" key="02" icon="el-icon-delete" size="small"
@@ -161,7 +162,7 @@ import moment from 'moment'
 export default {
 	data() {
 		return {
-			isConfirm: false,
+			isConfirm: 0,//1:为主任审批,需要确认发票。2:为财务审批,无需确认
 			uploadKey: '',
 			progressFlag: false,
 			loadProgress: 0,
@@ -937,10 +938,15 @@ export default {
 			row.confirmStatus = status;
 		},
 		tableRowClassName({ row, rowIndex }) {
-			if (row.confirmStatus == "1") {
-				return 'warning-row';
+			if (this.isConfirm == 1 || this.isConfirm == 2) {
+				if (row.confirmStatus == "1") {
+					return 'warning-row';
+				} else {
+					return '';
+				}
+			} else {
+				return '';
 			}
-			return '';
 		},
 		allSelect(status) {
 			this.dataListNew.forEach(item => {

+ 15 - 3
src/views/consultancy/reimbursement/info/ReimbursementForm.vue

@@ -994,8 +994,11 @@ export default {
           //  获取当前审核节点
           this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
             this.currentNodeName = name
-            if (name == "综合管理部主任审核" || name == "财务审批") {
-              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
+            if (name == "综合管理部主任审核") {
+              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 1
+            }
+            if (name == "财务审批") {
+              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 2
             }
           })
           // 获取文件确认状态
@@ -1513,6 +1516,14 @@ export default {
             this.loading = false
             return
           }
+          if (this.currentNodeName == "综合管理部主任审核") {
+            let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
+            if (!confirmFlag) {
+              this.$message.warning('数电发票未全部确认,请全部确认后再提交')
+              this.loading = false
+              return
+            }
+          }
           if (this.$refs.uploadComponent.checkProgress()) {
             this.loading = false
             return
@@ -1544,7 +1555,8 @@ export default {
             }
             this.reimbursementService.save(this.inputForm).then((data) => {
               callback(data.businessTable, data.businessId, this.inputForm)
-              if (this.currentNodeName == "综合管理部主任审核" || this.currentNodeName == "财务审批") {
+              // this.currentNodeName == "财务审批"
+              if (this.currentNodeName == "综合管理部主任审核") {
                 this.changeStatusApi()
               }
               this.loading = false

+ 28 - 6
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -1156,13 +1156,15 @@ export default {
 					//  获取当前审核节点
 					this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
 						this.currentNodeName = name
-						if (name == "综合管理部主任审批" || name == "财务审批") {
-							this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
+						if (name == "综合管理部主任审批") {
+							this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 1
+						}
+						if (name == "财务审批") {
+							this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 2
 						}
 					})
 					// 获取文件确认状态
 					this.invoiceConfirmStatusService.getListByUser(this.inputForm.id).then(data => {
-						console.log(data);
 						// 先构建一个 Map 方便查找
 						const statusMap = new Map(data.map(item => [item.invoiceId, item.status]));
 						// 遍历 targetArray 给每项加 confirmStatus
@@ -1177,6 +1179,8 @@ export default {
 				})
 				if (method !== 'edit' && method !== 'view') {
 					this.$refs.invoiceReimbursementUpLoadComponent.newUpload(method, [], 'reimbursement')
+
+
 					this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
 				}
 				userService.isKjsz().then((data) => {
@@ -1767,7 +1771,6 @@ export default {
 			this.loading = true
 			this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
 				if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
-
 					taskService.getTaskAuditUsersByprocInstId(this.$route.query.procInsId).then(res => {
 						let userInfo = this.$TOOL.data.get("USER_INFO");
 						// 如果审核人是本人的话,则跳过数据状态的限制,可再次审批
@@ -1780,6 +1783,14 @@ export default {
 										this.loading = false
 										return
 									}
+									if (this.currentNodeName == "综合管理部主任审批") {
+										let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
+										if (!confirmFlag) {
+											this.$message.warning('数电发票未全部确认,请全部确认后再提交')
+											this.loading = false
+											return
+										}
+									}
 									if (this.$refs.uploadComponent.checkProgress()) {
 										this.loading = false
 										return
@@ -1813,7 +1824,8 @@ export default {
 										}
 										this.reimbursementApprovalService.save(this.inputForm).then((data) => {
 											callback(data.businessTable, data.businessId, this.inputForm)
-											if (this.currentNodeName == "综合管理部主任审批" || this.currentNodeName == "财务审批") {
+											//  this.currentNodeName == "财务审批"
+											if (this.currentNodeName == "综合管理部主任审批") {
 												this.changeStatusApi()
 											}
 											this.loading = false
@@ -1844,6 +1856,14 @@ export default {
 								this.loading = false
 								return
 							}
+							if (this.currentNodeName == "综合管理部主任审批") {
+								let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
+								if (!confirmFlag) {
+									this.$message.warning('数电发票未全部确认,请全部确认后再提交')
+									this.loading = false
+									return
+								}
+							}
 							if (this.$refs.uploadComponent.checkProgress()) {
 								this.loading = false
 								return
@@ -1878,7 +1898,9 @@ export default {
 								console.log('this.inputForm', this.inputForm)
 								this.reimbursementApprovalService.save(this.inputForm).then((data) => {
 									callback(data.businessTable, data.businessId, this.inputForm)
-									this.changeStatusApi()
+									if (this.currentNodeName == "综合管理部主任审批") {
+										this.changeStatusApi()
+									}
 									this.loading = false
 								}).catch(() => {
 									this.loading = false

+ 15 - 3
src/views/reimbursement/info/ReimbursementForm.vue

@@ -1095,8 +1095,11 @@ export default {
 					//  获取当前审核节点
 					this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
 						this.currentNodeName = name
-						if (name == "综合管理部主任审批" || name == "财务审批") {
-							this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
+						if (name == "综合管理部主任审批") {
+							this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 1
+						}
+						if (name == "财务审批") {
+							this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 2
 						}
 					})
 					// 获取文件确认状态
@@ -1633,6 +1636,14 @@ export default {
 								this.loading = false
 								return
 							}
+							if (this.currentNodeName == "综合管理部主任审批") {
+								let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
+								if (!confirmFlag) {
+									this.$message.warning('数电发票未全部确认,请全部确认后再提交')
+									this.loading = false
+									return
+								}
+							}
 							if (this.$refs.uploadComponent.checkProgress()) {
 								this.loading = false
 								return
@@ -1662,7 +1673,8 @@ export default {
 								}
 								this.reimbursementService.save(this.inputForm).then((data) => {
 									callback(data.businessTable, data.businessId, this.inputForm)
-									if (this.currentNodeName == "综合管理部主任审批" || this.currentNodeName == "财务审批") {
+									// this.currentNodeName == "财务审批"
+									if (this.currentNodeName == "综合管理部主任审批") {
 										this.changeStatusApi()
 									}
 									this.loading = false

+ 15 - 3
src/views/zs/reimbursement/info/ReimbursementForm.vue

@@ -1117,8 +1117,11 @@ export default {
           //  获取当前审核节点
           this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
             this.currentNodeName = name
-            if (name == "综合管理部主任审批" || name == "财务审批") {
-              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
+            if (name == "综合管理部主任审批") {
+              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 1
+            }
+            if (name == "财务审批") {
+              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = 2
             }
           })
           // 获取文件确认状态
@@ -1657,6 +1660,14 @@ export default {
             this.loading = false
             return
           }
+          if (this.currentNodeName == "综合管理部主任审批") {
+            let confirmFlag = this.inputForm.invoiceReimbursementFiles.every(item => item.confirmStatus == 1)
+            if (!confirmFlag) {
+              this.$message.warning('数电发票未全部确认,请全部确认后再提交')
+              this.loading = false
+              return
+            }
+          }
           if (this.$refs.uploadComponent.checkProgress()) {
             this.loading = false
             return
@@ -1688,7 +1699,8 @@ export default {
             }
             this.reimbursementService.save(this.inputForm).then((data) => {
               callback(data.businessTable, data.businessId, this.inputForm)
-              if (this.currentNodeName == "综合管理部主任审批" || this.currentNodeName == "财务审批") {
+              // this.currentNodeName == "财务审批"
+              if (this.currentNodeName == "综合管理部主任审批") {
                 this.changeStatusApi()
               }
               this.loading = false