|
@@ -10,7 +10,7 @@ import { usePersonnel } from '@/store/list_personnel';
|
|
|
import { FeeReportTemplateType } from '@/type/BaseBusinessFeeseType';
|
|
|
import { BaseFeesetAction } from '@/type/BaseFeesetAction';
|
|
|
import { getMonthStartAndEndDates } from '@/utils/dateTimeStr';
|
|
|
-import { format, isArray, isBoolean, isNumber } from '@/utils/is';
|
|
|
+import { format, isArray, isArrayLength, isBoolean, isNumber, roundToDecimals } from '@/utils/is';
|
|
|
import { useErrorConfirm } from '@/utils/useErrorConfirm';
|
|
|
import { useReturnData } from '@/utils/useReturnData';
|
|
|
import { Tickets, DocumentChecked } from "@element-plus/icons-vue";
|
|
@@ -240,6 +240,26 @@ function userMoneySumDetailList(usermoneyGridOptions: BasicTableProps) {
|
|
|
usermoneyGridOptions.loading = false
|
|
|
}
|
|
|
}
|
|
|
+ // 获取客户、单号总计金额
|
|
|
+ const getFeeTotalAmount = computed(() => {
|
|
|
+ if (
|
|
|
+ usermoneyGridOptions.data &&
|
|
|
+ listParams.customerId
|
|
|
+ ) {
|
|
|
+ const isEvery = usermoneyGridOptions.data.every(item => item.customerId === Number(listParams.customerId))
|
|
|
+ return isEvery ? usermoneyGridOptions.data.reduce((acc, item) => roundToDecimals(acc + item.feeAmount, 2), 0) : 0;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ usermoneyGridOptions.data &&
|
|
|
+ listParams.orderIdList &&
|
|
|
+ isArrayLength(listParams.orderIdList)
|
|
|
+ ) {
|
|
|
+ const orderId = listParams.orderIdList ? listParams.orderIdList[0] : ''
|
|
|
+ const isEvery = usermoneyGridOptions.data.every(item => item.orderId === orderId)
|
|
|
+ return isEvery ? usermoneyGridOptions.data.reduce((acc, item) => roundToDecimals(acc + item.feeAmount, 2), 0) : 0
|
|
|
+ }
|
|
|
+ return 0
|
|
|
+ })
|
|
|
|
|
|
// 扁平化起始结束时间
|
|
|
const flatDate = async () => {
|
|
@@ -440,7 +460,8 @@ function userMoneySumDetailList(usermoneyGridOptions: BasicTableProps) {
|
|
|
reportQueryDateTypeList,
|
|
|
getSalesmanUsesList,
|
|
|
accountPeriodTypeList,
|
|
|
- allPaymentPlatformList
|
|
|
+ allPaymentPlatformList,
|
|
|
+ getFeeTotalAmount,
|
|
|
}
|
|
|
}
|
|
|
|