Bläddra i källkod

电子发票汇总

sangwenwei 1 år sedan
förälder
incheckning
9c91a134a2

+ 25 - 1
src/views/ccpm/reimbursement/info/InfoForm.vue

@@ -575,6 +575,7 @@
 						  show-footer
 						  show-overflow
 						  ref="invoiceReimbursementTable"
+						  :footer-method="footerMethod1111"
 						  class="vxe-table-element"
 						  :data="inputForm.invoiceReimbursements"
 						  style="margin-left: 5em"
@@ -929,7 +930,30 @@
           this.inputForm.preList[index].fileInfoLost = []
         }
         this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
-      }
+      },
+		footerMethod1111 ({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '汇总'
+					}
+					if (['amount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['taxAmount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['count'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
     }
   }
 </script>

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

@@ -1476,7 +1476,7 @@
 			const footerData = [
 				columns.map((column, columnIndex) => {
 					if (columnIndex === 0) {
-						return '总报销费用'
+						return '总'
 					}
 					if (['amount'].includes(column.property)) {
 						// eslint-disable-next-line no-undef

+ 25 - 1
src/views/cw/reimbursementApproval/info/InfoForm.vue

@@ -647,6 +647,7 @@
 						  ref="invoiceReimbursementTable"
 						  class="vxe-table-element"
 						  :data="inputForm.invoiceReimbursements"
+						  :footer-method="footerMethod1111"
 						  style="margin-left: 5em"
 						  @cell-click=""
 						  :key="invoiceReimbursementKey"
@@ -991,7 +992,30 @@
           this.inputForm.preList[index].fileInfoLost = []
         }
         // this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
-      }
+      },
+		footerMethod1111 ({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '汇总'
+					}
+					if (['amount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['taxAmount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['count'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
     }
   }
 </script>

+ 25 - 1
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -678,6 +678,7 @@
 						ref="invoiceReimbursementTable"
 						class="vxe-table-element"
 						:data="inputForm.invoiceReimbursements"
+						:footer-method="footerMethod1111"
 						style="margin-left: 5em"
 						:key="invoiceReimbursementKey"
 						highlight-current-row
@@ -2393,7 +2394,30 @@
 				}
 			}
 
-		}
+		},
+		footerMethod1111 ({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '汇总'
+					}
+					if (['amount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['taxAmount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['count'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
     }
   }
 </script>

+ 25 - 1
src/views/reimbursement/info/InfoForm.vue

@@ -606,6 +606,7 @@
 						  ref="invoiceReimbursementTable"
 						  class="vxe-table-element"
 						  :data="inputForm.invoiceReimbursements"
+						  :footer-method="footerMethod1111"
 						  style="margin-left: 5em"
 						  @cell-click=""
 						  :key="invoiceReimbursementKey"
@@ -1263,7 +1264,30 @@
           this.inputForm.preList[index].fileInfoLost = []
         }
         this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
-      }
+      },
+		footerMethod1111 ({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '汇总'
+					}
+					if (['amount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['taxAmount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['count'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
     }
   }
 </script>

+ 25 - 1
src/views/reimbursement/info/ReimbursementForm.vue

@@ -640,6 +640,7 @@
 							ref="invoiceReimbursementTable"
 							class="vxe-table-element"
 							:data="inputForm.invoiceReimbursements"
+							:footer-method="footerMethod1111"
 							style="margin-left: 5em"
 							@cell-click=""
 							:key="invoiceReimbursementKey"
@@ -2213,7 +2214,30 @@
 						}
 					}
 
-			}
+			},
+			footerMethod1111 ({ columns, data }) {
+				const footerData = [
+					columns.map((column, columnIndex) => {
+						if (columnIndex === 0) {
+							return '汇总'
+						}
+						if (['amount'].includes(column.property)) {
+							// eslint-disable-next-line no-undef
+							return XEUtils.sum(data, column.property)
+						}
+						if (['taxAmount'].includes(column.property)) {
+							// eslint-disable-next-line no-undef
+							return XEUtils.sum(data, column.property)
+						}
+						if (['count'].includes(column.property)) {
+							// eslint-disable-next-line no-undef
+							return XEUtils.sum(data, column.property)
+						}
+						return null
+					})
+				]
+				return footerData
+			},
 		}
 	}
 </script>

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

@@ -935,7 +935,7 @@
 			const footerData = [
 				columns.map((column, columnIndex) => {
 					if (columnIndex === 0) {
-						return '总报销费用'
+						return '总'
 					}
 					if (['amount'].includes(column.property)) {
 						// eslint-disable-next-line no-undef

+ 25 - 1
src/views/zs/reimbursement/info/ReimbursementForm.vue

@@ -566,6 +566,7 @@
 						ref="invoiceReimbursementTable"
 						class="vxe-table-element"
 						:data="inputForm.invoiceReimbursements"
+						:footer-method="footerMethod1111"
 						style="margin-left: 5em"
 						:key="invoiceReimbursementKey"
 						highlight-current-row
@@ -2069,7 +2070,30 @@
 				}
 			}
 
-		}
+		},
+		footerMethod1111 ({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '汇总'
+					}
+					if (['amount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['taxAmount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['count'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
     }
   }
 </script>