Commit 8e7c07e3 by zhangxingmin

Merge remote-tracking branch 'origin/dev' into prod

parents 8b63a4cd fee54f23
......@@ -572,3 +572,27 @@ export function batchActualPayoutDate(data) {
data: data
})
}
// 计算出账检核统计
export function statisticsFortune(data) {
return request({
url: '/csf/api/fortune/statistics',
method: 'post',
data: data
})
}
// 计算入账检核统计
export function statisticsCommission(data) {
return request({
url: '/csf/api/commission/statistics',
method: 'post',
data: data
})
}
// 计算薪资发放统计
export function statisticsFortuneAccount(data) {
return request({
url: '/csf/api/fortune/fortuneAccount/statistics',
method: 'post',
data: data
})
}
......@@ -93,7 +93,7 @@
v-loading="loading"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="40" :selectable="selectableFn" />
<el-table-column type="selection" width="40" :selectable="selectableFn" fixed="left" />
<el-table-column
prop="commissionStatus"
label="比对状态"
......@@ -105,14 +105,33 @@
{{ selectDictLabel(csf_commission_status, row.commissionStatus) }}
</template>
</el-table-column>
<el-table-column prop="commissionBizType" label="业务类型" width="120" sortable>
<el-table-column
prop="commissionBizType"
label="业务类型"
width="120"
sortable
fixed="left"
>
<template #default="{ row }">
{{ getCommissionBizTypeLabel(row.commissionBizType) }}
</template>
</el-table-column>
<el-table-column prop="reconciliationYearMonth" label="检核年月" width="120" sortable />
<el-table-column prop="policyNo" label="保单号" width="120" sortable />
<el-table-column prop="reconciliationCompany" label="对账公司" width="120" sortable />
<el-table-column
prop="reconciliationYearMonth"
label="检核年月"
width="120"
sortable
fixed="left"
/>
<el-table-column prop="policyNo" label="保单号" width="120" sortable fixed="left" />
<el-table-column prop="policyHolder" label="投保人" width="120" fixed="left" />
<el-table-column
prop="reconciliationCompany"
label="对账公司"
width="120"
sortable
fixed="left"
/>
<el-table-column prop="commissionDate" label="入账月" width="120" sortable />
<el-table-column prop="commissionExpectedStatus" label="入账状态" width="120" sortable>
<template #default="{ row }">
......@@ -168,8 +187,6 @@
/>
<el-table-column prop="policyCurrency" label="保单币种" width="120" sortable />
<el-table-column prop="productName" label="产品名称" width="120" />
<el-table-column prop="policyHolder" label="投保人" width="120" />
<el-table-column prop="policyHolderEn" label="投保人(英文)" width="120" />
<el-table-column prop="broker" label="转介人" width="120" />
<el-table-column prop="insuranceCompany" label="保险公司" width="120" />
......@@ -477,13 +494,15 @@ import {
deletePolicyCommission,
syncExpectedCommission,
compareCommissionEntry,
editStatusApi
editStatusApi,
statisticsCommission
} from '@/api/financial/commission'
import { InfoFilled, Select, Upload, Plus } from '@element-plus/icons-vue'
import FileUpload from '@/components/FileUpload/index.vue'
import { loadDicts, getDictLabel } from '@/utils/useDict'
const oldStaticData = ref({})
const accountedStatusFormModel = ref({})
const accountedStatusFlag = ref(false)
const accountedStatusFormRef = ref(null)
......@@ -1008,9 +1027,32 @@ const checkRecordQuery = async () => {
ElMessage.error('查询检核记录失败')
}
}
// 获取统计
const getStaticData = async data => {
try {
const res = await statisticsCommission(data)
console.log('====================================')
console.log('统计数据', res)
console.log('====================================')
if (res.code === 200) {
statisticsData.value = res.data || {}
} else {
ElMessage.error(res.msg || '获取统计数据失败')
}
} catch (error) {
console.error('获取统计数据失败:', error)
ElMessage.error(error.message || '获取统计数据失败')
}
}
const multipleSelection = ref([])
const handleSelectionChange = val => {
let commissionIds = val.map(item => item.id) || []
if (commissionIds.length > 0) {
getStaticData({ commissionIds })
} else {
statisticsData.value = JSON.parse(JSON.stringify(oldStaticData.value))
}
multipleSelection.value = val
console.log('全选:', val)
// 生成可出账记录按钮是否禁用
......@@ -1072,7 +1114,7 @@ const loadTableData = async (searchParams = {}) => {
pageTotal.value = res.data.page.total || 0
pageSize.value = res.data.page.size || 0
// 统计信息
statisticsData.value = res.data.commissionStatisticsVO || {}
statisticsData.value = oldStaticData.value = res.data.commissionStatisticsVO || {}
} catch (error) {
console.error('加载数据失败:', error)
ElMessage.error(error.message || '加载数据失败')
......
......@@ -354,7 +354,8 @@ import {
billSplitRate,
billBatchSave,
billCalculateToAmount,
updatePolicyFortuneAccount
updatePolicyFortuneAccount,
statisticsFortuneAccount
} from '@/api/financial/commission'
import { formatCurrency, inputThousands } from '@/utils/number'
import { generateId } from '@/utils/common'
......@@ -406,6 +407,7 @@ const searchConfig = ref([
defaultValue: ['6'] //默认查询待出账,已检核的数据
}
])
const oldStaticData = ref({})
// 添加表格引用
const tableRef = ref()
// 存储所有选中的行数据(用于跨页保持选择)
......@@ -836,7 +838,7 @@ const getList = async (searchParams = {}) => {
loading.value = false
}
if (response.data.statisticsVO) {
statisticInfo.value = response.data.statisticsVO
statisticInfo.value = oldStaticData.value = response.data.statisticsVO
}
// 数据加载完成后,设置当前页的选中状态
......@@ -877,9 +879,31 @@ const handleReset = () => {
console.log('表单已重置')
getList(searchParams.value)
}
// 获取统计
const getStaticData = async data => {
try {
const res = await statisticsFortuneAccount(data)
console.log('====================================')
console.log('统计数据', res)
console.log('====================================')
if (res.code === 200) {
statisticInfo.value = res.data || {}
} else {
ElMessage.error(res.msg || '获取统计数据失败')
}
} catch (error) {
console.error('获取统计数据失败:', error)
ElMessage.error(error.message || '获取统计数据失败')
}
}
// 选择行变化
const handleSelectionChange = selection => {
let fortuneAccountIdList = selection.map(item => item.id) || []
if (fortuneAccountIdList.length > 0) {
getStaticData({ fortuneAccountIdList })
} else {
statisticInfo.value = JSON.parse(JSON.stringify(oldStaticData.value))
}
selectedRows.value = selection
// 更新全局选中状态
updateAllSelectedRows()
......
......@@ -63,11 +63,13 @@
<!-- 应付款管理列表 -->
<el-table
:data="tableData"
width="1200"
height="400"
border
highlight-current-row
style="width: 100%"
v-loading="loading"
:row-key="getRowKey"
>
<el-table-column
v-for="(column, index) in payableReportTableColumns"
......@@ -77,6 +79,7 @@
:width="column.width"
:sortable="column.sortable"
:formatter="column.formatter"
:fixed="column.fixed"
/>
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="scope">
......@@ -145,6 +148,7 @@
border
style="width: 100%; margin-bottom: 10px"
:row-class-name="getRowClassName"
:row-key="getRowKey"
>
<el-table-column
v-for="item in payableReportListTableColumns"
......@@ -153,6 +157,7 @@
:label="item.label"
:width="item.width"
:formatter="item.formatter"
:fixed="item.fixed"
/>
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="{ row }">
......@@ -283,6 +288,7 @@ const payableReportTableColumns = ref([
label: '保单号',
sortable: true,
width: '150',
fixed: 'left',
formatter: row => row.policyNo || '-'
},
{
......@@ -290,6 +296,7 @@ const payableReportTableColumns = ref([
label: '投保人',
sortable: true,
width: '120',
fixed: 'left',
formatter: row => row.policyHolder || '-'
},
{
......@@ -297,6 +304,7 @@ const payableReportTableColumns = ref([
label: '转介人(主)',
sortable: true,
width: '150',
fixed: 'left',
formatter: row => row.broker || '-'
},
{
......@@ -304,28 +312,38 @@ const payableReportTableColumns = ref([
label: '职级',
sortable: true,
width: '80',
fixed: 'left',
formatter: row => row.brokerGradeName || '-'
},
{
prop: 'fortunePeriod',
label: '出账期数',
prop: 'period',
label: '出账期数/总期数',
sortable: true,
width: '120',
formatter: row => row.fortunePeriod || '-'
},
{
prop: 'fortuneTotalPeriod',
label: '出账总期数',
sortable: true,
width: '120',
formatter: row => row.fortuneTotalPeriod || '-'
fixed: 'left',
formatter: row => row.period || '-'
},
// {
// prop: 'fortunePeriod',
// label: '出账期数',
// sortable: true,
// width: '120',
// formatter: row => row.fortunePeriod || '-'
// },
// {
// prop: 'fortuneTotalPeriod',
// label: '出账总期数',
// sortable: true,
// width: '120',
// formatter: row => row.fortuneTotalPeriod || '-'
// },
{ prop: 'payoutDate', label: '出账年月(估)', sortable: true, width: '130' },
{
prop: 'paidRatio',
label: '已出账比例',
sortable: true,
width: '120',
fixed: 'left',
formatter: row => (row.paidRatio || 0) + '%' || '-'
},
{
......@@ -401,13 +419,14 @@ const payableReportListTableColumns = ref([
label: '是否实际出账',
sortable: true,
width: '120',
fixed: 'left',
formatter: row => getTypeLabel(row.type) || '-'
},
{ prop: 'payableNo', label: '业务编号', sortable: true, width: '120' },
{ prop: 'policyNo', label: '保单号', sortable: true, width: '120' },
{ prop: 'broker', label: '转介人', sortable: true, width: '120' },
{ prop: 'brokerGradeName', label: '职级', sortable: true, width: '100' },
{ prop: 'fortuneName', label: '出账项目', sortable: true, width: '150' },
{ prop: 'payableNo', label: '业务编号', sortable: true, width: '120', fixed: 'left' },
{ prop: 'policyNo', label: '保单号', sortable: true, width: '120', fixed: 'left' },
{ prop: 'broker', label: '转介人', sortable: true, width: '120', fixed: 'left' },
{ prop: 'brokerGradeName', label: '职级', sortable: true, width: '100', fixed: 'left' },
{ prop: 'fortuneName', label: '出账项目', sortable: true, width: '150', fixed: 'left' },
{ prop: 'amountSourceName', label: '关联人员', sortable: true, width: '120' },
{
prop: 'status',
......@@ -884,121 +903,6 @@ const updatePayRecordFormConfig = [
// label: '备注'
// }
]
// const addPayRecordFormConfig = [
// {
// type: 'select',
// prop: 'fortuneBizType',
// label: '应付单类型',
// options: [
// { value: 'R', label: '关联保单应付单' },
// { value: 'U', label: '非关联保单应付单' }
// ]
// },
// {
// type: 'input',
// prop: 'policyNo',
// label: '关联保单号',
// visible: formData => formData.fortuneBizType === 'R'
// },
// {
// type: 'input',
// prop: 'fortunePeriod',
// label: '佣金期数',
// inputType: 'decimal',
// visible: formData => formData.fortuneBizType === 'R',
// rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }]
// },
// {
// type: 'input',
// prop: 'fortuneTotalPeriod',
// label: '总期数',
// inputType: 'decimal',
// visible: formData => formData.fortuneBizType === 'R',
// rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }]
// },
// {
// type: 'date',
// prop: 'payoutDate',
// label: '出账日(估)',
// placeholder: '请选择'
// },
// {
// type: 'date',
// prop: 'actualPayoutDate',
// label: '出账日(实)',
// placeholder: '请选择',
// maxDate: 'today'
// },
// {
// type: 'input',
// prop: 'hkdAmount',
// label: '出账金额',
// rules: [
// { required: true, message: '请输入', trigger: 'blur' },
// { pattern: /^-?\d+(\.\d{1,2})?$/, message: '小数(最多两位)', trigger: 'blur' }
// ]
// },
// {
// type: 'select',
// prop: 'currency',
// label: '出账币种',
// dictType: 'bx_currency_type',
// defaultValue: 'HKD'
// },
// {
// type: 'input',
// prop: 'defaultExchangeRate',
// label: '结算汇率(入账检核时的汇率)',
// rules: [
// { required: true, message: '请输入', trigger: 'blur' },
// { pattern: /^-?\d+(\.\d{1,6})?$/, message: '小数(最多6位)', trigger: 'blur' }
// ]
// },
// {
// type: 'select',
// prop: 'fortuneType',
// label: '出账项目',
// dictType: 'csf_fortune_type'
// },
// {
// type: 'select',
// prop: 'brokerBizId',
// label: '转介人',
// api: '/insurance/base/api/userSaleExpand/page',
// keywordField: 'realName',
// requestParams: { pageNo: 1, pageSize: 200 },
// placeholder: '输入转介人名称搜索',
// debounceWait: 500, // 自定义防抖时间
// valueKey: 'clientUserBizId',
// labelKey: 'realName',
// onChangeExtraFields: {
// broker: 'realName', // 自动同步 raw.name 到 reconciliationCompany
// reconciliationCompanyCode: 'code'
// },
// transform: res => {
// return res?.data.records || []
// }
// },
// {
// type: 'select',
// prop: 'status',
// label: '出账状态',
// dictType: 'csf_expected_fortune_status'
// },
// {
// type: 'input',
// prop: 'exchangeRate',
// label: '结算汇率',
// inputType: 'decimal',
// rules: [{ required: true, message: '只能输入正整数和小数', trigger: 'blur' }]
// // defaultValue: 1
// },
// {
// type: 'input',
// prop: 'remark',
// label: '备注'
// }
// ]
const addPayRecordFormConfig = [
{
type: 'select',
......@@ -1217,7 +1121,11 @@ const typeOptions = [
{ value: 1, label: '预计' },
{ value: 2, label: '实际' }
]
// 为表格提供唯一的行 key
const getRowKey = row => {
// 使用 'payableNo' 作为唯一键,请确保这个字段在你的数据中是唯一的
return row.payableNo
}
// 是否实收通过value转成label
const getTypeLabel = value => {
const item = typeOptions.find(item => item.value === value)
......@@ -1669,6 +1577,19 @@ const loadTableData = async () => {
pageSize: pageSize.value
}
const response = await payableReport(params)
response.data.page.records.map(item => {
if (item.fortunePeriod && !item.fortuneTotalPeriod) {
item.period = item.fortunePeriod
}
if (!item.fortunePeriod && item.fortuneTotalPeriod) {
item.period = item.fortuneTotalPeriod
}
if (item.fortunePeriod && item.fortuneTotalPeriod) {
item.period = `${item.fortunePeriod}/${item.fortuneTotalPeriod}`
}
return item
})
tableData.value = response.data.page.records
pageTotal.value = response.data.page.total
pageSize.value = response.data.page.size
......
......@@ -176,6 +176,7 @@
</div>
<el-table
:data="receivableReportTableData"
height="400"
border
style="width: 100%; margin-bottom: 10px; min-height: 300px"
:row-class-name="getRowClassName"
......@@ -187,6 +188,7 @@
:label="item.label"
:width="item.width"
:formatter="item.formatter"
:fixed="item.fixed"
/>
<el-table-column fixed="right" label="操作" min-width="120">
......@@ -1043,13 +1045,23 @@ const receivableReportTableColumns = ref([
label: '对账公司',
sortable: true,
width: '150',
fixed: 'left',
formatter: row => row.reconciliationCompany || '-'
},
{
prop: 'policyHolder',
label: '投保人',
sortable: true,
width: '120',
fixed: 'left',
formatter: row => row.policyHolder || '-'
},
{
prop: 'commissionPeriod',
label: '入账期数',
sortable: true,
width: '100',
fixed: 'left',
formatter: row => row.commissionPeriod || '-'
},
{
......@@ -1057,6 +1069,7 @@ const receivableReportTableColumns = ref([
label: '入账总期数',
sortable: true,
width: '100',
fixed: 'left',
formatter: row => row.totalPeriod || '-'
},
{ prop: 'commissionDate', label: '入账年月(估)', sortable: true, width: '130' },
......@@ -1117,13 +1130,7 @@ const receivableReportTableColumns = ref([
width: '120',
formatter: row => formatCurrency(row.premium || 0)
},
{
prop: 'policyHolder',
label: '投保人',
sortable: true,
width: '120',
formatter: row => row.policyHolder || '-'
},
{
prop: 'policyHolderEn',
label: '投保人(英文)',
......@@ -1173,34 +1180,25 @@ const receivableReportItemTableColumns = ref([
label: '是否实收',
sortable: true,
width: '80',
fixed: 'left',
formatter: row => getTypeLabel(row.type) || '-'
},
{
prop: 'commissionBizType',
label: '应收单类型',
sortable: true,
width: '150',
formatter: row => getCommissionBizTypeLabel(row.commissionBizType) || '-'
},
{
prop: 'no',
label: '应收单编号',
sortable: true,
width: '180',
fixed: 'left',
formatter: row => row.no || '-'
},
// {
// prop: 'receivableNo',
// label: '应收款编号',
// sortable: true,
// width: '150',
// formatter: row => row.receivableNo || '-'
// },
{
prop: 'policyNo',
label: '保单号',
sortable: true,
width: '150',
fixed: 'left',
formatter: row => row.policyNo || '-'
},
{
......@@ -1208,6 +1206,7 @@ const receivableReportItemTableColumns = ref([
label: '对账公司',
sortable: true,
width: '100',
fixed: 'left',
formatter: row => row.reconciliationCompany || '-'
},
{
......@@ -1215,9 +1214,17 @@ const receivableReportItemTableColumns = ref([
label: '入账状态',
sortable: true,
width: '120',
fixed: 'left',
formatter: row => formatStatus(row) || '-'
},
{
prop: 'commissionBizType',
label: '应收单类型',
sortable: true,
width: '150',
formatter: row => getCommissionBizTypeLabel(row.commissionBizType) || '-'
},
{
prop: 'commissionPeriod',
label: '入账期数',
sortable: true,
......
......@@ -107,8 +107,9 @@
prop="productName"
width="200"
show-overflow-tooltip
fixed="left"
/>
<el-table-column label="签单日" align="center" width="180" prop="signDate">
<el-table-column label="签单日" align="center" width="180" prop="signDate" fixed="left">
<template #default="scope">
<span>{{ scope.row.signDate ? formatToDate(scope.row.signDate) : '--' }}</span>
</template>
......
......@@ -26,10 +26,10 @@
style="width: 100%"
v-loading="loading"
>
<el-table-column type="selection" width="40" />
<el-table-column type="selection" width="40" fixed="left" />
<el-table-column prop="policyNo" label="保单号" width="150" fixed="left" />
<el-table-column prop="currentIssueNumber" label="当前期数" width="80" fixed="left" />
<el-table-column prop="reconciliationType" label="对账类型" width="150">
<el-table-column prop="reconciliationType" label="对账类型" width="150" fixed="left">
<template #default="{ row }">
{{
row.currentIssueNumber && row.currentIssueNumber == '1'
......@@ -38,8 +38,9 @@
}}
</template>
</el-table-column>
<el-table-column prop="insuranceCompany" label="保险公司" width="150" />
<el-table-column prop="insuranceCompany" label="保险公司" width="150" fixed="left" />
<el-table-column prop="policyHolder" label="投保人" width="150" fixed="left" />
<el-table-column prop="policyHolderEn" label="投保人(英文)" width="120" />
<el-table-column prop="policyFollowStatus" label="新单状态" width="150">
<template #default="{ row }">
{{ getDictLabel('csf_policy_follow_status_new', row.policyFollowStatus) }}
......@@ -97,8 +98,7 @@
</template>
</el-table-column>
<el-table-column prop="payer" label="付款人" width="150" />
<el-table-column prop="policyHolder" label="投保人" width="150" />
<el-table-column prop="policyHolderEn" label="投保人(英文)" width="120" />
<el-table-column prop="insured" label="受保人" width="150" />
<el-table-column prop="insuredEn" label="受保人(英文)" width="150" />
<el-table-column prop="brokerName" label="转介人" width="150" />
......
......@@ -26,17 +26,24 @@
style="width: 100%"
v-loading="loading"
>
<el-table-column prop="policyNo" label="保单号" width="200" sortable />
<el-table-column prop="status" label="新单状态" width="120" sortable>
<el-table-column prop="policyNo" label="保单号" width="200" sortable fixed="left" />
<el-table-column prop="status" label="新单状态" width="120" sortable fixed="left">
<template #default="{ row }">
{{ getDictLabel('csf_policy_follow_status_new', row.status) }}
</template>
</el-table-column>
<el-table-column prop="appointmentNo" label="预约编号" width="200" sortable />
<el-table-column prop="effectiveDate" label="生效日" width="150" sortable />
<el-table-column
prop="appointmentNo"
label="预约编号"
width="200"
sortable
fixed="left"
/>
<el-table-column prop="effectiveDate" label="生效日" width="150" sortable fixed="left" />
<el-table-column prop="policyHolder" label="投保人" width="150" sortable fixed="left" />
<el-table-column prop="signDate" label="签单日" width="150" sortable />
<el-table-column prop="latestPaymentDate" label="最晚缴费日" width="150" sortable />
<el-table-column prop="policyHolder" label="投保人" width="150" sortable />
<el-table-column prop="insured" label="受保人" width="150" sortable />
<el-table-column prop="insuranceCompany" label="保险公司" width="200" sortable />
<el-table-column prop="productName" label="产品计划" width="200" sortable />
......@@ -151,7 +158,7 @@ import {
saveInitialPayment,
updatePolicyProduct
} from '@/api/sign/underwritingMain'
import copyToClipboard from '@/utils/copyToClipboard';
import copyToClipboard from '@/utils/copyToClipboard'
import PolicyDetail from './policyDetail.vue'
const policyDetailFormRef = ref(null)
const policyDetailFormData = ref({})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment