浏览代码

报销调整

huangguoce 4 月之前
父节点
当前提交
bc4e804a48

+ 20 - 3
src/views/ccpm/reimbursement/info/NewInfoUpdateForm.vue

@@ -382,8 +382,8 @@
 								ref="detailTableOthers" class="vxe-table-element" :data="inputForm.detailInfoOthers"
 								style="margin-left: 5em" :key="detailKeyOthers" highlight-current-row
 								:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-								:edit-rules="validRules"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -799,9 +799,12 @@ export default {
 				deptName: [
 					{ required: true, message: '报销部门不能为空' }
 				],
-				typeName: [
+				reimbursementType: [
 					{ required: true, message: '报销类型不能为空' }
 				],
+				typeName: [
+					{ required: true, message: '报销类别不能为空' }
+				],
 				projectName: [
 					{ required: true, message: '报销项目不能为空' }
 				],
@@ -2447,6 +2450,20 @@ export default {
 			} else {
 				this.loading = false
 			}
+		},
+		handleDefaultExpand() {
+			this.handleTableInfo(this.inputForm.sourceType)
+			let arr = []
+			this.tableData.forEach((item, index) => {
+				if (item.reimbursementType) {
+					if (item.reimbursementType) {
+						arr.push(item.uniqueId)
+					}
+				}
+			})
+			console.log(arr);
+
+			return arr
 		}
 	}
 }

+ 20 - 3
src/views/ccpm/reimbursement/info/NewReimbursementForm.vue

@@ -356,8 +356,8 @@
               class="vxe-table-element" :data="inputForm.detailInfoOthers" style="margin-left: 5em"
               :key="detailKeyOthers" highlight-current-row
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-              :edit-rules="validRules"
-              :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -755,9 +755,12 @@ export default {
         deptName: [
           { required: true, message: '报销部门不能为空' }
         ],
-        typeName: [
+        reimbursementType: [
           { required: true, message: '报销类型不能为空' }
         ],
+        typeName: [
+          { required: true, message: '报销类别不能为空' }
+        ],
         projectName: [
           { required: true, message: '报销项目不能为空' }
         ],
@@ -1512,6 +1515,8 @@ export default {
         if (valid) {
           this.loading = true
           this.submitCheck()
+          this.handleCheckAmount()
+
           // if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
           //   this.loading = false
           //   return
@@ -2561,6 +2566,18 @@ export default {
       } else {
         this.loading = false
       }
+    },
+    handleDefaultExpand() {
+      this.handleTableInfo(this.inputForm.sourceType)
+      let arr = []
+      this.tableData.forEach((item, index) => {
+        if (item.reimbursementType) {
+          arr.push(item.uniqueId)
+        }
+      })
+      console.log(arr);
+
+      return arr
     }
   }
 }

+ 4 - 3
src/views/common/NewUpLoadComponent.vue

@@ -40,9 +40,10 @@
         </el-table-column>
         <el-table-column label="操作" width="200px" fixed="right" align="center">
           <template #default="scope">
-            <el-button text type="primary" key="01" icon="el-icon-download" size="small"
-              @click="toHref(scope.row)">下载</el-button>
-
+            <el-form inline :disabled="false" style="display: inline-block;">
+              <el-button style="margin-right: 12px;" text type="primary" key="01" icon="el-icon-download" size="small"
+                @click="toHref(scope.row)">下载</el-button>
+            </el-form>
             <el-button text type="primary" key="02" icon="el-icon-delete" size="small"
               @click="deleteById(scope.row, scope.$index, fileList)"
               :disabled="auth === 'view' && delFlag === false && createBy !== scope.row.createBy.name">删除</el-button>

+ 16 - 3
src/views/consultancy/reimbursement/info/NewInfoUpdateForm.vue

@@ -362,8 +362,8 @@
                 class="vxe-table-element" :data="inputForm.detailInfoOthers" style="margin-left: 5em"
                 :key="detailKeyOthers" highlight-current-row
                 :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-                :edit-rules="validRules"
-                :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+                :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+                :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
                 <vxe-column type="expand" width="80">
                   <template #content="{ row, rowIndex }">
                     <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -770,9 +770,12 @@ export default {
         deptName: [
           { required: true, message: '报销部门不能为空' }
         ],
-        typeName: [
+        reimbursementType: [
           { required: true, message: '报销类型不能为空' }
         ],
+        typeName: [
+          { required: true, message: '报销类别不能为空' }
+        ],
         projectName: [
           { required: true, message: '报销项目不能为空' }
         ],
@@ -2383,6 +2386,16 @@ export default {
       } else {
         this.loading = false
       }
+    },
+    handleDefaultExpand() {
+      this.handleTableInfo(this.inputForm.sourceType)
+      let arr = []
+      this.tableData.forEach((item, index) => {
+        if (item.reimbursementType) {
+          arr.push(item.uniqueId)
+        }
+      })
+      return arr
     }
   }
 }

+ 18 - 3
src/views/consultancy/reimbursement/info/NewReimbursementForm.vue

@@ -357,8 +357,8 @@
               class="vxe-table-element" :data="inputForm.detailInfoOthers" style="margin-left: 5em"
               :key="detailKeyOthers" highlight-current-row
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-              :edit-rules="validRules"
-              :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -757,9 +757,12 @@ export default {
         deptName: [
           { required: true, message: '报销部门不能为空' }
         ],
-        typeName: [
+        reimbursementType: [
           { required: true, message: '报销类型不能为空' }
         ],
+        typeName: [
+          { required: true, message: '报销类别不能为空' }
+        ],
         projectName: [
           { required: true, message: '报销项目不能为空' }
         ],
@@ -1458,6 +1461,8 @@ export default {
         if (valid) {
           this.loading = true
           this.submitCheck()
+          this.handleCheckAmount()
+
           // if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
           //   this.loading = false
           //   return
@@ -2500,6 +2505,16 @@ export default {
       } else {
         this.loading = false
       }
+    },
+    handleDefaultExpand() {
+      this.handleTableInfo(this.inputForm.sourceType)
+      let arr = []
+      this.tableData.forEach((item, index) => {
+        if (item.reimbursementType) {
+          arr.push(item.uniqueId)
+        }
+      })
+      return arr
     }
   }
 }

+ 22 - 9
src/views/cw/reimbursementApproval/info/NewInfoUpdateForm.vue

@@ -130,8 +130,8 @@
 								:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
 								style="margin-left: 5em" highlight-current-row
 								:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-								:edit-rules="validRules"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -192,8 +192,8 @@
 								:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
 								style="margin-left: 5em" highlight-current-row
 								:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-								:edit-rules="validRules"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -392,8 +392,8 @@
 								ref="detailTableReport" :key="detailKeyReport" class="vxe-table-element"
 								:data="inputForm.detailInfoReports" style="margin-left: 5em" highlight-current-row
 								:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-								:edit-rules="validRules"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -511,8 +511,8 @@
 								ref="detailTableOthers" class="vxe-table-element" :data="inputForm.detailInfoOthers"
 								style="margin-left: 5em" :key="detailKeyOthers" highlight-current-row
 								:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-								:edit-rules="validRules"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -1013,9 +1013,12 @@ export default {
 				deptName: [
 					{ required: true, message: '报销部门不能为空' }
 				],
-				typeName: [
+				reimbursementType: [
 					{ required: true, message: '报销类型不能为空' }
 				],
+				typeName: [
+					{ required: true, message: '报销类别不能为空' }
+				],
 				projectName: [
 					{ required: true, message: '报销项目不能为空' }
 				],
@@ -2863,6 +2866,16 @@ export default {
 			} else {
 				this.loading = false
 			}
+		},
+		handleDefaultExpand() {
+			this.handleTableInfo(this.inputForm.sourceType)
+			let arr = []
+			this.tableData.forEach((item, index) => {
+				if (item.reimbursementType) {
+					arr.push(item.uniqueId)
+				}
+			})
+			return arr
 		}
 
 	}

+ 23 - 8
src/views/cw/reimbursementApproval/info/NewReimbursementForm.vue

@@ -127,8 +127,8 @@
 							:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
 							style="margin-left: 5em" highlight-current-row
 							:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-							:edit-rules="validRules"
-							:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+							:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+							:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 							<vxe-column type="expand" width="80">
 								<template #content="{ row, rowIndex }">
 									<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -186,8 +186,8 @@
 							:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
 							style="margin-left: 5em" highlight-current-row
 							:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-							:edit-rules="validRules"
-							:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+							:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+							:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 							<vxe-column type="expand" width="80">
 								<template #content="{ row, rowIndex }">
 									<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -384,8 +384,8 @@
 							ref="detailTableReport" :key="detailKeyReport" class="vxe-table-element"
 							:data="inputForm.detailInfoReports" style="margin-left: 5em" highlight-current-row
 							:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-							:edit-rules="validRules"
-							:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+							:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+							:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 							<vxe-column type="expand" width="80">
 								<template #content="{ row, rowIndex }">
 									<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -501,8 +501,8 @@
 							ref="detailTableOthers" class="vxe-table-element" :data="inputForm.detailInfoOthers"
 							style="margin-left: 5em" :key="detailKeyOthers" highlight-current-row
 							:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-							:edit-rules="validRules"
-							:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+							:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+							:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 							<vxe-column type="expand" width="80">
 								<template #content="{ row, rowIndex }">
 									<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -997,6 +997,9 @@ export default {
 				deptName: [
 					{ required: true, message: '报销部门不能为空' }
 				],
+				reimbursementType: [
+					{ required: true, message: '报销类型不能为空' }
+				],
 				typeName: [
 					{ required: true, message: '报销类别不能为空' }
 				],
@@ -1816,6 +1819,8 @@ export default {
 				if (valid) {
 					this.loading = true
 					this.submitCheck()
+					this.handleCheckAmount()
+
 					// if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
 					// 	this.loading = false
 					// 	return
@@ -3135,6 +3140,16 @@ export default {
 			} else {
 				this.loading = false
 			}
+		},
+		handleDefaultExpand() {
+			this.handleTableInfo(this.inputForm.sourceType)
+			let arr = []
+			this.tableData.forEach((item, index) => {
+				if (item.reimbursementType) {
+					arr.push(item.uniqueId)
+				}
+			})
+			return arr
 		}
 
 	}

+ 79 - 1
src/views/dashboard/widgets/components/TodoList.vue

@@ -243,7 +243,26 @@ export default {
 					procDefKey: row.task.processDefKey,
 					status: row.status,
 				})
-				.then((data) => {
+				.then(async (data) => {
+					// 如果为报销
+					if (this.isReimbursementProcess(data.procDefKey)) {
+						// 根据流程名称获取对应的报销表单地址
+						let url = this.isReimbursementUrl(row.processDefinitionName)
+						if (url) {
+							let approvalTime = await taskService.getApprovalTimeByProcInsId(row.task.processInstanceId)
+							if (approvalTime) {
+								// 根据发起审批的时间判断是否为新版本报销页面
+								let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+								const compareResult = this.validateXG.compareDate(approvalTime, newStartDate);
+								const newVersionFlag = compareResult == 'same' || compareResult == 'after';
+
+								if (newVersionFlag) {
+									data.formUrl = url
+								}
+							}
+						}
+					}
+
 					var cs = "cs"
 					this.$router.push({
 						path: "/flowable/task/TaskForm",
@@ -272,6 +291,65 @@ export default {
 					});
 				});
 		},
+		isReimbursementProcess(procDefKey) {
+			const reimbursementProcesses = [
+				"Process_1669271524486",
+				"Process_1669271524487",
+				"Process_1704851888818",
+				"Process_1705370333755",
+				"Process_1705389994103",
+				"Process_1705390592348",
+				"Process_1673924346231",
+				"Process_1673924346232",
+				"Process_1705391439287",
+				"Process_1705391725816",
+				"Process_1665383385070",
+				"Process_1665383385071",
+				"Process_1705454007925",
+				"Process_1705454863808",
+				"Process_1706170102059",
+				"Process_1706175399469",
+				"Process_1706176397312",
+				"Process_1706176937876",
+				"Process_1706671221048",
+				"Process_1706679472488",
+				"Process_1706680073642",
+				"Process_1706680331785",
+				"Process_1706680660857",
+				"Process_1709102298565",
+				"Process_1709104787957",
+				"Process_1711418224962",
+			];
+			return reimbursementProcesses.includes(procDefKey);
+		},
+		isReimbursementUrl(name) {
+			// 会计
+			let cw = ["会计-所长报销", "会计-所长报销-电子发票", "会计-总经办报销", "盛所会计-报销申请", "会计-报销审批", "会计-报销审批-电子发票"]
+			// 中审
+			let zs = ["中审-所长报销", "中审-所长报销-电子发票", "中审-总经办报销", "中审-报销审批", "中审-报销审批-电子发票"]
+			// 评估
+			let pg = ["评估-总经办报销", "评估-所长报销", "评估-所长报销-电子发票", "评估-报销申请", "评估-报销审批-电子发票"]
+			// 项目
+			let ccpm = ["物资-项目报销", "项目-总经办报销", "项目-报销审批", "项目-报销审批-电子发票", "盛所项目-报销申请",]
+			// 咨询
+			let zx = ["咨询-总经办报销", "咨询-所长报销", "咨询-所长报销-电子发票", "咨询-报销审批", "咨询-报销审批-电子发票"]
+			if (cw.includes(name)) {
+				return '/cw/reimbursementApproval/info/NewReimbursementForm'
+			}
+			if (zs.includes(name)) {
+				return '/zs/reimbursement/info/NewReimbursementForm'
+			}
+			if (pg.includes(name)) {
+				return '/reimbursement/info/NewReimbursementForm'
+			}
+			if (ccpm.includes(name)) {
+				return '/ccpm/reimbursement/info/NewReimbursementForm'
+			}
+			if (zx.includes(name)) {
+				return '/consultancy/reimbursement/info/NewReimbursementForm'
+			}
+			return null;
+		},
 		toPendingList() {
 			// this.$router.push('./PendingList')
 			this.$router.push({

+ 0 - 2
src/views/home/components/TodoList2.vue

@@ -183,8 +183,6 @@ export default {
 								let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
 								const compareResult = this.validateXG.compareDate(approvalTime, newStartDate);
 								const newVersionFlag = compareResult == 'same' || compareResult == 'after';
-								console.log(approvalTime);
-								console.log(url);
 
 								if (newVersionFlag) {
 									data.formUrl = url

+ 20 - 7
src/views/reimbursement/info/NewInfoUpdateForm.vue

@@ -140,8 +140,8 @@
 						<el-col :span="24">
 							<vxe-table border show-footer show-overflow :footer-method="footerMethod" ref="detailTable"
 								:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
-								style="margin-left: 5em"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								style="margin-left: 5em" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -210,8 +210,8 @@
 								:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
 								style="margin-left: 5em" @cell-click="" @edit-closed="" highlight-current-row
 								:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-								:edit-rules="validRules"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -508,8 +508,8 @@
 								style="margin-left: 5em" :key="detailKeyOthers" @cell-click="" @edit-closed=""
 								highlight-current-row
 								:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-								:edit-rules="validRules"
-								:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+								:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+								:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 								<vxe-column type="expand" width="80">
 									<template #content="{ row, rowIndex }">
 										<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -928,9 +928,12 @@ export default {
 				deptName: [
 					{ required: true, message: '报销部门不能为空' }
 				],
-				typeName: [
+				reimbursementType: [
 					{ required: true, message: '报销类型不能为空' }
 				],
+				typeName: [
+					{ required: true, message: '报销类别不能为空' }
+				],
 				projectName: [
 					{ required: true, message: '报销项目不能为空' }
 				],
@@ -2624,6 +2627,16 @@ export default {
 			} else {
 				this.loading = false
 			}
+		},
+		handleDefaultExpand() {
+			this.handleTableInfo(this.inputForm.sourceType)
+			let arr = []
+			this.tableData.forEach((item, index) => {
+				if (item.reimbursementType) {
+					arr.push(item.uniqueId)
+				}
+			})
+			return arr
 		}
 	}
 }

+ 30 - 11
src/views/reimbursement/info/NewReimbursementForm.vue

@@ -130,8 +130,8 @@
 					<el-col :span="24">
 						<vxe-table border show-footer show-overflow :footer-method="footerMethod" ref="detailTable"
 							:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
-							style="margin-left: 5em"
-							:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+							style="margin-left: 5em" :row-config="{ keyField: 'uniqueId' }"
+							:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 							<vxe-column type="expand" width="80">
 								<template #content="{ row, rowIndex }">
 									<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -198,8 +198,8 @@
 							:key="detailKey" class="vxe-table-element" :data="inputForm.detailInfos"
 							style="margin-left: 5em" @cell-click="" @edit-closed="" highlight-current-row
 							:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-							:edit-rules="validRules"
-							:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+							:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+							:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 							<vxe-column type="expand" width="80">
 								<template #content="{ row, rowIndex }">
 									<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -491,8 +491,8 @@
 							style="margin-left: 5em" :key="detailKeyOthers" @cell-click="" @edit-closed=""
 							highlight-current-row
 							:edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-							:edit-rules="validRules"
-							:expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+							:edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+							:expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
 							<vxe-column type="expand" width="80">
 								<template #content="{ row, rowIndex }">
 									<InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -892,6 +892,8 @@ import ProjectListForm from './ProgramForm'
 export default {
 	data() {
 		return {
+			tableRef: null,
+			tableData: [],
 			currentNodeName: "",
 			confirmStatusList: [],
 			validRules: {
@@ -901,9 +903,12 @@ export default {
 				deptName: [
 					{ required: true, message: '报销部门不能为空' }
 				],
-				typeName: [
+				reimbursementType: [
 					{ required: true, message: '报销类型不能为空' }
 				],
+				typeName: [
+					{ required: true, message: '报销类别不能为空' }
+				],
 				projectName: [
 					{ required: true, message: '报销项目不能为空' }
 				],
@@ -1183,6 +1188,8 @@ export default {
 						// this.startPur(this.inputForm.purchaseId)
 					}
 
+
+
 					//  获取当前审核节点
 					this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
 						this.currentNodeName = name
@@ -1210,7 +1217,9 @@ export default {
 							}
 						});
 					})
+
 					this.loading = false
+
 				})
 				if (method !== 'edit' && method !== 'view') {
 					// this.$refs.invoiceReimbursementUpLoadComponent.newUpload(method, [], 'reimbursement_ping_gu')
@@ -1636,6 +1645,8 @@ export default {
 				if (valid) {
 					this.loading = true
 					this.submitCheck()
+					this.handleCheckAmount()
+
 					// if (this.$refs.invoiceReimbursementUpLoadComponent.checkProgress()) {
 					// 	this.loading = false
 					// 	return
@@ -2662,9 +2673,7 @@ export default {
 
 		},
 		handleTableInfo(value) {
-
-
-			if (value === '1') {
+			if (value == '1') {
 				this.tableRef = this.$refs.detailTable
 				this.tableData = this.inputForm.detailInfos
 			} else if (value == "3") {
@@ -2709,7 +2718,6 @@ export default {
 			let countIndex = 0
 			this.handleTableInfo(this.inputForm.sourceType)
 			this.tableData.forEach((element, index) => {
-
 				if (element.reimbursementType == 1) {
 					let files = this.inputForm.invoiceReimbursementFiles.filter(item => {
 						return item.remarks == element.uniqueId
@@ -2733,6 +2741,17 @@ export default {
 			} else {
 				this.loading = false
 			}
+		},
+		handleDefaultExpand() {
+			this.handleTableInfo(this.inputForm.sourceType)
+			let arr = []
+			this.tableData.forEach((item, index) => {
+				if (item.reimbursementType) {
+					arr.push(item.uniqueId)
+				}
+			})
+
+			return arr
 		}
 	}
 }

+ 20 - 7
src/views/zs/reimbursement/info/NewInfoUpdateForm.vue

@@ -123,8 +123,8 @@
             <vxe-table border show-footer show-overflow :footer-method="footerMethod" ref="detailTable" :key="detailKey"
               class="vxe-table-element" :data="inputForm.detailInfos" style="margin-left: 5em" highlight-current-row
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-              :edit-rules="validRules"
-              :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -310,8 +310,8 @@
               :key="detailKeyReport" class="vxe-table-element" :data="inputForm.detailInfoReports"
               style="margin-left: 5em" highlight-current-row
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-              :edit-rules="validRules"
-              :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -420,8 +420,8 @@
                 class="vxe-table-element" :data="inputForm.detailInfoOthers" style="margin-left: 5em"
                 :key="detailKeyOthers" highlight-current-row
                 :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-                :edit-rules="validRules"
-                :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+                :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+                :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
                 <vxe-column type="expand" width="80">
                   <template #content="{ row, rowIndex }">
                     <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -829,9 +829,12 @@ export default {
         deptName: [
           { required: true, message: '报销部门不能为空' }
         ],
-        typeName: [
+        reimbursementType: [
           { required: true, message: '报销类型不能为空' }
         ],
+        typeName: [
+          { required: true, message: '报销类别不能为空' }
+        ],
         projectName: [
           { required: true, message: '报销项目不能为空' }
         ],
@@ -2443,6 +2446,16 @@ export default {
       } else {
         this.loading = false
       }
+    },
+    handleDefaultExpand() {
+      this.handleTableInfo(this.inputForm.sourceType)
+      let arr = []
+      this.tableData.forEach((item, index) => {
+        if (item.reimbursementType) {
+          arr.push(item.uniqueId)
+        }
+      })
+      return arr
     }
   }
 }

+ 22 - 8
src/views/zs/reimbursement/info/NewReimbursementForm.vue

@@ -122,8 +122,8 @@
               class="vxe-table-element" :data="inputForm.detailInfos" style="margin-left: 5em" :key="detailKey"
               highlight-current-row
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-              :edit-rules="validRules"
-              :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -310,8 +310,8 @@
               class="vxe-table-element" :data="inputForm.detailInfoReports" style="margin-left: 5em"
               :key="detailKeyReport" highlight-current-row
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-              :edit-rules="validRules"
-              :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -419,8 +419,8 @@
               class="vxe-table-element" :data="inputForm.detailInfoOthers" style="margin-left: 5em"
               :key="detailKeyOthers" highlight-current-row
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
-              :edit-rules="validRules"
-              :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              :edit-rules="validRules" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -607,7 +607,8 @@
               :edit-config="{ trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon: '_' }"
               :edit-rules="validRules" :tooltip-config="{
                 enterable: true
-              }" :expand-config="{ expandAll: true, accordion: false, toggleMethod: handleExpand }">
+              }" :row-config="{ keyField: 'uniqueId' }"
+              :expand-config="{ expandAll: false, accordion: false, toggleMethod: handleExpand, expandRowKeys: handleDefaultExpand() }">
               <vxe-column type="expand" width="80">
                 <template #content="{ row, rowIndex }">
                   <InvoiceReimbursementUpLoadComponent v-if="row.reimbursementType == 1"
@@ -957,9 +958,12 @@ export default {
         deptName: [
           { required: true, message: '报销部门不能为空' }
         ],
-        typeName: [
+        reimbursementType: [
           { required: true, message: '报销类型不能为空' }
         ],
+        typeName: [
+          { required: true, message: '报销类别不能为空' }
+        ],
         projectName: [
           { required: true, message: '报销项目不能为空' }
         ],
@@ -2800,6 +2804,16 @@ export default {
       } else {
         this.loading = false
       }
+    },
+    handleDefaultExpand() {
+      this.handleTableInfo(this.inputForm.sourceType)
+      let arr = []
+      this.tableData.forEach((item, index) => {
+        if (item.reimbursementType) {
+          arr.push(item.uniqueId)
+        }
+      })
+      return arr
     }
   }
 }